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