@defaultusr/dai-ui 1.2.7 → 1.2.8
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/assets/btn.css +1 -0
- package/dist/assets/btn2.css +1 -0
- package/dist/assets/checkbox.css +1 -0
- package/dist/assets/combobox.css +1 -0
- package/dist/assets/comboboxButton.css +1 -0
- package/dist/assets/comboboxOption.css +1 -0
- package/dist/assets/comboboxOptions.css +1 -0
- package/dist/assets/formControl.css +1 -0
- package/dist/assets/formControl2.css +1 -0
- package/dist/assets/hint.css +1 -0
- package/dist/assets/input.css +1 -0
- package/dist/assets/inputGroup.css +1 -0
- package/dist/assets/label.css +1 -0
- package/dist/assets/menuItem.css +1 -0
- package/dist/assets/menuItems.css +1 -0
- package/dist/assets/modal.css +1 -0
- package/dist/assets/notification.css +1 -0
- package/dist/assets/notificationQueue.css +1 -0
- package/dist/assets/offcanvas.css +1 -0
- package/dist/assets/popoverDialog.css +1 -0
- package/dist/assets/progressbar.css +1 -0
- package/dist/assets/radio.css +1 -0
- package/dist/assets/select.css +1 -0
- package/dist/assets/styles.css +1 -0
- package/dist/assets/switch.css +1 -0
- package/dist/assets/tab.css +1 -0
- package/dist/assets/tabList.css +1 -0
- package/dist/assets/textarea.css +1 -0
- package/dist/assets/theme.css +0 -0
- package/dist/btn.js +4 -0
- package/dist/btn2.js +21 -0
- package/dist/checkbox.js +4 -0
- package/dist/chunks/btn.vue_vue_type_style_index_0_lang.5BQwBY73.js +86 -0
- package/dist/chunks/checkbox.vue_vue_type_style_index_0_lang.B_oNe5jU.js +90 -0
- package/dist/chunks/combobox.vue_vue_type_style_index_0_lang.BlQL2V7j.js +66 -0
- package/dist/chunks/comboboxButton.vue_vue_type_style_index_0_lang.B2_SbS8t.js +47 -0
- package/dist/chunks/comboboxInput.vue_vue_type_script_setup_true_lang.r8_P3SHy.js +16 -0
- package/dist/chunks/comboboxOption.vue_vue_type_style_index_0_lang.BY-JfDPY.js +38 -0
- package/dist/chunks/comboboxOptions.vue_vue_type_style_index_0_lang.OHgMyOoq.js +24 -0
- package/dist/chunks/formControl.vue_vue_type_style_index_0_lang.BDPmQzJj.js +82 -0
- package/dist/chunks/hint.vue_vue_type_style_index_0_lang.SPjr3dc1.js +17 -0
- package/dist/chunks/input.vue_vue_type_style_index_0_lang.D3fu8I8W.js +169 -0
- package/dist/chunks/inputGroup.vue_vue_type_style_index_0_lang.DSVR29CT.js +42 -0
- package/dist/chunks/label.vue_vue_type_style_index_0_lang.CwYm9LGb.js +17 -0
- package/dist/chunks/menuItem.vue_vue_type_style_index_0_lang._R8jj8CJ.js +30 -0
- package/dist/chunks/menuItems.vue_vue_type_style_index_0_lang.7SUAn0w9.js +24 -0
- package/dist/chunks/modal.vue_vue_type_style_index_0_lang.D0DMfpMl.js +52 -0
- package/dist/chunks/notification.vue_vue_type_style_index_0_lang.RHzcHM7o.js +102 -0
- package/dist/chunks/notificationQueue.vue_vue_type_style_index_0_lang.CewiEx4A.js +72 -0
- package/dist/chunks/offcanvas.vue_vue_type_style_index_0_lang.klTcX-xU.js +65 -0
- package/dist/chunks/popoverDialog.vue_vue_type_style_index_0_lang.C9Gy_hn0.js +24 -0
- package/dist/chunks/progressbar.vue_vue_type_style_index_0_lang.orj5zxpX.js +43 -0
- package/dist/chunks/radio.vue_vue_type_style_index_0_lang.Cb2ovoqT.js +62 -0
- package/dist/chunks/select.vue_vue_type_style_index_0_lang.B6lvc8dR.js +82 -0
- package/dist/chunks/selectbox.vue_vue_type_script_setup_true_lang.CGBGE61U.js +66 -0
- package/dist/chunks/switch.vue_vue_type_style_index_0_lang.B5M6C42g.js +58 -0
- package/dist/chunks/tab.vue_vue_type_style_index_0_lang.O7L_ECaN.js +26 -0
- package/dist/chunks/tabList.vue_vue_type_style_index_0_lang.iu2mVb2k.js +39 -0
- package/dist/chunks/textarea.vue_vue_type_style_index_0_lang.hsJmfBbY.js +56 -0
- package/dist/classList.js +23 -0
- package/dist/combobox.js +4 -0
- package/dist/comboboxButton.js +4 -0
- package/dist/comboboxInput.js +4 -0
- package/dist/comboboxOption.js +4 -0
- package/dist/comboboxOptions.js +4 -0
- package/dist/formControl.js +4 -0
- package/dist/formControl2.js +80 -0
- package/dist/hint.js +4 -0
- package/dist/index.js +30 -0
- package/dist/index2.js +6 -0
- package/dist/index3.js +12 -0
- package/dist/input.js +4 -0
- package/dist/inputGroup.js +4 -0
- package/dist/label.js +4 -0
- package/dist/main.js +57 -1394
- package/dist/menuItem.js +4 -0
- package/dist/menuItems.js +4 -0
- package/dist/modal.js +4 -0
- package/dist/notification.js +4 -0
- package/dist/notificationQueue.js +4 -0
- package/dist/offcanvas.js +4 -0
- package/dist/popoverDialog.js +4 -0
- package/dist/progressbar.js +4 -0
- package/dist/radio.js +4 -0
- package/dist/select.js +4 -0
- package/dist/selectbox.js +4 -0
- package/dist/switch.js +4 -0
- package/dist/tab.js +4 -0
- package/dist/tabList.js +4 -0
- package/dist/textarea.js +4 -0
- package/package.json +1 -1
- package/dist/assets/main.css +0 -1
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as v, computed as r, createElementBlock as s, openBlock as t, normalizeClass as g, createBlock as d, createCommentVNode as o, createElementVNode as l, createVNode as m, normalizeProps as b, guardReactiveProps as y, withCtx as c, renderSlot as B, Transition as h, createTextVNode as x, toDisplayString as z } from "vue";
|
|
2
|
+
import { _ as k } from "./label.vue_vue_type_style_index_0_lang.CwYm9LGb.js";
|
|
3
|
+
import { _ as w } from "./hint.vue_vue_type_style_index_0_lang.SPjr3dc1.js";
|
|
4
|
+
import { _ as C } from "./inputGroup.vue_vue_type_style_index_0_lang.DSVR29CT.js";
|
|
5
|
+
import '../assets/formControl.css';const P = { class: "dai-form-control__container" }, M = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "dai-form-control__validation-message",
|
|
8
|
+
role: "alert"
|
|
9
|
+
}, L = /* @__PURE__ */ v({
|
|
10
|
+
__name: "formControl",
|
|
11
|
+
props: {
|
|
12
|
+
labelPosition: { default: "above" },
|
|
13
|
+
hint: {},
|
|
14
|
+
validationMessage: {},
|
|
15
|
+
lg: { type: Boolean },
|
|
16
|
+
sm: { type: Boolean },
|
|
17
|
+
outlined: { type: Boolean },
|
|
18
|
+
muted: { type: Boolean },
|
|
19
|
+
label: {},
|
|
20
|
+
labelFor: {},
|
|
21
|
+
size: {},
|
|
22
|
+
variant: {},
|
|
23
|
+
rounded: { type: Boolean },
|
|
24
|
+
disabled: { type: Boolean },
|
|
25
|
+
invalid: { type: Boolean }
|
|
26
|
+
},
|
|
27
|
+
setup(e) {
|
|
28
|
+
const a = e, u = r(() => a.variant ? a.variant : a.muted ? "muted" : a.outlined ? "outlined" : "flat"), i = r(() => a.size ? a.size : a.sm ? "small" : a.lg ? "large" : "medium");
|
|
29
|
+
return (f, n) => (t(), s("div", {
|
|
30
|
+
class: g(["dai-form-control", {
|
|
31
|
+
"dai-form-control--label-inline": e.labelPosition === "inline",
|
|
32
|
+
"dai-form-control--invalid": e.invalid,
|
|
33
|
+
"dai-form-control--lg": i.value === "large"
|
|
34
|
+
}])
|
|
35
|
+
}, [
|
|
36
|
+
e.label && e.labelPosition !== "inside" ? (t(), d(k, {
|
|
37
|
+
key: 0,
|
|
38
|
+
for: e.labelFor,
|
|
39
|
+
text: e.label
|
|
40
|
+
}, null, 8, ["for", "text"])) : o("", !0),
|
|
41
|
+
l("div", P, [
|
|
42
|
+
m(C, b(y({
|
|
43
|
+
...a,
|
|
44
|
+
label: e.labelPosition === "inside" ? e.label : void 0,
|
|
45
|
+
variant: u.value,
|
|
46
|
+
size: i.value
|
|
47
|
+
})), {
|
|
48
|
+
default: c(() => [
|
|
49
|
+
B(f.$slots, "default")
|
|
50
|
+
]),
|
|
51
|
+
_: 3
|
|
52
|
+
}, 16),
|
|
53
|
+
e.hint ? (t(), d(w, {
|
|
54
|
+
key: 0,
|
|
55
|
+
text: e.hint,
|
|
56
|
+
class: "dai-form-control__hint"
|
|
57
|
+
}, null, 8, ["text"])) : o("", !0),
|
|
58
|
+
m(h, { name: "dai-form-control__validation-message-transition" }, {
|
|
59
|
+
default: c(() => [
|
|
60
|
+
e.validationMessage ? (t(), s("div", M, [
|
|
61
|
+
n[0] || (n[0] = l("svg", {
|
|
62
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
63
|
+
viewBox: "0 0 256 256",
|
|
64
|
+
class: ""
|
|
65
|
+
}, [
|
|
66
|
+
l("path", {
|
|
67
|
+
fill: "currentColor",
|
|
68
|
+
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"
|
|
69
|
+
})
|
|
70
|
+
], -1)),
|
|
71
|
+
x(" " + z(e.validationMessage), 1)
|
|
72
|
+
])) : o("", !0)
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
})
|
|
76
|
+
])
|
|
77
|
+
], 2));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
L as _
|
|
82
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineComponent as o, createElementBlock as n, openBlock as r, renderSlot as s, createTextVNode as a, toDisplayString as c } from "vue";
|
|
2
|
+
import '../assets/hint.css';const i = { class: "dai-hint" }, _ = /* @__PURE__ */ o({
|
|
3
|
+
__name: "hint",
|
|
4
|
+
props: {
|
|
5
|
+
text: {}
|
|
6
|
+
},
|
|
7
|
+
setup(e) {
|
|
8
|
+
return (t, l) => (r(), n("div", i, [
|
|
9
|
+
s(t.$slots, "default", {}, () => [
|
|
10
|
+
a(c(e.text), 1)
|
|
11
|
+
])
|
|
12
|
+
]));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
_
|
|
17
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { defineComponent as z, mergeModels as A, useId as F, computed as i, useModel as w, useTemplateRef as S, ref as L, watch as N, onMounted as K, createBlock as m, openBlock as u, mergeProps as y, unref as a, withCtx as f, renderSlot as g, createElementVNode as r, createCommentVNode as B, createElementBlock as h } from "vue";
|
|
2
|
+
import { useFormControl as R } from "vue-composable-ui";
|
|
3
|
+
import { _ as T } from "./formControl.vue_vue_type_style_index_0_lang.BDPmQzJj.js";
|
|
4
|
+
import M from "../btn2.js";
|
|
5
|
+
import '../assets/input.css';const q = ["id", "type", "pattern", "title", "autocomplete", "value"], D = {
|
|
6
|
+
key: 0,
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
8
|
+
fill: "none",
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
stroke: "currentColor"
|
|
11
|
+
}, G = {
|
|
12
|
+
key: 1,
|
|
13
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
14
|
+
fill: "none",
|
|
15
|
+
viewBox: "0 0 24 24",
|
|
16
|
+
stroke: "currentColor"
|
|
17
|
+
}, W = /* @__PURE__ */ z({
|
|
18
|
+
inheritAttrs: !1,
|
|
19
|
+
__name: "input",
|
|
20
|
+
props: /* @__PURE__ */ A({
|
|
21
|
+
id: {},
|
|
22
|
+
type: { default: "text" },
|
|
23
|
+
mask: {},
|
|
24
|
+
pattern: {},
|
|
25
|
+
title: {},
|
|
26
|
+
autocomplete: { type: [String, Boolean], default: "off" },
|
|
27
|
+
clearable: { type: Boolean },
|
|
28
|
+
validators: {},
|
|
29
|
+
showValidationError: { type: Boolean, default: !1 },
|
|
30
|
+
labelPosition: {},
|
|
31
|
+
hint: {},
|
|
32
|
+
validationMessage: {},
|
|
33
|
+
lg: { type: Boolean },
|
|
34
|
+
sm: { type: Boolean },
|
|
35
|
+
outlined: { type: Boolean },
|
|
36
|
+
muted: { type: Boolean },
|
|
37
|
+
label: {},
|
|
38
|
+
labelFor: {},
|
|
39
|
+
size: {},
|
|
40
|
+
variant: {},
|
|
41
|
+
rounded: { type: Boolean },
|
|
42
|
+
disabled: { type: Boolean },
|
|
43
|
+
invalid: { type: Boolean }
|
|
44
|
+
}, {
|
|
45
|
+
modelValue: {},
|
|
46
|
+
modelModifiers: {},
|
|
47
|
+
files: {},
|
|
48
|
+
filesModifiers: {}
|
|
49
|
+
}),
|
|
50
|
+
emits: ["update:modelValue", "update:files"],
|
|
51
|
+
setup(s) {
|
|
52
|
+
const e = s, v = e.id || F(), C = i(() => typeof e.autocomplete == "string" ? e.autocomplete : e.autocomplete ? "on" : "off"), l = w(s, "modelValue"), b = w(s, "files", {
|
|
53
|
+
set(t) {
|
|
54
|
+
return n.value && (n.value.files = t), t;
|
|
55
|
+
}
|
|
56
|
+
}), n = S("formElement"), { isValid: c, validationMessage: V, validate: E } = R(
|
|
57
|
+
n,
|
|
58
|
+
e.validators,
|
|
59
|
+
e.showValidationError
|
|
60
|
+
), d = L(!1);
|
|
61
|
+
N(l, () => {
|
|
62
|
+
b.value = n.value?.files || null;
|
|
63
|
+
});
|
|
64
|
+
let p;
|
|
65
|
+
const x = i(() => e.type === "password" ? d.value ? "text" : "password" : e.type), k = i(() => e.mask ? e.mask : e.type === "tel" ? {
|
|
66
|
+
mask: "{+7} (000) 000-00-00"
|
|
67
|
+
} : e.mask), P = i(() => e.pattern ? e.pattern : e.type === "tel" ? "^\\+7 \\(9\\d{2}\\) \\d{3}-\\d{2}-\\d{2}" : e.pattern), _ = i(() => e.title ? e.title : e.type === "tel" ? "+7 (999) 888-77-66" : e.title);
|
|
68
|
+
function $() {
|
|
69
|
+
d.value = !d.value;
|
|
70
|
+
}
|
|
71
|
+
function j() {
|
|
72
|
+
l.value = "";
|
|
73
|
+
}
|
|
74
|
+
function I(t) {
|
|
75
|
+
if (p)
|
|
76
|
+
return;
|
|
77
|
+
const { value: o } = t.target;
|
|
78
|
+
l.value = o;
|
|
79
|
+
}
|
|
80
|
+
return K(() => {
|
|
81
|
+
k.value && import("imask").then((t) => {
|
|
82
|
+
p = t.default(
|
|
83
|
+
n.value,
|
|
84
|
+
k.value
|
|
85
|
+
), p.on("accept", () => {
|
|
86
|
+
l.value = p.value;
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}), (t, o) => (u(), m(T, y(e, {
|
|
90
|
+
"label-for": a(v),
|
|
91
|
+
"validation-message": s.showValidationError ? "" : a(V),
|
|
92
|
+
invalid: e.invalid || !a(c),
|
|
93
|
+
class: t.$attrs.class
|
|
94
|
+
}), {
|
|
95
|
+
default: f(() => [
|
|
96
|
+
g(t.$slots, "prepend"),
|
|
97
|
+
r("input", y({
|
|
98
|
+
ref_key: "formElement",
|
|
99
|
+
ref: n
|
|
100
|
+
}, { ...t.$attrs, class: void 0 }, {
|
|
101
|
+
id: a(v),
|
|
102
|
+
type: x.value,
|
|
103
|
+
pattern: P.value,
|
|
104
|
+
title: _.value,
|
|
105
|
+
autocomplete: C.value,
|
|
106
|
+
value: l.value,
|
|
107
|
+
onInputPassive: I,
|
|
108
|
+
onKeyupPassive: o[0] || (o[0] = (H) => !a(c) && a(E)()),
|
|
109
|
+
class: "dai-form-control__input-group__control dai-form-control__input"
|
|
110
|
+
}), null, 16, q),
|
|
111
|
+
g(t.$slots, "append"),
|
|
112
|
+
e.type === "password" && l.value ? (u(), m(M, {
|
|
113
|
+
key: 0,
|
|
114
|
+
onClick: $
|
|
115
|
+
}, {
|
|
116
|
+
default: f(() => [
|
|
117
|
+
d.value ? (u(), h("svg", G, [...o[2] || (o[2] = [
|
|
118
|
+
r("path", {
|
|
119
|
+
"stroke-linecap": "round",
|
|
120
|
+
"stroke-linejoin": "round",
|
|
121
|
+
"stroke-width": "2",
|
|
122
|
+
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"
|
|
123
|
+
}, null, -1)
|
|
124
|
+
])])) : (u(), h("svg", D, [...o[1] || (o[1] = [
|
|
125
|
+
r("path", {
|
|
126
|
+
"stroke-linecap": "round",
|
|
127
|
+
"stroke-linejoin": "round",
|
|
128
|
+
"stroke-width": "2",
|
|
129
|
+
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
130
|
+
}, null, -1),
|
|
131
|
+
r("path", {
|
|
132
|
+
"stroke-linecap": "round",
|
|
133
|
+
"stroke-linejoin": "round",
|
|
134
|
+
"stroke-width": "2",
|
|
135
|
+
d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
|
|
136
|
+
}, null, -1)
|
|
137
|
+
])]))
|
|
138
|
+
]),
|
|
139
|
+
_: 1
|
|
140
|
+
})) : B("", !0),
|
|
141
|
+
s.clearable && l.value && !e.disabled ? (u(), m(M, {
|
|
142
|
+
key: 1,
|
|
143
|
+
onClick: j
|
|
144
|
+
}, {
|
|
145
|
+
default: f(() => [...o[3] || (o[3] = [
|
|
146
|
+
r("svg", {
|
|
147
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
148
|
+
fill: "none",
|
|
149
|
+
viewBox: "0 0 24 24",
|
|
150
|
+
stroke: "currentColor"
|
|
151
|
+
}, [
|
|
152
|
+
r("path", {
|
|
153
|
+
"stroke-linecap": "round",
|
|
154
|
+
"stroke-linejoin": "round",
|
|
155
|
+
"stroke-width": "2",
|
|
156
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
157
|
+
})
|
|
158
|
+
], -1)
|
|
159
|
+
])]),
|
|
160
|
+
_: 1
|
|
161
|
+
})) : B("", !0)
|
|
162
|
+
]),
|
|
163
|
+
_: 3
|
|
164
|
+
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
export {
|
|
168
|
+
W as _
|
|
169
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as l, createElementBlock as a, openBlock as e, normalizeClass as n, createBlock as r, createCommentVNode as i, createElementVNode as d, renderSlot as u } from "vue";
|
|
2
|
+
import { _ as m } from "./label.vue_vue_type_style_index_0_lang.CwYm9LGb.js";
|
|
3
|
+
import '../assets/inputGroup.css';const c = { class: "dai-form-control__input-group__box" }, p = /* @__PURE__ */ l({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "inputGroup",
|
|
6
|
+
props: {
|
|
7
|
+
label: {},
|
|
8
|
+
labelFor: {},
|
|
9
|
+
size: { default: "medium" },
|
|
10
|
+
variant: { default: "flat" },
|
|
11
|
+
rounded: { type: Boolean },
|
|
12
|
+
disabled: { type: Boolean },
|
|
13
|
+
invalid: { type: Boolean }
|
|
14
|
+
},
|
|
15
|
+
setup(o) {
|
|
16
|
+
return (t, f) => (e(), a("div", {
|
|
17
|
+
class: n(["dai-form-control__input-group", {
|
|
18
|
+
"dai-form-control__input-group--labeled": !!o.label,
|
|
19
|
+
"dai-form-control__input-group--outlined": o.variant === "outlined",
|
|
20
|
+
"dai-form-control__input-group--muted": o.variant === "muted",
|
|
21
|
+
"dai-form-control__input-group--lg": o.size === "large",
|
|
22
|
+
"dai-form-control__input-group--sm": o.size === "small",
|
|
23
|
+
"dai-form-control__input-group--rounded": o.rounded,
|
|
24
|
+
"dai-form-control__input-group--disabled": o.disabled,
|
|
25
|
+
"dai-form-control__input-group--invalid": o.invalid
|
|
26
|
+
}])
|
|
27
|
+
}, [
|
|
28
|
+
o.label ? (e(), r(m, {
|
|
29
|
+
key: 0,
|
|
30
|
+
text: o.label,
|
|
31
|
+
for: o.labelFor,
|
|
32
|
+
class: "dai-form-control__input-group__label"
|
|
33
|
+
}, null, 8, ["text", "for"])) : i("", !0),
|
|
34
|
+
d("div", c, [
|
|
35
|
+
u(t.$slots, "default")
|
|
36
|
+
])
|
|
37
|
+
], 2));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
p as _
|
|
42
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineComponent as o, createElementBlock as l, openBlock as a, renderSlot as n, createTextVNode as r, toDisplayString as s } from "vue";
|
|
2
|
+
import '../assets/label.css';const c = { class: "dai-label" }, i = /* @__PURE__ */ o({
|
|
3
|
+
__name: "label",
|
|
4
|
+
props: {
|
|
5
|
+
text: {}
|
|
6
|
+
},
|
|
7
|
+
setup(e) {
|
|
8
|
+
return (t, p) => (a(), l("label", c, [
|
|
9
|
+
n(t.$slots, "default", {}, () => [
|
|
10
|
+
r(s(e.text), 1)
|
|
11
|
+
])
|
|
12
|
+
]));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
i as _
|
|
17
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as c, createBlock as s, openBlock as t, unref as a, withCtx as l, createElementBlock as m, createCommentVNode as i, renderSlot as d, createElementVNode as u, normalizeClass as f } from "vue";
|
|
2
|
+
import { MenuItem as _ } from "vue-composable-ui";
|
|
3
|
+
import '../assets/menuItem.css';const p = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "text-secondary-400 flex-shrink-0"
|
|
6
|
+
}, C = /* @__PURE__ */ c({
|
|
7
|
+
__name: "menuItem",
|
|
8
|
+
props: {
|
|
9
|
+
icon: {}
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
return (n, h) => (t(), s(a(_), { class: "dai-menu-item" }, {
|
|
13
|
+
default: l(({ isActive: o, isSelected: r }) => [
|
|
14
|
+
e.icon ? (t(), m("div", p, [
|
|
15
|
+
u("div", {
|
|
16
|
+
class: f(["h-5 w-5", e.icon])
|
|
17
|
+
}, null, 2)
|
|
18
|
+
])) : i("", !0),
|
|
19
|
+
d(n.$slots, "default", {
|
|
20
|
+
isActive: o,
|
|
21
|
+
isSelected: r
|
|
22
|
+
})
|
|
23
|
+
]),
|
|
24
|
+
_: 3
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
C as _
|
|
30
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent as n, createBlock as a, openBlock as m, Transition as s, withCtx as e, createVNode as o, unref as r, renderSlot as i } from "vue";
|
|
2
|
+
import { MenuItems as u } from "vue-composable-ui";
|
|
3
|
+
import '../assets/menuItems.css';const f = /* @__PURE__ */ n({
|
|
4
|
+
__name: "menuItems",
|
|
5
|
+
setup(c) {
|
|
6
|
+
return (t, l) => (m(), a(s, {
|
|
7
|
+
"enter-from-class": "dai-menu-items--anim",
|
|
8
|
+
"leave-to-class": "dai-menu-items--anim"
|
|
9
|
+
}, {
|
|
10
|
+
default: e(() => [
|
|
11
|
+
o(r(u), { class: "dai-menu-items" }, {
|
|
12
|
+
default: e(() => [
|
|
13
|
+
i(t.$slots, "default")
|
|
14
|
+
]),
|
|
15
|
+
_: 3
|
|
16
|
+
})
|
|
17
|
+
]),
|
|
18
|
+
_: 3
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
f as _
|
|
24
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineComponent as i, useModel as r, watch as n, createBlock as m, openBlock as d, Teleport as c, createVNode as _, Transition as u, withCtx as f, createElementBlock as p, createCommentVNode as v, createElementVNode as e, withModifiers as y, renderSlot as h } from "vue";
|
|
2
|
+
import '../assets/modal.css';const k = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "dai-modal"
|
|
5
|
+
}, V = { class: "dai-modal__overlay" }, w = { class: "dai-modal__dialog" }, B = /* @__PURE__ */ i({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "modal",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { type: Boolean },
|
|
10
|
+
modelModifiers: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:modelValue"],
|
|
13
|
+
setup(s) {
|
|
14
|
+
const o = r(s, "modelValue");
|
|
15
|
+
function l() {
|
|
16
|
+
o.value = !1;
|
|
17
|
+
}
|
|
18
|
+
return n(o, (a) => {
|
|
19
|
+
a ? document.body.style.overflow = "hidden" : document.body.style.removeProperty("overflow");
|
|
20
|
+
}), (a, t) => (d(), m(c, { to: "body" }, [
|
|
21
|
+
_(u, {
|
|
22
|
+
appear: "",
|
|
23
|
+
"enter-from-class": "dai-modal--anim",
|
|
24
|
+
"leave-to-class": "dai-modal--anim",
|
|
25
|
+
duration: { enter: 300, leave: 200 }
|
|
26
|
+
}, {
|
|
27
|
+
default: f(() => [
|
|
28
|
+
o.value ? (d(), p("div", k, [
|
|
29
|
+
t[0] || (t[0] = e("div", {
|
|
30
|
+
class: "dai-modal__backdrop",
|
|
31
|
+
"aria-hidden": "true"
|
|
32
|
+
}, null, -1)),
|
|
33
|
+
e("div", V, [
|
|
34
|
+
e("div", {
|
|
35
|
+
onClick: y(l, ["self"]),
|
|
36
|
+
class: "dai-modal__overlay__container"
|
|
37
|
+
}, [
|
|
38
|
+
e("div", w, [
|
|
39
|
+
h(a.$slots, "default", { close: l })
|
|
40
|
+
])
|
|
41
|
+
])
|
|
42
|
+
])
|
|
43
|
+
])) : v("", !0)
|
|
44
|
+
]),
|
|
45
|
+
_: 3
|
|
46
|
+
})
|
|
47
|
+
]));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
export {
|
|
51
|
+
B as _
|
|
52
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { defineComponent as u, mergeModels as k, useModel as h, watch as f, createElementBlock as t, createCommentVNode as n, openBlock as i, createElementVNode as s, normalizeClass as d, toDisplayString as r } from "vue";
|
|
2
|
+
import '../assets/notification.css';const v = {
|
|
3
|
+
key: 0,
|
|
4
|
+
role: "alert"
|
|
5
|
+
}, w = {
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
fill: "none",
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
stroke: "currentColor"
|
|
10
|
+
}, g = {
|
|
11
|
+
key: 0,
|
|
12
|
+
"stroke-linecap": "round",
|
|
13
|
+
"stroke-linejoin": "round",
|
|
14
|
+
"stroke-width": "2",
|
|
15
|
+
d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
16
|
+
}, _ = {
|
|
17
|
+
key: 1,
|
|
18
|
+
"stroke-linecap": "round",
|
|
19
|
+
"stroke-linejoin": "round",
|
|
20
|
+
"stroke-width": "2",
|
|
21
|
+
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
22
|
+
}, y = {
|
|
23
|
+
key: 2,
|
|
24
|
+
"stroke-linecap": "round",
|
|
25
|
+
"stroke-linejoin": "round",
|
|
26
|
+
"stroke-width": "2",
|
|
27
|
+
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"
|
|
28
|
+
}, M = {
|
|
29
|
+
key: 3,
|
|
30
|
+
"stroke-linecap": "round",
|
|
31
|
+
"stroke-linejoin": "round",
|
|
32
|
+
"stroke-width": "2",
|
|
33
|
+
d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
34
|
+
}, x = { class: "dai-notification__content" }, B = {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: "dai-notification__content__detail"
|
|
37
|
+
}, V = /* @__PURE__ */ u({
|
|
38
|
+
__name: "notification",
|
|
39
|
+
props: /* @__PURE__ */ k({
|
|
40
|
+
color: {},
|
|
41
|
+
icon: {},
|
|
42
|
+
message: {},
|
|
43
|
+
detail: {},
|
|
44
|
+
dismissible: { type: Boolean, default: !0 },
|
|
45
|
+
timeout: { default: 3e3 }
|
|
46
|
+
}, {
|
|
47
|
+
modelValue: { type: Boolean },
|
|
48
|
+
modelModifiers: {}
|
|
49
|
+
}),
|
|
50
|
+
emits: ["update:modelValue"],
|
|
51
|
+
setup(e) {
|
|
52
|
+
const l = e, o = h(e, "modelValue");
|
|
53
|
+
let c;
|
|
54
|
+
function m() {
|
|
55
|
+
clearTimeout(c), o.value && l.timeout && (c = setTimeout(() => o.value = !1, l.timeout));
|
|
56
|
+
}
|
|
57
|
+
return f(o, m, { immediate: !0 }), (C, a) => o.value ? (i(), t("div", v, [
|
|
58
|
+
s("div", {
|
|
59
|
+
class: d(["dai-notification", [`dai-notification--${e.color || "secondary"}`]])
|
|
60
|
+
}, [
|
|
61
|
+
e.icon ? (i(), t("div", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: d(["dai-notification__icon", [`dai-notification__icon--${e.icon}`]])
|
|
64
|
+
}, [
|
|
65
|
+
(i(), t("svg", w, [
|
|
66
|
+
e.icon == "success" ? (i(), t("path", g)) : e.icon == "info" ? (i(), t("path", _)) : e.icon == "warning" ? (i(), t("path", y)) : e.icon == "danger" ? (i(), t("path", M)) : n("", !0)
|
|
67
|
+
]))
|
|
68
|
+
], 2)) : n("", !0),
|
|
69
|
+
s("div", x, [
|
|
70
|
+
s("div", {
|
|
71
|
+
class: d(["dai-notification__content__message", {
|
|
72
|
+
"dai-notification__content__message--bold": e.detail
|
|
73
|
+
}])
|
|
74
|
+
}, r(e.message), 3),
|
|
75
|
+
e.detail ? (i(), t("div", B, r(e.detail), 1)) : n("", !0)
|
|
76
|
+
]),
|
|
77
|
+
e.dismissible ? (i(), t("div", {
|
|
78
|
+
key: 1,
|
|
79
|
+
onClick: a[0] || (a[0] = (j) => o.value = !1),
|
|
80
|
+
class: "dai-notification__dismiss"
|
|
81
|
+
}, [...a[1] || (a[1] = [
|
|
82
|
+
s("svg", {
|
|
83
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
84
|
+
fill: "none",
|
|
85
|
+
viewBox: "0 0 24 24",
|
|
86
|
+
stroke: "currentColor"
|
|
87
|
+
}, [
|
|
88
|
+
s("path", {
|
|
89
|
+
"stroke-linecap": "round",
|
|
90
|
+
"stroke-linejoin": "round",
|
|
91
|
+
"stroke-width": "2",
|
|
92
|
+
d: "M6 18L18 6M6 6l12 12"
|
|
93
|
+
})
|
|
94
|
+
], -1)
|
|
95
|
+
])])) : n("", !0)
|
|
96
|
+
], 2)
|
|
97
|
+
])) : n("", !0);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
export {
|
|
101
|
+
V as _
|
|
102
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { defineComponent as p, mergeModels as h, useModel as q, ref as v, watch as g, computed as x, createElementBlock as m, openBlock as u, normalizeClass as _, createVNode as X, TransitionGroup as w, withCtx as b, Fragment as y, renderList as C, createBlock as V } from "vue";
|
|
2
|
+
import { _ as Y } from "./notification.vue_vue_type_style_index_0_lang.RHzcHM7o.js";
|
|
3
|
+
import '../assets/notificationQueue.css';const M = /* @__PURE__ */ p({
|
|
4
|
+
__name: "notificationQueue",
|
|
5
|
+
props: /* @__PURE__ */ h({
|
|
6
|
+
length: { default: 3 },
|
|
7
|
+
timeout: { default: 4e3 },
|
|
8
|
+
position: { default: "fixed" },
|
|
9
|
+
positionX: { default: "center" },
|
|
10
|
+
positionY: { default: "top" }
|
|
11
|
+
}, {
|
|
12
|
+
queue: { default: [] },
|
|
13
|
+
queueModifiers: {}
|
|
14
|
+
}),
|
|
15
|
+
emits: ["update:queue"],
|
|
16
|
+
setup(e) {
|
|
17
|
+
const o = e, n = q(e, "queue"), a = v([]);
|
|
18
|
+
let r = 0;
|
|
19
|
+
function s() {
|
|
20
|
+
n.value.length === 0 || a.value.length >= o.length || (a.value.push({ ...n.value[0], id: r++, show: !0 }), n.value.shift());
|
|
21
|
+
}
|
|
22
|
+
function f(t) {
|
|
23
|
+
setTimeout(() => {
|
|
24
|
+
a.value = a.value.filter(
|
|
25
|
+
(c) => c.id !== t
|
|
26
|
+
), s();
|
|
27
|
+
}, 200);
|
|
28
|
+
}
|
|
29
|
+
g(n, s, { immediate: !0, deep: !0 });
|
|
30
|
+
const l = x(() => {
|
|
31
|
+
const t = ["dai-notification-queue__item--anim"];
|
|
32
|
+
return o.positionX === "right" ? t.push("dai-notification-queue__item--anim-x-right") : o.positionX === "left" ? t.push("dai-notification-queue__item--anim-x-left") : o.positionX === "center" && o.positionY === "top" ? t.push("dai-notification-queue__item--anim-y-top") : o.positionX === "center" && o.positionY === "bottom" && t.push("dai-notification-queue__item--anim-y-bottom"), t.join(" ");
|
|
33
|
+
});
|
|
34
|
+
return (t, c) => (u(), m("div", {
|
|
35
|
+
class: _(["dai-notification-queue", {
|
|
36
|
+
"dai-notification-queue--fixed": e.position == "fixed",
|
|
37
|
+
"dai-notification-queue--absolute": e.position == "absolute",
|
|
38
|
+
"dai-notification-queue--y-top": e.positionY == "top",
|
|
39
|
+
"dai-notification-queue--y-bottom": e.positionY == "bottom",
|
|
40
|
+
"dai-notification-queue--x-left": e.positionX == "left",
|
|
41
|
+
"dai-notification-queue--x-center": e.positionX == "center",
|
|
42
|
+
"dai-notification-queue--x-right": e.positionX == "right"
|
|
43
|
+
}])
|
|
44
|
+
}, [
|
|
45
|
+
X(w, {
|
|
46
|
+
appear: "",
|
|
47
|
+
"enter-from-class": l.value,
|
|
48
|
+
"enter-active-class": "dai-notification-queue__item--anim-in",
|
|
49
|
+
"leave-to-class": l.value,
|
|
50
|
+
"leave-active-class": "dai-notification-queue__item--anim-out"
|
|
51
|
+
}, {
|
|
52
|
+
default: b(() => [
|
|
53
|
+
(u(!0), m(y, null, C(a.value, (i) => (u(), V(Y, {
|
|
54
|
+
key: i.id,
|
|
55
|
+
color: i.color,
|
|
56
|
+
icon: i.type,
|
|
57
|
+
message: i.message,
|
|
58
|
+
detail: i.detail,
|
|
59
|
+
timeout: i.timeout ?? e.timeout,
|
|
60
|
+
modelValue: i.show,
|
|
61
|
+
"onUpdate:modelValue": [(d) => i.show = d, (d) => f(i.id)],
|
|
62
|
+
class: "dai-notification-queue__item"
|
|
63
|
+
}, null, 8, ["color", "icon", "message", "detail", "timeout", "modelValue", "onUpdate:modelValue"]))), 128))
|
|
64
|
+
]),
|
|
65
|
+
_: 1
|
|
66
|
+
}, 8, ["enter-from-class", "leave-to-class"])
|
|
67
|
+
], 2));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
export {
|
|
71
|
+
M as _
|
|
72
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { defineComponent as u, mergeModels as d, useModel as r, useId as f, watch as m, onMounted as v, onUnmounted as p, createBlock as h, openBlock as l, Teleport as g, createVNode as y, Transition as k, withCtx as w, createElementBlock as B, createCommentVNode as C, mergeProps as x, unref as V, renderSlot as b } from "vue";
|
|
2
|
+
import { useClassList as L } from "../classList.js";
|
|
3
|
+
import '../assets/offcanvas.css';const M = ["id"], E = /* @__PURE__ */ u({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "offcanvas",
|
|
6
|
+
props: /* @__PURE__ */ d({
|
|
7
|
+
id: {},
|
|
8
|
+
position: { default: "right" },
|
|
9
|
+
push: { type: Boolean },
|
|
10
|
+
closeOnOutsideClick: { type: Boolean, default: !0 },
|
|
11
|
+
lg: { type: Boolean },
|
|
12
|
+
xl: { type: Boolean }
|
|
13
|
+
}, {
|
|
14
|
+
modelValue: { type: Boolean },
|
|
15
|
+
modelModifiers: {}
|
|
16
|
+
}),
|
|
17
|
+
emits: ["update:modelValue"],
|
|
18
|
+
setup(t) {
|
|
19
|
+
const o = t, n = r(t, "modelValue"), a = o.id ?? f(), { classList: s } = L(document.body, "nui-body-push");
|
|
20
|
+
m(n, () => {
|
|
21
|
+
if (!o.push || (s.splice(1), !n.value))
|
|
22
|
+
return;
|
|
23
|
+
let e = "nui-body-push--" + o.position;
|
|
24
|
+
o.lg && (e += "--lg"), o.xl && (e += "--xl"), s.push(e);
|
|
25
|
+
});
|
|
26
|
+
function i(e) {
|
|
27
|
+
e.target.closest(`#${a}`) || o.closeOnOutsideClick && (n.value = !1);
|
|
28
|
+
}
|
|
29
|
+
return v(() => {
|
|
30
|
+
window.addEventListener("click", i, { passive: !0 });
|
|
31
|
+
}), p(() => {
|
|
32
|
+
window.removeEventListener("click", i);
|
|
33
|
+
}), (e, c) => (l(), h(g, { to: "body" }, [
|
|
34
|
+
y(k, {
|
|
35
|
+
appear: "",
|
|
36
|
+
"enter-from-class": "nui-offcanvas--animate-hidden",
|
|
37
|
+
"enter-to-class": "nui-offcanvas--animate-shown",
|
|
38
|
+
"enter-active-class": "ease-in-out",
|
|
39
|
+
"leave-from-class": "nui-offcanvas--animate-shown",
|
|
40
|
+
"leave-to-class": "nui-offcanvas--animate-hidden",
|
|
41
|
+
"leave-active-class": "ease-in-out"
|
|
42
|
+
}, {
|
|
43
|
+
default: w(() => [
|
|
44
|
+
n.value ? (l(), B("div", x({
|
|
45
|
+
key: 0,
|
|
46
|
+
id: V(a)
|
|
47
|
+
}, e.$attrs, {
|
|
48
|
+
class: ["nui-offcanvas", {
|
|
49
|
+
[`nui-offcanvas--${t.position}`]: !0,
|
|
50
|
+
"nui-offcanvas--shadow": !t.push,
|
|
51
|
+
"nui-offcanvas--lg": t.lg,
|
|
52
|
+
"nui-offcanvas--xl": t.xl
|
|
53
|
+
}]
|
|
54
|
+
}), [
|
|
55
|
+
b(e.$slots, "default")
|
|
56
|
+
], 16, M)) : C("", !0)
|
|
57
|
+
]),
|
|
58
|
+
_: 3
|
|
59
|
+
})
|
|
60
|
+
]));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
E as _
|
|
65
|
+
};
|