@juxtui/ui 0.2.0 → 0.4.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 +63 -62
- package/dist/components/aspect-ratio/JAspectRatio.vue.d.ts +18 -0
- package/dist/components/avatar/JAvatar.vue.d.ts +1 -1
- package/dist/components/avatar-group/JAvatarGroup.vue.d.ts +19 -0
- package/dist/components/banner/JBanner.vue.d.ts +30 -0
- package/dist/components/breadcrumb/JBreadcrumb.vue.d.ts +29 -0
- package/dist/components/burger/JBurger.vue.d.ts +25 -0
- package/dist/components/card/JCard.vue.d.ts +1 -1
- package/dist/components/collapsible/JCollapsible.vue.d.ts +28 -0
- package/dist/components/command-palette/JCommandPalette.vue.d.ts +1 -1
- package/dist/components/dropdown-menu/JDropdownMenu.vue.d.ts +1 -1
- package/dist/components/empty-state/JEmptyState.vue.d.ts +23 -0
- package/dist/components/field/JFieldShell.vue.d.ts +1 -1
- package/dist/components/footer/JFooter.vue.d.ts +26 -0
- package/dist/components/footer/JFooterColumn.vue.d.ts +15 -0
- package/dist/components/navbar/JNavbar.vue.d.ts +47 -0
- package/dist/components/navbar/JNavbarLink.vue.d.ts +22 -0
- package/dist/components/pagination/JPagination.vue.d.ts +25 -0
- package/dist/components/primitives/JSlot.d.ts +1 -1
- package/dist/components/rating/JRating.vue.d.ts +27 -0
- package/dist/components/sidebar/JSidebar.vue.d.ts +23 -0
- package/dist/components/sidebar/JSidebarGroup.vue.d.ts +29 -0
- package/dist/components/sidebar/JSidebarItem.vue.d.ts +26 -0
- package/dist/components/slider/JSlider.vue.d.ts +31 -0
- package/dist/components/stat/JStat.vue.d.ts +22 -0
- package/dist/components/tag/JTag.vue.d.ts +28 -0
- package/dist/components/timeline/JTimeline.vue.d.ts +12 -0
- package/dist/components/timeline/JTimelineItem.vue.d.ts +24 -0
- package/dist/components/toast/JToaster.vue.d.ts +1 -1
- package/dist/components/toggle-group/JToggleGroup.vue.d.ts +33 -0
- package/dist/components/toggle-group/JToggleGroupItem.vue.d.ts +19 -0
- package/dist/components/toggle-group/context.d.ts +9 -0
- package/dist/components/visually-hidden/JVisuallyHidden.vue.d.ts +19 -0
- package/dist/components.d.ts +24 -0
- package/dist/composables/useModal.d.ts +1 -1
- package/dist/composables/useToast.d.ts +1 -1
- package/dist/icons.d.ts +4 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +1583 -218
- package/dist/index.js.map +1 -1
- package/dist/nuxt.js +25 -1
- package/dist/nuxt.js.map +1 -1
- package/dist/style.css +2147 -606
- package/dist/tokens.css +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Comment, Fragment, Teleport, Text, Transition, TransitionGroup, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineComponent, h, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, reactive, readonly, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useId, useModel, vModelDynamic, vModelText, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
1
|
+
import { Comment, Fragment, Teleport, Text, Transition, TransitionGroup, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createStaticVNode, createTextVNode, createVNode, defineComponent, h, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, reactive, readonly, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useId, useModel, useSlots, vModelDynamic, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
2
2
|
import { autoUpdate, computePosition, flip, offset, shift, size } from "@floating-ui/dom";
|
|
3
3
|
//#region \0rolldown/runtime.js
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -192,6 +192,32 @@ var IconInfo = icon("IconInfo", () => [
|
|
|
192
192
|
})
|
|
193
193
|
]);
|
|
194
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" })]);
|
|
195
221
|
/** The loading spinner used across Juxt. A quarter arc over a faint track. */
|
|
196
222
|
var Spinner = (props) => {
|
|
197
223
|
const size = props.size ?? 16;
|
|
@@ -220,12 +246,12 @@ var Spinner = (props) => {
|
|
|
220
246
|
Spinner.displayName = "JSpinner";
|
|
221
247
|
//#endregion
|
|
222
248
|
//#region src/components/accordion/JAccordionItem.vue?vue&type=script&setup=true&lang.ts
|
|
223
|
-
var _hoisted_1$
|
|
224
|
-
var _hoisted_2$
|
|
225
|
-
var _hoisted_3$
|
|
226
|
-
var _hoisted_4$
|
|
227
|
-
var _hoisted_5$
|
|
228
|
-
var _hoisted_6$
|
|
249
|
+
var _hoisted_1$51 = ["data-state"];
|
|
250
|
+
var _hoisted_2$38 = ["aria-expanded", "disabled"];
|
|
251
|
+
var _hoisted_3$32 = { class: "j-accordion__title" };
|
|
252
|
+
var _hoisted_4$25 = ["inert"];
|
|
253
|
+
var _hoisted_5$19 = { class: "j-accordion__panel-inner" };
|
|
254
|
+
var _hoisted_6$11 = { class: "j-accordion__content" };
|
|
229
255
|
//#endregion
|
|
230
256
|
//#region src/components/accordion/JAccordionItem.vue
|
|
231
257
|
var JAccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
@@ -256,7 +282,7 @@ var JAccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
256
282
|
"aria-controls": panelId,
|
|
257
283
|
disabled: __props.disabled,
|
|
258
284
|
onClick: _cache[0] || (_cache[0] = ($event) => unref(accordion).toggle(__props.value))
|
|
259
|
-
}, [createElementVNode("span", _hoisted_3$
|
|
285
|
+
}, [createElementVNode("span", _hoisted_3$32, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])]), createVNode(unref(IconChevronDown), { class: "j-accordion__chevron" })], 8, _hoisted_2$38)]),
|
|
260
286
|
_: 3
|
|
261
287
|
})), createElementVNode("div", {
|
|
262
288
|
id: panelId,
|
|
@@ -264,27 +290,27 @@ var JAccordionItem_default = /* @__PURE__ */ defineComponent({
|
|
|
264
290
|
class: "j-accordion__panel",
|
|
265
291
|
"aria-labelledby": triggerId,
|
|
266
292
|
inert: !open.value
|
|
267
|
-
}, [createElementVNode("div", _hoisted_5$
|
|
293
|
+
}, [createElementVNode("div", _hoisted_5$19, [createElementVNode("div", _hoisted_6$11, [renderSlot(_ctx.$slots, "default")])])], 8, _hoisted_4$25)], 10, _hoisted_1$51);
|
|
268
294
|
};
|
|
269
295
|
}
|
|
270
296
|
});
|
|
271
297
|
//#endregion
|
|
272
298
|
//#region src/components/alert/JAlert.vue?vue&type=script&setup=true&lang.ts
|
|
273
|
-
var _hoisted_1$
|
|
299
|
+
var _hoisted_1$50 = {
|
|
274
300
|
key: 0,
|
|
275
301
|
class: "j-alert__icon",
|
|
276
302
|
"aria-hidden": "true"
|
|
277
303
|
};
|
|
278
|
-
var _hoisted_2$
|
|
279
|
-
var _hoisted_3$
|
|
304
|
+
var _hoisted_2$37 = { class: "j-alert__body" };
|
|
305
|
+
var _hoisted_3$31 = {
|
|
280
306
|
key: 0,
|
|
281
307
|
class: "j-alert__title"
|
|
282
308
|
};
|
|
283
|
-
var _hoisted_4$
|
|
309
|
+
var _hoisted_4$24 = {
|
|
284
310
|
key: 1,
|
|
285
311
|
class: "j-alert__description"
|
|
286
312
|
};
|
|
287
|
-
var _hoisted_5$
|
|
313
|
+
var _hoisted_5$18 = {
|
|
288
314
|
key: 2,
|
|
289
315
|
class: "j-alert__actions"
|
|
290
316
|
};
|
|
@@ -311,11 +337,11 @@ var JAlert_default = /* @__PURE__ */ defineComponent({
|
|
|
311
337
|
};
|
|
312
338
|
return (_ctx, _cache) => {
|
|
313
339
|
return openBlock(), createElementBlock("div", { class: normalizeClass(["j-alert", `j-alert--${__props.variant}`]) }, [
|
|
314
|
-
!__props.hideIcon ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
315
|
-
createElementVNode("div", _hoisted_2$
|
|
316
|
-
__props.title ? (openBlock(), createElementBlock("p", _hoisted_3$
|
|
317
|
-
__props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
318
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
340
|
+
!__props.hideIcon ? (openBlock(), createElementBlock("span", _hoisted_1$50, [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(icons[__props.variant])))])])) : createCommentVNode("", true),
|
|
341
|
+
createElementVNode("div", _hoisted_2$37, [
|
|
342
|
+
__props.title ? (openBlock(), createElementBlock("p", _hoisted_3$31, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
343
|
+
__props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$24, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("", true),
|
|
344
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$18, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true)
|
|
319
345
|
]),
|
|
320
346
|
__props.dismissible ? (openBlock(), createElementBlock("button", {
|
|
321
347
|
key: 1,
|
|
@@ -329,20 +355,39 @@ var JAlert_default = /* @__PURE__ */ defineComponent({
|
|
|
329
355
|
}
|
|
330
356
|
});
|
|
331
357
|
//#endregion
|
|
358
|
+
//#region src/components/aspect-ratio/JAspectRatio.vue?vue&type=script&setup=true&lang.ts
|
|
359
|
+
var _hoisted_1$49 = { class: "j-aspect-ratio__content" };
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region src/components/aspect-ratio/JAspectRatio.vue
|
|
362
|
+
var JAspectRatio_default = /* @__PURE__ */ defineComponent({
|
|
363
|
+
__name: "JAspectRatio",
|
|
364
|
+
props: { ratio: { default: 16 / 9 } },
|
|
365
|
+
setup(__props) {
|
|
366
|
+
const props = __props;
|
|
367
|
+
const style = computed(() => ({ "--j-aspect-ratio": String(props.ratio) }));
|
|
368
|
+
return (_ctx, _cache) => {
|
|
369
|
+
return openBlock(), createElementBlock("div", {
|
|
370
|
+
class: "j-aspect-ratio",
|
|
371
|
+
style: normalizeStyle(style.value)
|
|
372
|
+
}, [createElementVNode("div", _hoisted_1$49, [renderSlot(_ctx.$slots, "default")])], 4);
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
//#endregion
|
|
332
377
|
//#region src/components/avatar/JAvatar.vue?vue&type=script&setup=true&lang.ts
|
|
333
|
-
var _hoisted_1$
|
|
378
|
+
var _hoisted_1$48 = [
|
|
334
379
|
"role",
|
|
335
380
|
"aria-label",
|
|
336
381
|
"data-state"
|
|
337
382
|
];
|
|
338
|
-
var _hoisted_2$
|
|
339
|
-
var _hoisted_3$
|
|
340
|
-
var _hoisted_4$
|
|
383
|
+
var _hoisted_2$36 = { class: "j-avatar__frame" };
|
|
384
|
+
var _hoisted_3$30 = ["src"];
|
|
385
|
+
var _hoisted_4$23 = {
|
|
341
386
|
key: 1,
|
|
342
387
|
class: "j-avatar__fallback",
|
|
343
388
|
"aria-hidden": "true"
|
|
344
389
|
};
|
|
345
|
-
var _hoisted_5$
|
|
390
|
+
var _hoisted_5$17 = {
|
|
346
391
|
key: 1,
|
|
347
392
|
viewBox: "0 0 16 16",
|
|
348
393
|
fill: "currentColor",
|
|
@@ -394,7 +439,7 @@ var JAvatar_default = /* @__PURE__ */ defineComponent({
|
|
|
394
439
|
role: label.value ? "img" : void 0,
|
|
395
440
|
"aria-label": label.value,
|
|
396
441
|
"data-state": state.value
|
|
397
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
442
|
+
}, [createElementVNode("span", _hoisted_2$36, [__props.src && state.value !== "error" ? (openBlock(), createElementBlock("img", {
|
|
398
443
|
key: 0,
|
|
399
444
|
ref_key: "img",
|
|
400
445
|
ref: img,
|
|
@@ -403,7 +448,7 @@ var JAvatar_default = /* @__PURE__ */ defineComponent({
|
|
|
403
448
|
alt: "",
|
|
404
449
|
onLoad: _cache[0] || (_cache[0] = ($event) => state.value = "loaded"),
|
|
405
450
|
onError: _cache[1] || (_cache[1] = ($event) => state.value = "error")
|
|
406
|
-
}, null, 40, _hoisted_3$
|
|
451
|
+
}, null, 40, _hoisted_3$30)) : createCommentVNode("", true), state.value !== "loaded" ? (openBlock(), createElementBlock("span", _hoisted_4$23, [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", {
|
|
407
452
|
cx: "8",
|
|
408
453
|
cy: "6",
|
|
409
454
|
r: "2.75"
|
|
@@ -411,18 +456,67 @@ var JAvatar_default = /* @__PURE__ */ defineComponent({
|
|
|
411
456
|
key: 0,
|
|
412
457
|
class: normalizeClass(["j-avatar__status", `j-avatar__status--${__props.status}`]),
|
|
413
458
|
"aria-hidden": "true"
|
|
414
|
-
}, null, 2)) : createCommentVNode("", true)], 10, _hoisted_1$
|
|
459
|
+
}, null, 2)) : createCommentVNode("", true)], 10, _hoisted_1$48);
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/components/avatar-group/JAvatarGroup.vue?vue&type=script&setup=true&lang.ts
|
|
465
|
+
var _hoisted_1$47 = ["aria-label"];
|
|
466
|
+
var _hoisted_2$35 = ["aria-label"];
|
|
467
|
+
//#endregion
|
|
468
|
+
//#region src/components/avatar-group/JAvatarGroup.vue
|
|
469
|
+
var JAvatarGroup_default = /* @__PURE__ */ defineComponent({
|
|
470
|
+
__name: "JAvatarGroup",
|
|
471
|
+
props: {
|
|
472
|
+
items: {},
|
|
473
|
+
max: {},
|
|
474
|
+
size: { default: "md" },
|
|
475
|
+
shape: { default: "circle" },
|
|
476
|
+
label: {}
|
|
477
|
+
},
|
|
478
|
+
setup(__props) {
|
|
479
|
+
const props = __props;
|
|
480
|
+
const visible = computed(() => props.max ? props.items.slice(0, props.max) : props.items);
|
|
481
|
+
const overflow = computed(() => Math.max(0, props.items.length - visible.value.length));
|
|
482
|
+
const groupLabel = computed(() => props.label ?? `${props.items.length} ${props.items.length === 1 ? "avatar" : "avatars"}`);
|
|
483
|
+
return (_ctx, _cache) => {
|
|
484
|
+
return openBlock(), createElementBlock("div", {
|
|
485
|
+
class: normalizeClass(["j-avatar-group", `j-avatar-group--${__props.size}`]),
|
|
486
|
+
role: "group",
|
|
487
|
+
"aria-label": groupLabel.value
|
|
488
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(visible.value, (item, index) => {
|
|
489
|
+
return openBlock(), createElementBlock("span", {
|
|
490
|
+
key: index,
|
|
491
|
+
class: "j-avatar-group__item"
|
|
492
|
+
}, [createVNode(JAvatar_default, {
|
|
493
|
+
src: item.src,
|
|
494
|
+
name: item.name,
|
|
495
|
+
size: __props.size,
|
|
496
|
+
shape: __props.shape
|
|
497
|
+
}, null, 8, [
|
|
498
|
+
"src",
|
|
499
|
+
"name",
|
|
500
|
+
"size",
|
|
501
|
+
"shape"
|
|
502
|
+
])]);
|
|
503
|
+
}), 128)), overflow.value > 0 ? (openBlock(), createElementBlock("span", {
|
|
504
|
+
key: 0,
|
|
505
|
+
class: normalizeClass(["j-avatar-group__item j-avatar-group__overflow j-focusable", { "j-avatar-group__overflow--square": __props.shape === "square" }]),
|
|
506
|
+
tabindex: "0",
|
|
507
|
+
"aria-label": `${overflow.value} more`
|
|
508
|
+
}, " +" + toDisplayString(overflow.value), 11, _hoisted_2$35)) : createCommentVNode("", true)], 10, _hoisted_1$47);
|
|
415
509
|
};
|
|
416
510
|
}
|
|
417
511
|
});
|
|
418
512
|
//#endregion
|
|
419
513
|
//#region src/components/badge/JBadge.vue?vue&type=script&setup=true&lang.ts
|
|
420
|
-
var _hoisted_1$
|
|
514
|
+
var _hoisted_1$46 = {
|
|
421
515
|
key: 0,
|
|
422
516
|
class: "j-badge__marker",
|
|
423
517
|
"aria-hidden": "true"
|
|
424
518
|
};
|
|
425
|
-
var _hoisted_2$
|
|
519
|
+
var _hoisted_2$34 = {
|
|
426
520
|
key: 1,
|
|
427
521
|
class: "j-badge__icon"
|
|
428
522
|
};
|
|
@@ -441,22 +535,192 @@ var JBadge_default = /* @__PURE__ */ defineComponent({
|
|
|
441
535
|
`j-badge--${__props.variant}`,
|
|
442
536
|
`j-badge--${__props.size}`,
|
|
443
537
|
{ "j-badge--status": __props.dot }
|
|
444
|
-
]]) }, [__props.dot ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
538
|
+
]]) }, [__props.dot ? (openBlock(), createElementBlock("span", _hoisted_1$46)) : _ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$34, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 2);
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
});
|
|
542
|
+
//#endregion
|
|
543
|
+
//#region src/components/banner/JBanner.vue?vue&type=script&setup=true&lang.ts
|
|
544
|
+
var _hoisted_1$45 = ["aria-label"];
|
|
545
|
+
var _hoisted_2$33 = {
|
|
546
|
+
key: 0,
|
|
547
|
+
class: "j-banner__icon",
|
|
548
|
+
"aria-hidden": "true"
|
|
549
|
+
};
|
|
550
|
+
var _hoisted_3$29 = { class: "j-banner__body" };
|
|
551
|
+
var _hoisted_4$22 = {
|
|
552
|
+
key: 0,
|
|
553
|
+
class: "j-banner__title"
|
|
554
|
+
};
|
|
555
|
+
var _hoisted_5$16 = {
|
|
556
|
+
key: 1,
|
|
557
|
+
class: "j-banner__description"
|
|
558
|
+
};
|
|
559
|
+
var _hoisted_6$10 = {
|
|
560
|
+
key: 1,
|
|
561
|
+
class: "j-banner__actions"
|
|
562
|
+
};
|
|
563
|
+
//#endregion
|
|
564
|
+
//#region src/components/banner/JBanner.vue
|
|
565
|
+
var JBanner_default = /* @__PURE__ */ defineComponent({
|
|
566
|
+
__name: "JBanner",
|
|
567
|
+
props: {
|
|
568
|
+
variant: { default: "neutral" },
|
|
569
|
+
title: {},
|
|
570
|
+
description: {},
|
|
571
|
+
dismissible: { type: Boolean },
|
|
572
|
+
hideIcon: { type: Boolean }
|
|
573
|
+
},
|
|
574
|
+
emits: ["dismiss"],
|
|
575
|
+
setup(__props, { emit: __emit }) {
|
|
576
|
+
const emit = __emit;
|
|
577
|
+
const icons = {
|
|
578
|
+
neutral: IconInfo,
|
|
579
|
+
info: IconInfo,
|
|
580
|
+
success: IconCircleCheck,
|
|
581
|
+
warning: IconAlert,
|
|
582
|
+
destructive: IconCircleX
|
|
583
|
+
};
|
|
584
|
+
return (_ctx, _cache) => {
|
|
585
|
+
return openBlock(), createElementBlock("div", {
|
|
586
|
+
class: normalizeClass(["j-banner", `j-banner--${__props.variant}`]),
|
|
587
|
+
role: "region",
|
|
588
|
+
"aria-label": __props.title
|
|
589
|
+
}, [
|
|
590
|
+
!__props.hideIcon ? (openBlock(), createElementBlock("span", _hoisted_2$33, [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createBlock(resolveDynamicComponent(icons[__props.variant])))])])) : createCommentVNode("", true),
|
|
591
|
+
createElementVNode("div", _hoisted_3$29, [__props.title ? (openBlock(), createElementBlock("p", _hoisted_4$22, 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
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_6$10, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true),
|
|
593
|
+
__props.dismissible ? (openBlock(), createElementBlock("button", {
|
|
594
|
+
key: 2,
|
|
595
|
+
type: "button",
|
|
596
|
+
class: "j-banner__close j-focusable",
|
|
597
|
+
"aria-label": "Dismiss",
|
|
598
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("dismiss"))
|
|
599
|
+
}, [createVNode(unref(IconX))])) : createCommentVNode("", true)
|
|
600
|
+
], 10, _hoisted_1$45);
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
//#endregion
|
|
605
|
+
//#region src/components/breadcrumb/JBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
606
|
+
var _hoisted_1$44 = ["aria-label"];
|
|
607
|
+
var _hoisted_2$32 = { class: "j-breadcrumb__list" };
|
|
608
|
+
var _hoisted_3$28 = {
|
|
609
|
+
key: 0,
|
|
610
|
+
class: "j-breadcrumb__ellipsis",
|
|
611
|
+
"aria-hidden": "true"
|
|
612
|
+
};
|
|
613
|
+
var _hoisted_4$21 = ["href"];
|
|
614
|
+
var _hoisted_5$15 = ["aria-current"];
|
|
615
|
+
//#endregion
|
|
616
|
+
//#region src/components/breadcrumb/JBreadcrumb.vue
|
|
617
|
+
var JBreadcrumb_default = /* @__PURE__ */ defineComponent({
|
|
618
|
+
__name: "JBreadcrumb",
|
|
619
|
+
props: {
|
|
620
|
+
items: {},
|
|
621
|
+
label: {},
|
|
622
|
+
maxItems: {}
|
|
623
|
+
},
|
|
624
|
+
setup(__props) {
|
|
625
|
+
const props = __props;
|
|
626
|
+
/**
|
|
627
|
+
* Provide `items` for the common case, or omit it and pass your own `<li>`
|
|
628
|
+
* elements (with class `j-breadcrumb__item`) into the default slot for full
|
|
629
|
+
* control over each crumb.
|
|
630
|
+
*/
|
|
631
|
+
const visibleItems = computed(() => {
|
|
632
|
+
const list = props.items ?? [];
|
|
633
|
+
if (!props.maxItems || list.length <= props.maxItems) return list;
|
|
634
|
+
const tailCount = Math.max(1, props.maxItems - 2);
|
|
635
|
+
return [
|
|
636
|
+
list[0],
|
|
637
|
+
{
|
|
638
|
+
label: "…",
|
|
639
|
+
ellipsis: true
|
|
640
|
+
},
|
|
641
|
+
...list.slice(-tailCount)
|
|
642
|
+
];
|
|
643
|
+
});
|
|
644
|
+
return (_ctx, _cache) => {
|
|
645
|
+
return openBlock(), createElementBlock("nav", {
|
|
646
|
+
class: "j-breadcrumb",
|
|
647
|
+
"aria-label": __props.label || "Breadcrumb"
|
|
648
|
+
}, [createElementVNode("ol", _hoisted_2$32, [__props.items && __props.items.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(visibleItems.value, (item, index) => {
|
|
649
|
+
return openBlock(), createElementBlock("li", {
|
|
650
|
+
key: `${item.label}-${index}`,
|
|
651
|
+
class: "j-breadcrumb__item"
|
|
652
|
+
}, [item.ellipsis ? (openBlock(), createElementBlock("span", _hoisted_3$28, toDisplayString(item.label), 1)) : item.href && index !== visibleItems.value.length - 1 ? (openBlock(), createElementBlock("a", {
|
|
653
|
+
key: 1,
|
|
654
|
+
class: "j-breadcrumb__link j-focusable",
|
|
655
|
+
href: item.href
|
|
656
|
+
}, toDisplayString(item.label), 9, _hoisted_4$21)) : (openBlock(), createElementBlock("span", {
|
|
657
|
+
key: 2,
|
|
658
|
+
class: "j-breadcrumb__current",
|
|
659
|
+
"aria-current": index === visibleItems.value.length - 1 ? "page" : void 0
|
|
660
|
+
}, toDisplayString(item.label), 9, _hoisted_5$15))]);
|
|
661
|
+
}), 128)) : renderSlot(_ctx.$slots, "default", {}, void 0, void 0, 1)])], 8, _hoisted_1$44);
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
});
|
|
665
|
+
//#endregion
|
|
666
|
+
//#region src/components/burger/JBurger.vue?vue&type=script&setup=true&lang.ts
|
|
667
|
+
var _hoisted_1$43 = [
|
|
668
|
+
"data-state",
|
|
669
|
+
"aria-expanded",
|
|
670
|
+
"aria-controls",
|
|
671
|
+
"aria-label"
|
|
672
|
+
];
|
|
673
|
+
//#endregion
|
|
674
|
+
//#region src/components/burger/JBurger.vue
|
|
675
|
+
var JBurger_default = /* @__PURE__ */ defineComponent({
|
|
676
|
+
__name: "JBurger",
|
|
677
|
+
props: /*@__PURE__*/ mergeModels({
|
|
678
|
+
openLabel: { default: "Open menu" },
|
|
679
|
+
closeLabel: { default: "Close menu" },
|
|
680
|
+
size: { default: "md" },
|
|
681
|
+
controls: {}
|
|
682
|
+
}, {
|
|
683
|
+
"modelValue": {
|
|
684
|
+
type: Boolean,
|
|
685
|
+
default: false
|
|
686
|
+
},
|
|
687
|
+
"modelModifiers": {}
|
|
688
|
+
}),
|
|
689
|
+
emits: ["update:modelValue"],
|
|
690
|
+
setup(__props) {
|
|
691
|
+
const open = useModel(__props, "modelValue");
|
|
692
|
+
return (_ctx, _cache) => {
|
|
693
|
+
return openBlock(), createElementBlock("button", {
|
|
694
|
+
type: "button",
|
|
695
|
+
class: normalizeClass(["j-burger j-focusable", `j-burger--${__props.size}`]),
|
|
696
|
+
"data-state": open.value ? "open" : "closed",
|
|
697
|
+
"aria-expanded": open.value,
|
|
698
|
+
"aria-controls": __props.controls,
|
|
699
|
+
"aria-label": open.value ? __props.closeLabel : __props.openLabel,
|
|
700
|
+
onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
|
|
701
|
+
}, [..._cache[1] || (_cache[1] = [createElementVNode("span", {
|
|
702
|
+
class: "j-burger__lines",
|
|
703
|
+
"aria-hidden": "true"
|
|
704
|
+
}, [
|
|
705
|
+
createElementVNode("span", { class: "j-burger__line" }),
|
|
706
|
+
createElementVNode("span", { class: "j-burger__line" }),
|
|
707
|
+
createElementVNode("span", { class: "j-burger__line" })
|
|
708
|
+
], -1)])], 10, _hoisted_1$43);
|
|
445
709
|
};
|
|
446
710
|
}
|
|
447
711
|
});
|
|
448
712
|
//#endregion
|
|
449
713
|
//#region src/components/button/JButton.vue?vue&type=script&setup=true&lang.ts
|
|
450
|
-
var _hoisted_1$
|
|
451
|
-
var _hoisted_2$
|
|
714
|
+
var _hoisted_1$42 = { class: "j-button__content" };
|
|
715
|
+
var _hoisted_2$31 = {
|
|
452
716
|
key: 0,
|
|
453
717
|
class: "j-button__icon"
|
|
454
718
|
};
|
|
455
|
-
var _hoisted_3$
|
|
719
|
+
var _hoisted_3$27 = {
|
|
456
720
|
key: 1,
|
|
457
721
|
class: "j-button__icon"
|
|
458
722
|
};
|
|
459
|
-
var _hoisted_4$
|
|
723
|
+
var _hoisted_4$20 = {
|
|
460
724
|
key: 0,
|
|
461
725
|
class: "j-button__spinner"
|
|
462
726
|
};
|
|
@@ -510,12 +774,12 @@ var JButton_default = /* @__PURE__ */ defineComponent({
|
|
|
510
774
|
"data-disabled": __props.disabled || void 0,
|
|
511
775
|
onClickCapture: onClick
|
|
512
776
|
}), {
|
|
513
|
-
default: withCtx(() => [createElementVNode("span", _hoisted_1$
|
|
514
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
777
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_1$42, [
|
|
778
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$31, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true),
|
|
515
779
|
renderSlot(_ctx.$slots, "default"),
|
|
516
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
780
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_3$27, [renderSlot(_ctx.$slots, "trailing")])) : createCommentVNode("", true)
|
|
517
781
|
]), createVNode(Transition, { name: "j-button-spinner" }, {
|
|
518
|
-
default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
782
|
+
default: withCtx(() => [__props.loading ? (openBlock(), createElementBlock("span", _hoisted_4$20, [createVNode(unref(Spinner), { size: __props.size === "xs" ? 12 : __props.size === "lg" ? 16 : 14 }, null, 8, ["size"])])) : createCommentVNode("", true)]),
|
|
519
783
|
_: 1
|
|
520
784
|
})]),
|
|
521
785
|
_: 3
|
|
@@ -529,28 +793,28 @@ var JButton_default = /* @__PURE__ */ defineComponent({
|
|
|
529
793
|
});
|
|
530
794
|
//#endregion
|
|
531
795
|
//#region src/components/card/JCard.vue?vue&type=script&setup=true&lang.ts
|
|
532
|
-
var _hoisted_1$
|
|
796
|
+
var _hoisted_1$41 = {
|
|
533
797
|
key: 0,
|
|
534
798
|
class: "j-card__header"
|
|
535
799
|
};
|
|
536
|
-
var _hoisted_2$
|
|
537
|
-
var _hoisted_3$
|
|
800
|
+
var _hoisted_2$30 = { class: "j-card__heading" };
|
|
801
|
+
var _hoisted_3$26 = {
|
|
538
802
|
key: 0,
|
|
539
803
|
class: "j-card__title"
|
|
540
804
|
};
|
|
541
|
-
var _hoisted_4$
|
|
805
|
+
var _hoisted_4$19 = {
|
|
542
806
|
key: 1,
|
|
543
807
|
class: "j-card__description"
|
|
544
808
|
};
|
|
545
|
-
var _hoisted_5$
|
|
809
|
+
var _hoisted_5$14 = {
|
|
546
810
|
key: 0,
|
|
547
811
|
class: "j-card__actions"
|
|
548
812
|
};
|
|
549
|
-
var _hoisted_6$
|
|
813
|
+
var _hoisted_6$9 = {
|
|
550
814
|
key: 1,
|
|
551
815
|
class: "j-card__body"
|
|
552
816
|
};
|
|
553
|
-
var _hoisted_7$
|
|
817
|
+
var _hoisted_7$5 = {
|
|
554
818
|
key: 2,
|
|
555
819
|
class: "j-card__footer"
|
|
556
820
|
};
|
|
@@ -569,9 +833,9 @@ var JCard_default = /* @__PURE__ */ defineComponent({
|
|
|
569
833
|
return (_ctx, _cache) => {
|
|
570
834
|
return openBlock(), createBlock(resolveDynamicComponent(__props.as), { class: normalizeClass(["j-card", [`j-card--${__props.variant}`, `j-card--p-${__props.padding}`]]) }, {
|
|
571
835
|
default: withCtx(() => [
|
|
572
|
-
__props.title || __props.description || _ctx.$slots.header || _ctx.$slots.actions ? (openBlock(), createElementBlock("header", _hoisted_1$
|
|
573
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
574
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_7$
|
|
836
|
+
__props.title || __props.description || _ctx.$slots.header || _ctx.$slots.actions ? (openBlock(), createElementBlock("header", _hoisted_1$41, [renderSlot(_ctx.$slots, "header", {}, () => [createElementVNode("div", _hoisted_2$30, [__props.title ? (openBlock(), createElementBlock("h3", _hoisted_3$26, toDisplayString(__props.title), 1)) : createCommentVNode("", true), __props.description ? (openBlock(), createElementBlock("p", _hoisted_4$19, toDisplayString(__props.description), 1)) : createCommentVNode("", true)])]), _ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$14, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
837
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_6$9, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true),
|
|
838
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_7$5, [renderSlot(_ctx.$slots, "footer")])) : createCommentVNode("", true)
|
|
575
839
|
]),
|
|
576
840
|
_: 3
|
|
577
841
|
}, 8, ["class"]);
|
|
@@ -580,9 +844,9 @@ var JCard_default = /* @__PURE__ */ defineComponent({
|
|
|
580
844
|
});
|
|
581
845
|
//#endregion
|
|
582
846
|
//#region src/components/checkbox/JCheckbox.vue?vue&type=script&setup=true&lang.ts
|
|
583
|
-
var _hoisted_1$
|
|
584
|
-
var _hoisted_2$
|
|
585
|
-
var _hoisted_3$
|
|
847
|
+
var _hoisted_1$40 = ["data-state"];
|
|
848
|
+
var _hoisted_2$29 = { class: "j-checkbox__control" };
|
|
849
|
+
var _hoisted_3$25 = [
|
|
586
850
|
"id",
|
|
587
851
|
"checked",
|
|
588
852
|
"disabled",
|
|
@@ -591,12 +855,12 @@ var _hoisted_3$14 = [
|
|
|
591
855
|
"value",
|
|
592
856
|
"aria-describedby"
|
|
593
857
|
];
|
|
594
|
-
var _hoisted_4$
|
|
858
|
+
var _hoisted_4$18 = {
|
|
595
859
|
key: 0,
|
|
596
860
|
class: "j-checkbox__text"
|
|
597
861
|
};
|
|
598
|
-
var _hoisted_5$
|
|
599
|
-
var _hoisted_6$
|
|
862
|
+
var _hoisted_5$13 = ["for"];
|
|
863
|
+
var _hoisted_6$8 = ["id"];
|
|
600
864
|
//#endregion
|
|
601
865
|
//#region src/components/checkbox/JCheckbox.vue
|
|
602
866
|
var JCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
@@ -642,7 +906,7 @@ var JCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
642
906
|
class: normalizeClass(["j-checkbox", [_ctx.$attrs.class, { "is-disabled": __props.disabled }]]),
|
|
643
907
|
style: normalizeStyle(_ctx.$attrs.style),
|
|
644
908
|
"data-state": state.value
|
|
645
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
909
|
+
}, [createElementVNode("span", _hoisted_2$29, [createElementVNode("input", mergeProps({
|
|
646
910
|
id: id.value,
|
|
647
911
|
ref_key: "input",
|
|
648
912
|
ref: input
|
|
@@ -660,15 +924,69 @@ var JCheckbox_default = /* @__PURE__ */ defineComponent({
|
|
|
660
924
|
value: __props.value,
|
|
661
925
|
"aria-describedby": __props.description || _ctx.$slots.description ? descriptionId.value : void 0,
|
|
662
926
|
onChange
|
|
663
|
-
}), null, 16, _hoisted_3$
|
|
927
|
+
}), null, 16, _hoisted_3$25), _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$18, [__props.label || _ctx.$slots.default ? (openBlock(), createElementBlock("label", {
|
|
664
928
|
key: 0,
|
|
665
929
|
for: id.value,
|
|
666
930
|
class: "j-checkbox__label"
|
|
667
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 8, _hoisted_5$
|
|
931
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 8, _hoisted_5$13)) : createCommentVNode("", true), __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("span", {
|
|
668
932
|
key: 1,
|
|
669
933
|
id: descriptionId.value,
|
|
670
934
|
class: "j-checkbox__description"
|
|
671
|
-
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 8, _hoisted_6$
|
|
935
|
+
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 8, _hoisted_6$8)) : createCommentVNode("", true)])) : createCommentVNode("", true)], 14, _hoisted_1$40);
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
//#endregion
|
|
940
|
+
//#region src/components/collapsible/JCollapsible.vue?vue&type=script&setup=true&lang.ts
|
|
941
|
+
var _hoisted_1$39 = ["data-state"];
|
|
942
|
+
var _hoisted_2$28 = ["aria-expanded", "disabled"];
|
|
943
|
+
var _hoisted_3$24 = { class: "j-collapsible__label" };
|
|
944
|
+
var _hoisted_4$17 = ["inert"];
|
|
945
|
+
var _hoisted_5$12 = { class: "j-collapsible__panel-inner" };
|
|
946
|
+
var _hoisted_6$7 = { class: "j-collapsible__content" };
|
|
947
|
+
//#endregion
|
|
948
|
+
//#region src/components/collapsible/JCollapsible.vue
|
|
949
|
+
var JCollapsible_default = /* @__PURE__ */ defineComponent({
|
|
950
|
+
__name: "JCollapsible",
|
|
951
|
+
props: /*@__PURE__*/ mergeModels({
|
|
952
|
+
label: {},
|
|
953
|
+
disabled: { type: Boolean }
|
|
954
|
+
}, {
|
|
955
|
+
"modelValue": {
|
|
956
|
+
type: Boolean,
|
|
957
|
+
default: false
|
|
958
|
+
},
|
|
959
|
+
"modelModifiers": {}
|
|
960
|
+
}),
|
|
961
|
+
emits: ["update:modelValue"],
|
|
962
|
+
setup(__props) {
|
|
963
|
+
/** A single disclosure primitive | for a group of them, use `JAccordion`. */
|
|
964
|
+
const model = useModel(__props, "modelValue");
|
|
965
|
+
const id = `j-${useId()}`;
|
|
966
|
+
const triggerId = `${id}-trigger`;
|
|
967
|
+
const panelId = `${id}-panel`;
|
|
968
|
+
function toggle() {
|
|
969
|
+
model.value = !model.value;
|
|
970
|
+
}
|
|
971
|
+
return (_ctx, _cache) => {
|
|
972
|
+
return openBlock(), createElementBlock("div", {
|
|
973
|
+
class: "j-collapsible",
|
|
974
|
+
"data-state": model.value ? "open" : "closed"
|
|
975
|
+
}, [createElementVNode("button", {
|
|
976
|
+
id: triggerId,
|
|
977
|
+
type: "button",
|
|
978
|
+
class: "j-collapsible__trigger j-focusable",
|
|
979
|
+
"aria-expanded": model.value,
|
|
980
|
+
"aria-controls": panelId,
|
|
981
|
+
disabled: __props.disabled,
|
|
982
|
+
onClick: toggle
|
|
983
|
+
}, [createVNode(unref(IconChevronDown), { class: "j-collapsible__chevron" }), createElementVNode("span", _hoisted_3$24, [renderSlot(_ctx.$slots, "trigger", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])])], 8, _hoisted_2$28), createElementVNode("div", {
|
|
984
|
+
id: panelId,
|
|
985
|
+
role: "region",
|
|
986
|
+
class: "j-collapsible__panel",
|
|
987
|
+
"aria-labelledby": triggerId,
|
|
988
|
+
inert: !model.value
|
|
989
|
+
}, [createElementVNode("div", _hoisted_5$12, [createElementVNode("div", _hoisted_6$7, [renderSlot(_ctx.$slots, "default")])])], 8, _hoisted_4$17)], 8, _hoisted_1$39);
|
|
672
990
|
};
|
|
673
991
|
}
|
|
674
992
|
});
|
|
@@ -963,7 +1281,7 @@ function findWordStart(t, q) {
|
|
|
963
1281
|
}
|
|
964
1282
|
return -1;
|
|
965
1283
|
}
|
|
966
|
-
/** Letters in order, not necessarily adjacent
|
|
1284
|
+
/** Letters in order, not necessarily adjacent | "gtst" finds "Go to settings". */
|
|
967
1285
|
function subsequence(q, t) {
|
|
968
1286
|
const ranges = [];
|
|
969
1287
|
let ti = 0;
|
|
@@ -1025,7 +1343,7 @@ var JPortal_default = /* @__PURE__ */ defineComponent({
|
|
|
1025
1343
|
*
|
|
1026
1344
|
* Server-rendered teleports to `body` never make it into the HTML, so a plain
|
|
1027
1345
|
* `<Teleport>` hydrates against nothing and warns. Rendering nothing until
|
|
1028
|
-
* mount keeps server and client output identical
|
|
1346
|
+
* mount keeps server and client output identical | and overlays are closed on
|
|
1029
1347
|
* first paint anyway.
|
|
1030
1348
|
*/
|
|
1031
1349
|
const mounted = ref(false);
|
|
@@ -1040,25 +1358,25 @@ var JPortal_default = /* @__PURE__ */ defineComponent({
|
|
|
1040
1358
|
});
|
|
1041
1359
|
//#endregion
|
|
1042
1360
|
//#region src/components/command-palette/JCommandPalette.vue?vue&type=script&setup=true&lang.ts
|
|
1043
|
-
var _hoisted_1$
|
|
1361
|
+
var _hoisted_1$38 = {
|
|
1044
1362
|
key: 0,
|
|
1045
1363
|
class: "j-command__overlay",
|
|
1046
1364
|
"aria-hidden": "true"
|
|
1047
1365
|
};
|
|
1048
|
-
var _hoisted_2$
|
|
1049
|
-
var _hoisted_3$
|
|
1050
|
-
var _hoisted_4$
|
|
1366
|
+
var _hoisted_2$27 = ["aria-label"];
|
|
1367
|
+
var _hoisted_3$23 = { class: "j-command__search" };
|
|
1368
|
+
var _hoisted_4$16 = [
|
|
1051
1369
|
"aria-activedescendant",
|
|
1052
1370
|
"aria-label",
|
|
1053
1371
|
"placeholder"
|
|
1054
1372
|
];
|
|
1055
|
-
var _hoisted_5$
|
|
1373
|
+
var _hoisted_5$11 = {
|
|
1056
1374
|
key: 0,
|
|
1057
1375
|
class: "j-command__progress",
|
|
1058
1376
|
"aria-hidden": "true"
|
|
1059
1377
|
};
|
|
1060
|
-
var _hoisted_6$
|
|
1061
|
-
var _hoisted_7$
|
|
1378
|
+
var _hoisted_6$6 = ["aria-label"];
|
|
1379
|
+
var _hoisted_7$4 = ["aria-labelledby"];
|
|
1062
1380
|
var _hoisted_8$1 = ["id"];
|
|
1063
1381
|
var _hoisted_9$1 = [
|
|
1064
1382
|
"id",
|
|
@@ -1293,7 +1611,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1293
1611
|
return (_ctx, _cache) => {
|
|
1294
1612
|
return openBlock(), createBlock(JPortal_default, null, {
|
|
1295
1613
|
default: withCtx(() => [createVNode(Transition, { name: "j-command-overlay" }, {
|
|
1296
|
-
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1614
|
+
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$38)) : createCommentVNode("", true)]),
|
|
1297
1615
|
_: 1
|
|
1298
1616
|
}), createVNode(Transition, {
|
|
1299
1617
|
name: "j-command",
|
|
@@ -1315,7 +1633,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1315
1633
|
"aria-label": __props.label,
|
|
1316
1634
|
class: "j-command"
|
|
1317
1635
|
}, [
|
|
1318
|
-
createElementVNode("div", _hoisted_3$
|
|
1636
|
+
createElementVNode("div", _hoisted_3$23, [
|
|
1319
1637
|
createVNode(unref(IconSearch), { class: "j-command__search-icon" }),
|
|
1320
1638
|
withDirectives(createElementVNode("input", {
|
|
1321
1639
|
ref_key: "input",
|
|
@@ -1336,7 +1654,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1336
1654
|
spellcheck: "false",
|
|
1337
1655
|
enterkeyhint: "go",
|
|
1338
1656
|
onKeydown
|
|
1339
|
-
}, null, 40, _hoisted_4$
|
|
1657
|
+
}, null, 40, _hoisted_4$16), [[vModelText, search.value]]),
|
|
1340
1658
|
createElementVNode("button", {
|
|
1341
1659
|
type: "button",
|
|
1342
1660
|
class: "j-command__esc j-kbd",
|
|
@@ -1344,7 +1662,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1344
1662
|
"aria-label": "Close",
|
|
1345
1663
|
onClick: close
|
|
1346
1664
|
}, " Esc "),
|
|
1347
|
-
__props.loading ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
1665
|
+
__props.loading ? (openBlock(), createElementBlock("span", _hoisted_5$11)) : createCommentVNode("", true)
|
|
1348
1666
|
]),
|
|
1349
1667
|
createElementVNode("div", {
|
|
1350
1668
|
id: listboxId,
|
|
@@ -1390,8 +1708,8 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1390
1708
|
}, toDisplayString(key), 1);
|
|
1391
1709
|
}), 128))])) : createCommentVNode("", true)
|
|
1392
1710
|
])], 42, _hoisted_9$1);
|
|
1393
|
-
}), 128))], 8, _hoisted_7$
|
|
1394
|
-
}), 128)), !rows.value.length ? (openBlock(), createElementBlock("div", _hoisted_15, [__props.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(Spinner), { size: 16 }), _cache[2] || (_cache[2] = createElementVNode("span", null, "Searching…", -1))], 64)) : renderSlot(_ctx.$slots, "empty", { search: search.value }, () => [createElementVNode("span", _hoisted_16, toDisplayString(__props.emptyText), 1), search.value ? (openBlock(), createElementBlock("span", _hoisted_17, "Nothing matches “" + toDisplayString(search.value) + "”. Try fewer words.", 1)) : createCommentVNode("", true)], void 0, 1)])) : createCommentVNode("", true)], 40, _hoisted_6$
|
|
1711
|
+
}), 128))], 8, _hoisted_7$4);
|
|
1712
|
+
}), 128)), !rows.value.length ? (openBlock(), createElementBlock("div", _hoisted_15, [__props.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(Spinner), { size: 16 }), _cache[2] || (_cache[2] = createElementVNode("span", null, "Searching…", -1))], 64)) : renderSlot(_ctx.$slots, "empty", { search: search.value }, () => [createElementVNode("span", _hoisted_16, toDisplayString(__props.emptyText), 1), search.value ? (openBlock(), createElementBlock("span", _hoisted_17, "Nothing matches “" + toDisplayString(search.value) + "”. Try fewer words.", 1)) : createCommentVNode("", true)], void 0, 1)])) : createCommentVNode("", true)], 40, _hoisted_6$6),
|
|
1395
1713
|
createElementVNode("div", _hoisted_18, [renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
1396
1714
|
_cache[3] || (_cache[3] = createElementVNode("span", { class: "j-command__hint" }, [
|
|
1397
1715
|
createElementVNode("kbd", { class: "j-kbd" }, "↑"),
|
|
@@ -1402,7 +1720,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1402
1720
|
_cache[5] || (_cache[5] = createElementVNode("span", { class: "j-command__hint" }, [createElementVNode("kbd", { class: "j-kbd" }, "Esc"), createTextVNode(" Close")], -1))
|
|
1403
1721
|
])]),
|
|
1404
1722
|
createElementVNode("span", _hoisted_19, toDisplayString(announcement.value), 1)
|
|
1405
|
-
], 8, _hoisted_2$
|
|
1723
|
+
], 8, _hoisted_2$27)], 32)) : createCommentVNode("", true)]),
|
|
1406
1724
|
_: 3
|
|
1407
1725
|
})]),
|
|
1408
1726
|
_: 3
|
|
@@ -1413,7 +1731,7 @@ var JCommandPalette_default = /* @__PURE__ */ defineComponent({
|
|
|
1413
1731
|
//#endregion
|
|
1414
1732
|
//#region src/composables/useModal.ts
|
|
1415
1733
|
/**
|
|
1416
|
-
* Internal: everything a modal surface (Dialog, Sheet) shares
|
|
1734
|
+
* Internal: everything a modal surface (Dialog, Sheet) shares | layering,
|
|
1417
1735
|
* focus trap and restoration, scroll lock, backdrop clicks and the "nudge"
|
|
1418
1736
|
* when dismissal is refused.
|
|
1419
1737
|
*/
|
|
@@ -1452,25 +1770,25 @@ function useModal(panel, open, options) {
|
|
|
1452
1770
|
var FIELD_SELECTOR = ":is(input:not([type=hidden]), textarea, select, [role=combobox]):not(:disabled)";
|
|
1453
1771
|
//#endregion
|
|
1454
1772
|
//#region src/components/dialog/JDialog.vue?vue&type=script&setup=true&lang.ts
|
|
1455
|
-
var _hoisted_1$
|
|
1773
|
+
var _hoisted_1$37 = {
|
|
1456
1774
|
key: 0,
|
|
1457
1775
|
class: "j-dialog__overlay",
|
|
1458
1776
|
"aria-hidden": "true"
|
|
1459
1777
|
};
|
|
1460
|
-
var _hoisted_2$
|
|
1778
|
+
var _hoisted_2$26 = [
|
|
1461
1779
|
"aria-labelledby",
|
|
1462
1780
|
"aria-label",
|
|
1463
1781
|
"aria-describedby"
|
|
1464
1782
|
];
|
|
1465
|
-
var _hoisted_3$
|
|
1783
|
+
var _hoisted_3$22 = {
|
|
1466
1784
|
key: 0,
|
|
1467
1785
|
class: "j-dialog__header"
|
|
1468
1786
|
};
|
|
1469
|
-
var _hoisted_4$
|
|
1787
|
+
var _hoisted_4$15 = {
|
|
1470
1788
|
key: 1,
|
|
1471
1789
|
class: "j-dialog__body"
|
|
1472
1790
|
};
|
|
1473
|
-
var _hoisted_5$
|
|
1791
|
+
var _hoisted_5$10 = {
|
|
1474
1792
|
key: 2,
|
|
1475
1793
|
class: "j-dialog__footer"
|
|
1476
1794
|
};
|
|
@@ -1521,7 +1839,7 @@ var JDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
1521
1839
|
return (_ctx, _cache) => {
|
|
1522
1840
|
return openBlock(), createBlock(JPortal_default, null, {
|
|
1523
1841
|
default: withCtx(() => [createVNode(Transition, { name: "j-dialog-overlay" }, {
|
|
1524
|
-
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1842
|
+
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$37)) : createCommentVNode("", true)]),
|
|
1525
1843
|
_: 1
|
|
1526
1844
|
}), createVNode(Transition, {
|
|
1527
1845
|
name: "j-dialog",
|
|
@@ -1548,7 +1866,7 @@ var JDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
1548
1866
|
"aria-describedby": __props.description ? descriptionId : void 0,
|
|
1549
1867
|
onAnimationend: _cache[0] || (_cache[0] = ($event) => nudging.value = false)
|
|
1550
1868
|
}, [
|
|
1551
|
-
__props.title || __props.description || _ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_3$
|
|
1869
|
+
__props.title || __props.description || _ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_3$22, [renderSlot(_ctx.$slots, "header", {
|
|
1552
1870
|
titleId,
|
|
1553
1871
|
descriptionId
|
|
1554
1872
|
}, () => [createElementVNode("h2", {
|
|
@@ -1559,8 +1877,8 @@ var JDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
1559
1877
|
id: descriptionId,
|
|
1560
1878
|
class: "j-dialog__description"
|
|
1561
1879
|
}, toDisplayString(__props.description), 1)) : createCommentVNode("", true)])])) : createCommentVNode("", true),
|
|
1562
|
-
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
1563
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_5$
|
|
1880
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$15, [renderSlot(_ctx.$slots, "default", { close })])) : createCommentVNode("", true),
|
|
1881
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_5$10, [renderSlot(_ctx.$slots, "footer", { close })])) : createCommentVNode("", true),
|
|
1564
1882
|
!__props.hideClose ? (openBlock(), createElementBlock("button", {
|
|
1565
1883
|
key: 3,
|
|
1566
1884
|
type: "button",
|
|
@@ -1568,7 +1886,7 @@ var JDialog_default = /* @__PURE__ */ defineComponent({
|
|
|
1568
1886
|
"aria-label": "Close",
|
|
1569
1887
|
onClick: close
|
|
1570
1888
|
}, [createVNode(unref(IconX))])) : createCommentVNode("", true)
|
|
1571
|
-
], 42, _hoisted_2$
|
|
1889
|
+
], 42, _hoisted_2$26)], 32)) : createCommentVNode("", true)]),
|
|
1572
1890
|
_: 3
|
|
1573
1891
|
})]),
|
|
1574
1892
|
_: 3
|
|
@@ -1596,7 +1914,7 @@ function firstElement(nodes) {
|
|
|
1596
1914
|
}
|
|
1597
1915
|
/**
|
|
1598
1916
|
* Internal: renders its first child element and merges its own attributes
|
|
1599
|
-
* (ARIA, listeners, ids) onto it
|
|
1917
|
+
* (ARIA, listeners, ids) onto it | no wrapper element.
|
|
1600
1918
|
*/
|
|
1601
1919
|
var JSlot = defineComponent({
|
|
1602
1920
|
name: "JSlot",
|
|
@@ -1730,7 +2048,7 @@ function useTypeahead(timeout = 500) {
|
|
|
1730
2048
|
}
|
|
1731
2049
|
//#endregion
|
|
1732
2050
|
//#region src/components/dropdown-menu/JMenuContent.vue?vue&type=script&setup=true&lang.ts
|
|
1733
|
-
var _hoisted_1$
|
|
2051
|
+
var _hoisted_1$36 = ["id", "aria-labelledby"];
|
|
1734
2052
|
//#endregion
|
|
1735
2053
|
//#region src/components/dropdown-menu/JMenuContent.vue
|
|
1736
2054
|
var JMenuContent_default = /* @__PURE__ */ defineComponent({
|
|
@@ -1874,7 +2192,7 @@ var JMenuContent_default = /* @__PURE__ */ defineComponent({
|
|
|
1874
2192
|
"aria-orientation": "vertical",
|
|
1875
2193
|
onKeydown,
|
|
1876
2194
|
onPointerenter: _cache[0] || (_cache[0] = ($event) => emit("pointerenter"))
|
|
1877
|
-
}, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_1$
|
|
2195
|
+
}, [renderSlot(_ctx.$slots, "default")], 46, _hoisted_1$36)) : createCommentVNode("", true)]),
|
|
1878
2196
|
_: 3
|
|
1879
2197
|
})]),
|
|
1880
2198
|
_: 3
|
|
@@ -1974,12 +2292,12 @@ var JDropdownMenu_default = /* @__PURE__ */ defineComponent({
|
|
|
1974
2292
|
});
|
|
1975
2293
|
//#endregion
|
|
1976
2294
|
//#region src/components/dropdown-menu/JDropdownMenuItem.vue?vue&type=script&setup=true&lang.ts
|
|
1977
|
-
var _hoisted_1$
|
|
2295
|
+
var _hoisted_1$35 = {
|
|
1978
2296
|
key: 0,
|
|
1979
2297
|
class: "j-menu__icon"
|
|
1980
2298
|
};
|
|
1981
|
-
var _hoisted_2$
|
|
1982
|
-
var _hoisted_3$
|
|
2299
|
+
var _hoisted_2$25 = { class: "j-menu__text" };
|
|
2300
|
+
var _hoisted_3$21 = {
|
|
1983
2301
|
key: 1,
|
|
1984
2302
|
class: "j-menu__shortcut"
|
|
1985
2303
|
};
|
|
@@ -2041,9 +2359,9 @@ var JDropdownMenuItem_default = /* @__PURE__ */ defineComponent({
|
|
|
2041
2359
|
onPointerleave: onPointerLeave
|
|
2042
2360
|
}, {
|
|
2043
2361
|
default: withCtx(() => [
|
|
2044
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2045
|
-
createElementVNode("span", _hoisted_2$
|
|
2046
|
-
__props.shortcut ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
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),
|
|
2047
2365
|
__props.checked !== void 0 ? (openBlock(), createBlock(unref(IconCheck), {
|
|
2048
2366
|
key: 2,
|
|
2049
2367
|
class: normalizeClass(["j-menu__check", { "is-checked": __props.checked }])
|
|
@@ -2061,7 +2379,7 @@ var JDropdownMenuItem_default = /* @__PURE__ */ defineComponent({
|
|
|
2061
2379
|
});
|
|
2062
2380
|
//#endregion
|
|
2063
2381
|
//#region src/components/dropdown-menu/JDropdownMenuLabel.vue?vue&type=script&setup=true&lang.ts
|
|
2064
|
-
var _hoisted_1$
|
|
2382
|
+
var _hoisted_1$34 = {
|
|
2065
2383
|
class: "j-menu__label",
|
|
2066
2384
|
role: "presentation"
|
|
2067
2385
|
};
|
|
@@ -2071,7 +2389,7 @@ var JDropdownMenuLabel_default = /* @__PURE__ */ defineComponent({
|
|
|
2071
2389
|
__name: "JDropdownMenuLabel",
|
|
2072
2390
|
setup(__props) {
|
|
2073
2391
|
return (_ctx, _cache) => {
|
|
2074
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2392
|
+
return openBlock(), createElementBlock("div", _hoisted_1$34, [renderSlot(_ctx.$slots, "default")]);
|
|
2075
2393
|
};
|
|
2076
2394
|
}
|
|
2077
2395
|
});
|
|
@@ -2085,27 +2403,27 @@ var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
|
2085
2403
|
//#endregion
|
|
2086
2404
|
//#region src/components/dropdown-menu/JDropdownMenuSeparator.vue
|
|
2087
2405
|
var _sfc_main = {};
|
|
2088
|
-
var _hoisted_1$
|
|
2406
|
+
var _hoisted_1$33 = {
|
|
2089
2407
|
role: "separator",
|
|
2090
2408
|
"aria-orientation": "horizontal",
|
|
2091
2409
|
class: "j-menu__separator"
|
|
2092
2410
|
};
|
|
2093
2411
|
function _sfc_render(_ctx, _cache) {
|
|
2094
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2412
|
+
return openBlock(), createElementBlock("div", _hoisted_1$33);
|
|
2095
2413
|
}
|
|
2096
2414
|
var JDropdownMenuSeparator_default = /*#__PURE__*/ _plugin_vue_export_helper_default(_sfc_main, [["render", _sfc_render]]);
|
|
2097
2415
|
//#endregion
|
|
2098
2416
|
//#region src/components/dropdown-menu/JDropdownMenuSub.vue?vue&type=script&setup=true&lang.ts
|
|
2099
|
-
var _hoisted_1$
|
|
2417
|
+
var _hoisted_1$32 = [
|
|
2100
2418
|
"aria-expanded",
|
|
2101
2419
|
"aria-controls",
|
|
2102
2420
|
"aria-disabled"
|
|
2103
2421
|
];
|
|
2104
|
-
var _hoisted_2$
|
|
2422
|
+
var _hoisted_2$24 = {
|
|
2105
2423
|
key: 0,
|
|
2106
2424
|
class: "j-menu__icon"
|
|
2107
2425
|
};
|
|
2108
|
-
var _hoisted_3$
|
|
2426
|
+
var _hoisted_3$20 = { class: "j-menu__text" };
|
|
2109
2427
|
//#endregion
|
|
2110
2428
|
//#region src/components/dropdown-menu/JDropdownMenuSub.vue
|
|
2111
2429
|
var JDropdownMenuSub_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2179,10 +2497,10 @@ var JDropdownMenuSub_default = /* @__PURE__ */ defineComponent({
|
|
|
2179
2497
|
onKeydown,
|
|
2180
2498
|
onClick
|
|
2181
2499
|
}, [
|
|
2182
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
2183
|
-
createElementVNode("span", _hoisted_3$
|
|
2500
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_2$24, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true),
|
|
2501
|
+
createElementVNode("span", _hoisted_3$20, toDisplayString(__props.label), 1),
|
|
2184
2502
|
createVNode(unref(IconChevronRight), { class: "j-menu__chevron" })
|
|
2185
|
-
], 40, _hoisted_1$
|
|
2503
|
+
], 40, _hoisted_1$32), createVNode(JMenuContent_default, {
|
|
2186
2504
|
id: menuId,
|
|
2187
2505
|
ref_key: "sub",
|
|
2188
2506
|
ref: sub,
|
|
@@ -2212,15 +2530,115 @@ var JDropdownMenuSub_default = /* @__PURE__ */ defineComponent({
|
|
|
2212
2530
|
}
|
|
2213
2531
|
});
|
|
2214
2532
|
//#endregion
|
|
2533
|
+
//#region src/components/empty-state/JEmptyState.vue?vue&type=script&setup=true&lang.ts
|
|
2534
|
+
var _hoisted_1$31 = {
|
|
2535
|
+
key: 0,
|
|
2536
|
+
class: "j-empty-state__icon"
|
|
2537
|
+
};
|
|
2538
|
+
var _hoisted_2$23 = {
|
|
2539
|
+
key: 1,
|
|
2540
|
+
class: "j-empty-state__title"
|
|
2541
|
+
};
|
|
2542
|
+
var _hoisted_3$19 = {
|
|
2543
|
+
key: 2,
|
|
2544
|
+
class: "j-empty-state__description"
|
|
2545
|
+
};
|
|
2546
|
+
var _hoisted_4$14 = {
|
|
2547
|
+
key: 3,
|
|
2548
|
+
class: "j-empty-state__actions"
|
|
2549
|
+
};
|
|
2550
|
+
//#endregion
|
|
2551
|
+
//#region src/components/empty-state/JEmptyState.vue
|
|
2552
|
+
var JEmptyState_default = /* @__PURE__ */ defineComponent({
|
|
2553
|
+
__name: "JEmptyState",
|
|
2554
|
+
props: {
|
|
2555
|
+
title: {},
|
|
2556
|
+
description: {},
|
|
2557
|
+
size: { default: "md" }
|
|
2558
|
+
},
|
|
2559
|
+
setup(__props) {
|
|
2560
|
+
return (_ctx, _cache) => {
|
|
2561
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["j-empty-state", `j-empty-state--${__props.size}`]) }, [
|
|
2562
|
+
_ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_1$31, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("", true),
|
|
2563
|
+
__props.title ? (openBlock(), createElementBlock("p", _hoisted_2$23, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
2564
|
+
__props.description || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_3$19, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("", true),
|
|
2565
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_4$14, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true)
|
|
2566
|
+
], 2);
|
|
2567
|
+
};
|
|
2568
|
+
}
|
|
2569
|
+
});
|
|
2570
|
+
//#endregion
|
|
2571
|
+
//#region src/components/footer/JFooter.vue?vue&type=script&setup=true&lang.ts
|
|
2572
|
+
var _hoisted_1$30 = { class: "j-footer__inner" };
|
|
2573
|
+
var _hoisted_2$22 = {
|
|
2574
|
+
key: 0,
|
|
2575
|
+
class: "j-footer__top"
|
|
2576
|
+
};
|
|
2577
|
+
var _hoisted_3$18 = {
|
|
2578
|
+
key: 0,
|
|
2579
|
+
class: "j-footer__brand"
|
|
2580
|
+
};
|
|
2581
|
+
var _hoisted_4$13 = {
|
|
2582
|
+
key: 1,
|
|
2583
|
+
class: "j-footer__columns"
|
|
2584
|
+
};
|
|
2585
|
+
var _hoisted_5$9 = {
|
|
2586
|
+
key: 1,
|
|
2587
|
+
class: "j-footer__bottom"
|
|
2588
|
+
};
|
|
2589
|
+
//#endregion
|
|
2590
|
+
//#region src/components/footer/JFooter.vue
|
|
2591
|
+
var JFooter_default = /* @__PURE__ */ defineComponent({
|
|
2592
|
+
__name: "JFooter",
|
|
2593
|
+
props: {
|
|
2594
|
+
maxWidth: { default: "72rem" },
|
|
2595
|
+
bordered: {
|
|
2596
|
+
type: Boolean,
|
|
2597
|
+
default: true
|
|
2598
|
+
}
|
|
2599
|
+
},
|
|
2600
|
+
setup(__props) {
|
|
2601
|
+
const props = __props;
|
|
2602
|
+
const style = computed(() => ({ "--j-footer-max": props.maxWidth === "none" ? "none" : props.maxWidth }));
|
|
2603
|
+
return (_ctx, _cache) => {
|
|
2604
|
+
return openBlock(), createElementBlock("footer", {
|
|
2605
|
+
class: normalizeClass(["j-footer", { "is-bordered": __props.bordered }]),
|
|
2606
|
+
style: normalizeStyle(style.value)
|
|
2607
|
+
}, [createElementVNode("div", _hoisted_1$30, [_ctx.$slots.brand || _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_2$22, [_ctx.$slots.brand ? (openBlock(), createElementBlock("div", _hoisted_3$18, [renderSlot(_ctx.$slots, "brand")])) : createCommentVNode("", true), _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_4$13, [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
|
+
};
|
|
2609
|
+
}
|
|
2610
|
+
});
|
|
2611
|
+
//#endregion
|
|
2612
|
+
//#region src/components/footer/JFooterColumn.vue?vue&type=script&setup=true&lang.ts
|
|
2613
|
+
var _hoisted_1$29 = { class: "j-footer-column__links" };
|
|
2614
|
+
//#endregion
|
|
2615
|
+
//#region src/components/footer/JFooterColumn.vue
|
|
2616
|
+
var JFooterColumn_default = /* @__PURE__ */ defineComponent({
|
|
2617
|
+
__name: "JFooterColumn",
|
|
2618
|
+
props: { title: {} },
|
|
2619
|
+
setup(__props) {
|
|
2620
|
+
const titleId = `j-${useId()}-title`;
|
|
2621
|
+
return (_ctx, _cache) => {
|
|
2622
|
+
return openBlock(), createElementBlock("nav", {
|
|
2623
|
+
class: "j-footer-column",
|
|
2624
|
+
"aria-labelledby": titleId
|
|
2625
|
+
}, [createElementVNode("p", {
|
|
2626
|
+
id: titleId,
|
|
2627
|
+
class: "j-footer-column__title"
|
|
2628
|
+
}, toDisplayString(__props.title), 1), createElementVNode("div", _hoisted_1$29, [renderSlot(_ctx.$slots, "default")])]);
|
|
2629
|
+
};
|
|
2630
|
+
}
|
|
2631
|
+
});
|
|
2632
|
+
//#endregion
|
|
2215
2633
|
//#region src/components/field/JFieldShell.vue?vue&type=script&setup=true&lang.ts
|
|
2216
|
-
var _hoisted_1$
|
|
2634
|
+
var _hoisted_1$28 = {
|
|
2217
2635
|
key: 0,
|
|
2218
2636
|
class: "j-field__required",
|
|
2219
2637
|
"aria-hidden": "true"
|
|
2220
2638
|
};
|
|
2221
|
-
var _hoisted_2$
|
|
2222
|
-
var _hoisted_3$
|
|
2223
|
-
var _hoisted_4$
|
|
2639
|
+
var _hoisted_2$21 = { class: "j-field__messages" };
|
|
2640
|
+
var _hoisted_3$17 = ["id"];
|
|
2641
|
+
var _hoisted_4$12 = ["id"];
|
|
2224
2642
|
//#endregion
|
|
2225
2643
|
//#region src/components/field/JFieldShell.vue
|
|
2226
2644
|
var JFieldShell_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2241,7 +2659,7 @@ var JFieldShell_default = /* @__PURE__ */ defineComponent({
|
|
|
2241
2659
|
setup(__props) {
|
|
2242
2660
|
/**
|
|
2243
2661
|
* Internal: lays out label, control, description and error for form fields.
|
|
2244
|
-
* Not exported
|
|
2662
|
+
* Not exported | every field component composes it.
|
|
2245
2663
|
*/
|
|
2246
2664
|
return (_ctx, _cache) => {
|
|
2247
2665
|
return openBlock(), createElementBlock("div", { class: normalizeClass(["j-field", { "is-disabled": __props.disabled }]) }, [
|
|
@@ -2251,11 +2669,11 @@ var JFieldShell_default = /* @__PURE__ */ defineComponent({
|
|
|
2251
2669
|
class: "j-field__label",
|
|
2252
2670
|
for: __props.labelFor === null ? void 0 : __props.labelFor ?? __props.id
|
|
2253
2671
|
}, {
|
|
2254
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.label), 1)]), __props.required ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2672
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.label), 1)]), __props.required ? (openBlock(), createElementBlock("span", _hoisted_1$28, "*")) : createCommentVNode("", true)]),
|
|
2255
2673
|
_: 3
|
|
2256
2674
|
}, 8, ["id", "for"])) : createCommentVNode("", true),
|
|
2257
2675
|
renderSlot(_ctx.$slots, "default"),
|
|
2258
|
-
createElementVNode("div", _hoisted_2$
|
|
2676
|
+
createElementVNode("div", _hoisted_2$21, [createVNode(Transition, {
|
|
2259
2677
|
name: "j-field-message",
|
|
2260
2678
|
mode: "out-in"
|
|
2261
2679
|
}, {
|
|
@@ -2263,11 +2681,11 @@ var JFieldShell_default = /* @__PURE__ */ defineComponent({
|
|
|
2263
2681
|
id: __props.errorId,
|
|
2264
2682
|
key: __props.errorMessage,
|
|
2265
2683
|
class: "j-field__error"
|
|
2266
|
-
}, toDisplayString(__props.errorMessage), 9, _hoisted_3$
|
|
2684
|
+
}, toDisplayString(__props.errorMessage), 9, _hoisted_3$17)) : __props.showDescription ? (openBlock(), createElementBlock("p", {
|
|
2267
2685
|
key: 1,
|
|
2268
2686
|
id: __props.descriptionId,
|
|
2269
2687
|
class: "j-field__description"
|
|
2270
|
-
}, toDisplayString(__props.description), 9, _hoisted_4$
|
|
2688
|
+
}, toDisplayString(__props.description), 9, _hoisted_4$12)) : createCommentVNode("", true)]),
|
|
2271
2689
|
_: 1
|
|
2272
2690
|
})])
|
|
2273
2691
|
], 2);
|
|
@@ -2304,11 +2722,11 @@ function useField(props) {
|
|
|
2304
2722
|
}
|
|
2305
2723
|
//#endregion
|
|
2306
2724
|
//#region src/components/input/JInput.vue?vue&type=script&setup=true&lang.ts
|
|
2307
|
-
var _hoisted_1$
|
|
2725
|
+
var _hoisted_1$27 = {
|
|
2308
2726
|
key: 0,
|
|
2309
2727
|
class: "j-control__adornment j-control__adornment--leading"
|
|
2310
2728
|
};
|
|
2311
|
-
var _hoisted_2$
|
|
2729
|
+
var _hoisted_2$20 = [
|
|
2312
2730
|
"id",
|
|
2313
2731
|
"type",
|
|
2314
2732
|
"name",
|
|
@@ -2320,7 +2738,7 @@ var _hoisted_2$10 = [
|
|
|
2320
2738
|
"aria-invalid",
|
|
2321
2739
|
"aria-describedby"
|
|
2322
2740
|
];
|
|
2323
|
-
var _hoisted_3$
|
|
2741
|
+
var _hoisted_3$16 = {
|
|
2324
2742
|
key: 1,
|
|
2325
2743
|
class: "j-control__adornment j-control__adornment--trailing"
|
|
2326
2744
|
};
|
|
@@ -2390,7 +2808,7 @@ var JInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2390
2808
|
}]]),
|
|
2391
2809
|
onPointerdown: onFramePointerDown
|
|
2392
2810
|
}, [
|
|
2393
|
-
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
2811
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_1$27, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true),
|
|
2394
2812
|
withDirectives(createElementVNode("input", mergeProps({
|
|
2395
2813
|
id: unref(field).id.value,
|
|
2396
2814
|
ref_key: "input",
|
|
@@ -2411,8 +2829,8 @@ var JInput_default = /* @__PURE__ */ defineComponent({
|
|
|
2411
2829
|
autocomplete: __props.autocomplete,
|
|
2412
2830
|
"aria-invalid": unref(field).invalid.value || void 0,
|
|
2413
2831
|
"aria-describedby": unref(field).describedBy.value
|
|
2414
|
-
}), null, 16, _hoisted_2$
|
|
2415
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
2832
|
+
}), null, 16, _hoisted_2$20), [[vModelDynamic, model.value]]),
|
|
2833
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_3$16, [renderSlot(_ctx.$slots, "trailing")])) : createCommentVNode("", true)
|
|
2416
2834
|
], 34)]),
|
|
2417
2835
|
_: 2
|
|
2418
2836
|
}, [_ctx.$slots.label ? {
|
|
@@ -2470,21 +2888,39 @@ var JKbd_default = /* @__PURE__ */ defineComponent({
|
|
|
2470
2888
|
}
|
|
2471
2889
|
});
|
|
2472
2890
|
//#endregion
|
|
2473
|
-
//#region src/components/
|
|
2474
|
-
var _hoisted_1$
|
|
2891
|
+
//#region src/components/navbar/JNavbar.vue?vue&type=script&setup=true&lang.ts
|
|
2892
|
+
var _hoisted_1$26 = { class: "j-navbar__bar" };
|
|
2893
|
+
var _hoisted_2$19 = {
|
|
2894
|
+
key: 0,
|
|
2895
|
+
class: "j-navbar__brand"
|
|
2896
|
+
};
|
|
2897
|
+
var _hoisted_3$15 = ["aria-label"];
|
|
2898
|
+
var _hoisted_4$11 = { class: "j-navbar__end" };
|
|
2899
|
+
var _hoisted_5$8 = {
|
|
2900
|
+
key: 0,
|
|
2901
|
+
class: "j-navbar__actions"
|
|
2902
|
+
};
|
|
2903
|
+
var _hoisted_6$5 = ["aria-label"];
|
|
2904
|
+
var _hoisted_7$3 = {
|
|
2905
|
+
key: 1,
|
|
2906
|
+
class: "j-navbar__menu-footer"
|
|
2907
|
+
};
|
|
2475
2908
|
//#endregion
|
|
2476
|
-
//#region src/components/
|
|
2477
|
-
var
|
|
2478
|
-
__name: "
|
|
2909
|
+
//#region src/components/navbar/JNavbar.vue
|
|
2910
|
+
var JNavbar_default = /* @__PURE__ */ defineComponent({
|
|
2911
|
+
__name: "JNavbar",
|
|
2479
2912
|
props: /*@__PURE__*/ mergeModels({
|
|
2480
|
-
|
|
2481
|
-
offset: { default: 8 },
|
|
2482
|
-
ariaLabel: {},
|
|
2483
|
-
closeOnOutside: {
|
|
2913
|
+
sticky: {
|
|
2484
2914
|
type: Boolean,
|
|
2485
2915
|
default: true
|
|
2486
2916
|
},
|
|
2487
|
-
|
|
2917
|
+
bordered: {
|
|
2918
|
+
type: Boolean,
|
|
2919
|
+
default: true
|
|
2920
|
+
},
|
|
2921
|
+
label: { default: "Main" },
|
|
2922
|
+
collapse: { default: "md" },
|
|
2923
|
+
maxWidth: { default: "72rem" }
|
|
2488
2924
|
}, {
|
|
2489
2925
|
"open": {
|
|
2490
2926
|
type: Boolean,
|
|
@@ -2493,27 +2929,267 @@ var JPopover_default = /* @__PURE__ */ defineComponent({
|
|
|
2493
2929
|
"openModifiers": {}
|
|
2494
2930
|
}),
|
|
2495
2931
|
emits: ["update:open"],
|
|
2496
|
-
setup(__props
|
|
2932
|
+
setup(__props) {
|
|
2497
2933
|
const props = __props;
|
|
2934
|
+
/** Mobile menu state. */
|
|
2498
2935
|
const open = useModel(__props, "open");
|
|
2499
|
-
const
|
|
2500
|
-
const
|
|
2501
|
-
const
|
|
2502
|
-
const
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
}
|
|
2507
|
-
function close(
|
|
2936
|
+
const menuId = `j-${useId()}-menu`;
|
|
2937
|
+
const root = ref(null);
|
|
2938
|
+
const menu = ref(null);
|
|
2939
|
+
const breakpoints = {
|
|
2940
|
+
sm: 640,
|
|
2941
|
+
md: 768,
|
|
2942
|
+
lg: 1024
|
|
2943
|
+
};
|
|
2944
|
+
function close(returnFocus = false) {
|
|
2508
2945
|
if (!open.value) return;
|
|
2509
2946
|
open.value = false;
|
|
2510
|
-
if (
|
|
2947
|
+
if (returnFocus) nextTick(() => focusElement(root.value?.querySelector(".j-burger")));
|
|
2511
2948
|
}
|
|
2512
2949
|
useLayer({
|
|
2513
2950
|
active: open,
|
|
2514
|
-
elements: () => [
|
|
2951
|
+
elements: () => [root.value],
|
|
2515
2952
|
onEscape: () => close(true),
|
|
2516
|
-
onPointerDownOutside: () =>
|
|
2953
|
+
onPointerDownOutside: () => close()
|
|
2954
|
+
});
|
|
2955
|
+
function onMenuClick(event) {
|
|
2956
|
+
const target = event.target.closest("a, button");
|
|
2957
|
+
if (target && !target.hasAttribute("aria-expanded")) close();
|
|
2958
|
+
}
|
|
2959
|
+
let media;
|
|
2960
|
+
const onMediaChange = (event) => event.matches && close();
|
|
2961
|
+
onMounted(() => {
|
|
2962
|
+
if (props.collapse === "never") return;
|
|
2963
|
+
media = window.matchMedia(`(min-width: ${breakpoints[props.collapse]}px)`);
|
|
2964
|
+
media.addEventListener("change", onMediaChange);
|
|
2965
|
+
});
|
|
2966
|
+
onBeforeUnmount(() => media?.removeEventListener("change", onMediaChange));
|
|
2967
|
+
watch(open, async (value) => {
|
|
2968
|
+
if (!value) return;
|
|
2969
|
+
await nextTick();
|
|
2970
|
+
(menu.value?.querySelector("a, button"))?.focus({ preventScroll: true });
|
|
2971
|
+
});
|
|
2972
|
+
const style = computed(() => ({ "--j-navbar-max": props.maxWidth === "none" ? "none" : props.maxWidth }));
|
|
2973
|
+
return (_ctx, _cache) => {
|
|
2974
|
+
return openBlock(), createElementBlock("header", {
|
|
2975
|
+
ref_key: "root",
|
|
2976
|
+
ref: root,
|
|
2977
|
+
class: normalizeClass(["j-navbar", [`j-navbar--collapse-${__props.collapse}`, {
|
|
2978
|
+
"is-sticky": __props.sticky,
|
|
2979
|
+
"is-bordered": __props.bordered,
|
|
2980
|
+
"is-open": open.value
|
|
2981
|
+
}]]),
|
|
2982
|
+
style: normalizeStyle(style.value)
|
|
2983
|
+
}, [createElementVNode("div", _hoisted_1$26, [
|
|
2984
|
+
_ctx.$slots.brand ? (openBlock(), createElementBlock("div", _hoisted_2$19, [renderSlot(_ctx.$slots, "brand")])) : createCommentVNode("", true),
|
|
2985
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("nav", {
|
|
2986
|
+
key: 1,
|
|
2987
|
+
class: "j-navbar__links",
|
|
2988
|
+
"aria-label": __props.label
|
|
2989
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_3$15)) : createCommentVNode("", true),
|
|
2990
|
+
createElementVNode("div", _hoisted_4$11, [_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$8, [renderSlot(_ctx.$slots, "actions")])) : createCommentVNode("", true), __props.collapse !== "never" && (_ctx.$slots.default || _ctx.$slots["menu-footer"]) ? (openBlock(), createBlock(JBurger_default, {
|
|
2991
|
+
key: 1,
|
|
2992
|
+
modelValue: open.value,
|
|
2993
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => open.value = $event),
|
|
2994
|
+
class: "j-navbar__burger",
|
|
2995
|
+
controls: menuId
|
|
2996
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true)])
|
|
2997
|
+
]), createVNode(Transition, { name: "j-navbar-menu" }, {
|
|
2998
|
+
default: withCtx(() => [withDirectives(createElementVNode("div", {
|
|
2999
|
+
id: menuId,
|
|
3000
|
+
ref_key: "menu",
|
|
3001
|
+
ref: menu,
|
|
3002
|
+
class: "j-navbar__menu",
|
|
3003
|
+
onClick: onMenuClick
|
|
3004
|
+
}, [_ctx.$slots.default ? (openBlock(), createElementBlock("nav", {
|
|
3005
|
+
key: 0,
|
|
3006
|
+
class: "j-navbar__menu-links",
|
|
3007
|
+
"aria-label": __props.label
|
|
3008
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_6$5)) : createCommentVNode("", true), _ctx.$slots["menu-footer"] ? (openBlock(), createElementBlock("div", _hoisted_7$3, [renderSlot(_ctx.$slots, "menu-footer")])) : createCommentVNode("", true)], 512), [[vShow, open.value]])]),
|
|
3009
|
+
_: 3
|
|
3010
|
+
})], 6);
|
|
3011
|
+
};
|
|
3012
|
+
}
|
|
3013
|
+
});
|
|
3014
|
+
//#endregion
|
|
3015
|
+
//#region src/components/navbar/JNavbarLink.vue?vue&type=script&setup=true&lang.ts
|
|
3016
|
+
var _hoisted_1$25 = {
|
|
3017
|
+
key: 0,
|
|
3018
|
+
class: "j-navbar-link__icon"
|
|
3019
|
+
};
|
|
3020
|
+
//#endregion
|
|
3021
|
+
//#region src/components/navbar/JNavbarLink.vue
|
|
3022
|
+
var JNavbarLink_default = /* @__PURE__ */ defineComponent({
|
|
3023
|
+
__name: "JNavbarLink",
|
|
3024
|
+
props: {
|
|
3025
|
+
active: { type: Boolean },
|
|
3026
|
+
as: { default: "a" }
|
|
3027
|
+
},
|
|
3028
|
+
setup(__props) {
|
|
3029
|
+
return (_ctx, _cache) => {
|
|
3030
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
|
|
3031
|
+
class: normalizeClass(["j-navbar-link j-focusable", { "is-active": __props.active }]),
|
|
3032
|
+
"aria-current": __props.active ? "page" : void 0
|
|
3033
|
+
}, {
|
|
3034
|
+
default: withCtx(() => [_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_1$25, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")]),
|
|
3035
|
+
_: 3
|
|
3036
|
+
}, 8, ["class", "aria-current"]);
|
|
3037
|
+
};
|
|
3038
|
+
}
|
|
3039
|
+
});
|
|
3040
|
+
//#endregion
|
|
3041
|
+
//#region src/components/pagination/JPagination.vue?vue&type=script&setup=true&lang.ts
|
|
3042
|
+
var _hoisted_1$24 = ["aria-label"];
|
|
3043
|
+
var _hoisted_2$18 = ["disabled"];
|
|
3044
|
+
var _hoisted_3$14 = {
|
|
3045
|
+
key: 0,
|
|
3046
|
+
class: "j-pagination__ellipsis",
|
|
3047
|
+
"aria-hidden": "true"
|
|
3048
|
+
};
|
|
3049
|
+
var _hoisted_4$10 = [
|
|
3050
|
+
"aria-current",
|
|
3051
|
+
"aria-label",
|
|
3052
|
+
"disabled",
|
|
3053
|
+
"onClick"
|
|
3054
|
+
];
|
|
3055
|
+
var _hoisted_5$7 = ["disabled"];
|
|
3056
|
+
//#endregion
|
|
3057
|
+
//#region src/components/pagination/JPagination.vue
|
|
3058
|
+
var JPagination_default = /* @__PURE__ */ defineComponent({
|
|
3059
|
+
__name: "JPagination",
|
|
3060
|
+
props: /*@__PURE__*/ mergeModels({
|
|
3061
|
+
total: {},
|
|
3062
|
+
siblingCount: { default: 1 },
|
|
3063
|
+
label: {},
|
|
3064
|
+
size: { default: "md" },
|
|
3065
|
+
disabled: { type: Boolean }
|
|
3066
|
+
}, {
|
|
3067
|
+
"modelValue": { default: 1 },
|
|
3068
|
+
"modelModifiers": {}
|
|
3069
|
+
}),
|
|
3070
|
+
emits: ["update:modelValue"],
|
|
3071
|
+
setup(__props) {
|
|
3072
|
+
const props = __props;
|
|
3073
|
+
const model = useModel(__props, "modelValue");
|
|
3074
|
+
const list = ref(null);
|
|
3075
|
+
const totalPages = computed(() => Math.max(1, Math.floor(props.total)));
|
|
3076
|
+
const current = computed(() => Math.min(Math.max(1, model.value), totalPages.value));
|
|
3077
|
+
const pageItems = computed(() => {
|
|
3078
|
+
const total = totalPages.value;
|
|
3079
|
+
const siblings = Math.max(0, props.siblingCount);
|
|
3080
|
+
if (total <= siblings * 2 + 5) return Array.from({ length: total }, (_, i) => i + 1);
|
|
3081
|
+
const left = Math.max(current.value - siblings, 1);
|
|
3082
|
+
const right = Math.min(current.value + siblings, total);
|
|
3083
|
+
const showLeftEllipsis = left > 2;
|
|
3084
|
+
const showRightEllipsis = right < total - 1;
|
|
3085
|
+
const items = [1];
|
|
3086
|
+
if (showLeftEllipsis) items.push("ellipsis");
|
|
3087
|
+
else for (let p = 2; p < left; p++) items.push(p);
|
|
3088
|
+
for (let p = Math.max(left, 2); p <= Math.min(right, total - 1); p++) items.push(p);
|
|
3089
|
+
if (showRightEllipsis) items.push("ellipsis");
|
|
3090
|
+
else for (let p = right + 1; p < total; p++) items.push(p);
|
|
3091
|
+
if (total > 1) items.push(total);
|
|
3092
|
+
return items;
|
|
3093
|
+
});
|
|
3094
|
+
function goTo(page, focus = false) {
|
|
3095
|
+
if (props.disabled) return;
|
|
3096
|
+
model.value = Math.min(Math.max(1, page), totalPages.value);
|
|
3097
|
+
if (focus) nextTick(() => focusElement(list.value?.querySelector("[aria-current=\"page\"]")));
|
|
3098
|
+
}
|
|
3099
|
+
function onKeydown(event) {
|
|
3100
|
+
if (!event.target.classList.contains("j-pagination__page")) return;
|
|
3101
|
+
if (event.key === "Home") {
|
|
3102
|
+
event.preventDefault();
|
|
3103
|
+
goTo(1, true);
|
|
3104
|
+
} else if (event.key === "End") {
|
|
3105
|
+
event.preventDefault();
|
|
3106
|
+
goTo(totalPages.value, true);
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
return (_ctx, _cache) => {
|
|
3110
|
+
return openBlock(), createElementBlock("nav", {
|
|
3111
|
+
class: normalizeClass(["j-pagination", `j-pagination--${__props.size}`]),
|
|
3112
|
+
"aria-label": __props.label || "Pagination"
|
|
3113
|
+
}, [
|
|
3114
|
+
createElementVNode("button", {
|
|
3115
|
+
type: "button",
|
|
3116
|
+
class: "j-pagination__nav j-focusable",
|
|
3117
|
+
"aria-label": "Previous page",
|
|
3118
|
+
disabled: __props.disabled || current.value === 1,
|
|
3119
|
+
onClick: _cache[0] || (_cache[0] = ($event) => goTo(current.value - 1, true))
|
|
3120
|
+
}, [createVNode(unref(IconChevronLeft))], 8, _hoisted_2$18),
|
|
3121
|
+
createElementVNode("ul", {
|
|
3122
|
+
ref_key: "list",
|
|
3123
|
+
ref: list,
|
|
3124
|
+
class: "j-pagination__list",
|
|
3125
|
+
onKeydown
|
|
3126
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(pageItems.value, (item, index) => {
|
|
3127
|
+
return openBlock(), createElementBlock("li", { key: index }, [item === "ellipsis" ? (openBlock(), createElementBlock("span", _hoisted_3$14, [createVNode(unref(IconMoreHorizontal))])) : (openBlock(), createElementBlock("button", {
|
|
3128
|
+
key: 1,
|
|
3129
|
+
type: "button",
|
|
3130
|
+
class: normalizeClass(["j-pagination__page j-focusable", { "is-current": item === current.value }]),
|
|
3131
|
+
"aria-current": item === current.value ? "page" : void 0,
|
|
3132
|
+
"aria-label": `Page ${item}`,
|
|
3133
|
+
disabled: __props.disabled,
|
|
3134
|
+
onClick: ($event) => goTo(item)
|
|
3135
|
+
}, toDisplayString(item), 11, _hoisted_4$10))]);
|
|
3136
|
+
}), 128))], 544),
|
|
3137
|
+
createElementVNode("button", {
|
|
3138
|
+
type: "button",
|
|
3139
|
+
class: "j-pagination__nav j-focusable",
|
|
3140
|
+
"aria-label": "Next page",
|
|
3141
|
+
disabled: __props.disabled || current.value === totalPages.value,
|
|
3142
|
+
onClick: _cache[1] || (_cache[1] = ($event) => goTo(current.value + 1, true))
|
|
3143
|
+
}, [createVNode(unref(IconChevronRight))], 8, _hoisted_5$7)
|
|
3144
|
+
], 10, _hoisted_1$24);
|
|
3145
|
+
};
|
|
3146
|
+
}
|
|
3147
|
+
});
|
|
3148
|
+
//#endregion
|
|
3149
|
+
//#region src/components/popover/JPopover.vue?vue&type=script&setup=true&lang.ts
|
|
3150
|
+
var _hoisted_1$23 = ["aria-label"];
|
|
3151
|
+
//#endregion
|
|
3152
|
+
//#region src/components/popover/JPopover.vue
|
|
3153
|
+
var JPopover_default = /* @__PURE__ */ defineComponent({
|
|
3154
|
+
__name: "JPopover",
|
|
3155
|
+
props: /*@__PURE__*/ mergeModels({
|
|
3156
|
+
placement: { default: "bottom" },
|
|
3157
|
+
offset: { default: 8 },
|
|
3158
|
+
ariaLabel: {},
|
|
3159
|
+
closeOnOutside: {
|
|
3160
|
+
type: Boolean,
|
|
3161
|
+
default: true
|
|
3162
|
+
},
|
|
3163
|
+
disabled: { type: Boolean }
|
|
3164
|
+
}, {
|
|
3165
|
+
"open": {
|
|
3166
|
+
type: Boolean,
|
|
3167
|
+
default: false
|
|
3168
|
+
},
|
|
3169
|
+
"openModifiers": {}
|
|
3170
|
+
}),
|
|
3171
|
+
emits: ["update:open"],
|
|
3172
|
+
setup(__props, { expose: __expose }) {
|
|
3173
|
+
const props = __props;
|
|
3174
|
+
const open = useModel(__props, "open");
|
|
3175
|
+
const id = `j-${useId()}-popover`;
|
|
3176
|
+
const triggerRef = ref();
|
|
3177
|
+
const triggerEl = computed(() => unrefElement(triggerRef.value));
|
|
3178
|
+
const content = ref(null);
|
|
3179
|
+
const { styles } = useFloating(triggerEl, content, () => ({
|
|
3180
|
+
placement: props.placement,
|
|
3181
|
+
offset: props.offset
|
|
3182
|
+
}));
|
|
3183
|
+
function close(restoreFocus = false) {
|
|
3184
|
+
if (!open.value) return;
|
|
3185
|
+
open.value = false;
|
|
3186
|
+
if (restoreFocus) nextTick(() => focusElement(triggerEl.value));
|
|
3187
|
+
}
|
|
3188
|
+
useLayer({
|
|
3189
|
+
active: open,
|
|
3190
|
+
elements: () => [triggerEl.value, content.value],
|
|
3191
|
+
onEscape: () => close(true),
|
|
3192
|
+
onPointerDownOutside: () => props.closeOnOutside && close(false)
|
|
2517
3193
|
});
|
|
2518
3194
|
watch(open, async (value) => {
|
|
2519
3195
|
if (!value) return;
|
|
@@ -2561,7 +3237,7 @@ var JPopover_default = /* @__PURE__ */ defineComponent({
|
|
|
2561
3237
|
style: normalizeStyle(unref(styles)),
|
|
2562
3238
|
"aria-label": __props.ariaLabel,
|
|
2563
3239
|
onFocusout: onFocusOut
|
|
2564
|
-
}, [renderSlot(_ctx.$slots, "default", { close: () => close(true) })], 44, _hoisted_1$
|
|
3240
|
+
}, [renderSlot(_ctx.$slots, "default", { close: () => close(true) })], 44, _hoisted_1$23)) : createCommentVNode("", true)]),
|
|
2565
3241
|
_: 3
|
|
2566
3242
|
})]),
|
|
2567
3243
|
_: 3
|
|
@@ -2571,16 +3247,16 @@ var JPopover_default = /* @__PURE__ */ defineComponent({
|
|
|
2571
3247
|
});
|
|
2572
3248
|
//#endregion
|
|
2573
3249
|
//#region src/components/progress/JProgress.vue?vue&type=script&setup=true&lang.ts
|
|
2574
|
-
var _hoisted_1$
|
|
3250
|
+
var _hoisted_1$22 = {
|
|
2575
3251
|
key: 0,
|
|
2576
3252
|
class: "j-progress__header"
|
|
2577
3253
|
};
|
|
2578
|
-
var _hoisted_2$
|
|
2579
|
-
var _hoisted_3$
|
|
3254
|
+
var _hoisted_2$17 = ["id"];
|
|
3255
|
+
var _hoisted_3$13 = {
|
|
2580
3256
|
key: 1,
|
|
2581
3257
|
class: "j-progress__value"
|
|
2582
3258
|
};
|
|
2583
|
-
var _hoisted_4$
|
|
3259
|
+
var _hoisted_4$9 = [
|
|
2584
3260
|
"aria-labelledby",
|
|
2585
3261
|
"aria-valuemax",
|
|
2586
3262
|
"aria-valuenow",
|
|
@@ -2609,11 +3285,11 @@ var JProgress_default = /* @__PURE__ */ defineComponent({
|
|
|
2609
3285
|
`j-progress--${__props.size}`,
|
|
2610
3286
|
`j-progress--${__props.variant}`,
|
|
2611
3287
|
{ "is-indeterminate": indeterminate.value }
|
|
2612
|
-
]]) }, [__props.label || __props.showValue ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3288
|
+
]]) }, [__props.label || __props.showValue ? (openBlock(), createElementBlock("div", _hoisted_1$22, [__props.label ? (openBlock(), createElementBlock("span", {
|
|
2613
3289
|
key: 0,
|
|
2614
3290
|
id: `${id}-label`,
|
|
2615
3291
|
class: "j-progress__label"
|
|
2616
|
-
}, toDisplayString(__props.label), 9, _hoisted_2$
|
|
3292
|
+
}, toDisplayString(__props.label), 9, _hoisted_2$17)) : createCommentVNode("", true), __props.showValue && !indeterminate.value ? (openBlock(), createElementBlock("span", _hoisted_3$13, toDisplayString(percent.value) + "%", 1)) : createCommentVNode("", true)])) : createCommentVNode("", true), createElementVNode("div", {
|
|
2617
3293
|
class: "j-progress__track",
|
|
2618
3294
|
role: "progressbar",
|
|
2619
3295
|
"aria-labelledby": __props.label ? `${id}-label` : void 0,
|
|
@@ -2624,7 +3300,7 @@ var JProgress_default = /* @__PURE__ */ defineComponent({
|
|
|
2624
3300
|
}, [createElementVNode("span", {
|
|
2625
3301
|
class: "j-progress__fill",
|
|
2626
3302
|
style: normalizeStyle(indeterminate.value ? void 0 : { transform: `scaleX(${ratio.value})` })
|
|
2627
|
-
}, null, 4)], 8, _hoisted_4$
|
|
3303
|
+
}, null, 4)], 8, _hoisted_4$9)], 2);
|
|
2628
3304
|
};
|
|
2629
3305
|
}
|
|
2630
3306
|
});
|
|
@@ -2633,9 +3309,9 @@ var JProgress_default = /* @__PURE__ */ defineComponent({
|
|
|
2633
3309
|
var RADIO_GROUP = Symbol("JRadioGroup");
|
|
2634
3310
|
//#endregion
|
|
2635
3311
|
//#region src/components/radio/JRadio.vue?vue&type=script&setup=true&lang.ts
|
|
2636
|
-
var _hoisted_1$
|
|
2637
|
-
var _hoisted_2$
|
|
2638
|
-
var _hoisted_3$
|
|
3312
|
+
var _hoisted_1$21 = ["data-state"];
|
|
3313
|
+
var _hoisted_2$16 = { class: "j-radio__control" };
|
|
3314
|
+
var _hoisted_3$12 = [
|
|
2639
3315
|
"name",
|
|
2640
3316
|
"value",
|
|
2641
3317
|
"checked",
|
|
@@ -2643,7 +3319,7 @@ var _hoisted_3$6 = [
|
|
|
2643
3319
|
"required",
|
|
2644
3320
|
"aria-describedby"
|
|
2645
3321
|
];
|
|
2646
|
-
var _hoisted_4$
|
|
3322
|
+
var _hoisted_4$8 = {
|
|
2647
3323
|
key: 0,
|
|
2648
3324
|
class: "j-radio__text"
|
|
2649
3325
|
};
|
|
@@ -2670,7 +3346,7 @@ var JRadio_default = /* @__PURE__ */ defineComponent({
|
|
|
2670
3346
|
class: normalizeClass(["j-radio", [_ctx.$attrs.class, { "is-disabled": isDisabled.value }]]),
|
|
2671
3347
|
style: normalizeStyle(_ctx.$attrs.style),
|
|
2672
3348
|
"data-state": checked.value ? "checked" : "unchecked"
|
|
2673
|
-
}, [createElementVNode("span", _hoisted_2$
|
|
3349
|
+
}, [createElementVNode("span", _hoisted_2$16, [createElementVNode("input", mergeProps({ id }, {
|
|
2674
3350
|
..._ctx.$attrs,
|
|
2675
3351
|
class: void 0,
|
|
2676
3352
|
style: void 0
|
|
@@ -2684,10 +3360,10 @@ var JRadio_default = /* @__PURE__ */ defineComponent({
|
|
|
2684
3360
|
required: unref(group)?.required.value,
|
|
2685
3361
|
"aria-describedby": __props.description || _ctx.$slots.description ? descriptionId : void 0,
|
|
2686
3362
|
onChange: _cache[0] || (_cache[0] = ($event) => unref(group)?.select(__props.value))
|
|
2687
|
-
}), null, 16, _hoisted_3$
|
|
3363
|
+
}), null, 16, _hoisted_3$12), _cache[1] || (_cache[1] = createElementVNode("span", {
|
|
2688
3364
|
class: "j-radio__circle",
|
|
2689
3365
|
"aria-hidden": "true"
|
|
2690
|
-
}, null, -1))]), __props.label || _ctx.$slots.default || __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
3366
|
+
}, null, -1))]), __props.label || _ctx.$slots.default || __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("span", _hoisted_4$8, [__props.label || _ctx.$slots.default ? (openBlock(), createElementBlock("label", {
|
|
2691
3367
|
key: 0,
|
|
2692
3368
|
for: id,
|
|
2693
3369
|
class: "j-radio__label"
|
|
@@ -2695,23 +3371,23 @@ var JRadio_default = /* @__PURE__ */ defineComponent({
|
|
|
2695
3371
|
key: 1,
|
|
2696
3372
|
id: descriptionId,
|
|
2697
3373
|
class: "j-radio__description"
|
|
2698
|
-
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("", true)])) : createCommentVNode("", true)], 14, _hoisted_1$
|
|
3374
|
+
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])])) : createCommentVNode("", true)])) : createCommentVNode("", true)], 14, _hoisted_1$21);
|
|
2699
3375
|
};
|
|
2700
3376
|
}
|
|
2701
3377
|
});
|
|
2702
3378
|
//#endregion
|
|
2703
3379
|
//#region src/components/radio/JRadioGroup.vue?vue&type=script&setup=true&lang.ts
|
|
2704
|
-
var _hoisted_1$
|
|
3380
|
+
var _hoisted_1$20 = [
|
|
2705
3381
|
"disabled",
|
|
2706
3382
|
"aria-describedby",
|
|
2707
3383
|
"aria-invalid",
|
|
2708
3384
|
"aria-required"
|
|
2709
3385
|
];
|
|
2710
|
-
var _hoisted_2$
|
|
3386
|
+
var _hoisted_2$15 = {
|
|
2711
3387
|
key: 0,
|
|
2712
3388
|
class: "j-radio-group__legend"
|
|
2713
3389
|
};
|
|
2714
|
-
var _hoisted_3$
|
|
3390
|
+
var _hoisted_3$11 = {
|
|
2715
3391
|
key: 0,
|
|
2716
3392
|
class: "j-field__required",
|
|
2717
3393
|
"aria-hidden": "true"
|
|
@@ -2765,7 +3441,7 @@ var JRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
2765
3441
|
"aria-invalid": !!__props.error || void 0,
|
|
2766
3442
|
"aria-required": __props.required || void 0
|
|
2767
3443
|
}, [
|
|
2768
|
-
__props.label || _ctx.$slots.label ? (openBlock(), createElementBlock("legend", _hoisted_2$
|
|
3444
|
+
__props.label || _ctx.$slots.label ? (openBlock(), createElementBlock("legend", _hoisted_2$15, [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.label), 1)]), __props.required ? (openBlock(), createElementBlock("span", _hoisted_3$11, "*")) : createCommentVNode("", true)])) : createCommentVNode("", true),
|
|
2769
3445
|
__props.description && !errorMessage.value ? (openBlock(), createElementBlock("p", {
|
|
2770
3446
|
key: 1,
|
|
2771
3447
|
id: descriptionId,
|
|
@@ -2777,13 +3453,121 @@ var JRadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
|
2777
3453
|
id: errorId,
|
|
2778
3454
|
class: "j-radio-group__error"
|
|
2779
3455
|
}, toDisplayString(errorMessage.value), 1)) : createCommentVNode("", true)
|
|
2780
|
-
], 10, _hoisted_1$
|
|
3456
|
+
], 10, _hoisted_1$20);
|
|
3457
|
+
};
|
|
3458
|
+
}
|
|
3459
|
+
});
|
|
3460
|
+
//#endregion
|
|
3461
|
+
//#region src/components/rating/JRating.vue?vue&type=script&setup=true&lang.ts
|
|
3462
|
+
var _hoisted_1$19 = [
|
|
3463
|
+
"role",
|
|
3464
|
+
"aria-label",
|
|
3465
|
+
"aria-disabled"
|
|
3466
|
+
];
|
|
3467
|
+
var _hoisted_2$14 = [
|
|
3468
|
+
"aria-checked",
|
|
3469
|
+
"aria-label",
|
|
3470
|
+
"tabindex",
|
|
3471
|
+
"disabled",
|
|
3472
|
+
"onClick",
|
|
3473
|
+
"onMouseenter",
|
|
3474
|
+
"onFocus"
|
|
3475
|
+
];
|
|
3476
|
+
//#endregion
|
|
3477
|
+
//#region src/components/rating/JRating.vue
|
|
3478
|
+
var JRating_default = /* @__PURE__ */ defineComponent({
|
|
3479
|
+
__name: "JRating",
|
|
3480
|
+
props: /*@__PURE__*/ mergeModels({
|
|
3481
|
+
max: { default: 5 },
|
|
3482
|
+
readonly: { type: Boolean },
|
|
3483
|
+
disabled: { type: Boolean },
|
|
3484
|
+
size: { default: "md" },
|
|
3485
|
+
label: {},
|
|
3486
|
+
allowHalf: { type: Boolean }
|
|
3487
|
+
}, {
|
|
3488
|
+
"modelValue": { default: 0 },
|
|
3489
|
+
"modelModifiers": {}
|
|
3490
|
+
}),
|
|
3491
|
+
emits: ["update:modelValue"],
|
|
3492
|
+
setup(__props) {
|
|
3493
|
+
const props = __props;
|
|
3494
|
+
const model = useModel(__props, "modelValue");
|
|
3495
|
+
const hovered = ref(null);
|
|
3496
|
+
const stars = computed(() => Array.from({ length: props.max }, (_, i) => i + 1));
|
|
3497
|
+
const display = computed(() => hovered.value ?? model.value);
|
|
3498
|
+
function fillFor(star) {
|
|
3499
|
+
const value = display.value;
|
|
3500
|
+
if (value >= star) return 1;
|
|
3501
|
+
if (props.readonly && props.allowHalf && value >= star - .5) return .5;
|
|
3502
|
+
return 0;
|
|
3503
|
+
}
|
|
3504
|
+
function select(star) {
|
|
3505
|
+
if (props.readonly || props.disabled) return;
|
|
3506
|
+
model.value = star;
|
|
3507
|
+
}
|
|
3508
|
+
function onKeydown(event) {
|
|
3509
|
+
if (props.readonly || props.disabled) return;
|
|
3510
|
+
let next;
|
|
3511
|
+
if (event.key === "ArrowRight" || event.key === "ArrowUp") next = Math.min(props.max, model.value + 1);
|
|
3512
|
+
else if (event.key === "ArrowLeft" || event.key === "ArrowDown") next = Math.max(0, model.value - 1);
|
|
3513
|
+
else if (event.key === "Home") next = 0;
|
|
3514
|
+
else if (event.key === "End") next = props.max;
|
|
3515
|
+
if (next === void 0) return;
|
|
3516
|
+
event.preventDefault();
|
|
3517
|
+
model.value = next;
|
|
3518
|
+
}
|
|
3519
|
+
const groupLabel = computed(() => props.label ?? (props.readonly ? `${model.value} out of ${props.max} stars` : "Rating"));
|
|
3520
|
+
return (_ctx, _cache) => {
|
|
3521
|
+
return openBlock(), createElementBlock("div", {
|
|
3522
|
+
class: normalizeClass(["j-rating", [`j-rating--${__props.size}`, {
|
|
3523
|
+
"is-readonly": __props.readonly,
|
|
3524
|
+
"is-disabled": __props.disabled
|
|
3525
|
+
}]]),
|
|
3526
|
+
role: __props.readonly ? "img" : "radiogroup",
|
|
3527
|
+
"aria-label": groupLabel.value,
|
|
3528
|
+
"aria-disabled": __props.disabled || void 0,
|
|
3529
|
+
onMouseleave: _cache[1] || (_cache[1] = ($event) => hovered.value = null)
|
|
3530
|
+
}, [__props.readonly ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(stars.value, (star) => {
|
|
3531
|
+
return openBlock(), createElementBlock("span", {
|
|
3532
|
+
key: star,
|
|
3533
|
+
class: "j-rating__star",
|
|
3534
|
+
"aria-hidden": "true"
|
|
3535
|
+
}, [_cache[3] || (_cache[3] = createElementVNode("svg", {
|
|
3536
|
+
viewBox: "0 0 16 16",
|
|
3537
|
+
class: "j-rating__star-bg"
|
|
3538
|
+
}, [createElementVNode("path", { d: "M8 1.5l1.98 4.01 4.42.64-3.2 3.12.76 4.4L8 11.6l-3.96 2.08.76-4.4-3.2-3.12 4.42-.64z" })], -1)), createElementVNode("span", {
|
|
3539
|
+
class: "j-rating__star-fill",
|
|
3540
|
+
style: normalizeStyle({ width: `${fillFor(star) * 100}%` })
|
|
3541
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("svg", { viewBox: "0 0 16 16" }, [createElementVNode("path", { d: "M8 1.5l1.98 4.01 4.42.64-3.2 3.12.76 4.4L8 11.6l-3.96 2.08.76-4.4-3.2-3.12 4.42-.64z" })], -1)])], 4)]);
|
|
3542
|
+
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(stars.value, (star) => {
|
|
3543
|
+
return openBlock(), createElementBlock("button", {
|
|
3544
|
+
key: star,
|
|
3545
|
+
type: "button",
|
|
3546
|
+
role: "radio",
|
|
3547
|
+
class: "j-rating__button j-focusable",
|
|
3548
|
+
"aria-checked": model.value === star,
|
|
3549
|
+
"aria-label": `${star} ${star === 1 ? "star" : "stars"}`,
|
|
3550
|
+
tabindex: __props.disabled ? -1 : model.value === star || model.value === 0 && star === 1 ? 0 : -1,
|
|
3551
|
+
disabled: __props.disabled,
|
|
3552
|
+
onClick: ($event) => select(star),
|
|
3553
|
+
onMouseenter: ($event) => hovered.value = star,
|
|
3554
|
+
onFocus: ($event) => hovered.value = star,
|
|
3555
|
+
onBlur: _cache[0] || (_cache[0] = ($event) => hovered.value = null),
|
|
3556
|
+
onKeydown
|
|
3557
|
+
}, [_cache[5] || (_cache[5] = createElementVNode("svg", {
|
|
3558
|
+
viewBox: "0 0 16 16",
|
|
3559
|
+
class: "j-rating__star-bg"
|
|
3560
|
+
}, [createElementVNode("path", { d: "M8 1.5l1.98 4.01 4.42.64-3.2 3.12.76 4.4L8 11.6l-3.96 2.08.76-4.4-3.2-3.12 4.42-.64z" })], -1)), createElementVNode("span", {
|
|
3561
|
+
class: "j-rating__star-fill",
|
|
3562
|
+
style: normalizeStyle({ width: `${fillFor(star) * 100}%` })
|
|
3563
|
+
}, [..._cache[4] || (_cache[4] = [createElementVNode("svg", { viewBox: "0 0 16 16" }, [createElementVNode("path", { d: "M8 1.5l1.98 4.01 4.42.64-3.2 3.12.76 4.4L8 11.6l-3.96 2.08.76-4.4-3.2-3.12 4.42-.64z" })], -1)])], 4)], 40, _hoisted_2$14);
|
|
3564
|
+
}), 128))], 42, _hoisted_1$19);
|
|
2781
3565
|
};
|
|
2782
3566
|
}
|
|
2783
3567
|
});
|
|
2784
3568
|
//#endregion
|
|
2785
3569
|
//#region src/components/select/JSelect.vue?vue&type=script&setup=true&lang.ts
|
|
2786
|
-
var _hoisted_1$
|
|
3570
|
+
var _hoisted_1$18 = [
|
|
2787
3571
|
"id",
|
|
2788
3572
|
"aria-expanded",
|
|
2789
3573
|
"aria-controls",
|
|
@@ -2794,18 +3578,18 @@ var _hoisted_1$8 = [
|
|
|
2794
3578
|
"aria-required",
|
|
2795
3579
|
"disabled"
|
|
2796
3580
|
];
|
|
2797
|
-
var _hoisted_2$
|
|
2798
|
-
var _hoisted_3$
|
|
2799
|
-
var _hoisted_4$
|
|
2800
|
-
var _hoisted_5$
|
|
3581
|
+
var _hoisted_2$13 = ["id"];
|
|
3582
|
+
var _hoisted_3$10 = ["name", "value"];
|
|
3583
|
+
var _hoisted_4$7 = ["id", "aria-labelledby"];
|
|
3584
|
+
var _hoisted_5$6 = [
|
|
2801
3585
|
"id",
|
|
2802
3586
|
"aria-selected",
|
|
2803
3587
|
"aria-disabled",
|
|
2804
3588
|
"onPointermove",
|
|
2805
3589
|
"onClick"
|
|
2806
3590
|
];
|
|
2807
|
-
var _hoisted_6$
|
|
2808
|
-
var _hoisted_7 = { class: "j-select__option-label" };
|
|
3591
|
+
var _hoisted_6$4 = { class: "j-select__option-text" };
|
|
3592
|
+
var _hoisted_7$2 = { class: "j-select__option-label" };
|
|
2809
3593
|
var _hoisted_8 = {
|
|
2810
3594
|
key: 0,
|
|
2811
3595
|
class: "j-select__option-description"
|
|
@@ -3043,13 +3827,13 @@ var JSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
3043
3827
|
}), [createElementVNode("span", {
|
|
3044
3828
|
id: valueId.value,
|
|
3045
3829
|
class: normalizeClass(["j-select__value", { "is-placeholder": !selected.value }])
|
|
3046
|
-
}, [selected.value ? renderSlot(_ctx.$slots, "value", { option: selected.value }, () => [createTextVNode(toDisplayString(selected.value.label), 1)], void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.placeholder), 1)], 64))], 10, _hoisted_2$
|
|
3830
|
+
}, [selected.value ? renderSlot(_ctx.$slots, "value", { option: selected.value }, () => [createTextVNode(toDisplayString(selected.value.label), 1)], void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(__props.placeholder), 1)], 64))], 10, _hoisted_2$13), createVNode(unref(IconChevronUpDown), { class: "j-select__chevron" })], 16, _hoisted_1$18),
|
|
3047
3831
|
__props.name ? (openBlock(), createElementBlock("input", {
|
|
3048
3832
|
key: 0,
|
|
3049
3833
|
type: "hidden",
|
|
3050
3834
|
name: __props.name,
|
|
3051
3835
|
value: model.value ?? ""
|
|
3052
|
-
}, null, 8, _hoisted_3$
|
|
3836
|
+
}, null, 8, _hoisted_3$10)) : createCommentVNode("", true),
|
|
3053
3837
|
createVNode(JPortal_default, null, {
|
|
3054
3838
|
default: withCtx(() => [createVNode(Transition, { name: "j-pop" }, {
|
|
3055
3839
|
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("ul", {
|
|
@@ -3076,12 +3860,12 @@ var JSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
3076
3860
|
"aria-disabled": option.disabled || void 0,
|
|
3077
3861
|
onPointermove: ($event) => onOptionPointerMove(index),
|
|
3078
3862
|
onClick: ($event) => commit(index)
|
|
3079
|
-
}, [createElementVNode("span", _hoisted_6$
|
|
3863
|
+
}, [createElementVNode("span", _hoisted_6$4, [renderSlot(_ctx.$slots, "option", {
|
|
3080
3864
|
option,
|
|
3081
3865
|
selected: option.value === model.value,
|
|
3082
3866
|
active: index === activeIndex.value
|
|
3083
|
-
}, () => [createElementVNode("span", _hoisted_7, toDisplayString(option.label), 1), option.description ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(option.description), 1)) : createCommentVNode("", true)])]), createVNode(unref(IconCheck), { class: "j-select__check" })], 42, _hoisted_5$
|
|
3084
|
-
}), 128)), visibleOptions.value.length === 0 ? (openBlock(), createElementBlock("li", _hoisted_9, " No options ")) : createCommentVNode("", true)], 46, _hoisted_4$
|
|
3867
|
+
}, () => [createElementVNode("span", _hoisted_7$2, toDisplayString(option.label), 1), option.description ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(option.description), 1)) : createCommentVNode("", true)])]), createVNode(unref(IconCheck), { class: "j-select__check" })], 42, _hoisted_5$6);
|
|
3868
|
+
}), 128)), visibleOptions.value.length === 0 ? (openBlock(), createElementBlock("li", _hoisted_9, " No options ")) : createCommentVNode("", true)], 46, _hoisted_4$7)) : createCommentVNode("", true)]),
|
|
3085
3869
|
_: 3
|
|
3086
3870
|
})]),
|
|
3087
3871
|
_: 3
|
|
@@ -3111,8 +3895,8 @@ var JSelect_default = /* @__PURE__ */ defineComponent({
|
|
|
3111
3895
|
});
|
|
3112
3896
|
//#endregion
|
|
3113
3897
|
//#region src/components/separator/JSeparator.vue?vue&type=script&setup=true&lang.ts
|
|
3114
|
-
var _hoisted_1$
|
|
3115
|
-
var _hoisted_2$
|
|
3898
|
+
var _hoisted_1$17 = ["role", "aria-orientation"];
|
|
3899
|
+
var _hoisted_2$12 = {
|
|
3116
3900
|
key: 0,
|
|
3117
3901
|
class: "j-separator__label"
|
|
3118
3902
|
};
|
|
@@ -3134,28 +3918,28 @@ var JSeparator_default = /* @__PURE__ */ defineComponent({
|
|
|
3134
3918
|
class: normalizeClass(["j-separator", [`j-separator--${__props.orientation}`, { "j-separator--labelled": __props.label || _ctx.$slots.default }]]),
|
|
3135
3919
|
role: __props.decorative ? "none" : "separator",
|
|
3136
3920
|
"aria-orientation": __props.decorative ? void 0 : __props.orientation
|
|
3137
|
-
}, [__props.label || _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
3921
|
+
}, [__props.label || _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$12, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])])) : createCommentVNode("", true)], 10, _hoisted_1$17);
|
|
3138
3922
|
};
|
|
3139
3923
|
}
|
|
3140
3924
|
});
|
|
3141
3925
|
//#endregion
|
|
3142
3926
|
//#region src/components/sheet/JSheet.vue?vue&type=script&setup=true&lang.ts
|
|
3143
|
-
var _hoisted_1$
|
|
3927
|
+
var _hoisted_1$16 = {
|
|
3144
3928
|
key: 0,
|
|
3145
3929
|
class: "j-sheet__overlay",
|
|
3146
3930
|
"aria-hidden": "true"
|
|
3147
3931
|
};
|
|
3148
|
-
var _hoisted_2$
|
|
3932
|
+
var _hoisted_2$11 = [
|
|
3149
3933
|
"aria-labelledby",
|
|
3150
3934
|
"aria-label",
|
|
3151
3935
|
"aria-describedby"
|
|
3152
3936
|
];
|
|
3153
|
-
var _hoisted_3$
|
|
3937
|
+
var _hoisted_3$9 = {
|
|
3154
3938
|
key: 0,
|
|
3155
3939
|
class: "j-sheet__header"
|
|
3156
3940
|
};
|
|
3157
|
-
var _hoisted_4$
|
|
3158
|
-
var _hoisted_5$
|
|
3941
|
+
var _hoisted_4$6 = { class: "j-sheet__body" };
|
|
3942
|
+
var _hoisted_5$5 = {
|
|
3159
3943
|
key: 1,
|
|
3160
3944
|
class: "j-sheet__footer"
|
|
3161
3945
|
};
|
|
@@ -3207,7 +3991,7 @@ var JSheet_default = /* @__PURE__ */ defineComponent({
|
|
|
3207
3991
|
return (_ctx, _cache) => {
|
|
3208
3992
|
return openBlock(), createBlock(JPortal_default, null, {
|
|
3209
3993
|
default: withCtx(() => [createVNode(Transition, { name: "j-sheet-overlay" }, {
|
|
3210
|
-
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3994
|
+
default: withCtx(() => [open.value ? (openBlock(), createElementBlock("div", _hoisted_1$16)) : createCommentVNode("", true)]),
|
|
3211
3995
|
_: 1
|
|
3212
3996
|
}), createVNode(Transition, {
|
|
3213
3997
|
name: "j-sheet",
|
|
@@ -3238,7 +4022,7 @@ var JSheet_default = /* @__PURE__ */ defineComponent({
|
|
|
3238
4022
|
"aria-describedby": __props.description ? descriptionId : void 0,
|
|
3239
4023
|
onAnimationend: _cache[0] || (_cache[0] = ($event) => nudging.value = false)
|
|
3240
4024
|
}, [
|
|
3241
|
-
__props.title || __props.description || _ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_3$
|
|
4025
|
+
__props.title || __props.description || _ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_3$9, [renderSlot(_ctx.$slots, "header", {
|
|
3242
4026
|
titleId,
|
|
3243
4027
|
descriptionId
|
|
3244
4028
|
}, () => [createElementVNode("h2", {
|
|
@@ -3249,8 +4033,8 @@ var JSheet_default = /* @__PURE__ */ defineComponent({
|
|
|
3249
4033
|
id: descriptionId,
|
|
3250
4034
|
class: "j-sheet__description"
|
|
3251
4035
|
}, toDisplayString(__props.description), 1)) : createCommentVNode("", true)])])) : createCommentVNode("", true),
|
|
3252
|
-
createElementVNode("div", _hoisted_4$
|
|
3253
|
-
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_5$
|
|
4036
|
+
createElementVNode("div", _hoisted_4$6, [renderSlot(_ctx.$slots, "default", { close })]),
|
|
4037
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_5$5, [renderSlot(_ctx.$slots, "footer", { close })])) : createCommentVNode("", true),
|
|
3254
4038
|
!__props.hideClose ? (openBlock(), createElementBlock("button", {
|
|
3255
4039
|
key: 2,
|
|
3256
4040
|
type: "button",
|
|
@@ -3258,7 +4042,7 @@ var JSheet_default = /* @__PURE__ */ defineComponent({
|
|
|
3258
4042
|
"aria-label": "Close",
|
|
3259
4043
|
onClick: close
|
|
3260
4044
|
}, [createVNode(unref(IconX))])) : createCommentVNode("", true)
|
|
3261
|
-
], 42, _hoisted_2$
|
|
4045
|
+
], 42, _hoisted_2$11)], 34)) : createCommentVNode("", true)]),
|
|
3262
4046
|
_: 3
|
|
3263
4047
|
})]),
|
|
3264
4048
|
_: 3
|
|
@@ -3267,6 +4051,139 @@ var JSheet_default = /* @__PURE__ */ defineComponent({
|
|
|
3267
4051
|
}
|
|
3268
4052
|
});
|
|
3269
4053
|
//#endregion
|
|
4054
|
+
//#region src/components/sidebar/JSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
4055
|
+
var _hoisted_1$15 = { class: "j-sidebar" };
|
|
4056
|
+
var _hoisted_2$10 = {
|
|
4057
|
+
key: 0,
|
|
4058
|
+
class: "j-sidebar__header"
|
|
4059
|
+
};
|
|
4060
|
+
var _hoisted_3$8 = ["aria-label"];
|
|
4061
|
+
var _hoisted_4$5 = {
|
|
4062
|
+
key: 1,
|
|
4063
|
+
class: "j-sidebar__footer"
|
|
4064
|
+
};
|
|
4065
|
+
//#endregion
|
|
4066
|
+
//#region src/components/sidebar/JSidebar.vue
|
|
4067
|
+
var JSidebar_default = /* @__PURE__ */ defineComponent({
|
|
4068
|
+
__name: "JSidebar",
|
|
4069
|
+
props: { label: { default: "Sidebar" } },
|
|
4070
|
+
setup(__props) {
|
|
4071
|
+
return (_ctx, _cache) => {
|
|
4072
|
+
return openBlock(), createElementBlock("aside", _hoisted_1$15, [
|
|
4073
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_2$10, [renderSlot(_ctx.$slots, "header")])) : createCommentVNode("", true),
|
|
4074
|
+
createElementVNode("nav", {
|
|
4075
|
+
class: "j-sidebar__nav",
|
|
4076
|
+
"aria-label": __props.label
|
|
4077
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_3$8),
|
|
4078
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_4$5, [renderSlot(_ctx.$slots, "footer")])) : createCommentVNode("", true)
|
|
4079
|
+
]);
|
|
4080
|
+
};
|
|
4081
|
+
}
|
|
4082
|
+
});
|
|
4083
|
+
//#endregion
|
|
4084
|
+
//#region src/components/sidebar/JSidebarGroup.vue?vue&type=script&setup=true&lang.ts
|
|
4085
|
+
var _hoisted_1$14 = ["data-state"];
|
|
4086
|
+
var _hoisted_2$9 = ["aria-expanded"];
|
|
4087
|
+
var _hoisted_3$7 = ["aria-labelledby", "inert"];
|
|
4088
|
+
var _hoisted_4$4 = { class: "j-sidebar-group__panel-inner" };
|
|
4089
|
+
var _hoisted_5$4 = { class: "j-sidebar-group__items" };
|
|
4090
|
+
//#endregion
|
|
4091
|
+
//#region src/components/sidebar/JSidebarGroup.vue
|
|
4092
|
+
var JSidebarGroup_default = /* @__PURE__ */ defineComponent({
|
|
4093
|
+
__name: "JSidebarGroup",
|
|
4094
|
+
props: /*@__PURE__*/ mergeModels({
|
|
4095
|
+
title: {},
|
|
4096
|
+
collapsible: {
|
|
4097
|
+
type: Boolean,
|
|
4098
|
+
default: true
|
|
4099
|
+
}
|
|
4100
|
+
}, {
|
|
4101
|
+
"open": {
|
|
4102
|
+
type: Boolean,
|
|
4103
|
+
default: true
|
|
4104
|
+
},
|
|
4105
|
+
"openModifiers": {}
|
|
4106
|
+
}),
|
|
4107
|
+
emits: ["update:open"],
|
|
4108
|
+
setup(__props) {
|
|
4109
|
+
/** Whether the group is expanded. Open by default. */
|
|
4110
|
+
const open = useModel(__props, "open");
|
|
4111
|
+
const id = `j-${useId()}`;
|
|
4112
|
+
const titleId = `${id}-title`;
|
|
4113
|
+
const listId = `${id}-list`;
|
|
4114
|
+
return (_ctx, _cache) => {
|
|
4115
|
+
return openBlock(), createElementBlock("div", {
|
|
4116
|
+
class: "j-sidebar-group",
|
|
4117
|
+
"data-state": open.value ? "open" : "closed"
|
|
4118
|
+
}, [__props.title && __props.collapsible ? (openBlock(), createElementBlock("button", {
|
|
4119
|
+
key: 0,
|
|
4120
|
+
id: titleId,
|
|
4121
|
+
type: "button",
|
|
4122
|
+
class: "j-sidebar-group__title j-sidebar-group__toggle j-focusable",
|
|
4123
|
+
"aria-expanded": open.value,
|
|
4124
|
+
"aria-controls": listId,
|
|
4125
|
+
onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
|
|
4126
|
+
}, [createElementVNode("span", null, toDisplayString(__props.title), 1), createVNode(unref(IconChevronDown), { class: "j-sidebar-group__chevron" })], 8, _hoisted_2$9)) : __props.title ? (openBlock(), createElementBlock("p", {
|
|
4127
|
+
key: 1,
|
|
4128
|
+
id: titleId,
|
|
4129
|
+
class: "j-sidebar-group__title"
|
|
4130
|
+
}, toDisplayString(__props.title), 1)) : createCommentVNode("", true), createElementVNode("div", {
|
|
4131
|
+
id: listId,
|
|
4132
|
+
class: "j-sidebar-group__panel",
|
|
4133
|
+
role: "group",
|
|
4134
|
+
"aria-labelledby": __props.title ? titleId : void 0,
|
|
4135
|
+
inert: !open.value
|
|
4136
|
+
}, [createElementVNode("div", _hoisted_4$4, [createElementVNode("div", _hoisted_5$4, [renderSlot(_ctx.$slots, "default")])])], 8, _hoisted_3$7)], 8, _hoisted_1$14);
|
|
4137
|
+
};
|
|
4138
|
+
}
|
|
4139
|
+
});
|
|
4140
|
+
//#endregion
|
|
4141
|
+
//#region src/components/sidebar/JSidebarItem.vue?vue&type=script&setup=true&lang.ts
|
|
4142
|
+
var _hoisted_1$13 = {
|
|
4143
|
+
key: 0,
|
|
4144
|
+
class: "j-sidebar-item__icon"
|
|
4145
|
+
};
|
|
4146
|
+
var _hoisted_2$8 = { class: "j-sidebar-item__label" };
|
|
4147
|
+
var _hoisted_3$6 = {
|
|
4148
|
+
key: 1,
|
|
4149
|
+
class: "j-sidebar-item__trailing"
|
|
4150
|
+
};
|
|
4151
|
+
//#endregion
|
|
4152
|
+
//#region src/components/sidebar/JSidebarItem.vue
|
|
4153
|
+
var JSidebarItem_default = /* @__PURE__ */ defineComponent({
|
|
4154
|
+
__name: "JSidebarItem",
|
|
4155
|
+
props: {
|
|
4156
|
+
active: { type: Boolean },
|
|
4157
|
+
disabled: { type: Boolean },
|
|
4158
|
+
as: { default: "a" }
|
|
4159
|
+
},
|
|
4160
|
+
setup(__props) {
|
|
4161
|
+
return (_ctx, _cache) => {
|
|
4162
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), {
|
|
4163
|
+
class: normalizeClass(["j-sidebar-item j-focusable", {
|
|
4164
|
+
"is-active": __props.active,
|
|
4165
|
+
"is-disabled": __props.disabled
|
|
4166
|
+
}]),
|
|
4167
|
+
"aria-current": __props.active ? "page" : void 0,
|
|
4168
|
+
"aria-disabled": __props.disabled || void 0,
|
|
4169
|
+
tabindex: __props.disabled ? -1 : void 0
|
|
4170
|
+
}, {
|
|
4171
|
+
default: withCtx(() => [
|
|
4172
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_1$13, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true),
|
|
4173
|
+
createElementVNode("span", _hoisted_2$8, [renderSlot(_ctx.$slots, "default")]),
|
|
4174
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_3$6, [renderSlot(_ctx.$slots, "trailing")])) : createCommentVNode("", true)
|
|
4175
|
+
]),
|
|
4176
|
+
_: 3
|
|
4177
|
+
}, 8, [
|
|
4178
|
+
"class",
|
|
4179
|
+
"aria-current",
|
|
4180
|
+
"aria-disabled",
|
|
4181
|
+
"tabindex"
|
|
4182
|
+
]);
|
|
4183
|
+
};
|
|
4184
|
+
}
|
|
4185
|
+
});
|
|
4186
|
+
//#endregion
|
|
3270
4187
|
//#region src/components/skeleton/JSkeleton.vue
|
|
3271
4188
|
var JSkeleton_default = /* @__PURE__ */ defineComponent({
|
|
3272
4189
|
__name: "JSkeleton",
|
|
@@ -3307,9 +4224,178 @@ var JSkeleton_default = /* @__PURE__ */ defineComponent({
|
|
|
3307
4224
|
}
|
|
3308
4225
|
});
|
|
3309
4226
|
//#endregion
|
|
4227
|
+
//#region src/components/slider/JSlider.vue?vue&type=script&setup=true&lang.ts
|
|
4228
|
+
var _hoisted_1$12 = [
|
|
4229
|
+
"tabindex",
|
|
4230
|
+
"aria-label",
|
|
4231
|
+
"aria-valuemin",
|
|
4232
|
+
"aria-valuemax",
|
|
4233
|
+
"aria-valuenow",
|
|
4234
|
+
"aria-valuetext",
|
|
4235
|
+
"aria-disabled",
|
|
4236
|
+
"onPointerdown",
|
|
4237
|
+
"onKeydown"
|
|
4238
|
+
];
|
|
4239
|
+
var _hoisted_2$7 = {
|
|
4240
|
+
key: 0,
|
|
4241
|
+
class: "j-slider__bubble"
|
|
4242
|
+
};
|
|
4243
|
+
//#endregion
|
|
4244
|
+
//#region src/components/slider/JSlider.vue
|
|
4245
|
+
var JSlider_default = /* @__PURE__ */ defineComponent({
|
|
4246
|
+
__name: "JSlider",
|
|
4247
|
+
props: /*@__PURE__*/ mergeModels({
|
|
4248
|
+
min: { default: 0 },
|
|
4249
|
+
max: { default: 100 },
|
|
4250
|
+
step: { default: 1 },
|
|
4251
|
+
disabled: { type: Boolean },
|
|
4252
|
+
label: {},
|
|
4253
|
+
size: { default: "md" },
|
|
4254
|
+
showValue: { type: Boolean },
|
|
4255
|
+
format: {}
|
|
4256
|
+
}, {
|
|
4257
|
+
"modelValue": { default: 0 },
|
|
4258
|
+
"modelModifiers": {}
|
|
4259
|
+
}),
|
|
4260
|
+
emits: ["update:modelValue"],
|
|
4261
|
+
setup(__props) {
|
|
4262
|
+
const props = __props;
|
|
4263
|
+
/** A single value, or a `[low, high]` tuple for a range slider. */
|
|
4264
|
+
const model = useModel(__props, "modelValue");
|
|
4265
|
+
const track = ref(null);
|
|
4266
|
+
const activeThumb = ref(null);
|
|
4267
|
+
const isRange = computed(() => Array.isArray(model.value));
|
|
4268
|
+
const values = computed(() => Array.isArray(model.value) ? model.value : [model.value]);
|
|
4269
|
+
function clamp(value) {
|
|
4270
|
+
const stepped = Math.round((value - props.min) / props.step) * props.step + props.min;
|
|
4271
|
+
const rounded = Number(stepped.toFixed(6));
|
|
4272
|
+
return Math.min(props.max, Math.max(props.min, rounded));
|
|
4273
|
+
}
|
|
4274
|
+
function setValue(index, raw) {
|
|
4275
|
+
if (props.disabled) return;
|
|
4276
|
+
const next = [...values.value];
|
|
4277
|
+
let value = clamp(raw);
|
|
4278
|
+
if (isRange.value) {
|
|
4279
|
+
const lower = index === 0 ? props.min : next[index - 1];
|
|
4280
|
+
const upper = index === next.length - 1 ? props.max : next[index + 1];
|
|
4281
|
+
value = Math.min(upper, Math.max(lower, value));
|
|
4282
|
+
}
|
|
4283
|
+
next[index] = value;
|
|
4284
|
+
model.value = isRange.value ? [next[0], next[1]] : next[0];
|
|
4285
|
+
}
|
|
4286
|
+
function percent(value) {
|
|
4287
|
+
if (props.max === props.min) return 0;
|
|
4288
|
+
return (value - props.min) / (props.max - props.min) * 100;
|
|
4289
|
+
}
|
|
4290
|
+
function valueFromClientX(clientX) {
|
|
4291
|
+
const rect = track.value.getBoundingClientRect();
|
|
4292
|
+
const ratio = Math.min(1, Math.max(0, (clientX - rect.left) / rect.width));
|
|
4293
|
+
return props.min + ratio * (props.max - props.min);
|
|
4294
|
+
}
|
|
4295
|
+
function nearestThumb(value) {
|
|
4296
|
+
let nearest = 0;
|
|
4297
|
+
let best = Infinity;
|
|
4298
|
+
values.value.forEach((v, i) => {
|
|
4299
|
+
const dist = Math.abs(v - value);
|
|
4300
|
+
if (dist < best) {
|
|
4301
|
+
best = dist;
|
|
4302
|
+
nearest = i;
|
|
4303
|
+
}
|
|
4304
|
+
});
|
|
4305
|
+
return nearest;
|
|
4306
|
+
}
|
|
4307
|
+
function onPointerMove(event) {
|
|
4308
|
+
if (activeThumb.value === null) return;
|
|
4309
|
+
setValue(activeThumb.value, valueFromClientX(event.clientX));
|
|
4310
|
+
}
|
|
4311
|
+
function onPointerUp() {
|
|
4312
|
+
activeThumb.value = null;
|
|
4313
|
+
window.removeEventListener("pointermove", onPointerMove);
|
|
4314
|
+
window.removeEventListener("pointerup", onPointerUp);
|
|
4315
|
+
}
|
|
4316
|
+
function startDrag(index) {
|
|
4317
|
+
activeThumb.value = index;
|
|
4318
|
+
window.addEventListener("pointermove", onPointerMove);
|
|
4319
|
+
window.addEventListener("pointerup", onPointerUp);
|
|
4320
|
+
}
|
|
4321
|
+
function onTrackPointerDown(event) {
|
|
4322
|
+
if (props.disabled) return;
|
|
4323
|
+
const value = valueFromClientX(event.clientX);
|
|
4324
|
+
const index = nearestThumb(value);
|
|
4325
|
+
setValue(index, value);
|
|
4326
|
+
startDrag(index);
|
|
4327
|
+
}
|
|
4328
|
+
function onThumbPointerDown(index, event) {
|
|
4329
|
+
if (props.disabled) return;
|
|
4330
|
+
event.stopPropagation();
|
|
4331
|
+
event.currentTarget.focus();
|
|
4332
|
+
startDrag(index);
|
|
4333
|
+
}
|
|
4334
|
+
function onKeydown(index, event) {
|
|
4335
|
+
if (props.disabled) return;
|
|
4336
|
+
const big = props.step * 10 || (props.max - props.min) / 10;
|
|
4337
|
+
const current = values.value[index];
|
|
4338
|
+
let next;
|
|
4339
|
+
if (event.key === "ArrowRight" || event.key === "ArrowUp") next = current + props.step;
|
|
4340
|
+
else if (event.key === "ArrowLeft" || event.key === "ArrowDown") next = current - props.step;
|
|
4341
|
+
else if (event.key === "PageUp") next = current + big;
|
|
4342
|
+
else if (event.key === "PageDown") next = current - big;
|
|
4343
|
+
else if (event.key === "Home") next = props.min;
|
|
4344
|
+
else if (event.key === "End") next = props.max;
|
|
4345
|
+
if (next === void 0) return;
|
|
4346
|
+
event.preventDefault();
|
|
4347
|
+
setValue(index, next);
|
|
4348
|
+
}
|
|
4349
|
+
function display(value) {
|
|
4350
|
+
return props.format ? props.format(value) : String(Math.round(value * 100) / 100);
|
|
4351
|
+
}
|
|
4352
|
+
const fillStyle = computed(() => {
|
|
4353
|
+
if (isRange.value) {
|
|
4354
|
+
const [a, b] = values.value;
|
|
4355
|
+
return {
|
|
4356
|
+
left: `${percent(a)}%`,
|
|
4357
|
+
width: `${Math.max(0, percent(b) - percent(a))}%`
|
|
4358
|
+
};
|
|
4359
|
+
}
|
|
4360
|
+
return {
|
|
4361
|
+
left: "0%",
|
|
4362
|
+
width: `${percent(values.value[0])}%`
|
|
4363
|
+
};
|
|
4364
|
+
});
|
|
4365
|
+
return (_ctx, _cache) => {
|
|
4366
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["j-slider", [`j-slider--${__props.size}`, { "is-disabled": __props.disabled }]]) }, [createElementVNode("div", {
|
|
4367
|
+
ref_key: "track",
|
|
4368
|
+
ref: track,
|
|
4369
|
+
class: "j-slider__track",
|
|
4370
|
+
onPointerdown: onTrackPointerDown
|
|
4371
|
+
}, [createElementVNode("span", {
|
|
4372
|
+
class: "j-slider__range",
|
|
4373
|
+
style: normalizeStyle(fillStyle.value)
|
|
4374
|
+
}, null, 4), (openBlock(true), createElementBlock(Fragment, null, renderList(values.value, (value, index) => {
|
|
4375
|
+
return openBlock(), createElementBlock("span", {
|
|
4376
|
+
key: index,
|
|
4377
|
+
class: normalizeClass(["j-slider__thumb j-focusable", { "is-dragging": activeThumb.value === index }]),
|
|
4378
|
+
role: "slider",
|
|
4379
|
+
tabindex: __props.disabled ? -1 : 0,
|
|
4380
|
+
"aria-label": __props.label,
|
|
4381
|
+
"aria-orientation": "horizontal",
|
|
4382
|
+
"aria-valuemin": __props.min,
|
|
4383
|
+
"aria-valuemax": __props.max,
|
|
4384
|
+
"aria-valuenow": value,
|
|
4385
|
+
"aria-valuetext": display(value),
|
|
4386
|
+
"aria-disabled": __props.disabled || void 0,
|
|
4387
|
+
style: normalizeStyle({ left: `${percent(value)}%` }),
|
|
4388
|
+
onPointerdown: ($event) => onThumbPointerDown(index, $event),
|
|
4389
|
+
onKeydown: ($event) => onKeydown(index, $event)
|
|
4390
|
+
}, [__props.showValue ? (openBlock(), createElementBlock("span", _hoisted_2$7, toDisplayString(display(value)), 1)) : createCommentVNode("", true)], 46, _hoisted_1$12);
|
|
4391
|
+
}), 128))], 544)], 2);
|
|
4392
|
+
};
|
|
4393
|
+
}
|
|
4394
|
+
});
|
|
4395
|
+
//#endregion
|
|
3310
4396
|
//#region src/components/spinner/JSpinner.vue?vue&type=script&setup=true&lang.ts
|
|
3311
|
-
var _hoisted_1$
|
|
3312
|
-
var _hoisted_2$
|
|
4397
|
+
var _hoisted_1$11 = ["role"];
|
|
4398
|
+
var _hoisted_2$6 = {
|
|
3313
4399
|
key: 0,
|
|
3314
4400
|
class: "j-sr-only"
|
|
3315
4401
|
};
|
|
@@ -3332,27 +4418,72 @@ var JSpinner_default = /* @__PURE__ */ defineComponent({
|
|
|
3332
4418
|
return openBlock(), createElementBlock("span", {
|
|
3333
4419
|
class: "j-spinner-wrap",
|
|
3334
4420
|
role: __props.label ? "status" : void 0
|
|
3335
|
-
}, [createVNode(unref(Spinner), { size: pixels.value }, null, 8, ["size"]), __props.label ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
4421
|
+
}, [createVNode(unref(Spinner), { size: pixels.value }, null, 8, ["size"]), __props.label ? (openBlock(), createElementBlock("span", _hoisted_2$6, toDisplayString(__props.label), 1)) : createCommentVNode("", true)], 8, _hoisted_1$11);
|
|
4422
|
+
};
|
|
4423
|
+
}
|
|
4424
|
+
});
|
|
4425
|
+
//#endregion
|
|
4426
|
+
//#region src/components/stat/JStat.vue?vue&type=script&setup=true&lang.ts
|
|
4427
|
+
var _hoisted_1$10 = { class: "j-stat" };
|
|
4428
|
+
var _hoisted_2$5 = { class: "j-stat__header" };
|
|
4429
|
+
var _hoisted_3$5 = {
|
|
4430
|
+
key: 0,
|
|
4431
|
+
class: "j-stat__icon",
|
|
4432
|
+
"aria-hidden": "true"
|
|
4433
|
+
};
|
|
4434
|
+
var _hoisted_4$3 = { class: "j-stat__label" };
|
|
4435
|
+
var _hoisted_5$3 = { class: "j-stat__row" };
|
|
4436
|
+
var _hoisted_6$3 = { class: "j-stat__value" };
|
|
4437
|
+
var _hoisted_7$1 = {
|
|
4438
|
+
key: 0,
|
|
4439
|
+
class: "j-stat__description"
|
|
4440
|
+
};
|
|
4441
|
+
//#endregion
|
|
4442
|
+
//#region src/components/stat/JStat.vue
|
|
4443
|
+
var JStat_default = /* @__PURE__ */ defineComponent({
|
|
4444
|
+
__name: "JStat",
|
|
4445
|
+
props: {
|
|
4446
|
+
label: {},
|
|
4447
|
+
value: {},
|
|
4448
|
+
delta: {},
|
|
4449
|
+
trend: {},
|
|
4450
|
+
description: {}
|
|
4451
|
+
},
|
|
4452
|
+
setup(__props) {
|
|
4453
|
+
const props = __props;
|
|
4454
|
+
const trendIcon = computed(() => props.trend === "up" ? IconArrowUpRight : props.trend === "down" ? IconArrowDownRight : null);
|
|
4455
|
+
return (_ctx, _cache) => {
|
|
4456
|
+
return openBlock(), createElementBlock("div", _hoisted_1$10, [
|
|
4457
|
+
createElementVNode("div", _hoisted_2$5, [_ctx.$slots.icon ? (openBlock(), createElementBlock("span", _hoisted_3$5, [renderSlot(_ctx.$slots, "icon")])) : createCommentVNode("", true), createElementVNode("span", _hoisted_4$3, toDisplayString(__props.label), 1)]),
|
|
4458
|
+
createElementVNode("div", _hoisted_5$3, [createElementVNode("span", _hoisted_6$3, toDisplayString(__props.value), 1), __props.delta ? (openBlock(), createElementBlock("span", {
|
|
4459
|
+
key: 0,
|
|
4460
|
+
class: normalizeClass(["j-stat__delta", __props.trend ? `j-stat__delta--${__props.trend}` : void 0])
|
|
4461
|
+
}, [trendIcon.value ? (openBlock(), createBlock(resolveDynamicComponent(trendIcon.value), {
|
|
4462
|
+
key: 0,
|
|
4463
|
+
"aria-hidden": "true"
|
|
4464
|
+
})) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(__props.delta), 1)], 2)) : createCommentVNode("", true)]),
|
|
4465
|
+
__props.description ? (openBlock(), createElementBlock("p", _hoisted_7$1, toDisplayString(__props.description), 1)) : createCommentVNode("", true)
|
|
4466
|
+
]);
|
|
3336
4467
|
};
|
|
3337
4468
|
}
|
|
3338
4469
|
});
|
|
3339
4470
|
//#endregion
|
|
3340
4471
|
//#region src/components/switch/JSwitch.vue?vue&type=script&setup=true&lang.ts
|
|
3341
|
-
var _hoisted_1$
|
|
3342
|
-
var _hoisted_2$
|
|
4472
|
+
var _hoisted_1$9 = ["data-state"];
|
|
4473
|
+
var _hoisted_2$4 = [
|
|
3343
4474
|
"id",
|
|
3344
4475
|
"aria-checked",
|
|
3345
4476
|
"aria-labelledby",
|
|
3346
4477
|
"aria-describedby",
|
|
3347
4478
|
"disabled"
|
|
3348
4479
|
];
|
|
3349
|
-
var _hoisted_3$
|
|
3350
|
-
var _hoisted_4$
|
|
4480
|
+
var _hoisted_3$4 = ["name", "value"];
|
|
4481
|
+
var _hoisted_4$2 = {
|
|
3351
4482
|
key: 1,
|
|
3352
4483
|
class: "j-switch__text"
|
|
3353
4484
|
};
|
|
3354
|
-
var _hoisted_5$
|
|
3355
|
-
var _hoisted_6$
|
|
4485
|
+
var _hoisted_5$2 = ["id", "for"];
|
|
4486
|
+
var _hoisted_6$2 = ["id"];
|
|
3356
4487
|
//#endregion
|
|
3357
4488
|
//#region src/components/switch/JSwitch.vue
|
|
3358
4489
|
var JSwitch_default = /* @__PURE__ */ defineComponent({
|
|
@@ -3414,31 +4545,31 @@ var JSwitch_default = /* @__PURE__ */ defineComponent({
|
|
|
3414
4545
|
"aria-describedby": __props.description || _ctx.$slots.description ? descriptionId.value : void 0,
|
|
3415
4546
|
disabled: __props.disabled,
|
|
3416
4547
|
onClick: toggle
|
|
3417
|
-
}), [..._cache[0] || (_cache[0] = [createElementVNode("span", { class: "j-switch__thumb" }, null, -1)])], 16, _hoisted_2$
|
|
4548
|
+
}), [..._cache[0] || (_cache[0] = [createElementVNode("span", { class: "j-switch__thumb" }, null, -1)])], 16, _hoisted_2$4),
|
|
3418
4549
|
__props.name && model.value ? (openBlock(), createElementBlock("input", {
|
|
3419
4550
|
key: 0,
|
|
3420
4551
|
type: "hidden",
|
|
3421
4552
|
name: __props.name,
|
|
3422
4553
|
value: __props.value
|
|
3423
|
-
}, null, 8, _hoisted_3$
|
|
3424
|
-
__props.label || _ctx.$slots.default || __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
4554
|
+
}, null, 8, _hoisted_3$4)) : createCommentVNode("", true),
|
|
4555
|
+
__props.label || _ctx.$slots.default || __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("span", _hoisted_4$2, [__props.label || _ctx.$slots.default ? (openBlock(), createElementBlock("label", {
|
|
3425
4556
|
key: 0,
|
|
3426
4557
|
id: labelId.value,
|
|
3427
4558
|
for: id.value,
|
|
3428
4559
|
class: "j-switch__label"
|
|
3429
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 8, _hoisted_5$
|
|
4560
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(__props.label), 1)])], 8, _hoisted_5$2)) : createCommentVNode("", true), __props.description || _ctx.$slots.description ? (openBlock(), createElementBlock("span", {
|
|
3430
4561
|
key: 1,
|
|
3431
4562
|
id: descriptionId.value,
|
|
3432
4563
|
class: "j-switch__description"
|
|
3433
|
-
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 8, _hoisted_6$
|
|
3434
|
-
], 14, _hoisted_1$
|
|
4564
|
+
}, [renderSlot(_ctx.$slots, "description", {}, () => [createTextVNode(toDisplayString(__props.description), 1)])], 8, _hoisted_6$2)) : createCommentVNode("", true)])) : createCommentVNode("", true)
|
|
4565
|
+
], 14, _hoisted_1$9);
|
|
3435
4566
|
};
|
|
3436
4567
|
}
|
|
3437
4568
|
});
|
|
3438
4569
|
//#endregion
|
|
3439
4570
|
//#region src/components/tabs/JTabs.vue?vue&type=script&setup=true&lang.ts
|
|
3440
|
-
var _hoisted_1$
|
|
3441
|
-
var _hoisted_2$
|
|
4571
|
+
var _hoisted_1$8 = ["aria-label"];
|
|
4572
|
+
var _hoisted_2$3 = [
|
|
3442
4573
|
"id",
|
|
3443
4574
|
"aria-selected",
|
|
3444
4575
|
"aria-controls",
|
|
@@ -3446,7 +4577,7 @@ var _hoisted_2$1 = [
|
|
|
3446
4577
|
"disabled",
|
|
3447
4578
|
"onClick"
|
|
3448
4579
|
];
|
|
3449
|
-
var _hoisted_3$
|
|
4580
|
+
var _hoisted_3$3 = [
|
|
3450
4581
|
"id",
|
|
3451
4582
|
"aria-labelledby",
|
|
3452
4583
|
"hidden"
|
|
@@ -3567,8 +4698,8 @@ var JTabs_default = /* @__PURE__ */ defineComponent({
|
|
|
3567
4698
|
}, [renderSlot(_ctx.$slots, "tab", {
|
|
3568
4699
|
item,
|
|
3569
4700
|
selected: item.value === selected.value
|
|
3570
|
-
}, () => [createTextVNode(toDisplayString(item.label), 1)])], 8, _hoisted_2$
|
|
3571
|
-
}), 128))], 40, _hoisted_1$
|
|
4701
|
+
}, () => [createTextVNode(toDisplayString(item.label), 1)])], 8, _hoisted_2$3);
|
|
4702
|
+
}), 128))], 40, _hoisted_1$8), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
3572
4703
|
return openBlock(), createElementBlock(Fragment, { key: item.value }, [_ctx.$slots[item.value] ? (openBlock(), createElementBlock("div", {
|
|
3573
4704
|
key: 0,
|
|
3574
4705
|
id: panelId(item.value),
|
|
@@ -3580,14 +4711,62 @@ var JTabs_default = /* @__PURE__ */ defineComponent({
|
|
|
3580
4711
|
}, [renderSlot(_ctx.$slots, item.value, {
|
|
3581
4712
|
item,
|
|
3582
4713
|
selected: item.value === selected.value
|
|
3583
|
-
})], 8, _hoisted_3$
|
|
4714
|
+
})], 8, _hoisted_3$3)) : createCommentVNode("", true)], 64);
|
|
3584
4715
|
}), 128))], 2);
|
|
3585
4716
|
};
|
|
3586
4717
|
}
|
|
3587
4718
|
});
|
|
3588
4719
|
//#endregion
|
|
4720
|
+
//#region src/components/tag/JTag.vue?vue&type=script&setup=true&lang.ts
|
|
4721
|
+
var _hoisted_1$7 = {
|
|
4722
|
+
key: 0,
|
|
4723
|
+
class: "j-tag__icon"
|
|
4724
|
+
};
|
|
4725
|
+
var _hoisted_2$2 = { class: "j-tag__label" };
|
|
4726
|
+
var _hoisted_3$2 = ["aria-label", "disabled"];
|
|
4727
|
+
//#endregion
|
|
4728
|
+
//#region src/components/tag/JTag.vue
|
|
4729
|
+
var JTag_default = /* @__PURE__ */ defineComponent({
|
|
4730
|
+
__name: "JTag",
|
|
4731
|
+
props: {
|
|
4732
|
+
variant: { default: "neutral" },
|
|
4733
|
+
size: { default: "md" },
|
|
4734
|
+
disabled: { type: Boolean },
|
|
4735
|
+
removeLabel: {}
|
|
4736
|
+
},
|
|
4737
|
+
emits: ["remove"],
|
|
4738
|
+
setup(__props, { emit: __emit }) {
|
|
4739
|
+
const props = __props;
|
|
4740
|
+
const emit = __emit;
|
|
4741
|
+
const slots = useSlots();
|
|
4742
|
+
const text = computed(() => slots.default?.().map((vnode) => typeof vnode.children === "string" ? vnode.children : "").join("").trim());
|
|
4743
|
+
const removeButtonLabel = computed(() => props.removeLabel || (text.value ? `Remove ${text.value}` : "Remove"));
|
|
4744
|
+
function onRemove() {
|
|
4745
|
+
if (props.disabled) return;
|
|
4746
|
+
emit("remove");
|
|
4747
|
+
}
|
|
4748
|
+
return (_ctx, _cache) => {
|
|
4749
|
+
return openBlock(), createElementBlock("span", { class: normalizeClass(["j-tag", [
|
|
4750
|
+
`j-tag--${__props.variant}`,
|
|
4751
|
+
`j-tag--${__props.size}`,
|
|
4752
|
+
{ "is-disabled": __props.disabled }
|
|
4753
|
+
]]) }, [
|
|
4754
|
+
_ctx.$slots.leading ? (openBlock(), createElementBlock("span", _hoisted_1$7, [renderSlot(_ctx.$slots, "leading")])) : createCommentVNode("", true),
|
|
4755
|
+
createElementVNode("span", _hoisted_2$2, [renderSlot(_ctx.$slots, "default")]),
|
|
4756
|
+
createElementVNode("button", {
|
|
4757
|
+
type: "button",
|
|
4758
|
+
class: "j-tag__remove j-focusable",
|
|
4759
|
+
"aria-label": removeButtonLabel.value,
|
|
4760
|
+
disabled: __props.disabled,
|
|
4761
|
+
onClick: onRemove
|
|
4762
|
+
}, [createVNode(unref(IconX))], 8, _hoisted_3$2)
|
|
4763
|
+
], 2);
|
|
4764
|
+
};
|
|
4765
|
+
}
|
|
4766
|
+
});
|
|
4767
|
+
//#endregion
|
|
3589
4768
|
//#region src/components/textarea/JTextarea.vue?vue&type=script&setup=true&lang.ts
|
|
3590
|
-
var _hoisted_1$
|
|
4769
|
+
var _hoisted_1$6 = [
|
|
3591
4770
|
"id",
|
|
3592
4771
|
"rows",
|
|
3593
4772
|
"name",
|
|
@@ -3689,7 +4868,7 @@ var JTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
3689
4868
|
required: __props.required,
|
|
3690
4869
|
"aria-invalid": unref(field).invalid.value || void 0,
|
|
3691
4870
|
"aria-describedby": unref(field).describedBy.value
|
|
3692
|
-
}), null, 16, _hoisted_1$
|
|
4871
|
+
}), null, 16, _hoisted_1$6), [[vModelText, model.value]])], 2)]),
|
|
3693
4872
|
_: 2
|
|
3694
4873
|
}, [_ctx.$slots.label ? {
|
|
3695
4874
|
name: "label",
|
|
@@ -3713,6 +4892,55 @@ var JTextarea_default = /* @__PURE__ */ defineComponent({
|
|
|
3713
4892
|
}
|
|
3714
4893
|
});
|
|
3715
4894
|
//#endregion
|
|
4895
|
+
//#region src/components/timeline/JTimeline.vue?vue&type=script&setup=true&lang.ts
|
|
4896
|
+
var _hoisted_1$5 = { class: "j-timeline" };
|
|
4897
|
+
//#endregion
|
|
4898
|
+
//#region src/components/timeline/JTimeline.vue
|
|
4899
|
+
var JTimeline_default = /* @__PURE__ */ defineComponent({
|
|
4900
|
+
__name: "JTimeline",
|
|
4901
|
+
setup(__props) {
|
|
4902
|
+
return (_ctx, _cache) => {
|
|
4903
|
+
return openBlock(), createElementBlock("ol", _hoisted_1$5, [renderSlot(_ctx.$slots, "default")]);
|
|
4904
|
+
};
|
|
4905
|
+
}
|
|
4906
|
+
});
|
|
4907
|
+
//#endregion
|
|
4908
|
+
//#region src/components/timeline/JTimelineItem.vue?vue&type=script&setup=true&lang.ts
|
|
4909
|
+
var _hoisted_1$4 = {
|
|
4910
|
+
class: "j-timeline-item__rail",
|
|
4911
|
+
"aria-hidden": "true"
|
|
4912
|
+
};
|
|
4913
|
+
var _hoisted_2$1 = { class: "j-timeline-item__marker" };
|
|
4914
|
+
var _hoisted_3$1 = { class: "j-timeline-item__content" };
|
|
4915
|
+
var _hoisted_4$1 = { class: "j-timeline-item__header" };
|
|
4916
|
+
var _hoisted_5$1 = {
|
|
4917
|
+
key: 0,
|
|
4918
|
+
class: "j-timeline-item__title"
|
|
4919
|
+
};
|
|
4920
|
+
var _hoisted_6$1 = {
|
|
4921
|
+
key: 1,
|
|
4922
|
+
class: "j-timeline-item__time"
|
|
4923
|
+
};
|
|
4924
|
+
var _hoisted_7 = {
|
|
4925
|
+
key: 0,
|
|
4926
|
+
class: "j-timeline-item__body"
|
|
4927
|
+
};
|
|
4928
|
+
//#endregion
|
|
4929
|
+
//#region src/components/timeline/JTimelineItem.vue
|
|
4930
|
+
var JTimelineItem_default = /* @__PURE__ */ defineComponent({
|
|
4931
|
+
__name: "JTimelineItem",
|
|
4932
|
+
props: {
|
|
4933
|
+
title: {},
|
|
4934
|
+
time: {},
|
|
4935
|
+
status: { default: "complete" }
|
|
4936
|
+
},
|
|
4937
|
+
setup(__props) {
|
|
4938
|
+
return (_ctx, _cache) => {
|
|
4939
|
+
return openBlock(), createElementBlock("li", { class: normalizeClass(["j-timeline-item", `j-timeline-item--${__props.status}`]) }, [createElementVNode("span", _hoisted_1$4, [createElementVNode("span", _hoisted_2$1, [renderSlot(_ctx.$slots, "marker")])]), createElementVNode("div", _hoisted_3$1, [createElementVNode("div", _hoisted_4$1, [__props.title || _ctx.$slots.title ? (openBlock(), createElementBlock("p", _hoisted_5$1, [renderSlot(_ctx.$slots, "title", {}, () => [createTextVNode(toDisplayString(__props.title), 1)])])) : createCommentVNode("", true), __props.time ? (openBlock(), createElementBlock("time", _hoisted_6$1, toDisplayString(__props.time), 1)) : createCommentVNode("", true)]), _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_7, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true)])], 2);
|
|
4940
|
+
};
|
|
4941
|
+
}
|
|
4942
|
+
});
|
|
4943
|
+
//#endregion
|
|
3716
4944
|
//#region src/composables/useToast.ts
|
|
3717
4945
|
var DEFAULT_TOAST_DURATION = 5e3;
|
|
3718
4946
|
var state = reactive({ toasts: [] });
|
|
@@ -3795,7 +5023,7 @@ var typed = (type) => (title, options) => create(title, {
|
|
|
3795
5023
|
...options,
|
|
3796
5024
|
type
|
|
3797
5025
|
});
|
|
3798
|
-
/** Show a toast. Works anywhere
|
|
5026
|
+
/** Show a toast. Works anywhere | inside or outside components. */
|
|
3799
5027
|
var toast = Object.assign(create, {
|
|
3800
5028
|
success: typed("success"),
|
|
3801
5029
|
error: typed("error"),
|
|
@@ -3818,7 +5046,7 @@ function useToast() {
|
|
|
3818
5046
|
var toastState = state;
|
|
3819
5047
|
//#endregion
|
|
3820
5048
|
//#region src/components/toast/JToastItem.vue?vue&type=script&setup=true&lang.ts
|
|
3821
|
-
var _hoisted_1$
|
|
5049
|
+
var _hoisted_1$3 = ["data-swipe-direction", "role"];
|
|
3822
5050
|
var _hoisted_2 = {
|
|
3823
5051
|
key: 0,
|
|
3824
5052
|
class: "j-toast__icon",
|
|
@@ -3980,13 +5208,13 @@ var JToastItem_default = /* @__PURE__ */ defineComponent({
|
|
|
3980
5208
|
style: normalizeStyle({ animationDuration: `${__props.toast.duration}ms` }),
|
|
3981
5209
|
"aria-hidden": "true"
|
|
3982
5210
|
}, null, 6)) : createCommentVNode("", true)
|
|
3983
|
-
], 46, _hoisted_1$
|
|
5211
|
+
], 46, _hoisted_1$3);
|
|
3984
5212
|
};
|
|
3985
5213
|
}
|
|
3986
5214
|
});
|
|
3987
5215
|
//#endregion
|
|
3988
5216
|
//#region src/components/toast/JToaster.vue?vue&type=script&setup=true&lang.ts
|
|
3989
|
-
var _hoisted_1 = ["aria-label"];
|
|
5217
|
+
var _hoisted_1$2 = ["aria-label"];
|
|
3990
5218
|
//#endregion
|
|
3991
5219
|
//#region src/components/toast/JToaster.vue
|
|
3992
5220
|
var JToaster_default = /* @__PURE__ */ defineComponent({
|
|
@@ -4058,13 +5286,112 @@ var JToaster_default = /* @__PURE__ */ defineComponent({
|
|
|
4058
5286
|
}, null, 8, ["toast", "paused"]);
|
|
4059
5287
|
}), 128))]),
|
|
4060
5288
|
_: 1
|
|
4061
|
-
}, 512)], 10, _hoisted_1)]),
|
|
5289
|
+
}, 512)], 10, _hoisted_1$2)]),
|
|
4062
5290
|
_: 1
|
|
4063
5291
|
});
|
|
4064
5292
|
};
|
|
4065
5293
|
}
|
|
4066
5294
|
});
|
|
4067
5295
|
//#endregion
|
|
5296
|
+
//#region src/components/toggle-group/context.ts
|
|
5297
|
+
var TOGGLE_GROUP = Symbol("JToggleGroup");
|
|
5298
|
+
//#endregion
|
|
5299
|
+
//#region src/components/toggle-group/JToggleGroup.vue?vue&type=script&setup=true&lang.ts
|
|
5300
|
+
var _hoisted_1$1 = ["aria-label"];
|
|
5301
|
+
//#endregion
|
|
5302
|
+
//#region src/components/toggle-group/JToggleGroup.vue
|
|
5303
|
+
var JToggleGroup_default = /* @__PURE__ */ defineComponent({
|
|
5304
|
+
__name: "JToggleGroup",
|
|
5305
|
+
props: /*@__PURE__*/ mergeModels({
|
|
5306
|
+
type: { default: "single" },
|
|
5307
|
+
size: { default: "md" },
|
|
5308
|
+
disabled: { type: Boolean },
|
|
5309
|
+
label: {}
|
|
5310
|
+
}, {
|
|
5311
|
+
"modelValue": { default: null },
|
|
5312
|
+
"modelModifiers": {}
|
|
5313
|
+
}),
|
|
5314
|
+
emits: ["update:modelValue"],
|
|
5315
|
+
setup(__props) {
|
|
5316
|
+
const props = __props;
|
|
5317
|
+
/** The pressed value in `single` mode, or an array of values in `multiple` mode. */
|
|
5318
|
+
const model = useModel(__props, "modelValue");
|
|
5319
|
+
provide(TOGGLE_GROUP, {
|
|
5320
|
+
type: computed(() => props.type),
|
|
5321
|
+
disabled: computed(() => !!props.disabled),
|
|
5322
|
+
isSelected: (value) => {
|
|
5323
|
+
if (props.type === "multiple") return Array.isArray(model.value) && model.value.includes(value);
|
|
5324
|
+
return model.value === value;
|
|
5325
|
+
},
|
|
5326
|
+
toggle: (value) => {
|
|
5327
|
+
if (props.disabled) return;
|
|
5328
|
+
if (props.type === "multiple") {
|
|
5329
|
+
const current = Array.isArray(model.value) ? model.value : [];
|
|
5330
|
+
model.value = current.includes(value) ? current.filter((v) => v !== value) : [...current, value];
|
|
5331
|
+
return;
|
|
5332
|
+
}
|
|
5333
|
+
model.value = value;
|
|
5334
|
+
}
|
|
5335
|
+
});
|
|
5336
|
+
function onKeydown(event) {
|
|
5337
|
+
const target = event.target;
|
|
5338
|
+
if (!target.classList.contains("j-toggle-group__item")) return;
|
|
5339
|
+
const root = event.currentTarget;
|
|
5340
|
+
const items = Array.from(root.querySelectorAll(".j-toggle-group__item:not(:disabled)"));
|
|
5341
|
+
const index = items.indexOf(target);
|
|
5342
|
+
let next;
|
|
5343
|
+
if (event.key === "ArrowRight" || event.key === "ArrowDown") next = items[(index + 1) % items.length];
|
|
5344
|
+
else if (event.key === "ArrowLeft" || event.key === "ArrowUp") next = items[(index - 1 + items.length) % items.length];
|
|
5345
|
+
else if (event.key === "Home") next = items[0];
|
|
5346
|
+
else if (event.key === "End") next = items[items.length - 1];
|
|
5347
|
+
if (!next) return;
|
|
5348
|
+
event.preventDefault();
|
|
5349
|
+
focusElement(next);
|
|
5350
|
+
}
|
|
5351
|
+
return (_ctx, _cache) => {
|
|
5352
|
+
return openBlock(), createElementBlock("div", {
|
|
5353
|
+
class: normalizeClass(["j-toggle-group", [`j-toggle-group--${__props.size}`, { "is-disabled": __props.disabled }]]),
|
|
5354
|
+
role: "group",
|
|
5355
|
+
"aria-label": __props.label,
|
|
5356
|
+
onKeydown
|
|
5357
|
+
}, [renderSlot(_ctx.$slots, "default")], 42, _hoisted_1$1);
|
|
5358
|
+
};
|
|
5359
|
+
}
|
|
5360
|
+
});
|
|
5361
|
+
//#endregion
|
|
5362
|
+
//#region src/components/toggle-group/JToggleGroupItem.vue?vue&type=script&setup=true&lang.ts
|
|
5363
|
+
var _hoisted_1 = [
|
|
5364
|
+
"aria-pressed",
|
|
5365
|
+
"aria-label",
|
|
5366
|
+
"disabled"
|
|
5367
|
+
];
|
|
5368
|
+
//#endregion
|
|
5369
|
+
//#region src/components/toggle-group/JToggleGroupItem.vue
|
|
5370
|
+
var JToggleGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
5371
|
+
__name: "JToggleGroupItem",
|
|
5372
|
+
props: {
|
|
5373
|
+
value: {},
|
|
5374
|
+
disabled: { type: Boolean },
|
|
5375
|
+
label: {}
|
|
5376
|
+
},
|
|
5377
|
+
setup(__props) {
|
|
5378
|
+
const props = __props;
|
|
5379
|
+
const group = inject(TOGGLE_GROUP);
|
|
5380
|
+
const selected = computed(() => group.isSelected(props.value));
|
|
5381
|
+
const isDisabled = computed(() => props.disabled || group.disabled.value);
|
|
5382
|
+
return (_ctx, _cache) => {
|
|
5383
|
+
return openBlock(), createElementBlock("button", {
|
|
5384
|
+
type: "button",
|
|
5385
|
+
class: normalizeClass(["j-toggle-group__item j-focusable", { "is-selected": selected.value }]),
|
|
5386
|
+
"aria-pressed": selected.value,
|
|
5387
|
+
"aria-label": __props.label,
|
|
5388
|
+
disabled: isDisabled.value,
|
|
5389
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(group).toggle(__props.value))
|
|
5390
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1);
|
|
5391
|
+
};
|
|
5392
|
+
}
|
|
5393
|
+
});
|
|
5394
|
+
//#endregion
|
|
4068
5395
|
//#region src/components/tooltip/JTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
4069
5396
|
var warmUntil = 0;
|
|
4070
5397
|
var WARM_WINDOW = 400;
|
|
@@ -4173,16 +5500,36 @@ var JTooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
4173
5500
|
}
|
|
4174
5501
|
});
|
|
4175
5502
|
//#endregion
|
|
5503
|
+
//#region src/components/visually-hidden/JVisuallyHidden.vue
|
|
5504
|
+
var JVisuallyHidden_default = /* @__PURE__ */ defineComponent({
|
|
5505
|
+
__name: "JVisuallyHidden",
|
|
5506
|
+
props: { as: { default: "span" } },
|
|
5507
|
+
setup(__props) {
|
|
5508
|
+
return (_ctx, _cache) => {
|
|
5509
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.as), { class: "j-visually-hidden j-sr-only" }, {
|
|
5510
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
5511
|
+
_: 3
|
|
5512
|
+
});
|
|
5513
|
+
};
|
|
5514
|
+
}
|
|
5515
|
+
});
|
|
5516
|
+
//#endregion
|
|
4176
5517
|
//#region src/components.ts
|
|
4177
5518
|
var components_exports = /* @__PURE__ */ __exportAll({
|
|
4178
5519
|
JAccordion: () => JAccordion_default,
|
|
4179
5520
|
JAccordionItem: () => JAccordionItem_default,
|
|
4180
5521
|
JAlert: () => JAlert_default,
|
|
5522
|
+
JAspectRatio: () => JAspectRatio_default,
|
|
4181
5523
|
JAvatar: () => JAvatar_default,
|
|
5524
|
+
JAvatarGroup: () => JAvatarGroup_default,
|
|
4182
5525
|
JBadge: () => JBadge_default,
|
|
5526
|
+
JBanner: () => JBanner_default,
|
|
5527
|
+
JBreadcrumb: () => JBreadcrumb_default,
|
|
5528
|
+
JBurger: () => JBurger_default,
|
|
4183
5529
|
JButton: () => JButton_default,
|
|
4184
5530
|
JCard: () => JCard_default,
|
|
4185
5531
|
JCheckbox: () => JCheckbox_default,
|
|
5532
|
+
JCollapsible: () => JCollapsible_default,
|
|
4186
5533
|
JCommandPalette: () => JCommandPalette_default,
|
|
4187
5534
|
JDialog: () => JDialog_default,
|
|
4188
5535
|
JDropdownMenu: () => JDropdownMenu_default,
|
|
@@ -4190,22 +5537,40 @@ var components_exports = /* @__PURE__ */ __exportAll({
|
|
|
4190
5537
|
JDropdownMenuLabel: () => JDropdownMenuLabel_default,
|
|
4191
5538
|
JDropdownMenuSeparator: () => JDropdownMenuSeparator_default,
|
|
4192
5539
|
JDropdownMenuSub: () => JDropdownMenuSub_default,
|
|
5540
|
+
JEmptyState: () => JEmptyState_default,
|
|
5541
|
+
JFooter: () => JFooter_default,
|
|
5542
|
+
JFooterColumn: () => JFooterColumn_default,
|
|
4193
5543
|
JInput: () => JInput_default,
|
|
4194
5544
|
JKbd: () => JKbd_default,
|
|
5545
|
+
JNavbar: () => JNavbar_default,
|
|
5546
|
+
JNavbarLink: () => JNavbarLink_default,
|
|
5547
|
+
JPagination: () => JPagination_default,
|
|
4195
5548
|
JPopover: () => JPopover_default,
|
|
4196
5549
|
JProgress: () => JProgress_default,
|
|
4197
5550
|
JRadio: () => JRadio_default,
|
|
4198
5551
|
JRadioGroup: () => JRadioGroup_default,
|
|
5552
|
+
JRating: () => JRating_default,
|
|
4199
5553
|
JSelect: () => JSelect_default,
|
|
4200
5554
|
JSeparator: () => JSeparator_default,
|
|
4201
5555
|
JSheet: () => JSheet_default,
|
|
5556
|
+
JSidebar: () => JSidebar_default,
|
|
5557
|
+
JSidebarGroup: () => JSidebarGroup_default,
|
|
5558
|
+
JSidebarItem: () => JSidebarItem_default,
|
|
4202
5559
|
JSkeleton: () => JSkeleton_default,
|
|
5560
|
+
JSlider: () => JSlider_default,
|
|
4203
5561
|
JSpinner: () => JSpinner_default,
|
|
5562
|
+
JStat: () => JStat_default,
|
|
4204
5563
|
JSwitch: () => JSwitch_default,
|
|
4205
5564
|
JTabs: () => JTabs_default,
|
|
5565
|
+
JTag: () => JTag_default,
|
|
4206
5566
|
JTextarea: () => JTextarea_default,
|
|
5567
|
+
JTimeline: () => JTimeline_default,
|
|
5568
|
+
JTimelineItem: () => JTimelineItem_default,
|
|
4207
5569
|
JToaster: () => JToaster_default,
|
|
4208
|
-
|
|
5570
|
+
JToggleGroup: () => JToggleGroup_default,
|
|
5571
|
+
JToggleGroupItem: () => JToggleGroupItem_default,
|
|
5572
|
+
JTooltip: () => JTooltip_default,
|
|
5573
|
+
JVisuallyHidden: () => JVisuallyHidden_default
|
|
4209
5574
|
});
|
|
4210
5575
|
//#endregion
|
|
4211
5576
|
//#region src/composables/useRecentCommands.ts
|
|
@@ -4265,6 +5630,6 @@ var JuxtUI = { install(app) {
|
|
|
4265
5630
|
for (const [name, component] of Object.entries(components_exports)) app.component(name, component);
|
|
4266
5631
|
} };
|
|
4267
5632
|
//#endregion
|
|
4268
|
-
export { JAccordion_default as JAccordion, JAccordionItem_default as JAccordionItem, JAlert_default as JAlert, JAvatar_default as JAvatar, JBadge_default as JBadge, JButton_default as JButton, JCard_default as JCard, JCheckbox_default as JCheckbox, JCommandPalette_default as JCommandPalette, JDialog_default as JDialog, JDropdownMenu_default as JDropdownMenu, JDropdownMenuItem_default as JDropdownMenuItem, JDropdownMenuLabel_default as JDropdownMenuLabel, JDropdownMenuSeparator_default as JDropdownMenuSeparator, JDropdownMenuSub_default as JDropdownMenuSub, JInput_default as JInput, JKbd_default as JKbd, JPopover_default as JPopover, JProgress_default as JProgress, JRadio_default as JRadio, JRadioGroup_default as JRadioGroup, JSelect_default as JSelect, JSeparator_default as JSeparator, JSheet_default as JSheet, JSkeleton_default as JSkeleton, JSpinner_default as JSpinner, JSwitch_default as JSwitch, JTabs_default as JTabs, JTextarea_default as JTextarea, JToaster_default as JToaster, JTooltip_default as JTooltip, JuxtUI, JuxtUI as default, formatHotkey, matchText, matchesHotkey, toast, useFocusTrap, useHotkey, useRecentCommands, useScrollLock, useToast };
|
|
5633
|
+
export { JAccordion_default as JAccordion, JAccordionItem_default as JAccordionItem, JAlert_default as JAlert, JAspectRatio_default as JAspectRatio, JAvatar_default as JAvatar, JAvatarGroup_default as JAvatarGroup, JBadge_default as JBadge, JBanner_default as JBanner, JBreadcrumb_default as JBreadcrumb, JBurger_default as JBurger, JButton_default as JButton, JCard_default as JCard, JCheckbox_default as JCheckbox, JCollapsible_default as JCollapsible, JCommandPalette_default as JCommandPalette, JDialog_default as JDialog, JDropdownMenu_default as JDropdownMenu, JDropdownMenuItem_default as JDropdownMenuItem, JDropdownMenuLabel_default as JDropdownMenuLabel, JDropdownMenuSeparator_default as JDropdownMenuSeparator, JDropdownMenuSub_default as JDropdownMenuSub, JEmptyState_default as JEmptyState, JFooter_default as JFooter, JFooterColumn_default as JFooterColumn, JInput_default as JInput, JKbd_default as JKbd, JNavbar_default as JNavbar, JNavbarLink_default as JNavbarLink, JPagination_default as JPagination, JPopover_default as JPopover, JProgress_default as JProgress, JRadio_default as JRadio, JRadioGroup_default as JRadioGroup, JRating_default as JRating, JSelect_default as JSelect, JSeparator_default as JSeparator, JSheet_default as JSheet, JSidebar_default as JSidebar, JSidebarGroup_default as JSidebarGroup, JSidebarItem_default as JSidebarItem, JSkeleton_default as JSkeleton, JSlider_default as JSlider, JSpinner_default as JSpinner, JStat_default as JStat, JSwitch_default as JSwitch, JTabs_default as JTabs, JTag_default as JTag, JTextarea_default as JTextarea, JTimeline_default as JTimeline, JTimelineItem_default as JTimelineItem, JToaster_default as JToaster, JToggleGroup_default as JToggleGroup, JToggleGroupItem_default as JToggleGroupItem, JTooltip_default as JTooltip, JVisuallyHidden_default as JVisuallyHidden, JuxtUI, JuxtUI as default, formatHotkey, matchText, matchesHotkey, toast, useFocusTrap, useHotkey, useRecentCommands, useScrollLock, useToast };
|
|
4269
5634
|
|
|
4270
5635
|
//# sourceMappingURL=index.js.map
|