@defaultusr/dai-ui 1.1.17 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { useFormControl as T, 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
|
-
import { Menu as
|
|
3
|
-
import { reactive as ce, watch as
|
|
4
|
-
import './assets/main.css';function
|
|
2
|
+
import { Menu as St, Popover as Nt, TabContainer as Ut, TabPanel as Xt } from "vue-composable-ui";
|
|
3
|
+
import { reactive as ce, watch as A, onUnmounted as R, defineComponent as h, createElementBlock as u, openBlock as i, renderSlot as p, createTextVNode as z, toDisplayString as k, normalizeClass as w, createBlock as v, createCommentVNode as y, createElementVNode as d, computed as _, createVNode as M, normalizeProps as fe, guardReactiveProps as me, withCtx as c, 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
|
+
import './assets/main.css';function $e(e, ...t) {
|
|
5
5
|
let o = [];
|
|
6
6
|
const l = ce(t);
|
|
7
|
-
function
|
|
7
|
+
function a() {
|
|
8
8
|
l.length && (e.classList.add(...l), o = [...l]);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function s() {
|
|
11
11
|
e.classList.remove(...o);
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return A(
|
|
14
14
|
l,
|
|
15
15
|
() => {
|
|
16
|
-
|
|
16
|
+
s(), a();
|
|
17
17
|
},
|
|
18
18
|
{ immediate: !0 }
|
|
19
|
-
),
|
|
19
|
+
), R(s), {
|
|
20
20
|
classList: l
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const xe = { class: "dai-label" }, F = /* @__PURE__ */ h({
|
|
24
24
|
__name: "label",
|
|
25
25
|
props: {
|
|
26
26
|
text: {}
|
|
27
27
|
},
|
|
28
28
|
setup(e) {
|
|
29
|
-
return (t, o) => (
|
|
30
|
-
|
|
29
|
+
return (t, o) => (i(), u("label", xe, [
|
|
30
|
+
p(t.$slots, "default", {}, () => [
|
|
31
31
|
z(k(e.text), 1)
|
|
32
32
|
])
|
|
33
33
|
]));
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), _e = { class: "dai-hint" }, H = /* @__PURE__ */ h({
|
|
36
36
|
__name: "hint",
|
|
37
37
|
props: {
|
|
38
38
|
text: {}
|
|
39
39
|
},
|
|
40
40
|
setup(e) {
|
|
41
|
-
return (t, o) => (
|
|
42
|
-
|
|
41
|
+
return (t, o) => (i(), u("div", _e, [
|
|
42
|
+
p(t.$slots, "default", {}, () => [
|
|
43
43
|
z(k(e.text), 1)
|
|
44
44
|
])
|
|
45
45
|
]));
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
47
|
+
}), Be = { class: "dai-form-control__input-group__box" }, Ve = /* @__PURE__ */ h({
|
|
48
48
|
inheritAttrs: !1,
|
|
49
49
|
__name: "inputGroup",
|
|
50
50
|
props: {
|
|
@@ -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) => (i(), 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,22 +69,22 @@ 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 ? (i(), v(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
|
-
}, null, 8, ["text", "for"])) :
|
|
78
|
-
d("div",
|
|
79
|
-
|
|
77
|
+
}, null, 8, ["text", "for"])) : y("", !0),
|
|
78
|
+
d("div", Be, [
|
|
79
|
+
p(t.$slots, "default")
|
|
80
80
|
])
|
|
81
81
|
], 2));
|
|
82
82
|
}
|
|
83
|
-
}),
|
|
83
|
+
}), Me = { class: "dai-form-control__container" }, Ce = {
|
|
84
84
|
key: 0,
|
|
85
85
|
class: "dai-form-control__validation-message",
|
|
86
86
|
role: "alert"
|
|
87
|
-
}, S = /* @__PURE__ */
|
|
87
|
+
}, S = /* @__PURE__ */ h({
|
|
88
88
|
inheritAttrs: !1,
|
|
89
89
|
__name: "formControl",
|
|
90
90
|
props: {
|
|
@@ -105,39 +105,39 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
105
105
|
},
|
|
106
106
|
setup(e) {
|
|
107
107
|
const t = e, o = _(() => t.variant ? t.variant : t.muted ? "muted" : t.outlined ? "outlined" : "flat"), l = _(() => t.size ? t.size : t.sm ? "small" : t.lg ? "large" : "medium");
|
|
108
|
-
return (
|
|
108
|
+
return (a, s) => (i(), 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
112
|
"dai-form-control--lg": l.value === "large"
|
|
113
113
|
}])
|
|
114
114
|
}, [
|
|
115
|
-
e.label && e.labelPosition !== "inside" ? (
|
|
115
|
+
e.label && e.labelPosition !== "inside" ? (i(), v(F, {
|
|
116
116
|
key: 0,
|
|
117
117
|
for: e.labelFor,
|
|
118
118
|
text: e.label
|
|
119
|
-
}, null, 8, ["for", "text"])) :
|
|
120
|
-
d("div",
|
|
121
|
-
|
|
119
|
+
}, null, 8, ["for", "text"])) : y("", !0),
|
|
120
|
+
d("div", Me, [
|
|
121
|
+
M(Ve, fe(me({
|
|
122
122
|
...t,
|
|
123
123
|
label: e.labelPosition === "inside" ? e.label : void 0,
|
|
124
124
|
variant: o.value,
|
|
125
125
|
size: l.value
|
|
126
126
|
})), {
|
|
127
127
|
default: c(() => [
|
|
128
|
-
|
|
128
|
+
p(a.$slots, "default")
|
|
129
129
|
]),
|
|
130
130
|
_: 3
|
|
131
131
|
}, 16),
|
|
132
|
-
e.hint ? (
|
|
132
|
+
e.hint ? (i(), v(H, {
|
|
133
133
|
key: 0,
|
|
134
134
|
text: e.hint,
|
|
135
135
|
class: "dai-form-control__hint"
|
|
136
|
-
}, null, 8, ["text"])) :
|
|
137
|
-
|
|
136
|
+
}, null, 8, ["text"])) : y("", !0),
|
|
137
|
+
M(P, { name: "dai-form-control__validation-message-transition" }, {
|
|
138
138
|
default: c(() => [
|
|
139
|
-
e.validationMessage ? (
|
|
140
|
-
|
|
139
|
+
e.validationMessage ? (i(), u("div", Ce, [
|
|
140
|
+
s[0] || (s[0] = d("svg", {
|
|
141
141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
142
142
|
viewBox: "0 0 256 256",
|
|
143
143
|
class: ""
|
|
@@ -148,17 +148,17 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
148
148
|
})
|
|
149
149
|
], -1)),
|
|
150
150
|
z(" " + k(e.validationMessage), 1)
|
|
151
|
-
])) :
|
|
151
|
+
])) : y("", !0)
|
|
152
152
|
]),
|
|
153
153
|
_: 1
|
|
154
154
|
})
|
|
155
155
|
])
|
|
156
156
|
], 2));
|
|
157
157
|
}
|
|
158
|
-
}),
|
|
158
|
+
}), Ee = ["value"], ze = /* @__PURE__ */ h({
|
|
159
159
|
inheritAttrs: !1,
|
|
160
160
|
__name: "combobox",
|
|
161
|
-
props: /* @__PURE__ */
|
|
161
|
+
props: /* @__PURE__ */ C({
|
|
162
162
|
id: {},
|
|
163
163
|
validators: { default: () => [] },
|
|
164
164
|
showValidationError: { type: Boolean, default: !1 },
|
|
@@ -182,31 +182,31 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
182
182
|
}),
|
|
183
183
|
emits: ["update:modelValue"],
|
|
184
184
|
setup(e) {
|
|
185
|
-
const t = e, o =
|
|
186
|
-
|
|
185
|
+
const t = e, o = B(e, "modelValue"), l = t.id || q(), a = L("formElement"), { isValid: s, validationMessage: r } = T(
|
|
186
|
+
a,
|
|
187
187
|
t.validators,
|
|
188
188
|
t.showValidationError
|
|
189
189
|
);
|
|
190
|
-
return (
|
|
191
|
-
labelFor:
|
|
192
|
-
validationMessage: e.showValidationError ? "" :
|
|
193
|
-
invalid: !s
|
|
194
|
-
class:
|
|
190
|
+
return (g, b) => (i(), v(S, $(t, {
|
|
191
|
+
labelFor: n(l),
|
|
192
|
+
validationMessage: e.showValidationError ? "" : n(r),
|
|
193
|
+
invalid: !n(s),
|
|
194
|
+
class: g.$attrs.class
|
|
195
195
|
}), {
|
|
196
196
|
default: c(() => [
|
|
197
|
-
|
|
198
|
-
id:
|
|
197
|
+
M(n(te), $({ ...g.$attrs, class: void 0, required: void 0 }, {
|
|
198
|
+
id: n(l),
|
|
199
199
|
modelValue: o.value,
|
|
200
|
-
"onUpdate:modelValue":
|
|
200
|
+
"onUpdate:modelValue": b[0] || (b[0] = (f) => o.value = f)
|
|
201
201
|
}), {
|
|
202
202
|
default: c(() => [
|
|
203
203
|
d("input", $({
|
|
204
204
|
ref_key: "formElement",
|
|
205
|
-
ref:
|
|
205
|
+
ref: a,
|
|
206
206
|
type: "text",
|
|
207
207
|
value: o.value
|
|
208
|
-
}, { required:
|
|
209
|
-
|
|
208
|
+
}, { required: g.$attrs.required }, { class: "dai-combobox__stab-input" }), null, 16, Ee),
|
|
209
|
+
p(g.$slots, "default")
|
|
210
210
|
]),
|
|
211
211
|
_: 3
|
|
212
212
|
}, 16, ["id", "modelValue"])
|
|
@@ -214,20 +214,20 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
214
214
|
_: 3
|
|
215
215
|
}, 16, ["labelFor", "validationMessage", "invalid", "class"]));
|
|
216
216
|
}
|
|
217
|
-
}),
|
|
217
|
+
}), wt = /* @__PURE__ */ h({
|
|
218
218
|
__name: "comboboxInput",
|
|
219
219
|
setup(e) {
|
|
220
|
-
return (t, o) => (
|
|
220
|
+
return (t, o) => (i(), v(n(oe), { class: "dai-form-control__input-group__control" }, {
|
|
221
221
|
default: c(() => [
|
|
222
|
-
|
|
222
|
+
p(t.$slots, "default")
|
|
223
223
|
]),
|
|
224
224
|
_: 3
|
|
225
225
|
}));
|
|
226
226
|
}
|
|
227
|
-
}),
|
|
227
|
+
}), Le = {
|
|
228
228
|
key: 0,
|
|
229
229
|
class: "dai-form-control__input-group__control__placeholder"
|
|
230
|
-
},
|
|
230
|
+
}, qe = /* @__PURE__ */ h({
|
|
231
231
|
__name: "comboboxButton",
|
|
232
232
|
props: {
|
|
233
233
|
placeholder: {}
|
|
@@ -239,17 +239,17 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
239
239
|
function o() {
|
|
240
240
|
t.isOpen.value ? t.close({ focus: !0 }) : t.open({ focus: !1 });
|
|
241
241
|
}
|
|
242
|
-
return (l,
|
|
243
|
-
onKeydown:
|
|
242
|
+
return (l, a) => (i(), u("button", $(n(t).activatorAttrs.value, {
|
|
243
|
+
onKeydown: a[0] || (a[0] = (s) => n(t).activatorOnKeyDown(s)),
|
|
244
244
|
onClick: o,
|
|
245
245
|
type: "button",
|
|
246
246
|
class: "dai-form-control__input-group__control dai-combobox-btn"
|
|
247
247
|
}), [
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
z(k(
|
|
251
|
-
], 64)) : (
|
|
252
|
-
|
|
248
|
+
p(l.$slots, "default", {}, () => [
|
|
249
|
+
n(t).displayValue.value ? (i(), u(I, { key: 1 }, [
|
|
250
|
+
z(k(n(t).displayValue), 1)
|
|
251
|
+
], 64)) : (i(), u("span", Le, k(e.placeholder || "Select..."), 1)),
|
|
252
|
+
a[1] || (a[1] = d("svg", {
|
|
253
253
|
class: "dai-combobox-btn__chevron",
|
|
254
254
|
role: "presentation",
|
|
255
255
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -265,17 +265,17 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
265
265
|
])
|
|
266
266
|
], 16));
|
|
267
267
|
}
|
|
268
|
-
}),
|
|
268
|
+
}), Te = /* @__PURE__ */ h({
|
|
269
269
|
__name: "comboboxOptions",
|
|
270
270
|
setup(e) {
|
|
271
|
-
return (t, o) => (
|
|
271
|
+
return (t, o) => (i(), v(P, {
|
|
272
272
|
"enter-from-class": "dai-combobox-options--anim",
|
|
273
273
|
"leave-to-class": "dai-combobox-options--anim"
|
|
274
274
|
}, {
|
|
275
275
|
default: c(() => [
|
|
276
|
-
|
|
276
|
+
M(n(le), { class: "dai-combobox-options" }, {
|
|
277
277
|
default: c(() => [
|
|
278
|
-
|
|
278
|
+
p(t.$slots, "default")
|
|
279
279
|
]),
|
|
280
280
|
_: 3
|
|
281
281
|
})
|
|
@@ -288,65 +288,65 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
288
288
|
class: "dai-combobox-option__check",
|
|
289
289
|
xmlns: "http://www.w3.org/2000/svg",
|
|
290
290
|
viewBox: "0 0 16 16"
|
|
291
|
-
},
|
|
291
|
+
}, Pe = /* @__PURE__ */ h({
|
|
292
292
|
__name: "comboboxOption",
|
|
293
293
|
props: {
|
|
294
294
|
value: {}
|
|
295
295
|
},
|
|
296
296
|
setup(e) {
|
|
297
|
-
return (t, o) => (
|
|
297
|
+
return (t, o) => (i(), v(n(ie), {
|
|
298
298
|
value: e.value,
|
|
299
299
|
class: "dai-combobox-option"
|
|
300
300
|
}, {
|
|
301
|
-
default: c(({ isActive: l, isSelected:
|
|
302
|
-
|
|
301
|
+
default: c(({ isActive: l, isSelected: a }) => [
|
|
302
|
+
p(t.$slots, "default", {
|
|
303
303
|
isActive: l,
|
|
304
|
-
isSelected:
|
|
304
|
+
isSelected: a
|
|
305
305
|
}),
|
|
306
|
-
|
|
306
|
+
a ? (i(), u("svg", Ae, [...o[0] || (o[0] = [
|
|
307
307
|
d("path", {
|
|
308
308
|
fill: "currentColor",
|
|
309
309
|
"fill-rule": "evenodd",
|
|
310
310
|
d: "M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353l4.493-6.74a.75.75 0 0 1 1.04-.207",
|
|
311
311
|
"clip-rule": "evenodd"
|
|
312
312
|
}, null, -1)
|
|
313
|
-
])])) :
|
|
313
|
+
])])) : y("", !0)
|
|
314
314
|
]),
|
|
315
315
|
_: 3
|
|
316
316
|
}, 8, ["value"]));
|
|
317
317
|
}
|
|
318
|
-
}),
|
|
318
|
+
}), je = (e, t) => {
|
|
319
319
|
const o = e.__vccOpts || e;
|
|
320
|
-
for (const [l,
|
|
321
|
-
o[l] =
|
|
320
|
+
for (const [l, a] of t)
|
|
321
|
+
o[l] = a;
|
|
322
322
|
return o;
|
|
323
|
-
},
|
|
323
|
+
}, Ie = {}, Oe = {
|
|
324
324
|
type: "button",
|
|
325
325
|
class: "dai-form-control__input-group__addon dai-form-control__input-group__addon--btn",
|
|
326
326
|
tabindex: "-1",
|
|
327
327
|
"aria-hidden": "true"
|
|
328
328
|
};
|
|
329
|
-
function
|
|
330
|
-
return
|
|
331
|
-
|
|
329
|
+
function Fe(e, t) {
|
|
330
|
+
return i(), u("button", Oe, [
|
|
331
|
+
p(e.$slots, "default")
|
|
332
332
|
]);
|
|
333
333
|
}
|
|
334
|
-
const
|
|
334
|
+
const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern", "title", "autocomplete", "value"], Ne = {
|
|
335
335
|
key: 0,
|
|
336
336
|
xmlns: "http://www.w3.org/2000/svg",
|
|
337
337
|
fill: "none",
|
|
338
338
|
viewBox: "0 0 24 24",
|
|
339
339
|
stroke: "currentColor"
|
|
340
|
-
},
|
|
340
|
+
}, Ue = {
|
|
341
341
|
key: 1,
|
|
342
342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
343
343
|
fill: "none",
|
|
344
344
|
viewBox: "0 0 24 24",
|
|
345
345
|
stroke: "currentColor"
|
|
346
|
-
},
|
|
346
|
+
}, kt = /* @__PURE__ */ h({
|
|
347
347
|
inheritAttrs: !1,
|
|
348
348
|
__name: "input",
|
|
349
|
-
props: /* @__PURE__ */
|
|
349
|
+
props: /* @__PURE__ */ C({
|
|
350
350
|
id: {},
|
|
351
351
|
type: { default: "text" },
|
|
352
352
|
mask: {},
|
|
@@ -378,79 +378,79 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
378
378
|
}),
|
|
379
379
|
emits: ["update:modelValue", "update:files"],
|
|
380
380
|
setup(e) {
|
|
381
|
-
const t = e, o = t.id || q(), l = _(() => typeof t.autocomplete == "string" ? t.autocomplete : t.autocomplete ? "on" : "off"),
|
|
382
|
-
set(
|
|
383
|
-
return
|
|
381
|
+
const t = e, o = t.id || q(), l = _(() => typeof t.autocomplete == "string" ? t.autocomplete : t.autocomplete ? "on" : "off"), a = B(e, "modelValue"), s = B(e, "files", {
|
|
382
|
+
set(V) {
|
|
383
|
+
return r.value && (r.value.files = V), V;
|
|
384
384
|
}
|
|
385
|
-
}),
|
|
386
|
-
|
|
385
|
+
}), r = L("formElement"), { isValid: g, validationMessage: b, validate: f } = T(
|
|
386
|
+
r,
|
|
387
387
|
t.validators,
|
|
388
388
|
t.showValidationError
|
|
389
|
-
),
|
|
390
|
-
|
|
391
|
-
|
|
389
|
+
), m = U(!1);
|
|
390
|
+
A(a, () => {
|
|
391
|
+
s.value = r.value?.files || null;
|
|
392
392
|
});
|
|
393
|
-
let
|
|
394
|
-
const
|
|
393
|
+
let x;
|
|
394
|
+
const j = _(() => t.type === "password" ? m.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
|
+
m.value = !m.value;
|
|
399
399
|
}
|
|
400
400
|
function J() {
|
|
401
|
-
|
|
401
|
+
a.value = "";
|
|
402
402
|
}
|
|
403
|
-
function ee(
|
|
404
|
-
if (
|
|
403
|
+
function ee(V) {
|
|
404
|
+
if (x)
|
|
405
405
|
return;
|
|
406
|
-
const { value: E } =
|
|
407
|
-
|
|
406
|
+
const { value: E } = V.target;
|
|
407
|
+
a.value = E;
|
|
408
408
|
}
|
|
409
|
-
return
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
),
|
|
415
|
-
|
|
409
|
+
return O(() => {
|
|
410
|
+
Y.value && import("imask").then((V) => {
|
|
411
|
+
x = V.default(
|
|
412
|
+
r.value,
|
|
413
|
+
Y.value
|
|
414
|
+
), x.on("accept", () => {
|
|
415
|
+
a.value = x.value;
|
|
416
416
|
});
|
|
417
417
|
});
|
|
418
|
-
}), (
|
|
419
|
-
"label-for":
|
|
420
|
-
"validation-message": e.showValidationError ? "" :
|
|
421
|
-
invalid: t.invalid || !
|
|
422
|
-
class:
|
|
418
|
+
}), (V, E) => (i(), v(S, $(t, {
|
|
419
|
+
"label-for": n(o),
|
|
420
|
+
"validation-message": e.showValidationError ? "" : n(b),
|
|
421
|
+
invalid: t.invalid || !n(g),
|
|
422
|
+
class: V.$attrs.class
|
|
423
423
|
}), {
|
|
424
424
|
default: c(() => [
|
|
425
|
-
|
|
425
|
+
p(V.$slots, "prepend"),
|
|
426
426
|
d("input", $({
|
|
427
427
|
ref_key: "formElement",
|
|
428
|
-
ref:
|
|
429
|
-
}, { ...
|
|
430
|
-
id:
|
|
431
|
-
type:
|
|
428
|
+
ref: r
|
|
429
|
+
}, { ...V.$attrs, class: void 0 }, {
|
|
430
|
+
id: n(o),
|
|
431
|
+
type: j.value,
|
|
432
432
|
pattern: G.value,
|
|
433
433
|
title: Q.value,
|
|
434
434
|
autocomplete: l.value,
|
|
435
|
-
value:
|
|
435
|
+
value: a.value,
|
|
436
436
|
onInputPassive: ee,
|
|
437
|
-
onKeyupPassive: E[0] || (E[0] = (
|
|
437
|
+
onKeyupPassive: E[0] || (E[0] = (bt) => !n(g) && n(f)()),
|
|
438
438
|
class: "dai-form-control__input-group__control dai-form-control__input"
|
|
439
|
-
}), null, 16,
|
|
440
|
-
|
|
441
|
-
t.type === "password" &&
|
|
439
|
+
}), null, 16, Se),
|
|
440
|
+
p(V.$slots, "append"),
|
|
441
|
+
t.type === "password" && a.value ? (i(), v(K, {
|
|
442
442
|
key: 0,
|
|
443
443
|
onClick: W
|
|
444
444
|
}, {
|
|
445
445
|
default: c(() => [
|
|
446
|
-
|
|
446
|
+
m.value ? (i(), u("svg", Ue, [...E[2] || (E[2] = [
|
|
447
447
|
d("path", {
|
|
448
448
|
"stroke-linecap": "round",
|
|
449
449
|
"stroke-linejoin": "round",
|
|
450
450
|
"stroke-width": "2",
|
|
451
451
|
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"
|
|
452
452
|
}, null, -1)
|
|
453
|
-
])])) : (
|
|
453
|
+
])])) : (i(), u("svg", Ne, [...E[1] || (E[1] = [
|
|
454
454
|
d("path", {
|
|
455
455
|
"stroke-linecap": "round",
|
|
456
456
|
"stroke-linejoin": "round",
|
|
@@ -466,8 +466,8 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
466
466
|
])]))
|
|
467
467
|
]),
|
|
468
468
|
_: 1
|
|
469
|
-
})) :
|
|
470
|
-
e.clearable &&
|
|
469
|
+
})) : y("", !0),
|
|
470
|
+
e.clearable && a.value && !t.disabled ? (i(), v(K, {
|
|
471
471
|
key: 1,
|
|
472
472
|
onClick: J
|
|
473
473
|
}, {
|
|
@@ -487,15 +487,15 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
487
487
|
], -1)
|
|
488
488
|
])]),
|
|
489
489
|
_: 1
|
|
490
|
-
})) :
|
|
490
|
+
})) : y("", !0)
|
|
491
491
|
]),
|
|
492
492
|
_: 3
|
|
493
493
|
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
494
494
|
}
|
|
495
|
-
}),
|
|
495
|
+
}), Xe = ["id"], De = ["value"], $t = /* @__PURE__ */ h({
|
|
496
496
|
inheritAttrs: !1,
|
|
497
497
|
__name: "select",
|
|
498
|
-
props: /* @__PURE__ */
|
|
498
|
+
props: /* @__PURE__ */ C({
|
|
499
499
|
id: {},
|
|
500
500
|
options: {},
|
|
501
501
|
optionText: { default: "text" },
|
|
@@ -522,36 +522,36 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
522
522
|
}),
|
|
523
523
|
emits: ["update:modelValue"],
|
|
524
524
|
setup(e) {
|
|
525
|
-
const t = e, o = t.id || q(), l =
|
|
526
|
-
|
|
525
|
+
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = T(
|
|
526
|
+
a,
|
|
527
527
|
t.validators,
|
|
528
528
|
t.showValidationError
|
|
529
529
|
);
|
|
530
|
-
return (
|
|
531
|
-
"label-for":
|
|
532
|
-
"validation-message": e.showValidationError ? "" :
|
|
533
|
-
invalid: t.invalid || !s
|
|
534
|
-
class:
|
|
530
|
+
return (b, f) => (i(), v(S, $(t, {
|
|
531
|
+
"label-for": n(o),
|
|
532
|
+
"validation-message": e.showValidationError ? "" : n(r),
|
|
533
|
+
invalid: t.invalid || !n(s),
|
|
534
|
+
class: b.$attrs.class
|
|
535
535
|
}), {
|
|
536
536
|
default: c(() => [
|
|
537
|
-
|
|
537
|
+
X(d("select", $({
|
|
538
538
|
ref_key: "formElement",
|
|
539
|
-
ref:
|
|
540
|
-
}, { ...
|
|
541
|
-
id:
|
|
542
|
-
"onUpdate:modelValue":
|
|
539
|
+
ref: a
|
|
540
|
+
}, { ...b.$attrs, class: void 0 }, {
|
|
541
|
+
id: n(o),
|
|
542
|
+
"onUpdate:modelValue": f[0] || (f[0] = (m) => l.value = m),
|
|
543
543
|
class: "dai-form-control__input-group__control dai-select"
|
|
544
544
|
}), [
|
|
545
|
-
|
|
546
|
-
(
|
|
547
|
-
value:
|
|
548
|
-
key:
|
|
549
|
-
}, k(
|
|
545
|
+
p(b.$slots, "default", {}, () => [
|
|
546
|
+
(i(!0), u(I, null, D(e.options, (m) => (i(), u("option", {
|
|
547
|
+
value: m[e.optionValue],
|
|
548
|
+
key: m[e.optionValue]
|
|
549
|
+
}, k(m[e.optionText]), 9, De))), 128))
|
|
550
550
|
])
|
|
551
|
-
], 16,
|
|
551
|
+
], 16, Xe), [
|
|
552
552
|
[he, l.value]
|
|
553
553
|
]),
|
|
554
|
-
|
|
554
|
+
f[1] || (f[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"
|
|
@@ -567,9 +567,9 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
567
567
|
_: 3
|
|
568
568
|
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
569
569
|
}
|
|
570
|
-
}),
|
|
570
|
+
}), xt = /* @__PURE__ */ h({
|
|
571
571
|
__name: "selectbox",
|
|
572
|
-
props: /* @__PURE__ */
|
|
572
|
+
props: /* @__PURE__ */ C({
|
|
573
573
|
options: {},
|
|
574
574
|
optionText: { default: "text" },
|
|
575
575
|
optionValue: { default: "value" },
|
|
@@ -597,22 +597,22 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
597
597
|
}),
|
|
598
598
|
emits: ["update:modelValue"],
|
|
599
599
|
setup(e) {
|
|
600
|
-
const t = e, o =
|
|
601
|
-
return (l,
|
|
602
|
-
displayValue: (
|
|
600
|
+
const t = e, o = B(e, "modelValue");
|
|
601
|
+
return (l, a) => (i(), v(n(ze), $(t, {
|
|
602
|
+
displayValue: (s) => e.options.find((r) => r[e.optionValue] === s)?.[e.optionText] || "",
|
|
603
603
|
modelValue: o.value,
|
|
604
|
-
"onUpdate:modelValue":
|
|
604
|
+
"onUpdate:modelValue": a[0] || (a[0] = (s) => o.value = s)
|
|
605
605
|
}), {
|
|
606
606
|
default: c(() => [
|
|
607
|
-
|
|
608
|
-
|
|
607
|
+
M(n(qe), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
|
|
608
|
+
M(n(Te), null, {
|
|
609
609
|
default: c(() => [
|
|
610
|
-
(
|
|
611
|
-
key:
|
|
612
|
-
value:
|
|
610
|
+
(i(!0), u(I, null, D(e.options, (s) => (i(), v(n(Pe), {
|
|
611
|
+
key: s[e.optionValue],
|
|
612
|
+
value: s[e.optionValue]
|
|
613
613
|
}, {
|
|
614
614
|
default: c(() => [
|
|
615
|
-
z(k(
|
|
615
|
+
z(k(s[e.optionText]), 1)
|
|
616
616
|
]),
|
|
617
617
|
_: 2
|
|
618
618
|
}, 1032, ["value"]))), 128))
|
|
@@ -623,10 +623,10 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
623
623
|
_: 1
|
|
624
624
|
}, 16, ["displayValue", "modelValue"]));
|
|
625
625
|
}
|
|
626
|
-
}),
|
|
626
|
+
}), He = ["id"], _t = /* @__PURE__ */ h({
|
|
627
627
|
inheritAttrs: !1,
|
|
628
628
|
__name: "textarea",
|
|
629
|
-
props: /* @__PURE__ */
|
|
629
|
+
props: /* @__PURE__ */ C({
|
|
630
630
|
id: {},
|
|
631
631
|
autosize: { type: Boolean },
|
|
632
632
|
validators: {},
|
|
@@ -637,46 +637,47 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
637
637
|
}),
|
|
638
638
|
emits: ["update:modelValue"],
|
|
639
639
|
setup(e) {
|
|
640
|
-
const t = e, o = t.id || q(), l =
|
|
641
|
-
|
|
640
|
+
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = T(
|
|
641
|
+
a,
|
|
642
642
|
t.validators,
|
|
643
643
|
t.showValidationError
|
|
644
644
|
);
|
|
645
|
-
function
|
|
645
|
+
function b() {
|
|
646
646
|
if (!t.autosize) return;
|
|
647
|
-
const
|
|
648
|
-
|
|
647
|
+
const f = a.value, m = f.offsetHeight - f.clientHeight;
|
|
648
|
+
f.style.height = "auto", f.style.height = `${f.scrollHeight + m}px`;
|
|
649
649
|
}
|
|
650
|
-
return
|
|
651
|
-
"label-for":
|
|
652
|
-
"validation-message": e.showValidationError ? "" :
|
|
653
|
-
invalid: !s
|
|
654
|
-
class:
|
|
650
|
+
return O(b), (f, m) => (i(), v(S, $(t, {
|
|
651
|
+
"label-for": n(o),
|
|
652
|
+
"validation-message": e.showValidationError ? "" : n(r),
|
|
653
|
+
invalid: !n(s),
|
|
654
|
+
class: f.$attrs.class
|
|
655
655
|
}), {
|
|
656
656
|
default: c(() => [
|
|
657
|
-
|
|
657
|
+
X(d("textarea", $({
|
|
658
658
|
ref_key: "formElement",
|
|
659
|
-
ref:
|
|
660
|
-
}, { ...
|
|
661
|
-
id:
|
|
662
|
-
"onUpdate:modelValue":
|
|
663
|
-
onKeyupPassive:
|
|
664
|
-
onInputPassive:
|
|
659
|
+
ref: a
|
|
660
|
+
}, { ...f.$attrs, class: void 0 }, {
|
|
661
|
+
id: n(o),
|
|
662
|
+
"onUpdate:modelValue": m[0] || (m[0] = (x) => l.value = x),
|
|
663
|
+
onKeyupPassive: m[1] || (m[1] = (x) => !n(s) && n(g)()),
|
|
664
|
+
onInputPassive: b,
|
|
665
665
|
class: ["form-control__textarea", {
|
|
666
666
|
"form-control__textarea--autosize": e.autosize
|
|
667
667
|
}]
|
|
668
|
-
}), null, 16,
|
|
668
|
+
}), null, 16, He), [
|
|
669
669
|
[pe, l.value]
|
|
670
670
|
])
|
|
671
671
|
]),
|
|
672
672
|
_: 1
|
|
673
673
|
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
674
674
|
}
|
|
675
|
-
}),
|
|
675
|
+
}), Ye = ["checked", "id"], Bt = /* @__PURE__ */ h({
|
|
676
676
|
inheritAttrs: !1,
|
|
677
677
|
__name: "checkbox",
|
|
678
|
-
props: /* @__PURE__ */
|
|
678
|
+
props: /* @__PURE__ */ C({
|
|
679
679
|
id: {},
|
|
680
|
+
value: {},
|
|
680
681
|
color: { default: "primary" },
|
|
681
682
|
size: { default: "small" },
|
|
682
683
|
validators: {},
|
|
@@ -684,70 +685,81 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
684
685
|
label: {},
|
|
685
686
|
hint: {}
|
|
686
687
|
}, {
|
|
687
|
-
modelValue: { type: Boolean },
|
|
688
|
+
modelValue: { type: [Boolean, Array] },
|
|
688
689
|
modelModifiers: {}
|
|
689
690
|
}),
|
|
690
691
|
emits: ["update:modelValue"],
|
|
691
692
|
setup(e) {
|
|
692
|
-
const t = e, o = t.id || q(), l =
|
|
693
|
-
|
|
693
|
+
const t = e, o = t.id || q(), l = t.value || o, a = B(e, "modelValue"), s = L("formElement"), { isValid: r } = T(
|
|
694
|
+
s,
|
|
694
695
|
t.validators,
|
|
695
696
|
t.showValidationError
|
|
696
|
-
);
|
|
697
|
-
|
|
698
|
-
|
|
697
|
+
), g = _(() => Array.isArray(a.value) ? a.value.includes(l) : a.value);
|
|
698
|
+
function b(f) {
|
|
699
|
+
const x = f.target.checked;
|
|
700
|
+
if (Array.isArray(a.value))
|
|
701
|
+
if (x)
|
|
702
|
+
a.value.push(l);
|
|
703
|
+
else {
|
|
704
|
+
const j = a.value.indexOf(l);
|
|
705
|
+
j > -1 && a.value.splice(j, 1);
|
|
706
|
+
}
|
|
707
|
+
else
|
|
708
|
+
a.value = x;
|
|
709
|
+
}
|
|
710
|
+
return (f, m) => (i(), u("div", {
|
|
711
|
+
class: w(["dai-checkbox-control", f.$attrs.class])
|
|
699
712
|
}, [
|
|
700
|
-
|
|
713
|
+
d("input", $({
|
|
701
714
|
ref_key: "formElement",
|
|
702
|
-
ref:
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
715
|
+
ref: s
|
|
716
|
+
}, { ...f.$attrs, class: "" }, {
|
|
717
|
+
checked: g.value,
|
|
718
|
+
onChange: b,
|
|
719
|
+
id: n(o),
|
|
706
720
|
type: "checkbox",
|
|
707
721
|
class: ["dai-checkbox", {
|
|
708
722
|
[`dai-checkbox--${e.color}`]: e.color,
|
|
709
|
-
"dai-checkbox--invalid": !
|
|
723
|
+
"dai-checkbox--invalid": !n(r),
|
|
710
724
|
"dai-checkbox--md": e.size === "medium",
|
|
711
725
|
"dai-checkbox--lg": e.size === "large"
|
|
712
726
|
}]
|
|
713
|
-
}), null, 16,
|
|
714
|
-
|
|
715
|
-
]),
|
|
716
|
-
e.label || n.$slots.default ? (a(), m(F, {
|
|
727
|
+
}), null, 16, Ye),
|
|
728
|
+
e.label || f.$slots.default ? (i(), v(F, {
|
|
717
729
|
key: 0,
|
|
718
|
-
for:
|
|
730
|
+
for: n(o),
|
|
719
731
|
class: "dai-checkbox-control__label"
|
|
720
732
|
}, {
|
|
721
733
|
default: c(() => [
|
|
722
|
-
|
|
734
|
+
p(f.$slots, "default", {}, () => [
|
|
723
735
|
z(k(e.label), 1)
|
|
724
736
|
])
|
|
725
737
|
]),
|
|
726
738
|
_: 3
|
|
727
|
-
}, 8, ["for"])) :
|
|
728
|
-
e.hint ||
|
|
739
|
+
}, 8, ["for"])) : y("", !0),
|
|
740
|
+
e.hint || f.$slots.hint ? (i(), v(H, {
|
|
729
741
|
key: 1,
|
|
730
742
|
class: "dai-checkbox-control__hint"
|
|
731
743
|
}, {
|
|
732
744
|
default: c(() => [
|
|
733
|
-
|
|
745
|
+
p(f.$slots, "hint", {}, () => [
|
|
734
746
|
z(k(e.hint), 1)
|
|
735
747
|
])
|
|
736
748
|
]),
|
|
737
749
|
_: 3
|
|
738
|
-
})) :
|
|
750
|
+
})) : y("", !0)
|
|
739
751
|
], 2));
|
|
740
752
|
}
|
|
741
|
-
}),
|
|
753
|
+
}), Ke = { class: "flex items-center h-5" }, Re = ["value", "id"], Ze = {
|
|
742
754
|
key: 0,
|
|
743
755
|
class: "text-sm"
|
|
744
|
-
},
|
|
756
|
+
}, Ge = ["for"], Qe = {
|
|
745
757
|
key: 0,
|
|
746
758
|
class: "text-secondary-500 dark:text-secondary-400"
|
|
747
|
-
},
|
|
759
|
+
}, Vt = /* @__PURE__ */ h({
|
|
748
760
|
inheritAttrs: !1,
|
|
749
761
|
__name: "radio",
|
|
750
|
-
props: /* @__PURE__ */
|
|
762
|
+
props: /* @__PURE__ */ C({
|
|
751
763
|
value: {},
|
|
752
764
|
color: { default: "primary" },
|
|
753
765
|
validators: {},
|
|
@@ -760,43 +772,43 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
760
772
|
}),
|
|
761
773
|
emits: ["update:modelValue"],
|
|
762
774
|
setup(e) {
|
|
763
|
-
const t = e, o =
|
|
764
|
-
|
|
775
|
+
const t = e, o = B(e, "modelValue"), l = q(), a = L("formElement"), { isValid: s } = T(
|
|
776
|
+
a,
|
|
765
777
|
t.validators,
|
|
766
778
|
t.showValidationError
|
|
767
779
|
);
|
|
768
|
-
return (
|
|
769
|
-
class: w(["flex items-start gap-3",
|
|
780
|
+
return (r, g) => (i(), u("div", {
|
|
781
|
+
class: w(["flex items-start gap-3", r.$attrs.class])
|
|
770
782
|
}, [
|
|
771
|
-
d("div",
|
|
772
|
-
|
|
783
|
+
d("div", Ke, [
|
|
784
|
+
X(d("input", $({
|
|
773
785
|
type: "radio",
|
|
774
786
|
ref_key: "formElement",
|
|
775
|
-
ref:
|
|
776
|
-
"onUpdate:modelValue":
|
|
777
|
-
}, { ...
|
|
787
|
+
ref: a,
|
|
788
|
+
"onUpdate:modelValue": g[0] || (g[0] = (b) => o.value = b)
|
|
789
|
+
}, { ...r.$attrs, class: "" }, {
|
|
778
790
|
value: e.value,
|
|
779
|
-
id:
|
|
791
|
+
id: n(l),
|
|
780
792
|
class: ["radio", {
|
|
781
793
|
[`radio--${e.color}`]: e.color,
|
|
782
|
-
"radio--invalid": !s
|
|
794
|
+
"radio--invalid": !n(s)
|
|
783
795
|
}]
|
|
784
|
-
}), null, 16,
|
|
785
|
-
[
|
|
796
|
+
}), null, 16, Re), [
|
|
797
|
+
[be, o.value]
|
|
786
798
|
])
|
|
787
799
|
]),
|
|
788
|
-
e.label ? (
|
|
800
|
+
e.label ? (i(), u("div", Ze, [
|
|
789
801
|
d("label", {
|
|
790
|
-
for:
|
|
802
|
+
for: n(l),
|
|
791
803
|
class: "font-medium select-none cursor-pointer"
|
|
792
|
-
}, k(e.label), 9,
|
|
793
|
-
e.hint ? (
|
|
794
|
-
])) :
|
|
804
|
+
}, k(e.label), 9, Ge),
|
|
805
|
+
e.hint ? (i(), u("p", Qe, k(e.hint), 1)) : y("", !0)
|
|
806
|
+
])) : y("", !0)
|
|
795
807
|
], 2));
|
|
796
808
|
}
|
|
797
|
-
}),
|
|
809
|
+
}), We = { class: "dai-switch-control" }, Je = ["id", "aria-checked"], Mt = /* @__PURE__ */ h({
|
|
798
810
|
__name: "switch",
|
|
799
|
-
props: /* @__PURE__ */
|
|
811
|
+
props: /* @__PURE__ */ C({
|
|
800
812
|
label: {},
|
|
801
813
|
hint: {}
|
|
802
814
|
}, {
|
|
@@ -805,50 +817,50 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
805
817
|
}),
|
|
806
818
|
emits: ["update:modelValue"],
|
|
807
819
|
setup(e) {
|
|
808
|
-
const t =
|
|
809
|
-
return (l,
|
|
820
|
+
const t = B(e, "modelValue"), o = q();
|
|
821
|
+
return (l, a) => (i(), u("div", We, [
|
|
810
822
|
d("button", {
|
|
811
|
-
onClick:
|
|
812
|
-
id:
|
|
823
|
+
onClick: a[0] || (a[0] = (s) => t.value = !t.value),
|
|
824
|
+
id: n(o),
|
|
813
825
|
"aria-checked": t.value,
|
|
814
826
|
role: "switch",
|
|
815
827
|
type: "button",
|
|
816
828
|
tabindex: "0",
|
|
817
829
|
class: w(["dai-switch", [t.value ? "dai-switch--on" : "dai-switch--off"]])
|
|
818
|
-
}, [...
|
|
830
|
+
}, [...a[1] || (a[1] = [
|
|
819
831
|
d("div", {
|
|
820
832
|
"aria-hidden": "true",
|
|
821
833
|
class: "dai-switch__thumb"
|
|
822
834
|
}, null, -1)
|
|
823
|
-
])], 10,
|
|
824
|
-
e.label || l.$slots.default ? (
|
|
835
|
+
])], 10, Je),
|
|
836
|
+
e.label || l.$slots.default ? (i(), v(F, {
|
|
825
837
|
key: 0,
|
|
826
|
-
for:
|
|
838
|
+
for: n(o)
|
|
827
839
|
}, {
|
|
828
840
|
default: c(() => [
|
|
829
|
-
|
|
841
|
+
p(l.$slots, "default", {}, () => [
|
|
830
842
|
z(k(e.label), 1)
|
|
831
843
|
])
|
|
832
844
|
]),
|
|
833
845
|
_: 3
|
|
834
|
-
}, 8, ["for"])) :
|
|
835
|
-
e.hint || l.$slots.hint ? (
|
|
846
|
+
}, 8, ["for"])) : y("", !0),
|
|
847
|
+
e.hint || l.$slots.hint ? (i(), v(H, {
|
|
836
848
|
key: 1,
|
|
837
849
|
class: "dai-switch-control__hint"
|
|
838
850
|
}, {
|
|
839
851
|
default: c(() => [
|
|
840
|
-
|
|
852
|
+
p(l.$slots, "hint", {}, () => [
|
|
841
853
|
z(k(e.hint), 1)
|
|
842
854
|
])
|
|
843
855
|
]),
|
|
844
856
|
_: 3
|
|
845
|
-
})) :
|
|
857
|
+
})) : y("", !0)
|
|
846
858
|
]));
|
|
847
859
|
}
|
|
848
|
-
}),
|
|
860
|
+
}), et = {
|
|
849
861
|
key: 0,
|
|
850
862
|
class: "dai-btn__spinner"
|
|
851
|
-
},
|
|
863
|
+
}, tt = { class: "dai-btn__caption" }, Ct = /* @__PURE__ */ h({
|
|
852
864
|
__name: "btn",
|
|
853
865
|
props: {
|
|
854
866
|
submit: { type: [Boolean, String] },
|
|
@@ -870,8 +882,8 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
870
882
|
condensed: { type: Boolean }
|
|
871
883
|
},
|
|
872
884
|
setup(e) {
|
|
873
|
-
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"),
|
|
874
|
-
return (
|
|
885
|
+
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");
|
|
886
|
+
return (s, r) => (i(), v(ye(e.href ? "a" : "button"), {
|
|
875
887
|
type: e.href ? void 0 : o.value,
|
|
876
888
|
form: typeof e.submit == "string" ? e.submit : void 0,
|
|
877
889
|
href: e.href,
|
|
@@ -881,8 +893,8 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
881
893
|
"dai-btn--plain": l.value === "plain",
|
|
882
894
|
"dai-btn--muted": l.value === "muted",
|
|
883
895
|
"dai-btn--outlined": l.value === "outlined",
|
|
884
|
-
"dai-btn--sm":
|
|
885
|
-
"dai-btn--lg":
|
|
896
|
+
"dai-btn--sm": a.value === "small",
|
|
897
|
+
"dai-btn--lg": a.value === "large",
|
|
886
898
|
"dai-btn--loading": e.loading,
|
|
887
899
|
"dai-btn--block": e.block,
|
|
888
900
|
"dai-btn--rounded": e.rounded,
|
|
@@ -890,7 +902,7 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
890
902
|
}])
|
|
891
903
|
}, {
|
|
892
904
|
default: c(() => [
|
|
893
|
-
e.loading ? (
|
|
905
|
+
e.loading ? (i(), u("span", et, [...r[0] || (r[0] = [
|
|
894
906
|
d("svg", {
|
|
895
907
|
xmlns: "http://www.w3.org/2000/svg",
|
|
896
908
|
fill: "none",
|
|
@@ -910,33 +922,33 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
910
922
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
911
923
|
})
|
|
912
924
|
], -1)
|
|
913
|
-
])])) :
|
|
914
|
-
d("span",
|
|
915
|
-
e.icon ? (
|
|
925
|
+
])])) : y("", !0),
|
|
926
|
+
d("span", tt, [
|
|
927
|
+
e.icon ? (i(), u("div", {
|
|
916
928
|
key: 0,
|
|
917
929
|
class: w([e.icon, "dai-btn__icon"])
|
|
918
|
-
}, null, 2)) :
|
|
919
|
-
|
|
920
|
-
e.iconAfter ? (
|
|
930
|
+
}, null, 2)) : y("", !0),
|
|
931
|
+
p(s.$slots, "default"),
|
|
932
|
+
e.iconAfter ? (i(), u("div", {
|
|
921
933
|
key: 1,
|
|
922
934
|
class: w([e.iconAfter, "dai-btn__icon"])
|
|
923
|
-
}, null, 2)) :
|
|
935
|
+
}, null, 2)) : y("", !0)
|
|
924
936
|
])
|
|
925
937
|
]),
|
|
926
938
|
_: 3
|
|
927
939
|
}, 8, ["type", "form", "href", "class"]));
|
|
928
940
|
}
|
|
929
|
-
}),
|
|
941
|
+
}), Et = /* @__PURE__ */ h({
|
|
930
942
|
__name: "popoverDialog",
|
|
931
943
|
setup(e) {
|
|
932
|
-
return (t, o) => (
|
|
944
|
+
return (t, o) => (i(), v(P, {
|
|
933
945
|
"enter-from-class": "dai-popover-dialog--anim",
|
|
934
946
|
"leave-to-class": "dai-popover-dialog--anim"
|
|
935
947
|
}, {
|
|
936
948
|
default: c(() => [
|
|
937
|
-
|
|
949
|
+
M(n(ne), { class: "dai-popover-dialog" }, {
|
|
938
950
|
default: c(() => [
|
|
939
|
-
|
|
951
|
+
p(t.$slots, "default")
|
|
940
952
|
]),
|
|
941
953
|
_: 3
|
|
942
954
|
})
|
|
@@ -944,17 +956,17 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
944
956
|
_: 3
|
|
945
957
|
}));
|
|
946
958
|
}
|
|
947
|
-
}),
|
|
959
|
+
}), zt = /* @__PURE__ */ h({
|
|
948
960
|
__name: "menuItems",
|
|
949
961
|
setup(e) {
|
|
950
|
-
return (t, o) => (
|
|
962
|
+
return (t, o) => (i(), v(P, {
|
|
951
963
|
"enter-from-class": "dai-menu-items--anim",
|
|
952
964
|
"leave-to-class": "dai-menu-items--anim"
|
|
953
965
|
}, {
|
|
954
966
|
default: c(() => [
|
|
955
|
-
|
|
967
|
+
M(n(se), { class: "dai-menu-items" }, {
|
|
956
968
|
default: c(() => [
|
|
957
|
-
|
|
969
|
+
p(t.$slots, "default")
|
|
958
970
|
]),
|
|
959
971
|
_: 3
|
|
960
972
|
})
|
|
@@ -962,31 +974,31 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
962
974
|
_: 3
|
|
963
975
|
}));
|
|
964
976
|
}
|
|
965
|
-
}),
|
|
977
|
+
}), ot = {
|
|
966
978
|
key: 0,
|
|
967
979
|
class: "text-secondary-400 flex-shrink-0"
|
|
968
|
-
},
|
|
980
|
+
}, Lt = /* @__PURE__ */ h({
|
|
969
981
|
__name: "menuItem",
|
|
970
982
|
props: {
|
|
971
983
|
icon: {}
|
|
972
984
|
},
|
|
973
985
|
setup(e) {
|
|
974
|
-
return (t, o) => (
|
|
975
|
-
default: c(({ isActive: l, isSelected:
|
|
976
|
-
e.icon ? (
|
|
986
|
+
return (t, o) => (i(), v(n(re), { class: "dai-menu-item" }, {
|
|
987
|
+
default: c(({ isActive: l, isSelected: a }) => [
|
|
988
|
+
e.icon ? (i(), u("div", ot, [
|
|
977
989
|
d("div", {
|
|
978
990
|
class: w(["h-5 w-5", e.icon])
|
|
979
991
|
}, null, 2)
|
|
980
|
-
])) :
|
|
981
|
-
|
|
992
|
+
])) : y("", !0),
|
|
993
|
+
p(t.$slots, "default", {
|
|
982
994
|
isActive: l,
|
|
983
|
-
isSelected:
|
|
995
|
+
isSelected: a
|
|
984
996
|
})
|
|
985
997
|
]),
|
|
986
998
|
_: 3
|
|
987
999
|
}));
|
|
988
1000
|
}
|
|
989
|
-
}),
|
|
1001
|
+
}), qt = /* @__PURE__ */ h({
|
|
990
1002
|
__name: "tab",
|
|
991
1003
|
props: {
|
|
992
1004
|
id: {},
|
|
@@ -994,37 +1006,37 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
994
1006
|
value: {}
|
|
995
1007
|
},
|
|
996
1008
|
setup(e) {
|
|
997
|
-
return (t, o) => (
|
|
1009
|
+
return (t, o) => (i(), v(n(de), {
|
|
998
1010
|
id: e.id,
|
|
999
1011
|
"aria-controls": e.ariaControls,
|
|
1000
1012
|
value: e.value,
|
|
1001
1013
|
class: "dai-tab"
|
|
1002
1014
|
}, {
|
|
1003
1015
|
default: c(() => [
|
|
1004
|
-
|
|
1016
|
+
p(t.$slots, "default")
|
|
1005
1017
|
]),
|
|
1006
1018
|
_: 3
|
|
1007
1019
|
}, 8, ["id", "aria-controls", "value"]));
|
|
1008
1020
|
}
|
|
1009
|
-
}),
|
|
1021
|
+
}), Tt = /* @__PURE__ */ h({
|
|
1010
1022
|
__name: "tabList",
|
|
1011
1023
|
setup(e) {
|
|
1012
|
-
const t = L("tablist"), o = L("slider"), l =
|
|
1013
|
-
function
|
|
1024
|
+
const t = L("tablist"), o = L("slider"), l = U({});
|
|
1025
|
+
function a() {
|
|
1014
1026
|
if (!o.value) return;
|
|
1015
|
-
const
|
|
1016
|
-
if (!
|
|
1017
|
-
const
|
|
1018
|
-
|
|
1019
|
-
left: `${
|
|
1020
|
-
right: `${
|
|
1021
|
-
transition: o.value.offsetLeft >
|
|
1027
|
+
const s = t.value?.$el;
|
|
1028
|
+
if (!s) return;
|
|
1029
|
+
const r = s.querySelector("[aria-selected=true]");
|
|
1030
|
+
r && (l.value = {
|
|
1031
|
+
left: `${r.offsetLeft}px`,
|
|
1032
|
+
right: `${s.offsetWidth - r.offsetLeft - r.offsetWidth}px`,
|
|
1033
|
+
transition: o.value.offsetLeft > r.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
|
|
1022
1034
|
});
|
|
1023
1035
|
}
|
|
1024
|
-
return
|
|
1036
|
+
return O(() => ge(a)), (s, r) => (i(), v(n(ue), {
|
|
1025
1037
|
ref_key: "tablist",
|
|
1026
1038
|
ref: t,
|
|
1027
|
-
onClickPassive:
|
|
1039
|
+
onClickPassive: a,
|
|
1028
1040
|
class: "dai-tab-list"
|
|
1029
1041
|
}, {
|
|
1030
1042
|
default: c(() => [
|
|
@@ -1032,17 +1044,17 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1032
1044
|
ref_key: "slider",
|
|
1033
1045
|
ref: o,
|
|
1034
1046
|
class: "dai-tab-list__slider",
|
|
1035
|
-
style:
|
|
1047
|
+
style: N(l.value)
|
|
1036
1048
|
}, null, 4),
|
|
1037
|
-
|
|
1049
|
+
p(s.$slots, "default")
|
|
1038
1050
|
]),
|
|
1039
1051
|
_: 3
|
|
1040
1052
|
}, 512));
|
|
1041
1053
|
}
|
|
1042
|
-
}),
|
|
1054
|
+
}), at = ["id"], At = /* @__PURE__ */ h({
|
|
1043
1055
|
inheritAttrs: !1,
|
|
1044
1056
|
__name: "offcanvas",
|
|
1045
|
-
props: /* @__PURE__ */
|
|
1057
|
+
props: /* @__PURE__ */ C({
|
|
1046
1058
|
id: {},
|
|
1047
1059
|
position: { default: "right" },
|
|
1048
1060
|
push: { type: Boolean },
|
|
@@ -1055,22 +1067,22 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1055
1067
|
}),
|
|
1056
1068
|
emits: ["update:modelValue"],
|
|
1057
1069
|
setup(e) {
|
|
1058
|
-
const t = e, o =
|
|
1059
|
-
|
|
1060
|
-
if (!t.push || (
|
|
1070
|
+
const t = e, o = B(e, "modelValue"), l = t.id ?? q(), { classList: a } = $e(document.body, "nui-body-push");
|
|
1071
|
+
A(o, () => {
|
|
1072
|
+
if (!t.push || (a.splice(1), !o.value))
|
|
1061
1073
|
return;
|
|
1062
|
-
let
|
|
1063
|
-
t.lg && (
|
|
1074
|
+
let r = "nui-body-push--" + t.position;
|
|
1075
|
+
t.lg && (r += "--lg"), t.xl && (r += "--xl"), a.push(r);
|
|
1064
1076
|
});
|
|
1065
|
-
function r
|
|
1066
|
-
|
|
1077
|
+
function s(r) {
|
|
1078
|
+
r.target.closest(`#${l}`) || t.closeOnOutsideClick && (o.value = !1);
|
|
1067
1079
|
}
|
|
1068
|
-
return
|
|
1069
|
-
window.addEventListener("click",
|
|
1070
|
-
}),
|
|
1071
|
-
window.removeEventListener("click",
|
|
1072
|
-
}), (
|
|
1073
|
-
|
|
1080
|
+
return O(() => {
|
|
1081
|
+
window.addEventListener("click", s, { passive: !0 });
|
|
1082
|
+
}), R(() => {
|
|
1083
|
+
window.removeEventListener("click", s);
|
|
1084
|
+
}), (r, g) => (i(), v(Z, { to: "body" }, [
|
|
1085
|
+
M(P, {
|
|
1074
1086
|
appear: "",
|
|
1075
1087
|
"enter-from-class": "nui-offcanvas--animate-hidden",
|
|
1076
1088
|
"enter-to-class": "nui-offcanvas--animate-shown",
|
|
@@ -1080,10 +1092,10 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1080
1092
|
"leave-active-class": "ease-in-out"
|
|
1081
1093
|
}, {
|
|
1082
1094
|
default: c(() => [
|
|
1083
|
-
o.value ? (
|
|
1095
|
+
o.value ? (i(), u("div", $({
|
|
1084
1096
|
key: 0,
|
|
1085
|
-
id:
|
|
1086
|
-
},
|
|
1097
|
+
id: n(l)
|
|
1098
|
+
}, r.$attrs, {
|
|
1087
1099
|
class: ["nui-offcanvas", {
|
|
1088
1100
|
[`nui-offcanvas--${e.position}`]: !0,
|
|
1089
1101
|
"nui-offcanvas--shadow": !e.push,
|
|
@@ -1091,51 +1103,51 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1091
1103
|
"nui-offcanvas--xl": e.xl
|
|
1092
1104
|
}]
|
|
1093
1105
|
}), [
|
|
1094
|
-
|
|
1095
|
-
], 16,
|
|
1106
|
+
p(r.$slots, "default")
|
|
1107
|
+
], 16, at)) : y("", !0)
|
|
1096
1108
|
]),
|
|
1097
1109
|
_: 3
|
|
1098
1110
|
})
|
|
1099
1111
|
]));
|
|
1100
1112
|
}
|
|
1101
|
-
}),
|
|
1113
|
+
}), lt = {
|
|
1102
1114
|
key: 0,
|
|
1103
1115
|
role: "alert"
|
|
1104
|
-
},
|
|
1116
|
+
}, it = {
|
|
1105
1117
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1106
1118
|
fill: "none",
|
|
1107
1119
|
viewBox: "0 0 24 24",
|
|
1108
1120
|
stroke: "currentColor"
|
|
1109
|
-
},
|
|
1121
|
+
}, nt = {
|
|
1110
1122
|
key: 0,
|
|
1111
1123
|
"stroke-linecap": "round",
|
|
1112
1124
|
"stroke-linejoin": "round",
|
|
1113
1125
|
"stroke-width": "2",
|
|
1114
1126
|
d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1115
|
-
},
|
|
1127
|
+
}, st = {
|
|
1116
1128
|
key: 1,
|
|
1117
1129
|
"stroke-linecap": "round",
|
|
1118
1130
|
"stroke-linejoin": "round",
|
|
1119
1131
|
"stroke-width": "2",
|
|
1120
1132
|
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1121
|
-
},
|
|
1133
|
+
}, rt = {
|
|
1122
1134
|
key: 2,
|
|
1123
1135
|
"stroke-linecap": "round",
|
|
1124
1136
|
"stroke-linejoin": "round",
|
|
1125
1137
|
"stroke-width": "2",
|
|
1126
1138
|
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
1127
|
-
},
|
|
1139
|
+
}, dt = {
|
|
1128
1140
|
key: 3,
|
|
1129
1141
|
"stroke-linecap": "round",
|
|
1130
1142
|
"stroke-linejoin": "round",
|
|
1131
1143
|
"stroke-width": "2",
|
|
1132
1144
|
d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1133
|
-
},
|
|
1145
|
+
}, ut = { class: "dai-notification__content" }, ct = {
|
|
1134
1146
|
key: 0,
|
|
1135
1147
|
class: "dai-notification__content__detail"
|
|
1136
|
-
},
|
|
1148
|
+
}, ft = /* @__PURE__ */ h({
|
|
1137
1149
|
__name: "notification",
|
|
1138
|
-
props: /* @__PURE__ */
|
|
1150
|
+
props: /* @__PURE__ */ C({
|
|
1139
1151
|
color: {},
|
|
1140
1152
|
icon: {},
|
|
1141
1153
|
message: {},
|
|
@@ -1148,36 +1160,36 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1148
1160
|
}),
|
|
1149
1161
|
emits: ["update:modelValue"],
|
|
1150
1162
|
setup(e) {
|
|
1151
|
-
const t = e, o =
|
|
1163
|
+
const t = e, o = B(e, "modelValue");
|
|
1152
1164
|
let l;
|
|
1153
|
-
function
|
|
1165
|
+
function a() {
|
|
1154
1166
|
clearTimeout(l), o.value && t.timeout && (l = setTimeout(() => o.value = !1, t.timeout));
|
|
1155
1167
|
}
|
|
1156
|
-
return
|
|
1168
|
+
return A(o, a, { immediate: !0 }), (s, r) => o.value ? (i(), u("div", lt, [
|
|
1157
1169
|
d("div", {
|
|
1158
1170
|
class: w(["dai-notification", [`dai-notification--${e.color || "secondary"}`]])
|
|
1159
1171
|
}, [
|
|
1160
|
-
e.icon ? (
|
|
1172
|
+
e.icon ? (i(), u("div", {
|
|
1161
1173
|
key: 0,
|
|
1162
1174
|
class: w(["dai-notification__icon", [`dai-notification__icon--${e.icon}`]])
|
|
1163
1175
|
}, [
|
|
1164
|
-
(
|
|
1165
|
-
e.icon == "success" ? (
|
|
1176
|
+
(i(), u("svg", it, [
|
|
1177
|
+
e.icon == "success" ? (i(), u("path", nt)) : e.icon == "info" ? (i(), u("path", st)) : e.icon == "warning" ? (i(), u("path", rt)) : e.icon == "danger" ? (i(), u("path", dt)) : y("", !0)
|
|
1166
1178
|
]))
|
|
1167
|
-
], 2)) :
|
|
1168
|
-
d("div",
|
|
1179
|
+
], 2)) : y("", !0),
|
|
1180
|
+
d("div", ut, [
|
|
1169
1181
|
d("div", {
|
|
1170
1182
|
class: w(["dai-notification__content__message", {
|
|
1171
1183
|
"dai-notification__content__message--bold": e.detail
|
|
1172
1184
|
}])
|
|
1173
1185
|
}, k(e.message), 3),
|
|
1174
|
-
e.detail ? (
|
|
1186
|
+
e.detail ? (i(), u("div", ct, k(e.detail), 1)) : y("", !0)
|
|
1175
1187
|
]),
|
|
1176
|
-
e.dismissible ? (
|
|
1188
|
+
e.dismissible ? (i(), u("div", {
|
|
1177
1189
|
key: 1,
|
|
1178
|
-
onClick:
|
|
1190
|
+
onClick: r[0] || (r[0] = (g) => o.value = !1),
|
|
1179
1191
|
class: "dai-notification__dismiss"
|
|
1180
|
-
}, [...
|
|
1192
|
+
}, [...r[1] || (r[1] = [
|
|
1181
1193
|
d("svg", {
|
|
1182
1194
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1183
1195
|
fill: "none",
|
|
@@ -1191,13 +1203,13 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1191
1203
|
d: "M6 18L18 6M6 6l12 12"
|
|
1192
1204
|
})
|
|
1193
1205
|
], -1)
|
|
1194
|
-
])])) :
|
|
1206
|
+
])])) : y("", !0)
|
|
1195
1207
|
], 2)
|
|
1196
|
-
])) :
|
|
1208
|
+
])) : y("", !0);
|
|
1197
1209
|
}
|
|
1198
|
-
}),
|
|
1210
|
+
}), Pt = /* @__PURE__ */ h({
|
|
1199
1211
|
__name: "notificationQueue",
|
|
1200
|
-
props: /* @__PURE__ */
|
|
1212
|
+
props: /* @__PURE__ */ C({
|
|
1201
1213
|
length: { default: 3 },
|
|
1202
1214
|
timeout: { default: 4e3 },
|
|
1203
1215
|
position: { default: "fixed" },
|
|
@@ -1209,24 +1221,24 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1209
1221
|
}),
|
|
1210
1222
|
emits: ["update:queue"],
|
|
1211
1223
|
setup(e) {
|
|
1212
|
-
const t = e, o =
|
|
1213
|
-
let
|
|
1214
|
-
function
|
|
1215
|
-
o.value.length === 0 || l.value.length >= t.length || (l.value.push({ ...o.value[0], id:
|
|
1224
|
+
const t = e, o = B(e, "queue"), l = U([]);
|
|
1225
|
+
let a = 0;
|
|
1226
|
+
function s() {
|
|
1227
|
+
o.value.length === 0 || l.value.length >= t.length || (l.value.push({ ...o.value[0], id: a++, show: !0 }), o.value.shift());
|
|
1216
1228
|
}
|
|
1217
|
-
function
|
|
1229
|
+
function r(b) {
|
|
1218
1230
|
setTimeout(() => {
|
|
1219
1231
|
l.value = l.value.filter(
|
|
1220
|
-
(
|
|
1221
|
-
),
|
|
1232
|
+
(f) => f.id !== b
|
|
1233
|
+
), s();
|
|
1222
1234
|
}, 200);
|
|
1223
1235
|
}
|
|
1224
|
-
|
|
1225
|
-
const
|
|
1226
|
-
const
|
|
1227
|
-
return t.positionX === "right" ?
|
|
1236
|
+
A(o, s, { immediate: !0, deep: !0 });
|
|
1237
|
+
const g = _(() => {
|
|
1238
|
+
const b = ["dai-notification-queue__item--anim"];
|
|
1239
|
+
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(" ");
|
|
1228
1240
|
});
|
|
1229
|
-
return (
|
|
1241
|
+
return (b, f) => (i(), u("div", {
|
|
1230
1242
|
class: w(["dai-notification-queue", {
|
|
1231
1243
|
"dai-notification-queue--fixed": e.position == "fixed",
|
|
1232
1244
|
"dai-notification-queue--absolute": e.position == "absolute",
|
|
@@ -1237,23 +1249,23 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1237
1249
|
"dai-notification-queue--x-right": e.positionX == "right"
|
|
1238
1250
|
}])
|
|
1239
1251
|
}, [
|
|
1240
|
-
|
|
1252
|
+
M(we, {
|
|
1241
1253
|
appear: "",
|
|
1242
|
-
"enter-from-class":
|
|
1254
|
+
"enter-from-class": g.value,
|
|
1243
1255
|
"enter-active-class": "dai-notification-queue__item--anim-in",
|
|
1244
|
-
"leave-to-class":
|
|
1256
|
+
"leave-to-class": g.value,
|
|
1245
1257
|
"leave-active-class": "dai-notification-queue__item--anim-out"
|
|
1246
1258
|
}, {
|
|
1247
1259
|
default: c(() => [
|
|
1248
|
-
(
|
|
1249
|
-
key:
|
|
1250
|
-
color:
|
|
1251
|
-
icon:
|
|
1252
|
-
message:
|
|
1253
|
-
detail:
|
|
1254
|
-
timeout:
|
|
1255
|
-
modelValue:
|
|
1256
|
-
"onUpdate:modelValue": [(
|
|
1260
|
+
(i(!0), u(I, null, D(l.value, (m) => (i(), v(ft, {
|
|
1261
|
+
key: m.id,
|
|
1262
|
+
color: m.color,
|
|
1263
|
+
icon: m.type,
|
|
1264
|
+
message: m.message,
|
|
1265
|
+
detail: m.detail,
|
|
1266
|
+
timeout: m.timeout ?? e.timeout,
|
|
1267
|
+
modelValue: m.show,
|
|
1268
|
+
"onUpdate:modelValue": [(x) => m.show = x, (x) => r(m.id)],
|
|
1257
1269
|
class: "dai-notification-queue__item"
|
|
1258
1270
|
}, null, 8, ["color", "icon", "message", "detail", "timeout", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
1259
1271
|
]),
|
|
@@ -1261,7 +1273,7 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1261
1273
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
1262
1274
|
], 2));
|
|
1263
1275
|
}
|
|
1264
|
-
}),
|
|
1276
|
+
}), mt = ["aria-valuenow"], jt = /* @__PURE__ */ h({
|
|
1265
1277
|
__name: "progressbar",
|
|
1266
1278
|
props: {
|
|
1267
1279
|
value: {},
|
|
@@ -1271,7 +1283,7 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1271
1283
|
},
|
|
1272
1284
|
setup(e) {
|
|
1273
1285
|
const t = e, o = _(() => t.value === void 0);
|
|
1274
|
-
return (l,
|
|
1286
|
+
return (l, a) => (i(), u("div", {
|
|
1275
1287
|
class: w(["overflow-hidden text-xs w-full flex-1", {
|
|
1276
1288
|
rounded: e.rounded,
|
|
1277
1289
|
"bg-primary-200": e.color == "primary",
|
|
@@ -1280,14 +1292,14 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1280
1292
|
"bg-warning-200": e.color == "warning",
|
|
1281
1293
|
"bg-danger-200": e.color == "danger"
|
|
1282
1294
|
}]),
|
|
1283
|
-
style:
|
|
1295
|
+
style: N({ height: e.height + "px" }),
|
|
1284
1296
|
role: "progressbar",
|
|
1285
1297
|
"aria-valuemin": "0",
|
|
1286
1298
|
"aria-valuemax": "100",
|
|
1287
1299
|
"aria-valuenow": e.value
|
|
1288
1300
|
}, [
|
|
1289
1301
|
d("div", {
|
|
1290
|
-
style:
|
|
1302
|
+
style: N(`width:${e.value}%`),
|
|
1291
1303
|
class: w([{
|
|
1292
1304
|
"bg-primary-500": e.color == "primary",
|
|
1293
1305
|
"bg-success-500": e.color == "success",
|
|
@@ -1297,12 +1309,12 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1297
1309
|
"progress-infinite": o.value
|
|
1298
1310
|
}, "h-full shadow-none relative text-center whitespace-nowrap text-white justify-center"])
|
|
1299
1311
|
}, null, 6)
|
|
1300
|
-
], 14,
|
|
1312
|
+
], 14, mt));
|
|
1301
1313
|
}
|
|
1302
|
-
}),
|
|
1314
|
+
}), vt = {
|
|
1303
1315
|
key: 0,
|
|
1304
1316
|
class: "z-50"
|
|
1305
|
-
},
|
|
1317
|
+
}, ht = { class: "fixed inset-0 overflow-y-auto" }, pt = { class: "modal__dialog" }, It = /* @__PURE__ */ h({
|
|
1306
1318
|
inheritAttrs: !1,
|
|
1307
1319
|
__name: "modal",
|
|
1308
1320
|
props: {
|
|
@@ -1311,35 +1323,35 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1311
1323
|
},
|
|
1312
1324
|
emits: ["update:modelValue"],
|
|
1313
1325
|
setup(e) {
|
|
1314
|
-
const t =
|
|
1326
|
+
const t = B(e, "modelValue");
|
|
1315
1327
|
function o() {
|
|
1316
1328
|
t.value = !1;
|
|
1317
1329
|
}
|
|
1318
|
-
return
|
|
1330
|
+
return A(t, (l) => {
|
|
1319
1331
|
l ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
|
|
1320
|
-
}), (l,
|
|
1321
|
-
|
|
1332
|
+
}), (l, a) => (i(), v(Z, { to: "body" }, [
|
|
1333
|
+
M(P, {
|
|
1322
1334
|
appear: "",
|
|
1323
1335
|
name: "modal",
|
|
1324
1336
|
duration: { enter: 300, leave: 200 }
|
|
1325
1337
|
}, {
|
|
1326
1338
|
default: c(() => [
|
|
1327
|
-
t.value ? (
|
|
1328
|
-
|
|
1339
|
+
t.value ? (i(), u("div", vt, [
|
|
1340
|
+
a[0] || (a[0] = d("div", {
|
|
1329
1341
|
class: "modal__backdrop fixed inset-0 bg-primary-50/60 backdrop-blur-sm",
|
|
1330
1342
|
"aria-hidden": "true"
|
|
1331
1343
|
}, null, -1)),
|
|
1332
|
-
d("div",
|
|
1344
|
+
d("div", ht, [
|
|
1333
1345
|
d("div", {
|
|
1334
|
-
onClick:
|
|
1346
|
+
onClick: ke(o, ["self"]),
|
|
1335
1347
|
class: "min-h-full flex items-center justify-center p-4 sm:p-6"
|
|
1336
1348
|
}, [
|
|
1337
|
-
d("div",
|
|
1338
|
-
|
|
1349
|
+
d("div", pt, [
|
|
1350
|
+
p(l.$slots, "default", { close: o })
|
|
1339
1351
|
])
|
|
1340
1352
|
])
|
|
1341
1353
|
])
|
|
1342
|
-
])) :
|
|
1354
|
+
])) : y("", !0)
|
|
1343
1355
|
]),
|
|
1344
1356
|
_: 3
|
|
1345
1357
|
})
|
|
@@ -1347,34 +1359,34 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
|
|
|
1347
1359
|
}
|
|
1348
1360
|
});
|
|
1349
1361
|
export {
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1362
|
+
Ct as Btn,
|
|
1363
|
+
Bt as Checkbox,
|
|
1364
|
+
ze as Combobox,
|
|
1365
|
+
qe as ComboboxButton,
|
|
1366
|
+
wt as ComboboxInput,
|
|
1367
|
+
Pe as ComboboxOption,
|
|
1368
|
+
Te as ComboboxOptions,
|
|
1369
|
+
H as Hint,
|
|
1370
|
+
kt as Input,
|
|
1359
1371
|
F as Label,
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1372
|
+
St as Menu,
|
|
1373
|
+
Lt as MenuItem,
|
|
1374
|
+
zt as MenuItems,
|
|
1375
|
+
It as Modal,
|
|
1376
|
+
ft as Notification,
|
|
1377
|
+
Pt as NotificationQueue,
|
|
1366
1378
|
At as Offcanvas,
|
|
1367
1379
|
Nt as Popover,
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
+
Et as PopoverDialog,
|
|
1381
|
+
jt as Progressbar,
|
|
1382
|
+
Vt as Radio,
|
|
1383
|
+
$t as Select,
|
|
1384
|
+
xt as Selectbox,
|
|
1385
|
+
Mt as Switch,
|
|
1386
|
+
qt as Tab,
|
|
1387
|
+
Ut as TabContainer,
|
|
1388
|
+
Tt as TabList,
|
|
1389
|
+
Xt as TabPanel,
|
|
1390
|
+
_t as Textarea,
|
|
1391
|
+
$e as useClassList
|
|
1380
1392
|
};
|