@defaultusr/dai-ui 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +143 -143
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useFormControl as
|
|
1
|
+
import { useFormControl as A, Combobox as te, ComboboxInput as oe, injectCombobox as ae, ComboboxOptions as le, ComboboxOption as ie, PopoverDialog as ne, MenuItems as se, MenuItem as re, Tab as de, TabList as ue } from "vue-composable-ui";
|
|
2
2
|
import { Menu as Nt, Popover as Ut, TabContainer as Xt, TabPanel as Dt } from "vue-composable-ui";
|
|
3
|
-
import { reactive as ce, watch as
|
|
3
|
+
import { reactive as ce, watch as T, onUnmounted as R, defineComponent as v, createElementBlock as u, openBlock as i, renderSlot as b, createTextVNode as z, toDisplayString as k, normalizeClass as w, createBlock as p, createCommentVNode as y, createElementVNode as d, computed as _, createVNode as V, normalizeProps as fe, guardReactiveProps as me, withCtx as f, Transition as P, mergeModels as C, useModel as B, useId as q, useTemplateRef as L, mergeProps as $, unref as n, inject as ve, Fragment as I, ref as U, onMounted as O, withDirectives as X, renderList as D, vModelSelect as he, vModelText as pe, vModelRadio as be, resolveDynamicComponent as ye, nextTick as ge, normalizeStyle as N, Teleport as Z, TransitionGroup as we, withModifiers as ke } from "vue";
|
|
4
4
|
import './assets/main.css';function $e(e, ...t) {
|
|
5
5
|
let o = [];
|
|
6
6
|
const l = ce(t);
|
|
@@ -10,7 +10,7 @@ import './assets/main.css';function $e(e, ...t) {
|
|
|
10
10
|
function s() {
|
|
11
11
|
e.classList.remove(...o);
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return T(
|
|
14
14
|
l,
|
|
15
15
|
() => {
|
|
16
16
|
s(), a();
|
|
@@ -27,7 +27,7 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
27
27
|
},
|
|
28
28
|
setup(e) {
|
|
29
29
|
return (t, o) => (i(), u("label", xe, [
|
|
30
|
-
|
|
30
|
+
b(t.$slots, "default", {}, () => [
|
|
31
31
|
z(k(e.text), 1)
|
|
32
32
|
])
|
|
33
33
|
]));
|
|
@@ -39,7 +39,7 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
39
39
|
},
|
|
40
40
|
setup(e) {
|
|
41
41
|
return (t, o) => (i(), u("div", _e, [
|
|
42
|
-
|
|
42
|
+
b(t.$slots, "default", {}, () => [
|
|
43
43
|
z(k(e.text), 1)
|
|
44
44
|
])
|
|
45
45
|
]));
|
|
@@ -69,14 +69,14 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
69
69
|
"dai-form-control__input-group--invalid": e.invalid
|
|
70
70
|
}])
|
|
71
71
|
}, [
|
|
72
|
-
e.label ? (i(),
|
|
72
|
+
e.label ? (i(), p(F, {
|
|
73
73
|
key: 0,
|
|
74
74
|
text: e.label,
|
|
75
75
|
for: e.labelFor,
|
|
76
76
|
class: "dai-form-control__input-group__label"
|
|
77
77
|
}, null, 8, ["text", "for"])) : y("", !0),
|
|
78
78
|
d("div", Be, [
|
|
79
|
-
|
|
79
|
+
b(t.$slots, "default")
|
|
80
80
|
])
|
|
81
81
|
], 2));
|
|
82
82
|
}
|
|
@@ -112,7 +112,7 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
112
112
|
"dai-form-control--lg": l.value === "large"
|
|
113
113
|
}])
|
|
114
114
|
}, [
|
|
115
|
-
e.label && e.labelPosition !== "inside" ? (i(),
|
|
115
|
+
e.label && e.labelPosition !== "inside" ? (i(), p(F, {
|
|
116
116
|
key: 0,
|
|
117
117
|
for: e.labelFor,
|
|
118
118
|
text: e.label
|
|
@@ -124,18 +124,18 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
124
124
|
variant: o.value,
|
|
125
125
|
size: l.value
|
|
126
126
|
})), {
|
|
127
|
-
default:
|
|
128
|
-
|
|
127
|
+
default: f(() => [
|
|
128
|
+
b(a.$slots, "default")
|
|
129
129
|
]),
|
|
130
130
|
_: 3
|
|
131
131
|
}, 16),
|
|
132
|
-
e.hint ? (i(),
|
|
132
|
+
e.hint ? (i(), p(H, {
|
|
133
133
|
key: 0,
|
|
134
134
|
text: e.hint,
|
|
135
135
|
class: "dai-form-control__hint"
|
|
136
136
|
}, null, 8, ["text"])) : y("", !0),
|
|
137
137
|
V(P, { name: "dai-form-control__validation-message-transition" }, {
|
|
138
|
-
default:
|
|
138
|
+
default: f(() => [
|
|
139
139
|
e.validationMessage ? (i(), u("div", Ce, [
|
|
140
140
|
s[0] || (s[0] = d("svg", {
|
|
141
141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -182,31 +182,31 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
182
182
|
}),
|
|
183
183
|
emits: ["update:modelValue"],
|
|
184
184
|
setup(e) {
|
|
185
|
-
const t = e, o = B(e, "modelValue"), l = t.id || q(), a = L("formElement"), { isValid: s, validationMessage: r } =
|
|
185
|
+
const t = e, o = B(e, "modelValue"), l = t.id || q(), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = A(
|
|
186
186
|
a,
|
|
187
187
|
t.validators,
|
|
188
188
|
t.showValidationError
|
|
189
189
|
);
|
|
190
|
-
return (g,
|
|
190
|
+
return T(o, () => g()), (h, m) => (i(), p(S, $(t, {
|
|
191
191
|
labelFor: n(l),
|
|
192
192
|
validationMessage: e.showValidationError ? "" : n(r),
|
|
193
193
|
invalid: !n(s),
|
|
194
|
-
class:
|
|
194
|
+
class: h.$attrs.class
|
|
195
195
|
}), {
|
|
196
|
-
default:
|
|
197
|
-
V(n(te), $({ ...
|
|
196
|
+
default: f(() => [
|
|
197
|
+
V(n(te), $({ ...h.$attrs, class: void 0, required: void 0 }, {
|
|
198
198
|
id: n(l),
|
|
199
199
|
modelValue: o.value,
|
|
200
|
-
"onUpdate:modelValue":
|
|
200
|
+
"onUpdate:modelValue": m[0] || (m[0] = (c) => o.value = c)
|
|
201
201
|
}), {
|
|
202
|
-
default:
|
|
202
|
+
default: f(() => [
|
|
203
203
|
d("input", $({
|
|
204
204
|
ref_key: "formElement",
|
|
205
205
|
ref: a,
|
|
206
206
|
type: "text",
|
|
207
207
|
value: o.value
|
|
208
|
-
}, { required:
|
|
209
|
-
|
|
208
|
+
}, { required: h.$attrs.required }, { class: "dai-combobox__stab-input" }), null, 16, Ee),
|
|
209
|
+
b(h.$slots, "default")
|
|
210
210
|
]),
|
|
211
211
|
_: 3
|
|
212
212
|
}, 16, ["id", "modelValue"])
|
|
@@ -217,9 +217,9 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
217
217
|
}), kt = /* @__PURE__ */ v({
|
|
218
218
|
__name: "comboboxInput",
|
|
219
219
|
setup(e) {
|
|
220
|
-
return (t, o) => (i(),
|
|
221
|
-
default:
|
|
222
|
-
|
|
220
|
+
return (t, o) => (i(), p(n(oe), { class: "dai-form-control__input-group__control" }, {
|
|
221
|
+
default: f(() => [
|
|
222
|
+
b(t.$slots, "default")
|
|
223
223
|
]),
|
|
224
224
|
_: 3
|
|
225
225
|
}));
|
|
@@ -245,7 +245,7 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
245
245
|
type: "button",
|
|
246
246
|
class: "dai-form-control__input-group__control dai-combobox-btn"
|
|
247
247
|
}), [
|
|
248
|
-
|
|
248
|
+
b(l.$slots, "default", {}, () => [
|
|
249
249
|
n(t).displayValue.value ? (i(), u(I, { key: 1 }, [
|
|
250
250
|
z(k(n(t).displayValue), 1)
|
|
251
251
|
], 64)) : (i(), u("span", Le, k(e.placeholder || "Select..."), 1)),
|
|
@@ -268,14 +268,14 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
268
268
|
}), Te = /* @__PURE__ */ v({
|
|
269
269
|
__name: "comboboxOptions",
|
|
270
270
|
setup(e) {
|
|
271
|
-
return (t, o) => (i(),
|
|
271
|
+
return (t, o) => (i(), p(P, {
|
|
272
272
|
"enter-from-class": "dai-combobox-options--anim",
|
|
273
273
|
"leave-to-class": "dai-combobox-options--anim"
|
|
274
274
|
}, {
|
|
275
|
-
default:
|
|
275
|
+
default: f(() => [
|
|
276
276
|
V(n(le), { class: "dai-combobox-options" }, {
|
|
277
|
-
default:
|
|
278
|
-
|
|
277
|
+
default: f(() => [
|
|
278
|
+
b(t.$slots, "default")
|
|
279
279
|
]),
|
|
280
280
|
_: 3
|
|
281
281
|
})
|
|
@@ -294,12 +294,12 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
294
294
|
value: {}
|
|
295
295
|
},
|
|
296
296
|
setup(e) {
|
|
297
|
-
return (t, o) => (i(),
|
|
297
|
+
return (t, o) => (i(), p(n(ie), {
|
|
298
298
|
value: e.value,
|
|
299
299
|
class: "dai-combobox-option"
|
|
300
300
|
}, {
|
|
301
|
-
default:
|
|
302
|
-
|
|
301
|
+
default: f(({ isActive: l, isSelected: a }) => [
|
|
302
|
+
b(t.$slots, "default", {
|
|
303
303
|
isActive: l,
|
|
304
304
|
isSelected: a
|
|
305
305
|
}),
|
|
@@ -328,7 +328,7 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
328
328
|
};
|
|
329
329
|
function Fe(e, t) {
|
|
330
330
|
return i(), u("button", Oe, [
|
|
331
|
-
|
|
331
|
+
b(e.$slots, "default")
|
|
332
332
|
]);
|
|
333
333
|
}
|
|
334
334
|
const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern", "title", "autocomplete", "value"], Ne = {
|
|
@@ -382,20 +382,20 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
382
382
|
set(M) {
|
|
383
383
|
return r.value && (r.value.files = M), M;
|
|
384
384
|
}
|
|
385
|
-
}), r = L("formElement"), { isValid: g, validationMessage:
|
|
385
|
+
}), r = L("formElement"), { isValid: g, validationMessage: h, validate: m } = A(
|
|
386
386
|
r,
|
|
387
387
|
t.validators,
|
|
388
388
|
t.showValidationError
|
|
389
|
-
),
|
|
390
|
-
|
|
389
|
+
), c = U(!1);
|
|
390
|
+
T(a, () => {
|
|
391
391
|
s.value = r.value?.files || null;
|
|
392
392
|
});
|
|
393
393
|
let x;
|
|
394
|
-
const j = _(() => t.type === "password" ?
|
|
394
|
+
const j = _(() => t.type === "password" ? c.value ? "text" : "password" : t.type), Y = _(() => t.mask ? t.mask : t.type === "tel" ? {
|
|
395
395
|
mask: "{+7} (000) 000-00-00"
|
|
396
396
|
} : t.mask), G = _(() => t.pattern ? t.pattern : t.type === "tel" ? "^\\+7 \\(9\\d{2}\\) \\d{3}-\\d{2}-\\d{2}" : t.pattern), Q = _(() => t.title ? t.title : t.type === "tel" ? "+7 (999) 888-77-66" : t.title);
|
|
397
397
|
function W() {
|
|
398
|
-
|
|
398
|
+
c.value = !c.value;
|
|
399
399
|
}
|
|
400
400
|
function J() {
|
|
401
401
|
a.value = "";
|
|
@@ -415,14 +415,14 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
415
415
|
a.value = x.value;
|
|
416
416
|
});
|
|
417
417
|
});
|
|
418
|
-
}), (M, E) => (i(),
|
|
418
|
+
}), (M, E) => (i(), p(S, $(t, {
|
|
419
419
|
"label-for": n(o),
|
|
420
|
-
"validation-message": e.showValidationError ? "" : n(
|
|
420
|
+
"validation-message": e.showValidationError ? "" : n(h),
|
|
421
421
|
invalid: t.invalid || !n(g),
|
|
422
422
|
class: M.$attrs.class
|
|
423
423
|
}), {
|
|
424
|
-
default:
|
|
425
|
-
|
|
424
|
+
default: f(() => [
|
|
425
|
+
b(M.$slots, "prepend"),
|
|
426
426
|
d("input", $({
|
|
427
427
|
ref_key: "formElement",
|
|
428
428
|
ref: r
|
|
@@ -434,16 +434,16 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
434
434
|
autocomplete: l.value,
|
|
435
435
|
value: a.value,
|
|
436
436
|
onInputPassive: ee,
|
|
437
|
-
onKeyupPassive: E[0] || (E[0] = (yt) => !n(g) && n(
|
|
437
|
+
onKeyupPassive: E[0] || (E[0] = (yt) => !n(g) && n(m)()),
|
|
438
438
|
class: "dai-form-control__input-group__control dai-form-control__input"
|
|
439
439
|
}), null, 16, Se),
|
|
440
|
-
|
|
441
|
-
t.type === "password" && a.value ? (i(),
|
|
440
|
+
b(M.$slots, "append"),
|
|
441
|
+
t.type === "password" && a.value ? (i(), p(K, {
|
|
442
442
|
key: 0,
|
|
443
443
|
onClick: W
|
|
444
444
|
}, {
|
|
445
|
-
default:
|
|
446
|
-
|
|
445
|
+
default: f(() => [
|
|
446
|
+
c.value ? (i(), u("svg", Ue, [...E[2] || (E[2] = [
|
|
447
447
|
d("path", {
|
|
448
448
|
"stroke-linecap": "round",
|
|
449
449
|
"stroke-linejoin": "round",
|
|
@@ -467,11 +467,11 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
467
467
|
]),
|
|
468
468
|
_: 1
|
|
469
469
|
})) : y("", !0),
|
|
470
|
-
e.clearable && a.value && !t.disabled ? (i(),
|
|
470
|
+
e.clearable && a.value && !t.disabled ? (i(), p(K, {
|
|
471
471
|
key: 1,
|
|
472
472
|
onClick: J
|
|
473
473
|
}, {
|
|
474
|
-
default:
|
|
474
|
+
default: f(() => [...E[3] || (E[3] = [
|
|
475
475
|
d("svg", {
|
|
476
476
|
xmlns: "http://www.w3.org/2000/svg",
|
|
477
477
|
fill: "none",
|
|
@@ -522,36 +522,36 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
522
522
|
}),
|
|
523
523
|
emits: ["update:modelValue"],
|
|
524
524
|
setup(e) {
|
|
525
|
-
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } =
|
|
525
|
+
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = A(
|
|
526
526
|
a,
|
|
527
527
|
t.validators,
|
|
528
528
|
t.showValidationError
|
|
529
529
|
);
|
|
530
|
-
return (
|
|
530
|
+
return (h, m) => (i(), p(S, $(t, {
|
|
531
531
|
"label-for": n(o),
|
|
532
532
|
"validation-message": e.showValidationError ? "" : n(r),
|
|
533
533
|
invalid: t.invalid || !n(s),
|
|
534
|
-
class:
|
|
534
|
+
class: h.$attrs.class
|
|
535
535
|
}), {
|
|
536
|
-
default:
|
|
536
|
+
default: f(() => [
|
|
537
537
|
X(d("select", $({
|
|
538
538
|
ref_key: "formElement",
|
|
539
539
|
ref: a
|
|
540
|
-
}, { ...
|
|
540
|
+
}, { ...h.$attrs, class: void 0 }, {
|
|
541
541
|
id: n(o),
|
|
542
|
-
"onUpdate:modelValue":
|
|
542
|
+
"onUpdate:modelValue": m[0] || (m[0] = (c) => l.value = c),
|
|
543
543
|
class: "dai-form-control__input-group__control dai-select"
|
|
544
544
|
}), [
|
|
545
|
-
|
|
546
|
-
(i(!0), u(I, null, D(e.options, (
|
|
547
|
-
value:
|
|
548
|
-
key:
|
|
549
|
-
}, k(
|
|
545
|
+
b(h.$slots, "default", {}, () => [
|
|
546
|
+
(i(!0), u(I, null, D(e.options, (c) => (i(), u("option", {
|
|
547
|
+
value: c[e.optionValue],
|
|
548
|
+
key: c[e.optionValue]
|
|
549
|
+
}, k(c[e.optionText]), 9, De))), 128))
|
|
550
550
|
])
|
|
551
551
|
], 16, Xe), [
|
|
552
552
|
[he, l.value]
|
|
553
553
|
]),
|
|
554
|
-
|
|
554
|
+
m[1] || (m[1] = d("svg", {
|
|
555
555
|
class: "dai-select__chevron",
|
|
556
556
|
xmlns: "http://www.w3.org/2000/svg",
|
|
557
557
|
viewBox: "0 0 16 16"
|
|
@@ -598,20 +598,20 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
598
598
|
emits: ["update:modelValue"],
|
|
599
599
|
setup(e) {
|
|
600
600
|
const t = e, o = B(e, "modelValue");
|
|
601
|
-
return (l, a) => (i(),
|
|
601
|
+
return (l, a) => (i(), p(n(ze), $(t, {
|
|
602
602
|
displayValue: (s) => e.options.find((r) => r[e.optionValue] === s)?.[e.optionText] || "",
|
|
603
603
|
modelValue: o.value,
|
|
604
604
|
"onUpdate:modelValue": a[0] || (a[0] = (s) => o.value = s)
|
|
605
605
|
}), {
|
|
606
|
-
default:
|
|
606
|
+
default: f(() => [
|
|
607
607
|
V(n(qe), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
|
|
608
608
|
V(n(Te), null, {
|
|
609
|
-
default:
|
|
610
|
-
(i(!0), u(I, null, D(e.options, (s) => (i(),
|
|
609
|
+
default: f(() => [
|
|
610
|
+
(i(!0), u(I, null, D(e.options, (s) => (i(), p(n(Pe), {
|
|
611
611
|
key: s[e.optionValue],
|
|
612
612
|
value: s[e.optionValue]
|
|
613
613
|
}, {
|
|
614
|
-
default:
|
|
614
|
+
default: f(() => [
|
|
615
615
|
z(k(s[e.optionText]), 1)
|
|
616
616
|
]),
|
|
617
617
|
_: 2
|
|
@@ -637,31 +637,31 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
637
637
|
}),
|
|
638
638
|
emits: ["update:modelValue"],
|
|
639
639
|
setup(e) {
|
|
640
|
-
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } =
|
|
640
|
+
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = A(
|
|
641
641
|
a,
|
|
642
642
|
t.validators,
|
|
643
643
|
t.showValidationError
|
|
644
644
|
);
|
|
645
|
-
function
|
|
645
|
+
function h() {
|
|
646
646
|
if (!t.autosize) return;
|
|
647
|
-
const
|
|
648
|
-
|
|
647
|
+
const m = a.value, c = m.offsetHeight - m.clientHeight;
|
|
648
|
+
m.style.height = "auto", m.style.height = `${m.scrollHeight + c}px`;
|
|
649
649
|
}
|
|
650
|
-
return O(
|
|
650
|
+
return O(h), (m, c) => (i(), p(S, $(t, {
|
|
651
651
|
"label-for": n(o),
|
|
652
652
|
"validation-message": e.showValidationError ? "" : n(r),
|
|
653
653
|
invalid: !n(s),
|
|
654
|
-
class:
|
|
654
|
+
class: m.$attrs.class
|
|
655
655
|
}), {
|
|
656
|
-
default:
|
|
656
|
+
default: f(() => [
|
|
657
657
|
X(d("textarea", $({
|
|
658
658
|
ref_key: "formElement",
|
|
659
659
|
ref: a
|
|
660
|
-
}, { ...
|
|
660
|
+
}, { ...m.$attrs, class: void 0 }, {
|
|
661
661
|
id: n(o),
|
|
662
|
-
"onUpdate:modelValue":
|
|
663
|
-
onKeyupPassive:
|
|
664
|
-
onInputPassive:
|
|
662
|
+
"onUpdate:modelValue": c[0] || (c[0] = (x) => l.value = x),
|
|
663
|
+
onKeyupPassive: c[1] || (c[1] = (x) => !n(s) && n(g)()),
|
|
664
|
+
onInputPassive: h,
|
|
665
665
|
class: ["form-control__textarea", {
|
|
666
666
|
"form-control__textarea--autosize": e.autosize
|
|
667
667
|
}]
|
|
@@ -693,13 +693,13 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
693
693
|
}),
|
|
694
694
|
emits: ["update:modelValue"],
|
|
695
695
|
setup(e) {
|
|
696
|
-
const t = e, o = t.id || q(), l = t.value || o, a = B(e, "modelValue"), s = L("formElement"), { isValid: r } =
|
|
696
|
+
const t = e, o = t.id || q(), l = t.value || o, a = B(e, "modelValue"), s = L("formElement"), { isValid: r } = A(
|
|
697
697
|
s,
|
|
698
698
|
t.validators,
|
|
699
699
|
t.showValidationError
|
|
700
700
|
), g = _(() => Array.isArray(a.value) ? a.value.includes(l) : a.value);
|
|
701
|
-
function
|
|
702
|
-
const x =
|
|
701
|
+
function h(m) {
|
|
702
|
+
const x = m.target.checked;
|
|
703
703
|
if (Array.isArray(a.value))
|
|
704
704
|
if (x)
|
|
705
705
|
a.value.push(l);
|
|
@@ -710,15 +710,15 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
710
710
|
else
|
|
711
711
|
a.value = x;
|
|
712
712
|
}
|
|
713
|
-
return (
|
|
714
|
-
class: w(["dai-checkbox-control",
|
|
713
|
+
return (m, c) => (i(), u("div", {
|
|
714
|
+
class: w(["dai-checkbox-control", m.$attrs.class])
|
|
715
715
|
}, [
|
|
716
716
|
d("input", $({
|
|
717
717
|
ref_key: "formElement",
|
|
718
718
|
ref: s
|
|
719
|
-
}, { ...
|
|
719
|
+
}, { ...m.$attrs, class: "" }, {
|
|
720
720
|
checked: g.value,
|
|
721
|
-
onChange:
|
|
721
|
+
onChange: h,
|
|
722
722
|
id: n(o),
|
|
723
723
|
type: "checkbox",
|
|
724
724
|
class: ["dai-checkbox", {
|
|
@@ -728,25 +728,25 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
728
728
|
"dai-checkbox--lg": e.size === "large"
|
|
729
729
|
}]
|
|
730
730
|
}), null, 16, Ye),
|
|
731
|
-
e.label ||
|
|
731
|
+
e.label || m.$slots.default ? (i(), u("div", Ke, [
|
|
732
732
|
V(F, {
|
|
733
733
|
for: n(o),
|
|
734
734
|
class: "dai-checkbox-control__label"
|
|
735
735
|
}, {
|
|
736
|
-
default:
|
|
737
|
-
|
|
736
|
+
default: f(() => [
|
|
737
|
+
b(m.$slots, "default", {}, () => [
|
|
738
738
|
z(k(e.label), 1)
|
|
739
739
|
])
|
|
740
740
|
]),
|
|
741
741
|
_: 3
|
|
742
742
|
}, 8, ["for"])
|
|
743
743
|
])) : y("", !0),
|
|
744
|
-
e.hint ||
|
|
744
|
+
e.hint || m.$slots.hint ? (i(), p(H, {
|
|
745
745
|
key: 1,
|
|
746
746
|
class: "dai-checkbox-control__hint"
|
|
747
747
|
}, {
|
|
748
|
-
default:
|
|
749
|
-
|
|
748
|
+
default: f(() => [
|
|
749
|
+
b(m.$slots, "hint", {}, () => [
|
|
750
750
|
z(k(e.hint), 1)
|
|
751
751
|
])
|
|
752
752
|
]),
|
|
@@ -776,7 +776,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
776
776
|
}),
|
|
777
777
|
emits: ["update:modelValue"],
|
|
778
778
|
setup(e) {
|
|
779
|
-
const t = e, o = B(e, "modelValue"), l = q(), a = L("formElement"), { isValid: s } =
|
|
779
|
+
const t = e, o = B(e, "modelValue"), l = q(), a = L("formElement"), { isValid: s } = A(
|
|
780
780
|
a,
|
|
781
781
|
t.validators,
|
|
782
782
|
t.showValidationError
|
|
@@ -789,7 +789,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
789
789
|
type: "radio",
|
|
790
790
|
ref_key: "formElement",
|
|
791
791
|
ref: a,
|
|
792
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
792
|
+
"onUpdate:modelValue": g[0] || (g[0] = (h) => o.value = h)
|
|
793
793
|
}, { ...r.$attrs, class: "" }, {
|
|
794
794
|
value: e.value,
|
|
795
795
|
id: n(l),
|
|
@@ -837,23 +837,23 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
837
837
|
class: "dai-switch__thumb"
|
|
838
838
|
}, null, -1)
|
|
839
839
|
])], 10, et),
|
|
840
|
-
e.label || l.$slots.default ? (i(),
|
|
840
|
+
e.label || l.$slots.default ? (i(), p(F, {
|
|
841
841
|
key: 0,
|
|
842
842
|
for: n(o)
|
|
843
843
|
}, {
|
|
844
|
-
default:
|
|
845
|
-
|
|
844
|
+
default: f(() => [
|
|
845
|
+
b(l.$slots, "default", {}, () => [
|
|
846
846
|
z(k(e.label), 1)
|
|
847
847
|
])
|
|
848
848
|
]),
|
|
849
849
|
_: 3
|
|
850
850
|
}, 8, ["for"])) : y("", !0),
|
|
851
|
-
e.hint || l.$slots.hint ? (i(),
|
|
851
|
+
e.hint || l.$slots.hint ? (i(), p(H, {
|
|
852
852
|
key: 1,
|
|
853
853
|
class: "dai-switch-control__hint"
|
|
854
854
|
}, {
|
|
855
|
-
default:
|
|
856
|
-
|
|
855
|
+
default: f(() => [
|
|
856
|
+
b(l.$slots, "hint", {}, () => [
|
|
857
857
|
z(k(e.hint), 1)
|
|
858
858
|
])
|
|
859
859
|
]),
|
|
@@ -887,7 +887,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
887
887
|
},
|
|
888
888
|
setup(e) {
|
|
889
889
|
const t = e, o = _(() => t.submit ? "submit" : t.reset ? "reset" : "button"), l = _(() => t.variant ? t.variant : t.plain ? "plain" : t.muted ? "muted" : t.outlined ? "outlined" : "flat"), a = _(() => t.size ? t.size : t.sm ? "small" : t.lg ? "large" : "medium");
|
|
890
|
-
return (s, r) => (i(),
|
|
890
|
+
return (s, r) => (i(), p(ye(e.href ? "a" : "button"), {
|
|
891
891
|
type: e.href ? void 0 : o.value,
|
|
892
892
|
form: typeof e.submit == "string" ? e.submit : void 0,
|
|
893
893
|
href: e.href,
|
|
@@ -905,7 +905,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
905
905
|
"dai-btn--condensed": e.condensed
|
|
906
906
|
}])
|
|
907
907
|
}, {
|
|
908
|
-
default:
|
|
908
|
+
default: f(() => [
|
|
909
909
|
e.loading ? (i(), u("span", tt, [...r[0] || (r[0] = [
|
|
910
910
|
d("svg", {
|
|
911
911
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -932,7 +932,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
932
932
|
key: 0,
|
|
933
933
|
class: w([e.icon, "dai-btn__icon"])
|
|
934
934
|
}, null, 2)) : y("", !0),
|
|
935
|
-
|
|
935
|
+
b(s.$slots, "default"),
|
|
936
936
|
e.iconAfter ? (i(), u("div", {
|
|
937
937
|
key: 1,
|
|
938
938
|
class: w([e.iconAfter, "dai-btn__icon"])
|
|
@@ -945,14 +945,14 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
945
945
|
}), zt = /* @__PURE__ */ v({
|
|
946
946
|
__name: "popoverDialog",
|
|
947
947
|
setup(e) {
|
|
948
|
-
return (t, o) => (i(),
|
|
948
|
+
return (t, o) => (i(), p(P, {
|
|
949
949
|
"enter-from-class": "dai-popover-dialog--anim",
|
|
950
950
|
"leave-to-class": "dai-popover-dialog--anim"
|
|
951
951
|
}, {
|
|
952
|
-
default:
|
|
952
|
+
default: f(() => [
|
|
953
953
|
V(n(ne), { class: "dai-popover-dialog" }, {
|
|
954
|
-
default:
|
|
955
|
-
|
|
954
|
+
default: f(() => [
|
|
955
|
+
b(t.$slots, "default")
|
|
956
956
|
]),
|
|
957
957
|
_: 3
|
|
958
958
|
})
|
|
@@ -963,14 +963,14 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
963
963
|
}), Lt = /* @__PURE__ */ v({
|
|
964
964
|
__name: "menuItems",
|
|
965
965
|
setup(e) {
|
|
966
|
-
return (t, o) => (i(),
|
|
966
|
+
return (t, o) => (i(), p(P, {
|
|
967
967
|
"enter-from-class": "dai-menu-items--anim",
|
|
968
968
|
"leave-to-class": "dai-menu-items--anim"
|
|
969
969
|
}, {
|
|
970
|
-
default:
|
|
970
|
+
default: f(() => [
|
|
971
971
|
V(n(se), { class: "dai-menu-items" }, {
|
|
972
|
-
default:
|
|
973
|
-
|
|
972
|
+
default: f(() => [
|
|
973
|
+
b(t.$slots, "default")
|
|
974
974
|
]),
|
|
975
975
|
_: 3
|
|
976
976
|
})
|
|
@@ -987,14 +987,14 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
987
987
|
icon: {}
|
|
988
988
|
},
|
|
989
989
|
setup(e) {
|
|
990
|
-
return (t, o) => (i(),
|
|
991
|
-
default:
|
|
990
|
+
return (t, o) => (i(), p(n(re), { class: "dai-menu-item" }, {
|
|
991
|
+
default: f(({ isActive: l, isSelected: a }) => [
|
|
992
992
|
e.icon ? (i(), u("div", at, [
|
|
993
993
|
d("div", {
|
|
994
994
|
class: w(["h-5 w-5", e.icon])
|
|
995
995
|
}, null, 2)
|
|
996
996
|
])) : y("", !0),
|
|
997
|
-
|
|
997
|
+
b(t.$slots, "default", {
|
|
998
998
|
isActive: l,
|
|
999
999
|
isSelected: a
|
|
1000
1000
|
})
|
|
@@ -1010,14 +1010,14 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1010
1010
|
value: {}
|
|
1011
1011
|
},
|
|
1012
1012
|
setup(e) {
|
|
1013
|
-
return (t, o) => (i(),
|
|
1013
|
+
return (t, o) => (i(), p(n(de), {
|
|
1014
1014
|
id: e.id,
|
|
1015
1015
|
"aria-controls": e.ariaControls,
|
|
1016
1016
|
value: e.value,
|
|
1017
1017
|
class: "dai-tab"
|
|
1018
1018
|
}, {
|
|
1019
|
-
default:
|
|
1020
|
-
|
|
1019
|
+
default: f(() => [
|
|
1020
|
+
b(t.$slots, "default")
|
|
1021
1021
|
]),
|
|
1022
1022
|
_: 3
|
|
1023
1023
|
}, 8, ["id", "aria-controls", "value"]));
|
|
@@ -1037,20 +1037,20 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1037
1037
|
transition: o.value.offsetLeft > r.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
|
|
1038
1038
|
});
|
|
1039
1039
|
}
|
|
1040
|
-
return O(() => ge(a)), (s, r) => (i(),
|
|
1040
|
+
return O(() => ge(a)), (s, r) => (i(), p(n(ue), {
|
|
1041
1041
|
ref_key: "tablist",
|
|
1042
1042
|
ref: t,
|
|
1043
1043
|
onClickPassive: a,
|
|
1044
1044
|
class: "dai-tab-list"
|
|
1045
1045
|
}, {
|
|
1046
|
-
default:
|
|
1046
|
+
default: f(() => [
|
|
1047
1047
|
d("div", {
|
|
1048
1048
|
ref_key: "slider",
|
|
1049
1049
|
ref: o,
|
|
1050
1050
|
class: "dai-tab-list__slider",
|
|
1051
1051
|
style: N(l.value)
|
|
1052
1052
|
}, null, 4),
|
|
1053
|
-
|
|
1053
|
+
b(s.$slots, "default")
|
|
1054
1054
|
]),
|
|
1055
1055
|
_: 3
|
|
1056
1056
|
}, 512));
|
|
@@ -1072,7 +1072,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1072
1072
|
emits: ["update:modelValue"],
|
|
1073
1073
|
setup(e) {
|
|
1074
1074
|
const t = e, o = B(e, "modelValue"), l = t.id ?? q(), { classList: a } = $e(document.body, "nui-body-push");
|
|
1075
|
-
|
|
1075
|
+
T(o, () => {
|
|
1076
1076
|
if (!t.push || (a.splice(1), !o.value))
|
|
1077
1077
|
return;
|
|
1078
1078
|
let r = "nui-body-push--" + t.position;
|
|
@@ -1085,7 +1085,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1085
1085
|
window.addEventListener("click", s, { passive: !0 });
|
|
1086
1086
|
}), R(() => {
|
|
1087
1087
|
window.removeEventListener("click", s);
|
|
1088
|
-
}), (r, g) => (i(),
|
|
1088
|
+
}), (r, g) => (i(), p(Z, { to: "body" }, [
|
|
1089
1089
|
V(P, {
|
|
1090
1090
|
appear: "",
|
|
1091
1091
|
"enter-from-class": "nui-offcanvas--animate-hidden",
|
|
@@ -1095,7 +1095,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1095
1095
|
"leave-to-class": "nui-offcanvas--animate-hidden",
|
|
1096
1096
|
"leave-active-class": "ease-in-out"
|
|
1097
1097
|
}, {
|
|
1098
|
-
default:
|
|
1098
|
+
default: f(() => [
|
|
1099
1099
|
o.value ? (i(), u("div", $({
|
|
1100
1100
|
key: 0,
|
|
1101
1101
|
id: n(l)
|
|
@@ -1107,7 +1107,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1107
1107
|
"nui-offcanvas--xl": e.xl
|
|
1108
1108
|
}]
|
|
1109
1109
|
}), [
|
|
1110
|
-
|
|
1110
|
+
b(r.$slots, "default")
|
|
1111
1111
|
], 16, lt)) : y("", !0)
|
|
1112
1112
|
]),
|
|
1113
1113
|
_: 3
|
|
@@ -1169,7 +1169,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1169
1169
|
function a() {
|
|
1170
1170
|
clearTimeout(l), o.value && t.timeout && (l = setTimeout(() => o.value = !1, t.timeout));
|
|
1171
1171
|
}
|
|
1172
|
-
return
|
|
1172
|
+
return T(o, a, { immediate: !0 }), (s, r) => o.value ? (i(), u("div", it, [
|
|
1173
1173
|
d("div", {
|
|
1174
1174
|
class: w(["dai-notification", [`dai-notification--${e.color || "secondary"}`]])
|
|
1175
1175
|
}, [
|
|
@@ -1230,19 +1230,19 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1230
1230
|
function s() {
|
|
1231
1231
|
o.value.length === 0 || l.value.length >= t.length || (l.value.push({ ...o.value[0], id: a++, show: !0 }), o.value.shift());
|
|
1232
1232
|
}
|
|
1233
|
-
function r(
|
|
1233
|
+
function r(h) {
|
|
1234
1234
|
setTimeout(() => {
|
|
1235
1235
|
l.value = l.value.filter(
|
|
1236
|
-
(
|
|
1236
|
+
(m) => m.id !== h
|
|
1237
1237
|
), s();
|
|
1238
1238
|
}, 200);
|
|
1239
1239
|
}
|
|
1240
|
-
|
|
1240
|
+
T(o, s, { immediate: !0, deep: !0 });
|
|
1241
1241
|
const g = _(() => {
|
|
1242
|
-
const
|
|
1243
|
-
return t.positionX === "right" ?
|
|
1242
|
+
const h = ["dai-notification-queue__item--anim"];
|
|
1243
|
+
return t.positionX === "right" ? h.push("dai-notification-queue__item--anim-x-right") : t.positionX === "left" ? h.push("dai-notification-queue__item--anim-x-left") : t.positionX === "center" && t.positionY === "top" ? h.push("dai-notification-queue__item--anim-y-top") : t.positionX === "center" && t.positionY === "bottom" && h.push("dai-notification-queue__item--anim-y-bottom"), h.join(" ");
|
|
1244
1244
|
});
|
|
1245
|
-
return (
|
|
1245
|
+
return (h, m) => (i(), u("div", {
|
|
1246
1246
|
class: w(["dai-notification-queue", {
|
|
1247
1247
|
"dai-notification-queue--fixed": e.position == "fixed",
|
|
1248
1248
|
"dai-notification-queue--absolute": e.position == "absolute",
|
|
@@ -1260,16 +1260,16 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1260
1260
|
"leave-to-class": g.value,
|
|
1261
1261
|
"leave-active-class": "dai-notification-queue__item--anim-out"
|
|
1262
1262
|
}, {
|
|
1263
|
-
default:
|
|
1264
|
-
(i(!0), u(I, null, D(l.value, (
|
|
1265
|
-
key:
|
|
1266
|
-
color:
|
|
1267
|
-
icon:
|
|
1268
|
-
message:
|
|
1269
|
-
detail:
|
|
1270
|
-
timeout:
|
|
1271
|
-
modelValue:
|
|
1272
|
-
"onUpdate:modelValue": [(x) =>
|
|
1263
|
+
default: f(() => [
|
|
1264
|
+
(i(!0), u(I, null, D(l.value, (c) => (i(), p(mt, {
|
|
1265
|
+
key: c.id,
|
|
1266
|
+
color: c.color,
|
|
1267
|
+
icon: c.type,
|
|
1268
|
+
message: c.message,
|
|
1269
|
+
detail: c.detail,
|
|
1270
|
+
timeout: c.timeout ?? e.timeout,
|
|
1271
|
+
modelValue: c.show,
|
|
1272
|
+
"onUpdate:modelValue": [(x) => c.show = x, (x) => r(c.id)],
|
|
1273
1273
|
class: "dai-notification-queue__item"
|
|
1274
1274
|
}, null, 8, ["color", "icon", "message", "detail", "timeout", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
1275
1275
|
]),
|
|
@@ -1331,15 +1331,15 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1331
1331
|
function o() {
|
|
1332
1332
|
t.value = !1;
|
|
1333
1333
|
}
|
|
1334
|
-
return
|
|
1334
|
+
return T(t, (l) => {
|
|
1335
1335
|
l ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
|
|
1336
|
-
}), (l, a) => (i(),
|
|
1336
|
+
}), (l, a) => (i(), p(Z, { to: "body" }, [
|
|
1337
1337
|
V(P, {
|
|
1338
1338
|
appear: "",
|
|
1339
1339
|
name: "modal",
|
|
1340
1340
|
duration: { enter: 300, leave: 200 }
|
|
1341
1341
|
}, {
|
|
1342
|
-
default:
|
|
1342
|
+
default: f(() => [
|
|
1343
1343
|
t.value ? (i(), u("div", ht, [
|
|
1344
1344
|
a[0] || (a[0] = d("div", {
|
|
1345
1345
|
class: "modal__backdrop fixed inset-0 bg-primary-50/60 backdrop-blur-sm",
|
|
@@ -1351,7 +1351,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1351
1351
|
class: "min-h-full flex items-center justify-center p-4 sm:p-6"
|
|
1352
1352
|
}, [
|
|
1353
1353
|
d("div", bt, [
|
|
1354
|
-
|
|
1354
|
+
b(l.$slots, "default", { close: o })
|
|
1355
1355
|
])
|
|
1356
1356
|
])
|
|
1357
1357
|
])
|