@kong-ui-public/page-layout 1.3.5-pr.3975.d0a3c3c83.0 → 1.3.5
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/page-layout.es.js +808 -0
- package/dist/page-layout.umd.js +1 -0
- package/dist/style.css +1 -0
- package/dist/types/components/AboutCard.vue.d.ts +12 -0
- package/dist/types/components/AboutCard.vue.d.ts.map +1 -0
- package/dist/types/components/PageLayout.vue.d.ts +12 -0
- package/dist/types/components/PageLayout.vue.d.ts.map +1 -0
- package/dist/types/components/PageLayoutAnchorNavigation.vue.d.ts +5 -0
- package/dist/types/components/PageLayoutAnchorNavigation.vue.d.ts.map +1 -0
- package/dist/types/components/PageLayoutTabs.vue.d.ts +21 -0
- package/dist/types/components/PageLayoutTabs.vue.d.ts.map +1 -0
- package/dist/types/composables/index.d.ts +6 -0
- package/dist/types/composables/index.d.ts.map +1 -0
- package/dist/types/composables/useI18n.d.ts +9 -0
- package/dist/types/composables/useI18n.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/symbols.d.ts +7 -0
- package/dist/types/symbols.d.ts.map +1 -0
- package/dist/types/types/about-card.d.ts +44 -0
- package/dist/types/types/about-card.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +5 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/page-layout-anchor-navigation.d.ts +26 -0
- package/dist/types/types/page-layout-anchor-navigation.d.ts.map +1 -0
- package/dist/types/types/page-layout-tabs.d.ts +22 -0
- package/dist/types/types/page-layout-tabs.d.ts.map +1 -0
- package/dist/types/types/page-layout.d.ts +60 -0
- package/dist/types/types/page-layout.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,808 @@
|
|
|
1
|
+
import { onMounted as me, nextTick as pe, shallowRef as ge, shallowReadonly as je, getCurrentScope as Ge, onScopeDispose as Ye, getCurrentInstance as Pe, toValue as ue, computed as T, watch as ve, defineComponent as ye, inject as ce, useTemplateRef as de, ref as W, onBeforeUnmount as Ke, resolveComponent as D, openBlock as c, createElementBlock as f, createElementVNode as _, normalizeClass as G, Fragment as Y, renderList as V, createBlock as N, resolveDynamicComponent as $e, mergeProps as Oe, withKeys as xe, withModifiers as be, withCtx as S, renderSlot as L, createTextVNode as te, toDisplayString as z, createVNode as F, unref as b, createCommentVNode as $, useCssVars as qe, provide as Xe, onUnmounted as Ze, createSlots as Ce, normalizeProps as Je, guardReactiveProps as Qe } from "vue";
|
|
2
|
+
import { useRouter as ze, useRoute as et } from "vue-router";
|
|
3
|
+
import { createI18n as tt, i18nTComponent as at } from "@kong-ui-public/i18n";
|
|
4
|
+
import { ChevronDownIcon as Fe, ChevronRightIcon as ot, ArrowTopLeftIcon as nt, StarFillIcon as it, StarIcon as st, InfoIcon as lt } from "@kong/icons";
|
|
5
|
+
const rt = "Go back", ct = { save_shortcut: "Save page to shortcuts", remove_shortcut: "Remove page from shortcuts" }, ut = { more_button: { label: "More", aria_label: "More tabs" } }, dt = { aria_label: "Page sections", more_button: { aria_label: "More page sections" } }, vt = {
|
|
6
|
+
back_button: rt,
|
|
7
|
+
favorite_button: ct,
|
|
8
|
+
tabs: ut,
|
|
9
|
+
anchor_navigation: dt
|
|
10
|
+
};
|
|
11
|
+
function ht() {
|
|
12
|
+
const e = tt("en-us", vt);
|
|
13
|
+
return {
|
|
14
|
+
i18n: e,
|
|
15
|
+
i18nT: at(e)
|
|
16
|
+
// Translation component <i18n-t>
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const Ie = {
|
|
20
|
+
useI18n: ht
|
|
21
|
+
}, ft = "12px", ae = "16px", pt = "2px", Ee = "16px";
|
|
22
|
+
function gt(e, l) {
|
|
23
|
+
return Ge() ? (Ye(e, l), !0) : !1;
|
|
24
|
+
}
|
|
25
|
+
const bt = typeof window < "u" && typeof document < "u";
|
|
26
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
27
|
+
const Q = () => {
|
|
28
|
+
};
|
|
29
|
+
function mt(e, l) {
|
|
30
|
+
function a(...n) {
|
|
31
|
+
return new Promise((u, v) => {
|
|
32
|
+
Promise.resolve(e(() => l.apply(this, n), {
|
|
33
|
+
fn: l,
|
|
34
|
+
thisArg: this,
|
|
35
|
+
args: n
|
|
36
|
+
})).then(u).catch(v);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return "cancel" in e && Object.assign(a, {
|
|
40
|
+
cancel: e.cancel,
|
|
41
|
+
flush: e.flush,
|
|
42
|
+
isPending: e.isPending
|
|
43
|
+
}), a;
|
|
44
|
+
}
|
|
45
|
+
function yt(e, l = {}) {
|
|
46
|
+
let a, n, u = Q, v = Q;
|
|
47
|
+
const d = ge(!1), o = (g) => {
|
|
48
|
+
clearTimeout(g), u(), u = Q;
|
|
49
|
+
};
|
|
50
|
+
let y;
|
|
51
|
+
return Object.assign((g) => {
|
|
52
|
+
const s = ue(e), p = ue(l.maxWait);
|
|
53
|
+
return a && o(a), s <= 0 || p !== void 0 && p <= 0 ? (n && (o(n), n = void 0), d.value = !1, Promise.resolve(g())) : (d.value = !0, new Promise((m, h) => {
|
|
54
|
+
u = l.rejectOnCancel ? h : m, v = m, y = g, p && !n && (n = setTimeout(() => {
|
|
55
|
+
a && o(a), n = void 0, d.value = !1, m(y());
|
|
56
|
+
}, p)), a = setTimeout(() => {
|
|
57
|
+
n && o(n), n = void 0, d.value = !1, m(g());
|
|
58
|
+
}, s);
|
|
59
|
+
}));
|
|
60
|
+
}, {
|
|
61
|
+
cancel: () => {
|
|
62
|
+
a && (o(a), a = void 0), n && (o(n), n = void 0), d.value = !1, v = Q;
|
|
63
|
+
},
|
|
64
|
+
flush: () => {
|
|
65
|
+
if (d.value) {
|
|
66
|
+
a && (clearTimeout(a), a = void 0), n && (clearTimeout(n), n = void 0), d.value = !1;
|
|
67
|
+
const g = v;
|
|
68
|
+
u = Q, v = Q, g(y());
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
isPending: je(d)
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function wt(e) {
|
|
75
|
+
return Array.isArray(e) ? e : [e];
|
|
76
|
+
}
|
|
77
|
+
function kt(e) {
|
|
78
|
+
return Pe();
|
|
79
|
+
}
|
|
80
|
+
function Tt(e, l = 200, a = {}) {
|
|
81
|
+
return mt(yt(l, a), e);
|
|
82
|
+
}
|
|
83
|
+
function _t(e, l = !0, a) {
|
|
84
|
+
kt() ? me(e, a) : l ? e() : pe(e);
|
|
85
|
+
}
|
|
86
|
+
const He = bt ? window : void 0;
|
|
87
|
+
function ee(e) {
|
|
88
|
+
var l;
|
|
89
|
+
const a = ue(e);
|
|
90
|
+
return (l = a?.$el) !== null && l !== void 0 ? l : a;
|
|
91
|
+
}
|
|
92
|
+
// @__NO_SIDE_EFFECTS__
|
|
93
|
+
function $t() {
|
|
94
|
+
const e = ge(!1), l = Pe();
|
|
95
|
+
return l && me(() => {
|
|
96
|
+
e.value = !0;
|
|
97
|
+
}, l), e;
|
|
98
|
+
}
|
|
99
|
+
// @__NO_SIDE_EFFECTS__
|
|
100
|
+
function Ct(e) {
|
|
101
|
+
const l = /* @__PURE__ */ $t();
|
|
102
|
+
return T(() => (l.value, !!e()));
|
|
103
|
+
}
|
|
104
|
+
function Ae(e, l, a = {}) {
|
|
105
|
+
const { window: n = He, ...u } = a;
|
|
106
|
+
let v;
|
|
107
|
+
const d = /* @__PURE__ */ Ct(() => n && "ResizeObserver" in n), o = () => {
|
|
108
|
+
v && (v.disconnect(), v = void 0);
|
|
109
|
+
}, y = ve(T(() => {
|
|
110
|
+
const g = ue(e);
|
|
111
|
+
return Array.isArray(g) ? g.map((s) => ee(s)) : [ee(g)];
|
|
112
|
+
}), (g) => {
|
|
113
|
+
if (o(), d.value && n) {
|
|
114
|
+
v = new ResizeObserver(l);
|
|
115
|
+
for (const s of g) s && v.observe(s, u);
|
|
116
|
+
}
|
|
117
|
+
}, {
|
|
118
|
+
immediate: !0,
|
|
119
|
+
flush: "post"
|
|
120
|
+
}), w = () => {
|
|
121
|
+
o(), y();
|
|
122
|
+
};
|
|
123
|
+
return gt(w), {
|
|
124
|
+
isSupported: d,
|
|
125
|
+
stop: w
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function It(e, l = {
|
|
129
|
+
width: 0,
|
|
130
|
+
height: 0
|
|
131
|
+
}, a = {}) {
|
|
132
|
+
const { window: n = He, box: u = "content-box" } = a, v = T(() => {
|
|
133
|
+
var s;
|
|
134
|
+
return (s = ee(e)) === null || s === void 0 || (s = s.namespaceURI) === null || s === void 0 ? void 0 : s.includes("svg");
|
|
135
|
+
}), d = ge(l.width), o = ge(l.height), { stop: y } = Ae(e, ([s]) => {
|
|
136
|
+
const p = u === "border-box" ? s.borderBoxSize : u === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
137
|
+
if (n && v.value) {
|
|
138
|
+
const m = ee(e);
|
|
139
|
+
if (m) {
|
|
140
|
+
const h = m.getBoundingClientRect();
|
|
141
|
+
d.value = h.width, o.value = h.height;
|
|
142
|
+
}
|
|
143
|
+
} else if (p) {
|
|
144
|
+
const m = wt(p);
|
|
145
|
+
d.value = m.reduce((h, { inlineSize: R }) => h + R, 0), o.value = m.reduce((h, { blockSize: R }) => h + R, 0);
|
|
146
|
+
} else
|
|
147
|
+
d.value = s.contentRect.width, o.value = s.contentRect.height;
|
|
148
|
+
}, a);
|
|
149
|
+
_t(() => {
|
|
150
|
+
const s = ee(e);
|
|
151
|
+
if (s && "offsetWidth" in s) if (u === "content-box" && n) {
|
|
152
|
+
const p = n.getComputedStyle(s), m = Number.parseFloat(p.paddingLeft) + Number.parseFloat(p.paddingRight), h = Number.parseFloat(p.paddingTop) + Number.parseFloat(p.paddingBottom), R = Number.parseFloat(p.borderLeftWidth) + Number.parseFloat(p.borderRightWidth), B = Number.parseFloat(p.borderTopWidth) + Number.parseFloat(p.borderBottomWidth);
|
|
153
|
+
d.value = s.offsetWidth - m - R, o.value = s.offsetHeight - h - B;
|
|
154
|
+
} else
|
|
155
|
+
d.value = s.offsetWidth, o.value = s.offsetHeight;
|
|
156
|
+
else s && (d.value = l.width, o.value = l.height);
|
|
157
|
+
});
|
|
158
|
+
const w = ve(() => ee(e), (s) => {
|
|
159
|
+
d.value = s ? l.width : 0, o.value = s ? l.height : 0;
|
|
160
|
+
});
|
|
161
|
+
function g() {
|
|
162
|
+
y(), w();
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
width: d,
|
|
166
|
+
height: o,
|
|
167
|
+
stop: g
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
const Et = {
|
|
171
|
+
ref: "page-layout-tabs",
|
|
172
|
+
class: "page-layout-tabs",
|
|
173
|
+
"data-testid": "page-layout-tabs"
|
|
174
|
+
}, At = { key: 0 }, St = ["aria-label"], Rt = {
|
|
175
|
+
key: 0,
|
|
176
|
+
class: "layout-loader-container"
|
|
177
|
+
}, Lt = /* @__PURE__ */ ye({
|
|
178
|
+
__name: "PageLayoutTabs",
|
|
179
|
+
props: {
|
|
180
|
+
tabs: { default: () => [] }
|
|
181
|
+
},
|
|
182
|
+
setup(e) {
|
|
183
|
+
const { i18n: { t: l } } = Ie.useI18n(), a = ze(), n = ce("app:navigateTo", null), u = (h) => {
|
|
184
|
+
if (typeof h.to != "string") {
|
|
185
|
+
a.push(h.to);
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
if (typeof n != "function") {
|
|
189
|
+
window.location.href = h.to;
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
n(h.to);
|
|
193
|
+
}, v = de("page-layout-tabs"), d = de("page-layout-tabs-list"), o = W(e.tabs.length), y = W(!1), w = T(() => e.tabs.slice(0, o.value)), g = T(() => e.tabs.slice(o.value)), s = async () => {
|
|
194
|
+
if (!v.value || !d.value)
|
|
195
|
+
return;
|
|
196
|
+
y.value = !1, o.value = e.tabs.length, await pe();
|
|
197
|
+
const h = v.value?.getBoundingClientRect().width - parseInt(Ee) * 2;
|
|
198
|
+
let R = d.value?.getBoundingClientRect().width;
|
|
199
|
+
if (!h || !R) {
|
|
200
|
+
y.value = !0;
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
const B = 50;
|
|
204
|
+
for (; R + B > h && o.value > 1; )
|
|
205
|
+
o.value--, await pe(), R = d.value?.getBoundingClientRect().width || 0;
|
|
206
|
+
y.value = !0;
|
|
207
|
+
};
|
|
208
|
+
let p = null;
|
|
209
|
+
const m = () => {
|
|
210
|
+
p && clearTimeout(p), p = setTimeout(() => {
|
|
211
|
+
s();
|
|
212
|
+
}, 150);
|
|
213
|
+
};
|
|
214
|
+
return me(() => {
|
|
215
|
+
s(), Ae(v, m);
|
|
216
|
+
}), Ke(() => {
|
|
217
|
+
p && clearTimeout(p);
|
|
218
|
+
}), ve(() => e.tabs, () => {
|
|
219
|
+
s();
|
|
220
|
+
}, { deep: !0 }), (h, R) => {
|
|
221
|
+
const B = D("KDropdownItem"), H = D("KDropdown"), q = D("KSkeletonBox");
|
|
222
|
+
return c(), f("nav", Et, [
|
|
223
|
+
_("ul", {
|
|
224
|
+
ref: "page-layout-tabs-list",
|
|
225
|
+
class: G({ "layout-computing": !y.value })
|
|
226
|
+
}, [
|
|
227
|
+
(c(!0), f(Y, null, V(w.value, (r) => (c(), f("li", {
|
|
228
|
+
key: `${r.key}-tab`
|
|
229
|
+
}, [
|
|
230
|
+
(c(), N($e(typeof r.to == "string" ? "a" : "router-link"), Oe({ ref_for: !0 }, typeof r.to == "string" ? { href: r.to } : { to: r.to }, {
|
|
231
|
+
"aria-current": r.active ? "page" : void 0,
|
|
232
|
+
class: ["tab-link", { active: r.active }],
|
|
233
|
+
"data-testid": r.dataTestId ? r.dataTestId : `page-layout-tab-${r.key}`,
|
|
234
|
+
tabindex: "0",
|
|
235
|
+
onClick: be((P) => u(r), ["prevent"]),
|
|
236
|
+
onKeydown: xe(be((P) => u(r), ["prevent"]), ["enter"])
|
|
237
|
+
}), {
|
|
238
|
+
default: S(() => [
|
|
239
|
+
L(h.$slots, `tab-${r.key}`, { tab: r }, () => [
|
|
240
|
+
te(z(r.label), 1)
|
|
241
|
+
], !0)
|
|
242
|
+
]),
|
|
243
|
+
_: 2
|
|
244
|
+
}, 1040, ["aria-current", "class", "data-testid", "onClick", "onKeydown"]))
|
|
245
|
+
]))), 128)),
|
|
246
|
+
e.tabs.length > o.value ? (c(), f("li", At, [
|
|
247
|
+
F(H, { "kpop-attributes": {
|
|
248
|
+
placement: "bottom-end",
|
|
249
|
+
popoverElementAttributes: { "data-testid": "tabs-overflow-dropdown-popover" }
|
|
250
|
+
} }, {
|
|
251
|
+
items: S(() => [
|
|
252
|
+
(c(!0), f(Y, null, V(g.value, (r) => (c(), N(B, {
|
|
253
|
+
key: `${r.key}-dropdown-item`,
|
|
254
|
+
"aria-current": r.active ? "page" : void 0,
|
|
255
|
+
"data-testid": r.dataTestId ? r.dataTestId : `page-layout-tab-${r.key}`,
|
|
256
|
+
item: {
|
|
257
|
+
label: r.label,
|
|
258
|
+
value: r.key,
|
|
259
|
+
to: r.to
|
|
260
|
+
},
|
|
261
|
+
selected: r.active
|
|
262
|
+
}, {
|
|
263
|
+
default: S(() => [
|
|
264
|
+
L(h.$slots, `tab-${r.key}`, { tab: r }, () => [
|
|
265
|
+
te(z(r.label), 1)
|
|
266
|
+
], !0)
|
|
267
|
+
]),
|
|
268
|
+
_: 2
|
|
269
|
+
}, 1032, ["aria-current", "data-testid", "item", "selected"]))), 128))
|
|
270
|
+
]),
|
|
271
|
+
default: S(() => [
|
|
272
|
+
_("button", {
|
|
273
|
+
"aria-label": b(l)("tabs.more_button.aria_label"),
|
|
274
|
+
class: G(["tab-link", { active: g.value.find((r) => r.active) }]),
|
|
275
|
+
"data-testid": "tabs-overflow-dropdown-button"
|
|
276
|
+
}, [
|
|
277
|
+
te(z(b(l)("tabs.more_button.label")) + " ", 1),
|
|
278
|
+
F(b(Fe), {
|
|
279
|
+
decorative: "",
|
|
280
|
+
size: `var(--kui-icon-size-30, ${b(ae)})`
|
|
281
|
+
}, null, 8, ["size"])
|
|
282
|
+
], 10, St)
|
|
283
|
+
]),
|
|
284
|
+
_: 3
|
|
285
|
+
})
|
|
286
|
+
])) : $("", !0)
|
|
287
|
+
], 2),
|
|
288
|
+
y.value ? $("", !0) : (c(), f("div", Rt, [
|
|
289
|
+
(c(), f(Y, null, V(3, (r) => F(q, {
|
|
290
|
+
key: `layout-loader-${r}`,
|
|
291
|
+
height: "1",
|
|
292
|
+
width: "5"
|
|
293
|
+
})), 64))
|
|
294
|
+
]))
|
|
295
|
+
], 512);
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}), we = (e, l) => {
|
|
299
|
+
const a = e.__vccOpts || e;
|
|
300
|
+
for (const [n, u] of l)
|
|
301
|
+
a[n] = u;
|
|
302
|
+
return a;
|
|
303
|
+
}, Nt = /* @__PURE__ */ we(Lt, [["__scopeId", "data-v-02891bc1"]]), Dt = ["aria-label", "data-fit"], Bt = {
|
|
304
|
+
key: 0,
|
|
305
|
+
"aria-hidden": "true",
|
|
306
|
+
class: "anchor-ellipsis",
|
|
307
|
+
"data-testid": "anchor-navigation-leading-ellipsis"
|
|
308
|
+
}, Pt = ["aria-current", "data-testid", "title", "onClick"], Kt = {
|
|
309
|
+
key: 1,
|
|
310
|
+
"aria-hidden": "true",
|
|
311
|
+
class: "anchor-ellipsis",
|
|
312
|
+
"data-testid": "anchor-navigation-trailing-ellipsis"
|
|
313
|
+
}, Ot = { key: 2 }, Ne = 140, De = 22, _e = 16, re = "data-anchor-attention", xt = 1200, zt = 1600, Ft = /* @__PURE__ */ ye({
|
|
314
|
+
__name: "PageLayoutAnchorNavigation",
|
|
315
|
+
props: {
|
|
316
|
+
anchors: { default: () => [] }
|
|
317
|
+
},
|
|
318
|
+
setup(e) {
|
|
319
|
+
const { i18n: { t: l } } = Ie.useI18n(), a = de("page-layout-anchor-navigation"), n = de("page-layout-anchor-navigation-list"), u = W("all"), v = W(""), d = W([]), o = T(() => e.anchors.filter((t) => d.value.includes(t.id))), y = T(() => {
|
|
320
|
+
const t = o.value.findIndex((i) => i.id === v.value);
|
|
321
|
+
return t === -1 ? 0 : t;
|
|
322
|
+
}), w = T(() => {
|
|
323
|
+
const t = o.value, i = t.length, k = y.value;
|
|
324
|
+
if (u.value === "all")
|
|
325
|
+
return { anchors: t, hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !1 };
|
|
326
|
+
if (u.value === "hidden")
|
|
327
|
+
return { anchors: [], hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !1 };
|
|
328
|
+
if (u.value === "active-only")
|
|
329
|
+
return { anchors: t.slice(k, k + 1), hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !0 };
|
|
330
|
+
const E = u.value === "window-3" ? 3 : 2;
|
|
331
|
+
if (i <= E)
|
|
332
|
+
return { anchors: t, hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !0 };
|
|
333
|
+
const O = k < E ? 0 : k >= i - E ? i - E : k - 1;
|
|
334
|
+
return {
|
|
335
|
+
anchors: t.slice(O, O + E),
|
|
336
|
+
hasLeadingEllipsis: O > 0,
|
|
337
|
+
hasTrailingEllipsis: O + E < i,
|
|
338
|
+
hasOverflowDropdown: !0
|
|
339
|
+
};
|
|
340
|
+
}), g = (t) => t.dataTestId ?? `page-layout-anchor-${t.id.replace(/[^\w-]+/g, "-").replace(/^-+|-+$/g, "")}`, s = W(null), p = () => {
|
|
341
|
+
let t = a.value?.parentElement ?? null;
|
|
342
|
+
for (; t; ) {
|
|
343
|
+
const { overflowY: i } = getComputedStyle(t);
|
|
344
|
+
if (i === "auto" || i === "scroll" || i === "overlay")
|
|
345
|
+
return t;
|
|
346
|
+
t = t.parentElement;
|
|
347
|
+
}
|
|
348
|
+
return null;
|
|
349
|
+
}, m = (t) => {
|
|
350
|
+
if (t.element)
|
|
351
|
+
return t.element.isConnected ? t.element : null;
|
|
352
|
+
const i = s.value ?? document;
|
|
353
|
+
try {
|
|
354
|
+
return i.querySelector(t.id) ?? i.querySelector(`#${CSS.escape(t.id)}`);
|
|
355
|
+
} catch {
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
358
|
+
}, h = () => (a.value?.closest(".page-layout-header")?.getBoundingClientRect().height ?? 0) + parseInt(Ee, 10), R = parseInt(ae, 10), B = parseInt(pt, 10), H = (t) => t * Ne + 2 * R + De + (t + 2) * B + _e, q = () => Ne + De + B + _e;
|
|
359
|
+
let r = 0;
|
|
360
|
+
const P = async () => {
|
|
361
|
+
if (!o.value.length) {
|
|
362
|
+
u.value = "hidden";
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
const t = ++r;
|
|
366
|
+
if (u.value = "all", await pe(), t !== r || !a.value || !n.value)
|
|
367
|
+
return;
|
|
368
|
+
const i = a.value.getBoundingClientRect().width, k = n.value.getBoundingClientRect().width;
|
|
369
|
+
i <= 0 || k <= 0 || k + _e <= i || (H(3) <= i ? u.value = "window-3" : H(2) <= i ? u.value = "window-2" : q() <= i ? u.value = "active-only" : u.value = "hidden");
|
|
370
|
+
};
|
|
371
|
+
let M = null;
|
|
372
|
+
Ae(a, () => {
|
|
373
|
+
M && clearTimeout(M), M = setTimeout(() => {
|
|
374
|
+
le(), P();
|
|
375
|
+
}, 150);
|
|
376
|
+
});
|
|
377
|
+
let oe = null, X = null, I = 0, ne = 0, Z = null, ie = null;
|
|
378
|
+
const he = (t) => {
|
|
379
|
+
const i = String(++I);
|
|
380
|
+
se(), ie = t, t.removeAttribute(re), ne = requestAnimationFrame(() => {
|
|
381
|
+
t.setAttribute(re, i), Z = setTimeout(() => {
|
|
382
|
+
t.getAttribute(re) === i && t.removeAttribute(re);
|
|
383
|
+
}, xt);
|
|
384
|
+
});
|
|
385
|
+
}, se = () => {
|
|
386
|
+
cancelAnimationFrame(ne), Z && (clearTimeout(Z), Z = null), ie?.removeAttribute(re), ie = null;
|
|
387
|
+
}, U = () => s.value ?? window, We = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "]), K = (t) => {
|
|
388
|
+
if (t instanceof KeyboardEvent && !We.has(t.key))
|
|
389
|
+
return;
|
|
390
|
+
t && t.type !== "scrollend" && I++, oe = null, X && (clearTimeout(X), X = null);
|
|
391
|
+
const i = U();
|
|
392
|
+
i.removeEventListener("scrollend", K), i.removeEventListener("wheel", K), i.removeEventListener("touchstart", K), i.removeEventListener("keydown", K);
|
|
393
|
+
}, Me = (t) => {
|
|
394
|
+
K(), oe = t;
|
|
395
|
+
const i = U();
|
|
396
|
+
i.addEventListener("scrollend", K, { once: !0 }), i.addEventListener("wheel", K, { passive: !0 }), i.addEventListener("touchstart", K, { passive: !0 }), i.addEventListener("keydown", K, { passive: !0 }), X = setTimeout(K, 1e3);
|
|
397
|
+
}, Se = () => {
|
|
398
|
+
const t = s.value;
|
|
399
|
+
return {
|
|
400
|
+
top: t ? t.getBoundingClientRect().top : 0,
|
|
401
|
+
scrollTop: t ? t.scrollTop : window.scrollY,
|
|
402
|
+
clientHeight: t ? t.clientHeight : window.innerHeight,
|
|
403
|
+
scrollHeight: t ? t.scrollHeight : document.documentElement.scrollHeight
|
|
404
|
+
};
|
|
405
|
+
}, le = () => {
|
|
406
|
+
const { top: t, scrollTop: i, clientHeight: k, scrollHeight: E } = Se(), O = h(), A = [];
|
|
407
|
+
let C = null, j = null;
|
|
408
|
+
for (const x of e.anchors) {
|
|
409
|
+
const J = m(x);
|
|
410
|
+
J && (A.push(x.id), j = x.id, C ??= x.id, J.getBoundingClientRect().top - t <= (x.offset ?? O) + 8 && (C = x.id));
|
|
411
|
+
}
|
|
412
|
+
const fe = A.length !== d.value.length || A.some((x, J) => x !== d.value[J]);
|
|
413
|
+
return fe && (d.value = A), oe || (j && i > 0 && i + k >= E - 2 && (C = j), v.value = C ?? ""), fe;
|
|
414
|
+
};
|
|
415
|
+
let Te = !1;
|
|
416
|
+
const Re = () => {
|
|
417
|
+
Te || (Te = !0, requestAnimationFrame(() => {
|
|
418
|
+
Te = !1, le() && P();
|
|
419
|
+
}));
|
|
420
|
+
}, Ve = (t) => {
|
|
421
|
+
const i = U();
|
|
422
|
+
let k = !1;
|
|
423
|
+
const E = () => {
|
|
424
|
+
k || (k = !0, i.removeEventListener("scrollend", E), t());
|
|
425
|
+
};
|
|
426
|
+
i.addEventListener("scrollend", E, { once: !0 }), window.setTimeout(E, zt);
|
|
427
|
+
}, Le = (t) => {
|
|
428
|
+
const i = m(t);
|
|
429
|
+
if (!i)
|
|
430
|
+
return;
|
|
431
|
+
v.value = t.id, Me(t.id);
|
|
432
|
+
const k = t.offset ?? h(), { scrollTop: E, clientHeight: O, scrollHeight: A } = Se(), C = s.value, j = C ? i.getBoundingClientRect().top - C.getBoundingClientRect().top + C.scrollTop - k : i.getBoundingClientRect().top + window.scrollY - k, fe = Math.min(Math.max(j, 0), Math.max(A - O, 0)), x = Math.abs(fe - E) >= 2, J = ++I;
|
|
433
|
+
if ((C ?? window).scrollTo({ behavior: "smooth", top: j }), !x) {
|
|
434
|
+
he(i);
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
Ve(() => {
|
|
438
|
+
J === I && he(i);
|
|
439
|
+
});
|
|
440
|
+
}, Ue = (t, i) => {
|
|
441
|
+
i(), Le(t);
|
|
442
|
+
};
|
|
443
|
+
return me(() => {
|
|
444
|
+
s.value = p(), U().addEventListener("scroll", Re, { passive: !0 }), le(), P(), requestAnimationFrame(() => {
|
|
445
|
+
le(), P();
|
|
446
|
+
});
|
|
447
|
+
}), Ke(() => {
|
|
448
|
+
U().removeEventListener("scroll", Re), K(), I++, se(), M && clearTimeout(M);
|
|
449
|
+
}), ve(() => e.anchors, () => {
|
|
450
|
+
e.anchors.some((t) => t.id === v.value) || (v.value = ""), le(), P();
|
|
451
|
+
}, { deep: !0 }), (t, i) => {
|
|
452
|
+
const k = D("KButton"), E = D("KDropdownItem"), O = D("KDropdown");
|
|
453
|
+
return c(), f("nav", {
|
|
454
|
+
ref: "page-layout-anchor-navigation",
|
|
455
|
+
"aria-label": b(l)("anchor_navigation.aria_label"),
|
|
456
|
+
class: "page-layout-anchor-navigation",
|
|
457
|
+
"data-fit": u.value,
|
|
458
|
+
"data-testid": "page-layout-anchor-navigation"
|
|
459
|
+
}, [
|
|
460
|
+
_("ul", {
|
|
461
|
+
ref: "page-layout-anchor-navigation-list",
|
|
462
|
+
class: G({ "layout-hidden": u.value === "hidden" })
|
|
463
|
+
}, [
|
|
464
|
+
w.value.hasLeadingEllipsis ? (c(), f("li", Bt, " … ")) : $("", !0),
|
|
465
|
+
(c(!0), f(Y, null, V(w.value.anchors, (A) => (c(), f("li", {
|
|
466
|
+
key: `${A.id}-anchor`
|
|
467
|
+
}, [
|
|
468
|
+
_("button", {
|
|
469
|
+
"aria-current": A.id === v.value ? "location" : void 0,
|
|
470
|
+
class: G(["anchor-link", { active: A.id === v.value }]),
|
|
471
|
+
"data-testid": g(A),
|
|
472
|
+
title: A.label,
|
|
473
|
+
type: "button",
|
|
474
|
+
onClick: (C) => Le(A)
|
|
475
|
+
}, z(A.label), 11, Pt)
|
|
476
|
+
]))), 128)),
|
|
477
|
+
w.value.hasTrailingEllipsis ? (c(), f("li", Kt, " … ")) : $("", !0),
|
|
478
|
+
w.value.hasOverflowDropdown ? (c(), f("li", Ot, [
|
|
479
|
+
F(O, { "kpop-attributes": {
|
|
480
|
+
placement: "bottom-end",
|
|
481
|
+
popoverElementAttributes: { "data-testid": "anchor-navigation-overflow-dropdown-popover" }
|
|
482
|
+
} }, {
|
|
483
|
+
items: S(({ closeDropdown: A }) => [
|
|
484
|
+
(c(!0), f(Y, null, V(o.value, (C) => (c(), N(E, {
|
|
485
|
+
key: `${C.id}-dropdown-item`,
|
|
486
|
+
"aria-current": C.id === v.value ? "location" : void 0,
|
|
487
|
+
"data-testid": g(C),
|
|
488
|
+
selected: C.id === v.value,
|
|
489
|
+
onClick: (j) => Ue(C, A)
|
|
490
|
+
}, {
|
|
491
|
+
default: S(() => [
|
|
492
|
+
te(z(C.label), 1)
|
|
493
|
+
]),
|
|
494
|
+
_: 2
|
|
495
|
+
}, 1032, ["aria-current", "data-testid", "selected", "onClick"]))), 128))
|
|
496
|
+
]),
|
|
497
|
+
default: S(() => [
|
|
498
|
+
F(k, {
|
|
499
|
+
appearance: "tertiary",
|
|
500
|
+
"aria-label": b(l)("anchor_navigation.more_button.aria_label"),
|
|
501
|
+
class: "anchor-overflow-button",
|
|
502
|
+
"data-testid": "anchor-navigation-overflow-dropdown-button",
|
|
503
|
+
icon: "",
|
|
504
|
+
size: "small"
|
|
505
|
+
}, {
|
|
506
|
+
default: S(() => [
|
|
507
|
+
F(b(Fe), {
|
|
508
|
+
decorative: "",
|
|
509
|
+
size: `var(--kui-icon-size-30, ${b(ae)})`
|
|
510
|
+
}, null, 8, ["size"])
|
|
511
|
+
]),
|
|
512
|
+
_: 1
|
|
513
|
+
}, 8, ["aria-label"])
|
|
514
|
+
]),
|
|
515
|
+
_: 1
|
|
516
|
+
})
|
|
517
|
+
])) : $("", !0)
|
|
518
|
+
], 2)
|
|
519
|
+
], 8, Dt);
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
}), Ht = /* @__PURE__ */ we(Ft, [["__scopeId", "data-v-f6d370c5"]]), Be = /* @__PURE__ */ Symbol("nested-page-layout-detection"), Wt = "page-layout:new-appearance", Mt = {
|
|
523
|
+
key: 0,
|
|
524
|
+
ref: "page-layout-header",
|
|
525
|
+
class: "page-layout-header",
|
|
526
|
+
"data-testid": "page-layout-header"
|
|
527
|
+
}, Vt = { class: "page-header-container" }, Ut = { class: "page-header-start" }, jt = { class: "title-container" }, Gt = {
|
|
528
|
+
key: 1,
|
|
529
|
+
class: "page-layout-title-wrapper"
|
|
530
|
+
}, Yt = {
|
|
531
|
+
class: "page-layout-title",
|
|
532
|
+
"data-testid": "page-layout-title"
|
|
533
|
+
}, qt = ["aria-label"], Xt = {
|
|
534
|
+
key: 3,
|
|
535
|
+
class: "title-after-container"
|
|
536
|
+
}, Zt = { class: "page-header-actions-container" }, Jt = {
|
|
537
|
+
key: 0,
|
|
538
|
+
class: "page-layout-aside-container",
|
|
539
|
+
"data-testid": "page-layout-aside"
|
|
540
|
+
}, Qt = { class: "page-layout-content" }, ea = /* @__PURE__ */ ye({
|
|
541
|
+
__name: "PageLayout",
|
|
542
|
+
props: {
|
|
543
|
+
breadcrumbs: { default: () => [] },
|
|
544
|
+
title: {},
|
|
545
|
+
backTo: {},
|
|
546
|
+
tabs: { default: () => [] },
|
|
547
|
+
anchors: { default: () => [] },
|
|
548
|
+
pageShortcutData: {}
|
|
549
|
+
},
|
|
550
|
+
setup(e) {
|
|
551
|
+
qe((I) => ({
|
|
552
|
+
v3ea7775c: m.value
|
|
553
|
+
}));
|
|
554
|
+
const l = ce("app:navigateTo", null), a = ce(Wt, null), n = ce("app:pageShortcutsContext", null), { i18n: { t: u } } = Ie.useI18n(), v = ze(), d = et(), o = T(() => !!(e.tabs && e.tabs.length)), y = T(() => typeof e.backTo == "string"), w = T(() => ue(a) === !0), g = T(() => w.value && !o.value && !!(e.anchors && e.anchors.length)), s = de("page-layout-header"), { height: p } = It(s, void 0, { box: "border-box" }), m = T(() => `calc(${p.value}px + var(--kui-space-60, ${Ee}))`), h = T(() => !!e.pageShortcutData && !!e.pageShortcutData.entityType && !!e.pageShortcutData.label), R = T(() => h.value && !!n && "onFavoriteToggle" in n && typeof n.onFavoriteToggle == "function"), B = W(0), H = T(() => !!n && "isFavorite" in n && typeof n.isFavorite == "function" && n.isFavorite(e.pageShortcutData) === !0), q = async () => {
|
|
555
|
+
if (e.backTo) {
|
|
556
|
+
if (typeof e.backTo == "object") {
|
|
557
|
+
v.push(e.backTo);
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
if (typeof l != "function") {
|
|
561
|
+
window.location.href = e.backTo;
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
await l(e.backTo);
|
|
565
|
+
}
|
|
566
|
+
}, r = W(0), P = T(() => r.value > 0);
|
|
567
|
+
Xe(Be, () => (r.value++, () => {
|
|
568
|
+
r.value--;
|
|
569
|
+
}));
|
|
570
|
+
const M = ce(Be, null), ke = W(null);
|
|
571
|
+
typeof M == "function" && (ke.value = M());
|
|
572
|
+
const oe = () => {
|
|
573
|
+
n.onFavoriteToggle({ ...e.pageShortcutData, path: e.pageShortcutData?.path || d.fullPath });
|
|
574
|
+
};
|
|
575
|
+
Ze(() => {
|
|
576
|
+
ke.value?.();
|
|
577
|
+
});
|
|
578
|
+
const X = Tt(() => {
|
|
579
|
+
!P.value && h.value && n && "onEntityPageVisit" in n && typeof n.onEntityPageVisit == "function" && (n.onEntityPageVisit({ ...e.pageShortcutData, path: e.pageShortcutData?.path || d?.fullPath }), B.value++);
|
|
580
|
+
}, 500);
|
|
581
|
+
return ve([() => e.pageShortcutData, () => d?.fullPath], () => {
|
|
582
|
+
X();
|
|
583
|
+
}, { immediate: !0, deep: !0 }), (I, ne) => {
|
|
584
|
+
const Z = D("KBreadcrumbs"), ie = D("KTooltip"), he = D("router-view");
|
|
585
|
+
return c(), f("div", {
|
|
586
|
+
class: G(["kong-ui-public-page-layout", { "new-appearance": w.value }]),
|
|
587
|
+
"data-testid": "kong-ui-public-page-layout"
|
|
588
|
+
}, [
|
|
589
|
+
P.value ? $("", !0) : (c(), f("div", Mt, [
|
|
590
|
+
_("div", Vt, [
|
|
591
|
+
_("div", Ut, [
|
|
592
|
+
e.breadcrumbs && e.breadcrumbs.length ? (c(), N(Z, {
|
|
593
|
+
key: 0,
|
|
594
|
+
class: "header-breadcrumbs",
|
|
595
|
+
"data-testid": "page-layout-breadcrumbs",
|
|
596
|
+
"item-max-width": "25ch",
|
|
597
|
+
items: e.breadcrumbs
|
|
598
|
+
}, Ce({ _: 2 }, [
|
|
599
|
+
w.value ? {
|
|
600
|
+
name: "divider",
|
|
601
|
+
fn: S(() => [
|
|
602
|
+
F(b(ot), {
|
|
603
|
+
decorative: "",
|
|
604
|
+
size: `var(--kui-icon-size-30, ${b(ae)})`
|
|
605
|
+
}, null, 8, ["size"])
|
|
606
|
+
]),
|
|
607
|
+
key: "0"
|
|
608
|
+
} : void 0
|
|
609
|
+
]), 1032, ["items"])) : $("", !0),
|
|
610
|
+
_("div", jt, [
|
|
611
|
+
e.backTo && !w.value ? (c(), N($e(y.value ? "a" : "router-link"), Oe({ key: 0 }, y.value ? { href: e.backTo } : { to: e.backTo }, {
|
|
612
|
+
"aria-label": b(u)("back_button"),
|
|
613
|
+
class: "navigate-back",
|
|
614
|
+
"data-testid": "page-layout-navigate-back",
|
|
615
|
+
tabindex: "0",
|
|
616
|
+
onClick: be(q, ["prevent"]),
|
|
617
|
+
onKeydown: xe(be(q, ["prevent"]), ["enter"])
|
|
618
|
+
}), {
|
|
619
|
+
default: S(() => [
|
|
620
|
+
F(b(nt), {
|
|
621
|
+
decorative: "",
|
|
622
|
+
size: `var(--kui-icon-size-30, ${b(ae)})`
|
|
623
|
+
}, null, 8, ["size"])
|
|
624
|
+
]),
|
|
625
|
+
_: 1
|
|
626
|
+
}, 16, ["aria-label", "onKeydown"])) : $("", !0),
|
|
627
|
+
e.title || I.$slots.title ? (c(), f("span", Gt, [
|
|
628
|
+
L(I.$slots, "title", {}, () => [
|
|
629
|
+
_("h1", Yt, z(e.title), 1)
|
|
630
|
+
], !0)
|
|
631
|
+
])) : $("", !0),
|
|
632
|
+
R.value ? (c(), f("div", {
|
|
633
|
+
key: B.value,
|
|
634
|
+
class: "favorite-button-container"
|
|
635
|
+
}, [
|
|
636
|
+
F(ie, {
|
|
637
|
+
placement: "right",
|
|
638
|
+
text: H.value ? b(u)("favorite_button.remove_shortcut") : b(u)("favorite_button.save_shortcut")
|
|
639
|
+
}, {
|
|
640
|
+
default: S(() => [
|
|
641
|
+
_("button", {
|
|
642
|
+
"aria-label": H.value ? b(u)("favorite_button.remove_shortcut") : b(u)("favorite_button.save_shortcut"),
|
|
643
|
+
class: G(["favorite-button", { active: H.value }]),
|
|
644
|
+
"data-testid": "page-layout-favorite-button",
|
|
645
|
+
type: "button",
|
|
646
|
+
onClick: oe
|
|
647
|
+
}, [
|
|
648
|
+
(c(), N($e(H.value ? b(it) : b(st)), {
|
|
649
|
+
decorative: "",
|
|
650
|
+
size: `var(--kui-icon-size-30, ${b(ae)})`
|
|
651
|
+
}, null, 8, ["size"]))
|
|
652
|
+
], 10, qt)
|
|
653
|
+
]),
|
|
654
|
+
_: 1
|
|
655
|
+
}, 8, ["text"])
|
|
656
|
+
])) : $("", !0),
|
|
657
|
+
I.$slots["title-after"] ? (c(), f("div", Xt, [
|
|
658
|
+
L(I.$slots, "title-after", {}, void 0, !0)
|
|
659
|
+
])) : $("", !0)
|
|
660
|
+
])
|
|
661
|
+
]),
|
|
662
|
+
g.value ? (c(), N(Ht, {
|
|
663
|
+
key: 0,
|
|
664
|
+
anchors: e.anchors
|
|
665
|
+
}, null, 8, ["anchors"])) : $("", !0),
|
|
666
|
+
_("div", Zt, [
|
|
667
|
+
L(I.$slots, "actions", {}, void 0, !0),
|
|
668
|
+
ne[0] || (ne[0] = _("div", { "data-teleport-target": "ask-kai" }, null, -1))
|
|
669
|
+
])
|
|
670
|
+
]),
|
|
671
|
+
o.value ? (c(), N(Nt, {
|
|
672
|
+
key: 0,
|
|
673
|
+
tabs: e.tabs
|
|
674
|
+
}, Ce({ _: 2 }, [
|
|
675
|
+
V(e.tabs, (se) => ({
|
|
676
|
+
name: `tab-${se.key}`,
|
|
677
|
+
fn: S((U) => [
|
|
678
|
+
L(I.$slots, `tab-${se.key}`, Je(Qe(U)), void 0, !0)
|
|
679
|
+
])
|
|
680
|
+
}))
|
|
681
|
+
]), 1032, ["tabs"])) : $("", !0)
|
|
682
|
+
], 512)),
|
|
683
|
+
_("div", {
|
|
684
|
+
class: G(["page-layout-content-container", { "has-nested-page-layout": P.value }])
|
|
685
|
+
}, [
|
|
686
|
+
w.value && I.$slots.aside ? (c(), f("div", Jt, [
|
|
687
|
+
L(I.$slots, "aside", {}, void 0, !0)
|
|
688
|
+
])) : $("", !0),
|
|
689
|
+
_("div", Qt, [
|
|
690
|
+
o.value ? (c(), N(he, { key: 0 })) : L(I.$slots, "default", {}, void 0, !0, 1)
|
|
691
|
+
])
|
|
692
|
+
], 2)
|
|
693
|
+
], 2);
|
|
694
|
+
};
|
|
695
|
+
}
|
|
696
|
+
}), ga = /* @__PURE__ */ we(ea, [["__scopeId", "data-v-b614e5cd"]]), ta = {
|
|
697
|
+
key: 0,
|
|
698
|
+
class: "about-card-description",
|
|
699
|
+
"data-testid": "about-card-description"
|
|
700
|
+
}, aa = {
|
|
701
|
+
key: 1,
|
|
702
|
+
class: "about-card-skeleton",
|
|
703
|
+
"data-testid": "about-card-skeleton"
|
|
704
|
+
}, oa = {
|
|
705
|
+
key: 2,
|
|
706
|
+
class: "about-card-rows",
|
|
707
|
+
"data-testid": "about-card-rows"
|
|
708
|
+
}, na = ["data-testid"], ia = { class: "about-card-row-label" }, sa = { class: "about-card-row-text" }, la = ["aria-label", "data-testid"], ra = { class: "about-card-row-value" }, ca = { class: "about-card-row-text" }, ua = {
|
|
709
|
+
key: 3,
|
|
710
|
+
class: "about-card-content",
|
|
711
|
+
"data-testid": "about-card-content"
|
|
712
|
+
}, da = /* @__PURE__ */ ye({
|
|
713
|
+
__name: "AboutCard",
|
|
714
|
+
props: {
|
|
715
|
+
title: { default: "" },
|
|
716
|
+
titleTag: { default: "h2" },
|
|
717
|
+
description: { default: "" },
|
|
718
|
+
rows: { default: () => [] },
|
|
719
|
+
isLoading: { type: Boolean, default: !1 }
|
|
720
|
+
},
|
|
721
|
+
setup(e) {
|
|
722
|
+
const l = T(() => e.rows.length || 4);
|
|
723
|
+
return (a, n) => {
|
|
724
|
+
const u = D("KSkeletonBox"), v = D("KTooltip"), d = D("KCard");
|
|
725
|
+
return c(), N(d, {
|
|
726
|
+
class: "kong-ui-public-about-card",
|
|
727
|
+
title: e.title,
|
|
728
|
+
"title-tag": e.titleTag
|
|
729
|
+
}, Ce({
|
|
730
|
+
default: S(() => [
|
|
731
|
+
a.$slots.description || e.description ? (c(), f("p", ta, [
|
|
732
|
+
L(a.$slots, "description", {}, () => [
|
|
733
|
+
te(z(e.description), 1)
|
|
734
|
+
], !0)
|
|
735
|
+
])) : $("", !0),
|
|
736
|
+
e.isLoading ? (c(), f("div", aa, [
|
|
737
|
+
(c(!0), f(Y, null, V(l.value, (o) => (c(), N(u, {
|
|
738
|
+
key: o,
|
|
739
|
+
height: "2",
|
|
740
|
+
width: "100"
|
|
741
|
+
}))), 128))
|
|
742
|
+
])) : e.rows.length ? (c(), f("dl", oa, [
|
|
743
|
+
(c(!0), f(Y, null, V(e.rows, (o) => (c(), f("div", {
|
|
744
|
+
key: o.key,
|
|
745
|
+
class: "about-card-row",
|
|
746
|
+
"data-testid": `about-card-row-${o.key}`
|
|
747
|
+
}, [
|
|
748
|
+
_("dt", ia, [
|
|
749
|
+
L(a.$slots, `label-${o.key}`, { row: o }, () => [
|
|
750
|
+
_("span", sa, z(o.label), 1)
|
|
751
|
+
], !0),
|
|
752
|
+
o.tooltip ? (c(), N(v, {
|
|
753
|
+
key: 0,
|
|
754
|
+
text: o.tooltip
|
|
755
|
+
}, {
|
|
756
|
+
default: S(() => [
|
|
757
|
+
_("button", {
|
|
758
|
+
"aria-label": o.tooltip,
|
|
759
|
+
class: "about-card-row-tooltip-trigger",
|
|
760
|
+
"data-testid": `about-card-row-${o.key}-tooltip`,
|
|
761
|
+
type: "button"
|
|
762
|
+
}, [
|
|
763
|
+
F(b(lt), {
|
|
764
|
+
size: `var(--kui-icon-size-20, ${b(ft)})`
|
|
765
|
+
}, null, 8, ["size"])
|
|
766
|
+
], 8, la)
|
|
767
|
+
]),
|
|
768
|
+
_: 2
|
|
769
|
+
}, 1032, ["text"])) : $("", !0)
|
|
770
|
+
]),
|
|
771
|
+
_("dd", ra, [
|
|
772
|
+
L(a.$slots, `row-${o.key}`, { row: o }, () => [
|
|
773
|
+
_("span", ca, z(o.value), 1)
|
|
774
|
+
], !0)
|
|
775
|
+
])
|
|
776
|
+
], 8, na))), 128))
|
|
777
|
+
])) : $("", !0),
|
|
778
|
+
a.$slots.default ? (c(), f("div", ua, [
|
|
779
|
+
L(a.$slots, "default", {}, void 0, !0)
|
|
780
|
+
])) : $("", !0)
|
|
781
|
+
]),
|
|
782
|
+
_: 2
|
|
783
|
+
}, [
|
|
784
|
+
a.$slots.title || e.title ? {
|
|
785
|
+
name: "title",
|
|
786
|
+
fn: S(() => [
|
|
787
|
+
L(a.$slots, "title", {}, () => [
|
|
788
|
+
te(z(e.title), 1)
|
|
789
|
+
], !0)
|
|
790
|
+
]),
|
|
791
|
+
key: "0"
|
|
792
|
+
} : void 0,
|
|
793
|
+
a.$slots.actions ? {
|
|
794
|
+
name: "actions",
|
|
795
|
+
fn: S(() => [
|
|
796
|
+
L(a.$slots, "actions", {}, void 0, !0)
|
|
797
|
+
]),
|
|
798
|
+
key: "1"
|
|
799
|
+
} : void 0
|
|
800
|
+
]), 1032, ["title", "title-tag"]);
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
}), ba = /* @__PURE__ */ we(da, [["__scopeId", "data-v-48c05270"]]);
|
|
804
|
+
export {
|
|
805
|
+
ba as AboutCard,
|
|
806
|
+
Wt as NEW_APPEARANCE_INJECTION_KEY,
|
|
807
|
+
ga as PageLayout
|
|
808
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong-ui-public/i18n"),require("@kong/icons")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong-ui-public/i18n","@kong/icons"],e):(_=typeof globalThis<"u"?globalThis:_||self,e(_["kong-ui-public-page-layout"]={},_.Vue,_.VueRouter,_["kong-ui-public-i18n"],_.KongIcons))})(this,(function(_,e,Z,le,L){"use strict";const fe={back_button:"Go back",favorite_button:{save_shortcut:"Save page to shortcuts",remove_shortcut:"Remove page from shortcuts"},tabs:{more_button:{label:"More",aria_label:"More tabs"}},anchor_navigation:{aria_label:"Page sections",more_button:{aria_label:"More page sections"}}};function he(){const t=le.createI18n("en-us",fe);return{i18n:t,i18nT:le.i18nTComponent(t)}}const Q={useI18n:he},ge="12px",P="16px",be="2px",ee="16px";function ke(t,s){return e.getCurrentScope()?(e.onScopeDispose(t,s),!0):!1}const ye=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const K=()=>{};function we(t,s){function n(...l){return new Promise((d,p)=>{Promise.resolve(t(()=>s.apply(this,l),{fn:s,thisArg:this,args:l})).then(d).catch(p)})}return"cancel"in t&&Object.assign(n,{cancel:t.cancel,flush:t.flush,isPending:t.isPending}),n}function Ce(t,s={}){let n,l,d=K,p=K;const u=e.shallowRef(!1),a=h=>{clearTimeout(h),d(),d=K};let b;return Object.assign(h=>{const r=e.toValue(t),f=e.toValue(s.maxWait);return n&&a(n),r<=0||f!==void 0&&f<=0?(l&&(a(l),l=void 0),u.value=!1,Promise.resolve(h())):(u.value=!0,new Promise((g,m)=>{d=s.rejectOnCancel?m:g,p=g,b=h,f&&!l&&(l=setTimeout(()=>{n&&a(n),l=void 0,u.value=!1,g(b())},f)),n=setTimeout(()=>{l&&a(l),l=void 0,u.value=!1,g(h())},r)}))},{cancel:()=>{n&&(a(n),n=void 0),l&&(a(l),l=void 0),u.value=!1,p=K},flush:()=>{if(u.value){n&&(clearTimeout(n),n=void 0),l&&(clearTimeout(l),l=void 0),u.value=!1;const h=p;d=K,p=K,h(b())}},isPending:e.shallowReadonly(u)})}function Be(t){return Array.isArray(t)?t:[t]}function Ee(t){return e.getCurrentInstance()}function Te(t,s=200,n={}){return we(Ce(s,n),t)}function _e(t,s=!0,n){Ee()?e.onMounted(t,n):s?t():e.nextTick(t)}const ie=ye?window:void 0;function O(t){var s;const n=e.toValue(t);return(s=n?.$el)!==null&&s!==void 0?s:n}function Ne(){const t=e.shallowRef(!1),s=e.getCurrentInstance();return s&&e.onMounted(()=>{t.value=!0},s),t}function Se(t){const s=Ne();return e.computed(()=>(s.value,!!t()))}function te(t,s,n={}){const{window:l=ie,...d}=n;let p;const u=Se(()=>l&&"ResizeObserver"in l),a=()=>{p&&(p.disconnect(),p=void 0)},b=e.watch(e.computed(()=>{const h=e.toValue(t);return Array.isArray(h)?h.map(r=>O(r)):[O(h)]}),h=>{if(a(),u.value&&l){p=new ResizeObserver(s);for(const r of h)r&&p.observe(r,d)}},{immediate:!0,flush:"post"}),k=()=>{a(),b()};return ke(k),{isSupported:u,stop:k}}function $e(t,s={width:0,height:0},n={}){const{window:l=ie,box:d="content-box"}=n,p=e.computed(()=>{var r;return(r=O(t))===null||r===void 0||(r=r.namespaceURI)===null||r===void 0?void 0:r.includes("svg")}),u=e.shallowRef(s.width),a=e.shallowRef(s.height),{stop:b}=te(t,([r])=>{const f=d==="border-box"?r.borderBoxSize:d==="content-box"?r.contentBoxSize:r.devicePixelContentBoxSize;if(l&&p.value){const g=O(t);if(g){const m=g.getBoundingClientRect();u.value=m.width,a.value=m.height}}else if(f){const g=Be(f);u.value=g.reduce((m,{inlineSize:T})=>m+T,0),a.value=g.reduce((m,{blockSize:T})=>m+T,0)}else u.value=r.contentRect.width,a.value=r.contentRect.height},n);_e(()=>{const r=O(t);if(r&&"offsetWidth"in r)if(d==="content-box"&&l){const f=l.getComputedStyle(r),g=Number.parseFloat(f.paddingLeft)+Number.parseFloat(f.paddingRight),m=Number.parseFloat(f.paddingTop)+Number.parseFloat(f.paddingBottom),T=Number.parseFloat(f.borderLeftWidth)+Number.parseFloat(f.borderRightWidth),N=Number.parseFloat(f.borderTopWidth)+Number.parseFloat(f.borderBottomWidth);u.value=r.offsetWidth-g-T,a.value=r.offsetHeight-m-N}else u.value=r.offsetWidth,a.value=r.offsetHeight;else r&&(u.value=s.width,a.value=s.height)});const k=e.watch(()=>O(t),r=>{u.value=r?s.width:0,a.value=r?s.height:0});function h(){b(),k()}return{width:u,height:a,stop:h}}const Ie={ref:"page-layout-tabs",class:"page-layout-tabs","data-testid":"page-layout-tabs"},Ae={key:0},Ve=["aria-label"],Re={key:0,class:"layout-loader-container"},Le=e.defineComponent({__name:"PageLayoutTabs",props:{tabs:{default:()=>[]}},setup(t){const{i18n:{t:s}}=Q.useI18n(),n=Z.useRouter(),l=e.inject("app:navigateTo",null),d=m=>{if(typeof m.to!="string"){n.push(m.to);return}if(typeof l!="function"){window.location.href=m.to;return}l(m.to)},p=e.useTemplateRef("page-layout-tabs"),u=e.useTemplateRef("page-layout-tabs-list"),a=e.ref(t.tabs.length),b=e.ref(!1),k=e.computed(()=>t.tabs.slice(0,a.value)),h=e.computed(()=>t.tabs.slice(a.value)),r=async()=>{if(!p.value||!u.value)return;b.value=!1,a.value=t.tabs.length,await e.nextTick();const m=p.value?.getBoundingClientRect().width-parseInt(ee)*2;let T=u.value?.getBoundingClientRect().width;if(!m||!T){b.value=!0;return}const N=50;for(;T+N>m&&a.value>1;)a.value--,await e.nextTick(),T=u.value?.getBoundingClientRect().width||0;b.value=!0};let f=null;const g=()=>{f&&clearTimeout(f),f=setTimeout(()=>{r()},150)};return e.onMounted(()=>{r(),te(p,g)}),e.onBeforeUnmount(()=>{f&&clearTimeout(f)}),e.watch(()=>t.tabs,()=>{r()},{deep:!0}),(m,T)=>{const N=e.resolveComponent("KDropdownItem"),V=e.resolveComponent("KDropdown"),z=e.resolveComponent("KSkeletonBox");return e.openBlock(),e.createElementBlock("nav",Ie,[e.createElementVNode("ul",{ref:"page-layout-tabs-list",class:e.normalizeClass({"layout-computing":!b.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,c=>(e.openBlock(),e.createElementBlock("li",{key:`${c.key}-tab`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(typeof c.to=="string"?"a":"router-link"),e.mergeProps({ref_for:!0},typeof c.to=="string"?{href:c.to}:{to:c.to},{"aria-current":c.active?"page":void 0,class:["tab-link",{active:c.active}],"data-testid":c.dataTestId?c.dataTestId:`page-layout-tab-${c.key}`,tabindex:"0",onClick:e.withModifiers(S=>d(c),["prevent"]),onKeydown:e.withKeys(e.withModifiers(S=>d(c),["prevent"]),["enter"])}),{default:e.withCtx(()=>[e.renderSlot(m.$slots,`tab-${c.key}`,{tab:c},()=>[e.createTextVNode(e.toDisplayString(c.label),1)],!0)]),_:2},1040,["aria-current","class","data-testid","onClick","onKeydown"]))]))),128)),t.tabs.length>a.value?(e.openBlock(),e.createElementBlock("li",Ae,[e.createVNode(V,{"kpop-attributes":{placement:"bottom-end",popoverElementAttributes:{"data-testid":"tabs-overflow-dropdown-popover"}}},{items:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,c=>(e.openBlock(),e.createBlock(N,{key:`${c.key}-dropdown-item`,"aria-current":c.active?"page":void 0,"data-testid":c.dataTestId?c.dataTestId:`page-layout-tab-${c.key}`,item:{label:c.label,value:c.key,to:c.to},selected:c.active},{default:e.withCtx(()=>[e.renderSlot(m.$slots,`tab-${c.key}`,{tab:c},()=>[e.createTextVNode(e.toDisplayString(c.label),1)],!0)]),_:2},1032,["aria-current","data-testid","item","selected"]))),128))]),default:e.withCtx(()=>[e.createElementVNode("button",{"aria-label":e.unref(s)("tabs.more_button.aria_label"),class:e.normalizeClass(["tab-link",{active:h.value.find(c=>c.active)}]),"data-testid":"tabs-overflow-dropdown-button"},[e.createTextVNode(e.toDisplayString(e.unref(s)("tabs.more_button.label"))+" ",1),e.createVNode(e.unref(L.ChevronDownIcon),{decorative:"",size:`var(--kui-icon-size-30, ${e.unref(P)})`},null,8,["size"])],10,Ve)]),_:3})])):e.createCommentVNode("",!0)],2),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Re,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,c=>e.createVNode(z,{key:`layout-loader-${c}`,height:"1",width:"5"})),64))]))],512)}}}),Y=(t,s)=>{const n=t.__vccOpts||t;for(const[l,d]of s)n[l]=d;return n},De=Y(Le,[["__scopeId","data-v-02891bc1"]]),xe=["aria-label","data-fit"],Pe={key:0,"aria-hidden":"true",class:"anchor-ellipsis","data-testid":"anchor-navigation-leading-ellipsis"},Ke=["aria-current","data-testid","title","onClick"],Oe={key:1,"aria-hidden":"true",class:"anchor-ellipsis","data-testid":"anchor-navigation-trailing-ellipsis"},ze={key:2},re=140,se=22,oe=16,M="data-anchor-attention",Fe=1200,ve=1600,He=Y(e.defineComponent({__name:"PageLayoutAnchorNavigation",props:{anchors:{default:()=>[]}},setup(t){const{i18n:{t:s}}=Q.useI18n(),n=e.useTemplateRef("page-layout-anchor-navigation"),l=e.useTemplateRef("page-layout-anchor-navigation-list"),d=e.ref("all"),p=e.ref(""),u=e.ref([]),a=e.computed(()=>t.anchors.filter(o=>u.value.includes(o.id))),b=e.computed(()=>{const o=a.value.findIndex(i=>i.id===p.value);return o===-1?0:o}),k=e.computed(()=>{const o=a.value,i=o.length,y=b.value;if(d.value==="all")return{anchors:o,hasLeadingEllipsis:!1,hasTrailingEllipsis:!1,hasOverflowDropdown:!1};if(d.value==="hidden")return{anchors:[],hasLeadingEllipsis:!1,hasTrailingEllipsis:!1,hasOverflowDropdown:!1};if(d.value==="active-only")return{anchors:o.slice(y,y+1),hasLeadingEllipsis:!1,hasTrailingEllipsis:!1,hasOverflowDropdown:!0};const B=d.value==="window-3"?3:2;if(i<=B)return{anchors:o,hasLeadingEllipsis:!1,hasTrailingEllipsis:!1,hasOverflowDropdown:!0};const I=y<B?0:y>=i-B?i-B:y-1;return{anchors:o.slice(I,I+B),hasLeadingEllipsis:I>0,hasTrailingEllipsis:I+B<i,hasOverflowDropdown:!0}}),h=o=>o.dataTestId??`page-layout-anchor-${o.id.replace(/[^\w-]+/g,"-").replace(/^-+|-+$/g,"")}`,r=e.ref(null),f=()=>{let o=n.value?.parentElement??null;for(;o;){const{overflowY:i}=getComputedStyle(o);if(i==="auto"||i==="scroll"||i==="overlay")return o;o=o.parentElement}return null},g=o=>{if(o.element)return o.element.isConnected?o.element:null;const i=r.value??document;try{return i.querySelector(o.id)??i.querySelector(`#${CSS.escape(o.id)}`)}catch{return null}},m=()=>(n.value?.closest(".page-layout-header")?.getBoundingClientRect().height??0)+parseInt(ee,10),T=parseInt(P,10),N=parseInt(be,10),V=o=>o*re+2*T+se+(o+2)*N+oe,z=()=>re+se+N+oe;let c=0;const S=async()=>{if(!a.value.length){d.value="hidden";return}const o=++c;if(d.value="all",await e.nextTick(),o!==c||!n.value||!l.value)return;const i=n.value.getBoundingClientRect().width,y=l.value.getBoundingClientRect().width;i<=0||y<=0||y+oe<=i||(V(3)<=i?d.value="window-3":V(2)<=i?d.value="window-2":z()<=i?d.value="active-only":d.value="hidden")};let R=null;te(n,()=>{R&&clearTimeout(R),R=setTimeout(()=>{G(),S()},150)});let W=null,F=null,C=0,j=0,v=null,U=null;const X=o=>{const i=String(++C);q(),U=o,o.removeAttribute(M),j=requestAnimationFrame(()=>{o.setAttribute(M,i),v=setTimeout(()=>{o.getAttribute(M)===i&&o.removeAttribute(M)},Fe)})},q=()=>{cancelAnimationFrame(j),v&&(clearTimeout(v),v=null),U?.removeAttribute(M),U=null},D=()=>r.value??window,pt=new Set(["ArrowUp","ArrowDown","PageUp","PageDown","Home","End"," "]),$=o=>{if(o instanceof KeyboardEvent&&!pt.has(o.key))return;o&&o.type!=="scrollend"&&C++,W=null,F&&(clearTimeout(F),F=null);const i=D();i.removeEventListener("scrollend",$),i.removeEventListener("wheel",$),i.removeEventListener("touchstart",$),i.removeEventListener("keydown",$)},mt=o=>{$(),W=o;const i=D();i.addEventListener("scrollend",$,{once:!0}),i.addEventListener("wheel",$,{passive:!0}),i.addEventListener("touchstart",$,{passive:!0}),i.addEventListener("keydown",$,{passive:!0}),F=setTimeout($,1e3)},ue=()=>{const o=r.value;return{top:o?o.getBoundingClientRect().top:0,scrollTop:o?o.scrollTop:window.scrollY,clientHeight:o?o.clientHeight:window.innerHeight,scrollHeight:o?o.scrollHeight:document.documentElement.scrollHeight}},G=()=>{const{top:o,scrollTop:i,clientHeight:y,scrollHeight:B}=ue(),I=m(),E=[];let w=null,x=null;for(const A of t.anchors){const H=g(A);H&&(E.push(A.id),x=A.id,w??=A.id,H.getBoundingClientRect().top-o<=(A.offset??I)+8&&(w=A.id))}const J=E.length!==u.value.length||E.some((A,H)=>A!==u.value[H]);return J&&(u.value=E),W||(x&&i>0&&i+y>=B-2&&(w=x),p.value=w??""),J};let ae=!1;const pe=()=>{ae||(ae=!0,requestAnimationFrame(()=>{ae=!1,G()&&S()}))},ft=o=>{const i=D();let y=!1;const B=()=>{y||(y=!0,i.removeEventListener("scrollend",B),o())};i.addEventListener("scrollend",B,{once:!0}),window.setTimeout(B,ve)},me=o=>{const i=g(o);if(!i)return;p.value=o.id,mt(o.id);const y=o.offset??m(),{scrollTop:B,clientHeight:I,scrollHeight:E}=ue(),w=r.value,x=w?i.getBoundingClientRect().top-w.getBoundingClientRect().top+w.scrollTop-y:i.getBoundingClientRect().top+window.scrollY-y,J=Math.min(Math.max(x,0),Math.max(E-I,0)),A=Math.abs(J-B)>=2,H=++C;if((w??window).scrollTo({behavior:"smooth",top:x}),!A){X(i);return}ft(()=>{H===C&&X(i)})},ht=(o,i)=>{i(),me(o)};return e.onMounted(()=>{r.value=f(),D().addEventListener("scroll",pe,{passive:!0}),G(),S(),requestAnimationFrame(()=>{G(),S()})}),e.onBeforeUnmount(()=>{D().removeEventListener("scroll",pe),$(),C++,q(),R&&clearTimeout(R)}),e.watch(()=>t.anchors,()=>{t.anchors.some(o=>o.id===p.value)||(p.value=""),G(),S()},{deep:!0}),(o,i)=>{const y=e.resolveComponent("KButton"),B=e.resolveComponent("KDropdownItem"),I=e.resolveComponent("KDropdown");return e.openBlock(),e.createElementBlock("nav",{ref:"page-layout-anchor-navigation","aria-label":e.unref(s)("anchor_navigation.aria_label"),class:"page-layout-anchor-navigation","data-fit":d.value,"data-testid":"page-layout-anchor-navigation"},[e.createElementVNode("ul",{ref:"page-layout-anchor-navigation-list",class:e.normalizeClass({"layout-hidden":d.value==="hidden"})},[k.value.hasLeadingEllipsis?(e.openBlock(),e.createElementBlock("li",Pe," … ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value.anchors,E=>(e.openBlock(),e.createElementBlock("li",{key:`${E.id}-anchor`},[e.createElementVNode("button",{"aria-current":E.id===p.value?"location":void 0,class:e.normalizeClass(["anchor-link",{active:E.id===p.value}]),"data-testid":h(E),title:E.label,type:"button",onClick:w=>me(E)},e.toDisplayString(E.label),11,Ke)]))),128)),k.value.hasTrailingEllipsis?(e.openBlock(),e.createElementBlock("li",Oe," … ")):e.createCommentVNode("",!0),k.value.hasOverflowDropdown?(e.openBlock(),e.createElementBlock("li",ze,[e.createVNode(I,{"kpop-attributes":{placement:"bottom-end",popoverElementAttributes:{"data-testid":"anchor-navigation-overflow-dropdown-popover"}}},{items:e.withCtx(({closeDropdown:E})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,w=>(e.openBlock(),e.createBlock(B,{key:`${w.id}-dropdown-item`,"aria-current":w.id===p.value?"location":void 0,"data-testid":h(w),selected:w.id===p.value,onClick:x=>ht(w,E)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.label),1)]),_:2},1032,["aria-current","data-testid","selected","onClick"]))),128))]),default:e.withCtx(()=>[e.createVNode(y,{appearance:"tertiary","aria-label":e.unref(s)("anchor_navigation.more_button.aria_label"),class:"anchor-overflow-button","data-testid":"anchor-navigation-overflow-dropdown-button",icon:"",size:"small"},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ChevronDownIcon),{decorative:"",size:`var(--kui-icon-size-30, ${e.unref(P)})`},null,8,["size"])]),_:1},8,["aria-label"])]),_:1})])):e.createCommentVNode("",!0)],2)],8,xe)}}}),[["__scopeId","data-v-f6d370c5"]]),ce=Symbol("nested-page-layout-detection"),de="page-layout:new-appearance",Me={key:0,ref:"page-layout-header",class:"page-layout-header","data-testid":"page-layout-header"},We={class:"page-header-container"},je={class:"page-header-start"},Ue={class:"title-container"},qe={key:1,class:"page-layout-title-wrapper"},Ge={class:"page-layout-title","data-testid":"page-layout-title"},Ye=["aria-label"],Xe={key:3,class:"title-after-container"},Je={class:"page-header-actions-container"},Ze={key:0,class:"page-layout-aside-container","data-testid":"page-layout-aside"},Qe={class:"page-layout-content"},et=Y(e.defineComponent({__name:"PageLayout",props:{breadcrumbs:{default:()=>[]},title:{},backTo:{},tabs:{default:()=>[]},anchors:{default:()=>[]},pageShortcutData:{}},setup(t){e.useCssVars(C=>({v3ea7775c:g.value}));const s=e.inject("app:navigateTo",null),n=e.inject(de,null),l=e.inject("app:pageShortcutsContext",null),{i18n:{t:d}}=Q.useI18n(),p=Z.useRouter(),u=Z.useRoute(),a=e.computed(()=>!!(t.tabs&&t.tabs.length)),b=e.computed(()=>typeof t.backTo=="string"),k=e.computed(()=>e.toValue(n)===!0),h=e.computed(()=>k.value&&!a.value&&!!(t.anchors&&t.anchors.length)),r=e.useTemplateRef("page-layout-header"),{height:f}=$e(r,void 0,{box:"border-box"}),g=e.computed(()=>`calc(${f.value}px + var(--kui-space-60, ${ee}))`),m=e.computed(()=>!!t.pageShortcutData&&!!t.pageShortcutData.entityType&&!!t.pageShortcutData.label),T=e.computed(()=>m.value&&!!l&&"onFavoriteToggle"in l&&typeof l.onFavoriteToggle=="function"),N=e.ref(0),V=e.computed(()=>!!l&&"isFavorite"in l&&typeof l.isFavorite=="function"&&l.isFavorite(t.pageShortcutData)===!0),z=async()=>{if(t.backTo){if(typeof t.backTo=="object"){p.push(t.backTo);return}if(typeof s!="function"){window.location.href=t.backTo;return}await s(t.backTo)}},c=e.ref(0),S=e.computed(()=>c.value>0);e.provide(ce,()=>(c.value++,()=>{c.value--}));const R=e.inject(ce,null),ne=e.ref(null);typeof R=="function"&&(ne.value=R());const W=()=>{l.onFavoriteToggle({...t.pageShortcutData,path:t.pageShortcutData?.path||u.fullPath})};e.onUnmounted(()=>{ne.value?.()});const F=Te(()=>{!S.value&&m.value&&l&&"onEntityPageVisit"in l&&typeof l.onEntityPageVisit=="function"&&(l.onEntityPageVisit({...t.pageShortcutData,path:t.pageShortcutData?.path||u?.fullPath}),N.value++)},500);return e.watch([()=>t.pageShortcutData,()=>u?.fullPath],()=>{F()},{immediate:!0,deep:!0}),(C,j)=>{const v=e.resolveComponent("KBreadcrumbs"),U=e.resolveComponent("KTooltip"),X=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-public-page-layout",{"new-appearance":k.value}]),"data-testid":"kong-ui-public-page-layout"},[S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("div",We,[e.createElementVNode("div",je,[t.breadcrumbs&&t.breadcrumbs.length?(e.openBlock(),e.createBlock(v,{key:0,class:"header-breadcrumbs","data-testid":"page-layout-breadcrumbs","item-max-width":"25ch",items:t.breadcrumbs},e.createSlots({_:2},[k.value?{name:"divider",fn:e.withCtx(()=>[e.createVNode(e.unref(L.ChevronRightIcon),{decorative:"",size:`var(--kui-icon-size-30, ${e.unref(P)})`},null,8,["size"])]),key:"0"}:void 0]),1032,["items"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ue,[t.backTo&&!k.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b.value?"a":"router-link"),e.mergeProps({key:0},b.value?{href:t.backTo}:{to:t.backTo},{"aria-label":e.unref(d)("back_button"),class:"navigate-back","data-testid":"page-layout-navigate-back",tabindex:"0",onClick:e.withModifiers(z,["prevent"]),onKeydown:e.withKeys(e.withModifiers(z,["prevent"]),["enter"])}),{default:e.withCtx(()=>[e.createVNode(e.unref(L.ArrowTopLeftIcon),{decorative:"",size:`var(--kui-icon-size-30, ${e.unref(P)})`},null,8,["size"])]),_:1},16,["aria-label","onKeydown"])):e.createCommentVNode("",!0),t.title||C.$slots.title?(e.openBlock(),e.createElementBlock("span",qe,[e.renderSlot(C.$slots,"title",{},()=>[e.createElementVNode("h1",Ge,e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),T.value?(e.openBlock(),e.createElementBlock("div",{key:N.value,class:"favorite-button-container"},[e.createVNode(U,{placement:"right",text:V.value?e.unref(d)("favorite_button.remove_shortcut"):e.unref(d)("favorite_button.save_shortcut")},{default:e.withCtx(()=>[e.createElementVNode("button",{"aria-label":V.value?e.unref(d)("favorite_button.remove_shortcut"):e.unref(d)("favorite_button.save_shortcut"),class:e.normalizeClass(["favorite-button",{active:V.value}]),"data-testid":"page-layout-favorite-button",type:"button",onClick:W},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(V.value?e.unref(L.StarFillIcon):e.unref(L.StarIcon)),{decorative:"",size:`var(--kui-icon-size-30, ${e.unref(P)})`},null,8,["size"]))],10,Ye)]),_:1},8,["text"])])):e.createCommentVNode("",!0),C.$slots["title-after"]?(e.openBlock(),e.createElementBlock("div",Xe,[e.renderSlot(C.$slots,"title-after",{},void 0,!0)])):e.createCommentVNode("",!0)])]),h.value?(e.openBlock(),e.createBlock(He,{key:0,anchors:t.anchors},null,8,["anchors"])):e.createCommentVNode("",!0),e.createElementVNode("div",Je,[e.renderSlot(C.$slots,"actions",{},void 0,!0),j[0]||(j[0]=e.createElementVNode("div",{"data-teleport-target":"ask-kai"},null,-1))])]),a.value?(e.openBlock(),e.createBlock(De,{key:0,tabs:t.tabs},e.createSlots({_:2},[e.renderList(t.tabs,q=>({name:`tab-${q.key}`,fn:e.withCtx(D=>[e.renderSlot(C.$slots,`tab-${q.key}`,e.normalizeProps(e.guardReactiveProps(D)),void 0,!0)])}))]),1032,["tabs"])):e.createCommentVNode("",!0)],512)),e.createElementVNode("div",{class:e.normalizeClass(["page-layout-content-container",{"has-nested-page-layout":S.value}])},[k.value&&C.$slots.aside?(e.openBlock(),e.createElementBlock("div",Ze,[e.renderSlot(C.$slots,"aside",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Qe,[a.value?(e.openBlock(),e.createBlock(X,{key:0})):e.renderSlot(C.$slots,"default",{},void 0,!0,1)])],2)],2)}}}),[["__scopeId","data-v-b614e5cd"]]),tt={key:0,class:"about-card-description","data-testid":"about-card-description"},ot={key:1,class:"about-card-skeleton","data-testid":"about-card-skeleton"},nt={key:2,class:"about-card-rows","data-testid":"about-card-rows"},at=["data-testid"],lt={class:"about-card-row-label"},it={class:"about-card-row-text"},rt=["aria-label","data-testid"],st={class:"about-card-row-value"},ct={class:"about-card-row-text"},dt={key:3,class:"about-card-content","data-testid":"about-card-content"},ut=Y(e.defineComponent({__name:"AboutCard",props:{title:{default:""},titleTag:{default:"h2"},description:{default:""},rows:{default:()=>[]},isLoading:{type:Boolean,default:!1}},setup(t){const s=e.computed(()=>t.rows.length||4);return(n,l)=>{const d=e.resolveComponent("KSkeletonBox"),p=e.resolveComponent("KTooltip"),u=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(u,{class:"kong-ui-public-about-card",title:t.title,"title-tag":t.titleTag},e.createSlots({default:e.withCtx(()=>[n.$slots.description||t.description?(e.openBlock(),e.createElementBlock("p",tt,[e.renderSlot(n.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),t.isLoading?(e.openBlock(),e.createElementBlock("div",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,a=>(e.openBlock(),e.createBlock(d,{key:a,height:"2",width:"100"}))),128))])):t.rows.length?(e.openBlock(),e.createElementBlock("dl",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,a=>(e.openBlock(),e.createElementBlock("div",{key:a.key,class:"about-card-row","data-testid":`about-card-row-${a.key}`},[e.createElementVNode("dt",lt,[e.renderSlot(n.$slots,`label-${a.key}`,{row:a},()=>[e.createElementVNode("span",it,e.toDisplayString(a.label),1)],!0),a.tooltip?(e.openBlock(),e.createBlock(p,{key:0,text:a.tooltip},{default:e.withCtx(()=>[e.createElementVNode("button",{"aria-label":a.tooltip,class:"about-card-row-tooltip-trigger","data-testid":`about-card-row-${a.key}-tooltip`,type:"button"},[e.createVNode(e.unref(L.InfoIcon),{size:`var(--kui-icon-size-20, ${e.unref(ge)})`},null,8,["size"])],8,rt)]),_:2},1032,["text"])):e.createCommentVNode("",!0)]),e.createElementVNode("dd",st,[e.renderSlot(n.$slots,`row-${a.key}`,{row:a},()=>[e.createElementVNode("span",ct,e.toDisplayString(a.value),1)],!0)])],8,at))),128))])):e.createCommentVNode("",!0),n.$slots.default?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(n.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:2},[n.$slots.title||t.title?{name:"title",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)]),key:"0"}:void 0,n.$slots.actions?{name:"actions",fn:e.withCtx(()=>[e.renderSlot(n.$slots,"actions",{},void 0,!0)]),key:"1"}:void 0]),1032,["title","title-tag"])}}}),[["__scopeId","data-v-48c05270"]]);_.AboutCard=ut,_.NEW_APPEARANCE_INJECTION_KEY=de,_.PageLayout=et,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.page-layout-tabs[data-v-02891bc1]{align-items:flex-end;border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);box-sizing:border-box;display:flex;height:34px;overflow-x:clip;padding:0 16px;padding:var(--kui-space-0, 0px) var(--kui-space-60, 16px);position:relative;width:100%}.page-layout-tabs a[data-v-02891bc1],.page-layout-tabs button[data-v-02891bc1]{background-color:#0000;background-color:var(--kui-color-background-transparent, rgba(0, 0, 0, 0));border:none;color:inherit;cursor:pointer;font:inherit;outline:none;padding:0;padding:var(--kui-space-0, 0px);text-decoration:none}.page-layout-tabs ul[data-v-02891bc1]{display:flex;gap:20px;gap:var(--kui-space-70, 20px);list-style:none;margin:0;margin:var(--kui-space-0, 0px);margin-bottom:-1px;margin-bottom:calc(-1 * var(--kui-border-width-10, 1px));max-width:100%;padding:0;padding:var(--kui-space-0, 0px)}.page-layout-tabs ul.layout-computing[data-v-02891bc1]{height:0;visibility:hidden}.page-layout-tabs ul li[data-v-02891bc1]{display:flex}.page-layout-tabs ul li .tab-link[data-v-02891bc1]{align-items:center;border-bottom:2px solid rgba(0,0,0,0);border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-transparent, rgba(0, 0, 0, 0));border-radius:4px 4px 0 0;border-radius:var(--kui-border-radius-20, 4px) var(--kui-border-radius-20, 4px) var(--kui-border-radius-0, 0px) var(--kui-border-radius-0, 0px);color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e);cursor:pointer;display:flex;font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);gap:6px;gap:var(--kui-space-30, 6px);line-height:20px;line-height:var(--kui-line-height-30, 20px);padding:6px 0;padding:var(--kui-space-30, 6px) var(--kui-space-0, 0px);text-decoration:none;transition:color .2s ease-in,border-color .2s ease-in,font-weight .2s ease-in;white-space:nowrap}.page-layout-tabs ul li .tab-link[data-v-02891bc1]:hover{border-bottom:2px solid #afb7c5;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-neutral-weak, #afb7c5);color:#0d0e14;color:var(--kui-color-text, #0d0e14);text-decoration:none}.page-layout-tabs ul li .tab-link[data-v-02891bc1]:focus-visible{box-shadow:0 0 0 4px #0044f433;box-shadow:var(--kui-shadow-focus, 0px 0px 0px 4px rgba(0, 68, 244, .2));text-decoration:none}.page-layout-tabs ul li .tab-link.active[data-v-02891bc1]{border-bottom:2px solid #0044f4;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-primary, #0044f4);color:#0044f4!important;color:var(--kui-color-text-primary, #0044f4)!important;font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);text-decoration:none}.page-layout-tabs .layout-loader-container[data-v-02891bc1]{align-items:center;display:flex;gap:20px;gap:var(--kui-space-70, 20px);height:34px;inset:0 0 0 16px;left:var(--kui-space-60, 16px);position:absolute}.page-layout-anchor-navigation[data-v-f6d370c5]{display:flex;flex:1 1 0;justify-content:center;min-width:0;overflow-x:clip}.page-layout-anchor-navigation ul[data-v-f6d370c5]{align-items:center;background-color:#f9fafb;background-color:var(--kui-color-background-neutral-weakest, #f9fafb);border-radius:8px;border-radius:var(--kui-border-radius-40, 8px);display:flex;flex-shrink:0;gap:2px;gap:var(--kui-space-10, 2px);list-style:none;margin:0;margin:var(--kui-space-0, 0px);padding:4px;padding:var(--kui-space-20, 4px)}.page-layout-anchor-navigation ul.layout-hidden[data-v-f6d370c5]{display:none}.page-layout-anchor-navigation ul li[data-v-f6d370c5]{display:flex}.page-layout-anchor-navigation .anchor-link[data-v-f6d370c5]{background-color:#0000;background-color:var(--kui-color-background-transparent, rgba(0, 0, 0, 0));border:none;border-radius:6px;border-radius:var(--kui-border-radius-30, 6px);box-sizing:border-box;color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);cursor:pointer;font-family:inherit;font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);line-height:16px;line-height:var(--kui-line-height-20, 16px);max-width:140px;outline:none;overflow:hidden;padding:4px 6px;padding:var(--kui-space-20, 4px) var(--kui-space-30, 6px);text-overflow:ellipsis;transition:background-color .2s ease-in,color .2s ease-in;transition:background-color var(--kui-animation-duration-20, .2s) ease-in,color var(--kui-animation-duration-20, .2s) ease-in;white-space:nowrap}.page-layout-anchor-navigation .anchor-link[data-v-f6d370c5]:hover{color:#0d0e14;color:var(--kui-color-text, #0d0e14)}.page-layout-anchor-navigation .anchor-link[data-v-f6d370c5]:focus-visible{box-shadow:0 0 0 4px #0044f433;box-shadow:var(--kui-shadow-focus, 0px 0px 0px 4px rgba(0, 68, 244, .2))}.page-layout-anchor-navigation .anchor-link.active[data-v-f6d370c5]{background-color:#0044f4;background-color:var(--kui-color-brand, #0044f4);color:#afb7c5;color:var(--kui-color-text-neutral-weak, #afb7c5)}.page-layout-anchor-navigation .anchor-ellipsis[data-v-f6d370c5]{align-items:center;color:#afb7c5;color:var(--kui-color-text-neutral-weak, #afb7c5);font-size:12px;font-size:var(--kui-font-size-20, 12px);justify-content:center;line-height:16px;line-height:var(--kui-line-height-20, 16px);-webkit-user-select:none;user-select:none;width:16px;width:var(--kui-icon-size-30, 16px)}.page-layout-anchor-navigation .anchor-overflow-button[data-v-f6d370c5]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489)}.kong-ui-public-page-layout[data-v-b614e5cd]{box-sizing:border-box;container-name:page-layout;container-type:inline-size;font-family:Inter,Roboto,Helvetica,sans-serif;font-family:var(--kui-font-family-text, "Inter", Roboto, Helvetica, sans-serif)}.kong-ui-public-page-layout .page-layout-header[data-v-b614e5cd]{background-color:#fff;background-color:var(--kui-color-background, #ffffff);display:flex;flex-direction:column;gap:8px;gap:var(--kui-space-40, 8px)}.kong-ui-public-page-layout .page-layout-header .page-header-container[data-v-b614e5cd]{align-items:flex-end;display:flex;gap:6px;gap:var(--kui-space-30, 6px);justify-content:space-between;padding:16px 16px 0;padding:var(--kui-space-60, 16px) var(--kui-space-60, 16px) var(--kui-space-0, 0px) var(--kui-space-60, 16px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start[data-v-b614e5cd]{min-width:0}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .header-breadcrumbs[data-v-b614e5cd] .breadcrumbs-item-container:first-child .breadcrumbs-item{padding-left:0;padding-left:var(--kui-space-0, 0px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .header-breadcrumbs[data-v-b614e5cd] .breadcrumbs-item-container .breadcrumbs-item.active .breadcrumbs-text{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container[data-v-b614e5cd]{align-items:flex-end;display:flex;gap:4px;gap:var(--kui-space-20, 4px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .navigate-back[data-v-b614e5cd],.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button[data-v-b614e5cd]{background-color:#0000;background-color:var(--kui-color-background-transparent, rgba(0, 0, 0, 0));border:none;border-radius:4px;border-radius:var(--kui-border-radius-20, 4px);color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);cursor:pointer;outline:none;padding:4px;padding:var(--kui-space-20, 4px);transition:background-color .2s ease-in,color .2s ease-in}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .navigate-back[data-v-b614e5cd]:hover,.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button[data-v-b614e5cd]:hover{color:#0d0e14;color:var(--kui-color-text, #0d0e14)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .navigate-back[data-v-b614e5cd]:focus-visible,.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button[data-v-b614e5cd]:focus-visible{box-shadow:0 0 0 4px #0044f433;box-shadow:var(--kui-shadow-focus, 0px 0px 0px 4px rgba(0, 68, 244, .2))}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .page-layout-title-wrapper[data-v-b614e5cd]{min-width:0;overflow:hidden}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .page-layout-title-wrapper[data-v-b614e5cd]>*{color:#0d0e14;color:var(--kui-color-text, #0d0e14);font-size:18px;font-size:var(--kui-font-size-50, 18px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);line-height:24px;line-height:var(--kui-line-height-40, 24px);margin:0;margin:var(--kui-space-0, 0px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button-container[data-v-b614e5cd]{align-self:center;display:flex;margin-left:4px;margin-left:var(--kui-space-20, 4px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button-container .favorite-button[data-v-b614e5cd]{color:#afb7c5;color:var(--kui-color-text-neutral-weak, #afb7c5);padding:0;padding:var(--kui-space-0, 0px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button-container .favorite-button[data-v-b614e5cd]:hover{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button-container .favorite-button.active[data-v-b614e5cd]{color:#ffc400;color:var(--kui-color-text-warning-weak, #ffc400)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .title-after-container[data-v-b614e5cd]{align-items:flex-end;display:flex;gap:6px;gap:var(--kui-space-30, 6px);margin-left:4px;margin-left:var(--kui-space-20, 4px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-actions-container[data-v-b614e5cd]{align-items:center;display:flex;gap:6px;gap:var(--kui-space-30, 6px)}.kong-ui-public-page-layout .page-layout-header:not(:has(.page-layout-tabs)) .page-header-container[data-v-b614e5cd]{border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);padding:16px;padding:var(--kui-space-60, 16px)}.kong-ui-public-page-layout.new-appearance .page-layout-header[data-v-b614e5cd]{position:sticky;top:0;z-index:3}.kong-ui-public-page-layout.new-appearance .page-layout-header .page-header-container[data-v-b614e5cd]{align-items:center;padding:8px 16px 0;padding:var(--kui-space-40, 8px) var(--kui-space-60, 16px) var(--kui-space-0, 0px) var(--kui-space-60, 16px)}.kong-ui-public-page-layout.new-appearance .page-layout-header .page-header-container .page-header-start[data-v-b614e5cd]{align-items:center;display:flex;gap:4px;gap:var(--kui-space-20, 4px)}.kong-ui-public-page-layout.new-appearance .page-layout-header .page-header-container .page-header-start .title-container[data-v-b614e5cd]{align-items:center;min-width:0}.kong-ui-public-page-layout.new-appearance .page-layout-header .page-header-container .page-header-start .title-container .page-layout-title-wrapper[data-v-b614e5cd]{color:#0d0e14;color:var(--kui-color-text, #0d0e14);font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);line-height:16px;line-height:var(--kui-line-height-20, 16px);max-width:40ch;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-page-layout.new-appearance .page-layout-header .page-header-container .page-header-start .title-container .page-layout-title-wrapper[data-v-b614e5cd]>*{font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);max-width:40ch}.kong-ui-public-page-layout.new-appearance .page-layout-header .page-header-container .page-header-start .header-breadcrumbs[data-v-b614e5cd],.kong-ui-public-page-layout.new-appearance .page-layout-header .page-header-container .page-header-start .title-after-container[data-v-b614e5cd]{flex-shrink:0}.kong-ui-public-page-layout.new-appearance .page-layout-header:not(:has(.page-layout-tabs)) .page-header-container[data-v-b614e5cd]{box-sizing:border-box;height:44px;padding:8px 16px;padding:var(--kui-space-40, 8px) var(--kui-space-60, 16px)}.kong-ui-public-page-layout.new-appearance .page-layout-content-container[data-v-b614e5cd]{background-color:#fff;background-color:var(--kui-color-background, #ffffff)}.kong-ui-public-page-layout .page-layout-content-container[data-v-b614e5cd]{background-color:#f9fafb;background-color:var(--kui-color-background-neutral-weakest, #f9fafb);display:flex;flex-direction:column-reverse;gap:12px;gap:var(--kui-space-50, 12px);padding:16px;padding:var(--kui-space-60, 16px)}.kong-ui-public-page-layout .page-layout-content-container.has-nested-page-layout[data-v-b614e5cd]{padding:0;padding:var(--kui-space-0, 0px)}@container page-layout (min-width: 1024px){.kong-ui-public-page-layout .page-layout-content-container[data-v-b614e5cd]{flex-direction:row-reverse;gap:8px;gap:var(--kui-space-40, 8px)}}.kong-ui-public-page-layout .page-layout-content-container .page-layout-content[data-v-b614e5cd]{display:flex;flex-direction:column;gap:12px;gap:var(--kui-space-50, 12px);min-width:0;width:100%}.kong-ui-public-page-layout .page-layout-content-container .page-layout-aside-container[data-v-b614e5cd]{display:flex;flex-direction:column;gap:8px;gap:var(--kui-space-40, 8px)}@container page-layout (min-width: 1024px){.kong-ui-public-page-layout .page-layout-content-container .page-layout-aside-container[data-v-b614e5cd]{align-self:flex-start;flex-shrink:0;position:sticky;top:var(--v3ea7775c);width:400px}}.kong-ui-public-page-layout[data-v-b614e5cd] [data-anchor-attention]{animation:anchor-attention-b614e5cd 1s cubic-bezier(.2,0,0,1) both;animation:anchor-attention-b614e5cd calc(var(--kui-animation-duration-20, .2s) * 5) cubic-bezier(.2,0,0,1) both}@media(prefers-reduced-motion:reduce){.kong-ui-public-page-layout[data-v-b614e5cd] [data-anchor-attention]{animation-name:anchor-attention-still-b614e5cd}}@keyframes anchor-attention-b614e5cd{0%{box-shadow:0 0 color-mix(in srgb,#0044f4 80%,transparent);box-shadow:0 0 color-mix(in srgb,var(--kui-color-brand, #0044f4) 80%,transparent)}18%{box-shadow:0 0 0 4px color-mix(in srgb,#0044f4 70%,transparent);box-shadow:0 0 0 var(--kui-border-width-30, 4px) color-mix(in srgb,var(--kui-color-brand, #0044f4) 70%,transparent)}55%{box-shadow:0 0 0 8px color-mix(in srgb,#0044f4 28%,transparent);box-shadow:0 0 0 calc(var(--kui-border-width-30, 4px) * 2) color-mix(in srgb,var(--kui-color-brand, #0044f4) 28%,transparent)}to{box-shadow:0 0 0 12px color-mix(in srgb,#0044f4 0%,transparent);box-shadow:0 0 0 calc(var(--kui-border-width-30, 4px) * 3) color-mix(in srgb,var(--kui-color-brand, #0044f4) 0%,transparent)}}@keyframes anchor-attention-still-b614e5cd{0%,45%{box-shadow:0 0 0 2px color-mix(in srgb,#0044f4 70%,transparent);box-shadow:0 0 0 var(--kui-border-width-20, 2px) color-mix(in srgb,var(--kui-color-brand, #0044f4) 70%,transparent)}to{box-shadow:0 0 0 2px color-mix(in srgb,#0044f4 0%,transparent);box-shadow:0 0 0 var(--kui-border-width-20, 2px) color-mix(in srgb,var(--kui-color-brand, #0044f4) 0%,transparent)}}.kong-ui-public-about-card[data-v-48c05270]{container-type:inline-size}.kong-ui-public-about-card .about-card-description[data-v-48c05270]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);font-size:14px;font-size:var(--kui-font-size-30, 14px);line-height:20px;line-height:var(--kui-line-height-30, 20px);margin:0 0 16px;margin:var(--kui-space-0, 0px) var(--kui-space-0, 0px) var(--kui-space-60, 16px)}.kong-ui-public-about-card .about-card-skeleton[data-v-48c05270]{display:flex;flex-direction:column;gap:12px;gap:var(--kui-space-50, 12px)}.kong-ui-public-about-card .about-card-rows[data-v-48c05270]{display:flex;flex-direction:column;margin:0;margin:var(--kui-space-0, 0px)}.kong-ui-public-about-card .about-card-row[data-v-48c05270]{align-items:center;border-bottom:1px solid #e0e4ea;border-bottom:var(--kui-border-width-10, 1px) solid var(--kui-color-border, #e0e4ea);box-sizing:border-box;display:flex;gap:8px;gap:var(--kui-space-40, 8px);min-height:47px;padding:8px 0;padding:var(--kui-space-40, 8px) var(--kui-space-0, 0px)}.kong-ui-public-about-card .about-card-row[data-v-48c05270]:last-child{border-bottom:none;padding-bottom:0;padding-bottom:var(--kui-space-0, 0px)}.kong-ui-public-about-card .about-card-row[data-v-48c05270]:first-child{padding-top:0;padding-top:var(--kui-space-0, 0px)}.kong-ui-public-about-card .about-card-row-label[data-v-48c05270]{align-items:center;color:#0d0e14;color:var(--kui-color-text, #0d0e14);display:flex;flex:0 0 auto;font-size:12px;font-size:var(--kui-font-size-20, 12px);font-weight:500;font-weight:var(--kui-font-weight-medium, 500);gap:4px;gap:var(--kui-space-20, 4px);line-height:16px;line-height:var(--kui-line-height-20, 16px);width:140px}.kong-ui-public-about-card .about-card-row-text[data-v-48c05270]{-webkit-box-orient:vertical;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere}.kong-ui-public-about-card .about-card-row-tooltip-trigger[data-v-48c05270]{align-items:center;background:none;border:none;color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);cursor:pointer;display:flex;padding:0;padding:var(--kui-space-0, 0px)}.kong-ui-public-about-card .about-card-row-value[data-v-48c05270]{color:#6c7489;color:var(--kui-color-text-neutral, #6c7489);flex:1 1 0;font-size:12px;font-size:var(--kui-font-size-20, 12px);line-height:16px;line-height:var(--kui-line-height-20, 16px);margin:0;margin:var(--kui-space-0, 0px);min-width:0;overflow-wrap:anywhere}.kong-ui-public-about-card .about-card-content[data-v-48c05270]{margin-top:8px;margin-top:var(--kui-space-40, 8px)}@container (max-width: 320px){.kong-ui-public-about-card .about-card-row[data-v-48c05270]{align-items:flex-start;flex-direction:column;gap:2px;gap:var(--kui-space-10, 2px)}.kong-ui-public-about-card .about-card-row-label[data-v-48c05270]{width:auto}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AboutCardProps, AboutCardSlots } from '../types';
|
|
2
|
+
type __VLS_Slots = AboutCardSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<AboutCardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AboutCardProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=AboutCard.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AboutCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/AboutCard.vue"],"names":[],"mappings":"AA4OA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAY9D,KAAK,WAAW,GAAG,cAAc,CAAC;AAwMlC,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,12 @@
|
|
|
1
|
+
import type { PageLayoutProps, PageLayoutSlots } from '../types';
|
|
2
|
+
type __VLS_Slots = PageLayoutSlots;
|
|
3
|
+
declare const __VLS_base: import("vue").DefineComponent<PageLayoutProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageLayoutProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8
|
+
new (): {
|
|
9
|
+
$slots: S;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=PageLayout.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PageLayout.vue"],"names":[],"mappings":"AA8lBA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAoB,MAAM,UAAU,CAAA;AAqBlF,KAAK,WAAW,GAAG,eAAe,CAAC;AA8cnC,QAAA,MAAM,UAAU,0SAEd,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,5 @@
|
|
|
1
|
+
import type { PageLayoutAnchorNavigationProps } from '../types';
|
|
2
|
+
declare const __VLS_export: import("vue").DefineComponent<PageLayoutAnchorNavigationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageLayoutAnchorNavigationProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
3
|
+
declare const _default: typeof __VLS_export;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=PageLayoutAnchorNavigation.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayoutAnchorNavigation.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PageLayoutAnchorNavigation.vue"],"names":[],"mappings":"AA0vBA,OAAO,KAAK,EAAoB,+BAA+B,EAAE,MAAM,UAAU,CAAA;AAiwBjF,QAAA,MAAM,YAAY,0UAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PageLayoutTabsProps, PageLayoutTab } from '../types';
|
|
2
|
+
declare var __VLS_11: `tab-${string}`, __VLS_12: {
|
|
3
|
+
tab: PageLayoutTab;
|
|
4
|
+
}, __VLS_33: `tab-${string}`, __VLS_34: {
|
|
5
|
+
tab: PageLayoutTab;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
[K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
|
|
9
|
+
} & {
|
|
10
|
+
[K in NonNullable<typeof __VLS_33>]?: (props: typeof __VLS_34) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<PageLayoutTabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PageLayoutTabsProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=PageLayoutTabs.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayoutTabs.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PageLayoutTabs.vue"],"names":[],"mappings":"AA8SA,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AA8TlE,QAAA,IAAI,QAAQ,iBAAW,EAAE,QAAQ;;CAAU,EAAE,QAAQ,iBAAW,EAAE,QAAQ;;CAAY,CAAE;AACxF,KAAK,WAAW,GAAG,EAAE,GACnB;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG;CAAE,GACzE;KAAG,CAAC,IAAI,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG;CAAE,CAAC;AAQ5E,QAAA,MAAM,UAAU,kTAEd,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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;;;;AAE/B,wBAEC"}
|
|
@@ -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/composables/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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,6BAA6B,CAAA;AACpD,OAAO,SAAS,MAAM,4BAA4B,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,CAAA;AAEhC,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAA;AAExD,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const nestedPageLayoutInjectionKey: unique symbol;
|
|
2
|
+
/**
|
|
3
|
+
* Injection key for the boolean (or ref/getter) that tells PageLayout to render the new
|
|
4
|
+
* page header appearance.
|
|
5
|
+
*/
|
|
6
|
+
export declare const NEW_APPEARANCE_INJECTION_KEY = "page-layout:new-appearance";
|
|
7
|
+
//# sourceMappingURL=symbols.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../src/symbols.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,eAAyC,CAAA;AAElF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,+BAA+B,CAAA"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export interface AboutCardRow {
|
|
2
|
+
/**
|
|
3
|
+
* Unique key for the row. Also used to build the per-row slot names:
|
|
4
|
+
* `label-${key}` and `row-${key}`.
|
|
5
|
+
*/
|
|
6
|
+
key: string;
|
|
7
|
+
/** Label text. Ignored when the `label-${key}` slot is provided. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Informational tooltip rendered next to the label. */
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
/** Value text. Ignored when the `row-${key}` slot is provided. */
|
|
12
|
+
value?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AboutCardProps {
|
|
15
|
+
/** Card title */
|
|
16
|
+
title?: string;
|
|
17
|
+
/** HTML element the title is rendered as */
|
|
18
|
+
titleTag?: 'div' | 'p' | 'span' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
19
|
+
/** Description rendered above the rows */
|
|
20
|
+
description?: string;
|
|
21
|
+
/** The label/value rows */
|
|
22
|
+
rows?: AboutCardRow[];
|
|
23
|
+
/** Render skeleton placeholders instead of the rows */
|
|
24
|
+
isLoading?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface AboutCardSlots {
|
|
27
|
+
/** Content rendered below the rows */
|
|
28
|
+
default?(): any;
|
|
29
|
+
/** Card title */
|
|
30
|
+
title?(): any;
|
|
31
|
+
/** Description rendered above the rows */
|
|
32
|
+
description?(): any;
|
|
33
|
+
/** Action elements rendered to the right of the card title */
|
|
34
|
+
actions?(): any;
|
|
35
|
+
/** Overrides the label of the row with the matching key */
|
|
36
|
+
[key: `label-${string}`]: (props: {
|
|
37
|
+
row: AboutCardRow;
|
|
38
|
+
}) => any;
|
|
39
|
+
/** Overrides the value of the row with the matching key */
|
|
40
|
+
[key: `row-${string}`]: (props: {
|
|
41
|
+
row: AboutCardRow;
|
|
42
|
+
}) => any;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=about-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"about-card.d.ts","sourceRoot":"","sources":["../../../src/types/about-card.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAA;IACX,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,KAAK,GAAG,GAAG,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAClE,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2BAA2B;IAC3B,IAAI,CAAC,EAAE,YAAY,EAAE,CAAA;IACrB,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,sCAAsC;IACtC,OAAO,CAAC,IAAI,GAAG,CAAA;IACf,iBAAiB;IACjB,KAAK,CAAC,IAAI,GAAG,CAAA;IACb,0CAA0C;IAC1C,WAAW,CAAC,IAAI,GAAG,CAAA;IACnB,8DAA8D;IAC9D,OAAO,CAAC,IAAI,GAAG,CAAA;IACf,2DAA2D;IAC3D,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE;QAAE,GAAG,EAAE,YAAY,CAAA;KAAE,KAAK,GAAG,CAAA;IAC/D,2DAA2D;IAC3D,CAAC,GAAG,EAAE,OAAO,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE;QAAE,GAAG,EAAE,YAAY,CAAA;KAAE,KAAK,GAAG,CAAA;CAC9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,cAAc,iCAAiC,CAAA;AAC/C,cAAc,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface PageLayoutAnchor {
|
|
2
|
+
/**
|
|
3
|
+
* A CSS selector matching the section this item scrolls to (`#usage`, `[data-anchor="usage"]`, ...).
|
|
4
|
+
* A bare identifier (`usage`) is also accepted and looked up as `#usage`.
|
|
5
|
+
* Doubles as the item's unique key, so it must be unique within the list.
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/** The display text of the navigation item */
|
|
9
|
+
label: string;
|
|
10
|
+
/**
|
|
11
|
+
* The section element itself, for pages that hold a template ref rather than a selector.
|
|
12
|
+
* Takes precedence over `id`, which is then only used as the item's key.
|
|
13
|
+
*/
|
|
14
|
+
element?: HTMLElement | null;
|
|
15
|
+
/**
|
|
16
|
+
* Pixels left between the top of the scrolling container and the section once it has been
|
|
17
|
+
* scrolled to. Defaults to the height of the sticky page header plus a small gap.
|
|
18
|
+
*/
|
|
19
|
+
offset?: number;
|
|
20
|
+
/** The data-testid attribute to apply to the navigation item. Auto-generated if not provided */
|
|
21
|
+
dataTestId?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface PageLayoutAnchorNavigationProps {
|
|
24
|
+
anchors?: PageLayoutAnchor[];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=page-layout-anchor-navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-layout-anchor-navigation.d.ts","sourceRoot":"","sources":["../../../src/types/page-layout-anchor-navigation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAA;IACV,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,gGAAgG;IAChG,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAC7B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
export interface PageLayoutTab {
|
|
3
|
+
/** The unique kebab-case key of the tab */
|
|
4
|
+
key: string;
|
|
5
|
+
/** The display text of the navbar tab */
|
|
6
|
+
label: string;
|
|
7
|
+
/** The [Vue Router `to` object](https://router.vuejs.org/api/interfaces/RouterLinkProps.html#to) or a URL path (relative or absolute) to navigate to on click */
|
|
8
|
+
to: string | RouteLocationRaw;
|
|
9
|
+
/** Is the navbar tab active */
|
|
10
|
+
active?: boolean;
|
|
11
|
+
/** The data-testid attribute to apply to the navbar tab. Auto-generated if not provided */
|
|
12
|
+
dataTestId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface PageLayoutTabsProps {
|
|
15
|
+
tabs?: PageLayoutTab[];
|
|
16
|
+
}
|
|
17
|
+
export interface PageLayoutTabsSlots {
|
|
18
|
+
[key: `tab-${string}`]: (props: {
|
|
19
|
+
tab: PageLayoutTab;
|
|
20
|
+
}) => any;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=page-layout-tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-layout-tabs.d.ts","sourceRoot":"","sources":["../../../src/types/page-layout-tabs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,aAAa;IAC5B,2CAA2C;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,iKAAiK;IACjK,EAAE,EAAE,MAAM,GAAG,gBAAgB,CAAA;IAC7B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2FAA2F;IAC3F,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,aAAa,EAAE,CAAA;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,OAAO,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE;QAAE,GAAG,EAAE,aAAa,CAAA;KAAE,KAAK,GAAG,CAAA;CAC/D"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { BreadcrumbItem } from '@kong/kongponents';
|
|
2
|
+
import type { PageLayoutAnchor, PageLayoutTab } from './';
|
|
3
|
+
import type { RouteLocationRaw } from 'vue-router';
|
|
4
|
+
export interface PageShortcutData {
|
|
5
|
+
/** The display label of the page shortcut */
|
|
6
|
+
label: string;
|
|
7
|
+
/** The URL path of the page shortcut */
|
|
8
|
+
path?: string;
|
|
9
|
+
/** The entity type of the page shortcut (snake_case, e.g. "gateway_service") */
|
|
10
|
+
entityType: string;
|
|
11
|
+
/** The display label of the parent entity */
|
|
12
|
+
parentLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface PageLayoutProps {
|
|
15
|
+
/** Breadcrumb items */
|
|
16
|
+
breadcrumbs?: BreadcrumbItem[];
|
|
17
|
+
/** Page title */
|
|
18
|
+
title?: string;
|
|
19
|
+
/** The URL to navigate back to when the back button is clicked */
|
|
20
|
+
backTo?: string | RouteLocationRaw;
|
|
21
|
+
/** Tabs */
|
|
22
|
+
tabs?: PageLayoutTab[];
|
|
23
|
+
/**
|
|
24
|
+
* In-page sections the header's anchor navigation bar scrolls to. New appearance only, and
|
|
25
|
+
* ignored when `tabs` are provided -- the header shows one or the other, never both.
|
|
26
|
+
*/
|
|
27
|
+
anchors?: PageLayoutAnchor[];
|
|
28
|
+
/** Providing this prop "marks" the current page as an entity page that can be added to shortcuts (favorites and recents) */
|
|
29
|
+
pageShortcutData?: PageShortcutData;
|
|
30
|
+
}
|
|
31
|
+
export interface PageLayoutSlots {
|
|
32
|
+
/**
|
|
33
|
+
* Default slot for page content
|
|
34
|
+
*/
|
|
35
|
+
default?(): any;
|
|
36
|
+
/**
|
|
37
|
+
* Actions slot for page actions
|
|
38
|
+
*/
|
|
39
|
+
actions?(): any;
|
|
40
|
+
/**
|
|
41
|
+
* Title slot for page title
|
|
42
|
+
*/
|
|
43
|
+
title?(): any;
|
|
44
|
+
/**
|
|
45
|
+
* Title after slot for page title after content
|
|
46
|
+
*/
|
|
47
|
+
'title-after'?(): any;
|
|
48
|
+
/**
|
|
49
|
+
* Aside slot for secondary content rendered beside the page content.
|
|
50
|
+
* Only rendered in the new appearance.
|
|
51
|
+
*/
|
|
52
|
+
aside?(): any;
|
|
53
|
+
/**
|
|
54
|
+
* Per-tab slot for customizing the rendering of a specific tab. Slot name is `tab-${tab.key}`.
|
|
55
|
+
*/
|
|
56
|
+
[key: `tab-${string}`]: (props: {
|
|
57
|
+
tab: PageLayoutTab;
|
|
58
|
+
}) => any;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=page-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page-layout.d.ts","sourceRoot":"","sources":["../../../src/types/page-layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,IAAI,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAElD,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,UAAU,EAAE,MAAM,CAAA;IAClB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,uBAAuB;IACvB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAA;IAC9B,iBAAiB;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAA;IAClC,WAAW;IACX,IAAI,CAAC,EAAE,aAAa,EAAE,CAAA;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC5B,4HAA4H;IAC5H,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,CAAC,IAAI,GAAG,CAAA;IACf;;OAEG;IACH,OAAO,CAAC,IAAI,GAAG,CAAA;IACf;;OAEG;IACH,KAAK,CAAC,IAAI,GAAG,CAAA;IACb;;OAEG;IACH,aAAa,CAAC,IAAI,GAAG,CAAA;IACrB;;;OAGG;IACH,KAAK,CAAC,IAAI,GAAG,CAAA;IACb;;OAEG;IACH,CAAC,GAAG,EAAE,OAAO,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE;QAAE,GAAG,EAAE,aAAa,CAAA;KAAE,KAAK,GAAG,CAAA;CAC/D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/page-layout",
|
|
3
|
-
"version": "1.3.5
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/page-layout.umd.js",
|
|
6
6
|
"module": "./dist/page-layout.es.js",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@kong-ui-public/i18n": "^2.5.1",
|
|
25
|
-
"@kong-ui-public/sandbox-layout": "^2.8.
|
|
26
|
-
"@kong/design-tokens": "3.4.
|
|
25
|
+
"@kong-ui-public/sandbox-layout": "^2.8.3",
|
|
26
|
+
"@kong/design-tokens": "3.4.5",
|
|
27
27
|
"@kong/icons": "^1.64.0",
|
|
28
|
-
"@kong/kongponents": "9.66.
|
|
28
|
+
"@kong/kongponents": "9.66.7",
|
|
29
29
|
"vue": "^3.5.43",
|
|
30
30
|
"vue-router": "^5.3.1"
|
|
31
31
|
},
|