@kong-ui-public/page-layout 0.2.19 → 0.2.20

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.
@@ -1,183 +1,192 @@
1
- import { watch as F, computed as w, toValue as K, unref as h, defineComponent as H, useCssVars as Y, inject as z, useTemplateRef as G, ref as A, onMounted as tt, onBeforeUnmount as et, resolveComponent as _, openBlock as i, createElementBlock as d, createElementVNode as g, normalizeClass as B, Fragment as x, renderList as R, createBlock as T, resolveDynamicComponent as q, withKeys as D, withModifiers as I, withCtx as S, createTextVNode as W, toDisplayString as P, createVNode as M, createCommentVNode as y, nextTick as U, provide as at, onUnmounted as ot, renderSlot as O } from "vue";
2
- import { useRouter as J } from "vue-router";
3
- import { createI18n as nt, i18nTComponent as st } from "@kong-ui-public/i18n";
4
- import { ArrowTopLeftIcon as it } from "@kong/icons";
5
- const lt = "Go back", ut = {
1
+ import { getCurrentScope as ee, onScopeDispose as te, watch as Z, computed as h, toValue as F, shallowRef as ae, getCurrentInstance as oe, onMounted as H, defineComponent as q, useCssVars as ne, unref as w, inject as z, useTemplateRef as V, ref as D, onBeforeUnmount as se, resolveComponent as _, openBlock as o, createElementBlock as u, createElementVNode as g, normalizeClass as B, Fragment as A, renderList as O, createBlock as k, resolveDynamicComponent as J, withKeys as R, withModifiers as T, withCtx as K, createTextVNode as W, toDisplayString as L, createVNode as E, createCommentVNode as y, nextTick as G, provide as ie, onUnmounted as le, renderSlot as P } from "vue";
2
+ import { useRouter as Q } from "vue-router";
3
+ import { createI18n as re, i18nTComponent as ue } from "@kong-ui-public/i18n";
4
+ import { ArrowTopLeftIcon as ce } from "@kong/icons";
5
+ const de = "Go back", ve = {
6
6
  more_button: {
7
7
  label: "More",
8
8
  aria_label: "More tabs"
9
9
  }
10
- }, ct = {
11
- back_button: lt,
12
- tabs: ut
10
+ }, be = {
11
+ back_button: de,
12
+ tabs: ve
13
13
  };
14
- function rt() {
15
- const t = nt("en-us", ct);
14
+ function fe() {
15
+ const e = re("en-us", be);
16
16
  return {
17
- i18n: t,
18
- i18nT: st(t)
17
+ i18n: e,
18
+ i18nT: ue(e)
19
19
  // Translation component <i18n-t>
20
20
  };
21
21
  }
22
- const Q = {
23
- useI18n: rt
24
- }, dt = "16px", vt = "16px", bt = typeof window < "u" && typeof document < "u";
22
+ const X = {
23
+ useI18n: fe
24
+ }, pe = "16px", ye = "16px";
25
+ function me(e, a) {
26
+ return ee() ? (te(e, a), !0) : !1;
27
+ }
28
+ const ge = typeof window < "u" && typeof document < "u";
25
29
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
26
- const ft = Object.prototype.toString, yt = (t) => ft.call(t) === "[object Object]";
27
- function j(t) {
28
- return Array.isArray(t) ? t : [t];
30
+ const he = ge ? window : void 0;
31
+ function U(e) {
32
+ var a;
33
+ const s = F(e);
34
+ return (a = s == null ? void 0 : s.$el) !== null && a !== void 0 ? a : s;
29
35
  }
30
- function mt(t, l, n) {
31
- return F(t, l, {
32
- ...n,
33
- immediate: !0
34
- });
36
+ // @__NO_SIDE_EFFECTS__
37
+ function ke() {
38
+ const e = ae(!1), a = oe();
39
+ return a && H(() => {
40
+ e.value = !0;
41
+ }, a), e;
35
42
  }
36
- const pt = bt ? window : void 0;
37
- function gt(t) {
38
- var l;
39
- const n = K(t);
40
- return (l = n == null ? void 0 : n.$el) !== null && l !== void 0 ? l : n;
43
+ // @__NO_SIDE_EFFECTS__
44
+ function we(e) {
45
+ const a = /* @__PURE__ */ ke();
46
+ return h(() => (a.value, !!e()));
41
47
  }
42
- function ht(...t) {
43
- const l = (o, a, s, c) => (o.addEventListener(a, s, c), () => o.removeEventListener(a, s, c)), n = w(() => {
44
- const o = j(K(t[0])).filter((a) => a != null);
45
- return o.every((a) => typeof a != "string") ? o : void 0;
46
- });
47
- return mt(() => {
48
- var o, a;
49
- return [
50
- (o = (a = n.value) === null || a === void 0 ? void 0 : a.map((s) => gt(s))) !== null && o !== void 0 ? o : [pt].filter((s) => s != null),
51
- j(K(n.value ? t[1] : t[0])),
52
- j(h(n.value ? t[2] : t[1])),
53
- K(n.value ? t[3] : t[2])
54
- ];
55
- }, ([o, a, s, c], m, r) => {
56
- if (!(o != null && o.length) || !(a != null && a.length) || !(s != null && s.length)) return;
57
- const v = yt(c) ? { ...c } : c, p = o.flatMap((u) => a.flatMap((k) => s.map((b) => l(u, k, b, v))));
58
- r(() => {
59
- p.forEach((u) => u());
60
- });
61
- }, { flush: "post" });
48
+ function Te(e, a, s = {}) {
49
+ const { window: d = he, ...v } = s;
50
+ let i;
51
+ const b = /* @__PURE__ */ we(() => d && "ResizeObserver" in d), f = () => {
52
+ i && (i.disconnect(), i = void 0);
53
+ }, l = Z(h(() => {
54
+ const r = F(e);
55
+ return Array.isArray(r) ? r.map((n) => U(n)) : [U(r)];
56
+ }), (r) => {
57
+ if (f(), b.value && d) {
58
+ i = new ResizeObserver(a);
59
+ for (const n of r) n && i.observe(n, v);
60
+ }
61
+ }, {
62
+ immediate: !0,
63
+ flush: "post"
64
+ }), c = () => {
65
+ f(), l();
66
+ };
67
+ return me(c), {
68
+ isSupported: b,
69
+ stop: c
70
+ };
62
71
  }
63
- const kt = {
72
+ const _e = {
64
73
  ref: "page-layout-tabs",
65
74
  class: "page-layout-tabs",
66
75
  "data-testid": "page-layout-tabs"
67
- }, Tt = { key: 0 }, wt = ["aria-label"], It = { class: "overflowing-items-count" }, _t = {
76
+ }, Ie = { key: 0 }, Ce = ["aria-label"], $e = { class: "overflowing-items-count" }, Se = {
68
77
  key: 0,
69
78
  class: "layout-loader-container"
70
- }, $t = /* @__PURE__ */ H({
79
+ }, Be = /* @__PURE__ */ q({
71
80
  __name: "PageLayoutTabs",
72
81
  props: {
73
82
  tabs: { default: () => [] }
74
83
  },
75
- setup(t) {
76
- Y((f) => ({
77
- v417a39b5: h(s)
84
+ setup(e) {
85
+ ne((p) => ({
86
+ v235ab89a: w(i)
78
87
  }));
79
- const { i18n: { t: l } } = Q.useI18n(), n = J(), o = z("app:navigateTo", null), a = (f) => {
80
- if (typeof f.to != "string") {
81
- n.push(f.to);
88
+ const { i18n: { t: a } } = X.useI18n(), s = Q(), d = z("app:navigateTo", null), v = (p) => {
89
+ if (typeof p.to != "string") {
90
+ s.push(p.to);
82
91
  return;
83
92
  }
84
- if (typeof o != "function") {
85
- window.location.href = f.to;
93
+ if (typeof d != "function") {
94
+ window.location.href = p.to;
86
95
  return;
87
96
  }
88
- o(f.to);
89
- }, s = vt, c = G("page-layout-tabs"), m = G("page-layout-tabs-list"), r = A(t.tabs.length), v = A(!1), p = w(() => t.tabs.slice(0, r.value)), u = w(() => t.tabs.slice(r.value)), k = async () => {
90
- var C, L, e;
91
- if (!c.value || !m.value)
97
+ d(p.to);
98
+ }, i = ye, b = V("page-layout-tabs"), f = V("page-layout-tabs-list"), l = D(e.tabs.length), c = D(!1), r = h(() => e.tabs.slice(0, l.value)), n = h(() => e.tabs.slice(l.value)), I = async () => {
99
+ var $, S, t;
100
+ if (!b.value || !f.value)
92
101
  return;
93
- v.value = !1, r.value = t.tabs.length, await U();
94
- const f = ((C = c.value) == null ? void 0 : C.getBoundingClientRect().width) - parseInt(s) * 2;
95
- let $ = (L = m.value) == null ? void 0 : L.getBoundingClientRect().width;
96
- if (!f || !$) {
97
- v.value = !0;
102
+ c.value = !1, l.value = e.tabs.length, await G();
103
+ const p = (($ = b.value) == null ? void 0 : $.getBoundingClientRect().width) - parseInt(i) * 2;
104
+ let C = (S = f.value) == null ? void 0 : S.getBoundingClientRect().width;
105
+ if (!p || !C) {
106
+ c.value = !0;
98
107
  return;
99
108
  }
100
- const N = 50;
101
- for (; $ + N > f && r.value > 1; )
102
- r.value--, await U(), $ = ((e = m.value) == null ? void 0 : e.getBoundingClientRect().width) || 0;
103
- v.value = !0;
109
+ const x = 50;
110
+ for (; C + x > p && l.value > 1; )
111
+ l.value--, await G(), C = ((t = f.value) == null ? void 0 : t.getBoundingClientRect().width) || 0;
112
+ c.value = !0;
104
113
  };
105
- let b = null;
106
- const E = () => {
107
- b && clearTimeout(b), b = setTimeout(() => {
108
- k();
114
+ let m = null;
115
+ const N = () => {
116
+ m && clearTimeout(m), m = setTimeout(() => {
117
+ I();
109
118
  }, 150);
110
119
  };
111
- return tt(() => {
112
- k(), ht(window, "resize", E);
113
- }), et(() => {
114
- b && clearTimeout(b);
115
- }), F(() => t.tabs, () => {
116
- k();
117
- }, { deep: !0 }), (f, $) => {
118
- const N = _("KDropdownItem"), C = _("KDropdown"), L = _("KSkeletonBox");
119
- return i(), d("nav", kt, [
120
+ return H(() => {
121
+ I(), Te(b, N);
122
+ }), se(() => {
123
+ m && clearTimeout(m);
124
+ }), Z(() => e.tabs, () => {
125
+ I();
126
+ }, { deep: !0 }), (p, C) => {
127
+ const x = _("KDropdownItem"), $ = _("KDropdown"), S = _("KSkeletonBox");
128
+ return o(), u("nav", _e, [
120
129
  g("ul", {
121
130
  ref: "page-layout-tabs-list",
122
- class: B({ "layout-computing": !v.value })
131
+ class: B({ "layout-computing": !c.value })
123
132
  }, [
124
- (i(!0), d(x, null, R(p.value, (e) => (i(), d("li", {
125
- key: `${e.key}-tab`
133
+ (o(!0), u(A, null, O(r.value, (t) => (o(), u("li", {
134
+ key: `${t.key}-tab`
126
135
  }, [
127
- (i(), T(q(typeof e.to == "string" ? "a" : "router-link"), {
128
- "aria-current": e.active ? "page" : void 0,
129
- class: B(["tab-link", { active: e.active }]),
130
- "data-testid": e.dataTestId ? e.dataTestId : `page-layout-tab-${e.key}`,
131
- href: typeof e.to == "string" ? e.to : void 0,
136
+ (o(), k(J(typeof t.to == "string" ? "a" : "router-link"), {
137
+ "aria-current": t.active ? "page" : void 0,
138
+ class: B(["tab-link", { active: t.active }]),
139
+ "data-testid": t.dataTestId ? t.dataTestId : `page-layout-tab-${t.key}`,
140
+ href: typeof t.to == "string" ? t.to : void 0,
132
141
  tabindex: "0",
133
- to: typeof e.to == "string" ? void 0 : e.to,
134
- onClick: I((V) => a(e), ["prevent"]),
142
+ to: typeof t.to == "string" ? void 0 : t.to,
143
+ onClick: T((M) => v(t), ["prevent"]),
135
144
  onKeydown: [
136
- D(I((V) => a(e), ["prevent"]), ["enter"]),
137
- D(I((V) => a(e), ["prevent"]), ["space"])
145
+ R(T((M) => v(t), ["prevent"]), ["enter"]),
146
+ R(T((M) => v(t), ["prevent"]), ["space"])
138
147
  ]
139
148
  }, {
140
- default: S(() => [
141
- W(P(e.label), 1)
149
+ default: K(() => [
150
+ W(L(t.label), 1)
142
151
  ]),
143
152
  _: 2
144
153
  }, 1064, ["aria-current", "class", "data-testid", "href", "to", "onClick", "onKeydown"]))
145
154
  ]))), 128)),
146
- t.tabs.length > r.value ? (i(), d("li", Tt, [
147
- M(C, { "kpop-attributes": {
155
+ e.tabs.length > l.value ? (o(), u("li", Ie, [
156
+ E($, { "kpop-attributes": {
148
157
  placement: "bottom-end",
149
158
  popoverElementAttributes: { "data-testid": "tabs-overflow-dropdown-popover" }
150
159
  } }, {
151
- items: S(() => [
152
- (i(!0), d(x, null, R(u.value, (e) => (i(), T(N, {
153
- key: `${e.key}-dropdown-item`,
154
- "aria-current": e.active ? "page" : void 0,
155
- "data-testid": e.dataTestId ? e.dataTestId : `page-layout-tab-${e.key}`,
160
+ items: K(() => [
161
+ (o(!0), u(A, null, O(n.value, (t) => (o(), k(x, {
162
+ key: `${t.key}-dropdown-item`,
163
+ "aria-current": t.active ? "page" : void 0,
164
+ "data-testid": t.dataTestId ? t.dataTestId : `page-layout-tab-${t.key}`,
156
165
  item: {
157
- label: e.label,
158
- value: e.key,
159
- to: e.to
166
+ label: t.label,
167
+ value: t.key,
168
+ to: t.to
160
169
  },
161
- selected: e.active
170
+ selected: t.active
162
171
  }, null, 8, ["aria-current", "data-testid", "item", "selected"]))), 128))
163
172
  ]),
164
- default: S(() => [
173
+ default: K(() => [
165
174
  g("button", {
166
- "aria-label": h(l)("tabs.more_button.aria_label"),
167
- class: B(["tab-link overflow-dropdown-trigger", { active: u.value.find((e) => e.active) }]),
175
+ "aria-label": w(a)("tabs.more_button.aria_label"),
176
+ class: B(["tab-link overflow-dropdown-trigger", { active: n.value.find((t) => t.active) }]),
168
177
  "data-testid": "tabs-overflow-dropdown-button"
169
178
  }, [
170
- W(P(h(l)("tabs.more_button.label")) + " ", 1),
171
- g("span", It, P(t.tabs.length - r.value), 1)
172
- ], 10, wt)
179
+ W(L(w(a)("tabs.more_button.label")) + " ", 1),
180
+ g("span", $e, L(e.tabs.length - l.value), 1)
181
+ ], 10, Ce)
173
182
  ]),
174
183
  _: 1
175
184
  })
176
185
  ])) : y("", !0)
177
186
  ], 2),
178
- v.value ? y("", !0) : (i(), d("div", _t, [
179
- (i(), d(x, null, R(3, (e) => M(L, {
180
- key: `layout-loader-${e}`,
187
+ c.value ? y("", !0) : (o(), u("div", Se, [
188
+ (o(), u(A, null, O(3, (t) => E(S, {
189
+ key: `layout-loader-${t}`,
181
190
  height: "1",
182
191
  width: "5"
183
192
  })), 64))
@@ -185,29 +194,29 @@ const kt = {
185
194
  ], 512);
186
195
  };
187
196
  }
188
- }), X = (t, l) => {
189
- const n = t.__vccOpts || t;
190
- for (const [o, a] of l)
191
- n[o] = a;
192
- return n;
193
- }, Ct = /* @__PURE__ */ X($t, [["__scopeId", "data-v-fa2669f0"]]), Z = Symbol("nested-page-layout-detection"), Lt = {
197
+ }), Y = (e, a) => {
198
+ const s = e.__vccOpts || e;
199
+ for (const [d, v] of a)
200
+ s[d] = v;
201
+ return s;
202
+ }, Ke = /* @__PURE__ */ Y(Be, [["__scopeId", "data-v-3d1c52f4"]]), j = Symbol("nested-page-layout-detection"), Le = {
194
203
  class: "kong-ui-public-page-layout",
195
204
  "data-testid": "kong-ui-public-page-layout"
196
- }, Kt = {
205
+ }, De = {
197
206
  key: 0,
198
207
  class: "page-layout-header",
199
208
  "data-testid": "page-layout-header"
200
- }, Bt = { class: "page-header-container" }, St = { class: "page-header-start" }, Pt = { class: "title-container" }, At = {
209
+ }, Re = { class: "page-header-container" }, Ne = { class: "page-header-start" }, xe = { class: "title-container" }, Ae = {
201
210
  key: 1,
202
211
  class: "page-layout-title",
203
212
  "data-testid": "page-layout-title"
204
- }, Dt = {
213
+ }, Oe = {
205
214
  key: 2,
206
215
  class: "title-after-container"
207
- }, Et = {
216
+ }, Pe = {
208
217
  key: 0,
209
218
  class: "page-header-actions-container"
210
- }, Nt = /* @__PURE__ */ H({
219
+ }, ze = /* @__PURE__ */ q({
211
220
  __name: "PageLayout",
212
221
  props: {
213
222
  breadcrumbs: { default: () => [] },
@@ -215,87 +224,87 @@ const kt = {
215
224
  backTo: {},
216
225
  tabs: { default: () => [] }
217
226
  },
218
- setup(t) {
219
- const l = z("app:navigateTo", null), { i18n: { t: n } } = Q.useI18n(), o = J(), a = w(() => !!(t.tabs && t.tabs.length)), s = w(() => typeof t.backTo == "string"), c = async () => {
220
- if (t.backTo) {
221
- if (typeof t.backTo == "object") {
222
- o.push(t.backTo);
227
+ setup(e) {
228
+ const a = z("app:navigateTo", null), { i18n: { t: s } } = X.useI18n(), d = Q(), v = h(() => !!(e.tabs && e.tabs.length)), i = h(() => typeof e.backTo == "string"), b = async () => {
229
+ if (e.backTo) {
230
+ if (typeof e.backTo == "object") {
231
+ d.push(e.backTo);
223
232
  return;
224
233
  }
225
- if (typeof l != "function") {
226
- window.location.href = t.backTo;
234
+ if (typeof a != "function") {
235
+ window.location.href = e.backTo;
227
236
  return;
228
237
  }
229
- await l(t.backTo);
238
+ await a(e.backTo);
230
239
  }
231
- }, m = A(0), r = w(() => m.value > 0);
232
- at(Z, () => (m.value++, () => {
233
- m.value--;
240
+ }, f = D(0), l = h(() => f.value > 0);
241
+ ie(j, () => (f.value++, () => {
242
+ f.value--;
234
243
  }));
235
- const v = z(Z, null), p = A(null);
236
- return typeof v == "function" && (p.value = v()), ot(() => {
237
- var u;
238
- (u = p.value) == null || u.call(p);
239
- }), (u, k) => {
240
- const b = _("KBreadcrumbs"), E = _("router-view");
241
- return i(), d("div", Lt, [
242
- r.value ? y("", !0) : (i(), d("div", Kt, [
243
- g("div", Bt, [
244
- g("div", St, [
245
- t.breadcrumbs && t.breadcrumbs.length ? (i(), T(b, {
244
+ const c = z(j, null), r = D(null);
245
+ return typeof c == "function" && (r.value = c()), le(() => {
246
+ var n;
247
+ (n = r.value) == null || n.call(r);
248
+ }), (n, I) => {
249
+ const m = _("KBreadcrumbs"), N = _("router-view");
250
+ return o(), u("div", Le, [
251
+ l.value ? y("", !0) : (o(), u("div", De, [
252
+ g("div", Re, [
253
+ g("div", Ne, [
254
+ e.breadcrumbs && e.breadcrumbs.length ? (o(), k(m, {
246
255
  key: 0,
247
256
  class: "header-breadcrumbs",
248
257
  "data-testid": "page-layout-breadcrumbs",
249
258
  "item-max-width": "25ch",
250
- items: t.breadcrumbs
259
+ items: e.breadcrumbs
251
260
  }, null, 8, ["items"])) : y("", !0),
252
- g("div", Pt, [
253
- t.backTo ? (i(), T(q(s.value ? "a" : "router-link"), {
261
+ g("div", xe, [
262
+ e.backTo ? (o(), k(J(i.value ? "a" : "router-link"), {
254
263
  key: 0,
255
- "aria-label": h(n)("back_button"),
264
+ "aria-label": w(s)("back_button"),
256
265
  class: "navigate-back",
257
266
  "data-testid": "page-layout-navigate-back",
258
- href: s.value ? t.backTo : void 0,
267
+ href: i.value ? e.backTo : void 0,
259
268
  tabindex: "0",
260
- to: s.value ? void 0 : t.backTo,
261
- onClick: I(c, ["prevent"]),
269
+ to: i.value ? void 0 : e.backTo,
270
+ onClick: T(b, ["prevent"]),
262
271
  onKeydown: [
263
- D(I(c, ["prevent"]), ["enter"]),
264
- D(I(c, ["prevent"]), ["space"])
272
+ R(T(b, ["prevent"]), ["enter"]),
273
+ R(T(b, ["prevent"]), ["space"])
265
274
  ]
266
275
  }, {
267
- default: S(() => [
268
- M(h(it), {
276
+ default: K(() => [
277
+ E(w(ce), {
269
278
  decorative: "",
270
- size: h(dt)
279
+ size: w(pe)
271
280
  }, null, 8, ["size"])
272
281
  ]),
273
282
  _: 1
274
283
  }, 40, ["aria-label", "href", "to", "onKeydown"])) : y("", !0),
275
- t.title ? (i(), d("h1", At, P(t.title), 1)) : y("", !0),
276
- u.$slots["title-after"] ? (i(), d("div", Dt, [
277
- O(u.$slots, "title-after", {}, void 0, !0)
284
+ e.title ? (o(), u("h1", Ae, L(e.title), 1)) : y("", !0),
285
+ n.$slots["title-after"] ? (o(), u("div", Oe, [
286
+ P(n.$slots, "title-after", {}, void 0, !0)
278
287
  ])) : y("", !0)
279
288
  ])
280
289
  ]),
281
- u.$slots.actions ? (i(), d("div", Et, [
282
- O(u.$slots, "actions", {}, void 0, !0)
290
+ n.$slots.actions ? (o(), u("div", Pe, [
291
+ P(n.$slots, "actions", {}, void 0, !0)
283
292
  ])) : y("", !0)
284
293
  ]),
285
- a.value ? (i(), T(Ct, {
294
+ v.value ? (o(), k(Ke, {
286
295
  key: 0,
287
- tabs: t.tabs
296
+ tabs: e.tabs
288
297
  }, null, 8, ["tabs"])) : y("", !0)
289
298
  ])),
290
299
  g("div", {
291
- class: B(["page-layout-content", { "has-nested-page-layout": r.value }])
300
+ class: B(["page-layout-content", { "has-nested-page-layout": l.value }])
292
301
  }, [
293
- a.value ? (i(), T(E, { key: 0 })) : O(u.$slots, "default", { key: 1 }, void 0, !0)
302
+ v.value ? (o(), k(N, { key: 0 })) : P(n.$slots, "default", { key: 1 }, void 0, !0)
294
303
  ], 2)
295
304
  ]);
296
305
  };
297
306
  }
298
- }), zt = /* @__PURE__ */ X(Nt, [["__scopeId", "data-v-4ca3c7b5"]]);
307
+ }), Ge = /* @__PURE__ */ Y(ze, [["__scopeId", "data-v-4ca3c7b5"]]);
299
308
  export {
300
- zt as PageLayout
309
+ Ge as PageLayout
301
310
  };
@@ -1 +1 @@
1
- (function(u,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):(u=typeof globalThis<"u"?globalThis:u||self,t(u["kong-ui-public-page-layout"]={},u.Vue,u.VueRouter,u["kong-ui-public-i18n"],u.KongIcons))})(this,function(u,t,E,N,S){"use strict";const L={back_button:"Go back",tabs:{more_button:{label:"More",aria_label:"More tabs"}}};function K(){const e=N.createI18n("en-us",L);return{i18n:e,i18nT:N.i18nTComponent(e)}}const V={useI18n:K},x="16px",D="16px",P=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const M=Object.prototype.toString,j=e=>M.call(e)==="[object Object]";function T(e){return Array.isArray(e)?e:[e]}function A(e,c,l){return t.watch(e,c,{...l,immediate:!0})}const R=P?window:void 0;function z(e){var c;const l=t.toValue(e);return(c=l==null?void 0:l.$el)!==null&&c!==void 0?c:l}function O(...e){const c=(a,n,i,r)=>(a.addEventListener(n,i,r),()=>a.removeEventListener(n,i,r)),l=t.computed(()=>{const a=T(t.toValue(e[0])).filter(n=>n!=null);return a.every(n=>typeof n!="string")?a:void 0});return A(()=>{var a,n;return[(a=(n=l.value)===null||n===void 0?void 0:n.map(i=>z(i)))!==null&&a!==void 0?a:[R].filter(i=>i!=null),T(t.toValue(l.value?e[1]:e[0])),T(t.unref(l.value?e[2]:e[1])),t.toValue(l.value?e[3]:e[2])]},([a,n,i,r],k,d)=>{if(!(a!=null&&a.length)||!(n!=null&&n.length)||!(i!=null&&i.length))return;const m=j(r)?{...r}:r,y=a.flatMap(s=>n.flatMap(b=>i.map(p=>c(s,b,p,m))));d(()=>{y.forEach(s=>s())})},{flush:"post"})}const G={ref:"page-layout-tabs",class:"page-layout-tabs","data-testid":"page-layout-tabs"},W={key:0},q=["aria-label"],U={class:"overflowing-items-count"},F={key:0,class:"layout-loader-container"},Z=t.defineComponent({__name:"PageLayoutTabs",props:{tabs:{default:()=>[]}},setup(e){t.useCssVars(f=>({v417a39b5:t.unref(i)}));const{i18n:{t:c}}=V.useI18n(),l=E.useRouter(),a=t.inject("app:navigateTo",null),n=f=>{if(typeof f.to!="string"){l.push(f.to);return}if(typeof a!="function"){window.location.href=f.to;return}a(f.to)},i=D,r=t.useTemplateRef("page-layout-tabs"),k=t.useTemplateRef("page-layout-tabs-list"),d=t.ref(e.tabs.length),m=t.ref(!1),y=t.computed(()=>e.tabs.slice(0,d.value)),s=t.computed(()=>e.tabs.slice(d.value)),b=async()=>{var g,B,o;if(!r.value||!k.value)return;m.value=!1,d.value=e.tabs.length,await t.nextTick();const f=((g=r.value)==null?void 0:g.getBoundingClientRect().width)-parseInt(i)*2;let h=(B=k.value)==null?void 0:B.getBoundingClientRect().width;if(!f||!h){m.value=!0;return}const w=50;for(;h+w>f&&d.value>1;)d.value--,await t.nextTick(),h=((o=k.value)==null?void 0:o.getBoundingClientRect().width)||0;m.value=!0};let p=null;const C=()=>{p&&clearTimeout(p),p=setTimeout(()=>{b()},150)};return t.onMounted(()=>{b(),O(window,"resize",C)}),t.onBeforeUnmount(()=>{p&&clearTimeout(p)}),t.watch(()=>e.tabs,()=>{b()},{deep:!0}),(f,h)=>{const w=t.resolveComponent("KDropdownItem"),g=t.resolveComponent("KDropdown"),B=t.resolveComponent("KSkeletonBox");return t.openBlock(),t.createElementBlock("nav",G,[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(y.value,o=>(t.openBlock(),t.createElementBlock("li",{key:`${o.key}-tab`},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(typeof o.to=="string"?"a":"router-link"),{"aria-current":o.active?"page":void 0,class:t.normalizeClass(["tab-link",{active:o.active}]),"data-testid":o.dataTestId?o.dataTestId:`page-layout-tab-${o.key}`,href:typeof o.to=="string"?o.to:void 0,tabindex:"0",to:typeof o.to=="string"?void 0:o.to,onClick:t.withModifiers($=>n(o),["prevent"]),onKeydown:[t.withKeys(t.withModifiers($=>n(o),["prevent"]),["enter"]),t.withKeys(t.withModifiers($=>n(o),["prevent"]),["space"])]},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.label),1)]),_:2},1064,["aria-current","class","data-testid","href","to","onClick","onKeydown"]))]))),128)),e.tabs.length>d.value?(t.openBlock(),t.createElementBlock("li",W,[t.createVNode(g,{"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(s.value,o=>(t.openBlock(),t.createBlock(w,{key:`${o.key}-dropdown-item`,"aria-current":o.active?"page":void 0,"data-testid":o.dataTestId?o.dataTestId:`page-layout-tab-${o.key}`,item:{label:o.label,value:o.key,to:o.to},selected:o.active},null,8,["aria-current","data-testid","item","selected"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("button",{"aria-label":t.unref(c)("tabs.more_button.aria_label"),class:t.normalizeClass(["tab-link overflow-dropdown-trigger",{active:s.value.find(o=>o.active)}]),"data-testid":"tabs-overflow-dropdown-button"},[t.createTextVNode(t.toDisplayString(t.unref(c)("tabs.more_button.label"))+" ",1),t.createElementVNode("span",U,t.toDisplayString(e.tabs.length-d.value),1)],10,q)]),_:1})])):t.createCommentVNode("",!0)],2),m.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",F,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(3,o=>t.createVNode(B,{key:`layout-loader-${o}`,height:"1",width:"5"})),64))]))],512)}}}),_=(e,c)=>{const l=e.__vccOpts||e;for(const[a,n]of c)l[a]=n;return l},H=_(Z,[["__scopeId","data-v-fa2669f0"]]),I=Symbol("nested-page-layout-detection"),J={class:"kong-ui-public-page-layout","data-testid":"kong-ui-public-page-layout"},Q={key:0,class:"page-layout-header","data-testid":"page-layout-header"},X={class:"page-header-container"},Y={class:"page-header-start"},v={class:"title-container"},tt={key:1,class:"page-layout-title","data-testid":"page-layout-title"},et={key:2,class:"title-after-container"},ot={key:0,class:"page-header-actions-container"},nt=_(t.defineComponent({__name:"PageLayout",props:{breadcrumbs:{default:()=>[]},title:{},backTo:{},tabs:{default:()=>[]}},setup(e){const c=t.inject("app:navigateTo",null),{i18n:{t:l}}=V.useI18n(),a=E.useRouter(),n=t.computed(()=>!!(e.tabs&&e.tabs.length)),i=t.computed(()=>typeof e.backTo=="string"),r=async()=>{if(e.backTo){if(typeof e.backTo=="object"){a.push(e.backTo);return}if(typeof c!="function"){window.location.href=e.backTo;return}await c(e.backTo)}},k=t.ref(0),d=t.computed(()=>k.value>0);t.provide(I,()=>(k.value++,()=>{k.value--}));const m=t.inject(I,null),y=t.ref(null);return typeof m=="function"&&(y.value=m()),t.onUnmounted(()=>{var s;(s=y.value)==null||s.call(y)}),(s,b)=>{const p=t.resolveComponent("KBreadcrumbs"),C=t.resolveComponent("router-view");return t.openBlock(),t.createElementBlock("div",J,[d.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Q,[t.createElementVNode("div",X,[t.createElementVNode("div",Y,[e.breadcrumbs&&e.breadcrumbs.length?(t.openBlock(),t.createBlock(p,{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",v,[e.backTo?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.value?"a":"router-link"),{key:0,"aria-label":t.unref(l)("back_button"),class:"navigate-back","data-testid":"page-layout-navigate-back",href:i.value?e.backTo:void 0,tabindex:"0",to:i.value?void 0:e.backTo,onClick:t.withModifiers(r,["prevent"]),onKeydown:[t.withKeys(t.withModifiers(r,["prevent"]),["enter"]),t.withKeys(t.withModifiers(r,["prevent"]),["space"])]},{default:t.withCtx(()=>[t.createVNode(t.unref(S.ArrowTopLeftIcon),{decorative:"",size:t.unref(x)},null,8,["size"])]),_:1},40,["aria-label","href","to","onKeydown"])):t.createCommentVNode("",!0),e.title?(t.openBlock(),t.createElementBlock("h1",tt,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),s.$slots["title-after"]?(t.openBlock(),t.createElementBlock("div",et,[t.renderSlot(s.$slots,"title-after",{},void 0,!0)])):t.createCommentVNode("",!0)])]),s.$slots.actions?(t.openBlock(),t.createElementBlock("div",ot,[t.renderSlot(s.$slots,"actions",{},void 0,!0)])):t.createCommentVNode("",!0)]),n.value?(t.openBlock(),t.createBlock(H,{key:0,tabs:e.tabs},null,8,["tabs"])):t.createCommentVNode("",!0)])),t.createElementVNode("div",{class:t.normalizeClass(["page-layout-content",{"has-nested-page-layout":d.value}])},[n.value?(t.openBlock(),t.createBlock(C,{key:0})):t.renderSlot(s.$slots,"default",{key:1},void 0,!0)],2)])}}}),[["__scopeId","data-v-4ca3c7b5"]]);u.PageLayout=nt,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
1
+ (function(d,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):(d=typeof globalThis<"u"?globalThis:d||self,e(d["kong-ui-public-page-layout"]={},d.Vue,d.VueRouter,d["kong-ui-public-i18n"],d.KongIcons))})(this,function(d,e,C,_,$){"use strict";const K={back_button:"Go back",tabs:{more_button:{label:"More",aria_label:"More tabs"}}};function L(){const t=_.createI18n("en-us",K);return{i18n:t,i18nT:_.i18nTComponent(t)}}const N={useI18n:L},D="16px",x="16px";function R(t,n){return e.getCurrentScope()?(e.onScopeDispose(t,n),!0):!1}const M=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const z=M?window:void 0;function V(t){var n;const s=e.toValue(t);return(n=s==null?void 0:s.$el)!==null&&n!==void 0?n:s}function O(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function P(t){const n=O();return e.computed(()=>(n.value,!!t()))}function A(t,n,s={}){const{window:u=z,...p}=s;let c;const m=P(()=>u&&"ResizeObserver"in u),f=()=>{c&&(c.disconnect(),c=void 0)},i=e.watch(e.computed(()=>{const l=e.toValue(t);return Array.isArray(l)?l.map(a=>V(a)):[V(l)]}),l=>{if(f(),m.value&&u){c=new ResizeObserver(n);for(const a of l)a&&c.observe(a,p)}},{immediate:!0,flush:"post"}),r=()=>{f(),i()};return R(r),{isSupported:m,stop:r}}const j={ref:"page-layout-tabs",class:"page-layout-tabs","data-testid":"page-layout-tabs"},W={key:0},G=["aria-label"],q={class:"overflowing-items-count"},U={key:0,class:"layout-loader-container"},F=e.defineComponent({__name:"PageLayoutTabs",props:{tabs:{default:()=>[]}},setup(t){e.useCssVars(k=>({v235ab89a:e.unref(c)}));const{i18n:{t:n}}=N.useI18n(),s=C.useRouter(),u=e.inject("app:navigateTo",null),p=k=>{if(typeof k.to!="string"){s.push(k.to);return}if(typeof u!="function"){window.location.href=k.to;return}u(k.to)},c=x,m=e.useTemplateRef("page-layout-tabs"),f=e.useTemplateRef("page-layout-tabs-list"),i=e.ref(t.tabs.length),r=e.ref(!1),l=e.computed(()=>t.tabs.slice(0,i.value)),a=e.computed(()=>t.tabs.slice(i.value)),y=async()=>{var h,w,o;if(!m.value||!f.value)return;r.value=!1,i.value=t.tabs.length,await e.nextTick();const k=((h=m.value)==null?void 0:h.getBoundingClientRect().width)-parseInt(c)*2;let g=(w=f.value)==null?void 0:w.getBoundingClientRect().width;if(!k||!g){r.value=!0;return}const T=50;for(;g+T>k&&i.value>1;)i.value--,await e.nextTick(),g=((o=f.value)==null?void 0:o.getBoundingClientRect().width)||0;r.value=!0};let b=null;const B=()=>{b&&clearTimeout(b),b=setTimeout(()=>{y()},150)};return e.onMounted(()=>{y(),A(m,B)}),e.onBeforeUnmount(()=>{b&&clearTimeout(b)}),e.watch(()=>t.tabs,()=>{y()},{deep:!0}),(k,g)=>{const T=e.resolveComponent("KDropdownItem"),h=e.resolveComponent("KDropdown"),w=e.resolveComponent("KSkeletonBox");return e.openBlock(),e.createElementBlock("nav",j,[e.createElementVNode("ul",{ref:"page-layout-tabs-list",class:e.normalizeClass({"layout-computing":!r.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,o=>(e.openBlock(),e.createElementBlock("li",{key:`${o.key}-tab`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(typeof o.to=="string"?"a":"router-link"),{"aria-current":o.active?"page":void 0,class:e.normalizeClass(["tab-link",{active:o.active}]),"data-testid":o.dataTestId?o.dataTestId:`page-layout-tab-${o.key}`,href:typeof o.to=="string"?o.to:void 0,tabindex:"0",to:typeof o.to=="string"?void 0:o.to,onClick:e.withModifiers(E=>p(o),["prevent"]),onKeydown:[e.withKeys(e.withModifiers(E=>p(o),["prevent"]),["enter"]),e.withKeys(e.withModifiers(E=>p(o),["prevent"]),["space"])]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1064,["aria-current","class","data-testid","href","to","onClick","onKeydown"]))]))),128)),t.tabs.length>i.value?(e.openBlock(),e.createElementBlock("li",W,[e.createVNode(h,{"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(a.value,o=>(e.openBlock(),e.createBlock(T,{key:`${o.key}-dropdown-item`,"aria-current":o.active?"page":void 0,"data-testid":o.dataTestId?o.dataTestId:`page-layout-tab-${o.key}`,item:{label:o.label,value:o.key,to:o.to},selected:o.active},null,8,["aria-current","data-testid","item","selected"]))),128))]),default:e.withCtx(()=>[e.createElementVNode("button",{"aria-label":e.unref(n)("tabs.more_button.aria_label"),class:e.normalizeClass(["tab-link overflow-dropdown-trigger",{active:a.value.find(o=>o.active)}]),"data-testid":"tabs-overflow-dropdown-button"},[e.createTextVNode(e.toDisplayString(e.unref(n)("tabs.more_button.label"))+" ",1),e.createElementVNode("span",q,e.toDisplayString(t.tabs.length-i.value),1)],10,G)]),_:1})])):e.createCommentVNode("",!0)],2),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",U,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,o=>e.createVNode(w,{key:`layout-loader-${o}`,height:"1",width:"5"})),64))]))],512)}}}),I=(t,n)=>{const s=t.__vccOpts||t;for(const[u,p]of n)s[u]=p;return s},Z=I(F,[["__scopeId","data-v-3d1c52f4"]]),S=Symbol("nested-page-layout-detection"),H={class:"kong-ui-public-page-layout","data-testid":"kong-ui-public-page-layout"},J={key:0,class:"page-layout-header","data-testid":"page-layout-header"},Q={class:"page-header-container"},X={class:"page-header-start"},Y={class:"title-container"},v={key:1,class:"page-layout-title","data-testid":"page-layout-title"},ee={key:2,class:"title-after-container"},te={key:0,class:"page-header-actions-container"},oe=I(e.defineComponent({__name:"PageLayout",props:{breadcrumbs:{default:()=>[]},title:{},backTo:{},tabs:{default:()=>[]}},setup(t){const n=e.inject("app:navigateTo",null),{i18n:{t:s}}=N.useI18n(),u=C.useRouter(),p=e.computed(()=>!!(t.tabs&&t.tabs.length)),c=e.computed(()=>typeof t.backTo=="string"),m=async()=>{if(t.backTo){if(typeof t.backTo=="object"){u.push(t.backTo);return}if(typeof n!="function"){window.location.href=t.backTo;return}await n(t.backTo)}},f=e.ref(0),i=e.computed(()=>f.value>0);e.provide(S,()=>(f.value++,()=>{f.value--}));const r=e.inject(S,null),l=e.ref(null);return typeof r=="function"&&(l.value=r()),e.onUnmounted(()=>{var a;(a=l.value)==null||a.call(l)}),(a,y)=>{const b=e.resolveComponent("KBreadcrumbs"),B=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",H,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",Q,[e.createElementVNode("div",X,[t.breadcrumbs&&t.breadcrumbs.length?(e.openBlock(),e.createBlock(b,{key:0,class:"header-breadcrumbs","data-testid":"page-layout-breadcrumbs","item-max-width":"25ch",items:t.breadcrumbs},null,8,["items"])):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[t.backTo?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.value?"a":"router-link"),{key:0,"aria-label":e.unref(s)("back_button"),class:"navigate-back","data-testid":"page-layout-navigate-back",href:c.value?t.backTo:void 0,tabindex:"0",to:c.value?void 0:t.backTo,onClick:e.withModifiers(m,["prevent"]),onKeydown:[e.withKeys(e.withModifiers(m,["prevent"]),["enter"]),e.withKeys(e.withModifiers(m,["prevent"]),["space"])]},{default:e.withCtx(()=>[e.createVNode(e.unref($.ArrowTopLeftIcon),{decorative:"",size:e.unref(D)},null,8,["size"])]),_:1},40,["aria-label","href","to","onKeydown"])):e.createCommentVNode("",!0),t.title?(e.openBlock(),e.createElementBlock("h1",v,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),a.$slots["title-after"]?(e.openBlock(),e.createElementBlock("div",ee,[e.renderSlot(a.$slots,"title-after",{},void 0,!0)])):e.createCommentVNode("",!0)])]),a.$slots.actions?(e.openBlock(),e.createElementBlock("div",te,[e.renderSlot(a.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),p.value?(e.openBlock(),e.createBlock(Z,{key:0,tabs:t.tabs},null,8,["tabs"])):e.createCommentVNode("",!0)])),e.createElementVNode("div",{class:e.normalizeClass(["page-layout-content",{"has-nested-page-layout":i.value}])},[p.value?(e.openBlock(),e.createBlock(B,{key:0})):e.renderSlot(a.$slots,"default",{key:1},void 0,!0)],2)])}}}),[["__scopeId","data-v-4ca3c7b5"]]);d.PageLayout=oe,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .page-layout-tabs[data-v-fa2669f0]{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(--v417a39b5);padding:var(--kui-space-0, 0px) var(--v417a39b5);position:relative;width:100%}.page-layout-tabs a[data-v-fa2669f0],.page-layout-tabs button[data-v-fa2669f0]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);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-fa2669f0]{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-fa2669f0]{height:0;visibility:hidden}.page-layout-tabs ul li[data-v-fa2669f0]{display:flex}.page-layout-tabs ul li .tab-link[data-v-fa2669f0]{align-items:center;border-bottom:2px solid transparent;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-transparent, transparent);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);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-fa2669f0]:hover{border-bottom:2px solid #afb7c5;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-neutral-weak, #afb7c5);color:#000933;color:var(--kui-color-text, #000933)}.page-layout-tabs ul li .tab-link[data-v-fa2669f0]: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-tabs ul li .tab-link.active[data-v-fa2669f0]{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)}.page-layout-tabs ul li .tab-link.overflow-dropdown-trigger[data-v-fa2669f0]{color:#000933;color:var(--kui-color-text, #000933);font-weight:500!important;font-weight:var(--kui-font-weight-medium, 500)!important}.page-layout-tabs ul li .tab-link.overflow-dropdown-trigger .overflowing-items-count[data-v-fa2669f0]{background-color:#e0e4ea;background-color:var(--kui-color-background-neutral-weaker, #e0e4ea);border-radius:100px;border-radius:var(--kui-border-radius-round, 100px);color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e);font-size:11px;font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);line-height:12px;padding:2px 6px;padding:var(--kui-space-10, 2px) var(--kui-space-30, 6px)}.page-layout-tabs ul li .tab-link.overflow-dropdown-trigger.active .overflowing-items-count[data-v-fa2669f0]{background-color:#eefaff;background-color:var(--kui-color-background-primary-weakest, #eefaff);color:#0044f4;color:var(--kui-color-text-primary, #0044f4)}.page-layout-tabs .layout-loader-container[data-v-fa2669f0]{align-items:center;display:flex;gap:20px;gap:var(--kui-space-70, 20px);height:34px;top:0;right:0;bottom:0;left:0;left:var(--v417a39b5);position:absolute}.kong-ui-public-page-layout[data-v-4ca3c7b5]{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-4ca3c7b5]{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-4ca3c7b5]{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 .header-breadcrumbs[data-v-4ca3c7b5] .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-4ca3c7b5] .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-4ca3c7b5]{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-4ca3c7b5]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);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-4ca3c7b5]:hover{color:#000933;color:var(--kui-color-text, #000933)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .navigate-back[data-v-4ca3c7b5]: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[data-v-4ca3c7b5]{color:#000933;color:var(--kui-color-text, #000933);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)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .title-after-container[data-v-4ca3c7b5]{align-items:flex-end;display:flex;gap:6px;gap:var(--kui-space-30, 6px);padding-left:4px;padding-left:var(--kui-space-20, 4px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-actions-container[data-v-4ca3c7b5]{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-4ca3c7b5]{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-4ca3c7b5]{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-4ca3c7b5]{padding:0;padding:var(--kui-space-0, 0px)}
1
+ .page-layout-tabs[data-v-3d1c52f4]{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(--v235ab89a);padding:var(--kui-space-0, 0px) var(--v235ab89a);position:relative;width:100%}.page-layout-tabs a[data-v-3d1c52f4],.page-layout-tabs button[data-v-3d1c52f4]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);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-3d1c52f4]{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-3d1c52f4]{height:0;visibility:hidden}.page-layout-tabs ul li[data-v-3d1c52f4]{display:flex}.page-layout-tabs ul li .tab-link[data-v-3d1c52f4]{align-items:center;border-bottom:2px solid transparent;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-transparent, transparent);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);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-3d1c52f4]:hover{border-bottom:2px solid #afb7c5;border-bottom:var(--kui-border-width-20, 2px) solid var(--kui-color-border-neutral-weak, #afb7c5);color:#000933;color:var(--kui-color-text, #000933)}.page-layout-tabs ul li .tab-link[data-v-3d1c52f4]: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-tabs ul li .tab-link.active[data-v-3d1c52f4]{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)}.page-layout-tabs ul li .tab-link.overflow-dropdown-trigger[data-v-3d1c52f4]{color:#000933;color:var(--kui-color-text, #000933);font-weight:500!important;font-weight:var(--kui-font-weight-medium, 500)!important}.page-layout-tabs ul li .tab-link.overflow-dropdown-trigger .overflowing-items-count[data-v-3d1c52f4]{background-color:#e0e4ea;background-color:var(--kui-color-background-neutral-weaker, #e0e4ea);border-radius:100px;border-radius:var(--kui-border-radius-round, 100px);color:#52596e;color:var(--kui-color-text-neutral-strong, #52596e);font-size:11px;font-weight:600;font-weight:var(--kui-font-weight-semibold, 600);line-height:12px;padding:2px 6px;padding:var(--kui-space-10, 2px) var(--kui-space-30, 6px)}.page-layout-tabs ul li .tab-link.overflow-dropdown-trigger.active .overflowing-items-count[data-v-3d1c52f4]{background-color:#eefaff;background-color:var(--kui-color-background-primary-weakest, #eefaff);color:#0044f4;color:var(--kui-color-text-primary, #0044f4)}.page-layout-tabs .layout-loader-container[data-v-3d1c52f4]{align-items:center;display:flex;gap:20px;gap:var(--kui-space-70, 20px);height:34px;top:0;right:0;bottom:0;left:0;left:var(--v235ab89a);position:absolute}.kong-ui-public-page-layout[data-v-4ca3c7b5]{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-4ca3c7b5]{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-4ca3c7b5]{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 .header-breadcrumbs[data-v-4ca3c7b5] .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-4ca3c7b5] .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-4ca3c7b5]{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-4ca3c7b5]{background-color:transparent;background-color:var(--kui-color-background-transparent, transparent);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-4ca3c7b5]:hover{color:#000933;color:var(--kui-color-text, #000933)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .navigate-back[data-v-4ca3c7b5]: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[data-v-4ca3c7b5]{color:#000933;color:var(--kui-color-text, #000933);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)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-start .title-container .title-after-container[data-v-4ca3c7b5]{align-items:flex-end;display:flex;gap:6px;gap:var(--kui-space-30, 6px);padding-left:4px;padding-left:var(--kui-space-20, 4px)}.kong-ui-public-page-layout .page-layout-header .page-header-container .page-header-actions-container[data-v-4ca3c7b5]{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-4ca3c7b5]{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-4ca3c7b5]{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-4ca3c7b5]{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": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "type": "module",
5
5
  "main": "./dist/page-layout.umd.js",
6
6
  "module": "./dist/page-layout.es.js",