@kong-ui-public/sandbox-layout 2.8.0 → 2.8.1-pr.3948.a10ca59e2.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.
- package/dist/sandbox-layout.es.js +144 -133
- package/dist/sandbox-layout.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/SandboxThemePicker.vue.d.ts.map +1 -1
- package/dist/types/composables/useSandboxTheme.d.ts +6 -1
- package/dist/types/composables/useSandboxTheme.d.ts.map +1 -1
- package/dist/types/constants.d.ts +5 -1
- package/dist/types/constants.d.ts.map +1 -1
- package/dist/types/types/theme.d.ts +2 -1
- package/dist/types/types/theme.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { DarkModeIcon as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as y, inject as G, resolveComponent as v, openBlock as n, createElementBlock as l, unref as c, Fragment as K, renderList as M, createVNode as s, withCtx as h, createTextVNode as A, toDisplayString as b, createCommentVNode as u, ref as C, computed as D, effectScope as H, watch as W, isRef as I, createElementVNode as o, createBlock as $, normalizeClass as X, resolveDynamicComponent as P, useCssVars as R, provide as Y, renderSlot as k } from "vue";
|
|
2
|
+
import { DarkModeIcon as F, LightModeIcon as Z, MenuIcon as j, CogIcon as q } from "@kong/icons";
|
|
3
|
+
const L = "kong-ui-sandbox-layout-links", U = "kong-ui-sandbox-theme", J = "mono-lime-day", Q = [
|
|
4
|
+
{ label: "Mono lime", value: "mono-lime" },
|
|
5
|
+
{ label: "Electric lime", value: "electric-lime" }
|
|
6
|
+
], ee = [
|
|
4
7
|
{ label: "Day", value: "day" },
|
|
5
8
|
{ label: "Night", value: "night" }
|
|
6
|
-
],
|
|
9
|
+
], te = {
|
|
7
10
|
key: 0,
|
|
8
11
|
class: "kong-ui-sandbox-navigation"
|
|
9
|
-
},
|
|
12
|
+
}, oe = /* @__PURE__ */ y({
|
|
10
13
|
__name: "SandboxNavigation",
|
|
11
14
|
emits: ["router-link-click"],
|
|
12
|
-
setup(e, { emit:
|
|
13
|
-
const r =
|
|
14
|
-
return (
|
|
15
|
-
const
|
|
15
|
+
setup(e, { emit: i }) {
|
|
16
|
+
const r = i, t = G(L, []);
|
|
17
|
+
return (g, f) => {
|
|
18
|
+
const a = v("router-link");
|
|
16
19
|
return n(), l("nav", null, [
|
|
17
|
-
c(
|
|
18
|
-
(n(!0), l(
|
|
20
|
+
c(t).length ? (n(), l("ul", te, [
|
|
21
|
+
(n(!0), l(K, null, M(c(t), (_) => (n(), l("li", {
|
|
19
22
|
key: _.name,
|
|
20
23
|
class: "sandbox-link"
|
|
21
24
|
}, [
|
|
22
|
-
|
|
25
|
+
s(a, {
|
|
23
26
|
to: _.to,
|
|
24
|
-
onClick: (
|
|
27
|
+
onClick: (p) => r("router-link-click", _)
|
|
25
28
|
}, {
|
|
26
|
-
default:
|
|
27
|
-
|
|
29
|
+
default: h(() => [
|
|
30
|
+
A(b(_.name), 1)
|
|
28
31
|
]),
|
|
29
32
|
_: 2
|
|
30
33
|
}, 1032, ["to", "onClick"])
|
|
@@ -33,73 +36,80 @@ const D = "kong-ui-sandbox-layout-links", z = "kong-ui-sandbox-theme", j = "elec
|
|
|
33
36
|
]);
|
|
34
37
|
};
|
|
35
38
|
}
|
|
36
|
-
}),
|
|
39
|
+
}), S = (e, i) => {
|
|
37
40
|
const r = e.__vccOpts || e;
|
|
38
|
-
for (const [
|
|
39
|
-
r[
|
|
41
|
+
for (const [t, g] of i)
|
|
42
|
+
r[t] = g;
|
|
40
43
|
return r;
|
|
41
|
-
},
|
|
42
|
-
function
|
|
44
|
+
}, N = /* @__PURE__ */ S(oe, [["__scopeId", "data-v-f67e3d83"]]), ne = "16px", O = "24px";
|
|
45
|
+
function le(e) {
|
|
43
46
|
return {
|
|
47
|
+
family: e.startsWith("electric-lime") ? "electric-lime" : "mono-lime",
|
|
44
48
|
mode: e.includes("night") ? "night" : "day",
|
|
45
49
|
highContrast: e.endsWith("high-contrast")
|
|
46
50
|
};
|
|
47
51
|
}
|
|
48
|
-
function
|
|
49
|
-
return
|
|
52
|
+
function se(e, i, r) {
|
|
53
|
+
return r ? `${e}-${i}-high-contrast` : `${e}-${i}`;
|
|
50
54
|
}
|
|
51
|
-
const
|
|
52
|
-
localStorage.getItem(
|
|
53
|
-
),
|
|
54
|
-
let
|
|
55
|
-
function
|
|
56
|
-
|
|
57
|
-
w
|
|
58
|
-
document.documentElement.setAttribute("data-kui-theme", e), localStorage.setItem(
|
|
55
|
+
const T = le(
|
|
56
|
+
localStorage.getItem(U) || J
|
|
57
|
+
), V = C(T.family), z = C(T.mode), B = C(T.highContrast), w = D(() => se(V.value, z.value, B.value));
|
|
58
|
+
let x = !1;
|
|
59
|
+
function ie() {
|
|
60
|
+
x || (x = !0, H(!0).run(() => {
|
|
61
|
+
W(w, (e) => {
|
|
62
|
+
document.documentElement.setAttribute("data-kui-theme", e), localStorage.setItem(U, e);
|
|
59
63
|
}, { immediate: !0 });
|
|
60
64
|
}));
|
|
61
65
|
}
|
|
62
|
-
function
|
|
63
|
-
return
|
|
66
|
+
function ae() {
|
|
67
|
+
return ie(), { theme: w, family: V, mode: z, highContrast: B };
|
|
64
68
|
}
|
|
65
|
-
const
|
|
69
|
+
const ce = { class: "kong-ui-sandbox-theme-picker" }, re = { class: "theme-picker-row" }, de = {
|
|
66
70
|
"aria-label": "Theme",
|
|
67
71
|
class: "theme-picker-group",
|
|
68
72
|
role: "radiogroup"
|
|
69
|
-
},
|
|
73
|
+
}, ue = ["aria-label", "checked", "value", "onChange"], _e = { class: "theme-picker-row" }, me = /* @__PURE__ */ y({
|
|
70
74
|
__name: "SandboxThemePicker",
|
|
71
75
|
setup(e) {
|
|
72
|
-
const { mode:
|
|
73
|
-
day:
|
|
74
|
-
night:
|
|
76
|
+
const { family: i, mode: r, highContrast: t } = ae(), g = {
|
|
77
|
+
day: Z,
|
|
78
|
+
night: F
|
|
75
79
|
};
|
|
76
|
-
return (
|
|
77
|
-
const v =
|
|
78
|
-
return n(), l("div",
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
return (f, a) => {
|
|
81
|
+
const _ = v("KSegmentedControl"), p = v("KTooltip"), m = v("KInputSwitch");
|
|
82
|
+
return n(), l("div", ce, [
|
|
83
|
+
s(_, {
|
|
84
|
+
modelValue: c(i),
|
|
85
|
+
"onUpdate:modelValue": a[0] || (a[0] = (d) => I(i) ? i.value = d : null),
|
|
86
|
+
"aria-label": "Theme family",
|
|
87
|
+
options: c(Q)
|
|
88
|
+
}, null, 8, ["modelValue", "options"]),
|
|
89
|
+
o("div", re, [
|
|
90
|
+
a[2] || (a[2] = o("span", { class: "theme-picker-label" }, "Theme", -1)),
|
|
91
|
+
o("div", de, [
|
|
92
|
+
(n(!0), l(K, null, M(c(ee), (d) => (n(), $(p, {
|
|
93
|
+
key: d.value,
|
|
84
94
|
placement: "top",
|
|
85
|
-
text:
|
|
95
|
+
text: d.label
|
|
86
96
|
}, {
|
|
87
|
-
default:
|
|
88
|
-
|
|
89
|
-
class:
|
|
97
|
+
default: h(() => [
|
|
98
|
+
o("label", {
|
|
99
|
+
class: X(["theme-picker-option", { active: d.value === c(r) }])
|
|
90
100
|
}, [
|
|
91
|
-
|
|
92
|
-
"aria-label":
|
|
93
|
-
checked:
|
|
101
|
+
o("input", {
|
|
102
|
+
"aria-label": d.label,
|
|
103
|
+
checked: d.value === c(r),
|
|
94
104
|
class: "theme-picker-input",
|
|
95
105
|
name: "sandbox-theme-mode",
|
|
96
106
|
type: "radio",
|
|
97
|
-
value:
|
|
98
|
-
onChange: (
|
|
99
|
-
}, null, 40,
|
|
100
|
-
(n(),
|
|
107
|
+
value: d.value,
|
|
108
|
+
onChange: (Ae) => r.value = d.value
|
|
109
|
+
}, null, 40, ue),
|
|
110
|
+
(n(), $(P(g[d.value]), {
|
|
101
111
|
decorative: "",
|
|
102
|
-
size: `var(--kui-icon-size-30, ${c(
|
|
112
|
+
size: `var(--kui-icon-size-30, ${c(ne)})`
|
|
103
113
|
}, null, 8, ["size"]))
|
|
104
114
|
], 2)
|
|
105
115
|
]),
|
|
@@ -107,39 +117,39 @@ const le = { class: "kong-ui-sandbox-theme-picker" }, ie = { class: "theme-picke
|
|
|
107
117
|
}, 1032, ["text"]))), 128))
|
|
108
118
|
])
|
|
109
119
|
]),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
modelValue: c(
|
|
114
|
-
"onUpdate:modelValue":
|
|
120
|
+
o("div", _e, [
|
|
121
|
+
a[3] || (a[3] = o("span", { class: "theme-picker-label" }, "High contrast", -1)),
|
|
122
|
+
s(m, {
|
|
123
|
+
modelValue: c(t),
|
|
124
|
+
"onUpdate:modelValue": a[1] || (a[1] = (d) => I(t) ? t.value = d : null),
|
|
115
125
|
"aria-label": "High contrast"
|
|
116
126
|
}, null, 8, ["modelValue"])
|
|
117
127
|
])
|
|
118
128
|
]);
|
|
119
129
|
};
|
|
120
130
|
}
|
|
121
|
-
}),
|
|
131
|
+
}), E = /* @__PURE__ */ S(me, [["__scopeId", "data-v-942c4583"]]), he = { class: "kong-ui-sandbox-layout" }, ve = { class: "header" }, pe = { class: "header-left" }, ge = { class: "mobile-nav-container" }, ke = { class: "toggle-mobile-nav" }, fe = {
|
|
122
132
|
key: 0,
|
|
123
133
|
class: "nav-theme-picker"
|
|
124
|
-
},
|
|
134
|
+
}, be = {
|
|
125
135
|
key: 1,
|
|
126
136
|
class: "navigation-after"
|
|
127
|
-
},
|
|
137
|
+
}, ye = {
|
|
128
138
|
key: 0,
|
|
129
139
|
class: "mobile-title"
|
|
130
|
-
},
|
|
140
|
+
}, Ce = { class: "header-right" }, Se = {
|
|
131
141
|
key: 0,
|
|
132
142
|
class: "mobile-controls-container"
|
|
133
|
-
},
|
|
143
|
+
}, Te = { class: "toggle-mobile-controls" }, Ie = { class: "layout" }, $e = { class: "desktop-nav-container" }, Ne = {
|
|
134
144
|
key: 0,
|
|
135
145
|
class: "nav-theme-picker"
|
|
136
|
-
},
|
|
146
|
+
}, Oe = {
|
|
137
147
|
key: 1,
|
|
138
148
|
class: "navigation-after"
|
|
139
|
-
},
|
|
149
|
+
}, xe = { class: "sandbox-container" }, Ee = { key: 0 }, Ke = {
|
|
140
150
|
key: 0,
|
|
141
151
|
class: "sandbox-controls"
|
|
142
|
-
},
|
|
152
|
+
}, Me = /* @__PURE__ */ y({
|
|
143
153
|
__name: "SandboxLayout",
|
|
144
154
|
props: {
|
|
145
155
|
title: {
|
|
@@ -162,41 +172,41 @@ const le = { class: "kong-ui-sandbox-theme-picker" }, ie = { class: "theme-picke
|
|
|
162
172
|
}
|
|
163
173
|
},
|
|
164
174
|
setup(e) {
|
|
165
|
-
|
|
175
|
+
R((t) => ({
|
|
166
176
|
v62569402: r.value
|
|
167
177
|
}));
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
const r =
|
|
171
|
-
return (
|
|
172
|
-
const
|
|
173
|
-
return n(), l("div",
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
default:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
const i = e;
|
|
179
|
+
Y(L, i.links);
|
|
180
|
+
const r = D(() => `${i.controlsMinWidth}px`);
|
|
181
|
+
return (t, g) => {
|
|
182
|
+
const f = v("KSlideout"), a = v("KToggle"), _ = v("router-link");
|
|
183
|
+
return n(), l("div", he, [
|
|
184
|
+
o("header", ve, [
|
|
185
|
+
o("div", pe, [
|
|
186
|
+
o("div", ge, [
|
|
187
|
+
s(a, null, {
|
|
188
|
+
default: h(({ isToggled: p, toggle: m }) => [
|
|
189
|
+
o("div", null, [
|
|
190
|
+
o("div", ke, [
|
|
191
|
+
s(c(j), {
|
|
182
192
|
role: "button",
|
|
183
|
-
size: `var(--kui-icon-size-50, ${c(
|
|
193
|
+
size: `var(--kui-icon-size-50, ${c(O)})`,
|
|
184
194
|
title: "Toggle menu",
|
|
185
|
-
onClick:
|
|
195
|
+
onClick: m
|
|
186
196
|
}, null, 8, ["size", "onClick"])
|
|
187
197
|
]),
|
|
188
|
-
|
|
198
|
+
s(f, {
|
|
189
199
|
title: "Main Menu",
|
|
190
|
-
visible:
|
|
191
|
-
onClose:
|
|
200
|
+
visible: p.value,
|
|
201
|
+
onClose: m
|
|
192
202
|
}, {
|
|
193
|
-
default:
|
|
194
|
-
e.applyTheming ? (n(), l("div",
|
|
195
|
-
|
|
203
|
+
default: h(() => [
|
|
204
|
+
e.applyTheming ? (n(), l("div", fe, [
|
|
205
|
+
s(E)
|
|
196
206
|
])) : u("", !0),
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
207
|
+
s(N, { onRouterLinkClick: m }, null, 8, ["onRouterLinkClick"]),
|
|
208
|
+
t.$slots["navigation-after"] ? (n(), l("div", be, [
|
|
209
|
+
k(t.$slots, "navigation-after", {}, void 0, !0)
|
|
200
210
|
])) : u("", !0)
|
|
201
211
|
]),
|
|
202
212
|
_: 2
|
|
@@ -205,39 +215,39 @@ const le = { class: "kong-ui-sandbox-theme-picker" }, ie = { class: "theme-picke
|
|
|
205
215
|
]),
|
|
206
216
|
_: 3
|
|
207
217
|
}),
|
|
208
|
-
e.title ? (n(), l("h1",
|
|
209
|
-
|
|
218
|
+
e.title ? (n(), l("h1", ye, [
|
|
219
|
+
s(_, {
|
|
210
220
|
class: "home-link",
|
|
211
221
|
to: { name: "home" }
|
|
212
222
|
}, {
|
|
213
|
-
default:
|
|
214
|
-
|
|
223
|
+
default: h(() => [
|
|
224
|
+
A(b(e.title), 1)
|
|
215
225
|
]),
|
|
216
226
|
_: 1
|
|
217
227
|
})
|
|
218
228
|
])) : u("", !0)
|
|
219
229
|
])
|
|
220
230
|
]),
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
default:
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
231
|
+
o("div", Ce, [
|
|
232
|
+
t.$slots.controls ? (n(), l("div", Se, [
|
|
233
|
+
s(a, null, {
|
|
234
|
+
default: h(({ isToggled: p, toggle: m }) => [
|
|
235
|
+
o("div", null, [
|
|
236
|
+
o("div", Te, [
|
|
237
|
+
s(c(q), {
|
|
228
238
|
role: "button",
|
|
229
|
-
size: `var(--kui-icon-size-50, ${c(
|
|
239
|
+
size: `var(--kui-icon-size-50, ${c(O)})`,
|
|
230
240
|
title: "Toggle controls",
|
|
231
|
-
onClick:
|
|
241
|
+
onClick: m
|
|
232
242
|
}, null, 8, ["size", "onClick"])
|
|
233
243
|
]),
|
|
234
|
-
|
|
244
|
+
s(f, {
|
|
235
245
|
title: "Controls",
|
|
236
|
-
visible:
|
|
237
|
-
onClose:
|
|
246
|
+
visible: p.value,
|
|
247
|
+
onClose: m
|
|
238
248
|
}, {
|
|
239
|
-
default:
|
|
240
|
-
|
|
249
|
+
default: h(() => [
|
|
250
|
+
k(t.$slots, "controls", {}, void 0, !0)
|
|
241
251
|
]),
|
|
242
252
|
_: 3
|
|
243
253
|
}, 8, ["visible", "onClose"])
|
|
@@ -248,33 +258,34 @@ const le = { class: "kong-ui-sandbox-theme-picker" }, ie = { class: "theme-picke
|
|
|
248
258
|
])) : u("", !0)
|
|
249
259
|
])
|
|
250
260
|
]),
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
e.applyTheming ? (n(), l("div",
|
|
254
|
-
|
|
261
|
+
o("div", Ie, [
|
|
262
|
+
o("div", $e, [
|
|
263
|
+
e.applyTheming ? (n(), l("div", Ne, [
|
|
264
|
+
s(E)
|
|
255
265
|
])) : u("", !0),
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
266
|
+
s(N),
|
|
267
|
+
t.$slots["navigation-after"] ? (n(), l("div", Oe, [
|
|
268
|
+
k(t.$slots, "navigation-after", {}, void 0, !0)
|
|
259
269
|
])) : u("", !0)
|
|
260
270
|
]),
|
|
261
|
-
|
|
262
|
-
e.title ? (n(), l("h1",
|
|
263
|
-
|
|
271
|
+
o("div", xe, [
|
|
272
|
+
e.title ? (n(), l("h1", Ee, b(e.title), 1)) : u("", !0),
|
|
273
|
+
k(t.$slots, "default", {}, void 0, !0)
|
|
264
274
|
]),
|
|
265
|
-
|
|
266
|
-
|
|
275
|
+
t.$slots.controls ? (n(), l("div", Ke, [
|
|
276
|
+
k(t.$slots, "controls", {}, void 0, !0)
|
|
267
277
|
])) : u("", !0)
|
|
268
278
|
])
|
|
269
279
|
]);
|
|
270
280
|
};
|
|
271
281
|
}
|
|
272
|
-
}),
|
|
282
|
+
}), Ue = /* @__PURE__ */ S(Me, [["__scopeId", "data-v-e36d58ea"]]);
|
|
273
283
|
export {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
284
|
+
J as KONG_UI_SANDBOX_DEFAULT_THEME,
|
|
285
|
+
L as KONG_UI_SANDBOX_LAYOUT_LINKS_INJECTION_KEY,
|
|
286
|
+
Q as KONG_UI_SANDBOX_THEME_FAMILY_OPTIONS,
|
|
287
|
+
ee as KONG_UI_SANDBOX_THEME_MODE_OPTIONS,
|
|
288
|
+
U as KONG_UI_SANDBOX_THEME_STORAGE_KEY,
|
|
289
|
+
Ue as SandboxLayout,
|
|
290
|
+
E as SandboxThemePicker
|
|
280
291
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(n,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong/icons")):typeof define=="function"&&define.amd?define(["exports","vue","@kong/icons"],e):(n=typeof globalThis<"u"?globalThis:n||self,e(n["kong-ui-public-sandbox-layout"]={},n.Vue,n.KongIcons))})(this,(function(n,e,_){"use strict";const k="kong-ui-sandbox-layout-links",p="kong-ui-sandbox-theme",E="mono-lime-day",C=[{label:"Mono lime",value:"mono-lime"},{label:"Electric lime",value:"electric-lime"}],S=[{label:"Day",value:"day"},{label:"Night",value:"night"}],I={key:0,class:"kong-ui-sandbox-navigation"},K=e.defineComponent({__name:"SandboxNavigation",emits:["router-link-click"],setup(t,{emit:l}){const c=l,o=e.inject(k,[]);return(m,h)=>{const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("nav",null,[e.unref(o).length?(e.openBlock(),e.createElementBlock("ul",I,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),s=>(e.openBlock(),e.createElementBlock("li",{key:s.name,class:"sandbox-link"},[e.createVNode(a,{to:s.to,onClick:d=>c("router-link-click",s)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.name),1)]),_:2},1032,["to","onClick"])]))),128))])):e.createCommentVNode("",!0)])}}}),N=(t,l)=>{const c=t.__vccOpts||t;for(const[o,m]of l)c[o]=m;return c},V=N(K,[["__scopeId","data-v-f67e3d83"]]),$="16px",b="24px";function x(t){return{family:t.startsWith("electric-lime")?"electric-lime":"mono-lime",mode:t.includes("night")?"night":"day",highContrast:t.endsWith("high-contrast")}}function A(t,l,c){return c?`${t}-${l}-high-contrast`:`${t}-${l}`}const f=x(localStorage.getItem(p)||E),y=e.ref(f.family),T=e.ref(f.mode),B=e.ref(f.highContrast),O=e.computed(()=>A(y.value,T.value,B.value));let u=!1;function D(){u||(u=!0,e.effectScope(!0).run(()=>{e.watch(O,t=>{document.documentElement.setAttribute("data-kui-theme",t),localStorage.setItem(p,t)},{immediate:!0})}))}function M(){return D(),{theme:O,family:y,mode:T,highContrast:B}}const U={class:"kong-ui-sandbox-theme-picker"},L={class:"theme-picker-row"},w={"aria-label":"Theme",class:"theme-picker-group",role:"radiogroup"},G=["aria-label","checked","value","onChange"],z={class:"theme-picker-row"},g=N(e.defineComponent({__name:"SandboxThemePicker",setup(t){const{family:l,mode:c,highContrast:o}=M(),m={day:_.LightModeIcon,night:_.DarkModeIcon};return(h,a)=>{const s=e.resolveComponent("KSegmentedControl"),d=e.resolveComponent("KTooltip"),r=e.resolveComponent("KInputSwitch");return e.openBlock(),e.createElementBlock("div",U,[e.createVNode(s,{modelValue:e.unref(l),"onUpdate:modelValue":a[0]||(a[0]=i=>e.isRef(l)?l.value=i:null),"aria-label":"Theme family",options:e.unref(C)},null,8,["modelValue","options"]),e.createElementVNode("div",L,[a[2]||(a[2]=e.createElementVNode("span",{class:"theme-picker-label"},"Theme",-1)),e.createElementVNode("div",w,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(S),i=>(e.openBlock(),e.createBlock(d,{key:i.value,placement:"top",text:i.label},{default:e.withCtx(()=>[e.createElementVNode("label",{class:e.normalizeClass(["theme-picker-option",{active:i.value===e.unref(c)}])},[e.createElementVNode("input",{"aria-label":i.label,checked:i.value===e.unref(c),class:"theme-picker-input",name:"sandbox-theme-mode",type:"radio",value:i.value,onChange:se=>c.value=i.value},null,40,G),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m[i.value]),{decorative:"",size:`var(--kui-icon-size-30, ${e.unref($)})`},null,8,["size"]))],2)]),_:2},1032,["text"]))),128))])]),e.createElementVNode("div",z,[a[3]||(a[3]=e.createElementVNode("span",{class:"theme-picker-label"},"High contrast",-1)),e.createVNode(r,{modelValue:e.unref(o),"onUpdate:modelValue":a[1]||(a[1]=i=>e.isRef(o)?o.value=i:null),"aria-label":"High contrast"},null,8,["modelValue"])])])}}}),[["__scopeId","data-v-942c4583"]]),H={class:"kong-ui-sandbox-layout"},X={class:"header"},P={class:"header-left"},Y={class:"mobile-nav-container"},F={class:"toggle-mobile-nav"},R={key:0,class:"nav-theme-picker"},W={key:1,class:"navigation-after"},j={key:0,class:"mobile-title"},q={class:"header-right"},J={key:0,class:"mobile-controls-container"},Z={class:"toggle-mobile-controls"},Q={class:"layout"},v={class:"desktop-nav-container"},ee={key:0,class:"nav-theme-picker"},te={key:1,class:"navigation-after"},oe={class:"sandbox-container"},ne={key:0},le={key:0,class:"sandbox-controls"},ae=N(e.defineComponent({__name:"SandboxLayout",props:{title:{type:String,default:""},links:{type:Array,required:!1,default:()=>[]},controlsMinWidth:{type:Number,default:240},applyTheming:{type:Boolean,default:!0}},setup(t){e.useCssVars(o=>({v62569402:c.value}));const l=t;e.provide(k,l.links);const c=e.computed(()=>`${l.controlsMinWidth}px`);return(o,m)=>{const h=e.resolveComponent("KSlideout"),a=e.resolveComponent("KToggle"),s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("header",X,[e.createElementVNode("div",P,[e.createElementVNode("div",Y,[e.createVNode(a,null,{default:e.withCtx(({isToggled:d,toggle:r})=>[e.createElementVNode("div",null,[e.createElementVNode("div",F,[e.createVNode(e.unref(_.MenuIcon),{role:"button",size:`var(--kui-icon-size-50, ${e.unref(b)})`,title:"Toggle menu",onClick:r},null,8,["size","onClick"])]),e.createVNode(h,{title:"Main Menu",visible:d.value,onClose:r},{default:e.withCtx(()=>[t.applyTheming?(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(g)])):e.createCommentVNode("",!0),e.createVNode(V,{onRouterLinkClick:r},null,8,["onRouterLinkClick"]),o.$slots["navigation-after"]?(e.openBlock(),e.createElementBlock("div",W,[e.renderSlot(o.$slots,"navigation-after",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:2},1032,["visible","onClose"])])]),_:3}),t.title?(e.openBlock(),e.createElementBlock("h1",j,[e.createVNode(s,{class:"home-link",to:{name:"home"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",q,[o.$slots.controls?(e.openBlock(),e.createElementBlock("div",J,[e.createVNode(a,null,{default:e.withCtx(({isToggled:d,toggle:r})=>[e.createElementVNode("div",null,[e.createElementVNode("div",Z,[e.createVNode(e.unref(_.CogIcon),{role:"button",size:`var(--kui-icon-size-50, ${e.unref(b)})`,title:"Toggle controls",onClick:r},null,8,["size","onClick"])]),e.createVNode(h,{title:"Controls",visible:d.value,onClose:r},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"controls",{},void 0,!0)]),_:3},8,["visible","onClose"])])]),_:3})])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Q,[e.createElementVNode("div",v,[t.applyTheming?(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(g)])):e.createCommentVNode("",!0),e.createVNode(V),o.$slots["navigation-after"]?(e.openBlock(),e.createElementBlock("div",te,[e.renderSlot(o.$slots,"navigation-after",{},void 0,!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",oe,[t.title?(e.openBlock(),e.createElementBlock("h1",ne,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)]),o.$slots.controls?(e.openBlock(),e.createElementBlock("div",le,[e.renderSlot(o.$slots,"controls",{},void 0,!0)])):e.createCommentVNode("",!0)])])}}}),[["__scopeId","data-v-e36d58ea"]]);n.KONG_UI_SANDBOX_DEFAULT_THEME=E,n.KONG_UI_SANDBOX_LAYOUT_LINKS_INJECTION_KEY=k,n.KONG_UI_SANDBOX_THEME_FAMILY_OPTIONS=C,n.KONG_UI_SANDBOX_THEME_MODE_OPTIONS=S,n.KONG_UI_SANDBOX_THEME_STORAGE_KEY=p,n.SandboxLayout=ae,n.SandboxThemePicker=g,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}));
|