@kong-ui-public/page-layout 0.2.6 → 0.2.7

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,152 +1,153 @@
1
- import { watch as Q, computed as T, toValue as K, unref as w, defineComponent as Z, useCssVars as X, inject as O, useTemplateRef as M, ref as x, onMounted as Y, onBeforeUnmount as ee, resolveComponent as _, openBlock as i, createElementBlock as d, createElementVNode as g, normalizeClass as B, Fragment as E, renderList as N, createBlock as k, resolveDynamicComponent as F, withKeys as A, withModifiers as I, withCtx as S, createTextVNode as V, toDisplayString as P, createVNode as j, createCommentVNode as p, nextTick as W, provide as te, onUnmounted as ae, renderSlot as G } from "vue";
2
- import { useRouter as H } from "vue-router";
3
- import { createI18n as oe, i18nTComponent as ne } from "@kong-ui-public/i18n";
4
- import { ArrowTopLeftIcon as se } from "@kong/icons";
5
- const ie = {
1
+ import { watch as X, computed as T, toValue as K, unref as h, defineComponent as F, useCssVars as Y, inject as j, useTemplateRef as V, ref as x, onMounted as ee, onBeforeUnmount as te, resolveComponent as I, openBlock as i, createElementBlock as d, createElementVNode as g, normalizeClass as B, Fragment as N, renderList as R, createBlock as k, resolveDynamicComponent as H, withKeys as A, withModifiers as w, withCtx as S, createTextVNode as G, toDisplayString as P, createVNode as z, createCommentVNode as m, nextTick as W, provide as ae, onUnmounted as oe, renderSlot as U } from "vue";
2
+ import { useRouter as q } from "vue-router";
3
+ import { createI18n as ne, i18nTComponent as se } from "@kong-ui-public/i18n";
4
+ import { ArrowTopLeftIcon as ie } from "@kong/icons";
5
+ const le = "Go back", ue = {
6
6
  more_button: {
7
7
  label: "More",
8
8
  aria_label: "More tabs"
9
9
  }
10
- }, le = {
11
- tabs: ie
10
+ }, ce = {
11
+ back_button: le,
12
+ tabs: ue
12
13
  };
13
- function ue() {
14
- const e = oe("en-us", le);
14
+ function re() {
15
+ const e = ne("en-us", ce);
15
16
  return {
16
17
  i18n: e,
17
- i18nT: ne(e)
18
+ i18nT: se(e)
18
19
  // Translation component <i18n-t>
19
20
  };
20
21
  }
21
- const ce = {
22
- useI18n: ue
23
- }, re = "16px", de = "16px", ve = typeof window < "u" && typeof document < "u";
22
+ const J = {
23
+ useI18n: re
24
+ }, de = "16px", ve = "16px", be = typeof window < "u" && typeof document < "u";
24
25
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
25
26
  const ye = Object.prototype.toString, fe = (e) => ye.call(e) === "[object Object]";
26
- function R(e) {
27
+ function O(e) {
27
28
  return Array.isArray(e) ? e : [e];
28
29
  }
29
30
  function pe(e, l, n) {
30
- return Q(e, l, {
31
+ return X(e, l, {
31
32
  ...n,
32
33
  immediate: !0
33
34
  });
34
35
  }
35
- const be = ve ? window : void 0;
36
- function me(e) {
36
+ const me = be ? window : void 0;
37
+ function ge(e) {
37
38
  var l;
38
39
  const n = K(e);
39
40
  return (l = n == null ? void 0 : n.$el) !== null && l !== void 0 ? l : n;
40
41
  }
41
- function ge(...e) {
42
+ function he(...e) {
42
43
  const l = (o, a, s, u) => (o.addEventListener(a, s, u), () => o.removeEventListener(a, s, u)), n = T(() => {
43
- const o = R(K(e[0])).filter((a) => a != null);
44
+ const o = O(K(e[0])).filter((a) => a != null);
44
45
  return o.every((a) => typeof a != "string") ? o : void 0;
45
46
  });
46
47
  return pe(() => {
47
48
  var o, a;
48
49
  return [
49
- (o = (a = n.value) === null || a === void 0 ? void 0 : a.map((s) => me(s))) !== null && o !== void 0 ? o : [be].filter((s) => s != null),
50
- R(K(n.value ? e[1] : e[0])),
51
- R(w(n.value ? e[2] : e[1])),
50
+ (o = (a = n.value) === null || a === void 0 ? void 0 : a.map((s) => ge(s))) !== null && o !== void 0 ? o : [me].filter((s) => s != null),
51
+ O(K(n.value ? e[1] : e[0])),
52
+ O(h(n.value ? e[2] : e[1])),
52
53
  K(n.value ? e[3] : e[2])
53
54
  ];
54
- }, ([o, a, s, u], b, c) => {
55
+ }, ([o, a, s, u], f, r) => {
55
56
  if (!(o != null && o.length) || !(a != null && a.length) || !(s != null && s.length)) return;
56
- const r = fe(u) ? { ...u } : u, v = o.flatMap((m) => a.flatMap((h) => s.map((y) => l(m, h, y, r))));
57
- c(() => {
58
- v.forEach((m) => m());
57
+ const v = fe(u) ? { ...u } : u, p = o.flatMap((c) => a.flatMap((_) => s.map((b) => l(c, _, b, v))));
58
+ r(() => {
59
+ p.forEach((c) => c());
59
60
  });
60
61
  }, { flush: "post" });
61
62
  }
62
- const he = {
63
+ const ke = {
63
64
  ref: "page-layout-tabs",
64
65
  class: "page-layout-tabs",
65
66
  "data-testid": "page-layout-tabs"
66
- }, ke = { key: 0 }, Te = ["aria-label"], we = { class: "overflowing-items-count" }, Ie = {
67
+ }, Te = { key: 0 }, we = ["aria-label"], _e = { class: "overflowing-items-count" }, Ie = {
67
68
  key: 0,
68
69
  class: "layout-loader-container"
69
- }, _e = /* @__PURE__ */ Z({
70
+ }, Ce = /* @__PURE__ */ F({
70
71
  __name: "PageLayoutTabs",
71
72
  props: {
72
73
  tabs: { default: () => [] }
73
74
  },
74
75
  setup(e) {
75
- X((f) => ({
76
- e372aee6: w(s)
76
+ Y((y) => ({
77
+ e372aee6: h(s)
77
78
  }));
78
- const { i18n: { t: l } } = ce.useI18n(), n = H(), o = O("app:navigateTo", null), a = (f) => {
79
- if (typeof f.to != "string") {
80
- n.push(f.to);
79
+ const { i18n: { t: l } } = J.useI18n(), n = q(), o = j("app:navigateTo", null), a = (y) => {
80
+ if (typeof y.to != "string") {
81
+ n.push(y.to);
81
82
  return;
82
83
  }
83
84
  if (typeof o != "function") {
84
- window.location.href = f.to;
85
+ window.location.href = y.to;
85
86
  return;
86
87
  }
87
- o(f.to);
88
- }, s = de, u = M("page-layout-tabs"), b = M("page-layout-tabs-list"), c = x(e.tabs.length), r = x(!1), v = T(() => e.tabs.slice(0, c.value)), m = T(() => e.tabs.slice(c.value)), h = async () => {
88
+ o(y.to);
89
+ }, s = ve, u = V("page-layout-tabs"), f = V("page-layout-tabs-list"), r = x(e.tabs.length), v = x(!1), p = T(() => e.tabs.slice(0, r.value)), c = T(() => e.tabs.slice(r.value)), _ = async () => {
89
90
  var $, L, t;
90
- if (!u.value || !b.value)
91
+ if (!u.value || !f.value)
91
92
  return;
92
- r.value = !1, c.value = e.tabs.length, await W();
93
- const f = (($ = u.value) == null ? void 0 : $.getBoundingClientRect().width) - parseInt(s) * 2;
94
- let C = (L = b.value) == null ? void 0 : L.getBoundingClientRect().width;
95
- if (!f || !C) {
96
- r.value = !0;
93
+ v.value = !1, r.value = e.tabs.length, await W();
94
+ const y = (($ = u.value) == null ? void 0 : $.getBoundingClientRect().width) - parseInt(s) * 2;
95
+ let C = (L = f.value) == null ? void 0 : L.getBoundingClientRect().width;
96
+ if (!y || !C) {
97
+ v.value = !0;
97
98
  return;
98
99
  }
99
- const D = 50;
100
- for (; C + D > f && c.value > 1; )
101
- c.value--, await W(), C = ((t = b.value) == null ? void 0 : t.getBoundingClientRect().width) || 0;
102
- r.value = !0;
100
+ const E = 50;
101
+ for (; C + E > y && r.value > 1; )
102
+ r.value--, await W(), C = ((t = f.value) == null ? void 0 : t.getBoundingClientRect().width) || 0;
103
+ v.value = !0;
103
104
  };
104
- let y = null;
105
- const J = () => {
106
- y && clearTimeout(y), y = setTimeout(() => {
107
- h();
105
+ let b = null;
106
+ const D = () => {
107
+ b && clearTimeout(b), b = setTimeout(() => {
108
+ _();
108
109
  }, 150);
109
110
  };
110
- return Y(() => {
111
- h(), ge(window, "resize", J);
112
- }), ee(() => {
113
- y && clearTimeout(y);
114
- }), (f, C) => {
115
- const D = _("KDropdownItem"), $ = _("KDropdown"), L = _("KSkeletonBox");
116
- return i(), d("nav", he, [
111
+ return ee(() => {
112
+ _(), he(window, "resize", D);
113
+ }), te(() => {
114
+ b && clearTimeout(b);
115
+ }), (y, C) => {
116
+ const E = I("KDropdownItem"), $ = I("KDropdown"), L = I("KSkeletonBox");
117
+ return i(), d("nav", ke, [
117
118
  g("ul", {
118
119
  ref: "page-layout-tabs-list",
119
- class: B({ "layout-computing": !r.value })
120
+ class: B({ "layout-computing": !v.value })
120
121
  }, [
121
- (i(!0), d(E, null, N(v.value, (t) => (i(), d("li", {
122
+ (i(!0), d(N, null, R(p.value, (t) => (i(), d("li", {
122
123
  key: `${t.key}-tab`
123
124
  }, [
124
- (i(), k(F(typeof t.to == "string" ? "a" : "router-link"), {
125
+ (i(), k(H(typeof t.to == "string" ? "a" : "router-link"), {
125
126
  "aria-current": t.active ? "page" : void 0,
126
127
  class: B(["tab-link", { active: t.active }]),
127
128
  "data-testid": t.dataTestId ? t.dataTestId : `page-layout-tab-${t.key}`,
128
129
  href: typeof t.to == "string" ? t.to : void 0,
129
130
  tabindex: "0",
130
131
  to: typeof t.to == "string" ? void 0 : t.to,
131
- onClick: I((z) => a(t), ["prevent"]),
132
+ onClick: w((M) => a(t), ["prevent"]),
132
133
  onKeydown: [
133
- A(I((z) => a(t), ["prevent"]), ["enter"]),
134
- A(I((z) => a(t), ["prevent"]), ["space"])
134
+ A(w((M) => a(t), ["prevent"]), ["enter"]),
135
+ A(w((M) => a(t), ["prevent"]), ["space"])
135
136
  ]
136
137
  }, {
137
138
  default: S(() => [
138
- V(P(t.label), 1)
139
+ G(P(t.label), 1)
139
140
  ]),
140
141
  _: 2
141
142
  }, 1064, ["aria-current", "class", "data-testid", "href", "to", "onClick", "onKeydown"]))
142
143
  ]))), 128)),
143
- e.tabs.length > c.value ? (i(), d("li", ke, [
144
- j($, { "kpop-attributes": {
144
+ e.tabs.length > r.value ? (i(), d("li", Te, [
145
+ z($, { "kpop-attributes": {
145
146
  placement: "bottom-end",
146
147
  popoverElementAttributes: { "data-testid": "tabs-overflow-dropdown-popover" }
147
148
  } }, {
148
149
  items: S(() => [
149
- (i(!0), d(E, null, N(m.value, (t) => (i(), k(D, {
150
+ (i(!0), d(N, null, R(c.value, (t) => (i(), k(E, {
150
151
  key: `${t.key}-dropdown-item`,
151
152
  "aria-current": t.active ? "page" : void 0,
152
153
  "data-testid": t.dataTestId ? t.dataTestId : `page-layout-tab-${t.key}`,
@@ -160,20 +161,20 @@ const he = {
160
161
  ]),
161
162
  default: S(() => [
162
163
  g("button", {
163
- "aria-label": w(l)("tabs.more_button.aria_label"),
164
- class: B(["tab-link overflow-dropdown-trigger", { active: m.value.find((t) => t.active) }]),
164
+ "aria-label": h(l)("tabs.more_button.aria_label"),
165
+ class: B(["tab-link overflow-dropdown-trigger", { active: c.value.find((t) => t.active) }]),
165
166
  "data-testid": "tabs-overflow-dropdown-button"
166
167
  }, [
167
- V(P(w(l)("tabs.more_button.label")) + " ", 1),
168
- g("span", we, P(e.tabs.length - c.value), 1)
169
- ], 10, Te)
168
+ G(P(h(l)("tabs.more_button.label")) + " ", 1),
169
+ g("span", _e, P(e.tabs.length - r.value), 1)
170
+ ], 10, we)
170
171
  ]),
171
172
  _: 1
172
173
  })
173
- ])) : p("", !0)
174
+ ])) : m("", !0)
174
175
  ], 2),
175
- r.value ? p("", !0) : (i(), d("div", Ie, [
176
- (i(), d(E, null, N(3, (t) => j(L, {
176
+ v.value ? m("", !0) : (i(), d("div", Ie, [
177
+ (i(), d(N, null, R(3, (t) => z(L, {
177
178
  key: `layout-loader-${t}`,
178
179
  height: "1",
179
180
  width: "5"
@@ -182,26 +183,26 @@ const he = {
182
183
  ], 512);
183
184
  };
184
185
  }
185
- }), q = (e, l) => {
186
+ }), Q = (e, l) => {
186
187
  const n = e.__vccOpts || e;
187
188
  for (const [o, a] of l)
188
189
  n[o] = a;
189
190
  return n;
190
- }, Ce = /* @__PURE__ */ q(_e, [["__scopeId", "data-v-a0346736"]]), U = Symbol("nested-page-layout-detection"), $e = {
191
+ }, $e = /* @__PURE__ */ Q(Ce, [["__scopeId", "data-v-a0346736"]]), Z = Symbol("nested-page-layout-detection"), Le = {
191
192
  class: "kong-ui-public-page-layout",
192
193
  "data-testid": "kong-ui-public-page-layout"
193
- }, Le = {
194
+ }, Ke = {
194
195
  key: 0,
195
196
  class: "page-layout-header",
196
197
  "data-testid": "page-layout-header"
197
- }, Ke = { class: "page-header-container" }, Be = { class: "page-header-start" }, Se = { class: "title-container" }, Pe = {
198
+ }, Be = { class: "page-header-container" }, Se = { class: "page-header-start" }, Pe = { class: "title-container" }, xe = {
198
199
  key: 1,
199
200
  class: "page-layout-title",
200
201
  "data-testid": "page-layout-title"
201
- }, xe = {
202
+ }, Ae = {
202
203
  key: 0,
203
204
  class: "page-header-actions-container"
204
- }, Ae = /* @__PURE__ */ Z({
205
+ }, De = /* @__PURE__ */ F({
205
206
  __name: "PageLayout",
206
207
  props: {
207
208
  breadcrumbs: { default: () => [] },
@@ -210,10 +211,10 @@ const he = {
210
211
  tabs: { default: () => [] }
211
212
  },
212
213
  setup(e) {
213
- const l = O("app:navigateTo", null), n = H(), o = T(() => !!(e.tabs && e.tabs.length)), a = T(() => typeof e.backTo == "string"), s = async () => {
214
+ const l = j("app:navigateTo", null), { i18n: { t: n } } = J.useI18n(), o = q(), a = T(() => !!(e.tabs && e.tabs.length)), s = T(() => typeof e.backTo == "string"), u = async () => {
214
215
  if (e.backTo) {
215
216
  if (typeof e.backTo == "object") {
216
- n.push(e.backTo);
217
+ o.push(e.backTo);
217
218
  return;
218
219
  }
219
220
  if (typeof l != "function") {
@@ -222,66 +223,70 @@ const he = {
222
223
  }
223
224
  await l(e.backTo);
224
225
  }
225
- }, u = x(0), b = T(() => u.value > 0);
226
- te(U, () => (u.value++, () => {
227
- u.value--;
226
+ }, f = x(0), r = T(() => f.value > 0);
227
+ ae(Z, () => (f.value++, () => {
228
+ f.value--;
228
229
  }));
229
- const c = O(U, null), r = x(null);
230
- return typeof c == "function" && (r.value = c()), ae(() => {
231
- var v;
232
- (v = r.value) == null || v.call(r);
233
- }), (v, m) => {
234
- const h = _("KBreadcrumbs"), y = _("router-view");
235
- return i(), d("div", $e, [
236
- b.value ? p("", !0) : (i(), d("div", Le, [
237
- g("div", Ke, [
238
- g("div", Be, [
239
- e.breadcrumbs && e.breadcrumbs.length ? (i(), k(h, {
230
+ const v = j(Z, null), p = x(null);
231
+ return typeof v == "function" && (p.value = v()), oe(() => {
232
+ var c;
233
+ (c = p.value) == null || c.call(p);
234
+ }), (c, _) => {
235
+ const b = I("KBreadcrumbs"), D = I("router-view");
236
+ return i(), d("div", Le, [
237
+ r.value ? m("", !0) : (i(), d("div", Ke, [
238
+ g("div", Be, [
239
+ g("div", Se, [
240
+ e.breadcrumbs && e.breadcrumbs.length ? (i(), k(b, {
240
241
  key: 0,
241
242
  class: "header-breadcrumbs",
242
243
  "data-testid": "page-layout-breadcrumbs",
243
244
  items: e.breadcrumbs
244
- }, null, 8, ["items"])) : p("", !0),
245
- g("div", Se, [
246
- e.backTo ? (i(), k(F(a.value ? "a" : "router-link"), {
245
+ }, null, 8, ["items"])) : m("", !0),
246
+ g("div", Pe, [
247
+ e.backTo ? (i(), k(H(s.value ? "a" : "router-link"), {
247
248
  key: 0,
249
+ "aria-label": h(n)("back_button"),
248
250
  class: "navigate-back",
249
251
  "data-testid": "page-layout-navigate-back",
250
- href: a.value ? e.backTo : void 0,
252
+ href: s.value ? e.backTo : void 0,
251
253
  tabindex: "0",
252
- to: a.value ? void 0 : e.backTo,
253
- onClick: I(s, ["prevent"]),
254
+ to: s.value ? void 0 : e.backTo,
255
+ onClick: w(u, ["prevent"]),
254
256
  onKeydown: [
255
- A(I(s, ["prevent"]), ["enter"]),
256
- A(I(s, ["prevent"]), ["space"])
257
+ A(w(u, ["prevent"]), ["enter"]),
258
+ A(w(u, ["prevent"]), ["space"])
257
259
  ]
258
260
  }, {
259
261
  default: S(() => [
260
- j(w(se), { size: w(re) }, null, 8, ["size"])
262
+ z(h(ie), {
263
+ decorative: "",
264
+ size: h(de)
265
+ }, null, 8, ["size"])
261
266
  ]),
262
267
  _: 1
263
- }, 40, ["href", "to", "onKeydown"])) : p("", !0),
264
- e.title ? (i(), d("h1", Pe, P(e.title), 1)) : p("", !0)
268
+ }, 40, ["aria-label", "href", "to", "onKeydown"])) : m("", !0),
269
+ e.title ? (i(), d("h1", xe, P(e.title), 1)) : m("", !0)
265
270
  ])
266
271
  ]),
267
- v.$slots.actions ? (i(), d("div", xe, [
268
- G(v.$slots, "actions", {}, void 0, !0)
269
- ])) : p("", !0)
272
+ c.$slots.actions ? (i(), d("div", Ae, [
273
+ U(c.$slots, "actions", {}, void 0, !0)
274
+ ])) : m("", !0)
270
275
  ]),
271
- o.value ? (i(), k(Ce, {
276
+ a.value ? (i(), k($e, {
272
277
  key: 0,
273
278
  tabs: e.tabs
274
- }, null, 8, ["tabs"])) : p("", !0)
279
+ }, null, 8, ["tabs"])) : m("", !0)
275
280
  ])),
276
281
  g("div", {
277
- class: B(["page-layout-content", { "has-nested-page-layout": b.value }])
282
+ class: B(["page-layout-content", { "has-nested-page-layout": r.value }])
278
283
  }, [
279
- o.value ? (i(), k(y, { key: 0 })) : G(v.$slots, "default", { key: 1 }, void 0, !0)
284
+ a.value ? (i(), k(D, { key: 0 })) : U(c.$slots, "default", { key: 1 }, void 0, !0)
280
285
  ], 2)
281
286
  ]);
282
287
  };
283
288
  }
284
- }), Oe = /* @__PURE__ */ q(Ae, [["__scopeId", "data-v-1fa3d1bc"]]);
289
+ }), je = /* @__PURE__ */ Q(De, [["__scopeId", "data-v-83a31618"]]);
285
290
  export {
286
- Oe as PageLayout
291
+ je as PageLayout
287
292
  };
@@ -1 +1 @@
1
- (function(u,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):(u=typeof globalThis<"u"?globalThis:u||self,e(u["kong-ui-public-page-layout"]={},u.Vue,u.VueRouter,u["kong-ui-public-i18n"],u.KongIcons))})(this,function(u,e,w,E,_){"use strict";const $={tabs:{more_button:{label:"More",aria_label:"More tabs"}}};function L(){const t=E.createI18n("en-us",$);return{i18n:t,i18nT:E.i18nTComponent(t)}}const S={useI18n:L},K="16px",x="16px",D=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const P=Object.prototype.toString,M=t=>P.call(t)==="[object Object]";function T(t){return Array.isArray(t)?t:[t]}function j(t,c,l){return e.watch(t,c,{...l,immediate:!0})}const A=D?window:void 0;function R(t){var c;const l=e.toValue(t);return(c=l==null?void 0:l.$el)!==null&&c!==void 0?c:l}function z(...t){const c=(a,n,i,s)=>(a.addEventListener(n,i,s),()=>a.removeEventListener(n,i,s)),l=e.computed(()=>{const a=T(e.toValue(t[0])).filter(n=>n!=null);return a.every(n=>typeof n!="string")?a:void 0});return j(()=>{var a,n;return[(a=(n=l.value)===null||n===void 0?void 0:n.map(i=>R(i)))!==null&&a!==void 0?a:[A].filter(i=>i!=null),T(e.toValue(l.value?t[1]:t[0])),T(e.unref(l.value?t[2]:t[1])),e.toValue(l.value?t[3]:t[2])]},([a,n,i,s],y,r)=>{if(!(a!=null&&a.length)||!(n!=null&&n.length)||!(i!=null&&i.length))return;const d=M(s)?{...s}:s,m=a.flatMap(k=>n.flatMap(b=>i.map(p=>c(k,b,p,d))));r(()=>{m.forEach(k=>k())})},{flush:"post"})}const O={ref:"page-layout-tabs",class:"page-layout-tabs","data-testid":"page-layout-tabs"},W={key:0},q=["aria-label"],G={class:"overflowing-items-count"},U={key:0,class:"layout-loader-container"},F=e.defineComponent({__name:"PageLayoutTabs",props:{tabs:{default:()=>[]}},setup(t){e.useCssVars(f=>({e372aee6:e.unref(i)}));const{i18n:{t:c}}=S.useI18n(),l=w.useRouter(),a=e.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=x,s=e.useTemplateRef("page-layout-tabs"),y=e.useTemplateRef("page-layout-tabs-list"),r=e.ref(t.tabs.length),d=e.ref(!1),m=e.computed(()=>t.tabs.slice(0,r.value)),k=e.computed(()=>t.tabs.slice(r.value)),b=async()=>{var h,B,o;if(!s.value||!y.value)return;d.value=!1,r.value=t.tabs.length,await e.nextTick();const f=((h=s.value)==null?void 0:h.getBoundingClientRect().width)-parseInt(i)*2;let g=(B=y.value)==null?void 0:B.getBoundingClientRect().width;if(!f||!g){d.value=!0;return}const C=50;for(;g+C>f&&r.value>1;)r.value--,await e.nextTick(),g=((o=y.value)==null?void 0:o.getBoundingClientRect().width)||0;d.value=!0};let p=null;const oe=()=>{p&&clearTimeout(p),p=setTimeout(()=>{b()},150)};return e.onMounted(()=>{b(),z(window,"resize",oe)}),e.onBeforeUnmount(()=>{p&&clearTimeout(p)}),(f,g)=>{const C=e.resolveComponent("KDropdownItem"),h=e.resolveComponent("KDropdown"),B=e.resolveComponent("KSkeletonBox");return e.openBlock(),e.createElementBlock("nav",O,[e.createElementVNode("ul",{ref:"page-layout-tabs-list",class:e.normalizeClass({"layout-computing":!d.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.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(I=>n(o),["prevent"]),onKeydown:[e.withKeys(e.withModifiers(I=>n(o),["prevent"]),["enter"]),e.withKeys(e.withModifiers(I=>n(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>r.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(k.value,o=>(e.openBlock(),e.createBlock(C,{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(c)("tabs.more_button.aria_label"),class:e.normalizeClass(["tab-link overflow-dropdown-trigger",{active:k.value.find(o=>o.active)}]),"data-testid":"tabs-overflow-dropdown-button"},[e.createTextVNode(e.toDisplayString(e.unref(c)("tabs.more_button.label"))+" ",1),e.createElementVNode("span",G,e.toDisplayString(t.tabs.length-r.value),1)],10,q)]),_:1})])):e.createCommentVNode("",!0)],2),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",U,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(3,o=>e.createVNode(B,{key:`layout-loader-${o}`,height:"1",width:"5"})),64))]))],512)}}}),N=(t,c)=>{const l=t.__vccOpts||t;for(const[a,n]of c)l[a]=n;return l},Z=N(F,[["__scopeId","data-v-a0346736"]]),V=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:0,class:"page-header-actions-container"},te=N(e.defineComponent({__name:"PageLayout",props:{breadcrumbs:{default:()=>[]},title:{},backTo:{},tabs:{default:()=>[]}},setup(t){const c=e.inject("app:navigateTo",null),l=w.useRouter(),a=e.computed(()=>!!(t.tabs&&t.tabs.length)),n=e.computed(()=>typeof t.backTo=="string"),i=async()=>{if(t.backTo){if(typeof t.backTo=="object"){l.push(t.backTo);return}if(typeof c!="function"){window.location.href=t.backTo;return}await c(t.backTo)}},s=e.ref(0),y=e.computed(()=>s.value>0);e.provide(V,()=>(s.value++,()=>{s.value--}));const r=e.inject(V,null),d=e.ref(null);return typeof r=="function"&&(d.value=r()),e.onUnmounted(()=>{var m;(m=d.value)==null||m.call(d)}),(m,k)=>{const b=e.resolveComponent("KBreadcrumbs"),p=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",H,[y.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",items:t.breadcrumbs},null,8,["items"])):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[t.backTo?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value?"a":"router-link"),{key:0,class:"navigate-back","data-testid":"page-layout-navigate-back",href:n.value?t.backTo:void 0,tabindex:"0",to:n.value?void 0:t.backTo,onClick:e.withModifiers(i,["prevent"]),onKeydown:[e.withKeys(e.withModifiers(i,["prevent"]),["enter"]),e.withKeys(e.withModifiers(i,["prevent"]),["space"])]},{default:e.withCtx(()=>[e.createVNode(e.unref(_.ArrowTopLeftIcon),{size:e.unref(K)},null,8,["size"])]),_:1},40,["href","to","onKeydown"])):e.createCommentVNode("",!0),t.title?(e.openBlock(),e.createElementBlock("h1",v,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0)])]),m.$slots.actions?(e.openBlock(),e.createElementBlock("div",ee,[e.renderSlot(m.$slots,"actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),a.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":y.value}])},[a.value?(e.openBlock(),e.createBlock(p,{key:0})):e.renderSlot(m.$slots,"default",{key:1},void 0,!0)],2)])}}}),[["__scopeId","data-v-1fa3d1bc"]]);u.PageLayout=te,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
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,L){"use strict";const S={back_button:"Go back",tabs:{more_button:{label:"More",aria_label:"More tabs"}}};function K(){const e=E.createI18n("en-us",S);return{i18n:e,i18nT:E.i18nTComponent(e)}}const N={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,s)=>(a.addEventListener(n,i,s),()=>a.removeEventListener(n,i,s)),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,s],y,d)=>{if(!(a!=null&&a.length)||!(n!=null&&n.length)||!(i!=null&&i.length))return;const m=j(s)?{...s}:s,k=a.flatMap(r=>n.flatMap(b=>i.map(p=>c(r,b,p,m))));d(()=>{k.forEach(r=>r())})},{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=>({e372aee6:t.unref(i)}));const{i18n:{t:c}}=N.useI18n(),l=_.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,s=t.useTemplateRef("page-layout-tabs"),y=t.useTemplateRef("page-layout-tabs-list"),d=t.ref(e.tabs.length),m=t.ref(!1),k=t.computed(()=>e.tabs.slice(0,d.value)),r=t.computed(()=>e.tabs.slice(d.value)),b=async()=>{var h,B,o;if(!s.value||!y.value)return;m.value=!1,d.value=e.tabs.length,await t.nextTick();const f=((h=s.value)==null?void 0:h.getBoundingClientRect().width)-parseInt(i)*2;let g=(B=y.value)==null?void 0:B.getBoundingClientRect().width;if(!f||!g){m.value=!0;return}const w=50;for(;g+w>f&&d.value>1;)d.value--,await t.nextTick(),g=((o=y.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)}),(f,g)=>{const w=t.resolveComponent("KDropdownItem"),h=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(k.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(h,{"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(r.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:r.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)}}}),V=(e,c)=>{const l=e.__vccOpts||e;for(const[a,n]of c)l[a]=n;return l},H=V(Z,[["__scopeId","data-v-a0346736"]]),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:0,class:"page-header-actions-container"},ot=V(t.defineComponent({__name:"PageLayout",props:{breadcrumbs:{default:()=>[]},title:{},backTo:{},tabs:{default:()=>[]}},setup(e){const c=t.inject("app:navigateTo",null),{i18n:{t:l}}=N.useI18n(),a=_.useRouter(),n=t.computed(()=>!!(e.tabs&&e.tabs.length)),i=t.computed(()=>typeof e.backTo=="string"),s=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)}},y=t.ref(0),d=t.computed(()=>y.value>0);t.provide(I,()=>(y.value++,()=>{y.value--}));const m=t.inject(I,null),k=t.ref(null);return typeof m=="function"&&(k.value=m()),t.onUnmounted(()=>{var r;(r=k.value)==null||r.call(k)}),(r,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",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(s,["prevent"]),onKeydown:[t.withKeys(t.withModifiers(s,["prevent"]),["enter"]),t.withKeys(t.withModifiers(s,["prevent"]),["space"])]},{default:t.withCtx(()=>[t.createVNode(t.unref(L.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)])]),r.$slots.actions?(t.openBlock(),t.createElementBlock("div",et,[t.renderSlot(r.$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(r.$slots,"default",{key:1},void 0,!0)],2)])}}}),[["__scopeId","data-v-83a31618"]]);u.PageLayout=ot,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .page-layout-tabs[data-v-a0346736]{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(--e372aee6);padding:var(--kui-space-0, 0px) var(--e372aee6);position:relative;width:100%}.page-layout-tabs a[data-v-a0346736],.page-layout-tabs button[data-v-a0346736]{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-a0346736]{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-a0346736]{height:0;visibility:hidden}.page-layout-tabs ul li[data-v-a0346736]{display:flex}.page-layout-tabs ul li .tab-link[data-v-a0346736]{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-a0346736]: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-a0346736]: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-a0346736]{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-a0346736]{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-a0346736]{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-a0346736]{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-a0346736]{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(--e372aee6);position:absolute}.kong-ui-public-page-layout[data-v-1fa3d1bc]{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-1fa3d1bc]{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-1fa3d1bc]{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-1fa3d1bc] .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-1fa3d1bc] .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-1fa3d1bc]{align-items:center;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-1fa3d1bc]{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-1fa3d1bc]: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-1fa3d1bc]: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-1fa3d1bc]{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-actions-container[data-v-1fa3d1bc]{align-items:flex-end;display:flex;gap:6px;gap:var(--kui-space-30, 6px);justify-content:flex-end}.kong-ui-public-page-layout .page-layout-header:not(:has(.page-layout-tabs)) .page-header-container[data-v-1fa3d1bc]{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-1fa3d1bc]{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-1fa3d1bc]{padding:0;padding:var(--kui-space-0, 0px)}
1
+ .page-layout-tabs[data-v-a0346736]{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(--e372aee6);padding:var(--kui-space-0, 0px) var(--e372aee6);position:relative;width:100%}.page-layout-tabs a[data-v-a0346736],.page-layout-tabs button[data-v-a0346736]{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-a0346736]{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-a0346736]{height:0;visibility:hidden}.page-layout-tabs ul li[data-v-a0346736]{display:flex}.page-layout-tabs ul li .tab-link[data-v-a0346736]{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-a0346736]: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-a0346736]: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-a0346736]{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-a0346736]{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-a0346736]{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-a0346736]{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-a0346736]{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(--e372aee6);position:absolute}.kong-ui-public-page-layout[data-v-83a31618]{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-83a31618]{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-83a31618]{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-83a31618] .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-83a31618] .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-83a31618]{align-items:center;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-83a31618]{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-83a31618]: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-83a31618]: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-83a31618]{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-actions-container[data-v-83a31618]{align-items:flex-end;display:flex;gap:6px;gap:var(--kui-space-30, 6px);justify-content:flex-end}.kong-ui-public-page-layout .page-layout-header:not(:has(.page-layout-tabs)) .page-header-container[data-v-83a31618]{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-83a31618]{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-83a31618]{padding:0;padding:var(--kui-space-0, 0px)}
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PageLayout.vue"],"names":[],"mappings":"AA+PA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAgBhE,KAAK,WAAW,GAAG,eAAe,CAAC;AA2PnC,QAAA,MAAM,UAAU,0SAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"PageLayout.vue.d.ts","sourceRoot":"","sources":["../../../src/components/PageLayout.vue"],"names":[],"mappings":"AAsQA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAiBhE,KAAK,WAAW,GAAG,eAAe,CAAC;AAkQnC,QAAA,MAAM,UAAU,0SAEd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/page-layout",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "main": "./dist/page-layout.umd.js",
6
6
  "module": "./dist/page-layout.es.js",