mhz-ui 1.4.25 → 1.4.27
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/UiButtongroup/UiButtongroup.css +1 -1
- package/dist/UiButtongroup/UiButtongroup.js +5 -5
- package/dist/UiCalendar/UiCalendar.css +1 -1
- package/dist/UiCalendar/UiCalendar.js +69 -60
- package/dist/UiEditor/UiEditor.css +1 -1
- package/dist/UiEditor/UiEditor.d.ts +3 -1
- package/dist/UiEditor/UiEditor.js +126 -13253
- package/dist/UiRange/UiRange.css +1 -1
- package/dist/UiRange/UiRange.d.ts +4 -1
- package/dist/UiRange/UiRange.js +80 -1382
- package/dist/UiUpload/UiUpload.d.ts +1 -1
- package/package.json +3 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._container_1rby3_1{flex-direction:column;flex-grow:1;gap:4px;width:100%;display:flex}._options_1rby3_9{border:1px solid var(--color-gray);border-radius:16px;height:40px;display:flex}._options_1rby3_9[data-tall=true]{height:52px}._button_1rby3_19{color:var(--color-black);cursor:pointer;background-color:var(--color-gray-light);border:none;flex-grow:1;justify-content:center;align-items:center;font-size:1rem;display:flex}._button_1rby3_19:hover{background-color:var(--color-gray)}._button_1rby3_19:first-child{border-top-left-radius:16px;border-bottom-left-radius:16px}._button_1rby3_19[data-fill=true]:last-child{border-top-right-radius:16px;border-bottom-right-radius:16px}._button_1rby3_19[data-current=true]{color:var(--color-white);background-color:var(--color-accent-dark)}._input_1rby3_46{text-align:center;border:none;border-top-right-radius:16px;border-bottom-right-radius:16px;outline:none;min-width:60px;max-width:80px;font-size:1rem}.dark ._options_1rby3_9{border:none}.dark ._button_1rby3_19{background-color:var(--color-gray-dark)}.dark ._button_1rby3_19:hover{background-color:var(--color-gray)}.dark ._button_1rby3_19[data-current=true]{color:var(--color-white);background-color:var(--color-accent-dark)}.dark ._title_1rby3_70{color:var(--color-white)}
|
|
@@ -43,11 +43,11 @@ var u = ["data-tall"], d = [
|
|
|
43
43
|
}, null, 42, f)) : n("", !0)], 10, u)], 2));
|
|
44
44
|
}
|
|
45
45
|
}), [["__cssModules", { $style: {
|
|
46
|
-
container: "
|
|
47
|
-
options: "
|
|
48
|
-
button: "
|
|
49
|
-
input: "
|
|
50
|
-
title: "
|
|
46
|
+
container: "_container_1rby3_1",
|
|
47
|
+
options: "_options_1rby3_9",
|
|
48
|
+
button: "_button_1rby3_19",
|
|
49
|
+
input: "_input_1rby3_46",
|
|
50
|
+
title: "_title_1rby3_70"
|
|
51
51
|
} }]]);
|
|
52
52
|
//#endregion
|
|
53
53
|
export { p as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_1i9tc_1{border:1px solid var(--color-gray);border-radius:8px;width:100%;overflow:hidden}._container_1i9tc_1 ._titleBar_1i9tc_7{background-color:var(--color-gray-light-extra);border-bottom:1px solid var(--color-gray);border-top-left-radius:8px;border-top-right-radius:8px;justify-content:space-between;align-items:center;height:40px;padding:8px;font-weight:700;display:flex}._container_1i9tc_1 ._titleBar_1i9tc_7 ._navButton_1i9tc_19{cursor:pointer;background:0 0;border:none;padding:0 8px;font-size:1.5rem;font-weight:700}._container_1i9tc_1 ._headings_1i9tc_27{border-bottom:1px solid var(--color-gray);grid-template-columns:repeat(7,1fr);height:37px;display:grid}._container_1i9tc_1 ._headings_1i9tc_27 ._weekday_1i9tc_33{text-transform:capitalize;justify-content:center;align-items:center;display:flex}._container_1i9tc_1 ._body_1i9tc_39{grid-template-columns:repeat(7,1fr);grid-auto-rows:minmax(72px,auto);gap:0;display:grid}._container_1i9tc_1 ._cell_1i9tc_45{background-color:var(--color-white);min-height:72px;box-shadow:0 0 0 .2px var(--color-gray) inset;flex-direction:column;justify-content:flex-start;align-items:center;gap:2px;padding:2px;display:flex}._container_1i9tc_1 ._cell_1i9tc_45._today_1i9tc_56 ._cellDate_1i9tc_56{font-weight:700}._container_1i9tc_1 ._cell_1i9tc_45[data-choose=true]{cursor:pointer}._container_1i9tc_1 ._cell_1i9tc_45._outOfRange_1i9tc_62{cursor:not-allowed}._container_1i9tc_1 ._cell_1i9tc_45._outOfRange_1i9tc_62 ._cellDate_1i9tc_56{color:var(--color-gray)}._container_1i9tc_1 ._cellDate_1i9tc_56{justify-content:center;align-items:center;display:flex}._container_1i9tc_1 ._cellEvents_1i9tc_73{flex-direction:column;justify-content:flex-start;align-items:center;gap:4px;max-height:calc(100% - 24px);padding-bottom:6px;display:flex}._container_1i9tc_1 ._event_1i9tc_82{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;border:none;border-radius:12px;justify-content:center;align-items:center;width:36px;height:36px;padding:0;display:flex}._container_1i9tc_1 ._title_1i9tc_7{width:100%;height:100%;color:var(--color-gray-light);justify-content:center;align-items:center;font-size:1.125rem;font-weight:700;line-height:1;display:flex}.dark ._container_1i9tc_1{border-color:var(--color-gray-dark-extra)}.dark ._container_1i9tc_1 ._header_1i9tc_112{color:var(--color-white);background-color:var(--color-primary-dark);border-bottom-color:var(--color-gray-dark-extra)}.dark ._container_1i9tc_1 ._header_1i9tc_112 ._titleBar_1i9tc_7{background-color:var(--color-primary-dark);border-bottom-color:var(--color-gray-dark-extra)}.dark ._container_1i9tc_1 ._header_1i9tc_112 ._navButton_1i9tc_19{color:var(--color-white)}.dark ._container_1i9tc_1 ._header_1i9tc_112 ._headings_1i9tc_27{color:var(--color-white);background-color:var(--color-black);border-right:1px solid var(--color-gray-dark-extra);border-bottom:none;border-left:1px solid var(--color-gray-dark-extra)}.dark ._container_1i9tc_1 ._cell_1i9tc_45{background-color:var(--color-black);box-shadow:0 0 0 .2px var(--color-gray-dark) inset}.dark ._container_1i9tc_1 ._cell_1i9tc_45 ._cellDate_1i9tc_56{color:var(--color-white)}.dark ._container_1i9tc_1 ._cell_1i9tc_45._outOfRange_1i9tc_62 ._cellDate_1i9tc_56{color:var(--color-gray-dark)}
|
|
1
|
+
._container_1i9tc_1{border:1px solid var(--color-gray);border-radius:8px;width:100%;overflow:hidden}._container_1i9tc_1 ._titleBar_1i9tc_7{background-color:var(--color-gray-light-extra);border-bottom:1px solid var(--color-gray);border-top-left-radius:8px;border-top-right-radius:8px;justify-content:space-between;align-items:center;height:40px;padding:8px;font-weight:700;display:flex}._container_1i9tc_1 ._titleBar_1i9tc_7 ._navButton_1i9tc_19{cursor:pointer;background:0 0;border:none;padding:0 8px;font-size:1.5rem;font-weight:700}._container_1i9tc_1 ._headings_1i9tc_27{border-bottom:1px solid var(--color-gray);grid-template-columns:repeat(7,1fr);height:37px;display:grid}._container_1i9tc_1 ._headings_1i9tc_27 ._weekday_1i9tc_33{text-transform:capitalize;justify-content:center;align-items:center;display:flex}._container_1i9tc_1 ._body_1i9tc_39{grid-template-columns:repeat(7,1fr);grid-auto-rows:minmax(72px,auto);gap:0;display:grid}._container_1i9tc_1 ._cell_1i9tc_45{background-color:var(--color-white);min-height:72px;box-shadow:0 0 0 .2px var(--color-gray) inset;flex-direction:column;justify-content:flex-start;align-items:center;gap:2px;padding:2px;display:flex}._container_1i9tc_1 ._cell_1i9tc_45._today_1i9tc_56 ._cellDate_1i9tc_56{font-weight:700}._container_1i9tc_1 ._cell_1i9tc_45[data-choose=true]{cursor:pointer}._container_1i9tc_1 ._cell_1i9tc_45._outOfRange_1i9tc_62{cursor:not-allowed}._container_1i9tc_1 ._cell_1i9tc_45._outOfRange_1i9tc_62 ._cellDate_1i9tc_56{color:var(--color-gray)}._container_1i9tc_1 ._cellDate_1i9tc_56{justify-content:center;align-items:center;display:flex}._container_1i9tc_1 ._cellEvents_1i9tc_73{flex-direction:column;justify-content:flex-start;align-items:center;gap:4px;max-height:calc(100% - 24px);padding-bottom:6px;display:flex}._container_1i9tc_1 ._event_1i9tc_82{cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;border:none;border-radius:12px;justify-content:center;align-items:center;width:36px;height:36px;padding:0;display:flex}._container_1i9tc_1 ._title_1i9tc_7{width:100%;height:100%;color:var(--color-gray-light);justify-content:center;align-items:center;font-size:1.125rem;font-weight:700;line-height:1;display:flex}.dark ._container_1i9tc_1{border-color:var(--color-gray-dark-extra)}.dark ._container_1i9tc_1 ._header_1i9tc_112{color:var(--color-white);background-color:var(--color-primary-dark);border-bottom-color:var(--color-gray-dark-extra)}.dark ._container_1i9tc_1 ._header_1i9tc_112 ._titleBar_1i9tc_7{background-color:var(--color-primary-dark);border-bottom-color:var(--color-gray-dark-extra)}.dark ._container_1i9tc_1 ._header_1i9tc_112 ._navButton_1i9tc_19{color:var(--color-white)}.dark ._container_1i9tc_1 ._header_1i9tc_112 ._headings_1i9tc_27{color:var(--color-white);background-color:var(--color-black);border-right:1px solid var(--color-gray-dark-extra);border-bottom:none;border-left:1px solid var(--color-gray-dark-extra)}.dark ._container_1i9tc_1 ._cell_1i9tc_45{background-color:var(--color-black);box-shadow:0 0 0 .2px var(--color-gray-dark) inset}.dark ._container_1i9tc_1 ._cell_1i9tc_45 ._cellDate_1i9tc_56{color:var(--color-white)}.dark ._container_1i9tc_1 ._cell_1i9tc_45._outOfRange_1i9tc_62 ._cellDate_1i9tc_56{color:var(--color-gray-dark)}.slide-right-enter-active,.slide-right-leave-active,.slide-left-enter-active,.slide-left-leave-active{transition:all .2s}.slide-right-enter-from,.slide-left-leave-to{opacity:0;transform:translate(20px)}.slide-right-leave-to,.slide-left-enter-from{opacity:0;transform:translate(-20px)}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./UiCalendar.css";
|
|
2
2
|
import { t as e } from "../_plugin-vue_export-helper-BTgDAbhb.js";
|
|
3
|
-
import { Fragment as t,
|
|
3
|
+
import { Fragment as t, Transition as n, computed as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, onBeforeMount as u, openBlock as d, renderList as f, shallowRef as p, toDisplayString as m, withCtx as h, withModifiers as g } from "vue";
|
|
4
4
|
//#region src/components/UiCalendar/UiCalendar.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var
|
|
5
|
+
var _ = ["onClick", "data-choose"], v = ["onClick"], y = /* @__PURE__ */ e(/* @__PURE__ */ s({
|
|
6
6
|
__name: "UiCalendar",
|
|
7
7
|
props: {
|
|
8
8
|
isDisablePastDates: { type: Boolean },
|
|
@@ -14,26 +14,26 @@ var m = ["onClick", "data-choose"], h = ["onClick"], g = /* @__PURE__ */ e(/* @_
|
|
|
14
14
|
"eventClick",
|
|
15
15
|
"chooseDate"
|
|
16
16
|
],
|
|
17
|
-
setup(e, { emit:
|
|
18
|
-
let
|
|
17
|
+
setup(e, { emit: s }) {
|
|
18
|
+
let y = e, b = s, x = p(/* @__PURE__ */ new Date()), S = p(0), C = r(() => {
|
|
19
19
|
let e = /* @__PURE__ */ new Date();
|
|
20
20
|
return e.setHours(0, 0, 0, 0), e;
|
|
21
|
-
}),
|
|
22
|
-
let e =
|
|
21
|
+
}), w = r(() => new Date(x.value.getFullYear(), x.value.getMonth(), 1)), T = r(() => {
|
|
22
|
+
let e = w.value.toLocaleDateString(y.lang, {
|
|
23
23
|
month: "long",
|
|
24
24
|
year: "numeric"
|
|
25
25
|
});
|
|
26
|
-
return e.length > 0 && (e = e.charAt(0).toUpperCase() + e.slice(1)),
|
|
27
|
-
}),
|
|
28
|
-
let e = new Date(
|
|
26
|
+
return e.length > 0 && (e = e.charAt(0).toUpperCase() + e.slice(1)), y.lang === "ru" && (e = e.replace(/ г\.$/, "")), e;
|
|
27
|
+
}), E = r(() => {
|
|
28
|
+
let e = new Date(w.value);
|
|
29
29
|
e.setDate(1);
|
|
30
30
|
let t = (e.getDay() + 6) % 7;
|
|
31
31
|
return e.setDate(e.getDate() - t), Array.from({ length: 7 }, (t, n) => {
|
|
32
32
|
let r = new Date(e);
|
|
33
|
-
return r.setDate(e.getDate() + n), r.toLocaleDateString(
|
|
33
|
+
return r.setDate(e.getDate() + n), r.toLocaleDateString(y.lang, { weekday: "short" });
|
|
34
34
|
});
|
|
35
|
-
}),
|
|
36
|
-
let e = new Date(
|
|
35
|
+
}), D = r(() => {
|
|
36
|
+
let e = new Date(x.value.getFullYear(), x.value.getMonth(), 1), t = new Date(x.value.getFullYear(), x.value.getMonth() + 1, 0), n = (e.getDay() + 6) % 7, r = new Date(e);
|
|
37
37
|
r.setDate(e.getDate() - n);
|
|
38
38
|
let i = (7 - t.getDay()) % 7, a = new Date(t);
|
|
39
39
|
a.setDate(t.getDate() + i);
|
|
@@ -44,72 +44,81 @@ var m = ["onClick", "data-choose"], h = ["onClick"], g = /* @__PURE__ */ e(/* @_
|
|
|
44
44
|
}
|
|
45
45
|
return s;
|
|
46
46
|
});
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
dateFrom:
|
|
50
|
-
dateTo: new Date(
|
|
47
|
+
function O() {
|
|
48
|
+
b("update", {
|
|
49
|
+
dateFrom: D.value[0],
|
|
50
|
+
dateTo: new Date(D.value.at(-1)?.setHours(23, 59, 59))
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
return
|
|
53
|
+
function k(e) {
|
|
54
|
+
return y.events.filter((t) => {
|
|
55
55
|
if (!t.start) return !1;
|
|
56
56
|
let n = new Date(t.start);
|
|
57
57
|
return n.getDate() === e.getDate() && n.getMonth() === e.getMonth() && n.getFullYear() === e.getFullYear();
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
return e.toDateString() ===
|
|
60
|
+
function A(e) {
|
|
61
|
+
return e.toDateString() === C.value.toDateString();
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
if (
|
|
63
|
+
function j(e) {
|
|
64
|
+
if (y.isDisablePastDates) {
|
|
65
65
|
let t = new Date(e);
|
|
66
|
-
if (t.setHours(0, 0, 0, 0), t <
|
|
66
|
+
if (t.setHours(0, 0, 0, 0), t < C.value) return !0;
|
|
67
67
|
}
|
|
68
68
|
return !1;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
70
|
+
function M() {
|
|
71
|
+
S.value = -1, x.value = new Date(x.value.getFullYear(), x.value.getMonth() - 1, 1), O();
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
|
|
73
|
+
function N() {
|
|
74
|
+
S.value = 1, x.value = new Date(x.value.getFullYear(), x.value.getMonth() + 1, 1), O();
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
|
|
76
|
+
function P(e) {
|
|
77
|
+
b("eventClick", e);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
79
|
+
function F(e) {
|
|
80
|
+
j(e) || b("chooseDate", e);
|
|
81
81
|
}
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
}), (e,
|
|
85
|
-
|
|
86
|
-
onClick:
|
|
87
|
-
class:
|
|
82
|
+
return u(() => {
|
|
83
|
+
O();
|
|
84
|
+
}), (e, r) => (d(), i("div", { class: c(e.$style.container) }, [a("div", { class: c(e.$style.header) }, [a("div", { class: c(e.$style.titleBar) }, [
|
|
85
|
+
a("button", {
|
|
86
|
+
onClick: M,
|
|
87
|
+
class: c(e.$style.navButton),
|
|
88
88
|
type: "button"
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
onClick:
|
|
93
|
-
class:
|
|
89
|
+
}, m("<"), 2),
|
|
90
|
+
a("span", null, m(T.value), 1),
|
|
91
|
+
a("button", {
|
|
92
|
+
onClick: N,
|
|
93
|
+
class: c(e.$style.navButton),
|
|
94
94
|
type: "button"
|
|
95
|
-
},
|
|
96
|
-
], 2),
|
|
95
|
+
}, m(">"), 2)
|
|
96
|
+
], 2), a("div", { class: c(e.$style.headings) }, [(d(!0), i(t, null, f(E.value, (t) => (d(), i("div", {
|
|
97
97
|
key: t,
|
|
98
|
-
class:
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
98
|
+
class: c(e.$style.weekday)
|
|
99
|
+
}, m(t), 3))), 128))], 2)], 2), o(n, {
|
|
100
|
+
name: S.value > 0 ? "slide-right" : "slide-left",
|
|
101
|
+
mode: "out-in"
|
|
102
|
+
}, {
|
|
103
|
+
default: h(() => [(d(), i("div", {
|
|
104
|
+
key: w.value.toString(),
|
|
105
|
+
class: c(e.$style.body)
|
|
106
|
+
}, [(d(!0), i(t, null, f(D.value, (n, r) => (d(), i("div", {
|
|
107
|
+
key: r,
|
|
108
|
+
class: c([e.$style.cell, {
|
|
109
|
+
[e.$style.today]: A(n),
|
|
110
|
+
[e.$style.outOfRange]: j(n)
|
|
111
|
+
}]),
|
|
112
|
+
onClick: (e) => F(n),
|
|
113
|
+
"data-choose": y.isDisablePastDates
|
|
114
|
+
}, [a("div", { class: c(e.$style.cellDate) }, m(n.getDate()), 3), a("div", { class: c(e.$style.cellEvents) }, [(d(!0), i(t, null, f(k(n), (t) => (d(), i("div", {
|
|
115
|
+
key: t.id,
|
|
116
|
+
class: c(e.$style.event),
|
|
117
|
+
style: l({ background: t.color }),
|
|
118
|
+
onClick: g((e) => P(t), ["stop"])
|
|
119
|
+
}, [a("div", { class: c(e.$style.title) }, m(t.title), 3)], 14, v))), 128))], 2)], 10, _))), 128))], 2))]),
|
|
120
|
+
_: 1
|
|
121
|
+
}, 8, ["name"])], 2));
|
|
113
122
|
}
|
|
114
123
|
}), [["__cssModules", { $style: {
|
|
115
124
|
container: "_container_1i9tc_1",
|
|
@@ -128,4 +137,4 @@ var m = ["onClick", "data-choose"], h = ["onClick"], g = /* @__PURE__ */ e(/* @_
|
|
|
128
137
|
header: "_header_1i9tc_112"
|
|
129
138
|
} }]]);
|
|
130
139
|
//#endregion
|
|
131
|
-
export {
|
|
140
|
+
export { y as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._container_11g5d_1{border:1px solid var(--color-gray);border-radius:16px;flex-direction:column;width:100%;display:flex}._container_11g5d_1:focus-within{border:1px solid var(--color-primary)}._container_11g5d_1:hover{cursor:text}._container_11g5d_1:hover:not(:focus-within){border:1px solid var(--color-gray-dark-extra)}._actions_11g5d_18{border-bottom:1px solid var(--color-gray);gap:4px;padding:4px;display:flex}._action_11g5d_18{cursor:pointer;background-color:var(--color-transparent);border:none;border-radius:8px;justify-content:center;align-items:center;min-width:32px;padding:8px;font-weight:700;display:flex}._action_11g5d_18:hover{background-color:var(--color-primary-light)}._action_11g5d_18:disabled{cursor:not-allowed;background-color:var(--color-transparent);opacity:.5}._editor_11g5d_46{overflow-wrap:break-word;white-space:pre-wrap;border:1px solid var(--color-gray);border-bottom-right-radius:16px;border-bottom-left-radius:16px;outline:none;min-height:100px;padding:8px 16px;font-size:1rem;overflow-y:auto}._editor_11g5d_46 h2{font-size:1.5rem;font-weight:700}._editor_11g5d_46 h3{font-size:1.25rem;font-weight:700}._editor_11g5d_46 strong{font-weight:700}._editor_11g5d_46 em{font-style:italic}._editor_11g5d_46 p{margin:0}.dark ._container_11g5d_1{background-color:var(--color-gray-dark);border:1px solid var(--color-gray-dark-extra)}.dark ._editor_11g5d_46{color:var(--color-black)}
|
|
@@ -5,5 +5,7 @@ declare const _default: import('vue').DefineComponent<IProps, {}, {}, {}, {}, im
|
|
|
5
5
|
"update:modelValue": (value?: string | undefined) => any;
|
|
6
6
|
}, string, import('vue').PublicProps, Readonly<IProps> & Readonly<{
|
|
7
7
|
"onUpdate:modelValue"?: ((value?: string | undefined) => any) | undefined;
|
|
8
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
8
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
9
|
+
editorRef: HTMLDivElement;
|
|
10
|
+
}, HTMLDivElement>;
|
|
9
11
|
export default _default;
|