@kong-ui-public/page-layout 1.3.1 → 1.3.2-pr.3955.d76d9b0e2.0

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,242 +1,242 @@
1
- import { shallowRef as Ce, shallowReadonly as Be, getCurrentScope as ze, onScopeDispose as Ne, toValue as ae, watch as re, computed as w, getCurrentInstance as Oe, onMounted as be, defineComponent as ue, inject as te, useTemplateRef as se, ref as F, onBeforeUnmount as Ee, resolveComponent as R, openBlock as i, createElementBlock as d, createElementVNode as b, normalizeClass as j, Fragment as G, renderList as M, createBlock as D, resolveDynamicComponent as fe, mergeProps as Se, withKeys as Ae, withModifiers as le, withCtx as T, renderSlot as E, createTextVNode as X, toDisplayString as B, createVNode as z, unref as h, createCommentVNode as m, nextTick as pe, provide as Fe, onUnmounted as He, createSlots as ge, normalizeProps as xe, guardReactiveProps as We } from "vue";
2
- import { useRouter as De, useRoute as Me } from "vue-router";
3
- import { createI18n as Ve, i18nTComponent as je } from "@kong-ui-public/i18n";
4
- import { ChevronDownIcon as Re, ChevronRightIcon as Ge, ArrowTopLeftIcon as Ue, StarFillIcon as qe, StarIcon as Ye, InfoIcon as Ze } from "@kong/icons";
5
- const Je = "Go back", Xe = { save_shortcut: "Save page to shortcuts", remove_shortcut: "Remove page from shortcuts" }, Qe = { more_button: { label: "More", aria_label: "More tabs" } }, et = { aria_label: "Page sections", more_button: { aria_label: "More page sections" } }, tt = {
6
- back_button: Je,
7
- favorite_button: Xe,
8
- tabs: Qe,
9
- anchor_navigation: et
1
+ import { shallowRef as Dt, shallowReadonly as Wt, getCurrentScope as Vt, onScopeDispose as jt, toValue as rt, watch as ht, computed as C, getCurrentInstance as Gt, onMounted as wt, defineComponent as ft, inject as lt, useTemplateRef as dt, ref as M, onBeforeUnmount as Pt, resolveComponent as L, openBlock as s, createElementBlock as d, createElementVNode as b, normalizeClass as q, Fragment as Y, renderList as W, createBlock as R, resolveDynamicComponent as bt, mergeProps as Nt, withKeys as Bt, withModifiers as vt, withCtx as I, renderSlot as E, createTextVNode as et, toDisplayString as K, createVNode as O, unref as h, createCommentVNode as y, nextTick as yt, provide as Ut, onUnmounted as qt, createSlots as kt, normalizeProps as Yt, guardReactiveProps as Zt } from "vue";
2
+ import { useRouter as Kt, useRoute as Jt } from "vue-router";
3
+ import { createI18n as Xt, i18nTComponent as Qt } from "@kong-ui-public/i18n";
4
+ import { ChevronDownIcon as Ot, ChevronRightIcon as te, ArrowTopLeftIcon as ee, StarFillIcon as ae, StarIcon as oe, InfoIcon as ne } from "@kong/icons";
5
+ const ie = "Go back", se = { save_shortcut: "Save page to shortcuts", remove_shortcut: "Remove page from shortcuts" }, le = { more_button: { label: "More", aria_label: "More tabs" } }, re = { aria_label: "Page sections", more_button: { aria_label: "More page sections" } }, ue = {
6
+ back_button: ie,
7
+ favorite_button: se,
8
+ tabs: le,
9
+ anchor_navigation: re
10
10
  };
11
- function at() {
12
- const e = Ve("en-us", tt);
11
+ function ce() {
12
+ const t = Xt("en-us", ue);
13
13
  return {
14
- i18n: e,
15
- i18nT: je(e)
14
+ i18n: t,
15
+ i18nT: Qt(t)
16
16
  // Translation component <i18n-t>
17
17
  };
18
18
  }
19
- const me = {
20
- useI18n: at
21
- }, ot = "12px", Q = "16px", nt = "2px", Le = "16px";
22
- function it(e, r) {
23
- return ze() ? (Ne(e, r), !0) : !1;
19
+ const Tt = {
20
+ useI18n: ce
21
+ }, de = "12px", at = "16px", ve = "2px", zt = "16px";
22
+ function he(t, u) {
23
+ return Vt() ? (jt(t, u), !0) : !1;
24
24
  }
25
- const st = typeof window < "u" && typeof document < "u";
25
+ const fe = typeof window < "u" && typeof document < "u";
26
26
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
27
- const J = () => {
27
+ const tt = () => {
28
28
  };
29
- function lt(e, r) {
30
- function a(...o) {
31
- return new Promise((l, c) => {
32
- Promise.resolve(e(() => r.apply(this, o), {
33
- fn: r,
29
+ function pe(t, u) {
30
+ function a(...n) {
31
+ return new Promise((r, c) => {
32
+ Promise.resolve(t(() => u.apply(this, n), {
33
+ fn: u,
34
34
  thisArg: this,
35
- args: o
36
- })).then(l).catch(c);
35
+ args: n
36
+ })).then(r).catch(c);
37
37
  });
38
38
  }
39
- return "cancel" in e && Object.assign(a, {
40
- cancel: e.cancel,
41
- flush: e.flush,
42
- isPending: e.isPending
39
+ return "cancel" in t && Object.assign(a, {
40
+ cancel: t.cancel,
41
+ flush: t.flush,
42
+ isPending: t.isPending
43
43
  }), a;
44
44
  }
45
- function rt(e, r = {}) {
46
- let a, o, l = J, c = J;
47
- const v = Ce(!1), n = (f) => {
48
- clearTimeout(f), l(), l = J;
45
+ function ge(t, u = {}) {
46
+ let a, n, r = tt, c = tt;
47
+ const v = Dt(!1), i = (f) => {
48
+ clearTimeout(f), r(), r = tt;
49
49
  };
50
- let y;
50
+ let w;
51
51
  return Object.assign((f) => {
52
- const p = ae(e), I = ae(r.maxWait);
53
- return a && n(a), p <= 0 || I !== void 0 && I <= 0 ? (o && (n(o), o = void 0), v.value = !1, Promise.resolve(f())) : (v.value = !0, new Promise((S, g) => {
54
- l = r.rejectOnCancel ? g : S, c = S, y = f, I && !o && (o = setTimeout(() => {
55
- a && n(a), o = void 0, v.value = !1, S(y());
56
- }, I)), a = setTimeout(() => {
57
- o && n(o), o = void 0, v.value = !1, S(f());
52
+ const p = rt(t), A = rt(u.maxWait);
53
+ return a && i(a), p <= 0 || A !== void 0 && A <= 0 ? (n && (i(n), n = void 0), v.value = !1, Promise.resolve(f())) : (v.value = !0, new Promise((S, g) => {
54
+ r = u.rejectOnCancel ? g : S, c = S, w = f, A && !n && (n = setTimeout(() => {
55
+ a && i(a), n = void 0, v.value = !1, S(w());
56
+ }, A)), a = setTimeout(() => {
57
+ n && i(n), n = void 0, v.value = !1, S(f());
58
58
  }, p);
59
59
  }));
60
60
  }, {
61
61
  cancel: () => {
62
- a && (n(a), a = void 0), o && (n(o), o = void 0), v.value = !1, c = J;
62
+ a && (i(a), a = void 0), n && (i(n), n = void 0), v.value = !1, c = tt;
63
63
  },
64
64
  flush: () => {
65
65
  if (v.value) {
66
- a && (clearTimeout(a), a = void 0), o && (clearTimeout(o), o = void 0), v.value = !1;
66
+ a && (clearTimeout(a), a = void 0), n && (clearTimeout(n), n = void 0), v.value = !1;
67
67
  const f = c;
68
- l = J, c = J, f(y());
68
+ r = tt, c = tt, f(w());
69
69
  }
70
70
  },
71
- isPending: Be(v)
71
+ isPending: Wt(v)
72
72
  });
73
73
  }
74
- function ut(e, r = 200, a = {}) {
75
- return lt(rt(r, a), e);
74
+ function me(t, u = 200, a = {}) {
75
+ return pe(ge(u, a), t);
76
76
  }
77
- const ct = st ? window : void 0;
78
- function Te(e) {
79
- var r;
80
- const a = ae(e);
81
- return (r = a?.$el) !== null && r !== void 0 ? r : a;
77
+ const be = fe ? window : void 0;
78
+ function Et(t) {
79
+ var u;
80
+ const a = rt(t);
81
+ return (u = a?.$el) !== null && u !== void 0 ? u : a;
82
82
  }
83
83
  // @__NO_SIDE_EFFECTS__
84
- function dt() {
85
- const e = Ce(!1), r = Oe();
86
- return r && be(() => {
87
- e.value = !0;
88
- }, r), e;
84
+ function ye() {
85
+ const t = Dt(!1), u = Gt();
86
+ return u && wt(() => {
87
+ t.value = !0;
88
+ }, u), t;
89
89
  }
90
90
  // @__NO_SIDE_EFFECTS__
91
- function vt(e) {
92
- const r = /* @__PURE__ */ dt();
93
- return w(() => (r.value, !!e()));
91
+ function ke(t) {
92
+ const u = /* @__PURE__ */ ye();
93
+ return C(() => (u.value, !!t()));
94
94
  }
95
- function Pe(e, r, a = {}) {
96
- const { window: o = ct, ...l } = a;
95
+ function Ft(t, u, a = {}) {
96
+ const { window: n = be, ...r } = a;
97
97
  let c;
98
- const v = /* @__PURE__ */ vt(() => o && "ResizeObserver" in o), n = () => {
98
+ const v = /* @__PURE__ */ ke(() => n && "ResizeObserver" in n), i = () => {
99
99
  c && (c.disconnect(), c = void 0);
100
- }, y = re(w(() => {
101
- const f = ae(e);
102
- return Array.isArray(f) ? f.map((p) => Te(p)) : [Te(f)];
100
+ }, w = ht(C(() => {
101
+ const f = rt(t);
102
+ return Array.isArray(f) ? f.map((p) => Et(p)) : [Et(f)];
103
103
  }), (f) => {
104
- if (n(), v.value && o) {
105
- c = new ResizeObserver(r);
106
- for (const p of f) p && c.observe(p, l);
104
+ if (i(), v.value && n) {
105
+ c = new ResizeObserver(u);
106
+ for (const p of f) p && c.observe(p, r);
107
107
  }
108
108
  }, {
109
109
  immediate: !0,
110
110
  flush: "post"
111
- }), k = () => {
112
- n(), y();
111
+ }), T = () => {
112
+ i(), w();
113
113
  };
114
- return it(k), {
114
+ return he(T), {
115
115
  isSupported: v,
116
- stop: k
116
+ stop: T
117
117
  };
118
118
  }
119
- const ht = {
119
+ const we = {
120
120
  ref: "page-layout-tabs",
121
121
  class: "page-layout-tabs",
122
122
  "data-testid": "page-layout-tabs"
123
- }, ft = { key: 0 }, pt = ["aria-label"], gt = {
123
+ }, Te = { key: 0 }, _e = ["aria-label"], $e = {
124
124
  key: 0,
125
125
  class: "layout-loader-container"
126
- }, bt = /* @__PURE__ */ ue({
126
+ }, Ce = /* @__PURE__ */ ft({
127
127
  __name: "PageLayoutTabs",
128
128
  props: {
129
129
  tabs: { default: () => [] }
130
130
  },
131
- setup(e) {
132
- const { i18n: { t: r } } = me.useI18n(), a = De(), o = te("app:navigateTo", null), l = (g) => {
131
+ setup(t) {
132
+ const { i18n: { t: u } } = Tt.useI18n(), a = Kt(), n = lt("app:navigateTo", null), r = (g) => {
133
133
  if (typeof g.to != "string") {
134
134
  a.push(g.to);
135
135
  return;
136
136
  }
137
- if (typeof o != "function") {
137
+ if (typeof n != "function") {
138
138
  window.location.href = g.to;
139
139
  return;
140
140
  }
141
- o(g.to);
142
- }, c = se("page-layout-tabs"), v = se("page-layout-tabs-list"), n = F(e.tabs.length), y = F(!1), k = w(() => e.tabs.slice(0, n.value)), f = w(() => e.tabs.slice(n.value)), p = async () => {
141
+ n(g.to);
142
+ }, c = dt("page-layout-tabs"), v = dt("page-layout-tabs-list"), i = M(t.tabs.length), w = M(!1), T = C(() => t.tabs.slice(0, i.value)), f = C(() => t.tabs.slice(i.value)), p = async () => {
143
143
  if (!c.value || !v.value)
144
144
  return;
145
- y.value = !1, n.value = e.tabs.length, await pe();
146
- const g = c.value?.getBoundingClientRect().width - parseInt(Le) * 2;
147
- let N = v.value?.getBoundingClientRect().width;
148
- if (!g || !N) {
149
- y.value = !0;
145
+ w.value = !1, i.value = t.tabs.length, await yt();
146
+ const g = c.value?.getBoundingClientRect().width - parseInt(zt) * 2;
147
+ let z = v.value?.getBoundingClientRect().width;
148
+ if (!g || !z) {
149
+ w.value = !0;
150
150
  return;
151
151
  }
152
- const P = 50;
153
- for (; N + P > g && n.value > 1; )
154
- n.value--, await pe(), N = v.value?.getBoundingClientRect().width || 0;
155
- y.value = !0;
152
+ const D = 50;
153
+ for (; z + D > g && i.value > 1; )
154
+ i.value--, await yt(), z = v.value?.getBoundingClientRect().width || 0;
155
+ w.value = !0;
156
156
  };
157
- let I = null;
157
+ let A = null;
158
158
  const S = () => {
159
- I && clearTimeout(I), I = setTimeout(() => {
159
+ A && clearTimeout(A), A = setTimeout(() => {
160
160
  p();
161
161
  }, 150);
162
162
  };
163
- return be(() => {
164
- p(), Pe(c, S);
165
- }), Ee(() => {
166
- I && clearTimeout(I);
167
- }), re(() => e.tabs, () => {
163
+ return wt(() => {
164
+ p(), Ft(c, S);
165
+ }), Pt(() => {
166
+ A && clearTimeout(A);
167
+ }), ht(() => t.tabs, () => {
168
168
  p();
169
- }, { deep: !0 }), (g, N) => {
170
- const P = R("KDropdownItem"), H = R("KDropdown"), U = R("KSkeletonBox");
171
- return i(), d("nav", ht, [
169
+ }, { deep: !0 }), (g, z) => {
170
+ const D = L("KDropdownItem"), x = L("KDropdown"), Z = L("KSkeletonBox");
171
+ return s(), d("nav", we, [
172
172
  b("ul", {
173
173
  ref: "page-layout-tabs-list",
174
- class: j({ "layout-computing": !y.value })
174
+ class: q({ "layout-computing": !w.value })
175
175
  }, [
176
- (i(!0), d(G, null, M(k.value, (s) => (i(), d("li", {
177
- key: `${s.key}-tab`
176
+ (s(!0), d(Y, null, W(T.value, (l) => (s(), d("li", {
177
+ key: `${l.key}-tab`
178
178
  }, [
179
- (i(), D(fe(typeof s.to == "string" ? "a" : "router-link"), Se({ ref_for: !0 }, typeof s.to == "string" ? { href: s.to } : { to: s.to }, {
180
- "aria-current": s.active ? "page" : void 0,
181
- class: ["tab-link", { active: s.active }],
182
- "data-testid": s.dataTestId ? s.dataTestId : `page-layout-tab-${s.key}`,
179
+ (s(), R(bt(typeof l.to == "string" ? "a" : "router-link"), Nt({ ref_for: !0 }, typeof l.to == "string" ? { href: l.to } : { to: l.to }, {
180
+ "aria-current": l.active ? "page" : void 0,
181
+ class: ["tab-link", { active: l.active }],
182
+ "data-testid": l.dataTestId ? l.dataTestId : `page-layout-tab-${l.key}`,
183
183
  tabindex: "0",
184
- onClick: le((O) => l(s), ["prevent"]),
185
- onKeydown: Ae(le((O) => l(s), ["prevent"]), ["enter"])
184
+ onClick: vt((F) => r(l), ["prevent"]),
185
+ onKeydown: Bt(vt((F) => r(l), ["prevent"]), ["enter"])
186
186
  }), {
187
- default: T(() => [
188
- E(g.$slots, `tab-${s.key}`, { tab: s }, () => [
189
- X(B(s.label), 1)
187
+ default: I(() => [
188
+ E(g.$slots, `tab-${l.key}`, { tab: l }, () => [
189
+ et(K(l.label), 1)
190
190
  ], !0)
191
191
  ]),
192
192
  _: 2
193
193
  }, 1040, ["aria-current", "class", "data-testid", "onClick", "onKeydown"]))
194
194
  ]))), 128)),
195
- e.tabs.length > n.value ? (i(), d("li", ft, [
196
- z(H, { "kpop-attributes": {
195
+ t.tabs.length > i.value ? (s(), d("li", Te, [
196
+ O(x, { "kpop-attributes": {
197
197
  placement: "bottom-end",
198
198
  popoverElementAttributes: { "data-testid": "tabs-overflow-dropdown-popover" }
199
199
  } }, {
200
- items: T(() => [
201
- (i(!0), d(G, null, M(f.value, (s) => (i(), D(P, {
202
- key: `${s.key}-dropdown-item`,
203
- "aria-current": s.active ? "page" : void 0,
204
- "data-testid": s.dataTestId ? s.dataTestId : `page-layout-tab-${s.key}`,
200
+ items: I(() => [
201
+ (s(!0), d(Y, null, W(f.value, (l) => (s(), R(D, {
202
+ key: `${l.key}-dropdown-item`,
203
+ "aria-current": l.active ? "page" : void 0,
204
+ "data-testid": l.dataTestId ? l.dataTestId : `page-layout-tab-${l.key}`,
205
205
  item: {
206
- label: s.label,
207
- value: s.key,
208
- to: s.to
206
+ label: l.label,
207
+ value: l.key,
208
+ to: l.to
209
209
  },
210
- selected: s.active
210
+ selected: l.active
211
211
  }, {
212
- default: T(() => [
213
- E(g.$slots, `tab-${s.key}`, { tab: s }, () => [
214
- X(B(s.label), 1)
212
+ default: I(() => [
213
+ E(g.$slots, `tab-${l.key}`, { tab: l }, () => [
214
+ et(K(l.label), 1)
215
215
  ], !0)
216
216
  ]),
217
217
  _: 2
218
218
  }, 1032, ["aria-current", "data-testid", "item", "selected"]))), 128))
219
219
  ]),
220
- default: T(() => [
220
+ default: I(() => [
221
221
  b("button", {
222
- "aria-label": h(r)("tabs.more_button.aria_label"),
223
- class: j(["tab-link", { active: f.value.find((s) => s.active) }]),
222
+ "aria-label": h(u)("tabs.more_button.aria_label"),
223
+ class: q(["tab-link", { active: f.value.find((l) => l.active) }]),
224
224
  "data-testid": "tabs-overflow-dropdown-button"
225
225
  }, [
226
- X(B(h(r)("tabs.more_button.label")) + " ", 1),
227
- z(h(Re), {
226
+ et(K(h(u)("tabs.more_button.label")) + " ", 1),
227
+ O(h(Ot), {
228
228
  decorative: "",
229
- size: `var(--kui-icon-size-30, ${h(Q)})`
229
+ size: `var(--kui-icon-size-30, ${h(at)})`
230
230
  }, null, 8, ["size"])
231
- ], 10, pt)
231
+ ], 10, _e)
232
232
  ]),
233
233
  _: 3
234
234
  })
235
- ])) : m("", !0)
235
+ ])) : y("", !0)
236
236
  ], 2),
237
- y.value ? m("", !0) : (i(), d("div", gt, [
238
- (i(), d(G, null, M(3, (s) => z(U, {
239
- key: `layout-loader-${s}`,
237
+ w.value ? y("", !0) : (s(), d("div", $e, [
238
+ (s(), d(Y, null, W(3, (l) => O(Z, {
239
+ key: `layout-loader-${l}`,
240
240
  height: "1",
241
241
  width: "5"
242
242
  })), 64))
@@ -244,198 +244,216 @@ const ht = {
244
244
  ], 512);
245
245
  };
246
246
  }
247
- }), ce = (e, r) => {
248
- const a = e.__vccOpts || e;
249
- for (const [o, l] of r)
250
- a[o] = l;
247
+ }), pt = (t, u) => {
248
+ const a = t.__vccOpts || t;
249
+ for (const [n, r] of u)
250
+ a[n] = r;
251
251
  return a;
252
- }, mt = /* @__PURE__ */ ce(bt, [["__scopeId", "data-v-02891bc1"]]), yt = ["aria-label", "data-fit"], kt = {
252
+ }, Ie = /* @__PURE__ */ pt(Ce, [["__scopeId", "data-v-02891bc1"]]), Ae = ["aria-label", "data-fit"], Ee = {
253
253
  key: 0,
254
254
  "aria-hidden": "true",
255
255
  class: "anchor-ellipsis",
256
256
  "data-testid": "anchor-navigation-leading-ellipsis"
257
- }, wt = ["aria-current", "data-testid", "title", "onClick"], Tt = {
257
+ }, Se = ["aria-current", "data-testid", "title", "onClick"], Re = {
258
258
  key: 1,
259
259
  "aria-hidden": "true",
260
260
  class: "anchor-ellipsis",
261
261
  "data-testid": "anchor-navigation-trailing-ellipsis"
262
- }, _t = { key: 2 }, _e = 140, $e = 22, he = 16, $t = /* @__PURE__ */ ue({
262
+ }, Le = { key: 2 }, St = 140, Rt = 22, mt = 16, st = "data-anchor-attention", De = 1200, Pe = 1600, Ne = /* @__PURE__ */ ft({
263
263
  __name: "PageLayoutAnchorNavigation",
264
264
  props: {
265
265
  anchors: { default: () => [] }
266
266
  },
267
- setup(e) {
268
- const { i18n: { t: r } } = me.useI18n(), a = se("page-layout-anchor-navigation"), o = se("page-layout-anchor-navigation-list"), l = F("all"), c = F(""), v = F([]), n = w(() => e.anchors.filter((t) => v.value.includes(t.id))), y = w(() => {
269
- const t = n.value.findIndex((u) => u.id === c.value);
270
- return t === -1 ? 0 : t;
271
- }), k = w(() => {
272
- const t = n.value, u = t.length, _ = y.value;
273
- if (l.value === "all")
274
- return { anchors: t, hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !1 };
275
- if (l.value === "hidden")
267
+ setup(t) {
268
+ const { i18n: { t: u } } = Tt.useI18n(), a = dt("page-layout-anchor-navigation"), n = dt("page-layout-anchor-navigation-list"), r = M("all"), c = M(""), v = M([]), i = C(() => t.anchors.filter((e) => v.value.includes(e.id))), w = C(() => {
269
+ const e = i.value.findIndex((o) => o.id === c.value);
270
+ return e === -1 ? 0 : e;
271
+ }), T = C(() => {
272
+ const e = i.value, o = e.length, m = w.value;
273
+ if (r.value === "all")
274
+ return { anchors: e, hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !1 };
275
+ if (r.value === "hidden")
276
276
  return { anchors: [], hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !1 };
277
- if (l.value === "active-only")
278
- return { anchors: t.slice(_, _ + 1), hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !0 };
279
- const $ = l.value === "window-3" ? 3 : 2;
280
- if (u <= $)
281
- return { anchors: t, hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !0 };
282
- const x = _ < $ ? 0 : _ >= u - $ ? u - $ : _ - 1;
277
+ if (r.value === "active-only")
278
+ return { anchors: e.slice(m, m + 1), hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !0 };
279
+ const _ = r.value === "window-3" ? 3 : 2;
280
+ if (o <= _)
281
+ return { anchors: e, hasLeadingEllipsis: !1, hasTrailingEllipsis: !1, hasOverflowDropdown: !0 };
282
+ const N = m < _ ? 0 : m >= o - _ ? o - _ : m - 1;
283
283
  return {
284
- anchors: t.slice(x, x + $),
285
- hasLeadingEllipsis: x > 0,
286
- hasTrailingEllipsis: x + $ < u,
284
+ anchors: e.slice(N, N + _),
285
+ hasLeadingEllipsis: N > 0,
286
+ hasTrailingEllipsis: N + _ < o,
287
287
  hasOverflowDropdown: !0
288
288
  };
289
- }), f = (t) => t.dataTestId ?? `page-layout-anchor-${t.id.replace(/[^\w-]+/g, "-").replace(/^-+|-+$/g, "")}`, p = F(null), I = () => {
290
- let t = a.value?.parentElement ?? null;
291
- for (; t; ) {
292
- const { overflowY: u } = getComputedStyle(t);
293
- if (u === "auto" || u === "scroll" || u === "overlay")
294
- return t;
295
- t = t.parentElement;
289
+ }), f = (e) => e.dataTestId ?? `page-layout-anchor-${e.id.replace(/[^\w-]+/g, "-").replace(/^-+|-+$/g, "")}`, p = M(null), A = () => {
290
+ let e = a.value?.parentElement ?? null;
291
+ for (; e; ) {
292
+ const { overflowY: o } = getComputedStyle(e);
293
+ if (o === "auto" || o === "scroll" || o === "overlay")
294
+ return e;
295
+ e = e.parentElement;
296
296
  }
297
297
  return null;
298
- }, S = (t) => {
299
- if (t.element)
300
- return t.element.isConnected ? t.element : null;
301
- const u = p.value ?? document;
298
+ }, S = (e) => {
299
+ if (e.element)
300
+ return e.element.isConnected ? e.element : null;
301
+ const o = p.value ?? document;
302
302
  try {
303
- return u.querySelector(t.id) ?? u.querySelector(`#${CSS.escape(t.id)}`);
303
+ return o.querySelector(e.id) ?? o.querySelector(`#${CSS.escape(e.id)}`);
304
304
  } catch {
305
305
  return null;
306
306
  }
307
- }, g = () => (a.value?.closest(".page-layout-header")?.getBoundingClientRect().height ?? 0) + parseInt(Le, 10), N = parseInt(Q, 10), P = parseInt(nt, 10), H = (t) => t * _e + 2 * N + $e + (t + 2) * P + he, U = () => _e + $e + P + he;
308
- let s = 0;
309
- const O = async () => {
310
- if (!n.value.length) {
311
- l.value = "hidden";
307
+ }, g = () => (a.value?.closest(".page-layout-header")?.getBoundingClientRect().height ?? 0) + parseInt(zt, 10), z = parseInt(at, 10), D = parseInt(ve, 10), x = (e) => e * St + 2 * z + Rt + (e + 2) * D + mt, Z = () => St + Rt + D + mt;
308
+ let l = 0;
309
+ const F = async () => {
310
+ if (!i.value.length) {
311
+ r.value = "hidden";
312
312
  return;
313
313
  }
314
- const t = ++s;
315
- if (l.value = "all", await pe(), t !== s || !a.value || !o.value)
314
+ const e = ++l;
315
+ if (r.value = "all", await yt(), e !== l || !a.value || !n.value)
316
316
  return;
317
- const u = a.value.getBoundingClientRect().width, _ = o.value.getBoundingClientRect().width;
318
- u <= 0 || _ <= 0 || _ + he <= u || (H(3) <= u ? l.value = "window-3" : H(2) <= u ? l.value = "window-2" : U() <= u ? l.value = "active-only" : l.value = "hidden");
317
+ const o = a.value.getBoundingClientRect().width, m = n.value.getBoundingClientRect().width;
318
+ o <= 0 || m <= 0 || m + mt <= o || (x(3) <= o ? r.value = "window-3" : x(2) <= o ? r.value = "window-2" : Z() <= o ? r.value = "active-only" : r.value = "hidden");
319
319
  };
320
320
  let V = null;
321
- Pe(a, () => {
321
+ Ft(a, () => {
322
322
  V && clearTimeout(V), V = setTimeout(() => {
323
- ee(), O();
323
+ it(), F();
324
324
  }, 150);
325
325
  });
326
- let q = null, Y = null;
327
- const Z = () => p.value ?? window, L = () => {
328
- q = null, Y && (clearTimeout(Y), Y = null);
329
- const t = Z();
330
- t.removeEventListener("scrollend", L), t.removeEventListener("wheel", L), t.removeEventListener("touchstart", L);
331
- }, oe = (t) => {
332
- L(), q = t;
333
- const u = Z();
334
- u.addEventListener("scrollend", L, { once: !0 }), u.addEventListener("wheel", L, { passive: !0 }), u.addEventListener("touchstart", L, { passive: !0 }), Y = setTimeout(L, 1e3);
335
- }, de = () => {
336
- const t = p.value;
326
+ let J = null, X = null, j = 0, ut = 0, G = null, ot = null;
327
+ const _t = (e) => {
328
+ const o = String(++j);
329
+ $t(), ot = e, e.removeAttribute(st), ut = requestAnimationFrame(() => {
330
+ e.setAttribute(st, o), G = setTimeout(() => {
331
+ e.getAttribute(st) === o && e.removeAttribute(st);
332
+ }, De);
333
+ });
334
+ }, $t = () => {
335
+ cancelAnimationFrame(ut), G && (clearTimeout(G), G = null), ot?.removeAttribute(st), ot = null;
336
+ }, nt = () => p.value ?? window, H = (e) => {
337
+ e && e.type !== "scrollend" && j++, J = null, X && (clearTimeout(X), X = null);
338
+ const o = nt();
339
+ o.removeEventListener("scrollend", H), o.removeEventListener("wheel", H), o.removeEventListener("touchstart", H);
340
+ }, Ht = (e) => {
341
+ H(), J = e;
342
+ const o = nt();
343
+ o.addEventListener("scrollend", H, { once: !0 }), o.addEventListener("wheel", H, { passive: !0 }), o.addEventListener("touchstart", H, { passive: !0 }), X = setTimeout(H, 1e3);
344
+ }, Ct = () => {
345
+ const e = p.value;
337
346
  return {
338
- top: t ? t.getBoundingClientRect().top : 0,
339
- scrollTop: t ? t.scrollTop : window.scrollY,
340
- clientHeight: t ? t.clientHeight : window.innerHeight,
341
- scrollHeight: t ? t.scrollHeight : document.documentElement.scrollHeight
347
+ top: e ? e.getBoundingClientRect().top : 0,
348
+ scrollTop: e ? e.scrollTop : window.scrollY,
349
+ clientHeight: e ? e.clientHeight : window.innerHeight,
350
+ scrollHeight: e ? e.scrollHeight : document.documentElement.scrollHeight
342
351
  };
343
- }, ee = () => {
344
- const { top: t, scrollTop: u, clientHeight: _, scrollHeight: $ } = de(), x = g(), C = [];
345
- let A = null, ne = null;
346
- for (const W of e.anchors) {
347
- const ie = S(W);
348
- ie && (C.push(W.id), ne = W.id, A ??= W.id, ie.getBoundingClientRect().top - t <= (W.offset ?? x) + 8 && (A = W.id));
352
+ }, it = () => {
353
+ const { top: e, scrollTop: o, clientHeight: m, scrollHeight: _ } = Ct(), N = g(), $ = [];
354
+ let k = null, U = null;
355
+ for (const B of t.anchors) {
356
+ const Q = S(B);
357
+ Q && ($.push(B.id), U = B.id, k ??= B.id, Q.getBoundingClientRect().top - e <= (B.offset ?? N) + 8 && (k = B.id));
349
358
  }
350
- const we = C.length !== v.value.length || C.some((W, ie) => W !== v.value[ie]);
351
- return we && (v.value = C), q || (ne && u > 0 && u + _ >= $ - 2 && (A = ne), c.value = A ?? ""), we;
359
+ const ct = $.length !== v.value.length || $.some((B, Q) => B !== v.value[Q]);
360
+ return ct && (v.value = $), J || (U && o > 0 && o + m >= _ - 2 && (k = U), c.value = k ?? ""), ct;
352
361
  };
353
- let ve = !1;
354
- const ye = () => {
355
- ve || (ve = !0, requestAnimationFrame(() => {
356
- ve = !1, ee() && O();
362
+ let gt = !1;
363
+ const It = () => {
364
+ gt || (gt = !0, requestAnimationFrame(() => {
365
+ gt = !1, it() && F();
357
366
  }));
358
- }, ke = (t) => {
359
- const u = S(t);
360
- if (!u)
367
+ }, Mt = (e) => {
368
+ const o = nt();
369
+ let m = !1;
370
+ const _ = () => {
371
+ m || (m = !0, o.removeEventListener("scrollend", _), e());
372
+ };
373
+ o.addEventListener("scrollend", _, { once: !0 }), window.setTimeout(_, Pe);
374
+ }, At = (e) => {
375
+ const o = S(e);
376
+ if (!o)
361
377
  return;
362
- c.value = t.id, oe(t.id);
363
- const _ = t.offset ?? g(), $ = p.value;
364
- if ($) {
365
- $.scrollTo({ behavior: "smooth", top: u.getBoundingClientRect().top - $.getBoundingClientRect().top + $.scrollTop - _ });
378
+ c.value = e.id, Ht(e.id);
379
+ const m = e.offset ?? g(), { scrollTop: _, clientHeight: N, scrollHeight: $ } = Ct(), k = p.value, U = k ? o.getBoundingClientRect().top - k.getBoundingClientRect().top + k.scrollTop - m : o.getBoundingClientRect().top + window.scrollY - m, ct = Math.min(Math.max(U, 0), Math.max($ - N, 0)), B = Math.abs(ct - _) >= 2, Q = j;
380
+ if ((k ?? window).scrollTo({ behavior: "smooth", top: U }), !B) {
381
+ _t(o);
366
382
  return;
367
383
  }
368
- window.scrollTo({ behavior: "smooth", top: u.getBoundingClientRect().top + window.scrollY - _ });
369
- }, Ke = (t, u) => {
370
- u(), ke(t);
384
+ Mt(() => {
385
+ Q === j && _t(o);
386
+ });
387
+ }, xt = (e, o) => {
388
+ o(), At(e);
371
389
  };
372
- return be(() => {
373
- p.value = I(), Z().addEventListener("scroll", ye, { passive: !0 }), ee(), O(), requestAnimationFrame(() => {
374
- ee(), O();
390
+ return wt(() => {
391
+ p.value = A(), nt().addEventListener("scroll", It, { passive: !0 }), it(), F(), requestAnimationFrame(() => {
392
+ it(), F();
375
393
  });
376
- }), Ee(() => {
377
- Z().removeEventListener("scroll", ye), L(), V && clearTimeout(V);
378
- }), re(() => e.anchors, () => {
379
- e.anchors.some((t) => t.id === c.value) || (c.value = ""), ee(), O();
380
- }, { deep: !0 }), (t, u) => {
381
- const _ = R("KButton"), $ = R("KDropdownItem"), x = R("KDropdown");
382
- return i(), d("nav", {
394
+ }), Pt(() => {
395
+ nt().removeEventListener("scroll", It), H(), j++, $t(), V && clearTimeout(V);
396
+ }), ht(() => t.anchors, () => {
397
+ t.anchors.some((e) => e.id === c.value) || (c.value = ""), it(), F();
398
+ }, { deep: !0 }), (e, o) => {
399
+ const m = L("KButton"), _ = L("KDropdownItem"), N = L("KDropdown");
400
+ return s(), d("nav", {
383
401
  ref: "page-layout-anchor-navigation",
384
- "aria-label": h(r)("anchor_navigation.aria_label"),
402
+ "aria-label": h(u)("anchor_navigation.aria_label"),
385
403
  class: "page-layout-anchor-navigation",
386
- "data-fit": l.value,
404
+ "data-fit": r.value,
387
405
  "data-testid": "page-layout-anchor-navigation"
388
406
  }, [
389
407
  b("ul", {
390
408
  ref: "page-layout-anchor-navigation-list",
391
- class: j({ "layout-hidden": l.value === "hidden" })
409
+ class: q({ "layout-hidden": r.value === "hidden" })
392
410
  }, [
393
- k.value.hasLeadingEllipsis ? (i(), d("li", kt, " … ")) : m("", !0),
394
- (i(!0), d(G, null, M(k.value.anchors, (C) => (i(), d("li", {
395
- key: `${C.id}-anchor`
411
+ T.value.hasLeadingEllipsis ? (s(), d("li", Ee, " … ")) : y("", !0),
412
+ (s(!0), d(Y, null, W(T.value.anchors, ($) => (s(), d("li", {
413
+ key: `${$.id}-anchor`
396
414
  }, [
397
415
  b("button", {
398
- "aria-current": C.id === c.value ? "location" : void 0,
399
- class: j(["anchor-link", { active: C.id === c.value }]),
400
- "data-testid": f(C),
401
- title: C.label,
416
+ "aria-current": $.id === c.value ? "location" : void 0,
417
+ class: q(["anchor-link", { active: $.id === c.value }]),
418
+ "data-testid": f($),
419
+ title: $.label,
402
420
  type: "button",
403
- onClick: (A) => ke(C)
404
- }, B(C.label), 11, wt)
421
+ onClick: (k) => At($)
422
+ }, K($.label), 11, Se)
405
423
  ]))), 128)),
406
- k.value.hasTrailingEllipsis ? (i(), d("li", Tt, " … ")) : m("", !0),
407
- k.value.hasOverflowDropdown ? (i(), d("li", _t, [
408
- z(x, { "kpop-attributes": {
424
+ T.value.hasTrailingEllipsis ? (s(), d("li", Re, " … ")) : y("", !0),
425
+ T.value.hasOverflowDropdown ? (s(), d("li", Le, [
426
+ O(N, { "kpop-attributes": {
409
427
  placement: "bottom-end",
410
428
  popoverElementAttributes: { "data-testid": "anchor-navigation-overflow-dropdown-popover" }
411
429
  } }, {
412
- items: T(({ closeDropdown: C }) => [
413
- (i(!0), d(G, null, M(n.value, (A) => (i(), D($, {
414
- key: `${A.id}-dropdown-item`,
415
- "aria-current": A.id === c.value ? "location" : void 0,
416
- "data-testid": f(A),
417
- selected: A.id === c.value,
418
- onClick: (ne) => Ke(A, C)
430
+ items: I(({ closeDropdown: $ }) => [
431
+ (s(!0), d(Y, null, W(i.value, (k) => (s(), R(_, {
432
+ key: `${k.id}-dropdown-item`,
433
+ "aria-current": k.id === c.value ? "location" : void 0,
434
+ "data-testid": f(k),
435
+ selected: k.id === c.value,
436
+ onClick: (U) => xt(k, $)
419
437
  }, {
420
- default: T(() => [
421
- X(B(A.label), 1)
438
+ default: I(() => [
439
+ et(K(k.label), 1)
422
440
  ]),
423
441
  _: 2
424
442
  }, 1032, ["aria-current", "data-testid", "selected", "onClick"]))), 128))
425
443
  ]),
426
- default: T(() => [
427
- z(_, {
444
+ default: I(() => [
445
+ O(m, {
428
446
  appearance: "tertiary",
429
- "aria-label": h(r)("anchor_navigation.more_button.aria_label"),
447
+ "aria-label": h(u)("anchor_navigation.more_button.aria_label"),
430
448
  class: "anchor-overflow-button",
431
449
  "data-testid": "anchor-navigation-overflow-dropdown-button",
432
450
  icon: "",
433
451
  size: "small"
434
452
  }, {
435
- default: T(() => [
436
- z(h(Re), {
453
+ default: I(() => [
454
+ O(h(Ot), {
437
455
  decorative: "",
438
- size: `var(--kui-icon-size-30, ${h(Q)})`
456
+ size: `var(--kui-icon-size-30, ${h(at)})`
439
457
  }, null, 8, ["size"])
440
458
  ]),
441
459
  _: 1
@@ -443,29 +461,29 @@ const ht = {
443
461
  ]),
444
462
  _: 1
445
463
  })
446
- ])) : m("", !0)
464
+ ])) : y("", !0)
447
465
  ], 2)
448
- ], 8, yt);
466
+ ], 8, Ae);
449
467
  };
450
468
  }
451
- }), It = /* @__PURE__ */ ce($t, [["__scopeId", "data-v-f9770830"]]), Ie = /* @__PURE__ */ Symbol("nested-page-layout-detection"), Ct = "page-layout:new-appearance", Et = {
469
+ }), Be = /* @__PURE__ */ pt(Ne, [["__scopeId", "data-v-d9058e68"]]), Lt = /* @__PURE__ */ Symbol("nested-page-layout-detection"), Ke = "page-layout:new-appearance", Oe = {
452
470
  key: 0,
453
471
  class: "page-layout-header",
454
472
  "data-testid": "page-layout-header"
455
- }, St = { class: "page-header-container" }, At = { class: "page-header-start" }, Dt = { class: "title-container" }, Rt = {
473
+ }, ze = { class: "page-header-container" }, Fe = { class: "page-header-start" }, He = { class: "title-container" }, Me = {
456
474
  key: 1,
457
475
  class: "page-layout-title-wrapper"
458
- }, Lt = {
476
+ }, xe = {
459
477
  class: "page-layout-title",
460
478
  "data-testid": "page-layout-title"
461
- }, Pt = ["aria-label"], Kt = {
479
+ }, We = ["aria-label"], Ve = {
462
480
  key: 3,
463
481
  class: "title-after-container"
464
- }, Bt = { class: "page-header-actions-container" }, zt = {
482
+ }, je = { class: "page-header-actions-container" }, Ge = {
465
483
  key: 0,
466
484
  class: "page-layout-aside-container",
467
485
  "data-testid": "page-layout-aside"
468
- }, Nt = { class: "page-layout-content" }, Ot = /* @__PURE__ */ ue({
486
+ }, Ue = { class: "page-layout-content" }, qe = /* @__PURE__ */ ft({
469
487
  __name: "PageLayout",
470
488
  props: {
471
489
  breadcrumbs: { default: () => [] },
@@ -475,166 +493,166 @@ const ht = {
475
493
  anchors: { default: () => [] },
476
494
  pageShortcutData: {}
477
495
  },
478
- setup(e) {
479
- const r = te("app:navigateTo", null), a = te(Ct, null), o = te("app:pageShortcutsContext", null), { i18n: { t: l } } = me.useI18n(), c = De(), v = Me(), n = w(() => !!(e.tabs && e.tabs.length)), y = w(() => typeof e.backTo == "string"), k = w(() => ae(a) === !0), f = w(() => k.value && !n.value && !!(e.anchors && e.anchors.length)), p = w(() => !!e.pageShortcutData && !!e.pageShortcutData.entityType && !!e.pageShortcutData.label), I = w(() => p.value && !!o && "onFavoriteToggle" in o && typeof o.onFavoriteToggle == "function"), S = F(0), g = w(() => !!o && "isFavorite" in o && typeof o.isFavorite == "function" && o.isFavorite(e.pageShortcutData) === !0), N = async () => {
480
- if (e.backTo) {
481
- if (typeof e.backTo == "object") {
482
- c.push(e.backTo);
496
+ setup(t) {
497
+ const u = lt("app:navigateTo", null), a = lt(Ke, null), n = lt("app:pageShortcutsContext", null), { i18n: { t: r } } = Tt.useI18n(), c = Kt(), v = Jt(), i = C(() => !!(t.tabs && t.tabs.length)), w = C(() => typeof t.backTo == "string"), T = C(() => rt(a) === !0), f = C(() => T.value && !i.value && !!(t.anchors && t.anchors.length)), p = C(() => !!t.pageShortcutData && !!t.pageShortcutData.entityType && !!t.pageShortcutData.label), A = C(() => p.value && !!n && "onFavoriteToggle" in n && typeof n.onFavoriteToggle == "function"), S = M(0), g = C(() => !!n && "isFavorite" in n && typeof n.isFavorite == "function" && n.isFavorite(t.pageShortcutData) === !0), z = async () => {
498
+ if (t.backTo) {
499
+ if (typeof t.backTo == "object") {
500
+ c.push(t.backTo);
483
501
  return;
484
502
  }
485
- if (typeof r != "function") {
486
- window.location.href = e.backTo;
503
+ if (typeof u != "function") {
504
+ window.location.href = t.backTo;
487
505
  return;
488
506
  }
489
- await r(e.backTo);
507
+ await u(t.backTo);
490
508
  }
491
- }, P = F(0), H = w(() => P.value > 0);
492
- Fe(Ie, () => (P.value++, () => {
493
- P.value--;
509
+ }, D = M(0), x = C(() => D.value > 0);
510
+ Ut(Lt, () => (D.value++, () => {
511
+ D.value--;
494
512
  }));
495
- const U = te(Ie, null), s = F(null);
496
- typeof U == "function" && (s.value = U());
497
- const O = () => {
498
- o.onFavoriteToggle({ ...e.pageShortcutData, path: e.pageShortcutData?.path || v.fullPath });
513
+ const Z = lt(Lt, null), l = M(null);
514
+ typeof Z == "function" && (l.value = Z());
515
+ const F = () => {
516
+ n.onFavoriteToggle({ ...t.pageShortcutData, path: t.pageShortcutData?.path || v.fullPath });
499
517
  };
500
- He(() => {
501
- s.value?.();
518
+ qt(() => {
519
+ l.value?.();
502
520
  });
503
- const V = ut(() => {
504
- !H.value && p.value && o && "onEntityPageVisit" in o && typeof o.onEntityPageVisit == "function" && (o.onEntityPageVisit({ ...e.pageShortcutData, path: e.pageShortcutData?.path || v?.fullPath }), S.value++);
521
+ const V = me(() => {
522
+ !x.value && p.value && n && "onEntityPageVisit" in n && typeof n.onEntityPageVisit == "function" && (n.onEntityPageVisit({ ...t.pageShortcutData, path: t.pageShortcutData?.path || v?.fullPath }), S.value++);
505
523
  }, 500);
506
- return re([() => e.pageShortcutData, () => v?.fullPath], () => {
524
+ return ht([() => t.pageShortcutData, () => v?.fullPath], () => {
507
525
  V();
508
- }, { immediate: !0, deep: !0 }), (K, q) => {
509
- const Y = R("KBreadcrumbs"), Z = R("KTooltip"), L = R("router-view");
510
- return i(), d("div", {
511
- class: j(["kong-ui-public-page-layout", { "new-appearance": k.value }]),
526
+ }, { immediate: !0, deep: !0 }), (P, J) => {
527
+ const X = L("KBreadcrumbs"), j = L("KTooltip"), ut = L("router-view");
528
+ return s(), d("div", {
529
+ class: q(["kong-ui-public-page-layout", { "new-appearance": T.value }]),
512
530
  "data-testid": "kong-ui-public-page-layout"
513
531
  }, [
514
- H.value ? m("", !0) : (i(), d("div", Et, [
515
- b("div", St, [
516
- b("div", At, [
517
- e.breadcrumbs && e.breadcrumbs.length ? (i(), D(Y, {
532
+ x.value ? y("", !0) : (s(), d("div", Oe, [
533
+ b("div", ze, [
534
+ b("div", Fe, [
535
+ t.breadcrumbs && t.breadcrumbs.length ? (s(), R(X, {
518
536
  key: 0,
519
537
  class: "header-breadcrumbs",
520
538
  "data-testid": "page-layout-breadcrumbs",
521
539
  "item-max-width": "25ch",
522
- items: e.breadcrumbs
523
- }, ge({ _: 2 }, [
524
- k.value ? {
540
+ items: t.breadcrumbs
541
+ }, kt({ _: 2 }, [
542
+ T.value ? {
525
543
  name: "divider",
526
- fn: T(() => [
527
- z(h(Ge), {
544
+ fn: I(() => [
545
+ O(h(te), {
528
546
  decorative: "",
529
- size: `var(--kui-icon-size-30, ${h(Q)})`
547
+ size: `var(--kui-icon-size-30, ${h(at)})`
530
548
  }, null, 8, ["size"])
531
549
  ]),
532
550
  key: "0"
533
551
  } : void 0
534
- ]), 1032, ["items"])) : m("", !0),
535
- b("div", Dt, [
536
- e.backTo && !k.value ? (i(), D(fe(y.value ? "a" : "router-link"), Se({ key: 0 }, y.value ? { href: e.backTo } : { to: e.backTo }, {
537
- "aria-label": h(l)("back_button"),
552
+ ]), 1032, ["items"])) : y("", !0),
553
+ b("div", He, [
554
+ t.backTo && !T.value ? (s(), R(bt(w.value ? "a" : "router-link"), Nt({ key: 0 }, w.value ? { href: t.backTo } : { to: t.backTo }, {
555
+ "aria-label": h(r)("back_button"),
538
556
  class: "navigate-back",
539
557
  "data-testid": "page-layout-navigate-back",
540
558
  tabindex: "0",
541
- onClick: le(N, ["prevent"]),
542
- onKeydown: Ae(le(N, ["prevent"]), ["enter"])
559
+ onClick: vt(z, ["prevent"]),
560
+ onKeydown: Bt(vt(z, ["prevent"]), ["enter"])
543
561
  }), {
544
- default: T(() => [
545
- z(h(Ue), {
562
+ default: I(() => [
563
+ O(h(ee), {
546
564
  decorative: "",
547
- size: `var(--kui-icon-size-30, ${h(Q)})`
565
+ size: `var(--kui-icon-size-30, ${h(at)})`
548
566
  }, null, 8, ["size"])
549
567
  ]),
550
568
  _: 1
551
- }, 16, ["aria-label", "onKeydown"])) : m("", !0),
552
- e.title || K.$slots.title ? (i(), d("span", Rt, [
553
- E(K.$slots, "title", {}, () => [
554
- b("h1", Lt, B(e.title), 1)
569
+ }, 16, ["aria-label", "onKeydown"])) : y("", !0),
570
+ t.title || P.$slots.title ? (s(), d("span", Me, [
571
+ E(P.$slots, "title", {}, () => [
572
+ b("h1", xe, K(t.title), 1)
555
573
  ], !0)
556
- ])) : m("", !0),
557
- I.value ? (i(), d("div", {
574
+ ])) : y("", !0),
575
+ A.value ? (s(), d("div", {
558
576
  key: S.value,
559
577
  class: "favorite-button-container"
560
578
  }, [
561
- z(Z, {
579
+ O(j, {
562
580
  placement: "right",
563
- text: g.value ? h(l)("favorite_button.remove_shortcut") : h(l)("favorite_button.save_shortcut")
581
+ text: g.value ? h(r)("favorite_button.remove_shortcut") : h(r)("favorite_button.save_shortcut")
564
582
  }, {
565
- default: T(() => [
583
+ default: I(() => [
566
584
  b("button", {
567
- "aria-label": g.value ? h(l)("favorite_button.remove_shortcut") : h(l)("favorite_button.save_shortcut"),
568
- class: j(["favorite-button", { active: g.value }]),
585
+ "aria-label": g.value ? h(r)("favorite_button.remove_shortcut") : h(r)("favorite_button.save_shortcut"),
586
+ class: q(["favorite-button", { active: g.value }]),
569
587
  "data-testid": "page-layout-favorite-button",
570
588
  type: "button",
571
- onClick: O
589
+ onClick: F
572
590
  }, [
573
- (i(), D(fe(g.value ? h(qe) : h(Ye)), {
591
+ (s(), R(bt(g.value ? h(ae) : h(oe)), {
574
592
  decorative: "",
575
- size: `var(--kui-icon-size-30, ${h(Q)})`
593
+ size: `var(--kui-icon-size-30, ${h(at)})`
576
594
  }, null, 8, ["size"]))
577
- ], 10, Pt)
595
+ ], 10, We)
578
596
  ]),
579
597
  _: 1
580
598
  }, 8, ["text"])
581
- ])) : m("", !0),
582
- K.$slots["title-after"] ? (i(), d("div", Kt, [
583
- E(K.$slots, "title-after", {}, void 0, !0)
584
- ])) : m("", !0)
599
+ ])) : y("", !0),
600
+ P.$slots["title-after"] ? (s(), d("div", Ve, [
601
+ E(P.$slots, "title-after", {}, void 0, !0)
602
+ ])) : y("", !0)
585
603
  ])
586
604
  ]),
587
- f.value ? (i(), D(It, {
605
+ f.value ? (s(), R(Be, {
588
606
  key: 0,
589
- anchors: e.anchors
590
- }, null, 8, ["anchors"])) : m("", !0),
591
- b("div", Bt, [
592
- E(K.$slots, "actions", {}, void 0, !0),
593
- q[0] || (q[0] = b("div", { "data-teleport-target": "ask-kai" }, null, -1))
607
+ anchors: t.anchors
608
+ }, null, 8, ["anchors"])) : y("", !0),
609
+ b("div", je, [
610
+ E(P.$slots, "actions", {}, void 0, !0),
611
+ J[0] || (J[0] = b("div", { "data-teleport-target": "ask-kai" }, null, -1))
594
612
  ])
595
613
  ]),
596
- n.value ? (i(), D(mt, {
614
+ i.value ? (s(), R(Ie, {
597
615
  key: 0,
598
- tabs: e.tabs
599
- }, ge({ _: 2 }, [
600
- M(e.tabs, (oe) => ({
601
- name: `tab-${oe.key}`,
602
- fn: T((de) => [
603
- E(K.$slots, `tab-${oe.key}`, xe(We(de)), void 0, !0)
616
+ tabs: t.tabs
617
+ }, kt({ _: 2 }, [
618
+ W(t.tabs, (G) => ({
619
+ name: `tab-${G.key}`,
620
+ fn: I((ot) => [
621
+ E(P.$slots, `tab-${G.key}`, Yt(Zt(ot)), void 0, !0)
604
622
  ])
605
623
  }))
606
- ]), 1032, ["tabs"])) : m("", !0)
624
+ ]), 1032, ["tabs"])) : y("", !0)
607
625
  ])),
608
626
  b("div", {
609
- class: j(["page-layout-content-container", { "has-nested-page-layout": H.value }])
627
+ class: q(["page-layout-content-container", { "has-nested-page-layout": x.value }])
610
628
  }, [
611
- k.value && K.$slots.aside ? (i(), d("div", zt, [
612
- E(K.$slots, "aside", {}, void 0, !0)
613
- ])) : m("", !0),
614
- b("div", Nt, [
615
- n.value ? (i(), D(L, { key: 0 })) : E(K.$slots, "default", {}, void 0, !0, 1)
629
+ T.value && P.$slots.aside ? (s(), d("div", Ge, [
630
+ E(P.$slots, "aside", {}, void 0, !0)
631
+ ])) : y("", !0),
632
+ b("div", Ue, [
633
+ i.value ? (s(), R(ut, { key: 0 })) : E(P.$slots, "default", {}, void 0, !0, 1)
616
634
  ])
617
635
  ], 2)
618
636
  ], 2);
619
637
  };
620
638
  }
621
- }), ea = /* @__PURE__ */ ce(Ot, [["__scopeId", "data-v-82c7f181"]]), Ft = {
639
+ }), ca = /* @__PURE__ */ pt(qe, [["__scopeId", "data-v-e714e65a"]]), Ye = {
622
640
  key: 0,
623
641
  class: "about-card-description",
624
642
  "data-testid": "about-card-description"
625
- }, Ht = {
643
+ }, Ze = {
626
644
  key: 1,
627
645
  class: "about-card-skeleton",
628
646
  "data-testid": "about-card-skeleton"
629
- }, xt = {
647
+ }, Je = {
630
648
  key: 2,
631
649
  class: "about-card-rows",
632
650
  "data-testid": "about-card-rows"
633
- }, Wt = ["data-testid"], Mt = { class: "about-card-row-label" }, Vt = { class: "about-card-row-text" }, jt = ["aria-label", "data-testid"], Gt = { class: "about-card-row-value" }, Ut = { class: "about-card-row-text" }, qt = {
651
+ }, Xe = ["data-testid"], Qe = { class: "about-card-row-label" }, ta = { class: "about-card-row-text" }, ea = ["aria-label", "data-testid"], aa = { class: "about-card-row-value" }, oa = { class: "about-card-row-text" }, na = {
634
652
  key: 3,
635
653
  class: "about-card-content",
636
654
  "data-testid": "about-card-content"
637
- }, Yt = /* @__PURE__ */ ue({
655
+ }, ia = /* @__PURE__ */ ft({
638
656
  __name: "AboutCard",
639
657
  props: {
640
658
  title: { default: "" },
@@ -643,81 +661,81 @@ const ht = {
643
661
  rows: { default: () => [] },
644
662
  isLoading: { type: Boolean, default: !1 }
645
663
  },
646
- setup(e) {
647
- const r = w(() => e.rows.length || 4);
648
- return (a, o) => {
649
- const l = R("KSkeletonBox"), c = R("KTooltip"), v = R("KCard");
650
- return i(), D(v, {
664
+ setup(t) {
665
+ const u = C(() => t.rows.length || 4);
666
+ return (a, n) => {
667
+ const r = L("KSkeletonBox"), c = L("KTooltip"), v = L("KCard");
668
+ return s(), R(v, {
651
669
  class: "kong-ui-public-about-card",
652
- title: e.title,
653
- "title-tag": e.titleTag
654
- }, ge({
655
- default: T(() => [
656
- a.$slots.description || e.description ? (i(), d("p", Ft, [
670
+ title: t.title,
671
+ "title-tag": t.titleTag
672
+ }, kt({
673
+ default: I(() => [
674
+ a.$slots.description || t.description ? (s(), d("p", Ye, [
657
675
  E(a.$slots, "description", {}, () => [
658
- X(B(e.description), 1)
676
+ et(K(t.description), 1)
659
677
  ], !0)
660
- ])) : m("", !0),
661
- e.isLoading ? (i(), d("div", Ht, [
662
- (i(!0), d(G, null, M(r.value, (n) => (i(), D(l, {
663
- key: n,
678
+ ])) : y("", !0),
679
+ t.isLoading ? (s(), d("div", Ze, [
680
+ (s(!0), d(Y, null, W(u.value, (i) => (s(), R(r, {
681
+ key: i,
664
682
  height: "2",
665
683
  width: "100"
666
684
  }))), 128))
667
- ])) : e.rows.length ? (i(), d("dl", xt, [
668
- (i(!0), d(G, null, M(e.rows, (n) => (i(), d("div", {
669
- key: n.key,
685
+ ])) : t.rows.length ? (s(), d("dl", Je, [
686
+ (s(!0), d(Y, null, W(t.rows, (i) => (s(), d("div", {
687
+ key: i.key,
670
688
  class: "about-card-row",
671
- "data-testid": `about-card-row-${n.key}`
689
+ "data-testid": `about-card-row-${i.key}`
672
690
  }, [
673
- b("dt", Mt, [
674
- E(a.$slots, `label-${n.key}`, { row: n }, () => [
675
- b("span", Vt, B(n.label), 1)
691
+ b("dt", Qe, [
692
+ E(a.$slots, `label-${i.key}`, { row: i }, () => [
693
+ b("span", ta, K(i.label), 1)
676
694
  ], !0),
677
- n.tooltip ? (i(), D(c, {
695
+ i.tooltip ? (s(), R(c, {
678
696
  key: 0,
679
- text: n.tooltip
697
+ text: i.tooltip
680
698
  }, {
681
- default: T(() => [
699
+ default: I(() => [
682
700
  b("button", {
683
- "aria-label": n.tooltip,
701
+ "aria-label": i.tooltip,
684
702
  class: "about-card-row-tooltip-trigger",
685
- "data-testid": `about-card-row-${n.key}-tooltip`,
703
+ "data-testid": `about-card-row-${i.key}-tooltip`,
686
704
  type: "button"
687
705
  }, [
688
- z(h(Ze), {
689
- size: `var(--kui-icon-size-20, ${h(ot)})`
706
+ O(h(ne), {
707
+ size: `var(--kui-icon-size-20, ${h(de)})`
690
708
  }, null, 8, ["size"])
691
- ], 8, jt)
709
+ ], 8, ea)
692
710
  ]),
693
711
  _: 2
694
- }, 1032, ["text"])) : m("", !0)
712
+ }, 1032, ["text"])) : y("", !0)
695
713
  ]),
696
- b("dd", Gt, [
697
- E(a.$slots, `row-${n.key}`, { row: n }, () => [
698
- b("span", Ut, B(n.value), 1)
714
+ b("dd", aa, [
715
+ E(a.$slots, `row-${i.key}`, { row: i }, () => [
716
+ b("span", oa, K(i.value), 1)
699
717
  ], !0)
700
718
  ])
701
- ], 8, Wt))), 128))
702
- ])) : m("", !0),
703
- a.$slots.default ? (i(), d("div", qt, [
719
+ ], 8, Xe))), 128))
720
+ ])) : y("", !0),
721
+ a.$slots.default ? (s(), d("div", na, [
704
722
  E(a.$slots, "default", {}, void 0, !0)
705
- ])) : m("", !0)
723
+ ])) : y("", !0)
706
724
  ]),
707
725
  _: 2
708
726
  }, [
709
- a.$slots.title || e.title ? {
727
+ a.$slots.title || t.title ? {
710
728
  name: "title",
711
- fn: T(() => [
729
+ fn: I(() => [
712
730
  E(a.$slots, "title", {}, () => [
713
- X(B(e.title), 1)
731
+ et(K(t.title), 1)
714
732
  ], !0)
715
733
  ]),
716
734
  key: "0"
717
735
  } : void 0,
718
736
  a.$slots.actions ? {
719
737
  name: "actions",
720
- fn: T(() => [
738
+ fn: I(() => [
721
739
  E(a.$slots, "actions", {}, void 0, !0)
722
740
  ]),
723
741
  key: "1"
@@ -725,9 +743,9 @@ const ht = {
725
743
  ]), 1032, ["title", "title-tag"]);
726
744
  };
727
745
  }
728
- }), ta = /* @__PURE__ */ ce(Yt, [["__scopeId", "data-v-0316c887"]]);
746
+ }), da = /* @__PURE__ */ pt(ia, [["__scopeId", "data-v-0316c887"]]);
729
747
  export {
730
- ta as AboutCard,
731
- Ct as NEW_APPEARANCE_INJECTION_KEY,
732
- ea as PageLayout
748
+ da as AboutCard,
749
+ Ke as NEW_APPEARANCE_INJECTION_KEY,
750
+ ca as PageLayout
733
751
  };