mhz-ui 1.1.56 → 1.1.58
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
|
+
._checkbox_1k336_1{position:relative;display:flex;flex-direction:row-reverse;gap:8px;width:fit-content;cursor:pointer;user-select:none}._checkbox_1k336_1[data-switcher=true]{gap:6px}._checkbox_1k336_1:hover ._fake_1k336_13{border-color:var(--color-primary)}._checkbox_1k336_1:hover ._fake_1k336_13[data-switcher=true]{background-color:var(--color-gray-dark);border:none}._checkbox_1k336_1:hover ._fake_1k336_13[data-disabled=true]:not([data-switcher=true]){border-color:var(--color-gray)}._checkbox_1k336_1:hover ._input_1k336_23:checked+._fake_1k336_13{background-color:var(--color-primary-dark);border-color:var(--color-primary-dark)}._checkbox_1k336_1:hover ._input_1k336_23:checked+._fake_1k336_13[data-disabled=true][data-switcher=true]{background-color:var(--color-gray)}._checkbox_1k336_1:hover ._input_1k336_23:checked+._fake_1k336_13[data-disabled=true]:not([data-switcher=true]){background-color:var(--color-gray);border-color:var(--color-gray)}._checkbox_1k336_1[data-disabled=true]{color:var(--color-gray-dark)}._input_1k336_23{position:absolute;z-index:1;appearance:none;border:none}._input_1k336_23:checked+._fake_1k336_13{position:relative;background-color:var(--color-primary);border-color:var(--color-primary)}._input_1k336_23:checked+._fake_1k336_13 ._line_1k336_49{position:absolute;height:2px;background-color:var(--color-white);border-radius:2px}._input_1k336_23:checked+._fake_1k336_13 ._leftLine_1k336_55{top:55%;left:10%;width:40%;transform:rotate(45deg)}._input_1k336_23:checked+._fake_1k336_13 ._rightLine_1k336_61{top:45%;left:30%;width:65%;transform:rotate(-45deg)}._input_1k336_23:checked+._fake_1k336_13[data-switcher=true]:before{transform:translate(12px)}._fake_1k336_13{z-index:0;flex-shrink:0;width:20px;height:20px;margin-top:2px;cursor:pointer;outline:none;border:1px solid var(--color-gray-dark);border-radius:4px}._fake_1k336_13:focus{width:20px;height:20px;outline:auto}._fake_1k336_13[data-switcher=true]{position:relative;width:32px;height:20px;background-color:var(--color-gray);border:none;border-radius:16px;transition:all .3s}._fake_1k336_13[data-switcher=true]:before{position:absolute;top:4px;left:4px;width:12px;height:12px;content:"";background-color:var(--color-white);border-radius:50%;transition:all .2s}._fake_1k336_13[data-disabled=true]:not([data-switcher=true]){background-color:var(--color-gray);border-color:var(--color-gray)}._fake_1k336_13[data-disabled=true]:not([data-switcher=true]):focus{outline:none}._fake_1k336_13[data-disabled=true][data-switcher=true]{background-color:var(--color-gray);border-color:var(--color-gray)}._fake_1k336_13[data-disabled=true][data-switcher=true]:focus{outline:none}._fake_1k336_13[data-error=true]{border-color:var(--color-error)}._labelSub_1k336_125{font-size:.875rem;color:var(--color-gray-dark-extra)}._required_1k336_130{color:var(--color-error)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./UiCheckbox.css";
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as _, ref as y, createElementBlock as t, openBlock as s, normalizeClass as a, withModifiers as f, createCommentVNode as i, createElementVNode as r, toDisplayString as d, withKeys as m } from "vue";
|
|
3
3
|
import { _ as S } from "../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
const c = !1, u = "", w = ["data-disabled", "data-switcher"], L = { key: 1 }, $ = ["value", "checked", "disabled"], V = ["data-switcher", "data-disabled", "data-error"], g = { key: 2 }, v = /* @__PURE__ */
|
|
4
|
+
const c = !1, u = "", w = ["data-disabled", "data-switcher"], L = { key: 1 }, $ = ["value", "checked", "disabled"], V = ["data-switcher", "data-disabled", "data-error"], g = { key: 2 }, v = /* @__PURE__ */ _({
|
|
5
5
|
__name: "UiCheckbox",
|
|
6
6
|
props: {
|
|
7
7
|
initialValue: { type: [Boolean, String, Number], default: c },
|
|
@@ -15,45 +15,45 @@ const c = !1, u = "", w = ["data-disabled", "data-switcher"], L = { key: 1 }, $
|
|
|
15
15
|
isSwitcher: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
|
-
setup(b, { emit:
|
|
19
|
-
const e = b,
|
|
20
|
-
function
|
|
18
|
+
setup(b, { emit: k }) {
|
|
19
|
+
const e = b, p = k, n = y();
|
|
20
|
+
function h() {
|
|
21
21
|
if (n.value) {
|
|
22
|
-
let
|
|
23
|
-
n.value.checked ?
|
|
22
|
+
let l;
|
|
23
|
+
n.value.checked ? l = e.initialValue ? e.initialValue : !0 : l = !1, p("update:modelValue", l);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
return (
|
|
27
|
-
onClick: o[1] || (o[1] =
|
|
26
|
+
return (l, o) => (s(), t("label", {
|
|
27
|
+
onClick: o[1] || (o[1] = f(() => {
|
|
28
28
|
}, ["stop"])),
|
|
29
29
|
"data-disabled": e.isDisabled,
|
|
30
|
-
class: a(
|
|
30
|
+
class: a(l.$style.checkbox),
|
|
31
31
|
"data-switcher": e.isSwitcher
|
|
32
32
|
}, [
|
|
33
|
-
e.error ? (s(),
|
|
33
|
+
e.error ? (s(), t("span", {
|
|
34
34
|
key: 0,
|
|
35
|
-
class: a(
|
|
35
|
+
class: a(l.$style.required)
|
|
36
36
|
}, d(e.error), 3)) : i("", !0),
|
|
37
|
-
e.label ? (s(),
|
|
37
|
+
e.label ? (s(), t("span", L, [
|
|
38
38
|
r("span", null, d(e.label), 1),
|
|
39
|
-
e.labelSub ? (s(),
|
|
39
|
+
e.labelSub ? (s(), t("span", {
|
|
40
40
|
key: 0,
|
|
41
|
-
class: a(
|
|
41
|
+
class: a(l.$style.labelSub)
|
|
42
42
|
}, d(e.labelSub), 3)) : i("", !0),
|
|
43
|
-
e.isRequired ? (s(),
|
|
43
|
+
e.isRequired ? (s(), t("span", {
|
|
44
44
|
key: 1,
|
|
45
|
-
class: a(
|
|
45
|
+
class: a(l.$style.required)
|
|
46
46
|
}, "*", 2)) : i("", !0)
|
|
47
47
|
])) : i("", !0),
|
|
48
48
|
r("input", {
|
|
49
|
-
onChange:
|
|
49
|
+
onChange: h,
|
|
50
50
|
type: "checkbox",
|
|
51
51
|
ref_key: "checkbox",
|
|
52
52
|
ref: n,
|
|
53
53
|
value: e.initialValue,
|
|
54
54
|
checked: !!e.modelValue,
|
|
55
55
|
disabled: e.isDisabled,
|
|
56
|
-
class: a(
|
|
56
|
+
class: a(l.$style.input),
|
|
57
57
|
tabindex: "-1"
|
|
58
58
|
}, null, 42, $),
|
|
59
59
|
r("div", {
|
|
@@ -61,28 +61,28 @@ const c = !1, u = "", w = ["data-disabled", "data-switcher"], L = { key: 1 }, $
|
|
|
61
61
|
"data-switcher": e.isSwitcher,
|
|
62
62
|
"data-disabled": e.isDisabled,
|
|
63
63
|
"data-error": !!e.error,
|
|
64
|
-
class: a(
|
|
64
|
+
class: a(l.$style.fake),
|
|
65
65
|
tabindex: "0"
|
|
66
66
|
}, [
|
|
67
|
-
e.isSwitcher ? i("", !0) : (s(),
|
|
67
|
+
e.isSwitcher ? i("", !0) : (s(), t("div", {
|
|
68
68
|
key: 0,
|
|
69
|
-
class: a([
|
|
69
|
+
class: a([l.$style.line, l.$style.leftLine])
|
|
70
70
|
}, null, 2)),
|
|
71
|
-
e.isSwitcher ? i("", !0) : (s(),
|
|
71
|
+
e.isSwitcher ? i("", !0) : (s(), t("div", {
|
|
72
72
|
key: 1,
|
|
73
|
-
class: a([
|
|
73
|
+
class: a([l.$style.line, l.$style.rightLine])
|
|
74
74
|
}, null, 2))
|
|
75
75
|
], 42, V),
|
|
76
|
-
e.labelSwitcher ? (s(),
|
|
76
|
+
e.labelSwitcher ? (s(), t("span", g, [
|
|
77
77
|
r("span", null, d(e.labelSwitcher), 1),
|
|
78
|
-
e.isRequired ? (s(),
|
|
78
|
+
e.isRequired ? (s(), t("span", {
|
|
79
79
|
key: 0,
|
|
80
|
-
class: a(
|
|
80
|
+
class: a(l.$style.required)
|
|
81
81
|
}, "*", 2)) : i("", !0)
|
|
82
82
|
])) : i("", !0)
|
|
83
83
|
], 10, w));
|
|
84
84
|
}
|
|
85
|
-
}), q = "
|
|
85
|
+
}), q = "_checkbox_1k336_1", B = "_fake_1k336_13", C = "_input_1k336_23", D = "_line_1k336_49", E = "_leftLine_1k336_55", U = "_rightLine_1k336_61", A = "_labelSub_1k336_125", M = "_required_1k336_130", N = {
|
|
86
86
|
checkbox: q,
|
|
87
87
|
fake: B,
|
|
88
88
|
input: C,
|
|
@@ -10415,7 +10415,7 @@ const vp = ee.create({
|
|
|
10415
10415
|
const { state: i } = t, s = i.doc.slice(n.from, n.to);
|
|
10416
10416
|
r.deleteRange(n.from, n.to);
|
|
10417
10417
|
const o = r.mapping.map(e);
|
|
10418
|
-
return r.insert(o, s.content), r.setSelection(new D(r.doc.resolve(o - 1))), !0;
|
|
10418
|
+
return r.insert(o, s.content), r.setSelection(new D(r.doc.resolve(Math.max(o - 1, 0)))), !0;
|
|
10419
10419
|
}, Op = () => ({ tr: n, dispatch: e }) => {
|
|
10420
10420
|
const { selection: t } = n, r = t.$anchor.node();
|
|
10421
10421
|
if (r.content.size > 0)
|
|
@@ -13932,7 +13932,7 @@ class Tg {
|
|
|
13932
13932
|
}
|
|
13933
13933
|
createTooltip() {
|
|
13934
13934
|
const { element: e } = this.editor.options, t = !!e.parentElement;
|
|
13935
|
-
this.tippy || !t
|
|
13935
|
+
this.element.tabIndex = 0, !(this.tippy || !t) && (this.tippy = yn(e, {
|
|
13936
13936
|
duration: 0,
|
|
13937
13937
|
getReferenceClientRect: null,
|
|
13938
13938
|
content: this.element,
|
|
@@ -14018,7 +14018,7 @@ class Eg {
|
|
|
14018
14018
|
}
|
|
14019
14019
|
createTooltip() {
|
|
14020
14020
|
const { element: e } = this.editor.options, t = !!e.parentElement;
|
|
14021
|
-
this.tippy || !t
|
|
14021
|
+
this.element.tabIndex = 0, !(this.tippy || !t) && (this.tippy = yn(e, {
|
|
14022
14022
|
duration: 0,
|
|
14023
14023
|
getReferenceClientRect: null,
|
|
14024
14024
|
content: this.element,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mhz-ui",
|
|
3
3
|
"description": "Mhz ui kit",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.58",
|
|
5
5
|
"author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"test:cov": "vitest run --coverage"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@tiptap/pm": "2.
|
|
29
|
-
"@tiptap/starter-kit": "2.
|
|
30
|
-
"@tiptap/vue-3": "2.
|
|
28
|
+
"@tiptap/pm": "2.24.2",
|
|
29
|
+
"@tiptap/starter-kit": "2.24.2",
|
|
30
|
+
"@tiptap/vue-3": "2.24.2",
|
|
31
31
|
"@vueform/slider": "2.1.10",
|
|
32
|
-
"@vueuse/core": "13.
|
|
33
|
-
"@vueuse/integrations": "13.
|
|
32
|
+
"@vueuse/core": "13.5.0",
|
|
33
|
+
"@vueuse/integrations": "13.5.0",
|
|
34
34
|
"chart.js": "4.5.0",
|
|
35
35
|
"mhz-helpers": "*",
|
|
36
36
|
"perfect-debounce": "1.0.0",
|
|
@@ -40,43 +40,43 @@
|
|
|
40
40
|
"vue-router": "4.5.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@eslint/js": "9.30.
|
|
44
|
-
"@storybook/addon-docs": "9.0.
|
|
45
|
-
"@storybook/vue3": "9.0.
|
|
46
|
-
"@storybook/vue3-vite": "9.0.
|
|
47
|
-
"@types/node": "24.0.
|
|
43
|
+
"@eslint/js": "9.30.1",
|
|
44
|
+
"@storybook/addon-docs": "9.0.15",
|
|
45
|
+
"@storybook/vue3": "9.0.15",
|
|
46
|
+
"@storybook/vue3-vite": "9.0.15",
|
|
47
|
+
"@types/node": "24.0.10",
|
|
48
48
|
"@vitejs/plugin-vue": "6.0.0",
|
|
49
49
|
"@vitest/coverage-istanbul": "3.2.4",
|
|
50
50
|
"@vue/test-utils": "2.4.6",
|
|
51
|
-
"eslint": "9.30.
|
|
51
|
+
"eslint": "9.30.1",
|
|
52
52
|
"eslint-config-prettier": "10.1.5",
|
|
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.1",
|
|
56
|
-
"eslint-plugin-vue": "10.
|
|
57
|
-
"globals": "16.
|
|
56
|
+
"eslint-plugin-vue": "10.3.0",
|
|
57
|
+
"globals": "16.3.0",
|
|
58
58
|
"happy-dom": "18.0.1",
|
|
59
59
|
"postcss-html": "1.8.0",
|
|
60
60
|
"postcss-scss": "4.0.9",
|
|
61
61
|
"prettier": "3.6.2",
|
|
62
62
|
"sass-embedded": "1.89.2",
|
|
63
|
-
"storybook": "9.0.
|
|
64
|
-
"stylelint": "16.21.
|
|
63
|
+
"storybook": "9.0.15",
|
|
64
|
+
"stylelint": "16.21.1",
|
|
65
65
|
"stylelint-config-recess-order": "7.1.0",
|
|
66
66
|
"stylelint-config-recommended-scss": "15.0.1",
|
|
67
67
|
"stylelint-config-recommended-vue": "1.6.1",
|
|
68
68
|
"stylelint-order": "7.0.0",
|
|
69
69
|
"stylelint-prettier": "5.0.3",
|
|
70
70
|
"typescript": "5.8.3",
|
|
71
|
-
"typescript-eslint": "8.35.
|
|
72
|
-
"vite": "7.0.
|
|
71
|
+
"typescript-eslint": "8.35.1",
|
|
72
|
+
"vite": "7.0.2",
|
|
73
73
|
"vite-plugin-dts": "4.5.4",
|
|
74
74
|
"vite-plugin-static-copy": "3.1.0",
|
|
75
75
|
"vite-svg-loader": "5.1.0",
|
|
76
76
|
"vitest": "3.2.4",
|
|
77
|
-
"vue-eslint-parser": "10.
|
|
77
|
+
"vue-eslint-parser": "10.2.0",
|
|
78
78
|
"vue-linters-config": "0.3.14",
|
|
79
|
-
"vue-tsc": "
|
|
79
|
+
"vue-tsc": "3.0.1"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
82
|
"vue": "3.5.17",
|