@juxtui/ui 0.5.0 → 0.6.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/README.md +1 -0
- package/dist/JTooltip-CAL9lsPF.js +1115 -0
- package/dist/JTooltip-CAL9lsPF.js.map +1 -0
- package/dist/composables/useLayer.d.ts +1 -1
- package/dist/editor/JEditor.vue.d.ts +69 -0
- package/dist/editor/JEditorButton.vue.d.ts +25 -0
- package/dist/editor/commands.d.ts +18 -0
- package/dist/editor/icons.d.ts +26 -0
- package/dist/editor/index.d.ts +4 -0
- package/dist/editor/slash.d.ts +19 -0
- package/dist/editor.js +1115 -0
- package/dist/editor.js.map +1 -0
- package/dist/index.js +129 -1238
- package/dist/index.js.map +1 -1
- package/dist/nuxt.js +5 -0
- package/dist/nuxt.js.map +1 -1
- package/dist/style.css +796 -228
- package/package.json +15 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { A as IconCircleX, B as unrefElement, C as IconArrowUpRight, D as IconChevronRight, E as IconChevronLeft, F as Spinner, I as focusElement, L as getFocusableElements, M as IconMoreHorizontal, N as IconSearch, O as IconChevronUpDown, P as IconX, R as isClient, S as IconArrowDownRight, T as IconChevronDown, _ as useLayer, a as JDropdownMenuItem_default, b as useHotkey, c as useTypeahead, d as MENU_ROOT, f as getMenuItems, g as splitByRanges, h as matchText, i as JFieldShell_default, j as IconInfo, k as IconCircleCheck, l as useFloating, m as JPortal_default, n as JKbd_default, o as JDropdownMenu_default, p as JSlot, r as useField, s as JMenuContent_default, t as JTooltip_default, u as MENU_LEVEL, v as formatHotkey, w as IconCheck, x as IconAlert, y as matchesHotkey, z as prefersReducedMotion } from "./JTooltip-CAL9lsPF.js";
|
|
2
|
+
import { Fragment, Transition, TransitionGroup, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, reactive, readonly, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useId, useModel, useSlots, vModelDynamic, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -12,58 +12,6 @@ var __exportAll = (all, no_symbols) => {
|
|
|
12
12
|
return target;
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
15
|
-
//#region src/utils/dom.ts
|
|
16
|
-
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
17
|
-
/** Resolve a template ref that may point at an element or a component instance. */
|
|
18
|
-
function unrefElement(target) {
|
|
19
|
-
const value = unref(target);
|
|
20
|
-
if (!value) return null;
|
|
21
|
-
if (value instanceof Element) return value;
|
|
22
|
-
const el = value.$el;
|
|
23
|
-
if (el && el.nodeType !== Node.ELEMENT_NODE) {
|
|
24
|
-
const next = el.nextSibling;
|
|
25
|
-
return next instanceof HTMLElement ? next : null;
|
|
26
|
-
}
|
|
27
|
-
return el ?? null;
|
|
28
|
-
}
|
|
29
|
-
var FOCUSABLE = [
|
|
30
|
-
"a[href]",
|
|
31
|
-
"area[href]",
|
|
32
|
-
"button:not([disabled])",
|
|
33
|
-
"input:not([disabled]):not([type=\"hidden\"])",
|
|
34
|
-
"select:not([disabled])",
|
|
35
|
-
"textarea:not([disabled])",
|
|
36
|
-
"iframe",
|
|
37
|
-
"audio[controls]",
|
|
38
|
-
"video[controls]",
|
|
39
|
-
"[contenteditable]:not([contenteditable=\"false\"])",
|
|
40
|
-
"[tabindex]"
|
|
41
|
-
].join(",");
|
|
42
|
-
function isVisible(el) {
|
|
43
|
-
if (el.hidden) return false;
|
|
44
|
-
if (typeof el.checkVisibility === "function") return el.checkVisibility({ visibilityProperty: true });
|
|
45
|
-
for (let node = el; node; node = node.parentElement) {
|
|
46
|
-
const style = getComputedStyle(node);
|
|
47
|
-
if (style.display === "none" || style.visibility === "hidden") return false;
|
|
48
|
-
}
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
/** Elements that can receive keyboard focus, in DOM order. */
|
|
52
|
-
function getFocusableElements(container) {
|
|
53
|
-
return Array.from(container.querySelectorAll(FOCUSABLE)).filter((el) => el.tabIndex >= 0 && !el.closest("[inert]") && isVisible(el));
|
|
54
|
-
}
|
|
55
|
-
function focusElement(el, options) {
|
|
56
|
-
if (!el) return;
|
|
57
|
-
el.focus({
|
|
58
|
-
preventScroll: true,
|
|
59
|
-
...options
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
var isMac = () => isClient && /mac|iphone|ipad|ipod/i.test(navigator.platform || navigator.userAgent);
|
|
63
|
-
function prefersReducedMotion() {
|
|
64
|
-
return isClient && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
65
|
-
}
|
|
66
|
-
//#endregion
|
|
67
15
|
//#region src/components/accordion/context.ts
|
|
68
16
|
var ACCORDION = Symbol("JAccordion");
|
|
69
17
|
//#endregion
|
|
@@ -132,124 +80,11 @@ var JAccordion_default = /* @__PURE__ */ defineComponent({
|
|
|
132
80
|
}
|
|
133
81
|
});
|
|
134
82
|
//#endregion
|
|
135
|
-
//#region src/icons.ts
|
|
136
|
-
function icon(name, children, viewBox = "0 0 16 16") {
|
|
137
|
-
const component = (props) => h("svg", {
|
|
138
|
-
"xmlns": "http://www.w3.org/2000/svg",
|
|
139
|
-
viewBox,
|
|
140
|
-
"width": 16,
|
|
141
|
-
"height": 16,
|
|
142
|
-
"fill": "none",
|
|
143
|
-
"stroke": "currentColor",
|
|
144
|
-
"stroke-width": 1.5,
|
|
145
|
-
"stroke-linecap": "round",
|
|
146
|
-
"stroke-linejoin": "round",
|
|
147
|
-
"aria-hidden": "true",
|
|
148
|
-
"focusable": "false",
|
|
149
|
-
...props
|
|
150
|
-
}, children());
|
|
151
|
-
component.displayName = name;
|
|
152
|
-
return component;
|
|
153
|
-
}
|
|
154
|
-
var IconCheck = icon("IconCheck", () => [h("path", { d: "M3.5 8.5l3 3 6-7" })]);
|
|
155
|
-
var IconChevronDown = icon("IconChevronDown", () => [h("path", { d: "M4.5 6.25L8 9.75l3.5-3.5" })]);
|
|
156
|
-
var IconChevronUpDown = icon("IconChevronUpDown", () => [h("path", { d: "M5.25 6L8 3.25 10.75 6M5.25 10L8 12.75 10.75 10" })]);
|
|
157
|
-
var IconChevronRight = icon("IconChevronRight", () => [h("path", { d: "M6.25 4.5L9.75 8l-3.5 3.5" })]);
|
|
158
|
-
var IconX = icon("IconX", () => [h("path", { d: "M4.5 4.5l7 7M11.5 4.5l-7 7" })]);
|
|
159
|
-
var IconSearch = icon("IconSearch", () => [h("circle", {
|
|
160
|
-
cx: 7,
|
|
161
|
-
cy: 7,
|
|
162
|
-
r: 4.25
|
|
163
|
-
}), h("path", { d: "M10.25 10.25L13 13" })]);
|
|
164
|
-
var IconCircleCheck = icon("IconCircleCheck", () => [h("circle", {
|
|
165
|
-
cx: 8,
|
|
166
|
-
cy: 8,
|
|
167
|
-
r: 6.25
|
|
168
|
-
}), h("path", { d: "M5.5 8.25l1.75 1.75L10.5 6.5" })]);
|
|
169
|
-
var IconCircleX = icon("IconCircleX", () => [h("circle", {
|
|
170
|
-
cx: 8,
|
|
171
|
-
cy: 8,
|
|
172
|
-
r: 6.25
|
|
173
|
-
}), h("path", { d: "M6.25 6.25l3.5 3.5M9.75 6.25l-3.5 3.5" })]);
|
|
174
|
-
var IconAlert = icon("IconAlert", () => [
|
|
175
|
-
h("path", { d: "M7.13 2.75a1 1 0 0 1 1.74 0l5.15 9a1 1 0 0 1-.87 1.5H2.85a1 1 0 0 1-.87-1.5z" }),
|
|
176
|
-
h("path", { d: "M8 6.5v2.5" }),
|
|
177
|
-
h("path", {
|
|
178
|
-
"d": "M8 11.1v.01",
|
|
179
|
-
"stroke-width": 1.75
|
|
180
|
-
})
|
|
181
|
-
]);
|
|
182
|
-
var IconInfo = icon("IconInfo", () => [
|
|
183
|
-
h("circle", {
|
|
184
|
-
cx: 8,
|
|
185
|
-
cy: 8,
|
|
186
|
-
r: 6.25
|
|
187
|
-
}),
|
|
188
|
-
h("path", { d: "M8 7.5v3.25" }),
|
|
189
|
-
h("path", {
|
|
190
|
-
"d": "M8 5.25v.01",
|
|
191
|
-
"stroke-width": 1.75
|
|
192
|
-
})
|
|
193
|
-
]);
|
|
194
|
-
icon("IconCornerDownLeft", () => [h("path", { d: "M12.5 3.5v4.25a2 2 0 0 1-2 2h-7" }), h("path", { d: "M6 7l-2.5 2.75L6 12.5" })]);
|
|
195
|
-
var IconChevronLeft = icon("IconChevronLeft", () => [h("path", { d: "M9.75 4.5L6.25 8l3.5 3.5" })]);
|
|
196
|
-
var IconMoreHorizontal = icon("IconMoreHorizontal", () => [
|
|
197
|
-
h("circle", {
|
|
198
|
-
cx: 3.5,
|
|
199
|
-
cy: 8,
|
|
200
|
-
r: 1,
|
|
201
|
-
"fill": "currentColor",
|
|
202
|
-
"stroke": "none"
|
|
203
|
-
}),
|
|
204
|
-
h("circle", {
|
|
205
|
-
cx: 8,
|
|
206
|
-
cy: 8,
|
|
207
|
-
r: 1,
|
|
208
|
-
"fill": "currentColor",
|
|
209
|
-
"stroke": "none"
|
|
210
|
-
}),
|
|
211
|
-
h("circle", {
|
|
212
|
-
cx: 12.5,
|
|
213
|
-
cy: 8,
|
|
214
|
-
r: 1,
|
|
215
|
-
"fill": "currentColor",
|
|
216
|
-
"stroke": "none"
|
|
217
|
-
})
|
|
218
|
-
]);
|
|
219
|
-
var IconArrowUpRight = icon("IconArrowUpRight", () => [h("path", { d: "M5 11L11 5M5.5 5h5.5v5.5" })]);
|
|
220
|
-
var IconArrowDownRight = icon("IconArrowDownRight", () => [h("path", { d: "M5 5l6 6M10.5 11H5V5.5" })]);
|
|
221
|
-
/** The loading spinner used across Juxt. A quarter arc over a faint track. */
|
|
222
|
-
var Spinner = (props) => {
|
|
223
|
-
const size = props.size ?? 16;
|
|
224
|
-
return h("svg", {
|
|
225
|
-
"class": "j-spinner",
|
|
226
|
-
"viewBox": "0 0 16 16",
|
|
227
|
-
"width": size,
|
|
228
|
-
"height": size,
|
|
229
|
-
"aria-hidden": "true",
|
|
230
|
-
"focusable": "false"
|
|
231
|
-
}, [h("circle", {
|
|
232
|
-
"class": "j-spinner__track",
|
|
233
|
-
"cx": 8,
|
|
234
|
-
"cy": 8,
|
|
235
|
-
"r": 6,
|
|
236
|
-
"stroke-width": 1.75
|
|
237
|
-
}), h("circle", {
|
|
238
|
-
"cx": 8,
|
|
239
|
-
"cy": 8,
|
|
240
|
-
"r": 6,
|
|
241
|
-
"stroke-width": 1.75,
|
|
242
|
-
"stroke-dasharray": "9.5 28",
|
|
243
|
-
"stroke-dashoffset": 0
|
|
244
|
-
})]);
|
|
245
|
-
};
|
|
246
|
-
Spinner.displayName = "JSpinner";
|
|
247
|
-
//#endregion
|
|
248
83
|
//#region src/components/accordion/JAccordionItem.vue?vue&type=script&setup=true&lang.ts
|
|
249
|
-
var _hoisted_1$
|
|
250
|
-
var _hoisted_2$
|
|
251
|
-
var _hoisted_3$
|
|
252
|
-
var _hoisted_4$
|
|
84
|
+
var _hoisted_1$48 = ["data-state"];
|
|
85
|
+
var _hoisted_2$36 = ["aria-expanded", "disabled"];
|
|
86
|
+
var _hoisted_3$30 = { class: "j-accordion__title" };
|
|
87
|
+
var _hoisted_4$24 = ["inert"];
|
|
253
88
|
var _hoisted_5$19 = { class: "j-accordion__panel-inner" };
|
|
254
89
|
var _hoisted_6$11 = { class: "j-accordion__content" };
|
|
255
90
|
//#endregion
|
|
@@ -282,7 +117,7 @@ var JAccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
282
117
|
"aria-controls": panelId,
|
|
283
118
|
disabled: __props.disabled,
|
|
284
119
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(accordion).toggle(__props.value))
|
|
285
|
-
}, [createElementVNode("span", _hoisted_3$
|
|
120
|
+
}, [createElementVNode("span", _hoisted_3$30, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])]), createVNode(unref(IconChevronDown), { class: "j-accordion__chevron" })], 8, _hoisted_2$36)]),
|
|
286
121
|
_: 3
|
|
287
122
|
})), createElementVNode("div", {
|
|
288
123
|
id: panelId,
|
|
@@ -290,23 +125,23 @@ var JAccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
290
125
|
class: "j-accordion__panel",
|
|
291
126
|
"aria-labelledby": triggerId,
|
|
292
127
|
inert: !open.value
|
|
293
|
-
}, [createElementVNode("div", _hoisted_5$19, [createElementVNode("div", _hoisted_6$11, [renderSlot(_ctx.$slots, "default")])])], 8, _hoisted_4$
|
|
128
|
+
}, [createElementVNode("div", _hoisted_5$19, [createElementVNode("div", _hoisted_6$11, [renderSlot(_ctx.$slots, "default")])])], 8, _hoisted_4$24)], 10, _hoisted_1$48);
|
|
294
129
|
};
|
|
295
130
|
}
|
|
296
131
|
});
|
|
297
132
|
//#endregion
|
|
298
133
|
//#region src/components/alert/JAlert.vue?vue&type=script&setup=true&lang.ts
|
|
299
|
-
var _hoisted_1$
|
|
134
|
+
var _hoisted_1$47 = {
|
|
300
135
|
key: 0,
|
|
301
136
|
class: "j-alert__icon",
|
|
302
137
|
"aria-hidden": "true"
|
|
303
138
|
};
|
|
304
|
-
var _hoisted_2$
|
|
305
|
-
var _hoisted_3$
|
|
139
|
+
var _hoisted_2$35 = { class: "j-alert__body" };
|
|
140
|
+
var _hoisted_3$29 = {
|
|
306
141
|
key: 0,
|
|
307
142
|
class: "j-alert__title"
|
|
308
143
|
};
|
|
309
|
-
var _hoisted_4$
|
|
144
|
+
var _hoisted_4$23 = {
|
|
310
145
|
key: 1,
|
|
311
146
|
class: "j-alert__description"
|
|
312
147
|
};
|
|
@@ -337,10 +172,10 @@ var JAlert_default = /* @__PURE__ */ defineComponent({
|
|
|
337
172
|
};
|
|
338
173
|
return (_ctx, _cache) => {
|
|
339
174
|
return openBlock(), createElementBlock("div", { class: normalizeClass(["j-alert", `j-alert--${__props.variant}`]) }, [
|
|
340
|
-
!__props.hideIcon ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
341
|
-
createElementVNode("div", _hoisted_2$
|
|
342
|
-
__props.title ? (openBlock(), createElementBlock("p", _hoisted_3$
|
|
343
|
-
__props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
175
|
+
!__props.hideIcon ? (openBlock(), createElementBlock("span", _hoisted_1$47, [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(icons[__props.variant])))])])) : createCommentVNode("", true),
|
|
176
|
+
createElementVNode("div", _hoisted_2$35, [
|
|
177
|
+
__props.title ? (openBlock(), createElementBlock("p", _hoisted_3$29, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
178
|
+
__props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$23, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("", true),
|
|
344
179
|
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$18, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true)
|
|
345
180
|
]),
|
|
346
181
|
__props.dismissible ? (openBlock(), createElementBlock("button", {
|
|
@@ -356,7 +191,7 @@ var JAlert_default = /* @__PURE__ */ defineComponent({
|
|
|
356
191
|
});
|
|
357
192
|
//#endregion
|
|
358
193
|
//#region src/components/aspect-ratio/JAspectRatio.vue?vue&type=script&setup=true&lang.ts
|
|
359
|
-
var _hoisted_1$
|
|
194
|
+
var _hoisted_1$46 = { class: "j-aspect-ratio__content" };
|
|
360
195
|
//#endregion
|
|
361
196
|
//#region src/components/aspect-ratio/JAspectRatio.vue
|
|
362
197
|
var JAspectRatio_default = /* @__PURE__ */ defineComponent({
|
|
@@ -369,20 +204,20 @@ var JAspectRatio_default = /* @__PURE__ */ defineComponent({
|
|
|
369
204
|
return openBlock(), createElementBlock("div", {
|
|
370
205
|
class: "j-aspect-ratio",
|
|
371
206
|
style: normalizeStyle(style.value)
|
|
372
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
207
|
+
}, [createElementVNode("div", _hoisted_1$46, [renderSlot(_ctx.$slots, "default")])], 4);
|
|
373
208
|
};
|
|
374
209
|
}
|
|
375
210
|
});
|
|
376
211
|
//#endregion
|
|
377
212
|
//#region src/components/avatar/JAvatar.vue?vue&type=script&setup=true&lang.ts
|
|
378
|
-
var _hoisted_1$
|
|
213
|
+
var _hoisted_1$45 = [
|
|
379
214
|
"role",
|
|
380
215
|
"aria-label",
|
|
381
216
|
"data-state"
|
|
382
217
|
];
|
|
383
|
-
var _hoisted_2$
|
|
384
|
-
var _hoisted_3$
|
|
385
|
-
var _hoisted_4$
|
|
218
|
+
var _hoisted_2$34 = { class: "j-avatar__frame" };
|
|
219
|
+
var _hoisted_3$28 = ["src"];
|
|
220
|
+
var _hoisted_4$22 = {
|
|
386
221
|
key: 1,
|
|
387
222
|
class: "j-avatar__fallback",
|
|
388
223
|
"aria-hidden": "true"
|
|
@@ -439,7 +274,7 @@ var JAvatar_default = /* @__PURE__ */ defineComponent({
|
|
|
439
274
|
role: label.value ? "img" : void 0,
|
|
440
275
|
"aria-label": label.value,
|
|
441
276
|
"data-state": state.value
|
|
442
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
277
|
+
}, [createElementVNode("span", _hoisted_2$34, [__props.src && state.value !== "error" ? (openBlock(), createElementBlock("img", {
|
|
443
278
|
key: 0,
|
|
444
279
|
ref_key: "img",
|
|
445
280
|
ref: img,
|
|
@@ -448,7 +283,7 @@ var JAvatar_default = /* @__PURE__ */ defineComponent({
|
|
|
448
283
|
alt: "",
|
|
449
284
|
onLoad: _cache[0] || (_cache[0] = ($event) => state.value = "loaded"),
|
|
450
285
|
onError: _cache[1] || (_cache[1] = ($event) => state.value = "error")
|
|
451
|
-
}, null, 40, _hoisted_3$
|
|
286
|
+
}, null, 40, _hoisted_3$28)) : createCommentVNode("", true), state.value !== "loaded" ? (openBlock(), createElementBlock("span", _hoisted_4$22, [renderSlot(_ctx.$slots, "fallback", {}, () => [initials.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(initials.value), 1)], 64)) : (openBlock(), createElementBlock("svg", _hoisted_5$17, [..._cache[2] || (_cache[2] = [createElementVNode("circle", {
|
|
452
287
|
cx: "8",
|
|
453
288
|
cy: "6",
|
|
454
289
|
r: "2.75"
|
|
@@ -456,14 +291,14 @@ var JAvatar_default = /* @__PURE__ */ defineComponent({
|
|
|
456
291
|
key: 0,
|
|
457
292
|
class: normalizeClass(["j-avatar__status", `j-avatar__status--${__props.status}`]),
|
|
458
293
|
"aria-hidden": "true"
|
|
459
|
-
}, null, 2)) : createCommentVNode("", true)], 10, _hoisted_1$
|
|
294
|
+
}, null, 2)) : createCommentVNode("", true)], 10, _hoisted_1$45);
|
|
460
295
|
};
|
|
461
296
|
}
|
|
462
297
|
});
|
|
463
298
|
//#endregion
|
|
464
299
|
//#region src/components/avatar-group/JAvatarGroup.vue?vue&type=script&setup=true&lang.ts
|
|
465
|
-
var _hoisted_1$
|
|
466
|
-
var _hoisted_2$
|
|
300
|
+
var _hoisted_1$44 = ["aria-label"];
|
|
301
|
+
var _hoisted_2$33 = ["aria-label"];
|
|
467
302
|
//#endregion
|
|
468
303
|
//#region src/components/avatar-group/JAvatarGroup.vue
|
|
469
304
|
var JAvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
@@ -505,18 +340,18 @@ var JAvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
505
340
|
class: normalizeClass(["j-avatar-group__item j-avatar-group__overflow j-focusable", { "j-avatar-group__overflow--square": __props.shape === "square" }]),
|
|
506
341
|
tabindex: "0",
|
|
507
342
|
"aria-label": `${overflow.value} more`
|
|
508
|
-
}, " +" + toDisplayString(overflow.value), 11, _hoisted_2$
|
|
343
|
+
}, " +" + toDisplayString(overflow.value), 11, _hoisted_2$33)) : createCommentVNode("", true)], 10, _hoisted_1$44);
|
|
509
344
|
};
|
|
510
345
|
}
|
|
511
346
|
});
|
|
512
347
|
//#endregion
|
|
513
348
|
//#region src/components/badge/JBadge.vue?vue&type=script&setup=true&lang.ts
|
|
514
|
-
var _hoisted_1$
|
|
349
|
+
var _hoisted_1$43 = {
|
|
515
350
|
key: 0,
|
|
516
351
|
class: "j-badge__marker",
|
|
517
352
|
"aria-hidden": "true"
|
|
518
353
|
};
|
|
519
|
-
var _hoisted_2$
|
|
354
|
+
var _hoisted_2$32 = {
|
|
520
355
|
key: 1,
|
|
521
356
|
class: "j-badge__icon"
|
|
522
357
|
};
|
|
@@ -535,20 +370,20 @@ var JBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
535
370
|
`j-badge--${__props.variant}`,
|
|
536
371
|
`j-badge--${__props.size}`,
|
|
537
372
|
{ "j-badge--status": __props.dot }
|
|
538
|
-
]]) }, [__props.dot ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
373
|
+
]]) }, [__props.dot ? (openBlock(), createElementBlock("span", _hoisted_1$43)) : _ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$32, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 2);
|
|
539
374
|
};
|
|
540
375
|
}
|
|
541
376
|
});
|
|
542
377
|
//#endregion
|
|
543
378
|
//#region src/components/banner/JBanner.vue?vue&type=script&setup=true&lang.ts
|
|
544
|
-
var _hoisted_1$
|
|
545
|
-
var _hoisted_2$
|
|
379
|
+
var _hoisted_1$42 = ["aria-label"];
|
|
380
|
+
var _hoisted_2$31 = {
|
|
546
381
|
key: 0,
|
|
547
382
|
class: "j-banner__icon",
|
|
548
383
|
"aria-hidden": "true"
|
|
549
384
|
};
|
|
550
|
-
var _hoisted_3$
|
|
551
|
-
var _hoisted_4$
|
|
385
|
+
var _hoisted_3$27 = { class: "j-banner__body" };
|
|
386
|
+
var _hoisted_4$21 = {
|
|
552
387
|
key: 0,
|
|
553
388
|
class: "j-banner__title"
|
|
554
389
|
};
|
|
@@ -587,8 +422,8 @@ var JBanner_default = /* @__PURE__ */ defineComponent({
|
|
|
587
422
|
role: "region",
|
|
588
423
|
"aria-label": __props.title
|
|
589
424
|
}, [
|
|
590
|
-
!__props.hideIcon ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
591
|
-
createElementVNode("div", _hoisted_3$
|
|
425
|
+
!__props.hideIcon ? (openBlock(), createElementBlock("span", _hoisted_2$31, [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(icons[__props.variant])))])])) : createCommentVNode("", true),
|
|
426
|
+
createElementVNode("div", _hoisted_3$27, [__props.title ? (openBlock(), createElementBlock("p", _hoisted_4$21, toDisplayString(__props.title), 1)) : createCommentVNode("", true), __props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_5$16, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("", true)]),
|
|
592
427
|
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_6$10, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true),
|
|
593
428
|
__props.dismissible ? (openBlock(), createElementBlock("button", {
|
|
594
429
|
key: 2,
|
|
@@ -597,20 +432,20 @@ var JBanner_default = /* @__PURE__ */ defineComponent({
|
|
|
597
432
|
"aria-label": "Dismiss",
|
|
598
433
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("dismiss"))
|
|
599
434
|
}, [createVNode(unref(IconX))])) : createCommentVNode("", true)
|
|
600
|
-
], 10, _hoisted_1$
|
|
435
|
+
], 10, _hoisted_1$42);
|
|
601
436
|
};
|
|
602
437
|
}
|
|
603
438
|
});
|
|
604
439
|
//#endregion
|
|
605
440
|
//#region src/components/breadcrumb/JBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
606
|
-
var _hoisted_1$
|
|
607
|
-
var _hoisted_2$
|
|
608
|
-
var _hoisted_3$
|
|
441
|
+
var _hoisted_1$41 = ["aria-label"];
|
|
442
|
+
var _hoisted_2$30 = { class: "j-breadcrumb__list" };
|
|
443
|
+
var _hoisted_3$26 = {
|
|
609
444
|
key: 0,
|
|
610
445
|
class: "j-breadcrumb__ellipsis",
|
|
611
446
|
"aria-hidden": "true"
|
|
612
447
|
};
|
|
613
|
-
var _hoisted_4$
|
|
448
|
+
var _hoisted_4$20 = ["href"];
|
|
614
449
|
var _hoisted_5$15 = ["aria-current"];
|
|
615
450
|
//#endregion
|
|
616
451
|
//#region src/components/breadcrumb/JBreadcrumb.vue
|
|
@@ -645,26 +480,26 @@ var JBreadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
|
645
480
|
return openBlock(), createElementBlock("nav", {
|
|
646
481
|
class: "j-breadcrumb",
|
|
647
482
|
"aria-label": __props.label || "Breadcrumb"
|
|
648
|
-
}, [createElementVNode("ol", _hoisted_2$
|
|
483
|
+
}, [createElementVNode("ol", _hoisted_2$30, [__props.items && __props.items.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(visibleItems.value, (item, index) => {
|
|
649
484
|
return openBlock(), createElementBlock("li", {
|
|
650
485
|
key: `${item.label}-${index}`,
|
|
651
486
|
class: "j-breadcrumb__item"
|
|
652
|
-
}, [item.ellipsis ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
487
|
+
}, [item.ellipsis ? (openBlock(), createElementBlock("span", _hoisted_3$26, toDisplayString(item.label), 1)) : item.href && index !== visibleItems.value.length - 1 ? (openBlock(), createElementBlock("a", {
|
|
653
488
|
key: 1,
|
|
654
489
|
class: "j-breadcrumb__link j-focusable",
|
|
655
490
|
href: item.href
|
|
656
|
-
}, toDisplayString(item.label), 9, _hoisted_4$
|
|
491
|
+
}, toDisplayString(item.label), 9, _hoisted_4$20)) : (openBlock(), createElementBlock("span", {
|
|
657
492
|
key: 2,
|
|
658
493
|
class: "j-breadcrumb__current",
|
|
659
494
|
"aria-current": index === visibleItems.value.length - 1 ? "page" : void 0
|
|
660
495
|
}, toDisplayString(item.label), 9, _hoisted_5$15))]);
|
|
661
|
-
}), 128)) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)])], 8, _hoisted_1$
|
|
496
|
+
}), 128)) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)])], 8, _hoisted_1$41);
|
|
662
497
|
};
|
|
663
498
|
}
|
|
664
499
|
});
|
|
665
500
|
//#endregion
|
|
666
501
|
//#region src/components/burger/JBurger.vue?vue&type=script&setup=true&lang.ts
|
|
667
|
-
var _hoisted_1$
|
|
502
|
+
var _hoisted_1$40 = [
|
|
668
503
|
"data-state",
|
|
669
504
|
"aria-expanded",
|
|
670
505
|
"aria-controls",
|
|
@@ -705,22 +540,22 @@ var JBurger_default = /* @__PURE__ */ defineComponent({
|
|
|
705
540
|
createElementVNode("span", { class: "j-burger__line" }),
|
|
706
541
|
createElementVNode("span", { class: "j-burger__line" }),
|
|
707
542
|
createElementVNode("span", { class: "j-burger__line" })
|
|
708
|
-
], -1)])], 10, _hoisted_1$
|
|
543
|
+
], -1)])], 10, _hoisted_1$40);
|
|
709
544
|
};
|
|
710
545
|
}
|
|
711
546
|
});
|
|
712
547
|
//#endregion
|
|
713
548
|
//#region src/components/button/JButton.vue?vue&type=script&setup=true&lang.ts
|
|
714
|
-
var _hoisted_1$
|
|
715
|
-
var _hoisted_2$
|
|
549
|
+
var _hoisted_1$39 = { class: "j-button__content" };
|
|
550
|
+
var _hoisted_2$29 = {
|
|
716
551
|
key: 0,
|
|
717
552
|
class: "j-button__icon"
|
|
718
553
|
};
|
|
719
|
-
var _hoisted_3$
|
|
554
|
+
var _hoisted_3$25 = {
|
|
720
555
|
key: 1,
|
|
721
556
|
class: "j-button__icon"
|
|
722
557
|
};
|
|
723
|
-
var _hoisted_4$
|
|
558
|
+
var _hoisted_4$19 = {
|
|
724
559
|
key: 0,
|
|
725
560
|
class: "j-button__spinner"
|
|
726
561
|
};
|
|
@@ -774,12 +609,12 @@ var JButton_default = /* @__PURE__ */ defineComponent({
|
|
|
774
609
|
"data-disabled": __props.disabled || void 0,
|
|
775
610
|
onClickCapture: onClick
|
|
776
611
|
}), {
|
|
777
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
778
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
612
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$39, [
|
|
613
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$29, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true),
|
|
779
614
|
renderSlot(_ctx.$slots, "default"),
|
|
780
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
615
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_3$25, [renderSlot(_ctx.$slots, "trailing")])) : createCommentVNode("", true)
|
|
781
616
|
]), createVNode(Transition, { name: "j-button-spinner" }, {
|
|
782
|
-
default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
617
|
+
default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock("span", _hoisted_4$19, [createVNode(unref(Spinner), { size: __props.size === "xs" ? 12 : __props.size === "lg" ? 16 : 14 }, null, 8, ["size"])])) : createCommentVNode("", true)]),
|
|
783
618
|
_: 1
|
|
784
619
|
})]),
|
|
785
620
|
_: 3
|
|
@@ -793,16 +628,16 @@ var JButton_default = /* @__PURE__ */ defineComponent({
|
|
|
793
628
|
});
|
|
794
629
|
//#endregion
|
|
795
630
|
//#region src/components/card/JCard.vue?vue&type=script&setup=true&lang.ts
|
|
796
|
-
var _hoisted_1$
|
|
631
|
+
var _hoisted_1$38 = {
|
|
797
632
|
key: 0,
|
|
798
633
|
class: "j-card__header"
|
|
799
634
|
};
|
|
800
|
-
var _hoisted_2$
|
|
801
|
-
var _hoisted_3$
|
|
635
|
+
var _hoisted_2$28 = { class: "j-card__heading" };
|
|
636
|
+
var _hoisted_3$24 = {
|
|
802
637
|
key: 0,
|
|
803
638
|
class: "j-card__title"
|
|
804
639
|
};
|
|
805
|
-
var _hoisted_4$
|
|
640
|
+
var _hoisted_4$18 = {
|
|
806
641
|
key: 1,
|
|
807
642
|
class: "j-card__description"
|
|
808
643
|
};
|
|
@@ -833,7 +668,7 @@ var JCard_default = /* @__PURE__ */ defineComponent({
|
|
|
833
668
|
return (_ctx, _cache) => {
|
|
834
669
|
return openBlock(), createBlock(resolveDynamicComponent(__props.as), { class: normalizeClass(["j-card", [`j-card--${__props.variant}`, `j-card--p-${__props.padding}`]]) }, {
|
|
835
670
|
default: withCtx(() => [
|
|
836
|
-
__props.title || __props.description || _ctx.$slots.header || _ctx.$slots.actions ? (openBlock(), createElementBlock("header", _hoisted_1$
|
|
671
|
+
__props.title || __props.description || _ctx.$slots.header || _ctx.$slots.actions ? (openBlock(), createElementBlock("header", _hoisted_1$38, [renderSlot(_ctx.$slots, "header", {}, () => [createElementVNode("div", _hoisted_2$28, [__props.title ? (openBlock(), createElementBlock("h3", _hoisted_3$24, toDisplayString(__props.title), 1)) : createCommentVNode("", true), __props.description ? (openBlock(), createElementBlock("p", _hoisted_4$18, toDisplayString(__props.description), 1)) : createCommentVNode("", true)])]), _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$14, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
837
672
|
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_6$9, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true),
|
|
838
673
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_7$5, [renderSlot(_ctx.$slots, "footer")])) : createCommentVNode("", true)
|
|
839
674
|
]),
|
|
@@ -844,9 +679,9 @@ var JCard_default = /* @__PURE__ */ defineComponent({
|
|
|
844
679
|
});
|
|
845
680
|
//#endregion
|
|
846
681
|
//#region src/components/checkbox/JCheckbox.vue?vue&type=script&setup=true&lang.ts
|
|
847
|
-
var _hoisted_1$
|
|
848
|
-
var _hoisted_2$
|
|
849
|
-
var _hoisted_3$
|
|
682
|
+
var _hoisted_1$37 = ["data-state"];
|
|
683
|
+
var _hoisted_2$27 = { class: "j-checkbox__control" };
|
|
684
|
+
var _hoisted_3$23 = [
|
|
850
685
|
"id",
|
|
851
686
|
"checked",
|
|
852
687
|
"disabled",
|
|
@@ -855,7 +690,7 @@ var _hoisted_3$25 = [
|
|
|
855
690
|
"value",
|
|
856
691
|
"aria-describedby"
|
|
857
692
|
];
|
|
858
|
-
var _hoisted_4$
|
|
693
|
+
var _hoisted_4$17 = {
|
|
859
694
|
key: 0,
|
|
860
695
|
class: "j-checkbox__text"
|
|
861
696
|
};
|
|
@@ -906,7 +741,7 @@ var JCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
906
741
|
class: normalizeClass(["j-checkbox", [_ctx.$attrs.class, { "is-disabled": __props.disabled }]]),
|
|
907
742
|
style: normalizeStyle(_ctx.$attrs.style),
|
|
908
743
|
"data-state": state.value
|
|
909
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
744
|
+
}, [createElementVNode("span", _hoisted_2$27, [createElementVNode("input", mergeProps({
|
|
910
745
|
id: id.value,
|
|
911
746
|
ref_key: "input",
|
|
912
747
|
ref: input
|
|
@@ -924,7 +759,7 @@ var JCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
924
759
|
value: __props.value,
|
|
925
760
|
"aria-describedby": __props.description || _ctx.$slots.description ? descriptionId.value : void 0,
|
|
926
761
|
onChange
|
|
927
|
-
}), null, 16, _hoisted_3$
|
|
762
|
+
}), null, 16, _hoisted_3$23), _cache[0] || (_cache[0] = createStaticVNode("<span class=\"j-checkbox__box\" aria-hidden=\"true\"><svg class=\"j-checkbox__check\" viewBox=\"0 0 16 16\" fill=\"none\"><path d=\"M4 8.25l2.75 2.75L12 5.5\" pathLength=\"1\"></path></svg><svg class=\"j-checkbox__dash\" viewBox=\"0 0 16 16\" fill=\"none\"><path d=\"M4.5 8h7\"></path></svg></span>", 1))]), __props.label || _ctx.$slots.default || __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("span", _hoisted_4$17, [__props.label || _ctx.$slots.default ? (openBlock(), createElementBlock("label", {
|
|
928
763
|
key: 0,
|
|
929
764
|
for: id.value,
|
|
930
765
|
class: "j-checkbox__label"
|
|
@@ -932,16 +767,16 @@ var JCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
932
767
|
key: 1,
|
|
933
768
|
id: descriptionId.value,
|
|
934
769
|
class: "j-checkbox__description"
|
|
935
|
-
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 8, _hoisted_6$8)) : createCommentVNode("", true)])) : createCommentVNode("", true)], 14, _hoisted_1$
|
|
770
|
+
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 8, _hoisted_6$8)) : createCommentVNode("", true)])) : createCommentVNode("", true)], 14, _hoisted_1$37);
|
|
936
771
|
};
|
|
937
772
|
}
|
|
938
773
|
});
|
|
939
774
|
//#endregion
|
|
940
775
|
//#region src/components/collapsible/JCollapsible.vue?vue&type=script&setup=true&lang.ts
|
|
941
|
-
var _hoisted_1$
|
|
942
|
-
var _hoisted_2$
|
|
943
|
-
var _hoisted_3$
|
|
944
|
-
var _hoisted_4$
|
|
776
|
+
var _hoisted_1$36 = ["data-state"];
|
|
777
|
+
var _hoisted_2$26 = ["aria-expanded", "disabled"];
|
|
778
|
+
var _hoisted_3$22 = { class: "j-collapsible__label" };
|
|
779
|
+
var _hoisted_4$16 = ["inert"];
|
|
945
780
|
var _hoisted_5$12 = { class: "j-collapsible__panel-inner" };
|
|
946
781
|
var _hoisted_6$7 = { class: "j-collapsible__content" };
|
|
947
782
|
//#endregion
|
|
@@ -980,13 +815,13 @@ var JCollapsible_default = /* @__PURE__ */ defineComponent({
|
|
|
980
815
|
"aria-controls": panelId,
|
|
981
816
|
disabled: __props.disabled,
|
|
982
817
|
onClick: toggle
|
|
983
|
-
}, [createVNode(unref(IconChevronDown), { class: "j-collapsible__chevron" }), createElementVNode("span", _hoisted_3$
|
|
818
|
+
}, [createVNode(unref(IconChevronDown), { class: "j-collapsible__chevron" }), createElementVNode("span", _hoisted_3$22, [renderSlot(_ctx.$slots, "trigger", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])])], 8, _hoisted_2$26), createElementVNode("div", {
|
|
984
819
|
id: panelId,
|
|
985
820
|
role: "region",
|
|
986
821
|
class: "j-collapsible__panel",
|
|
987
822
|
"aria-labelledby": triggerId,
|
|
988
823
|
inert: !model.value
|
|
989
|
-
}, [createElementVNode("div", _hoisted_5$12, [createElementVNode("div", _hoisted_6$7, [renderSlot(_ctx.$slots, "default")])])], 8, _hoisted_4$
|
|
824
|
+
}, [createElementVNode("div", _hoisted_5$12, [createElementVNode("div", _hoisted_6$7, [renderSlot(_ctx.$slots, "default")])])], 8, _hoisted_4$16)], 8, _hoisted_1$36);
|
|
990
825
|
};
|
|
991
826
|
}
|
|
992
827
|
});
|
|
@@ -996,8 +831,8 @@ var stack = [];
|
|
|
996
831
|
function isTop(trap) {
|
|
997
832
|
return stack[stack.length - 1] === trap;
|
|
998
833
|
}
|
|
999
|
-
var listening
|
|
1000
|
-
function onKeydown
|
|
834
|
+
var listening = false;
|
|
835
|
+
function onKeydown(event) {
|
|
1001
836
|
if (event.key !== "Tab" || event.defaultPrevented) return;
|
|
1002
837
|
const container = stack[stack.length - 1]?.container.value;
|
|
1003
838
|
if (!container) return;
|
|
@@ -1027,17 +862,17 @@ function onFocusIn(event) {
|
|
|
1027
862
|
const [first] = getFocusableElements(container);
|
|
1028
863
|
focusElement(first ?? container);
|
|
1029
864
|
}
|
|
1030
|
-
function listen
|
|
1031
|
-
if (listening
|
|
1032
|
-
document.addEventListener("keydown", onKeydown
|
|
865
|
+
function listen() {
|
|
866
|
+
if (listening || !isClient) return;
|
|
867
|
+
document.addEventListener("keydown", onKeydown);
|
|
1033
868
|
document.addEventListener("focusin", onFocusIn);
|
|
1034
|
-
listening
|
|
869
|
+
listening = true;
|
|
1035
870
|
}
|
|
1036
|
-
function unlisten
|
|
1037
|
-
if (!listening
|
|
1038
|
-
document.removeEventListener("keydown", onKeydown
|
|
871
|
+
function unlisten() {
|
|
872
|
+
if (!listening || stack.length > 0) return;
|
|
873
|
+
document.removeEventListener("keydown", onKeydown);
|
|
1039
874
|
document.removeEventListener("focusin", onFocusIn);
|
|
1040
|
-
listening
|
|
875
|
+
listening = false;
|
|
1041
876
|
}
|
|
1042
877
|
/**
|
|
1043
878
|
* Keep keyboard focus inside `container` while `active` is true, and put it
|
|
@@ -1050,19 +885,20 @@ function useFocusTrap(container, active, options = {}) {
|
|
|
1050
885
|
async function activate() {
|
|
1051
886
|
returnTo = document.activeElement;
|
|
1052
887
|
stack.push(trap);
|
|
1053
|
-
listen
|
|
888
|
+
listen();
|
|
1054
889
|
await nextTick();
|
|
1055
890
|
const el = container.value;
|
|
1056
891
|
activeContainer = el;
|
|
1057
892
|
if (!el || !isTop(trap)) return;
|
|
1058
893
|
if (el.contains(document.activeElement)) return;
|
|
1059
|
-
|
|
894
|
+
const target = options.initialFocus?.() ?? el.querySelector("[autofocus], [data-autofocus]") ?? getFocusableElements(el)[0] ?? el;
|
|
895
|
+
focusElement(target);
|
|
1060
896
|
}
|
|
1061
897
|
function deactivate() {
|
|
1062
898
|
const index = stack.indexOf(trap);
|
|
1063
899
|
if (index === -1) return;
|
|
1064
900
|
stack.splice(index, 1);
|
|
1065
|
-
unlisten
|
|
901
|
+
unlisten();
|
|
1066
902
|
if (options.restoreFocus === false) return;
|
|
1067
903
|
const target = returnTo;
|
|
1068
904
|
returnTo = null;
|
|
@@ -1084,117 +920,6 @@ function useFocusTrap(container, active, options = {}) {
|
|
|
1084
920
|
}
|
|
1085
921
|
}
|
|
1086
922
|
//#endregion
|
|
1087
|
-
//#region src/composables/useHotkey.ts
|
|
1088
|
-
/**
|
|
1089
|
-
* Parse a shortcut such as `mod+k`, `shift+/` or `alt+t`.
|
|
1090
|
-
* `mod` is ⌘ on Apple platforms and Ctrl elsewhere.
|
|
1091
|
-
*/
|
|
1092
|
-
function matchesHotkey(event, hotkey) {
|
|
1093
|
-
const parts = hotkey.toLowerCase().split("+").map((part) => part.trim());
|
|
1094
|
-
const key = parts.pop();
|
|
1095
|
-
if (!key) return false;
|
|
1096
|
-
const mac = isMac();
|
|
1097
|
-
const want = {
|
|
1098
|
-
meta: parts.includes("meta") || mac && parts.includes("mod"),
|
|
1099
|
-
ctrl: parts.includes("ctrl") || !mac && parts.includes("mod"),
|
|
1100
|
-
alt: parts.includes("alt"),
|
|
1101
|
-
shift: parts.includes("shift")
|
|
1102
|
-
};
|
|
1103
|
-
if (event.metaKey !== want.meta || event.ctrlKey !== want.ctrl || event.altKey !== want.alt || event.shiftKey !== want.shift) return false;
|
|
1104
|
-
const code = event.code.toLowerCase();
|
|
1105
|
-
return event.key.toLowerCase() === key || code === `key${key}` || code === `digit${key}`;
|
|
1106
|
-
}
|
|
1107
|
-
/** Human-readable parts of a shortcut, e.g. `mod+k` → `['⌘', 'K']`. */
|
|
1108
|
-
function formatHotkey(hotkey) {
|
|
1109
|
-
const labels = isMac() ? {
|
|
1110
|
-
mod: "⌘",
|
|
1111
|
-
meta: "⌘",
|
|
1112
|
-
ctrl: "⌃",
|
|
1113
|
-
alt: "⌥",
|
|
1114
|
-
shift: "⇧",
|
|
1115
|
-
enter: "↵",
|
|
1116
|
-
escape: "Esc"
|
|
1117
|
-
} : {
|
|
1118
|
-
mod: "Ctrl",
|
|
1119
|
-
meta: "Win",
|
|
1120
|
-
ctrl: "Ctrl",
|
|
1121
|
-
alt: "Alt",
|
|
1122
|
-
shift: "Shift",
|
|
1123
|
-
enter: "Enter",
|
|
1124
|
-
escape: "Esc"
|
|
1125
|
-
};
|
|
1126
|
-
return hotkey.split("+").map((part) => {
|
|
1127
|
-
const lower = part.trim().toLowerCase();
|
|
1128
|
-
return labels[lower] ?? (lower.length === 1 ? lower.toUpperCase() : part.trim());
|
|
1129
|
-
});
|
|
1130
|
-
}
|
|
1131
|
-
/** Run `handler` whenever the shortcut is pressed anywhere on the page. */
|
|
1132
|
-
function useHotkey(hotkey, handler) {
|
|
1133
|
-
function onKeydown(event) {
|
|
1134
|
-
const value = toValue(hotkey);
|
|
1135
|
-
if (!value || event.repeat || event.isComposing) return;
|
|
1136
|
-
if (!matchesHotkey(event, value)) return;
|
|
1137
|
-
event.preventDefault();
|
|
1138
|
-
handler(event);
|
|
1139
|
-
}
|
|
1140
|
-
onMounted(() => document.addEventListener("keydown", onKeydown));
|
|
1141
|
-
onBeforeUnmount(() => document.removeEventListener("keydown", onKeydown));
|
|
1142
|
-
}
|
|
1143
|
-
//#endregion
|
|
1144
|
-
//#region src/composables/useLayer.ts
|
|
1145
|
-
var layers = [];
|
|
1146
|
-
var listening = false;
|
|
1147
|
-
function top() {
|
|
1148
|
-
return layers[layers.length - 1];
|
|
1149
|
-
}
|
|
1150
|
-
function onKeydown(event) {
|
|
1151
|
-
if (event.key !== "Escape" || event.defaultPrevented || event.isComposing) return;
|
|
1152
|
-
const layer = top();
|
|
1153
|
-
if (!layer?.options.onEscape) return;
|
|
1154
|
-
event.preventDefault();
|
|
1155
|
-
event.stopPropagation();
|
|
1156
|
-
layer.options.onEscape(event);
|
|
1157
|
-
}
|
|
1158
|
-
function onPointerDown(event) {
|
|
1159
|
-
const layer = top();
|
|
1160
|
-
if (!layer?.options.onPointerDownOutside) return;
|
|
1161
|
-
const target = event.target;
|
|
1162
|
-
if (!target) return;
|
|
1163
|
-
if (target.closest?.("[data-juxt-layer-ignore]")) return;
|
|
1164
|
-
if (!layer.options.elements().some((el) => el?.contains(target))) layer.options.onPointerDownOutside(event);
|
|
1165
|
-
}
|
|
1166
|
-
function listen() {
|
|
1167
|
-
if (listening || !isClient) return;
|
|
1168
|
-
document.addEventListener("keydown", onKeydown);
|
|
1169
|
-
document.addEventListener("pointerdown", onPointerDown, true);
|
|
1170
|
-
listening = true;
|
|
1171
|
-
}
|
|
1172
|
-
function unlisten() {
|
|
1173
|
-
if (!listening || layers.length > 0) return;
|
|
1174
|
-
document.removeEventListener("keydown", onKeydown);
|
|
1175
|
-
document.removeEventListener("pointerdown", onPointerDown, true);
|
|
1176
|
-
listening = false;
|
|
1177
|
-
}
|
|
1178
|
-
function useLayer(options) {
|
|
1179
|
-
const layer = { options };
|
|
1180
|
-
const add = () => {
|
|
1181
|
-
if (layers.includes(layer)) return;
|
|
1182
|
-
layers.push(layer);
|
|
1183
|
-
listen();
|
|
1184
|
-
};
|
|
1185
|
-
const remove = () => {
|
|
1186
|
-
const index = layers.indexOf(layer);
|
|
1187
|
-
if (index === -1) return;
|
|
1188
|
-
layers.splice(index, 1);
|
|
1189
|
-
unlisten();
|
|
1190
|
-
};
|
|
1191
|
-
if (isClient) {
|
|
1192
|
-
watch(options.active, (value) => value ? add() : remove(), { immediate: true });
|
|
1193
|
-
onBeforeUnmount(remove);
|
|
1194
|
-
}
|
|
1195
|
-
return { isTopLayer: () => top() === layer };
|
|
1196
|
-
}
|
|
1197
|
-
//#endregion
|
|
1198
923
|
//#region src/composables/useScrollLock.ts
|
|
1199
924
|
var locks = 0;
|
|
1200
925
|
var saved = null;
|
|
@@ -1238,134 +963,15 @@ function useScrollLock(active) {
|
|
|
1238
963
|
onBeforeUnmount(() => set(false));
|
|
1239
964
|
}
|
|
1240
965
|
//#endregion
|
|
1241
|
-
//#region src/components/command-palette/search.ts
|
|
1242
|
-
var NO_MATCH = {
|
|
1243
|
-
score: 0,
|
|
1244
|
-
ranges: []
|
|
1245
|
-
};
|
|
1246
|
-
function matchText(query, text) {
|
|
1247
|
-
const q = query.trim().toLowerCase();
|
|
1248
|
-
if (!q) return {
|
|
1249
|
-
score: 1,
|
|
1250
|
-
ranges: []
|
|
1251
|
-
};
|
|
1252
|
-
const t = text.toLowerCase();
|
|
1253
|
-
if (!t) return NO_MATCH;
|
|
1254
|
-
if (t === q) return {
|
|
1255
|
-
score: 1e3,
|
|
1256
|
-
ranges: [[0, t.length]]
|
|
1257
|
-
};
|
|
1258
|
-
if (t.startsWith(q)) return {
|
|
1259
|
-
score: 900 - Math.min(t.length - q.length, 100),
|
|
1260
|
-
ranges: [[0, q.length]]
|
|
1261
|
-
};
|
|
1262
|
-
const wordStart = findWordStart(t, q);
|
|
1263
|
-
if (wordStart > 0) return {
|
|
1264
|
-
score: 700 - Math.min(wordStart, 100),
|
|
1265
|
-
ranges: [[wordStart, wordStart + q.length]]
|
|
1266
|
-
};
|
|
1267
|
-
const index = t.indexOf(q);
|
|
1268
|
-
if (index > 0) return {
|
|
1269
|
-
score: 500 - Math.min(index, 100),
|
|
1270
|
-
ranges: [[index, index + q.length]]
|
|
1271
|
-
};
|
|
1272
|
-
return subsequence(q, t);
|
|
1273
|
-
}
|
|
1274
|
-
function findWordStart(t, q) {
|
|
1275
|
-
let from = 0;
|
|
1276
|
-
while (from < t.length) {
|
|
1277
|
-
const index = t.indexOf(q, from);
|
|
1278
|
-
if (index === -1) return -1;
|
|
1279
|
-
if (index > 0 && /[\s\-_/.:]/.test(t[index - 1])) return index;
|
|
1280
|
-
from = index + 1;
|
|
1281
|
-
}
|
|
1282
|
-
return -1;
|
|
1283
|
-
}
|
|
1284
|
-
/** Letters in order, not necessarily adjacent | "gtst" finds "Go to settings". */
|
|
1285
|
-
function subsequence(q, t) {
|
|
1286
|
-
const ranges = [];
|
|
1287
|
-
let ti = 0;
|
|
1288
|
-
let score = 100;
|
|
1289
|
-
let previous = -2;
|
|
1290
|
-
for (const char of q) {
|
|
1291
|
-
if (char === " ") continue;
|
|
1292
|
-
const found = t.indexOf(char, ti);
|
|
1293
|
-
if (found === -1) return NO_MATCH;
|
|
1294
|
-
if (found === previous + 1 && ranges.length) {
|
|
1295
|
-
ranges[ranges.length - 1][1] = found + 1;
|
|
1296
|
-
score += 12;
|
|
1297
|
-
} else {
|
|
1298
|
-
ranges.push([found, found + 1]);
|
|
1299
|
-
if (found === 0 || /[\s\-_/.:]/.test(t[found - 1])) score += 8;
|
|
1300
|
-
}
|
|
1301
|
-
score -= Math.min(found - ti, 10);
|
|
1302
|
-
previous = found;
|
|
1303
|
-
ti = found + 1;
|
|
1304
|
-
}
|
|
1305
|
-
return {
|
|
1306
|
-
score: Math.max(score, 1),
|
|
1307
|
-
ranges
|
|
1308
|
-
};
|
|
1309
|
-
}
|
|
1310
|
-
/** Split text into highlighted and plain runs. */
|
|
1311
|
-
function splitByRanges(text, ranges) {
|
|
1312
|
-
if (!ranges.length) return [{
|
|
1313
|
-
text,
|
|
1314
|
-
match: false
|
|
1315
|
-
}];
|
|
1316
|
-
const parts = [];
|
|
1317
|
-
let cursor = 0;
|
|
1318
|
-
for (const [start, end] of ranges) {
|
|
1319
|
-
if (start > cursor) parts.push({
|
|
1320
|
-
text: text.slice(cursor, start),
|
|
1321
|
-
match: false
|
|
1322
|
-
});
|
|
1323
|
-
parts.push({
|
|
1324
|
-
text: text.slice(start, end),
|
|
1325
|
-
match: true
|
|
1326
|
-
});
|
|
1327
|
-
cursor = end;
|
|
1328
|
-
}
|
|
1329
|
-
if (cursor < text.length) parts.push({
|
|
1330
|
-
text: text.slice(cursor),
|
|
1331
|
-
match: false
|
|
1332
|
-
});
|
|
1333
|
-
return parts;
|
|
1334
|
-
}
|
|
1335
|
-
//#endregion
|
|
1336
|
-
//#region src/components/primitives/JPortal.vue
|
|
1337
|
-
var JPortal_default = /* @__PURE__ */ defineComponent({
|
|
1338
|
-
__name: "JPortal",
|
|
1339
|
-
props: { to: { default: "body" } },
|
|
1340
|
-
setup(__props) {
|
|
1341
|
-
/**
|
|
1342
|
-
* Internal: teleports its content to `<body>`, but only once mounted.
|
|
1343
|
-
*
|
|
1344
|
-
* Server-rendered teleports to `body` never make it into the HTML, so a plain
|
|
1345
|
-
* `<Teleport>` hydrates against nothing and warns. Rendering nothing until
|
|
1346
|
-
* mount keeps server and client output identical | and overlays are closed on
|
|
1347
|
-
* first paint anyway.
|
|
1348
|
-
*/
|
|
1349
|
-
const mounted = ref(false);
|
|
1350
|
-
onMounted(() => mounted.value = true);
|
|
1351
|
-
return (_ctx, _cache) => {
|
|
1352
|
-
return mounted.value ? (openBlock(), createBlock(Teleport, {
|
|
1353
|
-
key: 0,
|
|
1354
|
-
to: __props.to
|
|
1355
|
-
}, [renderSlot(_ctx.$slots, "default")], 8, ["to"])) : createCommentVNode("", true);
|
|
1356
|
-
};
|
|
1357
|
-
}
|
|
1358
|
-
});
|
|
1359
|
-
//#endregion
|
|
1360
966
|
//#region src/components/command-palette/JCommandPalette.vue?vue&type=script&setup=true&lang.ts
|
|
1361
|
-
var _hoisted_1$
|
|
967
|
+
var _hoisted_1$35 = {
|
|
1362
968
|
key: 0,
|
|
1363
969
|
class: "j-command__overlay",
|
|
1364
970
|
"aria-hidden": "true"
|
|
1365
971
|
};
|
|
1366
|
-
var _hoisted_2$
|
|
1367
|
-
var _hoisted_3$
|
|
1368
|
-
var _hoisted_4$
|
|
972
|
+
var _hoisted_2$25 = ["aria-label"];
|
|
973
|
+
var _hoisted_3$21 = { class: "j-command__search" };
|
|
974
|
+
var _hoisted_4$15 = [
|
|
1369
975
|
"aria-activedescendant",
|
|
1370
976
|
"aria-label",
|
|
1371
977
|
"placeholder"
|
|
@@ -1611,7 +1217,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1611
1217
|
return (_ctx, _cache) => {
|
|
1612
1218
|
return openBlock(), createBlock(JPortal_default, null, {
|
|
1613
1219
|
default: withCtx(() => [createVNode(Transition, { name: "j-command-overlay" }, {
|
|
1614
|
-
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1220
|
+
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$35)) : createCommentVNode("", true)]),
|
|
1615
1221
|
_: 1
|
|
1616
1222
|
}), createVNode(Transition, {
|
|
1617
1223
|
name: "j-command",
|
|
@@ -1633,7 +1239,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1633
1239
|
"aria-label": __props.label,
|
|
1634
1240
|
class: "j-command"
|
|
1635
1241
|
}, [
|
|
1636
|
-
createElementVNode("div", _hoisted_3$
|
|
1242
|
+
createElementVNode("div", _hoisted_3$21, [
|
|
1637
1243
|
createVNode(unref(IconSearch), { class: "j-command__search-icon" }),
|
|
1638
1244
|
withDirectives(createElementVNode("input", {
|
|
1639
1245
|
ref_key: "input",
|
|
@@ -1654,7 +1260,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1654
1260
|
spellcheck: "false",
|
|
1655
1261
|
enterkeyhint: "go",
|
|
1656
1262
|
onKeydown
|
|
1657
|
-
}, null, 40, _hoisted_4$
|
|
1263
|
+
}, null, 40, _hoisted_4$15), [[vModelText, search.value]]),
|
|
1658
1264
|
createElementVNode("button", {
|
|
1659
1265
|
type: "button",
|
|
1660
1266
|
class: "j-command__esc j-kbd",
|
|
@@ -1720,7 +1326,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1720
1326
|
_cache[5] || (_cache[5] = createElementVNode("span", { class: "j-command__hint" }, [createElementVNode("kbd", { class: "j-kbd" }, "Esc"), createTextVNode(" Close")], -1))
|
|
1721
1327
|
])]),
|
|
1722
1328
|
createElementVNode("span", _hoisted_19, toDisplayString(announcement.value), 1)
|
|
1723
|
-
], 8, _hoisted_2$
|
|
1329
|
+
], 8, _hoisted_2$25)], 32)) : createCommentVNode("", true)]),
|
|
1724
1330
|
_: 3
|
|
1725
1331
|
})]),
|
|
1726
1332
|
_: 3
|
|
@@ -1770,21 +1376,21 @@ function useModal(panel, open, options) {
|
|
|
1770
1376
|
var FIELD_SELECTOR = ":is(input:not([type=hidden]), textarea, select, [role=combobox]):not(:disabled)";
|
|
1771
1377
|
//#endregion
|
|
1772
1378
|
//#region src/components/dialog/JDialog.vue?vue&type=script&setup=true&lang.ts
|
|
1773
|
-
var _hoisted_1$
|
|
1379
|
+
var _hoisted_1$34 = {
|
|
1774
1380
|
key: 0,
|
|
1775
1381
|
class: "j-dialog__overlay",
|
|
1776
1382
|
"aria-hidden": "true"
|
|
1777
1383
|
};
|
|
1778
|
-
var _hoisted_2$
|
|
1384
|
+
var _hoisted_2$24 = [
|
|
1779
1385
|
"aria-labelledby",
|
|
1780
1386
|
"aria-label",
|
|
1781
1387
|
"aria-describedby"
|
|
1782
1388
|
];
|
|
1783
|
-
var _hoisted_3$
|
|
1389
|
+
var _hoisted_3$20 = {
|
|
1784
1390
|
key: 0,
|
|
1785
1391
|
class: "j-dialog__header"
|
|
1786
1392
|
};
|
|
1787
|
-
var _hoisted_4$
|
|
1393
|
+
var _hoisted_4$14 = {
|
|
1788
1394
|
key: 1,
|
|
1789
1395
|
class: "j-dialog__body"
|
|
1790
1396
|
};
|
|
@@ -1839,7 +1445,7 @@ var JDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
1839
1445
|
return (_ctx, _cache) => {
|
|
1840
1446
|
return openBlock(), createBlock(JPortal_default, null, {
|
|
1841
1447
|
default: withCtx(() => [createVNode(Transition, { name: "j-dialog-overlay" }, {
|
|
1842
|
-
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1448
|
+
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$34)) : createCommentVNode("", true)]),
|
|
1843
1449
|
_: 1
|
|
1844
1450
|
}), createVNode(Transition, {
|
|
1845
1451
|
name: "j-dialog",
|
|
@@ -1866,7 +1472,7 @@ var JDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
1866
1472
|
"aria-describedby": __props.description ? descriptionId : void 0,
|
|
1867
1473
|
onAnimationend: _cache[0] || (_cache[0] = ($event) => nudging.value = false)
|
|
1868
1474
|
}, [
|
|
1869
|
-
__props.title || __props.description || _ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_3$
|
|
1475
|
+
__props.title || __props.description || _ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_3$20, [renderSlot(_ctx.$slots, "header", {
|
|
1870
1476
|
titleId,
|
|
1871
1477
|
descriptionId
|
|
1872
1478
|
}, () => [createElementVNode("h2", {
|
|
@@ -1877,7 +1483,7 @@ var JDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
1877
1483
|
id: descriptionId,
|
|
1878
1484
|
class: "j-dialog__description"
|
|
1879
1485
|
}, toDisplayString(__props.description), 1)) : createCommentVNode("", true)])])) : createCommentVNode("", true),
|
|
1880
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1486
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$14, [renderSlot(_ctx.$slots, "default", { close })])) : createCommentVNode("", true),
|
|
1881
1487
|
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_5$10, [renderSlot(_ctx.$slots, "footer", { close })])) : createCommentVNode("", true),
|
|
1882
1488
|
!__props.hideClose ? (openBlock(), createElementBlock("button", {
|
|
1883
1489
|
key: 3,
|
|
@@ -1886,313 +1492,7 @@ var JDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
1886
1492
|
"aria-label": "Close",
|
|
1887
1493
|
onClick: close
|
|
1888
1494
|
}, [createVNode(unref(IconX))])) : createCommentVNode("", true)
|
|
1889
|
-
], 42, _hoisted_2$
|
|
1890
|
-
_: 3
|
|
1891
|
-
})]),
|
|
1892
|
-
_: 3
|
|
1893
|
-
});
|
|
1894
|
-
};
|
|
1895
|
-
}
|
|
1896
|
-
});
|
|
1897
|
-
//#endregion
|
|
1898
|
-
//#region src/components/primitives/JSlot.ts
|
|
1899
|
-
function firstElement(nodes) {
|
|
1900
|
-
if (!nodes) return void 0;
|
|
1901
|
-
for (const node of nodes) {
|
|
1902
|
-
if (node.type === Comment) continue;
|
|
1903
|
-
if (node.type === Fragment && Array.isArray(node.children)) {
|
|
1904
|
-
const found = firstElement(node.children);
|
|
1905
|
-
if (found) return found;
|
|
1906
|
-
continue;
|
|
1907
|
-
}
|
|
1908
|
-
if (node.type === Text) {
|
|
1909
|
-
if (typeof node.children === "string" && node.children.trim() === "") continue;
|
|
1910
|
-
return h("span", null, node.children);
|
|
1911
|
-
}
|
|
1912
|
-
return node;
|
|
1913
|
-
}
|
|
1914
|
-
}
|
|
1915
|
-
/**
|
|
1916
|
-
* Internal: renders its first child element and merges its own attributes
|
|
1917
|
-
* (ARIA, listeners, ids) onto it | no wrapper element.
|
|
1918
|
-
*/
|
|
1919
|
-
var JSlot = defineComponent({
|
|
1920
|
-
name: "JSlot",
|
|
1921
|
-
inheritAttrs: false,
|
|
1922
|
-
setup(_, { slots, attrs }) {
|
|
1923
|
-
return () => {
|
|
1924
|
-
const child = firstElement(slots.default?.());
|
|
1925
|
-
if (!child) return null;
|
|
1926
|
-
const { id, ...rest } = attrs;
|
|
1927
|
-
return cloneVNode(child, child.props?.id ? rest : {
|
|
1928
|
-
id,
|
|
1929
|
-
...rest
|
|
1930
|
-
}, true);
|
|
1931
|
-
};
|
|
1932
|
-
}
|
|
1933
|
-
});
|
|
1934
|
-
//#endregion
|
|
1935
|
-
//#region src/components/dropdown-menu/context.ts
|
|
1936
|
-
var MENU_ROOT = Symbol("JDropdownMenu");
|
|
1937
|
-
var MENU_LEVEL = Symbol("JDropdownMenuLevel");
|
|
1938
|
-
function getMenuItems(content) {
|
|
1939
|
-
if (!content) return [];
|
|
1940
|
-
return Array.from(content.querySelectorAll("[role^=\"menuitem\"]:not([aria-disabled=\"true\"])"));
|
|
1941
|
-
}
|
|
1942
|
-
//#endregion
|
|
1943
|
-
//#region src/composables/useFloating.ts
|
|
1944
|
-
var ORIGIN = {
|
|
1945
|
-
top: "bottom",
|
|
1946
|
-
bottom: "top",
|
|
1947
|
-
left: "right",
|
|
1948
|
-
right: "left"
|
|
1949
|
-
};
|
|
1950
|
-
/**
|
|
1951
|
-
* Position a floating element next to a reference element and keep it there
|
|
1952
|
-
* through scroll and resize. Coordinates are written to `left`/`top` so
|
|
1953
|
-
* `transform` stays free for enter/leave motion.
|
|
1954
|
-
*/
|
|
1955
|
-
function useFloating(reference, floating, options = {}) {
|
|
1956
|
-
const read = () => typeof options === "function" ? options() : options;
|
|
1957
|
-
const x = ref(0);
|
|
1958
|
-
const y = ref(0);
|
|
1959
|
-
const placement = ref(read().placement ?? "bottom-start");
|
|
1960
|
-
const availableHeight = ref();
|
|
1961
|
-
const referenceWidth = ref();
|
|
1962
|
-
const stop = shallowRef();
|
|
1963
|
-
async function update() {
|
|
1964
|
-
const referenceEl = reference.value;
|
|
1965
|
-
const floatingEl = floating.value;
|
|
1966
|
-
if (!referenceEl || !floatingEl) return;
|
|
1967
|
-
const opts = read();
|
|
1968
|
-
const padding = opts.padding ?? 8;
|
|
1969
|
-
const result = await computePosition(referenceEl, floatingEl, {
|
|
1970
|
-
strategy: "fixed",
|
|
1971
|
-
placement: opts.placement ?? "bottom-start",
|
|
1972
|
-
middleware: [
|
|
1973
|
-
offset(opts.offset ?? 6),
|
|
1974
|
-
flip({ padding }),
|
|
1975
|
-
shift({ padding }),
|
|
1976
|
-
size({
|
|
1977
|
-
padding,
|
|
1978
|
-
apply({ availableHeight: height, rects }) {
|
|
1979
|
-
availableHeight.value = Math.max(120, Math.floor(height));
|
|
1980
|
-
referenceWidth.value = rects.reference.width;
|
|
1981
|
-
}
|
|
1982
|
-
})
|
|
1983
|
-
]
|
|
1984
|
-
});
|
|
1985
|
-
x.value = Math.round(result.x);
|
|
1986
|
-
y.value = Math.round(result.y);
|
|
1987
|
-
placement.value = result.placement;
|
|
1988
|
-
}
|
|
1989
|
-
watch([reference, floating], ([referenceEl, floatingEl]) => {
|
|
1990
|
-
stop.value?.();
|
|
1991
|
-
stop.value = void 0;
|
|
1992
|
-
if (referenceEl && floatingEl) stop.value = autoUpdate(referenceEl, floatingEl, update);
|
|
1993
|
-
}, { flush: "post" });
|
|
1994
|
-
onBeforeUnmount(() => stop.value?.());
|
|
1995
|
-
const side = computed(() => placement.value.split("-")[0]);
|
|
1996
|
-
return {
|
|
1997
|
-
x,
|
|
1998
|
-
y,
|
|
1999
|
-
placement,
|
|
2000
|
-
side,
|
|
2001
|
-
styles: computed(() => {
|
|
2002
|
-
const align = placement.value.split("-")[1];
|
|
2003
|
-
const cross = side.value === "top" || side.value === "bottom" ? align === "start" ? "left" : align === "end" ? "right" : "center" : align === "start" ? "top" : align === "end" ? "bottom" : "center";
|
|
2004
|
-
const origin = side.value === "top" || side.value === "bottom" ? `${cross} ${ORIGIN[side.value]}` : `${ORIGIN[side.value]} ${cross}`;
|
|
2005
|
-
const dir = side.value === "top" ? 1 : side.value === "bottom" ? -1 : 0;
|
|
2006
|
-
return {
|
|
2007
|
-
"position": "fixed",
|
|
2008
|
-
"left": `${x.value}px`,
|
|
2009
|
-
"top": `${y.value}px`,
|
|
2010
|
-
"transformOrigin": origin,
|
|
2011
|
-
"minWidth": read().matchWidth && referenceWidth.value ? `${referenceWidth.value}px` : void 0,
|
|
2012
|
-
"--j-available-height": availableHeight.value ? `${availableHeight.value}px` : void 0,
|
|
2013
|
-
"--j-pop-dir": String(dir),
|
|
2014
|
-
"--j-pop-x": String(side.value === "left" ? 1 : side.value === "right" ? -1 : 0)
|
|
2015
|
-
};
|
|
2016
|
-
}),
|
|
2017
|
-
update
|
|
2018
|
-
};
|
|
2019
|
-
}
|
|
2020
|
-
//#endregion
|
|
2021
|
-
//#region src/composables/useTypeahead.ts
|
|
2022
|
-
/**
|
|
2023
|
-
* Type-to-jump for lists. Characters typed in quick succession form a query;
|
|
2024
|
-
* repeating the same letter cycles through matches.
|
|
2025
|
-
*/
|
|
2026
|
-
function useTypeahead(timeout = 500) {
|
|
2027
|
-
let query = "";
|
|
2028
|
-
let timer;
|
|
2029
|
-
function search(key, items, getLabel, currentIndex) {
|
|
2030
|
-
if (key.length !== 1 || key === " " && query === "") return -1;
|
|
2031
|
-
clearTimeout(timer);
|
|
2032
|
-
timer = setTimeout(() => query = "", timeout);
|
|
2033
|
-
query += key.toLowerCase();
|
|
2034
|
-
const repeated = query.length > 1 && [...query].every((char) => char === query[0]);
|
|
2035
|
-
const needle = repeated ? query[0] : query;
|
|
2036
|
-
const start = repeated || query.length === 1 ? currentIndex + 1 : currentIndex;
|
|
2037
|
-
for (let i = 0; i < items.length; i++) {
|
|
2038
|
-
const index = (start + i + items.length) % items.length;
|
|
2039
|
-
if (getLabel(items[index]).trim().toLowerCase().startsWith(needle)) return index;
|
|
2040
|
-
}
|
|
2041
|
-
return -1;
|
|
2042
|
-
}
|
|
2043
|
-
const isSearching = () => query.length > 0;
|
|
2044
|
-
return {
|
|
2045
|
-
search,
|
|
2046
|
-
isSearching
|
|
2047
|
-
};
|
|
2048
|
-
}
|
|
2049
|
-
//#endregion
|
|
2050
|
-
//#region src/components/dropdown-menu/JMenuContent.vue?vue&type=script&setup=true&lang.ts
|
|
2051
|
-
var _hoisted_1$36 = ["id", "aria-labelledby"];
|
|
2052
|
-
//#endregion
|
|
2053
|
-
//#region src/components/dropdown-menu/JMenuContent.vue
|
|
2054
|
-
var JMenuContent_default = /* @__PURE__ */ defineComponent({
|
|
2055
|
-
__name: "JMenuContent",
|
|
2056
|
-
props: {
|
|
2057
|
-
open: { type: Boolean },
|
|
2058
|
-
reference: {},
|
|
2059
|
-
id: {},
|
|
2060
|
-
labelledby: {},
|
|
2061
|
-
placement: {},
|
|
2062
|
-
offset: {},
|
|
2063
|
-
initialFocus: {},
|
|
2064
|
-
isSub: { type: Boolean }
|
|
2065
|
-
},
|
|
2066
|
-
emits: [
|
|
2067
|
-
"escape",
|
|
2068
|
-
"outside",
|
|
2069
|
-
"back",
|
|
2070
|
-
"pointerenter"
|
|
2071
|
-
],
|
|
2072
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2073
|
-
/**
|
|
2074
|
-
* Internal: the floating list shared by the root menu and submenus.
|
|
2075
|
-
* Owns positioning, keyboard navigation, typeahead and the layer.
|
|
2076
|
-
*/
|
|
2077
|
-
const props = __props;
|
|
2078
|
-
const emit = __emit;
|
|
2079
|
-
const root = inject(MENU_ROOT);
|
|
2080
|
-
const content = ref(null);
|
|
2081
|
-
const { styles } = useFloating(toRef(props, "reference"), content, () => ({
|
|
2082
|
-
placement: props.placement,
|
|
2083
|
-
offset: props.offset
|
|
2084
|
-
}));
|
|
2085
|
-
const typeahead = useTypeahead();
|
|
2086
|
-
useLayer({
|
|
2087
|
-
active: toRef(props, "open"),
|
|
2088
|
-
elements: () => [content.value, props.reference],
|
|
2089
|
-
onEscape: () => emit("escape"),
|
|
2090
|
-
onPointerDownOutside: (event) => emit("outside", event)
|
|
2091
|
-
});
|
|
2092
|
-
const openSub = ref(null);
|
|
2093
|
-
let subTimer;
|
|
2094
|
-
provide(MENU_LEVEL, {
|
|
2095
|
-
content,
|
|
2096
|
-
openSub,
|
|
2097
|
-
setOpenSub: (id) => {
|
|
2098
|
-
clearTimeout(subTimer);
|
|
2099
|
-
openSub.value = id;
|
|
2100
|
-
},
|
|
2101
|
-
scheduleSubClose: () => {
|
|
2102
|
-
if (!openSub.value) return;
|
|
2103
|
-
clearTimeout(subTimer);
|
|
2104
|
-
subTimer = setTimeout(() => openSub.value = null, 180);
|
|
2105
|
-
},
|
|
2106
|
-
cancelSubClose: () => clearTimeout(subTimer)
|
|
2107
|
-
});
|
|
2108
|
-
watch(() => props.open, async (value) => {
|
|
2109
|
-
if (!value) {
|
|
2110
|
-
openSub.value = null;
|
|
2111
|
-
return;
|
|
2112
|
-
}
|
|
2113
|
-
if (props.initialFocus === "none") return;
|
|
2114
|
-
await nextTick();
|
|
2115
|
-
const items = getMenuItems(content.value);
|
|
2116
|
-
if (props.initialFocus === "first") focusElement(items[0] ?? content.value);
|
|
2117
|
-
else if (props.initialFocus === "last") focusElement(items[items.length - 1] ?? content.value);
|
|
2118
|
-
else focusElement(content.value);
|
|
2119
|
-
}, { flush: "post" });
|
|
2120
|
-
function move(delta) {
|
|
2121
|
-
const items = getMenuItems(content.value);
|
|
2122
|
-
if (items.length === 0) return;
|
|
2123
|
-
const current = items.indexOf(document.activeElement);
|
|
2124
|
-
let next;
|
|
2125
|
-
if (delta === "first") next = 0;
|
|
2126
|
-
else if (delta === "last") next = items.length - 1;
|
|
2127
|
-
else if (current === -1) next = delta === 1 ? 0 : items.length - 1;
|
|
2128
|
-
else next = (current + delta + items.length) % items.length;
|
|
2129
|
-
focusElement(items[next]);
|
|
2130
|
-
}
|
|
2131
|
-
function onKeydown(event) {
|
|
2132
|
-
const { key } = event;
|
|
2133
|
-
switch (key) {
|
|
2134
|
-
case "ArrowDown":
|
|
2135
|
-
event.preventDefault();
|
|
2136
|
-
move(1);
|
|
2137
|
-
break;
|
|
2138
|
-
case "ArrowUp":
|
|
2139
|
-
event.preventDefault();
|
|
2140
|
-
move(-1);
|
|
2141
|
-
break;
|
|
2142
|
-
case "Home":
|
|
2143
|
-
case "PageUp":
|
|
2144
|
-
event.preventDefault();
|
|
2145
|
-
move("first");
|
|
2146
|
-
break;
|
|
2147
|
-
case "End":
|
|
2148
|
-
case "PageDown":
|
|
2149
|
-
event.preventDefault();
|
|
2150
|
-
move("last");
|
|
2151
|
-
break;
|
|
2152
|
-
case "ArrowLeft":
|
|
2153
|
-
if (props.isSub) {
|
|
2154
|
-
event.preventDefault();
|
|
2155
|
-
emit("back");
|
|
2156
|
-
}
|
|
2157
|
-
break;
|
|
2158
|
-
case "Tab":
|
|
2159
|
-
event.preventDefault();
|
|
2160
|
-
root.close(true);
|
|
2161
|
-
break;
|
|
2162
|
-
case "Enter":
|
|
2163
|
-
case " ": {
|
|
2164
|
-
const active = document.activeElement;
|
|
2165
|
-
if (active && active !== content.value && content.value?.contains(active)) {
|
|
2166
|
-
event.preventDefault();
|
|
2167
|
-
active.click();
|
|
2168
|
-
}
|
|
2169
|
-
break;
|
|
2170
|
-
}
|
|
2171
|
-
default: if (key.length === 1 && !event.metaKey && !event.ctrlKey && !event.altKey) {
|
|
2172
|
-
const items = getMenuItems(content.value);
|
|
2173
|
-
const index = typeahead.search(key, items, (item) => item.textContent ?? "", items.indexOf(document.activeElement));
|
|
2174
|
-
if (index >= 0) focusElement(items[index]);
|
|
2175
|
-
}
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2178
|
-
__expose({ content });
|
|
2179
|
-
return (_ctx, _cache) => {
|
|
2180
|
-
return openBlock(), createBlock(JPortal_default, null, {
|
|
2181
|
-
default: withCtx(() => [createVNode(Transition, { name: "j-pop" }, {
|
|
2182
|
-
default: withCtx(() => [__props.open ? (openBlock(), createElementBlock("div", {
|
|
2183
|
-
key: 0,
|
|
2184
|
-
id: __props.id,
|
|
2185
|
-
ref_key: "content",
|
|
2186
|
-
ref: content,
|
|
2187
|
-
role: "menu",
|
|
2188
|
-
tabindex: "-1",
|
|
2189
|
-
class: normalizeClass(["j-menu j-popover-surface", { "j-menu--sub": __props.isSub }]),
|
|
2190
|
-
style: normalizeStyle(unref(styles)),
|
|
2191
|
-
"aria-labelledby": __props.labelledby,
|
|
2192
|
-
"aria-orientation": "vertical",
|
|
2193
|
-
onKeydown,
|
|
2194
|
-
onPointerenter: _cache[0] || (_cache[0] = ($event) => emit("pointerenter"))
|
|
2195
|
-
}, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_1$36)) : createCommentVNode("", true)]),
|
|
1495
|
+
], 42, _hoisted_2$24)], 32)) : createCommentVNode("", true)]),
|
|
2196
1496
|
_: 3
|
|
2197
1497
|
})]),
|
|
2198
1498
|
_: 3
|
|
@@ -2201,185 +1501,8 @@ var JMenuContent_default = /* @__PURE__ */ defineComponent({
|
|
|
2201
1501
|
}
|
|
2202
1502
|
});
|
|
2203
1503
|
//#endregion
|
|
2204
|
-
//#region src/components/dropdown-menu/JDropdownMenu.vue
|
|
2205
|
-
var JDropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
2206
|
-
__name: "JDropdownMenu",
|
|
2207
|
-
props: /*@__PURE__*/ mergeModels({
|
|
2208
|
-
placement: { default: "bottom-start" },
|
|
2209
|
-
offset: { default: 6 },
|
|
2210
|
-
disabled: { type: Boolean }
|
|
2211
|
-
}, {
|
|
2212
|
-
"open": {
|
|
2213
|
-
type: Boolean,
|
|
2214
|
-
default: false
|
|
2215
|
-
},
|
|
2216
|
-
"openModifiers": {}
|
|
2217
|
-
}),
|
|
2218
|
-
emits: ["update:open"],
|
|
2219
|
-
setup(__props, { expose: __expose }) {
|
|
2220
|
-
const props = __props;
|
|
2221
|
-
const open = useModel(__props, "open");
|
|
2222
|
-
const id = useId();
|
|
2223
|
-
const triggerId = `j-${id}-trigger`;
|
|
2224
|
-
const menuId = `j-${id}-menu`;
|
|
2225
|
-
const triggerRef = ref();
|
|
2226
|
-
const triggerEl = computed(() => unrefElement(triggerRef.value));
|
|
2227
|
-
const initialFocus = ref("content");
|
|
2228
|
-
function show(focus) {
|
|
2229
|
-
if (props.disabled) return;
|
|
2230
|
-
initialFocus.value = focus;
|
|
2231
|
-
open.value = true;
|
|
2232
|
-
}
|
|
2233
|
-
function close(restoreFocus = true) {
|
|
2234
|
-
if (!open.value) return;
|
|
2235
|
-
open.value = false;
|
|
2236
|
-
if (restoreFocus) nextTick(() => focusElement(triggerEl.value));
|
|
2237
|
-
}
|
|
2238
|
-
provide(MENU_ROOT, { close });
|
|
2239
|
-
function onClick(event) {
|
|
2240
|
-
if (open.value) return close(false);
|
|
2241
|
-
show(event.detail === 0 ? "first" : "content");
|
|
2242
|
-
}
|
|
2243
|
-
function onKeydown(event) {
|
|
2244
|
-
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
2245
|
-
event.preventDefault();
|
|
2246
|
-
show(event.key === "ArrowDown" ? "first" : "last");
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
const triggerProps = computed(() => ({
|
|
2250
|
-
"id": triggerId,
|
|
2251
|
-
"aria-haspopup": "menu",
|
|
2252
|
-
"aria-expanded": open.value,
|
|
2253
|
-
"aria-controls": open.value ? menuId : void 0,
|
|
2254
|
-
"data-state": open.value ? "open" : "closed",
|
|
2255
|
-
"onClick": onClick,
|
|
2256
|
-
"onKeydown": onKeydown
|
|
2257
|
-
}));
|
|
2258
|
-
__expose({
|
|
2259
|
-
open: () => show("content"),
|
|
2260
|
-
close
|
|
2261
|
-
});
|
|
2262
|
-
return (_ctx, _cache) => {
|
|
2263
|
-
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(JSlot), mergeProps({
|
|
2264
|
-
ref_key: "triggerRef",
|
|
2265
|
-
ref: triggerRef
|
|
2266
|
-
}, triggerProps.value), {
|
|
2267
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "trigger", { open: open.value })]),
|
|
2268
|
-
_: 3
|
|
2269
|
-
}, 16), createVNode(JMenuContent_default, {
|
|
2270
|
-
id: menuId,
|
|
2271
|
-
open: open.value,
|
|
2272
|
-
reference: triggerEl.value,
|
|
2273
|
-
labelledby: triggerEl.value?.id || triggerId,
|
|
2274
|
-
placement: __props.placement,
|
|
2275
|
-
offset: __props.offset,
|
|
2276
|
-
"initial-focus": initialFocus.value,
|
|
2277
|
-
onEscape: _cache[0] || (_cache[0] = ($event) => close(true)),
|
|
2278
|
-
onOutside: _cache[1] || (_cache[1] = ($event) => close(false))
|
|
2279
|
-
}, {
|
|
2280
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
2281
|
-
_: 3
|
|
2282
|
-
}, 8, [
|
|
2283
|
-
"open",
|
|
2284
|
-
"reference",
|
|
2285
|
-
"labelledby",
|
|
2286
|
-
"placement",
|
|
2287
|
-
"offset",
|
|
2288
|
-
"initial-focus"
|
|
2289
|
-
])], 64);
|
|
2290
|
-
};
|
|
2291
|
-
}
|
|
2292
|
-
});
|
|
2293
|
-
//#endregion
|
|
2294
|
-
//#region src/components/dropdown-menu/JDropdownMenuItem.vue?vue&type=script&setup=true&lang.ts
|
|
2295
|
-
var _hoisted_1$35 = {
|
|
2296
|
-
key: 0,
|
|
2297
|
-
class: "j-menu__icon"
|
|
2298
|
-
};
|
|
2299
|
-
var _hoisted_2$25 = { class: "j-menu__text" };
|
|
2300
|
-
var _hoisted_3$21 = {
|
|
2301
|
-
key: 1,
|
|
2302
|
-
class: "j-menu__shortcut"
|
|
2303
|
-
};
|
|
2304
|
-
//#endregion
|
|
2305
|
-
//#region src/components/dropdown-menu/JDropdownMenuItem.vue
|
|
2306
|
-
var JDropdownMenuItem_default = /* @__PURE__ */ defineComponent({
|
|
2307
|
-
__name: "JDropdownMenuItem",
|
|
2308
|
-
props: {
|
|
2309
|
-
disabled: { type: Boolean },
|
|
2310
|
-
destructive: { type: Boolean },
|
|
2311
|
-
shortcut: {},
|
|
2312
|
-
as: { default: "div" },
|
|
2313
|
-
checked: {
|
|
2314
|
-
type: Boolean,
|
|
2315
|
-
default: void 0
|
|
2316
|
-
}
|
|
2317
|
-
},
|
|
2318
|
-
emits: ["select"],
|
|
2319
|
-
setup(__props, { emit: __emit }) {
|
|
2320
|
-
const props = __props;
|
|
2321
|
-
const emit = __emit;
|
|
2322
|
-
const root = inject(MENU_ROOT);
|
|
2323
|
-
const level = inject(MENU_LEVEL);
|
|
2324
|
-
const el = ref(null);
|
|
2325
|
-
function onClick(event) {
|
|
2326
|
-
if (props.disabled) {
|
|
2327
|
-
event.preventDefault();
|
|
2328
|
-
return;
|
|
2329
|
-
}
|
|
2330
|
-
const selectEvent = new Event("select", { cancelable: true });
|
|
2331
|
-
emit("select", selectEvent);
|
|
2332
|
-
if (!selectEvent.defaultPrevented) root.close(true);
|
|
2333
|
-
}
|
|
2334
|
-
function resolve(target) {
|
|
2335
|
-
const value = target;
|
|
2336
|
-
return value instanceof HTMLElement ? value : value?.$el ?? null;
|
|
2337
|
-
}
|
|
2338
|
-
function onPointerMove() {
|
|
2339
|
-
level.scheduleSubClose();
|
|
2340
|
-
const node = resolve(el.value);
|
|
2341
|
-
if (props.disabled || !node || document.activeElement === node) return;
|
|
2342
|
-
focusElement(node);
|
|
2343
|
-
}
|
|
2344
|
-
function onPointerLeave() {
|
|
2345
|
-
const node = resolve(el.value);
|
|
2346
|
-
if (node && document.activeElement === node) focusElement(level.content.value);
|
|
2347
|
-
}
|
|
2348
|
-
return (_ctx, _cache) => {
|
|
2349
|
-
return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
|
|
2350
|
-
ref_key: "el",
|
|
2351
|
-
ref: el,
|
|
2352
|
-
role: __props.checked === void 0 ? "menuitem" : "menuitemradio",
|
|
2353
|
-
"aria-checked": __props.checked === void 0 ? void 0 : __props.checked,
|
|
2354
|
-
tabindex: "-1",
|
|
2355
|
-
class: normalizeClass(["j-menu__item", { "j-menu__item--destructive": __props.destructive }]),
|
|
2356
|
-
"aria-disabled": __props.disabled || void 0,
|
|
2357
|
-
onClick,
|
|
2358
|
-
onPointermove: onPointerMove,
|
|
2359
|
-
onPointerleave: onPointerLeave
|
|
2360
|
-
}, {
|
|
2361
|
-
default: withCtx(() => [
|
|
2362
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_1$35, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true),
|
|
2363
|
-
createElementVNode("span", _hoisted_2$25, [renderSlot(_ctx.$slots, "default")]),
|
|
2364
|
-
__props.shortcut ? (openBlock(), createElementBlock("span", _hoisted_3$21, toDisplayString(__props.shortcut), 1)) : createCommentVNode("", true),
|
|
2365
|
-
__props.checked !== void 0 ? (openBlock(), createBlock(unref(IconCheck), {
|
|
2366
|
-
key: 2,
|
|
2367
|
-
class: normalizeClass(["j-menu__check", { "is-checked": __props.checked }])
|
|
2368
|
-
}, null, 8, ["class"])) : createCommentVNode("", true)
|
|
2369
|
-
]),
|
|
2370
|
-
_: 3
|
|
2371
|
-
}, 40, [
|
|
2372
|
-
"role",
|
|
2373
|
-
"aria-checked",
|
|
2374
|
-
"class",
|
|
2375
|
-
"aria-disabled"
|
|
2376
|
-
]);
|
|
2377
|
-
};
|
|
2378
|
-
}
|
|
2379
|
-
});
|
|
2380
|
-
//#endregion
|
|
2381
1504
|
//#region src/components/dropdown-menu/JDropdownMenuLabel.vue?vue&type=script&setup=true&lang.ts
|
|
2382
|
-
var _hoisted_1$
|
|
1505
|
+
var _hoisted_1$33 = {
|
|
2383
1506
|
class: "j-menu__label",
|
|
2384
1507
|
role: "presentation"
|
|
2385
1508
|
};
|
|
@@ -2389,7 +1512,7 @@ var JDropdownMenuLabel_default = /* @__PURE__ */ defineComponent({
|
|
|
2389
1512
|
__name: "JDropdownMenuLabel",
|
|
2390
1513
|
setup(__props) {
|
|
2391
1514
|
return (_ctx, _cache) => {
|
|
2392
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1515
|
+
return openBlock(), createElementBlock("div", _hoisted_1$33, [renderSlot(_ctx.$slots, "default")]);
|
|
2393
1516
|
};
|
|
2394
1517
|
}
|
|
2395
1518
|
});
|
|
@@ -2403,27 +1526,27 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
2403
1526
|
//#endregion
|
|
2404
1527
|
//#region src/components/dropdown-menu/JDropdownMenuSeparator.vue
|
|
2405
1528
|
var _sfc_main = {};
|
|
2406
|
-
var _hoisted_1$
|
|
1529
|
+
var _hoisted_1$32 = {
|
|
2407
1530
|
role: "separator",
|
|
2408
1531
|
"aria-orientation": "horizontal",
|
|
2409
1532
|
class: "j-menu__separator"
|
|
2410
1533
|
};
|
|
2411
1534
|
function _sfc_render(_ctx, _cache) {
|
|
2412
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1535
|
+
return openBlock(), createElementBlock("div", _hoisted_1$32);
|
|
2413
1536
|
}
|
|
2414
1537
|
var JDropdownMenuSeparator_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
|
|
2415
1538
|
//#endregion
|
|
2416
1539
|
//#region src/components/dropdown-menu/JDropdownMenuSub.vue?vue&type=script&setup=true&lang.ts
|
|
2417
|
-
var _hoisted_1$
|
|
1540
|
+
var _hoisted_1$31 = [
|
|
2418
1541
|
"aria-expanded",
|
|
2419
1542
|
"aria-controls",
|
|
2420
1543
|
"aria-disabled"
|
|
2421
1544
|
];
|
|
2422
|
-
var _hoisted_2$
|
|
1545
|
+
var _hoisted_2$23 = {
|
|
2423
1546
|
key: 0,
|
|
2424
1547
|
class: "j-menu__icon"
|
|
2425
1548
|
};
|
|
2426
|
-
var _hoisted_3$
|
|
1549
|
+
var _hoisted_3$19 = { class: "j-menu__text" };
|
|
2427
1550
|
//#endregion
|
|
2428
1551
|
//#region src/components/dropdown-menu/JDropdownMenuSub.vue
|
|
2429
1552
|
var JDropdownMenuSub_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2497,10 +1620,10 @@ var JDropdownMenuSub_default = /* @__PURE__ */ defineComponent({
|
|
|
2497
1620
|
onKeydown,
|
|
2498
1621
|
onClick
|
|
2499
1622
|
}, [
|
|
2500
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
2501
|
-
createElementVNode("span", _hoisted_3$
|
|
1623
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$23, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true),
|
|
1624
|
+
createElementVNode("span", _hoisted_3$19, toDisplayString(__props.label), 1),
|
|
2502
1625
|
createVNode(unref(IconChevronRight), { class: "j-menu__chevron" })
|
|
2503
|
-
], 40, _hoisted_1$
|
|
1626
|
+
], 40, _hoisted_1$31), createVNode(JMenuContent_default, {
|
|
2504
1627
|
id: menuId,
|
|
2505
1628
|
ref_key: "sub",
|
|
2506
1629
|
ref: sub,
|
|
@@ -2531,19 +1654,19 @@ var JDropdownMenuSub_default = /* @__PURE__ */ defineComponent({
|
|
|
2531
1654
|
});
|
|
2532
1655
|
//#endregion
|
|
2533
1656
|
//#region src/components/empty-state/JEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
2534
|
-
var _hoisted_1$
|
|
1657
|
+
var _hoisted_1$30 = {
|
|
2535
1658
|
key: 0,
|
|
2536
1659
|
class: "j-empty-state__icon"
|
|
2537
1660
|
};
|
|
2538
|
-
var _hoisted_2$
|
|
1661
|
+
var _hoisted_2$22 = {
|
|
2539
1662
|
key: 1,
|
|
2540
1663
|
class: "j-empty-state__title"
|
|
2541
1664
|
};
|
|
2542
|
-
var _hoisted_3$
|
|
1665
|
+
var _hoisted_3$18 = {
|
|
2543
1666
|
key: 2,
|
|
2544
1667
|
class: "j-empty-state__description"
|
|
2545
1668
|
};
|
|
2546
|
-
var _hoisted_4$
|
|
1669
|
+
var _hoisted_4$13 = {
|
|
2547
1670
|
key: 3,
|
|
2548
1671
|
class: "j-empty-state__actions"
|
|
2549
1672
|
};
|
|
@@ -2559,26 +1682,26 @@ var JEmptyState_default = /* @__PURE__ */ defineComponent({
|
|
|
2559
1682
|
setup(__props) {
|
|
2560
1683
|
return (_ctx, _cache) => {
|
|
2561
1684
|
return openBlock(), createElementBlock("div", { class: normalizeClass(["j-empty-state", `j-empty-state--${__props.size}`]) }, [
|
|
2562
|
-
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2563
|
-
__props.title ? (openBlock(), createElementBlock("p", _hoisted_2$
|
|
2564
|
-
__props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2565
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1685
|
+
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_1$30, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("", true),
|
|
1686
|
+
__props.title ? (openBlock(), createElementBlock("p", _hoisted_2$22, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
1687
|
+
__props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3$18, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("", true),
|
|
1688
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_4$13, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true)
|
|
2566
1689
|
], 2);
|
|
2567
1690
|
};
|
|
2568
1691
|
}
|
|
2569
1692
|
});
|
|
2570
1693
|
//#endregion
|
|
2571
1694
|
//#region src/components/footer/JFooter.vue?vue&type=script&setup=true&lang.ts
|
|
2572
|
-
var _hoisted_1$
|
|
2573
|
-
var _hoisted_2$
|
|
1695
|
+
var _hoisted_1$29 = { class: "j-footer__inner" };
|
|
1696
|
+
var _hoisted_2$21 = {
|
|
2574
1697
|
key: 0,
|
|
2575
1698
|
class: "j-footer__top"
|
|
2576
1699
|
};
|
|
2577
|
-
var _hoisted_3$
|
|
1700
|
+
var _hoisted_3$17 = {
|
|
2578
1701
|
key: 0,
|
|
2579
1702
|
class: "j-footer__brand"
|
|
2580
1703
|
};
|
|
2581
|
-
var _hoisted_4$
|
|
1704
|
+
var _hoisted_4$12 = {
|
|
2582
1705
|
key: 1,
|
|
2583
1706
|
class: "j-footer__columns"
|
|
2584
1707
|
};
|
|
@@ -2604,13 +1727,13 @@ var JFooter_default = /* @__PURE__ */ defineComponent({
|
|
|
2604
1727
|
return openBlock(), createElementBlock("footer", {
|
|
2605
1728
|
class: normalizeClass(["j-footer", { "is-bordered": __props.bordered }]),
|
|
2606
1729
|
style: normalizeStyle(style.value)
|
|
2607
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
1730
|
+
}, [createElementVNode("div", _hoisted_1$29, [_ctx.$slots.brand || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_2$21, [_ctx.$slots.brand ? (openBlock(), createElementBlock("div", _hoisted_3$17, [renderSlot(_ctx.$slots, "brand")])) : createCommentVNode("", true), _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$12, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)])) : createCommentVNode("", true), _ctx.$slots.bottom ? (openBlock(), createElementBlock("div", _hoisted_5$9, [renderSlot(_ctx.$slots, "bottom")])) : createCommentVNode("", true)])], 6);
|
|
2608
1731
|
};
|
|
2609
1732
|
}
|
|
2610
1733
|
});
|
|
2611
1734
|
//#endregion
|
|
2612
1735
|
//#region src/components/footer/JFooterColumn.vue?vue&type=script&setup=true&lang.ts
|
|
2613
|
-
var _hoisted_1$
|
|
1736
|
+
var _hoisted_1$28 = { class: "j-footer-column__links" };
|
|
2614
1737
|
//#endregion
|
|
2615
1738
|
//#region src/components/footer/JFooterColumn.vue
|
|
2616
1739
|
var JFooterColumn_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2625,102 +1748,11 @@ var JFooterColumn_default = /* @__PURE__ */ defineComponent({
|
|
|
2625
1748
|
}, [createElementVNode("p", {
|
|
2626
1749
|
id: titleId,
|
|
2627
1750
|
class: "j-footer-column__title"
|
|
2628
|
-
}, toDisplayString(__props.title), 1), createElementVNode("div", _hoisted_1$
|
|
2629
|
-
};
|
|
2630
|
-
}
|
|
2631
|
-
});
|
|
2632
|
-
//#endregion
|
|
2633
|
-
//#region src/components/field/JFieldShell.vue?vue&type=script&setup=true&lang.ts
|
|
2634
|
-
var _hoisted_1$28 = {
|
|
2635
|
-
key: 0,
|
|
2636
|
-
class: "j-field__required",
|
|
2637
|
-
"aria-hidden": "true"
|
|
2638
|
-
};
|
|
2639
|
-
var _hoisted_2$21 = { class: "j-field__messages" };
|
|
2640
|
-
var _hoisted_3$17 = ["id"];
|
|
2641
|
-
var _hoisted_4$12 = ["id"];
|
|
2642
|
-
//#endregion
|
|
2643
|
-
//#region src/components/field/JFieldShell.vue
|
|
2644
|
-
var JFieldShell_default = /* @__PURE__ */ defineComponent({
|
|
2645
|
-
__name: "JFieldShell",
|
|
2646
|
-
props: {
|
|
2647
|
-
id: {},
|
|
2648
|
-
labelId: {},
|
|
2649
|
-
descriptionId: {},
|
|
2650
|
-
errorId: {},
|
|
2651
|
-
label: {},
|
|
2652
|
-
description: {},
|
|
2653
|
-
errorMessage: {},
|
|
2654
|
-
showDescription: { type: Boolean },
|
|
2655
|
-
required: { type: Boolean },
|
|
2656
|
-
disabled: { type: Boolean },
|
|
2657
|
-
labelFor: {}
|
|
2658
|
-
},
|
|
2659
|
-
setup(__props) {
|
|
2660
|
-
/**
|
|
2661
|
-
* Internal: lays out label, control, description and error for form fields.
|
|
2662
|
-
* Not exported | every field component composes it.
|
|
2663
|
-
*/
|
|
2664
|
-
return (_ctx, _cache) => {
|
|
2665
|
-
return openBlock(), createElementBlock("div", { class: normalizeClass(["j-field", { "is-disabled": __props.disabled }]) }, [
|
|
2666
|
-
__props.label || _ctx.$slots.label ? (openBlock(), createBlock(resolveDynamicComponent(__props.labelFor === null ? "span" : "label"), {
|
|
2667
|
-
key: 0,
|
|
2668
|
-
id: __props.labelId,
|
|
2669
|
-
class: "j-field__label",
|
|
2670
|
-
for: __props.labelFor === null ? void 0 : __props.labelFor ?? __props.id
|
|
2671
|
-
}, {
|
|
2672
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.label), 1)]), __props.required ? (openBlock(), createElementBlock("span", _hoisted_1$28, "*")) : createCommentVNode("", true)]),
|
|
2673
|
-
_: 3
|
|
2674
|
-
}, 8, ["id", "for"])) : createCommentVNode("", true),
|
|
2675
|
-
renderSlot(_ctx.$slots, "default"),
|
|
2676
|
-
createElementVNode("div", _hoisted_2$21, [createVNode(Transition, {
|
|
2677
|
-
name: "j-field-message",
|
|
2678
|
-
mode: "out-in"
|
|
2679
|
-
}, {
|
|
2680
|
-
default: withCtx(() => [__props.errorMessage ? (openBlock(), createElementBlock("p", {
|
|
2681
|
-
id: __props.errorId,
|
|
2682
|
-
key: __props.errorMessage,
|
|
2683
|
-
class: "j-field__error"
|
|
2684
|
-
}, toDisplayString(__props.errorMessage), 9, _hoisted_3$17)) : __props.showDescription ? (openBlock(), createElementBlock("p", {
|
|
2685
|
-
key: 1,
|
|
2686
|
-
id: __props.descriptionId,
|
|
2687
|
-
class: "j-field__description"
|
|
2688
|
-
}, toDisplayString(__props.description), 9, _hoisted_4$12)) : createCommentVNode("", true)]),
|
|
2689
|
-
_: 1
|
|
2690
|
-
})])
|
|
2691
|
-
], 2);
|
|
1751
|
+
}, toDisplayString(__props.title), 1), createElementVNode("div", _hoisted_1$28, [renderSlot(_ctx.$slots, "default")])]);
|
|
2692
1752
|
};
|
|
2693
1753
|
}
|
|
2694
1754
|
});
|
|
2695
1755
|
//#endregion
|
|
2696
|
-
//#region src/components/field/useField.ts
|
|
2697
|
-
/** Ids and ARIA wiring shared by every form control. */
|
|
2698
|
-
function useField(props) {
|
|
2699
|
-
const generated = useId();
|
|
2700
|
-
const p = () => toValue(props);
|
|
2701
|
-
const id = computed(() => p().id ?? `j-${generated}`);
|
|
2702
|
-
const labelId = computed(() => `${id.value}-label`);
|
|
2703
|
-
const descriptionId = computed(() => `${id.value}-description`);
|
|
2704
|
-
const errorId = computed(() => `${id.value}-error`);
|
|
2705
|
-
const invalid = computed(() => !!p().error);
|
|
2706
|
-
const errorMessage = computed(() => typeof p().error === "string" ? p().error : "");
|
|
2707
|
-
return {
|
|
2708
|
-
id,
|
|
2709
|
-
labelId,
|
|
2710
|
-
descriptionId,
|
|
2711
|
-
errorId,
|
|
2712
|
-
invalid,
|
|
2713
|
-
errorMessage,
|
|
2714
|
-
showDescription: computed(() => !!p().description && !errorMessage.value),
|
|
2715
|
-
describedBy: computed(() => {
|
|
2716
|
-
const ids = [];
|
|
2717
|
-
if (errorMessage.value) ids.push(errorId.value);
|
|
2718
|
-
else if (p().description) ids.push(descriptionId.value);
|
|
2719
|
-
return ids.length ? ids.join(" ") : void 0;
|
|
2720
|
-
})
|
|
2721
|
-
};
|
|
2722
|
-
}
|
|
2723
|
-
//#endregion
|
|
2724
1756
|
//#region src/components/input/JInput.vue?vue&type=script&setup=true&lang.ts
|
|
2725
1757
|
var _hoisted_1$27 = {
|
|
2726
1758
|
key: 0,
|
|
@@ -2855,39 +1887,6 @@ var JInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2855
1887
|
}
|
|
2856
1888
|
});
|
|
2857
1889
|
//#endregion
|
|
2858
|
-
//#region src/components/kbd/JKbd.vue
|
|
2859
|
-
var JKbd_default = /* @__PURE__ */ defineComponent({
|
|
2860
|
-
__name: "JKbd",
|
|
2861
|
-
props: {
|
|
2862
|
-
keys: {},
|
|
2863
|
-
size: { default: "md" }
|
|
2864
|
-
},
|
|
2865
|
-
setup(__props) {
|
|
2866
|
-
const props = __props;
|
|
2867
|
-
const mounted = ref(false);
|
|
2868
|
-
onMounted(() => mounted.value = true);
|
|
2869
|
-
const parts = computed(() => {
|
|
2870
|
-
if (!props.keys) return [];
|
|
2871
|
-
if (!mounted.value) return props.keys.split("+").map((part) => part === "mod" ? "Ctrl" : part.length === 1 ? part.toUpperCase() : part);
|
|
2872
|
-
return formatHotkey(props.keys);
|
|
2873
|
-
});
|
|
2874
|
-
return (_ctx, _cache) => {
|
|
2875
|
-
return __props.keys ? (openBlock(), createElementBlock("span", {
|
|
2876
|
-
key: 0,
|
|
2877
|
-
class: normalizeClass(["j-kbd-group", `j-kbd-group--${__props.size}`])
|
|
2878
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(parts.value, (part, i) => {
|
|
2879
|
-
return openBlock(), createElementBlock("kbd", {
|
|
2880
|
-
key: i,
|
|
2881
|
-
class: "j-kbd"
|
|
2882
|
-
}, toDisplayString(part), 1);
|
|
2883
|
-
}), 128))], 2)) : (openBlock(), createElementBlock("kbd", {
|
|
2884
|
-
key: 1,
|
|
2885
|
-
class: normalizeClass(["j-kbd", { "j-kbd--sm": __props.size === "sm" }])
|
|
2886
|
-
}, [renderSlot(_ctx.$slots, "default")], 2));
|
|
2887
|
-
};
|
|
2888
|
-
}
|
|
2889
|
-
});
|
|
2890
|
-
//#endregion
|
|
2891
1890
|
//#region src/components/navbar/JNavbar.vue?vue&type=script&setup=true&lang.ts
|
|
2892
1891
|
var _hoisted_1$26 = { class: "j-navbar__bar" };
|
|
2893
1892
|
var _hoisted_2$19 = {
|
|
@@ -5392,114 +4391,6 @@ var JToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
|
5392
4391
|
}
|
|
5393
4392
|
});
|
|
5394
4393
|
//#endregion
|
|
5395
|
-
//#region src/components/tooltip/JTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
5396
|
-
var warmUntil = 0;
|
|
5397
|
-
var WARM_WINDOW = 400;
|
|
5398
|
-
//#endregion
|
|
5399
|
-
//#region src/components/tooltip/JTooltip.vue
|
|
5400
|
-
var JTooltip_default = /* @__PURE__ */ defineComponent({
|
|
5401
|
-
__name: "JTooltip",
|
|
5402
|
-
props: {
|
|
5403
|
-
content: {},
|
|
5404
|
-
side: { default: "top" },
|
|
5405
|
-
align: { default: "center" },
|
|
5406
|
-
delay: { default: 450 },
|
|
5407
|
-
disabled: { type: Boolean }
|
|
5408
|
-
},
|
|
5409
|
-
setup(__props) {
|
|
5410
|
-
const props = __props;
|
|
5411
|
-
const id = `j-${useId()}-tooltip`;
|
|
5412
|
-
const open = ref(false);
|
|
5413
|
-
const triggerRef = ref();
|
|
5414
|
-
const triggerEl = computed(() => unrefElement(triggerRef.value));
|
|
5415
|
-
const floating = ref(null);
|
|
5416
|
-
const placement = computed(() => props.align === "center" ? props.side : `${props.side}-${props.align}`);
|
|
5417
|
-
const { styles } = useFloating(triggerEl, floating, () => ({
|
|
5418
|
-
placement: placement.value,
|
|
5419
|
-
offset: 6
|
|
5420
|
-
}));
|
|
5421
|
-
useLayer({
|
|
5422
|
-
active: open,
|
|
5423
|
-
elements: () => [triggerEl.value, floating.value],
|
|
5424
|
-
onEscape: () => hide(true)
|
|
5425
|
-
});
|
|
5426
|
-
let openTimer;
|
|
5427
|
-
let closeTimer;
|
|
5428
|
-
let suppressed = false;
|
|
5429
|
-
function show(immediate = false) {
|
|
5430
|
-
if (props.disabled || suppressed) return;
|
|
5431
|
-
clearTimeout(closeTimer);
|
|
5432
|
-
if (open.value) return;
|
|
5433
|
-
clearTimeout(openTimer);
|
|
5434
|
-
if (immediate || Date.now() < warmUntil) open.value = true;
|
|
5435
|
-
else openTimer = setTimeout(() => open.value = true, props.delay);
|
|
5436
|
-
}
|
|
5437
|
-
function hide(immediate = false) {
|
|
5438
|
-
clearTimeout(openTimer);
|
|
5439
|
-
clearTimeout(closeTimer);
|
|
5440
|
-
const close = () => {
|
|
5441
|
-
if (open.value) warmUntil = Date.now() + WARM_WINDOW;
|
|
5442
|
-
open.value = false;
|
|
5443
|
-
};
|
|
5444
|
-
if (immediate) close();
|
|
5445
|
-
else closeTimer = setTimeout(close, 80);
|
|
5446
|
-
}
|
|
5447
|
-
onBeforeUnmount(() => {
|
|
5448
|
-
clearTimeout(openTimer);
|
|
5449
|
-
clearTimeout(closeTimer);
|
|
5450
|
-
});
|
|
5451
|
-
const triggerProps = computed(() => ({
|
|
5452
|
-
"aria-describedby": props.disabled ? void 0 : id,
|
|
5453
|
-
"onPointerenter": (event) => event.pointerType === "mouse" && show(),
|
|
5454
|
-
"onPointerleave": (event) => {
|
|
5455
|
-
suppressed = false;
|
|
5456
|
-
if (event.pointerType === "mouse") hide();
|
|
5457
|
-
},
|
|
5458
|
-
"onPointerdown": () => {
|
|
5459
|
-
suppressed = true;
|
|
5460
|
-
hide(true);
|
|
5461
|
-
},
|
|
5462
|
-
"onFocus": (event) => {
|
|
5463
|
-
if (event.target.matches(":focus-visible")) show(true);
|
|
5464
|
-
},
|
|
5465
|
-
"onBlur": () => hide(true)
|
|
5466
|
-
}));
|
|
5467
|
-
return (_ctx, _cache) => {
|
|
5468
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
5469
|
-
createVNode(unref(JSlot), mergeProps({
|
|
5470
|
-
ref_key: "triggerRef",
|
|
5471
|
-
ref: triggerRef
|
|
5472
|
-
}, triggerProps.value), {
|
|
5473
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
5474
|
-
_: 3
|
|
5475
|
-
}, 16),
|
|
5476
|
-
!__props.disabled ? (openBlock(), createElementBlock("span", {
|
|
5477
|
-
key: 0,
|
|
5478
|
-
id,
|
|
5479
|
-
class: "j-sr-only"
|
|
5480
|
-
}, [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(__props.content), 1)])])) : createCommentVNode("", true),
|
|
5481
|
-
createVNode(JPortal_default, null, {
|
|
5482
|
-
default: withCtx(() => [createVNode(Transition, { name: "j-tooltip" }, {
|
|
5483
|
-
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", {
|
|
5484
|
-
key: 0,
|
|
5485
|
-
ref_key: "floating",
|
|
5486
|
-
ref: floating,
|
|
5487
|
-
class: "j-tooltip",
|
|
5488
|
-
style: normalizeStyle(unref(styles)),
|
|
5489
|
-
"aria-hidden": "true",
|
|
5490
|
-
"data-juxt-layer-ignore": "",
|
|
5491
|
-
onPointerenter: _cache[0] || (_cache[0] = ($event) => show(true)),
|
|
5492
|
-
onPointerleave: _cache[1] || (_cache[1] = ($event) => hide())
|
|
5493
|
-
}, [renderSlot(_ctx.$slots, "content", {}, () => [createTextVNode(toDisplayString(__props.content), 1)])], 36)) : createCommentVNode("", true)]),
|
|
5494
|
-
_: 3
|
|
5495
|
-
})]),
|
|
5496
|
-
_: 3
|
|
5497
|
-
})
|
|
5498
|
-
], 64);
|
|
5499
|
-
};
|
|
5500
|
-
}
|
|
5501
|
-
});
|
|
5502
|
-
//#endregion
|
|
5503
4394
|
//#region src/components/visually-hidden/JVisuallyHidden.vue
|
|
5504
4395
|
var JVisuallyHidden_default = /* @__PURE__ */ defineComponent({
|
|
5505
4396
|
__name: "JVisuallyHidden",
|