@defaultusr/dai-ui 1.1.5 → 1.1.7
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 +570 -567
- package/package.json +2 -2
- package/dist/chunks/index.W-qQIppj.js +0 -2383
package/dist/main.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { Combobox as
|
|
2
|
-
import { Menu as
|
|
3
|
-
import { reactive as ce, watch as
|
|
4
|
-
import './assets/main.css';function
|
|
5
|
-
let
|
|
6
|
-
const
|
|
7
|
-
function
|
|
8
|
-
|
|
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 Ot, Popover as Ut, TabContainer as Nt, TabPanel as Xt } from "vue-composable-ui";
|
|
3
|
+
import { reactive as ce, watch as T, onUnmounted as R, defineComponent as v, createElementBlock as u, openBlock as a, renderSlot as p, createTextVNode as E, toDisplayString as k, normalizeClass as w, createBlock as f, createCommentVNode as h, createElementVNode as d, computed as $, createVNode as V, normalizeProps as me, guardReactiveProps as fe, withCtx as c, Transition as P, mergeModels as M, useModel as x, useId as L, mergeProps as _, unref as r, inject as ve, Fragment as I, useTemplateRef as q, ref as N, onMounted as j, withDirectives as F, renderList as X, vModelSelect as pe, vModelText as he, vModelCheckbox as be, vModelRadio as ye, resolveDynamicComponent as ge, nextTick as we, normalizeStyle as U, Teleport as Z, TransitionGroup as ke, withModifiers as $e } from "vue";
|
|
4
|
+
import './assets/main.css';function xe(e, ...t) {
|
|
5
|
+
let o = [];
|
|
6
|
+
const l = ce(t);
|
|
7
|
+
function i() {
|
|
8
|
+
l.length && (e.classList.add(...l), o = [...l]);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
10
|
+
function s() {
|
|
11
|
+
e.classList.remove(...o);
|
|
12
12
|
}
|
|
13
|
-
return
|
|
14
|
-
|
|
13
|
+
return T(
|
|
14
|
+
l,
|
|
15
15
|
() => {
|
|
16
|
-
|
|
16
|
+
s(), i();
|
|
17
17
|
},
|
|
18
18
|
{ immediate: !0 }
|
|
19
|
-
),
|
|
20
|
-
classList:
|
|
19
|
+
), R(s), {
|
|
20
|
+
classList: l
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const _e = { class: "dai-label" }, S = /* @__PURE__ */ v({
|
|
24
24
|
__name: "label",
|
|
25
25
|
props: {
|
|
26
26
|
text: {}
|
|
27
27
|
},
|
|
28
|
-
setup(
|
|
29
|
-
return (
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
setup(e) {
|
|
29
|
+
return (t, o) => (a(), u("label", _e, [
|
|
30
|
+
p(t.$slots, "default", {}, () => [
|
|
31
|
+
E(k(e.text), 1)
|
|
32
32
|
])
|
|
33
33
|
]));
|
|
34
34
|
}
|
|
35
|
-
}),
|
|
35
|
+
}), Be = { class: "dai-hint" }, D = /* @__PURE__ */ v({
|
|
36
36
|
__name: "hint",
|
|
37
37
|
props: {
|
|
38
38
|
text: {}
|
|
39
39
|
},
|
|
40
|
-
setup(
|
|
41
|
-
return (
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
setup(e) {
|
|
41
|
+
return (t, o) => (a(), u("div", Be, [
|
|
42
|
+
p(t.$slots, "default", {}, () => [
|
|
43
|
+
E(k(e.text), 1)
|
|
44
44
|
])
|
|
45
45
|
]));
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
47
|
+
}), Ve = { class: "dai-form-control__input-group__box" }, Me = /* @__PURE__ */ v({
|
|
48
48
|
inheritAttrs: !1,
|
|
49
49
|
__name: "inputGroup",
|
|
50
50
|
props: {
|
|
@@ -56,9 +56,9 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
56
56
|
disabled: { type: Boolean },
|
|
57
57
|
invalid: { type: Boolean }
|
|
58
58
|
},
|
|
59
|
-
setup(
|
|
60
|
-
return (
|
|
61
|
-
class:
|
|
59
|
+
setup(e) {
|
|
60
|
+
return (t, o) => (a(), u("div", {
|
|
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",
|
|
64
64
|
"dai-form-control__input-group--muted": e.variant === "muted",
|
|
@@ -69,22 +69,22 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
69
69
|
"dai-form-control__input-group--invalid": e.invalid
|
|
70
70
|
}])
|
|
71
71
|
}, [
|
|
72
|
-
e.label ? (
|
|
72
|
+
e.label ? (a(), f(S, {
|
|
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"])) : h("", !0),
|
|
78
|
+
d("div", Ve, [
|
|
79
|
+
p(t.$slots, "default")
|
|
80
80
|
])
|
|
81
81
|
], 2));
|
|
82
82
|
}
|
|
83
|
-
}),
|
|
83
|
+
}), Ce = { class: "dai-form-control__container" }, ze = {
|
|
84
84
|
key: 0,
|
|
85
85
|
class: "dai-form-control__validation-message",
|
|
86
86
|
role: "alert"
|
|
87
|
-
},
|
|
87
|
+
}, O = /* @__PURE__ */ v({
|
|
88
88
|
inheritAttrs: !1,
|
|
89
89
|
__name: "formControl",
|
|
90
90
|
props: {
|
|
@@ -103,41 +103,41 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
103
103
|
disabled: { type: Boolean },
|
|
104
104
|
invalid: { type: Boolean }
|
|
105
105
|
},
|
|
106
|
-
setup(
|
|
107
|
-
const
|
|
108
|
-
return (
|
|
109
|
-
class:
|
|
110
|
-
"dai-form-control--label-inline":
|
|
111
|
-
"dai-form-control--invalid":
|
|
112
|
-
"dai-form-control--lg":
|
|
106
|
+
setup(e) {
|
|
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 (i, s) => (a(), u("div", {
|
|
109
|
+
class: w(["dai-form-control", {
|
|
110
|
+
"dai-form-control--label-inline": e.labelPosition === "inline",
|
|
111
|
+
"dai-form-control--invalid": e.invalid,
|
|
112
|
+
"dai-form-control--lg": l.value === "large"
|
|
113
113
|
}])
|
|
114
114
|
}, [
|
|
115
|
-
|
|
115
|
+
e.label && e.labelPosition !== "inside" ? (a(), f(S, {
|
|
116
116
|
key: 0,
|
|
117
|
-
for:
|
|
118
|
-
text:
|
|
119
|
-
}, null, 8, ["for", "text"])) :
|
|
120
|
-
d("div",
|
|
121
|
-
|
|
122
|
-
...
|
|
123
|
-
label:
|
|
124
|
-
variant:
|
|
125
|
-
size:
|
|
117
|
+
for: e.labelFor,
|
|
118
|
+
text: e.label
|
|
119
|
+
}, null, 8, ["for", "text"])) : h("", !0),
|
|
120
|
+
d("div", Ce, [
|
|
121
|
+
V(Me, me(fe({
|
|
122
|
+
...t,
|
|
123
|
+
label: e.labelPosition === "inside" ? e.label : void 0,
|
|
124
|
+
variant: o.value,
|
|
125
|
+
size: l.value
|
|
126
126
|
})), {
|
|
127
|
-
default:
|
|
128
|
-
|
|
127
|
+
default: c(() => [
|
|
128
|
+
p(i.$slots, "default")
|
|
129
129
|
]),
|
|
130
130
|
_: 3
|
|
131
131
|
}, 16),
|
|
132
|
-
|
|
132
|
+
e.hint ? (a(), f(D, {
|
|
133
133
|
key: 0,
|
|
134
|
-
text:
|
|
134
|
+
text: e.hint,
|
|
135
135
|
class: "dai-form-control__hint"
|
|
136
|
-
}, null, 8, ["text"])) :
|
|
137
|
-
|
|
138
|
-
default:
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
}, null, 8, ["text"])) : h("", !0),
|
|
137
|
+
V(P, { name: "dai-form-control__validation-message-transition" }, {
|
|
138
|
+
default: c(() => [
|
|
139
|
+
e.validationMessage ? (a(), u("div", ze, [
|
|
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: ""
|
|
@@ -147,18 +147,18 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
147
147
|
d: "M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71Zm-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73ZM116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0Zm28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16Z"
|
|
148
148
|
})
|
|
149
149
|
], -1)),
|
|
150
|
-
|
|
151
|
-
])) :
|
|
150
|
+
E(" " + k(e.validationMessage), 1)
|
|
151
|
+
])) : h("", !0)
|
|
152
152
|
]),
|
|
153
153
|
_: 1
|
|
154
154
|
})
|
|
155
155
|
])
|
|
156
156
|
], 2));
|
|
157
157
|
}
|
|
158
|
-
}),
|
|
158
|
+
}), Ee = /* @__PURE__ */ v({
|
|
159
159
|
inheritAttrs: !1,
|
|
160
160
|
__name: "combobox",
|
|
161
|
-
props: /* @__PURE__ */
|
|
161
|
+
props: /* @__PURE__ */ M({
|
|
162
162
|
id: {},
|
|
163
163
|
labelPosition: {},
|
|
164
164
|
hint: {},
|
|
@@ -179,20 +179,20 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
179
179
|
modelModifiers: {}
|
|
180
180
|
}),
|
|
181
181
|
emits: ["update:modelValue"],
|
|
182
|
-
setup(
|
|
183
|
-
const
|
|
184
|
-
return (
|
|
185
|
-
labelFor: r(
|
|
186
|
-
class:
|
|
182
|
+
setup(e) {
|
|
183
|
+
const t = e, o = x(e, "modelValue"), l = t.id || L();
|
|
184
|
+
return (i, s) => (a(), f(O, _(t, {
|
|
185
|
+
labelFor: r(l),
|
|
186
|
+
class: i.$attrs.class
|
|
187
187
|
}), {
|
|
188
|
-
default:
|
|
189
|
-
|
|
190
|
-
id: r(
|
|
191
|
-
modelValue:
|
|
192
|
-
"onUpdate:modelValue":
|
|
188
|
+
default: c(() => [
|
|
189
|
+
V(r(te), _({ ...i.$attrs, class: void 0 }, {
|
|
190
|
+
id: r(l),
|
|
191
|
+
modelValue: o.value,
|
|
192
|
+
"onUpdate:modelValue": s[0] || (s[0] = (n) => o.value = n)
|
|
193
193
|
}), {
|
|
194
|
-
default:
|
|
195
|
-
|
|
194
|
+
default: c(() => [
|
|
195
|
+
p(i.$slots, "default")
|
|
196
196
|
]),
|
|
197
197
|
_: 3
|
|
198
198
|
}, 16, ["id", "modelValue"])
|
|
@@ -200,38 +200,41 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
200
200
|
_: 3
|
|
201
201
|
}, 16, ["labelFor", "class"]));
|
|
202
202
|
}
|
|
203
|
-
}),
|
|
203
|
+
}), wt = /* @__PURE__ */ v({
|
|
204
204
|
__name: "comboboxInput",
|
|
205
|
-
setup(
|
|
206
|
-
return (
|
|
207
|
-
default:
|
|
208
|
-
|
|
205
|
+
setup(e) {
|
|
206
|
+
return (t, o) => (a(), f(r(oe), { class: "dai-form-control__input-group__control" }, {
|
|
207
|
+
default: c(() => [
|
|
208
|
+
p(t.$slots, "default")
|
|
209
209
|
]),
|
|
210
210
|
_: 3
|
|
211
211
|
}));
|
|
212
212
|
}
|
|
213
|
-
}),
|
|
213
|
+
}), Le = {
|
|
214
214
|
key: 0,
|
|
215
215
|
class: "dai-form-control__input-group__control__placeholder"
|
|
216
|
-
},
|
|
216
|
+
}, qe = /* @__PURE__ */ v({
|
|
217
217
|
__name: "comboboxButton",
|
|
218
218
|
props: {
|
|
219
219
|
placeholder: {}
|
|
220
220
|
},
|
|
221
|
-
setup(
|
|
222
|
-
const
|
|
223
|
-
if (!
|
|
221
|
+
setup(e) {
|
|
222
|
+
const t = ve(ae);
|
|
223
|
+
if (!t)
|
|
224
224
|
throw new Error("Combobox injectable context is not provided");
|
|
225
|
-
const
|
|
226
|
-
onclick: () =>
|
|
227
|
-
...
|
|
225
|
+
const o = $(() => ({
|
|
226
|
+
onclick: () => t.open({ focus: !0 }),
|
|
227
|
+
...t.activatorAttrs.value
|
|
228
228
|
}));
|
|
229
|
-
return (
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
t
|
|
229
|
+
return (l, i) => (a(), u("button", _(o.value, {
|
|
230
|
+
type: "button",
|
|
231
|
+
class: "dai-form-control__input-group__control dai-combobox-btn"
|
|
232
|
+
}), [
|
|
233
|
+
p(l.$slots, "default", {}, () => [
|
|
234
|
+
r(t).displayValue.value ? (a(), u(I, { key: 1 }, [
|
|
235
|
+
E(k(r(t).displayValue), 1)
|
|
236
|
+
], 64)) : (a(), u("span", Le, k(e.placeholder || "Select..."), 1)),
|
|
237
|
+
i[0] || (i[0] = d("svg", {
|
|
235
238
|
class: "dai-combobox-btn__chevron",
|
|
236
239
|
xmlns: "http://www.w3.org/2000/svg",
|
|
237
240
|
viewBox: "0 0 16 16"
|
|
@@ -246,17 +249,17 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
246
249
|
])
|
|
247
250
|
], 16));
|
|
248
251
|
}
|
|
249
|
-
}),
|
|
252
|
+
}), Te = /* @__PURE__ */ v({
|
|
250
253
|
__name: "comboboxOptions",
|
|
251
|
-
setup(
|
|
252
|
-
return (
|
|
254
|
+
setup(e) {
|
|
255
|
+
return (t, o) => (a(), f(P, {
|
|
253
256
|
"enter-from-class": "dai-combobox-options--anim",
|
|
254
257
|
"leave-to-class": "dai-combobox-options--anim"
|
|
255
258
|
}, {
|
|
256
|
-
default:
|
|
257
|
-
|
|
258
|
-
default:
|
|
259
|
-
|
|
259
|
+
default: c(() => [
|
|
260
|
+
V(r(le), { class: "dai-combobox-options" }, {
|
|
261
|
+
default: c(() => [
|
|
262
|
+
p(t.$slots, "default")
|
|
260
263
|
]),
|
|
261
264
|
_: 3
|
|
262
265
|
})
|
|
@@ -264,70 +267,70 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
264
267
|
_: 3
|
|
265
268
|
}));
|
|
266
269
|
}
|
|
267
|
-
}),
|
|
270
|
+
}), Pe = {
|
|
268
271
|
key: 0,
|
|
269
272
|
class: "dai-combobox-option__check",
|
|
270
273
|
xmlns: "http://www.w3.org/2000/svg",
|
|
271
274
|
viewBox: "0 0 16 16"
|
|
272
|
-
},
|
|
275
|
+
}, Ae = /* @__PURE__ */ v({
|
|
273
276
|
__name: "comboboxOption",
|
|
274
277
|
props: {
|
|
275
278
|
value: {}
|
|
276
279
|
},
|
|
277
|
-
setup(
|
|
278
|
-
return (
|
|
280
|
+
setup(e) {
|
|
281
|
+
return (t, o) => (a(), f(r(ie), {
|
|
279
282
|
value: e.value,
|
|
280
283
|
class: "dai-combobox-option"
|
|
281
284
|
}, {
|
|
282
|
-
default:
|
|
283
|
-
|
|
284
|
-
isActive:
|
|
285
|
-
isSelected:
|
|
285
|
+
default: c(({ isActive: l, isSelected: i }) => [
|
|
286
|
+
p(t.$slots, "default", {
|
|
287
|
+
isActive: l,
|
|
288
|
+
isSelected: i
|
|
286
289
|
}),
|
|
287
|
-
|
|
290
|
+
i ? (a(), u("svg", Pe, [...o[0] || (o[0] = [
|
|
288
291
|
d("path", {
|
|
289
292
|
fill: "currentColor",
|
|
290
293
|
"fill-rule": "evenodd",
|
|
291
294
|
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",
|
|
292
295
|
"clip-rule": "evenodd"
|
|
293
296
|
}, null, -1)
|
|
294
|
-
])])) :
|
|
297
|
+
])])) : h("", !0)
|
|
295
298
|
]),
|
|
296
299
|
_: 3
|
|
297
300
|
}, 8, ["value"]));
|
|
298
301
|
}
|
|
299
|
-
}),
|
|
300
|
-
const
|
|
301
|
-
for (const [
|
|
302
|
-
|
|
303
|
-
return
|
|
304
|
-
},
|
|
302
|
+
}), Ie = (e, t) => {
|
|
303
|
+
const o = e.__vccOpts || e;
|
|
304
|
+
for (const [l, i] of t)
|
|
305
|
+
o[l] = i;
|
|
306
|
+
return o;
|
|
307
|
+
}, je = {}, Fe = {
|
|
305
308
|
type: "button",
|
|
306
309
|
class: "dai-form-control__input-group__addon dai-form-control__input-group__addon--btn",
|
|
307
310
|
tabindex: "-1",
|
|
308
311
|
"aria-hidden": "true"
|
|
309
312
|
};
|
|
310
|
-
function
|
|
311
|
-
return
|
|
312
|
-
|
|
313
|
+
function Se(e, t) {
|
|
314
|
+
return a(), u("button", Fe, [
|
|
315
|
+
p(e.$slots, "default")
|
|
313
316
|
]);
|
|
314
317
|
}
|
|
315
|
-
const
|
|
318
|
+
const Y = /* @__PURE__ */ Ie(je, [["render", Se]]), Oe = ["id", "type", "pattern", "title", "autocomplete", "value"], Ue = {
|
|
316
319
|
key: 0,
|
|
317
320
|
xmlns: "http://www.w3.org/2000/svg",
|
|
318
321
|
fill: "none",
|
|
319
322
|
viewBox: "0 0 24 24",
|
|
320
323
|
stroke: "currentColor"
|
|
321
|
-
},
|
|
324
|
+
}, Ne = {
|
|
322
325
|
key: 1,
|
|
323
326
|
xmlns: "http://www.w3.org/2000/svg",
|
|
324
327
|
fill: "none",
|
|
325
328
|
viewBox: "0 0 24 24",
|
|
326
329
|
stroke: "currentColor"
|
|
327
|
-
},
|
|
330
|
+
}, kt = /* @__PURE__ */ v({
|
|
328
331
|
inheritAttrs: !1,
|
|
329
332
|
__name: "input",
|
|
330
|
-
props: /* @__PURE__ */
|
|
333
|
+
props: /* @__PURE__ */ M({
|
|
331
334
|
id: {},
|
|
332
335
|
type: { default: "text" },
|
|
333
336
|
mask: {},
|
|
@@ -358,80 +361,80 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
358
361
|
filesModifiers: {}
|
|
359
362
|
}),
|
|
360
363
|
emits: ["update:modelValue", "update:files"],
|
|
361
|
-
setup(
|
|
362
|
-
const
|
|
363
|
-
set(
|
|
364
|
-
return
|
|
364
|
+
setup(e) {
|
|
365
|
+
const t = e, o = t.id || L(), l = $(() => typeof t.autocomplete == "string" ? t.autocomplete : t.autocomplete ? "on" : "off"), i = x(e, "modelValue"), s = x(e, "files", {
|
|
366
|
+
set(B) {
|
|
367
|
+
return n.value && (n.value.files = B), B;
|
|
365
368
|
}
|
|
366
|
-
}),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
), m =
|
|
371
|
-
|
|
372
|
-
|
|
369
|
+
}), n = q("formElement"), { isValid: g, validationMessage: b, validate: y } = A(
|
|
370
|
+
n,
|
|
371
|
+
t.validators,
|
|
372
|
+
t.showValidationError
|
|
373
|
+
), m = N(!1);
|
|
374
|
+
T(i, () => {
|
|
375
|
+
s.value = n.value?.files || null;
|
|
373
376
|
});
|
|
374
|
-
let
|
|
375
|
-
const
|
|
377
|
+
let C;
|
|
378
|
+
const G = $(() => t.type === "password" ? m.value ? "text" : "password" : t.type), H = $(() => t.mask ? t.mask : t.type === "tel" ? {
|
|
376
379
|
mask: "{+7} (000) 000-00-00"
|
|
377
|
-
} :
|
|
378
|
-
function
|
|
380
|
+
} : t.mask), K = $(() => 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);
|
|
381
|
+
function W() {
|
|
379
382
|
m.value = !m.value;
|
|
380
383
|
}
|
|
381
|
-
function
|
|
382
|
-
|
|
384
|
+
function J() {
|
|
385
|
+
i.value = "";
|
|
383
386
|
}
|
|
384
|
-
function ee(
|
|
385
|
-
if (
|
|
387
|
+
function ee(B) {
|
|
388
|
+
if (C)
|
|
386
389
|
return;
|
|
387
|
-
const { value:
|
|
388
|
-
|
|
390
|
+
const { value: z } = B.target;
|
|
391
|
+
i.value = z;
|
|
389
392
|
}
|
|
390
|
-
return
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
),
|
|
396
|
-
|
|
393
|
+
return j(() => {
|
|
394
|
+
H.value && import("imask").then((B) => {
|
|
395
|
+
C = B.default(
|
|
396
|
+
n.value,
|
|
397
|
+
H.value
|
|
398
|
+
), C.on("accept", () => {
|
|
399
|
+
i.value = C.value;
|
|
397
400
|
});
|
|
398
401
|
});
|
|
399
|
-
}), (
|
|
400
|
-
"label-for": r(
|
|
401
|
-
"validation-message":
|
|
402
|
-
invalid:
|
|
403
|
-
class:
|
|
402
|
+
}), (B, z) => (a(), f(O, _(t, {
|
|
403
|
+
"label-for": r(o),
|
|
404
|
+
"validation-message": e.showValidationError ? "" : r(b),
|
|
405
|
+
invalid: t.invalid || !r(g),
|
|
406
|
+
class: B.$attrs.class
|
|
404
407
|
}), {
|
|
405
|
-
default:
|
|
406
|
-
|
|
407
|
-
d("input",
|
|
408
|
+
default: c(() => [
|
|
409
|
+
p(B.$slots, "prepend"),
|
|
410
|
+
d("input", _({
|
|
408
411
|
ref_key: "formElement",
|
|
409
|
-
ref:
|
|
410
|
-
}, { ...
|
|
411
|
-
id: r(
|
|
412
|
-
type:
|
|
413
|
-
pattern:
|
|
414
|
-
title:
|
|
415
|
-
autocomplete:
|
|
416
|
-
value:
|
|
412
|
+
ref: n
|
|
413
|
+
}, { ...B.$attrs, class: void 0 }, {
|
|
414
|
+
id: r(o),
|
|
415
|
+
type: G.value,
|
|
416
|
+
pattern: K.value,
|
|
417
|
+
title: Q.value,
|
|
418
|
+
autocomplete: l.value,
|
|
419
|
+
value: i.value,
|
|
417
420
|
onInputPassive: ee,
|
|
418
|
-
onKeyupPassive:
|
|
421
|
+
onKeyupPassive: z[0] || (z[0] = (bt) => !r(g) && r(y)()),
|
|
419
422
|
class: "dai-form-control__input-group__control dai-form-control__input"
|
|
420
|
-
}), null, 16,
|
|
421
|
-
|
|
422
|
-
|
|
423
|
+
}), null, 16, Oe),
|
|
424
|
+
p(B.$slots, "append"),
|
|
425
|
+
t.type === "password" && i.value ? (a(), f(Y, {
|
|
423
426
|
key: 0,
|
|
424
|
-
onClick:
|
|
427
|
+
onClick: W
|
|
425
428
|
}, {
|
|
426
|
-
default:
|
|
427
|
-
m.value ? (
|
|
429
|
+
default: c(() => [
|
|
430
|
+
m.value ? (a(), u("svg", Ne, [...z[2] || (z[2] = [
|
|
428
431
|
d("path", {
|
|
429
432
|
"stroke-linecap": "round",
|
|
430
433
|
"stroke-linejoin": "round",
|
|
431
434
|
"stroke-width": "2",
|
|
432
435
|
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"
|
|
433
436
|
}, null, -1)
|
|
434
|
-
])])) : (
|
|
437
|
+
])])) : (a(), u("svg", Ue, [...z[1] || (z[1] = [
|
|
435
438
|
d("path", {
|
|
436
439
|
"stroke-linecap": "round",
|
|
437
440
|
"stroke-linejoin": "round",
|
|
@@ -447,12 +450,12 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
447
450
|
])]))
|
|
448
451
|
]),
|
|
449
452
|
_: 1
|
|
450
|
-
})) :
|
|
451
|
-
|
|
453
|
+
})) : h("", !0),
|
|
454
|
+
e.clearable && i.value && !t.disabled ? (a(), f(Y, {
|
|
452
455
|
key: 1,
|
|
453
|
-
onClick:
|
|
456
|
+
onClick: J
|
|
454
457
|
}, {
|
|
455
|
-
default:
|
|
458
|
+
default: c(() => [...z[3] || (z[3] = [
|
|
456
459
|
d("svg", {
|
|
457
460
|
xmlns: "http://www.w3.org/2000/svg",
|
|
458
461
|
fill: "none",
|
|
@@ -468,15 +471,15 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
468
471
|
], -1)
|
|
469
472
|
])]),
|
|
470
473
|
_: 1
|
|
471
|
-
})) :
|
|
474
|
+
})) : h("", !0)
|
|
472
475
|
]),
|
|
473
476
|
_: 3
|
|
474
477
|
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
475
478
|
}
|
|
476
|
-
}),
|
|
479
|
+
}), Xe = ["id"], De = ["value"], $t = /* @__PURE__ */ v({
|
|
477
480
|
inheritAttrs: !1,
|
|
478
481
|
__name: "select",
|
|
479
|
-
props: /* @__PURE__ */
|
|
482
|
+
props: /* @__PURE__ */ M({
|
|
480
483
|
id: {},
|
|
481
484
|
options: {},
|
|
482
485
|
optionText: { default: "text" },
|
|
@@ -502,37 +505,37 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
502
505
|
modelModifiers: {}
|
|
503
506
|
}),
|
|
504
507
|
emits: ["update:modelValue"],
|
|
505
|
-
setup(
|
|
506
|
-
const
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
508
|
+
setup(e) {
|
|
509
|
+
const t = e, o = t.id || L(), l = x(e, "modelValue"), i = q("formElement"), { isValid: s, validationMessage: n, validate: g } = A(
|
|
510
|
+
i,
|
|
511
|
+
t.validators,
|
|
512
|
+
t.showValidationError
|
|
510
513
|
);
|
|
511
|
-
return (
|
|
512
|
-
"label-for": r(
|
|
513
|
-
"validation-message":
|
|
514
|
-
invalid:
|
|
515
|
-
class:
|
|
514
|
+
return (b, y) => (a(), f(O, _(t, {
|
|
515
|
+
"label-for": r(o),
|
|
516
|
+
"validation-message": e.showValidationError ? "" : r(n),
|
|
517
|
+
invalid: t.invalid || !r(s),
|
|
518
|
+
class: b.$attrs.class
|
|
516
519
|
}), {
|
|
517
|
-
default:
|
|
518
|
-
|
|
520
|
+
default: c(() => [
|
|
521
|
+
F(d("select", _({
|
|
519
522
|
ref_key: "formElement",
|
|
520
|
-
ref:
|
|
521
|
-
}, { ...
|
|
522
|
-
id: r(
|
|
523
|
-
"onUpdate:modelValue":
|
|
523
|
+
ref: i
|
|
524
|
+
}, { ...b.$attrs, class: void 0 }, {
|
|
525
|
+
id: r(o),
|
|
526
|
+
"onUpdate:modelValue": y[0] || (y[0] = (m) => l.value = m),
|
|
524
527
|
class: "dai-form-control__input-group__control dai-select"
|
|
525
528
|
}), [
|
|
526
|
-
|
|
527
|
-
(
|
|
528
|
-
value: m[
|
|
529
|
-
key: m[
|
|
530
|
-
},
|
|
529
|
+
p(b.$slots, "default", {}, () => [
|
|
530
|
+
(a(!0), u(I, null, X(e.options, (m) => (a(), u("option", {
|
|
531
|
+
value: m[e.optionValue],
|
|
532
|
+
key: m[e.optionValue]
|
|
533
|
+
}, k(m[e.optionText]), 9, De))), 128))
|
|
531
534
|
])
|
|
532
|
-
], 16,
|
|
533
|
-
[
|
|
535
|
+
], 16, Xe), [
|
|
536
|
+
[pe, l.value]
|
|
534
537
|
]),
|
|
535
|
-
|
|
538
|
+
y[1] || (y[1] = d("svg", {
|
|
536
539
|
class: "dai-select__chevron",
|
|
537
540
|
xmlns: "http://www.w3.org/2000/svg",
|
|
538
541
|
viewBox: "0 0 16 16"
|
|
@@ -548,9 +551,9 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
548
551
|
_: 3
|
|
549
552
|
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
550
553
|
}
|
|
551
|
-
}),
|
|
554
|
+
}), xt = /* @__PURE__ */ v({
|
|
552
555
|
__name: "selectbox",
|
|
553
|
-
props: /* @__PURE__ */
|
|
556
|
+
props: /* @__PURE__ */ M({
|
|
554
557
|
options: {},
|
|
555
558
|
optionText: { default: "text" },
|
|
556
559
|
optionValue: { default: "value" },
|
|
@@ -575,23 +578,23 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
575
578
|
modelModifiers: {}
|
|
576
579
|
}),
|
|
577
580
|
emits: ["update:modelValue"],
|
|
578
|
-
setup(
|
|
579
|
-
const
|
|
580
|
-
return (
|
|
581
|
-
displayValue: (
|
|
582
|
-
modelValue:
|
|
583
|
-
"onUpdate:modelValue":
|
|
581
|
+
setup(e) {
|
|
582
|
+
const t = e, o = x(e, "modelValue");
|
|
583
|
+
return (l, i) => (a(), f(r(Ee), _(t, {
|
|
584
|
+
displayValue: (s) => e.options.find((n) => n[e.optionValue] === s)?.[e.optionText] || "",
|
|
585
|
+
modelValue: o.value,
|
|
586
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => o.value = s)
|
|
584
587
|
}), {
|
|
585
|
-
default:
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
default:
|
|
589
|
-
(
|
|
590
|
-
key:
|
|
591
|
-
value:
|
|
588
|
+
default: c(() => [
|
|
589
|
+
V(r(qe), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
|
|
590
|
+
V(r(Te), null, {
|
|
591
|
+
default: c(() => [
|
|
592
|
+
(a(!0), u(I, null, X(e.options, (s) => (a(), f(r(Ae), {
|
|
593
|
+
key: s[e.optionValue],
|
|
594
|
+
value: s[e.optionValue]
|
|
592
595
|
}, {
|
|
593
|
-
default:
|
|
594
|
-
|
|
596
|
+
default: c(() => [
|
|
597
|
+
E(k(s[e.optionText]), 1)
|
|
595
598
|
]),
|
|
596
599
|
_: 2
|
|
597
600
|
}, 1032, ["value"]))), 128))
|
|
@@ -602,10 +605,10 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
602
605
|
_: 1
|
|
603
606
|
}, 16, ["displayValue", "modelValue"]));
|
|
604
607
|
}
|
|
605
|
-
}),
|
|
608
|
+
}), He = ["id"], _t = /* @__PURE__ */ v({
|
|
606
609
|
inheritAttrs: !1,
|
|
607
610
|
__name: "textarea",
|
|
608
|
-
props: /* @__PURE__ */
|
|
611
|
+
props: /* @__PURE__ */ M({
|
|
609
612
|
id: {},
|
|
610
613
|
autosize: { type: Boolean },
|
|
611
614
|
validators: {},
|
|
@@ -615,46 +618,46 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
615
618
|
modelModifiers: {}
|
|
616
619
|
}),
|
|
617
620
|
emits: ["update:modelValue"],
|
|
618
|
-
setup(
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
621
|
+
setup(e) {
|
|
622
|
+
const t = e, o = t.id || L(), l = x(e, "modelValue"), i = q("formElement"), { isValid: s, validationMessage: n, validate: g } = A(
|
|
623
|
+
i,
|
|
624
|
+
t.validators,
|
|
625
|
+
t.showValidationError
|
|
623
626
|
);
|
|
624
|
-
function
|
|
625
|
-
if (!
|
|
626
|
-
const
|
|
627
|
-
|
|
627
|
+
function b() {
|
|
628
|
+
if (!t.autosize) return;
|
|
629
|
+
const y = i.value, m = y.offsetHeight - y.clientHeight;
|
|
630
|
+
y.style.height = "auto", y.style.height = `${y.scrollHeight + m}px`;
|
|
628
631
|
}
|
|
629
|
-
return
|
|
630
|
-
"label-for": r(
|
|
631
|
-
"validation-message":
|
|
632
|
-
invalid: !r(
|
|
633
|
-
class:
|
|
632
|
+
return j(b), (y, m) => (a(), f(O, _(t, {
|
|
633
|
+
"label-for": r(o),
|
|
634
|
+
"validation-message": e.showValidationError ? "" : r(n),
|
|
635
|
+
invalid: !r(s),
|
|
636
|
+
class: y.$attrs.class
|
|
634
637
|
}), {
|
|
635
|
-
default:
|
|
636
|
-
|
|
638
|
+
default: c(() => [
|
|
639
|
+
F(d("textarea", _({
|
|
637
640
|
ref_key: "formElement",
|
|
638
|
-
ref:
|
|
639
|
-
}, { ...
|
|
640
|
-
id: r(
|
|
641
|
-
"onUpdate:modelValue": m[0] || (m[0] = (
|
|
642
|
-
onKeyupPassive: m[1] || (m[1] = (
|
|
643
|
-
onInputPassive:
|
|
641
|
+
ref: i
|
|
642
|
+
}, { ...y.$attrs, class: void 0 }, {
|
|
643
|
+
id: r(o),
|
|
644
|
+
"onUpdate:modelValue": m[0] || (m[0] = (C) => l.value = C),
|
|
645
|
+
onKeyupPassive: m[1] || (m[1] = (C) => !r(s) && r(g)()),
|
|
646
|
+
onInputPassive: b,
|
|
644
647
|
class: ["form-control__textarea", {
|
|
645
|
-
"form-control__textarea--autosize":
|
|
648
|
+
"form-control__textarea--autosize": e.autosize
|
|
646
649
|
}]
|
|
647
|
-
}), null, 16,
|
|
648
|
-
[he,
|
|
650
|
+
}), null, 16, He), [
|
|
651
|
+
[he, l.value]
|
|
649
652
|
])
|
|
650
653
|
]),
|
|
651
654
|
_: 1
|
|
652
655
|
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
653
656
|
}
|
|
654
|
-
}),
|
|
657
|
+
}), Ye = ["id"], Bt = /* @__PURE__ */ v({
|
|
655
658
|
inheritAttrs: !1,
|
|
656
659
|
__name: "checkbox",
|
|
657
|
-
props: /* @__PURE__ */
|
|
660
|
+
props: /* @__PURE__ */ M({
|
|
658
661
|
color: { default: "primary" },
|
|
659
662
|
validators: {},
|
|
660
663
|
showValidationError: { type: Boolean, default: !0 },
|
|
@@ -665,63 +668,63 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
665
668
|
modelModifiers: {}
|
|
666
669
|
}),
|
|
667
670
|
emits: ["update:modelValue"],
|
|
668
|
-
setup(
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
671
|
+
setup(e) {
|
|
672
|
+
const t = e, o = x(e, "modelValue"), l = L(), i = q("formElement"), { isValid: s } = A(
|
|
673
|
+
i,
|
|
674
|
+
t.validators,
|
|
675
|
+
t.showValidationError
|
|
673
676
|
);
|
|
674
|
-
return (
|
|
675
|
-
class:
|
|
677
|
+
return (n, g) => (a(), u("div", {
|
|
678
|
+
class: w(["dai-checkbox-control", n.$attrs.class])
|
|
676
679
|
}, [
|
|
677
|
-
|
|
680
|
+
F(d("input", _({
|
|
678
681
|
ref_key: "formElement",
|
|
679
|
-
ref:
|
|
680
|
-
"onUpdate:modelValue":
|
|
681
|
-
}, { ...
|
|
682
|
-
id: r(
|
|
682
|
+
ref: i,
|
|
683
|
+
"onUpdate:modelValue": g[0] || (g[0] = (b) => o.value = b)
|
|
684
|
+
}, { ...n.$attrs, class: "" }, {
|
|
685
|
+
id: r(l),
|
|
683
686
|
type: "checkbox",
|
|
684
687
|
class: ["dai-checkbox", {
|
|
685
|
-
[`dai-checkbox--${
|
|
686
|
-
"dai-checkbox--invalid": !r(
|
|
688
|
+
[`dai-checkbox--${e.color}`]: e.color,
|
|
689
|
+
"dai-checkbox--invalid": !r(s)
|
|
687
690
|
}]
|
|
688
|
-
}), null, 16,
|
|
689
|
-
[
|
|
691
|
+
}), null, 16, Ye), [
|
|
692
|
+
[be, o.value]
|
|
690
693
|
]),
|
|
691
|
-
|
|
694
|
+
e.label || n.$slots.default ? (a(), f(S, {
|
|
692
695
|
key: 0,
|
|
693
|
-
for: r(
|
|
696
|
+
for: r(l)
|
|
694
697
|
}, {
|
|
695
|
-
default:
|
|
696
|
-
|
|
697
|
-
|
|
698
|
+
default: c(() => [
|
|
699
|
+
p(n.$slots, "default", {}, () => [
|
|
700
|
+
E(k(e.label), 1)
|
|
698
701
|
])
|
|
699
702
|
]),
|
|
700
703
|
_: 3
|
|
701
|
-
}, 8, ["for"])) :
|
|
702
|
-
|
|
704
|
+
}, 8, ["for"])) : h("", !0),
|
|
705
|
+
e.hint || n.$slots.hint ? (a(), f(D, {
|
|
703
706
|
key: 1,
|
|
704
707
|
class: "dai-checkbox-control__hint"
|
|
705
708
|
}, {
|
|
706
|
-
default:
|
|
707
|
-
|
|
708
|
-
|
|
709
|
+
default: c(() => [
|
|
710
|
+
p(n.$slots, "hint", {}, () => [
|
|
711
|
+
E(k(e.hint), 1)
|
|
709
712
|
])
|
|
710
713
|
]),
|
|
711
714
|
_: 3
|
|
712
|
-
})) :
|
|
715
|
+
})) : h("", !0)
|
|
713
716
|
], 2));
|
|
714
717
|
}
|
|
715
|
-
}),
|
|
718
|
+
}), Re = { class: "flex items-center h-5" }, Ze = ["value", "id"], Ge = {
|
|
716
719
|
key: 0,
|
|
717
720
|
class: "text-sm"
|
|
718
|
-
},
|
|
721
|
+
}, Ke = ["for"], Qe = {
|
|
719
722
|
key: 0,
|
|
720
723
|
class: "text-secondary-500 dark:text-secondary-400"
|
|
721
|
-
},
|
|
724
|
+
}, Vt = /* @__PURE__ */ v({
|
|
722
725
|
inheritAttrs: !1,
|
|
723
726
|
__name: "radio",
|
|
724
|
-
props: /* @__PURE__ */
|
|
727
|
+
props: /* @__PURE__ */ M({
|
|
725
728
|
value: {},
|
|
726
729
|
color: { default: "primary" },
|
|
727
730
|
validators: {},
|
|
@@ -733,44 +736,44 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
733
736
|
modelModifiers: {}
|
|
734
737
|
}),
|
|
735
738
|
emits: ["update:modelValue"],
|
|
736
|
-
setup(
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
739
|
+
setup(e) {
|
|
740
|
+
const t = e, o = x(e, "modelValue"), l = L(), i = q("formElement"), { isValid: s } = A(
|
|
741
|
+
i,
|
|
742
|
+
t.validators,
|
|
743
|
+
t.showValidationError
|
|
741
744
|
);
|
|
742
|
-
return (
|
|
743
|
-
class:
|
|
745
|
+
return (n, g) => (a(), u("div", {
|
|
746
|
+
class: w(["flex items-start gap-3", n.$attrs.class])
|
|
744
747
|
}, [
|
|
745
|
-
d("div",
|
|
746
|
-
|
|
748
|
+
d("div", Re, [
|
|
749
|
+
F(d("input", _({
|
|
747
750
|
type: "radio",
|
|
748
751
|
ref_key: "formElement",
|
|
749
|
-
ref:
|
|
750
|
-
"onUpdate:modelValue":
|
|
751
|
-
}, { ...
|
|
752
|
-
value:
|
|
753
|
-
id: r(
|
|
752
|
+
ref: i,
|
|
753
|
+
"onUpdate:modelValue": g[0] || (g[0] = (b) => o.value = b)
|
|
754
|
+
}, { ...n.$attrs, class: "" }, {
|
|
755
|
+
value: e.value,
|
|
756
|
+
id: r(l),
|
|
754
757
|
class: ["radio", {
|
|
755
|
-
[`radio--${
|
|
756
|
-
"radio--invalid": !r(
|
|
758
|
+
[`radio--${e.color}`]: e.color,
|
|
759
|
+
"radio--invalid": !r(s)
|
|
757
760
|
}]
|
|
758
|
-
}), null, 16,
|
|
759
|
-
[
|
|
761
|
+
}), null, 16, Ze), [
|
|
762
|
+
[ye, o.value]
|
|
760
763
|
])
|
|
761
764
|
]),
|
|
762
|
-
|
|
765
|
+
e.label ? (a(), u("div", Ge, [
|
|
763
766
|
d("label", {
|
|
764
|
-
for: r(
|
|
767
|
+
for: r(l),
|
|
765
768
|
class: "font-medium select-none cursor-pointer"
|
|
766
|
-
},
|
|
767
|
-
|
|
768
|
-
])) :
|
|
769
|
+
}, k(e.label), 9, Ke),
|
|
770
|
+
e.hint ? (a(), u("p", Qe, k(e.hint), 1)) : h("", !0)
|
|
771
|
+
])) : h("", !0)
|
|
769
772
|
], 2));
|
|
770
773
|
}
|
|
771
|
-
}),
|
|
774
|
+
}), We = { class: "dai-switch-control" }, Je = ["id", "aria-checked"], Mt = /* @__PURE__ */ v({
|
|
772
775
|
__name: "switch",
|
|
773
|
-
props: /* @__PURE__ */
|
|
776
|
+
props: /* @__PURE__ */ M({
|
|
774
777
|
label: {},
|
|
775
778
|
hint: {}
|
|
776
779
|
}, {
|
|
@@ -778,51 +781,51 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
778
781
|
modelModifiers: {}
|
|
779
782
|
}),
|
|
780
783
|
emits: ["update:modelValue"],
|
|
781
|
-
setup(
|
|
782
|
-
const
|
|
783
|
-
return (
|
|
784
|
+
setup(e) {
|
|
785
|
+
const t = x(e, "modelValue"), o = L();
|
|
786
|
+
return (l, i) => (a(), u("div", We, [
|
|
784
787
|
d("button", {
|
|
785
|
-
onClick:
|
|
786
|
-
id: r(
|
|
787
|
-
"aria-checked":
|
|
788
|
+
onClick: i[0] || (i[0] = (s) => t.value = !t.value),
|
|
789
|
+
id: r(o),
|
|
790
|
+
"aria-checked": t.value,
|
|
788
791
|
role: "switch",
|
|
789
792
|
type: "button",
|
|
790
793
|
tabindex: "0",
|
|
791
|
-
class:
|
|
792
|
-
}, [...
|
|
794
|
+
class: w(["dai-switch", [t.value ? "dai-switch--on" : "dai-switch--off"]])
|
|
795
|
+
}, [...i[1] || (i[1] = [
|
|
793
796
|
d("div", {
|
|
794
797
|
"aria-hidden": "true",
|
|
795
798
|
class: "dai-switch__thumb"
|
|
796
799
|
}, null, -1)
|
|
797
|
-
])], 10,
|
|
798
|
-
|
|
800
|
+
])], 10, Je),
|
|
801
|
+
e.label || l.$slots.default ? (a(), f(S, {
|
|
799
802
|
key: 0,
|
|
800
|
-
for: r(
|
|
803
|
+
for: r(o)
|
|
801
804
|
}, {
|
|
802
|
-
default:
|
|
803
|
-
|
|
804
|
-
|
|
805
|
+
default: c(() => [
|
|
806
|
+
p(l.$slots, "default", {}, () => [
|
|
807
|
+
E(k(e.label), 1)
|
|
805
808
|
])
|
|
806
809
|
]),
|
|
807
810
|
_: 3
|
|
808
|
-
}, 8, ["for"])) :
|
|
809
|
-
|
|
811
|
+
}, 8, ["for"])) : h("", !0),
|
|
812
|
+
e.hint || l.$slots.hint ? (a(), f(D, {
|
|
810
813
|
key: 1,
|
|
811
814
|
class: "dai-switch-control__hint"
|
|
812
815
|
}, {
|
|
813
|
-
default:
|
|
814
|
-
|
|
815
|
-
|
|
816
|
+
default: c(() => [
|
|
817
|
+
p(l.$slots, "hint", {}, () => [
|
|
818
|
+
E(k(e.hint), 1)
|
|
816
819
|
])
|
|
817
820
|
]),
|
|
818
821
|
_: 3
|
|
819
|
-
})) :
|
|
822
|
+
})) : h("", !0)
|
|
820
823
|
]));
|
|
821
824
|
}
|
|
822
|
-
}),
|
|
825
|
+
}), et = {
|
|
823
826
|
key: 0,
|
|
824
827
|
class: "dai-btn__spinner"
|
|
825
|
-
},
|
|
828
|
+
}, tt = { class: "dai-btn__caption" }, Ct = /* @__PURE__ */ v({
|
|
826
829
|
__name: "btn",
|
|
827
830
|
props: {
|
|
828
831
|
submit: { type: [Boolean, String] },
|
|
@@ -843,28 +846,28 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
843
846
|
rounded: { type: Boolean },
|
|
844
847
|
condensed: { type: Boolean }
|
|
845
848
|
},
|
|
846
|
-
setup(
|
|
847
|
-
const
|
|
848
|
-
return (
|
|
849
|
-
type:
|
|
850
|
-
form: typeof
|
|
851
|
-
href:
|
|
852
|
-
class:
|
|
853
|
-
[`dai-btn--${
|
|
854
|
-
"dai-btn--flat":
|
|
855
|
-
"dai-btn--plain":
|
|
856
|
-
"dai-btn--muted":
|
|
857
|
-
"dai-btn--outlined":
|
|
858
|
-
"dai-btn--sm":
|
|
859
|
-
"dai-btn--lg":
|
|
860
|
-
"dai-btn--loading":
|
|
861
|
-
"dai-btn--block":
|
|
862
|
-
"dai-btn--rounded":
|
|
863
|
-
"dai-btn--condensed":
|
|
849
|
+
setup(e) {
|
|
850
|
+
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"), i = $(() => t.size ? t.size : t.sm ? "small" : t.lg ? "large" : "medium");
|
|
851
|
+
return (s, n) => (a(), f(ge(e.href ? "a" : "button"), {
|
|
852
|
+
type: e.href ? void 0 : o.value,
|
|
853
|
+
form: typeof e.submit == "string" ? e.submit : void 0,
|
|
854
|
+
href: e.href,
|
|
855
|
+
class: w(["dai-btn", {
|
|
856
|
+
[`dai-btn--${e.color}`]: e.color,
|
|
857
|
+
"dai-btn--flat": l.value === "flat",
|
|
858
|
+
"dai-btn--plain": l.value === "plain",
|
|
859
|
+
"dai-btn--muted": l.value === "muted",
|
|
860
|
+
"dai-btn--outlined": l.value === "outlined",
|
|
861
|
+
"dai-btn--sm": i.value === "small",
|
|
862
|
+
"dai-btn--lg": i.value === "large",
|
|
863
|
+
"dai-btn--loading": e.loading,
|
|
864
|
+
"dai-btn--block": e.block,
|
|
865
|
+
"dai-btn--rounded": e.rounded,
|
|
866
|
+
"dai-btn--condensed": e.condensed
|
|
864
867
|
}])
|
|
865
868
|
}, {
|
|
866
|
-
default:
|
|
867
|
-
|
|
869
|
+
default: c(() => [
|
|
870
|
+
e.loading ? (a(), u("span", et, [...n[0] || (n[0] = [
|
|
868
871
|
d("svg", {
|
|
869
872
|
xmlns: "http://www.w3.org/2000/svg",
|
|
870
873
|
fill: "none",
|
|
@@ -884,33 +887,33 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
884
887
|
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"
|
|
885
888
|
})
|
|
886
889
|
], -1)
|
|
887
|
-
])])) :
|
|
888
|
-
d("span",
|
|
889
|
-
|
|
890
|
+
])])) : h("", !0),
|
|
891
|
+
d("span", tt, [
|
|
892
|
+
e.icon ? (a(), u("div", {
|
|
890
893
|
key: 0,
|
|
891
|
-
class:
|
|
892
|
-
}, null, 2)) :
|
|
893
|
-
|
|
894
|
-
|
|
894
|
+
class: w([e.icon, "dai-btn__icon"])
|
|
895
|
+
}, null, 2)) : h("", !0),
|
|
896
|
+
p(s.$slots, "default"),
|
|
897
|
+
e.iconAfter ? (a(), u("div", {
|
|
895
898
|
key: 1,
|
|
896
|
-
class:
|
|
897
|
-
}, null, 2)) :
|
|
899
|
+
class: w([e.iconAfter, "dai-btn__icon"])
|
|
900
|
+
}, null, 2)) : h("", !0)
|
|
898
901
|
])
|
|
899
902
|
]),
|
|
900
903
|
_: 3
|
|
901
904
|
}, 8, ["type", "form", "href", "class"]));
|
|
902
905
|
}
|
|
903
|
-
}),
|
|
906
|
+
}), zt = /* @__PURE__ */ v({
|
|
904
907
|
__name: "popoverDialog",
|
|
905
|
-
setup(
|
|
906
|
-
return (
|
|
908
|
+
setup(e) {
|
|
909
|
+
return (t, o) => (a(), f(P, {
|
|
907
910
|
"enter-from-class": "dai-popover-dialog--anim",
|
|
908
911
|
"leave-to-class": "dai-popover-dialog--anim"
|
|
909
912
|
}, {
|
|
910
|
-
default:
|
|
911
|
-
|
|
912
|
-
default:
|
|
913
|
-
|
|
913
|
+
default: c(() => [
|
|
914
|
+
V(r(ne), { class: "dai-popover-dialog" }, {
|
|
915
|
+
default: c(() => [
|
|
916
|
+
p(t.$slots, "default")
|
|
914
917
|
]),
|
|
915
918
|
_: 3
|
|
916
919
|
})
|
|
@@ -918,17 +921,17 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
918
921
|
_: 3
|
|
919
922
|
}));
|
|
920
923
|
}
|
|
921
|
-
}),
|
|
924
|
+
}), Et = /* @__PURE__ */ v({
|
|
922
925
|
__name: "menuItems",
|
|
923
|
-
setup(
|
|
924
|
-
return (
|
|
926
|
+
setup(e) {
|
|
927
|
+
return (t, o) => (a(), f(P, {
|
|
925
928
|
"enter-from-class": "dai-menu-items--anim",
|
|
926
929
|
"leave-to-class": "dai-menu-items--anim"
|
|
927
930
|
}, {
|
|
928
|
-
default:
|
|
929
|
-
|
|
930
|
-
default:
|
|
931
|
-
|
|
931
|
+
default: c(() => [
|
|
932
|
+
V(r(se), { class: "dai-menu-items" }, {
|
|
933
|
+
default: c(() => [
|
|
934
|
+
p(t.$slots, "default")
|
|
932
935
|
]),
|
|
933
936
|
_: 3
|
|
934
937
|
})
|
|
@@ -936,87 +939,87 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
936
939
|
_: 3
|
|
937
940
|
}));
|
|
938
941
|
}
|
|
939
|
-
}),
|
|
942
|
+
}), ot = {
|
|
940
943
|
key: 0,
|
|
941
944
|
class: "text-secondary-400 flex-shrink-0"
|
|
942
|
-
},
|
|
945
|
+
}, Lt = /* @__PURE__ */ v({
|
|
943
946
|
__name: "menuItem",
|
|
944
947
|
props: {
|
|
945
948
|
icon: {}
|
|
946
949
|
},
|
|
947
|
-
setup(
|
|
948
|
-
return (
|
|
949
|
-
default:
|
|
950
|
-
e.icon ? (
|
|
950
|
+
setup(e) {
|
|
951
|
+
return (t, o) => (a(), f(r(re), { class: "dai-menu-item" }, {
|
|
952
|
+
default: c(({ isActive: l, isSelected: i }) => [
|
|
953
|
+
e.icon ? (a(), u("div", ot, [
|
|
951
954
|
d("div", {
|
|
952
|
-
class:
|
|
955
|
+
class: w(["h-5 w-5", e.icon])
|
|
953
956
|
}, null, 2)
|
|
954
|
-
])) :
|
|
955
|
-
|
|
956
|
-
isActive:
|
|
957
|
-
isSelected:
|
|
957
|
+
])) : h("", !0),
|
|
958
|
+
p(t.$slots, "default", {
|
|
959
|
+
isActive: l,
|
|
960
|
+
isSelected: i
|
|
958
961
|
})
|
|
959
962
|
]),
|
|
960
963
|
_: 3
|
|
961
964
|
}));
|
|
962
965
|
}
|
|
963
|
-
}),
|
|
966
|
+
}), qt = /* @__PURE__ */ v({
|
|
964
967
|
__name: "tab",
|
|
965
968
|
props: {
|
|
966
969
|
id: {},
|
|
967
970
|
ariaControls: {},
|
|
968
971
|
value: {}
|
|
969
972
|
},
|
|
970
|
-
setup(
|
|
971
|
-
return (
|
|
973
|
+
setup(e) {
|
|
974
|
+
return (t, o) => (a(), f(r(de), {
|
|
972
975
|
id: e.id,
|
|
973
976
|
"aria-controls": e.ariaControls,
|
|
974
977
|
value: e.value,
|
|
975
978
|
class: "dai-tab"
|
|
976
979
|
}, {
|
|
977
|
-
default:
|
|
978
|
-
|
|
980
|
+
default: c(() => [
|
|
981
|
+
p(t.$slots, "default")
|
|
979
982
|
]),
|
|
980
983
|
_: 3
|
|
981
984
|
}, 8, ["id", "aria-controls", "value"]));
|
|
982
985
|
}
|
|
983
|
-
}),
|
|
986
|
+
}), Tt = /* @__PURE__ */ v({
|
|
984
987
|
__name: "tabList",
|
|
985
|
-
setup(
|
|
986
|
-
const
|
|
987
|
-
function
|
|
988
|
-
if (!
|
|
989
|
-
const
|
|
990
|
-
if (!
|
|
991
|
-
const
|
|
992
|
-
|
|
993
|
-
left: `${
|
|
994
|
-
right: `${
|
|
995
|
-
transition:
|
|
988
|
+
setup(e) {
|
|
989
|
+
const t = q("tablist"), o = q("slider"), l = N({});
|
|
990
|
+
function i() {
|
|
991
|
+
if (!o.value) return;
|
|
992
|
+
const s = t.value?.$el;
|
|
993
|
+
if (!s) return;
|
|
994
|
+
const n = s.querySelector("[aria-selected=true]");
|
|
995
|
+
n && (l.value = {
|
|
996
|
+
left: `${n.offsetLeft}px`,
|
|
997
|
+
right: `${s.offsetWidth - n.offsetLeft - n.offsetWidth}px`,
|
|
998
|
+
transition: o.value.offsetLeft > n.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
|
|
996
999
|
});
|
|
997
1000
|
}
|
|
998
|
-
return
|
|
1001
|
+
return j(() => we(i)), (s, n) => (a(), f(r(ue), {
|
|
999
1002
|
ref_key: "tablist",
|
|
1000
|
-
ref:
|
|
1001
|
-
onClickPassive:
|
|
1003
|
+
ref: t,
|
|
1004
|
+
onClickPassive: i,
|
|
1002
1005
|
class: "dai-tab-list"
|
|
1003
1006
|
}, {
|
|
1004
|
-
default:
|
|
1007
|
+
default: c(() => [
|
|
1005
1008
|
d("div", {
|
|
1006
1009
|
ref_key: "slider",
|
|
1007
|
-
ref:
|
|
1010
|
+
ref: o,
|
|
1008
1011
|
class: "dai-tab-list__slider",
|
|
1009
|
-
style:
|
|
1012
|
+
style: U(l.value)
|
|
1010
1013
|
}, null, 4),
|
|
1011
|
-
|
|
1014
|
+
p(s.$slots, "default")
|
|
1012
1015
|
]),
|
|
1013
1016
|
_: 3
|
|
1014
1017
|
}, 512));
|
|
1015
1018
|
}
|
|
1016
|
-
}),
|
|
1019
|
+
}), at = ["id"], Pt = /* @__PURE__ */ v({
|
|
1017
1020
|
inheritAttrs: !1,
|
|
1018
1021
|
__name: "offcanvas",
|
|
1019
|
-
props: /* @__PURE__ */
|
|
1022
|
+
props: /* @__PURE__ */ M({
|
|
1020
1023
|
id: {},
|
|
1021
1024
|
position: { default: "right" },
|
|
1022
1025
|
push: { type: Boolean },
|
|
@@ -1028,23 +1031,23 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
1028
1031
|
modelModifiers: {}
|
|
1029
1032
|
}),
|
|
1030
1033
|
emits: ["update:modelValue"],
|
|
1031
|
-
setup(
|
|
1032
|
-
const
|
|
1033
|
-
|
|
1034
|
-
if (!
|
|
1034
|
+
setup(e) {
|
|
1035
|
+
const t = e, o = x(e, "modelValue"), l = t.id ?? L(), { classList: i } = xe(document.body, "nui-body-push");
|
|
1036
|
+
T(o, () => {
|
|
1037
|
+
if (!t.push || (i.splice(1), !o.value))
|
|
1035
1038
|
return;
|
|
1036
|
-
let
|
|
1037
|
-
|
|
1039
|
+
let n = "nui-body-push--" + t.position;
|
|
1040
|
+
t.lg && (n += "--lg"), t.xl && (n += "--xl"), i.push(n);
|
|
1038
1041
|
});
|
|
1039
|
-
function
|
|
1040
|
-
|
|
1042
|
+
function s(n) {
|
|
1043
|
+
n.target.closest(`#${l}`) || t.closeOnOutsideClick && (o.value = !1);
|
|
1041
1044
|
}
|
|
1042
|
-
return
|
|
1043
|
-
window.addEventListener("click",
|
|
1044
|
-
}),
|
|
1045
|
-
window.removeEventListener("click",
|
|
1046
|
-
}), (
|
|
1047
|
-
|
|
1045
|
+
return j(() => {
|
|
1046
|
+
window.addEventListener("click", s, { passive: !0 });
|
|
1047
|
+
}), R(() => {
|
|
1048
|
+
window.removeEventListener("click", s);
|
|
1049
|
+
}), (n, g) => (a(), f(Z, { to: "body" }, [
|
|
1050
|
+
V(P, {
|
|
1048
1051
|
appear: "",
|
|
1049
1052
|
"enter-from-class": "nui-offcanvas--animate-hidden",
|
|
1050
1053
|
"enter-to-class": "nui-offcanvas--animate-shown",
|
|
@@ -1053,63 +1056,63 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
1053
1056
|
"leave-to-class": "nui-offcanvas--animate-hidden",
|
|
1054
1057
|
"leave-active-class": "ease-in-out"
|
|
1055
1058
|
}, {
|
|
1056
|
-
default:
|
|
1057
|
-
|
|
1059
|
+
default: c(() => [
|
|
1060
|
+
o.value ? (a(), u("div", _({
|
|
1058
1061
|
key: 0,
|
|
1059
|
-
id: r(
|
|
1060
|
-
},
|
|
1062
|
+
id: r(l)
|
|
1063
|
+
}, n.$attrs, {
|
|
1061
1064
|
class: ["nui-offcanvas", {
|
|
1062
|
-
[`nui-offcanvas--${
|
|
1063
|
-
"nui-offcanvas--shadow": !
|
|
1064
|
-
"nui-offcanvas--lg":
|
|
1065
|
-
"nui-offcanvas--xl":
|
|
1065
|
+
[`nui-offcanvas--${e.position}`]: !0,
|
|
1066
|
+
"nui-offcanvas--shadow": !e.push,
|
|
1067
|
+
"nui-offcanvas--lg": e.lg,
|
|
1068
|
+
"nui-offcanvas--xl": e.xl
|
|
1066
1069
|
}]
|
|
1067
1070
|
}), [
|
|
1068
|
-
|
|
1069
|
-
], 16,
|
|
1071
|
+
p(n.$slots, "default")
|
|
1072
|
+
], 16, at)) : h("", !0)
|
|
1070
1073
|
]),
|
|
1071
1074
|
_: 3
|
|
1072
1075
|
})
|
|
1073
1076
|
]));
|
|
1074
1077
|
}
|
|
1075
|
-
}),
|
|
1078
|
+
}), lt = {
|
|
1076
1079
|
key: 0,
|
|
1077
1080
|
role: "alert"
|
|
1078
|
-
},
|
|
1081
|
+
}, it = {
|
|
1079
1082
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1080
1083
|
fill: "none",
|
|
1081
1084
|
viewBox: "0 0 24 24",
|
|
1082
1085
|
stroke: "currentColor"
|
|
1083
|
-
},
|
|
1086
|
+
}, nt = {
|
|
1084
1087
|
key: 0,
|
|
1085
1088
|
"stroke-linecap": "round",
|
|
1086
1089
|
"stroke-linejoin": "round",
|
|
1087
1090
|
"stroke-width": "2",
|
|
1088
1091
|
d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1089
|
-
},
|
|
1092
|
+
}, st = {
|
|
1090
1093
|
key: 1,
|
|
1091
1094
|
"stroke-linecap": "round",
|
|
1092
1095
|
"stroke-linejoin": "round",
|
|
1093
1096
|
"stroke-width": "2",
|
|
1094
1097
|
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1095
|
-
},
|
|
1098
|
+
}, rt = {
|
|
1096
1099
|
key: 2,
|
|
1097
1100
|
"stroke-linecap": "round",
|
|
1098
1101
|
"stroke-linejoin": "round",
|
|
1099
1102
|
"stroke-width": "2",
|
|
1100
1103
|
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"
|
|
1101
|
-
},
|
|
1104
|
+
}, dt = {
|
|
1102
1105
|
key: 3,
|
|
1103
1106
|
"stroke-linecap": "round",
|
|
1104
1107
|
"stroke-linejoin": "round",
|
|
1105
1108
|
"stroke-width": "2",
|
|
1106
1109
|
d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1107
|
-
},
|
|
1110
|
+
}, ut = { class: "dai-notification__content" }, ct = {
|
|
1108
1111
|
key: 0,
|
|
1109
1112
|
class: "dai-notification__content__detail"
|
|
1110
|
-
},
|
|
1113
|
+
}, mt = /* @__PURE__ */ v({
|
|
1111
1114
|
__name: "notification",
|
|
1112
|
-
props: /* @__PURE__ */
|
|
1115
|
+
props: /* @__PURE__ */ M({
|
|
1113
1116
|
color: {},
|
|
1114
1117
|
icon: {},
|
|
1115
1118
|
message: {},
|
|
@@ -1121,37 +1124,37 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
1121
1124
|
modelModifiers: {}
|
|
1122
1125
|
}),
|
|
1123
1126
|
emits: ["update:modelValue"],
|
|
1124
|
-
setup(
|
|
1125
|
-
const
|
|
1126
|
-
let
|
|
1127
|
-
function
|
|
1128
|
-
clearTimeout(
|
|
1127
|
+
setup(e) {
|
|
1128
|
+
const t = e, o = x(e, "modelValue");
|
|
1129
|
+
let l;
|
|
1130
|
+
function i() {
|
|
1131
|
+
clearTimeout(l), o.value && t.timeout && (l = setTimeout(() => o.value = !1, t.timeout));
|
|
1129
1132
|
}
|
|
1130
|
-
return
|
|
1133
|
+
return T(o, i, { immediate: !0 }), (s, n) => o.value ? (a(), u("div", lt, [
|
|
1131
1134
|
d("div", {
|
|
1132
|
-
class:
|
|
1135
|
+
class: w(["dai-notification", [`dai-notification--${e.color || "secondary"}`]])
|
|
1133
1136
|
}, [
|
|
1134
|
-
|
|
1137
|
+
e.icon ? (a(), u("div", {
|
|
1135
1138
|
key: 0,
|
|
1136
|
-
class:
|
|
1139
|
+
class: w(["dai-notification__icon", [`dai-notification__icon--${e.icon}`]])
|
|
1137
1140
|
}, [
|
|
1138
|
-
(
|
|
1139
|
-
|
|
1141
|
+
(a(), u("svg", it, [
|
|
1142
|
+
e.icon == "success" ? (a(), u("path", nt)) : e.icon == "info" ? (a(), u("path", st)) : e.icon == "warning" ? (a(), u("path", rt)) : e.icon == "danger" ? (a(), u("path", dt)) : h("", !0)
|
|
1140
1143
|
]))
|
|
1141
|
-
], 2)) :
|
|
1142
|
-
d("div",
|
|
1144
|
+
], 2)) : h("", !0),
|
|
1145
|
+
d("div", ut, [
|
|
1143
1146
|
d("div", {
|
|
1144
|
-
class:
|
|
1145
|
-
"dai-notification__content__message--bold":
|
|
1147
|
+
class: w(["dai-notification__content__message", {
|
|
1148
|
+
"dai-notification__content__message--bold": e.detail
|
|
1146
1149
|
}])
|
|
1147
|
-
},
|
|
1148
|
-
|
|
1150
|
+
}, k(e.message), 3),
|
|
1151
|
+
e.detail ? (a(), u("div", ct, k(e.detail), 1)) : h("", !0)
|
|
1149
1152
|
]),
|
|
1150
|
-
|
|
1153
|
+
e.dismissible ? (a(), u("div", {
|
|
1151
1154
|
key: 1,
|
|
1152
|
-
onClick:
|
|
1155
|
+
onClick: n[0] || (n[0] = (g) => o.value = !1),
|
|
1153
1156
|
class: "dai-notification__dismiss"
|
|
1154
|
-
}, [...
|
|
1157
|
+
}, [...n[1] || (n[1] = [
|
|
1155
1158
|
d("svg", {
|
|
1156
1159
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1157
1160
|
fill: "none",
|
|
@@ -1165,13 +1168,13 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
1165
1168
|
d: "M6 18L18 6M6 6l12 12"
|
|
1166
1169
|
})
|
|
1167
1170
|
], -1)
|
|
1168
|
-
])])) :
|
|
1171
|
+
])])) : h("", !0)
|
|
1169
1172
|
], 2)
|
|
1170
|
-
])) :
|
|
1173
|
+
])) : h("", !0);
|
|
1171
1174
|
}
|
|
1172
|
-
}),
|
|
1175
|
+
}), At = /* @__PURE__ */ v({
|
|
1173
1176
|
__name: "notificationQueue",
|
|
1174
|
-
props: /* @__PURE__ */
|
|
1177
|
+
props: /* @__PURE__ */ M({
|
|
1175
1178
|
length: { default: 3 },
|
|
1176
1179
|
timeout: { default: 4e3 },
|
|
1177
1180
|
position: { default: "fixed" },
|
|
@@ -1182,52 +1185,52 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
1182
1185
|
queueModifiers: {}
|
|
1183
1186
|
}),
|
|
1184
1187
|
emits: ["update:queue"],
|
|
1185
|
-
setup(
|
|
1186
|
-
const
|
|
1187
|
-
let
|
|
1188
|
-
function
|
|
1189
|
-
|
|
1188
|
+
setup(e) {
|
|
1189
|
+
const t = e, o = x(e, "queue"), l = N([]);
|
|
1190
|
+
let i = 0;
|
|
1191
|
+
function s() {
|
|
1192
|
+
o.value.length === 0 || l.value.length >= t.length || (l.value.push({ ...o.value[0], id: i++, show: !0 }), o.value.shift());
|
|
1190
1193
|
}
|
|
1191
|
-
function
|
|
1194
|
+
function n(b) {
|
|
1192
1195
|
setTimeout(() => {
|
|
1193
|
-
|
|
1194
|
-
(
|
|
1195
|
-
),
|
|
1196
|
+
l.value = l.value.filter(
|
|
1197
|
+
(y) => y.id !== b
|
|
1198
|
+
), s();
|
|
1196
1199
|
}, 200);
|
|
1197
1200
|
}
|
|
1198
|
-
|
|
1199
|
-
const
|
|
1200
|
-
const
|
|
1201
|
-
return
|
|
1201
|
+
T(o, s, { immediate: !0, deep: !0 });
|
|
1202
|
+
const g = $(() => {
|
|
1203
|
+
const b = ["dai-notification-queue__item--anim"];
|
|
1204
|
+
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(" ");
|
|
1202
1205
|
});
|
|
1203
|
-
return (
|
|
1204
|
-
class:
|
|
1205
|
-
"dai-notification-queue--fixed":
|
|
1206
|
-
"dai-notification-queue--absolute":
|
|
1207
|
-
"dai-notification-queue--y-top":
|
|
1208
|
-
"dai-notification-queue--y-bottom":
|
|
1209
|
-
"dai-notification-queue--x-left":
|
|
1210
|
-
"dai-notification-queue--x-center":
|
|
1211
|
-
"dai-notification-queue--x-right":
|
|
1206
|
+
return (b, y) => (a(), u("div", {
|
|
1207
|
+
class: w(["dai-notification-queue", {
|
|
1208
|
+
"dai-notification-queue--fixed": e.position == "fixed",
|
|
1209
|
+
"dai-notification-queue--absolute": e.position == "absolute",
|
|
1210
|
+
"dai-notification-queue--y-top": e.positionY == "top",
|
|
1211
|
+
"dai-notification-queue--y-bottom": e.positionY == "bottom",
|
|
1212
|
+
"dai-notification-queue--x-left": e.positionX == "left",
|
|
1213
|
+
"dai-notification-queue--x-center": e.positionX == "center",
|
|
1214
|
+
"dai-notification-queue--x-right": e.positionX == "right"
|
|
1212
1215
|
}])
|
|
1213
1216
|
}, [
|
|
1214
|
-
|
|
1217
|
+
V(ke, {
|
|
1215
1218
|
appear: "",
|
|
1216
|
-
"enter-from-class":
|
|
1219
|
+
"enter-from-class": g.value,
|
|
1217
1220
|
"enter-active-class": "dai-notification-queue__item--anim-in",
|
|
1218
|
-
"leave-to-class":
|
|
1221
|
+
"leave-to-class": g.value,
|
|
1219
1222
|
"leave-active-class": "dai-notification-queue__item--anim-out"
|
|
1220
1223
|
}, {
|
|
1221
|
-
default:
|
|
1222
|
-
(
|
|
1224
|
+
default: c(() => [
|
|
1225
|
+
(a(!0), u(I, null, X(l.value, (m) => (a(), f(mt, {
|
|
1223
1226
|
key: m.id,
|
|
1224
1227
|
color: m.color,
|
|
1225
1228
|
icon: m.type,
|
|
1226
1229
|
message: m.message,
|
|
1227
1230
|
detail: m.detail,
|
|
1228
|
-
timeout: m.timeout ??
|
|
1231
|
+
timeout: m.timeout ?? e.timeout,
|
|
1229
1232
|
modelValue: m.show,
|
|
1230
|
-
"onUpdate:modelValue": [(
|
|
1233
|
+
"onUpdate:modelValue": [(C) => m.show = C, (C) => n(m.id)],
|
|
1231
1234
|
class: "dai-notification-queue__item"
|
|
1232
1235
|
}, null, 8, ["color", "icon", "message", "detail", "timeout", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
1233
1236
|
]),
|
|
@@ -1235,7 +1238,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
1235
1238
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
1236
1239
|
], 2));
|
|
1237
1240
|
}
|
|
1238
|
-
}),
|
|
1241
|
+
}), ft = ["aria-valuenow"], It = /* @__PURE__ */ v({
|
|
1239
1242
|
__name: "progressbar",
|
|
1240
1243
|
props: {
|
|
1241
1244
|
value: {},
|
|
@@ -1243,40 +1246,40 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
1243
1246
|
height: { default: 5 },
|
|
1244
1247
|
rounded: { type: Boolean, default: !0 }
|
|
1245
1248
|
},
|
|
1246
|
-
setup(
|
|
1247
|
-
const
|
|
1248
|
-
return (
|
|
1249
|
-
class:
|
|
1250
|
-
rounded:
|
|
1251
|
-
"bg-primary-200":
|
|
1252
|
-
"bg-success-200":
|
|
1253
|
-
"bg-info-200":
|
|
1254
|
-
"bg-warning-200":
|
|
1255
|
-
"bg-danger-200":
|
|
1249
|
+
setup(e) {
|
|
1250
|
+
const t = e, o = $(() => t.value === void 0);
|
|
1251
|
+
return (l, i) => (a(), u("div", {
|
|
1252
|
+
class: w(["overflow-hidden text-xs w-full flex-1", {
|
|
1253
|
+
rounded: e.rounded,
|
|
1254
|
+
"bg-primary-200": e.color == "primary",
|
|
1255
|
+
"bg-success-200": e.color == "success",
|
|
1256
|
+
"bg-info-200": e.color == "info",
|
|
1257
|
+
"bg-warning-200": e.color == "warning",
|
|
1258
|
+
"bg-danger-200": e.color == "danger"
|
|
1256
1259
|
}]),
|
|
1257
|
-
style:
|
|
1260
|
+
style: U({ height: e.height + "px" }),
|
|
1258
1261
|
role: "progressbar",
|
|
1259
1262
|
"aria-valuemin": "0",
|
|
1260
1263
|
"aria-valuemax": "100",
|
|
1261
|
-
"aria-valuenow":
|
|
1264
|
+
"aria-valuenow": e.value
|
|
1262
1265
|
}, [
|
|
1263
1266
|
d("div", {
|
|
1264
|
-
style:
|
|
1265
|
-
class:
|
|
1266
|
-
"bg-primary-500":
|
|
1267
|
-
"bg-success-500":
|
|
1268
|
-
"bg-info-500":
|
|
1269
|
-
"bg-warning-500":
|
|
1270
|
-
"bg-danger-500":
|
|
1271
|
-
"progress-infinite":
|
|
1267
|
+
style: U(`width:${e.value}%`),
|
|
1268
|
+
class: w([{
|
|
1269
|
+
"bg-primary-500": e.color == "primary",
|
|
1270
|
+
"bg-success-500": e.color == "success",
|
|
1271
|
+
"bg-info-500": e.color == "info",
|
|
1272
|
+
"bg-warning-500": e.color == "warning",
|
|
1273
|
+
"bg-danger-500": e.color == "danger",
|
|
1274
|
+
"progress-infinite": o.value
|
|
1272
1275
|
}, "h-full shadow-none relative text-center whitespace-nowrap text-white justify-center"])
|
|
1273
1276
|
}, null, 6)
|
|
1274
|
-
], 14,
|
|
1277
|
+
], 14, ft));
|
|
1275
1278
|
}
|
|
1276
|
-
}),
|
|
1279
|
+
}), vt = {
|
|
1277
1280
|
key: 0,
|
|
1278
1281
|
class: "z-50"
|
|
1279
|
-
},
|
|
1282
|
+
}, pt = { class: "fixed inset-0 overflow-y-auto" }, ht = { class: "modal__dialog" }, jt = /* @__PURE__ */ v({
|
|
1280
1283
|
inheritAttrs: !1,
|
|
1281
1284
|
__name: "modal",
|
|
1282
1285
|
props: {
|
|
@@ -1284,36 +1287,36 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
1284
1287
|
modelModifiers: {}
|
|
1285
1288
|
},
|
|
1286
1289
|
emits: ["update:modelValue"],
|
|
1287
|
-
setup(
|
|
1288
|
-
const
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1290
|
+
setup(e) {
|
|
1291
|
+
const t = x(e, "modelValue");
|
|
1292
|
+
function o() {
|
|
1293
|
+
t.value = !1;
|
|
1291
1294
|
}
|
|
1292
|
-
return
|
|
1293
|
-
|
|
1294
|
-
}), (
|
|
1295
|
-
|
|
1295
|
+
return T(t, (l) => {
|
|
1296
|
+
l ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
|
|
1297
|
+
}), (l, i) => (a(), f(Z, { to: "body" }, [
|
|
1298
|
+
V(P, {
|
|
1296
1299
|
appear: "",
|
|
1297
1300
|
name: "modal",
|
|
1298
1301
|
duration: { enter: 300, leave: 200 }
|
|
1299
1302
|
}, {
|
|
1300
|
-
default:
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
+
default: c(() => [
|
|
1304
|
+
t.value ? (a(), u("div", vt, [
|
|
1305
|
+
i[0] || (i[0] = d("div", {
|
|
1303
1306
|
class: "modal__backdrop fixed inset-0 bg-primary-50/60 backdrop-blur-sm",
|
|
1304
1307
|
"aria-hidden": "true"
|
|
1305
1308
|
}, null, -1)),
|
|
1306
|
-
d("div",
|
|
1309
|
+
d("div", pt, [
|
|
1307
1310
|
d("div", {
|
|
1308
|
-
onClick:
|
|
1311
|
+
onClick: $e(o, ["self"]),
|
|
1309
1312
|
class: "min-h-full flex items-center justify-center p-4 sm:p-6"
|
|
1310
1313
|
}, [
|
|
1311
|
-
d("div",
|
|
1312
|
-
|
|
1314
|
+
d("div", ht, [
|
|
1315
|
+
p(l.$slots, "default", { close: o })
|
|
1313
1316
|
])
|
|
1314
1317
|
])
|
|
1315
1318
|
])
|
|
1316
|
-
])) :
|
|
1319
|
+
])) : h("", !0)
|
|
1317
1320
|
]),
|
|
1318
1321
|
_: 3
|
|
1319
1322
|
})
|
|
@@ -1321,32 +1324,32 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern
|
|
|
1321
1324
|
}
|
|
1322
1325
|
});
|
|
1323
1326
|
export {
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
$
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1327
|
+
Ct as Btn,
|
|
1328
|
+
Bt as Checkbox,
|
|
1329
|
+
Ee as Combobox,
|
|
1330
|
+
qe as ComboboxButton,
|
|
1331
|
+
wt as ComboboxInput,
|
|
1332
|
+
Ae as ComboboxOption,
|
|
1333
|
+
Te as ComboboxOptions,
|
|
1334
|
+
kt as Input,
|
|
1335
|
+
Ot as Menu,
|
|
1336
|
+
Lt as MenuItem,
|
|
1337
|
+
Et as MenuItems,
|
|
1338
|
+
jt as Modal,
|
|
1339
|
+
mt as Notification,
|
|
1340
|
+
At as NotificationQueue,
|
|
1341
|
+
Pt as Offcanvas,
|
|
1342
|
+
Ut as Popover,
|
|
1343
|
+
zt as PopoverDialog,
|
|
1344
|
+
It as Progressbar,
|
|
1345
|
+
Vt as Radio,
|
|
1346
|
+
$t as Select,
|
|
1347
|
+
xt as Selectbox,
|
|
1348
|
+
Mt as Switch,
|
|
1349
|
+
qt as Tab,
|
|
1350
|
+
Nt as TabContainer,
|
|
1351
|
+
Tt as TabList,
|
|
1352
|
+
Xt as TabPanel,
|
|
1353
|
+
_t as Textarea,
|
|
1354
|
+
xe as useClassList
|
|
1352
1355
|
};
|