@defaultusr/dai-ui 1.1.3 → 1.1.5
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,19 +1,19 @@
|
|
|
1
1
|
import { Combobox as oe, ComboboxInput as te, injectCombobox as ae, ComboboxOptions as le, ComboboxOption as ie, useFormControl as I, 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 P, onUnmounted as Z, defineComponent as v, createElementBlock as u, openBlock as n, renderSlot as h, createTextVNode as L, toDisplayString as w, normalizeClass as g, createBlock as
|
|
2
|
+
import { Menu as No, Popover as Xo, TabContainer as Do, TabPanel as Ho } from "vue-composable-ui";
|
|
3
|
+
import { reactive as ce, watch as P, onUnmounted as Z, defineComponent as v, createElementBlock as u, openBlock as n, renderSlot as h, createTextVNode as L, toDisplayString as w, normalizeClass as g, createBlock as f, createCommentVNode as _, createElementVNode as d, computed as $, createVNode as M, normalizeProps as pe, guardReactiveProps as me, withCtx as p, Transition as A, mergeModels as C, useModel as B, useId as q, mergeProps as V, unref as r, inject as fe, Fragment as j, useTemplateRef as T, ref as X, onMounted as F, withDirectives as S, renderList as D, vModelSelect as ve, vModelText as he, vModelCheckbox as _e, vModelRadio as be, resolveDynamicComponent as ye, nextTick as ge, normalizeStyle as N, Teleport as G, TransitionGroup as we, withModifiers as ke } from "vue";
|
|
4
4
|
import './assets/main.css';function $e(s, ...e) {
|
|
5
|
-
let
|
|
5
|
+
let a = [];
|
|
6
6
|
const o = ce(e);
|
|
7
|
-
function
|
|
8
|
-
o.length && (s.classList.add(...o),
|
|
7
|
+
function t() {
|
|
8
|
+
o.length && (s.classList.add(...o), a = [...o]);
|
|
9
9
|
}
|
|
10
10
|
function l() {
|
|
11
|
-
s.classList.remove(...
|
|
11
|
+
s.classList.remove(...a);
|
|
12
12
|
}
|
|
13
13
|
return P(
|
|
14
14
|
o,
|
|
15
15
|
() => {
|
|
16
|
-
l(),
|
|
16
|
+
l(), t();
|
|
17
17
|
},
|
|
18
18
|
{ immediate: !0 }
|
|
19
19
|
), Z(l), {
|
|
@@ -26,7 +26,7 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
26
26
|
text: {}
|
|
27
27
|
},
|
|
28
28
|
setup(s) {
|
|
29
|
-
return (e,
|
|
29
|
+
return (e, a) => (n(), u("label", Be, [
|
|
30
30
|
h(e.$slots, "default", {}, () => [
|
|
31
31
|
L(w(e.text), 1)
|
|
32
32
|
])
|
|
@@ -38,7 +38,7 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
38
38
|
text: {}
|
|
39
39
|
},
|
|
40
40
|
setup(s) {
|
|
41
|
-
return (e,
|
|
41
|
+
return (e, a) => (n(), u("div", Ve, [
|
|
42
42
|
h(e.$slots, "default", {}, () => [
|
|
43
43
|
L(w(e.text), 1)
|
|
44
44
|
])
|
|
@@ -57,7 +57,7 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
57
57
|
invalid: { type: Boolean }
|
|
58
58
|
},
|
|
59
59
|
setup(s) {
|
|
60
|
-
return (e,
|
|
60
|
+
return (e, a) => (n(), u("div", {
|
|
61
61
|
class: g(["dai-form-control__input-group", {
|
|
62
62
|
"dai-form-control__input-group--labeled": !!e.label,
|
|
63
63
|
"dai-form-control__input-group--outlined": e.variant === "outlined",
|
|
@@ -69,7 +69,7 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
69
69
|
"dai-form-control__input-group--invalid": e.invalid
|
|
70
70
|
}])
|
|
71
71
|
}, [
|
|
72
|
-
e.label ? (n(),
|
|
72
|
+
e.label ? (n(), f(O, {
|
|
73
73
|
key: 0,
|
|
74
74
|
text: e.label,
|
|
75
75
|
for: e.labelFor,
|
|
@@ -84,7 +84,7 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
84
84
|
key: 0,
|
|
85
85
|
class: "dai-form-control__validation-message",
|
|
86
86
|
role: "alert"
|
|
87
|
-
},
|
|
87
|
+
}, U = /* @__PURE__ */ v({
|
|
88
88
|
inheritAttrs: !1,
|
|
89
89
|
__name: "formControl",
|
|
90
90
|
props: {
|
|
@@ -104,39 +104,39 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
104
104
|
invalid: { type: Boolean }
|
|
105
105
|
},
|
|
106
106
|
setup(s) {
|
|
107
|
-
const e = s,
|
|
108
|
-
return (
|
|
107
|
+
const e = s, a = $(() => e.variant ? e.variant : e.muted ? "muted" : e.outlined ? "outlined" : "flat"), o = $(() => e.size ? e.size : e.sm ? "small" : e.lg ? "large" : "medium");
|
|
108
|
+
return (t, l) => (n(), u("div", {
|
|
109
109
|
class: g(["dai-form-control", {
|
|
110
|
-
"dai-form-control--label-inline":
|
|
111
|
-
"dai-form-control--invalid":
|
|
110
|
+
"dai-form-control--label-inline": t.labelPosition === "inline",
|
|
111
|
+
"dai-form-control--invalid": t.invalid,
|
|
112
112
|
"dai-form-control--lg": o.value === "large"
|
|
113
113
|
}])
|
|
114
114
|
}, [
|
|
115
|
-
|
|
115
|
+
t.label && t.labelPosition !== "inside" ? (n(), f(O, {
|
|
116
116
|
key: 0,
|
|
117
|
-
for:
|
|
118
|
-
text:
|
|
117
|
+
for: t.labelFor,
|
|
118
|
+
text: t.label
|
|
119
119
|
}, null, 8, ["for", "text"])) : _("", !0),
|
|
120
120
|
d("div", ze, [
|
|
121
|
-
M(Ce, pe(
|
|
121
|
+
M(Ce, pe(me({
|
|
122
122
|
...e,
|
|
123
|
-
label:
|
|
124
|
-
variant:
|
|
123
|
+
label: t.labelPosition === "inside" ? t.label : void 0,
|
|
124
|
+
variant: a.value,
|
|
125
125
|
size: o.value
|
|
126
126
|
})), {
|
|
127
127
|
default: p(() => [
|
|
128
|
-
h(
|
|
128
|
+
h(t.$slots, "default")
|
|
129
129
|
]),
|
|
130
130
|
_: 3
|
|
131
131
|
}, 16),
|
|
132
|
-
|
|
132
|
+
t.hint ? (n(), f(H, {
|
|
133
133
|
key: 0,
|
|
134
|
-
text:
|
|
134
|
+
text: t.hint,
|
|
135
135
|
class: "dai-form-control__hint"
|
|
136
136
|
}, null, 8, ["text"])) : _("", !0),
|
|
137
137
|
M(A, { name: "dai-form-control__validation-message-transition" }, {
|
|
138
138
|
default: p(() => [
|
|
139
|
-
|
|
139
|
+
t.validationMessage ? (n(), u("div", Ee, [
|
|
140
140
|
l[0] || (l[0] = d("svg", {
|
|
141
141
|
xmlns: "http://www.w3.org/2000/svg",
|
|
142
142
|
viewBox: "0 0 256 256",
|
|
@@ -147,7 +147,7 @@ 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
|
-
L(" " + w(
|
|
150
|
+
L(" " + w(t.validationMessage), 1)
|
|
151
151
|
])) : _("", !0)
|
|
152
152
|
]),
|
|
153
153
|
_: 1
|
|
@@ -158,7 +158,7 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
158
158
|
}), Le = /* @__PURE__ */ v({
|
|
159
159
|
inheritAttrs: !1,
|
|
160
160
|
__name: "combobox",
|
|
161
|
-
props: /* @__PURE__ */
|
|
161
|
+
props: /* @__PURE__ */ C({
|
|
162
162
|
id: {},
|
|
163
163
|
labelPosition: {},
|
|
164
164
|
hint: {},
|
|
@@ -180,19 +180,19 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
180
180
|
}),
|
|
181
181
|
emits: ["update:modelValue"],
|
|
182
182
|
setup(s) {
|
|
183
|
-
const e = s,
|
|
184
|
-
return (
|
|
183
|
+
const e = s, a = B(s, "modelValue"), o = e.id || q();
|
|
184
|
+
return (t, l) => (n(), f(U, V(e, {
|
|
185
185
|
labelFor: r(o),
|
|
186
|
-
class:
|
|
186
|
+
class: t.$attrs.class
|
|
187
187
|
}), {
|
|
188
188
|
default: p(() => [
|
|
189
|
-
M(r(oe),
|
|
189
|
+
M(r(oe), V({ ...t.$attrs, class: void 0 }, {
|
|
190
190
|
id: r(o),
|
|
191
|
-
modelValue:
|
|
192
|
-
"onUpdate:modelValue": l[0] || (l[0] = (i) =>
|
|
191
|
+
modelValue: a.value,
|
|
192
|
+
"onUpdate:modelValue": l[0] || (l[0] = (i) => a.value = i)
|
|
193
193
|
}), {
|
|
194
194
|
default: p(() => [
|
|
195
|
-
h(
|
|
195
|
+
h(t.$slots, "default")
|
|
196
196
|
]),
|
|
197
197
|
_: 3
|
|
198
198
|
}, 16, ["id", "modelValue"])
|
|
@@ -203,7 +203,7 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
203
203
|
}), wo = /* @__PURE__ */ v({
|
|
204
204
|
__name: "comboboxInput",
|
|
205
205
|
setup(s) {
|
|
206
|
-
return (e,
|
|
206
|
+
return (e, a) => (n(), f(r(te), { class: "dai-form-control__input-group__control" }, {
|
|
207
207
|
default: p(() => [
|
|
208
208
|
h(e.$slots, "default")
|
|
209
209
|
]),
|
|
@@ -219,19 +219,19 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
219
219
|
placeholder: {}
|
|
220
220
|
},
|
|
221
221
|
setup(s) {
|
|
222
|
-
const e =
|
|
222
|
+
const e = fe(ae);
|
|
223
223
|
if (!e)
|
|
224
224
|
throw new Error("Combobox injectable context is not provided");
|
|
225
|
-
const
|
|
225
|
+
const a = $(() => ({
|
|
226
226
|
onclick: () => e.open({ focus: !0 }),
|
|
227
227
|
...e.activatorAttrs.value
|
|
228
228
|
}));
|
|
229
|
-
return (o,
|
|
229
|
+
return (o, t) => (n(), u("button", V(a.value, { class: "dai-form-control__input-group__control dai-combobox-btn" }), [
|
|
230
230
|
h(o.$slots, "default", {}, () => [
|
|
231
231
|
r(e).displayValue.value ? (n(), u(j, { key: 1 }, [
|
|
232
232
|
L(w(r(e).displayValue), 1)
|
|
233
233
|
], 64)) : (n(), u("span", qe, w(o.placeholder || "Select..."), 1)),
|
|
234
|
-
|
|
234
|
+
t[0] || (t[0] = d("svg", {
|
|
235
235
|
class: "dai-combobox-btn__chevron",
|
|
236
236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
237
237
|
viewBox: "0 0 16 16"
|
|
@@ -249,7 +249,7 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
249
249
|
}), Pe = /* @__PURE__ */ v({
|
|
250
250
|
__name: "comboboxOptions",
|
|
251
251
|
setup(s) {
|
|
252
|
-
return (e,
|
|
252
|
+
return (e, a) => (n(), f(A, {
|
|
253
253
|
"enter-from-class": "dai-combobox-options--anim",
|
|
254
254
|
"leave-to-class": "dai-combobox-options--anim"
|
|
255
255
|
}, {
|
|
@@ -275,16 +275,16 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
275
275
|
value: {}
|
|
276
276
|
},
|
|
277
277
|
setup(s) {
|
|
278
|
-
return (e,
|
|
278
|
+
return (e, a) => (n(), f(r(ie), {
|
|
279
279
|
value: e.value,
|
|
280
280
|
class: "dai-combobox-option"
|
|
281
281
|
}, {
|
|
282
|
-
default: p(({ isActive: o, isSelected:
|
|
282
|
+
default: p(({ isActive: o, isSelected: t }) => [
|
|
283
283
|
h(e.$slots, "default", {
|
|
284
284
|
isActive: o,
|
|
285
|
-
isSelected:
|
|
285
|
+
isSelected: t
|
|
286
286
|
}),
|
|
287
|
-
|
|
287
|
+
t ? (n(), u("svg", Ae, [...a[0] || (a[0] = [
|
|
288
288
|
d("path", {
|
|
289
289
|
fill: "currentColor",
|
|
290
290
|
"fill-rule": "evenodd",
|
|
@@ -297,10 +297,10 @@ const Be = { class: "dai-label" }, O = /* @__PURE__ */ v({
|
|
|
297
297
|
}, 8, ["value"]));
|
|
298
298
|
}
|
|
299
299
|
}), je = (s, e) => {
|
|
300
|
-
const
|
|
301
|
-
for (const [o,
|
|
302
|
-
|
|
303
|
-
return
|
|
300
|
+
const a = s.__vccOpts || s;
|
|
301
|
+
for (const [o, t] of e)
|
|
302
|
+
a[o] = t;
|
|
303
|
+
return a;
|
|
304
304
|
}, Fe = {}, Se = {
|
|
305
305
|
type: "button",
|
|
306
306
|
class: "dai-form-control__input-group__addon dai-form-control__input-group__addon--btn",
|
|
@@ -312,7 +312,7 @@ function Oe(s, e) {
|
|
|
312
312
|
h(s.$slots, "default")
|
|
313
313
|
]);
|
|
314
314
|
}
|
|
315
|
-
const R = /* @__PURE__ */ je(Fe, [["render", Oe]]),
|
|
315
|
+
const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ue = ["id", "type", "pattern", "title", "autocomplete", "value"], Ne = {
|
|
316
316
|
key: 0,
|
|
317
317
|
xmlns: "http://www.w3.org/2000/svg",
|
|
318
318
|
fill: "none",
|
|
@@ -327,7 +327,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
327
327
|
}, ko = /* @__PURE__ */ v({
|
|
328
328
|
inheritAttrs: !1,
|
|
329
329
|
__name: "input",
|
|
330
|
-
props: /* @__PURE__ */
|
|
330
|
+
props: /* @__PURE__ */ C({
|
|
331
331
|
id: {},
|
|
332
332
|
type: { default: "text" },
|
|
333
333
|
mask: {},
|
|
@@ -359,7 +359,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
359
359
|
}),
|
|
360
360
|
emits: ["update:modelValue", "update:files"],
|
|
361
361
|
setup(s) {
|
|
362
|
-
const e = s,
|
|
362
|
+
const e = s, a = e.id || q(), o = $(() => typeof e.autocomplete == "string" ? e.autocomplete : e.autocomplete ? "on" : "off"), t = B(s, "modelValue"), l = B(s, "files", {
|
|
363
363
|
set(k) {
|
|
364
364
|
return i.value && (i.value.files = k), k;
|
|
365
365
|
}
|
|
@@ -367,71 +367,71 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
367
367
|
i,
|
|
368
368
|
e.validators,
|
|
369
369
|
e.showValidationError
|
|
370
|
-
),
|
|
371
|
-
P(
|
|
370
|
+
), m = X(!1);
|
|
371
|
+
P(t, () => {
|
|
372
372
|
l.value = i.value?.files || null;
|
|
373
373
|
});
|
|
374
|
-
let
|
|
375
|
-
const K = $(() => e.type === "password" ?
|
|
374
|
+
let z;
|
|
375
|
+
const K = $(() => e.type === "password" ? m.value ? "text" : "password" : e.type), Y = $(() => e.mask ? e.mask : e.type === "tel" ? {
|
|
376
376
|
mask: "{+7} (000) 000-00-00"
|
|
377
377
|
} : e.mask), Q = $(() => e.pattern ? e.pattern : e.type === "tel" ? "^\\+7 \\(9\\d{2}\\) \\d{3}-\\d{2}-\\d{2}" : e.pattern), W = $(() => e.title ? e.title : e.type === "tel" ? "+7 (999) 888-77-66" : e.title);
|
|
378
378
|
function J() {
|
|
379
|
-
|
|
379
|
+
m.value = !m.value;
|
|
380
380
|
}
|
|
381
381
|
function x() {
|
|
382
|
-
|
|
382
|
+
t.value = "";
|
|
383
383
|
}
|
|
384
384
|
function ee(k) {
|
|
385
|
-
if (
|
|
385
|
+
if (z)
|
|
386
386
|
return;
|
|
387
|
-
const { value:
|
|
388
|
-
|
|
387
|
+
const { value: E } = k.target;
|
|
388
|
+
t.value = E;
|
|
389
389
|
}
|
|
390
390
|
return F(() => {
|
|
391
391
|
Y.value && import("./chunks/index.W-qQIppj.js").then((k) => {
|
|
392
|
-
|
|
392
|
+
z = k.default(
|
|
393
393
|
i.value,
|
|
394
394
|
Y.value
|
|
395
|
-
),
|
|
396
|
-
|
|
395
|
+
), z.on("accept", () => {
|
|
396
|
+
t.value = z.value;
|
|
397
397
|
});
|
|
398
398
|
});
|
|
399
|
-
}), (k,
|
|
400
|
-
"label-for": r(
|
|
399
|
+
}), (k, E) => (n(), f(U, V(e, {
|
|
400
|
+
"label-for": r(a),
|
|
401
401
|
"validation-message": k.showValidationError ? "" : r(c),
|
|
402
402
|
invalid: e.invalid || !r(y),
|
|
403
403
|
class: k.$attrs.class
|
|
404
404
|
}), {
|
|
405
405
|
default: p(() => [
|
|
406
406
|
h(k.$slots, "prepend"),
|
|
407
|
-
d("input",
|
|
407
|
+
d("input", V({
|
|
408
408
|
ref_key: "formElement",
|
|
409
409
|
ref: i
|
|
410
410
|
}, { ...k.$attrs, class: void 0 }, {
|
|
411
|
-
id: r(
|
|
411
|
+
id: r(a),
|
|
412
412
|
type: K.value,
|
|
413
413
|
pattern: Q.value,
|
|
414
414
|
title: W.value,
|
|
415
415
|
autocomplete: o.value,
|
|
416
|
-
value:
|
|
416
|
+
value: t.value,
|
|
417
417
|
onInputPassive: ee,
|
|
418
|
-
onKeyupPassive:
|
|
418
|
+
onKeyupPassive: E[0] || (E[0] = (bo) => !r(y) && r(b)()),
|
|
419
419
|
class: "dai-form-control__input-group__control dai-form-control__input"
|
|
420
|
-
}), null, 16,
|
|
420
|
+
}), null, 16, Ue),
|
|
421
421
|
h(k.$slots, "append"),
|
|
422
|
-
e.type === "password" &&
|
|
422
|
+
e.type === "password" && t.value ? (n(), f(R, {
|
|
423
423
|
key: 0,
|
|
424
424
|
onClick: J
|
|
425
425
|
}, {
|
|
426
426
|
default: p(() => [
|
|
427
|
-
|
|
427
|
+
m.value ? (n(), u("svg", Xe, [...E[2] || (E[2] = [
|
|
428
428
|
d("path", {
|
|
429
429
|
"stroke-linecap": "round",
|
|
430
430
|
"stroke-linejoin": "round",
|
|
431
431
|
"stroke-width": "2",
|
|
432
432
|
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
433
|
}, null, -1)
|
|
434
|
-
])])) : (n(), u("svg",
|
|
434
|
+
])])) : (n(), u("svg", Ne, [...E[1] || (E[1] = [
|
|
435
435
|
d("path", {
|
|
436
436
|
"stroke-linecap": "round",
|
|
437
437
|
"stroke-linejoin": "round",
|
|
@@ -448,11 +448,11 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
448
448
|
]),
|
|
449
449
|
_: 1
|
|
450
450
|
})) : _("", !0),
|
|
451
|
-
k.clearable &&
|
|
451
|
+
k.clearable && t.value && !e.disabled ? (n(), f(R, {
|
|
452
452
|
key: 1,
|
|
453
453
|
onClick: x
|
|
454
454
|
}, {
|
|
455
|
-
default: p(() => [...
|
|
455
|
+
default: p(() => [...E[3] || (E[3] = [
|
|
456
456
|
d("svg", {
|
|
457
457
|
xmlns: "http://www.w3.org/2000/svg",
|
|
458
458
|
fill: "none",
|
|
@@ -476,7 +476,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
476
476
|
}), De = ["id"], He = ["value"], $o = /* @__PURE__ */ v({
|
|
477
477
|
inheritAttrs: !1,
|
|
478
478
|
__name: "select",
|
|
479
|
-
props: /* @__PURE__ */
|
|
479
|
+
props: /* @__PURE__ */ C({
|
|
480
480
|
id: {},
|
|
481
481
|
options: {},
|
|
482
482
|
optionText: { default: "text" },
|
|
@@ -503,31 +503,31 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
503
503
|
}),
|
|
504
504
|
emits: ["update:modelValue"],
|
|
505
505
|
setup(s) {
|
|
506
|
-
const e = s,
|
|
507
|
-
|
|
506
|
+
const e = s, a = e.id || q(), o = B(s, "modelValue"), t = T("formElement"), { isValid: l, validationMessage: i, validate: y } = I(
|
|
507
|
+
t,
|
|
508
508
|
e.validators,
|
|
509
509
|
e.showValidationError
|
|
510
510
|
);
|
|
511
|
-
return (c, b) => (n(),
|
|
512
|
-
"label-for": r(
|
|
511
|
+
return (c, b) => (n(), f(U, V(e, {
|
|
512
|
+
"label-for": r(a),
|
|
513
513
|
"validation-message": c.showValidationError ? "" : r(i),
|
|
514
514
|
invalid: e.invalid || !r(l),
|
|
515
515
|
class: c.$attrs.class
|
|
516
516
|
}), {
|
|
517
517
|
default: p(() => [
|
|
518
|
-
S(d("select",
|
|
518
|
+
S(d("select", V({
|
|
519
519
|
ref_key: "formElement",
|
|
520
|
-
ref:
|
|
520
|
+
ref: t
|
|
521
521
|
}, { ...c.$attrs, class: void 0 }, {
|
|
522
|
-
id: r(
|
|
523
|
-
"onUpdate:modelValue": b[0] || (b[0] = (
|
|
522
|
+
id: r(a),
|
|
523
|
+
"onUpdate:modelValue": b[0] || (b[0] = (m) => o.value = m),
|
|
524
524
|
class: "dai-form-control__input-group__control dai-select"
|
|
525
525
|
}), [
|
|
526
526
|
h(c.$slots, "default", {}, () => [
|
|
527
|
-
(n(!0), u(j, null, D(c.options, (
|
|
528
|
-
value:
|
|
529
|
-
key:
|
|
530
|
-
}, w(
|
|
527
|
+
(n(!0), u(j, null, D(c.options, (m) => (n(), u("option", {
|
|
528
|
+
value: m[c.optionValue],
|
|
529
|
+
key: m[c.optionValue]
|
|
530
|
+
}, w(m[c.optionText]), 9, He))), 128))
|
|
531
531
|
])
|
|
532
532
|
], 16, De), [
|
|
533
533
|
[ve, o.value]
|
|
@@ -550,7 +550,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
550
550
|
}
|
|
551
551
|
}), Bo = /* @__PURE__ */ v({
|
|
552
552
|
__name: "selectbox",
|
|
553
|
-
props: {
|
|
553
|
+
props: /* @__PURE__ */ C({
|
|
554
554
|
options: {},
|
|
555
555
|
optionText: { default: "text" },
|
|
556
556
|
optionValue: { default: "value" },
|
|
@@ -570,22 +570,28 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
570
570
|
rounded: { type: Boolean },
|
|
571
571
|
disabled: { type: Boolean },
|
|
572
572
|
invalid: { type: Boolean }
|
|
573
|
-
},
|
|
573
|
+
}, {
|
|
574
|
+
modelValue: {},
|
|
575
|
+
modelModifiers: {}
|
|
576
|
+
}),
|
|
577
|
+
emits: ["update:modelValue"],
|
|
574
578
|
setup(s) {
|
|
575
|
-
const e = s;
|
|
576
|
-
return (
|
|
577
|
-
displayValue: (
|
|
579
|
+
const e = s, a = B(s, "modelValue");
|
|
580
|
+
return (o, t) => (n(), f(r(Le), V(e, {
|
|
581
|
+
displayValue: (l) => o.options.find((i) => i[o.optionValue] === l)?.[o.optionText] || "",
|
|
582
|
+
modelValue: a.value,
|
|
583
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => a.value = l)
|
|
578
584
|
}), {
|
|
579
585
|
default: p(() => [
|
|
580
|
-
M(r(Te), { placeholder:
|
|
586
|
+
M(r(Te), { placeholder: o.placeholder }, null, 8, ["placeholder"]),
|
|
581
587
|
M(r(Pe), null, {
|
|
582
588
|
default: p(() => [
|
|
583
|
-
(n(!0), u(j, null, D(
|
|
584
|
-
key:
|
|
585
|
-
value:
|
|
589
|
+
(n(!0), u(j, null, D(o.options, (l) => (n(), f(r(Ie), {
|
|
590
|
+
key: l[o.optionValue],
|
|
591
|
+
value: l[o.optionValue]
|
|
586
592
|
}, {
|
|
587
593
|
default: p(() => [
|
|
588
|
-
L(w(
|
|
594
|
+
L(w(l[o.optionText]), 1)
|
|
589
595
|
]),
|
|
590
596
|
_: 2
|
|
591
597
|
}, 1032, ["value"]))), 128))
|
|
@@ -594,12 +600,12 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
594
600
|
})
|
|
595
601
|
]),
|
|
596
602
|
_: 1
|
|
597
|
-
}, 16, ["displayValue"]));
|
|
603
|
+
}, 16, ["displayValue", "modelValue"]));
|
|
598
604
|
}
|
|
599
605
|
}), Ye = ["id"], Vo = /* @__PURE__ */ v({
|
|
600
606
|
inheritAttrs: !1,
|
|
601
607
|
__name: "textarea",
|
|
602
|
-
props: /* @__PURE__ */
|
|
608
|
+
props: /* @__PURE__ */ C({
|
|
603
609
|
id: {},
|
|
604
610
|
autosize: { type: Boolean },
|
|
605
611
|
validators: {},
|
|
@@ -610,30 +616,30 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
610
616
|
}),
|
|
611
617
|
emits: ["update:modelValue"],
|
|
612
618
|
setup(s) {
|
|
613
|
-
const e = s,
|
|
614
|
-
|
|
619
|
+
const e = s, a = e.id || q(), o = B(s, "modelValue"), t = T("formElement"), { isValid: l, validationMessage: i, validate: y } = I(
|
|
620
|
+
t,
|
|
615
621
|
e.validators,
|
|
616
622
|
e.showValidationError
|
|
617
623
|
);
|
|
618
624
|
function c() {
|
|
619
625
|
if (!e.autosize) return;
|
|
620
|
-
const b =
|
|
621
|
-
b.style.height = "auto", b.style.height = `${b.scrollHeight +
|
|
626
|
+
const b = t.value, m = b.offsetHeight - b.clientHeight;
|
|
627
|
+
b.style.height = "auto", b.style.height = `${b.scrollHeight + m}px`;
|
|
622
628
|
}
|
|
623
|
-
return F(c), (b,
|
|
624
|
-
"label-for": r(
|
|
629
|
+
return F(c), (b, m) => (n(), f(U, V(e, {
|
|
630
|
+
"label-for": r(a),
|
|
625
631
|
"validation-message": b.showValidationError ? "" : r(i),
|
|
626
632
|
invalid: !r(l),
|
|
627
633
|
class: b.$attrs.class
|
|
628
634
|
}), {
|
|
629
635
|
default: p(() => [
|
|
630
|
-
S(d("textarea",
|
|
636
|
+
S(d("textarea", V({
|
|
631
637
|
ref_key: "formElement",
|
|
632
|
-
ref:
|
|
638
|
+
ref: t
|
|
633
639
|
}, { ...b.$attrs, class: void 0 }, {
|
|
634
|
-
id: r(
|
|
635
|
-
"onUpdate:modelValue":
|
|
636
|
-
onKeyupPassive:
|
|
640
|
+
id: r(a),
|
|
641
|
+
"onUpdate:modelValue": m[0] || (m[0] = (z) => o.value = z),
|
|
642
|
+
onKeyupPassive: m[1] || (m[1] = (z) => !r(l) && r(y)()),
|
|
637
643
|
onInputPassive: c,
|
|
638
644
|
class: ["form-control__textarea", {
|
|
639
645
|
"form-control__textarea--autosize": b.autosize
|
|
@@ -648,7 +654,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
648
654
|
}), Re = ["id"], Mo = /* @__PURE__ */ v({
|
|
649
655
|
inheritAttrs: !1,
|
|
650
656
|
__name: "checkbox",
|
|
651
|
-
props: /* @__PURE__ */
|
|
657
|
+
props: /* @__PURE__ */ C({
|
|
652
658
|
color: { default: "primary" },
|
|
653
659
|
validators: {},
|
|
654
660
|
showValidationError: { type: Boolean, default: !0 },
|
|
@@ -660,18 +666,18 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
660
666
|
}),
|
|
661
667
|
emits: ["update:modelValue"],
|
|
662
668
|
setup(s) {
|
|
663
|
-
const e = s,
|
|
664
|
-
|
|
669
|
+
const e = s, a = B(s, "modelValue"), o = q(), t = T("formElement"), { isValid: l } = I(
|
|
670
|
+
t,
|
|
665
671
|
e.validators,
|
|
666
672
|
e.showValidationError
|
|
667
673
|
);
|
|
668
674
|
return (i, y) => (n(), u("div", {
|
|
669
675
|
class: g(["dai-checkbox-control", i.$attrs.class])
|
|
670
676
|
}, [
|
|
671
|
-
S(d("input",
|
|
677
|
+
S(d("input", V({
|
|
672
678
|
ref_key: "formElement",
|
|
673
|
-
ref:
|
|
674
|
-
"onUpdate:modelValue": y[0] || (y[0] = (c) =>
|
|
679
|
+
ref: t,
|
|
680
|
+
"onUpdate:modelValue": y[0] || (y[0] = (c) => a.value = c)
|
|
675
681
|
}, { ...i.$attrs, class: "" }, {
|
|
676
682
|
id: r(o),
|
|
677
683
|
type: "checkbox",
|
|
@@ -680,9 +686,9 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
680
686
|
"dai-checkbox--invalid": !r(l)
|
|
681
687
|
}]
|
|
682
688
|
}), null, 16, Re), [
|
|
683
|
-
[_e,
|
|
689
|
+
[_e, a.value]
|
|
684
690
|
]),
|
|
685
|
-
i.label || i.$slots.default ? (n(),
|
|
691
|
+
i.label || i.$slots.default ? (n(), f(O, {
|
|
686
692
|
key: 0,
|
|
687
693
|
for: r(o)
|
|
688
694
|
}, {
|
|
@@ -693,7 +699,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
693
699
|
]),
|
|
694
700
|
_: 3
|
|
695
701
|
}, 8, ["for"])) : _("", !0),
|
|
696
|
-
i.hint || i.$slots.hint ? (n(),
|
|
702
|
+
i.hint || i.$slots.hint ? (n(), f(H, {
|
|
697
703
|
key: 1,
|
|
698
704
|
class: "dai-checkbox-control__hint"
|
|
699
705
|
}, {
|
|
@@ -715,7 +721,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
715
721
|
}, Co = /* @__PURE__ */ v({
|
|
716
722
|
inheritAttrs: !1,
|
|
717
723
|
__name: "radio",
|
|
718
|
-
props: /* @__PURE__ */
|
|
724
|
+
props: /* @__PURE__ */ C({
|
|
719
725
|
value: {},
|
|
720
726
|
color: { default: "primary" },
|
|
721
727
|
validators: {},
|
|
@@ -728,8 +734,8 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
728
734
|
}),
|
|
729
735
|
emits: ["update:modelValue"],
|
|
730
736
|
setup(s) {
|
|
731
|
-
const e = s,
|
|
732
|
-
|
|
737
|
+
const e = s, a = B(s, "modelValue"), o = q(), t = T("formElement"), { isValid: l } = I(
|
|
738
|
+
t,
|
|
733
739
|
e.validators,
|
|
734
740
|
e.showValidationError
|
|
735
741
|
);
|
|
@@ -737,11 +743,11 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
737
743
|
class: g(["flex items-start gap-3", i.$attrs.class])
|
|
738
744
|
}, [
|
|
739
745
|
d("div", Ze, [
|
|
740
|
-
S(d("input",
|
|
746
|
+
S(d("input", V({
|
|
741
747
|
type: "radio",
|
|
742
748
|
ref_key: "formElement",
|
|
743
|
-
ref:
|
|
744
|
-
"onUpdate:modelValue": y[0] || (y[0] = (c) =>
|
|
749
|
+
ref: t,
|
|
750
|
+
"onUpdate:modelValue": y[0] || (y[0] = (c) => a.value = c)
|
|
745
751
|
}, { ...i.$attrs, class: "" }, {
|
|
746
752
|
value: i.value,
|
|
747
753
|
id: r(o),
|
|
@@ -750,7 +756,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
750
756
|
"radio--invalid": !r(l)
|
|
751
757
|
}]
|
|
752
758
|
}), null, 16, Ge), [
|
|
753
|
-
[be,
|
|
759
|
+
[be, a.value]
|
|
754
760
|
])
|
|
755
761
|
]),
|
|
756
762
|
i.label ? (n(), u("div", Ke, [
|
|
@@ -764,7 +770,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
764
770
|
}
|
|
765
771
|
}), Je = { class: "dai-switch-control" }, xe = ["id", "aria-checked"], zo = /* @__PURE__ */ v({
|
|
766
772
|
__name: "switch",
|
|
767
|
-
props: /* @__PURE__ */
|
|
773
|
+
props: /* @__PURE__ */ C({
|
|
768
774
|
label: {},
|
|
769
775
|
hint: {}
|
|
770
776
|
}, {
|
|
@@ -773,25 +779,25 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
773
779
|
}),
|
|
774
780
|
emits: ["update:modelValue"],
|
|
775
781
|
setup(s) {
|
|
776
|
-
const e =
|
|
777
|
-
return (o,
|
|
782
|
+
const e = B(s, "modelValue"), a = q();
|
|
783
|
+
return (o, t) => (n(), u("div", Je, [
|
|
778
784
|
d("button", {
|
|
779
|
-
onClick:
|
|
780
|
-
id: r(
|
|
785
|
+
onClick: t[0] || (t[0] = (l) => e.value = !e.value),
|
|
786
|
+
id: r(a),
|
|
781
787
|
"aria-checked": e.value,
|
|
782
788
|
role: "switch",
|
|
783
789
|
type: "button",
|
|
784
790
|
tabindex: "0",
|
|
785
791
|
class: g(["dai-switch", [e.value ? "dai-switch--on" : "dai-switch--off"]])
|
|
786
|
-
}, [...
|
|
792
|
+
}, [...t[1] || (t[1] = [
|
|
787
793
|
d("div", {
|
|
788
794
|
"aria-hidden": "true",
|
|
789
795
|
class: "dai-switch__thumb"
|
|
790
796
|
}, null, -1)
|
|
791
797
|
])], 10, xe),
|
|
792
|
-
o.label || o.$slots.default ? (n(),
|
|
798
|
+
o.label || o.$slots.default ? (n(), f(O, {
|
|
793
799
|
key: 0,
|
|
794
|
-
for: r(
|
|
800
|
+
for: r(a)
|
|
795
801
|
}, {
|
|
796
802
|
default: p(() => [
|
|
797
803
|
h(o.$slots, "default", {}, () => [
|
|
@@ -800,7 +806,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
800
806
|
]),
|
|
801
807
|
_: 3
|
|
802
808
|
}, 8, ["for"])) : _("", !0),
|
|
803
|
-
o.hint || o.$slots.hint ? (n(),
|
|
809
|
+
o.hint || o.$slots.hint ? (n(), f(H, {
|
|
804
810
|
key: 1,
|
|
805
811
|
class: "dai-switch-control__hint"
|
|
806
812
|
}, {
|
|
@@ -838,9 +844,9 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
838
844
|
condensed: { type: Boolean }
|
|
839
845
|
},
|
|
840
846
|
setup(s) {
|
|
841
|
-
const e = s,
|
|
842
|
-
return (l, i) => (n(),
|
|
843
|
-
type: l.href ? void 0 :
|
|
847
|
+
const e = s, a = $(() => e.submit ? "submit" : e.reset ? "reset" : "button"), o = $(() => e.variant ? e.variant : e.plain ? "plain" : e.muted ? "muted" : e.outlined ? "outlined" : "flat"), t = $(() => e.size ? e.size : e.sm ? "small" : e.lg ? "large" : "medium");
|
|
848
|
+
return (l, i) => (n(), f(ye(l.href ? "a" : "button"), {
|
|
849
|
+
type: l.href ? void 0 : a.value,
|
|
844
850
|
form: typeof l.submit == "string" ? l.submit : void 0,
|
|
845
851
|
href: l.href,
|
|
846
852
|
class: g(["dai-btn", {
|
|
@@ -849,8 +855,8 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
849
855
|
"dai-btn--plain": o.value === "plain",
|
|
850
856
|
"dai-btn--muted": o.value === "muted",
|
|
851
857
|
"dai-btn--outlined": o.value === "outlined",
|
|
852
|
-
"dai-btn--sm":
|
|
853
|
-
"dai-btn--lg":
|
|
858
|
+
"dai-btn--sm": t.value === "small",
|
|
859
|
+
"dai-btn--lg": t.value === "large",
|
|
854
860
|
"dai-btn--loading": l.loading,
|
|
855
861
|
"dai-btn--block": l.block,
|
|
856
862
|
"dai-btn--rounded": l.rounded,
|
|
@@ -897,7 +903,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
897
903
|
}), Lo = /* @__PURE__ */ v({
|
|
898
904
|
__name: "popoverDialog",
|
|
899
905
|
setup(s) {
|
|
900
|
-
return (e,
|
|
906
|
+
return (e, a) => (n(), f(A, {
|
|
901
907
|
"enter-from-class": "dai-popover-dialog--anim",
|
|
902
908
|
"leave-to-class": "dai-popover-dialog--anim"
|
|
903
909
|
}, {
|
|
@@ -915,7 +921,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
915
921
|
}), qo = /* @__PURE__ */ v({
|
|
916
922
|
__name: "menuItems",
|
|
917
923
|
setup(s) {
|
|
918
|
-
return (e,
|
|
924
|
+
return (e, a) => (n(), f(A, {
|
|
919
925
|
"enter-from-class": "dai-menu-items--anim",
|
|
920
926
|
"leave-to-class": "dai-menu-items--anim"
|
|
921
927
|
}, {
|
|
@@ -939,8 +945,8 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
939
945
|
icon: {}
|
|
940
946
|
},
|
|
941
947
|
setup(s) {
|
|
942
|
-
return (e,
|
|
943
|
-
default: p(({ isActive: o, isSelected:
|
|
948
|
+
return (e, a) => (n(), f(r(re), { class: "dai-menu-item" }, {
|
|
949
|
+
default: p(({ isActive: o, isSelected: t }) => [
|
|
944
950
|
e.icon ? (n(), u("div", to, [
|
|
945
951
|
d("div", {
|
|
946
952
|
class: g(["h-5 w-5", e.icon])
|
|
@@ -948,7 +954,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
948
954
|
])) : _("", !0),
|
|
949
955
|
h(e.$slots, "default", {
|
|
950
956
|
isActive: o,
|
|
951
|
-
isSelected:
|
|
957
|
+
isSelected: t
|
|
952
958
|
})
|
|
953
959
|
]),
|
|
954
960
|
_: 3
|
|
@@ -962,7 +968,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
962
968
|
value: {}
|
|
963
969
|
},
|
|
964
970
|
setup(s) {
|
|
965
|
-
return (e,
|
|
971
|
+
return (e, a) => (n(), f(r(de), {
|
|
966
972
|
id: e.id,
|
|
967
973
|
"aria-controls": e.ariaControls,
|
|
968
974
|
value: e.value,
|
|
@@ -977,30 +983,30 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
977
983
|
}), Ao = /* @__PURE__ */ v({
|
|
978
984
|
__name: "tabList",
|
|
979
985
|
setup(s) {
|
|
980
|
-
const e = T("tablist"),
|
|
981
|
-
function
|
|
982
|
-
if (!
|
|
986
|
+
const e = T("tablist"), a = T("slider"), o = X({});
|
|
987
|
+
function t() {
|
|
988
|
+
if (!a.value) return;
|
|
983
989
|
const l = e.value?.$el;
|
|
984
990
|
if (!l) return;
|
|
985
991
|
const i = l.querySelector("[aria-selected=true]");
|
|
986
992
|
i && (o.value = {
|
|
987
993
|
left: `${i.offsetLeft}px`,
|
|
988
994
|
right: `${l.offsetWidth - i.offsetLeft - i.offsetWidth}px`,
|
|
989
|
-
transition:
|
|
995
|
+
transition: a.value.offsetLeft > i.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
|
|
990
996
|
});
|
|
991
997
|
}
|
|
992
|
-
return F(() => ge(
|
|
998
|
+
return F(() => ge(t)), (l, i) => (n(), f(r(ue), {
|
|
993
999
|
ref_key: "tablist",
|
|
994
1000
|
ref: e,
|
|
995
|
-
onClickPassive:
|
|
1001
|
+
onClickPassive: t,
|
|
996
1002
|
class: "dai-tab-list"
|
|
997
1003
|
}, {
|
|
998
1004
|
default: p(() => [
|
|
999
1005
|
d("div", {
|
|
1000
1006
|
ref_key: "slider",
|
|
1001
|
-
ref:
|
|
1007
|
+
ref: a,
|
|
1002
1008
|
class: "dai-tab-list__slider",
|
|
1003
|
-
style:
|
|
1009
|
+
style: N(o.value)
|
|
1004
1010
|
}, null, 4),
|
|
1005
1011
|
h(l.$slots, "default")
|
|
1006
1012
|
]),
|
|
@@ -1010,7 +1016,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1010
1016
|
}), ao = ["id"], Io = /* @__PURE__ */ v({
|
|
1011
1017
|
inheritAttrs: !1,
|
|
1012
1018
|
__name: "offcanvas",
|
|
1013
|
-
props: /* @__PURE__ */
|
|
1019
|
+
props: /* @__PURE__ */ C({
|
|
1014
1020
|
id: {},
|
|
1015
1021
|
position: { default: "right" },
|
|
1016
1022
|
push: { type: Boolean },
|
|
@@ -1023,21 +1029,21 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1023
1029
|
}),
|
|
1024
1030
|
emits: ["update:modelValue"],
|
|
1025
1031
|
setup(s) {
|
|
1026
|
-
const e = s,
|
|
1027
|
-
P(
|
|
1028
|
-
if (!e.push || (
|
|
1032
|
+
const e = s, a = B(s, "modelValue"), o = e.id ?? q(), { classList: t } = $e(document.body, "nui-body-push");
|
|
1033
|
+
P(a, () => {
|
|
1034
|
+
if (!e.push || (t.splice(1), !a.value))
|
|
1029
1035
|
return;
|
|
1030
1036
|
let i = "nui-body-push--" + e.position;
|
|
1031
|
-
e.lg && (i += "--lg"), e.xl && (i += "--xl"),
|
|
1037
|
+
e.lg && (i += "--lg"), e.xl && (i += "--xl"), t.push(i);
|
|
1032
1038
|
});
|
|
1033
1039
|
function l(i) {
|
|
1034
|
-
i.target.closest(`#${o}`) || e.closeOnOutsideClick && (
|
|
1040
|
+
i.target.closest(`#${o}`) || e.closeOnOutsideClick && (a.value = !1);
|
|
1035
1041
|
}
|
|
1036
1042
|
return F(() => {
|
|
1037
1043
|
window.addEventListener("click", l, { passive: !0 });
|
|
1038
1044
|
}), Z(() => {
|
|
1039
1045
|
window.removeEventListener("click", l);
|
|
1040
|
-
}), (i, y) => (n(),
|
|
1046
|
+
}), (i, y) => (n(), f(G, { to: "body" }, [
|
|
1041
1047
|
M(A, {
|
|
1042
1048
|
appear: "",
|
|
1043
1049
|
"enter-from-class": "nui-offcanvas--animate-hidden",
|
|
@@ -1048,7 +1054,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1048
1054
|
"leave-active-class": "ease-in-out"
|
|
1049
1055
|
}, {
|
|
1050
1056
|
default: p(() => [
|
|
1051
|
-
|
|
1057
|
+
a.value ? (n(), u("div", V({
|
|
1052
1058
|
key: 0,
|
|
1053
1059
|
id: r(o)
|
|
1054
1060
|
}, i.$attrs, {
|
|
@@ -1101,9 +1107,9 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1101
1107
|
}, co = { class: "dai-notification__content" }, po = {
|
|
1102
1108
|
key: 0,
|
|
1103
1109
|
class: "dai-notification__content__detail"
|
|
1104
|
-
},
|
|
1110
|
+
}, mo = /* @__PURE__ */ v({
|
|
1105
1111
|
__name: "notification",
|
|
1106
|
-
props: /* @__PURE__ */
|
|
1112
|
+
props: /* @__PURE__ */ C({
|
|
1107
1113
|
color: {},
|
|
1108
1114
|
icon: {},
|
|
1109
1115
|
message: {},
|
|
@@ -1116,12 +1122,12 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1116
1122
|
}),
|
|
1117
1123
|
emits: ["update:modelValue"],
|
|
1118
1124
|
setup(s) {
|
|
1119
|
-
const e = s,
|
|
1125
|
+
const e = s, a = B(s, "modelValue");
|
|
1120
1126
|
let o;
|
|
1121
|
-
function
|
|
1122
|
-
clearTimeout(o),
|
|
1127
|
+
function t() {
|
|
1128
|
+
clearTimeout(o), a.value && e.timeout && (o = setTimeout(() => a.value = !1, e.timeout));
|
|
1123
1129
|
}
|
|
1124
|
-
return P(
|
|
1130
|
+
return P(a, t, { immediate: !0 }), (l, i) => a.value ? (n(), u("div", lo, [
|
|
1125
1131
|
d("div", {
|
|
1126
1132
|
class: g(["dai-notification", [`dai-notification--${l.color || "secondary"}`]])
|
|
1127
1133
|
}, [
|
|
@@ -1143,7 +1149,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1143
1149
|
]),
|
|
1144
1150
|
l.dismissible ? (n(), u("div", {
|
|
1145
1151
|
key: 1,
|
|
1146
|
-
onClick: i[0] || (i[0] = (y) =>
|
|
1152
|
+
onClick: i[0] || (i[0] = (y) => a.value = !1),
|
|
1147
1153
|
class: "dai-notification__dismiss"
|
|
1148
1154
|
}, [...i[1] || (i[1] = [
|
|
1149
1155
|
d("svg", {
|
|
@@ -1165,7 +1171,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1165
1171
|
}
|
|
1166
1172
|
}), jo = /* @__PURE__ */ v({
|
|
1167
1173
|
__name: "notificationQueue",
|
|
1168
|
-
props: /* @__PURE__ */
|
|
1174
|
+
props: /* @__PURE__ */ C({
|
|
1169
1175
|
length: { default: 3 },
|
|
1170
1176
|
timeout: { default: 4e3 },
|
|
1171
1177
|
position: { default: "fixed" },
|
|
@@ -1177,10 +1183,10 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1177
1183
|
}),
|
|
1178
1184
|
emits: ["update:queue"],
|
|
1179
1185
|
setup(s) {
|
|
1180
|
-
const e = s,
|
|
1181
|
-
let
|
|
1186
|
+
const e = s, a = B(s, "queue"), o = X([]);
|
|
1187
|
+
let t = 0;
|
|
1182
1188
|
function l() {
|
|
1183
|
-
|
|
1189
|
+
a.value.length === 0 || o.value.length >= e.length || (o.value.push({ ...a.value[0], id: t++, show: !0 }), a.value.shift());
|
|
1184
1190
|
}
|
|
1185
1191
|
function i(c) {
|
|
1186
1192
|
setTimeout(() => {
|
|
@@ -1189,7 +1195,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1189
1195
|
), l();
|
|
1190
1196
|
}, 200);
|
|
1191
1197
|
}
|
|
1192
|
-
P(
|
|
1198
|
+
P(a, l, { immediate: !0, deep: !0 });
|
|
1193
1199
|
const y = $(() => {
|
|
1194
1200
|
const c = ["dai-notification-queue__item--anim"];
|
|
1195
1201
|
return e.positionX === "right" ? c.push("dai-notification-queue__item--anim-x-right") : e.positionX === "left" ? c.push("dai-notification-queue__item--anim-x-left") : e.positionX === "center" && e.positionY === "top" ? c.push("dai-notification-queue__item--anim-y-top") : e.positionX === "center" && e.positionY === "bottom" && c.push("dai-notification-queue__item--anim-y-bottom"), c.join(" ");
|
|
@@ -1213,15 +1219,15 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1213
1219
|
"leave-active-class": "dai-notification-queue__item--anim-out"
|
|
1214
1220
|
}, {
|
|
1215
1221
|
default: p(() => [
|
|
1216
|
-
(n(!0), u(j, null, D(o.value, (
|
|
1217
|
-
key:
|
|
1218
|
-
color:
|
|
1219
|
-
icon:
|
|
1220
|
-
message:
|
|
1221
|
-
detail:
|
|
1222
|
-
timeout:
|
|
1223
|
-
modelValue:
|
|
1224
|
-
"onUpdate:modelValue": [(
|
|
1222
|
+
(n(!0), u(j, null, D(o.value, (m) => (n(), f(mo, {
|
|
1223
|
+
key: m.id,
|
|
1224
|
+
color: m.color,
|
|
1225
|
+
icon: m.type,
|
|
1226
|
+
message: m.message,
|
|
1227
|
+
detail: m.detail,
|
|
1228
|
+
timeout: m.timeout ?? c.timeout,
|
|
1229
|
+
modelValue: m.show,
|
|
1230
|
+
"onUpdate:modelValue": [(z) => m.show = z, (z) => i(m.id)],
|
|
1225
1231
|
class: "dai-notification-queue__item"
|
|
1226
1232
|
}, null, 8, ["color", "icon", "message", "detail", "timeout", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
1227
1233
|
]),
|
|
@@ -1229,7 +1235,7 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1229
1235
|
}, 8, ["enter-from-class", "leave-to-class"])
|
|
1230
1236
|
], 2));
|
|
1231
1237
|
}
|
|
1232
|
-
}),
|
|
1238
|
+
}), fo = ["aria-valuenow"], Fo = /* @__PURE__ */ v({
|
|
1233
1239
|
__name: "progressbar",
|
|
1234
1240
|
props: {
|
|
1235
1241
|
value: {},
|
|
@@ -1238,8 +1244,8 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1238
1244
|
rounded: { type: Boolean, default: !0 }
|
|
1239
1245
|
},
|
|
1240
1246
|
setup(s) {
|
|
1241
|
-
const e = s,
|
|
1242
|
-
return (o,
|
|
1247
|
+
const e = s, a = $(() => e.value === void 0);
|
|
1248
|
+
return (o, t) => (n(), u("div", {
|
|
1243
1249
|
class: g(["overflow-hidden text-xs w-full flex-1", {
|
|
1244
1250
|
rounded: o.rounded,
|
|
1245
1251
|
"bg-primary-200": o.color == "primary",
|
|
@@ -1248,24 +1254,24 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1248
1254
|
"bg-warning-200": o.color == "warning",
|
|
1249
1255
|
"bg-danger-200": o.color == "danger"
|
|
1250
1256
|
}]),
|
|
1251
|
-
style:
|
|
1257
|
+
style: N({ height: o.height + "px" }),
|
|
1252
1258
|
role: "progressbar",
|
|
1253
1259
|
"aria-valuemin": "0",
|
|
1254
1260
|
"aria-valuemax": "100",
|
|
1255
1261
|
"aria-valuenow": o.value
|
|
1256
1262
|
}, [
|
|
1257
1263
|
d("div", {
|
|
1258
|
-
style:
|
|
1264
|
+
style: N(`width:${o.value}%`),
|
|
1259
1265
|
class: g([{
|
|
1260
1266
|
"bg-primary-500": o.color == "primary",
|
|
1261
1267
|
"bg-success-500": o.color == "success",
|
|
1262
1268
|
"bg-info-500": o.color == "info",
|
|
1263
1269
|
"bg-warning-500": o.color == "warning",
|
|
1264
1270
|
"bg-danger-500": o.color == "danger",
|
|
1265
|
-
"progress-infinite":
|
|
1271
|
+
"progress-infinite": a.value
|
|
1266
1272
|
}, "h-full shadow-none relative text-center whitespace-nowrap text-white justify-center"])
|
|
1267
1273
|
}, null, 6)
|
|
1268
|
-
], 14,
|
|
1274
|
+
], 14, fo));
|
|
1269
1275
|
}
|
|
1270
1276
|
}), vo = {
|
|
1271
1277
|
key: 0,
|
|
@@ -1279,13 +1285,13 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1279
1285
|
},
|
|
1280
1286
|
emits: ["update:modelValue"],
|
|
1281
1287
|
setup(s) {
|
|
1282
|
-
const e =
|
|
1283
|
-
function
|
|
1288
|
+
const e = B(s, "modelValue");
|
|
1289
|
+
function a() {
|
|
1284
1290
|
e.value = !1;
|
|
1285
1291
|
}
|
|
1286
1292
|
return P(e, (o) => {
|
|
1287
1293
|
o ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
|
|
1288
|
-
}), (o,
|
|
1294
|
+
}), (o, t) => (n(), f(G, { to: "body" }, [
|
|
1289
1295
|
M(A, {
|
|
1290
1296
|
appear: "",
|
|
1291
1297
|
name: "modal",
|
|
@@ -1293,17 +1299,17 @@ const R = /* @__PURE__ */ je(Fe, [["render", Oe]]), Ne = ["id", "type", "pattern
|
|
|
1293
1299
|
}, {
|
|
1294
1300
|
default: p(() => [
|
|
1295
1301
|
e.value ? (n(), u("div", vo, [
|
|
1296
|
-
|
|
1302
|
+
t[0] || (t[0] = d("div", {
|
|
1297
1303
|
class: "modal__backdrop fixed inset-0 bg-primary-50/60 backdrop-blur-sm",
|
|
1298
1304
|
"aria-hidden": "true"
|
|
1299
1305
|
}, null, -1)),
|
|
1300
1306
|
d("div", ho, [
|
|
1301
1307
|
d("div", {
|
|
1302
|
-
onClick: ke(
|
|
1308
|
+
onClick: ke(a, ["self"]),
|
|
1303
1309
|
class: "min-h-full flex items-center justify-center p-4 sm:p-6"
|
|
1304
1310
|
}, [
|
|
1305
1311
|
d("div", _o, [
|
|
1306
|
-
h(o.$slots, "default", { close:
|
|
1312
|
+
h(o.$slots, "default", { close: a })
|
|
1307
1313
|
])
|
|
1308
1314
|
])
|
|
1309
1315
|
])
|
|
@@ -1323,11 +1329,11 @@ export {
|
|
|
1323
1329
|
Ie as ComboboxOption,
|
|
1324
1330
|
Pe as ComboboxOptions,
|
|
1325
1331
|
ko as Input,
|
|
1326
|
-
|
|
1332
|
+
No as Menu,
|
|
1327
1333
|
To as MenuItem,
|
|
1328
1334
|
qo as MenuItems,
|
|
1329
1335
|
So as Modal,
|
|
1330
|
-
|
|
1336
|
+
mo as Notification,
|
|
1331
1337
|
jo as NotificationQueue,
|
|
1332
1338
|
Io as Offcanvas,
|
|
1333
1339
|
Xo as Popover,
|
|
@@ -20,9 +20,10 @@ declare const meta: {
|
|
|
20
20
|
}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
21
21
|
attrs: any;
|
|
22
22
|
slots: {};
|
|
23
|
-
emit:
|
|
23
|
+
emit: (evt: "update:modelValue", value: any) => void;
|
|
24
24
|
}, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
25
25
|
props: {
|
|
26
|
+
readonly "onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
26
27
|
options: Array<I>;
|
|
27
28
|
optionText?: keyof I | undefined;
|
|
28
29
|
optionValue?: keyof I | undefined;
|
|
@@ -42,11 +43,12 @@ declare const meta: {
|
|
|
42
43
|
rounded?: boolean | undefined;
|
|
43
44
|
disabled?: boolean | undefined;
|
|
44
45
|
invalid?: boolean | undefined;
|
|
46
|
+
modelValue?: any;
|
|
45
47
|
} & import("vue").PublicProps;
|
|
46
48
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
47
49
|
attrs: any;
|
|
48
50
|
slots: {};
|
|
49
|
-
emit:
|
|
51
|
+
emit: (evt: "update:modelValue", value: any) => void;
|
|
50
52
|
}>) => import("vue").VNode & {
|
|
51
53
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
52
54
|
})>) => {
|
|
@@ -56,9 +58,10 @@ declare const meta: {
|
|
|
56
58
|
}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
57
59
|
attrs: any;
|
|
58
60
|
slots: {};
|
|
59
|
-
emit:
|
|
61
|
+
emit: (evt: "update:modelValue", value: any) => void;
|
|
60
62
|
}, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
61
63
|
props: {
|
|
64
|
+
readonly "onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
62
65
|
options: Array<I>;
|
|
63
66
|
optionText?: keyof I | undefined;
|
|
64
67
|
optionValue?: keyof I | undefined;
|
|
@@ -78,11 +81,12 @@ declare const meta: {
|
|
|
78
81
|
rounded?: boolean | undefined;
|
|
79
82
|
disabled?: boolean | undefined;
|
|
80
83
|
invalid?: boolean | undefined;
|
|
84
|
+
modelValue?: any;
|
|
81
85
|
} & import("vue").PublicProps;
|
|
82
86
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
83
87
|
attrs: any;
|
|
84
88
|
slots: {};
|
|
85
|
-
emit:
|
|
89
|
+
emit: (evt: "update:modelValue", value: any) => void;
|
|
86
90
|
}>) => import("vue").VNode & {
|
|
87
91
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
88
92
|
};
|
|
@@ -93,9 +97,10 @@ declare const meta: {
|
|
|
93
97
|
}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
94
98
|
attrs: any;
|
|
95
99
|
slots: {};
|
|
96
|
-
emit:
|
|
100
|
+
emit: (evt: "update:modelValue", value: any) => void;
|
|
97
101
|
}, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
98
102
|
props: {
|
|
103
|
+
readonly "onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
99
104
|
options: Array<I>;
|
|
100
105
|
optionText?: keyof I | undefined;
|
|
101
106
|
optionValue?: keyof I | undefined;
|
|
@@ -115,11 +120,12 @@ declare const meta: {
|
|
|
115
120
|
rounded?: boolean | undefined;
|
|
116
121
|
disabled?: boolean | undefined;
|
|
117
122
|
invalid?: boolean | undefined;
|
|
123
|
+
modelValue?: any;
|
|
118
124
|
} & import("vue").PublicProps;
|
|
119
125
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
120
126
|
attrs: any;
|
|
121
127
|
slots: {};
|
|
122
|
-
emit:
|
|
128
|
+
emit: (evt: "update:modelValue", value: any) => void;
|
|
123
129
|
}>) => import("vue").VNode & {
|
|
124
130
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
125
131
|
})>;
|
|
@@ -2,16 +2,20 @@ import { IComboboxProps } from "../combobox/combobox.vue";
|
|
|
2
2
|
declare const _default: <I extends {
|
|
3
3
|
[key: string]: any;
|
|
4
4
|
}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
6
|
+
readonly "onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
7
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & ({
|
|
6
8
|
options: Array<I>;
|
|
7
9
|
optionText?: keyof I;
|
|
8
10
|
optionValue?: keyof I;
|
|
9
11
|
placeholder?: string;
|
|
10
|
-
} & IComboboxProps
|
|
12
|
+
} & IComboboxProps & {
|
|
13
|
+
modelValue?: any;
|
|
14
|
+
}) & {}> & import("vue").PublicProps;
|
|
11
15
|
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
12
16
|
attrs: any;
|
|
13
17
|
slots: {};
|
|
14
|
-
emit:
|
|
18
|
+
emit: (evt: "update:modelValue", value: any) => void;
|
|
15
19
|
}>) => import("vue").VNode & {
|
|
16
20
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
17
21
|
};
|