@maltjoy/core-vue 3.7.5 → 3.9.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 +2 -0
- package/dist/components/JoyCheckbox/VJoyCheckbox.vue.d.ts +15 -0
- package/dist/components/JoyCounter/VJoyCounter.vue.d.ts +2 -2
- package/dist/components/JoyDropdown/VJoyDropdown.vue.d.ts +4 -0
- package/dist/components/JoyDropdownList/JoyDropdownList.types.d.ts +1 -1
- package/dist/components/JoyDropdownList/VJoyDropdownList.vue.d.ts +2 -0
- package/dist/components/JoyInput/VJoyInput.vue.d.ts +2 -6
- package/dist/components/JoySelect/JoySelect.types.d.ts +3 -0
- package/dist/components/JoySelect/VJoySelect.vue.d.ts +11 -4
- package/dist/components/JoySelectableItem/VJoySelectableItem.vue.d.ts +1 -1
- package/dist/components/JoyTextarea/VJoyTextarea.vue.d.ts +1 -1
- package/dist/components/JoyToggle/VJoyToggle.vue.d.ts +1 -1
- package/dist/joy-vue.js +829 -813
- package/dist/joy-vue.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/tests/composables/test-components/CheckboxFormProps.vue.d.ts +1 -1
- package/package.json +8 -8
package/dist/joy-vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as $, openBlock as
|
|
1
|
+
import { defineComponent as $, openBlock as m, createElementBlock as p, normalizeClass as w, renderSlot as h, createTextVNode as C, toDisplayString as I, createElementVNode as b, useAttrs as Me, computed as L, createBlock as x, resolveDynamicComponent as ce, unref as k, withCtx as B, createCommentVNode as _, ref as g, createVNode as N, mergeProps as Y, getCurrentScope as nt, onScopeDispose as at, getCurrentInstance as it, onMounted as X, nextTick as Ne, watch as J, h as rt, reactive as te, onBeforeUnmount as He, normalizeStyle as Z, Fragment as fe, renderList as ye, normalizeProps as ve, guardReactiveProps as me, Teleport as st, createSlots as We, useSlots as G, onBeforeMount as ut, inject as dt, provide as ct, pushScopeId as ft, popScopeId as yt } from "vue";
|
|
2
2
|
const vt = ["info", "gray", "green", "orange", "red", "teal", "pink", "dark-blue", "yellow"], mt = /* @__PURE__ */ $({
|
|
3
3
|
__name: "VJoyBadge",
|
|
4
4
|
props: {
|
|
@@ -27,21 +27,21 @@ const vt = ["info", "gray", "green", "orange", "red", "teal", "pink", "dark-blue
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
setup(e) {
|
|
30
|
-
return (
|
|
30
|
+
return (l, t) => (m(), p("span", {
|
|
31
31
|
class: w(["joy-badge", `joy-badge__${e.variant}`, { "joy-badge--with-bulletpoint": e.bulletpoint }]),
|
|
32
32
|
role: "status"
|
|
33
33
|
}, [
|
|
34
|
-
h(
|
|
34
|
+
h(l.$slots, "default", {}, () => [
|
|
35
35
|
C(I(e.label), 1)
|
|
36
36
|
], !0)
|
|
37
37
|
], 2));
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
-
const V = (e,
|
|
41
|
-
const
|
|
42
|
-
for (const [o,
|
|
43
|
-
|
|
44
|
-
return
|
|
40
|
+
const V = (e, l) => {
|
|
41
|
+
const t = e.__vccOpts || e;
|
|
42
|
+
for (const [o, n] of l)
|
|
43
|
+
t[o] = n;
|
|
44
|
+
return t;
|
|
45
45
|
}, pt = /* @__PURE__ */ V(mt, [["__scopeId", "data-v-1ed08e27"]]), ht = ["teal", "white"], gt = /* @__PURE__ */ $({
|
|
46
46
|
__name: "VJoySpinner",
|
|
47
47
|
props: {
|
|
@@ -53,7 +53,7 @@ const V = (e, t) => {
|
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
setup(e) {
|
|
56
|
-
return (
|
|
56
|
+
return (l, t) => (m(), p("div", {
|
|
57
57
|
class: w(["joy-spinner", `joy-spinner_${e.color}`])
|
|
58
58
|
}, null, 2));
|
|
59
59
|
}
|
|
@@ -75,10 +75,10 @@ const pe = /* @__PURE__ */ V(gt, [["__scopeId", "data-v-616a29d0"]]), R = /* @__
|
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
setup(e) {
|
|
78
|
-
return (
|
|
78
|
+
return (l, t) => (m(), p("span", {
|
|
79
79
|
class: w(["joy-icon", `joy-icon--${e.color}`, `joy-icon--${e.size}`])
|
|
80
80
|
}, [
|
|
81
|
-
|
|
81
|
+
b("i", {
|
|
82
82
|
class: w(["icon", `icon-${e.name}`])
|
|
83
83
|
}, null, 2)
|
|
84
84
|
], 2));
|
|
@@ -133,8 +133,8 @@ const bt = ["primary", "secondary"], _t = ["neutral", "success", "info", "warnin
|
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
setup(e) {
|
|
136
|
-
const
|
|
137
|
-
switch (
|
|
136
|
+
const l = e, t = Me(), o = L(() => {
|
|
137
|
+
switch (l.size) {
|
|
138
138
|
case "xxsmall":
|
|
139
139
|
return "xxsmall";
|
|
140
140
|
case "xsmall":
|
|
@@ -144,10 +144,10 @@ const bt = ["primary", "secondary"], _t = ["neutral", "success", "info", "warnin
|
|
|
144
144
|
default:
|
|
145
145
|
return "small";
|
|
146
146
|
}
|
|
147
|
-
}),
|
|
148
|
-
return (r, s) => (
|
|
149
|
-
disabled: e.loading || k(
|
|
150
|
-
type: k(
|
|
147
|
+
}), n = L(() => ["white", "ghost", "secondary"].includes(l.variant) ? "teal" : "white");
|
|
148
|
+
return (r, s) => (m(), x(ce(k(t).href ? "a" : "button"), {
|
|
149
|
+
disabled: e.loading || k(t).disabled,
|
|
150
|
+
type: k(t).type || "button",
|
|
151
151
|
class: w([
|
|
152
152
|
"joy-button",
|
|
153
153
|
`joy-button_${e.variant}`,
|
|
@@ -159,22 +159,22 @@ const bt = ["primary", "secondary"], _t = ["neutral", "success", "info", "warnin
|
|
|
159
159
|
])
|
|
160
160
|
}, {
|
|
161
161
|
default: B(() => [
|
|
162
|
-
e.icon && e.iconPosition === "left" ? (
|
|
162
|
+
e.icon && e.iconPosition === "left" ? (m(), x(R, {
|
|
163
163
|
key: 0,
|
|
164
164
|
class: "joy-button_icon joy-button_icon--left",
|
|
165
165
|
name: e.icon,
|
|
166
166
|
size: o.value
|
|
167
167
|
}, null, 8, ["name", "size"])) : _("", !0),
|
|
168
|
-
e.loading ? (
|
|
168
|
+
e.loading ? (m(), x(pe, {
|
|
169
169
|
key: 1,
|
|
170
|
-
color:
|
|
170
|
+
color: n.value
|
|
171
171
|
}, null, 8, ["color"])) : _("", !0),
|
|
172
|
-
|
|
172
|
+
b("span", kt, [
|
|
173
173
|
h(r.$slots, "default", {}, () => [
|
|
174
174
|
C(I(e.label), 1)
|
|
175
175
|
], !0)
|
|
176
176
|
]),
|
|
177
|
-
e.icon && e.iconPosition === "right" ? (
|
|
177
|
+
e.icon && e.iconPosition === "right" ? (m(), x(R, {
|
|
178
178
|
key: 2,
|
|
179
179
|
class: "joy-button_icon joy-button_icon--right",
|
|
180
180
|
name: e.icon,
|
|
@@ -210,6 +210,13 @@ const Ue = /* @__PURE__ */ V($t, [["__scopeId", "data-v-ae0676bb"]]), Vt = ["ari
|
|
|
210
210
|
type: Boolean,
|
|
211
211
|
default: !1
|
|
212
212
|
},
|
|
213
|
+
/**
|
|
214
|
+
* Invalid state of the component
|
|
215
|
+
*/
|
|
216
|
+
invalid: {
|
|
217
|
+
type: Boolean,
|
|
218
|
+
default: !1
|
|
219
|
+
},
|
|
213
220
|
/** The value is used in multiselection context in order to build array of values. */
|
|
214
221
|
value: {
|
|
215
222
|
type: String,
|
|
@@ -232,42 +239,43 @@ const Ue = /* @__PURE__ */ V($t, [["__scopeId", "data-v-ae0676bb"]]), Vt = ["ari
|
|
|
232
239
|
}
|
|
233
240
|
},
|
|
234
241
|
emits: ["update:checked", "focus", "blur"],
|
|
235
|
-
setup(e, { expose:
|
|
236
|
-
const o = e,
|
|
237
|
-
onChange: (
|
|
238
|
-
const
|
|
239
|
-
r.value = !1,
|
|
242
|
+
setup(e, { expose: l, emit: t }) {
|
|
243
|
+
const o = e, n = g(), r = g(o.indeterminate), s = g(o.invalid), i = g(!1), c = {
|
|
244
|
+
onChange: (y) => {
|
|
245
|
+
const u = y.target.checked;
|
|
246
|
+
r.value = !1, s.value = !1, t("update:checked", u);
|
|
240
247
|
},
|
|
241
248
|
onFocus: () => {
|
|
242
|
-
|
|
249
|
+
i.value = !0, t("focus");
|
|
243
250
|
},
|
|
244
251
|
onBlur: () => {
|
|
245
|
-
|
|
252
|
+
i.value = !1, t("blur");
|
|
246
253
|
}
|
|
247
254
|
};
|
|
248
|
-
return
|
|
255
|
+
return l({
|
|
249
256
|
isIndeterminate: r
|
|
250
|
-
}), (
|
|
257
|
+
}), (y, u) => (m(), p("div", {
|
|
251
258
|
class: "joy-checkbox__wrapper",
|
|
252
259
|
"aria-checked": e.checked,
|
|
253
260
|
"aria-hidden": e.disabled
|
|
254
261
|
}, [
|
|
255
|
-
|
|
262
|
+
b("label", {
|
|
256
263
|
class: w([
|
|
257
264
|
"joy-checkbox",
|
|
258
265
|
{
|
|
259
266
|
"joy-checkbox__checked": e.checked,
|
|
260
267
|
"joy-checkbox__indeterminate": r.value,
|
|
261
268
|
"joy-checkbox__disabled": e.disabled,
|
|
262
|
-
"joy-
|
|
269
|
+
"joy-checkbox__invalid": s.value,
|
|
270
|
+
"joy-checkbox__focusing": i.value && e.displayFocus
|
|
263
271
|
}
|
|
264
272
|
])
|
|
265
273
|
}, [
|
|
266
|
-
|
|
267
|
-
|
|
274
|
+
b("div", xt, [
|
|
275
|
+
b("input", {
|
|
268
276
|
id: e.id,
|
|
269
277
|
ref_key: "input",
|
|
270
|
-
ref:
|
|
278
|
+
ref: n,
|
|
271
279
|
type: "checkbox",
|
|
272
280
|
class: "joy-checkbox__input",
|
|
273
281
|
role: "checkbox",
|
|
@@ -278,27 +286,27 @@ const Ue = /* @__PURE__ */ V($t, [["__scopeId", "data-v-ae0676bb"]]), Vt = ["ari
|
|
|
278
286
|
"aria-checked": e.checked,
|
|
279
287
|
value: e.value,
|
|
280
288
|
indeterminate: r.value,
|
|
281
|
-
onChange:
|
|
282
|
-
(...
|
|
283
|
-
onFocus:
|
|
284
|
-
(...
|
|
285
|
-
onBlur:
|
|
286
|
-
(...
|
|
289
|
+
onChange: u[0] || (u[0] = //@ts-ignore
|
|
290
|
+
(...v) => c.onChange && c.onChange(...v)),
|
|
291
|
+
onFocus: u[1] || (u[1] = //@ts-ignore
|
|
292
|
+
(...v) => c.onFocus && c.onFocus(...v)),
|
|
293
|
+
onBlur: u[2] || (u[2] = //@ts-ignore
|
|
294
|
+
(...v) => c.onBlur && c.onBlur(...v))
|
|
287
295
|
}, null, 40, It)
|
|
288
296
|
]),
|
|
289
|
-
|
|
290
|
-
h(
|
|
297
|
+
b("div", Ot, [
|
|
298
|
+
h(y.$slots, "default", {}, () => [
|
|
291
299
|
C(I(e.label), 1)
|
|
292
300
|
], !0),
|
|
293
|
-
|
|
294
|
-
h(
|
|
301
|
+
b("div", Bt, [
|
|
302
|
+
h(y.$slots, "checkbox-content", {}, void 0, !0)
|
|
295
303
|
])
|
|
296
304
|
])
|
|
297
305
|
], 2)
|
|
298
306
|
], 8, Vt));
|
|
299
307
|
}
|
|
300
308
|
});
|
|
301
|
-
const he = /* @__PURE__ */ V(Lt, [["__scopeId", "data-v-
|
|
309
|
+
const he = /* @__PURE__ */ V(Lt, [["__scopeId", "data-v-27cc9d8c"]]), Et = { class: "joy-counter" }, Ct = ["aria-label", "disabled"], Jt = { class: "joy-counter__input-wrapper" }, Pt = ["id", "min", "max", "aria-invalid", "name", "required", "value"], qt = ["aria-label", "disabled"], Tt = {
|
|
302
310
|
key: 0,
|
|
303
311
|
class: "joy-counter_error"
|
|
304
312
|
}, zt = {
|
|
@@ -370,47 +378,47 @@ const he = /* @__PURE__ */ V(Lt, [["__scopeId", "data-v-e8b172ed"]]), Et = { cla
|
|
|
370
378
|
}
|
|
371
379
|
},
|
|
372
380
|
emits: ["update:modelValue"],
|
|
373
|
-
setup(e, { expose:
|
|
374
|
-
const o = e,
|
|
381
|
+
setup(e, { expose: l, emit: t }) {
|
|
382
|
+
const o = e, n = g(!1), r = g(!1);
|
|
375
383
|
function s() {
|
|
376
|
-
const d =
|
|
377
|
-
d >= 0 ?
|
|
384
|
+
const d = y(!1);
|
|
385
|
+
d >= 0 ? t("update:modelValue", d <= o.min ? o.min : d) : t("update:modelValue", 0), c();
|
|
378
386
|
}
|
|
379
|
-
function
|
|
380
|
-
const d =
|
|
381
|
-
o.max && d <= o.max ?
|
|
387
|
+
function i() {
|
|
388
|
+
const d = y();
|
|
389
|
+
o.max && d <= o.max ? t("update:modelValue", d >= o.max ? o.max : d) : o.max && d > o.max ? t("update:modelValue", o.max) : t("update:modelValue", d), c();
|
|
382
390
|
}
|
|
383
|
-
function
|
|
384
|
-
|
|
391
|
+
function c() {
|
|
392
|
+
n.value = !u();
|
|
385
393
|
}
|
|
386
|
-
function
|
|
394
|
+
function y(d = !0) {
|
|
387
395
|
const j = o.step.toString().split("."), S = j.length === 2 ? j[1].length : 0;
|
|
388
396
|
return parseFloat(d ? (o.modelValue + o.step).toFixed(S) : (o.modelValue - o.step).toFixed(S));
|
|
389
397
|
}
|
|
390
398
|
function u() {
|
|
391
|
-
return
|
|
399
|
+
return v() && a();
|
|
392
400
|
}
|
|
393
|
-
function
|
|
401
|
+
function v() {
|
|
394
402
|
return !o.max || o.modelValue <= o.max;
|
|
395
403
|
}
|
|
396
|
-
function
|
|
404
|
+
function a() {
|
|
397
405
|
return o.min <= o.modelValue;
|
|
398
406
|
}
|
|
399
|
-
const
|
|
407
|
+
const f = {
|
|
400
408
|
onInput: (d) => {
|
|
401
|
-
|
|
409
|
+
t("update:modelValue", +d.target.value || 0), n.value = !1;
|
|
402
410
|
},
|
|
403
411
|
onFocus: () => {
|
|
404
412
|
r.value = !0;
|
|
405
413
|
},
|
|
406
414
|
onBlur: () => {
|
|
407
|
-
r.value = !1,
|
|
415
|
+
r.value = !1, c();
|
|
408
416
|
}
|
|
409
417
|
};
|
|
410
|
-
return
|
|
418
|
+
return l({
|
|
411
419
|
props: o
|
|
412
|
-
}), (d, j) => (
|
|
413
|
-
e.label ? (
|
|
420
|
+
}), (d, j) => (m(), p("div", Et, [
|
|
421
|
+
e.label ? (m(), x(k(W), {
|
|
414
422
|
key: 0,
|
|
415
423
|
for: e.id,
|
|
416
424
|
required: e.required && e.requiredMark,
|
|
@@ -424,10 +432,10 @@ const he = /* @__PURE__ */ V(Lt, [["__scopeId", "data-v-e8b172ed"]]), Et = { cla
|
|
|
424
432
|
]),
|
|
425
433
|
_: 3
|
|
426
434
|
}, 8, ["for", "required", "optional-label", "size"])) : _("", !0),
|
|
427
|
-
|
|
435
|
+
b("div", {
|
|
428
436
|
class: w(["joy-counter__wrapper", { "joy-counter--focusing": r.value }])
|
|
429
437
|
}, [
|
|
430
|
-
|
|
438
|
+
b("button", {
|
|
431
439
|
class: "joy-counter__decrement",
|
|
432
440
|
type: "button",
|
|
433
441
|
"aria-label": e.labelDecrement,
|
|
@@ -436,38 +444,38 @@ const he = /* @__PURE__ */ V(Lt, [["__scopeId", "data-v-e8b172ed"]]), Et = { cla
|
|
|
436
444
|
}, [
|
|
437
445
|
N(k(R), { name: "minus" })
|
|
438
446
|
], 8, Ct),
|
|
439
|
-
|
|
440
|
-
|
|
447
|
+
b("div", Jt, [
|
|
448
|
+
b("input", Y({
|
|
441
449
|
id: e.id,
|
|
442
450
|
ref: "input",
|
|
443
451
|
type: "number",
|
|
444
|
-
class: { "joy-counter__invalid": e.invalid ||
|
|
452
|
+
class: { "joy-counter__invalid": e.invalid || n.value },
|
|
445
453
|
min: e.min,
|
|
446
454
|
max: e.max,
|
|
447
|
-
"aria-invalid": e.invalid ||
|
|
455
|
+
"aria-invalid": e.invalid || n.value,
|
|
448
456
|
name: e.name,
|
|
449
457
|
required: e.required,
|
|
450
458
|
step: "any",
|
|
451
459
|
value: e.modelValue
|
|
452
460
|
}, d.$attrs, {
|
|
453
461
|
onInput: j[0] || (j[0] = //@ts-ignore
|
|
454
|
-
(...S) =>
|
|
462
|
+
(...S) => f.onInput && f.onInput(...S)),
|
|
455
463
|
onBlur: j[1] || (j[1] = //@ts-ignore
|
|
456
|
-
(...S) =>
|
|
464
|
+
(...S) => f.onBlur && f.onBlur(...S)),
|
|
457
465
|
onFocus: j[2] || (j[2] = //@ts-ignore
|
|
458
|
-
(...S) =>
|
|
466
|
+
(...S) => f.onFocus && f.onFocus(...S))
|
|
459
467
|
}), null, 16, Pt)
|
|
460
468
|
]),
|
|
461
|
-
|
|
469
|
+
b("button", {
|
|
462
470
|
class: "joy-counter__increment",
|
|
463
471
|
type: "button",
|
|
464
472
|
"aria-label": e.labelIncrement,
|
|
465
473
|
disabled: e.max ? e.modelValue >= e.max : !1,
|
|
466
|
-
onClick:
|
|
474
|
+
onClick: i
|
|
467
475
|
}, [
|
|
468
476
|
N(k(R), { name: "add" })
|
|
469
|
-
], 8,
|
|
470
|
-
e.invalid && e.errorMessage ? (
|
|
477
|
+
], 8, qt),
|
|
478
|
+
e.invalid && e.errorMessage ? (m(), p("div", Tt, [
|
|
471
479
|
N(k(tt), { "no-html-error-text": e.errorMessage }, null, 8, ["no-html-error-text"])
|
|
472
480
|
])) : _("", !0)
|
|
473
481
|
], 2)
|
|
@@ -481,42 +489,42 @@ const K = typeof window < "u", Ge = (e) => typeof e == "string", z = () => {
|
|
|
481
489
|
function P(e) {
|
|
482
490
|
return typeof e == "function" ? e() : k(e);
|
|
483
491
|
}
|
|
484
|
-
function Ke(e,
|
|
485
|
-
function
|
|
486
|
-
return new Promise((
|
|
487
|
-
Promise.resolve(e(() =>
|
|
492
|
+
function Ke(e, l) {
|
|
493
|
+
function t(...o) {
|
|
494
|
+
return new Promise((n, r) => {
|
|
495
|
+
Promise.resolve(e(() => l.apply(this, o), { fn: l, thisArg: this, args: o })).then(n).catch(r);
|
|
488
496
|
});
|
|
489
497
|
}
|
|
490
|
-
return
|
|
498
|
+
return t;
|
|
491
499
|
}
|
|
492
|
-
function Dt(e,
|
|
493
|
-
let
|
|
494
|
-
const r = (
|
|
495
|
-
clearTimeout(
|
|
500
|
+
function Dt(e, l = {}) {
|
|
501
|
+
let t, o, n = z;
|
|
502
|
+
const r = (i) => {
|
|
503
|
+
clearTimeout(i), n(), n = z;
|
|
496
504
|
};
|
|
497
|
-
return (
|
|
498
|
-
const
|
|
499
|
-
return
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
},
|
|
503
|
-
o && r(o), o = null, u(
|
|
504
|
-
},
|
|
505
|
+
return (i) => {
|
|
506
|
+
const c = P(e), y = P(l.maxWait);
|
|
507
|
+
return t && r(t), c <= 0 || y !== void 0 && y <= 0 ? (o && (r(o), o = null), Promise.resolve(i())) : new Promise((u, v) => {
|
|
508
|
+
n = l.rejectOnCancel ? v : u, y && !o && (o = setTimeout(() => {
|
|
509
|
+
t && r(t), o = null, u(i());
|
|
510
|
+
}, y)), t = setTimeout(() => {
|
|
511
|
+
o && r(o), o = null, u(i());
|
|
512
|
+
}, c);
|
|
505
513
|
});
|
|
506
514
|
};
|
|
507
515
|
}
|
|
508
|
-
function Rt(e,
|
|
509
|
-
let
|
|
510
|
-
const
|
|
511
|
-
r && (clearTimeout(r), r = void 0,
|
|
516
|
+
function Rt(e, l = !0, t = !0, o = !1) {
|
|
517
|
+
let n = 0, r, s = !0, i = z, c;
|
|
518
|
+
const y = () => {
|
|
519
|
+
r && (clearTimeout(r), r = void 0, i(), i = z);
|
|
512
520
|
};
|
|
513
|
-
return (
|
|
514
|
-
const
|
|
515
|
-
return
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}, Math.max(0,
|
|
519
|
-
})), !
|
|
521
|
+
return (v) => {
|
|
522
|
+
const a = P(e), f = Date.now() - n, d = () => c = v();
|
|
523
|
+
return y(), a <= 0 ? (n = Date.now(), d()) : (f > a && (t || !s) ? (n = Date.now(), d()) : l && (c = new Promise((j, S) => {
|
|
524
|
+
i = o ? S : j, r = setTimeout(() => {
|
|
525
|
+
n = Date.now(), s = !0, j(d()), y();
|
|
526
|
+
}, Math.max(0, a - f));
|
|
527
|
+
})), !t && !r && (r = setTimeout(() => s = !0, a)), s = !1, c);
|
|
520
528
|
};
|
|
521
529
|
}
|
|
522
530
|
const M = {
|
|
@@ -530,106 +538,106 @@ function Mt(e) {
|
|
|
530
538
|
function Q(e) {
|
|
531
539
|
return nt() ? (at(e), !0) : !1;
|
|
532
540
|
}
|
|
533
|
-
function Nt(e,
|
|
534
|
-
return Ke(Dt(
|
|
541
|
+
function Nt(e, l = 200, t = {}) {
|
|
542
|
+
return Ke(Dt(l, t), e);
|
|
535
543
|
}
|
|
536
|
-
function Ht(e,
|
|
537
|
-
return Ke(Rt(
|
|
544
|
+
function Ht(e, l = 200, t = !1, o = !0, n = !1) {
|
|
545
|
+
return Ke(Rt(l, t, o, n), e);
|
|
538
546
|
}
|
|
539
547
|
function Wt(e) {
|
|
540
|
-
return typeof e == "function" ? L(e) :
|
|
548
|
+
return typeof e == "function" ? L(e) : g(e);
|
|
541
549
|
}
|
|
542
|
-
function Qe(e,
|
|
543
|
-
it() ? X(e) :
|
|
550
|
+
function Qe(e, l = !0) {
|
|
551
|
+
it() ? X(e) : l ? e() : Ne(e);
|
|
544
552
|
}
|
|
545
553
|
function U(e) {
|
|
546
|
-
var
|
|
547
|
-
const
|
|
548
|
-
return (
|
|
554
|
+
var l;
|
|
555
|
+
const t = P(e);
|
|
556
|
+
return (l = t == null ? void 0 : t.$el) != null ? l : t;
|
|
549
557
|
}
|
|
550
558
|
const ge = K ? window : void 0;
|
|
551
559
|
K && window.document;
|
|
552
560
|
K && window.navigator;
|
|
553
561
|
K && window.location;
|
|
554
562
|
function ae(...e) {
|
|
555
|
-
let
|
|
556
|
-
if (Ge(e[0]) || Array.isArray(e[0]) ? ([
|
|
563
|
+
let l, t, o, n;
|
|
564
|
+
if (Ge(e[0]) || Array.isArray(e[0]) ? ([t, o, n] = e, l = ge) : [l, t, o, n] = e, !l)
|
|
557
565
|
return z;
|
|
558
|
-
Array.isArray(
|
|
566
|
+
Array.isArray(t) || (t = [t]), Array.isArray(o) || (o = [o]);
|
|
559
567
|
const r = [], s = () => {
|
|
560
568
|
r.forEach((u) => u()), r.length = 0;
|
|
561
|
-
},
|
|
562
|
-
s(), u && r.push(...
|
|
563
|
-
}, { immediate: !0, flush: "post" }),
|
|
564
|
-
|
|
569
|
+
}, i = (u, v, a, f) => (u.addEventListener(v, a, f), () => u.removeEventListener(v, a, f)), c = J(() => [U(l), P(n)], ([u, v]) => {
|
|
570
|
+
s(), u && r.push(...t.flatMap((a) => o.map((f) => i(u, a, f, v))));
|
|
571
|
+
}, { immediate: !0, flush: "post" }), y = () => {
|
|
572
|
+
c(), s();
|
|
565
573
|
};
|
|
566
|
-
return Q(
|
|
574
|
+
return Q(y), y;
|
|
567
575
|
}
|
|
568
576
|
let Se = !1;
|
|
569
|
-
function Ut(e,
|
|
570
|
-
const { window: o = ge, ignore:
|
|
577
|
+
function Ut(e, l, t = {}) {
|
|
578
|
+
const { window: o = ge, ignore: n = [], capture: r = !0, detectIframe: s = !1 } = t;
|
|
571
579
|
if (!o)
|
|
572
580
|
return;
|
|
573
|
-
le && !Se && (Se = !0, Array.from(o.document.body.children).forEach((
|
|
574
|
-
let
|
|
575
|
-
const
|
|
576
|
-
if (typeof
|
|
577
|
-
return Array.from(o.document.querySelectorAll(
|
|
581
|
+
le && !Se && (Se = !0, Array.from(o.document.body.children).forEach((a) => a.addEventListener("click", z)));
|
|
582
|
+
let i = !0;
|
|
583
|
+
const c = (a) => n.some((f) => {
|
|
584
|
+
if (typeof f == "string")
|
|
585
|
+
return Array.from(o.document.querySelectorAll(f)).some((d) => d === a.target || a.composedPath().includes(d));
|
|
578
586
|
{
|
|
579
|
-
const d = U(
|
|
580
|
-
return d && (
|
|
587
|
+
const d = U(f);
|
|
588
|
+
return d && (a.target === d || a.composedPath().includes(d));
|
|
581
589
|
}
|
|
582
590
|
}), u = [
|
|
583
|
-
ae(o, "click", (
|
|
584
|
-
const
|
|
585
|
-
if (!(!
|
|
586
|
-
if (
|
|
587
|
-
|
|
591
|
+
ae(o, "click", (a) => {
|
|
592
|
+
const f = U(e);
|
|
593
|
+
if (!(!f || f === a.target || a.composedPath().includes(f))) {
|
|
594
|
+
if (a.detail === 0 && (i = !c(a)), !i) {
|
|
595
|
+
i = !0;
|
|
588
596
|
return;
|
|
589
597
|
}
|
|
590
|
-
|
|
598
|
+
l(a);
|
|
591
599
|
}
|
|
592
600
|
}, { passive: !0, capture: r }),
|
|
593
|
-
ae(o, "pointerdown", (
|
|
594
|
-
const
|
|
595
|
-
|
|
601
|
+
ae(o, "pointerdown", (a) => {
|
|
602
|
+
const f = U(e);
|
|
603
|
+
f && (i = !a.composedPath().includes(f) && !c(a));
|
|
596
604
|
}, { passive: !0 }),
|
|
597
|
-
s && ae(o, "blur", (
|
|
598
|
-
var
|
|
605
|
+
s && ae(o, "blur", (a) => {
|
|
606
|
+
var f;
|
|
599
607
|
const d = U(e);
|
|
600
|
-
((
|
|
608
|
+
((f = o.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(d != null && d.contains(o.document.activeElement)) && l(a);
|
|
601
609
|
})
|
|
602
610
|
].filter(Boolean);
|
|
603
|
-
return () => u.forEach((
|
|
611
|
+
return () => u.forEach((a) => a());
|
|
604
612
|
}
|
|
605
|
-
function Gt(e,
|
|
606
|
-
const
|
|
607
|
-
return o(), Qe(o,
|
|
613
|
+
function Gt(e, l = !1) {
|
|
614
|
+
const t = g(), o = () => t.value = Boolean(e());
|
|
615
|
+
return o(), Qe(o, l), t;
|
|
608
616
|
}
|
|
609
617
|
const ie = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, re = "__vueuse_ssr_handlers__";
|
|
610
618
|
ie[re] = ie[re] || {};
|
|
611
619
|
ie[re];
|
|
612
|
-
var je = Object.getOwnPropertySymbols, Kt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, Zt = (e,
|
|
613
|
-
var
|
|
620
|
+
var je = Object.getOwnPropertySymbols, Kt = Object.prototype.hasOwnProperty, Qt = Object.prototype.propertyIsEnumerable, Zt = (e, l) => {
|
|
621
|
+
var t = {};
|
|
614
622
|
for (var o in e)
|
|
615
|
-
Kt.call(e, o) &&
|
|
623
|
+
Kt.call(e, o) && l.indexOf(o) < 0 && (t[o] = e[o]);
|
|
616
624
|
if (e != null && je)
|
|
617
625
|
for (var o of je(e))
|
|
618
|
-
|
|
619
|
-
return
|
|
626
|
+
l.indexOf(o) < 0 && Qt.call(e, o) && (t[o] = e[o]);
|
|
627
|
+
return t;
|
|
620
628
|
};
|
|
621
|
-
function Yt(e,
|
|
622
|
-
const o =
|
|
629
|
+
function Yt(e, l, t = {}) {
|
|
630
|
+
const o = t, { window: n = ge } = o, r = Zt(o, ["window"]);
|
|
623
631
|
let s;
|
|
624
|
-
const
|
|
632
|
+
const i = Gt(() => n && "ResizeObserver" in n), c = () => {
|
|
625
633
|
s && (s.disconnect(), s = void 0);
|
|
626
|
-
},
|
|
627
|
-
|
|
634
|
+
}, y = J(() => U(e), (v) => {
|
|
635
|
+
c(), i.value && n && v && (s = new ResizeObserver(l), s.observe(v, r));
|
|
628
636
|
}, { immediate: !0, flush: "post" }), u = () => {
|
|
629
|
-
|
|
637
|
+
c(), y();
|
|
630
638
|
};
|
|
631
639
|
return Q(u), {
|
|
632
|
-
isSupported:
|
|
640
|
+
isSupported: i,
|
|
633
641
|
stop: u
|
|
634
642
|
};
|
|
635
643
|
}
|
|
@@ -638,23 +646,23 @@ var ke;
|
|
|
638
646
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
639
647
|
})(ke || (ke = {}));
|
|
640
648
|
function Xt(e) {
|
|
641
|
-
const
|
|
649
|
+
const l = g(e == null ? void 0 : e.element), t = g(e == null ? void 0 : e.input);
|
|
642
650
|
function o() {
|
|
643
|
-
var
|
|
644
|
-
|
|
651
|
+
var n, r;
|
|
652
|
+
l.value && (l.value.style.height = "1px", l.value.style.height = `${(n = l.value) == null ? void 0 : n.scrollHeight}px`, (r = e == null ? void 0 : e.onResize) == null || r.call(e));
|
|
645
653
|
}
|
|
646
|
-
return J([
|
|
647
|
-
textarea:
|
|
648
|
-
input:
|
|
654
|
+
return J([t, l], o, { immediate: !0 }), Yt(l, () => o()), e != null && e.watch && J(e.watch, o, { immediate: !0, deep: !0 }), {
|
|
655
|
+
textarea: l,
|
|
656
|
+
input: t,
|
|
649
657
|
triggerResize: o
|
|
650
658
|
};
|
|
651
659
|
}
|
|
652
|
-
var el = Object.defineProperty, $e = Object.getOwnPropertySymbols, tl = Object.prototype.hasOwnProperty, ll = Object.prototype.propertyIsEnumerable, Ve = (e,
|
|
653
|
-
for (var
|
|
654
|
-
tl.call(
|
|
660
|
+
var el = Object.defineProperty, $e = Object.getOwnPropertySymbols, tl = Object.prototype.hasOwnProperty, ll = Object.prototype.propertyIsEnumerable, Ve = (e, l, t) => l in e ? el(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, ol = (e, l) => {
|
|
661
|
+
for (var t in l || (l = {}))
|
|
662
|
+
tl.call(l, t) && Ve(e, t, l[t]);
|
|
655
663
|
if ($e)
|
|
656
|
-
for (var
|
|
657
|
-
ll.call(
|
|
664
|
+
for (var t of $e(l))
|
|
665
|
+
ll.call(l, t) && Ve(e, t, l[t]);
|
|
658
666
|
return e;
|
|
659
667
|
};
|
|
660
668
|
const nl = {
|
|
@@ -690,202 +698,202 @@ const al = /* @__PURE__ */ $({
|
|
|
690
698
|
name: "OnClickOutside",
|
|
691
699
|
props: ["as", "options"],
|
|
692
700
|
emits: ["trigger"],
|
|
693
|
-
setup(e, { slots:
|
|
694
|
-
const o =
|
|
695
|
-
return Ut(o, (
|
|
696
|
-
|
|
701
|
+
setup(e, { slots: l, emit: t }) {
|
|
702
|
+
const o = g();
|
|
703
|
+
return Ut(o, (n) => {
|
|
704
|
+
t("trigger", n);
|
|
697
705
|
}, e.options), () => {
|
|
698
|
-
if (
|
|
699
|
-
return rt(e.as || "div", { ref: o },
|
|
706
|
+
if (l.default)
|
|
707
|
+
return rt(e.as || "div", { ref: o }, l.default());
|
|
700
708
|
};
|
|
701
709
|
}
|
|
702
710
|
});
|
|
703
|
-
function
|
|
704
|
-
var
|
|
705
|
-
const
|
|
706
|
-
return (
|
|
711
|
+
function q(e) {
|
|
712
|
+
var l;
|
|
713
|
+
const t = P(e);
|
|
714
|
+
return (l = t == null ? void 0 : t.$el) != null ? l : t;
|
|
707
715
|
}
|
|
708
716
|
const H = K ? window : void 0;
|
|
709
717
|
function A(...e) {
|
|
710
|
-
let
|
|
711
|
-
if (Ge(e[0]) || Array.isArray(e[0]) ? ([
|
|
718
|
+
let l, t, o, n;
|
|
719
|
+
if (Ge(e[0]) || Array.isArray(e[0]) ? ([t, o, n] = e, l = H) : [l, t, o, n] = e, !l)
|
|
712
720
|
return z;
|
|
713
|
-
Array.isArray(
|
|
721
|
+
Array.isArray(t) || (t = [t]), Array.isArray(o) || (o = [o]);
|
|
714
722
|
const r = [], s = () => {
|
|
715
723
|
r.forEach((u) => u()), r.length = 0;
|
|
716
|
-
},
|
|
717
|
-
s(), u && r.push(...
|
|
718
|
-
}, { immediate: !0, flush: "post" }),
|
|
719
|
-
|
|
724
|
+
}, i = (u, v, a, f) => (u.addEventListener(v, a, f), () => u.removeEventListener(v, a, f)), c = J(() => [q(l), P(n)], ([u, v]) => {
|
|
725
|
+
s(), u && r.push(...t.flatMap((a) => o.map((f) => i(u, a, f, v))));
|
|
726
|
+
}, { immediate: !0, flush: "post" }), y = () => {
|
|
727
|
+
c(), s();
|
|
720
728
|
};
|
|
721
|
-
return Q(
|
|
729
|
+
return Q(y), y;
|
|
722
730
|
}
|
|
723
731
|
let xe = !1;
|
|
724
|
-
function Ie(e,
|
|
725
|
-
const { window: o = H, ignore:
|
|
732
|
+
function Ie(e, l, t = {}) {
|
|
733
|
+
const { window: o = H, ignore: n = [], capture: r = !0, detectIframe: s = !1 } = t;
|
|
726
734
|
if (!o)
|
|
727
735
|
return;
|
|
728
|
-
le && !xe && (xe = !0, Array.from(o.document.body.children).forEach((
|
|
729
|
-
let
|
|
730
|
-
const
|
|
731
|
-
if (typeof
|
|
732
|
-
return Array.from(o.document.querySelectorAll(
|
|
736
|
+
le && !xe && (xe = !0, Array.from(o.document.body.children).forEach((a) => a.addEventListener("click", z)));
|
|
737
|
+
let i = !0;
|
|
738
|
+
const c = (a) => n.some((f) => {
|
|
739
|
+
if (typeof f == "string")
|
|
740
|
+
return Array.from(o.document.querySelectorAll(f)).some((d) => d === a.target || a.composedPath().includes(d));
|
|
733
741
|
{
|
|
734
|
-
const d =
|
|
735
|
-
return d && (
|
|
742
|
+
const d = q(f);
|
|
743
|
+
return d && (a.target === d || a.composedPath().includes(d));
|
|
736
744
|
}
|
|
737
745
|
}), u = [
|
|
738
|
-
A(o, "click", (
|
|
739
|
-
const
|
|
740
|
-
if (!(!
|
|
741
|
-
if (
|
|
742
|
-
|
|
746
|
+
A(o, "click", (a) => {
|
|
747
|
+
const f = q(e);
|
|
748
|
+
if (!(!f || f === a.target || a.composedPath().includes(f))) {
|
|
749
|
+
if (a.detail === 0 && (i = !c(a)), !i) {
|
|
750
|
+
i = !0;
|
|
743
751
|
return;
|
|
744
752
|
}
|
|
745
|
-
|
|
753
|
+
l(a);
|
|
746
754
|
}
|
|
747
755
|
}, { passive: !0, capture: r }),
|
|
748
|
-
A(o, "pointerdown", (
|
|
749
|
-
const
|
|
750
|
-
|
|
756
|
+
A(o, "pointerdown", (a) => {
|
|
757
|
+
const f = q(e);
|
|
758
|
+
f && (i = !a.composedPath().includes(f) && !c(a));
|
|
751
759
|
}, { passive: !0 }),
|
|
752
|
-
s && A(o, "blur", (
|
|
753
|
-
var
|
|
754
|
-
const d =
|
|
755
|
-
((
|
|
760
|
+
s && A(o, "blur", (a) => {
|
|
761
|
+
var f;
|
|
762
|
+
const d = q(e);
|
|
763
|
+
((f = o.document.activeElement) == null ? void 0 : f.tagName) === "IFRAME" && !(d != null && d.contains(o.document.activeElement)) && l(a);
|
|
756
764
|
})
|
|
757
765
|
].filter(Boolean);
|
|
758
|
-
return () => u.forEach((
|
|
766
|
+
return () => u.forEach((a) => a());
|
|
759
767
|
}
|
|
760
768
|
M.mounted + "", M.unmounted + "";
|
|
761
|
-
const il = (e) => typeof e == "function" ? e : typeof e == "string" ? (
|
|
769
|
+
const il = (e) => typeof e == "function" ? e : typeof e == "string" ? (l) => l.key === e : Array.isArray(e) ? (l) => e.includes(l.key) : () => !0;
|
|
762
770
|
function Oe(...e) {
|
|
763
|
-
let
|
|
764
|
-
e.length === 3 ? (
|
|
765
|
-
const { target:
|
|
766
|
-
return A(
|
|
767
|
-
|
|
771
|
+
let l, t, o = {};
|
|
772
|
+
e.length === 3 ? (l = e[0], t = e[1], o = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (l = !0, t = e[0], o = e[1]) : (l = e[0], t = e[1]) : (l = !0, t = e[0]);
|
|
773
|
+
const { target: n = H, eventName: r = "keydown", passive: s = !1 } = o, i = il(l);
|
|
774
|
+
return A(n, r, (y) => {
|
|
775
|
+
i(y) && t(y);
|
|
768
776
|
}, s);
|
|
769
777
|
}
|
|
770
|
-
var rl = Object.defineProperty, Be = Object.getOwnPropertySymbols, sl = Object.prototype.hasOwnProperty, ul = Object.prototype.propertyIsEnumerable, Le = (e,
|
|
771
|
-
for (var
|
|
772
|
-
sl.call(
|
|
778
|
+
var rl = Object.defineProperty, Be = Object.getOwnPropertySymbols, sl = Object.prototype.hasOwnProperty, ul = Object.prototype.propertyIsEnumerable, Le = (e, l, t) => l in e ? rl(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, dl = (e, l) => {
|
|
779
|
+
for (var t in l || (l = {}))
|
|
780
|
+
sl.call(l, t) && Le(e, t, l[t]);
|
|
773
781
|
if (Be)
|
|
774
|
-
for (var
|
|
775
|
-
ul.call(
|
|
782
|
+
for (var t of Be(l))
|
|
783
|
+
ul.call(l, t) && Le(e, t, l[t]);
|
|
776
784
|
return e;
|
|
777
785
|
};
|
|
778
786
|
M.mounted + "";
|
|
779
787
|
const cl = 500;
|
|
780
|
-
function Ee(e,
|
|
781
|
-
var o,
|
|
782
|
-
const r = L(() =>
|
|
788
|
+
function Ee(e, l, t) {
|
|
789
|
+
var o, n;
|
|
790
|
+
const r = L(() => q(e));
|
|
783
791
|
let s;
|
|
784
|
-
function
|
|
792
|
+
function i() {
|
|
785
793
|
s && (clearTimeout(s), s = void 0);
|
|
786
794
|
}
|
|
787
|
-
function
|
|
788
|
-
var
|
|
789
|
-
(
|
|
795
|
+
function c(u) {
|
|
796
|
+
var v, a, f, d;
|
|
797
|
+
(v = t == null ? void 0 : t.modifiers) != null && v.self && u.target !== r.value || (i(), (a = t == null ? void 0 : t.modifiers) != null && a.prevent && u.preventDefault(), (f = t == null ? void 0 : t.modifiers) != null && f.stop && u.stopPropagation(), s = setTimeout(() => l(u), (d = t == null ? void 0 : t.delay) != null ? d : cl));
|
|
790
798
|
}
|
|
791
|
-
const
|
|
792
|
-
capture: (o =
|
|
793
|
-
once: (
|
|
799
|
+
const y = {
|
|
800
|
+
capture: (o = t == null ? void 0 : t.modifiers) == null ? void 0 : o.capture,
|
|
801
|
+
once: (n = t == null ? void 0 : t.modifiers) == null ? void 0 : n.once
|
|
794
802
|
};
|
|
795
|
-
A(r, "pointerdown",
|
|
803
|
+
A(r, "pointerdown", c, y), A(r, "pointerup", i, y), A(r, "pointerleave", i, y);
|
|
796
804
|
}
|
|
797
805
|
M.mounted + "";
|
|
798
806
|
const se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ue = "__vueuse_ssr_handlers__";
|
|
799
807
|
se[ue] = se[ue] || {};
|
|
800
808
|
se[ue];
|
|
801
|
-
function Ze(e,
|
|
802
|
-
const
|
|
803
|
-
return o(), Qe(o,
|
|
809
|
+
function Ze(e, l = !1) {
|
|
810
|
+
const t = g(), o = () => t.value = Boolean(e());
|
|
811
|
+
return o(), Qe(o, l), t;
|
|
804
812
|
}
|
|
805
|
-
function fl(e,
|
|
806
|
-
const
|
|
813
|
+
function fl(e, l = {}) {
|
|
814
|
+
const t = l ? l.delayEnter : 0, o = l ? l.delayLeave : 0, n = g(!1);
|
|
807
815
|
let r;
|
|
808
|
-
const s = (
|
|
809
|
-
const
|
|
810
|
-
r && (clearTimeout(r), r = void 0),
|
|
816
|
+
const s = (i) => {
|
|
817
|
+
const c = i ? t : o;
|
|
818
|
+
r && (clearTimeout(r), r = void 0), c ? r = setTimeout(() => n.value = i, c) : n.value = i;
|
|
811
819
|
};
|
|
812
|
-
return window && (A(e, "mouseenter", () => s(!0), { passive: !0 }), A(e, "mouseleave", () => s(!1), { passive: !0 })),
|
|
820
|
+
return window && (A(e, "mouseenter", () => s(!0), { passive: !0 }), A(e, "mouseleave", () => s(!1), { passive: !0 })), n;
|
|
813
821
|
}
|
|
814
822
|
M.mounted + "";
|
|
815
|
-
var Ce = Object.getOwnPropertySymbols, yl = Object.prototype.hasOwnProperty, vl = Object.prototype.propertyIsEnumerable, ml = (e,
|
|
816
|
-
var
|
|
823
|
+
var Ce = Object.getOwnPropertySymbols, yl = Object.prototype.hasOwnProperty, vl = Object.prototype.propertyIsEnumerable, ml = (e, l) => {
|
|
824
|
+
var t = {};
|
|
817
825
|
for (var o in e)
|
|
818
|
-
yl.call(e, o) &&
|
|
826
|
+
yl.call(e, o) && l.indexOf(o) < 0 && (t[o] = e[o]);
|
|
819
827
|
if (e != null && Ce)
|
|
820
828
|
for (var o of Ce(e))
|
|
821
|
-
|
|
822
|
-
return
|
|
829
|
+
l.indexOf(o) < 0 && vl.call(e, o) && (t[o] = e[o]);
|
|
830
|
+
return t;
|
|
823
831
|
};
|
|
824
|
-
function pl(e,
|
|
825
|
-
const o =
|
|
832
|
+
function pl(e, l, t = {}) {
|
|
833
|
+
const o = t, { window: n = H } = o, r = ml(o, ["window"]);
|
|
826
834
|
let s;
|
|
827
|
-
const
|
|
835
|
+
const i = Ze(() => n && "ResizeObserver" in n), c = () => {
|
|
828
836
|
s && (s.disconnect(), s = void 0);
|
|
829
|
-
},
|
|
830
|
-
|
|
837
|
+
}, y = J(() => q(e), (v) => {
|
|
838
|
+
c(), i.value && n && v && (s = new ResizeObserver(l), s.observe(v, r));
|
|
831
839
|
}, { immediate: !0, flush: "post" }), u = () => {
|
|
832
|
-
|
|
840
|
+
c(), y();
|
|
833
841
|
};
|
|
834
842
|
return Q(u), {
|
|
835
|
-
isSupported:
|
|
843
|
+
isSupported: i,
|
|
836
844
|
stop: u
|
|
837
845
|
};
|
|
838
846
|
}
|
|
839
|
-
function hl(e,
|
|
840
|
-
const { window: o = H, box:
|
|
841
|
-
var
|
|
842
|
-
return (
|
|
843
|
-
}), s =
|
|
844
|
-
return pl(e, ([
|
|
845
|
-
const
|
|
847
|
+
function hl(e, l = { width: 0, height: 0 }, t = {}) {
|
|
848
|
+
const { window: o = H, box: n = "content-box" } = t, r = L(() => {
|
|
849
|
+
var c, y;
|
|
850
|
+
return (y = (c = q(e)) == null ? void 0 : c.namespaceURI) == null ? void 0 : y.includes("svg");
|
|
851
|
+
}), s = g(l.width), i = g(l.height);
|
|
852
|
+
return pl(e, ([c]) => {
|
|
853
|
+
const y = n === "border-box" ? c.borderBoxSize : n === "content-box" ? c.contentBoxSize : c.devicePixelContentBoxSize;
|
|
846
854
|
if (o && r.value) {
|
|
847
|
-
const u =
|
|
855
|
+
const u = q(e);
|
|
848
856
|
if (u) {
|
|
849
|
-
const
|
|
850
|
-
s.value = parseFloat(
|
|
857
|
+
const v = o.getComputedStyle(u);
|
|
858
|
+
s.value = parseFloat(v.width), i.value = parseFloat(v.height);
|
|
851
859
|
}
|
|
852
|
-
} else if (
|
|
853
|
-
const u = Array.isArray(
|
|
854
|
-
s.value = u.reduce((
|
|
860
|
+
} else if (y) {
|
|
861
|
+
const u = Array.isArray(y) ? y : [y];
|
|
862
|
+
s.value = u.reduce((v, { inlineSize: a }) => v + a, 0), i.value = u.reduce((v, { blockSize: a }) => v + a, 0);
|
|
855
863
|
} else
|
|
856
|
-
s.value =
|
|
857
|
-
},
|
|
858
|
-
s.value =
|
|
864
|
+
s.value = c.contentRect.width, i.value = c.contentRect.height;
|
|
865
|
+
}, t), J(() => q(e), (c) => {
|
|
866
|
+
s.value = c ? l.width : 0, i.value = c ? l.height : 0;
|
|
859
867
|
}), {
|
|
860
868
|
width: s,
|
|
861
|
-
height:
|
|
869
|
+
height: i
|
|
862
870
|
};
|
|
863
871
|
}
|
|
864
872
|
M.mounted + "";
|
|
865
|
-
function Je(e, { window:
|
|
866
|
-
const o =
|
|
867
|
-
if (!
|
|
873
|
+
function Je(e, { window: l = H, scrollTarget: t } = {}) {
|
|
874
|
+
const o = g(!1), n = () => {
|
|
875
|
+
if (!l)
|
|
868
876
|
return;
|
|
869
|
-
const r =
|
|
877
|
+
const r = l.document, s = q(e);
|
|
870
878
|
if (!s)
|
|
871
879
|
o.value = !1;
|
|
872
880
|
else {
|
|
873
|
-
const
|
|
874
|
-
o.value =
|
|
881
|
+
const i = s.getBoundingClientRect();
|
|
882
|
+
o.value = i.top <= (l.innerHeight || r.documentElement.clientHeight) && i.left <= (l.innerWidth || r.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;
|
|
875
883
|
}
|
|
876
884
|
};
|
|
877
|
-
return J(() =>
|
|
885
|
+
return J(() => q(e), () => n(), { immediate: !0, flush: "post" }), l && A(t || l, "scroll", n, {
|
|
878
886
|
capture: !1,
|
|
879
887
|
passive: !0
|
|
880
888
|
}), o;
|
|
881
889
|
}
|
|
882
890
|
M.mounted + "";
|
|
883
891
|
const Pe = 1;
|
|
884
|
-
function de(e,
|
|
892
|
+
function de(e, l = {}) {
|
|
885
893
|
const {
|
|
886
|
-
throttle:
|
|
894
|
+
throttle: t = 0,
|
|
887
895
|
idle: o = 200,
|
|
888
|
-
onStop:
|
|
896
|
+
onStop: n = z,
|
|
889
897
|
onScroll: r = z,
|
|
890
898
|
offset: s = {
|
|
891
899
|
left: 0,
|
|
@@ -893,36 +901,36 @@ function de(e, t = {}) {
|
|
|
893
901
|
top: 0,
|
|
894
902
|
bottom: 0
|
|
895
903
|
},
|
|
896
|
-
eventListenerOptions:
|
|
904
|
+
eventListenerOptions: i = {
|
|
897
905
|
capture: !1,
|
|
898
906
|
passive: !0
|
|
899
907
|
},
|
|
900
|
-
behavior:
|
|
901
|
-
} =
|
|
908
|
+
behavior: c = "auto"
|
|
909
|
+
} = l, y = g(0), u = g(0), v = L({
|
|
902
910
|
get() {
|
|
903
|
-
return
|
|
911
|
+
return y.value;
|
|
904
912
|
},
|
|
905
913
|
set(E) {
|
|
906
|
-
|
|
914
|
+
f(E, void 0);
|
|
907
915
|
}
|
|
908
|
-
}),
|
|
916
|
+
}), a = L({
|
|
909
917
|
get() {
|
|
910
918
|
return u.value;
|
|
911
919
|
},
|
|
912
920
|
set(E) {
|
|
913
|
-
|
|
921
|
+
f(void 0, E);
|
|
914
922
|
}
|
|
915
923
|
});
|
|
916
|
-
function
|
|
924
|
+
function f(E, T) {
|
|
917
925
|
var D, F, _e;
|
|
918
926
|
const ne = P(e);
|
|
919
927
|
ne && ((_e = ne instanceof Document ? document.body : ne) == null || _e.scrollTo({
|
|
920
|
-
top: (D = P(
|
|
921
|
-
left: (F = P(E)) != null ? F :
|
|
922
|
-
behavior: P(
|
|
928
|
+
top: (D = P(T)) != null ? D : a.value,
|
|
929
|
+
left: (F = P(E)) != null ? F : v.value,
|
|
930
|
+
behavior: P(c)
|
|
923
931
|
}));
|
|
924
932
|
}
|
|
925
|
-
const d =
|
|
933
|
+
const d = g(!1), j = te({
|
|
926
934
|
left: !0,
|
|
927
935
|
right: !1,
|
|
928
936
|
top: !0,
|
|
@@ -933,154 +941,154 @@ function de(e, t = {}) {
|
|
|
933
941
|
top: !1,
|
|
934
942
|
bottom: !1
|
|
935
943
|
}), ee = (E) => {
|
|
936
|
-
d.value && (d.value = !1, S.left = !1, S.right = !1, S.top = !1, S.bottom = !1,
|
|
937
|
-
}, oe = Nt(ee,
|
|
938
|
-
const
|
|
939
|
-
S.left = D <
|
|
940
|
-
let F =
|
|
941
|
-
E.target === document && !F && (F = document.body.scrollTop), S.top = F < u.value, S.bottom = F > u.value, j.top = F <= 0 + (s.top || 0), j.bottom = F +
|
|
944
|
+
d.value && (d.value = !1, S.left = !1, S.right = !1, S.top = !1, S.bottom = !1, n(E));
|
|
945
|
+
}, oe = Nt(ee, t + o), O = (E) => {
|
|
946
|
+
const T = E.target === document ? E.target.documentElement : E.target, D = T.scrollLeft;
|
|
947
|
+
S.left = D < y.value, S.right = D > u.value, j.left = D <= 0 + (s.left || 0), j.right = D + T.clientWidth >= T.scrollWidth - (s.right || 0) - Pe, y.value = D;
|
|
948
|
+
let F = T.scrollTop;
|
|
949
|
+
E.target === document && !F && (F = document.body.scrollTop), S.top = F < u.value, S.bottom = F > u.value, j.top = F <= 0 + (s.top || 0), j.bottom = F + T.clientHeight >= T.scrollHeight - (s.bottom || 0) - Pe, u.value = F, d.value = !0, oe(E), r(E);
|
|
942
950
|
};
|
|
943
|
-
return A(e, "scroll",
|
|
944
|
-
x:
|
|
945
|
-
y:
|
|
951
|
+
return A(e, "scroll", t ? Ht(O, t, !0, !1) : O, i), A(e, "scrollend", ee, i), {
|
|
952
|
+
x: v,
|
|
953
|
+
y: a,
|
|
946
954
|
isScrolling: d,
|
|
947
955
|
arrivedState: j,
|
|
948
956
|
directions: S
|
|
949
957
|
};
|
|
950
958
|
}
|
|
951
|
-
var gl = Object.defineProperty, bl = Object.defineProperties, _l = Object.getOwnPropertyDescriptors,
|
|
952
|
-
for (var
|
|
953
|
-
wl.call(
|
|
954
|
-
if (
|
|
955
|
-
for (var
|
|
956
|
-
Sl.call(
|
|
959
|
+
var gl = Object.defineProperty, bl = Object.defineProperties, _l = Object.getOwnPropertyDescriptors, qe = Object.getOwnPropertySymbols, wl = Object.prototype.hasOwnProperty, Sl = Object.prototype.propertyIsEnumerable, Te = (e, l, t) => l in e ? gl(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, ze = (e, l) => {
|
|
960
|
+
for (var t in l || (l = {}))
|
|
961
|
+
wl.call(l, t) && Te(e, t, l[t]);
|
|
962
|
+
if (qe)
|
|
963
|
+
for (var t of qe(l))
|
|
964
|
+
Sl.call(l, t) && Te(e, t, l[t]);
|
|
957
965
|
return e;
|
|
958
|
-
}, jl = (e,
|
|
959
|
-
function Ae(e,
|
|
960
|
-
var o,
|
|
961
|
-
const r = (o =
|
|
966
|
+
}, jl = (e, l) => bl(e, _l(l));
|
|
967
|
+
function Ae(e, l, t = {}) {
|
|
968
|
+
var o, n;
|
|
969
|
+
const r = (o = t.direction) != null ? o : "bottom", s = te(de(e, jl(ze({}, t), {
|
|
962
970
|
offset: ze({
|
|
963
|
-
[r]: (
|
|
964
|
-
},
|
|
971
|
+
[r]: (n = t.distance) != null ? n : 0
|
|
972
|
+
}, t.offset)
|
|
965
973
|
})));
|
|
966
|
-
J(() => s.arrivedState[r], async (
|
|
967
|
-
var
|
|
968
|
-
if (
|
|
969
|
-
const u = P(e),
|
|
970
|
-
height: (
|
|
971
|
-
width: (
|
|
974
|
+
J(() => s.arrivedState[r], async (i) => {
|
|
975
|
+
var c, y;
|
|
976
|
+
if (i) {
|
|
977
|
+
const u = P(e), v = {
|
|
978
|
+
height: (c = u == null ? void 0 : u.scrollHeight) != null ? c : 0,
|
|
979
|
+
width: (y = u == null ? void 0 : u.scrollWidth) != null ? y : 0
|
|
972
980
|
};
|
|
973
|
-
await
|
|
981
|
+
await l(s), t.preserveScrollPosition && u && Ne(() => {
|
|
974
982
|
u.scrollTo({
|
|
975
|
-
top: u.scrollHeight -
|
|
976
|
-
left: u.scrollWidth -
|
|
983
|
+
top: u.scrollHeight - v.height,
|
|
984
|
+
left: u.scrollWidth - v.width
|
|
977
985
|
});
|
|
978
986
|
});
|
|
979
987
|
}
|
|
980
988
|
});
|
|
981
989
|
}
|
|
982
990
|
M.mounted + "";
|
|
983
|
-
function Fe(e,
|
|
991
|
+
function Fe(e, l, t = {}) {
|
|
984
992
|
const {
|
|
985
993
|
root: o,
|
|
986
|
-
rootMargin:
|
|
994
|
+
rootMargin: n = "0px",
|
|
987
995
|
threshold: r = 0.1,
|
|
988
996
|
window: s = H
|
|
989
|
-
} =
|
|
990
|
-
let
|
|
991
|
-
const
|
|
992
|
-
el:
|
|
993
|
-
root:
|
|
994
|
-
}), ({ el:
|
|
995
|
-
if (
|
|
997
|
+
} = t, i = Ze(() => s && "IntersectionObserver" in s);
|
|
998
|
+
let c = z;
|
|
999
|
+
const y = i.value ? J(() => ({
|
|
1000
|
+
el: q(e),
|
|
1001
|
+
root: q(o)
|
|
1002
|
+
}), ({ el: v, root: a }) => {
|
|
1003
|
+
if (c(), !v)
|
|
996
1004
|
return;
|
|
997
|
-
const
|
|
998
|
-
root:
|
|
999
|
-
rootMargin:
|
|
1005
|
+
const f = new IntersectionObserver(l, {
|
|
1006
|
+
root: a,
|
|
1007
|
+
rootMargin: n,
|
|
1000
1008
|
threshold: r
|
|
1001
1009
|
});
|
|
1002
|
-
|
|
1003
|
-
|
|
1010
|
+
f.observe(v), c = () => {
|
|
1011
|
+
f.disconnect(), c = z;
|
|
1004
1012
|
};
|
|
1005
1013
|
}, { immediate: !0, flush: "post" }) : z, u = () => {
|
|
1006
|
-
|
|
1014
|
+
c(), y();
|
|
1007
1015
|
};
|
|
1008
1016
|
return Q(u), {
|
|
1009
|
-
isSupported:
|
|
1017
|
+
isSupported: i,
|
|
1010
1018
|
stop: u
|
|
1011
1019
|
};
|
|
1012
1020
|
}
|
|
1013
1021
|
M.mounted + "";
|
|
1014
|
-
var kl = Object.defineProperty, $l = Object.defineProperties, Vl = Object.getOwnPropertyDescriptors, De = Object.getOwnPropertySymbols, xl = Object.prototype.hasOwnProperty, Il = Object.prototype.propertyIsEnumerable, Re = (e,
|
|
1015
|
-
for (var
|
|
1016
|
-
xl.call(
|
|
1022
|
+
var kl = Object.defineProperty, $l = Object.defineProperties, Vl = Object.getOwnPropertyDescriptors, De = Object.getOwnPropertySymbols, xl = Object.prototype.hasOwnProperty, Il = Object.prototype.propertyIsEnumerable, Re = (e, l, t) => l in e ? kl(e, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[l] = t, Ol = (e, l) => {
|
|
1023
|
+
for (var t in l || (l = {}))
|
|
1024
|
+
xl.call(l, t) && Re(e, t, l[t]);
|
|
1017
1025
|
if (De)
|
|
1018
|
-
for (var
|
|
1019
|
-
Il.call(
|
|
1026
|
+
for (var t of De(l))
|
|
1027
|
+
Il.call(l, t) && Re(e, t, l[t]);
|
|
1020
1028
|
return e;
|
|
1021
|
-
}, Bl = (e,
|
|
1029
|
+
}, Bl = (e, l) => $l(e, Vl(l));
|
|
1022
1030
|
M.mounted + "";
|
|
1023
1031
|
function Ye(e) {
|
|
1024
|
-
const
|
|
1025
|
-
if (
|
|
1032
|
+
const l = window.getComputedStyle(e);
|
|
1033
|
+
if (l.overflowX === "scroll" || l.overflowY === "scroll" || l.overflowX === "auto" && e.clientHeight < e.scrollHeight || l.overflowY === "auto" && e.clientWidth < e.scrollWidth)
|
|
1026
1034
|
return !0;
|
|
1027
1035
|
{
|
|
1028
|
-
const
|
|
1029
|
-
return !
|
|
1036
|
+
const t = e.parentNode;
|
|
1037
|
+
return !t || t.tagName === "BODY" ? !1 : Ye(t);
|
|
1030
1038
|
}
|
|
1031
1039
|
}
|
|
1032
1040
|
function Ll(e) {
|
|
1033
|
-
const
|
|
1034
|
-
return Ye(
|
|
1041
|
+
const l = e || window.event, t = l.target;
|
|
1042
|
+
return Ye(t) ? !1 : l.touches.length > 1 ? !0 : (l.preventDefault && l.preventDefault(), !1);
|
|
1035
1043
|
}
|
|
1036
|
-
function El(e,
|
|
1037
|
-
const
|
|
1038
|
-
let o = null,
|
|
1039
|
-
J(Wt(e), (
|
|
1040
|
-
if (
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1044
|
+
function El(e, l = !1) {
|
|
1045
|
+
const t = g(l);
|
|
1046
|
+
let o = null, n;
|
|
1047
|
+
J(Wt(e), (i) => {
|
|
1048
|
+
if (i) {
|
|
1049
|
+
const c = i;
|
|
1050
|
+
n = c.style.overflow, t.value && (c.style.overflow = "hidden");
|
|
1043
1051
|
}
|
|
1044
1052
|
}, {
|
|
1045
1053
|
immediate: !0
|
|
1046
1054
|
});
|
|
1047
1055
|
const r = () => {
|
|
1048
|
-
const
|
|
1049
|
-
!
|
|
1050
|
-
Ll(
|
|
1051
|
-
}, { passive: !1 })),
|
|
1056
|
+
const i = P(e);
|
|
1057
|
+
!i || t.value || (le && (o = A(i, "touchmove", (c) => {
|
|
1058
|
+
Ll(c);
|
|
1059
|
+
}, { passive: !1 })), i.style.overflow = "hidden", t.value = !0);
|
|
1052
1060
|
}, s = () => {
|
|
1053
|
-
const
|
|
1054
|
-
!
|
|
1061
|
+
const i = P(e);
|
|
1062
|
+
!i || !t.value || (le && (o == null || o()), i.style.overflow = n, t.value = !1);
|
|
1055
1063
|
};
|
|
1056
1064
|
return Q(s), L({
|
|
1057
1065
|
get() {
|
|
1058
|
-
return
|
|
1066
|
+
return t.value;
|
|
1059
1067
|
},
|
|
1060
|
-
set(
|
|
1061
|
-
|
|
1068
|
+
set(i) {
|
|
1069
|
+
i ? r() : s();
|
|
1062
1070
|
}
|
|
1063
1071
|
});
|
|
1064
1072
|
}
|
|
1065
1073
|
const Cl = () => {
|
|
1066
1074
|
let e = !1;
|
|
1067
|
-
const
|
|
1068
|
-
return (
|
|
1069
|
-
if (
|
|
1075
|
+
const l = g(!1);
|
|
1076
|
+
return (t, o) => {
|
|
1077
|
+
if (l.value = o.value, e)
|
|
1070
1078
|
return;
|
|
1071
1079
|
e = !0;
|
|
1072
|
-
const
|
|
1073
|
-
J(
|
|
1080
|
+
const n = El(t, o.value);
|
|
1081
|
+
J(l, (r) => n.value = r);
|
|
1074
1082
|
};
|
|
1075
1083
|
};
|
|
1076
1084
|
Cl();
|
|
1077
|
-
const Xe = ["medium", "small"], Jl = {
|
|
1085
|
+
const Xe = ["medium", "small", "xsmall"], Jl = {
|
|
1078
1086
|
key: 0,
|
|
1079
1087
|
class: "joy-dropdown-list__header"
|
|
1080
|
-
}, Pl = ["id", "tabindex", "aria-disabled", "aria-selected", "title", "aria-label", ".dataModel", "onClick"],
|
|
1088
|
+
}, Pl = ["id", "tabindex", "aria-disabled", "aria-selected", "title", "aria-label", ".dataModel", "onClick"], ql = {
|
|
1081
1089
|
key: 1,
|
|
1082
1090
|
class: "joy-dropdown-list__footer"
|
|
1083
|
-
},
|
|
1091
|
+
}, Tl = /* @__PURE__ */ $({
|
|
1084
1092
|
__name: "VJoyDropdownList",
|
|
1085
1093
|
props: {
|
|
1086
1094
|
/**
|
|
@@ -1089,12 +1097,13 @@ const Xe = ["medium", "small"], Jl = {
|
|
|
1089
1097
|
options: {
|
|
1090
1098
|
type: Array,
|
|
1091
1099
|
validator(e) {
|
|
1092
|
-
return e.every((
|
|
1100
|
+
return e.every((l) => Object.keys(l).includes("value") || Object.keys(l).includes("id"));
|
|
1093
1101
|
},
|
|
1094
1102
|
default() {
|
|
1095
1103
|
return [];
|
|
1096
1104
|
}
|
|
1097
1105
|
},
|
|
1106
|
+
/** Customize the actual size of each items. */
|
|
1098
1107
|
size: {
|
|
1099
1108
|
type: String,
|
|
1100
1109
|
default: "medium",
|
|
@@ -1115,71 +1124,71 @@ const Xe = ["medium", "small"], Jl = {
|
|
|
1115
1124
|
}
|
|
1116
1125
|
},
|
|
1117
1126
|
emits: ["update:modelValue", "close:dropdownList"],
|
|
1118
|
-
setup(e, { expose:
|
|
1119
|
-
const o = e,
|
|
1120
|
-
function s(
|
|
1121
|
-
|
|
1127
|
+
setup(e, { expose: l, emit: t }) {
|
|
1128
|
+
const o = e, n = g(), r = L(() => (a) => !o.modelValue || !a.value && !a.id ? !1 : o.modelValue === a.value || o.modelValue === a.id);
|
|
1129
|
+
function s(a) {
|
|
1130
|
+
a.disabled || t("update:modelValue", a.value || a.id);
|
|
1122
1131
|
}
|
|
1123
|
-
function
|
|
1124
|
-
var
|
|
1125
|
-
return Array.from(((
|
|
1132
|
+
function i() {
|
|
1133
|
+
var a;
|
|
1134
|
+
return Array.from(((a = n.value) == null ? void 0 : a.querySelectorAll("li")) || []);
|
|
1126
1135
|
}
|
|
1127
|
-
function
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1130
|
-
top:
|
|
1136
|
+
function c() {
|
|
1137
|
+
const a = i().find((f) => f.getAttribute("aria-selected") === "true");
|
|
1138
|
+
a && (a.focus(), n.value.scrollTo({
|
|
1139
|
+
top: a.offsetTop
|
|
1131
1140
|
}));
|
|
1132
1141
|
}
|
|
1133
|
-
function
|
|
1134
|
-
return
|
|
1142
|
+
function y() {
|
|
1143
|
+
return i().find((a) => a === document.activeElement);
|
|
1135
1144
|
}
|
|
1136
|
-
function u(
|
|
1137
|
-
var
|
|
1138
|
-
if ((
|
|
1139
|
-
const d =
|
|
1145
|
+
function u(a) {
|
|
1146
|
+
var f;
|
|
1147
|
+
if ((a.key === "Escape" || a.key === "Tab") && t("close:dropdownList"), (a.key === "Enter" || a.key === "enter") && (a.preventDefault(), y() && ((f = n.value) != null && f.contains(y())))) {
|
|
1148
|
+
const d = y();
|
|
1140
1149
|
if (!d)
|
|
1141
1150
|
return;
|
|
1142
1151
|
if (d.querySelector("a"))
|
|
1143
1152
|
return d.querySelector("a").click();
|
|
1144
|
-
|
|
1153
|
+
t("update:modelValue", d.dataModel);
|
|
1145
1154
|
}
|
|
1146
|
-
if (
|
|
1147
|
-
const d =
|
|
1155
|
+
if (y() && a.key === " " && a.preventDefault(), ["ArrowDown", "ArrowUp", "Home", "End"].includes(a.key)) {
|
|
1156
|
+
const d = i(), j = y();
|
|
1148
1157
|
let S = d.indexOf(j);
|
|
1149
1158
|
if (d.length) {
|
|
1150
|
-
|
|
1159
|
+
a.preventDefault(), a.key === "ArrowDown" ? S++ : a.key === "ArrowUp" ? S-- : a.key === "Home" ? S = 0 : a.key === "End" && (S = d.length - 1), S < 0 && (S = d.length - 1), S > d.length - 1 && (S = 0), v(d[S]);
|
|
1151
1160
|
return;
|
|
1152
1161
|
}
|
|
1153
1162
|
}
|
|
1154
1163
|
}
|
|
1155
|
-
function
|
|
1156
|
-
|
|
1164
|
+
function v(a) {
|
|
1165
|
+
a.focus();
|
|
1157
1166
|
}
|
|
1158
1167
|
return X(() => {
|
|
1159
|
-
window.addEventListener("keydown", u),
|
|
1168
|
+
window.addEventListener("keydown", u), c();
|
|
1160
1169
|
}), He(() => {
|
|
1161
1170
|
window.removeEventListener("keydown", u);
|
|
1162
|
-
}),
|
|
1171
|
+
}), l({
|
|
1163
1172
|
isSelected: r
|
|
1164
|
-
}), (
|
|
1173
|
+
}), (a, f) => (m(), p("div", {
|
|
1165
1174
|
class: "joy-dropdown-list",
|
|
1166
1175
|
style: Z({ width: `${e.width}px`, "max-width": `${e.width}px` })
|
|
1167
1176
|
}, [
|
|
1168
|
-
|
|
1169
|
-
h(
|
|
1177
|
+
a.$slots["dropdown-list-header"] ? (m(), p("header", Jl, [
|
|
1178
|
+
h(a.$slots, "dropdown-list-header", {}, void 0, !0)
|
|
1170
1179
|
])) : _("", !0),
|
|
1171
|
-
|
|
1172
|
-
class: w(["joy-dropdown-list__items", { "joy-dropdown-list__items-slotted":
|
|
1180
|
+
b("div", {
|
|
1181
|
+
class: w(["joy-dropdown-list__items", { "joy-dropdown-list__items-slotted": a.$slots["dropdown-list-items"] }]),
|
|
1173
1182
|
style: Z({ "max-height": `${e.height}px` })
|
|
1174
1183
|
}, [
|
|
1175
|
-
h(
|
|
1176
|
-
e.options.length ? (
|
|
1184
|
+
h(a.$slots, "dropdown-list-items", {}, void 0, !0),
|
|
1185
|
+
e.options.length ? (m(), p("ul", {
|
|
1177
1186
|
key: 0,
|
|
1178
1187
|
ref_key: "listbox",
|
|
1179
|
-
ref:
|
|
1188
|
+
ref: n,
|
|
1180
1189
|
role: "listbox"
|
|
1181
1190
|
}, [
|
|
1182
|
-
(
|
|
1191
|
+
(m(!0), p(fe, null, ye(e.options, (d) => (m(), p("li", {
|
|
1183
1192
|
id: d.id,
|
|
1184
1193
|
key: d.label,
|
|
1185
1194
|
style: Z({ "max-width": `${e.width}px` }),
|
|
@@ -1200,25 +1209,25 @@ const Xe = ["medium", "small"], Jl = {
|
|
|
1200
1209
|
role: "option",
|
|
1201
1210
|
onClick: (j) => s(d)
|
|
1202
1211
|
}, [
|
|
1203
|
-
h(
|
|
1204
|
-
|
|
1212
|
+
h(a.$slots, "label", ve(me(d)), () => [
|
|
1213
|
+
b("span", null, I(d.label), 1)
|
|
1205
1214
|
], !0)
|
|
1206
1215
|
], 14, Pl))), 128))
|
|
1207
1216
|
], 512)) : _("", !0)
|
|
1208
1217
|
], 6),
|
|
1209
|
-
|
|
1210
|
-
h(
|
|
1218
|
+
a.$slots["dropdown-list-footer"] ? (m(), p("footer", ql, [
|
|
1219
|
+
h(a.$slots, "dropdown-list-footer", {}, void 0, !0)
|
|
1211
1220
|
])) : _("", !0)
|
|
1212
1221
|
], 4));
|
|
1213
1222
|
}
|
|
1214
1223
|
});
|
|
1215
|
-
const et = /* @__PURE__ */ V(
|
|
1224
|
+
const et = /* @__PURE__ */ V(Tl, [["__scopeId", "data-v-0a25fc40"]]);
|
|
1216
1225
|
function zl(e) {
|
|
1217
|
-
const
|
|
1226
|
+
const l = () => e();
|
|
1218
1227
|
X(() => {
|
|
1219
|
-
window.addEventListener("resize",
|
|
1228
|
+
window.addEventListener("resize", l);
|
|
1220
1229
|
}), He(() => {
|
|
1221
|
-
window.removeEventListener("resize",
|
|
1230
|
+
window.removeEventListener("resize", l);
|
|
1222
1231
|
});
|
|
1223
1232
|
}
|
|
1224
1233
|
const Al = /* @__PURE__ */ $({
|
|
@@ -1252,6 +1261,8 @@ const Al = /* @__PURE__ */ $({
|
|
|
1252
1261
|
default: "left"
|
|
1253
1262
|
},
|
|
1254
1263
|
/**
|
|
1264
|
+
* Use options to render a pre-designed list.
|
|
1265
|
+
*
|
|
1255
1266
|
* ```
|
|
1256
1267
|
* interface Option {id?: string; value?: string; label: string; href?: string; disabled?:boolean; checked?:boolean}
|
|
1257
1268
|
* ```
|
|
@@ -1259,7 +1270,7 @@ const Al = /* @__PURE__ */ $({
|
|
|
1259
1270
|
options: {
|
|
1260
1271
|
type: Array,
|
|
1261
1272
|
validator(e) {
|
|
1262
|
-
return e.every((
|
|
1273
|
+
return e.every((t) => Object.keys(t).includes("label"));
|
|
1263
1274
|
},
|
|
1264
1275
|
default() {
|
|
1265
1276
|
return [];
|
|
@@ -1299,48 +1310,48 @@ const Al = /* @__PURE__ */ $({
|
|
|
1299
1310
|
}
|
|
1300
1311
|
},
|
|
1301
1312
|
emits: ["update:modelValue", "dropdown:open", "dropdown:hide"],
|
|
1302
|
-
setup(e, { expose:
|
|
1303
|
-
const o = e,
|
|
1313
|
+
setup(e, { expose: l, emit: t }) {
|
|
1314
|
+
const o = e, n = g(!1), r = g(null), s = g(), i = g(null), c = g(null), y = g(!1), u = {
|
|
1304
1315
|
ignore: [s, ".joy-dropdown__list"]
|
|
1305
1316
|
};
|
|
1306
|
-
let
|
|
1307
|
-
const
|
|
1317
|
+
let v = null;
|
|
1318
|
+
const a = te({
|
|
1308
1319
|
left: "auto",
|
|
1309
1320
|
top: "0px",
|
|
1310
1321
|
right: "auto"
|
|
1311
1322
|
});
|
|
1312
|
-
function
|
|
1313
|
-
|
|
1314
|
-
|
|
1323
|
+
function f() {
|
|
1324
|
+
v && clearTimeout(v), y.value = !0, v = setTimeout(() => {
|
|
1325
|
+
n.value = !1, y.value = !1, t("dropdown:hide");
|
|
1315
1326
|
}, 300);
|
|
1316
1327
|
}
|
|
1317
1328
|
function d(O) {
|
|
1318
|
-
|
|
1329
|
+
y.value = !1, v && clearTimeout(v), ee(), c.value = O.target, n.value = !0, t("dropdown:open");
|
|
1319
1330
|
}
|
|
1320
1331
|
function j() {
|
|
1321
|
-
|
|
1332
|
+
f(), S();
|
|
1322
1333
|
}
|
|
1323
1334
|
function S() {
|
|
1324
|
-
|
|
1335
|
+
c.value && c.value.focus();
|
|
1325
1336
|
}
|
|
1326
1337
|
function ee() {
|
|
1327
|
-
const O = s.value.getBoundingClientRect(), E = document.documentElement.scrollTop + O.top,
|
|
1328
|
-
o.justify === "left" ?
|
|
1338
|
+
const O = s.value.getBoundingClientRect(), E = document.documentElement.scrollTop + O.top, T = O.height, D = O.left, F = O.width;
|
|
1339
|
+
o.justify === "left" ? a.left = D + "px" : a.left = D + F - parseInt(o.width) + "px", o.direction === "down" ? a.top = E + T + parseInt(o.dropdownGap) + "px" : a.top = E - (parseInt(o.height) + parseInt(o.dropdownGap)) + "px";
|
|
1329
1340
|
}
|
|
1330
1341
|
function oe(O) {
|
|
1331
|
-
|
|
1342
|
+
t("update:modelValue", O), o.closeOnSelect && (f(), S());
|
|
1332
1343
|
}
|
|
1333
|
-
return zl(
|
|
1334
|
-
showDropdownList:
|
|
1335
|
-
}), (O, E) => (
|
|
1344
|
+
return zl(f), l({
|
|
1345
|
+
showDropdownList: n
|
|
1346
|
+
}), (O, E) => (m(), x(k(al), {
|
|
1336
1347
|
ref_key: "dropdown",
|
|
1337
1348
|
ref: r,
|
|
1338
1349
|
options: u,
|
|
1339
1350
|
class: "joy-dropdown",
|
|
1340
|
-
onTrigger:
|
|
1351
|
+
onTrigger: f
|
|
1341
1352
|
}, {
|
|
1342
1353
|
default: B(() => [
|
|
1343
|
-
|
|
1354
|
+
b("div", {
|
|
1344
1355
|
ref_key: "button",
|
|
1345
1356
|
ref: s,
|
|
1346
1357
|
class: "joy-dropdown__button",
|
|
@@ -1348,25 +1359,25 @@ const Al = /* @__PURE__ */ $({
|
|
|
1348
1359
|
}, [
|
|
1349
1360
|
h(O.$slots, "dropdown-button", {}, void 0, !0)
|
|
1350
1361
|
], 512),
|
|
1351
|
-
(
|
|
1362
|
+
(m(), x(st, {
|
|
1352
1363
|
to: e.appendTo,
|
|
1353
1364
|
disabled: e.disableTeleport
|
|
1354
1365
|
}, [
|
|
1355
|
-
|
|
1366
|
+
n.value ? (m(), p("div", {
|
|
1356
1367
|
key: 0,
|
|
1357
1368
|
ref_key: "list",
|
|
1358
|
-
ref:
|
|
1369
|
+
ref: i,
|
|
1359
1370
|
class: w([
|
|
1360
1371
|
"joy-dropdown__list",
|
|
1361
1372
|
`joy-dropdown__list--${e.direction}`,
|
|
1362
1373
|
{
|
|
1363
|
-
"joy-dropdown__list--visible": !
|
|
1364
|
-
"joy-dropdown__list--hiding":
|
|
1374
|
+
"joy-dropdown__list--visible": !y.value,
|
|
1375
|
+
"joy-dropdown__list--hiding": y.value
|
|
1365
1376
|
}
|
|
1366
1377
|
]),
|
|
1367
1378
|
style: Z({
|
|
1368
|
-
top:
|
|
1369
|
-
left:
|
|
1379
|
+
top: a.top,
|
|
1380
|
+
left: a.left
|
|
1370
1381
|
})
|
|
1371
1382
|
}, [
|
|
1372
1383
|
N(et, {
|
|
@@ -1378,9 +1389,9 @@ const Al = /* @__PURE__ */ $({
|
|
|
1378
1389
|
"onUpdate:modelValue": oe,
|
|
1379
1390
|
"onClose:dropdownList": j
|
|
1380
1391
|
}, We({
|
|
1381
|
-
label: B((
|
|
1382
|
-
h(O.$slots, "dropdown-item", ve(me(
|
|
1383
|
-
|
|
1392
|
+
label: B((T) => [
|
|
1393
|
+
h(O.$slots, "dropdown-item", ve(me(T)), () => [
|
|
1394
|
+
b("span", null, I(T.label), 1)
|
|
1384
1395
|
], !0)
|
|
1385
1396
|
]),
|
|
1386
1397
|
_: 2
|
|
@@ -1414,7 +1425,7 @@ const Al = /* @__PURE__ */ $({
|
|
|
1414
1425
|
}, 512));
|
|
1415
1426
|
}
|
|
1416
1427
|
});
|
|
1417
|
-
const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-
|
|
1428
|
+
const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-4d9d2251"]]), Dl = ["aria-hidden"], Rl = /* @__PURE__ */ $({
|
|
1418
1429
|
__name: "VJoyFormError",
|
|
1419
1430
|
props: {
|
|
1420
1431
|
/** In some cases you'll need to inject the error in the DOM but hide it. Visible by default */
|
|
@@ -1426,7 +1437,7 @@ const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-2657fbc4"]]), Dl = ["ari
|
|
|
1426
1437
|
noHtmlErrorText: String
|
|
1427
1438
|
},
|
|
1428
1439
|
setup(e) {
|
|
1429
|
-
return (
|
|
1440
|
+
return (l, t) => (m(), p("div", {
|
|
1430
1441
|
"aria-hidden": e.visible,
|
|
1431
1442
|
class: w(["joy-form-error", { "joy-has-error": e.visible }]),
|
|
1432
1443
|
role: "alert"
|
|
@@ -1435,8 +1446,8 @@ const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-2657fbc4"]]), Dl = ["ari
|
|
|
1435
1446
|
class: "joy-icon-error",
|
|
1436
1447
|
name: "warning-triangle"
|
|
1437
1448
|
}),
|
|
1438
|
-
|
|
1439
|
-
h(
|
|
1449
|
+
b("div", null, [
|
|
1450
|
+
h(l.$slots, "default", {}, () => [
|
|
1440
1451
|
C(I(e.noHtmlErrorText), 1)
|
|
1441
1452
|
], !0)
|
|
1442
1453
|
])
|
|
@@ -1445,18 +1456,18 @@ const Fl = /* @__PURE__ */ V(Al, [["__scopeId", "data-v-2657fbc4"]]), Dl = ["ari
|
|
|
1445
1456
|
});
|
|
1446
1457
|
const tt = /* @__PURE__ */ V(Rl, [["__scopeId", "data-v-581fd33b"]]);
|
|
1447
1458
|
function Ml(e) {
|
|
1448
|
-
let
|
|
1459
|
+
let l;
|
|
1449
1460
|
switch (e) {
|
|
1450
1461
|
case "error":
|
|
1451
|
-
|
|
1462
|
+
l = "warning-triangle";
|
|
1452
1463
|
break;
|
|
1453
1464
|
case "success":
|
|
1454
|
-
|
|
1465
|
+
l = "check";
|
|
1455
1466
|
break;
|
|
1456
1467
|
default:
|
|
1457
|
-
|
|
1468
|
+
l = "info-circle";
|
|
1458
1469
|
}
|
|
1459
|
-
return
|
|
1470
|
+
return l;
|
|
1460
1471
|
}
|
|
1461
1472
|
const Nl = [..._t], Hl = { class: "joy-highlight--text" }, Wl = { key: 0 }, Ul = /* @__PURE__ */ $({
|
|
1462
1473
|
__name: "VJoyHighlight",
|
|
@@ -1480,29 +1491,29 @@ const Nl = [..._t], Hl = { class: "joy-highlight--text" }, Wl = { key: 0 }, Ul =
|
|
|
1480
1491
|
}
|
|
1481
1492
|
}
|
|
1482
1493
|
},
|
|
1483
|
-
setup(e, { expose:
|
|
1484
|
-
const
|
|
1485
|
-
return
|
|
1494
|
+
setup(e, { expose: l }) {
|
|
1495
|
+
const t = e, o = L(() => t.icon ? t.icon : Ml(t.level));
|
|
1496
|
+
return l({
|
|
1486
1497
|
getRelevantIcon: o
|
|
1487
|
-
}), (
|
|
1498
|
+
}), (n, r) => (m(), p("div", {
|
|
1488
1499
|
class: w([
|
|
1489
1500
|
"joy-highlight",
|
|
1490
1501
|
`joy-highlight_${e.level}`,
|
|
1491
1502
|
{
|
|
1492
1503
|
"joy-highlight__accent": e.accent,
|
|
1493
|
-
"joy-highlight__titled":
|
|
1504
|
+
"joy-highlight__titled": n.$slots["highlight-title"]
|
|
1494
1505
|
}
|
|
1495
1506
|
])
|
|
1496
1507
|
}, [
|
|
1497
|
-
e.displayIcon ? (
|
|
1508
|
+
e.displayIcon ? (m(), x(R, {
|
|
1498
1509
|
key: 0,
|
|
1499
1510
|
name: o.value
|
|
1500
1511
|
}, null, 8, ["name"])) : _("", !0),
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
h(
|
|
1512
|
+
b("div", Hl, [
|
|
1513
|
+
n.$slots["highlight-title"] ? (m(), p("strong", Wl, [
|
|
1514
|
+
h(n.$slots, "highlight-title", {}, void 0, !0)
|
|
1504
1515
|
])) : _("", !0),
|
|
1505
|
-
h(
|
|
1516
|
+
h(n.$slots, "default", {}, void 0, !0)
|
|
1506
1517
|
])
|
|
1507
1518
|
], 2));
|
|
1508
1519
|
}
|
|
@@ -1537,24 +1548,22 @@ const Gl = /* @__PURE__ */ V(Ul, [["__scopeId", "data-v-ba5e6101"]]), Kl = ["sma
|
|
|
1537
1548
|
text: String
|
|
1538
1549
|
},
|
|
1539
1550
|
setup(e) {
|
|
1540
|
-
return (
|
|
1551
|
+
return (l, t) => (m(), x(ce(e.tagName), Y({
|
|
1541
1552
|
class: ["joy-label", `joy-label--${e.size}`]
|
|
1542
|
-
},
|
|
1553
|
+
}, l.$attrs), {
|
|
1543
1554
|
default: B(() => [
|
|
1544
|
-
h(
|
|
1555
|
+
h(l.$slots, "default", {}, () => [
|
|
1545
1556
|
C(I(e.text), 1)
|
|
1546
1557
|
], !0),
|
|
1547
|
-
e.required ? (
|
|
1548
|
-
e.optionalLabel ? (
|
|
1558
|
+
e.required ? (m(), p("span", Ql, "*")) : _("", !0),
|
|
1559
|
+
e.optionalLabel ? (m(), p("span", Zl, "- " + I(e.optionalLabel), 1)) : _("", !0)
|
|
1549
1560
|
]),
|
|
1550
1561
|
_: 3
|
|
1551
1562
|
}, 16, ["class"]));
|
|
1552
1563
|
}
|
|
1553
1564
|
});
|
|
1554
|
-
const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["large", "medium", "small"], eo = ["id", "disabled", "type", "value"], to = ["data-unit"], lo = {
|
|
1555
|
-
inheritAttrs: !1
|
|
1556
|
-
}, oo = /* @__PURE__ */ $({
|
|
1557
|
-
...lo,
|
|
1565
|
+
const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["large", "medium", "small"], eo = ["id", "required", "disabled", "type", "value"], to = ["data-unit"], lo = /* @__PURE__ */ $({
|
|
1566
|
+
inheritAttrs: !1,
|
|
1558
1567
|
__name: "VJoyInput",
|
|
1559
1568
|
props: {
|
|
1560
1569
|
disabled: {
|
|
@@ -1614,46 +1623,46 @@ const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["larg
|
|
|
1614
1623
|
unit: String
|
|
1615
1624
|
},
|
|
1616
1625
|
emits: ["update:modelValue"],
|
|
1617
|
-
setup(e, { emit:
|
|
1618
|
-
const
|
|
1619
|
-
var
|
|
1620
|
-
return !!((
|
|
1621
|
-
}),
|
|
1626
|
+
setup(e, { emit: l }) {
|
|
1627
|
+
const t = e, o = g(), n = g(), r = Me(), s = G(), i = g(!1), c = L(() => typeof t.modelValue == "number" || !t.clearable || t.unit || !t.modelValue ? !1 : t.modelValue.length > 0 && !t.unit), y = L(() => s.default && s.default()), u = L(() => {
|
|
1628
|
+
var f, d;
|
|
1629
|
+
return !!((f = n.value) != null && f.closest("joy-wrapper")) || !!((d = n.value) != null && d.closest(".joy-wrapper"));
|
|
1630
|
+
}), v = g(t.type);
|
|
1622
1631
|
ut(() => {
|
|
1623
|
-
|
|
1632
|
+
v.value = t.unit ? "number" : t.unit || "text";
|
|
1624
1633
|
});
|
|
1625
|
-
const
|
|
1634
|
+
const a = {
|
|
1626
1635
|
onFocus: () => {
|
|
1627
|
-
|
|
1636
|
+
i.value = !0;
|
|
1628
1637
|
},
|
|
1629
1638
|
onBlur: () => {
|
|
1630
|
-
|
|
1639
|
+
i.value = !1;
|
|
1631
1640
|
},
|
|
1632
|
-
onInput: (
|
|
1633
|
-
let d =
|
|
1634
|
-
|
|
1641
|
+
onInput: (f) => {
|
|
1642
|
+
let d = f.target.value;
|
|
1643
|
+
l("update:modelValue", d);
|
|
1635
1644
|
},
|
|
1636
1645
|
clearValue: () => {
|
|
1637
|
-
|
|
1646
|
+
t.disabled || l("update:modelValue", "");
|
|
1638
1647
|
}
|
|
1639
1648
|
};
|
|
1640
|
-
return (
|
|
1649
|
+
return (f, d) => (m(), p("div", {
|
|
1641
1650
|
ref_key: "root",
|
|
1642
|
-
ref:
|
|
1643
|
-
class: w([`joy-input--${
|
|
1651
|
+
ref: n,
|
|
1652
|
+
class: w([`joy-input--${t.size}`])
|
|
1644
1653
|
}, [
|
|
1645
|
-
|
|
1654
|
+
b("div", {
|
|
1646
1655
|
class: w([
|
|
1647
1656
|
"joy-input",
|
|
1648
1657
|
{
|
|
1649
|
-
"joy-input--focusing":
|
|
1658
|
+
"joy-input--focusing": i.value,
|
|
1650
1659
|
"joy-input--disabled": e.disabled,
|
|
1651
1660
|
"joy-input--invalid": e.invalid,
|
|
1652
1661
|
"joy-input--valid": !e.invalid && !k(r).disabled
|
|
1653
1662
|
}
|
|
1654
1663
|
])
|
|
1655
1664
|
}, [
|
|
1656
|
-
|
|
1665
|
+
y.value || e.label ? (m(), x(W, {
|
|
1657
1666
|
key: 0,
|
|
1658
1667
|
for: e.name,
|
|
1659
1668
|
required: e.required && e.requiredMark,
|
|
@@ -1661,13 +1670,13 @@ const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["larg
|
|
|
1661
1670
|
size: e.labelSize
|
|
1662
1671
|
}, {
|
|
1663
1672
|
default: B(() => [
|
|
1664
|
-
h(
|
|
1673
|
+
h(f.$slots, "default", {}, () => [
|
|
1665
1674
|
C(I(e.label), 1)
|
|
1666
1675
|
], !0)
|
|
1667
1676
|
]),
|
|
1668
1677
|
_: 3
|
|
1669
1678
|
}, 8, ["for", "required", "optional-label", "size"])) : _("", !0),
|
|
1670
|
-
|
|
1679
|
+
b("div", {
|
|
1671
1680
|
class: w([
|
|
1672
1681
|
"joy-input--wrapper",
|
|
1673
1682
|
{
|
|
@@ -1678,10 +1687,11 @@ const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["larg
|
|
|
1678
1687
|
}
|
|
1679
1688
|
])
|
|
1680
1689
|
}, [
|
|
1681
|
-
|
|
1682
|
-
id:
|
|
1690
|
+
b("input", Y(f.$attrs, {
|
|
1691
|
+
id: t.name,
|
|
1683
1692
|
ref_key: "input",
|
|
1684
1693
|
ref: o,
|
|
1694
|
+
required: e.required,
|
|
1685
1695
|
disabled: e.disabled,
|
|
1686
1696
|
class: [
|
|
1687
1697
|
{
|
|
@@ -1689,31 +1699,31 @@ const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["larg
|
|
|
1689
1699
|
"joy-input--field-invalid": e.invalid
|
|
1690
1700
|
}
|
|
1691
1701
|
],
|
|
1692
|
-
type:
|
|
1702
|
+
type: v.value,
|
|
1693
1703
|
value: e.modelValue,
|
|
1694
1704
|
onFocus: d[0] || (d[0] = //@ts-ignore
|
|
1695
|
-
(...j) =>
|
|
1705
|
+
(...j) => a.onFocus && a.onFocus(...j)),
|
|
1696
1706
|
onBlur: d[1] || (d[1] = //@ts-ignore
|
|
1697
|
-
(...j) =>
|
|
1707
|
+
(...j) => a.onBlur && a.onBlur(...j)),
|
|
1698
1708
|
onInput: d[2] || (d[2] = //@ts-ignore
|
|
1699
|
-
(...j) =>
|
|
1709
|
+
(...j) => a.onInput && a.onInput(...j))
|
|
1700
1710
|
}), null, 16, eo),
|
|
1701
|
-
|
|
1711
|
+
c.value ? (m(), x(Ue, {
|
|
1702
1712
|
key: 0,
|
|
1703
1713
|
class: "joy-input--clear",
|
|
1704
1714
|
circle: "",
|
|
1705
1715
|
variant: "ghost",
|
|
1706
1716
|
size: "xxsmall",
|
|
1707
1717
|
icon: "cross",
|
|
1708
|
-
onClick:
|
|
1718
|
+
onClick: a.clearValue
|
|
1709
1719
|
}, null, 8, ["onClick"])) : _("", !0),
|
|
1710
|
-
e.icon && !e.clearable ? (
|
|
1720
|
+
e.icon && !e.clearable ? (m(), x(R, {
|
|
1711
1721
|
key: 1,
|
|
1712
1722
|
role: "img",
|
|
1713
1723
|
class: "joy-input--decorative-icon",
|
|
1714
1724
|
name: e.icon
|
|
1715
1725
|
}, null, 8, ["name"])) : _("", !0),
|
|
1716
|
-
e.unit ? (
|
|
1726
|
+
e.unit ? (m(), p("div", {
|
|
1717
1727
|
key: 2,
|
|
1718
1728
|
"data-unit": e.unit,
|
|
1719
1729
|
class: "joy-input--unit"
|
|
@@ -1723,7 +1733,7 @@ const W = /* @__PURE__ */ V(Yl, [["__scopeId", "data-v-1265214a"]]), Xl = ["larg
|
|
|
1723
1733
|
], 2));
|
|
1724
1734
|
}
|
|
1725
1735
|
});
|
|
1726
|
-
const
|
|
1736
|
+
const oo = /* @__PURE__ */ V(lo, [["__scopeId", "data-v-46a69828"]]), no = ["teal", "white"], ao = ["href"], io = /* @__PURE__ */ $({
|
|
1727
1737
|
__name: "VJoyLink",
|
|
1728
1738
|
props: {
|
|
1729
1739
|
href: {
|
|
@@ -1734,7 +1744,7 @@ const no = /* @__PURE__ */ V(oo, [["__scopeId", "data-v-c37d9a7a"]]), ao = ["tea
|
|
|
1734
1744
|
type: String,
|
|
1735
1745
|
default: "teal",
|
|
1736
1746
|
validator(e) {
|
|
1737
|
-
return
|
|
1747
|
+
return no.includes(e);
|
|
1738
1748
|
}
|
|
1739
1749
|
},
|
|
1740
1750
|
icon: {
|
|
@@ -1743,30 +1753,30 @@ const no = /* @__PURE__ */ V(oo, [["__scopeId", "data-v-c37d9a7a"]]), ao = ["tea
|
|
|
1743
1753
|
text: String
|
|
1744
1754
|
},
|
|
1745
1755
|
setup(e) {
|
|
1746
|
-
return (
|
|
1756
|
+
return (l, t) => (m(), p("a", Y({ href: e.href }, l.$attrs, {
|
|
1747
1757
|
class: ["joy-link", `joy-link_${e.color}`]
|
|
1748
1758
|
}), [
|
|
1749
|
-
e.icon ? (
|
|
1759
|
+
e.icon ? (m(), x(R, {
|
|
1750
1760
|
key: 0,
|
|
1751
1761
|
name: e.icon
|
|
1752
1762
|
}, null, 8, ["name"])) : _("", !0),
|
|
1753
|
-
h(
|
|
1763
|
+
h(l.$slots, "default", {}, () => [
|
|
1754
1764
|
C(I(e.text), 1)
|
|
1755
1765
|
], !0)
|
|
1756
|
-
], 16,
|
|
1766
|
+
], 16, ao));
|
|
1757
1767
|
}
|
|
1758
1768
|
});
|
|
1759
|
-
const
|
|
1769
|
+
const ro = /* @__PURE__ */ V(io, [["__scopeId", "data-v-a8db21c2"]]), so = ["id"], uo = {
|
|
1760
1770
|
class: /* @__PURE__ */ w(["joy-multi-checkbox"])
|
|
1761
|
-
},
|
|
1771
|
+
}, co = /* @__PURE__ */ $({
|
|
1762
1772
|
__name: "VJoyMultiCheckbox",
|
|
1763
1773
|
props: {
|
|
1764
1774
|
options: {
|
|
1765
1775
|
type: Array,
|
|
1766
1776
|
required: !0,
|
|
1767
1777
|
validator(e) {
|
|
1768
|
-
const
|
|
1769
|
-
return
|
|
1778
|
+
const l = e.every((o) => Object.keys(o).includes("value")), t = e.every((o) => Object.keys(o).includes("label"));
|
|
1779
|
+
return l && t;
|
|
1770
1780
|
}
|
|
1771
1781
|
},
|
|
1772
1782
|
id: String,
|
|
@@ -1792,20 +1802,20 @@ const so = /* @__PURE__ */ V(ro, [["__scopeId", "data-v-a8db21c2"]]), uo = ["id"
|
|
|
1792
1802
|
}
|
|
1793
1803
|
},
|
|
1794
1804
|
emits: ["update:value"],
|
|
1795
|
-
setup(e, { emit:
|
|
1796
|
-
const
|
|
1805
|
+
setup(e, { emit: l }) {
|
|
1806
|
+
const t = e;
|
|
1797
1807
|
function o(r) {
|
|
1798
|
-
return
|
|
1808
|
+
return t.value.includes(r.value);
|
|
1799
1809
|
}
|
|
1800
|
-
function
|
|
1801
|
-
let
|
|
1802
|
-
s ?
|
|
1810
|
+
function n(r, s) {
|
|
1811
|
+
let i = [...t.value || []];
|
|
1812
|
+
s ? i.push(r) : i.splice(i.indexOf(r), 1), l("update:value", i);
|
|
1803
1813
|
}
|
|
1804
|
-
return (r, s) => (
|
|
1814
|
+
return (r, s) => (m(), p("fieldset", {
|
|
1805
1815
|
id: e.id,
|
|
1806
1816
|
class: "joy-multi-checkbox__wrapper"
|
|
1807
1817
|
}, [
|
|
1808
|
-
e.label ? (
|
|
1818
|
+
e.label ? (m(), x(k(W), {
|
|
1809
1819
|
key: 0,
|
|
1810
1820
|
"tag-name": "legend",
|
|
1811
1821
|
required: e.required && e.requiredMark,
|
|
@@ -1817,39 +1827,39 @@ const so = /* @__PURE__ */ V(ro, [["__scopeId", "data-v-a8db21c2"]]), uo = ["id"
|
|
|
1817
1827
|
]),
|
|
1818
1828
|
_: 1
|
|
1819
1829
|
}, 8, ["required", "optional-label", "size"])) : _("", !0),
|
|
1820
|
-
|
|
1821
|
-
(
|
|
1822
|
-
id:
|
|
1823
|
-
key:
|
|
1824
|
-
name:
|
|
1825
|
-
value:
|
|
1826
|
-
checked: o(
|
|
1827
|
-
"onUpdate:checked": (
|
|
1830
|
+
b("div", uo, [
|
|
1831
|
+
(m(!0), p(fe, null, ye(e.options, (i) => (m(), x(k(he), {
|
|
1832
|
+
id: i.id,
|
|
1833
|
+
key: i.id,
|
|
1834
|
+
name: i.name,
|
|
1835
|
+
value: i.value,
|
|
1836
|
+
checked: o(i),
|
|
1837
|
+
"onUpdate:checked": (c) => n(i.value, c)
|
|
1828
1838
|
}, {
|
|
1829
1839
|
default: B(() => [
|
|
1830
|
-
h(r.$slots, "checkbox", ve(me(
|
|
1831
|
-
C(I(
|
|
1840
|
+
h(r.$slots, "checkbox", ve(me(i)), () => [
|
|
1841
|
+
C(I(i.label), 1)
|
|
1832
1842
|
], !0)
|
|
1833
1843
|
]),
|
|
1834
1844
|
_: 2
|
|
1835
1845
|
}, 1032, ["id", "name", "value", "checked", "onUpdate:checked"]))), 128))
|
|
1836
1846
|
])
|
|
1837
|
-
], 8,
|
|
1847
|
+
], 8, so));
|
|
1838
1848
|
}
|
|
1839
1849
|
});
|
|
1840
|
-
const
|
|
1850
|
+
const fo = /* @__PURE__ */ V(co, [["__scopeId", "data-v-47574ced"]]), yo = ["small", "medium", "large"], vo = ["small", "large"], mo = {
|
|
1841
1851
|
key: 0,
|
|
1842
1852
|
class: /* @__PURE__ */ w(["joy-panel__header"])
|
|
1843
|
-
},
|
|
1853
|
+
}, po = {
|
|
1844
1854
|
key: 1,
|
|
1845
1855
|
class: "joy-panel__header-action"
|
|
1846
|
-
},
|
|
1856
|
+
}, ho = {
|
|
1847
1857
|
key: 2,
|
|
1848
1858
|
class: "joy-panel__header-subtitle"
|
|
1849
|
-
},
|
|
1859
|
+
}, go = { class: "joy-panel__body" }, bo = {
|
|
1850
1860
|
key: 1,
|
|
1851
1861
|
class: "joy-panel__footer"
|
|
1852
|
-
},
|
|
1862
|
+
}, _o = /* @__PURE__ */ $({
|
|
1853
1863
|
__name: "VJoyPanel",
|
|
1854
1864
|
props: {
|
|
1855
1865
|
flex: {
|
|
@@ -1863,14 +1873,14 @@ const yo = /* @__PURE__ */ V(fo, [["__scopeId", "data-v-47574ced"]]), vo = ["sma
|
|
|
1863
1873
|
type: String,
|
|
1864
1874
|
default: "medium",
|
|
1865
1875
|
validator(e) {
|
|
1866
|
-
return
|
|
1876
|
+
return yo.includes(e);
|
|
1867
1877
|
}
|
|
1868
1878
|
},
|
|
1869
1879
|
titleSize: {
|
|
1870
1880
|
type: String,
|
|
1871
1881
|
default: "large",
|
|
1872
1882
|
validator(e) {
|
|
1873
|
-
return
|
|
1883
|
+
return vo.includes(e);
|
|
1874
1884
|
}
|
|
1875
1885
|
},
|
|
1876
1886
|
loading: {
|
|
@@ -1883,41 +1893,41 @@ const yo = /* @__PURE__ */ V(fo, [["__scopeId", "data-v-47574ced"]]), vo = ["sma
|
|
|
1883
1893
|
}
|
|
1884
1894
|
},
|
|
1885
1895
|
setup(e) {
|
|
1886
|
-
const
|
|
1887
|
-
return (s,
|
|
1896
|
+
const l = dt("VJoyWrapperContext", {}), t = L(() => Object.keys(l).length > 0), o = G(), n = g(), r = L(() => o["panel-title"] || o["panel-subtitle"] || o["panel-title-action"]);
|
|
1897
|
+
return (s, i) => (m(), p("section", {
|
|
1888
1898
|
ref_key: "panel",
|
|
1889
|
-
ref:
|
|
1899
|
+
ref: n,
|
|
1890
1900
|
style: Z({ flex: e.flex }),
|
|
1891
1901
|
class: w([
|
|
1892
1902
|
"joy-panel",
|
|
1893
1903
|
`joy-panel--${e.padding}`,
|
|
1894
1904
|
{
|
|
1895
|
-
"joy-panel--no-margin": e.noMargin ||
|
|
1905
|
+
"joy-panel--no-margin": e.noMargin || t.value,
|
|
1896
1906
|
"joy-panel--loading": e.loading
|
|
1897
1907
|
}
|
|
1898
1908
|
])
|
|
1899
1909
|
}, [
|
|
1900
|
-
r.value ? (
|
|
1901
|
-
k(o)["panel-title"] ? (
|
|
1910
|
+
r.value ? (m(), p("header", mo, [
|
|
1911
|
+
k(o)["panel-title"] ? (m(), p("div", {
|
|
1902
1912
|
key: 0,
|
|
1903
1913
|
class: w(["joy-panel__header-title", `joy-panel__header-title--${e.titleSize}`])
|
|
1904
1914
|
}, [
|
|
1905
1915
|
h(s.$slots, "panel-title", {}, void 0, !0)
|
|
1906
1916
|
], 2)) : _("", !0),
|
|
1907
|
-
k(o)["panel-title-action"] ? (
|
|
1917
|
+
k(o)["panel-title-action"] ? (m(), p("div", po, [
|
|
1908
1918
|
h(s.$slots, "panel-title-action", {}, void 0, !0)
|
|
1909
1919
|
])) : _("", !0),
|
|
1910
|
-
k(o)["panel-subtitle"] ? (
|
|
1920
|
+
k(o)["panel-subtitle"] ? (m(), p("div", ho, [
|
|
1911
1921
|
h(s.$slots, "panel-subtitle", {}, void 0, !0)
|
|
1912
1922
|
])) : _("", !0)
|
|
1913
1923
|
])) : _("", !0),
|
|
1914
|
-
|
|
1924
|
+
b("div", go, [
|
|
1915
1925
|
h(s.$slots, "panel-body", {}, void 0, !0)
|
|
1916
1926
|
]),
|
|
1917
|
-
k(o)["panel-action"] ? (
|
|
1927
|
+
k(o)["panel-action"] ? (m(), p("footer", bo, [
|
|
1918
1928
|
h(s.$slots, "panel-action", {}, void 0, !0)
|
|
1919
1929
|
])) : _("", !0),
|
|
1920
|
-
e.loading ? (
|
|
1930
|
+
e.loading ? (m(), x(k(be), {
|
|
1921
1931
|
key: 2,
|
|
1922
1932
|
overlay: "",
|
|
1923
1933
|
color: e.loadingColor
|
|
@@ -1930,27 +1940,27 @@ const yo = /* @__PURE__ */ V(fo, [["__scopeId", "data-v-47574ced"]]), vo = ["sma
|
|
|
1930
1940
|
], 6));
|
|
1931
1941
|
}
|
|
1932
1942
|
});
|
|
1933
|
-
const
|
|
1943
|
+
const wo = /* @__PURE__ */ V(_o, [["__scopeId", "data-v-2e3a2baa"]]), So = { class: "joy-panel-section" }, jo = {
|
|
1934
1944
|
key: 0,
|
|
1935
1945
|
class: "joy-panel-section__title"
|
|
1936
|
-
},
|
|
1946
|
+
}, ko = {
|
|
1937
1947
|
key: 1,
|
|
1938
1948
|
class: "joy-panel-section__content"
|
|
1939
|
-
},
|
|
1949
|
+
}, $o = /* @__PURE__ */ $({
|
|
1940
1950
|
__name: "VJoyPanelSection",
|
|
1941
1951
|
setup(e) {
|
|
1942
|
-
const
|
|
1943
|
-
return (
|
|
1944
|
-
k(
|
|
1945
|
-
h(
|
|
1952
|
+
const l = G();
|
|
1953
|
+
return (t, o) => (m(), p("div", So, [
|
|
1954
|
+
k(l)["panel-section-title"] ? (m(), p("div", jo, [
|
|
1955
|
+
h(t.$slots, "panel-section-title", {}, void 0, !0)
|
|
1946
1956
|
])) : _("", !0),
|
|
1947
|
-
k(
|
|
1948
|
-
h(
|
|
1957
|
+
k(l)["panel-section-content"] ? (m(), p("div", ko, [
|
|
1958
|
+
h(t.$slots, "panel-section-content", {}, void 0, !0)
|
|
1949
1959
|
])) : _("", !0)
|
|
1950
1960
|
]));
|
|
1951
1961
|
}
|
|
1952
1962
|
});
|
|
1953
|
-
const
|
|
1963
|
+
const Vo = /* @__PURE__ */ V($o, [["__scopeId", "data-v-d88510ab"]]), xo = ["id", "value", "checked", "disabled", "required", "name"], Io = { class: "joy-radio-label" }, Oo = { class: "joy-radio-content__wrapper" }, Bo = { class: "joy-radio-content" }, Lo = /* @__PURE__ */ $({
|
|
1954
1964
|
__name: "VJoyRadio",
|
|
1955
1965
|
props: {
|
|
1956
1966
|
disabled: {
|
|
@@ -1985,21 +1995,21 @@ const xo = /* @__PURE__ */ V(Vo, [["__scopeId", "data-v-d88510ab"]]), Io = ["id"
|
|
|
1985
1995
|
}
|
|
1986
1996
|
},
|
|
1987
1997
|
emits: ["update:modelValue"],
|
|
1988
|
-
setup(e, { expose:
|
|
1989
|
-
const o = e,
|
|
1998
|
+
setup(e, { expose: l, emit: t }) {
|
|
1999
|
+
const o = e, n = g(!1), r = g(!1), s = g(null), i = g(null), c = G(), y = L(() => !o.modelValue || !o.value ? !1 : o.modelValue === o.value);
|
|
1990
2000
|
function u() {
|
|
1991
|
-
|
|
2001
|
+
n.value = !!c["expandable-content"] && y.value;
|
|
1992
2002
|
}
|
|
1993
|
-
function
|
|
1994
|
-
|
|
2003
|
+
function v() {
|
|
2004
|
+
t("update:modelValue", o.value), u();
|
|
1995
2005
|
}
|
|
1996
2006
|
X(() => {
|
|
1997
2007
|
o.theme === "outline" && u();
|
|
1998
2008
|
});
|
|
1999
|
-
function
|
|
2009
|
+
function a() {
|
|
2000
2010
|
r.value = !0;
|
|
2001
2011
|
}
|
|
2002
|
-
function
|
|
2012
|
+
function f() {
|
|
2003
2013
|
r.value = !1;
|
|
2004
2014
|
}
|
|
2005
2015
|
return J(
|
|
@@ -2007,17 +2017,17 @@ const xo = /* @__PURE__ */ V(Vo, [["__scopeId", "data-v-d88510ab"]]), Io = ["id"
|
|
|
2007
2017
|
() => {
|
|
2008
2018
|
u();
|
|
2009
2019
|
}
|
|
2010
|
-
),
|
|
2011
|
-
checked:
|
|
2012
|
-
isExpanded:
|
|
2013
|
-
}), (d, j) => (
|
|
2020
|
+
), l({
|
|
2021
|
+
checked: y,
|
|
2022
|
+
isExpanded: n
|
|
2023
|
+
}), (d, j) => (m(), p("label", {
|
|
2014
2024
|
ref_key: "root",
|
|
2015
2025
|
ref: s,
|
|
2016
2026
|
class: w([
|
|
2017
2027
|
"joy-radio",
|
|
2018
2028
|
`joy-radio--${e.theme}`,
|
|
2019
2029
|
{
|
|
2020
|
-
"joy-radio--checked":
|
|
2030
|
+
"joy-radio--checked": y.value,
|
|
2021
2031
|
"joy-radio--disabled": e.disabled,
|
|
2022
2032
|
"joy-radio--invalid": e.invalid,
|
|
2023
2033
|
"joy-radio--outline-focus": r.value && e.theme === "outline",
|
|
@@ -2025,29 +2035,29 @@ const xo = /* @__PURE__ */ V(Vo, [["__scopeId", "data-v-d88510ab"]]), Io = ["id"
|
|
|
2025
2035
|
}
|
|
2026
2036
|
])
|
|
2027
2037
|
}, [
|
|
2028
|
-
|
|
2038
|
+
b("input", {
|
|
2029
2039
|
id: e.id,
|
|
2030
2040
|
type: "radio",
|
|
2031
2041
|
value: e.value,
|
|
2032
|
-
checked:
|
|
2042
|
+
checked: y.value,
|
|
2033
2043
|
disabled: e.disabled,
|
|
2034
2044
|
required: e.required,
|
|
2035
2045
|
name: e.name,
|
|
2036
|
-
onChange:
|
|
2037
|
-
onFocus:
|
|
2038
|
-
onBlur:
|
|
2039
|
-
}, null, 40,
|
|
2040
|
-
|
|
2046
|
+
onChange: v,
|
|
2047
|
+
onFocus: a,
|
|
2048
|
+
onBlur: f
|
|
2049
|
+
}, null, 40, xo),
|
|
2050
|
+
b("span", Io, [
|
|
2041
2051
|
h(d.$slots, "default", {}, void 0, !0)
|
|
2042
2052
|
]),
|
|
2043
|
-
|
|
2044
|
-
|
|
2053
|
+
b("div", Oo, [
|
|
2054
|
+
b("div", Bo, [
|
|
2045
2055
|
h(d.$slots, "radio-content", {}, void 0, !0)
|
|
2046
2056
|
]),
|
|
2047
|
-
|
|
2057
|
+
b("div", {
|
|
2048
2058
|
ref_key: "expandableElement",
|
|
2049
|
-
ref:
|
|
2050
|
-
class: w(["joy-radio-expandable", { "joy-radio-expandable--expanded":
|
|
2059
|
+
ref: i,
|
|
2060
|
+
class: w(["joy-radio-expandable", { "joy-radio-expandable--expanded": n.value }])
|
|
2051
2061
|
}, [
|
|
2052
2062
|
h(d.$slots, "expandable-content", {}, void 0, !0)
|
|
2053
2063
|
], 2)
|
|
@@ -2055,7 +2065,7 @@ const xo = /* @__PURE__ */ V(Vo, [["__scopeId", "data-v-d88510ab"]]), Io = ["id"
|
|
|
2055
2065
|
], 2));
|
|
2056
2066
|
}
|
|
2057
2067
|
});
|
|
2058
|
-
const
|
|
2068
|
+
const Eo = /* @__PURE__ */ V(Lo, [["__scopeId", "data-v-24cea99b"]]), Co = ["form", "name"], Jo = /* @__PURE__ */ $({
|
|
2059
2069
|
__name: "VJoyRadioGroup",
|
|
2060
2070
|
props: {
|
|
2061
2071
|
/**
|
|
@@ -2076,26 +2086,26 @@ const Co = /* @__PURE__ */ V(Eo, [["__scopeId", "data-v-24cea99b"]]), Jo = ["for
|
|
|
2076
2086
|
}
|
|
2077
2087
|
},
|
|
2078
2088
|
setup(e) {
|
|
2079
|
-
return (
|
|
2089
|
+
return (l, t) => (m(), p("fieldset", {
|
|
2080
2090
|
ref: "root",
|
|
2081
2091
|
class: "joy-radio-group-fieldset",
|
|
2082
2092
|
role: "radiogroup",
|
|
2083
2093
|
form: e.form,
|
|
2084
2094
|
name: e.name
|
|
2085
2095
|
}, [
|
|
2086
|
-
h(
|
|
2087
|
-
|
|
2096
|
+
h(l.$slots, "radio-group-legend", {}, void 0, !0),
|
|
2097
|
+
b("div", {
|
|
2088
2098
|
class: w(["joy-radio-group-container", `joy-radio-group-${e.direction}`])
|
|
2089
2099
|
}, [
|
|
2090
|
-
h(
|
|
2100
|
+
h(l.$slots, "default", {}, void 0, !0)
|
|
2091
2101
|
], 2)
|
|
2092
|
-
], 8,
|
|
2102
|
+
], 8, Co));
|
|
2093
2103
|
}
|
|
2094
2104
|
});
|
|
2095
|
-
const
|
|
2105
|
+
const Po = /* @__PURE__ */ V(Jo, [["__scopeId", "data-v-a77e7f95"]]), qo = { class: "joy-screen-loader__content" }, To = {
|
|
2096
2106
|
key: 0,
|
|
2097
2107
|
class: "joy-screen-loader__content"
|
|
2098
|
-
},
|
|
2108
|
+
}, zo = /* @__PURE__ */ $({
|
|
2099
2109
|
__name: "VJoyScreenLoader",
|
|
2100
2110
|
props: {
|
|
2101
2111
|
/** Light or dark. Changes the spinner and background color */
|
|
@@ -2110,23 +2120,23 @@ const To = /* @__PURE__ */ V(Po, [["__scopeId", "data-v-a77e7f95"]]), qo = { cla
|
|
|
2110
2120
|
}
|
|
2111
2121
|
},
|
|
2112
2122
|
setup(e) {
|
|
2113
|
-
return (
|
|
2123
|
+
return (l, t) => (m(), p("div", {
|
|
2114
2124
|
class: w(["joy-screen-loader", `joy-screen-loader--${e.color}`, { "joy-screen-loader--overlay": e.overlay }])
|
|
2115
2125
|
}, [
|
|
2116
|
-
|
|
2117
|
-
h(
|
|
2126
|
+
b("div", qo, [
|
|
2127
|
+
h(l.$slots, "spinner", {}, () => [
|
|
2118
2128
|
N(pe, {
|
|
2119
2129
|
color: e.color === "dark" ? "white" : "teal"
|
|
2120
2130
|
}, null, 8, ["color"])
|
|
2121
2131
|
], !0),
|
|
2122
|
-
|
|
2123
|
-
h(
|
|
2132
|
+
l.$slots.content ? (m(), p("div", To, [
|
|
2133
|
+
h(l.$slots, "content", {}, void 0, !0)
|
|
2124
2134
|
])) : _("", !0)
|
|
2125
2135
|
])
|
|
2126
2136
|
], 2));
|
|
2127
2137
|
}
|
|
2128
2138
|
});
|
|
2129
|
-
const be = /* @__PURE__ */ V(
|
|
2139
|
+
const be = /* @__PURE__ */ V(zo, [["__scopeId", "data-v-5c4f6d7f"]]), Ao = ["id", "name", "aria-invalid", "required", "disabled", "value"], Fo = /* @__PURE__ */ $({
|
|
2130
2140
|
__name: "VJoySelect",
|
|
2131
2141
|
props: {
|
|
2132
2142
|
disabled: {
|
|
@@ -2150,8 +2160,7 @@ const be = /* @__PURE__ */ V(Ao, [["__scopeId", "data-v-5c4f6d7f"]]), Fo = ["id"
|
|
|
2150
2160
|
// ...FORM_BASED_PROPS,
|
|
2151
2161
|
label: String,
|
|
2152
2162
|
labelSize: {
|
|
2153
|
-
type: String
|
|
2154
|
-
default: "medium"
|
|
2163
|
+
type: String
|
|
2155
2164
|
},
|
|
2156
2165
|
optionalLabel: String,
|
|
2157
2166
|
requiredMark: {
|
|
@@ -2162,48 +2171,52 @@ const be = /* @__PURE__ */ V(Ao, [["__scopeId", "data-v-5c4f6d7f"]]), Fo = ["id"
|
|
|
2162
2171
|
modelValue: {
|
|
2163
2172
|
type: String,
|
|
2164
2173
|
default: ""
|
|
2174
|
+
},
|
|
2175
|
+
size: {
|
|
2176
|
+
type: String,
|
|
2177
|
+
default: "medium"
|
|
2165
2178
|
}
|
|
2166
2179
|
// ...TEXT_BASED_PROPS,
|
|
2167
2180
|
},
|
|
2168
2181
|
emits: ["update:modelValue"],
|
|
2169
|
-
setup(e, { emit:
|
|
2170
|
-
const
|
|
2182
|
+
setup(e, { emit: l }) {
|
|
2183
|
+
const t = e, o = g(), n = g(), r = G(), s = g(!1), i = L(() => t.labelSize ? t.labelSize : t.size !== "medium" ? "small" : "medium");
|
|
2171
2184
|
X(() => {
|
|
2172
|
-
var
|
|
2173
|
-
const
|
|
2174
|
-
if (!
|
|
2185
|
+
var f;
|
|
2186
|
+
const v = r.label && r.label();
|
|
2187
|
+
if (!v || !v.length)
|
|
2175
2188
|
return;
|
|
2176
|
-
const
|
|
2177
|
-
if (
|
|
2178
|
-
const
|
|
2179
|
-
if (!
|
|
2189
|
+
const a = v[0];
|
|
2190
|
+
if (a.type === "JoyLabel") {
|
|
2191
|
+
const d = (f = a.props) == null ? void 0 : f.for;
|
|
2192
|
+
if (!d) {
|
|
2180
2193
|
console.warn("JoyLabel for attribute is missing");
|
|
2181
2194
|
return;
|
|
2182
2195
|
}
|
|
2183
|
-
|
|
2196
|
+
d !== t.id && console.warn("JoyLabel for attribute does not match with JoySelect id");
|
|
2184
2197
|
}
|
|
2185
2198
|
});
|
|
2186
|
-
function
|
|
2187
|
-
const
|
|
2188
|
-
|
|
2199
|
+
function c(v) {
|
|
2200
|
+
const a = v.target.value;
|
|
2201
|
+
l("update:modelValue", a);
|
|
2189
2202
|
}
|
|
2190
|
-
function
|
|
2203
|
+
function y() {
|
|
2191
2204
|
s.value = !0;
|
|
2192
2205
|
}
|
|
2193
|
-
function
|
|
2206
|
+
function u() {
|
|
2194
2207
|
s.value = !1;
|
|
2195
2208
|
}
|
|
2196
|
-
return (
|
|
2209
|
+
return (v, a) => (m(), p("div", {
|
|
2197
2210
|
ref_key: "root",
|
|
2198
2211
|
ref: o
|
|
2199
2212
|
}, [
|
|
2200
|
-
h(
|
|
2201
|
-
e.label ? (
|
|
2213
|
+
h(v.$slots, "select-label", {}, () => [
|
|
2214
|
+
e.label ? (m(), x(W, {
|
|
2202
2215
|
key: 0,
|
|
2203
2216
|
required: e.required && e.requiredMark,
|
|
2204
2217
|
"optional-label": e.optionalLabel,
|
|
2205
2218
|
for: e.id || e.name,
|
|
2206
|
-
size:
|
|
2219
|
+
size: i.value
|
|
2207
2220
|
}, {
|
|
2208
2221
|
default: B(() => [
|
|
2209
2222
|
C(I(e.label), 1)
|
|
@@ -2211,30 +2224,33 @@ const be = /* @__PURE__ */ V(Ao, [["__scopeId", "data-v-5c4f6d7f"]]), Fo = ["id"
|
|
|
2211
2224
|
_: 1
|
|
2212
2225
|
}, 8, ["required", "optional-label", "for", "size"])) : _("", !0)
|
|
2213
2226
|
], !0),
|
|
2214
|
-
|
|
2215
|
-
class: w(
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2227
|
+
b("div", {
|
|
2228
|
+
class: w([
|
|
2229
|
+
`joy-select--${e.size}`,
|
|
2230
|
+
{
|
|
2231
|
+
"joy-select__wrapper": !0,
|
|
2232
|
+
"joy-select--invalid": e.invalid,
|
|
2233
|
+
"joy-select--disabled": e.disabled,
|
|
2234
|
+
"joy-select--focusing": s.value
|
|
2235
|
+
}
|
|
2236
|
+
])
|
|
2221
2237
|
}, [
|
|
2222
|
-
|
|
2238
|
+
b("select", {
|
|
2223
2239
|
id: e.id || e.name,
|
|
2224
2240
|
ref_key: "select",
|
|
2225
|
-
ref:
|
|
2241
|
+
ref: n,
|
|
2226
2242
|
class: "joy-select",
|
|
2227
2243
|
name: e.name,
|
|
2228
2244
|
"aria-invalid": e.invalid,
|
|
2229
2245
|
required: e.required,
|
|
2230
2246
|
disabled: e.disabled,
|
|
2231
2247
|
value: e.modelValue,
|
|
2232
|
-
onInput:
|
|
2233
|
-
onFocus:
|
|
2234
|
-
onBlur:
|
|
2248
|
+
onInput: c,
|
|
2249
|
+
onFocus: y,
|
|
2250
|
+
onBlur: u
|
|
2235
2251
|
}, [
|
|
2236
|
-
h(
|
|
2237
|
-
], 40,
|
|
2252
|
+
h(v.$slots, "default", {}, void 0, !0)
|
|
2253
|
+
], 40, Ao),
|
|
2238
2254
|
N(R, {
|
|
2239
2255
|
class: "joy-select__chevron",
|
|
2240
2256
|
name: "chevron-down"
|
|
@@ -2243,7 +2259,7 @@ const be = /* @__PURE__ */ V(Ao, [["__scopeId", "data-v-5c4f6d7f"]]), Fo = ["id"
|
|
|
2243
2259
|
], 512));
|
|
2244
2260
|
}
|
|
2245
2261
|
});
|
|
2246
|
-
const
|
|
2262
|
+
const Do = /* @__PURE__ */ V(Fo, [["__scopeId", "data-v-18112ea4"]]), Ro = ["aria-disabled"], Mo = ["id", "value", "checked", "disabled", "required", "name"], No = /* @__PURE__ */ $({
|
|
2247
2263
|
__name: "VJoySelectableItem",
|
|
2248
2264
|
props: {
|
|
2249
2265
|
disabled: {
|
|
@@ -2279,16 +2295,16 @@ const Ro = /* @__PURE__ */ V(Do, [["__scopeId", "data-v-b1af08d1"]]), Mo = ["ari
|
|
|
2279
2295
|
}
|
|
2280
2296
|
},
|
|
2281
2297
|
emits: ["update:checked"],
|
|
2282
|
-
setup(e, { emit:
|
|
2283
|
-
const
|
|
2298
|
+
setup(e, { emit: l }) {
|
|
2299
|
+
const t = e, o = g(t.checked), n = g(), r = g(!1), s = t.multiple ? "div" : "label", i = {
|
|
2284
2300
|
onRadioChange: () => {
|
|
2285
|
-
|
|
2301
|
+
l("update:checked", t.value);
|
|
2286
2302
|
},
|
|
2287
2303
|
onClick: () => {
|
|
2288
|
-
|
|
2304
|
+
t.checked && !t.multiple && l("update:checked", "");
|
|
2289
2305
|
},
|
|
2290
|
-
onLabelClick: (
|
|
2291
|
-
|
|
2306
|
+
onLabelClick: (y) => {
|
|
2307
|
+
t.multiple || y.stopPropagation();
|
|
2292
2308
|
},
|
|
2293
2309
|
onFocus: () => {
|
|
2294
2310
|
r.value = !0;
|
|
@@ -2297,10 +2313,10 @@ const Ro = /* @__PURE__ */ V(Do, [["__scopeId", "data-v-b1af08d1"]]), Mo = ["ari
|
|
|
2297
2313
|
r.value = !1;
|
|
2298
2314
|
}
|
|
2299
2315
|
};
|
|
2300
|
-
function
|
|
2301
|
-
|
|
2316
|
+
function c(y) {
|
|
2317
|
+
l("update:checked", y);
|
|
2302
2318
|
}
|
|
2303
|
-
return (
|
|
2319
|
+
return (y, u) => (m(), p("div", {
|
|
2304
2320
|
class: w([
|
|
2305
2321
|
"joy-selectable-item__wrapper",
|
|
2306
2322
|
{
|
|
@@ -2309,13 +2325,13 @@ const Ro = /* @__PURE__ */ V(Do, [["__scopeId", "data-v-b1af08d1"]]), Mo = ["ari
|
|
|
2309
2325
|
]),
|
|
2310
2326
|
"aria-disabled": e.disabled,
|
|
2311
2327
|
onClick: u[4] || (u[4] = //@ts-ignore
|
|
2312
|
-
(...
|
|
2328
|
+
(...v) => i.onClick && i.onClick(...v))
|
|
2313
2329
|
}, [
|
|
2314
|
-
e.multiple ? _("", !0) : (
|
|
2330
|
+
e.multiple ? _("", !0) : (m(), p("input", {
|
|
2315
2331
|
key: 0,
|
|
2316
2332
|
id: e.id,
|
|
2317
2333
|
ref_key: "inputRadio",
|
|
2318
|
-
ref:
|
|
2334
|
+
ref: n,
|
|
2319
2335
|
type: "radio",
|
|
2320
2336
|
value: e.value,
|
|
2321
2337
|
checked: e.checked,
|
|
@@ -2323,13 +2339,13 @@ const Ro = /* @__PURE__ */ V(Do, [["__scopeId", "data-v-b1af08d1"]]), Mo = ["ari
|
|
|
2323
2339
|
required: e.required,
|
|
2324
2340
|
name: e.name,
|
|
2325
2341
|
onChange: u[0] || (u[0] = //@ts-ignore
|
|
2326
|
-
(...
|
|
2342
|
+
(...v) => i.onRadioChange && i.onRadioChange(...v)),
|
|
2327
2343
|
onFocus: u[1] || (u[1] = //@ts-ignore
|
|
2328
|
-
(...
|
|
2344
|
+
(...v) => i.onFocus && i.onFocus(...v)),
|
|
2329
2345
|
onBlur: u[2] || (u[2] = //@ts-ignore
|
|
2330
|
-
(...
|
|
2331
|
-
}, null, 40,
|
|
2332
|
-
(
|
|
2346
|
+
(...v) => i.onBlur && i.onBlur(...v))
|
|
2347
|
+
}, null, 40, Mo)),
|
|
2348
|
+
(m(), x(ce(k(s)), {
|
|
2333
2349
|
for: e.id,
|
|
2334
2350
|
class: w([
|
|
2335
2351
|
"joy-selectable-item",
|
|
@@ -2340,51 +2356,51 @@ const Ro = /* @__PURE__ */ V(Do, [["__scopeId", "data-v-b1af08d1"]]), Mo = ["ari
|
|
|
2340
2356
|
"joy-selectable-item--single": !e.multiple
|
|
2341
2357
|
}
|
|
2342
2358
|
]),
|
|
2343
|
-
onClick:
|
|
2359
|
+
onClick: i.onLabelClick
|
|
2344
2360
|
}, {
|
|
2345
2361
|
default: B(() => [
|
|
2346
|
-
e.multiple ? (
|
|
2362
|
+
e.multiple ? (m(), x(k(he), {
|
|
2347
2363
|
key: 0,
|
|
2348
2364
|
id: e.id,
|
|
2349
2365
|
checked: o.value,
|
|
2350
2366
|
"onUpdate:checked": [
|
|
2351
|
-
u[3] || (u[3] = (
|
|
2352
|
-
|
|
2367
|
+
u[3] || (u[3] = (v) => o.value = v),
|
|
2368
|
+
c
|
|
2353
2369
|
],
|
|
2354
2370
|
disabled: e.disabled,
|
|
2355
2371
|
value: e.value,
|
|
2356
2372
|
name: e.name,
|
|
2357
2373
|
"display-focus": !1,
|
|
2358
2374
|
required: e.required,
|
|
2359
|
-
onFocus:
|
|
2360
|
-
onBlur:
|
|
2375
|
+
onFocus: i.onFocus,
|
|
2376
|
+
onBlur: i.onBlur
|
|
2361
2377
|
}, {
|
|
2362
2378
|
default: B(() => [
|
|
2363
|
-
h(
|
|
2379
|
+
h(y.$slots, "default", {}, void 0, !0)
|
|
2364
2380
|
]),
|
|
2365
2381
|
_: 3
|
|
2366
2382
|
}, 8, ["id", "checked", "disabled", "value", "name", "required", "onFocus", "onBlur"])) : _("", !0),
|
|
2367
|
-
e.multiple ? _("", !0) : h(
|
|
2368
|
-
|
|
2369
|
-
class: w([{ "joy-selectable-item__sublabel":
|
|
2383
|
+
e.multiple ? _("", !0) : h(y.$slots, "default", { key: 1 }, void 0, !0),
|
|
2384
|
+
b("div", {
|
|
2385
|
+
class: w([{ "joy-selectable-item__sublabel": y.$slots["selectable-item-sublabel"] }])
|
|
2370
2386
|
}, [
|
|
2371
|
-
h(
|
|
2387
|
+
h(y.$slots, "selectable-item-sublabel", {}, void 0, !0)
|
|
2372
2388
|
], 2)
|
|
2373
2389
|
]),
|
|
2374
2390
|
_: 3
|
|
2375
2391
|
}, 8, ["for", "class", "onClick"]))
|
|
2376
|
-
], 10,
|
|
2392
|
+
], 10, Ro));
|
|
2377
2393
|
}
|
|
2378
2394
|
});
|
|
2379
|
-
const lt = /* @__PURE__ */ V(
|
|
2395
|
+
const lt = /* @__PURE__ */ V(No, [["__scopeId", "data-v-cb2531c0"]]), Ho = ["id"], Wo = /* @__PURE__ */ $({
|
|
2380
2396
|
__name: "VJoySelectableItemGroup",
|
|
2381
2397
|
props: {
|
|
2382
2398
|
options: {
|
|
2383
2399
|
type: Array,
|
|
2384
2400
|
required: !0,
|
|
2385
2401
|
validator(e) {
|
|
2386
|
-
const
|
|
2387
|
-
return
|
|
2402
|
+
const l = e.every((o) => Object.keys(o).includes("value")), t = e.every((o) => Object.keys(o).includes("label"));
|
|
2403
|
+
return l && t;
|
|
2388
2404
|
}
|
|
2389
2405
|
},
|
|
2390
2406
|
id: String,
|
|
@@ -2416,22 +2432,22 @@ const lt = /* @__PURE__ */ V(Ho, [["__scopeId", "data-v-cb2531c0"]]), Wo = ["id"
|
|
|
2416
2432
|
}
|
|
2417
2433
|
},
|
|
2418
2434
|
emits: ["update:value"],
|
|
2419
|
-
setup(e, { emit:
|
|
2420
|
-
const
|
|
2435
|
+
setup(e, { emit: l }) {
|
|
2436
|
+
const t = e;
|
|
2421
2437
|
function o(r) {
|
|
2422
|
-
return typeof
|
|
2438
|
+
return typeof t.value == "string" ? t.value === r.value : (t.value || []).includes(r.value);
|
|
2423
2439
|
}
|
|
2424
|
-
function
|
|
2425
|
-
if (!
|
|
2426
|
-
return
|
|
2427
|
-
let
|
|
2428
|
-
s && typeof s == "boolean" ?
|
|
2440
|
+
function n(r, s) {
|
|
2441
|
+
if (!t.multiple)
|
|
2442
|
+
return l("update:value", s);
|
|
2443
|
+
let i = [...t.value || []];
|
|
2444
|
+
s && typeof s == "boolean" ? i.push(r) : i.splice(i.indexOf(r), 1), l("update:value", i);
|
|
2429
2445
|
}
|
|
2430
|
-
return (r, s) => (
|
|
2446
|
+
return (r, s) => (m(), p("fieldset", {
|
|
2431
2447
|
id: e.id,
|
|
2432
2448
|
class: "joy-selectable-item-group__wrapper"
|
|
2433
2449
|
}, [
|
|
2434
|
-
e.label ? (
|
|
2450
|
+
e.label ? (m(), x(k(W), {
|
|
2435
2451
|
key: 0,
|
|
2436
2452
|
"tag-name": "legend",
|
|
2437
2453
|
required: e.required && e.requiredMark,
|
|
@@ -2443,7 +2459,7 @@ const lt = /* @__PURE__ */ V(Ho, [["__scopeId", "data-v-cb2531c0"]]), Wo = ["id"
|
|
|
2443
2459
|
]),
|
|
2444
2460
|
_: 1
|
|
2445
2461
|
}, 8, ["required", "optional-label", "size"])) : _("", !0),
|
|
2446
|
-
|
|
2462
|
+
b("div", {
|
|
2447
2463
|
class: w([
|
|
2448
2464
|
"joy-selectable-item-group",
|
|
2449
2465
|
{
|
|
@@ -2453,34 +2469,34 @@ const lt = /* @__PURE__ */ V(Ho, [["__scopeId", "data-v-cb2531c0"]]), Wo = ["id"
|
|
|
2453
2469
|
}
|
|
2454
2470
|
])
|
|
2455
2471
|
}, [
|
|
2456
|
-
(
|
|
2457
|
-
id:
|
|
2458
|
-
key:
|
|
2459
|
-
name:
|
|
2460
|
-
disabled:
|
|
2461
|
-
value:
|
|
2472
|
+
(m(!0), p(fe, null, ye(e.options, (i) => (m(), x(k(lt), {
|
|
2473
|
+
id: i.id,
|
|
2474
|
+
key: i.id,
|
|
2475
|
+
name: i.name,
|
|
2476
|
+
disabled: i.disabled,
|
|
2477
|
+
value: i.value,
|
|
2462
2478
|
multiple: e.multiple,
|
|
2463
|
-
checked: o(
|
|
2464
|
-
"onUpdate:checked": (
|
|
2479
|
+
checked: o(i),
|
|
2480
|
+
"onUpdate:checked": (c) => n(i.value, c)
|
|
2465
2481
|
}, We({
|
|
2466
2482
|
default: B(() => [
|
|
2467
|
-
C(I(
|
|
2483
|
+
C(I(i.label) + " ", 1)
|
|
2468
2484
|
]),
|
|
2469
2485
|
_: 2
|
|
2470
2486
|
}, [
|
|
2471
|
-
|
|
2487
|
+
i.subLabel ? {
|
|
2472
2488
|
name: "selectable-item-sublabel",
|
|
2473
2489
|
fn: B(() => [
|
|
2474
|
-
C(I(
|
|
2490
|
+
C(I(i.subLabel), 1)
|
|
2475
2491
|
]),
|
|
2476
2492
|
key: "0"
|
|
2477
2493
|
} : void 0
|
|
2478
2494
|
]), 1032, ["id", "name", "disabled", "value", "multiple", "checked", "onUpdate:checked"]))), 128))
|
|
2479
2495
|
], 2)
|
|
2480
|
-
], 8,
|
|
2496
|
+
], 8, Ho));
|
|
2481
2497
|
}
|
|
2482
2498
|
});
|
|
2483
|
-
const
|
|
2499
|
+
const Uo = /* @__PURE__ */ V(Wo, [["__scopeId", "data-v-0730aed0"]]), Go = /* @__PURE__ */ $({
|
|
2484
2500
|
__name: "VJoyWrapper",
|
|
2485
2501
|
props: {
|
|
2486
2502
|
/** Horizontal spread. Refers to CSS flex justify-content. */
|
|
@@ -2514,7 +2530,7 @@ const Go = /* @__PURE__ */ V(Uo, [["__scopeId", "data-v-0730aed0"]]), Ko = /* @_
|
|
|
2514
2530
|
}
|
|
2515
2531
|
},
|
|
2516
2532
|
setup(e) {
|
|
2517
|
-
return ct("VJoyWrapperContext", e), (
|
|
2533
|
+
return ct("VJoyWrapperContext", e), (t, o) => (m(), p("div", {
|
|
2518
2534
|
class: w([
|
|
2519
2535
|
"joy-wrapper",
|
|
2520
2536
|
`joy-wrapper--justify-${e.justify}`,
|
|
@@ -2525,32 +2541,32 @@ const Go = /* @__PURE__ */ V(Uo, [["__scopeId", "data-v-0730aed0"]]), Ko = /* @_
|
|
|
2525
2541
|
{ "joy-wrapper--has-margin": !e.noMargin }
|
|
2526
2542
|
])
|
|
2527
2543
|
}, [
|
|
2528
|
-
h(
|
|
2544
|
+
h(t.$slots, "default", {}, void 0, !0)
|
|
2529
2545
|
], 2));
|
|
2530
2546
|
}
|
|
2531
2547
|
});
|
|
2532
|
-
const
|
|
2548
|
+
const Ko = /* @__PURE__ */ V(Go, [["__scopeId", "data-v-e2f29698"]]), Qo = { class: "joy-template__wrapper" }, Zo = {
|
|
2533
2549
|
key: 0,
|
|
2534
2550
|
class: "joy-template__heading"
|
|
2535
|
-
},
|
|
2551
|
+
}, Yo = {
|
|
2536
2552
|
key: 0,
|
|
2537
2553
|
class: "joy-template-slot-back"
|
|
2538
|
-
},
|
|
2554
|
+
}, Xo = { class: "joy-template__heading___headings" }, en = {
|
|
2539
2555
|
key: 0,
|
|
2540
2556
|
class: "joy-template-slot-title"
|
|
2541
|
-
},
|
|
2557
|
+
}, tn = {
|
|
2542
2558
|
key: 1,
|
|
2543
2559
|
class: "joy-template-slot-subtitle"
|
|
2544
|
-
},
|
|
2560
|
+
}, ln = {
|
|
2545
2561
|
key: 1,
|
|
2546
2562
|
class: "joy-template-slot-actions"
|
|
2547
|
-
},
|
|
2563
|
+
}, on = {
|
|
2548
2564
|
key: 0,
|
|
2549
2565
|
class: "joy-template-slot-main"
|
|
2550
|
-
},
|
|
2566
|
+
}, nn = {
|
|
2551
2567
|
key: 1,
|
|
2552
2568
|
class: "joy-template-slot-sidebar"
|
|
2553
|
-
},
|
|
2569
|
+
}, an = /* @__PURE__ */ $({
|
|
2554
2570
|
__name: "VJoyTemplate",
|
|
2555
2571
|
props: {
|
|
2556
2572
|
full: { type: Boolean, default: !1 },
|
|
@@ -2565,63 +2581,63 @@ const Qo = /* @__PURE__ */ V(Ko, [["__scopeId", "data-v-e2f29698"]]), Zo = { cla
|
|
|
2565
2581
|
}
|
|
2566
2582
|
},
|
|
2567
2583
|
setup(e) {
|
|
2568
|
-
const
|
|
2569
|
-
return (
|
|
2584
|
+
const l = e, t = G(), o = L(() => !!t["template-back"] || !!t["template-title"] || !!t["template-subtitle"] || !!t["template-actions"]);
|
|
2585
|
+
return (n, r) => (m(), p("main", {
|
|
2570
2586
|
class: w(["joy-template", { "joy-template--full": e.full, "joy-template--loading": e.loading }])
|
|
2571
2587
|
}, [
|
|
2572
|
-
|
|
2573
|
-
o.value ? (
|
|
2574
|
-
k(
|
|
2575
|
-
h(
|
|
2588
|
+
b("div", Qo, [
|
|
2589
|
+
o.value ? (m(), p("div", Zo, [
|
|
2590
|
+
k(t)["template-back"] ? (m(), p("div", Yo, [
|
|
2591
|
+
h(n.$slots, "template-back", {}, void 0, !0)
|
|
2576
2592
|
])) : _("", !0),
|
|
2577
|
-
|
|
2578
|
-
k(
|
|
2579
|
-
h(
|
|
2593
|
+
b("div", Xo, [
|
|
2594
|
+
k(t)["template-title"] ? (m(), p("div", en, [
|
|
2595
|
+
h(n.$slots, "template-title", {}, void 0, !0)
|
|
2580
2596
|
])) : _("", !0),
|
|
2581
|
-
k(
|
|
2582
|
-
h(
|
|
2597
|
+
k(t)["template-subtitle"] ? (m(), p("div", tn, [
|
|
2598
|
+
h(n.$slots, "template-subtitle", {}, void 0, !0)
|
|
2583
2599
|
])) : _("", !0)
|
|
2584
2600
|
]),
|
|
2585
|
-
k(
|
|
2586
|
-
h(
|
|
2601
|
+
k(t)["template-actions"] ? (m(), p("div", ln, [
|
|
2602
|
+
h(n.$slots, "template-actions", {}, void 0, !0)
|
|
2587
2603
|
])) : _("", !0)
|
|
2588
2604
|
])) : _("", !0),
|
|
2589
|
-
|
|
2605
|
+
b("div", {
|
|
2590
2606
|
class: w([
|
|
2591
2607
|
"joy-template__content",
|
|
2592
2608
|
{
|
|
2593
|
-
"joy-template__content--reverse":
|
|
2609
|
+
"joy-template__content--reverse": l.sidebar === "left"
|
|
2594
2610
|
}
|
|
2595
2611
|
])
|
|
2596
2612
|
}, [
|
|
2597
|
-
|
|
2598
|
-
h(
|
|
2613
|
+
n.$slots["template-main"] ? (m(), p("div", on, [
|
|
2614
|
+
h(n.$slots, "template-main", {}, void 0, !0)
|
|
2599
2615
|
])) : _("", !0),
|
|
2600
|
-
|
|
2601
|
-
h(
|
|
2616
|
+
n.$slots["template-sidebar"] ? (m(), p("div", nn, [
|
|
2617
|
+
h(n.$slots, "template-sidebar", {}, void 0, !0)
|
|
2602
2618
|
])) : _("", !0)
|
|
2603
2619
|
], 2)
|
|
2604
2620
|
]),
|
|
2605
|
-
e.loading ? (
|
|
2621
|
+
e.loading ? (m(), x(be, {
|
|
2606
2622
|
key: 0,
|
|
2607
2623
|
overlay: "",
|
|
2608
2624
|
color: e.loadingColor
|
|
2609
2625
|
}, {
|
|
2610
2626
|
content: B(() => [
|
|
2611
|
-
h(
|
|
2627
|
+
h(n.$slots, "template-loader-content", {}, void 0, !0)
|
|
2612
2628
|
]),
|
|
2613
2629
|
_: 3
|
|
2614
2630
|
}, 8, ["color"])) : _("", !0)
|
|
2615
2631
|
], 2));
|
|
2616
2632
|
}
|
|
2617
2633
|
});
|
|
2618
|
-
const
|
|
2634
|
+
const rn = /* @__PURE__ */ V(an, [["__scopeId", "data-v-a2355e4b"]]), sn = ["aria-disabled"], un = { class: "joy-textarea_wrapper" }, dn = ["id", "disabled", "name", "required", "minlength", "value"], cn = {
|
|
2619
2635
|
key: 0,
|
|
2620
2636
|
class: "joy-textarea_helpers"
|
|
2621
|
-
},
|
|
2637
|
+
}, fn = {
|
|
2622
2638
|
inheritAttrs: !1
|
|
2623
|
-
},
|
|
2624
|
-
...
|
|
2639
|
+
}, yn = /* @__PURE__ */ $({
|
|
2640
|
+
...fn,
|
|
2625
2641
|
__name: "VJoyTextarea",
|
|
2626
2642
|
props: {
|
|
2627
2643
|
disabled: {
|
|
@@ -2669,25 +2685,25 @@ const sn = /* @__PURE__ */ V(rn, [["__scopeId", "data-v-a2355e4b"]]), un = ["ari
|
|
|
2669
2685
|
}
|
|
2670
2686
|
},
|
|
2671
2687
|
emits: ["update:modelValue"],
|
|
2672
|
-
setup(e, { expose:
|
|
2673
|
-
const o = e,
|
|
2674
|
-
element: o.autogrow ?
|
|
2675
|
-
}), s =
|
|
2676
|
-
onInput: (
|
|
2677
|
-
|
|
2688
|
+
setup(e, { expose: l, emit: t }) {
|
|
2689
|
+
const o = e, n = g(), { triggerResize: r } = Xt({
|
|
2690
|
+
element: o.autogrow ? n : void 0
|
|
2691
|
+
}), s = g(!1), i = g(!1), c = L(() => o.maxlength ? o.modelValue.length > o.maxlength : !1), y = L(() => o.minlength ? o.modelValue.length < o.minlength : !1), u = {
|
|
2692
|
+
onInput: (v) => {
|
|
2693
|
+
t("update:modelValue", v.target.value), r();
|
|
2678
2694
|
},
|
|
2679
2695
|
onBlur: () => {
|
|
2680
|
-
|
|
2696
|
+
i.value = !1, s.value = c.value || y.value;
|
|
2681
2697
|
},
|
|
2682
2698
|
onFocus: () => {
|
|
2683
|
-
|
|
2699
|
+
i.value = !0;
|
|
2684
2700
|
}
|
|
2685
2701
|
};
|
|
2686
|
-
return
|
|
2702
|
+
return l({
|
|
2687
2703
|
isInvalid: s,
|
|
2688
|
-
valueOverMaxlength:
|
|
2689
|
-
valueUnderMinlength:
|
|
2690
|
-
}), (
|
|
2704
|
+
valueOverMaxlength: c,
|
|
2705
|
+
valueUnderMinlength: y
|
|
2706
|
+
}), (v, a) => (m(), p("div", {
|
|
2691
2707
|
"aria-disabled": e.disabled,
|
|
2692
2708
|
class: w([
|
|
2693
2709
|
"joy-textarea",
|
|
@@ -2695,7 +2711,7 @@ const sn = /* @__PURE__ */ V(rn, [["__scopeId", "data-v-a2355e4b"]]), un = ["ari
|
|
|
2695
2711
|
"joy-textarea_invalid": s.value || e.invalid,
|
|
2696
2712
|
"joy-textarea_disabled": e.disabled,
|
|
2697
2713
|
"joy-textarea_autogrow": e.autogrow,
|
|
2698
|
-
"joy-textarea_focusing":
|
|
2714
|
+
"joy-textarea_focusing": i.value
|
|
2699
2715
|
}
|
|
2700
2716
|
])
|
|
2701
2717
|
}, [
|
|
@@ -2706,37 +2722,37 @@ const sn = /* @__PURE__ */ V(rn, [["__scopeId", "data-v-a2355e4b"]]), un = ["ari
|
|
|
2706
2722
|
size: e.labelSize
|
|
2707
2723
|
}, {
|
|
2708
2724
|
default: B(() => [
|
|
2709
|
-
h(
|
|
2725
|
+
h(v.$slots, "default", {}, () => [
|
|
2710
2726
|
C(I(e.label), 1)
|
|
2711
2727
|
], !0)
|
|
2712
2728
|
]),
|
|
2713
2729
|
_: 3
|
|
2714
2730
|
}, 8, ["for", "required", "optional-label", "size"]),
|
|
2715
|
-
|
|
2716
|
-
|
|
2731
|
+
b("div", un, [
|
|
2732
|
+
b("textarea", Y(v.$attrs, {
|
|
2717
2733
|
id: e.id,
|
|
2718
2734
|
ref_key: "textarea",
|
|
2719
|
-
ref:
|
|
2735
|
+
ref: n,
|
|
2720
2736
|
class: "joy-native-textarea",
|
|
2721
2737
|
disabled: e.disabled,
|
|
2722
2738
|
name: e.name,
|
|
2723
2739
|
required: e.required,
|
|
2724
2740
|
minlength: e.minlength,
|
|
2725
2741
|
value: e.modelValue,
|
|
2726
|
-
onInput:
|
|
2727
|
-
(...
|
|
2728
|
-
onFocus:
|
|
2729
|
-
(...
|
|
2730
|
-
onBlur:
|
|
2731
|
-
(...
|
|
2732
|
-
}), null, 16,
|
|
2742
|
+
onInput: a[0] || (a[0] = //@ts-ignore
|
|
2743
|
+
(...f) => u.onInput && u.onInput(...f)),
|
|
2744
|
+
onFocus: a[1] || (a[1] = //@ts-ignore
|
|
2745
|
+
(...f) => u.onFocus && u.onFocus(...f)),
|
|
2746
|
+
onBlur: a[2] || (a[2] = //@ts-ignore
|
|
2747
|
+
(...f) => u.onBlur && u.onBlur(...f))
|
|
2748
|
+
}), null, 16, dn)
|
|
2733
2749
|
]),
|
|
2734
|
-
e.minlength || e.maxlength ? (
|
|
2735
|
-
e.minlength ? (
|
|
2750
|
+
e.minlength || e.maxlength ? (m(), p("div", cn, [
|
|
2751
|
+
e.minlength ? (m(), p("p", {
|
|
2736
2752
|
key: 0,
|
|
2737
2753
|
class: w(["joy-textarea-min", { "joy-textarea-min-invalid": e.invalid }])
|
|
2738
2754
|
}, [
|
|
2739
|
-
|
|
2755
|
+
y.value ? _("", !0) : (m(), x(R, {
|
|
2740
2756
|
key: 0,
|
|
2741
2757
|
name: "check",
|
|
2742
2758
|
color: "neutral",
|
|
@@ -2744,28 +2760,28 @@ const sn = /* @__PURE__ */ V(rn, [["__scopeId", "data-v-a2355e4b"]]), un = ["ari
|
|
|
2744
2760
|
})),
|
|
2745
2761
|
C(" " + I(e.minlengthLabel || `Minimum ${e.minlength} characters`), 1)
|
|
2746
2762
|
], 2)) : _("", !0),
|
|
2747
|
-
e.maxlength ? (
|
|
2763
|
+
e.maxlength ? (m(), p("p", {
|
|
2748
2764
|
key: 1,
|
|
2749
|
-
class: w(["joy-textarea-count", { "joy-textarea-count-invalid":
|
|
2765
|
+
class: w(["joy-textarea-count", { "joy-textarea-count-invalid": c.value }])
|
|
2750
2766
|
}, I(e.modelValue.length + "/" + e.maxlength), 3)) : _("", !0)
|
|
2751
2767
|
])) : _("", !0)
|
|
2752
|
-
], 10,
|
|
2768
|
+
], 10, sn));
|
|
2753
2769
|
}
|
|
2754
2770
|
});
|
|
2755
|
-
const
|
|
2756
|
-
/* @__PURE__ */
|
|
2771
|
+
const vn = /* @__PURE__ */ V(yn, [["__scopeId", "data-v-d0d2c93e"]]), ot = (e) => (ft("data-v-cf79d999"), e = e(), yt(), e), mn = { class: "joy-toggle__wrapper" }, pn = ["name", "disabled", "checked", "required", "aria-checked", "value"], hn = { class: "joy-toggle__content" }, gn = /* @__PURE__ */ ot(() => /* @__PURE__ */ b("span", { class: "joy-toggle__symbol" }, null, -1)), bn = { class: "joy-toggle__content-label" }, _n = /* @__PURE__ */ ot(() => /* @__PURE__ */ b("span", { class: "joy-toggle__smile" }, [
|
|
2772
|
+
/* @__PURE__ */ b("svg", {
|
|
2757
2773
|
width: "18",
|
|
2758
2774
|
height: "10",
|
|
2759
2775
|
viewBox: "0 0 18 10",
|
|
2760
2776
|
fill: "currentColor",
|
|
2761
2777
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2762
2778
|
}, [
|
|
2763
|
-
/* @__PURE__ */
|
|
2779
|
+
/* @__PURE__ */ b("path", {
|
|
2764
2780
|
d: "M9.0237 9.14856C15.7144 9.14856 17.8736 2.22231 17.9649 1.91853L17.9345 1.94891C18.1778 1.15908 17.7216 0.308485 16.9309 0.0654591C16.1402 -0.177566 15.2886 0.278108 15.0453 1.06794C14.9845 1.25021 13.5551 6.11073 8.99328 6.11073C4.43147 6.11073 3.03249 1.43248 2.97167 1.21983C2.75878 0.399622 1.90724 -0.0560541 1.11652 0.156593C0.295397 0.369241 -0.160787 1.18945 0.0520982 2.00967C0.721165 4.4703 3.48869 9.14856 9.0237 9.14856Z",
|
|
2765
2781
|
fill: "currentColor"
|
|
2766
2782
|
})
|
|
2767
2783
|
])
|
|
2768
|
-
], -1)),
|
|
2784
|
+
], -1)), wn = /* @__PURE__ */ $({
|
|
2769
2785
|
__name: "VJoyToggle",
|
|
2770
2786
|
props: {
|
|
2771
2787
|
modelValue: {
|
|
@@ -2798,31 +2814,31 @@ const mn = /* @__PURE__ */ V(vn, [["__scopeId", "data-v-d0d2c93e"]]), ot = (e) =
|
|
|
2798
2814
|
label: String
|
|
2799
2815
|
},
|
|
2800
2816
|
emits: ["update:modelValue"],
|
|
2801
|
-
setup(e, { emit:
|
|
2802
|
-
const
|
|
2803
|
-
onChange: (
|
|
2804
|
-
const r =
|
|
2805
|
-
|
|
2817
|
+
setup(e, { emit: l }) {
|
|
2818
|
+
const t = g(!1), o = {
|
|
2819
|
+
onChange: (n) => {
|
|
2820
|
+
const r = n.target.checked;
|
|
2821
|
+
l("update:modelValue", r);
|
|
2806
2822
|
},
|
|
2807
2823
|
onFocus: () => {
|
|
2808
|
-
|
|
2824
|
+
t.value = !0;
|
|
2809
2825
|
},
|
|
2810
2826
|
onBlur: () => {
|
|
2811
|
-
|
|
2827
|
+
t.value = !1;
|
|
2812
2828
|
}
|
|
2813
2829
|
};
|
|
2814
|
-
return (
|
|
2815
|
-
|
|
2830
|
+
return (n, r) => (m(), p("div", mn, [
|
|
2831
|
+
b("label", {
|
|
2816
2832
|
class: w([
|
|
2817
2833
|
"joy-toggle",
|
|
2818
2834
|
{
|
|
2819
2835
|
"joy-toggle__checked": e.modelValue,
|
|
2820
2836
|
"joy-toggle__disabled": e.disabled,
|
|
2821
|
-
"joy-toggle__focusing":
|
|
2837
|
+
"joy-toggle__focusing": t.value
|
|
2822
2838
|
}
|
|
2823
2839
|
])
|
|
2824
2840
|
}, [
|
|
2825
|
-
|
|
2841
|
+
b("input", {
|
|
2826
2842
|
ref: "input",
|
|
2827
2843
|
type: "checkbox",
|
|
2828
2844
|
class: "joy-toggle__input",
|
|
@@ -2839,21 +2855,21 @@ const mn = /* @__PURE__ */ V(vn, [["__scopeId", "data-v-d0d2c93e"]]), ot = (e) =
|
|
|
2839
2855
|
(...s) => o.onFocus && o.onFocus(...s)),
|
|
2840
2856
|
onBlur: r[2] || (r[2] = //@ts-ignore
|
|
2841
2857
|
(...s) => o.onBlur && o.onBlur(...s))
|
|
2842
|
-
}, null, 40,
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
h(
|
|
2858
|
+
}, null, 40, pn),
|
|
2859
|
+
b("p", hn, [
|
|
2860
|
+
gn,
|
|
2861
|
+
b("span", bn, [
|
|
2862
|
+
h(n.$slots, "default", {}, () => [
|
|
2847
2863
|
C(I(e.label), 1)
|
|
2848
2864
|
], !0)
|
|
2849
2865
|
]),
|
|
2850
|
-
|
|
2866
|
+
_n
|
|
2851
2867
|
])
|
|
2852
2868
|
], 2)
|
|
2853
2869
|
]));
|
|
2854
2870
|
}
|
|
2855
2871
|
});
|
|
2856
|
-
const
|
|
2872
|
+
const Sn = /* @__PURE__ */ V(wn, [["__scopeId", "data-v-cf79d999"]]), jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2857
2873
|
__proto__: null,
|
|
2858
2874
|
VJoyBadge: pt,
|
|
2859
2875
|
VJoyButton: Ue,
|
|
@@ -2864,32 +2880,32 @@ const jn = /* @__PURE__ */ V(Sn, [["__scopeId", "data-v-cf79d999"]]), kn = /* @_
|
|
|
2864
2880
|
VJoyFormError: tt,
|
|
2865
2881
|
VJoyHighlight: Gl,
|
|
2866
2882
|
VJoyIcon: R,
|
|
2867
|
-
VJoyInput:
|
|
2883
|
+
VJoyInput: oo,
|
|
2868
2884
|
VJoyLabel: W,
|
|
2869
|
-
VJoyLink:
|
|
2870
|
-
VJoyMultiCheckbox:
|
|
2871
|
-
VJoyPanel:
|
|
2872
|
-
VJoyPanelSection:
|
|
2873
|
-
VJoyRadio:
|
|
2874
|
-
VJoyRadioGroup:
|
|
2885
|
+
VJoyLink: ro,
|
|
2886
|
+
VJoyMultiCheckbox: fo,
|
|
2887
|
+
VJoyPanel: wo,
|
|
2888
|
+
VJoyPanelSection: Vo,
|
|
2889
|
+
VJoyRadio: Eo,
|
|
2890
|
+
VJoyRadioGroup: Po,
|
|
2875
2891
|
VJoyScreenLoader: be,
|
|
2876
|
-
VJoySelect:
|
|
2892
|
+
VJoySelect: Do,
|
|
2877
2893
|
VJoySelectableItem: lt,
|
|
2878
|
-
VJoySelectableItemGroup:
|
|
2894
|
+
VJoySelectableItemGroup: Uo,
|
|
2879
2895
|
VJoySpinner: pe,
|
|
2880
|
-
VJoyTemplate:
|
|
2881
|
-
VJoyTextarea:
|
|
2882
|
-
VJoyToggle:
|
|
2883
|
-
VJoyWrapper:
|
|
2884
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2896
|
+
VJoyTemplate: rn,
|
|
2897
|
+
VJoyTextarea: vn,
|
|
2898
|
+
VJoyToggle: Sn,
|
|
2899
|
+
VJoyWrapper: Ko
|
|
2900
|
+
}, Symbol.toStringTag, { value: "Module" })), $n = {
|
|
2885
2901
|
install: (e) => {
|
|
2886
|
-
Object.entries(
|
|
2887
|
-
e.component(
|
|
2902
|
+
Object.entries(jn).forEach(([l, t]) => {
|
|
2903
|
+
e.component(l, t);
|
|
2888
2904
|
});
|
|
2889
2905
|
}
|
|
2890
2906
|
};
|
|
2891
2907
|
export {
|
|
2892
|
-
|
|
2908
|
+
$n as JoyVuePlugin,
|
|
2893
2909
|
pt as VJoyBadge,
|
|
2894
2910
|
Ue as VJoyButton,
|
|
2895
2911
|
he as VJoyCheckbox,
|
|
@@ -2899,21 +2915,21 @@ export {
|
|
|
2899
2915
|
tt as VJoyFormError,
|
|
2900
2916
|
Gl as VJoyHighlight,
|
|
2901
2917
|
R as VJoyIcon,
|
|
2902
|
-
|
|
2918
|
+
oo as VJoyInput,
|
|
2903
2919
|
W as VJoyLabel,
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2920
|
+
ro as VJoyLink,
|
|
2921
|
+
fo as VJoyMultiCheckbox,
|
|
2922
|
+
wo as VJoyPanel,
|
|
2923
|
+
Vo as VJoyPanelSection,
|
|
2924
|
+
Eo as VJoyRadio,
|
|
2925
|
+
Po as VJoyRadioGroup,
|
|
2910
2926
|
be as VJoyScreenLoader,
|
|
2911
|
-
|
|
2927
|
+
Do as VJoySelect,
|
|
2912
2928
|
lt as VJoySelectableItem,
|
|
2913
|
-
|
|
2929
|
+
Uo as VJoySelectableItemGroup,
|
|
2914
2930
|
pe as VJoySpinner,
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2931
|
+
rn as VJoyTemplate,
|
|
2932
|
+
vn as VJoyTextarea,
|
|
2933
|
+
Sn as VJoyToggle,
|
|
2934
|
+
Ko as VJoyWrapper
|
|
2919
2935
|
};
|