mhz-ui 1.2.3 → 1.2.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_1fhmi_1{position:relative;display:inline-flex;flex-shrink:0;gap:8px;align-items:center;justify-content:center;height:40px;padding:16px 32px;overflow:hidden;font-size:.875rem;line-height:1.5;color:var(--color-white);white-space:nowrap;text-decoration:none;user-select:none;background:var(--color-primary);border:2px solid var(--color-transparent);border-radius:16px;transition:all .2s}._button_1fhmi_1:hover{color:var(--color-white);cursor:pointer;background:var(--color-primary-dark);border-color:var(--color-transparent)}._button_1fhmi_1:disabled{color:var(--color-gray-dark-extra);cursor:default;background:var(--color-gray-light-extra)}._button_1fhmi_1[data-large-font=true]{font-size:1.125rem}._button_1fhmi_1[data-narrow=true]{padding-right:12px;padding-left:12px}._button_1fhmi_1[data-tall=true]{padding-top:28px;padding-bottom:28px}._button_1fhmi_1[data-wrap=true]{text-align:left;white-space:normal}._button_1fhmi_1[data-layout=accent]{background:var(--color-accent)}._button_1fhmi_1[data-layout=accent]:hover{background:var(--color-accent-dark)}._button_1fhmi_1[data-layout=accent]:disabled{color:var(--color-gray-dark-extra);cursor:default;background:var(--color-gray-light-extra)}._button_1fhmi_1[data-layout=gradient]{font-weight:700;background:linear-gradient(340deg,var(--color-accent) 20%,var(--color-accent-light) 96%);border:linear-gradient(340deg,var(--color-accent) 20%,var(--color-accent-light) 96%)}._button_1fhmi_1[data-layout=gradient]:hover{filter:hue-rotate(15deg)}._button_1fhmi_1[data-layout=secondary]{color:var(--color-primary);background-color:var(--color-transparent);border-color:var(--color-primary)}._button_1fhmi_1[data-layout=secondary]:hover{color:var(--color-primary-dark);border-color:var(--color-primary-dark)}._button_1fhmi_1[data-layout=secondary]:disabled{color:var(--color-gray-dark-extra);cursor:default;background:var(--color-white);border-color:var(--color-gray-light-extra)}._button_1fhmi_1[data-layout=plain]{height:auto;padding:0;font-size:1rem;color:var(--color-primary);background:none;border:none;border-radius:0}._button_1fhmi_1[data-layout=plain]:hover{color:var(--color-primary-dark)}._button_1fhmi_1[data-layout=plain]:disabled{color:var(--color-gray-dark-extra)}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "./UiButton.css";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
2
|
+
import { defineComponent as l, createElementBlock as s, openBlock as e, normalizeClass as n, createBlock as r, createCommentVNode as i, renderSlot as d, resolveDynamicComponent as c } from "vue";
|
|
3
|
+
import { _ as p } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const u = "primary", y = "button", _ = void 0, b = "Button", m = ["data-layout", "data-large-font", "data-narrow", "data-tall", "data-wrap", "disabled", "type", "aria-label", "aria-disabled"], f = /* @__PURE__ */ l({
|
|
5
5
|
__name: "UiButton",
|
|
6
6
|
props: {
|
|
7
|
-
layout: { default:
|
|
7
|
+
layout: { default: u },
|
|
8
8
|
type: { default: y },
|
|
9
|
+
isLargeFont: { type: Boolean },
|
|
9
10
|
isDisabled: { type: Boolean },
|
|
10
11
|
isNarrow: { type: Boolean },
|
|
11
12
|
isTall: { type: Boolean },
|
|
@@ -15,9 +16,10 @@ const p = "primary", y = "button", _ = void 0, b = "Button", m = ["data-layout",
|
|
|
15
16
|
},
|
|
16
17
|
setup(o) {
|
|
17
18
|
const t = o;
|
|
18
|
-
return (a, D) => (e(),
|
|
19
|
+
return (a, D) => (e(), s("button", {
|
|
19
20
|
class: n(a.$style.button),
|
|
20
21
|
"data-layout": t.layout,
|
|
22
|
+
"data-large-font": t.isLargeFont,
|
|
21
23
|
"data-narrow": t.isNarrow,
|
|
22
24
|
"data-tall": t.isTall,
|
|
23
25
|
"data-wrap": t.isWrap,
|
|
@@ -30,11 +32,11 @@ const p = "primary", y = "button", _ = void 0, b = "Button", m = ["data-layout",
|
|
|
30
32
|
d(a.$slots, "default")
|
|
31
33
|
], 10, m));
|
|
32
34
|
}
|
|
33
|
-
}), B = "
|
|
35
|
+
}), B = "_button_1fhmi_1", L = {
|
|
34
36
|
button: B
|
|
35
37
|
}, A = {
|
|
36
38
|
$style: L
|
|
37
|
-
},
|
|
39
|
+
}, F = /* @__PURE__ */ p(f, [["__cssModules", A]]);
|
|
38
40
|
export {
|
|
39
|
-
|
|
41
|
+
F as default
|
|
40
42
|
};
|
package/dist/UiChip/UiChip.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._chip_1k50i_1{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:2px 8px 1px;font-size:.875rem;background-color:var(--color-gray-light);border-bottom:1px solid var(--color-gray-dark);border-radius:8px}._chip_1k50i_1[data-type=success]{color:var(--color-success-dark)}._chip_1k50i_1[data-type=error]{color:var(--color-error-dark)}
|
package/dist/UiChip/UiChip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./UiChip.css";
|
|
2
|
-
import { defineComponent as o, createElementBlock as
|
|
2
|
+
import { defineComponent as o, createElementBlock as c, openBlock as p, normalizeClass as n, renderSlot as a } from "vue";
|
|
3
3
|
import { _ as l } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const i = "default", r = ["data-type"], _ = /* @__PURE__ */ o({
|
|
5
5
|
__name: "UiChip",
|
|
@@ -8,14 +8,14 @@ const i = "default", r = ["data-type"], _ = /* @__PURE__ */ o({
|
|
|
8
8
|
},
|
|
9
9
|
setup(e) {
|
|
10
10
|
const s = e;
|
|
11
|
-
return (t, u) => (
|
|
11
|
+
return (t, u) => (p(), c("div", {
|
|
12
12
|
class: n(t.$style.chip),
|
|
13
13
|
"data-type": s.type
|
|
14
14
|
}, [
|
|
15
15
|
a(t.$slots, "default")
|
|
16
16
|
], 10, r));
|
|
17
17
|
}
|
|
18
|
-
}), d = "
|
|
18
|
+
}), d = "_chip_1k50i_1", f = {
|
|
19
19
|
chip: d
|
|
20
20
|
}, m = {
|
|
21
21
|
$style: f
|
|
@@ -1,53 +1,61 @@
|
|
|
1
1
|
import "./UiSearch.css";
|
|
2
|
-
import { createElementBlock as
|
|
3
|
-
import { RouterLink as
|
|
4
|
-
import { o as
|
|
2
|
+
import { createElementBlock as r, openBlock as o, createElementVNode as T, defineComponent as I, ref as O, computed as C, normalizeClass as E, createVNode as R, createCommentVNode as g, unref as d, withKeys as L, Fragment as p, createTextVNode as N, toDisplayString as v, renderList as V, createBlock as B, resolveDynamicComponent as M, withCtx as U } from "vue";
|
|
3
|
+
import { RouterLink as b } from "vue-router";
|
|
4
|
+
import { o as $ } from "../index-D1B6FCCq.js";
|
|
5
5
|
import z from "../UiInput/UiInput.js";
|
|
6
6
|
import { _ as D } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const x = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
return
|
|
7
|
+
const x = { trailing: !0 };
|
|
8
|
+
function P(f, c = 25, e = {}) {
|
|
9
|
+
if (e = {
|
|
10
|
+
...x,
|
|
11
|
+
...e
|
|
12
|
+
}, !Number.isFinite(c)) throw new TypeError("Expected `wait` to be a finite number");
|
|
13
|
+
let y, n, _ = [], a, l;
|
|
14
|
+
const h = (s, t) => (a = A(f, s, t), a.finally(() => {
|
|
15
|
+
if (a = null, e.trailing && l && !n) {
|
|
16
|
+
const i = h(s, l);
|
|
17
|
+
return l = null, i;
|
|
18
18
|
}
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
for (const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, s), k ? (f = g(this, r), d(f)) : h.push(d);
|
|
19
|
+
}), a), m = function(...s) {
|
|
20
|
+
return e.trailing && (l = s), a || new Promise((t) => {
|
|
21
|
+
const i = !n && e.leading;
|
|
22
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
23
|
+
n = null;
|
|
24
|
+
const u = e.leading ? y : h(this, s);
|
|
25
|
+
l = null;
|
|
26
|
+
for (const S of _) S(u);
|
|
27
|
+
_ = [];
|
|
28
|
+
}, c), i ? (y = h(this, s), t(y)) : _.push(t);
|
|
30
29
|
});
|
|
30
|
+
}, k = (s) => {
|
|
31
|
+
s && (clearTimeout(s), n = null);
|
|
31
32
|
};
|
|
33
|
+
return m.isPending = () => !!n, m.cancel = () => {
|
|
34
|
+
k(n), _ = [], l = null;
|
|
35
|
+
}, m.flush = () => {
|
|
36
|
+
if (k(n), !l || a) return;
|
|
37
|
+
const s = l;
|
|
38
|
+
return l = null, h(this, s);
|
|
39
|
+
}, m;
|
|
32
40
|
}
|
|
33
|
-
async function
|
|
34
|
-
return await
|
|
41
|
+
async function A(f, c, e) {
|
|
42
|
+
return await f.apply(c, e);
|
|
35
43
|
}
|
|
36
|
-
const
|
|
44
|
+
const F = {
|
|
37
45
|
xmlns: "http://www.w3.org/2000/svg",
|
|
38
46
|
width: "16",
|
|
39
47
|
height: "16",
|
|
40
48
|
fill: "none"
|
|
41
49
|
};
|
|
42
|
-
function K(
|
|
43
|
-
return
|
|
44
|
-
|
|
50
|
+
function K(f, c) {
|
|
51
|
+
return o(), r("svg", F, [...c[0] || (c[0] = [
|
|
52
|
+
T("path", {
|
|
45
53
|
fill: "#dfdfdf",
|
|
46
54
|
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"
|
|
47
55
|
}, null, -1)
|
|
48
56
|
])]);
|
|
49
57
|
}
|
|
50
|
-
const Y = { render: K }, G = "Введите хотя бы 3 символа", j = "Загрузка", q = "Нет результатов", H = "Please enter 3 or more symbols", J = "Loading...", Q = "No results", W = 300, X = /* @__PURE__ */
|
|
58
|
+
const Y = { render: K }, G = "Введите хотя бы 3 символа", j = "Загрузка", q = "Нет результатов", H = "Please enter 3 or more symbols", J = "Loading...", Q = "No results", W = 300, X = /* @__PURE__ */ I({
|
|
51
59
|
__name: "UiSearch",
|
|
52
60
|
props: {
|
|
53
61
|
modelValue: {},
|
|
@@ -57,72 +65,72 @@ const Y = { render: K }, G = "Введите хотя бы 3 символа", j
|
|
|
57
65
|
lang: {}
|
|
58
66
|
},
|
|
59
67
|
emits: ["update:modelValue"],
|
|
60
|
-
setup(
|
|
61
|
-
const e =
|
|
62
|
-
|
|
68
|
+
setup(f, { emit: c }) {
|
|
69
|
+
const e = f, y = c, n = O(!1), _ = P(async (t) => {
|
|
70
|
+
y("update:modelValue", t);
|
|
63
71
|
}, W);
|
|
64
|
-
function
|
|
65
|
-
|
|
72
|
+
function a() {
|
|
73
|
+
n.value = !0;
|
|
66
74
|
}
|
|
67
|
-
function
|
|
68
|
-
|
|
75
|
+
function l() {
|
|
76
|
+
n.value = !1;
|
|
69
77
|
}
|
|
70
|
-
function
|
|
71
|
-
|
|
78
|
+
function h() {
|
|
79
|
+
l(), y("update:modelValue", "");
|
|
72
80
|
}
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
const m = C(() => e.results ? Object.values(e.results).reduce((t, i) => t + (i ? i.length : 0), 0) : !1), k = O();
|
|
82
|
+
$(k, () => {
|
|
83
|
+
l();
|
|
76
84
|
});
|
|
77
|
-
const
|
|
78
|
-
return (t,
|
|
79
|
-
class:
|
|
85
|
+
const s = C(() => window.IS_STORYBOOK ? "a" : b);
|
|
86
|
+
return (t, i) => (o(), r("div", {
|
|
87
|
+
class: E(t.$style.container),
|
|
80
88
|
ref_key: "containerElement",
|
|
81
|
-
ref:
|
|
89
|
+
ref: k
|
|
82
90
|
}, [
|
|
83
|
-
|
|
91
|
+
R(z, {
|
|
84
92
|
modelValue: e.modelValue,
|
|
85
|
-
"onUpdate:modelValue":
|
|
86
|
-
onClick:
|
|
87
|
-
onKeyup:
|
|
88
|
-
appendIcon:
|
|
93
|
+
"onUpdate:modelValue": i[0] || (i[0] = async (u) => await d(_)(u.toString())),
|
|
94
|
+
onClick: a,
|
|
95
|
+
onKeyup: L(l, ["esc"]),
|
|
96
|
+
appendIcon: d(Y),
|
|
89
97
|
placeholder: "Search"
|
|
90
98
|
}, null, 8, ["modelValue", "appendIcon"]),
|
|
91
|
-
|
|
99
|
+
n.value && e.modelValue.length ? (o(), r("div", {
|
|
92
100
|
key: 0,
|
|
93
|
-
class:
|
|
101
|
+
class: E(t.$style.results)
|
|
94
102
|
}, [
|
|
95
|
-
e.modelValue.length < 3 ? (
|
|
96
|
-
N(
|
|
97
|
-
], 64)) :
|
|
98
|
-
e.modelValue.length > 2 && !e.isSuccess ? (
|
|
99
|
-
N(
|
|
100
|
-
], 64)) :
|
|
101
|
-
e.modelValue.length > 2 && !
|
|
102
|
-
N(
|
|
103
|
-
], 64)) :
|
|
104
|
-
e.modelValue.length > 2 &&
|
|
105
|
-
key:
|
|
106
|
-
class:
|
|
103
|
+
e.modelValue.length < 3 ? (o(), r(p, { key: 0 }, [
|
|
104
|
+
N(v(e.lang === "en" ? d(H) : d(G)), 1)
|
|
105
|
+
], 64)) : g("", !0),
|
|
106
|
+
e.modelValue.length > 2 && !e.isSuccess ? (o(), r(p, { key: 1 }, [
|
|
107
|
+
N(v(e.lang === "en" ? d(J) : d(j)), 1)
|
|
108
|
+
], 64)) : g("", !0),
|
|
109
|
+
e.modelValue.length > 2 && !m.value && e.isSuccess ? (o(), r(p, { key: 2 }, [
|
|
110
|
+
N(v(e.lang === "en" ? d(Q) : d(q)), 1)
|
|
111
|
+
], 64)) : g("", !0),
|
|
112
|
+
e.modelValue.length > 2 && m.value && e.isSuccess ? (o(!0), r(p, { key: 3 }, V(e.searchScheme, (u) => (o(), r("div", {
|
|
113
|
+
key: u.type,
|
|
114
|
+
class: E(t.$style.resultsInner)
|
|
107
115
|
}, [
|
|
108
|
-
t.results?.[
|
|
109
|
-
|
|
110
|
-
class:
|
|
111
|
-
},
|
|
112
|
-
(
|
|
113
|
-
key:
|
|
114
|
-
to: `${
|
|
115
|
-
onClick:
|
|
116
|
-
class:
|
|
116
|
+
t.results?.[u.type]?.length ? (o(), r(p, { key: 0 }, [
|
|
117
|
+
T("div", {
|
|
118
|
+
class: E(t.$style.type)
|
|
119
|
+
}, v(u.type) + ":", 3),
|
|
120
|
+
(o(!0), r(p, null, V(t.results[u.type], (S) => (o(), B(M(s.value), {
|
|
121
|
+
key: S._id,
|
|
122
|
+
to: `${u.url}/${S._id}`,
|
|
123
|
+
onClick: h,
|
|
124
|
+
class: E(t.$style.link)
|
|
117
125
|
}, {
|
|
118
126
|
default: U(() => [
|
|
119
|
-
(
|
|
127
|
+
(o(!0), r(p, null, V(u.labels, (w) => (o(), r("span", { key: w }, v(S[w]), 1))), 128))
|
|
120
128
|
]),
|
|
121
129
|
_: 2
|
|
122
130
|
}, 1032, ["to", "class"]))), 128))
|
|
123
|
-
], 64)) :
|
|
124
|
-
], 2))), 128)) :
|
|
125
|
-
], 2)) :
|
|
131
|
+
], 64)) : g("", !0)
|
|
132
|
+
], 2))), 128)) : g("", !0)
|
|
133
|
+
], 2)) : g("", !0)
|
|
126
134
|
], 2));
|
|
127
135
|
}
|
|
128
136
|
}), Z = "_container_1xgvk_1", ee = "_results_1xgvk_6", te = "_resultsInner_1xgvk_22", ne = "_type_1xgvk_31", le = "_link_1xgvk_36", se = {
|
package/dist/base.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mhz-ui",
|
|
3
3
|
"description": "Mhz ui kit",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.4",
|
|
5
5
|
"author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"test:cov": "vitest run --coverage"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tiptap/pm": "3.2.
|
|
29
|
-
"@tiptap/starter-kit": "3.2.
|
|
30
|
-
"@tiptap/vue-3": "3.2.
|
|
28
|
+
"@tiptap/pm": "3.2.2",
|
|
29
|
+
"@tiptap/starter-kit": "3.2.2",
|
|
30
|
+
"@tiptap/vue-3": "3.2.2",
|
|
31
31
|
"@vueform/slider": "2.1.10",
|
|
32
32
|
"@vueuse/core": "13.7.0",
|
|
33
33
|
"@vueuse/integrations": "13.7.0",
|
|
34
34
|
"chart.js": "4.5.0",
|
|
35
35
|
"mhz-helpers": "*",
|
|
36
|
-
"perfect-debounce": "
|
|
36
|
+
"perfect-debounce": "2.0.0",
|
|
37
37
|
"vue": "3.5.19",
|
|
38
38
|
"vue-cal": "5.0.1-rc.28",
|
|
39
39
|
"vue-chartjs": "5.3.2",
|
|
40
40
|
"vue-router": "4.5.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@eslint/js": "9.
|
|
43
|
+
"@eslint/js": "9.34.0",
|
|
44
44
|
"@storybook/addon-docs": "9.1.3",
|
|
45
45
|
"@storybook/vue3": "9.1.3",
|
|
46
46
|
"@storybook/vue3-vite": "9.1.3",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@vitejs/plugin-vue": "6.0.1",
|
|
49
49
|
"@vitest/coverage-istanbul": "3.2.4",
|
|
50
50
|
"@vue/test-utils": "2.4.6",
|
|
51
|
-
"eslint": "9.
|
|
51
|
+
"eslint": "9.34.0",
|
|
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",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"vite-svg-loader": "5.1.0",
|
|
76
76
|
"vitest": "3.2.4",
|
|
77
77
|
"vue-eslint-parser": "10.2.0",
|
|
78
|
-
"vue-linters-config": "0.3.
|
|
78
|
+
"vue-linters-config": "0.3.19",
|
|
79
79
|
"vue-tsc": "3.0.6"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|