@maltjoy/core-vue 1.0.0-alpha.7 → 1.0.0-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/components/JoyInput/JoyInput.vue.d.ts +2 -0
- package/dist/components/JoyMultiCheckbox/JoyMultiCheckbox.vue.d.ts +4 -2
- package/dist/components/JoyPanel/JoyPanel.types.d.ts +3 -0
- package/dist/components/JoyPanel/JoyPanel.vue.d.ts +43 -0
- package/dist/components/JoyPanelSection/JoyPanelSection.vue.d.ts +10 -0
- package/dist/components/JoyRadio/JoyRadio.vue.d.ts +6 -2
- package/dist/components/JoySelect/JoySelect.vue.d.ts +4 -2
- package/dist/components/JoySelectableItem/JoySelectableItem.vue.d.ts +6 -2
- package/dist/components/JoySelectableItemGroup/JoySelectableItemGroup.vue.d.ts +4 -2
- package/dist/components/JoyTextarea/JoyTextarea.vue.d.ts +4 -2
- package/dist/components/index.d.ts +3 -1
- package/dist/joy-vue.js +537 -432
- package/dist/joy-vue.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/joy-components.d.ts +2 -0
- package/package.json +16 -16
package/dist/joy-vue.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as p, openBlock as o, createElementBlock as d, normalizeClass as b, useAttrs as O, computed as V, createBlock as J, resolveDynamicComponent as z, unref as m, withCtx as q, createCommentVNode as y, createElementVNode as u, renderSlot as c, ref as S, createTextVNode as B, toDisplayString as $, mergeProps as L, createVNode as R, pushScopeId as M, popScopeId as E, useSlots as C, onBeforeMount as W, Fragment as A, renderList as F, normalizeStyle as D, onMounted as N, watch as K, createSlots as Z } from "vue";
|
|
2
|
+
const Q = ["teal", "white"], X = /* @__PURE__ */ p({
|
|
3
3
|
__name: "JoySpinner",
|
|
4
4
|
props: {
|
|
5
5
|
color: {
|
|
6
6
|
type: String,
|
|
7
7
|
validator(e) {
|
|
8
|
-
return
|
|
8
|
+
return Q.includes(e);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
setup(e) {
|
|
13
|
-
return (
|
|
14
|
-
class:
|
|
13
|
+
return (l, a) => (o(), d("div", {
|
|
14
|
+
class: b(["joy-spinner", `joy-spinner_${e.color}`])
|
|
15
15
|
}, null, 2));
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
const
|
|
18
|
+
const _ = (e, l) => {
|
|
19
19
|
const a = e.__vccOpts || e;
|
|
20
|
-
for (const [t,
|
|
21
|
-
a[t] =
|
|
20
|
+
for (const [t, i] of l)
|
|
21
|
+
a[t] = i;
|
|
22
22
|
return a;
|
|
23
|
-
},
|
|
23
|
+
}, P = /* @__PURE__ */ _(X, [["__scopeId", "data-v-b633f633"]]), Y = ["primary", "secondary"], ee = ["neutral", "success", "info", "warning", "error"], te = ["main", "admin", "ghost"], ae = [...Y, ...te], le = ["large", "medium", "small", "xsmall", "xxsmall"], ne = ["xxsmall", "xsmall", "small"], oe = ["name", "size"], ie = { class: "joy-button--slot" }, de = /* @__PURE__ */ p({
|
|
24
24
|
__name: "JoyButton",
|
|
25
25
|
props: {
|
|
26
26
|
/**
|
|
@@ -43,7 +43,7 @@ const j = (e, n) => {
|
|
|
43
43
|
type: String,
|
|
44
44
|
default: "primary",
|
|
45
45
|
validator(e) {
|
|
46
|
-
return
|
|
46
|
+
return ae.includes(e);
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
/** Button or Link size */
|
|
@@ -51,7 +51,7 @@ const j = (e, n) => {
|
|
|
51
51
|
type: String,
|
|
52
52
|
default: "medium",
|
|
53
53
|
validator(e) {
|
|
54
|
-
return
|
|
54
|
+
return le.includes(e);
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
/** Override the icon size. Default to xsmall */
|
|
@@ -59,15 +59,15 @@ const j = (e, n) => {
|
|
|
59
59
|
type: String,
|
|
60
60
|
default: "xsmall",
|
|
61
61
|
validator(e) {
|
|
62
|
-
return
|
|
62
|
+
return ne.includes(e);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
setup(e) {
|
|
67
|
-
const
|
|
68
|
-
return (
|
|
69
|
-
disabled: e.loading ||
|
|
70
|
-
class:
|
|
67
|
+
const l = e, a = O(), t = V(() => ["white", "ghost", "secondary"].includes(l.variant) ? "teal" : "white");
|
|
68
|
+
return (i, s) => (o(), J(z(m(a).href ? "a" : "button"), {
|
|
69
|
+
disabled: e.loading || m(a).disabled,
|
|
70
|
+
class: b([
|
|
71
71
|
"joy-button",
|
|
72
72
|
`joy-button_${e.variant}`,
|
|
73
73
|
`joy-button_${e.size}`,
|
|
@@ -78,25 +78,25 @@ const j = (e, n) => {
|
|
|
78
78
|
])
|
|
79
79
|
}, {
|
|
80
80
|
default: q(() => [
|
|
81
|
-
e.icon ? (
|
|
81
|
+
e.icon ? (o(), d("joy-icon", {
|
|
82
82
|
key: 0,
|
|
83
83
|
name: e.icon,
|
|
84
84
|
size: e.iconSize,
|
|
85
85
|
lazy: !1
|
|
86
|
-
}, null, 8,
|
|
87
|
-
e.loading ? (
|
|
86
|
+
}, null, 8, oe)) : y("", !0),
|
|
87
|
+
e.loading ? (o(), J(P, {
|
|
88
88
|
key: 1,
|
|
89
|
-
color:
|
|
90
|
-
}, null, 8, ["color"])) :
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
color: m(t)
|
|
90
|
+
}, null, 8, ["color"])) : y("", !0),
|
|
91
|
+
u("span", ie, [
|
|
92
|
+
c(i.$slots, "default", {}, void 0, !0)
|
|
93
93
|
])
|
|
94
94
|
]),
|
|
95
95
|
_: 3
|
|
96
96
|
}, 8, ["disabled", "class"]));
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
const
|
|
99
|
+
const ue = /* @__PURE__ */ _(de, [["__scopeId", "data-v-958cc680"]]), se = ["aria-checked", "aria-hidden"], re = ["id", "name", "disabled", "checked", "required", "aria-checked", "value", "indeterminate"], ce = { class: "joy-checkbox__content-wrapper" }, ye = { class: "joy-checkbox__content" }, me = /* @__PURE__ */ p({
|
|
100
100
|
__name: "JoyCheckbox",
|
|
101
101
|
props: {
|
|
102
102
|
/** Can't be used in addition of v-model. See usage : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes */
|
|
@@ -135,21 +135,21 @@ const de = /* @__PURE__ */ j(oe, [["__scopeId", "data-v-958cc680"]]), ue = ["ari
|
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
137
|
emits: ["update:checked"],
|
|
138
|
-
setup(e, { expose:
|
|
139
|
-
const t = e,
|
|
140
|
-
onChange: (
|
|
141
|
-
const
|
|
142
|
-
s.value = !1, a("update:checked",
|
|
138
|
+
setup(e, { expose: l, emit: a }) {
|
|
139
|
+
const t = e, i = S(), s = S(t.indeterminate), f = {
|
|
140
|
+
onChange: (n) => {
|
|
141
|
+
const r = n.target.checked;
|
|
142
|
+
s.value = !1, a("update:checked", r);
|
|
143
143
|
}
|
|
144
144
|
};
|
|
145
|
-
return
|
|
145
|
+
return l({
|
|
146
146
|
isIndeterminate: s
|
|
147
|
-
}), (
|
|
147
|
+
}), (n, r) => (o(), d("div", {
|
|
148
148
|
"aria-checked": e.checked,
|
|
149
149
|
"aria-hidden": e.disabled
|
|
150
150
|
}, [
|
|
151
|
-
|
|
152
|
-
class:
|
|
151
|
+
u("label", {
|
|
152
|
+
class: b([
|
|
153
153
|
"joy-checkbox",
|
|
154
154
|
{
|
|
155
155
|
"joy-checkbox__checked": e.checked,
|
|
@@ -157,10 +157,10 @@ const de = /* @__PURE__ */ j(oe, [["__scopeId", "data-v-958cc680"]]), ue = ["ari
|
|
|
157
157
|
}
|
|
158
158
|
])
|
|
159
159
|
}, [
|
|
160
|
-
|
|
160
|
+
u("input", {
|
|
161
161
|
id: e.id,
|
|
162
162
|
ref_key: "input",
|
|
163
|
-
ref:
|
|
163
|
+
ref: i,
|
|
164
164
|
type: "checkbox",
|
|
165
165
|
class: "joy-checkbox__input",
|
|
166
166
|
role: "checkbox",
|
|
@@ -171,37 +171,37 @@ const de = /* @__PURE__ */ j(oe, [["__scopeId", "data-v-958cc680"]]), ue = ["ari
|
|
|
171
171
|
"aria-checked": e.checked,
|
|
172
172
|
value: e.value,
|
|
173
173
|
indeterminate: s.value,
|
|
174
|
-
onChange:
|
|
175
|
-
(...g) =>
|
|
174
|
+
onChange: r[0] || (r[0] = //@ts-ignore
|
|
175
|
+
(...g) => f.onChange && f.onChange(...g))
|
|
176
176
|
}, null, 40, re),
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
u("div", ce, [
|
|
178
|
+
c(n.$slots, "default", {}, () => [
|
|
179
179
|
B($(e.label), 1)
|
|
180
180
|
], !0),
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
u("div", ye, [
|
|
182
|
+
c(n.$slots, "checkbox-content", {}, void 0, !0)
|
|
183
183
|
])
|
|
184
184
|
])
|
|
185
185
|
], 2)
|
|
186
|
-
], 8,
|
|
186
|
+
], 8, se));
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
|
-
const
|
|
189
|
+
const T = /* @__PURE__ */ _(me, [["__scopeId", "data-v-7251a11b"]]), H = (e) => (M("data-v-47a76942"), e = e(), E(), e), fe = { class: "joy-counter" }, ve = { class: "joy-counter__wrapper" }, be = ["aria-label", "disabled"], ge = /* @__PURE__ */ H(() => /* @__PURE__ */ u("joy-icon", {
|
|
190
190
|
name: "minus",
|
|
191
191
|
color: "teal",
|
|
192
192
|
lazy: !1
|
|
193
|
-
}, null, -1)),
|
|
194
|
-
|
|
195
|
-
],
|
|
193
|
+
}, null, -1)), he = [
|
|
194
|
+
ge
|
|
195
|
+
], pe = ["id", "min", "max", "aria-invalid", "name", "required", "value"], _e = ["aria-label", "disabled"], ke = /* @__PURE__ */ H(() => /* @__PURE__ */ u("joy-icon", {
|
|
196
196
|
name: "add",
|
|
197
197
|
lazy: !1,
|
|
198
198
|
color: "teal"
|
|
199
|
-
}, null, -1)),
|
|
199
|
+
}, null, -1)), je = [
|
|
200
200
|
ke
|
|
201
|
-
],
|
|
201
|
+
], Se = {
|
|
202
202
|
key: 0,
|
|
203
203
|
class: "joy-counter_error"
|
|
204
|
-
},
|
|
204
|
+
}, $e = /* @__PURE__ */ p({
|
|
205
205
|
__name: "JoyCounter",
|
|
206
206
|
props: {
|
|
207
207
|
/** Removes any interactivity */
|
|
@@ -267,44 +267,44 @@ const N = /* @__PURE__ */ j(ye, [["__scopeId", "data-v-7251a11b"]]), G = (e) =>
|
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
269
|
emits: ["update:modelValue"],
|
|
270
|
-
setup(e, { expose:
|
|
271
|
-
const t = e,
|
|
270
|
+
setup(e, { expose: l, emit: a }) {
|
|
271
|
+
const t = e, i = S(!1);
|
|
272
272
|
function s() {
|
|
273
|
-
const
|
|
274
|
-
|
|
273
|
+
const v = r(!1);
|
|
274
|
+
v >= 0 ? a("update:modelValue", v <= t.min ? t.min : v) : a("update:modelValue", 0), n();
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
const
|
|
278
|
-
t.max &&
|
|
276
|
+
function f() {
|
|
277
|
+
const v = r();
|
|
278
|
+
t.max && v <= t.max ? a("update:modelValue", v >= t.max ? t.max : v) : t.max && v > t.max ? a("update:modelValue", t.max) : a("update:modelValue", v), n();
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
|
|
280
|
+
function n() {
|
|
281
|
+
i.value = !g();
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function r(v = !0) {
|
|
284
284
|
const h = t.step.toString().split("."), x = h.length === 2 ? h[1].length : 0;
|
|
285
|
-
return parseFloat(
|
|
285
|
+
return parseFloat(v ? (t.modelValue + t.step).toFixed(x) : (t.modelValue - t.step).toFixed(x));
|
|
286
286
|
}
|
|
287
287
|
function g() {
|
|
288
|
-
return
|
|
288
|
+
return k() && I();
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function k() {
|
|
291
291
|
return !t.max || t.modelValue <= t.max;
|
|
292
292
|
}
|
|
293
293
|
function I() {
|
|
294
294
|
return t.min <= t.modelValue;
|
|
295
295
|
}
|
|
296
|
-
const
|
|
297
|
-
onInput: (
|
|
298
|
-
a("update:modelValue", +
|
|
296
|
+
const j = {
|
|
297
|
+
onInput: (v) => {
|
|
298
|
+
a("update:modelValue", +v.target.value || 0), i.value = !1;
|
|
299
299
|
},
|
|
300
300
|
onBlur: () => {
|
|
301
|
-
|
|
301
|
+
n();
|
|
302
302
|
}
|
|
303
303
|
};
|
|
304
|
-
return
|
|
304
|
+
return l({
|
|
305
305
|
props: t
|
|
306
|
-
}), (
|
|
307
|
-
e.label ? (
|
|
306
|
+
}), (v, h) => (o(), d("div", fe, [
|
|
307
|
+
e.label ? (o(), J(m(w), {
|
|
308
308
|
key: 0,
|
|
309
309
|
for: e.id,
|
|
310
310
|
required: e.required && e.requiredMark,
|
|
@@ -312,56 +312,56 @@ const N = /* @__PURE__ */ j(ye, [["__scopeId", "data-v-7251a11b"]]), G = (e) =>
|
|
|
312
312
|
size: e.labelSize
|
|
313
313
|
}, {
|
|
314
314
|
default: q(() => [
|
|
315
|
-
|
|
315
|
+
c(v.$slots, "default", {}, () => [
|
|
316
316
|
B($(e.label), 1)
|
|
317
317
|
], !0)
|
|
318
318
|
]),
|
|
319
319
|
_: 3
|
|
320
|
-
}, 8, ["for", "required", "optional-label", "size"])) :
|
|
321
|
-
|
|
322
|
-
|
|
320
|
+
}, 8, ["for", "required", "optional-label", "size"])) : y("", !0),
|
|
321
|
+
u("div", ve, [
|
|
322
|
+
u("button", {
|
|
323
323
|
class: "joy-counter__decrement",
|
|
324
324
|
type: "button",
|
|
325
325
|
"aria-label": e.labelDecrement,
|
|
326
326
|
disabled: e.modelValue <= e.min,
|
|
327
327
|
onClick: s
|
|
328
|
-
},
|
|
329
|
-
|
|
328
|
+
}, he, 8, be),
|
|
329
|
+
u("input", L({
|
|
330
330
|
id: e.id,
|
|
331
331
|
ref: "input",
|
|
332
332
|
type: "number",
|
|
333
|
-
class: { "joy-counter__invalid": e.invalid ||
|
|
333
|
+
class: { "joy-counter__invalid": e.invalid || i.value },
|
|
334
334
|
min: e.min,
|
|
335
335
|
max: e.max,
|
|
336
|
-
"aria-invalid": e.invalid ||
|
|
336
|
+
"aria-invalid": e.invalid || i.value,
|
|
337
337
|
name: e.name,
|
|
338
338
|
required: e.required,
|
|
339
339
|
step: "any",
|
|
340
340
|
value: e.modelValue
|
|
341
|
-
},
|
|
341
|
+
}, v.$attrs, {
|
|
342
342
|
onInput: h[0] || (h[0] = //@ts-ignore
|
|
343
|
-
(...x) =>
|
|
343
|
+
(...x) => j.onInput && j.onInput(...x)),
|
|
344
344
|
onBlur: h[1] || (h[1] = //@ts-ignore
|
|
345
|
-
(...x) =>
|
|
346
|
-
}), null, 16,
|
|
347
|
-
|
|
345
|
+
(...x) => j.onBlur && j.onBlur(...x))
|
|
346
|
+
}), null, 16, pe),
|
|
347
|
+
u("button", {
|
|
348
348
|
class: "joy-counter__increment",
|
|
349
349
|
type: "button",
|
|
350
350
|
"aria-label": e.labelIncrement,
|
|
351
351
|
disabled: e.max ? e.modelValue >= e.max : !1,
|
|
352
|
-
onClick:
|
|
353
|
-
},
|
|
354
|
-
e.invalid && e.errorMessage ? (
|
|
355
|
-
R(
|
|
356
|
-
])) :
|
|
352
|
+
onClick: f
|
|
353
|
+
}, je, 8, _e),
|
|
354
|
+
e.invalid && e.errorMessage ? (o(), d("div", Se, [
|
|
355
|
+
R(m(G), { "no-html-error-text": e.errorMessage }, null, 8, ["no-html-error-text"])
|
|
356
|
+
])) : y("", !0)
|
|
357
357
|
])
|
|
358
358
|
]));
|
|
359
359
|
}
|
|
360
360
|
});
|
|
361
|
-
const
|
|
361
|
+
const xe = /* @__PURE__ */ _($e, [["__scopeId", "data-v-47a76942"]]), Ie = (e) => (M("data-v-d693f93c"), e = e(), E(), e), qe = ["aria-hidden"], Be = /* @__PURE__ */ Ie(() => /* @__PURE__ */ u("joy-icon", {
|
|
362
362
|
"custom-class": "joy-icon-error",
|
|
363
363
|
name: "warning-triangle"
|
|
364
|
-
}, null, -1)),
|
|
364
|
+
}, null, -1)), Je = /* @__PURE__ */ p({
|
|
365
365
|
__name: "JoyFormError",
|
|
366
366
|
props: {
|
|
367
367
|
/** In some cases you'll need to inject the error in the DOM but hide it. Visible by default */
|
|
@@ -373,36 +373,36 @@ const $e = /* @__PURE__ */ j(_e, [["__scopeId", "data-v-47a76942"]]), xe = (e) =
|
|
|
373
373
|
noHtmlErrorText: String
|
|
374
374
|
},
|
|
375
375
|
setup(e) {
|
|
376
|
-
return (
|
|
376
|
+
return (l, a) => (o(), d("div", {
|
|
377
377
|
"aria-hidden": e.visible,
|
|
378
|
-
class:
|
|
378
|
+
class: b(["joy-form-error", { "joy-has-error": e.visible }]),
|
|
379
379
|
role: "alert"
|
|
380
380
|
}, [
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
381
|
+
Be,
|
|
382
|
+
u("div", null, [
|
|
383
|
+
c(l.$slots, "default", {}, () => [
|
|
384
384
|
B($(e.noHtmlErrorText), 1)
|
|
385
385
|
], !0)
|
|
386
386
|
])
|
|
387
|
-
], 10,
|
|
387
|
+
], 10, qe));
|
|
388
388
|
}
|
|
389
389
|
});
|
|
390
|
-
const
|
|
390
|
+
const G = /* @__PURE__ */ _(Je, [["__scopeId", "data-v-d693f93c"]]);
|
|
391
391
|
function Ve(e) {
|
|
392
|
-
let
|
|
392
|
+
let l;
|
|
393
393
|
switch (e) {
|
|
394
394
|
case "error":
|
|
395
|
-
|
|
395
|
+
l = "warning-triangle";
|
|
396
396
|
break;
|
|
397
397
|
case "success":
|
|
398
|
-
|
|
398
|
+
l = "check";
|
|
399
399
|
break;
|
|
400
400
|
default:
|
|
401
|
-
|
|
401
|
+
l = "info-circle";
|
|
402
402
|
}
|
|
403
|
-
return
|
|
403
|
+
return l;
|
|
404
404
|
}
|
|
405
|
-
const
|
|
405
|
+
const we = [...ee], Ce = ["name"], Le = { class: "joy-highlight--text" }, ze = /* @__PURE__ */ p({
|
|
406
406
|
__name: "JoyHighlight",
|
|
407
407
|
props: {
|
|
408
408
|
accent: {
|
|
@@ -418,51 +418,51 @@ const Je = [...Y], Ce = ["name"], we = { class: "joy-highlight--text" }, Le = /*
|
|
|
418
418
|
type: String,
|
|
419
419
|
default: "neutral",
|
|
420
420
|
validator(e) {
|
|
421
|
-
return
|
|
421
|
+
return we.includes(e);
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
424
|
},
|
|
425
|
-
setup(e, { expose:
|
|
426
|
-
const a = e, t =
|
|
427
|
-
return
|
|
425
|
+
setup(e, { expose: l }) {
|
|
426
|
+
const a = e, t = V(() => a.icon ? a.icon : Ve(a.level));
|
|
427
|
+
return l({
|
|
428
428
|
getRelevantIcon: t
|
|
429
|
-
}), (
|
|
430
|
-
class:
|
|
429
|
+
}), (i, s) => (o(), d("div", {
|
|
430
|
+
class: b([
|
|
431
431
|
"joy-highlight",
|
|
432
432
|
`joy-highlight_${e.level}`,
|
|
433
433
|
{
|
|
434
434
|
"joy-highlight__accent": e.accent,
|
|
435
|
-
"joy-highlight__titled":
|
|
435
|
+
"joy-highlight__titled": i.$slots["highlight-title"]
|
|
436
436
|
}
|
|
437
437
|
])
|
|
438
438
|
}, [
|
|
439
|
-
e.displayIcon ? (
|
|
439
|
+
e.displayIcon ? (o(), d("joy-icon", {
|
|
440
440
|
key: 0,
|
|
441
|
-
name:
|
|
442
|
-
}, null, 8, Ce)) :
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
441
|
+
name: m(t)
|
|
442
|
+
}, null, 8, Ce)) : y("", !0),
|
|
443
|
+
u("div", Le, [
|
|
444
|
+
u("strong", null, [
|
|
445
|
+
c(i.$slots, "highlight-title", {}, void 0, !0)
|
|
446
446
|
]),
|
|
447
|
-
|
|
447
|
+
c(i.$slots, "default", {}, void 0, !0)
|
|
448
448
|
])
|
|
449
449
|
], 2));
|
|
450
450
|
}
|
|
451
451
|
});
|
|
452
|
-
const
|
|
452
|
+
const Me = /* @__PURE__ */ _(ze, [["__scopeId", "data-v-15d3fa11"]]), Ee = ["small", "medium", "large"], Ne = {
|
|
453
453
|
key: 0,
|
|
454
454
|
class: "joy-label-required"
|
|
455
|
-
},
|
|
455
|
+
}, Te = {
|
|
456
456
|
key: 1,
|
|
457
457
|
class: "joy-label-optional"
|
|
458
|
-
},
|
|
458
|
+
}, Oe = /* @__PURE__ */ p({
|
|
459
459
|
__name: "JoyLabel",
|
|
460
460
|
props: {
|
|
461
461
|
size: {
|
|
462
462
|
type: String,
|
|
463
463
|
default: "medium",
|
|
464
464
|
validator(e) {
|
|
465
|
-
return
|
|
465
|
+
return Ee.includes(e);
|
|
466
466
|
}
|
|
467
467
|
},
|
|
468
468
|
tagName: {
|
|
@@ -478,19 +478,19 @@ const ze = /* @__PURE__ */ j(Le, [["__scopeId", "data-v-15d3fa11"]]), Me = ["sma
|
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
480
|
setup(e) {
|
|
481
|
-
return (
|
|
481
|
+
return (l, a) => (o(), J(z(e.tagName), L({
|
|
482
482
|
class: ["joy-label", `joy-label--${e.size}`]
|
|
483
|
-
},
|
|
483
|
+
}, l.$attrs), {
|
|
484
484
|
default: q(() => [
|
|
485
|
-
|
|
486
|
-
e.required ? (
|
|
487
|
-
e.optionalLabel ? (
|
|
485
|
+
c(l.$slots, "default", {}, void 0, !0),
|
|
486
|
+
e.required ? (o(), d("span", Ne, "*")) : y("", !0),
|
|
487
|
+
e.optionalLabel ? (o(), d("span", Te, "- " + $(e.optionalLabel), 1)) : y("", !0)
|
|
488
488
|
]),
|
|
489
489
|
_: 3
|
|
490
490
|
}, 16, ["class"]));
|
|
491
491
|
}
|
|
492
492
|
});
|
|
493
|
-
const
|
|
493
|
+
const w = /* @__PURE__ */ _(Oe, [["__scopeId", "data-v-e3232407"]]), Re = ["large", "medium", "small"], Ae = ["id", "disabled", "type", "value"], Fe = ["name"], Pe = ["data-unit"], He = /* @__PURE__ */ p({
|
|
494
494
|
__name: "JoyInput",
|
|
495
495
|
props: {
|
|
496
496
|
disabled: {
|
|
@@ -505,7 +505,8 @@ const C = /* @__PURE__ */ j(Ne, [["__scopeId", "data-v-e3232407"]]), Oe = ["larg
|
|
|
505
505
|
default: !1
|
|
506
506
|
},
|
|
507
507
|
name: {
|
|
508
|
-
type: String
|
|
508
|
+
type: String,
|
|
509
|
+
required: !0
|
|
509
510
|
},
|
|
510
511
|
required: {
|
|
511
512
|
type: Boolean,
|
|
@@ -540,7 +541,7 @@ const C = /* @__PURE__ */ j(Ne, [["__scopeId", "data-v-e3232407"]]), Oe = ["larg
|
|
|
540
541
|
type: String,
|
|
541
542
|
default: "medium",
|
|
542
543
|
validator(e) {
|
|
543
|
-
return
|
|
544
|
+
return Re.includes(e);
|
|
544
545
|
}
|
|
545
546
|
},
|
|
546
547
|
type: String,
|
|
@@ -548,46 +549,46 @@ const C = /* @__PURE__ */ j(Ne, [["__scopeId", "data-v-e3232407"]]), Oe = ["larg
|
|
|
548
549
|
unit: String
|
|
549
550
|
},
|
|
550
551
|
emits: ["update:modelValue"],
|
|
551
|
-
setup(e, { emit:
|
|
552
|
-
const a = e, t =
|
|
553
|
-
var
|
|
554
|
-
return !!((
|
|
555
|
-
}), I =
|
|
556
|
-
|
|
552
|
+
setup(e, { emit: l }) {
|
|
553
|
+
const a = e, t = S(), i = S(), s = O(), f = C(), n = S(!1), r = V(() => a.clearable && a.modelValue.length > 0 && !a.unit), g = V(() => f.default && f.default()), k = V(() => {
|
|
554
|
+
var v, h;
|
|
555
|
+
return !!((v = i.value) != null && v.closest("joy-wrapper")) || !!((h = i.value) != null && h.closest(".joy-wrapper"));
|
|
556
|
+
}), I = S(a.type);
|
|
557
|
+
W(() => {
|
|
557
558
|
I.value = a.unit ? "number" : a.unit || "text";
|
|
558
559
|
});
|
|
559
|
-
const
|
|
560
|
+
const j = {
|
|
560
561
|
onFocus: () => {
|
|
561
|
-
|
|
562
|
+
n.value = !0;
|
|
562
563
|
},
|
|
563
564
|
onBlur: () => {
|
|
564
|
-
|
|
565
|
+
n.value = !1;
|
|
565
566
|
},
|
|
566
|
-
onInput: (
|
|
567
|
-
let h =
|
|
568
|
-
|
|
567
|
+
onInput: (v) => {
|
|
568
|
+
let h = v.target.value;
|
|
569
|
+
l("update:modelValue", h);
|
|
569
570
|
},
|
|
570
571
|
clearValue: () => {
|
|
571
|
-
a.disabled ||
|
|
572
|
+
a.disabled || l("update:modelValue", "");
|
|
572
573
|
}
|
|
573
574
|
};
|
|
574
|
-
return (
|
|
575
|
+
return (v, h) => (o(), d("div", {
|
|
575
576
|
ref_key: "root",
|
|
576
|
-
ref:
|
|
577
|
-
class:
|
|
577
|
+
ref: i,
|
|
578
|
+
class: b([`joy-input--${a.size}`])
|
|
578
579
|
}, [
|
|
579
|
-
|
|
580
|
-
class:
|
|
580
|
+
u("div", {
|
|
581
|
+
class: b([
|
|
581
582
|
"joy-input",
|
|
582
583
|
{
|
|
583
|
-
"joy-input--focusing":
|
|
584
|
+
"joy-input--focusing": n.value,
|
|
584
585
|
"joy-input--disabled": e.disabled,
|
|
585
586
|
"joy-input--invalid": e.invalid,
|
|
586
|
-
"joy-input--valid": !e.invalid && !
|
|
587
|
+
"joy-input--valid": !e.invalid && !m(s).disabled
|
|
587
588
|
}
|
|
588
589
|
])
|
|
589
590
|
}, [
|
|
590
|
-
|
|
591
|
+
m(g) || e.label ? (o(), J(w, {
|
|
591
592
|
key: 0,
|
|
592
593
|
for: e.name,
|
|
593
594
|
required: e.required && e.requiredMark,
|
|
@@ -595,24 +596,24 @@ const C = /* @__PURE__ */ j(Ne, [["__scopeId", "data-v-e3232407"]]), Oe = ["larg
|
|
|
595
596
|
size: e.labelSize
|
|
596
597
|
}, {
|
|
597
598
|
default: q(() => [
|
|
598
|
-
|
|
599
|
+
c(v.$slots, "default", {}, () => [
|
|
599
600
|
B($(e.label), 1)
|
|
600
601
|
], !0)
|
|
601
602
|
]),
|
|
602
603
|
_: 3
|
|
603
|
-
}, 8, ["for", "required", "optional-label", "size"])) :
|
|
604
|
-
|
|
605
|
-
class:
|
|
604
|
+
}, 8, ["for", "required", "optional-label", "size"])) : y("", !0),
|
|
605
|
+
u("div", {
|
|
606
|
+
class: b([
|
|
606
607
|
"joy-input--wrapper",
|
|
607
608
|
{
|
|
608
609
|
"joy-input--wrapper-has-icon": !!e.icon,
|
|
609
610
|
"joy-input--wrapper---clearable": e.clearable,
|
|
610
611
|
"joy-input--wrapper-unit": !!e.unit,
|
|
611
|
-
"joy-input--wrapper-margin": !
|
|
612
|
+
"joy-input--wrapper-margin": !m(k)
|
|
612
613
|
}
|
|
613
614
|
])
|
|
614
615
|
}, [
|
|
615
|
-
|
|
616
|
+
u("input", L(v.$attrs, {
|
|
616
617
|
id: a.name,
|
|
617
618
|
ref_key: "input",
|
|
618
619
|
ref: t,
|
|
@@ -626,31 +627,37 @@ const C = /* @__PURE__ */ j(Ne, [["__scopeId", "data-v-e3232407"]]), Oe = ["larg
|
|
|
626
627
|
type: I.value,
|
|
627
628
|
value: e.modelValue,
|
|
628
629
|
onFocus: h[0] || (h[0] = //@ts-ignore
|
|
629
|
-
(...x) =>
|
|
630
|
+
(...x) => j.onFocus && j.onFocus(...x)),
|
|
630
631
|
onBlur: h[1] || (h[1] = //@ts-ignore
|
|
631
|
-
(...x) =>
|
|
632
|
+
(...x) => j.onBlur && j.onBlur(...x)),
|
|
632
633
|
onInput: h[2] || (h[2] = //@ts-ignore
|
|
633
|
-
(...x) =>
|
|
634
|
-
}), null, 16,
|
|
635
|
-
|
|
634
|
+
(...x) => j.onInput && j.onInput(...x))
|
|
635
|
+
}), null, 16, Ae),
|
|
636
|
+
m(r) ? (o(), d("joy-icon", {
|
|
636
637
|
key: 0,
|
|
637
638
|
size: "xxsmall",
|
|
638
639
|
name: "cross",
|
|
639
640
|
class: "joy-input--clear",
|
|
640
641
|
onClick: h[3] || (h[3] = //@ts-ignore
|
|
641
|
-
(...x) =>
|
|
642
|
-
})) :
|
|
643
|
-
e.
|
|
642
|
+
(...x) => j.clearValue && j.clearValue(...x))
|
|
643
|
+
})) : y("", !0),
|
|
644
|
+
e.icon && !e.clearable ? (o(), d("joy-icon", {
|
|
644
645
|
key: 1,
|
|
646
|
+
role: "img",
|
|
647
|
+
class: "joy-input--decorative-icon",
|
|
648
|
+
name: e.icon
|
|
649
|
+
}, null, 8, Fe)) : y("", !0),
|
|
650
|
+
e.unit ? (o(), d("div", {
|
|
651
|
+
key: 2,
|
|
645
652
|
"data-unit": e.unit,
|
|
646
653
|
class: "joy-input--unit"
|
|
647
|
-
}, null, 8,
|
|
654
|
+
}, null, 8, Pe)) : y("", !0)
|
|
648
655
|
], 2)
|
|
649
656
|
], 2)
|
|
650
657
|
], 2));
|
|
651
658
|
}
|
|
652
659
|
});
|
|
653
|
-
const
|
|
660
|
+
const Ge = /* @__PURE__ */ _(He, [["__scopeId", "data-v-023262dd"]]), Ue = ["teal", "white"], We = ["href"], De = ["color", "name"], Ke = /* @__PURE__ */ p({
|
|
654
661
|
__name: "JoyLink",
|
|
655
662
|
props: {
|
|
656
663
|
href: {
|
|
@@ -661,36 +668,36 @@ const He = /* @__PURE__ */ j(Ae, [["__scopeId", "data-v-f264c5ef"]]), Ge = ["tea
|
|
|
661
668
|
type: String,
|
|
662
669
|
default: "teal",
|
|
663
670
|
validator(e) {
|
|
664
|
-
return
|
|
671
|
+
return Ue.includes(e);
|
|
665
672
|
}
|
|
666
673
|
},
|
|
667
674
|
icon: String
|
|
668
675
|
},
|
|
669
676
|
setup(e) {
|
|
670
|
-
const
|
|
671
|
-
return (t,
|
|
677
|
+
const l = e, a = V(() => l.color === "white" ? "white" : "teal");
|
|
678
|
+
return (t, i) => (o(), d("a", L({ href: e.href }, t.$attrs, {
|
|
672
679
|
class: ["joy-link", `joy-link_${e.color}`]
|
|
673
680
|
}), [
|
|
674
|
-
e.icon ? (
|
|
681
|
+
e.icon ? (o(), d("joy-icon", {
|
|
675
682
|
key: 0,
|
|
676
|
-
color:
|
|
683
|
+
color: m(a),
|
|
677
684
|
name: e.icon
|
|
678
|
-
}, null, 8,
|
|
679
|
-
|
|
680
|
-
], 16,
|
|
685
|
+
}, null, 8, De)) : y("", !0),
|
|
686
|
+
c(t.$slots, "default", {}, void 0, !0)
|
|
687
|
+
], 16, We));
|
|
681
688
|
}
|
|
682
689
|
});
|
|
683
|
-
const
|
|
684
|
-
class: /* @__PURE__ */
|
|
685
|
-
},
|
|
690
|
+
const Ze = /* @__PURE__ */ _(Ke, [["__scopeId", "data-v-640ee9a6"]]), Qe = ["id"], Xe = {
|
|
691
|
+
class: /* @__PURE__ */ b(["joy-multi-checkbox"])
|
|
692
|
+
}, Ye = /* @__PURE__ */ p({
|
|
686
693
|
__name: "JoyMultiCheckbox",
|
|
687
694
|
props: {
|
|
688
695
|
options: {
|
|
689
696
|
type: Array,
|
|
690
697
|
required: !0,
|
|
691
698
|
validator(e) {
|
|
692
|
-
const
|
|
693
|
-
return
|
|
699
|
+
const l = e.every((t) => Object.keys(t).includes("value")), a = e.every((t) => Object.keys(t).includes("label"));
|
|
700
|
+
return l && a;
|
|
694
701
|
}
|
|
695
702
|
},
|
|
696
703
|
id: String,
|
|
@@ -720,20 +727,20 @@ const De = /* @__PURE__ */ j(Pe, [["__scopeId", "data-v-640ee9a6"]]), Ke = ["id"
|
|
|
720
727
|
}
|
|
721
728
|
},
|
|
722
729
|
emits: ["update:value"],
|
|
723
|
-
setup(e, { emit:
|
|
730
|
+
setup(e, { emit: l }) {
|
|
724
731
|
const a = e;
|
|
725
732
|
function t(s) {
|
|
726
733
|
return a.value.includes(s.value);
|
|
727
734
|
}
|
|
728
|
-
function
|
|
729
|
-
let
|
|
730
|
-
|
|
735
|
+
function i(s, f) {
|
|
736
|
+
let n = [...a.value || []];
|
|
737
|
+
f ? n.push(s) : n.splice(n.indexOf(s), 1), l("update:value", n);
|
|
731
738
|
}
|
|
732
|
-
return (s,
|
|
739
|
+
return (s, f) => (o(), d("fieldset", {
|
|
733
740
|
id: e.id,
|
|
734
741
|
class: "joy-multi-checkbox__wrapper"
|
|
735
742
|
}, [
|
|
736
|
-
e.label ? (
|
|
743
|
+
e.label ? (o(), J(m(w), {
|
|
737
744
|
key: 0,
|
|
738
745
|
"tag-name": "legend",
|
|
739
746
|
required: e.required && e.requiredMark,
|
|
@@ -744,26 +751,106 @@ const De = /* @__PURE__ */ j(Pe, [["__scopeId", "data-v-640ee9a6"]]), Ke = ["id"
|
|
|
744
751
|
B($(e.label), 1)
|
|
745
752
|
]),
|
|
746
753
|
_: 1
|
|
747
|
-
}, 8, ["required", "optional-label", "size"])) :
|
|
748
|
-
|
|
749
|
-
(
|
|
750
|
-
id:
|
|
751
|
-
key:
|
|
752
|
-
name:
|
|
753
|
-
value:
|
|
754
|
-
checked: t(
|
|
755
|
-
"onUpdate:checked": (
|
|
754
|
+
}, 8, ["required", "optional-label", "size"])) : y("", !0),
|
|
755
|
+
u("div", Xe, [
|
|
756
|
+
(o(!0), d(A, null, F(e.options, (n) => (o(), J(m(T), {
|
|
757
|
+
id: n.id,
|
|
758
|
+
key: n.id,
|
|
759
|
+
name: n.name,
|
|
760
|
+
value: n.value,
|
|
761
|
+
checked: t(n),
|
|
762
|
+
"onUpdate:checked": (r) => i(n.value, r)
|
|
756
763
|
}, {
|
|
757
764
|
default: q(() => [
|
|
758
|
-
B($(
|
|
765
|
+
B($(n.label), 1)
|
|
759
766
|
]),
|
|
760
767
|
_: 2
|
|
761
768
|
}, 1032, ["id", "name", "value", "checked", "onUpdate:checked"]))), 128))
|
|
762
769
|
])
|
|
763
|
-
], 8,
|
|
770
|
+
], 8, Qe));
|
|
764
771
|
}
|
|
765
772
|
});
|
|
766
|
-
const
|
|
773
|
+
const et = /* @__PURE__ */ _(Ye, [["__scopeId", "data-v-4a9e39e2"]]), tt = ["small", "medium", "large"], at = {
|
|
774
|
+
class: /* @__PURE__ */ b(["joy-panel__header"])
|
|
775
|
+
}, lt = {
|
|
776
|
+
key: 0,
|
|
777
|
+
class: "joy-panel__header-title"
|
|
778
|
+
}, nt = {
|
|
779
|
+
key: 1,
|
|
780
|
+
class: "joy-panel__header-action"
|
|
781
|
+
}, ot = {
|
|
782
|
+
key: 2,
|
|
783
|
+
class: "joy-panel__header-subtitle"
|
|
784
|
+
}, it = { class: "joy-panel__body" }, dt = { class: "joy-panel__footer" }, ut = /* @__PURE__ */ p({
|
|
785
|
+
__name: "JoyPanel",
|
|
786
|
+
props: {
|
|
787
|
+
flex: {
|
|
788
|
+
type: String
|
|
789
|
+
},
|
|
790
|
+
noMargin: {
|
|
791
|
+
type: Boolean,
|
|
792
|
+
default: !1
|
|
793
|
+
},
|
|
794
|
+
padding: {
|
|
795
|
+
type: String,
|
|
796
|
+
defaut: "medium",
|
|
797
|
+
validator(e) {
|
|
798
|
+
return tt.includes(e);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
},
|
|
802
|
+
setup(e) {
|
|
803
|
+
const l = C(), a = S(), t = V(() => {
|
|
804
|
+
var i;
|
|
805
|
+
return (i = a.value) == null ? void 0 : i.closest(".joy-wrapper");
|
|
806
|
+
});
|
|
807
|
+
return (i, s) => (o(), d("section", {
|
|
808
|
+
ref_key: "panel",
|
|
809
|
+
ref: a,
|
|
810
|
+
style: D({ flex: e.flex }),
|
|
811
|
+
class: b(["joy-panel", `joy-panel--${e.padding}`, { "joy-panel--no-margin": e.noMargin || m(t) }])
|
|
812
|
+
}, [
|
|
813
|
+
u("header", at, [
|
|
814
|
+
m(l)["panel-title"] ? (o(), d("div", lt, [
|
|
815
|
+
c(i.$slots, "panel-title", {}, void 0, !0)
|
|
816
|
+
])) : y("", !0),
|
|
817
|
+
m(l)["panel-action"] ? (o(), d("div", nt, [
|
|
818
|
+
c(i.$slots, "panel-title-action", {}, void 0, !0)
|
|
819
|
+
])) : y("", !0),
|
|
820
|
+
m(l)["panel-subtitle"] ? (o(), d("div", ot, [
|
|
821
|
+
c(i.$slots, "panel-subtitle", {}, void 0, !0)
|
|
822
|
+
])) : y("", !0)
|
|
823
|
+
]),
|
|
824
|
+
u("div", it, [
|
|
825
|
+
c(i.$slots, "panel-body", {}, void 0, !0)
|
|
826
|
+
]),
|
|
827
|
+
u("footer", dt, [
|
|
828
|
+
c(i.$slots, "panel-action", {}, void 0, !0)
|
|
829
|
+
])
|
|
830
|
+
], 6));
|
|
831
|
+
}
|
|
832
|
+
});
|
|
833
|
+
const st = /* @__PURE__ */ _(ut, [["__scopeId", "data-v-ab3b6d88"]]), rt = { class: "joy-panel-section" }, ct = {
|
|
834
|
+
key: 0,
|
|
835
|
+
class: "joy-panel-section__title"
|
|
836
|
+
}, yt = {
|
|
837
|
+
key: 1,
|
|
838
|
+
class: "joy-panel-section__content"
|
|
839
|
+
}, mt = /* @__PURE__ */ p({
|
|
840
|
+
__name: "JoyPanelSection",
|
|
841
|
+
setup(e) {
|
|
842
|
+
const l = C();
|
|
843
|
+
return (a, t) => (o(), d("div", rt, [
|
|
844
|
+
m(l)["panel-section-title"] ? (o(), d("div", ct, [
|
|
845
|
+
c(a.$slots, "panel-section-title", {}, void 0, !0)
|
|
846
|
+
])) : y("", !0),
|
|
847
|
+
m(l)["panel-section-content"] ? (o(), d("div", yt, [
|
|
848
|
+
c(a.$slots, "panel-section-content", {}, void 0, !0)
|
|
849
|
+
])) : y("", !0)
|
|
850
|
+
]));
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
const ft = /* @__PURE__ */ _(mt, [["__scopeId", "data-v-3b8a6001"]]), vt = ["id", "value", "checked", "disabled", "required", "name"], bt = { class: "joy-radio-label" }, gt = { class: "joy-radio-content__wrapper" }, ht = { class: "joy-radio-content" }, pt = /* @__PURE__ */ p({
|
|
767
854
|
__name: "JoyRadio",
|
|
768
855
|
props: {
|
|
769
856
|
disabled: {
|
|
@@ -793,70 +880,71 @@ const Xe = /* @__PURE__ */ j(Qe, [["__scopeId", "data-v-ac218b17"]]), Ye = ["id"
|
|
|
793
880
|
default: "default"
|
|
794
881
|
},
|
|
795
882
|
value: {
|
|
796
|
-
type: String
|
|
883
|
+
type: String,
|
|
884
|
+
required: !0
|
|
797
885
|
}
|
|
798
886
|
},
|
|
799
887
|
emits: ["update:modelValue"],
|
|
800
|
-
setup(e, { expose:
|
|
801
|
-
const t = e,
|
|
888
|
+
setup(e, { expose: l, emit: a }) {
|
|
889
|
+
const t = e, i = S(!1), s = S(null), f = S(null), n = C(), r = V(() => !t.modelValue || !t.value ? !1 : t.modelValue === t.value);
|
|
802
890
|
function g() {
|
|
803
|
-
|
|
891
|
+
i.value = !!n["expandable-content"] && r.value;
|
|
804
892
|
}
|
|
805
|
-
function
|
|
893
|
+
function k() {
|
|
806
894
|
a("update:modelValue", t.value), g();
|
|
807
895
|
}
|
|
808
|
-
return
|
|
896
|
+
return N(() => {
|
|
809
897
|
t.theme === "outline" && g();
|
|
810
|
-
}),
|
|
898
|
+
}), K(
|
|
811
899
|
() => t.modelValue,
|
|
812
900
|
() => {
|
|
813
901
|
g();
|
|
814
902
|
}
|
|
815
|
-
),
|
|
816
|
-
checked:
|
|
817
|
-
isExpanded:
|
|
818
|
-
}), (I,
|
|
903
|
+
), l({
|
|
904
|
+
checked: r,
|
|
905
|
+
isExpanded: i
|
|
906
|
+
}), (I, j) => (o(), d("label", {
|
|
819
907
|
ref_key: "root",
|
|
820
908
|
ref: s,
|
|
821
|
-
class:
|
|
909
|
+
class: b([
|
|
822
910
|
"joy-radio",
|
|
823
911
|
`joy-radio--${e.theme}`,
|
|
824
912
|
{
|
|
825
|
-
"joy-radio--checked":
|
|
913
|
+
"joy-radio--checked": m(r),
|
|
826
914
|
"joy-radio--disabled": e.disabled,
|
|
827
915
|
"joy-radio--invalid": e.invalid
|
|
828
916
|
}
|
|
829
917
|
])
|
|
830
918
|
}, [
|
|
831
|
-
|
|
919
|
+
u("input", {
|
|
832
920
|
id: e.id,
|
|
833
921
|
type: "radio",
|
|
834
922
|
value: e.value,
|
|
835
|
-
checked:
|
|
923
|
+
checked: m(r),
|
|
836
924
|
disabled: e.disabled,
|
|
837
925
|
required: e.required,
|
|
838
926
|
name: e.name,
|
|
839
|
-
onChange:
|
|
840
|
-
}, null, 40,
|
|
841
|
-
|
|
842
|
-
|
|
927
|
+
onChange: k
|
|
928
|
+
}, null, 40, vt),
|
|
929
|
+
u("span", bt, [
|
|
930
|
+
c(I.$slots, "default", {}, void 0, !0)
|
|
843
931
|
]),
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
932
|
+
u("div", gt, [
|
|
933
|
+
u("div", ht, [
|
|
934
|
+
c(I.$slots, "radio-content", {}, void 0, !0)
|
|
847
935
|
]),
|
|
848
|
-
|
|
936
|
+
u("div", {
|
|
849
937
|
ref_key: "expandableElement",
|
|
850
|
-
ref:
|
|
851
|
-
class:
|
|
938
|
+
ref: f,
|
|
939
|
+
class: b(["joy-radio-expandable", { "joy-radio-expandable--expanded": i.value }])
|
|
852
940
|
}, [
|
|
853
|
-
|
|
941
|
+
c(I.$slots, "expandable-content", {}, void 0, !0)
|
|
854
942
|
], 2)
|
|
855
943
|
])
|
|
856
944
|
], 2));
|
|
857
945
|
}
|
|
858
946
|
});
|
|
859
|
-
const
|
|
947
|
+
const _t = /* @__PURE__ */ _(pt, [["__scopeId", "data-v-5b66be9f"]]), kt = ["form", "name"], jt = /* @__PURE__ */ p({
|
|
860
948
|
__name: "JoyRadioGroup",
|
|
861
949
|
props: {
|
|
862
950
|
direction: {
|
|
@@ -871,26 +959,26 @@ const nt = /* @__PURE__ */ j(lt, [["__scopeId", "data-v-8882dc58"]]), it = ["for
|
|
|
871
959
|
}
|
|
872
960
|
},
|
|
873
961
|
setup(e) {
|
|
874
|
-
return (
|
|
962
|
+
return (l, a) => (o(), d("fieldset", {
|
|
875
963
|
ref: "root",
|
|
876
964
|
class: "joy-radio-group-fieldset",
|
|
877
965
|
role: "radiogroup",
|
|
878
966
|
form: e.form,
|
|
879
967
|
name: e.name
|
|
880
968
|
}, [
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
class:
|
|
969
|
+
c(l.$slots, "radio-group-legend", {}, void 0, !0),
|
|
970
|
+
u("div", {
|
|
971
|
+
class: b(["joy-radio-group-container", `joy-radio-group-${e.direction}`])
|
|
884
972
|
}, [
|
|
885
|
-
|
|
973
|
+
c(l.$slots, "default", {}, void 0, !0)
|
|
886
974
|
], 2)
|
|
887
|
-
], 8,
|
|
975
|
+
], 8, kt));
|
|
888
976
|
}
|
|
889
977
|
});
|
|
890
|
-
const
|
|
978
|
+
const St = /* @__PURE__ */ _(jt, [["__scopeId", "data-v-d75cd96a"]]), $t = (e) => (M("data-v-0d978ea6"), e = e(), E(), e), xt = ["id", "name", "aria-invalid", "required", "disabled", "value"], It = /* @__PURE__ */ $t(() => /* @__PURE__ */ u("joy-icon", {
|
|
891
979
|
class: "joy-select__chevron",
|
|
892
980
|
name: "chevron-down"
|
|
893
|
-
}, null, -1)),
|
|
981
|
+
}, null, -1)), qt = /* @__PURE__ */ p({
|
|
894
982
|
__name: "JoySelect",
|
|
895
983
|
props: {
|
|
896
984
|
disabled: {
|
|
@@ -930,33 +1018,33 @@ const dt = /* @__PURE__ */ j(ot, [["__scopeId", "data-v-d75cd96a"]]), ut = (e) =
|
|
|
930
1018
|
// ...TEXT_BASED_PROPS,
|
|
931
1019
|
},
|
|
932
1020
|
emits: ["update:modelValue"],
|
|
933
|
-
setup(e, { emit:
|
|
934
|
-
const a = e, t =
|
|
935
|
-
|
|
1021
|
+
setup(e, { emit: l }) {
|
|
1022
|
+
const a = e, t = S(), i = S(), s = C();
|
|
1023
|
+
N(() => {
|
|
936
1024
|
var g;
|
|
937
|
-
const
|
|
938
|
-
if (!
|
|
1025
|
+
const n = s.label && s.label();
|
|
1026
|
+
if (!n || !n.length)
|
|
939
1027
|
return;
|
|
940
|
-
const
|
|
941
|
-
if (
|
|
942
|
-
const
|
|
943
|
-
if (!
|
|
1028
|
+
const r = n[0];
|
|
1029
|
+
if (r.type === "JoyLabel") {
|
|
1030
|
+
const k = (g = r.props) == null ? void 0 : g.for;
|
|
1031
|
+
if (!k) {
|
|
944
1032
|
console.warn("JoyLabel for attribute is missing");
|
|
945
1033
|
return;
|
|
946
1034
|
}
|
|
947
|
-
|
|
1035
|
+
k !== a.id && console.warn("JoyLabel for attribute does not match with JoySelect id");
|
|
948
1036
|
}
|
|
949
1037
|
});
|
|
950
|
-
function
|
|
951
|
-
const
|
|
952
|
-
|
|
1038
|
+
function f(n) {
|
|
1039
|
+
const r = n.target.value;
|
|
1040
|
+
l("update:modelValue", r);
|
|
953
1041
|
}
|
|
954
|
-
return (
|
|
1042
|
+
return (n, r) => (o(), d("div", {
|
|
955
1043
|
ref_key: "root",
|
|
956
1044
|
ref: t
|
|
957
1045
|
}, [
|
|
958
|
-
|
|
959
|
-
e.label ? (
|
|
1046
|
+
c(n.$slots, "label", {}, () => [
|
|
1047
|
+
e.label ? (o(), J(w, {
|
|
960
1048
|
key: 0,
|
|
961
1049
|
required: e.required && e.requiredMark,
|
|
962
1050
|
"optional-label": e.optionalLabel,
|
|
@@ -967,35 +1055,35 @@ const dt = /* @__PURE__ */ j(ot, [["__scopeId", "data-v-d75cd96a"]]), ut = (e) =
|
|
|
967
1055
|
B($(e.label), 1)
|
|
968
1056
|
]),
|
|
969
1057
|
_: 1
|
|
970
|
-
}, 8, ["required", "optional-label", "for", "size"])) :
|
|
1058
|
+
}, 8, ["required", "optional-label", "for", "size"])) : y("", !0)
|
|
971
1059
|
], !0),
|
|
972
|
-
|
|
973
|
-
class:
|
|
1060
|
+
u("div", {
|
|
1061
|
+
class: b({
|
|
974
1062
|
"joy-select__wrapper": !0,
|
|
975
1063
|
"joy-select--invalid": e.invalid,
|
|
976
1064
|
"joy-select--disabled": e.disabled
|
|
977
1065
|
})
|
|
978
1066
|
}, [
|
|
979
|
-
|
|
1067
|
+
u("select", {
|
|
980
1068
|
id: e.id || e.name,
|
|
981
1069
|
ref_key: "select",
|
|
982
|
-
ref:
|
|
1070
|
+
ref: i,
|
|
983
1071
|
class: "joy-select",
|
|
984
1072
|
name: e.name,
|
|
985
1073
|
"aria-invalid": e.invalid,
|
|
986
1074
|
required: e.required,
|
|
987
1075
|
disabled: e.disabled,
|
|
988
1076
|
value: e.modelValue,
|
|
989
|
-
onInput:
|
|
1077
|
+
onInput: f
|
|
990
1078
|
}, [
|
|
991
|
-
|
|
992
|
-
], 40,
|
|
993
|
-
|
|
1079
|
+
c(n.$slots, "default", {}, void 0, !0)
|
|
1080
|
+
], 40, xt),
|
|
1081
|
+
It
|
|
994
1082
|
], 2)
|
|
995
1083
|
], 512));
|
|
996
1084
|
}
|
|
997
1085
|
});
|
|
998
|
-
const
|
|
1086
|
+
const Bt = /* @__PURE__ */ _(qt, [["__scopeId", "data-v-0d978ea6"]]), Jt = ["aria-disabled"], Vt = ["id", "value", "checked", "disabled", "required", "name"], wt = /* @__PURE__ */ p({
|
|
999
1087
|
__name: "JoySelectableItem",
|
|
1000
1088
|
props: {
|
|
1001
1089
|
disabled: {
|
|
@@ -1026,36 +1114,37 @@ const yt = /* @__PURE__ */ j(ct, [["__scopeId", "data-v-f9015b7b"]]), mt = ["ari
|
|
|
1026
1114
|
type: Boolean
|
|
1027
1115
|
},
|
|
1028
1116
|
value: {
|
|
1029
|
-
type: String
|
|
1117
|
+
type: String,
|
|
1118
|
+
required: !0
|
|
1030
1119
|
}
|
|
1031
1120
|
},
|
|
1032
1121
|
emits: ["update:checked"],
|
|
1033
|
-
setup(e, { emit:
|
|
1034
|
-
const a = e, t =
|
|
1122
|
+
setup(e, { emit: l }) {
|
|
1123
|
+
const a = e, t = S(a.checked), i = S(), s = a.multiple ? "div" : "label", f = {
|
|
1035
1124
|
onRadioChange: () => {
|
|
1036
|
-
|
|
1125
|
+
l("update:checked", a.value);
|
|
1037
1126
|
},
|
|
1038
1127
|
onClick: () => {
|
|
1039
|
-
a.checked && !a.multiple &&
|
|
1128
|
+
a.checked && !a.multiple && l("update:checked", "");
|
|
1040
1129
|
},
|
|
1041
|
-
onLabelClick: (
|
|
1042
|
-
a.multiple ||
|
|
1130
|
+
onLabelClick: (r) => {
|
|
1131
|
+
a.multiple || r.stopPropagation();
|
|
1043
1132
|
}
|
|
1044
1133
|
};
|
|
1045
|
-
function
|
|
1046
|
-
|
|
1134
|
+
function n(r) {
|
|
1135
|
+
l("update:checked", r);
|
|
1047
1136
|
}
|
|
1048
|
-
return (
|
|
1137
|
+
return (r, g) => (o(), d("div", {
|
|
1049
1138
|
class: "joy-selectable-item__wrapper",
|
|
1050
1139
|
"aria-disabled": e.disabled,
|
|
1051
1140
|
onClick: g[2] || (g[2] = //@ts-ignore
|
|
1052
|
-
(...
|
|
1141
|
+
(...k) => f.onClick && f.onClick(...k))
|
|
1053
1142
|
}, [
|
|
1054
|
-
e.multiple ?
|
|
1143
|
+
e.multiple ? y("", !0) : (o(), d("input", {
|
|
1055
1144
|
key: 0,
|
|
1056
1145
|
id: e.id,
|
|
1057
1146
|
ref_key: "inputRadio",
|
|
1058
|
-
ref:
|
|
1147
|
+
ref: i,
|
|
1059
1148
|
type: "radio",
|
|
1060
1149
|
value: e.value,
|
|
1061
1150
|
checked: e.checked,
|
|
@@ -1063,11 +1152,11 @@ const yt = /* @__PURE__ */ j(ct, [["__scopeId", "data-v-f9015b7b"]]), mt = ["ari
|
|
|
1063
1152
|
required: e.required,
|
|
1064
1153
|
name: e.name,
|
|
1065
1154
|
onChange: g[0] || (g[0] = //@ts-ignore
|
|
1066
|
-
(...
|
|
1067
|
-
}, null, 40,
|
|
1068
|
-
(
|
|
1155
|
+
(...k) => f.onRadioChange && f.onRadioChange(...k))
|
|
1156
|
+
}, null, 40, Vt)),
|
|
1157
|
+
(o(), J(z(m(s)), {
|
|
1069
1158
|
for: e.id,
|
|
1070
|
-
class:
|
|
1159
|
+
class: b([
|
|
1071
1160
|
"joy-selectable-item",
|
|
1072
1161
|
{
|
|
1073
1162
|
"joy-selectable-item--disabled": e.disabled,
|
|
@@ -1076,16 +1165,16 @@ const yt = /* @__PURE__ */ j(ct, [["__scopeId", "data-v-f9015b7b"]]), mt = ["ari
|
|
|
1076
1165
|
"joy-selectable-item--single": !e.multiple
|
|
1077
1166
|
}
|
|
1078
1167
|
]),
|
|
1079
|
-
onClick:
|
|
1168
|
+
onClick: f.onLabelClick
|
|
1080
1169
|
}, {
|
|
1081
1170
|
default: q(() => [
|
|
1082
|
-
e.multiple ? (
|
|
1171
|
+
e.multiple ? (o(), J(m(T), {
|
|
1083
1172
|
key: 0,
|
|
1084
1173
|
id: e.id,
|
|
1085
1174
|
checked: t.value,
|
|
1086
1175
|
"onUpdate:checked": [
|
|
1087
|
-
g[1] || (g[1] = (
|
|
1088
|
-
|
|
1176
|
+
g[1] || (g[1] = (k) => t.value = k),
|
|
1177
|
+
n
|
|
1089
1178
|
],
|
|
1090
1179
|
disabled: e.disabled,
|
|
1091
1180
|
value: e.value,
|
|
@@ -1093,31 +1182,31 @@ const yt = /* @__PURE__ */ j(ct, [["__scopeId", "data-v-f9015b7b"]]), mt = ["ari
|
|
|
1093
1182
|
required: e.required
|
|
1094
1183
|
}, {
|
|
1095
1184
|
default: q(() => [
|
|
1096
|
-
|
|
1185
|
+
c(r.$slots, "default", {}, void 0, !0)
|
|
1097
1186
|
]),
|
|
1098
1187
|
_: 3
|
|
1099
|
-
}, 8, ["id", "checked", "disabled", "value", "name", "required"])) :
|
|
1100
|
-
e.multiple ?
|
|
1101
|
-
|
|
1102
|
-
class:
|
|
1188
|
+
}, 8, ["id", "checked", "disabled", "value", "name", "required"])) : y("", !0),
|
|
1189
|
+
e.multiple ? y("", !0) : c(r.$slots, "default", { key: 1 }, void 0, !0),
|
|
1190
|
+
u("div", {
|
|
1191
|
+
class: b([{ "joy-selectable-item__sublabel": r.$slots["selectable-item-sublabel"] }])
|
|
1103
1192
|
}, [
|
|
1104
|
-
|
|
1193
|
+
c(r.$slots, "selectable-item-sublabel", {}, void 0, !0)
|
|
1105
1194
|
], 2)
|
|
1106
1195
|
]),
|
|
1107
1196
|
_: 3
|
|
1108
1197
|
}, 8, ["for", "class", "onClick"]))
|
|
1109
|
-
], 8,
|
|
1198
|
+
], 8, Jt));
|
|
1110
1199
|
}
|
|
1111
1200
|
});
|
|
1112
|
-
const
|
|
1201
|
+
const U = /* @__PURE__ */ _(wt, [["__scopeId", "data-v-46f0bc5e"]]), Ct = ["id"], Lt = /* @__PURE__ */ p({
|
|
1113
1202
|
__name: "JoySelectableItemGroup",
|
|
1114
1203
|
props: {
|
|
1115
1204
|
options: {
|
|
1116
1205
|
type: Array,
|
|
1117
1206
|
required: !0,
|
|
1118
1207
|
validator(e) {
|
|
1119
|
-
const
|
|
1120
|
-
return
|
|
1208
|
+
const l = e.every((t) => Object.keys(t).includes("value")), a = e.every((t) => Object.keys(t).includes("label"));
|
|
1209
|
+
return l && a;
|
|
1121
1210
|
}
|
|
1122
1211
|
},
|
|
1123
1212
|
id: String,
|
|
@@ -1149,22 +1238,22 @@ const W = /* @__PURE__ */ j(bt, [["__scopeId", "data-v-6fdac15a"]]), vt = ["id"]
|
|
|
1149
1238
|
}
|
|
1150
1239
|
},
|
|
1151
1240
|
emits: ["update:value"],
|
|
1152
|
-
setup(e, { emit:
|
|
1241
|
+
setup(e, { emit: l }) {
|
|
1153
1242
|
const a = e;
|
|
1154
1243
|
function t(s) {
|
|
1155
1244
|
return typeof a.value == "string" ? a.value === s.value : (a.value || []).includes(s.value);
|
|
1156
1245
|
}
|
|
1157
|
-
function
|
|
1246
|
+
function i(s, f) {
|
|
1158
1247
|
if (!a.multiple)
|
|
1159
|
-
return
|
|
1160
|
-
let
|
|
1161
|
-
|
|
1248
|
+
return l("update:value", f);
|
|
1249
|
+
let n = [...a.value || []];
|
|
1250
|
+
f && typeof f == "boolean" ? n.push(s) : n.splice(n.indexOf(s), 1), l("update:value", n);
|
|
1162
1251
|
}
|
|
1163
|
-
return (s,
|
|
1252
|
+
return (s, f) => (o(), d("fieldset", {
|
|
1164
1253
|
id: e.id,
|
|
1165
1254
|
class: "joy-selectable-item-group__wrapper"
|
|
1166
1255
|
}, [
|
|
1167
|
-
e.label ? (
|
|
1256
|
+
e.label ? (o(), J(m(w), {
|
|
1168
1257
|
key: 0,
|
|
1169
1258
|
"tag-name": "legend",
|
|
1170
1259
|
required: e.required && e.requiredMark,
|
|
@@ -1175,9 +1264,9 @@ const W = /* @__PURE__ */ j(bt, [["__scopeId", "data-v-6fdac15a"]]), vt = ["id"]
|
|
|
1175
1264
|
B($(e.label), 1)
|
|
1176
1265
|
]),
|
|
1177
1266
|
_: 1
|
|
1178
|
-
}, 8, ["required", "optional-label", "size"])) :
|
|
1179
|
-
|
|
1180
|
-
class:
|
|
1267
|
+
}, 8, ["required", "optional-label", "size"])) : y("", !0),
|
|
1268
|
+
u("div", {
|
|
1269
|
+
class: b([
|
|
1181
1270
|
"joy-selectable-item-group",
|
|
1182
1271
|
{
|
|
1183
1272
|
"joy-selectable-item-group--multiple": e.multiple,
|
|
@@ -1186,33 +1275,33 @@ const W = /* @__PURE__ */ j(bt, [["__scopeId", "data-v-6fdac15a"]]), vt = ["id"]
|
|
|
1186
1275
|
}
|
|
1187
1276
|
])
|
|
1188
1277
|
}, [
|
|
1189
|
-
(
|
|
1190
|
-
id:
|
|
1191
|
-
key:
|
|
1192
|
-
name:
|
|
1193
|
-
value:
|
|
1278
|
+
(o(!0), d(A, null, F(e.options, (n) => (o(), J(m(U), {
|
|
1279
|
+
id: n.id,
|
|
1280
|
+
key: n.id,
|
|
1281
|
+
name: n.name,
|
|
1282
|
+
value: n.value,
|
|
1194
1283
|
multiple: e.multiple,
|
|
1195
|
-
checked: t(
|
|
1196
|
-
"onUpdate:checked": (
|
|
1197
|
-
},
|
|
1284
|
+
checked: t(n),
|
|
1285
|
+
"onUpdate:checked": (r) => i(n.value, r)
|
|
1286
|
+
}, Z({
|
|
1198
1287
|
default: q(() => [
|
|
1199
|
-
B($(
|
|
1288
|
+
B($(n.label) + " ", 1)
|
|
1200
1289
|
]),
|
|
1201
1290
|
_: 2
|
|
1202
1291
|
}, [
|
|
1203
|
-
|
|
1292
|
+
n.subLabel ? {
|
|
1204
1293
|
name: "selectable-item-sublabel",
|
|
1205
1294
|
fn: q(() => [
|
|
1206
|
-
B($(
|
|
1295
|
+
B($(n.subLabel), 1)
|
|
1207
1296
|
]),
|
|
1208
1297
|
key: "0"
|
|
1209
1298
|
} : void 0
|
|
1210
1299
|
]), 1032, ["id", "name", "value", "multiple", "checked", "onUpdate:checked"]))), 128))
|
|
1211
1300
|
], 2)
|
|
1212
|
-
], 8,
|
|
1301
|
+
], 8, Ct));
|
|
1213
1302
|
}
|
|
1214
1303
|
});
|
|
1215
|
-
const
|
|
1304
|
+
const zt = /* @__PURE__ */ _(Lt, [["__scopeId", "data-v-cec63fed"]]), Mt = /* @__PURE__ */ p({
|
|
1216
1305
|
__name: "JoyWrapper",
|
|
1217
1306
|
props: {
|
|
1218
1307
|
justify: {
|
|
@@ -1233,64 +1322,79 @@ const ht = /* @__PURE__ */ j(gt, [["__scopeId", "data-v-93c88f70"]]), pt = /* @_
|
|
|
1233
1322
|
}
|
|
1234
1323
|
},
|
|
1235
1324
|
setup(e) {
|
|
1236
|
-
return (
|
|
1237
|
-
class:
|
|
1325
|
+
return (l, a) => (o(), d("div", {
|
|
1326
|
+
class: b(["joy-wrapper", `joy-wrapper--justify-${e.justify}`, `joy-wrapper--align-${e.align}`, `joy-wrapper--direction-${e.direction}`, `joy-wrapper--wrap-${e.wrap}`])
|
|
1238
1327
|
}, [
|
|
1239
|
-
|
|
1328
|
+
c(l.$slots, "default", {}, void 0, !0)
|
|
1240
1329
|
], 2));
|
|
1241
1330
|
}
|
|
1242
1331
|
});
|
|
1243
|
-
const
|
|
1332
|
+
const Et = /* @__PURE__ */ _(Mt, [["__scopeId", "data-v-ce0e1214"]]), Nt = { class: "joy-template__heading" }, Tt = {
|
|
1333
|
+
key: 0,
|
|
1334
|
+
class: "joy-template-slot-back"
|
|
1335
|
+
}, Ot = { class: "joy-template__heading___headings" }, Rt = {
|
|
1336
|
+
key: 0,
|
|
1337
|
+
class: "joy-template-slot-title"
|
|
1338
|
+
}, At = {
|
|
1339
|
+
key: 1,
|
|
1340
|
+
class: "joy-template-slot-subtitle"
|
|
1341
|
+
}, Ft = {
|
|
1342
|
+
key: 0,
|
|
1343
|
+
class: "joy-template-slot-main"
|
|
1344
|
+
}, Pt = {
|
|
1345
|
+
key: 1,
|
|
1346
|
+
class: "joy-template-slot-sidebar"
|
|
1347
|
+
}, Ht = /* @__PURE__ */ p({
|
|
1244
1348
|
__name: "JoyTemplate",
|
|
1245
1349
|
props: {
|
|
1246
1350
|
full: { type: Boolean, default: !1 },
|
|
1247
1351
|
sidebar: { type: String, default: "right" }
|
|
1248
1352
|
},
|
|
1249
1353
|
setup(e) {
|
|
1250
|
-
const
|
|
1251
|
-
return (t,
|
|
1252
|
-
class:
|
|
1354
|
+
const l = e, a = C();
|
|
1355
|
+
return (t, i) => (o(), d("main", {
|
|
1356
|
+
class: b(["joy-template", { "joy-template--full": l.full }])
|
|
1253
1357
|
}, [
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
])) :
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
])) :
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
])) :
|
|
1358
|
+
u("div", Nt, [
|
|
1359
|
+
m(a)["template-back"] ? (o(), d("div", Tt, [
|
|
1360
|
+
c(t.$slots, "template-back", {}, void 0, !0)
|
|
1361
|
+
])) : y("", !0),
|
|
1362
|
+
u("div", Ot, [
|
|
1363
|
+
m(a)["template-title"] ? (o(), d("div", Rt, [
|
|
1364
|
+
c(t.$slots, "template-title", {}, void 0, !0)
|
|
1365
|
+
])) : y("", !0),
|
|
1366
|
+
m(a)["template-subtitle"] ? (o(), d("div", At, [
|
|
1367
|
+
c(t.$slots, "template-subtitle", {}, void 0, !0)
|
|
1368
|
+
])) : y("", !0)
|
|
1265
1369
|
])
|
|
1266
1370
|
]),
|
|
1267
|
-
|
|
1268
|
-
class:
|
|
1371
|
+
u("div", {
|
|
1372
|
+
class: b([
|
|
1269
1373
|
"joy-template__content",
|
|
1270
1374
|
{
|
|
1271
|
-
"joy-template__content--reverse":
|
|
1375
|
+
"joy-template__content--reverse": l.sidebar === "left"
|
|
1272
1376
|
}
|
|
1273
1377
|
])
|
|
1274
1378
|
}, [
|
|
1275
|
-
t.$slots["template-main"] ? (
|
|
1276
|
-
|
|
1277
|
-
])) :
|
|
1278
|
-
t.$slots["template-sidebar"] ? (
|
|
1279
|
-
|
|
1280
|
-
])) :
|
|
1379
|
+
t.$slots["template-main"] ? (o(), d("div", Ft, [
|
|
1380
|
+
c(t.$slots, "template-main", {}, void 0, !0)
|
|
1381
|
+
])) : y("", !0),
|
|
1382
|
+
t.$slots["template-sidebar"] ? (o(), d("div", Pt, [
|
|
1383
|
+
c(t.$slots, "template-sidebar", {}, void 0, !0)
|
|
1384
|
+
])) : y("", !0)
|
|
1281
1385
|
], 2)
|
|
1282
1386
|
], 2));
|
|
1283
1387
|
}
|
|
1284
1388
|
});
|
|
1285
|
-
const
|
|
1389
|
+
const Gt = /* @__PURE__ */ _(Ht, [["__scopeId", "data-v-b332d474"]]), Ut = ["aria-disabled"], Wt = ["id", "disabled", "name", "required", "minlength", "value"], Dt = {
|
|
1286
1390
|
key: 0,
|
|
1287
1391
|
class: "joy-textarea_helpers"
|
|
1288
|
-
},
|
|
1392
|
+
}, Kt = {
|
|
1289
1393
|
key: 0,
|
|
1290
1394
|
name: "check",
|
|
1291
1395
|
color: "grey",
|
|
1292
1396
|
size: "xxsmall"
|
|
1293
|
-
},
|
|
1397
|
+
}, Zt = /* @__PURE__ */ p({
|
|
1294
1398
|
__name: "JoyTextarea",
|
|
1295
1399
|
props: {
|
|
1296
1400
|
disabled: {
|
|
@@ -1311,7 +1415,6 @@ const Vt = /* @__PURE__ */ j(Bt, [["__scopeId", "data-v-ba1a4be0"]]), Jt = ["ari
|
|
|
1311
1415
|
type: Boolean,
|
|
1312
1416
|
default: !1
|
|
1313
1417
|
},
|
|
1314
|
-
// ...FORM_BASED_PROPS,
|
|
1315
1418
|
label: String,
|
|
1316
1419
|
labelSize: {
|
|
1317
1420
|
type: String,
|
|
@@ -1322,12 +1425,10 @@ const Vt = /* @__PURE__ */ j(Bt, [["__scopeId", "data-v-ba1a4be0"]]), Jt = ["ari
|
|
|
1322
1425
|
type: Boolean,
|
|
1323
1426
|
default: !1
|
|
1324
1427
|
},
|
|
1325
|
-
// ...LABEL_BASED_PROPS,
|
|
1326
1428
|
modelValue: {
|
|
1327
1429
|
type: String,
|
|
1328
1430
|
default: ""
|
|
1329
1431
|
},
|
|
1330
|
-
// ...TEXT_BASED_PROPS,
|
|
1331
1432
|
autogrow: {
|
|
1332
1433
|
type: Boolean,
|
|
1333
1434
|
default: !1
|
|
@@ -1341,88 +1442,88 @@ const Vt = /* @__PURE__ */ j(Bt, [["__scopeId", "data-v-ba1a4be0"]]), Jt = ["ari
|
|
|
1341
1442
|
}
|
|
1342
1443
|
},
|
|
1343
1444
|
emits: ["update:modelValue"],
|
|
1344
|
-
setup(e, { expose:
|
|
1345
|
-
const t = e,
|
|
1445
|
+
setup(e, { expose: l, emit: a }) {
|
|
1446
|
+
const t = e, i = S(), s = S(), f = S(!1), n = V(() => t.maxlength ? t.modelValue.length > t.maxlength : !1), r = V(() => t.minlength ? t.modelValue.length < t.minlength : !1);
|
|
1346
1447
|
function g() {
|
|
1347
|
-
|
|
1448
|
+
i.value && t.autogrow && (i.value.style.height = "auto", i.value.style.height = i.value.scrollHeight + "px", s.value && (s.value.style.height = i.value.scrollHeight + "px"));
|
|
1348
1449
|
}
|
|
1349
|
-
|
|
1450
|
+
N(() => {
|
|
1350
1451
|
g();
|
|
1351
1452
|
});
|
|
1352
|
-
const
|
|
1453
|
+
const k = {
|
|
1353
1454
|
onInput: (I) => {
|
|
1354
1455
|
a("update:modelValue", I.target.value), g();
|
|
1355
1456
|
},
|
|
1356
1457
|
onBlur: () => {
|
|
1357
|
-
|
|
1458
|
+
f.value = n.value || r.value;
|
|
1358
1459
|
}
|
|
1359
1460
|
};
|
|
1360
|
-
return
|
|
1361
|
-
isInvalid:
|
|
1362
|
-
valueOverMaxlength:
|
|
1363
|
-
valueUnderMinlength:
|
|
1364
|
-
}), (I,
|
|
1461
|
+
return l({
|
|
1462
|
+
isInvalid: f,
|
|
1463
|
+
valueOverMaxlength: n,
|
|
1464
|
+
valueUnderMinlength: r
|
|
1465
|
+
}), (I, j) => (o(), d("div", {
|
|
1365
1466
|
"aria-disabled": e.disabled,
|
|
1366
|
-
class:
|
|
1467
|
+
class: b([
|
|
1367
1468
|
"joy-textarea",
|
|
1368
1469
|
{
|
|
1369
|
-
"joy-textarea_invalid":
|
|
1470
|
+
"joy-textarea_invalid": f.value || e.invalid,
|
|
1370
1471
|
"joy-textarea_disabled": e.disabled,
|
|
1371
1472
|
"joy-textarea_autogrow": e.autogrow
|
|
1372
1473
|
}
|
|
1373
1474
|
])
|
|
1374
1475
|
}, [
|
|
1375
|
-
R(
|
|
1476
|
+
R(m(w), {
|
|
1376
1477
|
for: e.id,
|
|
1377
1478
|
required: e.required && e.requiredMark,
|
|
1378
1479
|
"optional-label": e.optionalLabel,
|
|
1379
1480
|
size: e.labelSize
|
|
1380
1481
|
}, {
|
|
1381
1482
|
default: q(() => [
|
|
1382
|
-
|
|
1483
|
+
c(I.$slots, "default", {}, () => [
|
|
1383
1484
|
B($(e.label), 1)
|
|
1384
1485
|
], !0)
|
|
1385
1486
|
]),
|
|
1386
1487
|
_: 3
|
|
1387
1488
|
}, 8, ["for", "required", "optional-label", "size"]),
|
|
1388
|
-
|
|
1489
|
+
u("div", {
|
|
1389
1490
|
ref_key: "textareaWrapper",
|
|
1390
1491
|
ref: s,
|
|
1391
1492
|
class: "joy-textarea_wrapper"
|
|
1392
1493
|
}, [
|
|
1393
|
-
|
|
1494
|
+
u("textarea", L(I.$attrs, {
|
|
1394
1495
|
id: e.id,
|
|
1395
1496
|
ref_key: "textarea",
|
|
1396
|
-
ref:
|
|
1497
|
+
ref: i,
|
|
1397
1498
|
class: "joy-native-textarea",
|
|
1398
1499
|
disabled: e.disabled,
|
|
1399
1500
|
name: e.name,
|
|
1400
1501
|
required: e.required,
|
|
1401
1502
|
minlength: e.minlength,
|
|
1402
1503
|
value: e.modelValue,
|
|
1403
|
-
onInput:
|
|
1404
|
-
(...
|
|
1405
|
-
onBlur:
|
|
1406
|
-
(...
|
|
1407
|
-
}), null, 16,
|
|
1504
|
+
onInput: j[0] || (j[0] = //@ts-ignore
|
|
1505
|
+
(...v) => k.onInput && k.onInput(...v)),
|
|
1506
|
+
onBlur: j[1] || (j[1] = //@ts-ignore
|
|
1507
|
+
(...v) => k.onBlur && k.onBlur(...v))
|
|
1508
|
+
}), null, 16, Wt)
|
|
1408
1509
|
], 512),
|
|
1409
|
-
e.minlength || e.maxlength ? (
|
|
1410
|
-
e.minlength ? (
|
|
1510
|
+
e.minlength || e.maxlength ? (o(), d("div", Dt, [
|
|
1511
|
+
e.minlength ? (o(), d("p", {
|
|
1411
1512
|
key: 0,
|
|
1412
|
-
class:
|
|
1513
|
+
class: b(["joy-textarea-min", { "joy-textarea-min-invalid": e.invalid }])
|
|
1413
1514
|
}, [
|
|
1414
|
-
|
|
1515
|
+
m(r) ? y("", !0) : (o(), d("joy-icon", Kt)),
|
|
1415
1516
|
B(" " + $(e.minlengthLabel || `Minimum ${e.minlength} characters`), 1)
|
|
1416
|
-
], 2)) :
|
|
1417
|
-
e.maxlength ? (
|
|
1517
|
+
], 2)) : y("", !0),
|
|
1518
|
+
e.maxlength ? (o(), d("p", {
|
|
1418
1519
|
key: 1,
|
|
1419
|
-
class:
|
|
1420
|
-
}, $(e.modelValue.length + "/" + e.maxlength), 3)) :
|
|
1421
|
-
])) :
|
|
1422
|
-
], 10,
|
|
1520
|
+
class: b(["joy-textarea-count", { "joy-textarea-count-invalid": m(n) }])
|
|
1521
|
+
}, $(e.modelValue.length + "/" + e.maxlength), 3)) : y("", !0)
|
|
1522
|
+
])) : y("", !0)
|
|
1523
|
+
], 10, Ut));
|
|
1423
1524
|
}
|
|
1424
1525
|
});
|
|
1425
|
-
const
|
|
1526
|
+
const Qt = /* @__PURE__ */ _(Zt, [["__scopeId", "data-v-4505e508"]]), Xt = ["name", "disabled", "checked", "required", "aria-checked", "value"], Yt = { class: "joy-toggle__content" }, ea = /* @__PURE__ */ p({
|
|
1426
1527
|
__name: "JoyToggle",
|
|
1427
1528
|
props: {
|
|
1428
1529
|
modelValue: {
|
|
@@ -1455,16 +1556,16 @@ const Mt = /* @__PURE__ */ j(zt, [["__scopeId", "data-v-d68ef0dd"]]), Tt = ["nam
|
|
|
1455
1556
|
label: String
|
|
1456
1557
|
},
|
|
1457
1558
|
emits: ["update:modelValue"],
|
|
1458
|
-
setup(e, { emit:
|
|
1559
|
+
setup(e, { emit: l }) {
|
|
1459
1560
|
const a = {
|
|
1460
1561
|
onChange: (t) => {
|
|
1461
|
-
const
|
|
1462
|
-
|
|
1562
|
+
const i = t.target.checked;
|
|
1563
|
+
l("update:modelValue", i);
|
|
1463
1564
|
}
|
|
1464
1565
|
};
|
|
1465
|
-
return (t,
|
|
1466
|
-
|
|
1467
|
-
class:
|
|
1566
|
+
return (t, i) => (o(), d("div", null, [
|
|
1567
|
+
u("label", {
|
|
1568
|
+
class: b([
|
|
1468
1569
|
"joy-toggle",
|
|
1469
1570
|
{
|
|
1470
1571
|
"joy-toggle__checked": e.modelValue,
|
|
@@ -1472,7 +1573,7 @@ const Mt = /* @__PURE__ */ j(zt, [["__scopeId", "data-v-d68ef0dd"]]), Tt = ["nam
|
|
|
1472
1573
|
}
|
|
1473
1574
|
])
|
|
1474
1575
|
}, [
|
|
1475
|
-
|
|
1576
|
+
u("input", {
|
|
1476
1577
|
ref: "input",
|
|
1477
1578
|
type: "checkbox",
|
|
1478
1579
|
class: "joy-toggle__input",
|
|
@@ -1483,11 +1584,11 @@ const Mt = /* @__PURE__ */ j(zt, [["__scopeId", "data-v-d68ef0dd"]]), Tt = ["nam
|
|
|
1483
1584
|
required: e.required,
|
|
1484
1585
|
"aria-checked": e.modelValue,
|
|
1485
1586
|
value: e.value,
|
|
1486
|
-
onChange:
|
|
1587
|
+
onChange: i[0] || (i[0] = //@ts-ignore
|
|
1487
1588
|
(...s) => a.onChange && a.onChange(...s))
|
|
1488
|
-
}, null, 40,
|
|
1489
|
-
|
|
1490
|
-
|
|
1589
|
+
}, null, 40, Xt),
|
|
1590
|
+
u("p", Yt, [
|
|
1591
|
+
c(t.$slots, "default", {}, () => [
|
|
1491
1592
|
B($(e.label), 1)
|
|
1492
1593
|
], !0)
|
|
1493
1594
|
])
|
|
@@ -1495,53 +1596,57 @@ const Mt = /* @__PURE__ */ j(zt, [["__scopeId", "data-v-d68ef0dd"]]), Tt = ["nam
|
|
|
1495
1596
|
]));
|
|
1496
1597
|
}
|
|
1497
1598
|
});
|
|
1498
|
-
const
|
|
1599
|
+
const ta = /* @__PURE__ */ _(ea, [["__scopeId", "data-v-e31a6b5e"]]), aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1499
1600
|
__proto__: null,
|
|
1500
|
-
JoyButton:
|
|
1501
|
-
JoyCheckbox:
|
|
1502
|
-
JoyCounter:
|
|
1503
|
-
JoyFormError:
|
|
1504
|
-
JoyHighlight:
|
|
1505
|
-
JoyInput:
|
|
1506
|
-
JoyLabel:
|
|
1507
|
-
JoyLink:
|
|
1508
|
-
JoyMultiCheckbox:
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1601
|
+
JoyButton: ue,
|
|
1602
|
+
JoyCheckbox: T,
|
|
1603
|
+
JoyCounter: xe,
|
|
1604
|
+
JoyFormError: G,
|
|
1605
|
+
JoyHighlight: Me,
|
|
1606
|
+
JoyInput: Ge,
|
|
1607
|
+
JoyLabel: w,
|
|
1608
|
+
JoyLink: Ze,
|
|
1609
|
+
JoyMultiCheckbox: et,
|
|
1610
|
+
JoyPanel: st,
|
|
1611
|
+
JoyPanelSection: ft,
|
|
1612
|
+
JoyRadio: _t,
|
|
1613
|
+
JoyRadioGroup: St,
|
|
1614
|
+
JoySelect: Bt,
|
|
1615
|
+
JoySelectableItem: U,
|
|
1616
|
+
JoySelectableItemGroup: zt,
|
|
1617
|
+
JoySpinner: P,
|
|
1618
|
+
JoyTemplate: Gt,
|
|
1619
|
+
JoyTextarea: Qt,
|
|
1620
|
+
JoyToggle: ta,
|
|
1621
|
+
JoyWrapper: Et
|
|
1622
|
+
}, Symbol.toStringTag, { value: "Module" })), na = {
|
|
1520
1623
|
install: (e) => {
|
|
1521
|
-
Object.entries(
|
|
1522
|
-
e.component(
|
|
1624
|
+
Object.entries(aa).forEach(([l, a]) => {
|
|
1625
|
+
e.component(l, a);
|
|
1523
1626
|
});
|
|
1524
1627
|
}
|
|
1525
1628
|
};
|
|
1526
1629
|
export {
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1630
|
+
ue as JoyButton,
|
|
1631
|
+
T as JoyCheckbox,
|
|
1632
|
+
xe as JoyCounter,
|
|
1633
|
+
G as JoyFormError,
|
|
1634
|
+
Me as JoyHighlight,
|
|
1635
|
+
Ge as JoyInput,
|
|
1636
|
+
w as JoyLabel,
|
|
1637
|
+
Ze as JoyLink,
|
|
1638
|
+
et as JoyMultiCheckbox,
|
|
1639
|
+
st as JoyPanel,
|
|
1640
|
+
ft as JoyPanelSection,
|
|
1641
|
+
_t as JoyRadio,
|
|
1642
|
+
St as JoyRadioGroup,
|
|
1643
|
+
Bt as JoySelect,
|
|
1644
|
+
U as JoySelectableItem,
|
|
1645
|
+
zt as JoySelectableItemGroup,
|
|
1646
|
+
P as JoySpinner,
|
|
1647
|
+
Gt as JoyTemplate,
|
|
1648
|
+
Qt as JoyTextarea,
|
|
1649
|
+
ta as JoyToggle,
|
|
1650
|
+
na as JoyVuePlugin,
|
|
1651
|
+
Et as JoyWrapper
|
|
1547
1652
|
};
|