mhz-ui 1.3.26 → 1.3.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/UiCalendar/UiCalendar.js +5 -5
- package/dist/UiCheckbox/UiCheckbox.js +19 -19
- package/dist/UiInput/UiInput.js +1 -1
- package/dist/UiModal/UiModal.css +1 -1
- package/dist/UiModal/UiModal.js +16 -16
- package/dist/UiSearch/UiSearch.js +12 -12
- package/dist/UiSelect/UiSelect.js +45 -45
- package/dist/UiSlider/UiSlider.js +12 -12
- package/dist/UiTable/UiTable.js +5 -5
- package/dist/UiUpload/UiUpload.js +6 -6
- package/package.json +18 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./UiCalendar.css";
|
|
2
|
-
import { defineComponent as U,
|
|
2
|
+
import { defineComponent as U, shallowRef as H, computed as D, onBeforeMount as L, openBlock as c, createElementBlock as u, normalizeClass as a, createElementVNode as l, toDisplayString as d, Fragment as h, renderList as w, withModifiers as P, normalizeStyle as z } from "vue";
|
|
3
3
|
import { _ as A } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const N = ["onClick", "data-choose"], V = ["onClick"], W = /* @__PURE__ */ U({
|
|
5
5
|
__name: "UiCalendar",
|
|
@@ -67,10 +67,10 @@ const N = ["onClick", "data-choose"], V = ["onClick"], W = /* @__PURE__ */ U({
|
|
|
67
67
|
function Y() {
|
|
68
68
|
s.value = new Date(s.value.getFullYear(), s.value.getMonth() + 1, 1), v();
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function R(e) {
|
|
71
71
|
y("eventClick", e);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function S(e) {
|
|
74
74
|
k(e) || y("chooseDate", e);
|
|
75
75
|
}
|
|
76
76
|
return L(() => {
|
|
@@ -111,7 +111,7 @@ const N = ["onClick", "data-choose"], V = ["onClick"], W = /* @__PURE__ */ U({
|
|
|
111
111
|
(c(!0), u(h, null, w(g.value, (n, r) => (c(), u("div", {
|
|
112
112
|
key: r,
|
|
113
113
|
class: a([e.$style.cell, { [e.$style.today]: F(n), [e.$style.outOfRange]: k(n) }]),
|
|
114
|
-
onClick: (o) =>
|
|
114
|
+
onClick: (o) => S(n),
|
|
115
115
|
"data-choose": i.isDisablePastDates
|
|
116
116
|
}, [
|
|
117
117
|
l("div", {
|
|
@@ -124,7 +124,7 @@ const N = ["onClick", "data-choose"], V = ["onClick"], W = /* @__PURE__ */ U({
|
|
|
124
124
|
key: o.id,
|
|
125
125
|
class: a(e.$style.event),
|
|
126
126
|
style: z({ background: o.color }),
|
|
127
|
-
onClick: P((f) =>
|
|
127
|
+
onClick: P((f) => R(o), ["stop"])
|
|
128
128
|
}, [
|
|
129
129
|
l("div", {
|
|
130
130
|
class: a(e.$style.title)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./UiCheckbox.css";
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as y, shallowRef as _, openBlock as a, createElementBlock as t, normalizeClass as s, withModifiers as k, toDisplayString as r, createCommentVNode as i, createElementVNode as d, withKeys as m } from "vue";
|
|
3
3
|
import { _ as v } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
const c = !1, u = "", S = ["data-disabled", "data-switcher"], w = ["value", "checked", "disabled"], $ = ["data-switcher", "data-disabled", "data-error"], L = /* @__PURE__ */
|
|
4
|
+
const c = !1, u = "", S = ["data-disabled", "data-switcher"], w = ["value", "checked", "disabled"], $ = ["data-switcher", "data-disabled", "data-error"], L = /* @__PURE__ */ y({
|
|
5
5
|
__name: "UiCheckbox",
|
|
6
6
|
props: {
|
|
7
7
|
initialValue: { type: [Boolean, String, Number], default: c },
|
|
@@ -17,39 +17,39 @@ const c = !1, u = "", S = ["data-disabled", "data-switcher"], w = ["value", "che
|
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
18
|
setup(b, { emit: f }) {
|
|
19
19
|
const e = b, p = f, n = _();
|
|
20
|
-
function
|
|
20
|
+
function h() {
|
|
21
21
|
if (n.value) {
|
|
22
22
|
const l = n.value.checked ? e.initialValue || !0 : !1;
|
|
23
23
|
p("update:modelValue", l);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
return (l,
|
|
27
|
-
onClick:
|
|
26
|
+
return (l, o) => (a(), t("label", {
|
|
27
|
+
onClick: o[1] || (o[1] = k(() => {
|
|
28
28
|
}, ["stop"])),
|
|
29
29
|
"data-disabled": e.isDisabled,
|
|
30
30
|
class: s(l.$style.checkbox),
|
|
31
31
|
"data-switcher": e.isSwitcher
|
|
32
32
|
}, [
|
|
33
|
-
e.error ? (
|
|
33
|
+
e.error ? (a(), t("span", {
|
|
34
34
|
key: 0,
|
|
35
35
|
class: s(l.$style.required)
|
|
36
|
-
},
|
|
37
|
-
e.label ? (
|
|
36
|
+
}, r(e.error), 3)) : i("", !0),
|
|
37
|
+
e.label ? (a(), t("span", {
|
|
38
38
|
key: 1,
|
|
39
39
|
class: s(l.$style.label)
|
|
40
40
|
}, [
|
|
41
|
-
d("span", null,
|
|
42
|
-
e.labelSub ? (
|
|
41
|
+
d("span", null, r(e.label), 1),
|
|
42
|
+
e.labelSub ? (a(), t("span", {
|
|
43
43
|
key: 0,
|
|
44
44
|
class: s(l.$style.labelSub)
|
|
45
|
-
},
|
|
46
|
-
e.isRequired ? (
|
|
45
|
+
}, r(e.labelSub), 3)) : i("", !0),
|
|
46
|
+
e.isRequired ? (a(), t("span", {
|
|
47
47
|
key: 1,
|
|
48
48
|
class: s(l.$style.required)
|
|
49
49
|
}, "*", 2)) : i("", !0)
|
|
50
50
|
], 2)) : i("", !0),
|
|
51
51
|
d("input", {
|
|
52
|
-
onChange:
|
|
52
|
+
onChange: h,
|
|
53
53
|
type: "checkbox",
|
|
54
54
|
ref_key: "checkbox",
|
|
55
55
|
ref: n,
|
|
@@ -60,28 +60,28 @@ const c = !1, u = "", S = ["data-disabled", "data-switcher"], w = ["value", "che
|
|
|
60
60
|
tabindex: "-1"
|
|
61
61
|
}, null, 42, w),
|
|
62
62
|
d("div", {
|
|
63
|
-
onKeydown:
|
|
63
|
+
onKeydown: o[0] || (o[0] = m((N) => n.value?.click(), ["space"])),
|
|
64
64
|
"data-switcher": e.isSwitcher,
|
|
65
65
|
"data-disabled": e.isDisabled,
|
|
66
66
|
"data-error": !!e.error,
|
|
67
67
|
class: s(l.$style.fake),
|
|
68
68
|
tabindex: "0"
|
|
69
69
|
}, [
|
|
70
|
-
e.isSwitcher ? i("", !0) : (
|
|
70
|
+
e.isSwitcher ? i("", !0) : (a(), t("div", {
|
|
71
71
|
key: 0,
|
|
72
72
|
class: s([l.$style.line, l.$style.leftLine])
|
|
73
73
|
}, null, 2)),
|
|
74
|
-
e.isSwitcher ? i("", !0) : (
|
|
74
|
+
e.isSwitcher ? i("", !0) : (a(), t("div", {
|
|
75
75
|
key: 1,
|
|
76
76
|
class: s([l.$style.line, l.$style.rightLine])
|
|
77
77
|
}, null, 2))
|
|
78
78
|
], 42, $),
|
|
79
|
-
e.labelSwitcher ? (
|
|
79
|
+
e.labelSwitcher ? (a(), t("span", {
|
|
80
80
|
key: 2,
|
|
81
81
|
class: s(l.$style.label)
|
|
82
82
|
}, [
|
|
83
|
-
d("span", null,
|
|
84
|
-
e.isRequired ? (
|
|
83
|
+
d("span", null, r(e.labelSwitcher), 1),
|
|
84
|
+
e.isRequired ? (a(), t("span", {
|
|
85
85
|
key: 0,
|
|
86
86
|
class: s(l.$style.required)
|
|
87
87
|
}, "*", 2)) : i("", !0)
|
package/dist/UiInput/UiInput.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./UiInput.css";
|
|
2
|
-
import { openBlock as a, createElementBlock as d, createElementVNode as n, defineComponent as h,
|
|
2
|
+
import { openBlock as a, createElementBlock as d, createElementVNode as n, defineComponent as h, shallowRef as p, computed as C, onMounted as g, nextTick as _, normalizeClass as m, withKeys as z, mergeProps as k, createBlock as x, resolveDynamicComponent as B, createCommentVNode as M } from "vue";
|
|
3
3
|
import { _ as b } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const I = {
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
package/dist/UiModal/UiModal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._backdrop_4wslz_1{position:fixed;inset:0;z-index:998;display:flex;align-items:center;justify-content:center;background-color:var(--color-gray-transparent)}._dialog_4wslz_11{z-index:999;padding:0;outline:none;background-color:var(--color-white);border:none;border-radius:16px}._modal_4wslz_20{display:flex;flex-direction:column;gap:12px;width:var(--
|
|
1
|
+
._backdrop_4wslz_1{position:fixed;inset:0;z-index:998;display:flex;align-items:center;justify-content:center;background-color:var(--color-gray-transparent)}._dialog_4wslz_11{z-index:999;padding:0;outline:none;background-color:var(--color-white);border:none;border-radius:16px}._modal_4wslz_20{display:flex;flex-direction:column;gap:12px;width:var(--v0f9e4505);max-width:100%;height:auto;min-height:200px;padding:24px;outline:none;box-shadow:0 0 16px 0 var(--color-gray-transparent)}._modal_4wslz_20[data-scrollable=true]{height:64dvh;overflow-y:auto}._header_4wslz_37{display:flex;justify-content:flex-end}._buttons_4wslz_42{display:flex;gap:16px}.dark ._modal_4wslz_20{background-color:var(--color-black);box-shadow:0 0 16px 0 var(--color-black-transparent)}.dark ._slot_4wslz_51{color:var(--color-white)}
|
package/dist/UiModal/UiModal.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./UiModal.css";
|
|
2
|
-
import { defineComponent as V, useCssVars as $, computed as z,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { M as
|
|
2
|
+
import { defineComponent as V, useCssVars as $, computed as z, shallowRef as B, onMounted as S, watch as E, openBlock as n, createBlock as N, Teleport as U, createElementBlock as c, normalizeClass as t, createElementVNode as a, mergeProps as R, withModifiers as u, createVNode as d, renderSlot as T, withCtx as m, createTextVNode as f, toDisplayString as p, unref as _, createCommentVNode as y, nextTick as A } from "vue";
|
|
3
|
+
import w from "../UiButton/UiButton.js";
|
|
4
|
+
import D from "../UiClose/UiClose.js";
|
|
5
|
+
import { M as g } from "../index-DajWja1y.js";
|
|
6
6
|
import { _ as x } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
const G = ["data-scrollable"], P = /* @__PURE__ */ V({
|
|
8
8
|
inheritAttrs: !1,
|
|
@@ -17,15 +17,15 @@ const G = ["data-scrollable"], P = /* @__PURE__ */ V({
|
|
|
17
17
|
emits: ["update:modelValue", "confirm"],
|
|
18
18
|
setup(h, { emit: k, attrs: C }) {
|
|
19
19
|
$((e) => ({
|
|
20
|
-
|
|
20
|
+
v0f9e4505: b.value
|
|
21
21
|
}));
|
|
22
22
|
const o = h, r = k, b = z(() => `${o.width}px`), s = B(null);
|
|
23
|
-
function
|
|
24
|
-
|
|
23
|
+
function v() {
|
|
24
|
+
A(() => {
|
|
25
25
|
s.value?.open ? s.value.close() : s.value?.showModal();
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function M() {
|
|
29
29
|
r("confirm"), l();
|
|
30
30
|
}
|
|
31
31
|
function l() {
|
|
@@ -35,7 +35,7 @@ const G = ["data-scrollable"], P = /* @__PURE__ */ V({
|
|
|
35
35
|
E(
|
|
36
36
|
() => o.modelValue,
|
|
37
37
|
() => {
|
|
38
|
-
|
|
38
|
+
v();
|
|
39
39
|
},
|
|
40
40
|
{ immediate: !0 }
|
|
41
41
|
);
|
|
@@ -45,7 +45,7 @@ const G = ["data-scrollable"], P = /* @__PURE__ */ V({
|
|
|
45
45
|
class: t(e.$style.backdrop),
|
|
46
46
|
onMousedown: l
|
|
47
47
|
}, [
|
|
48
|
-
a("dialog",
|
|
48
|
+
a("dialog", R({
|
|
49
49
|
ref_key: "dialogRef",
|
|
50
50
|
ref: s,
|
|
51
51
|
class: e.$style.dialog,
|
|
@@ -60,29 +60,29 @@ const G = ["data-scrollable"], P = /* @__PURE__ */ V({
|
|
|
60
60
|
a("div", {
|
|
61
61
|
class: t(e.$style.header)
|
|
62
62
|
}, [
|
|
63
|
-
d(
|
|
63
|
+
d(D, { onClick: l })
|
|
64
64
|
], 2),
|
|
65
65
|
a("div", {
|
|
66
66
|
class: t(e.$style.slot)
|
|
67
67
|
}, [
|
|
68
|
-
|
|
68
|
+
T(e.$slots, "default")
|
|
69
69
|
], 2),
|
|
70
70
|
o.isConfirm ? (n(), c("div", {
|
|
71
71
|
key: 0,
|
|
72
72
|
class: t(e.$style.buttons)
|
|
73
73
|
}, [
|
|
74
|
-
d(
|
|
74
|
+
d(w, { onClick: M }, {
|
|
75
75
|
default: m(() => [
|
|
76
|
-
f(p(_(
|
|
76
|
+
f(p(_(g)[o.lang].confirm), 1)
|
|
77
77
|
]),
|
|
78
78
|
_: 1
|
|
79
79
|
}),
|
|
80
|
-
d(
|
|
80
|
+
d(w, {
|
|
81
81
|
layout: "secondary",
|
|
82
82
|
onClick: l
|
|
83
83
|
}, {
|
|
84
84
|
default: m(() => [
|
|
85
|
-
f(p(_(
|
|
85
|
+
f(p(_(g)[o.lang].cancel), 1)
|
|
86
86
|
]),
|
|
87
87
|
_: 1
|
|
88
88
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./UiSearch.css";
|
|
2
|
-
import { openBlock as o, createElementBlock as r, createElementVNode as M, defineComponent as N,
|
|
2
|
+
import { openBlock as o, createElementBlock as r, createElementVNode as M, defineComponent as N, shallowRef as I, computed as T, normalizeClass as S, createVNode as R, unref as w, withKeys as $, Fragment as p, createTextVNode as v, toDisplayString as V, createCommentVNode as g, renderList as C, createBlock as z, resolveDynamicComponent as B, withCtx as O } from "vue";
|
|
3
3
|
import { RouterLink as U } from "vue-router";
|
|
4
4
|
import { o as D } from "../index-Dvnq-rTV.js";
|
|
5
5
|
import F from "../UiInput/UiInput.js";
|
|
@@ -89,12 +89,12 @@ const G = { render: j }, Y = 300, q = /* @__PURE__ */ N({
|
|
|
89
89
|
ref_key: "containerElement",
|
|
90
90
|
ref: _
|
|
91
91
|
}, [
|
|
92
|
-
|
|
92
|
+
R(F, {
|
|
93
93
|
modelValue: e.modelValue,
|
|
94
|
-
"onUpdate:modelValue": i[0] || (i[0] = async (u) => await
|
|
94
|
+
"onUpdate:modelValue": i[0] || (i[0] = async (u) => await w(f)(u.toString())),
|
|
95
95
|
onClick: c,
|
|
96
|
-
onKeyup:
|
|
97
|
-
appendIcon:
|
|
96
|
+
onKeyup: $(l, ["esc"]),
|
|
97
|
+
appendIcon: w(G),
|
|
98
98
|
placeholder: "Search"
|
|
99
99
|
}, null, 8, ["modelValue", "appendIcon"]),
|
|
100
100
|
n.value && e.modelValue.length > 0 ? (o(), r("div", {
|
|
@@ -102,13 +102,13 @@ const G = { render: j }, Y = 300, q = /* @__PURE__ */ N({
|
|
|
102
102
|
class: S(t.$style.results)
|
|
103
103
|
}, [
|
|
104
104
|
e.modelValue.length < 3 ? (o(), r(p, { key: 0 }, [
|
|
105
|
-
|
|
105
|
+
v(V(w(E)[e.lang].enterMoreSymbols), 1)
|
|
106
106
|
], 64)) : g("", !0),
|
|
107
107
|
e.modelValue.length > 2 && !e.isSuccess ? (o(), r(p, { key: 1 }, [
|
|
108
|
-
|
|
108
|
+
v(V(w(E)[e.lang].loading), 1)
|
|
109
109
|
], 64)) : g("", !0),
|
|
110
110
|
e.modelValue.length > 2 && !m.value && e.isSuccess ? (o(), r(p, { key: 2 }, [
|
|
111
|
-
|
|
111
|
+
v(V(w(E)[e.lang].noResults), 1)
|
|
112
112
|
], 64)) : g("", !0),
|
|
113
113
|
e.modelValue.length > 2 && m.value && e.isSuccess ? (o(!0), r(p, { key: 3 }, C(e.searchScheme, (u) => (o(), r("div", {
|
|
114
114
|
key: u.type,
|
|
@@ -117,15 +117,15 @@ const G = { render: j }, Y = 300, q = /* @__PURE__ */ N({
|
|
|
117
117
|
d.results?.[u.type]?.length ? (o(), r(p, { key: 0 }, [
|
|
118
118
|
M("div", {
|
|
119
119
|
class: S(t.$style.type)
|
|
120
|
-
},
|
|
121
|
-
(o(!0), r(p, null, C(d.results[u.type], (k) => (o(), B(
|
|
120
|
+
}, V(u.type) + ":", 3),
|
|
121
|
+
(o(!0), r(p, null, C(d.results[u.type], (k) => (o(), z(B(s.value), {
|
|
122
122
|
key: k._id,
|
|
123
123
|
to: `${u.url}/${k._id}`,
|
|
124
124
|
onClick: h,
|
|
125
125
|
class: S(t.$style.link)
|
|
126
126
|
}, {
|
|
127
|
-
default:
|
|
128
|
-
(o(!0), r(p, null, C(u.labels, (b) => (o(), r("span", { key: b },
|
|
127
|
+
default: O(() => [
|
|
128
|
+
(o(!0), r(p, null, C(u.labels, (b) => (o(), r("span", { key: b }, V(k[b]), 1))), 128))
|
|
129
129
|
]),
|
|
130
130
|
_: 2
|
|
131
131
|
}, 1032, ["to", "class"]))), 128))
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "./UiSelect.css";
|
|
2
|
-
import { openBlock as l, createElementBlock as s, createElementVNode as B, defineComponent as W, ref as
|
|
3
|
-
import { o as
|
|
2
|
+
import { openBlock as l, createElementBlock as s, createElementVNode as B, defineComponent as W, ref as X, shallowRef as d, computed as b, normalizeClass as p, createVNode as M, unref as m, createCommentVNode as F, Fragment as Y, renderList as Z, withKeys as f, withModifiers as D, toDisplayString as T } from "vue";
|
|
3
|
+
import { o as x } from "../index-Dvnq-rTV.js";
|
|
4
4
|
import N from "../UiInput/UiInput.js";
|
|
5
5
|
import { M as O } from "../index-DajWja1y.js";
|
|
6
|
-
import { _ as
|
|
7
|
-
const
|
|
6
|
+
import { _ as ee } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const te = {
|
|
8
8
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9
9
|
width: "16",
|
|
10
10
|
height: "16",
|
|
11
11
|
fill: "none"
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
return l(), s("svg",
|
|
13
|
+
function oe(h, i) {
|
|
14
|
+
return l(), s("svg", te, [...i[0] || (i[0] = [
|
|
15
15
|
B("path", {
|
|
16
16
|
stroke: "#1F1F1F",
|
|
17
17
|
"stroke-linecap": "round",
|
|
@@ -20,14 +20,14 @@ function te(h, i) {
|
|
|
20
20
|
}, null, -1)
|
|
21
21
|
])]);
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const ne = { render: oe }, le = {
|
|
24
24
|
xmlns: "http://www.w3.org/2000/svg",
|
|
25
25
|
width: "16",
|
|
26
26
|
height: "16",
|
|
27
27
|
fill: "none"
|
|
28
28
|
};
|
|
29
|
-
function
|
|
30
|
-
return l(), s("svg",
|
|
29
|
+
function se(h, i) {
|
|
30
|
+
return l(), s("svg", le, [...i[0] || (i[0] = [
|
|
31
31
|
B("path", {
|
|
32
32
|
stroke: "#1F1F1F",
|
|
33
33
|
"stroke-linecap": "round",
|
|
@@ -36,7 +36,7 @@ function le(h, i) {
|
|
|
36
36
|
}, null, -1)
|
|
37
37
|
])]);
|
|
38
38
|
}
|
|
39
|
-
const
|
|
39
|
+
const ie = { render: se }, re = { key: 0 }, ae = ["onClick", "onKeydown", "onMouseenter", "data-current"], j = 240, ue = /* @__PURE__ */ W({
|
|
40
40
|
__name: "UiSelect",
|
|
41
41
|
props: {
|
|
42
42
|
modelValue: { default: void 0 },
|
|
@@ -49,10 +49,10 @@ const se = { render: le }, ie = { key: 0 }, re = ["onClick", "onKeydown", "onMou
|
|
|
49
49
|
},
|
|
50
50
|
emits: ["update:modelValue", "reachedBottom"],
|
|
51
51
|
setup(h, { emit: i }) {
|
|
52
|
-
const t = h, k = i, v =
|
|
52
|
+
const t = h, k = i, v = X(""), u = d(!1), w = d(!1), c = d(), r = d(), g = d(), E = d([]), $ = b(() => {
|
|
53
53
|
const e = t.options?.[0];
|
|
54
54
|
return e != null && typeof e == "object";
|
|
55
|
-
}), I = (e) => e !== null && (typeof e == "string" || typeof e == "number"),
|
|
55
|
+
}), I = (e) => e !== null && (typeof e == "string" || typeof e == "number"), V = b(() => {
|
|
56
56
|
if (!t.options?.length) return [];
|
|
57
57
|
const e = $.value ? [...t.options] : t.options.map((o) => ({ _id: String(o), title: String(o) }));
|
|
58
58
|
return t.isFilter ? e.filter((o) => o.title.toLowerCase().includes(v.value.toLowerCase())) : e;
|
|
@@ -62,39 +62,39 @@ const se = { render: le }, ie = { key: 0 }, re = ["onClick", "onKeydown", "onMou
|
|
|
62
62
|
const e = t.modelValue;
|
|
63
63
|
return t.isLocaleField ? e.title_en ?? "" : e.title ?? "";
|
|
64
64
|
}), H = (e, o) => `${e._id || e.title}-${o}`, K = (e) => t.isLocaleField ? e.title_en : e.title, P = (e) => I(t.modelValue) ? t.modelValue === (e._id || e.title) : t.modelValue ? t.modelValue._id === e._id : !1, _ = (e) => {
|
|
65
|
-
e < 0 || e >=
|
|
66
|
-
}, G = () => k("update:modelValue", void 0),
|
|
67
|
-
|
|
65
|
+
e < 0 || e >= V.value.length || t.isFilter || E.value[e]?.focus();
|
|
66
|
+
}, G = () => k("update:modelValue", void 0), R = () => {
|
|
67
|
+
u.value ? y() : Q();
|
|
68
68
|
}, z = () => {
|
|
69
|
-
if (!
|
|
70
|
-
const e =
|
|
69
|
+
if (!c.value) return !1;
|
|
70
|
+
const e = c.value.closest("dialog");
|
|
71
71
|
if (!e) {
|
|
72
|
-
const
|
|
72
|
+
const L = c.value.getBoundingClientRect(), U = window.innerHeight - L.bottom, J = L.top;
|
|
73
73
|
return U < j && J > U;
|
|
74
74
|
}
|
|
75
|
-
const o = e.getBoundingClientRect(), n =
|
|
75
|
+
const o = e.getBoundingClientRect(), n = c.value.getBoundingClientRect(), a = o.bottom - n.bottom, q = n.top - o.top;
|
|
76
76
|
return a < j && q > a;
|
|
77
77
|
};
|
|
78
78
|
function y() {
|
|
79
|
-
r.value?.removeEventListener("scroll",
|
|
79
|
+
r.value?.removeEventListener("scroll", S, !0), v.value = "", u.value = !1, w.value = !1;
|
|
80
80
|
}
|
|
81
81
|
function Q() {
|
|
82
|
-
t.isDisabled || (
|
|
83
|
-
r.value?.scrollTo(0, 0), _(0), r.value?.addEventListener("scroll",
|
|
82
|
+
t.isDisabled || (w.value = z(), u.value = !0, t.isFilter || setTimeout(() => {
|
|
83
|
+
r.value?.scrollTo(0, 0), _(0), r.value?.addEventListener("scroll", S, !0);
|
|
84
84
|
}, 100));
|
|
85
85
|
}
|
|
86
86
|
function C(e) {
|
|
87
87
|
const o = $.value ? e : e._id || e.title;
|
|
88
88
|
k("update:modelValue", o), y();
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function S() {
|
|
91
91
|
if (!r.value || !g.value) return;
|
|
92
92
|
r.value.getBoundingClientRect().y - g.value.getBoundingClientRect().y - g.value.scrollHeight + r.value.getBoundingClientRect().height > -100 && k("reachedBottom");
|
|
93
93
|
}
|
|
94
|
-
return
|
|
94
|
+
return x(c, y), (e, o) => (l(), s("div", {
|
|
95
95
|
class: p(e.$style.container),
|
|
96
96
|
ref_key: "containerElement",
|
|
97
|
-
ref:
|
|
97
|
+
ref: c
|
|
98
98
|
}, [
|
|
99
99
|
B("div", {
|
|
100
100
|
class: p(e.$style.input)
|
|
@@ -102,12 +102,12 @@ const se = { render: le }, ie = { key: 0 }, re = ["onClick", "onKeydown", "onMou
|
|
|
102
102
|
M(N, {
|
|
103
103
|
modelValue: A.value,
|
|
104
104
|
disabled: t.isDisabled,
|
|
105
|
-
onToggle:
|
|
105
|
+
onToggle: R,
|
|
106
106
|
mode: "select",
|
|
107
107
|
placeholder: m(O)[t.lang].choose,
|
|
108
|
-
appendIcon:
|
|
108
|
+
appendIcon: u.value ? m(ie) : m(ne)
|
|
109
109
|
}, null, 8, ["modelValue", "disabled", "placeholder", "appendIcon"]),
|
|
110
|
-
t.isFilter &&
|
|
110
|
+
t.isFilter && u.value ? (l(), s("div", re, [
|
|
111
111
|
M(N, {
|
|
112
112
|
modelValue: v.value,
|
|
113
113
|
"onUpdate:modelValue": o[0] || (o[0] = (n) => v.value = n),
|
|
@@ -123,18 +123,18 @@ const se = { render: le }, ie = { key: 0 }, re = ["onClick", "onKeydown", "onMou
|
|
|
123
123
|
class: p(e.$style.clear)
|
|
124
124
|
}, " × ", 2)) : F("", !0)
|
|
125
125
|
], 2),
|
|
126
|
-
|
|
126
|
+
u.value ? (l(), s("div", {
|
|
127
127
|
key: 0,
|
|
128
|
-
class: p([e.$style.options, { [e.$style.optionsUp]:
|
|
128
|
+
class: p([e.$style.options, { [e.$style.optionsUp]: w.value }]),
|
|
129
129
|
ref_key: "optionsElement",
|
|
130
130
|
ref: r
|
|
131
131
|
}, [
|
|
132
|
-
|
|
132
|
+
V.value.length > 0 ? (l(), s("div", {
|
|
133
133
|
key: 0,
|
|
134
134
|
ref_key: "optionsInnerElement",
|
|
135
135
|
ref: g
|
|
136
136
|
}, [
|
|
137
|
-
(l(!0), s(
|
|
137
|
+
(l(!0), s(Y, null, Z(V.value, (n, a) => (l(), s("div", {
|
|
138
138
|
key: H(n, a),
|
|
139
139
|
onClick: () => C(n),
|
|
140
140
|
onKeydown: [
|
|
@@ -142,7 +142,7 @@ const se = { render: le }, ie = { key: 0 }, re = ["onClick", "onKeydown", "onMou
|
|
|
142
142
|
f(() => C(n), ["space"]),
|
|
143
143
|
f(D(() => _(a - 1), ["prevent"]), ["up"]),
|
|
144
144
|
f(D(() => _(a + 1), ["prevent"]), ["down"]),
|
|
145
|
-
f(
|
|
145
|
+
f(R, ["esc"])
|
|
146
146
|
],
|
|
147
147
|
onMouseenter: () => _(a),
|
|
148
148
|
class: p(e.$style.option),
|
|
@@ -151,7 +151,7 @@ const se = { render: le }, ie = { key: 0 }, re = ["onClick", "onKeydown", "onMou
|
|
|
151
151
|
ref_key: "optionElement",
|
|
152
152
|
ref: E,
|
|
153
153
|
"data-current": P(n)
|
|
154
|
-
}, T(K(n)), 43,
|
|
154
|
+
}, T(K(n)), 43, ae))), 128))
|
|
155
155
|
], 512)) : (l(), s("div", {
|
|
156
156
|
key: 1,
|
|
157
157
|
onClick: y,
|
|
@@ -161,16 +161,16 @@ const se = { render: le }, ie = { key: 0 }, re = ["onClick", "onKeydown", "onMou
|
|
|
161
161
|
], 2)) : F("", !0)
|
|
162
162
|
], 2));
|
|
163
163
|
}
|
|
164
|
-
}),
|
|
165
|
-
container:
|
|
166
|
-
input:
|
|
167
|
-
clear:
|
|
168
|
-
options:
|
|
169
|
-
optionsUp:
|
|
170
|
-
option:
|
|
171
|
-
},
|
|
172
|
-
$style:
|
|
173
|
-
},
|
|
164
|
+
}), ce = "_container_1m448_1", de = "_input_1m448_10", pe = "_clear_1m448_16", me = "_options_1m448_31", fe = "_optionsUp_1m448_44", ve = "_option_1m448_31", ge = {
|
|
165
|
+
container: ce,
|
|
166
|
+
input: de,
|
|
167
|
+
clear: pe,
|
|
168
|
+
options: me,
|
|
169
|
+
optionsUp: fe,
|
|
170
|
+
option: ve
|
|
171
|
+
}, _e = {
|
|
172
|
+
$style: ge
|
|
173
|
+
}, Ce = /* @__PURE__ */ ee(ue, [["__cssModules", _e]]);
|
|
174
174
|
export {
|
|
175
|
-
|
|
175
|
+
Ce as default
|
|
176
176
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./UiSlider.css";
|
|
2
|
-
import { defineComponent as u,
|
|
2
|
+
import { defineComponent as u, shallowRef as d, openBlock as i, createElementBlock as c, normalizeClass as l, createElementVNode as a, Fragment as m, renderList as _ } from "vue";
|
|
3
3
|
import { _ as h } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const p = ["onClick", "data-active"], v = ["src", "alt"], $ = ["src", "alt", "data-slide"], b = /* @__PURE__ */ u({
|
|
5
5
|
__name: "UiSlider",
|
|
@@ -11,19 +11,19 @@ const p = ["onClick", "data-active"], v = ["src", "alt"], $ = ["src", "alt", "da
|
|
|
11
11
|
setup(r) {
|
|
12
12
|
const s = r, t = d(0);
|
|
13
13
|
return (e, S) => (i(), c("div", {
|
|
14
|
-
class:
|
|
14
|
+
class: l(e.$style.container)
|
|
15
15
|
}, [
|
|
16
|
-
|
|
17
|
-
class:
|
|
16
|
+
a("div", {
|
|
17
|
+
class: l(e.$style.thumbs)
|
|
18
18
|
}, [
|
|
19
19
|
(i(!0), c(m, null, _(s.thumbs, (o, n) => (i(), c("button", {
|
|
20
20
|
key: o,
|
|
21
|
-
onClick: (
|
|
21
|
+
onClick: (w) => t.value = n,
|
|
22
22
|
type: "button",
|
|
23
|
-
class:
|
|
23
|
+
class: l(e.$style.thumb),
|
|
24
24
|
"data-active": t.value === n
|
|
25
25
|
}, [
|
|
26
|
-
|
|
26
|
+
a("img", {
|
|
27
27
|
src: s.path ? `${s.path}${o}` : o,
|
|
28
28
|
width: "64",
|
|
29
29
|
height: "64",
|
|
@@ -32,10 +32,10 @@ const p = ["onClick", "data-active"], v = ["src", "alt"], $ = ["src", "alt", "da
|
|
|
32
32
|
}, null, 8, v)
|
|
33
33
|
], 10, p))), 128))
|
|
34
34
|
], 2),
|
|
35
|
-
|
|
36
|
-
class:
|
|
35
|
+
a("div", {
|
|
36
|
+
class: l(e.$style.slide)
|
|
37
37
|
}, [
|
|
38
|
-
|
|
38
|
+
a("img", {
|
|
39
39
|
src: s.path ? `${s.path}${s.slides[t.value]}` : s.slides[t.value],
|
|
40
40
|
alt: `slide-${t.value}`,
|
|
41
41
|
crossorigin: "anonymous",
|
|
@@ -51,7 +51,7 @@ const p = ["onClick", "data-active"], v = ["src", "alt"], $ = ["src", "alt", "da
|
|
|
51
51
|
slide: k
|
|
52
52
|
}, C = {
|
|
53
53
|
$style: z
|
|
54
|
-
},
|
|
54
|
+
}, M = /* @__PURE__ */ h(b, [["__cssModules", C]]);
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
M as default
|
|
57
57
|
};
|
package/dist/UiTable/UiTable.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./UiTable.css";
|
|
2
|
-
import { defineComponent as y,
|
|
2
|
+
import { defineComponent as y, shallowRef as d, onMounted as w, onBeforeUnmount as k, openBlock as o, createElementBlock as n, normalizeClass as a, toDisplayString as _, unref as V, createCommentVNode as p, createElementVNode as s, Fragment as $, renderList as S, renderSlot as B } from "vue";
|
|
3
3
|
import { M as h } from "../index-DajWja1y.js";
|
|
4
4
|
import { _ as M } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const E = ["data-loading"], C = ["onClick", "data-current"], L = ["data-current", "data-loading"], z = ["data-current", "data-loading"], A = /* @__PURE__ */ y({
|
|
@@ -56,7 +56,7 @@ const E = ["data-loading"], C = ["onClick", "data-current"], L = ["data-current"
|
|
|
56
56
|
s("span", null, _(t.title), 1),
|
|
57
57
|
t.value ? (o(), n("button", {
|
|
58
58
|
key: 0,
|
|
59
|
-
onClick: (
|
|
59
|
+
onClick: (j) => v(t.value),
|
|
60
60
|
class: a(e.$style.sort),
|
|
61
61
|
type: "button",
|
|
62
62
|
"data-current": l.modelValue?.value === t.value
|
|
@@ -90,9 +90,9 @@ const E = ["data-loading"], C = ["onClick", "data-current"], L = ["data-current"
|
|
|
90
90
|
label: D,
|
|
91
91
|
sort: F,
|
|
92
92
|
arrow: G
|
|
93
|
-
},
|
|
93
|
+
}, R = {
|
|
94
94
|
$style: I
|
|
95
|
-
},
|
|
95
|
+
}, O = /* @__PURE__ */ M(A, [["__cssModules", R]]);
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
O as default
|
|
98
98
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./UiUpload.css";
|
|
2
|
-
import { openBlock as o, createElementBlock as s, createStaticVNode as M, defineComponent as z,
|
|
2
|
+
import { openBlock as o, createElementBlock as s, createStaticVNode as M, defineComponent as z, shallowRef as b, computed as I, normalizeClass as n, createElementVNode as r, toDisplayString as a, createCommentVNode as d, createVNode as m, unref as u, withCtx as v, createTextVNode as p, Fragment as B, renderList as D, withDirectives as E, vShow as F } from "vue";
|
|
3
3
|
import y from "../UiButton/UiButton.js";
|
|
4
4
|
import { M as g } from "../index-DajWja1y.js";
|
|
5
5
|
import { _ as N } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -17,7 +17,7 @@ function A(_, c) {
|
|
|
17
17
|
const L = { render: A }, h = 10 * 1024 * 1024;
|
|
18
18
|
new File([""], "file1.png");
|
|
19
19
|
new File([""], "file2.png");
|
|
20
|
-
const Q = ["data-error"], U = ["accept", "multiple"],
|
|
20
|
+
const Q = ["data-error"], U = ["accept", "multiple"], R = ["data-label"], x = /* @__PURE__ */ z({
|
|
21
21
|
__name: "UiUpload",
|
|
22
22
|
props: {
|
|
23
23
|
label: { default: void 0 },
|
|
@@ -145,13 +145,13 @@ const Q = ["data-error"], U = ["accept", "multiple"], x = ["data-label"], P = /*
|
|
|
145
145
|
]),
|
|
146
146
|
_: 1
|
|
147
147
|
})
|
|
148
|
-
], 10,
|
|
148
|
+
], 10, R), [
|
|
149
149
|
[F, e.isSingle && e.file || e.files.length > 0]
|
|
150
150
|
])
|
|
151
151
|
], 2));
|
|
152
152
|
}
|
|
153
|
-
}),
|
|
154
|
-
container:
|
|
153
|
+
}), P = "_container_10je3_1", G = "_upload_10je3_6", H = "_addButton_10je3_12", K = "_text_10je3_19", Z = "_input_10je3_26", J = "_name_10je3_30", O = "_file_10je3_38", T = "_error_10je3_44", W = "_uploadButton_10je3_48", X = "_label_10je3_52", Y = {
|
|
154
|
+
container: P,
|
|
155
155
|
upload: G,
|
|
156
156
|
addButton: H,
|
|
157
157
|
text: K,
|
|
@@ -163,7 +163,7 @@ const Q = ["data-error"], U = ["accept", "multiple"], x = ["data-label"], P = /*
|
|
|
163
163
|
label: X
|
|
164
164
|
}, ee = {
|
|
165
165
|
$style: Y
|
|
166
|
-
}, se = /* @__PURE__ */ N(
|
|
166
|
+
}, se = /* @__PURE__ */ N(x, [["__cssModules", ee]]);
|
|
167
167
|
export {
|
|
168
168
|
se as default
|
|
169
169
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mhz-ui",
|
|
3
3
|
"description": "Mhz ui kit",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.27",
|
|
5
5
|
"author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -29,22 +29,22 @@
|
|
|
29
29
|
"@tiptap/starter-kit": "3.19.0",
|
|
30
30
|
"@tiptap/vue-3": "3.19.0",
|
|
31
31
|
"@vueform/slider": "2.1.10",
|
|
32
|
-
"@vueuse/core": "14.2.
|
|
33
|
-
"@vueuse/integrations": "14.2.
|
|
32
|
+
"@vueuse/core": "14.2.1",
|
|
33
|
+
"@vueuse/integrations": "14.2.1",
|
|
34
34
|
"chart.js": "4.5.1",
|
|
35
35
|
"mhz-helpers": "*",
|
|
36
36
|
"perfect-debounce": "2.1.0",
|
|
37
|
-
"vue": "3.6.0-beta.
|
|
37
|
+
"vue": "3.6.0-beta.6",
|
|
38
38
|
"vue-chartjs": "5.3.3",
|
|
39
39
|
"vue-router": "5.0.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@eslint/js": "9.39.2",
|
|
43
|
-
"@storybook/addon-docs": "10.2.
|
|
44
|
-
"@storybook/addon-themes": "10.2.
|
|
45
|
-
"@storybook/vue3": "10.2.
|
|
46
|
-
"@storybook/vue3-vite": "10.2.
|
|
47
|
-
"@types/node": "25.2.
|
|
43
|
+
"@storybook/addon-docs": "10.2.8",
|
|
44
|
+
"@storybook/addon-themes": "10.2.8",
|
|
45
|
+
"@storybook/vue3": "10.2.8",
|
|
46
|
+
"@storybook/vue3-vite": "10.2.8",
|
|
47
|
+
"@types/node": "25.2.3",
|
|
48
48
|
"@vitejs/plugin-vue": "6.0.4",
|
|
49
49
|
"@vitest/coverage-v8": "4.1.0-beta.3",
|
|
50
50
|
"@vue/test-utils": "2.4.6",
|
|
@@ -53,35 +53,35 @@
|
|
|
53
53
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
54
54
|
"eslint-plugin-import-x": "4.16.1",
|
|
55
55
|
"eslint-plugin-prettier": "5.5.5",
|
|
56
|
-
"eslint-plugin-sonarjs": "3.0.
|
|
57
|
-
"eslint-plugin-unicorn": "
|
|
58
|
-
"eslint-plugin-vue": "10.
|
|
56
|
+
"eslint-plugin-sonarjs": "3.0.7",
|
|
57
|
+
"eslint-plugin-unicorn": "63.0.0",
|
|
58
|
+
"eslint-plugin-vue": "10.8.0",
|
|
59
59
|
"globals": "17.3.0",
|
|
60
|
-
"happy-dom": "20.
|
|
60
|
+
"happy-dom": "20.6.1",
|
|
61
61
|
"postcss-html": "1.8.1",
|
|
62
62
|
"postcss-scss": "4.0.9",
|
|
63
63
|
"prettier": "3.8.1",
|
|
64
64
|
"sass-embedded": "1.97.3",
|
|
65
|
-
"storybook": "10.2.
|
|
66
|
-
"stylelint": "17.
|
|
65
|
+
"storybook": "10.2.8",
|
|
66
|
+
"stylelint": "17.3.0",
|
|
67
67
|
"stylelint-config-recess-order": "7.6.1",
|
|
68
68
|
"stylelint-config-recommended-scss": "17.0.0",
|
|
69
69
|
"stylelint-config-recommended-vue": "1.6.1",
|
|
70
70
|
"stylelint-order": "7.0.1",
|
|
71
71
|
"stylelint-prettier": "5.0.3",
|
|
72
72
|
"typescript": "5.9.3",
|
|
73
|
-
"typescript-eslint": "8.
|
|
73
|
+
"typescript-eslint": "8.55.0",
|
|
74
74
|
"vite": "7.3.1",
|
|
75
75
|
"vite-plugin-dts": "4.5.4",
|
|
76
76
|
"vite-plugin-static-copy": "3.2.0",
|
|
77
77
|
"vite-svg-loader": "5.1.0",
|
|
78
78
|
"vitest": "4.1.0-beta.3",
|
|
79
|
-
"vue-eslint-parser": "10.
|
|
79
|
+
"vue-eslint-parser": "10.4.0",
|
|
80
80
|
"vue-linters-config": "0.5.5",
|
|
81
81
|
"vue-tsc": "3.2.4"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"vue": "3.6.0-beta.
|
|
84
|
+
"vue": "3.6.0-beta.6",
|
|
85
85
|
"vue-router": "5.0.2"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|