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 +1 @@
|
|
|
1
|
-
._container_7y6o9_1{position:relative
|
|
1
|
+
._container_7y6o9_1{width:320px;position:relative}._results_7y6o9_6{z-index:2;background-color:var(--color-white);width:100%;max-height:320px;box-shadow:0 0 16px -8px var(--color-black-transparent);border-radius:16px;flex-direction:column;gap:8px;margin-top:8px;padding:16px;display:flex;position:absolute;overflow-y:auto}._resultsInner_7y6o9_22{flex-direction:column;gap:4px;display:flex}._resultsInner_7y6o9_22:empty{display:none}._type_7y6o9_31{text-transform:capitalize;font-weight:700}._link_7y6o9_36{cursor:pointer;gap:4px;text-decoration:none;display:flex}@media (max-width:1260px){._container_7y6o9_1{width:100%}}.dark ._results_7y6o9_6{background-color:var(--color-gray-dark)}.dark ._link_7y6o9_36{color:var(--color-black)}.dark ._link_7y6o9_36:hover{color:var(--color-gray-dark-extra)}
|
|
@@ -1,148 +1,123 @@
|
|
|
1
1
|
import "./UiSearch.css";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
function
|
|
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
|
-
}, m;
|
|
2
|
+
import { t as _plugin_vue_export_helper_default } from "../_plugin-vue_export-helper-Bt71PsSa.js";
|
|
3
|
+
import { t as UiInput_default } from "../UiInput-DHFttLTG.js";
|
|
4
|
+
import { t as MESSAGES } from "../locales-DIKIa9I3.js";
|
|
5
|
+
import { t as onClickOutside } from "../dist-CLA-k87a.js";
|
|
6
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderList, resolveDynamicComponent, toDisplayString, unref, withCtx, withKeys } from "vue";
|
|
7
|
+
import { RouterLink } from "vue-router";
|
|
8
|
+
var DEBOUNCE_DEFAULTS = { trailing: !0 };
|
|
9
|
+
function debounce(e, t = 25, n = {}) {
|
|
10
|
+
if (n = {
|
|
11
|
+
...DEBOUNCE_DEFAULTS,
|
|
12
|
+
...n
|
|
13
|
+
}, !Number.isFinite(t)) throw TypeError("Expected `wait` to be a finite number");
|
|
14
|
+
let r, i, a = [], o, s, c = (t, r) => (o = _applyPromised(e, t, r), o.finally(() => {
|
|
15
|
+
if (o = null, n.trailing && s && !i) {
|
|
16
|
+
let e = c(t, s);
|
|
17
|
+
return s = null, e;
|
|
18
|
+
}
|
|
19
|
+
}), o), l = function(...e) {
|
|
20
|
+
return n.trailing && (s = e), o || new Promise((o) => {
|
|
21
|
+
let l = !i && n.leading;
|
|
22
|
+
clearTimeout(i), i = setTimeout(() => {
|
|
23
|
+
i = null;
|
|
24
|
+
let t = n.leading ? r : c(this, e);
|
|
25
|
+
s = null;
|
|
26
|
+
for (let e of a) e(t);
|
|
27
|
+
a = [];
|
|
28
|
+
}, t), l ? (r = c(this, e), o(r)) : a.push(o);
|
|
29
|
+
});
|
|
30
|
+
}, u = (e) => {
|
|
31
|
+
e && (clearTimeout(e), i = null);
|
|
32
|
+
};
|
|
33
|
+
return l.isPending = () => !!i, l.cancel = () => {
|
|
34
|
+
u(i), a = [], s = null;
|
|
35
|
+
}, l.flush = () => {
|
|
36
|
+
if (u(i), !s || o) return;
|
|
37
|
+
let e = s;
|
|
38
|
+
return s = null, c(this, e);
|
|
39
|
+
}, l;
|
|
41
40
|
}
|
|
42
|
-
async function
|
|
43
|
-
|
|
41
|
+
async function _applyPromised(e, t, n) {
|
|
42
|
+
return await e.apply(t, n);
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
var _hoisted_1 = {
|
|
45
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
46
|
+
width: "16",
|
|
47
|
+
height: "16",
|
|
48
|
+
fill: "none"
|
|
50
49
|
};
|
|
51
|
-
function
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, null, -1)
|
|
57
|
-
])]);
|
|
50
|
+
function render(e, t) {
|
|
51
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, [...t[0] ||= [createElementVNode("path", {
|
|
52
|
+
fill: "#bbb",
|
|
53
|
+
d: "M13.5 15.338a.5.5 0 1 0 .737-.676zm.737-.676-1.398-1.523-.737.676 1.399 1.523zM13.5 7.628c0 3.394-2.695 6.129-6 6.129v1c3.875 0 7-3.201 7-7.129zm-6 6.129c-3.305 0-6-2.735-6-6.129h-1c0 3.928 3.125 7.129 7 7.129zm-6-6.129c0-3.393 2.695-6.128 6-6.128v-1C3.625.5.5 3.7.5 7.628zm6-6.128c3.305 0 6 2.735 6 6.128h1C14.5 3.701 11.375.5 7.5.5z"
|
|
54
|
+
}, null, -1)]]);
|
|
58
55
|
}
|
|
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
|
-
default: R(() => [
|
|
128
|
-
(o(!0), r(p, null, C(u.labels, (b) => (o(), r("span", { key: b }, v(k[b]), 1))), 128))
|
|
129
|
-
]),
|
|
130
|
-
_: 2
|
|
131
|
-
}, 1032, ["to", "class"]))), 128))
|
|
132
|
-
], 64)) : g("", !0)
|
|
133
|
-
], 2))), 128)) : g("", !0)
|
|
134
|
-
], 2)) : g("", !0)
|
|
135
|
-
], 2));
|
|
136
|
-
}
|
|
137
|
-
}), H = "_container_7y6o9_1", J = "_results_7y6o9_6", Q = "_resultsInner_7y6o9_22", W = "_type_7y6o9_31", X = "_link_7y6o9_36", Z = {
|
|
138
|
-
container: H,
|
|
139
|
-
results: J,
|
|
140
|
-
resultsInner: Q,
|
|
141
|
-
type: W,
|
|
142
|
-
link: X
|
|
143
|
-
}, ee = {
|
|
144
|
-
$style: Z
|
|
145
|
-
}, ue = /* @__PURE__ */ L(q, [["__cssModules", ee]]);
|
|
146
|
-
export {
|
|
147
|
-
ue as default
|
|
148
|
-
};
|
|
56
|
+
var search_default = { render }, UiSearch_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
57
|
+
__name: "UiSearch",
|
|
58
|
+
props: {
|
|
59
|
+
modelValue: {},
|
|
60
|
+
searchScheme: {},
|
|
61
|
+
results: { default: void 0 },
|
|
62
|
+
isSuccess: { type: Boolean },
|
|
63
|
+
lang: { default: "ru" }
|
|
64
|
+
},
|
|
65
|
+
emits: ["update:modelValue"],
|
|
66
|
+
setup(e, { emit: d }) {
|
|
67
|
+
let f = e, p = d, m = ref(!1), h = debounce(async (e) => {
|
|
68
|
+
p("update:modelValue", e);
|
|
69
|
+
}, 300);
|
|
70
|
+
function g() {
|
|
71
|
+
m.value = !0;
|
|
72
|
+
}
|
|
73
|
+
function _() {
|
|
74
|
+
m.value = !1;
|
|
75
|
+
}
|
|
76
|
+
function v() {
|
|
77
|
+
_(), p("update:modelValue", "");
|
|
78
|
+
}
|
|
79
|
+
let y = computed(() => f.results ? Object.values(f.results).reduce((e, t) => e + (t ? t.length : 0), 0) : !1), b = ref();
|
|
80
|
+
onClickOutside(b, () => {
|
|
81
|
+
_();
|
|
82
|
+
});
|
|
83
|
+
let x = computed(() => window.IS_STORYBOOK ? "a" : RouterLink);
|
|
84
|
+
return (r, a) => (openBlock(), createElementBlock("div", {
|
|
85
|
+
class: normalizeClass(r.$style.container),
|
|
86
|
+
ref_key: "containerElement",
|
|
87
|
+
ref: b
|
|
88
|
+
}, [createVNode(UiInput_default, {
|
|
89
|
+
modelValue: f.modelValue,
|
|
90
|
+
"onUpdate:modelValue": a[0] ||= async (e) => await unref(h)(e.toString()),
|
|
91
|
+
onClick: g,
|
|
92
|
+
onKeyup: withKeys(_, ["esc"]),
|
|
93
|
+
appendIcon: unref(search_default),
|
|
94
|
+
placeholder: "Search"
|
|
95
|
+
}, null, 8, ["modelValue", "appendIcon"]), m.value && f.modelValue.length > 0 ? (openBlock(), createElementBlock("div", {
|
|
96
|
+
key: 0,
|
|
97
|
+
class: normalizeClass(r.$style.results)
|
|
98
|
+
}, [
|
|
99
|
+
f.modelValue.length < 3 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createTextVNode(toDisplayString(unref(MESSAGES)[f.lang].enterMoreSymbols), 1)], 64)) : createCommentVNode("", !0),
|
|
100
|
+
f.modelValue.length > 2 && !f.isSuccess ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(unref(MESSAGES)[f.lang].loading), 1)], 64)) : createCommentVNode("", !0),
|
|
101
|
+
f.modelValue.length > 2 && !y.value && f.isSuccess ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(unref(MESSAGES)[f.lang].noResults), 1)], 64)) : createCommentVNode("", !0),
|
|
102
|
+
f.modelValue.length > 2 && y.value && f.isSuccess ? (openBlock(!0), createElementBlock(Fragment, { key: 3 }, renderList(f.searchScheme, (t) => (openBlock(), createElementBlock("div", {
|
|
103
|
+
key: t.type,
|
|
104
|
+
class: normalizeClass(r.$style.resultsInner)
|
|
105
|
+
}, [e.results?.[t.type]?.length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createElementVNode("div", { class: normalizeClass(r.$style.type) }, toDisplayString(t.type) + ":", 3), (openBlock(!0), createElementBlock(Fragment, null, renderList(e.results[t.type], (e) => (openBlock(), createBlock(resolveDynamicComponent(x.value), {
|
|
106
|
+
key: e._id,
|
|
107
|
+
to: `${t.url}/${e._id}`,
|
|
108
|
+
onClick: v,
|
|
109
|
+
class: normalizeClass(r.$style.link)
|
|
110
|
+
}, {
|
|
111
|
+
default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(t.labels, (t) => (openBlock(), createElementBlock("span", { key: t }, toDisplayString(e[t]), 1))), 128))]),
|
|
112
|
+
_: 2
|
|
113
|
+
}, 1032, ["to", "class"]))), 128))], 64)) : createCommentVNode("", !0)], 2))), 128)) : createCommentVNode("", !0)
|
|
114
|
+
], 2)) : createCommentVNode("", !0)], 2));
|
|
115
|
+
}
|
|
116
|
+
}), [["__cssModules", { $style: {
|
|
117
|
+
container: "_container_7y6o9_1",
|
|
118
|
+
results: "_results_7y6o9_6",
|
|
119
|
+
resultsInner: "_resultsInner_7y6o9_22",
|
|
120
|
+
type: "_type_7y6o9_31",
|
|
121
|
+
link: "_link_7y6o9_36"
|
|
122
|
+
} }]]);
|
|
123
|
+
export { UiSearch_default as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_1m448_1{position:relative}._container_1m448_1:disabled{color:var(--color-gray-dark-extra);background:var(--color-gray-light-extra);border-color:var(--color-transparent)}._input_1m448_10{
|
|
1
|
+
._container_1m448_1{position:relative}._container_1m448_1:disabled{color:var(--color-gray-dark-extra);background:var(--color-gray-light-extra);border-color:var(--color-transparent)}._input_1m448_10{align-items:center;gap:8px;display:flex}._clear_1m448_16{width:28px;height:28px;color:var(--color-white);cursor:pointer;background-color:var(--color-gray-dark);border:none;border-radius:50%;font-size:1rem;font-weight:700}._clear_1m448_16:hover{background-color:var(--color-gray-dark-extra)}._options_1m448_31{z-index:2;background-color:var(--color-white);border:1px solid var(--color-gray);border-radius:16px;flex-direction:column;min-width:100%;max-height:200px;margin-top:8px;display:flex;position:absolute;overflow-y:auto}._options_1m448_31._optionsUp_1m448_44{margin-top:0;margin-bottom:8px;bottom:100%}._option_1m448_31{height:40px;color:var(--color-black);cursor:pointer;outline:none;flex-shrink:0;align-items:center;padding:0 16px;display:flex}._option_1m448_31:hover,._option_1m448_31:focus{color:var(--color-white);background-color:var(--color-primary)}._option_1m448_31[data-current=true]{color:var(--color-black);background-color:var(--color-gray-light)}._option_1m448_31[data-current=true]:hover,._option_1m448_31[data-current=true]:focus{background-color:var(--color-gray)}.dark ._options_1m448_31{background-color:var(--color-gray-dark);border:1px solid var(--color-gray-dark-extra)}.dark ._options_1m448_31 [data-current=true]{background-color:var(--color-gray-dark-extra)}
|