@kong-ui-public/page-layout 1.1.4 → 1.1.6
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 +220 -205
- package/dist/page-layout.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/page-layout.es.js
CHANGED
|
@@ -1,204 +1,219 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useRouter as
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import { ChevronDownIcon as
|
|
5
|
-
const
|
|
6
|
-
back_button:
|
|
1
|
+
import { shallowRef as Q, shallowReadonly as rt, getCurrentScope as lt, onScopeDispose as ct, toValue as N, watch as G, computed as T, getCurrentInstance as dt, onMounted as X, defineComponent as Y, useCssVars as vt, unref as f, inject as L, useTemplateRef as Z, ref as K, onBeforeUnmount as ft, resolveComponent as D, openBlock as s, createElementBlock as y, createElementVNode as w, normalizeClass as O, Fragment as V, renderList as z, createBlock as _, resolveDynamicComponent as j, mergeProps as tt, withKeys as et, withModifiers as x, withCtx as C, renderSlot as P, createTextVNode as W, toDisplayString as F, createVNode as R, createCommentVNode as k, nextTick as H, provide as bt, onUnmounted as pt, createSlots as yt, normalizeProps as ht, guardReactiveProps as gt } from "vue";
|
|
2
|
+
import { useRouter as at, useRoute as mt } from "vue-router";
|
|
3
|
+
import { createI18n as kt, i18nTComponent as Tt } from "@kong-ui-public/i18n";
|
|
4
|
+
import { ChevronDownIcon as wt, ArrowTopLeftIcon as St, StarFillIcon as $t, StarIcon as _t } from "@kong/icons";
|
|
5
|
+
const Pt = "Go back", Ct = { save_shortcut: "Save page to shortcuts", remove_shortcut: "Remove page from shortcuts" }, It = { more_button: { label: "More", aria_label: "More tabs" } }, Dt = {
|
|
6
|
+
back_button: Pt,
|
|
7
7
|
favorite_button: Ct,
|
|
8
8
|
tabs: It
|
|
9
9
|
};
|
|
10
|
-
function
|
|
11
|
-
const t =
|
|
10
|
+
function Bt() {
|
|
11
|
+
const t = kt("en-us", Dt);
|
|
12
12
|
return {
|
|
13
13
|
i18n: t,
|
|
14
|
-
i18nT:
|
|
14
|
+
i18nT: Tt(t)
|
|
15
15
|
// Translation component <i18n-t>
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
useI18n:
|
|
20
|
-
}, M = "16px",
|
|
21
|
-
function
|
|
22
|
-
return
|
|
18
|
+
const ot = {
|
|
19
|
+
useI18n: Bt
|
|
20
|
+
}, M = "16px", Kt = "16px";
|
|
21
|
+
function Rt(t, n) {
|
|
22
|
+
return lt() ? (ct(t, n), !0) : !1;
|
|
23
23
|
}
|
|
24
24
|
const Lt = typeof window < "u" && typeof document < "u";
|
|
25
25
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
26
|
-
const
|
|
26
|
+
const I = () => {
|
|
27
27
|
};
|
|
28
|
-
function
|
|
29
|
-
function e(...
|
|
30
|
-
return new Promise((
|
|
31
|
-
Promise.resolve(t(() =>
|
|
32
|
-
fn:
|
|
28
|
+
function zt(t, n) {
|
|
29
|
+
function e(...a) {
|
|
30
|
+
return new Promise((c, i) => {
|
|
31
|
+
Promise.resolve(t(() => n.apply(this, a), {
|
|
32
|
+
fn: n,
|
|
33
33
|
thisArg: this,
|
|
34
|
-
args:
|
|
35
|
-
})).then(
|
|
34
|
+
args: a
|
|
35
|
+
})).then(c).catch(i);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
return e
|
|
38
|
+
return "cancel" in t && Object.assign(e, {
|
|
39
|
+
cancel: t.cancel,
|
|
40
|
+
flush: t.flush,
|
|
41
|
+
isPending: t.isPending
|
|
42
|
+
}), e;
|
|
39
43
|
}
|
|
40
|
-
function
|
|
41
|
-
let e,
|
|
42
|
-
const
|
|
43
|
-
clearTimeout(r),
|
|
44
|
-
};
|
|
45
|
-
let p;
|
|
46
|
-
return (r) => {
|
|
47
|
-
const f = F(t), l = F(o.maxWait);
|
|
48
|
-
return e && i(e), f <= 0 || l !== void 0 && l <= 0 ? (n && (i(n), n = void 0), Promise.resolve(r())) : new Promise((u, T) => {
|
|
49
|
-
d = o.rejectOnCancel ? T : u, p = r, l && !n && (n = setTimeout(() => {
|
|
50
|
-
e && i(e), n = void 0, u(p());
|
|
51
|
-
}, l)), e = setTimeout(() => {
|
|
52
|
-
n && i(n), n = void 0, u(r());
|
|
53
|
-
}, f);
|
|
54
|
-
});
|
|
44
|
+
function Ft(t, n = {}) {
|
|
45
|
+
let e, a, c = I, i = I;
|
|
46
|
+
const u = Q(!1), l = (r) => {
|
|
47
|
+
clearTimeout(r), c(), c = I;
|
|
55
48
|
};
|
|
49
|
+
let d;
|
|
50
|
+
return Object.assign((r) => {
|
|
51
|
+
const v = N(t), g = N(n.maxWait);
|
|
52
|
+
return e && l(e), v <= 0 || g !== void 0 && g <= 0 ? (a && (l(a), a = void 0), u.value = !1, Promise.resolve(r())) : (u.value = !0, new Promise((b, S) => {
|
|
53
|
+
c = n.rejectOnCancel ? S : b, i = b, d = r, g && !a && (a = setTimeout(() => {
|
|
54
|
+
e && l(e), a = void 0, u.value = !1, b(d());
|
|
55
|
+
}, g)), e = setTimeout(() => {
|
|
56
|
+
a && l(a), a = void 0, u.value = !1, b(r());
|
|
57
|
+
}, v);
|
|
58
|
+
}));
|
|
59
|
+
}, {
|
|
60
|
+
cancel: () => {
|
|
61
|
+
e && (l(e), e = void 0), a && (l(a), a = void 0), u.value = !1, i = I;
|
|
62
|
+
},
|
|
63
|
+
flush: () => {
|
|
64
|
+
if (u.value) {
|
|
65
|
+
e && (clearTimeout(e), e = void 0), a && (clearTimeout(a), a = void 0), u.value = !1;
|
|
66
|
+
const r = i;
|
|
67
|
+
c = I, i = I, r(d());
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
isPending: rt(u)
|
|
71
|
+
});
|
|
56
72
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return Rt(zt(o, e), t);
|
|
73
|
+
function Nt(t, n = 200, e = {}) {
|
|
74
|
+
return zt(Ft(n, e), t);
|
|
60
75
|
}
|
|
61
|
-
const
|
|
76
|
+
const Ot = Lt ? window : void 0;
|
|
62
77
|
function q(t) {
|
|
63
|
-
var
|
|
64
|
-
const e =
|
|
65
|
-
return (
|
|
78
|
+
var n;
|
|
79
|
+
const e = N(t);
|
|
80
|
+
return (n = e?.$el) !== null && n !== void 0 ? n : e;
|
|
66
81
|
}
|
|
67
82
|
// @__NO_SIDE_EFFECTS__
|
|
68
83
|
function xt() {
|
|
69
|
-
const t =
|
|
70
|
-
return
|
|
84
|
+
const t = Q(!1), n = dt();
|
|
85
|
+
return n && X(() => {
|
|
71
86
|
t.value = !0;
|
|
72
|
-
},
|
|
87
|
+
}, n), t;
|
|
73
88
|
}
|
|
74
89
|
// @__NO_SIDE_EFFECTS__
|
|
75
90
|
function Et(t) {
|
|
76
|
-
const
|
|
77
|
-
return
|
|
91
|
+
const n = /* @__PURE__ */ xt();
|
|
92
|
+
return T(() => (n.value, !!t()));
|
|
78
93
|
}
|
|
79
|
-
function At(t,
|
|
80
|
-
const { window:
|
|
94
|
+
function At(t, n, e = {}) {
|
|
95
|
+
const { window: a = Ot, ...c } = e;
|
|
81
96
|
let i;
|
|
82
|
-
const
|
|
97
|
+
const u = /* @__PURE__ */ Et(() => a && "ResizeObserver" in a), l = () => {
|
|
83
98
|
i && (i.disconnect(), i = void 0);
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
-
return Array.isArray(
|
|
87
|
-
}), (
|
|
88
|
-
if (
|
|
89
|
-
i = new ResizeObserver(
|
|
90
|
-
for (const
|
|
99
|
+
}, d = G(T(() => {
|
|
100
|
+
const r = N(t);
|
|
101
|
+
return Array.isArray(r) ? r.map((v) => q(v)) : [q(r)];
|
|
102
|
+
}), (r) => {
|
|
103
|
+
if (l(), u.value && a) {
|
|
104
|
+
i = new ResizeObserver(n);
|
|
105
|
+
for (const v of r) v && i.observe(v, c);
|
|
91
106
|
}
|
|
92
107
|
}, {
|
|
93
108
|
immediate: !0,
|
|
94
109
|
flush: "post"
|
|
95
|
-
}),
|
|
96
|
-
|
|
110
|
+
}), h = () => {
|
|
111
|
+
l(), d();
|
|
97
112
|
};
|
|
98
|
-
return
|
|
99
|
-
isSupported:
|
|
100
|
-
stop:
|
|
113
|
+
return Rt(h), {
|
|
114
|
+
isSupported: u,
|
|
115
|
+
stop: h
|
|
101
116
|
};
|
|
102
117
|
}
|
|
103
|
-
const
|
|
118
|
+
const Vt = {
|
|
104
119
|
ref: "page-layout-tabs",
|
|
105
120
|
class: "page-layout-tabs",
|
|
106
121
|
"data-testid": "page-layout-tabs"
|
|
107
|
-
},
|
|
122
|
+
}, Wt = { key: 0 }, jt = ["aria-label"], Mt = {
|
|
108
123
|
key: 0,
|
|
109
124
|
class: "layout-loader-container"
|
|
110
|
-
},
|
|
125
|
+
}, Gt = /* @__PURE__ */ Y({
|
|
111
126
|
__name: "PageLayoutTabs",
|
|
112
127
|
props: {
|
|
113
128
|
tabs: { default: () => [] }
|
|
114
129
|
},
|
|
115
130
|
setup(t) {
|
|
116
|
-
|
|
117
|
-
v94e59ca2:
|
|
131
|
+
vt((p) => ({
|
|
132
|
+
v94e59ca2: f(i)
|
|
118
133
|
}));
|
|
119
|
-
const { i18n: { t:
|
|
120
|
-
if (typeof
|
|
121
|
-
e.push(
|
|
134
|
+
const { i18n: { t: n } } = ot.useI18n(), e = at(), a = L("app:navigateTo", null), c = (p) => {
|
|
135
|
+
if (typeof p.to != "string") {
|
|
136
|
+
e.push(p.to);
|
|
122
137
|
return;
|
|
123
138
|
}
|
|
124
|
-
if (typeof
|
|
125
|
-
window.location.href =
|
|
139
|
+
if (typeof a != "function") {
|
|
140
|
+
window.location.href = p.to;
|
|
126
141
|
return;
|
|
127
142
|
}
|
|
128
|
-
|
|
129
|
-
}, i =
|
|
130
|
-
if (!
|
|
143
|
+
a(p.to);
|
|
144
|
+
}, i = Kt, u = Z("page-layout-tabs"), l = Z("page-layout-tabs-list"), d = K(t.tabs.length), h = K(!1), r = T(() => t.tabs.slice(0, d.value)), v = T(() => t.tabs.slice(d.value)), g = async () => {
|
|
145
|
+
if (!u.value || !l.value)
|
|
131
146
|
return;
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
let
|
|
135
|
-
if (!
|
|
136
|
-
|
|
147
|
+
h.value = !1, d.value = t.tabs.length, await H();
|
|
148
|
+
const p = u.value?.getBoundingClientRect().width - parseInt(i) * 2;
|
|
149
|
+
let $ = l.value?.getBoundingClientRect().width;
|
|
150
|
+
if (!p || !$) {
|
|
151
|
+
h.value = !0;
|
|
137
152
|
return;
|
|
138
153
|
}
|
|
139
|
-
const
|
|
140
|
-
for (;
|
|
141
|
-
|
|
142
|
-
|
|
154
|
+
const B = 50;
|
|
155
|
+
for (; $ + B > p && d.value > 1; )
|
|
156
|
+
d.value--, await H(), $ = l.value?.getBoundingClientRect().width || 0;
|
|
157
|
+
h.value = !0;
|
|
143
158
|
};
|
|
144
|
-
let
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
159
|
+
let b = null;
|
|
160
|
+
const S = () => {
|
|
161
|
+
b && clearTimeout(b), b = setTimeout(() => {
|
|
162
|
+
g();
|
|
148
163
|
}, 150);
|
|
149
164
|
};
|
|
150
|
-
return
|
|
151
|
-
|
|
152
|
-
}),
|
|
153
|
-
|
|
154
|
-
}),
|
|
155
|
-
|
|
156
|
-
}, { deep: !0 }), (
|
|
157
|
-
const
|
|
158
|
-
return s(),
|
|
165
|
+
return X(() => {
|
|
166
|
+
g(), At(u, S);
|
|
167
|
+
}), ft(() => {
|
|
168
|
+
b && clearTimeout(b);
|
|
169
|
+
}), G(() => t.tabs, () => {
|
|
170
|
+
g();
|
|
171
|
+
}, { deep: !0 }), (p, $) => {
|
|
172
|
+
const B = D("KDropdownItem"), E = D("KDropdown"), m = D("KSkeletonBox");
|
|
173
|
+
return s(), y("nav", Vt, [
|
|
159
174
|
w("ul", {
|
|
160
175
|
ref: "page-layout-tabs-list",
|
|
161
|
-
class:
|
|
176
|
+
class: O({ "layout-computing": !h.value })
|
|
162
177
|
}, [
|
|
163
|
-
(s(!0),
|
|
164
|
-
key: `${
|
|
178
|
+
(s(!0), y(V, null, z(r.value, (o) => (s(), y("li", {
|
|
179
|
+
key: `${o.key}-tab`
|
|
165
180
|
}, [
|
|
166
|
-
(s(),
|
|
167
|
-
"aria-current":
|
|
168
|
-
class: ["tab-link", { active:
|
|
169
|
-
"data-testid":
|
|
181
|
+
(s(), _(j(typeof o.to == "string" ? "a" : "router-link"), tt({ ref_for: !0 }, typeof o.to == "string" ? { href: o.to } : { to: o.to }, {
|
|
182
|
+
"aria-current": o.active ? "page" : void 0,
|
|
183
|
+
class: ["tab-link", { active: o.active }],
|
|
184
|
+
"data-testid": o.dataTestId ? o.dataTestId : `page-layout-tab-${o.key}`,
|
|
170
185
|
tabindex: "0",
|
|
171
|
-
onClick: x((A) =>
|
|
172
|
-
onKeydown:
|
|
186
|
+
onClick: x((A) => c(o), ["prevent"]),
|
|
187
|
+
onKeydown: et(x((A) => c(o), ["prevent"]), ["enter"])
|
|
173
188
|
}), {
|
|
174
189
|
default: C(() => [
|
|
175
|
-
|
|
176
|
-
|
|
190
|
+
P(p.$slots, `tab-${o.key}`, { tab: o }, () => [
|
|
191
|
+
W(F(o.label), 1)
|
|
177
192
|
], !0)
|
|
178
193
|
]),
|
|
179
194
|
_: 2
|
|
180
195
|
}, 1040, ["aria-current", "class", "data-testid", "onClick", "onKeydown"]))
|
|
181
196
|
]))), 128)),
|
|
182
|
-
t.tabs.length >
|
|
183
|
-
|
|
197
|
+
t.tabs.length > d.value ? (s(), y("li", Wt, [
|
|
198
|
+
R(E, { "kpop-attributes": {
|
|
184
199
|
placement: "bottom-end",
|
|
185
200
|
popoverElementAttributes: { "data-testid": "tabs-overflow-dropdown-popover" }
|
|
186
201
|
} }, {
|
|
187
202
|
items: C(() => [
|
|
188
|
-
(s(!0),
|
|
189
|
-
key: `${
|
|
190
|
-
"aria-current":
|
|
191
|
-
"data-testid":
|
|
203
|
+
(s(!0), y(V, null, z(v.value, (o) => (s(), _(B, {
|
|
204
|
+
key: `${o.key}-dropdown-item`,
|
|
205
|
+
"aria-current": o.active ? "page" : void 0,
|
|
206
|
+
"data-testid": o.dataTestId ? o.dataTestId : `page-layout-tab-${o.key}`,
|
|
192
207
|
item: {
|
|
193
|
-
label:
|
|
194
|
-
value:
|
|
195
|
-
to:
|
|
208
|
+
label: o.label,
|
|
209
|
+
value: o.key,
|
|
210
|
+
to: o.to
|
|
196
211
|
},
|
|
197
|
-
selected:
|
|
212
|
+
selected: o.active
|
|
198
213
|
}, {
|
|
199
214
|
default: C(() => [
|
|
200
|
-
|
|
201
|
-
|
|
215
|
+
P(p.$slots, `tab-${o.key}`, { tab: o }, () => [
|
|
216
|
+
W(F(o.label), 1)
|
|
202
217
|
], !0)
|
|
203
218
|
]),
|
|
204
219
|
_: 2
|
|
@@ -206,24 +221,24 @@ const Ot = {
|
|
|
206
221
|
]),
|
|
207
222
|
default: C(() => [
|
|
208
223
|
w("button", {
|
|
209
|
-
"aria-label":
|
|
210
|
-
class:
|
|
224
|
+
"aria-label": f(n)("tabs.more_button.aria_label"),
|
|
225
|
+
class: O(["tab-link", { active: v.value.find((o) => o.active) }]),
|
|
211
226
|
"data-testid": "tabs-overflow-dropdown-button"
|
|
212
227
|
}, [
|
|
213
|
-
|
|
214
|
-
|
|
228
|
+
W(F(f(n)("tabs.more_button.label")) + " ", 1),
|
|
229
|
+
R(f(wt), {
|
|
215
230
|
decorative: "",
|
|
216
|
-
size: `var(--kui-icon-size-30, ${
|
|
231
|
+
size: `var(--kui-icon-size-30, ${f(M)})`
|
|
217
232
|
}, null, 8, ["size"])
|
|
218
|
-
], 10,
|
|
233
|
+
], 10, jt)
|
|
219
234
|
]),
|
|
220
235
|
_: 3
|
|
221
236
|
})
|
|
222
|
-
])) :
|
|
237
|
+
])) : k("", !0)
|
|
223
238
|
], 2),
|
|
224
|
-
|
|
225
|
-
(s(),
|
|
226
|
-
key: `layout-loader-${
|
|
239
|
+
h.value ? k("", !0) : (s(), y("div", Mt, [
|
|
240
|
+
(s(), y(V, null, z(3, (o) => R(m, {
|
|
241
|
+
key: `layout-loader-${o}`,
|
|
227
242
|
height: "1",
|
|
228
243
|
width: "5"
|
|
229
244
|
})), 64))
|
|
@@ -231,31 +246,31 @@ const Ot = {
|
|
|
231
246
|
], 512);
|
|
232
247
|
};
|
|
233
248
|
}
|
|
234
|
-
}),
|
|
249
|
+
}), nt = (t, n) => {
|
|
235
250
|
const e = t.__vccOpts || t;
|
|
236
|
-
for (const [
|
|
237
|
-
e[
|
|
251
|
+
for (const [a, c] of n)
|
|
252
|
+
e[a] = c;
|
|
238
253
|
return e;
|
|
239
|
-
},
|
|
254
|
+
}, Ut = /* @__PURE__ */ nt(Gt, [["__scopeId", "data-v-014ad9b1"]]), J = /* @__PURE__ */ Symbol("nested-page-layout-detection"), Zt = {
|
|
240
255
|
class: "kong-ui-public-page-layout",
|
|
241
256
|
"data-testid": "kong-ui-public-page-layout"
|
|
242
|
-
},
|
|
257
|
+
}, Ht = {
|
|
243
258
|
key: 0,
|
|
244
259
|
class: "page-layout-header",
|
|
245
260
|
"data-testid": "page-layout-header"
|
|
246
|
-
},
|
|
261
|
+
}, qt = { class: "page-header-container" }, Jt = { class: "page-header-start" }, Qt = { class: "title-container" }, Xt = {
|
|
247
262
|
key: 1,
|
|
248
263
|
class: "page-layout-title-wrapper"
|
|
249
|
-
},
|
|
264
|
+
}, Yt = {
|
|
250
265
|
class: "page-layout-title",
|
|
251
266
|
"data-testid": "page-layout-title"
|
|
252
|
-
},
|
|
267
|
+
}, te = ["aria-label"], ee = {
|
|
253
268
|
key: 3,
|
|
254
269
|
class: "title-after-container"
|
|
255
|
-
},
|
|
270
|
+
}, ae = {
|
|
256
271
|
key: 0,
|
|
257
272
|
class: "page-header-actions-container"
|
|
258
|
-
},
|
|
273
|
+
}, oe = /* @__PURE__ */ Y({
|
|
259
274
|
__name: "PageLayout",
|
|
260
275
|
props: {
|
|
261
276
|
breadcrumbs: { default: () => [] },
|
|
@@ -265,125 +280,125 @@ const Ot = {
|
|
|
265
280
|
pageShortcutData: {}
|
|
266
281
|
},
|
|
267
282
|
setup(t) {
|
|
268
|
-
const
|
|
283
|
+
const n = L("app:navigateTo", null), e = L("app:pageShortcutsContext", null), { i18n: { t: a } } = ot.useI18n(), c = at(), i = mt(), u = T(() => !!(t.tabs && t.tabs.length)), l = T(() => typeof t.backTo == "string"), d = T(() => !!t.pageShortcutData && !!t.pageShortcutData.entityType && !!t.pageShortcutData.label), h = T(() => d.value && !!e && "onFavoriteToggle" in e && typeof e.onFavoriteToggle == "function"), r = K(0), v = T(() => !!e && "isFavorite" in e && typeof e.isFavorite == "function" && e.isFavorite(t.pageShortcutData) === !0), g = async () => {
|
|
269
284
|
if (t.backTo) {
|
|
270
285
|
if (typeof t.backTo == "object") {
|
|
271
|
-
|
|
286
|
+
c.push(t.backTo);
|
|
272
287
|
return;
|
|
273
288
|
}
|
|
274
|
-
if (typeof
|
|
289
|
+
if (typeof n != "function") {
|
|
275
290
|
window.location.href = t.backTo;
|
|
276
291
|
return;
|
|
277
292
|
}
|
|
278
|
-
await
|
|
293
|
+
await n(t.backTo);
|
|
279
294
|
}
|
|
280
|
-
},
|
|
281
|
-
|
|
282
|
-
|
|
295
|
+
}, b = K(0), S = T(() => b.value > 0);
|
|
296
|
+
bt(J, () => (b.value++, () => {
|
|
297
|
+
b.value--;
|
|
283
298
|
}));
|
|
284
|
-
const
|
|
285
|
-
typeof
|
|
286
|
-
const
|
|
299
|
+
const p = L(J, null), $ = K(null);
|
|
300
|
+
typeof p == "function" && ($.value = p());
|
|
301
|
+
const B = () => {
|
|
287
302
|
e.onFavoriteToggle({ ...t.pageShortcutData, path: t.pageShortcutData?.path || i.fullPath });
|
|
288
303
|
};
|
|
289
|
-
|
|
290
|
-
|
|
304
|
+
pt(() => {
|
|
305
|
+
$.value?.();
|
|
291
306
|
});
|
|
292
|
-
const E =
|
|
293
|
-
!
|
|
307
|
+
const E = Nt(() => {
|
|
308
|
+
!S.value && d.value && e && "onEntityPageVisit" in e && typeof e.onEntityPageVisit == "function" && (e.onEntityPageVisit({ ...t.pageShortcutData, path: t.pageShortcutData?.path || i?.fullPath }), r.value++);
|
|
294
309
|
}, 500);
|
|
295
|
-
return
|
|
310
|
+
return G([() => t.pageShortcutData, () => i?.fullPath], () => {
|
|
296
311
|
E();
|
|
297
|
-
}, { immediate: !0, deep: !0 }), (m,
|
|
298
|
-
const A =
|
|
299
|
-
return s(),
|
|
300
|
-
|
|
301
|
-
w("div",
|
|
302
|
-
w("div",
|
|
303
|
-
t.breadcrumbs && t.breadcrumbs.length ? (s(),
|
|
312
|
+
}, { immediate: !0, deep: !0 }), (m, o) => {
|
|
313
|
+
const A = D("KBreadcrumbs"), st = D("KTooltip"), it = D("router-view");
|
|
314
|
+
return s(), y("div", Zt, [
|
|
315
|
+
S.value ? k("", !0) : (s(), y("div", Ht, [
|
|
316
|
+
w("div", qt, [
|
|
317
|
+
w("div", Jt, [
|
|
318
|
+
t.breadcrumbs && t.breadcrumbs.length ? (s(), _(A, {
|
|
304
319
|
key: 0,
|
|
305
320
|
class: "header-breadcrumbs",
|
|
306
321
|
"data-testid": "page-layout-breadcrumbs",
|
|
307
322
|
"item-max-width": "25ch",
|
|
308
323
|
items: t.breadcrumbs
|
|
309
|
-
}, null, 8, ["items"])) :
|
|
310
|
-
w("div",
|
|
311
|
-
t.backTo ? (s(),
|
|
312
|
-
"aria-label":
|
|
324
|
+
}, null, 8, ["items"])) : k("", !0),
|
|
325
|
+
w("div", Qt, [
|
|
326
|
+
t.backTo ? (s(), _(j(l.value ? "a" : "router-link"), tt({ key: 0 }, l.value ? { href: t.backTo } : { to: t.backTo }, {
|
|
327
|
+
"aria-label": f(a)("back_button"),
|
|
313
328
|
class: "navigate-back",
|
|
314
329
|
"data-testid": "page-layout-navigate-back",
|
|
315
330
|
tabindex: "0",
|
|
316
|
-
onClick: x(
|
|
317
|
-
onKeydown:
|
|
331
|
+
onClick: x(g, ["prevent"]),
|
|
332
|
+
onKeydown: et(x(g, ["prevent"]), ["enter"])
|
|
318
333
|
}), {
|
|
319
334
|
default: C(() => [
|
|
320
|
-
|
|
335
|
+
R(f(St), {
|
|
321
336
|
decorative: "",
|
|
322
|
-
size: `var(--kui-icon-size-30, ${
|
|
337
|
+
size: `var(--kui-icon-size-30, ${f(M)})`
|
|
323
338
|
}, null, 8, ["size"])
|
|
324
339
|
]),
|
|
325
340
|
_: 1
|
|
326
|
-
}, 16, ["aria-label", "onKeydown"])) :
|
|
327
|
-
t.title || m.$slots.title ? (s(),
|
|
328
|
-
|
|
329
|
-
w("h1",
|
|
341
|
+
}, 16, ["aria-label", "onKeydown"])) : k("", !0),
|
|
342
|
+
t.title || m.$slots.title ? (s(), y("span", Xt, [
|
|
343
|
+
P(m.$slots, "title", {}, () => [
|
|
344
|
+
w("h1", Yt, F(t.title), 1)
|
|
330
345
|
], !0)
|
|
331
|
-
])) :
|
|
332
|
-
|
|
333
|
-
key:
|
|
346
|
+
])) : k("", !0),
|
|
347
|
+
h.value ? (s(), y("div", {
|
|
348
|
+
key: r.value,
|
|
334
349
|
class: "favorite-button-container"
|
|
335
350
|
}, [
|
|
336
|
-
|
|
351
|
+
R(st, {
|
|
337
352
|
placement: "right",
|
|
338
|
-
text:
|
|
353
|
+
text: v.value ? f(a)("favorite_button.remove_shortcut") : f(a)("favorite_button.save_shortcut")
|
|
339
354
|
}, {
|
|
340
355
|
default: C(() => [
|
|
341
356
|
w("button", {
|
|
342
|
-
"aria-label":
|
|
343
|
-
class:
|
|
357
|
+
"aria-label": v.value ? f(a)("favorite_button.remove_shortcut") : f(a)("favorite_button.save_shortcut"),
|
|
358
|
+
class: O(["favorite-button", { active: v.value }]),
|
|
344
359
|
"data-testid": "page-layout-favorite-button",
|
|
345
360
|
type: "button",
|
|
346
|
-
onClick:
|
|
361
|
+
onClick: B
|
|
347
362
|
}, [
|
|
348
|
-
(s(),
|
|
363
|
+
(s(), _(j(v.value ? f($t) : f(_t)), {
|
|
349
364
|
decorative: "",
|
|
350
|
-
size: `var(--kui-icon-size-30, ${
|
|
365
|
+
size: `var(--kui-icon-size-30, ${f(M)})`
|
|
351
366
|
}, null, 8, ["size"]))
|
|
352
|
-
], 10,
|
|
367
|
+
], 10, te)
|
|
353
368
|
]),
|
|
354
369
|
_: 1
|
|
355
370
|
}, 8, ["text"])
|
|
356
|
-
])) :
|
|
357
|
-
m.$slots["title-after"] ? (s(),
|
|
358
|
-
|
|
359
|
-
])) :
|
|
371
|
+
])) : k("", !0),
|
|
372
|
+
m.$slots["title-after"] ? (s(), y("div", ee, [
|
|
373
|
+
P(m.$slots, "title-after", {}, void 0, !0)
|
|
374
|
+
])) : k("", !0)
|
|
360
375
|
])
|
|
361
376
|
]),
|
|
362
|
-
m.$slots.actions ? (s(),
|
|
363
|
-
|
|
364
|
-
])) :
|
|
377
|
+
m.$slots.actions ? (s(), y("div", ae, [
|
|
378
|
+
P(m.$slots, "actions", {}, void 0, !0)
|
|
379
|
+
])) : k("", !0)
|
|
365
380
|
]),
|
|
366
|
-
|
|
381
|
+
u.value ? (s(), _(Ut, {
|
|
367
382
|
key: 0,
|
|
368
383
|
tabs: t.tabs
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
name: `tab-${
|
|
372
|
-
fn: C((
|
|
373
|
-
|
|
384
|
+
}, yt({ _: 2 }, [
|
|
385
|
+
z(t.tabs, (U) => ({
|
|
386
|
+
name: `tab-${U.key}`,
|
|
387
|
+
fn: C((ut) => [
|
|
388
|
+
P(m.$slots, `tab-${U.key}`, ht(gt(ut)), void 0, !0)
|
|
374
389
|
])
|
|
375
390
|
}))
|
|
376
|
-
]), 1032, ["tabs"])) :
|
|
391
|
+
]), 1032, ["tabs"])) : k("", !0)
|
|
377
392
|
])),
|
|
378
393
|
w("div", {
|
|
379
|
-
class:
|
|
394
|
+
class: O(["page-layout-content", { "has-nested-page-layout": S.value }])
|
|
380
395
|
}, [
|
|
381
|
-
|
|
396
|
+
u.value ? (s(), _(it, { key: 0 })) : P(m.$slots, "default", { key: 1 }, void 0, !0)
|
|
382
397
|
], 2)
|
|
383
398
|
]);
|
|
384
399
|
};
|
|
385
400
|
}
|
|
386
|
-
}), re = /* @__PURE__ */
|
|
401
|
+
}), re = /* @__PURE__ */ nt(oe, [["__scopeId", "data-v-6a6363c7"]]);
|
|
387
402
|
export {
|
|
388
403
|
re as PageLayout
|
|
389
404
|
};
|
package/dist/page-layout.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(f,t){typeof exports=="object"&&typeof module<"u"?t(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"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f["kong-ui-public-page-layout"]={},f.Vue,f.VueRouter,f["kong-ui-public-i18n"],f.KongIcons))})(this,(function(f,t,w,_,T){"use strict";const K={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"}}};function L(){const e=_.createI18n("en-us",K);return{i18n:e,i18nT:_.i18nTComponent(e)}}const $={useI18n:L},S="16px",z="16px";function R(e,n){return t.getCurrentScope()?(t.onScopeDispose(e,n),!0):!1}const F=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const D=()=>{};function M(e,n){function o(...r){return new Promise((d,i)=>{Promise.resolve(e(()=>n.apply(this,r),{fn:n,thisArg:this,args:r})).then(d).catch(i)})}return o}function O(e,n={}){let o,r,d=D;const i=s=>{clearTimeout(s),d(),d=D};let p;return s=>{const m=t.toValue(e),l=t.toValue(n.maxWait);return o&&i(o),m<=0||l!==void 0&&l<=0?(r&&(i(r),r=void 0),Promise.resolve(s())):new Promise((c,h)=>{d=n.rejectOnCancel?h:c,p=s,l&&!r&&(r=setTimeout(()=>{o&&i(o),r=void 0,c(p())},l)),o=setTimeout(()=>{r&&i(r),r=void 0,c(s())},m)})}}function A(e,n=200,o={}){return M(O(n,o),e)}const j=F?window:void 0;function E(e){var n;const o=t.toValue(e);return(n=o?.$el)!==null&&n!==void 0?n:o}function W(){const e=t.shallowRef(!1),n=t.getCurrentInstance();return n&&t.onMounted(()=>{e.value=!0},n),e}function G(e){const n=W();return t.computed(()=>(n.value,!!e()))}function q(e,n,o={}){const{window:r=j,...d}=o;let i;const p=G(()=>r&&"ResizeObserver"in r),y=()=>{i&&(i.disconnect(),i=void 0)},s=t.watch(t.computed(()=>{const l=t.toValue(e);return Array.isArray(l)?l.map(c=>E(c)):[E(l)]}),l=>{if(y(),p.value&&r){i=new ResizeObserver(n);for(const c of l)c&&i.observe(c,d)}},{immediate:!0,flush:"post"}),m=()=>{y(),s()};return R(m),{isSupported:p,stop:m}}const U={ref:"page-layout-tabs",class:"page-layout-tabs","data-testid":"page-layout-tabs"},Z={key:0},H=["aria-label"],J={key:0,class:"layout-loader-container"},Q=t.defineComponent({__name:"PageLayoutTabs",props:{tabs:{default:()=>[]}},setup(e){t.useCssVars(u=>({v94e59ca2:t.unref(i)}));const{i18n:{t:n}}=$.useI18n(),o=w.useRouter(),r=t.inject("app:navigateTo",null),d=u=>{if(typeof u.to!="string"){o.push(u.to);return}if(typeof r!="function"){window.location.href=u.to;return}r(u.to)},i=z,p=t.useTemplateRef("page-layout-tabs"),y=t.useTemplateRef("page-layout-tabs-list"),s=t.ref(e.tabs.length),m=t.ref(!1),l=t.computed(()=>e.tabs.slice(0,s.value)),c=t.computed(()=>e.tabs.slice(s.value)),h=async()=>{if(!p.value||!y.value)return;m.value=!1,s.value=e.tabs.length,await t.nextTick();const u=p.value?.getBoundingClientRect().width-parseInt(i)*2;let g=y.value?.getBoundingClientRect().width;if(!u||!g){m.value=!0;return}const C=50;for(;g+C>u&&s.value>1;)s.value--,await t.nextTick(),g=y.value?.getBoundingClientRect().width||0;m.value=!0};let k=null;const B=()=>{k&&clearTimeout(k),k=setTimeout(()=>{h()},150)};return t.onMounted(()=>{h(),q(p,B)}),t.onBeforeUnmount(()=>{k&&clearTimeout(k)}),t.watch(()=>e.tabs,()=>{h()},{deep:!0}),(u,g)=>{const C=t.resolveComponent("KDropdownItem"),V=t.resolveComponent("KDropdown"),b=t.resolveComponent("KSkeletonBox");return t.openBlock(),t.createElementBlock("nav",U,[t.createElementVNode("ul",{ref:"page-layout-tabs-list",class:t.normalizeClass({"layout-computing":!m.value})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,a=>(t.openBlock(),t.createElementBlock("li",{key:`${a.key}-tab`},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(typeof a.to=="string"?"a":"router-link"),t.mergeProps({ref_for:!0},typeof a.to=="string"?{href:a.to}:{to:a.to},{"aria-current":a.active?"page":void 0,class:["tab-link",{active:a.active}],"data-testid":a.dataTestId?a.dataTestId:`page-layout-tab-${a.key}`,tabindex:"0",onClick:t.withModifiers(N=>d(a),["prevent"]),onKeydown:t.withKeys(t.withModifiers(N=>d(a),["prevent"]),["enter"])}),{default:t.withCtx(()=>[t.renderSlot(u.$slots,`tab-${a.key}`,{tab:a},()=>[t.createTextVNode(t.toDisplayString(a.label),1)],!0)]),_:2},1040,["aria-current","class","data-testid","onClick","onKeydown"]))]))),128)),e.tabs.length>s.value?(t.openBlock(),t.createElementBlock("li",Z,[t.createVNode(V,{"kpop-attributes":{placement:"bottom-end",popoverElementAttributes:{"data-testid":"tabs-overflow-dropdown-popover"}}},{items:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,a=>(t.openBlock(),t.createBlock(C,{key:`${a.key}-dropdown-item`,"aria-current":a.active?"page":void 0,"data-testid":a.dataTestId?a.dataTestId:`page-layout-tab-${a.key}`,item:{label:a.label,value:a.key,to:a.to},selected:a.active},{default:t.withCtx(()=>[t.renderSlot(u.$slots,`tab-${a.key}`,{tab:a},()=>[t.createTextVNode(t.toDisplayString(a.label),1)],!0)]),_:2},1032,["aria-current","data-testid","item","selected"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("button",{"aria-label":t.unref(n)("tabs.more_button.aria_label"),class:t.normalizeClass(["tab-link",{active:c.value.find(a=>a.active)}]),"data-testid":"tabs-overflow-dropdown-button"},[t.createTextVNode(t.toDisplayString(t.unref(n)("tabs.more_button.label"))+" ",1),t.createVNode(t.unref(T.ChevronDownIcon),{decorative:"",size:`var(--kui-icon-size-30, ${t.unref(S)})`},null,8,["size"])],10,H)]),_:3})])):t.createCommentVNode("",!0)],2),m.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",J,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,a=>t.createVNode(b,{key:`layout-loader-${a}`,height:"1",width:"5"})),64))]))],512)}}}),I=(e,n)=>{const o=e.__vccOpts||e;for(const[r,d]of n)o[r]=d;return o},X=I(Q,[["__scopeId","data-v-014ad9b1"]]),P=Symbol("nested-page-layout-detection"),Y={class:"kong-ui-public-page-layout","data-testid":"kong-ui-public-page-layout"},v={key:0,class:"page-layout-header","data-testid":"page-layout-header"},tt={class:"page-header-container"},et={class:"page-header-start"},ot={class:"title-container"},at={key:1,class:"page-layout-title-wrapper"},nt={class:"page-layout-title","data-testid":"page-layout-title"},rt=["aria-label"],it={key:3,class:"title-after-container"},st={key:0,class:"page-header-actions-container"},ct=I(t.defineComponent({__name:"PageLayout",props:{breadcrumbs:{default:()=>[]},title:{},backTo:{},tabs:{default:()=>[]},pageShortcutData:{}},setup(e){const n=t.inject("app:navigateTo",null),o=t.inject("app:pageShortcutsContext",null),{i18n:{t:r}}=$.useI18n(),d=w.useRouter(),i=w.useRoute(),p=t.computed(()=>!!(e.tabs&&e.tabs.length)),y=t.computed(()=>typeof e.backTo=="string"),s=t.computed(()=>!!e.pageShortcutData&&!!e.pageShortcutData.entityType&&!!e.pageShortcutData.label),m=t.computed(()=>s.value&&!!o&&"onFavoriteToggle"in o&&typeof o.onFavoriteToggle=="function"),l=t.ref(0),c=t.computed(()=>!!o&&"isFavorite"in o&&typeof o.isFavorite=="function"&&o.isFavorite(e.pageShortcutData)===!0),h=async()=>{if(e.backTo){if(typeof e.backTo=="object"){d.push(e.backTo);return}if(typeof n!="function"){window.location.href=e.backTo;return}await n(e.backTo)}},k=t.ref(0),B=t.computed(()=>k.value>0);t.provide(P,()=>(k.value++,()=>{k.value--}));const u=t.inject(P,null),g=t.ref(null);typeof u=="function"&&(g.value=u());const C=()=>{o.onFavoriteToggle({...e.pageShortcutData,path:e.pageShortcutData?.path||i.fullPath})};t.onUnmounted(()=>{g.value?.()});const V=A(()=>{!B.value&&s.value&&o&&"onEntityPageVisit"in o&&typeof o.onEntityPageVisit=="function"&&(o.onEntityPageVisit({...e.pageShortcutData,path:e.pageShortcutData?.path||i?.fullPath}),l.value++)},500);return t.watch([()=>e.pageShortcutData,()=>i?.fullPath],()=>{V()},{immediate:!0,deep:!0}),(b,a)=>{const N=t.resolveComponent("KBreadcrumbs"),lt=t.resolveComponent("KTooltip"),dt=t.resolveComponent("router-view");return t.openBlock(),t.createElementBlock("div",Y,[B.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",v,[t.createElementVNode("div",tt,[t.createElementVNode("div",et,[e.breadcrumbs&&e.breadcrumbs.length?(t.openBlock(),t.createBlock(N,{key:0,class:"header-breadcrumbs","data-testid":"page-layout-breadcrumbs","item-max-width":"25ch",items:e.breadcrumbs},null,8,["items"])):t.createCommentVNode("",!0),t.createElementVNode("div",ot,[e.backTo?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(y.value?"a":"router-link"),t.mergeProps({key:0},y.value?{href:e.backTo}:{to:e.backTo},{"aria-label":t.unref(r)("back_button"),class:"navigate-back","data-testid":"page-layout-navigate-back",tabindex:"0",onClick:t.withModifiers(h,["prevent"]),onKeydown:t.withKeys(t.withModifiers(h,["prevent"]),["enter"])}),{default:t.withCtx(()=>[t.createVNode(t.unref(T.ArrowTopLeftIcon),{decorative:"",size:`var(--kui-icon-size-30, ${t.unref(S)})`},null,8,["size"])]),_:1},16,["aria-label","onKeydown"])):t.createCommentVNode("",!0),e.title||b.$slots.title?(t.openBlock(),t.createElementBlock("span",at,[t.renderSlot(b.$slots,"title",{},()=>[t.createElementVNode("h1",nt,t.toDisplayString(e.title),1)],!0)])):t.createCommentVNode("",!0),m.value?(t.openBlock(),t.createElementBlock("div",{key:l.value,class:"favorite-button-container"},[t.createVNode(lt,{placement:"right",text:c.value?t.unref(r)("favorite_button.remove_shortcut"):t.unref(r)("favorite_button.save_shortcut")},{default:t.withCtx(()=>[t.createElementVNode("button",{"aria-label":c.value?t.unref(r)("favorite_button.remove_shortcut"):t.unref(r)("favorite_button.save_shortcut"),class:t.normalizeClass(["favorite-button",{active:c.value}]),"data-testid":"page-layout-favorite-button",type:"button",onClick:C},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(c.value?t.unref(T.StarFillIcon):t.unref(T.StarIcon)),{decorative:"",size:`var(--kui-icon-size-30, ${t.unref(S)})`},null,8,["size"]))],10,rt)]),_:1},8,["text"])])):t.createCommentVNode("",!0),b.$slots["title-after"]?(t.openBlock(),t.createElementBlock("div",it,[t.renderSlot(b.$slots,"title-after",{},void 0,!0)])):t.createCommentVNode("",!0)])]),b.$slots.actions?(t.openBlock(),t.createElementBlock("div",st,[t.renderSlot(b.$slots,"actions",{},void 0,!0)])):t.createCommentVNode("",!0)]),p.value?(t.openBlock(),t.createBlock(X,{key:0,tabs:e.tabs},t.createSlots({_:2},[t.renderList(e.tabs,x=>({name:`tab-${x.key}`,fn:t.withCtx(ut=>[t.renderSlot(b.$slots,`tab-${x.key}`,t.normalizeProps(t.guardReactiveProps(ut)),void 0,!0)])}))]),1032,["tabs"])):t.createCommentVNode("",!0)])),t.createElementVNode("div",{class:t.normalizeClass(["page-layout-content",{"has-nested-page-layout":B.value}])},[p.value?(t.openBlock(),t.createBlock(dt,{key:0})):t.renderSlot(b.$slots,"default",{key:1},void 0,!0)],2)])}}}),[["__scopeId","data-v-6a6363c7"]]);f.PageLayout=ct,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(b,t){typeof exports=="object"&&typeof module<"u"?t(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"],t):(b=typeof globalThis<"u"?globalThis:b||self,t(b["kong-ui-public-page-layout"]={},b.Vue,b.VueRouter,b["kong-ui-public-i18n"],b.KongIcons))})(this,(function(b,t,S,P,w){"use strict";const K={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"}}};function L(){const e=P.createI18n("en-us",K);return{i18n:e,i18nT:P.i18nTComponent(e)}}const $={useI18n:L},V="16px",R="16px";function z(e,i){return t.getCurrentScope()?(t.onScopeDispose(e,i),!0):!1}const F=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const C=()=>{};function O(e,i){function o(...a){return new Promise((d,r)=>{Promise.resolve(e(()=>i.apply(this,a),{fn:i,thisArg:this,args:a})).then(d).catch(r)})}return"cancel"in e&&Object.assign(o,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),o}function j(e,i={}){let o,a,d=C,r=C;const s=t.shallowRef(!1),l=c=>{clearTimeout(c),d(),d=C};let u;return Object.assign(c=>{const m=t.toValue(e),y=t.toValue(i.maxWait);return o&&l(o),m<=0||y!==void 0&&y<=0?(a&&(l(a),a=void 0),s.value=!1,Promise.resolve(c())):(s.value=!0,new Promise((f,k)=>{d=i.rejectOnCancel?k:f,r=f,u=c,y&&!a&&(a=setTimeout(()=>{o&&l(o),a=void 0,s.value=!1,f(u())},y)),o=setTimeout(()=>{a&&l(a),a=void 0,s.value=!1,f(c())},m)}))},{cancel:()=>{o&&(l(o),o=void 0),a&&(l(a),a=void 0),s.value=!1,r=C},flush:()=>{if(s.value){o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0),s.value=!1;const c=r;d=C,r=C,c(u())}},isPending:t.shallowReadonly(s)})}function M(e,i=200,o={}){return O(j(i,o),e)}const A=F?window:void 0;function D(e){var i;const o=t.toValue(e);return(i=o?.$el)!==null&&i!==void 0?i:o}function W(){const e=t.shallowRef(!1),i=t.getCurrentInstance();return i&&t.onMounted(()=>{e.value=!0},i),e}function G(e){const i=W();return t.computed(()=>(i.value,!!e()))}function q(e,i,o={}){const{window:a=A,...d}=o;let r;const s=G(()=>a&&"ResizeObserver"in a),l=()=>{r&&(r.disconnect(),r=void 0)},u=t.watch(t.computed(()=>{const c=t.toValue(e);return Array.isArray(c)?c.map(m=>D(m)):[D(c)]}),c=>{if(l(),s.value&&a){r=new ResizeObserver(i);for(const m of c)m&&r.observe(m,d)}},{immediate:!0,flush:"post"}),h=()=>{l(),u()};return z(h),{isSupported:s,stop:h}}const U={ref:"page-layout-tabs",class:"page-layout-tabs","data-testid":"page-layout-tabs"},Z={key:0},H=["aria-label"],J={key:0,class:"layout-loader-container"},Q=t.defineComponent({__name:"PageLayoutTabs",props:{tabs:{default:()=>[]}},setup(e){t.useCssVars(p=>({v94e59ca2:t.unref(r)}));const{i18n:{t:i}}=$.useI18n(),o=S.useRouter(),a=t.inject("app:navigateTo",null),d=p=>{if(typeof p.to!="string"){o.push(p.to);return}if(typeof a!="function"){window.location.href=p.to;return}a(p.to)},r=R,s=t.useTemplateRef("page-layout-tabs"),l=t.useTemplateRef("page-layout-tabs-list"),u=t.ref(e.tabs.length),h=t.ref(!1),c=t.computed(()=>e.tabs.slice(0,u.value)),m=t.computed(()=>e.tabs.slice(u.value)),y=async()=>{if(!s.value||!l.value)return;h.value=!1,u.value=e.tabs.length,await t.nextTick();const p=s.value?.getBoundingClientRect().width-parseInt(r)*2;let B=l.value?.getBoundingClientRect().width;if(!p||!B){h.value=!0;return}const T=50;for(;B+T>p&&u.value>1;)u.value--,await t.nextTick(),B=l.value?.getBoundingClientRect().width||0;h.value=!0};let f=null;const k=()=>{f&&clearTimeout(f),f=setTimeout(()=>{y()},150)};return t.onMounted(()=>{y(),q(s,k)}),t.onBeforeUnmount(()=>{f&&clearTimeout(f)}),t.watch(()=>e.tabs,()=>{y()},{deep:!0}),(p,B)=>{const T=t.resolveComponent("KDropdownItem"),N=t.resolveComponent("KDropdown"),g=t.resolveComponent("KSkeletonBox");return t.openBlock(),t.createElementBlock("nav",U,[t.createElementVNode("ul",{ref:"page-layout-tabs-list",class:t.normalizeClass({"layout-computing":!h.value})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,n=>(t.openBlock(),t.createElementBlock("li",{key:`${n.key}-tab`},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(typeof n.to=="string"?"a":"router-link"),t.mergeProps({ref_for:!0},typeof n.to=="string"?{href:n.to}:{to:n.to},{"aria-current":n.active?"page":void 0,class:["tab-link",{active:n.active}],"data-testid":n.dataTestId?n.dataTestId:`page-layout-tab-${n.key}`,tabindex:"0",onClick:t.withModifiers(_=>d(n),["prevent"]),onKeydown:t.withKeys(t.withModifiers(_=>d(n),["prevent"]),["enter"])}),{default:t.withCtx(()=>[t.renderSlot(p.$slots,`tab-${n.key}`,{tab:n},()=>[t.createTextVNode(t.toDisplayString(n.label),1)],!0)]),_:2},1040,["aria-current","class","data-testid","onClick","onKeydown"]))]))),128)),e.tabs.length>u.value?(t.openBlock(),t.createElementBlock("li",Z,[t.createVNode(N,{"kpop-attributes":{placement:"bottom-end",popoverElementAttributes:{"data-testid":"tabs-overflow-dropdown-popover"}}},{items:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,n=>(t.openBlock(),t.createBlock(T,{key:`${n.key}-dropdown-item`,"aria-current":n.active?"page":void 0,"data-testid":n.dataTestId?n.dataTestId:`page-layout-tab-${n.key}`,item:{label:n.label,value:n.key,to:n.to},selected:n.active},{default:t.withCtx(()=>[t.renderSlot(p.$slots,`tab-${n.key}`,{tab:n},()=>[t.createTextVNode(t.toDisplayString(n.label),1)],!0)]),_:2},1032,["aria-current","data-testid","item","selected"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("button",{"aria-label":t.unref(i)("tabs.more_button.aria_label"),class:t.normalizeClass(["tab-link",{active:m.value.find(n=>n.active)}]),"data-testid":"tabs-overflow-dropdown-button"},[t.createTextVNode(t.toDisplayString(t.unref(i)("tabs.more_button.label"))+" ",1),t.createVNode(t.unref(w.ChevronDownIcon),{decorative:"",size:`var(--kui-icon-size-30, ${t.unref(V)})`},null,8,["size"])],10,H)]),_:3})])):t.createCommentVNode("",!0)],2),h.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",J,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,n=>t.createVNode(g,{key:`layout-loader-${n}`,height:"1",width:"5"})),64))]))],512)}}}),E=(e,i)=>{const o=e.__vccOpts||e;for(const[a,d]of i)o[a]=d;return o},X=E(Q,[["__scopeId","data-v-014ad9b1"]]),I=Symbol("nested-page-layout-detection"),Y={class:"kong-ui-public-page-layout","data-testid":"kong-ui-public-page-layout"},v={key:0,class:"page-layout-header","data-testid":"page-layout-header"},tt={class:"page-header-container"},et={class:"page-header-start"},ot={class:"title-container"},at={key:1,class:"page-layout-title-wrapper"},nt={class:"page-layout-title","data-testid":"page-layout-title"},it=["aria-label"],rt={key:3,class:"title-after-container"},st={key:0,class:"page-header-actions-container"},ct=E(t.defineComponent({__name:"PageLayout",props:{breadcrumbs:{default:()=>[]},title:{},backTo:{},tabs:{default:()=>[]},pageShortcutData:{}},setup(e){const i=t.inject("app:navigateTo",null),o=t.inject("app:pageShortcutsContext",null),{i18n:{t:a}}=$.useI18n(),d=S.useRouter(),r=S.useRoute(),s=t.computed(()=>!!(e.tabs&&e.tabs.length)),l=t.computed(()=>typeof e.backTo=="string"),u=t.computed(()=>!!e.pageShortcutData&&!!e.pageShortcutData.entityType&&!!e.pageShortcutData.label),h=t.computed(()=>u.value&&!!o&&"onFavoriteToggle"in o&&typeof o.onFavoriteToggle=="function"),c=t.ref(0),m=t.computed(()=>!!o&&"isFavorite"in o&&typeof o.isFavorite=="function"&&o.isFavorite(e.pageShortcutData)===!0),y=async()=>{if(e.backTo){if(typeof e.backTo=="object"){d.push(e.backTo);return}if(typeof i!="function"){window.location.href=e.backTo;return}await i(e.backTo)}},f=t.ref(0),k=t.computed(()=>f.value>0);t.provide(I,()=>(f.value++,()=>{f.value--}));const p=t.inject(I,null),B=t.ref(null);typeof p=="function"&&(B.value=p());const T=()=>{o.onFavoriteToggle({...e.pageShortcutData,path:e.pageShortcutData?.path||r.fullPath})};t.onUnmounted(()=>{B.value?.()});const N=M(()=>{!k.value&&u.value&&o&&"onEntityPageVisit"in o&&typeof o.onEntityPageVisit=="function"&&(o.onEntityPageVisit({...e.pageShortcutData,path:e.pageShortcutData?.path||r?.fullPath}),c.value++)},500);return t.watch([()=>e.pageShortcutData,()=>r?.fullPath],()=>{N()},{immediate:!0,deep:!0}),(g,n)=>{const _=t.resolveComponent("KBreadcrumbs"),lt=t.resolveComponent("KTooltip"),dt=t.resolveComponent("router-view");return t.openBlock(),t.createElementBlock("div",Y,[k.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",v,[t.createElementVNode("div",tt,[t.createElementVNode("div",et,[e.breadcrumbs&&e.breadcrumbs.length?(t.openBlock(),t.createBlock(_,{key:0,class:"header-breadcrumbs","data-testid":"page-layout-breadcrumbs","item-max-width":"25ch",items:e.breadcrumbs},null,8,["items"])):t.createCommentVNode("",!0),t.createElementVNode("div",ot,[e.backTo?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value?"a":"router-link"),t.mergeProps({key:0},l.value?{href:e.backTo}:{to:e.backTo},{"aria-label":t.unref(a)("back_button"),class:"navigate-back","data-testid":"page-layout-navigate-back",tabindex:"0",onClick:t.withModifiers(y,["prevent"]),onKeydown:t.withKeys(t.withModifiers(y,["prevent"]),["enter"])}),{default:t.withCtx(()=>[t.createVNode(t.unref(w.ArrowTopLeftIcon),{decorative:"",size:`var(--kui-icon-size-30, ${t.unref(V)})`},null,8,["size"])]),_:1},16,["aria-label","onKeydown"])):t.createCommentVNode("",!0),e.title||g.$slots.title?(t.openBlock(),t.createElementBlock("span",at,[t.renderSlot(g.$slots,"title",{},()=>[t.createElementVNode("h1",nt,t.toDisplayString(e.title),1)],!0)])):t.createCommentVNode("",!0),h.value?(t.openBlock(),t.createElementBlock("div",{key:c.value,class:"favorite-button-container"},[t.createVNode(lt,{placement:"right",text:m.value?t.unref(a)("favorite_button.remove_shortcut"):t.unref(a)("favorite_button.save_shortcut")},{default:t.withCtx(()=>[t.createElementVNode("button",{"aria-label":m.value?t.unref(a)("favorite_button.remove_shortcut"):t.unref(a)("favorite_button.save_shortcut"),class:t.normalizeClass(["favorite-button",{active:m.value}]),"data-testid":"page-layout-favorite-button",type:"button",onClick:T},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m.value?t.unref(w.StarFillIcon):t.unref(w.StarIcon)),{decorative:"",size:`var(--kui-icon-size-30, ${t.unref(V)})`},null,8,["size"]))],10,it)]),_:1},8,["text"])])):t.createCommentVNode("",!0),g.$slots["title-after"]?(t.openBlock(),t.createElementBlock("div",rt,[t.renderSlot(g.$slots,"title-after",{},void 0,!0)])):t.createCommentVNode("",!0)])]),g.$slots.actions?(t.openBlock(),t.createElementBlock("div",st,[t.renderSlot(g.$slots,"actions",{},void 0,!0)])):t.createCommentVNode("",!0)]),s.value?(t.openBlock(),t.createBlock(X,{key:0,tabs:e.tabs},t.createSlots({_:2},[t.renderList(e.tabs,x=>({name:`tab-${x.key}`,fn:t.withCtx(ut=>[t.renderSlot(g.$slots,`tab-${x.key}`,t.normalizeProps(t.guardReactiveProps(ut)),void 0,!0)])}))]),1032,["tabs"])):t.createCommentVNode("",!0)])),t.createElementVNode("div",{class:t.normalizeClass(["page-layout-content",{"has-nested-page-layout":k.value}])},[s.value?(t.openBlock(),t.createBlock(dt,{key:0})):t.renderSlot(g.$slots,"default",{key:1},void 0,!0)],2)])}}}),[["__scopeId","data-v-6a6363c7"]]);b.PageLayout=ct,Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.page-layout-tabs[data-v-014ad9b1]{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:0px var(--v94e59ca2);padding:var(--kui-space-0, 0px) var(--v94e59ca2);position:relative;width:100%}.page-layout-tabs a[data-v-014ad9b1],.page-layout-tabs button[data-v-014ad9b1]{background-color:#0000;background-color:var(--kui-color-background-transparent, rgba(0, 0, 0, 0));border:none;color:inherit;cursor:pointer;outline:none;padding:0;padding:var(--kui-space-0, 0px);text-decoration:none}.page-layout-tabs ul[data-v-014ad9b1]{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-014ad9b1]{height:0;visibility:hidden}.page-layout-tabs ul li[data-v-014ad9b1]{display:flex}.page-layout-tabs ul li .tab-link[data-v-014ad9b1]{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-014ad9b1]:hover{border-bottom:2px solid #afb7c5;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-neutral-weak, #afb7c5);color:#
|
|
1
|
+
.page-layout-tabs[data-v-014ad9b1]{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:0px var(--v94e59ca2);padding:var(--kui-space-0, 0px) var(--v94e59ca2);position:relative;width:100%}.page-layout-tabs a[data-v-014ad9b1],.page-layout-tabs button[data-v-014ad9b1]{background-color:#0000;background-color:var(--kui-color-background-transparent, rgba(0, 0, 0, 0));border:none;color:inherit;cursor:pointer;outline:none;padding:0;padding:var(--kui-space-0, 0px);text-decoration:none}.page-layout-tabs ul[data-v-014ad9b1]{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-014ad9b1]{height:0;visibility:hidden}.page-layout-tabs ul li[data-v-014ad9b1]{display:flex}.page-layout-tabs ul li .tab-link[data-v-014ad9b1]{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-014ad9b1]: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-014ad9b1]: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-014ad9b1]{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-014ad9b1]{align-items:center;display:flex;gap:20px;gap:var(--kui-space-70, 20px);height:34px;inset:0;left:var(--v94e59ca2);position:absolute}.kong-ui-public-page-layout[data-v-6a6363c7]{box-sizing:border-box;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-6a6363c7]{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-6a6363c7]{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-6a6363c7]{min-width:0}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .header-breadcrumbs[data-v-6a6363c7] .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-6a6363c7] .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-6a6363c7]{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-6a6363c7],.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button[data-v-6a6363c7]{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-6a6363c7]:hover,.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button[data-v-6a6363c7]: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-6a6363c7]:focus-visible,.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .favorite-button[data-v-6a6363c7]: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-6a6363c7]{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-6a6363c7]>*{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-6a6363c7]{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-6a6363c7]{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-6a6363c7]: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-6a6363c7]{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-6a6363c7]{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-6a6363c7]{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-6a6363c7]{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 .page-layout-content[data-v-6a6363c7]{background-color:#f9fafb;background-color:var(--kui-color-background-neutral-weakest, #f9fafb);display:flex;flex-direction:column;gap:12px;gap:var(--kui-space-50, 12px);padding:16px;padding:var(--kui-space-60, 16px)}.kong-ui-public-page-layout .page-layout-content.has-nested-page-layout[data-v-6a6363c7]{padding:0;padding:var(--kui-space-0, 0px)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/page-layout",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/page-layout.umd.js",
|
|
6
6
|
"module": "./dist/page-layout.es.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@kong/design-tokens": "3.
|
|
24
|
+
"@kong/design-tokens": "3.3.0",
|
|
25
25
|
"@kong/icons": "^1.62.1",
|
|
26
26
|
"@kong/kongponents": "9.64.10",
|
|
27
27
|
"vue": "^3.5.35",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@kong-ui-public/i18n": "^2.5.1"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@vueuse/core": "^14.
|
|
56
|
+
"@vueuse/core": "^14.4.0"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"dev": "cross-env USE_SANDBOX=true vite",
|