@defaultusr/dai-ui 1.1.10 → 1.1.11
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 +183 -185
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { Combobox as te, ComboboxInput as oe, injectCombobox as ae, ComboboxOptions as le, ComboboxOption as ie, useFormControl as A, PopoverDialog as ne, MenuItems as se, MenuItem as re, Tab as de, TabList as ue } from "vue-composable-ui";
|
|
2
|
-
import { Menu as St, Popover as Ut, TabContainer as
|
|
3
|
-
import { reactive as ce, watch as T, onUnmounted as
|
|
2
|
+
import { Menu as St, Popover as Ut, TabContainer as Dt, TabPanel as Nt } from "vue-composable-ui";
|
|
3
|
+
import { reactive as ce, watch as T, onUnmounted as Y, defineComponent as v, createElementBlock as u, openBlock as l, renderSlot as p, createTextVNode as E, toDisplayString as k, normalizeClass as w, createBlock as m, createCommentVNode as h, createElementVNode as d, computed as _, createVNode as V, normalizeProps as fe, guardReactiveProps as me, withCtx as c, Transition as P, mergeModels as M, useModel as $, useId as L, mergeProps as x, unref as r, inject as ve, Fragment as I, useTemplateRef as q, ref as D, onMounted as j, withDirectives as O, renderList as N, vModelSelect as pe, vModelText as he, vModelCheckbox as be, vModelRadio as ye, resolveDynamicComponent as ge, nextTick as we, normalizeStyle as U, Teleport as R, TransitionGroup as ke, withModifiers as $e } from "vue";
|
|
4
4
|
import './assets/main.css';function xe(e, ...t) {
|
|
5
5
|
let o = [];
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
|
|
6
|
+
const i = ce(t);
|
|
7
|
+
function a() {
|
|
8
|
+
i.length && (e.classList.add(...i), o = [...i]);
|
|
9
9
|
}
|
|
10
10
|
function s() {
|
|
11
11
|
e.classList.remove(...o);
|
|
12
12
|
}
|
|
13
13
|
return T(
|
|
14
|
-
|
|
14
|
+
i,
|
|
15
15
|
() => {
|
|
16
|
-
s(),
|
|
16
|
+
s(), a();
|
|
17
17
|
},
|
|
18
18
|
{ immediate: !0 }
|
|
19
|
-
),
|
|
20
|
-
classList:
|
|
19
|
+
), Y(s), {
|
|
20
|
+
classList: i
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
@@ -26,19 +26,19 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
26
26
|
text: {}
|
|
27
27
|
},
|
|
28
28
|
setup(e) {
|
|
29
|
-
return (t, o) => (
|
|
29
|
+
return (t, o) => (l(), u("label", _e, [
|
|
30
30
|
p(t.$slots, "default", {}, () => [
|
|
31
31
|
E(k(e.text), 1)
|
|
32
32
|
])
|
|
33
33
|
]));
|
|
34
34
|
}
|
|
35
|
-
}), Be = { class: "dai-hint" },
|
|
35
|
+
}), Be = { class: "dai-hint" }, X = /* @__PURE__ */ v({
|
|
36
36
|
__name: "hint",
|
|
37
37
|
props: {
|
|
38
38
|
text: {}
|
|
39
39
|
},
|
|
40
40
|
setup(e) {
|
|
41
|
-
return (t, o) => (
|
|
41
|
+
return (t, o) => (l(), u("div", Be, [
|
|
42
42
|
p(t.$slots, "default", {}, () => [
|
|
43
43
|
E(k(e.text), 1)
|
|
44
44
|
])
|
|
@@ -57,7 +57,7 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
57
57
|
invalid: { type: Boolean }
|
|
58
58
|
},
|
|
59
59
|
setup(e) {
|
|
60
|
-
return (t, o) => (
|
|
60
|
+
return (t, o) => (l(), u("div", {
|
|
61
61
|
class: w(["dai-form-control__input-group", {
|
|
62
62
|
"dai-form-control__input-group--labeled": !!e.label,
|
|
63
63
|
"dai-form-control__input-group--outlined": e.variant === "outlined",
|
|
@@ -69,7 +69,7 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
69
69
|
"dai-form-control__input-group--invalid": e.invalid
|
|
70
70
|
}])
|
|
71
71
|
}, [
|
|
72
|
-
e.label ? (
|
|
72
|
+
e.label ? (l(), m(F, {
|
|
73
73
|
key: 0,
|
|
74
74
|
text: e.label,
|
|
75
75
|
for: e.labelFor,
|
|
@@ -104,15 +104,15 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
104
104
|
invalid: { type: Boolean }
|
|
105
105
|
},
|
|
106
106
|
setup(e) {
|
|
107
|
-
const t = e, o =
|
|
108
|
-
return (
|
|
107
|
+
const t = e, o = _(() => t.variant ? t.variant : t.muted ? "muted" : t.outlined ? "outlined" : "flat"), i = _(() => t.size ? t.size : t.sm ? "small" : t.lg ? "large" : "medium");
|
|
108
|
+
return (a, s) => (l(), u("div", {
|
|
109
109
|
class: w(["dai-form-control", {
|
|
110
110
|
"dai-form-control--label-inline": e.labelPosition === "inline",
|
|
111
111
|
"dai-form-control--invalid": e.invalid,
|
|
112
|
-
"dai-form-control--lg":
|
|
112
|
+
"dai-form-control--lg": i.value === "large"
|
|
113
113
|
}])
|
|
114
114
|
}, [
|
|
115
|
-
e.label && e.labelPosition !== "inside" ? (
|
|
115
|
+
e.label && e.labelPosition !== "inside" ? (l(), m(F, {
|
|
116
116
|
key: 0,
|
|
117
117
|
for: e.labelFor,
|
|
118
118
|
text: e.label
|
|
@@ -122,21 +122,21 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
122
122
|
...t,
|
|
123
123
|
label: e.labelPosition === "inside" ? e.label : void 0,
|
|
124
124
|
variant: o.value,
|
|
125
|
-
size:
|
|
125
|
+
size: i.value
|
|
126
126
|
})), {
|
|
127
127
|
default: c(() => [
|
|
128
|
-
p(
|
|
128
|
+
p(a.$slots, "default")
|
|
129
129
|
]),
|
|
130
130
|
_: 3
|
|
131
131
|
}, 16),
|
|
132
|
-
e.hint ? (
|
|
132
|
+
e.hint ? (l(), m(X, {
|
|
133
133
|
key: 0,
|
|
134
134
|
text: e.hint,
|
|
135
135
|
class: "dai-form-control__hint"
|
|
136
136
|
}, null, 8, ["text"])) : h("", !0),
|
|
137
137
|
V(P, { name: "dai-form-control__validation-message-transition" }, {
|
|
138
138
|
default: c(() => [
|
|
139
|
-
e.validationMessage ? (
|
|
139
|
+
e.validationMessage ? (l(), u("div", ze, [
|
|
140
140
|
s[0] || (s[0] = d("svg", {
|
|
141
141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
142
142
|
viewBox: "0 0 256 256",
|
|
@@ -180,19 +180,19 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
180
180
|
}),
|
|
181
181
|
emits: ["update:modelValue"],
|
|
182
182
|
setup(e) {
|
|
183
|
-
const t = e, o =
|
|
184
|
-
return (
|
|
185
|
-
labelFor: r(
|
|
186
|
-
class:
|
|
183
|
+
const t = e, o = $(e, "modelValue"), i = t.id || L();
|
|
184
|
+
return (a, s) => (l(), m(S, x(t, {
|
|
185
|
+
labelFor: r(i),
|
|
186
|
+
class: a.$attrs.class
|
|
187
187
|
}), {
|
|
188
188
|
default: c(() => [
|
|
189
|
-
V(r(te),
|
|
190
|
-
id: r(
|
|
189
|
+
V(r(te), x({ ...a.$attrs, class: void 0 }, {
|
|
190
|
+
id: r(i),
|
|
191
191
|
modelValue: o.value,
|
|
192
192
|
"onUpdate:modelValue": s[0] || (s[0] = (n) => o.value = n)
|
|
193
193
|
}), {
|
|
194
194
|
default: c(() => [
|
|
195
|
-
p(
|
|
195
|
+
p(a.$slots, "default")
|
|
196
196
|
]),
|
|
197
197
|
_: 3
|
|
198
198
|
}, 16, ["id", "modelValue"])
|
|
@@ -203,7 +203,7 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
203
203
|
}), wt = /* @__PURE__ */ v({
|
|
204
204
|
__name: "comboboxInput",
|
|
205
205
|
setup(e) {
|
|
206
|
-
return (t, o) => (
|
|
206
|
+
return (t, o) => (l(), m(r(oe), { class: "dai-form-control__input-group__control" }, {
|
|
207
207
|
default: c(() => [
|
|
208
208
|
p(t.$slots, "default")
|
|
209
209
|
]),
|
|
@@ -222,23 +222,21 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
222
222
|
const t = ve(ae);
|
|
223
223
|
if (!t)
|
|
224
224
|
throw new Error("Combobox injectable context is not provided");
|
|
225
|
-
$(() => ({
|
|
226
|
-
...t.activatorAttrs.value,
|
|
227
|
-
onclick: () => t.isOpen.value ? t.close({ focus: !0 }) : t.open({ focus: !1 })
|
|
228
|
-
}));
|
|
229
225
|
function o() {
|
|
230
226
|
t.isOpen.value ? t.close({ focus: !0 }) : t.open({ focus: !1 });
|
|
231
227
|
}
|
|
232
|
-
return (
|
|
228
|
+
return (i, a) => (l(), u("button", x(r(t).activatorAttrs.value, {
|
|
229
|
+
onKeydown: a[0] || (a[0] = //@ts-ignore
|
|
230
|
+
(...s) => r(t).activatorOnKeyDown && r(t).activatorOnKeyDown(...s)),
|
|
233
231
|
onClick: o,
|
|
234
232
|
type: "button",
|
|
235
233
|
class: "dai-form-control__input-group__control dai-combobox-btn"
|
|
236
234
|
}), [
|
|
237
|
-
p(
|
|
238
|
-
r(t).displayValue.value ? (
|
|
235
|
+
p(i.$slots, "default", {}, () => [
|
|
236
|
+
r(t).displayValue.value ? (l(), u(I, { key: 1 }, [
|
|
239
237
|
E(k(r(t).displayValue), 1)
|
|
240
|
-
], 64)) : (
|
|
241
|
-
|
|
238
|
+
], 64)) : (l(), u("span", Le, k(e.placeholder || "Select..."), 1)),
|
|
239
|
+
a[1] || (a[1] = d("svg", {
|
|
242
240
|
class: "dai-combobox-btn__chevron",
|
|
243
241
|
role: "presentation",
|
|
244
242
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -257,7 +255,7 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
257
255
|
}), Te = /* @__PURE__ */ v({
|
|
258
256
|
__name: "comboboxOptions",
|
|
259
257
|
setup(e) {
|
|
260
|
-
return (t, o) => (
|
|
258
|
+
return (t, o) => (l(), m(P, {
|
|
261
259
|
"enter-from-class": "dai-combobox-options--anim",
|
|
262
260
|
"leave-to-class": "dai-combobox-options--anim"
|
|
263
261
|
}, {
|
|
@@ -283,16 +281,16 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
283
281
|
value: {}
|
|
284
282
|
},
|
|
285
283
|
setup(e) {
|
|
286
|
-
return (t, o) => (
|
|
284
|
+
return (t, o) => (l(), m(r(ie), {
|
|
287
285
|
value: e.value,
|
|
288
286
|
class: "dai-combobox-option"
|
|
289
287
|
}, {
|
|
290
|
-
default: c(({ isActive:
|
|
288
|
+
default: c(({ isActive: i, isSelected: a }) => [
|
|
291
289
|
p(t.$slots, "default", {
|
|
292
|
-
isActive:
|
|
293
|
-
isSelected:
|
|
290
|
+
isActive: i,
|
|
291
|
+
isSelected: a
|
|
294
292
|
}),
|
|
295
|
-
|
|
293
|
+
a ? (l(), u("svg", Pe, [...o[0] || (o[0] = [
|
|
296
294
|
d("path", {
|
|
297
295
|
fill: "currentColor",
|
|
298
296
|
"fill-rule": "evenodd",
|
|
@@ -306,8 +304,8 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
306
304
|
}
|
|
307
305
|
}), Ie = (e, t) => {
|
|
308
306
|
const o = e.__vccOpts || e;
|
|
309
|
-
for (const [
|
|
310
|
-
o[
|
|
307
|
+
for (const [i, a] of t)
|
|
308
|
+
o[i] = a;
|
|
311
309
|
return o;
|
|
312
310
|
}, je = {}, Oe = {
|
|
313
311
|
type: "button",
|
|
@@ -316,17 +314,17 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
316
314
|
"aria-hidden": "true"
|
|
317
315
|
};
|
|
318
316
|
function Fe(e, t) {
|
|
319
|
-
return
|
|
317
|
+
return l(), u("button", Oe, [
|
|
320
318
|
p(e.$slots, "default")
|
|
321
319
|
]);
|
|
322
320
|
}
|
|
323
|
-
const
|
|
321
|
+
const K = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern", "title", "autocomplete", "value"], Ue = {
|
|
324
322
|
key: 0,
|
|
325
323
|
xmlns: "http://www.w3.org/2000/svg",
|
|
326
324
|
fill: "none",
|
|
327
325
|
viewBox: "0 0 24 24",
|
|
328
326
|
stroke: "currentColor"
|
|
329
|
-
},
|
|
327
|
+
}, De = {
|
|
330
328
|
key: 1,
|
|
331
329
|
xmlns: "http://www.w3.org/2000/svg",
|
|
332
330
|
fill: "none",
|
|
@@ -367,7 +365,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
367
365
|
}),
|
|
368
366
|
emits: ["update:modelValue", "update:files"],
|
|
369
367
|
setup(e) {
|
|
370
|
-
const t = e, o = t.id || L(),
|
|
368
|
+
const t = e, o = t.id || L(), i = _(() => typeof t.autocomplete == "string" ? t.autocomplete : t.autocomplete ? "on" : "off"), a = $(e, "modelValue"), s = $(e, "files", {
|
|
371
369
|
set(B) {
|
|
372
370
|
return n.value && (n.value.files = B), B;
|
|
373
371
|
}
|
|
@@ -375,25 +373,25 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
375
373
|
n,
|
|
376
374
|
t.validators,
|
|
377
375
|
t.showValidationError
|
|
378
|
-
), f =
|
|
379
|
-
T(
|
|
376
|
+
), f = D(!1);
|
|
377
|
+
T(a, () => {
|
|
380
378
|
s.value = n.value?.files || null;
|
|
381
379
|
});
|
|
382
380
|
let C;
|
|
383
|
-
const
|
|
381
|
+
const Z = _(() => t.type === "password" ? f.value ? "text" : "password" : t.type), H = _(() => t.mask ? t.mask : t.type === "tel" ? {
|
|
384
382
|
mask: "{+7} (000) 000-00-00"
|
|
385
|
-
} : t.mask),
|
|
383
|
+
} : 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);
|
|
386
384
|
function W() {
|
|
387
385
|
f.value = !f.value;
|
|
388
386
|
}
|
|
389
387
|
function J() {
|
|
390
|
-
|
|
388
|
+
a.value = "";
|
|
391
389
|
}
|
|
392
390
|
function ee(B) {
|
|
393
391
|
if (C)
|
|
394
392
|
return;
|
|
395
393
|
const { value: z } = B.target;
|
|
396
|
-
|
|
394
|
+
a.value = z;
|
|
397
395
|
}
|
|
398
396
|
return j(() => {
|
|
399
397
|
H.value && import("imask").then((B) => {
|
|
@@ -401,10 +399,10 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
401
399
|
n.value,
|
|
402
400
|
H.value
|
|
403
401
|
), C.on("accept", () => {
|
|
404
|
-
|
|
402
|
+
a.value = C.value;
|
|
405
403
|
});
|
|
406
404
|
});
|
|
407
|
-
}), (B, z) => (
|
|
405
|
+
}), (B, z) => (l(), m(S, x(t, {
|
|
408
406
|
"label-for": r(o),
|
|
409
407
|
"validation-message": e.showValidationError ? "" : r(b),
|
|
410
408
|
invalid: t.invalid || !r(g),
|
|
@@ -412,34 +410,34 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
412
410
|
}), {
|
|
413
411
|
default: c(() => [
|
|
414
412
|
p(B.$slots, "prepend"),
|
|
415
|
-
d("input",
|
|
413
|
+
d("input", x({
|
|
416
414
|
ref_key: "formElement",
|
|
417
415
|
ref: n
|
|
418
416
|
}, { ...B.$attrs, class: void 0 }, {
|
|
419
417
|
id: r(o),
|
|
420
|
-
type:
|
|
421
|
-
pattern:
|
|
418
|
+
type: Z.value,
|
|
419
|
+
pattern: G.value,
|
|
422
420
|
title: Q.value,
|
|
423
|
-
autocomplete:
|
|
424
|
-
value:
|
|
421
|
+
autocomplete: i.value,
|
|
422
|
+
value: a.value,
|
|
425
423
|
onInputPassive: ee,
|
|
426
424
|
onKeyupPassive: z[0] || (z[0] = (bt) => !r(g) && r(y)()),
|
|
427
425
|
class: "dai-form-control__input-group__control dai-form-control__input"
|
|
428
426
|
}), null, 16, Se),
|
|
429
427
|
p(B.$slots, "append"),
|
|
430
|
-
t.type === "password" &&
|
|
428
|
+
t.type === "password" && a.value ? (l(), m(K, {
|
|
431
429
|
key: 0,
|
|
432
430
|
onClick: W
|
|
433
431
|
}, {
|
|
434
432
|
default: c(() => [
|
|
435
|
-
f.value ? (
|
|
433
|
+
f.value ? (l(), u("svg", De, [...z[2] || (z[2] = [
|
|
436
434
|
d("path", {
|
|
437
435
|
"stroke-linecap": "round",
|
|
438
436
|
"stroke-linejoin": "round",
|
|
439
437
|
"stroke-width": "2",
|
|
440
438
|
d: "M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"
|
|
441
439
|
}, null, -1)
|
|
442
|
-
])])) : (
|
|
440
|
+
])])) : (l(), u("svg", Ue, [...z[1] || (z[1] = [
|
|
443
441
|
d("path", {
|
|
444
442
|
"stroke-linecap": "round",
|
|
445
443
|
"stroke-linejoin": "round",
|
|
@@ -456,7 +454,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
456
454
|
]),
|
|
457
455
|
_: 1
|
|
458
456
|
})) : h("", !0),
|
|
459
|
-
e.clearable &&
|
|
457
|
+
e.clearable && a.value && !t.disabled ? (l(), m(K, {
|
|
460
458
|
key: 1,
|
|
461
459
|
onClick: J
|
|
462
460
|
}, {
|
|
@@ -481,7 +479,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
481
479
|
_: 3
|
|
482
480
|
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
483
481
|
}
|
|
484
|
-
}),
|
|
482
|
+
}), Ne = ["id"], Xe = ["value"], $t = /* @__PURE__ */ v({
|
|
485
483
|
inheritAttrs: !1,
|
|
486
484
|
__name: "select",
|
|
487
485
|
props: /* @__PURE__ */ M({
|
|
@@ -511,34 +509,34 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
511
509
|
}),
|
|
512
510
|
emits: ["update:modelValue"],
|
|
513
511
|
setup(e) {
|
|
514
|
-
const t = e, o = t.id || L(),
|
|
515
|
-
|
|
512
|
+
const t = e, o = t.id || L(), i = $(e, "modelValue"), a = q("formElement"), { isValid: s, validationMessage: n, validate: g } = A(
|
|
513
|
+
a,
|
|
516
514
|
t.validators,
|
|
517
515
|
t.showValidationError
|
|
518
516
|
);
|
|
519
|
-
return (b, y) => (
|
|
517
|
+
return (b, y) => (l(), m(S, x(t, {
|
|
520
518
|
"label-for": r(o),
|
|
521
519
|
"validation-message": e.showValidationError ? "" : r(n),
|
|
522
520
|
invalid: t.invalid || !r(s),
|
|
523
521
|
class: b.$attrs.class
|
|
524
522
|
}), {
|
|
525
523
|
default: c(() => [
|
|
526
|
-
O(d("select",
|
|
524
|
+
O(d("select", x({
|
|
527
525
|
ref_key: "formElement",
|
|
528
|
-
ref:
|
|
526
|
+
ref: a
|
|
529
527
|
}, { ...b.$attrs, class: void 0 }, {
|
|
530
528
|
id: r(o),
|
|
531
|
-
"onUpdate:modelValue": y[0] || (y[0] = (f) =>
|
|
529
|
+
"onUpdate:modelValue": y[0] || (y[0] = (f) => i.value = f),
|
|
532
530
|
class: "dai-form-control__input-group__control dai-select"
|
|
533
531
|
}), [
|
|
534
532
|
p(b.$slots, "default", {}, () => [
|
|
535
|
-
(
|
|
533
|
+
(l(!0), u(I, null, N(e.options, (f) => (l(), u("option", {
|
|
536
534
|
value: f[e.optionValue],
|
|
537
535
|
key: f[e.optionValue]
|
|
538
|
-
}, k(f[e.optionText]), 9,
|
|
536
|
+
}, k(f[e.optionText]), 9, Xe))), 128))
|
|
539
537
|
])
|
|
540
|
-
], 16,
|
|
541
|
-
[pe,
|
|
538
|
+
], 16, Ne), [
|
|
539
|
+
[pe, i.value]
|
|
542
540
|
]),
|
|
543
541
|
y[1] || (y[1] = d("svg", {
|
|
544
542
|
class: "dai-select__chevron",
|
|
@@ -584,17 +582,17 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
584
582
|
}),
|
|
585
583
|
emits: ["update:modelValue"],
|
|
586
584
|
setup(e) {
|
|
587
|
-
const t = e, o =
|
|
588
|
-
return (
|
|
585
|
+
const t = e, o = $(e, "modelValue");
|
|
586
|
+
return (i, a) => (l(), m(r(Ee), x(t, {
|
|
589
587
|
displayValue: (s) => e.options.find((n) => n[e.optionValue] === s)?.[e.optionText] || "",
|
|
590
588
|
modelValue: o.value,
|
|
591
|
-
"onUpdate:modelValue":
|
|
589
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => o.value = s)
|
|
592
590
|
}), {
|
|
593
591
|
default: c(() => [
|
|
594
592
|
V(r(qe), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
|
|
595
593
|
V(r(Te), null, {
|
|
596
594
|
default: c(() => [
|
|
597
|
-
(
|
|
595
|
+
(l(!0), u(I, null, N(e.options, (s) => (l(), m(r(Ae), {
|
|
598
596
|
key: s[e.optionValue],
|
|
599
597
|
value: s[e.optionValue]
|
|
600
598
|
}, {
|
|
@@ -624,42 +622,42 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
624
622
|
}),
|
|
625
623
|
emits: ["update:modelValue"],
|
|
626
624
|
setup(e) {
|
|
627
|
-
const t = e, o = t.id || L(),
|
|
628
|
-
|
|
625
|
+
const t = e, o = t.id || L(), i = $(e, "modelValue"), a = q("formElement"), { isValid: s, validationMessage: n, validate: g } = A(
|
|
626
|
+
a,
|
|
629
627
|
t.validators,
|
|
630
628
|
t.showValidationError
|
|
631
629
|
);
|
|
632
630
|
function b() {
|
|
633
631
|
if (!t.autosize) return;
|
|
634
|
-
const y =
|
|
632
|
+
const y = a.value, f = y.offsetHeight - y.clientHeight;
|
|
635
633
|
y.style.height = "auto", y.style.height = `${y.scrollHeight + f}px`;
|
|
636
634
|
}
|
|
637
|
-
return j(b), (y, f) => (
|
|
635
|
+
return j(b), (y, f) => (l(), m(S, x(t, {
|
|
638
636
|
"label-for": r(o),
|
|
639
637
|
"validation-message": e.showValidationError ? "" : r(n),
|
|
640
638
|
invalid: !r(s),
|
|
641
639
|
class: y.$attrs.class
|
|
642
640
|
}), {
|
|
643
641
|
default: c(() => [
|
|
644
|
-
O(d("textarea",
|
|
642
|
+
O(d("textarea", x({
|
|
645
643
|
ref_key: "formElement",
|
|
646
|
-
ref:
|
|
644
|
+
ref: a
|
|
647
645
|
}, { ...y.$attrs, class: void 0 }, {
|
|
648
646
|
id: r(o),
|
|
649
|
-
"onUpdate:modelValue": f[0] || (f[0] = (C) =>
|
|
647
|
+
"onUpdate:modelValue": f[0] || (f[0] = (C) => i.value = C),
|
|
650
648
|
onKeyupPassive: f[1] || (f[1] = (C) => !r(s) && r(g)()),
|
|
651
649
|
onInputPassive: b,
|
|
652
650
|
class: ["form-control__textarea", {
|
|
653
651
|
"form-control__textarea--autosize": e.autosize
|
|
654
652
|
}]
|
|
655
653
|
}), null, 16, He), [
|
|
656
|
-
[he,
|
|
654
|
+
[he, i.value]
|
|
657
655
|
])
|
|
658
656
|
]),
|
|
659
657
|
_: 1
|
|
660
658
|
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
661
659
|
}
|
|
662
|
-
}),
|
|
660
|
+
}), Ke = ["id"], Bt = /* @__PURE__ */ v({
|
|
663
661
|
inheritAttrs: !1,
|
|
664
662
|
__name: "checkbox",
|
|
665
663
|
props: /* @__PURE__ */ M({
|
|
@@ -674,31 +672,31 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
674
672
|
}),
|
|
675
673
|
emits: ["update:modelValue"],
|
|
676
674
|
setup(e) {
|
|
677
|
-
const t = e, o =
|
|
678
|
-
|
|
675
|
+
const t = e, o = $(e, "modelValue"), i = L(), a = q("formElement"), { isValid: s } = A(
|
|
676
|
+
a,
|
|
679
677
|
t.validators,
|
|
680
678
|
t.showValidationError
|
|
681
679
|
);
|
|
682
|
-
return (n, g) => (
|
|
680
|
+
return (n, g) => (l(), u("div", {
|
|
683
681
|
class: w(["dai-checkbox-control", n.$attrs.class])
|
|
684
682
|
}, [
|
|
685
|
-
O(d("input",
|
|
683
|
+
O(d("input", x({
|
|
686
684
|
ref_key: "formElement",
|
|
687
|
-
ref:
|
|
685
|
+
ref: a,
|
|
688
686
|
"onUpdate:modelValue": g[0] || (g[0] = (b) => o.value = b)
|
|
689
687
|
}, { ...n.$attrs, class: "" }, {
|
|
690
|
-
id: r(
|
|
688
|
+
id: r(i),
|
|
691
689
|
type: "checkbox",
|
|
692
690
|
class: ["dai-checkbox", {
|
|
693
691
|
[`dai-checkbox--${e.color}`]: e.color,
|
|
694
692
|
"dai-checkbox--invalid": !r(s)
|
|
695
693
|
}]
|
|
696
|
-
}), null, 16,
|
|
694
|
+
}), null, 16, Ke), [
|
|
697
695
|
[be, o.value]
|
|
698
696
|
]),
|
|
699
|
-
e.label || n.$slots.default ? (
|
|
697
|
+
e.label || n.$slots.default ? (l(), m(F, {
|
|
700
698
|
key: 0,
|
|
701
|
-
for: r(
|
|
699
|
+
for: r(i)
|
|
702
700
|
}, {
|
|
703
701
|
default: c(() => [
|
|
704
702
|
p(n.$slots, "default", {}, () => [
|
|
@@ -707,7 +705,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
707
705
|
]),
|
|
708
706
|
_: 3
|
|
709
707
|
}, 8, ["for"])) : h("", !0),
|
|
710
|
-
e.hint || n.$slots.hint ? (
|
|
708
|
+
e.hint || n.$slots.hint ? (l(), m(X, {
|
|
711
709
|
key: 1,
|
|
712
710
|
class: "dai-checkbox-control__hint"
|
|
713
711
|
}, {
|
|
@@ -720,10 +718,10 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
720
718
|
})) : h("", !0)
|
|
721
719
|
], 2));
|
|
722
720
|
}
|
|
723
|
-
}),
|
|
721
|
+
}), Ye = { class: "flex items-center h-5" }, Re = ["value", "id"], Ze = {
|
|
724
722
|
key: 0,
|
|
725
723
|
class: "text-sm"
|
|
726
|
-
},
|
|
724
|
+
}, Ge = ["for"], Qe = {
|
|
727
725
|
key: 0,
|
|
728
726
|
class: "text-secondary-500 dark:text-secondary-400"
|
|
729
727
|
}, Vt = /* @__PURE__ */ v({
|
|
@@ -742,37 +740,37 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
742
740
|
}),
|
|
743
741
|
emits: ["update:modelValue"],
|
|
744
742
|
setup(e) {
|
|
745
|
-
const t = e, o =
|
|
746
|
-
|
|
743
|
+
const t = e, o = $(e, "modelValue"), i = L(), a = q("formElement"), { isValid: s } = A(
|
|
744
|
+
a,
|
|
747
745
|
t.validators,
|
|
748
746
|
t.showValidationError
|
|
749
747
|
);
|
|
750
|
-
return (n, g) => (
|
|
748
|
+
return (n, g) => (l(), u("div", {
|
|
751
749
|
class: w(["flex items-start gap-3", n.$attrs.class])
|
|
752
750
|
}, [
|
|
753
|
-
d("div",
|
|
754
|
-
O(d("input",
|
|
751
|
+
d("div", Ye, [
|
|
752
|
+
O(d("input", x({
|
|
755
753
|
type: "radio",
|
|
756
754
|
ref_key: "formElement",
|
|
757
|
-
ref:
|
|
755
|
+
ref: a,
|
|
758
756
|
"onUpdate:modelValue": g[0] || (g[0] = (b) => o.value = b)
|
|
759
757
|
}, { ...n.$attrs, class: "" }, {
|
|
760
758
|
value: e.value,
|
|
761
|
-
id: r(
|
|
759
|
+
id: r(i),
|
|
762
760
|
class: ["radio", {
|
|
763
761
|
[`radio--${e.color}`]: e.color,
|
|
764
762
|
"radio--invalid": !r(s)
|
|
765
763
|
}]
|
|
766
|
-
}), null, 16,
|
|
764
|
+
}), null, 16, Re), [
|
|
767
765
|
[ye, o.value]
|
|
768
766
|
])
|
|
769
767
|
]),
|
|
770
|
-
e.label ? (
|
|
768
|
+
e.label ? (l(), u("div", Ze, [
|
|
771
769
|
d("label", {
|
|
772
|
-
for: r(
|
|
770
|
+
for: r(i),
|
|
773
771
|
class: "font-medium select-none cursor-pointer"
|
|
774
|
-
}, k(e.label), 9,
|
|
775
|
-
e.hint ? (
|
|
772
|
+
}, k(e.label), 9, Ge),
|
|
773
|
+
e.hint ? (l(), u("p", Qe, k(e.hint), 1)) : h("", !0)
|
|
776
774
|
])) : h("", !0)
|
|
777
775
|
], 2));
|
|
778
776
|
}
|
|
@@ -787,39 +785,39 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
787
785
|
}),
|
|
788
786
|
emits: ["update:modelValue"],
|
|
789
787
|
setup(e) {
|
|
790
|
-
const t =
|
|
791
|
-
return (
|
|
788
|
+
const t = $(e, "modelValue"), o = L();
|
|
789
|
+
return (i, a) => (l(), u("div", We, [
|
|
792
790
|
d("button", {
|
|
793
|
-
onClick:
|
|
791
|
+
onClick: a[0] || (a[0] = (s) => t.value = !t.value),
|
|
794
792
|
id: r(o),
|
|
795
793
|
"aria-checked": t.value,
|
|
796
794
|
role: "switch",
|
|
797
795
|
type: "button",
|
|
798
796
|
tabindex: "0",
|
|
799
797
|
class: w(["dai-switch", [t.value ? "dai-switch--on" : "dai-switch--off"]])
|
|
800
|
-
}, [...
|
|
798
|
+
}, [...a[1] || (a[1] = [
|
|
801
799
|
d("div", {
|
|
802
800
|
"aria-hidden": "true",
|
|
803
801
|
class: "dai-switch__thumb"
|
|
804
802
|
}, null, -1)
|
|
805
803
|
])], 10, Je),
|
|
806
|
-
e.label ||
|
|
804
|
+
e.label || i.$slots.default ? (l(), m(F, {
|
|
807
805
|
key: 0,
|
|
808
806
|
for: r(o)
|
|
809
807
|
}, {
|
|
810
808
|
default: c(() => [
|
|
811
|
-
p(
|
|
809
|
+
p(i.$slots, "default", {}, () => [
|
|
812
810
|
E(k(e.label), 1)
|
|
813
811
|
])
|
|
814
812
|
]),
|
|
815
813
|
_: 3
|
|
816
814
|
}, 8, ["for"])) : h("", !0),
|
|
817
|
-
e.hint ||
|
|
815
|
+
e.hint || i.$slots.hint ? (l(), m(X, {
|
|
818
816
|
key: 1,
|
|
819
817
|
class: "dai-switch-control__hint"
|
|
820
818
|
}, {
|
|
821
819
|
default: c(() => [
|
|
822
|
-
p(
|
|
820
|
+
p(i.$slots, "hint", {}, () => [
|
|
823
821
|
E(k(e.hint), 1)
|
|
824
822
|
])
|
|
825
823
|
]),
|
|
@@ -852,19 +850,19 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
852
850
|
condensed: { type: Boolean }
|
|
853
851
|
},
|
|
854
852
|
setup(e) {
|
|
855
|
-
const t = e, o =
|
|
856
|
-
return (s, n) => (
|
|
853
|
+
const t = e, o = _(() => t.submit ? "submit" : t.reset ? "reset" : "button"), i = _(() => 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");
|
|
854
|
+
return (s, n) => (l(), m(ge(e.href ? "a" : "button"), {
|
|
857
855
|
type: e.href ? void 0 : o.value,
|
|
858
856
|
form: typeof e.submit == "string" ? e.submit : void 0,
|
|
859
857
|
href: e.href,
|
|
860
858
|
class: w(["dai-btn", {
|
|
861
859
|
[`dai-btn--${e.color}`]: e.color,
|
|
862
|
-
"dai-btn--flat":
|
|
863
|
-
"dai-btn--plain":
|
|
864
|
-
"dai-btn--muted":
|
|
865
|
-
"dai-btn--outlined":
|
|
866
|
-
"dai-btn--sm":
|
|
867
|
-
"dai-btn--lg":
|
|
860
|
+
"dai-btn--flat": i.value === "flat",
|
|
861
|
+
"dai-btn--plain": i.value === "plain",
|
|
862
|
+
"dai-btn--muted": i.value === "muted",
|
|
863
|
+
"dai-btn--outlined": i.value === "outlined",
|
|
864
|
+
"dai-btn--sm": a.value === "small",
|
|
865
|
+
"dai-btn--lg": a.value === "large",
|
|
868
866
|
"dai-btn--loading": e.loading,
|
|
869
867
|
"dai-btn--block": e.block,
|
|
870
868
|
"dai-btn--rounded": e.rounded,
|
|
@@ -872,7 +870,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
872
870
|
}])
|
|
873
871
|
}, {
|
|
874
872
|
default: c(() => [
|
|
875
|
-
e.loading ? (
|
|
873
|
+
e.loading ? (l(), u("span", et, [...n[0] || (n[0] = [
|
|
876
874
|
d("svg", {
|
|
877
875
|
xmlns: "http://www.w3.org/2000/svg",
|
|
878
876
|
fill: "none",
|
|
@@ -894,12 +892,12 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
894
892
|
], -1)
|
|
895
893
|
])])) : h("", !0),
|
|
896
894
|
d("span", tt, [
|
|
897
|
-
e.icon ? (
|
|
895
|
+
e.icon ? (l(), u("div", {
|
|
898
896
|
key: 0,
|
|
899
897
|
class: w([e.icon, "dai-btn__icon"])
|
|
900
898
|
}, null, 2)) : h("", !0),
|
|
901
899
|
p(s.$slots, "default"),
|
|
902
|
-
e.iconAfter ? (
|
|
900
|
+
e.iconAfter ? (l(), u("div", {
|
|
903
901
|
key: 1,
|
|
904
902
|
class: w([e.iconAfter, "dai-btn__icon"])
|
|
905
903
|
}, null, 2)) : h("", !0)
|
|
@@ -911,7 +909,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
911
909
|
}), zt = /* @__PURE__ */ v({
|
|
912
910
|
__name: "popoverDialog",
|
|
913
911
|
setup(e) {
|
|
914
|
-
return (t, o) => (
|
|
912
|
+
return (t, o) => (l(), m(P, {
|
|
915
913
|
"enter-from-class": "dai-popover-dialog--anim",
|
|
916
914
|
"leave-to-class": "dai-popover-dialog--anim"
|
|
917
915
|
}, {
|
|
@@ -929,7 +927,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
929
927
|
}), Et = /* @__PURE__ */ v({
|
|
930
928
|
__name: "menuItems",
|
|
931
929
|
setup(e) {
|
|
932
|
-
return (t, o) => (
|
|
930
|
+
return (t, o) => (l(), m(P, {
|
|
933
931
|
"enter-from-class": "dai-menu-items--anim",
|
|
934
932
|
"leave-to-class": "dai-menu-items--anim"
|
|
935
933
|
}, {
|
|
@@ -953,16 +951,16 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
953
951
|
icon: {}
|
|
954
952
|
},
|
|
955
953
|
setup(e) {
|
|
956
|
-
return (t, o) => (
|
|
957
|
-
default: c(({ isActive:
|
|
958
|
-
e.icon ? (
|
|
954
|
+
return (t, o) => (l(), m(r(re), { class: "dai-menu-item" }, {
|
|
955
|
+
default: c(({ isActive: i, isSelected: a }) => [
|
|
956
|
+
e.icon ? (l(), u("div", ot, [
|
|
959
957
|
d("div", {
|
|
960
958
|
class: w(["h-5 w-5", e.icon])
|
|
961
959
|
}, null, 2)
|
|
962
960
|
])) : h("", !0),
|
|
963
961
|
p(t.$slots, "default", {
|
|
964
|
-
isActive:
|
|
965
|
-
isSelected:
|
|
962
|
+
isActive: i,
|
|
963
|
+
isSelected: a
|
|
966
964
|
})
|
|
967
965
|
]),
|
|
968
966
|
_: 3
|
|
@@ -976,7 +974,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
976
974
|
value: {}
|
|
977
975
|
},
|
|
978
976
|
setup(e) {
|
|
979
|
-
return (t, o) => (
|
|
977
|
+
return (t, o) => (l(), m(r(de), {
|
|
980
978
|
id: e.id,
|
|
981
979
|
"aria-controls": e.ariaControls,
|
|
982
980
|
value: e.value,
|
|
@@ -991,22 +989,22 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
991
989
|
}), Tt = /* @__PURE__ */ v({
|
|
992
990
|
__name: "tabList",
|
|
993
991
|
setup(e) {
|
|
994
|
-
const t = q("tablist"), o = q("slider"),
|
|
995
|
-
function
|
|
992
|
+
const t = q("tablist"), o = q("slider"), i = D({});
|
|
993
|
+
function a() {
|
|
996
994
|
if (!o.value) return;
|
|
997
995
|
const s = t.value?.$el;
|
|
998
996
|
if (!s) return;
|
|
999
997
|
const n = s.querySelector("[aria-selected=true]");
|
|
1000
|
-
n && (
|
|
998
|
+
n && (i.value = {
|
|
1001
999
|
left: `${n.offsetLeft}px`,
|
|
1002
1000
|
right: `${s.offsetWidth - n.offsetLeft - n.offsetWidth}px`,
|
|
1003
1001
|
transition: o.value.offsetLeft > n.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
|
|
1004
1002
|
});
|
|
1005
1003
|
}
|
|
1006
|
-
return j(() => we(
|
|
1004
|
+
return j(() => we(a)), (s, n) => (l(), m(r(ue), {
|
|
1007
1005
|
ref_key: "tablist",
|
|
1008
1006
|
ref: t,
|
|
1009
|
-
onClickPassive:
|
|
1007
|
+
onClickPassive: a,
|
|
1010
1008
|
class: "dai-tab-list"
|
|
1011
1009
|
}, {
|
|
1012
1010
|
default: c(() => [
|
|
@@ -1014,7 +1012,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1014
1012
|
ref_key: "slider",
|
|
1015
1013
|
ref: o,
|
|
1016
1014
|
class: "dai-tab-list__slider",
|
|
1017
|
-
style: U(
|
|
1015
|
+
style: U(i.value)
|
|
1018
1016
|
}, null, 4),
|
|
1019
1017
|
p(s.$slots, "default")
|
|
1020
1018
|
]),
|
|
@@ -1037,21 +1035,21 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1037
1035
|
}),
|
|
1038
1036
|
emits: ["update:modelValue"],
|
|
1039
1037
|
setup(e) {
|
|
1040
|
-
const t = e, o =
|
|
1038
|
+
const t = e, o = $(e, "modelValue"), i = t.id ?? L(), { classList: a } = xe(document.body, "nui-body-push");
|
|
1041
1039
|
T(o, () => {
|
|
1042
|
-
if (!t.push || (
|
|
1040
|
+
if (!t.push || (a.splice(1), !o.value))
|
|
1043
1041
|
return;
|
|
1044
1042
|
let n = "nui-body-push--" + t.position;
|
|
1045
|
-
t.lg && (n += "--lg"), t.xl && (n += "--xl"),
|
|
1043
|
+
t.lg && (n += "--lg"), t.xl && (n += "--xl"), a.push(n);
|
|
1046
1044
|
});
|
|
1047
1045
|
function s(n) {
|
|
1048
|
-
n.target.closest(`#${
|
|
1046
|
+
n.target.closest(`#${i}`) || t.closeOnOutsideClick && (o.value = !1);
|
|
1049
1047
|
}
|
|
1050
1048
|
return j(() => {
|
|
1051
1049
|
window.addEventListener("click", s, { passive: !0 });
|
|
1052
|
-
}),
|
|
1050
|
+
}), Y(() => {
|
|
1053
1051
|
window.removeEventListener("click", s);
|
|
1054
|
-
}), (n, g) => (
|
|
1052
|
+
}), (n, g) => (l(), m(R, { to: "body" }, [
|
|
1055
1053
|
V(P, {
|
|
1056
1054
|
appear: "",
|
|
1057
1055
|
"enter-from-class": "nui-offcanvas--animate-hidden",
|
|
@@ -1062,9 +1060,9 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1062
1060
|
"leave-active-class": "ease-in-out"
|
|
1063
1061
|
}, {
|
|
1064
1062
|
default: c(() => [
|
|
1065
|
-
o.value ? (
|
|
1063
|
+
o.value ? (l(), u("div", x({
|
|
1066
1064
|
key: 0,
|
|
1067
|
-
id: r(
|
|
1065
|
+
id: r(i)
|
|
1068
1066
|
}, n.$attrs, {
|
|
1069
1067
|
class: ["nui-offcanvas", {
|
|
1070
1068
|
[`nui-offcanvas--${e.position}`]: !0,
|
|
@@ -1130,21 +1128,21 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1130
1128
|
}),
|
|
1131
1129
|
emits: ["update:modelValue"],
|
|
1132
1130
|
setup(e) {
|
|
1133
|
-
const t = e, o =
|
|
1134
|
-
let
|
|
1135
|
-
function
|
|
1136
|
-
clearTimeout(
|
|
1131
|
+
const t = e, o = $(e, "modelValue");
|
|
1132
|
+
let i;
|
|
1133
|
+
function a() {
|
|
1134
|
+
clearTimeout(i), o.value && t.timeout && (i = setTimeout(() => o.value = !1, t.timeout));
|
|
1137
1135
|
}
|
|
1138
|
-
return T(o,
|
|
1136
|
+
return T(o, a, { immediate: !0 }), (s, n) => o.value ? (l(), u("div", lt, [
|
|
1139
1137
|
d("div", {
|
|
1140
1138
|
class: w(["dai-notification", [`dai-notification--${e.color || "secondary"}`]])
|
|
1141
1139
|
}, [
|
|
1142
|
-
e.icon ? (
|
|
1140
|
+
e.icon ? (l(), u("div", {
|
|
1143
1141
|
key: 0,
|
|
1144
1142
|
class: w(["dai-notification__icon", [`dai-notification__icon--${e.icon}`]])
|
|
1145
1143
|
}, [
|
|
1146
|
-
(
|
|
1147
|
-
e.icon == "success" ? (
|
|
1144
|
+
(l(), u("svg", it, [
|
|
1145
|
+
e.icon == "success" ? (l(), u("path", nt)) : e.icon == "info" ? (l(), u("path", st)) : e.icon == "warning" ? (l(), u("path", rt)) : e.icon == "danger" ? (l(), u("path", dt)) : h("", !0)
|
|
1148
1146
|
]))
|
|
1149
1147
|
], 2)) : h("", !0),
|
|
1150
1148
|
d("div", ut, [
|
|
@@ -1153,9 +1151,9 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1153
1151
|
"dai-notification__content__message--bold": e.detail
|
|
1154
1152
|
}])
|
|
1155
1153
|
}, k(e.message), 3),
|
|
1156
|
-
e.detail ? (
|
|
1154
|
+
e.detail ? (l(), u("div", ct, k(e.detail), 1)) : h("", !0)
|
|
1157
1155
|
]),
|
|
1158
|
-
e.dismissible ? (
|
|
1156
|
+
e.dismissible ? (l(), u("div", {
|
|
1159
1157
|
key: 1,
|
|
1160
1158
|
onClick: n[0] || (n[0] = (g) => o.value = !1),
|
|
1161
1159
|
class: "dai-notification__dismiss"
|
|
@@ -1191,24 +1189,24 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1191
1189
|
}),
|
|
1192
1190
|
emits: ["update:queue"],
|
|
1193
1191
|
setup(e) {
|
|
1194
|
-
const t = e, o =
|
|
1195
|
-
let
|
|
1192
|
+
const t = e, o = $(e, "queue"), i = D([]);
|
|
1193
|
+
let a = 0;
|
|
1196
1194
|
function s() {
|
|
1197
|
-
o.value.length === 0 ||
|
|
1195
|
+
o.value.length === 0 || i.value.length >= t.length || (i.value.push({ ...o.value[0], id: a++, show: !0 }), o.value.shift());
|
|
1198
1196
|
}
|
|
1199
1197
|
function n(b) {
|
|
1200
1198
|
setTimeout(() => {
|
|
1201
|
-
|
|
1199
|
+
i.value = i.value.filter(
|
|
1202
1200
|
(y) => y.id !== b
|
|
1203
1201
|
), s();
|
|
1204
1202
|
}, 200);
|
|
1205
1203
|
}
|
|
1206
1204
|
T(o, s, { immediate: !0, deep: !0 });
|
|
1207
|
-
const g =
|
|
1205
|
+
const g = _(() => {
|
|
1208
1206
|
const b = ["dai-notification-queue__item--anim"];
|
|
1209
1207
|
return t.positionX === "right" ? b.push("dai-notification-queue__item--anim-x-right") : t.positionX === "left" ? b.push("dai-notification-queue__item--anim-x-left") : t.positionX === "center" && t.positionY === "top" ? b.push("dai-notification-queue__item--anim-y-top") : t.positionX === "center" && t.positionY === "bottom" && b.push("dai-notification-queue__item--anim-y-bottom"), b.join(" ");
|
|
1210
1208
|
});
|
|
1211
|
-
return (b, y) => (
|
|
1209
|
+
return (b, y) => (l(), u("div", {
|
|
1212
1210
|
class: w(["dai-notification-queue", {
|
|
1213
1211
|
"dai-notification-queue--fixed": e.position == "fixed",
|
|
1214
1212
|
"dai-notification-queue--absolute": e.position == "absolute",
|
|
@@ -1227,7 +1225,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1227
1225
|
"leave-active-class": "dai-notification-queue__item--anim-out"
|
|
1228
1226
|
}, {
|
|
1229
1227
|
default: c(() => [
|
|
1230
|
-
(
|
|
1228
|
+
(l(!0), u(I, null, N(i.value, (f) => (l(), m(ft, {
|
|
1231
1229
|
key: f.id,
|
|
1232
1230
|
color: f.color,
|
|
1233
1231
|
icon: f.type,
|
|
@@ -1252,8 +1250,8 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1252
1250
|
rounded: { type: Boolean, default: !0 }
|
|
1253
1251
|
},
|
|
1254
1252
|
setup(e) {
|
|
1255
|
-
const t = e, o =
|
|
1256
|
-
return (
|
|
1253
|
+
const t = e, o = _(() => t.value === void 0);
|
|
1254
|
+
return (i, a) => (l(), u("div", {
|
|
1257
1255
|
class: w(["overflow-hidden text-xs w-full flex-1", {
|
|
1258
1256
|
rounded: e.rounded,
|
|
1259
1257
|
"bg-primary-200": e.color == "primary",
|
|
@@ -1293,21 +1291,21 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1293
1291
|
},
|
|
1294
1292
|
emits: ["update:modelValue"],
|
|
1295
1293
|
setup(e) {
|
|
1296
|
-
const t =
|
|
1294
|
+
const t = $(e, "modelValue");
|
|
1297
1295
|
function o() {
|
|
1298
1296
|
t.value = !1;
|
|
1299
1297
|
}
|
|
1300
|
-
return T(t, (
|
|
1301
|
-
|
|
1302
|
-
}), (
|
|
1298
|
+
return T(t, (i) => {
|
|
1299
|
+
i ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
|
|
1300
|
+
}), (i, a) => (l(), m(R, { to: "body" }, [
|
|
1303
1301
|
V(P, {
|
|
1304
1302
|
appear: "",
|
|
1305
1303
|
name: "modal",
|
|
1306
1304
|
duration: { enter: 300, leave: 200 }
|
|
1307
1305
|
}, {
|
|
1308
1306
|
default: c(() => [
|
|
1309
|
-
t.value ? (
|
|
1310
|
-
|
|
1307
|
+
t.value ? (l(), u("div", vt, [
|
|
1308
|
+
a[0] || (a[0] = d("div", {
|
|
1311
1309
|
class: "modal__backdrop fixed inset-0 bg-primary-50/60 backdrop-blur-sm",
|
|
1312
1310
|
"aria-hidden": "true"
|
|
1313
1311
|
}, null, -1)),
|
|
@@ -1317,7 +1315,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1317
1315
|
class: "min-h-full flex items-center justify-center p-4 sm:p-6"
|
|
1318
1316
|
}, [
|
|
1319
1317
|
d("div", ht, [
|
|
1320
|
-
p(
|
|
1318
|
+
p(i.$slots, "default", { close: o })
|
|
1321
1319
|
])
|
|
1322
1320
|
])
|
|
1323
1321
|
])
|
|
@@ -1352,9 +1350,9 @@ export {
|
|
|
1352
1350
|
xt as Selectbox,
|
|
1353
1351
|
Mt as Switch,
|
|
1354
1352
|
qt as Tab,
|
|
1355
|
-
|
|
1353
|
+
Dt as TabContainer,
|
|
1356
1354
|
Tt as TabList,
|
|
1357
|
-
|
|
1355
|
+
Nt as TabPanel,
|
|
1358
1356
|
_t as Textarea,
|
|
1359
1357
|
xe as useClassList
|
|
1360
1358
|
};
|