mhz-ui 1.3.21 → 1.3.23
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/UiBreadcrumbs/UiBreadcrumbs.css +1 -1
- package/dist/UiBreadcrumbs/UiBreadcrumbs.js +61 -63
- package/dist/UiButton/UiButton.css +1 -1
- package/dist/UiButton/UiButton.js +2 -41
- package/dist/UiButton-DkJNVTgF.js +45 -0
- package/dist/UiButtongroup/UiButtongroup.css +1 -1
- package/dist/UiButtongroup/UiButtongroup.js +50 -60
- package/dist/UiCalendar/UiCalendar.css +1 -1
- package/dist/UiCalendar/UiCalendar.js +128 -157
- package/dist/UiChart/UiChart.css +1 -1
- package/dist/UiChart/UiChart.js +7573 -8093
- package/dist/UiCheckbox/UiCheckbox.css +1 -1
- package/dist/UiCheckbox/UiCheckbox.js +116 -105
- package/dist/UiChip/UiChip.css +1 -1
- package/dist/UiChip/UiChip.js +48 -56
- package/dist/UiClose/UiClose.css +1 -1
- package/dist/UiClose/UiClose.js +2 -33
- package/dist/UiClose-BQmeCbRi.js +22 -0
- package/dist/UiEditor/UiEditor.css +1 -1
- package/dist/UiEditor/UiEditor.js +13012 -16496
- package/dist/UiField/UiField.css +1 -1
- package/dist/UiField/UiField.js +29 -42
- package/dist/UiFlex/UiFlex.css +1 -1
- package/dist/UiFlex/UiFlex.js +42 -43
- package/dist/UiInput/UiInput.css +1 -1
- package/dist/UiInput/UiInput.js +2 -125
- package/dist/UiInput-DHFttLTG.js +133 -0
- package/dist/UiModal/UiModal.css +1 -1
- package/dist/UiModal/UiModal.js +74 -106
- package/dist/UiPagination/UiPagination.css +1 -1
- package/dist/UiPagination/UiPagination.js +50 -58
- package/dist/UiRange/UiRange.css +1 -1
- package/dist/UiRange/UiRange.js +1384 -918
- package/dist/UiSearch/UiSearch.css +1 -1
- package/dist/UiSearch/UiSearch.js +118 -143
- package/dist/UiSelect/UiSelect.css +1 -1
- package/dist/UiSelect/UiSelect.js +167 -171
- package/dist/UiSlider/UiSlider.css +1 -1
- package/dist/UiSlider/UiSlider.js +41 -56
- package/dist/UiSpoiler/UiSpoiler.css +1 -1
- package/dist/UiSpoiler/UiSpoiler.js +51 -79
- package/dist/UiTable/UiTable.css +1 -1
- package/dist/UiTable/UiTable.js +76 -97
- package/dist/UiTabs/UiTabs.css +1 -1
- package/dist/UiTabs/UiTabs.js +24 -32
- package/dist/UiTextarea/UiTextarea.css +1 -1
- package/dist/UiTextarea/UiTextarea.js +25 -31
- package/dist/UiUpload/UiUpload.css +1 -1
- package/dist/UiUpload/UiUpload.js +123 -166
- package/dist/_plugin-vue_export-helper-Bt71PsSa.js +6 -0
- package/dist/dist-CLA-k87a.js +109 -0
- package/dist/locales-DIKIa9I3.js +29 -0
- package/dist/stubs/stubs.js +13 -15
- package/dist/toast/toast.css +1 -1
- package/dist/toast/toast.js +43 -41
- package/package.json +29 -29
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/index-DajWja1y.js +0 -31
- package/dist/index-Dvnq-rTV.js +0 -109
|
@@ -1,158 +1,129 @@
|
|
|
1
1
|
import "./UiCalendar.css";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
class: a(e.$style.title)
|
|
131
|
-
}, d(o.title), 3)
|
|
132
|
-
], 14, V))), 128))
|
|
133
|
-
], 2)
|
|
134
|
-
], 10, N))), 128))
|
|
135
|
-
], 2)
|
|
136
|
-
], 2));
|
|
137
|
-
}
|
|
138
|
-
}), j = "_container_6dq6w_1", G = "_titleBar_6dq6w_7", I = "_navButton_6dq6w_19", J = "_headings_6dq6w_26", K = "_weekday_6dq6w_32", Q = "_body_6dq6w_38", X = "_cell_6dq6w_44", Z = "_today_6dq6w_55", x = "_cellDate_6dq6w_55", ee = "_outOfRange_6dq6w_61", te = "_cellEvents_6dq6w_72", ne = "_event_6dq6w_81", ae = "_title_6dq6w_7", se = "_header_6dq6w_111", oe = {
|
|
139
|
-
container: j,
|
|
140
|
-
titleBar: G,
|
|
141
|
-
navButton: I,
|
|
142
|
-
headings: J,
|
|
143
|
-
weekday: K,
|
|
144
|
-
body: Q,
|
|
145
|
-
cell: X,
|
|
146
|
-
today: Z,
|
|
147
|
-
cellDate: x,
|
|
148
|
-
outOfRange: ee,
|
|
149
|
-
cellEvents: te,
|
|
150
|
-
event: ne,
|
|
151
|
-
title: ae,
|
|
152
|
-
header: se
|
|
153
|
-
}, le = {
|
|
154
|
-
$style: oe
|
|
155
|
-
}, ue = /* @__PURE__ */ A(W, [["__cssModules", le]]);
|
|
156
|
-
export {
|
|
157
|
-
ue as default
|
|
158
|
-
};
|
|
2
|
+
import { t as _plugin_vue_export_helper_default } from "../_plugin-vue_export-helper-Bt71PsSa.js";
|
|
3
|
+
import { Fragment, computed, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, onBeforeMount, openBlock, ref, renderList, toDisplayString, withModifiers } from "vue";
|
|
4
|
+
var _hoisted_1 = ["onClick", "data-choose"], _hoisted_2 = ["onClick"], UiCalendar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "UiCalendar",
|
|
6
|
+
props: {
|
|
7
|
+
isDisablePastDates: { type: Boolean },
|
|
8
|
+
events: { default: () => [] },
|
|
9
|
+
lang: { default: "ru" }
|
|
10
|
+
},
|
|
11
|
+
emits: [
|
|
12
|
+
"update",
|
|
13
|
+
"eventClick",
|
|
14
|
+
"chooseDate"
|
|
15
|
+
],
|
|
16
|
+
setup(e, { emit: a }) {
|
|
17
|
+
let c = e, l = a, u = ref(/* @__PURE__ */ new Date()), d = computed(() => {
|
|
18
|
+
let e = /* @__PURE__ */ new Date();
|
|
19
|
+
return e.setHours(0, 0, 0, 0), e;
|
|
20
|
+
}), f = computed(() => new Date(u.value.getFullYear(), u.value.getMonth(), 1)), p = computed(() => {
|
|
21
|
+
let e = f.value.toLocaleDateString(c.lang, {
|
|
22
|
+
month: "long",
|
|
23
|
+
year: "numeric"
|
|
24
|
+
});
|
|
25
|
+
return e.length > 0 && (e = e.charAt(0).toUpperCase() + e.slice(1)), c.lang === "ru" && (e = e.replace(/ г\.$/, "")), e;
|
|
26
|
+
}), m = computed(() => {
|
|
27
|
+
let e = new Date(f.value);
|
|
28
|
+
e.setDate(1);
|
|
29
|
+
let t = (e.getDay() + 6) % 7;
|
|
30
|
+
return e.setDate(e.getDate() - t), Array.from({ length: 7 }, (t, n) => {
|
|
31
|
+
let r = new Date(e);
|
|
32
|
+
return r.setDate(e.getDate() + n), r.toLocaleDateString(c.lang, { weekday: "short" });
|
|
33
|
+
});
|
|
34
|
+
}), h = computed(() => {
|
|
35
|
+
let e = new Date(u.value.getFullYear(), u.value.getMonth(), 1), t = new Date(u.value.getFullYear(), u.value.getMonth() + 1, 0), n = (e.getDay() + 6) % 7, r = new Date(e);
|
|
36
|
+
r.setDate(e.getDate() - n);
|
|
37
|
+
let i = (7 - t.getDay()) % 7, a = new Date(t);
|
|
38
|
+
a.setDate(t.getDate() + i);
|
|
39
|
+
let o = Math.floor((a.getTime() - r.getTime()) / (1e3 * 60 * 60 * 24)) + 1, s = [];
|
|
40
|
+
for (let e = 0; e < o; e++) {
|
|
41
|
+
let t = new Date(r);
|
|
42
|
+
t.setDate(r.getDate() + e), s.push(t);
|
|
43
|
+
}
|
|
44
|
+
return s;
|
|
45
|
+
});
|
|
46
|
+
function g() {
|
|
47
|
+
l("update", {
|
|
48
|
+
dateFrom: h.value[0],
|
|
49
|
+
dateTo: new Date(h.value.at(-1)?.setHours(23, 59, 59))
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function _(e) {
|
|
53
|
+
return c.events.filter((t) => {
|
|
54
|
+
if (!t.start) return !1;
|
|
55
|
+
let n = new Date(t.start);
|
|
56
|
+
return n.getDate() === e.getDate() && n.getMonth() === e.getMonth() && n.getFullYear() === e.getFullYear();
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function v(e) {
|
|
60
|
+
return e.toDateString() === d.value.toDateString();
|
|
61
|
+
}
|
|
62
|
+
function y(e) {
|
|
63
|
+
if (c.isDisablePastDates) {
|
|
64
|
+
let t = new Date(e);
|
|
65
|
+
if (t.setHours(0, 0, 0, 0), t < d.value) return !0;
|
|
66
|
+
}
|
|
67
|
+
return !1;
|
|
68
|
+
}
|
|
69
|
+
function b() {
|
|
70
|
+
u.value = new Date(u.value.getFullYear(), u.value.getMonth() - 1, 1), g();
|
|
71
|
+
}
|
|
72
|
+
function x() {
|
|
73
|
+
u.value = new Date(u.value.getFullYear(), u.value.getMonth() + 1, 1), g();
|
|
74
|
+
}
|
|
75
|
+
function S(e) {
|
|
76
|
+
l("eventClick", e);
|
|
77
|
+
}
|
|
78
|
+
function C(e) {
|
|
79
|
+
y(e) || l("chooseDate", e);
|
|
80
|
+
}
|
|
81
|
+
return onBeforeMount(() => {
|
|
82
|
+
g();
|
|
83
|
+
}), (e, n) => (openBlock(), createElementBlock("div", { class: normalizeClass(e.$style.container) }, [createElementVNode("div", { class: normalizeClass(e.$style.header) }, [createElementVNode("div", { class: normalizeClass(e.$style.titleBar) }, [
|
|
84
|
+
createElementVNode("button", {
|
|
85
|
+
onClick: b,
|
|
86
|
+
class: normalizeClass(e.$style.navButton),
|
|
87
|
+
type: "button"
|
|
88
|
+
}, toDisplayString("<"), 2),
|
|
89
|
+
createElementVNode("span", null, toDisplayString(p.value), 1),
|
|
90
|
+
createElementVNode("button", {
|
|
91
|
+
onClick: x,
|
|
92
|
+
class: normalizeClass(e.$style.navButton),
|
|
93
|
+
type: "button"
|
|
94
|
+
}, toDisplayString(">"), 2)
|
|
95
|
+
], 2), createElementVNode("div", { class: normalizeClass(e.$style.headings) }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(m.value, (t) => (openBlock(), createElementBlock("div", {
|
|
96
|
+
key: t,
|
|
97
|
+
class: normalizeClass(e.$style.weekday)
|
|
98
|
+
}, toDisplayString(t), 3))), 128))], 2)], 2), createElementVNode("div", { class: normalizeClass(e.$style.body) }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (n, a) => (openBlock(), createElementBlock("div", {
|
|
99
|
+
key: a,
|
|
100
|
+
class: normalizeClass([e.$style.cell, {
|
|
101
|
+
[e.$style.today]: v(n),
|
|
102
|
+
[e.$style.outOfRange]: y(n)
|
|
103
|
+
}]),
|
|
104
|
+
onClick: (e) => C(n),
|
|
105
|
+
"data-choose": c.isDisablePastDates
|
|
106
|
+
}, [createElementVNode("div", { class: normalizeClass(e.$style.cellDate) }, toDisplayString(n.getDate()), 3), createElementVNode("div", { class: normalizeClass(e.$style.cellEvents) }, [(openBlock(!0), createElementBlock(Fragment, null, renderList(_(n), (t) => (openBlock(), createElementBlock("div", {
|
|
107
|
+
key: t.id,
|
|
108
|
+
class: normalizeClass(e.$style.event),
|
|
109
|
+
style: normalizeStyle({ background: t.color }),
|
|
110
|
+
onClick: withModifiers((e) => S(t), ["stop"])
|
|
111
|
+
}, [createElementVNode("div", { class: normalizeClass(e.$style.title) }, toDisplayString(t.title), 3)], 14, _hoisted_2))), 128))], 2)], 10, _hoisted_1))), 128))], 2)], 2));
|
|
112
|
+
}
|
|
113
|
+
}), [["__cssModules", { $style: {
|
|
114
|
+
container: "_container_6dq6w_1",
|
|
115
|
+
titleBar: "_titleBar_6dq6w_7",
|
|
116
|
+
navButton: "_navButton_6dq6w_19",
|
|
117
|
+
headings: "_headings_6dq6w_26",
|
|
118
|
+
weekday: "_weekday_6dq6w_32",
|
|
119
|
+
body: "_body_6dq6w_38",
|
|
120
|
+
cell: "_cell_6dq6w_44",
|
|
121
|
+
today: "_today_6dq6w_55",
|
|
122
|
+
cellDate: "_cellDate_6dq6w_55",
|
|
123
|
+
outOfRange: "_outOfRange_6dq6w_61",
|
|
124
|
+
cellEvents: "_cellEvents_6dq6w_72",
|
|
125
|
+
event: "_event_6dq6w_81",
|
|
126
|
+
title: "_title_6dq6w_7",
|
|
127
|
+
header: "_header_6dq6w_111"
|
|
128
|
+
} }]]);
|
|
129
|
+
export { UiCalendar_default as default };
|
package/dist/UiChart/UiChart.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._chart_1y3cy_1{
|
|
1
|
+
._chart_1y3cy_1{flex-direction:column;gap:16px;width:100%;display:flex}._title_1y3cy_8{font-size:1.5rem}.dark ._title_1y3cy_8{color:var(--color-white)}
|