@kong-ui-public/split-pane 0.6.6 → 0.6.7-pr.4063.b6bcc4076.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/dist/split-pane.es.js +488 -526
- package/dist/split-pane.umd.js +1 -1
- package/dist/style.css +2 -1
- package/package.json +2 -2
package/dist/split-pane.es.js
CHANGED
|
@@ -1,546 +1,508 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ChevronDoubleLeftIcon as
|
|
3
|
-
import { useRouter as
|
|
4
|
-
import { createI18n as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, getCurrentInstance as c, getCurrentScope as l, nextTick as u, normalizeClass as d, onMounted as f, onScopeDispose as p, openBlock as m, readonly as h, ref as g, renderList as _, renderSlot as v, resolveComponent as y, resolveDynamicComponent as b, shallowRef as x, toValue as S, unref as C, useCssVars as w, useSlots as T, useTemplateRef as E, vShow as D, watch as O, watchEffect as k, withCtx as A, withDirectives as ee, withModifiers as j } from "vue";
|
|
2
|
+
import { ChevronDoubleLeftIcon as M, ChevronDoubleRightIcon as N } from "@kong/icons";
|
|
3
|
+
import { useRouter as P } from "vue-router";
|
|
4
|
+
import { createI18n as F, i18nTComponent as I } from "@kong-ui-public/i18n";
|
|
5
|
+
// src/constants/split-pane.ts
|
|
6
|
+
var L = "260px", R = "500px";
|
|
7
|
+
// ../../../node_modules/.pnpm/@vueuse+shared@14.4.0_vue@3.5.45_typescript@5.9.3_/node_modules/@vueuse/shared/dist/index.js
|
|
8
|
+
function z(e, t) {
|
|
9
|
+
return l() ? (p(e, t), !0) : !1;
|
|
8
10
|
}
|
|
9
|
-
|
|
11
|
+
var B = typeof window < "u" && typeof document < "u";
|
|
10
12
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return Array.isArray(e) ? e : [e];
|
|
13
|
+
var V = (e) => e != null, te = Object.prototype.toString, ne = (e) => te.call(e) === "[object Object]", re = () => {};
|
|
14
|
+
function H(e) {
|
|
15
|
+
return Array.isArray(e) ? e : [e];
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
17
|
+
function ie(e) {
|
|
18
|
+
return e || c();
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
20
|
+
function ae(e, t = !0, n) {
|
|
21
|
+
ie(n) ? f(e, n) : t ? e() : u(e);
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
function oe(e, t, n) {
|
|
24
|
+
return O(e, t, {
|
|
25
|
+
...n,
|
|
26
|
+
immediate: !0
|
|
27
|
+
});
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
// ../../../node_modules/.pnpm/@vueuse+core@14.4.0_vue@3.5.45_typescript@5.9.3_/node_modules/@vueuse/core/dist/index.js
|
|
30
|
+
var U = B ? window : void 0;
|
|
31
|
+
B && window.document, B && window.navigator, B && window.location;
|
|
32
|
+
function W(e) {
|
|
33
|
+
let t = S(e);
|
|
34
|
+
return t?.$el ?? t;
|
|
33
35
|
}
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
c.forEach((i) => i());
|
|
52
|
-
});
|
|
53
|
-
}, { flush: "post" });
|
|
36
|
+
function G(...e) {
|
|
37
|
+
let n = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = t(() => {
|
|
38
|
+
let t = H(S(e[0])).filter((e) => e != null);
|
|
39
|
+
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
40
|
+
});
|
|
41
|
+
return oe(() => [
|
|
42
|
+
r.value?.map((e) => W(e)) ?? [U].filter((e) => e != null),
|
|
43
|
+
H(S(r.value ? e[1] : e[0])),
|
|
44
|
+
H(C(r.value ? e[2] : e[1])),
|
|
45
|
+
S(r.value ? e[3] : e[2])
|
|
46
|
+
], ([e, t, r, i], a, o) => {
|
|
47
|
+
if (!e?.length || !t?.length || !r?.length) return;
|
|
48
|
+
let s = ne(i) ? { ...i } : i, c = e.flatMap((e) => t.flatMap((t) => r.map((r) => n(e, t, r, s))));
|
|
49
|
+
o(() => {
|
|
50
|
+
c.forEach((e) => e());
|
|
51
|
+
});
|
|
52
|
+
}, { flush: "post" });
|
|
54
53
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}, a), e;
|
|
54
|
+
function se() {
|
|
55
|
+
let e = x(!1), t = c();
|
|
56
|
+
return t && f(() => {
|
|
57
|
+
e.value = !0;
|
|
58
|
+
}, t), e;
|
|
61
59
|
}
|
|
62
|
-
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
61
|
+
function K(e) {
|
|
62
|
+
let n = se();
|
|
63
|
+
return t(() => (n.value, !!e()));
|
|
66
64
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
takeRecords: h
|
|
87
|
-
};
|
|
65
|
+
function ce(e, n, r = {}) {
|
|
66
|
+
let { window: i = U, ...a } = r, o, s = /* @__PURE__ */ K(() => i && "MutationObserver" in i), c = () => {
|
|
67
|
+
o &&= (o.disconnect(), void 0);
|
|
68
|
+
}, l = O(t(() => {
|
|
69
|
+
let t = H(S(e)).map(W).filter(V);
|
|
70
|
+
return new Set(t);
|
|
71
|
+
}), (e) => {
|
|
72
|
+
c(), s.value && e.size && (o = new MutationObserver(n), e.forEach((e) => o.observe(e, a)));
|
|
73
|
+
}, {
|
|
74
|
+
immediate: !0,
|
|
75
|
+
flush: "post"
|
|
76
|
+
}), u = () => o?.takeRecords(), d = () => {
|
|
77
|
+
l(), c();
|
|
78
|
+
};
|
|
79
|
+
return z(d), {
|
|
80
|
+
isSupported: s,
|
|
81
|
+
stop: d,
|
|
82
|
+
takeRecords: u
|
|
83
|
+
};
|
|
88
84
|
}
|
|
89
|
-
function
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return ie(h), h;
|
|
85
|
+
function le(e, t, n = {}) {
|
|
86
|
+
let { window: r = U, document: i = r?.document, flush: a = "sync" } = n;
|
|
87
|
+
if (!r || !i) return re;
|
|
88
|
+
let o, s = (e) => {
|
|
89
|
+
o?.(), o = e;
|
|
90
|
+
}, c = k(() => {
|
|
91
|
+
let n = W(e);
|
|
92
|
+
if (n) {
|
|
93
|
+
let { stop: e } = ce(i, (e) => {
|
|
94
|
+
e.map((e) => [...e.removedNodes]).flat().some((e) => e === n || e.contains(n)) && t(e);
|
|
95
|
+
}, {
|
|
96
|
+
window: r,
|
|
97
|
+
childList: !0,
|
|
98
|
+
subtree: !0
|
|
99
|
+
});
|
|
100
|
+
s(e);
|
|
101
|
+
}
|
|
102
|
+
}, { flush: a }), l = () => {
|
|
103
|
+
c(), s();
|
|
104
|
+
};
|
|
105
|
+
return z(l), l;
|
|
111
106
|
}
|
|
112
|
-
function
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
stop: h
|
|
134
|
-
};
|
|
107
|
+
function ue(e, n, r = {}) {
|
|
108
|
+
let { window: i = U, ...a } = r, o, s = /* @__PURE__ */ K(() => i && "ResizeObserver" in i), c = () => {
|
|
109
|
+
o &&= (o.disconnect(), void 0);
|
|
110
|
+
}, l = O(t(() => {
|
|
111
|
+
let t = S(e);
|
|
112
|
+
return Array.isArray(t) ? t.map((e) => W(e)) : [W(t)];
|
|
113
|
+
}), (e) => {
|
|
114
|
+
if (c(), s.value && i) {
|
|
115
|
+
o = new ResizeObserver(n);
|
|
116
|
+
for (let t of e) t && o.observe(t, a);
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
immediate: !0,
|
|
120
|
+
flush: "post"
|
|
121
|
+
}), u = () => {
|
|
122
|
+
c(), l();
|
|
123
|
+
};
|
|
124
|
+
return z(u), {
|
|
125
|
+
isSupported: s,
|
|
126
|
+
stop: u
|
|
127
|
+
};
|
|
135
128
|
}
|
|
136
|
-
function
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
};
|
|
143
|
-
return o && (j(e, "mouseenter", () => p(!0), { passive: !0 }), j(e, "mouseleave", () => p(!1), { passive: !0 }), n && Xe(R(() => _(e)), () => p(!1))), s;
|
|
129
|
+
function q(e, n = {}) {
|
|
130
|
+
let { delayEnter: r = 0, delayLeave: i = 0, triggerOnRemoval: a = !1, window: o = U } = n, s = x(!1), c, l = (e) => {
|
|
131
|
+
let t = e ? r : i;
|
|
132
|
+
c &&= (clearTimeout(c), void 0), t ? c = setTimeout(() => s.value = e, t) : s.value = e;
|
|
133
|
+
};
|
|
134
|
+
return o && (G(e, "mouseenter", () => l(!0), { passive: !0 }), G(e, "mouseleave", () => l(!1), { passive: !0 }), a && le(t(() => W(e)), () => l(!1))), s;
|
|
144
135
|
}
|
|
145
|
-
function
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
function de(e, n = {
|
|
137
|
+
width: 0,
|
|
138
|
+
height: 0
|
|
148
139
|
}, r = {}) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
};
|
|
140
|
+
let { window: i = U, box: a = "content-box" } = r, o = t(() => {
|
|
141
|
+
var t;
|
|
142
|
+
return (t = W(e)) == null || (t = t.namespaceURI) == null ? void 0 : t.includes("svg");
|
|
143
|
+
}), s = x(n.width), c = x(n.height), { stop: l } = ue(e, ([t]) => {
|
|
144
|
+
let n = a === "border-box" ? t.borderBoxSize : a === "content-box" ? t.contentBoxSize : t.devicePixelContentBoxSize;
|
|
145
|
+
if (i && o.value) {
|
|
146
|
+
let t = W(e);
|
|
147
|
+
if (t) {
|
|
148
|
+
let e = t.getBoundingClientRect();
|
|
149
|
+
s.value = e.width, c.value = e.height;
|
|
150
|
+
}
|
|
151
|
+
} else if (n) {
|
|
152
|
+
let e = H(n);
|
|
153
|
+
s.value = e.reduce((e, { inlineSize: t }) => e + t, 0), c.value = e.reduce((e, { blockSize: t }) => e + t, 0);
|
|
154
|
+
} else s.value = t.contentRect.width, c.value = t.contentRect.height;
|
|
155
|
+
}, r);
|
|
156
|
+
ae(() => {
|
|
157
|
+
let t = W(e);
|
|
158
|
+
if (t && "offsetWidth" in t) {
|
|
159
|
+
if (a === "content-box" && i) {
|
|
160
|
+
let e = i.getComputedStyle(t), n = Number.parseFloat(e.paddingLeft) + Number.parseFloat(e.paddingRight), r = Number.parseFloat(e.paddingTop) + Number.parseFloat(e.paddingBottom), a = Number.parseFloat(e.borderLeftWidth) + Number.parseFloat(e.borderRightWidth), o = Number.parseFloat(e.borderTopWidth) + Number.parseFloat(e.borderBottomWidth);
|
|
161
|
+
s.value = t.offsetWidth - n - a, c.value = t.offsetHeight - r - o;
|
|
162
|
+
} else s.value = t.offsetWidth, c.value = t.offsetHeight;
|
|
163
|
+
} else t && (s.value = n.width, c.value = n.height);
|
|
164
|
+
});
|
|
165
|
+
let u = O(() => W(e), (e) => {
|
|
166
|
+
s.value = e ? n.width : 0, c.value = e ? n.height : 0;
|
|
167
|
+
});
|
|
168
|
+
function d() {
|
|
169
|
+
l(), u();
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
width: s,
|
|
173
|
+
height: c,
|
|
174
|
+
stop: d
|
|
175
|
+
};
|
|
186
176
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}), {
|
|
253
|
-
isDraggingPaneLeft: te(M),
|
|
254
|
-
isDraggingInnerPanes: te(I),
|
|
255
|
-
startDraggingInnerPanes: W,
|
|
256
|
-
refreshInnerPaneSizes: v,
|
|
257
|
-
// Toggle the left pane
|
|
258
|
-
paneLeftExpanded: te(J),
|
|
259
|
-
togglePaneLeft: F,
|
|
260
|
-
startDraggingPaneLeft: S,
|
|
261
|
-
centerPaneWidth: V
|
|
262
|
-
};
|
|
177
|
+
// ../../../node_modules/.pnpm/@kong+design-tokens@3.5.1/node_modules/@kong/design-tokens/dist/tokens/js/index.mjs
|
|
178
|
+
var J = "20px", Y = g(!1), X = g(!1), Z = g(!0), Q = g(0);
|
|
179
|
+
function fe(e) {
|
|
180
|
+
let t = e?.verticalNavRef || g(null), n = e?.innerPanesContainerRef || g(null), r = e?.paneLeftRef || g(null), i = e?.paneCenterRef || g(null), a = e?.paneRightRef || g(null), o = (e) => {
|
|
181
|
+
switch (e) {
|
|
182
|
+
case "verticalNav": return t.value?.offsetWidth || 0;
|
|
183
|
+
case "innerPanesContainer": return n.value?.offsetWidth || 0;
|
|
184
|
+
case "paneLeft": return r.value?.offsetWidth || 0;
|
|
185
|
+
case "paneCenter": return i.value?.offsetWidth || 0;
|
|
186
|
+
case "paneRight": return a.value?.offsetWidth || 0;
|
|
187
|
+
default: return 0;
|
|
188
|
+
}
|
|
189
|
+
}, s = g(50), c = g(0), l = g(0), d = g(0), p = g(0), m = (e) => {
|
|
190
|
+
if (i.value) {
|
|
191
|
+
if (e) {
|
|
192
|
+
i.value.style.width = `${e}%`, Q.value = o("paneCenter");
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
typeof s.value == "number" && isFinite(s.value) || (s.value = 38), i.value.style.width = `${s.value}%`, Q.value = o("paneCenter");
|
|
196
|
+
}
|
|
197
|
+
}, _ = () => {
|
|
198
|
+
i.value && a.value?.style.display === "none" ? (i.value.style.flex = "1", m(100)) : (i.value && (i.value.style.flex = ""), m());
|
|
199
|
+
}, v = () => {
|
|
200
|
+
if (!n.value || !i.value) return;
|
|
201
|
+
let e = o("innerPanesContainer") - o("verticalNav") - o("paneLeft") - 100, t = s.value / 100 * o("innerPanesContainer");
|
|
202
|
+
t < 100 ? s.value = 100 / o("innerPanesContainer") * 100 : t > e && (s.value = e / o("innerPanesContainer") * 100), i.value && a.value && a.value?.style.display === "none" ? m(100) : m();
|
|
203
|
+
}, y = (e) => {
|
|
204
|
+
i.value && e.button === 0 && (X.value = !0, c.value = e.clientX, l.value = i.value.offsetWidth || 0);
|
|
205
|
+
}, b = (e) => {
|
|
206
|
+
if (!X.value || !n.value || !i.value) return;
|
|
207
|
+
let t = n.value.offsetWidth, r = e.clientX - c.value, a = (l.value + r) / t * 100, o = 100 / t * 100, u = (t - 100) / t * 100;
|
|
208
|
+
s.value = Math.min(Math.max(o, a), u), m();
|
|
209
|
+
}, x = () => {
|
|
210
|
+
X.value = !1;
|
|
211
|
+
}, S = (e) => {
|
|
212
|
+
r.value && Z.value && e.button === 0 && (Y.value = !0, d.value = e.clientX, p.value = r.value.offsetWidth || 0);
|
|
213
|
+
}, C = (e) => {
|
|
214
|
+
if (!Y.value || !r.value) return;
|
|
215
|
+
let t = p.value + (e.clientX - d.value), n = Number(L.replace(/px$/i, "")), i = Number(R.replace(/px$/i, ""));
|
|
216
|
+
t < n && (t = n), t > i && (t = i), r.value.style.width = `${t}px`, d.value = e.clientX, p.value = t, Q.value = o("paneCenter");
|
|
217
|
+
}, w = () => {
|
|
218
|
+
Y.value = !1;
|
|
219
|
+
};
|
|
220
|
+
return G(window, "resize", () => {
|
|
221
|
+
X.value || v();
|
|
222
|
+
}), f(async () => {
|
|
223
|
+
await u(), i.value && (v(), await u(), m(), requestAnimationFrame(() => {
|
|
224
|
+
Q.value = o("paneCenter");
|
|
225
|
+
}));
|
|
226
|
+
}), G(document, "mousemove", (e) => {
|
|
227
|
+
X.value && b(e), Y.value && C(e);
|
|
228
|
+
}), G(document, "mouseup", () => {
|
|
229
|
+
X.value && x(), Y.value && w();
|
|
230
|
+
}), {
|
|
231
|
+
isDraggingPaneLeft: h(Y),
|
|
232
|
+
isDraggingInnerPanes: h(X),
|
|
233
|
+
startDraggingInnerPanes: y,
|
|
234
|
+
refreshInnerPaneSizes: _,
|
|
235
|
+
paneLeftExpanded: h(Z),
|
|
236
|
+
togglePaneLeft: async () => {
|
|
237
|
+
Z.value = !Z.value;
|
|
238
|
+
},
|
|
239
|
+
startDraggingPaneLeft: S,
|
|
240
|
+
centerPaneWidth: Q
|
|
241
|
+
};
|
|
263
242
|
}
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
243
|
+
var pe = { actions: {
|
|
244
|
+
return: "Return",
|
|
245
|
+
collapse_panel: "Collapse panel",
|
|
246
|
+
expand_panel: "Expand panel",
|
|
247
|
+
drag_to_resize: "Click and drag to resize"
|
|
248
|
+
} };
|
|
249
|
+
// src/composable/useI18n.ts
|
|
250
|
+
function me() {
|
|
251
|
+
let e = F("en-us", pe);
|
|
252
|
+
return {
|
|
253
|
+
i18n: e,
|
|
254
|
+
i18nT: I(e)
|
|
255
|
+
};
|
|
274
256
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
}, ft = {
|
|
518
|
-
class: "left",
|
|
519
|
-
"data-testid": "split-toolbar-left"
|
|
520
|
-
}, vt = {
|
|
521
|
-
key: 0,
|
|
522
|
-
class: "center",
|
|
523
|
-
"data-testid": "split-toolbar-center"
|
|
524
|
-
}, pt = {
|
|
525
|
-
key: 1,
|
|
526
|
-
class: "right",
|
|
527
|
-
"data-testid": "split-toolbar-right"
|
|
257
|
+
// src/components/VerticalNavigation.vue?vue&type=script&setup=true&lang.ts
|
|
258
|
+
var he = { class: "kong-ui-public-split-pane-vertical-navigation" }, ge = { class: "split-pane-nav" }, _e = { class: "top" }, ve = { class: "bottom" }, ye = /*@__PURE__*/ s({
|
|
259
|
+
__name: "VerticalNavigation",
|
|
260
|
+
props: {
|
|
261
|
+
paneLeftWidth: { default: 0 },
|
|
262
|
+
paneLeftVisible: {
|
|
263
|
+
type: Boolean,
|
|
264
|
+
default: !0
|
|
265
|
+
},
|
|
266
|
+
items: { default: () => [] }
|
|
267
|
+
},
|
|
268
|
+
setup(s) {
|
|
269
|
+
w((e) => ({ eaa86402: D.value }));
|
|
270
|
+
let { i18n: c } = me(), l = P(), { paneLeftExpanded: p, togglePaneLeft: h, isDraggingPaneLeft: v, isDraggingInnerPanes: x } = fe(), S = g(!1), T = g(!1), E = t(() => S.value || v.value || x.value), D = t(() => `${s.paneLeftWidth - 8}px`), O = (e) => {
|
|
271
|
+
p.value || h(), !e.active && e.to && l.push(e.to);
|
|
272
|
+
};
|
|
273
|
+
return f(async () => {
|
|
274
|
+
await u(), await new Promise((e) => setTimeout(e, 500)), T.value = !0;
|
|
275
|
+
}), (t, l) => {
|
|
276
|
+
let u = y("KButton"), f = y("KTooltip");
|
|
277
|
+
return m(), i("div", he, [a("nav", ge, [a("div", _e, [(m(!0), i(e, null, _(s.items, (e) => (m(), n(f, {
|
|
278
|
+
key: e.tooltip,
|
|
279
|
+
"kpop-attributes": { offset: "10px" },
|
|
280
|
+
label: e.tooltip,
|
|
281
|
+
placement: "right"
|
|
282
|
+
}, {
|
|
283
|
+
default: A(() => [o(u, {
|
|
284
|
+
appearance: "none",
|
|
285
|
+
"aria-label": e.tooltip,
|
|
286
|
+
class: d(["split-pane-nav-item", { active: e.active }]),
|
|
287
|
+
"data-testid": `kong-ui-public-split-pane-vertical-navigation-nav-item-${e.testid}`,
|
|
288
|
+
icon: "",
|
|
289
|
+
size: "large",
|
|
290
|
+
style: { cursor: "pointer" },
|
|
291
|
+
to: e.to,
|
|
292
|
+
onClickCapture: j((t) => O(e), ["prevent"])
|
|
293
|
+
}, {
|
|
294
|
+
default: A(() => [(m(), n(b(e.icon), {
|
|
295
|
+
decorative: "",
|
|
296
|
+
size: `var(--kui-icon-size-40, ${C(J)})`
|
|
297
|
+
}, null, 8, ["size"]))]),
|
|
298
|
+
_: 2
|
|
299
|
+
}, 1032, [
|
|
300
|
+
"aria-label",
|
|
301
|
+
"class",
|
|
302
|
+
"data-testid",
|
|
303
|
+
"to",
|
|
304
|
+
"onClickCapture"
|
|
305
|
+
])]),
|
|
306
|
+
_: 2
|
|
307
|
+
}, 1032, ["label"]))), 128))]), a("div", ve, [s.paneLeftVisible ? (m(), i("div", {
|
|
308
|
+
key: 0,
|
|
309
|
+
class: d(["toggle-left-panel-control", {
|
|
310
|
+
expanded: C(p),
|
|
311
|
+
"disable-animation": !T.value || C(v) || C(x)
|
|
312
|
+
}]),
|
|
313
|
+
onTransitionend: l[0] ||= j((e) => S.value = !1, ["self"]),
|
|
314
|
+
onTransitionstart: l[1] ||= j((e) => S.value = !0, ["self"])
|
|
315
|
+
}, [(m(), n(f, {
|
|
316
|
+
key: String(C(p)),
|
|
317
|
+
"kpop-attributes": C(p) ? void 0 : { offset: "10px" },
|
|
318
|
+
label: E.value ? void 0 : C(p) ? C(c).t("actions.collapse_panel") : C(c).t("actions.expand_panel"),
|
|
319
|
+
placement: C(p) ? "left" : "right"
|
|
320
|
+
}, {
|
|
321
|
+
default: A(() => [o(u, {
|
|
322
|
+
appearance: "none",
|
|
323
|
+
"aria-controls": "left-pane",
|
|
324
|
+
"aria-expanded": C(p),
|
|
325
|
+
"aria-label": C(p) ? C(c).t("actions.collapse_panel") : C(c).t("actions.expand_panel"),
|
|
326
|
+
class: "split-pane-nav-item toggle-left-panel",
|
|
327
|
+
"data-testid": "kong-ui-public-split-pane-toggle-left-panel-button",
|
|
328
|
+
icon: "",
|
|
329
|
+
size: "large",
|
|
330
|
+
onClick: C(h)
|
|
331
|
+
}, {
|
|
332
|
+
default: A(() => [(m(), n(b(C(p) ? C(M) : C(N)), {
|
|
333
|
+
decorative: "",
|
|
334
|
+
size: `var(--kui-icon-size-40, ${C(J)})`
|
|
335
|
+
}, null, 8, ["size"]))]),
|
|
336
|
+
_: 1
|
|
337
|
+
}, 8, [
|
|
338
|
+
"aria-expanded",
|
|
339
|
+
"aria-label",
|
|
340
|
+
"onClick"
|
|
341
|
+
])]),
|
|
342
|
+
_: 1
|
|
343
|
+
}, 8, [
|
|
344
|
+
"kpop-attributes",
|
|
345
|
+
"label",
|
|
346
|
+
"placement"
|
|
347
|
+
]))], 34)) : r("", !0)])])]);
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
}), $ = (e, t) => {
|
|
351
|
+
let n = e.__vccOpts || e;
|
|
352
|
+
for (let [e, r] of t) n[e] = r;
|
|
353
|
+
return n;
|
|
354
|
+
}, be = /*#__PURE__*/ $(ye, [["__scopeId", "data-v-59e8017f"]]), xe = { class: "split-pane-container" }, Se = { class: "split-pane-container-inner" }, Ce = { class: "panes" }, we = ["aria-hidden", "tabindex"], Te = ["title"], Ee = { class: "split-pane-container-inner-content" }, De = ["aria-hidden", "tabindex"], Oe = ["title"], ke = ["aria-hidden", "tabindex"], Ae = /*#__PURE__*/ $(/* @__PURE__ */ s({
|
|
355
|
+
__name: "SplitPane",
|
|
356
|
+
props: {
|
|
357
|
+
resizable: {
|
|
358
|
+
type: Boolean,
|
|
359
|
+
default: !0
|
|
360
|
+
},
|
|
361
|
+
showResizeHandle: {
|
|
362
|
+
type: Boolean,
|
|
363
|
+
default: !0
|
|
364
|
+
},
|
|
365
|
+
showNavigation: {
|
|
366
|
+
type: Boolean,
|
|
367
|
+
default: !0
|
|
368
|
+
},
|
|
369
|
+
navigationItems: { default: () => [] },
|
|
370
|
+
paneLeft: { default: () => ({
|
|
371
|
+
visible: !0,
|
|
372
|
+
maxWidth: R
|
|
373
|
+
}) },
|
|
374
|
+
paneCenter: { default: () => ({
|
|
375
|
+
visible: !0,
|
|
376
|
+
maxWidth: "50%"
|
|
377
|
+
}) },
|
|
378
|
+
paneRight: { default: () => ({
|
|
379
|
+
visible: !0,
|
|
380
|
+
maxWidth: "50%"
|
|
381
|
+
}) }
|
|
382
|
+
},
|
|
383
|
+
setup(e) {
|
|
384
|
+
w((e) => ({
|
|
385
|
+
v1300c9c8: c.value,
|
|
386
|
+
v183c98aa: l.value,
|
|
387
|
+
bf8b5faa: f.value
|
|
388
|
+
}));
|
|
389
|
+
let o = T(), s = (t) => t === "left" ? e.paneLeft.maxWidth === void 0 ? R : e.paneLeft.maxWidth : t === "center" ? e.resizable ? "none" : e.paneCenter.maxWidth === void 0 ? "50%" : e.paneCenter.maxWidth : t === "right" ? e.resizable ? "none" : e.paneRight.maxWidth === void 0 ? "50%" : e.paneRight.maxWidth : "none", c = t(() => s("left")), l = t(() => s("center")), f = t(() => s("right")), p = E("verticalNavRef"), h = E("innerPanesContainerRef"), g = E("paneLeftRef"), _ = E("paneCenterRef"), y = E("paneRightRef"), b = E("paneLeftDivider"), x = E("innerPanesDivider"), { startDraggingInnerPanes: S, startDraggingPaneLeft: k, refreshInnerPaneSizes: A, paneLeftExpanded: j, isDraggingPaneLeft: M, isDraggingInnerPanes: N } = fe({
|
|
390
|
+
verticalNavRef: p,
|
|
391
|
+
innerPanesContainerRef: h,
|
|
392
|
+
paneLeftRef: g,
|
|
393
|
+
paneCenterRef: _,
|
|
394
|
+
paneRightRef: y
|
|
395
|
+
}), { i18n: P } = me(), F = t(() => !!o["pane-left"] && e.paneLeft.visible !== !1 && j.value), I = t(() => !!o["pane-center"] && e.paneCenter.visible !== !1), L = t(() => !!o["pane-right"] && e.paneRight.visible !== !1), z = t(() => e.resizable && e.showResizeHandle && !!o["pane-center"] && e.paneCenter.visible !== !1 && !!o["pane-right"] && e.paneRight.visible !== !1), B = q(b), V = q(x), { width: te } = de(g);
|
|
396
|
+
return O(() => e.paneRight.visible, async () => {
|
|
397
|
+
e.resizable && (await u(), A());
|
|
398
|
+
}, { flush: "post" }), (t, s) => (m(), i("div", {
|
|
399
|
+
class: d(["kong-ui-public-split-pane", { "has-navigation": e.showNavigation }]),
|
|
400
|
+
"data-testid": "split-pane"
|
|
401
|
+
}, [a("div", xe, [e.showNavigation ? (m(), n(be, {
|
|
402
|
+
key: 0,
|
|
403
|
+
ref_key: "verticalNavRef",
|
|
404
|
+
ref: p,
|
|
405
|
+
items: e.navigationItems,
|
|
406
|
+
"pane-left-visible": e.paneLeft.visible !== !1,
|
|
407
|
+
"pane-left-width": C(te)
|
|
408
|
+
}, null, 8, [
|
|
409
|
+
"items",
|
|
410
|
+
"pane-left-visible",
|
|
411
|
+
"pane-left-width"
|
|
412
|
+
])) : r("", !0), a("div", Se, [a("div", Ce, [
|
|
413
|
+
a("div", {
|
|
414
|
+
ref_key: "paneLeftRef",
|
|
415
|
+
ref: g,
|
|
416
|
+
"aria-hidden": F.value ? void 0 : "true",
|
|
417
|
+
class: d(["split-pane-left", [
|
|
418
|
+
{
|
|
419
|
+
expanded: C(j),
|
|
420
|
+
"show-resize-border": C(B)
|
|
421
|
+
},
|
|
422
|
+
{ "is-dragging-pane-left": C(M) },
|
|
423
|
+
{ "is-dragging-pane": C(M) || C(N) }
|
|
424
|
+
]]),
|
|
425
|
+
"data-testid": "split-pane-left",
|
|
426
|
+
tabindex: F.value ? 0 : -1
|
|
427
|
+
}, [v(t.$slots, "pane-left", {}, void 0, !0)], 10, we),
|
|
428
|
+
F.value ? (m(), i("div", {
|
|
429
|
+
key: 0,
|
|
430
|
+
ref_key: "paneLeftDivider",
|
|
431
|
+
ref: b,
|
|
432
|
+
class: "split-pane-resize-divider left",
|
|
433
|
+
"data-testid": "split-pane-resize-divider-left",
|
|
434
|
+
tabindex: "0",
|
|
435
|
+
title: C(P).t("actions.drag_to_resize"),
|
|
436
|
+
onMousedown: s[0] ||= (...e) => C(k) && C(k)(...e)
|
|
437
|
+
}, [...s[2] ||= [a("div", { class: "split-pane-drag-handle" }, null, -1)]], 40, Te)) : r("", !0),
|
|
438
|
+
a("div", Ee, [o.toolbar ? (m(), i("div", {
|
|
439
|
+
key: 0,
|
|
440
|
+
class: d(["split-pane-toolbar-container", { "has-resize-divider-left": F.value }]),
|
|
441
|
+
"data-testid": "split-pane-toolbar"
|
|
442
|
+
}, [v(t.$slots, "toolbar", {}, void 0, !0)], 2)) : r("", !0), a("div", {
|
|
443
|
+
ref_key: "innerPanesContainerRef",
|
|
444
|
+
ref: h,
|
|
445
|
+
class: "split-pane-inner-panes"
|
|
446
|
+
}, [
|
|
447
|
+
ee(a("div", {
|
|
448
|
+
ref_key: "paneCenterRef",
|
|
449
|
+
ref: _,
|
|
450
|
+
"aria-hidden": I.value ? void 0 : "true",
|
|
451
|
+
class: d(["split-pane-center", [
|
|
452
|
+
{ "has-resize-divider-left": F.value },
|
|
453
|
+
{ "has-resize-divider-right": z.value },
|
|
454
|
+
{ "is-dragging-pane": C(M) || C(N) }
|
|
455
|
+
]]),
|
|
456
|
+
"data-testid": "split-pane-center",
|
|
457
|
+
tabindex: I.value ? 0 : -1
|
|
458
|
+
}, [v(t.$slots, "pane-center", {}, void 0, !0)], 10, De), [[D, I.value]]),
|
|
459
|
+
z.value ? (m(), i("div", {
|
|
460
|
+
key: 0,
|
|
461
|
+
ref_key: "innerPanesDivider",
|
|
462
|
+
ref: x,
|
|
463
|
+
class: "split-pane-resize-divider right",
|
|
464
|
+
"data-testid": "split-pane-resize-divider-right",
|
|
465
|
+
tabindex: "0",
|
|
466
|
+
title: C(P).t("actions.drag_to_resize"),
|
|
467
|
+
onMousedown: s[1] ||= (...e) => C(S) && C(S)(...e)
|
|
468
|
+
}, [...s[3] ||= [a("div", { class: "split-pane-drag-handle" }, null, -1)]], 40, Oe)) : r("", !0),
|
|
469
|
+
ee(a("div", {
|
|
470
|
+
ref_key: "paneRightRef",
|
|
471
|
+
ref: y,
|
|
472
|
+
"aria-hidden": L.value ? void 0 : "true",
|
|
473
|
+
class: d(["split-pane-right", [
|
|
474
|
+
{ "has-toolbar": !!o.toolbar },
|
|
475
|
+
{ "show-resize-border": C(V) },
|
|
476
|
+
{ "is-dragging-inner-panes": C(N) },
|
|
477
|
+
{ "is-dragging-pane": C(M) || C(N) }
|
|
478
|
+
]]),
|
|
479
|
+
"data-testid": "split-pane-right",
|
|
480
|
+
tabindex: L.value ? 0 : -1
|
|
481
|
+
}, [v(t.$slots, "pane-right", {}, void 0, !0)], 10, ke), [[D, L.value]])
|
|
482
|
+
], 512)])
|
|
483
|
+
])])])], 2));
|
|
484
|
+
}
|
|
485
|
+
}), [["__scopeId", "data-v-a19fbade"]]), je = {}, Me = {
|
|
486
|
+
class: "kong-ui-public-split-pane-toolbar",
|
|
487
|
+
"data-testid": "kong-ui-public-split-pane-toolbar"
|
|
488
|
+
}, Ne = {
|
|
489
|
+
class: "left",
|
|
490
|
+
"data-testid": "split-toolbar-left"
|
|
491
|
+
}, Pe = {
|
|
492
|
+
key: 0,
|
|
493
|
+
class: "center",
|
|
494
|
+
"data-testid": "split-toolbar-center"
|
|
495
|
+
}, Fe = {
|
|
496
|
+
key: 1,
|
|
497
|
+
class: "right",
|
|
498
|
+
"data-testid": "split-toolbar-right"
|
|
528
499
|
};
|
|
529
|
-
function
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
T(e.$slots, "center", {}, void 0, !0)
|
|
536
|
-
])) : E("", !0),
|
|
537
|
-
e.$slots.right ? (x(), L("div", pt, [
|
|
538
|
-
T(e.$slots, "right", {}, void 0, !0)
|
|
539
|
-
])) : E("", !0)
|
|
540
|
-
]);
|
|
500
|
+
function Ie(e, t) {
|
|
501
|
+
return m(), i("div", Me, [
|
|
502
|
+
a("div", Ne, [v(e.$slots, "left", {}, void 0, !0)]),
|
|
503
|
+
e.$slots.center ? (m(), i("div", Pe, [v(e.$slots, "center", {}, void 0, !0)])) : r("", !0),
|
|
504
|
+
e.$slots.right ? (m(), i("div", Fe, [v(e.$slots, "right", {}, void 0, !0)])) : r("", !0)
|
|
505
|
+
]);
|
|
541
506
|
}
|
|
542
|
-
|
|
543
|
-
export {
|
|
544
|
-
Rt as SplitPane,
|
|
545
|
-
xt as SplitToolbar
|
|
546
|
-
};
|
|
507
|
+
var Le = /*#__PURE__*/ $(je, [["render", Ie], ["__scopeId", "data-v-44b95676"]]);
|
|
508
|
+
export { Ae as SplitPane, Le as SplitToolbar };
|
package/dist/split-pane.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(C,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong/icons"),require("vue-router"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","@kong/icons","vue-router","@kong-ui-public/i18n"],e):(C=typeof globalThis<"u"?globalThis:C||self,e(C["kong-ui-public-split-pane"]={},C.Vue,C.KongIcons,C.VueRouter,C["kong-ui-public-i18n"]))})(this,(function(C,e,O,Y,X){"use strict";const Z="260px",A="500px";function F(t,i){return e.getCurrentScope()?(e.onScopeDispose(t,i),!0):!1}const J=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Q=t=>t!=null,ee=Object.prototype.toString,te=t=>ee.call(t)==="[object Object]",ne=()=>{};function L(t){return Array.isArray(t)?t:[t]}function ae(t){return e.getCurrentInstance()}function ie(t,i=!0,c){ae()?e.onMounted(t,c):i?t():e.nextTick(t)}function oe(t,i,c){return e.watch(t,i,{...c,immediate:!0})}const y=J?window:void 0;function P(t){var i;const c=e.toValue(t);return(i=c?.$el)!==null&&i!==void 0?i:c}function z(...t){const i=(n,a,l,s)=>(n.addEventListener(a,l,s),()=>n.removeEventListener(a,l,s)),c=e.computed(()=>{const n=L(e.toValue(t[0])).filter(a=>a!=null);return n.every(a=>typeof a!="string")?n:void 0});return oe(()=>{var n,a;return[(n=(a=c.value)===null||a===void 0?void 0:a.map(l=>P(l)))!==null&&n!==void 0?n:[y].filter(l=>l!=null),L(e.toValue(c.value?t[1]:t[0])),L(e.unref(c.value?t[2]:t[1])),e.toValue(c.value?t[3]:t[2])]},([n,a,l,s],r,h)=>{if(!n?.length||!a?.length||!l?.length)return;const g=te(s)?{...s}:s,f=n.flatMap(o=>a.flatMap(d=>l.map(u=>i(o,d,u,g))));h(()=>{f.forEach(o=>o())})},{flush:"post"})}function se(){const t=e.shallowRef(!1),i=e.getCurrentInstance();return i&&e.onMounted(()=>{t.value=!0},i),t}function U(t){const i=se();return e.computed(()=>(i.value,!!t()))}function le(t,i,c={}){const{window:n=y,...a}=c;let l;const s=U(()=>n&&"MutationObserver"in n),r=()=>{l&&(l.disconnect(),l=void 0)},h=e.watch(e.computed(()=>{const o=L(e.toValue(t)).map(P).filter(Q);return new Set(o)}),o=>{r(),s.value&&o.size&&(l=new MutationObserver(i),o.forEach(d=>l.observe(d,a)))},{immediate:!0,flush:"post"}),g=()=>l?.takeRecords(),f=()=>{h(),r()};return F(f),{isSupported:s,stop:f,takeRecords:g}}function re(t,i,c={}){const{window:n=y,document:a=n?.document,flush:l="sync"}=c;if(!n||!a)return ne;let s;const r=f=>{s?.(),s=f},h=e.watchEffect(()=>{const f=P(t);if(f){const{stop:o}=le(a,d=>{d.map(u=>[...u.removedNodes]).flat().some(u=>u===f||u.contains(f))&&i(d)},{window:n,childList:!0,subtree:!0});r(o)}},{flush:l}),g=()=>{h(),r()};return F(g),g}function ce(t,i,c={}){const{window:n=y,...a}=c;let l;const s=U(()=>n&&"ResizeObserver"in n),r=()=>{l&&(l.disconnect(),l=void 0)},h=e.watch(e.computed(()=>{const f=e.toValue(t);return Array.isArray(f)?f.map(o=>P(o)):[P(f)]}),f=>{if(r(),s.value&&n){l=new ResizeObserver(i);for(const o of f)o&&l.observe(o,a)}},{immediate:!0,flush:"post"}),g=()=>{r(),h()};return F(g),{isSupported:s,stop:g}}function j(t,i={}){const{delayEnter:c=0,delayLeave:n=0,triggerOnRemoval:a=!1,window:l=y}=i,s=e.shallowRef(!1);let r;const h=g=>{const f=g?c:n;r&&(clearTimeout(r),r=void 0),f?r=setTimeout(()=>s.value=g,f):s.value=g};return l&&(z(t,"mouseenter",()=>h(!0),{passive:!0}),z(t,"mouseleave",()=>h(!1),{passive:!0}),a&&re(e.computed(()=>P(t)),()=>h(!1))),s}function de(t,i={width:0,height:0},c={}){const{window:n=y,box:a="content-box"}=c,l=e.computed(()=>{var o;return(o=P(t))===null||o===void 0||(o=o.namespaceURI)===null||o===void 0?void 0:o.includes("svg")}),s=e.shallowRef(i.width),r=e.shallowRef(i.height),{stop:h}=ce(t,([o])=>{const d=a==="border-box"?o.borderBoxSize:a==="content-box"?o.contentBoxSize:o.devicePixelContentBoxSize;if(n&&l.value){const u=P(t);if(u){const m=u.getBoundingClientRect();s.value=m.width,r.value=m.height}}else if(d){const u=L(d);s.value=u.reduce((m,{inlineSize:k})=>m+k,0),r.value=u.reduce((m,{blockSize:k})=>m+k,0)}else s.value=o.contentRect.width,r.value=o.contentRect.height},c);ie(()=>{const o=P(t);if(o&&"offsetWidth"in o)if(a==="content-box"&&n){const d=n.getComputedStyle(o),u=Number.parseFloat(d.paddingLeft)+Number.parseFloat(d.paddingRight),m=Number.parseFloat(d.paddingTop)+Number.parseFloat(d.paddingBottom),k=Number.parseFloat(d.borderLeftWidth)+Number.parseFloat(d.borderRightWidth),b=Number.parseFloat(d.borderTopWidth)+Number.parseFloat(d.borderBottomWidth);s.value=o.offsetWidth-u-k,r.value=o.offsetHeight-m-b}else s.value=o.offsetWidth,r.value=o.offsetHeight;else o&&(s.value=i.width,r.value=i.height)});const g=e.watch(()=>P(t),o=>{s.value=o?i.width:0,r.value=o?i.height:0});function f(){h(),g()}return{width:s,height:r,stop:f}}const G="20px",W=e.ref(!1),E=e.ref(!1),S=e.ref(!0),D=e.ref(0);function K(t){const i=t?.verticalNavRef||e.ref(null),c=t?.innerPanesContainerRef||e.ref(null),n=t?.paneLeftRef||e.ref(null),a=t?.paneCenterRef||e.ref(null),l=t?.paneRightRef||e.ref(null),s=p=>{switch(p){case"verticalNav":return i.value?.offsetWidth||0;case"innerPanesContainer":return c.value?.offsetWidth||0;case"paneLeft":return n.value?.offsetWidth||0;case"paneCenter":return a.value?.offsetWidth||0;case"paneRight":return l.value?.offsetWidth||0;default:return 0}},r=e.ref(50),h=e.ref(0),g=e.ref(0),f=e.ref(0),o=e.ref(0),d=p=>{if(a.value){if(p){a.value.style.width=`${p}%`,D.value=s("paneCenter");return}else(typeof r.value!="number"||!isFinite(r.value))&&(r.value=38);a.value.style.width=`${r.value}%`,D.value=s("paneCenter")}},u=()=>{a.value&&l.value?.style.display==="none"?(a.value.style.flex="1",d(100)):(a.value&&(a.value.style.flex=""),d())},m=()=>{if(!c.value||!a.value)return;const p=100,v=s("innerPanesContainer")-s("verticalNav")-s("paneLeft")-p,x=r.value/100*s("innerPanesContainer");if(x<p?r.value=p/s("innerPanesContainer")*100:x>v&&(r.value=v/s("innerPanesContainer")*100),a.value&&l.value&&l.value?.style.display==="none"){d(100);return}d()},k=p=>{!a.value||p.button!==0||(E.value=!0,h.value=p.clientX,g.value=a.value.offsetWidth||0)},b=p=>{if(!E.value||!c.value||!a.value)return;const v=c.value.offsetWidth,x=p.clientX-h.value,R=(g.value+x)/v*100,w=100/v*100,$=(v-100)/v*100;r.value=Math.min(Math.max(w,R),$),d()},_=()=>{E.value=!1},T=p=>{!n.value||!S.value||p.button!==0||(W.value=!0,f.value=p.clientX,o.value=n.value.offsetWidth||0)},M=p=>{if(!W.value||!n.value)return;let v=o.value+(p.clientX-f.value);const x=Number(Z.replace(/px$/i,"")),V=Number(A.replace(/px$/i,""));v<x&&(v=x),v>V&&(v=V),n.value.style.width=`${v}px`,f.value=p.clientX,o.value=v,D.value=s("paneCenter")},N=()=>{W.value=!1},B=()=>{E.value||m()},I=async()=>{S.value=!S.value};return z(window,"resize",B),e.onMounted(async()=>{await e.nextTick(),a.value&&(m(),await e.nextTick(),d(),requestAnimationFrame(()=>{D.value=s("paneCenter")}))}),z(document,"mousemove",p=>{E.value&&b(p),W.value&&M(p)}),z(document,"mouseup",()=>{E.value&&_(),W.value&&N()}),{isDraggingPaneLeft:e.readonly(W),isDraggingInnerPanes:e.readonly(E),startDraggingInnerPanes:k,refreshInnerPaneSizes:u,paneLeftExpanded:e.readonly(S),togglePaneLeft:I,startDraggingPaneLeft:T,centerPaneWidth:D}}const fe={actions:{return:"Return",collapse_panel:"Collapse panel",expand_panel:"Expand panel",drag_to_resize:"Click and drag to resize"}};function q(){const t=X.createI18n("en-us",fe);return{i18n:t,i18nT:X.i18nTComponent(t)}}const pe={class:"kong-ui-public-split-pane-vertical-navigation"},ue={class:"split-pane-nav"},he={class:"top"},ge={class:"bottom"},me=e.defineComponent({__name:"VerticalNavigation",props:{paneLeftWidth:{default:0},paneLeftVisible:{type:Boolean,default:!0},items:{default:()=>[]}},setup(t){e.useCssVars(d=>({eaa86402:f.value}));const{i18n:i}=q(),c=Y.useRouter(),{paneLeftExpanded:n,togglePaneLeft:a,isDraggingPaneLeft:l,isDraggingInnerPanes:s}=K(),r=e.ref(!1),h=e.ref(!1),g=e.computed(()=>r.value||l.value||s.value),f=e.computed(()=>`${t.paneLeftWidth-8}px`),o=d=>{n.value||a(),!d.active&&d.to&&c.push(d.to)};return e.onMounted(async()=>{await e.nextTick(),await new Promise(d=>setTimeout(d,500)),h.value=!0}),(d,u)=>{const m=e.resolveComponent("KButton"),k=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("nav",ue,[e.createElementVNode("div",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,b=>(e.openBlock(),e.createBlock(k,{key:b.tooltip,"kpop-attributes":{offset:"10px"},label:b.tooltip,placement:"right"},{default:e.withCtx(()=>[e.createVNode(m,{appearance:"none","aria-label":b.tooltip,class:e.normalizeClass(["split-pane-nav-item",{active:b.active}]),"data-testid":`kong-ui-public-split-pane-vertical-navigation-nav-item-${b.testid}`,icon:"",size:"large",style:{cursor:"pointer"},to:b.to,onClickCapture:e.withModifiers(_=>o(b),["prevent"])},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.icon),{decorative:"",size:`var(--kui-icon-size-40, ${e.unref(G)})`},null,8,["size"]))]),_:2},1032,["aria-label","class","data-testid","to","onClickCapture"])]),_:2},1032,["label"]))),128))]),e.createElementVNode("div",ge,[t.paneLeftVisible?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["toggle-left-panel-control",{expanded:e.unref(n),"disable-animation":!h.value||e.unref(l)||e.unref(s)}]),onTransitionend:u[0]||(u[0]=e.withModifiers(b=>r.value=!1,["self"])),onTransitionstart:u[1]||(u[1]=e.withModifiers(b=>r.value=!0,["self"]))},[(e.openBlock(),e.createBlock(k,{key:String(e.unref(n)),"kpop-attributes":e.unref(n)?void 0:{offset:"10px"},label:g.value?void 0:e.unref(n)?e.unref(i).t("actions.collapse_panel"):e.unref(i).t("actions.expand_panel"),placement:e.unref(n)?"left":"right"},{default:e.withCtx(()=>[e.createVNode(m,{appearance:"none","aria-controls":"left-pane","aria-expanded":e.unref(n),"aria-label":e.unref(n)?e.unref(i).t("actions.collapse_panel"):e.unref(i).t("actions.expand_panel"),class:"split-pane-nav-item toggle-left-panel","data-testid":"kong-ui-public-split-pane-toggle-left-panel-button",icon:"",size:"large",onClick:e.unref(a)},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n)?e.unref(O.ChevronDoubleLeftIcon):e.unref(O.ChevronDoubleRightIcon)),{decorative:"",size:`var(--kui-icon-size-40, ${e.unref(G)})`},null,8,["size"]))]),_:1},8,["aria-expanded","aria-label","onClick"])]),_:1},8,["kpop-attributes","label","placement"]))],34)):e.createCommentVNode("",!0)])])])}}}),H=(t,i)=>{const c=t.__vccOpts||t;for(const[n,a]of i)c[n]=a;return c},be=H(me,[["__scopeId","data-v-59e8017f"]]),ve={class:"split-pane-container"},ke={class:"split-pane-container-inner"},Ce={class:"panes"},Re=["aria-hidden","tabindex"],Pe=["title"],we={class:"split-pane-container-inner-content"},xe=["aria-hidden","tabindex"],Ee=["title"],_e=["aria-hidden","tabindex"],Ne=H(e.defineComponent({__name:"SplitPane",props:{resizable:{type:Boolean,default:!0},showResizeHandle:{type:Boolean,default:!0},showNavigation:{type:Boolean,default:!0},navigationItems:{default:()=>[]},paneLeft:{default:()=>({visible:!0,maxWidth:A})},paneCenter:{default:()=>({visible:!0,maxWidth:"50%"})},paneRight:{default:()=>({visible:!0,maxWidth:"50%"})}},setup(t){e.useCssVars(R=>({v1300c9c8:n.value,v183c98aa:a.value,bf8b5faa:l.value}));const i=e.useSlots(),c=R=>R==="left"?t.paneLeft.maxWidth!==void 0?t.paneLeft.maxWidth:A:R==="center"?t.resizable?"none":t.paneCenter.maxWidth!==void 0?t.paneCenter.maxWidth:"50%":R==="right"?t.resizable?"none":t.paneRight.maxWidth!==void 0?t.paneRight.maxWidth:"50%":"none",n=e.computed(()=>c("left")),a=e.computed(()=>c("center")),l=e.computed(()=>c("right")),s=e.useTemplateRef("verticalNavRef"),r=e.useTemplateRef("innerPanesContainerRef"),h=e.useTemplateRef("paneLeftRef"),g=e.useTemplateRef("paneCenterRef"),f=e.useTemplateRef("paneRightRef"),o=e.useTemplateRef("paneLeftDivider"),d=e.useTemplateRef("innerPanesDivider"),{startDraggingInnerPanes:u,startDraggingPaneLeft:m,refreshInnerPaneSizes:k,paneLeftExpanded:b,isDraggingPaneLeft:_,isDraggingInnerPanes:T}=K({verticalNavRef:s,innerPanesContainerRef:r,paneLeftRef:h,paneCenterRef:g,paneRightRef:f}),{i18n:M}=q(),N=e.computed(()=>!!i["pane-left"]&&t.paneLeft.visible!==!1&&b.value),B=e.computed(()=>!!i["pane-center"]&&t.paneCenter.visible!==!1),I=e.computed(()=>!!i["pane-right"]&&t.paneRight.visible!==!1),p=e.computed(()=>t.resizable&&t.showResizeHandle&&!!i["pane-center"]&&t.paneCenter.visible!==!1&&!!i["pane-right"]&&t.paneRight.visible!==!1),v=j(o),x=j(d),{width:V}=de(h);return e.watch(()=>t.paneRight.visible,async()=>{t.resizable&&(await e.nextTick(),k())},{flush:"post"}),(R,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-public-split-pane",{"has-navigation":t.showNavigation}]),"data-testid":"split-pane"},[e.createElementVNode("div",ve,[t.showNavigation?(e.openBlock(),e.createBlock(be,{key:0,ref_key:"verticalNavRef",ref:s,items:t.navigationItems,"pane-left-visible":t.paneLeft.visible!==!1,"pane-left-width":e.unref(V)},null,8,["items","pane-left-visible","pane-left-width"])):e.createCommentVNode("",!0),e.createElementVNode("div",ke,[e.createElementVNode("div",Ce,[e.createElementVNode("div",{ref_key:"paneLeftRef",ref:h,"aria-hidden":N.value?void 0:"true",class:e.normalizeClass(["split-pane-left",[{expanded:e.unref(b),"show-resize-border":e.unref(v)},{"is-dragging-pane-left":e.unref(_)},{"is-dragging-pane":e.unref(_)||e.unref(T)}]]),"data-testid":"split-pane-left",tabindex:N.value?0:-1},[e.renderSlot(R.$slots,"pane-left",{},void 0,!0)],10,Re),N.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"paneLeftDivider",ref:o,class:"split-pane-resize-divider left","data-testid":"split-pane-resize-divider-left",tabindex:"0",title:e.unref(M).t("actions.drag_to_resize"),onMousedown:w[0]||(w[0]=(...$)=>e.unref(m)&&e.unref(m)(...$))},[...w[2]||(w[2]=[e.createElementVNode("div",{class:"split-pane-drag-handle"},null,-1)])],40,Pe)):e.createCommentVNode("",!0),e.createElementVNode("div",we,[i.toolbar?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["split-pane-toolbar-container",{"has-resize-divider-left":N.value}]),"data-testid":"split-pane-toolbar"},[e.renderSlot(R.$slots,"toolbar",{},void 0,!0)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"innerPanesContainerRef",ref:r,class:"split-pane-inner-panes"},[e.withDirectives(e.createElementVNode("div",{ref_key:"paneCenterRef",ref:g,"aria-hidden":B.value?void 0:"true",class:e.normalizeClass(["split-pane-center",[{"has-resize-divider-left":N.value},{"has-resize-divider-right":p.value},{"is-dragging-pane":e.unref(_)||e.unref(T)}]]),"data-testid":"split-pane-center",tabindex:B.value?0:-1},[e.renderSlot(R.$slots,"pane-center",{},void 0,!0)],10,xe),[[e.vShow,B.value]]),p.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"innerPanesDivider",ref:d,class:"split-pane-resize-divider right","data-testid":"split-pane-resize-divider-right",tabindex:"0",title:e.unref(M).t("actions.drag_to_resize"),onMousedown:w[1]||(w[1]=(...$)=>e.unref(u)&&e.unref(u)(...$))},[...w[3]||(w[3]=[e.createElementVNode("div",{class:"split-pane-drag-handle"},null,-1)])],40,Ee)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{ref_key:"paneRightRef",ref:f,"aria-hidden":I.value?void 0:"true",class:e.normalizeClass(["split-pane-right",[{"has-toolbar":!!i.toolbar},{"show-resize-border":e.unref(x)},{"is-dragging-inner-panes":e.unref(T)},{"is-dragging-pane":e.unref(_)||e.unref(T)}]]),"data-testid":"split-pane-right",tabindex:I.value?0:-1},[e.renderSlot(R.$slots,"pane-right",{},void 0,!0)],10,_e),[[e.vShow,I.value]])],512)])])])])],2))}}),[["__scopeId","data-v-a19fbade"]]),ye={},We={class:"kong-ui-public-split-pane-toolbar","data-testid":"kong-ui-public-split-pane-toolbar"},Te={class:"left","data-testid":"split-toolbar-left"},Le={key:0,class:"center","data-testid":"split-toolbar-center"},ze={key:1,class:"right","data-testid":"split-toolbar-right"};function De(t,i){return e.openBlock(),e.createElementBlock("div",We,[e.createElementVNode("div",Te,[e.renderSlot(t.$slots,"left",{},void 0,!0)]),t.$slots.center?(e.openBlock(),e.createElementBlock("div",Le,[e.renderSlot(t.$slots,"center",{},void 0,!0)])):e.createCommentVNode("",!0),t.$slots.right?(e.openBlock(),e.createElementBlock("div",ze,[e.renderSlot(t.$slots,"right",{},void 0,!0)])):e.createCommentVNode("",!0)])}const Be=H(ye,[["render",De],["__scopeId","data-v-44b95676"]]);C.SplitPane=Ne,C.SplitToolbar=Be,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("vue"),require("@kong/icons"),require("vue-router"),require("@kong-ui-public/i18n")):typeof define==`function`&&define.amd?define([`exports`,`vue`,`@kong/icons`,`vue-router`,`@kong-ui-public/i18n`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`kong-ui-public-split-pane`]={},e.Vue,e.KongIcons,e.VueRouter,e[`kong-ui-public-i18n`]))})(this,function(e,t,n,r,i){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var a=`260px`,o=`500px`;function s(e,n){return(0,t.getCurrentScope)()?((0,t.onScopeDispose)(e,n),!0):!1}var c=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var l=e=>e!=null,u=Object.prototype.toString,d=e=>u.call(e)===`[object Object]`,f=()=>{};function p(e){return Array.isArray(e)?e:[e]}function m(e){return e||(0,t.getCurrentInstance)()}function h(e,n=!0,r){m(r)?(0,t.onMounted)(e,r):n?e():(0,t.nextTick)(e)}function g(e,n,r){return(0,t.watch)(e,n,{...r,immediate:!0})}var _=c?window:void 0;c&&window.document,c&&window.navigator,c&&window.location;function v(e){let n=(0,t.toValue)(e);return n?.$el??n}function y(...e){let n=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),r=(0,t.computed)(()=>{let n=p((0,t.toValue)(e[0])).filter(e=>e!=null);return n.every(e=>typeof e!=`string`)?n:void 0});return g(()=>[r.value?.map(e=>v(e))??[_].filter(e=>e!=null),p((0,t.toValue)(r.value?e[1]:e[0])),p((0,t.unref)(r.value?e[2]:e[1])),(0,t.toValue)(r.value?e[3]:e[2])],([e,t,r,i],a,o)=>{if(!e?.length||!t?.length||!r?.length)return;let s=d(i)?{...i}:i,c=e.flatMap(e=>t.flatMap(t=>r.map(r=>n(e,t,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function b(){let e=(0,t.shallowRef)(!1),n=(0,t.getCurrentInstance)();return n&&(0,t.onMounted)(()=>{e.value=!0},n),e}function x(e){let n=b();return(0,t.computed)(()=>(n.value,!!e()))}function S(e,n,r={}){let{window:i=_,...a}=r,o,c=x(()=>i&&`MutationObserver`in i),u=()=>{o&&=(o.disconnect(),void 0)},d=(0,t.watch)((0,t.computed)(()=>{let n=p((0,t.toValue)(e)).map(v).filter(l);return new Set(n)}),e=>{u(),c.value&&e.size&&(o=new MutationObserver(n),e.forEach(e=>o.observe(e,a)))},{immediate:!0,flush:`post`}),f=()=>o?.takeRecords(),m=()=>{d(),u()};return s(m),{isSupported:c,stop:m,takeRecords:f}}function C(e,n,r={}){let{window:i=_,document:a=i?.document,flush:o=`sync`}=r;if(!i||!a)return f;let c,l=e=>{c?.(),c=e},u=(0,t.watchEffect)(()=>{let t=v(e);if(t){let{stop:e}=S(a,e=>{e.map(e=>[...e.removedNodes]).flat().some(e=>e===t||e.contains(t))&&n(e)},{window:i,childList:!0,subtree:!0});l(e)}},{flush:o}),d=()=>{u(),l()};return s(d),d}function w(e,n,r={}){let{window:i=_,...a}=r,o,c=x(()=>i&&`ResizeObserver`in i),l=()=>{o&&=(o.disconnect(),void 0)},u=(0,t.watch)((0,t.computed)(()=>{let n=(0,t.toValue)(e);return Array.isArray(n)?n.map(e=>v(e)):[v(n)]}),e=>{if(l(),c.value&&i){o=new ResizeObserver(n);for(let t of e)t&&o.observe(t,a)}},{immediate:!0,flush:`post`}),d=()=>{l(),u()};return s(d),{isSupported:c,stop:d}}function T(e,n={}){let{delayEnter:r=0,delayLeave:i=0,triggerOnRemoval:a=!1,window:o=_}=n,s=(0,t.shallowRef)(!1),c,l=e=>{let t=e?r:i;c&&=(clearTimeout(c),void 0),t?c=setTimeout(()=>s.value=e,t):s.value=e};return o&&(y(e,`mouseenter`,()=>l(!0),{passive:!0}),y(e,`mouseleave`,()=>l(!1),{passive:!0}),a&&C((0,t.computed)(()=>v(e)),()=>l(!1))),s}function E(e,n={width:0,height:0},r={}){let{window:i=_,box:a=`content-box`}=r,o=(0,t.computed)(()=>{var t;return(t=v(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),s=(0,t.shallowRef)(n.width),c=(0,t.shallowRef)(n.height),{stop:l}=w(e,([t])=>{let n=a===`border-box`?t.borderBoxSize:a===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(i&&o.value){let t=v(e);if(t){let e=t.getBoundingClientRect();s.value=e.width,c.value=e.height}}else if(n){let e=p(n);s.value=e.reduce((e,{inlineSize:t})=>e+t,0),c.value=e.reduce((e,{blockSize:t})=>e+t,0)}else s.value=t.contentRect.width,c.value=t.contentRect.height},r);h(()=>{let t=v(e);if(t&&`offsetWidth`in t){if(a===`content-box`&&i){let e=i.getComputedStyle(t),n=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),r=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),a=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),o=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);s.value=t.offsetWidth-n-a,c.value=t.offsetHeight-r-o}else s.value=t.offsetWidth,c.value=t.offsetHeight}else t&&(s.value=n.width,c.value=n.height)});let u=(0,t.watch)(()=>v(e),e=>{s.value=e?n.width:0,c.value=e?n.height:0});function d(){l(),u()}return{width:s,height:c,stop:d}}var D=`20px`,O=(0,t.ref)(!1),k=(0,t.ref)(!1),A=(0,t.ref)(!0),j=(0,t.ref)(0);function M(e){let n=e?.verticalNavRef||(0,t.ref)(null),r=e?.innerPanesContainerRef||(0,t.ref)(null),i=e?.paneLeftRef||(0,t.ref)(null),s=e?.paneCenterRef||(0,t.ref)(null),c=e?.paneRightRef||(0,t.ref)(null),l=e=>{switch(e){case`verticalNav`:return n.value?.offsetWidth||0;case`innerPanesContainer`:return r.value?.offsetWidth||0;case`paneLeft`:return i.value?.offsetWidth||0;case`paneCenter`:return s.value?.offsetWidth||0;case`paneRight`:return c.value?.offsetWidth||0;default:return 0}},u=(0,t.ref)(50),d=(0,t.ref)(0),f=(0,t.ref)(0),p=(0,t.ref)(0),m=(0,t.ref)(0),h=e=>{if(s.value){if(e){s.value.style.width=`${e}%`,j.value=l(`paneCenter`);return}typeof u.value==`number`&&isFinite(u.value)||(u.value=38),s.value.style.width=`${u.value}%`,j.value=l(`paneCenter`)}},g=()=>{s.value&&c.value?.style.display===`none`?(s.value.style.flex=`1`,h(100)):(s.value&&(s.value.style.flex=``),h())},_=()=>{if(!r.value||!s.value)return;let e=l(`innerPanesContainer`)-l(`verticalNav`)-l(`paneLeft`)-100,t=u.value/100*l(`innerPanesContainer`);t<100?u.value=100/l(`innerPanesContainer`)*100:t>e&&(u.value=e/l(`innerPanesContainer`)*100),s.value&&c.value&&c.value?.style.display===`none`?h(100):h()},v=e=>{s.value&&e.button===0&&(k.value=!0,d.value=e.clientX,f.value=s.value.offsetWidth||0)},b=e=>{if(!k.value||!r.value||!s.value)return;let t=r.value.offsetWidth,n=e.clientX-d.value,i=(f.value+n)/t*100,a=100/t*100,o=(t-100)/t*100;u.value=Math.min(Math.max(a,i),o),h()},x=()=>{k.value=!1},S=e=>{i.value&&A.value&&e.button===0&&(O.value=!0,p.value=e.clientX,m.value=i.value.offsetWidth||0)},C=e=>{if(!O.value||!i.value)return;let t=m.value+(e.clientX-p.value),n=Number(a.replace(/px$/i,``)),r=Number(o.replace(/px$/i,``));t<n&&(t=n),t>r&&(t=r),i.value.style.width=`${t}px`,p.value=e.clientX,m.value=t,j.value=l(`paneCenter`)},w=()=>{O.value=!1};return y(window,`resize`,()=>{k.value||_()}),(0,t.onMounted)(async()=>{await(0,t.nextTick)(),s.value&&(_(),await(0,t.nextTick)(),h(),requestAnimationFrame(()=>{j.value=l(`paneCenter`)}))}),y(document,`mousemove`,e=>{k.value&&b(e),O.value&&C(e)}),y(document,`mouseup`,()=>{k.value&&x(),O.value&&w()}),{isDraggingPaneLeft:(0,t.readonly)(O),isDraggingInnerPanes:(0,t.readonly)(k),startDraggingInnerPanes:v,refreshInnerPaneSizes:g,paneLeftExpanded:(0,t.readonly)(A),togglePaneLeft:async()=>{A.value=!A.value},startDraggingPaneLeft:S,centerPaneWidth:j}}var N={actions:{return:`Return`,collapse_panel:`Collapse panel`,expand_panel:`Expand panel`,drag_to_resize:`Click and drag to resize`}};function P(){let e=(0,i.createI18n)(`en-us`,N);return{i18n:e,i18nT:(0,i.i18nTComponent)(e)}}var F={class:`kong-ui-public-split-pane-vertical-navigation`},I={class:`split-pane-nav`},L={class:`top`},R={class:`bottom`},z=(0,t.defineComponent)({__name:`VerticalNavigation`,props:{paneLeftWidth:{default:0},paneLeftVisible:{type:Boolean,default:!0},items:{default:()=>[]}},setup(e){(0,t.useCssVars)(e=>({eaa86402:p.value}));let{i18n:i}=P(),a=(0,r.useRouter)(),{paneLeftExpanded:o,togglePaneLeft:s,isDraggingPaneLeft:c,isDraggingInnerPanes:l}=M(),u=(0,t.ref)(!1),d=(0,t.ref)(!1),f=(0,t.computed)(()=>u.value||c.value||l.value),p=(0,t.computed)(()=>`${e.paneLeftWidth-8}px`),m=e=>{o.value||s(),!e.active&&e.to&&a.push(e.to)};return(0,t.onMounted)(async()=>{await(0,t.nextTick)(),await new Promise(e=>setTimeout(e,500)),d.value=!0}),(r,a)=>{let p=(0,t.resolveComponent)(`KButton`),h=(0,t.resolveComponent)(`KTooltip`);return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,F,[(0,t.createElementVNode)(`nav`,I,[(0,t.createElementVNode)(`div`,L,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.items,e=>((0,t.openBlock)(),(0,t.createBlock)(h,{key:e.tooltip,"kpop-attributes":{offset:`10px`},label:e.tooltip,placement:`right`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(p,{appearance:`none`,"aria-label":e.tooltip,class:(0,t.normalizeClass)([`split-pane-nav-item`,{active:e.active}]),"data-testid":`kong-ui-public-split-pane-vertical-navigation-nav-item-${e.testid}`,icon:``,size:`large`,style:{cursor:`pointer`},to:e.to,onClickCapture:(0,t.withModifiers)(t=>m(e),[`prevent`])},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.icon),{decorative:``,size:`var(--kui-icon-size-40, ${(0,t.unref)(D)})`},null,8,[`size`]))]),_:2},1032,[`aria-label`,`class`,`data-testid`,`to`,`onClickCapture`])]),_:2},1032,[`label`]))),128))]),(0,t.createElementVNode)(`div`,R,[e.paneLeftVisible?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`toggle-left-panel-control`,{expanded:(0,t.unref)(o),"disable-animation":!d.value||(0,t.unref)(c)||(0,t.unref)(l)}]),onTransitionend:a[0]||=(0,t.withModifiers)(e=>u.value=!1,[`self`]),onTransitionstart:a[1]||=(0,t.withModifiers)(e=>u.value=!0,[`self`])},[((0,t.openBlock)(),(0,t.createBlock)(h,{key:String((0,t.unref)(o)),"kpop-attributes":(0,t.unref)(o)?void 0:{offset:`10px`},label:f.value?void 0:(0,t.unref)(o)?(0,t.unref)(i).t(`actions.collapse_panel`):(0,t.unref)(i).t(`actions.expand_panel`),placement:(0,t.unref)(o)?`left`:`right`},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(p,{appearance:`none`,"aria-controls":`left-pane`,"aria-expanded":(0,t.unref)(o),"aria-label":(0,t.unref)(o)?(0,t.unref)(i).t(`actions.collapse_panel`):(0,t.unref)(i).t(`actions.expand_panel`),class:`split-pane-nav-item toggle-left-panel`,"data-testid":`kong-ui-public-split-pane-toggle-left-panel-button`,icon:``,size:`large`,onClick:(0,t.unref)(s)},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)((0,t.unref)(o)?(0,t.unref)(n.ChevronDoubleLeftIcon):(0,t.unref)(n.ChevronDoubleRightIcon)),{decorative:``,size:`var(--kui-icon-size-40, ${(0,t.unref)(D)})`},null,8,[`size`]))]),_:1},8,[`aria-expanded`,`aria-label`,`onClick`])]),_:1},8,[`kpop-attributes`,`label`,`placement`]))],34)):(0,t.createCommentVNode)(``,!0)])])])}}}),B=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},V=B(z,[[`__scopeId`,`data-v-59e8017f`]]),H={class:`split-pane-container`},U={class:`split-pane-container-inner`},W={class:`panes`},G=[`aria-hidden`,`tabindex`],K=[`title`],q={class:`split-pane-container-inner-content`},J=[`aria-hidden`,`tabindex`],Y=[`title`],X=[`aria-hidden`,`tabindex`],Z=B((0,t.defineComponent)({__name:`SplitPane`,props:{resizable:{type:Boolean,default:!0},showResizeHandle:{type:Boolean,default:!0},showNavigation:{type:Boolean,default:!0},navigationItems:{default:()=>[]},paneLeft:{default:()=>({visible:!0,maxWidth:o})},paneCenter:{default:()=>({visible:!0,maxWidth:`50%`})},paneRight:{default:()=>({visible:!0,maxWidth:`50%`})}},setup(e){(0,t.useCssVars)(e=>({v1300c9c8:i.value,v183c98aa:a.value,bf8b5faa:s.value}));let n=(0,t.useSlots)(),r=t=>t===`left`?e.paneLeft.maxWidth===void 0?o:e.paneLeft.maxWidth:t===`center`?e.resizable?`none`:e.paneCenter.maxWidth===void 0?`50%`:e.paneCenter.maxWidth:t===`right`?e.resizable?`none`:e.paneRight.maxWidth===void 0?`50%`:e.paneRight.maxWidth:`none`,i=(0,t.computed)(()=>r(`left`)),a=(0,t.computed)(()=>r(`center`)),s=(0,t.computed)(()=>r(`right`)),c=(0,t.useTemplateRef)(`verticalNavRef`),l=(0,t.useTemplateRef)(`innerPanesContainerRef`),u=(0,t.useTemplateRef)(`paneLeftRef`),d=(0,t.useTemplateRef)(`paneCenterRef`),f=(0,t.useTemplateRef)(`paneRightRef`),p=(0,t.useTemplateRef)(`paneLeftDivider`),m=(0,t.useTemplateRef)(`innerPanesDivider`),{startDraggingInnerPanes:h,startDraggingPaneLeft:g,refreshInnerPaneSizes:_,paneLeftExpanded:v,isDraggingPaneLeft:y,isDraggingInnerPanes:b}=M({verticalNavRef:c,innerPanesContainerRef:l,paneLeftRef:u,paneCenterRef:d,paneRightRef:f}),{i18n:x}=P(),S=(0,t.computed)(()=>!!n[`pane-left`]&&e.paneLeft.visible!==!1&&v.value),C=(0,t.computed)(()=>!!n[`pane-center`]&&e.paneCenter.visible!==!1),w=(0,t.computed)(()=>!!n[`pane-right`]&&e.paneRight.visible!==!1),D=(0,t.computed)(()=>e.resizable&&e.showResizeHandle&&!!n[`pane-center`]&&e.paneCenter.visible!==!1&&!!n[`pane-right`]&&e.paneRight.visible!==!1),O=T(p),k=T(m),{width:A}=E(u);return(0,t.watch)(()=>e.paneRight.visible,async()=>{e.resizable&&(await(0,t.nextTick)(),_())},{flush:`post`}),(r,i)=>((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{class:(0,t.normalizeClass)([`kong-ui-public-split-pane`,{"has-navigation":e.showNavigation}]),"data-testid":`split-pane`},[(0,t.createElementVNode)(`div`,H,[e.showNavigation?((0,t.openBlock)(),(0,t.createBlock)(V,{key:0,ref_key:`verticalNavRef`,ref:c,items:e.navigationItems,"pane-left-visible":e.paneLeft.visible!==!1,"pane-left-width":(0,t.unref)(A)},null,8,[`items`,`pane-left-visible`,`pane-left-width`])):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,U,[(0,t.createElementVNode)(`div`,W,[(0,t.createElementVNode)(`div`,{ref_key:`paneLeftRef`,ref:u,"aria-hidden":S.value?void 0:`true`,class:(0,t.normalizeClass)([`split-pane-left`,[{expanded:(0,t.unref)(v),"show-resize-border":(0,t.unref)(O)},{"is-dragging-pane-left":(0,t.unref)(y)},{"is-dragging-pane":(0,t.unref)(y)||(0,t.unref)(b)}]]),"data-testid":`split-pane-left`,tabindex:S.value?0:-1},[(0,t.renderSlot)(r.$slots,`pane-left`,{},void 0,!0)],10,G),S.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref_key:`paneLeftDivider`,ref:p,class:`split-pane-resize-divider left`,"data-testid":`split-pane-resize-divider-left`,tabindex:`0`,title:(0,t.unref)(x).t(`actions.drag_to_resize`),onMousedown:i[0]||=(...e)=>(0,t.unref)(g)&&(0,t.unref)(g)(...e)},[...i[2]||=[(0,t.createElementVNode)(`div`,{class:`split-pane-drag-handle`},null,-1)]],40,K)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,q,[n.toolbar?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,class:(0,t.normalizeClass)([`split-pane-toolbar-container`,{"has-resize-divider-left":S.value}]),"data-testid":`split-pane-toolbar`},[(0,t.renderSlot)(r.$slots,`toolbar`,{},void 0,!0)],2)):(0,t.createCommentVNode)(``,!0),(0,t.createElementVNode)(`div`,{ref_key:`innerPanesContainerRef`,ref:l,class:`split-pane-inner-panes`},[(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`paneCenterRef`,ref:d,"aria-hidden":C.value?void 0:`true`,class:(0,t.normalizeClass)([`split-pane-center`,[{"has-resize-divider-left":S.value},{"has-resize-divider-right":D.value},{"is-dragging-pane":(0,t.unref)(y)||(0,t.unref)(b)}]]),"data-testid":`split-pane-center`,tabindex:C.value?0:-1},[(0,t.renderSlot)(r.$slots,`pane-center`,{},void 0,!0)],10,J),[[t.vShow,C.value]]),D.value?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,{key:0,ref_key:`innerPanesDivider`,ref:m,class:`split-pane-resize-divider right`,"data-testid":`split-pane-resize-divider-right`,tabindex:`0`,title:(0,t.unref)(x).t(`actions.drag_to_resize`),onMousedown:i[1]||=(...e)=>(0,t.unref)(h)&&(0,t.unref)(h)(...e)},[...i[3]||=[(0,t.createElementVNode)(`div`,{class:`split-pane-drag-handle`},null,-1)]],40,Y)):(0,t.createCommentVNode)(``,!0),(0,t.withDirectives)((0,t.createElementVNode)(`div`,{ref_key:`paneRightRef`,ref:f,"aria-hidden":w.value?void 0:`true`,class:(0,t.normalizeClass)([`split-pane-right`,[{"has-toolbar":!!n.toolbar},{"show-resize-border":(0,t.unref)(k)},{"is-dragging-inner-panes":(0,t.unref)(b)},{"is-dragging-pane":(0,t.unref)(y)||(0,t.unref)(b)}]]),"data-testid":`split-pane-right`,tabindex:w.value?0:-1},[(0,t.renderSlot)(r.$slots,`pane-right`,{},void 0,!0)],10,X),[[t.vShow,w.value]])],512)])])])])],2))}}),[[`__scopeId`,`data-v-a19fbade`]]),Q={},$={class:`kong-ui-public-split-pane-toolbar`,"data-testid":`kong-ui-public-split-pane-toolbar`},ee={class:`left`,"data-testid":`split-toolbar-left`},te={key:0,class:`center`,"data-testid":`split-toolbar-center`},ne={key:1,class:`right`,"data-testid":`split-toolbar-right`};function re(e,n){return(0,t.openBlock)(),(0,t.createElementBlock)(`div`,$,[(0,t.createElementVNode)(`div`,ee,[(0,t.renderSlot)(e.$slots,`left`,{},void 0,!0)]),e.$slots.center?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,te,[(0,t.renderSlot)(e.$slots,`center`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0),e.$slots.right?((0,t.openBlock)(),(0,t.createElementBlock)(`div`,ne,[(0,t.renderSlot)(e.$slots,`right`,{},void 0,!0)])):(0,t.createCommentVNode)(``,!0)])}var ie=B(Q,[[`render`,re],[`__scopeId`,`data-v-44b95676`]]);e.SplitPane=Z,e.SplitToolbar=ie});
|
package/dist/style.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
.kong-ui-public-split-pane-vertical-navigation[data-v-59e8017f]{color
|
|
1
|
+
.kong-ui-public-split-pane-vertical-navigation[data-v-59e8017f]{color:var(--kui-navigation-color-text,#bee2ff);height:100%;padding:8px;padding:var(--kui-space-40,8px);z-index:1;justify-content:center;width:52px;display:flex;position:relative}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav[data-v-59e8017f]{align-items:center;gap:12px;gap:var(--kui-space-50,12px);flex-direction:column;justify-content:space-between;width:100%;display:flex}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .top[data-v-59e8017f],.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .bottom[data-v-59e8017f]{gap:12px;gap:var(--kui-space-50,12px);flex-direction:column;flex-grow:1;width:100%;display:flex;position:relative}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .top[data-v-59e8017f]{justify-content:flex-start;align-items:center}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .bottom[data-v-59e8017f]{justify-content:flex-end;align-items:center}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav[data-v-59e8017f] .k-popover .popover{pointer-events:none}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-59e8017f]{background-color:#000933;background-color:var(--kui-navigation-color-background,#000933);border:1px solid #0000;border:var(--kui-border-width-10,1px) solid var(--kui-color-border-transparent,#0000);border-radius:6px;border-radius:var(--kui-border-radius-30,6px);color:var(--kui-navigation-color-text,#bee2ff);cursor:pointer;white-space:nowrap;justify-content:space-between;align-items:center;text-decoration:none;transition:color .2s;display:flex}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-59e8017f]:hover,.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-59e8017f]:focus-visible,.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-59e8017f]:hover svg,.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-59e8017f]:focus-visible svg{color:var(--kui-navigation-color-text-hover,#eefaff)}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-59e8017f]:focus-visible{box-shadow:inset 0 0 0 1px #fff9;box-shadow:var(--kui-navigation-shadow-focus,0 0 0 1px #fff9 inset);outline:none}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item[data-v-59e8017f] svg path{color:currentColor;fill:currentColor;transition:all .2s ease-out}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-59e8017f]{background-color:#ffffff1f;background-color:var(--kui-navigation-color-background-selected,#ffffff1f);border-color:#ffffff1f;border-color:var(--kui-navigation-color-border,#ffffff1f);color:var(--kui-navigation-color-text-selected,#00fabe)}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-59e8017f]:hover,.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-59e8017f]:focus-visible{color:var(--kui-navigation-color-text-selected,#00fabe)!important}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-59e8017f]:hover svg,.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.active[data-v-59e8017f]:focus-visible svg{color:var(--kui-navigation-color-text-selected,#00fabe)}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav-item.toggle-left-panel[data-v-59e8017f]{border-color:#ffffff1f;border-color:var(--kui-navigation-color-border,#ffffff1f)}.toggle-left-panel-control[data-v-59e8017f]{z-index:1;position:absolute;left:0}.toggle-left-panel-control[data-v-59e8017f]:not(.disable-animation){transition:left .2s ease-out}.toggle-left-panel-control.expanded[data-v-59e8017f]{left:var(--eaa86402)}[data-v-a19fbade],[data-v-a19fbade] *{box-sizing:border-box}.kong-ui-public-split-pane[data-v-a19fbade]{height:100%}.kong-ui-public-split-pane.has-navigation[data-v-a19fbade]{background-color:#000933;background-color:var(--kui-navigation-color-background,#000933);z-index:2000;position:fixed;inset:0}.kong-ui-public-split-pane.has-navigation .split-pane-container-inner[data-v-a19fbade]{padding-top:6px;padding-top:var(--kui-space-30,6px)}.kong-ui-public-split-pane .split-pane-container[data-v-a19fbade]{flex-direction:row;width:100%;height:100%;display:flex}.kong-ui-public-split-pane .split-pane-container-inner[data-v-a19fbade]{flex-direction:column;width:100%;display:flex}.kong-ui-public-split-pane .split-pane-container-inner-content[data-v-a19fbade]{flex-direction:column;flex:auto;width:100%;min-width:0;height:100%;max-height:calc(100vh - 6px);display:flex;position:relative}.kong-ui-public-split-pane .split-pane-inner-panes[data-v-a19fbade]{width:100%;height:100%;display:flex}.kong-ui-public-split-pane .panes[data-v-a19fbade]{background-color:#fff;background-color:var(--kui-color-background,#fff);border-top-left-radius:6px;border-top-left-radius:var(--kui-border-radius-30,6px);z-index:0;flex-direction:row;flex:auto;align-items:stretch;display:flex;overflow:hidden}.kong-ui-public-split-pane .split-pane-left[data-v-a19fbade],.kong-ui-public-split-pane .split-pane-center[data-v-a19fbade],.kong-ui-public-split-pane .split-pane-right[data-v-a19fbade]{scrollbar-width:thin;position:relative;overflow:hidden auto}.kong-ui-public-split-pane .split-pane-left.has-toolbar[data-v-a19fbade],.kong-ui-public-split-pane .split-pane-center.has-toolbar[data-v-a19fbade],.kong-ui-public-split-pane .split-pane-right.has-toolbar[data-v-a19fbade]{z-index:1;max-height:calc(100vh - 44px)}.kong-ui-public-split-pane .split-pane-left.is-dragging-pane[data-v-a19fbade],.kong-ui-public-split-pane .split-pane-center.is-dragging-pane[data-v-a19fbade],.kong-ui-public-split-pane .split-pane-right.is-dragging-pane[data-v-a19fbade]{pointer-events:none;-webkit-user-select:none;user-select:none;transition:none}.kong-ui-public-split-pane .split-pane-left[data-v-a19fbade]{border-right:1px solid #0000;border-right:var(--kui-border-width-10,1px) solid var(--kui-color-border-transparent,#0000);border-top-left-radius:6px;border-top-left-radius:var(--kui-border-radius-30,6px);pointer-events:none;will-change:border-color, max-width, min-width;z-index:5;flex:none;width:260px;max-width:0;transition:border-color .1s ease-in-out,max-width .1s ease-in-out;position:relative;overflow:hidden;max-height:none!important}.kong-ui-public-split-pane .split-pane-left.expanded[data-v-a19fbade]{border-right-color:#e0e4ea;border-right-color:var(--kui-color-border,#e0e4ea);max-width:var(--v1300c9c8);pointer-events:auto}.kong-ui-public-split-pane .split-pane-left.is-dragging-pane-left[data-v-a19fbade],.kong-ui-public-split-pane .split-pane-left.expanded.show-resize-border[data-v-a19fbade],.kong-ui-public-split-pane .split-pane-left.show-resize-border[data-v-a19fbade]{border-right-color:#0044f4;border-right-color:var(--kui-color-border-primary,#0044f4)}.kong-ui-public-split-pane .split-pane-center[data-v-a19fbade]{max-width:var(--v183c98aa);width:300px;min-width:300px}.kong-ui-public-split-pane .split-pane-center.has-resize-divider-left[data-v-a19fbade]{margin-left:-3px}.kong-ui-public-split-pane .split-pane-center.has-resize-divider-right[data-v-a19fbade]{margin-right:-3px}.kong-ui-public-split-pane .split-pane-right[data-v-a19fbade]{border-left:1px solid #e0e4ea;border-left:var(--kui-border-width-10,1px) solid var(--kui-color-border,#e0e4ea);max-width:var(--bf8b5faa);flex:1;min-width:300px;transition:border-color .1s ease-in-out}.kong-ui-public-split-pane .split-pane-right.is-dragging-inner-panes[data-v-a19fbade],.kong-ui-public-split-pane .split-pane-right.show-resize-border[data-v-a19fbade]{border-left-color:#0044f4;border-left-color:var(--kui-color-border-primary,#0044f4)}.kong-ui-public-split-pane .split-pane-toolbar-container.has-resize-divider-left[data-v-a19fbade]{margin-left:-3px}.kong-ui-public-split-pane .split-pane-resize-divider[data-v-a19fbade]{background-color:#0000;background-color:var(--kui-color-background-transparent,#0000);cursor:col-resize;z-index:4;align-self:flex-end;width:3px;height:calc(100% - 43px);transition:all .1s ease-in-out;position:relative}.kong-ui-public-split-pane .split-pane-resize-divider.left[data-v-a19fbade]{margin-left:0}.kong-ui-public-split-pane .split-pane-resize-divider.right[data-v-a19fbade]{right:-3px}.kong-ui-public-split-pane-toolbar[data-v-44b95676]{background:#fff;background:var(--kui-color-background,#fff);border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10,1px) solid var(--kui-color-border,#e0e4ea);min-height:44px;padding-left:8px;padding-left:var(--kui-space-40,8px);padding-right:8px;padding-right:var(--kui-space-40,8px);scrollbar-width:thin;z-index:3;flex:0 0 44px;justify-content:space-between;align-items:center;display:flex;position:sticky;top:0;overflow:auto hidden}.left[data-v-44b95676],.right[data-v-44b95676],.center[data-v-44b95676]{align-items:center;gap:8px;gap:var(--kui-space-40,8px);height:100%;display:flex}.left[data-v-44b95676],.right[data-v-44b95676]{flex:1}.right[data-v-44b95676]{justify-content:flex-end}
|
|
2
|
+
/*$vite$:1*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/split-pane",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7-pr.4063.b6bcc4076.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A shared SplitPane layout component for Vue 3 applications.",
|
|
6
6
|
"main": "./dist/split-pane.umd.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@kong-ui-public/i18n": "^2.5.1",
|
|
26
26
|
"@kong/design-tokens": "3.5.1",
|
|
27
27
|
"@kong/kongponents": "9.66.12",
|
|
28
|
-
"vue": "^3.5.
|
|
28
|
+
"vue": "^3.5.44"
|
|
29
29
|
},
|
|
30
30
|
"repository": {
|
|
31
31
|
"type": "git",
|