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
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Fragment, computed, customRef, defineComponent, getCurrentInstance, h, markRaw, nextTick, onBeforeMount, onBeforeUnmount, onMounted, onUnmounted, ref, shallowRef, toRaw, toRefs, toValue, unref, watch, watchEffect } from "vue";
|
|
2
|
+
var isClient = typeof window < "u" && typeof document < "u";
|
|
3
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
4
|
+
var toString = Object.prototype.toString, isObject = (e) => toString.call(e) === "[object Object]", noop = () => {}, isIOS = /* @__PURE__ */ getIsIOS();
|
|
5
|
+
function getIsIOS() {
|
|
6
|
+
var e, t;
|
|
7
|
+
return isClient && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
8
|
+
}
|
|
9
|
+
function toArray(e) {
|
|
10
|
+
return Array.isArray(e) ? e : [e];
|
|
11
|
+
}
|
|
12
|
+
function watchImmediate(e, t, n) {
|
|
13
|
+
return watch(e, t, {
|
|
14
|
+
...n,
|
|
15
|
+
immediate: !0
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
var defaultWindow = isClient ? window : void 0;
|
|
19
|
+
isClient && window.document, isClient && window.navigator, isClient && window.location;
|
|
20
|
+
function unrefElement(e) {
|
|
21
|
+
let t = toValue(e);
|
|
22
|
+
return t?.$el ?? t;
|
|
23
|
+
}
|
|
24
|
+
function useEventListener(...e) {
|
|
25
|
+
let n = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), r = computed(() => {
|
|
26
|
+
let t = toArray(toValue(e[0])).filter((e) => e != null);
|
|
27
|
+
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
28
|
+
});
|
|
29
|
+
return watchImmediate(() => [
|
|
30
|
+
r.value?.map((e) => unrefElement(e)) ?? [defaultWindow].filter((e) => e != null),
|
|
31
|
+
toArray(toValue(r.value ? e[1] : e[0])),
|
|
32
|
+
toArray(unref(r.value ? e[2] : e[1])),
|
|
33
|
+
toValue(r.value ? e[3] : e[2])
|
|
34
|
+
], ([e, t, r, i], a, o) => {
|
|
35
|
+
if (!e?.length || !t?.length || !r?.length) return;
|
|
36
|
+
let s = isObject(i) ? { ...i } : i, c = e.flatMap((e) => t.flatMap((t) => r.map((r) => n(e, t, r, s))));
|
|
37
|
+
o(() => {
|
|
38
|
+
c.forEach((e) => e());
|
|
39
|
+
});
|
|
40
|
+
}, { flush: "post" });
|
|
41
|
+
}
|
|
42
|
+
var _iOSWorkaround = !1;
|
|
43
|
+
function onClickOutside(e, t, n = {}) {
|
|
44
|
+
let { window: r = defaultWindow, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
|
|
45
|
+
if (!r) return s ? {
|
|
46
|
+
stop: noop,
|
|
47
|
+
cancel: noop,
|
|
48
|
+
trigger: noop
|
|
49
|
+
} : noop;
|
|
50
|
+
if (isIOS && !_iOSWorkaround) {
|
|
51
|
+
_iOSWorkaround = !0;
|
|
52
|
+
let e = { passive: !0 };
|
|
53
|
+
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", noop, e)), r.document.documentElement.addEventListener("click", noop, e);
|
|
54
|
+
}
|
|
55
|
+
let c = !0, l = (e) => toValue(i).some((t) => {
|
|
56
|
+
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
|
|
57
|
+
{
|
|
58
|
+
let n = unrefElement(t);
|
|
59
|
+
return n && (e.target === n || e.composedPath().includes(n));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
function u(e) {
|
|
63
|
+
let t = toValue(e);
|
|
64
|
+
return t && t.$.subTree.shapeFlag === 16;
|
|
65
|
+
}
|
|
66
|
+
function d(e, t) {
|
|
67
|
+
let n = toValue(e), r = n.$.subTree && n.$.subTree.children;
|
|
68
|
+
return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
|
|
69
|
+
}
|
|
70
|
+
let f = (n) => {
|
|
71
|
+
let r = unrefElement(e);
|
|
72
|
+
if (n.target != null && !(!(r instanceof Element) && u(e) && d(e, n)) && !(!r || r === n.target || n.composedPath().includes(r))) {
|
|
73
|
+
if ("detail" in n && n.detail === 0 && (c = !l(n)), !c) {
|
|
74
|
+
c = !0;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
t(n);
|
|
78
|
+
}
|
|
79
|
+
}, p = !1, m = [
|
|
80
|
+
useEventListener(r, "click", (e) => {
|
|
81
|
+
p || (p = !0, setTimeout(() => {
|
|
82
|
+
p = !1;
|
|
83
|
+
}, 0), f(e));
|
|
84
|
+
}, {
|
|
85
|
+
passive: !0,
|
|
86
|
+
capture: a
|
|
87
|
+
}),
|
|
88
|
+
useEventListener(r, "pointerdown", (t) => {
|
|
89
|
+
let n = unrefElement(e);
|
|
90
|
+
c = !l(t) && !!(n && !t.composedPath().includes(n));
|
|
91
|
+
}, { passive: !0 }),
|
|
92
|
+
o && useEventListener(r, "blur", (n) => {
|
|
93
|
+
setTimeout(() => {
|
|
94
|
+
let i = unrefElement(e);
|
|
95
|
+
r.document.activeElement?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
|
|
96
|
+
}, 0);
|
|
97
|
+
}, { passive: !0 })
|
|
98
|
+
].filter(Boolean), g = () => m.forEach((e) => e());
|
|
99
|
+
return s ? {
|
|
100
|
+
stop: g,
|
|
101
|
+
cancel: () => {
|
|
102
|
+
c = !1;
|
|
103
|
+
},
|
|
104
|
+
trigger: (e) => {
|
|
105
|
+
c = !0, f(e), c = !1;
|
|
106
|
+
}
|
|
107
|
+
} : g;
|
|
108
|
+
}
|
|
109
|
+
export { onClickOutside as t };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const MESSAGES = {
|
|
2
|
+
en: {
|
|
3
|
+
cancel: "Cancel",
|
|
4
|
+
confirm: "Confirm",
|
|
5
|
+
of: "of",
|
|
6
|
+
enterMoreSymbols: "Enter 3 or more symbols",
|
|
7
|
+
loading: "Loading",
|
|
8
|
+
noResults: "No results",
|
|
9
|
+
choose: "Choose",
|
|
10
|
+
filter: "Filter",
|
|
11
|
+
remove: "Remove",
|
|
12
|
+
upload: "Upload",
|
|
13
|
+
tableIsScrollable: "Table is scrollable →"
|
|
14
|
+
},
|
|
15
|
+
ru: {
|
|
16
|
+
cancel: "Отмена",
|
|
17
|
+
confirm: "Подтвердить",
|
|
18
|
+
of: "из",
|
|
19
|
+
enterMoreSymbols: "Введите хотя бы 3 символа",
|
|
20
|
+
loading: "Загрузка",
|
|
21
|
+
noResults: "Нет результатов",
|
|
22
|
+
choose: "Выбрать",
|
|
23
|
+
filter: "Фильтровать",
|
|
24
|
+
remove: "Убрать",
|
|
25
|
+
upload: "Загрузить",
|
|
26
|
+
tableIsScrollable: "Таблицу можно скроллить →"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export { MESSAGES as t };
|
package/dist/stubs/stubs.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
t as uiStubs
|
|
1
|
+
const uiStubs = {
|
|
2
|
+
UiButton: { template: "<button><slot></slot></button>" },
|
|
3
|
+
UiButtongroup: { template: "<div><input type=\"number\"></div>" },
|
|
4
|
+
UiCheckbox: { template: "<input type=\"checkbox\" />" },
|
|
5
|
+
UiChip: { template: "<div><slot></slot></div>" },
|
|
6
|
+
UiField: { template: "<fieldset><slot></slot></fieldset>" },
|
|
7
|
+
UiFlex: { template: "<div><slot></slot></div>" },
|
|
8
|
+
UiInput: { template: "<input type=\"text\"/>" },
|
|
9
|
+
UiModal: { template: "<div><slot></slot></div>" },
|
|
10
|
+
UiSelect: { template: "<input type=\"text\"/>" },
|
|
11
|
+
UiSpoiler: { template: "<div><slot></slot></div>" },
|
|
12
|
+
UiTable: { template: "<table><tbody><slot></slot></tbody></table>" }
|
|
16
13
|
};
|
|
14
|
+
export { uiStubs };
|
package/dist/toast/toast.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.uiToastBlock{
|
|
1
|
+
.uiToastBlock{z-index:9999;flex-direction:column;align-items:flex-end;gap:8px;display:flex;position:fixed;top:64px;right:32px}.uiToast{cursor:pointer;opacity:0;border-radius:16px;align-items:flex-start;gap:8px;max-width:360px;padding:16px 32px;transition:all .2s;display:flex;position:relative}.uiToastIcon{padding-top:2px}.uiToastVisible{opacity:1}.uiToastClose{opacity:0;width:0;height:0}.successToast{background-color:var(--color-success-light)}.errorToast{background-color:var(--color-error-light)}.infoToast{background-color:var(--color-primary-light-extra)}
|
package/dist/toast/toast.js
CHANGED
|
@@ -1,48 +1,50 @@
|
|
|
1
1
|
import "./toast.css";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
var icons = {
|
|
3
|
+
success: "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.3125%202C9.77084%202%2010.2292%202%2010.6875%202C13.5535%202.34656%2015.6942%203.77364%2017.1094%206.28125C17.5963%207.23972%2017.8931%208.25016%2018%209.3125C18%209.77084%2018%2010.2292%2018%2010.6875C17.6081%2013.8208%2015.9831%2016.0552%2013.125%2017.3906C12.338%2017.7124%2011.5255%2017.9155%2010.6875%2018C10.2292%2018%209.77084%2018%209.3125%2018C6.17919%2017.6081%203.94481%2015.9831%202.60938%2013.125C2.28762%2012.338%202.0845%2011.5255%202%2010.6875C2%2010.2292%202%209.77084%202%209.3125C2.3919%206.17919%204.0169%203.94481%206.875%202.60938C7.662%202.28762%208.4745%202.0845%209.3125%202ZM9.625%203.25C12.3817%203.22419%2014.4702%204.38044%2015.8906%206.71875C17.0711%209.00206%2017.0294%2011.2625%2015.7656%2013.5C14.1624%2015.8978%2011.9176%2016.9551%209.03125%2016.6719C6.86497%2016.2952%205.22434%2015.165%204.10938%2013.2812C2.92891%2010.9979%202.97058%208.7375%204.23438%206.5C5.49856%204.54202%207.29544%203.45868%209.625%203.25Z'%20fill='currentColor'%20/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13.1875%207.03125C13.7187%207.06763%2013.9426%207.34888%2013.8594%207.875C13.8281%207.9375%2013.7969%208%2013.7656%208.0625C12.3229%209.65103%2010.8802%2011.2396%209.4375%2012.8281C9.14862%2013.0189%208.86737%2013.0085%208.59375%2012.7969C7.83944%2012.0113%207.07381%2011.2353%206.29687%2010.4688C6.13744%2010.2778%206.08534%2010.0591%206.14062%209.8125C6.35141%209.36722%206.67953%209.25784%207.125%209.48438C7.76653%2010.1155%208.39672%2010.7561%209.01562%2011.4062C10.2912%209.96403%2011.5881%208.54216%2012.9062%207.14062C12.9987%207.0905%2013.0925%207.05403%2013.1875%207.03125Z'%20fill='currentColor'%20/%3e%3c/g%3e%3c/svg%3e",
|
|
4
|
+
error: "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.55115%202.00078C12.774%201.9629%2015.2362%203.29759%2016.9379%206.00484C18.3905%208.75784%2018.3531%2011.4896%2016.8257%2014.2001C15.331%2016.5047%2013.2054%2017.7708%2010.4488%2017.9983C7.22489%2018.0543%204.76264%2016.7258%203.062%2014.013C1.60954%2011.2586%201.64694%208.52684%203.17421%205.81774C4.67655%203.51581%206.80222%202.24349%209.55115%202.00078ZM9.51375%203.2731C12.6106%203.22789%2014.836%204.58752%2016.1899%207.352C17.1948%2010.0081%2016.7833%2012.4155%2014.9557%2014.5743C12.8383%2016.6708%2010.3636%2017.2383%207.53147%2016.2769C5.01443%2015.167%203.5994%2013.2398%203.28641%2010.4954C3.2047%207.72067%204.33298%205.60638%206.67124%204.1525C7.56412%203.66541%208.51165%203.37227%209.51375%203.2731Z'%20fill='currentColor'%20/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.77556%206.52874C10.1841%206.44922%2010.4646%206.5989%2010.6171%206.97779C10.642%208.17526%2010.642%209.37274%2010.6171%2010.5702C10.4621%2010.9876%2010.1691%2011.1311%209.73816%2011.0006C9.55403%2010.9135%209.43558%2010.77%209.38284%2010.5702C9.3579%209.37274%209.3579%208.17526%209.38284%206.97779C9.45525%206.77452%209.58616%206.62483%209.77556%206.52874Z'%20fill='currentColor'%20/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.85036%2012.0296C10.5737%2012.0361%2010.8917%2012.3979%2010.8041%2013.1148C10.6262%2013.5626%2010.2958%2013.756%209.81296%2013.6949C9.21233%2013.4647%209.03153%2013.0468%209.27064%2012.4413C9.41882%2012.2363%209.61208%2012.0991%209.85036%2012.0296Z'%20fill='currentColor'%20/%3e%3c/g%3e%3c/svg%3e",
|
|
5
|
+
info: "data:image/svg+xml,%3csvg%20width='20'%20height='20'%20viewBox='0%200%2020%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M18%204.1296C18%206.04729%2018%207.96501%2018%209.8827C17.7844%2010.2991%2017.4615%2010.4103%2017.0312%2010.2164C16.9097%2010.1339%2016.8212%2010.0227%2016.7656%209.8827C16.7646%208.0172%2016.7438%206.15247%2016.7031%204.28853C16.5358%203.66558%2016.1348%203.33184%2015.5%203.2873C11.8333%203.2661%208.16666%203.2661%204.5%203.2873C3.8652%203.33184%203.46416%203.66558%203.29688%204.28853C3.26105%205.75515%203.24543%207.22257%203.25%208.69076C3.25521%2010.0734%203.26042%2011.4561%203.26562%2012.8387C3.34375%2013.5962%203.75521%2014.0148%204.5%2014.0942C5.60416%2014.1048%206.70834%2014.1154%207.8125%2014.126C7.94663%2014.1704%208.056%2014.2498%208.14062%2014.3644C8.69272%2015.0849%209.24478%2015.8053%209.79688%2016.5258C9.90969%2016.7226%2010.0347%2016.7332%2010.1719%2016.5576C10.7448%2015.8053%2011.3177%2015.0531%2011.8906%2014.3008C11.9707%2014.23%2012.0593%2014.1717%2012.1562%2014.126C13.2708%2014.1154%2014.3854%2014.1048%2015.5%2014.0942C16.3411%2013.98%2016.7629%2013.4874%2016.7656%2012.6162C16.9326%2012.2586%2017.2086%2012.1261%2017.5938%2012.2189C17.787%2012.2937%2017.9224%2012.4261%2018%2012.6162C18%2012.8281%2018%2013.04%2018%2013.2519C17.8221%2014.1686%2017.3117%2014.8202%2016.4688%2015.2067C16.2865%2015.2791%2016.099%2015.3321%2015.9062%2015.3656C14.8333%2015.3762%2013.7604%2015.3868%2012.6875%2015.3974C12.1161%2016.1588%2011.5328%2016.911%2010.9375%2017.6541C10.5283%2017.9806%2010.07%2018.0759%209.5625%2017.9402C9.39234%2017.8802%209.23609%2017.7954%209.09375%2017.6859C8.485%2016.9453%207.89125%2016.1931%207.3125%2015.4292C6.23978%2015.3982%205.16688%2015.377%204.09375%2015.3656C3.1869%2015.1955%202.54628%2014.6817%202.17188%2013.824C2.10414%2013.6324%202.04684%2013.4416%202%2013.2519C2%2010.2111%202%207.17038%202%204.1296C2.24438%202.96458%202.9423%202.26001%204.09375%202.01589C8.03125%201.9947%2011.9688%201.9947%2015.9062%202.01589C17.0448%202.27277%2017.7427%202.97734%2018%204.1296Z'%20fill='currentColor'%20/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.78125%205.43279C10.4109%205.36868%2010.687%205.65474%2010.6094%206.29099C10.4424%206.64863%2010.1664%206.78108%209.78125%206.6883C9.42963%206.51847%209.29941%206.23771%209.39063%205.84599C9.46416%205.6494%209.59438%205.51168%209.78125%205.43279Z'%20fill='currentColor'%20/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9.78125%207.62596C10.1663%207.54894%2010.4423%207.68667%2010.6094%208.03916C10.6302%209.33177%2010.6302%2010.6243%2010.6094%2011.9169C10.4006%2012.3366%2010.0828%2012.4479%209.65625%2012.2507C9.53469%2012.1682%209.44616%2012.0569%209.39062%2011.9169C9.36978%2010.6243%209.36978%209.33177%209.39062%208.03916C9.46416%207.84257%209.59438%207.70485%209.78125%207.62596Z'%20fill='currentColor'%20/%3e%3c/g%3e%3c/svg%3e"
|
|
6
6
|
};
|
|
7
|
-
function
|
|
8
|
-
|
|
7
|
+
function success(e) {
|
|
8
|
+
show("success", e);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
10
|
+
function error(e) {
|
|
11
|
+
show("error", e);
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
13
|
+
function info(e) {
|
|
14
|
+
show("info", e);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
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
|
-
|
|
16
|
+
function show(t, n) {
|
|
17
|
+
let r = document.body;
|
|
18
|
+
if (r && !r.contains(document.querySelector(".uiToastBlock"))) {
|
|
19
|
+
let e = document.createElement("div");
|
|
20
|
+
e.classList.add("uiToastBlock"), r.append(e);
|
|
21
|
+
}
|
|
22
|
+
let i = document.createElement("div");
|
|
23
|
+
i.classList.add("uiToast", `${t}Toast`);
|
|
24
|
+
let a = document.createElement("img");
|
|
25
|
+
a.classList.add("uiToastIcon"), a.src = icons[t], a.width = 20, a.height = 20;
|
|
26
|
+
let o = document.createElement("div");
|
|
27
|
+
o.innerHTML = n, o.classList.add("uiToastMessage"), i.append(a), i.append(o);
|
|
28
|
+
let s = document.createElement("button");
|
|
29
|
+
s.classList.add("uiToastClose"), s.addEventListener("click", () => {
|
|
30
|
+
i.remove(), r && !r.contains(document.querySelector(".uiToast")) && document.querySelector(".uiToastBlock")?.remove();
|
|
31
|
+
}), i.append(s), document.querySelector(".uiToastBlock")?.append(i), setTimeout(() => i.classList.add("uiToastVisible"), 200), setTimeout(() => {
|
|
32
|
+
i.classList.remove("uiToastVisible"), setTimeout(() => {
|
|
33
|
+
i.remove();
|
|
34
|
+
let e = document.querySelectorAll(".uiToast");
|
|
35
|
+
r && e.length === 0 && document.querySelector(".uiToastBlock")?.remove();
|
|
36
|
+
}, 200);
|
|
37
|
+
}, 3800), i.addEventListener("click", (e) => {
|
|
38
|
+
e.target.classList.contains("uiToastClose") || (i.classList.remove("uiToastVisible"), setTimeout(() => {
|
|
39
|
+
i.remove();
|
|
40
|
+
let e = document.querySelectorAll(".uiToast");
|
|
41
|
+
r && e.length === 0 && document.querySelector(".uiToastBlock")?.remove();
|
|
42
|
+
}, 200));
|
|
43
|
+
});
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
var toast_default = {
|
|
46
|
+
success,
|
|
47
|
+
error,
|
|
48
|
+
info
|
|
48
49
|
};
|
|
50
|
+
export { toast_default as default };
|
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.23",
|
|
5
5
|
"author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -25,63 +25,63 @@
|
|
|
25
25
|
"test:cov": "vitest run --coverage"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tiptap/pm": "3.
|
|
29
|
-
"@tiptap/starter-kit": "3.
|
|
30
|
-
"@tiptap/vue-3": "3.
|
|
28
|
+
"@tiptap/pm": "3.17.0",
|
|
29
|
+
"@tiptap/starter-kit": "3.17.0",
|
|
30
|
+
"@tiptap/vue-3": "3.17.0",
|
|
31
31
|
"@vueform/slider": "2.1.10",
|
|
32
32
|
"@vueuse/core": "14.1.0",
|
|
33
33
|
"@vueuse/integrations": "14.1.0",
|
|
34
34
|
"chart.js": "4.5.1",
|
|
35
35
|
"mhz-helpers": "*",
|
|
36
|
-
"perfect-debounce": "2.
|
|
37
|
-
"vue": "3.6.0-beta.
|
|
36
|
+
"perfect-debounce": "2.1.0",
|
|
37
|
+
"vue": "3.6.0-beta.4",
|
|
38
38
|
"vue-chartjs": "5.3.3",
|
|
39
39
|
"vue-router": "4.6.4"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@eslint/js": "9.39.2",
|
|
43
|
-
"@storybook/addon-docs": "10.
|
|
44
|
-
"@storybook/addon-themes": "10.
|
|
45
|
-
"@storybook/vue3": "10.
|
|
46
|
-
"@storybook/vue3-vite": "10.
|
|
47
|
-
"@types/node": "25.0.
|
|
43
|
+
"@storybook/addon-docs": "10.2.0",
|
|
44
|
+
"@storybook/addon-themes": "10.2.0",
|
|
45
|
+
"@storybook/vue3": "10.2.0",
|
|
46
|
+
"@storybook/vue3-vite": "10.2.0",
|
|
47
|
+
"@types/node": "25.0.10",
|
|
48
48
|
"@vitejs/plugin-vue": "6.0.3",
|
|
49
|
-
"@vitest/coverage-v8": "4.0.
|
|
49
|
+
"@vitest/coverage-v8": "4.1.0-beta.2",
|
|
50
50
|
"@vue/test-utils": "2.4.6",
|
|
51
51
|
"eslint": "9.39.2",
|
|
52
52
|
"eslint-config-prettier": "10.1.8",
|
|
53
53
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
54
54
|
"eslint-plugin-import-x": "4.16.1",
|
|
55
|
-
"eslint-plugin-prettier": "5.5.
|
|
55
|
+
"eslint-plugin-prettier": "5.5.5",
|
|
56
56
|
"eslint-plugin-sonarjs": "3.0.5",
|
|
57
57
|
"eslint-plugin-unicorn": "62.0.0",
|
|
58
|
-
"eslint-plugin-vue": "10.
|
|
59
|
-
"globals": "17.
|
|
60
|
-
"happy-dom": "20.
|
|
61
|
-
"postcss-html": "1.8.
|
|
58
|
+
"eslint-plugin-vue": "10.7.0",
|
|
59
|
+
"globals": "17.1.0",
|
|
60
|
+
"happy-dom": "20.3.7",
|
|
61
|
+
"postcss-html": "1.8.1",
|
|
62
62
|
"postcss-scss": "4.0.9",
|
|
63
|
-
"prettier": "3.
|
|
64
|
-
"sass-embedded": "1.97.
|
|
65
|
-
"storybook": "10.
|
|
66
|
-
"stylelint": "
|
|
67
|
-
"stylelint-config-recess-order": "7.
|
|
68
|
-
"stylelint-config-recommended-scss": "
|
|
63
|
+
"prettier": "3.8.1",
|
|
64
|
+
"sass-embedded": "1.97.3",
|
|
65
|
+
"storybook": "10.2.0",
|
|
66
|
+
"stylelint": "17.0.0",
|
|
67
|
+
"stylelint-config-recess-order": "7.6.0",
|
|
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.
|
|
74
|
-
"vite": "
|
|
73
|
+
"typescript-eslint": "8.53.1",
|
|
74
|
+
"vite": "8.0.0-beta.9",
|
|
75
75
|
"vite-plugin-dts": "4.5.4",
|
|
76
|
-
"vite-plugin-static-copy": "3.1.
|
|
76
|
+
"vite-plugin-static-copy": "3.1.6",
|
|
77
77
|
"vite-svg-loader": "5.1.0",
|
|
78
|
-
"vitest": "4.0.
|
|
78
|
+
"vitest": "4.1.0-beta.2",
|
|
79
79
|
"vue-eslint-parser": "10.2.0",
|
|
80
80
|
"vue-linters-config": "0.5.5",
|
|
81
|
-
"vue-tsc": "3.2.
|
|
81
|
+
"vue-tsc": "3.2.3"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"vue": "3.6.0-beta.
|
|
84
|
+
"vue": "3.6.0-beta.4",
|
|
85
85
|
"vue-router": "4.6.4"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
package/dist/index-DajWja1y.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const o = {
|
|
2
|
-
en: {
|
|
3
|
-
cancel: "Cancel",
|
|
4
|
-
confirm: "Confirm",
|
|
5
|
-
of: "of",
|
|
6
|
-
enterMoreSymbols: "Enter 3 or more symbols",
|
|
7
|
-
loading: "Loading",
|
|
8
|
-
noResults: "No results",
|
|
9
|
-
choose: "Choose",
|
|
10
|
-
filter: "Filter",
|
|
11
|
-
remove: "Remove",
|
|
12
|
-
upload: "Upload",
|
|
13
|
-
tableIsScrollable: "Table is scrollable →"
|
|
14
|
-
},
|
|
15
|
-
ru: {
|
|
16
|
-
cancel: "Отмена",
|
|
17
|
-
confirm: "Подтвердить",
|
|
18
|
-
of: "из",
|
|
19
|
-
enterMoreSymbols: "Введите хотя бы 3 символа",
|
|
20
|
-
loading: "Загрузка",
|
|
21
|
-
noResults: "Нет результатов",
|
|
22
|
-
choose: "Выбрать",
|
|
23
|
-
filter: "Фильтровать",
|
|
24
|
-
remove: "Убрать",
|
|
25
|
-
upload: "Загрузить",
|
|
26
|
-
tableIsScrollable: "Таблицу можно скроллить →"
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
o as M
|
|
31
|
-
};
|
package/dist/index-Dvnq-rTV.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { watch as S, computed as j, toValue as a, unref as C } from "vue";
|
|
2
|
-
const I = typeof window < "u" && typeof document < "u";
|
|
3
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
4
|
-
const L = Object.prototype.toString, O = (t) => L.call(t) === "[object Object]", y = () => {
|
|
5
|
-
};
|
|
6
|
-
function P(t) {
|
|
7
|
-
return Array.isArray(t) ? t : [t];
|
|
8
|
-
}
|
|
9
|
-
function w(t, c, r) {
|
|
10
|
-
return S(t, c, {
|
|
11
|
-
...r,
|
|
12
|
-
immediate: !0
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
const k = I ? window : void 0;
|
|
16
|
-
function p(t) {
|
|
17
|
-
var c;
|
|
18
|
-
const r = a(t);
|
|
19
|
-
return (c = r?.$el) !== null && c !== void 0 ? c : r;
|
|
20
|
-
}
|
|
21
|
-
function T(...t) {
|
|
22
|
-
const c = (o, i, l, d) => (o.addEventListener(i, l, d), () => o.removeEventListener(i, l, d)), r = j(() => {
|
|
23
|
-
const o = P(a(t[0])).filter((i) => i != null);
|
|
24
|
-
return o.every((i) => typeof i != "string") ? o : void 0;
|
|
25
|
-
});
|
|
26
|
-
return w(() => {
|
|
27
|
-
var o, i;
|
|
28
|
-
return [
|
|
29
|
-
(o = (i = r.value) === null || i === void 0 ? void 0 : i.map((l) => p(l))) !== null && o !== void 0 ? o : [k].filter((l) => l != null),
|
|
30
|
-
P(a(r.value ? t[1] : t[0])),
|
|
31
|
-
P(C(r.value ? t[2] : t[1])),
|
|
32
|
-
a(r.value ? t[3] : t[2])
|
|
33
|
-
];
|
|
34
|
-
}, ([o, i, l, d], b, s) => {
|
|
35
|
-
if (!o?.length || !i?.length || !l?.length) return;
|
|
36
|
-
const v = O(d) ? { ...d } : d, g = o.flatMap((f) => i.flatMap((h) => l.map((m) => c(f, h, m, v))));
|
|
37
|
-
s(() => {
|
|
38
|
-
g.forEach((f) => f());
|
|
39
|
-
});
|
|
40
|
-
}, { flush: "post" });
|
|
41
|
-
}
|
|
42
|
-
function W(t, c, r = {}) {
|
|
43
|
-
const { window: o = k, ignore: i = [], capture: l = !0, detectIframe: d = !1, controls: b = !1 } = r;
|
|
44
|
-
if (!o) return b ? {
|
|
45
|
-
stop: y,
|
|
46
|
-
cancel: y,
|
|
47
|
-
trigger: y
|
|
48
|
-
} : y;
|
|
49
|
-
let s = !0;
|
|
50
|
-
const v = (e) => a(i).some((n) => {
|
|
51
|
-
if (typeof n == "string") return Array.from(o.document.querySelectorAll(n)).some((u) => u === e.target || e.composedPath().includes(u));
|
|
52
|
-
{
|
|
53
|
-
const u = p(n);
|
|
54
|
-
return u && (e.target === u || e.composedPath().includes(u));
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
function g(e) {
|
|
58
|
-
const n = a(e);
|
|
59
|
-
return n && n.$.subTree.shapeFlag === 16;
|
|
60
|
-
}
|
|
61
|
-
function f(e, n) {
|
|
62
|
-
const u = a(e), E = u.$.subTree && u.$.subTree.children;
|
|
63
|
-
return E == null || !Array.isArray(E) ? !1 : E.some(($) => $.el === n.target || n.composedPath().includes($.el));
|
|
64
|
-
}
|
|
65
|
-
const h = (e) => {
|
|
66
|
-
const n = p(t);
|
|
67
|
-
if (e.target != null && !(!(n instanceof Element) && g(t) && f(t, e)) && !(!n || n === e.target || e.composedPath().includes(n))) {
|
|
68
|
-
if ("detail" in e && e.detail === 0 && (s = !v(e)), !s) {
|
|
69
|
-
s = !0;
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
c(e);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
let m = !1;
|
|
76
|
-
const M = [
|
|
77
|
-
T(o, "click", (e) => {
|
|
78
|
-
m || (m = !0, setTimeout(() => {
|
|
79
|
-
m = !1;
|
|
80
|
-
}, 0), h(e));
|
|
81
|
-
}, {
|
|
82
|
-
passive: !0,
|
|
83
|
-
capture: l
|
|
84
|
-
}),
|
|
85
|
-
T(o, "pointerdown", (e) => {
|
|
86
|
-
const n = p(t);
|
|
87
|
-
s = !v(e) && !!(n && !e.composedPath().includes(n));
|
|
88
|
-
}, { passive: !0 }),
|
|
89
|
-
d && T(o, "blur", (e) => {
|
|
90
|
-
setTimeout(() => {
|
|
91
|
-
var n;
|
|
92
|
-
const u = p(t);
|
|
93
|
-
((n = o.document.activeElement) === null || n === void 0 ? void 0 : n.tagName) === "IFRAME" && !u?.contains(o.document.activeElement) && c(e);
|
|
94
|
-
}, 0);
|
|
95
|
-
}, { passive: !0 })
|
|
96
|
-
].filter(Boolean), A = () => M.forEach((e) => e());
|
|
97
|
-
return b ? {
|
|
98
|
-
stop: A,
|
|
99
|
-
cancel: () => {
|
|
100
|
-
s = !1;
|
|
101
|
-
},
|
|
102
|
-
trigger: (e) => {
|
|
103
|
-
s = !0, h(e), s = !1;
|
|
104
|
-
}
|
|
105
|
-
} : A;
|
|
106
|
-
}
|
|
107
|
-
export {
|
|
108
|
-
W as o
|
|
109
|
-
};
|