@kong-ui-public/split-pane 0.5.21-pr.3905.ba97ddd4a.0 → 0.5.21

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.
@@ -0,0 +1,546 @@
1
+ import { watch as Y, onMounted as ee, nextTick as G, getCurrentScope as xe, onScopeDispose as Ce, getCurrentInstance as he, computed as R, toValue as B, shallowRef as Q, watchEffect as We, unref as u, ref as P, readonly as te, defineComponent as ge, useCssVars as be, resolveComponent as oe, openBlock as x, createElementBlock as L, createElementVNode as C, Fragment as we, renderList as ye, createBlock as K, withCtx as Z, createVNode as le, withModifiers as ne, normalizeClass as N, resolveDynamicComponent as re, createCommentVNode as E, useSlots as Le, useTemplateRef as $, renderSlot as T, withDirectives as ue, vShow as de } from "vue";
2
+ import { ChevronDoubleLeftIcon as _e, ChevronDoubleRightIcon as ke } from "@kong/icons";
3
+ import { useRouter as ze } from "vue-router";
4
+ import { createI18n as De, i18nTComponent as $e } from "@kong-ui-public/i18n";
5
+ const Ie = "260px", ae = "500px", ce = "50%", fe = "50%";
6
+ function ie(e, a) {
7
+ return xe() ? (Ce(e, a), !0) : !1;
8
+ }
9
+ const Ne = typeof window < "u" && typeof document < "u";
10
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
11
+ const Ee = (e) => e != null, Te = Object.prototype.toString, Se = (e) => Te.call(e) === "[object Object]", Me = () => {
12
+ };
13
+ function U(e) {
14
+ return Array.isArray(e) ? e : [e];
15
+ }
16
+ function Be(e) {
17
+ return he();
18
+ }
19
+ function Oe(e, a = !0, r) {
20
+ Be() ? ee(e, r) : a ? e() : G(e);
21
+ }
22
+ function Ae(e, a, r) {
23
+ return Y(e, a, {
24
+ ...r,
25
+ immediate: !0
26
+ });
27
+ }
28
+ const O = Ne ? window : void 0;
29
+ function _(e) {
30
+ var a;
31
+ const r = B(e);
32
+ return (a = r?.$el) !== null && a !== void 0 ? a : r;
33
+ }
34
+ function j(...e) {
35
+ const a = (t, n, o, s) => (t.addEventListener(n, o, s), () => t.removeEventListener(n, o, s)), r = R(() => {
36
+ const t = U(B(e[0])).filter((n) => n != null);
37
+ return t.every((n) => typeof n != "string") ? t : void 0;
38
+ });
39
+ return Ae(() => {
40
+ var t, n;
41
+ return [
42
+ (t = (n = r.value) === null || n === void 0 ? void 0 : n.map((o) => _(o))) !== null && t !== void 0 ? t : [O].filter((o) => o != null),
43
+ U(B(r.value ? e[1] : e[0])),
44
+ U(u(r.value ? e[2] : e[1])),
45
+ B(r.value ? e[3] : e[2])
46
+ ];
47
+ }, ([t, n, o, s], l, p) => {
48
+ if (!t?.length || !n?.length || !o?.length) return;
49
+ const h = Se(s) ? { ...s } : s, c = t.flatMap((i) => n.flatMap((d) => o.map((v) => a(i, d, v, h))));
50
+ p(() => {
51
+ c.forEach((i) => i());
52
+ });
53
+ }, { flush: "post" });
54
+ }
55
+ // @__NO_SIDE_EFFECTS__
56
+ function Fe() {
57
+ const e = Q(!1), a = he();
58
+ return a && ee(() => {
59
+ e.value = !0;
60
+ }, a), e;
61
+ }
62
+ // @__NO_SIDE_EFFECTS__
63
+ function me(e) {
64
+ const a = /* @__PURE__ */ Fe();
65
+ return R(() => (a.value, !!e()));
66
+ }
67
+ function He(e, a, r = {}) {
68
+ const { window: t = O, ...n } = r;
69
+ let o;
70
+ const s = /* @__PURE__ */ me(() => t && "MutationObserver" in t), l = () => {
71
+ o && (o.disconnect(), o = void 0);
72
+ }, p = Y(R(() => {
73
+ const i = U(B(e)).map(_).filter(Ee);
74
+ return new Set(i);
75
+ }), (i) => {
76
+ l(), s.value && i.size && (o = new MutationObserver(a), i.forEach((d) => o.observe(d, n)));
77
+ }, {
78
+ immediate: !0,
79
+ flush: "post"
80
+ }), h = () => o?.takeRecords(), c = () => {
81
+ p(), l();
82
+ };
83
+ return ie(c), {
84
+ isSupported: s,
85
+ stop: c,
86
+ takeRecords: h
87
+ };
88
+ }
89
+ function Xe(e, a, r = {}) {
90
+ const { window: t = O, document: n = t?.document, flush: o = "sync" } = r;
91
+ if (!t || !n) return Me;
92
+ let s;
93
+ const l = (c) => {
94
+ s?.(), s = c;
95
+ }, p = We(() => {
96
+ const c = _(e);
97
+ if (c) {
98
+ const { stop: i } = He(n, (d) => {
99
+ d.map((v) => [...v.removedNodes]).flat().some((v) => v === c || v.contains(c)) && a(d);
100
+ }, {
101
+ window: t,
102
+ childList: !0,
103
+ subtree: !0
104
+ });
105
+ l(i);
106
+ }
107
+ }, { flush: o }), h = () => {
108
+ p(), l();
109
+ };
110
+ return ie(h), h;
111
+ }
112
+ function Ve(e, a, r = {}) {
113
+ const { window: t = O, ...n } = r;
114
+ let o;
115
+ const s = /* @__PURE__ */ me(() => t && "ResizeObserver" in t), l = () => {
116
+ o && (o.disconnect(), o = void 0);
117
+ }, p = Y(R(() => {
118
+ const c = B(e);
119
+ return Array.isArray(c) ? c.map((i) => _(i)) : [_(c)];
120
+ }), (c) => {
121
+ if (l(), s.value && t) {
122
+ o = new ResizeObserver(a);
123
+ for (const i of c) i && o.observe(i, n);
124
+ }
125
+ }, {
126
+ immediate: !0,
127
+ flush: "post"
128
+ }), h = () => {
129
+ l(), p();
130
+ };
131
+ return ie(h), {
132
+ isSupported: s,
133
+ stop: h
134
+ };
135
+ }
136
+ function ve(e, a = {}) {
137
+ const { delayEnter: r = 0, delayLeave: t = 0, triggerOnRemoval: n = !1, window: o = O } = a, s = Q(!1);
138
+ let l;
139
+ const p = (h) => {
140
+ const c = h ? r : t;
141
+ l && (clearTimeout(l), l = void 0), c ? l = setTimeout(() => s.value = h, c) : s.value = h;
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;
144
+ }
145
+ function Ke(e, a = {
146
+ width: 0,
147
+ height: 0
148
+ }, r = {}) {
149
+ const { window: t = O, box: n = "content-box" } = r, o = R(() => {
150
+ var i;
151
+ return (i = _(e)) === null || i === void 0 || (i = i.namespaceURI) === null || i === void 0 ? void 0 : i.includes("svg");
152
+ }), s = Q(a.width), l = Q(a.height), { stop: p } = Ve(e, ([i]) => {
153
+ const d = n === "border-box" ? i.borderBoxSize : n === "content-box" ? i.contentBoxSize : i.devicePixelContentBoxSize;
154
+ if (t && o.value) {
155
+ const v = _(e);
156
+ if (v) {
157
+ const g = v.getBoundingClientRect();
158
+ s.value = g.width, l.value = g.height;
159
+ }
160
+ } else if (d) {
161
+ const v = U(d);
162
+ s.value = v.reduce((g, { inlineSize: W }) => g + W, 0), l.value = v.reduce((g, { blockSize: W }) => g + W, 0);
163
+ } else
164
+ s.value = i.contentRect.width, l.value = i.contentRect.height;
165
+ }, r);
166
+ Oe(() => {
167
+ const i = _(e);
168
+ if (i && "offsetWidth" in i) if (n === "content-box" && t) {
169
+ const d = t.getComputedStyle(i), v = Number.parseFloat(d.paddingLeft) + Number.parseFloat(d.paddingRight), g = Number.parseFloat(d.paddingTop) + Number.parseFloat(d.paddingBottom), W = Number.parseFloat(d.borderLeftWidth) + Number.parseFloat(d.borderRightWidth), b = Number.parseFloat(d.borderTopWidth) + Number.parseFloat(d.borderBottomWidth);
170
+ s.value = i.offsetWidth - v - W, l.value = i.offsetHeight - g - b;
171
+ } else
172
+ s.value = i.offsetWidth, l.value = i.offsetHeight;
173
+ else i && (s.value = a.width, l.value = a.height);
174
+ });
175
+ const h = Y(() => _(e), (i) => {
176
+ s.value = i ? a.width : 0, l.value = i ? a.height : 0;
177
+ });
178
+ function c() {
179
+ p(), h();
180
+ }
181
+ return {
182
+ width: s,
183
+ height: l,
184
+ stop: c
185
+ };
186
+ }
187
+ const pe = "20px", M = P(!1), I = P(!1), J = P(!0), V = P(0);
188
+ function Pe(e) {
189
+ const a = e?.verticalNavRef || P(null), r = e?.innerPanesContainerRef || P(null), t = e?.paneLeftRef || P(null), n = e?.paneCenterRef || P(null), o = e?.paneRightRef || P(null), s = (f) => {
190
+ switch (f) {
191
+ case "verticalNav":
192
+ return a.value?.offsetWidth || 0;
193
+ case "innerPanesContainer":
194
+ return r.value?.offsetWidth || 0;
195
+ case "paneLeft":
196
+ return t.value?.offsetWidth || 0;
197
+ case "paneCenter":
198
+ return n.value?.offsetWidth || 0;
199
+ case "paneRight":
200
+ return o.value?.offsetWidth || 0;
201
+ default:
202
+ return 0;
203
+ }
204
+ }, l = P(50), p = P(0), h = P(0), c = P(0), i = P(0), d = (f) => {
205
+ if (n.value) {
206
+ if (f) {
207
+ n.value.style.width = `${f}%`, V.value = s("paneCenter");
208
+ return;
209
+ } else (typeof l.value != "number" || !isFinite(l.value)) && (l.value = 38);
210
+ n.value.style.width = `${l.value}%`, V.value = s("paneCenter");
211
+ }
212
+ }, v = () => {
213
+ n.value && o.value?.style.display === "none" ? (n.value.style.flex = "1", d(100)) : (n.value && (n.value.style.flex = ""), d());
214
+ }, g = () => {
215
+ if (!r.value || !n.value) return;
216
+ const f = 100, m = s("innerPanesContainer") - s("verticalNav") - s("paneLeft") - f, k = l.value / 100 * s("innerPanesContainer");
217
+ if (k < f ? l.value = f / s("innerPanesContainer") * 100 : k > m && (l.value = m / s("innerPanesContainer") * 100), n.value && o.value && o.value?.style.display === "none") {
218
+ d(100);
219
+ return;
220
+ }
221
+ d();
222
+ }, W = (f) => {
223
+ !n.value || f.button !== 0 || (I.value = !0, p.value = f.clientX, h.value = n.value.offsetWidth || 0);
224
+ }, b = (f) => {
225
+ if (!I.value || !r.value || !n.value) return;
226
+ const m = r.value.offsetWidth, k = f.clientX - p.value, w = (h.value + k) / m * 100, y = 100 / m * 100, X = (m - 100) / m * 100;
227
+ l.value = Math.min(Math.max(y, w), X), d();
228
+ }, z = () => {
229
+ I.value = !1;
230
+ }, S = (f) => {
231
+ !t.value || !J.value || f.button !== 0 || (M.value = !0, c.value = f.clientX, i.value = t.value.offsetWidth || 0);
232
+ }, q = (f) => {
233
+ if (!M.value || !t.value) return;
234
+ let m = i.value + (f.clientX - c.value);
235
+ const k = Number(Ie.replace(/px$/i, "")), H = Number(ae.replace(/px$/i, ""));
236
+ m < k && (m = k), m > H && (m = H), t.value.style.width = `${m}px`, c.value = f.clientX, i.value = m, V.value = s("paneCenter");
237
+ }, D = () => {
238
+ M.value = !1;
239
+ }, A = () => {
240
+ I.value || g();
241
+ }, F = async () => {
242
+ J.value = !J.value;
243
+ };
244
+ return j(window, "resize", A), ee(async () => {
245
+ await G(), n.value && (g(), await G(), d(), requestAnimationFrame(() => {
246
+ V.value = s("paneCenter");
247
+ }));
248
+ }), j(document, "mousemove", (f) => {
249
+ I.value && b(f), M.value && q(f);
250
+ }), j(document, "mouseup", () => {
251
+ I.value && z(), M.value && D();
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
+ };
263
+ }
264
+ const Ue = { return: "Return", collapse_panel: "Collapse panel", expand_panel: "Expand panel", drag_to_resize: "Click and drag to resize" }, je = {
265
+ actions: Ue
266
+ };
267
+ function Re() {
268
+ const e = De("en-us", je);
269
+ return {
270
+ i18n: e,
271
+ i18nT: $e(e)
272
+ // Translation component <i18n-t>
273
+ };
274
+ }
275
+ const Ge = { class: "kong-ui-public-split-pane-vertical-navigation" }, Ye = { class: "split-pane-nav" }, qe = { class: "top" }, Ze = { class: "bottom" }, Je = /* @__PURE__ */ ge({
276
+ __name: "VerticalNavigation",
277
+ props: {
278
+ paneLeftWidth: { default: 0 },
279
+ paneLeftVisible: { type: Boolean, default: !0 },
280
+ items: { default: () => [] }
281
+ },
282
+ setup(e) {
283
+ be((d) => ({
284
+ eaa86402: c.value
285
+ }));
286
+ const { i18n: a } = Re(), r = ze(), { paneLeftExpanded: t, togglePaneLeft: n, isDraggingPaneLeft: o, isDraggingInnerPanes: s } = Pe(), l = P(!1), p = P(!1), h = R(() => l.value || o.value || s.value), c = R(() => `${e.paneLeftWidth - 8}px`), i = (d) => {
287
+ t.value || n(), !d.active && d.to && r.push(d.to);
288
+ };
289
+ return ee(async () => {
290
+ await G(), await new Promise((d) => setTimeout(d, 500)), p.value = !0;
291
+ }), (d, v) => {
292
+ const g = oe("KButton"), W = oe("KTooltip");
293
+ return x(), L("div", Ge, [
294
+ C("nav", Ye, [
295
+ C("div", qe, [
296
+ (x(!0), L(we, null, ye(e.items, (b) => (x(), K(W, {
297
+ key: b.tooltip,
298
+ "kpop-attributes": { offset: "10px" },
299
+ label: b.tooltip,
300
+ placement: "right"
301
+ }, {
302
+ default: Z(() => [
303
+ le(g, {
304
+ appearance: "none",
305
+ "aria-label": b.tooltip,
306
+ class: N(["split-pane-nav-item", { active: b.active }]),
307
+ "data-testid": `kong-ui-public-split-pane-vertical-navigation-nav-item-${b.testid}`,
308
+ icon: "",
309
+ size: "large",
310
+ style: { cursor: "pointer" },
311
+ to: b.to,
312
+ onClickCapture: ne((z) => i(b), ["prevent"])
313
+ }, {
314
+ default: Z(() => [
315
+ (x(), K(re(b.icon), {
316
+ decorative: "",
317
+ size: `var(--kui-icon-size-40, ${u(pe)})`
318
+ }, null, 8, ["size"]))
319
+ ]),
320
+ _: 2
321
+ }, 1032, ["aria-label", "class", "data-testid", "to", "onClickCapture"])
322
+ ]),
323
+ _: 2
324
+ }, 1032, ["label"]))), 128))
325
+ ]),
326
+ C("div", Ze, [
327
+ e.paneLeftVisible ? (x(), L("div", {
328
+ key: 0,
329
+ class: N(["toggle-left-panel-control", {
330
+ expanded: u(t),
331
+ "disable-animation": !p.value || u(o) || u(s)
332
+ }]),
333
+ onTransitionend: v[0] || (v[0] = ne((b) => l.value = !1, ["self"])),
334
+ onTransitionstart: v[1] || (v[1] = ne((b) => l.value = !0, ["self"]))
335
+ }, [
336
+ (x(), K(W, {
337
+ key: String(u(t)),
338
+ "kpop-attributes": u(t) ? void 0 : { offset: "10px" },
339
+ label: h.value ? void 0 : u(t) ? u(a).t("actions.collapse_panel") : u(a).t("actions.expand_panel"),
340
+ placement: u(t) ? "left" : "right"
341
+ }, {
342
+ default: Z(() => [
343
+ le(g, {
344
+ appearance: "none",
345
+ "aria-controls": "left-pane",
346
+ "aria-expanded": u(t),
347
+ "aria-label": u(t) ? u(a).t("actions.collapse_panel") : u(a).t("actions.expand_panel"),
348
+ class: "split-pane-nav-item toggle-left-panel",
349
+ "data-testid": "kong-ui-public-split-pane-toggle-left-panel-button",
350
+ icon: "",
351
+ size: "large",
352
+ onClick: u(n)
353
+ }, {
354
+ default: Z(() => [
355
+ (x(), K(re(u(t) ? u(_e) : u(ke)), {
356
+ decorative: "",
357
+ size: `var(--kui-icon-size-40, ${u(pe)})`
358
+ }, null, 8, ["size"]))
359
+ ]),
360
+ _: 1
361
+ }, 8, ["aria-expanded", "aria-label", "onClick"])
362
+ ]),
363
+ _: 1
364
+ }, 8, ["kpop-attributes", "label", "placement"]))
365
+ ], 34)) : E("", !0)
366
+ ])
367
+ ])
368
+ ]);
369
+ };
370
+ }
371
+ }), se = (e, a) => {
372
+ const r = e.__vccOpts || e;
373
+ for (const [t, n] of a)
374
+ r[t] = n;
375
+ return r;
376
+ }, Qe = /* @__PURE__ */ se(Je, [["__scopeId", "data-v-59e8017f"]]), et = { class: "split-pane-container" }, tt = { class: "split-pane-container-inner" }, nt = { class: "panes" }, at = ["aria-hidden", "tabindex"], it = ["title"], st = { class: "split-pane-container-inner-content" }, ot = ["aria-hidden", "tabindex"], lt = ["title"], rt = ["aria-hidden", "tabindex"], ut = /* @__PURE__ */ ge({
377
+ __name: "SplitPane",
378
+ props: {
379
+ resizable: { type: Boolean, default: !0 },
380
+ showResizeHandle: { type: Boolean, default: !0 },
381
+ showNavigation: { type: Boolean, default: !0 },
382
+ navigationItems: { default: () => [] },
383
+ paneLeft: { default: () => ({
384
+ /** Pass false to hide the panel even if it contains slot content */
385
+ visible: !0,
386
+ maxWidth: ae
387
+ }) },
388
+ paneCenter: { default: () => ({
389
+ /** Pass false to hide the panel even if it contains slot content */
390
+ visible: !0,
391
+ maxWidth: ce
392
+ }) },
393
+ paneRight: { default: () => ({
394
+ /** Pass false to hide the panel even if it contains slot content */
395
+ visible: !0,
396
+ maxWidth: fe
397
+ }) }
398
+ },
399
+ setup(e) {
400
+ be((w) => ({
401
+ v1300c9c8: t.value,
402
+ v183c98aa: n.value,
403
+ bf8b5faa: o.value
404
+ }));
405
+ const a = Le(), r = (w) => w === "left" ? e.paneLeft.maxWidth !== void 0 ? e.paneLeft.maxWidth : ae : w === "center" ? e.resizable ? "none" : e.paneCenter.maxWidth !== void 0 ? e.paneCenter.maxWidth : ce : w === "right" ? e.resizable ? "none" : e.paneRight.maxWidth !== void 0 ? e.paneRight.maxWidth : fe : "none", t = R(() => r("left")), n = R(() => r("center")), o = R(() => r("right")), s = $("verticalNavRef"), l = $("innerPanesContainerRef"), p = $("paneLeftRef"), h = $("paneCenterRef"), c = $("paneRightRef"), i = $("paneLeftDivider"), d = $("innerPanesDivider"), { startDraggingInnerPanes: v, startDraggingPaneLeft: g, refreshInnerPaneSizes: W, paneLeftExpanded: b, isDraggingPaneLeft: z, isDraggingInnerPanes: S } = Pe({
406
+ verticalNavRef: s,
407
+ innerPanesContainerRef: l,
408
+ paneLeftRef: p,
409
+ paneCenterRef: h,
410
+ paneRightRef: c
411
+ }), { i18n: q } = Re(), D = R(() => !!a["pane-left"] && e.paneLeft.visible !== !1 && b.value), A = R(() => !!a["pane-center"] && e.paneCenter.visible !== !1), F = R(() => !!a["pane-right"] && e.paneRight.visible !== !1), f = R(() => e.resizable && e.showResizeHandle && !!a["pane-center"] && e.paneCenter.visible !== !1 && !!a["pane-right"] && e.paneRight.visible !== !1), m = ve(i), k = ve(d), { width: H } = Ke(p);
412
+ return Y(() => e.paneRight.visible, async () => {
413
+ e.resizable && (await G(), W());
414
+ }, { flush: "post" }), (w, y) => (x(), L("div", {
415
+ class: N(["kong-ui-public-split-pane", { "has-navigation": e.showNavigation }]),
416
+ "data-testid": "split-pane"
417
+ }, [
418
+ C("div", et, [
419
+ e.showNavigation ? (x(), K(Qe, {
420
+ key: 0,
421
+ ref_key: "verticalNavRef",
422
+ ref: s,
423
+ items: e.navigationItems,
424
+ "pane-left-visible": e.paneLeft.visible !== !1,
425
+ "pane-left-width": u(H)
426
+ }, null, 8, ["items", "pane-left-visible", "pane-left-width"])) : E("", !0),
427
+ C("div", tt, [
428
+ C("div", nt, [
429
+ C("div", {
430
+ ref_key: "paneLeftRef",
431
+ ref: p,
432
+ "aria-hidden": D.value ? void 0 : "true",
433
+ class: N(["split-pane-left", [{ expanded: u(b), "show-resize-border": u(m) }, { "is-dragging-pane-left": u(z) }, { "is-dragging-pane": u(z) || u(S) }]]),
434
+ "data-testid": "split-pane-left",
435
+ tabindex: D.value ? 0 : -1
436
+ }, [
437
+ T(w.$slots, "pane-left", {}, void 0, !0)
438
+ ], 10, at),
439
+ D.value ? (x(), L("div", {
440
+ key: 0,
441
+ ref_key: "paneLeftDivider",
442
+ ref: i,
443
+ class: "split-pane-resize-divider left",
444
+ "data-testid": "split-pane-resize-divider-left",
445
+ tabindex: "0",
446
+ title: u(q).t("actions.drag_to_resize"),
447
+ onMousedown: y[0] || (y[0] = //@ts-ignore
448
+ (...X) => u(g) && u(g)(...X))
449
+ }, [...y[2] || (y[2] = [
450
+ C("div", { class: "split-pane-drag-handle" }, null, -1)
451
+ ])], 40, it)) : E("", !0),
452
+ C("div", st, [
453
+ a.toolbar ? (x(), L("div", {
454
+ key: 0,
455
+ class: N(["split-pane-toolbar-container", { "has-resize-divider-left": D.value }]),
456
+ "data-testid": "split-pane-toolbar"
457
+ }, [
458
+ T(w.$slots, "toolbar", {}, void 0, !0)
459
+ ], 2)) : E("", !0),
460
+ C("div", {
461
+ ref_key: "innerPanesContainerRef",
462
+ ref: l,
463
+ class: "split-pane-inner-panes"
464
+ }, [
465
+ ue(C("div", {
466
+ ref_key: "paneCenterRef",
467
+ ref: h,
468
+ "aria-hidden": A.value ? void 0 : "true",
469
+ class: N(["split-pane-center", [{ "has-resize-divider-left": D.value }, { "has-resize-divider-right": f.value }, { "is-dragging-pane": u(z) || u(S) }]]),
470
+ "data-testid": "split-pane-center",
471
+ tabindex: A.value ? 0 : -1
472
+ }, [
473
+ T(w.$slots, "pane-center", {}, void 0, !0)
474
+ ], 10, ot), [
475
+ [de, A.value]
476
+ ]),
477
+ f.value ? (x(), L("div", {
478
+ key: 0,
479
+ ref_key: "innerPanesDivider",
480
+ ref: d,
481
+ class: "split-pane-resize-divider right",
482
+ "data-testid": "split-pane-resize-divider-right",
483
+ tabindex: "0",
484
+ title: u(q).t("actions.drag_to_resize"),
485
+ onMousedown: y[1] || (y[1] = //@ts-ignore
486
+ (...X) => u(v) && u(v)(...X))
487
+ }, [...y[3] || (y[3] = [
488
+ C("div", { class: "split-pane-drag-handle" }, null, -1)
489
+ ])], 40, lt)) : E("", !0),
490
+ ue(C("div", {
491
+ ref_key: "paneRightRef",
492
+ ref: c,
493
+ "aria-hidden": F.value ? void 0 : "true",
494
+ class: N(["split-pane-right", [
495
+ { "has-toolbar": !!a.toolbar },
496
+ { "show-resize-border": u(k) },
497
+ { "is-dragging-inner-panes": u(S) },
498
+ { "is-dragging-pane": u(z) || u(S) }
499
+ ]]),
500
+ "data-testid": "split-pane-right",
501
+ tabindex: F.value ? 0 : -1
502
+ }, [
503
+ T(w.$slots, "pane-right", {}, void 0, !0)
504
+ ], 10, rt), [
505
+ [de, F.value]
506
+ ])
507
+ ], 512)
508
+ ])
509
+ ])
510
+ ])
511
+ ])
512
+ ], 2));
513
+ }
514
+ }), Rt = /* @__PURE__ */ se(ut, [["__scopeId", "data-v-a19fbade"]]), dt = {}, ct = {
515
+ class: "kong-ui-public-split-pane-toolbar",
516
+ "data-testid": "kong-ui-public-split-pane-toolbar"
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"
528
+ };
529
+ function ht(e, a) {
530
+ return x(), L("div", ct, [
531
+ C("div", ft, [
532
+ T(e.$slots, "left", {}, void 0, !0)
533
+ ]),
534
+ e.$slots.center ? (x(), L("div", vt, [
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
+ ]);
541
+ }
542
+ const xt = /* @__PURE__ */ se(dt, [["render", ht], ["__scopeId", "data-v-44b95676"]]);
543
+ export {
544
+ Rt as SplitPane,
545
+ xt as SplitToolbar
546
+ };
@@ -0,0 +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"})}));
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .kong-ui-public-split-pane-vertical-navigation[data-v-59e8017f]{color:#bee2ff;color:var(--kui-navigation-color-text, #bee2ff);display:flex;height:100%;justify-content:center;padding:8px;padding:var(--kui-space-40, 8px);position:relative;width:52px;z-index:1}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav[data-v-59e8017f]{align-items:center;display:flex;flex-direction:column;gap:12px;gap:var(--kui-space-50, 12px);justify-content:space-between;width:100%}.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]{display:flex;flex-direction:column;flex-grow:1;gap:12px;gap:var(--kui-space-50, 12px);position:relative;width:100%}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .top[data-v-59e8017f]{align-items:center;justify-content:flex-start}.kong-ui-public-split-pane-vertical-navigation .split-pane-nav .bottom[data-v-59e8017f]{align-items:center;justify-content:flex-end}.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]{align-items:center;background-color:#000933;background-color:var(--kui-navigation-color-background, #000933);border:1px solid rgba(0,0,0,0);border:var(--kui-border-width-10, 1px) solid var(--kui-color-border-transparent, rgba(0, 0, 0, 0));border-radius:6px;border-radius:var(--kui-border-radius-30, 6px);color:#bee2ff;color:var(--kui-navigation-color-text, #bee2ff);cursor:pointer;display:flex;justify-content:center;justify-content:space-between;text-decoration:none;transition:color .2s ease;white-space:nowrap}.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{color:#eefaff;color:var(--kui-navigation-color-text-hover, #eefaff)}.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:#eefaff;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:0 0 0 1px #fff9 inset;box-shadow:var(--kui-navigation-shadow-focus, 0 0 0 1px rgba(255, 255, 255, .6) 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, rgba(255, 255, 255, .12));border-color:#ffffff1f;border-color:var(--kui-navigation-color-border, rgba(255, 255, 255, .12));color:#00fabe;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:#00fabe!important;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:#00fabe;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, rgba(255, 255, 255, .12))}.toggle-left-panel-control[data-v-59e8017f]{left:0;position:absolute;z-index:1}.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);inset:0;position:fixed;z-index:2000}.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]{display:flex;flex-direction:row;height:100%;width:100%}.kong-ui-public-split-pane .split-pane-container-inner[data-v-a19fbade]{display:flex;flex-direction:column;width:100%}.kong-ui-public-split-pane .split-pane-container-inner-content[data-v-a19fbade]{display:flex;flex:1 1 auto;flex-direction:column;height:100%;max-height:calc(100vh - 6px);min-width:0;position:relative;width:100%}.kong-ui-public-split-pane .split-pane-inner-panes[data-v-a19fbade]{display:flex;height:100%;width:100%}.kong-ui-public-split-pane .panes[data-v-a19fbade]{align-items:stretch;background-color:#fff;background-color:var(--kui-color-background, #ffffff);border-top-left-radius:6px;border-top-left-radius:var(--kui-border-radius-30, 6px);display:flex;flex:1 1 auto;flex-direction:row;overflow:hidden;z-index:0}.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]{overflow-x:hidden;overflow-y:auto;position:relative;scrollbar-width:thin}.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]{max-height:calc(100vh - 44px);z-index:1}.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;transition:none;-webkit-user-select:none;user-select:none}.kong-ui-public-split-pane .split-pane-left[data-v-a19fbade]{border-right:1px solid rgba(0,0,0,0);border-right:var(--kui-border-width-10, 1px) solid var(--kui-color-border-transparent, rgba(0, 0, 0, 0));border-top-left-radius:6px;border-top-left-radius:var(--kui-border-radius-30, 6px);flex:0 0 auto;max-height:none!important;max-width:0;overflow:hidden;pointer-events:none;position:relative;transition:border-color .1s ease-in-out,max-width .1s ease-in-out;width:260px;will-change:border-color,max-width,min-width;z-index:5}.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);min-width:300px;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);flex:1;max-width:var(--bf8b5faa);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]{align-self:flex-end;background-color:#0000;background-color:var(--kui-color-background-transparent, rgba(0, 0, 0, 0));cursor:col-resize;height:calc(100% - 43px);position:relative;transition:all .1s ease-in-out;width:3px;z-index:4}.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]{align-items:center;background:#fff;background:var(--kui-color-background, #ffffff);border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);display:flex;flex:0 0 44px;justify-content:space-between;min-height:44px;overflow-x:auto;overflow-y:hidden;padding-left:8px;padding-left:var(--kui-space-40, 8px);padding-right:8px;padding-right:var(--kui-space-40, 8px);position:sticky;scrollbar-width:thin;top:0;z-index:3}.left[data-v-44b95676],.right[data-v-44b95676],.center[data-v-44b95676]{align-items:center;display:flex;gap:8px;gap:var(--kui-space-40, 8px);height:100%}.left[data-v-44b95676],.right[data-v-44b95676]{flex:1 1 0%}.right[data-v-44b95676]{justify-content:flex-end}
@@ -0,0 +1,17 @@
1
+ import type { SplitPaneProps } from '../types';
2
+ type __VLS_Slots = {
3
+ toolbar?: () => any;
4
+ 'pane-left'?: () => any;
5
+ 'pane-center'?: () => any;
6
+ 'pane-right'?: () => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<SplitPaneProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SplitPaneProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
17
+ //# sourceMappingURL=SplitPane.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SplitPane.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SplitPane.vue"],"names":[],"mappings":"AAqZA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AA0B9C,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,MAAM,GAAG,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,CAAA;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,CAAA;CACzB,CAAC;AAuSF,QAAA,MAAM,UAAU,wSAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,18 @@
1
+ declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
2
+ type __VLS_Slots = {} & {
3
+ left?: (props: typeof __VLS_1) => any;
4
+ } & {
5
+ center?: (props: typeof __VLS_3) => any;
6
+ } & {
7
+ right?: (props: typeof __VLS_5) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
18
+ //# sourceMappingURL=SplitToolbar.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SplitToolbar.vue.d.ts","sourceRoot":"","sources":["../../../src/components/SplitToolbar.vue"],"names":[],"mappings":"AAqHA,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC9D,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK7C,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { VerticalNavigationItem } from '../types';
2
+ type __VLS_Props = {
3
+ paneLeftWidth?: number;
4
+ paneLeftVisible?: boolean;
5
+ items?: VerticalNavigationItem[];
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
10
+ //# sourceMappingURL=VerticalNavigation.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerticalNavigation.vue.d.ts","sourceRoot":"","sources":["../../../src/components/VerticalNavigation.vue"],"names":[],"mappings":"AAgQA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAEtD,KAAK,WAAW,GAAG;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAA;CACjC,CAAC;AAwRF,QAAA,MAAM,YAAY,kSAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
@@ -0,0 +1,9 @@
1
+ import { createI18n, i18nTComponent } from '@kong-ui-public/i18n';
2
+ import english from '../locales/en.json';
3
+ interface UseI18nReturn {
4
+ i18n: ReturnType<typeof createI18n<typeof english>>;
5
+ i18nT: ReturnType<typeof i18nTComponent<typeof english>>;
6
+ }
7
+ export default function useI18n(): UseI18nReturn;
8
+ export {};
9
+ //# sourceMappingURL=useI18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/composable/useI18n.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,OAAO,MAAM,oBAAoB,CAAA;AAExC,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;IACnD,KAAK,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,CAAA;CACzD;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,IAAI,aAAa,CAO/C"}
@@ -0,0 +1,17 @@
1
+ import type { useSplitPaneParams } from '../types';
2
+ /**
3
+ * Composable for managing split pane layout with resizable panels
4
+ * @param {useSplitPaneParams} [params]
5
+ * @returns {Object} Object containing pane state and control functions
6
+ */
7
+ export default function useSplitPane(params?: useSplitPaneParams): {
8
+ isDraggingPaneLeft: Readonly<import("vue").Ref<boolean, boolean>>;
9
+ isDraggingInnerPanes: Readonly<import("vue").Ref<boolean, boolean>>;
10
+ startDraggingInnerPanes: (e: MouseEvent) => void;
11
+ refreshInnerPaneSizes: () => void;
12
+ paneLeftExpanded: Readonly<import("vue").Ref<boolean, boolean>>;
13
+ togglePaneLeft: () => Promise<void>;
14
+ startDraggingPaneLeft: (e: MouseEvent) => void;
15
+ centerPaneWidth: import("vue").Ref<number, number>;
16
+ };
17
+ //# sourceMappingURL=useSplitPane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSplitPane.d.ts","sourceRoot":"","sources":["../../../src/composable/useSplitPane.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAgBlD;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,MAAM,CAAC,EAAE,kBAAkB;;;iCAqH1B,UAAU,KAAG,IAAI;iCAjDnB,IAAI;;0BAyJL,OAAO,CAAC,IAAI,CAAC;+BA1DZ,UAAU,KAAG,IAAI;;EA2GpD"}
@@ -0,0 +1,9 @@
1
+ /** Default minimum width for the left pane */
2
+ export declare const PANE_LEFT_MIN_WIDTH = "260px";
3
+ /** Default maximum width for the left pane */
4
+ export declare const PANE_LEFT_MAX_WIDTH = "500px";
5
+ /** Default maximum width for the center pane */
6
+ export declare const PANE_CENTER_DEFAULT_MAX_WIDTH: string;
7
+ /** Default maximum width for the right pane */
8
+ export declare const PANE_RIGHT_DEFAULT_MAX_WIDTH: string;
9
+ //# sourceMappingURL=split-pane.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"split-pane.d.ts","sourceRoot":"","sources":["../../../src/constants/split-pane.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB,UAAU,CAAA;AAC1C,8CAA8C;AAC9C,eAAO,MAAM,mBAAmB,UAAU,CAAA;AAC1C,gDAAgD;AAChD,eAAO,MAAM,6BAA6B,EAAE,MAAc,CAAA;AAC1D,+CAA+C;AAC/C,eAAO,MAAM,4BAA4B,EAAE,MAAc,CAAA"}
@@ -0,0 +1,5 @@
1
+ import SplitPane from './components/SplitPane.vue';
2
+ import SplitToolbar from './components/SplitToolbar.vue';
3
+ export { SplitPane, SplitToolbar, };
4
+ export * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAClD,OAAO,YAAY,MAAM,+BAA+B,CAAA;AAExD,OAAO,EACL,SAAS,EACT,YAAY,GACb,CAAA;AAED,cAAc,SAAS,CAAA"}
@@ -0,0 +1,74 @@
1
+ import type { Component, ShallowRef } from 'vue';
2
+ import type { RouteLocationRaw } from 'vue-router';
3
+ export interface SplitPaneProps {
4
+ /**
5
+ * Should the center and right panels allow for resizing
6
+ * @default true
7
+ */
8
+ resizable?: boolean;
9
+ /**
10
+ * Should the resize handle be hidden
11
+ * @default true
12
+ */
13
+ showResizeHandle?: boolean;
14
+ /**
15
+ * Show the navigation pane
16
+ * @default true
17
+ */
18
+ showNavigation?: boolean;
19
+ /**
20
+ * The items to show in the vertical navigation
21
+ * @default []
22
+ */
23
+ navigationItems?: VerticalNavigationItem[];
24
+ paneLeft?: {
25
+ /** Pass false to hide the pane even if it contains slot content */
26
+ visible?: boolean;
27
+ maxWidth?: string;
28
+ };
29
+ paneCenter?: {
30
+ /** Pass false to hide the pane even if it contains slot content */
31
+ visible?: boolean;
32
+ maxWidth?: string;
33
+ };
34
+ paneRight?: {
35
+ /** Pass false to hide the pane even if it contains slot content */
36
+ visible?: boolean;
37
+ maxWidth?: string;
38
+ };
39
+ }
40
+ export interface VerticalNavigationItem {
41
+ /**
42
+ * The route location to navigate to
43
+ */
44
+ to?: RouteLocationRaw;
45
+ /**
46
+ * The tooltip text to show on hover
47
+ */
48
+ tooltip: string;
49
+ /**
50
+ * Is the item currently active
51
+ */
52
+ active: boolean;
53
+ /**
54
+ * The icon to show for the navigation item
55
+ */
56
+ icon: Component;
57
+ /**
58
+ * The test ID for the navigation item
59
+ */
60
+ testid: string;
61
+ }
62
+ export interface useSplitPaneParams {
63
+ /** The `useTemplateRef()` of the vertical navigation component */
64
+ verticalNavRef?: Readonly<ShallowRef<any | null>>;
65
+ /** The `useTemplateRef()` of the resizable pane's parent element */
66
+ innerPanesContainerRef?: Readonly<ShallowRef<HTMLDivElement | null>>;
67
+ /** The `useTemplateRef()` of the left pane */
68
+ paneLeftRef?: Readonly<ShallowRef<HTMLDivElement | null>>;
69
+ /** The `useTemplateRef()` of the center pane */
70
+ paneCenterRef?: Readonly<ShallowRef<HTMLDivElement | null>>;
71
+ /** The `useTemplateRef()` of the right pane */
72
+ paneRightRef?: Readonly<ShallowRef<HTMLDivElement | null>>;
73
+ }
74
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB;;;OAGG;IACH,eAAe,CAAC,EAAE,sBAAsB,EAAE,CAAA;IAC1C,QAAQ,CAAC,EAAE;QACT,mEAAmE;QACnE,OAAO,CAAC,EAAE,OAAO,CAAA;QAEjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,UAAU,CAAC,EAAE;QACX,mEAAmE;QACnE,OAAO,CAAC,EAAE,OAAO,CAAA;QAEjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;IACD,SAAS,CAAC,EAAE;QACV,mEAAmE;QACnE,OAAO,CAAC,EAAE,OAAO,CAAA;QAEjB,QAAQ,CAAC,EAAE,MAAM,CAAA;KAClB,CAAA;CACF;AAGD,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAA;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,IAAI,EAAE,SAAS,CAAA;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAGD,MAAM,WAAW,kBAAkB;IACjC,kEAAkE;IAClE,cAAc,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC,CAAA;IACjD,oEAAoE;IACpE,sBAAsB,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAA;IACpE,8CAA8C;IAC9C,WAAW,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAA;IACzD,gDAAgD;IAChD,aAAa,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAA;IAC3D,+CAA+C;IAC/C,YAAY,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAAA;CAC3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/split-pane",
3
- "version": "0.5.21-pr.3905.ba97ddd4a.0",
3
+ "version": "0.5.21",
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.3.1",
27
27
  "@kong/kongponents": "9.64.23",
28
- "vue": "^3.5.41"
28
+ "vue": "^3.5.43"
29
29
  },
30
30
  "repository": {
31
31
  "type": "git",