mhz-ui 1.0.11 → 1.0.12
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/UiCheckbox/UiCheckbox.css +1 -1
- package/dist/UiCheckbox/UiCheckbox.js +28 -28
- package/dist/UiEditor/UiEditor.js +886 -871
- package/dist/UiInput/UiInput.css +1 -1
- package/dist/UiInput/UiInput.d.ts +6 -0
- package/dist/UiInput/UiInput.js +96 -80
- package/dist/UiSelect/UiSelect.js +56 -60
- package/dist/UiSpoiler/UiSpoiler.css +1 -1
- package/dist/UiSpoiler/UiSpoiler.js +15 -15
- package/dist/UiUpload/UiUpload.js +1 -1
- package/dist/toast/toast.css +1 -1
- package/package.json +19 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._checkbox_udsu1_1{position:relative;display:flex;flex-direction:row-reverse;gap:8px;width:fit-content;cursor:pointer;user-select:none}._checkbox_udsu1_1:hover ._fake_udsu1_10{border-color:var(--color-primary)}._checkbox_udsu1_1:hover ._fake_udsu1_10[data-switcher=true]{background-color:var(--color-gray-dark);border:none}._checkbox_udsu1_1:hover ._fake_udsu1_10[data-disabled=true]:not([data-switcher=true]){border-color:var(--color-gray)}._checkbox_udsu1_1:hover ._input_udsu1_20:checked+._fake_udsu1_10{background-color:var(--color-primary-dark);border-color:var(--color-primary-dark)}._checkbox_udsu1_1:hover ._input_udsu1_20:checked+._fake_udsu1_10[data-disabled=true][data-switcher=true]{background-color:var(--color-gray)}._checkbox_udsu1_1:hover ._input_udsu1_20:checked+._fake_udsu1_10[data-disabled=true]:not([data-switcher=true]){background-color:var(--color-gray);border-color:var(--color-gray)}._checkbox_udsu1_1[data-disabled=true]{color:var(--color-gray-dark)}._input_udsu1_20{position:absolute;z-index:1;appearance:none;border:none}._input_udsu1_20:checked+._fake_udsu1_10{position:relative;background-color:var(--color-primary);border-color:var(--color-primary)}._input_udsu1_20:checked+._fake_udsu1_10 ._line_udsu1_46{position:absolute;height:2px;background-color:var(--color-white);border-radius:2px}._input_udsu1_20:checked+._fake_udsu1_10 ._leftLine_udsu1_52{top:55%;left:10%;width:40%;transform:rotate(45deg)}._input_udsu1_20:checked+._fake_udsu1_10 ._rightLine_udsu1_58{top:45%;left:30%;width:65%;transform:rotate(-45deg)}._input_udsu1_20:checked+._fake_udsu1_10[data-switcher=true]:before{transform:translate(20px)}._fake_udsu1_10{z-index:0;flex-shrink:0;width:20px;height:20px;margin-top:2px;cursor:pointer;border:1px solid var(--color-gray-dark);border-radius:4px;outline:none}._fake_udsu1_10:focus{width:20px;height:20px;outline:auto}._fake_udsu1_10[data-switcher=true]{position:relative;width:40px;height:20px;background-color:var(--color-gray);border:none;border-radius:16px;transition:all .3s}._fake_udsu1_10[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_udsu1_10[data-disabled=true]:not([data-switcher=true]){background-color:var(--color-gray);border-color:var(--color-gray)}._fake_udsu1_10[data-disabled=true]:not([data-switcher=true]):focus{outline:none}._fake_udsu1_10[data-disabled=true][data-switcher=true]{background-color:var(--color-gray);border-color:var(--color-gray)}._fake_udsu1_10[data-disabled=true][data-switcher=true]:focus{outline:none}._fake_udsu1_10[data-error=true]{border-color:var(--color-error)}._subLabel_udsu1_122{font-size:.875rem;color:var(--color-gray-dark-extra)}._required_udsu1_127{color:var(--color-error)}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./UiCheckbox.css";
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as p, ref as h, openBlock as l, createElementBlock as t, withModifiers as y, normalizeClass as a, toDisplayString as r, createCommentVNode as i, createElementVNode as u, withKeys as f, createTextVNode as _ } from "vue";
|
|
3
3
|
import { _ as k } from "../_plugin-vue_export-helper-dad06003.js";
|
|
4
|
-
const m = ["data-disabled"], L = { key: 1 }, $ = ["value", "checked", "disabled"], w = ["data-switcher", "data-disabled", "data-error"], S = { key: 2 }, V = /* @__PURE__ */
|
|
4
|
+
const m = ["data-disabled"], L = { key: 1 }, $ = ["value", "checked", "disabled"], w = ["data-switcher", "data-disabled", "data-error"], S = { key: 2 }, V = /* @__PURE__ */ p({
|
|
5
5
|
__name: "UiCheckbox",
|
|
6
6
|
props: {
|
|
7
7
|
initialValue: { type: [Boolean, String, Number], default: !1 },
|
|
@@ -15,36 +15,36 @@ const m = ["data-disabled"], L = { key: 1 }, $ = ["value", "checked", "disabled"
|
|
|
15
15
|
isSwitcher: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
|
-
setup(
|
|
19
|
-
const e =
|
|
18
|
+
setup(d, { emit: c }) {
|
|
19
|
+
const e = d, n = h();
|
|
20
20
|
function b() {
|
|
21
21
|
if (n.value) {
|
|
22
|
-
let
|
|
23
|
-
n.value.checked ?
|
|
22
|
+
let s;
|
|
23
|
+
n.value.checked ? s = e.initialValue ? e.initialValue : !0 : s = !1, c("update:modelValue", s);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
return (
|
|
26
|
+
return (s, o) => (l(), t("label", {
|
|
27
27
|
onClick: o[1] || (o[1] = y(() => {
|
|
28
28
|
}, ["stop"])),
|
|
29
29
|
"data-disabled": e.isDisabled,
|
|
30
|
-
class: a(
|
|
30
|
+
class: a(s.$style.checkbox)
|
|
31
31
|
}, [
|
|
32
|
-
e.error ? (
|
|
32
|
+
e.error ? (l(), t("span", {
|
|
33
33
|
key: 0,
|
|
34
|
-
class: a(
|
|
34
|
+
class: a(s.$style.required)
|
|
35
35
|
}, r(e.error), 3)) : i("", !0),
|
|
36
|
-
e.label ? (
|
|
37
|
-
|
|
38
|
-
e.subLabel ? (
|
|
36
|
+
e.label ? (l(), t("span", L, [
|
|
37
|
+
u("span", null, r(e.label), 1),
|
|
38
|
+
e.subLabel ? (l(), t("span", {
|
|
39
39
|
key: 0,
|
|
40
|
-
class: a(
|
|
40
|
+
class: a(s.$style.subLabel)
|
|
41
41
|
}, r(e.subLabel), 3)) : i("", !0),
|
|
42
|
-
e.isRequired ? (
|
|
42
|
+
e.isRequired ? (l(), t("span", {
|
|
43
43
|
key: 1,
|
|
44
|
-
class: a(
|
|
44
|
+
class: a(s.$style.required)
|
|
45
45
|
}, "*", 2)) : i("", !0)
|
|
46
46
|
])) : i("", !0),
|
|
47
|
-
|
|
47
|
+
u("input", {
|
|
48
48
|
onChange: b,
|
|
49
49
|
type: "checkbox",
|
|
50
50
|
ref_key: "checkbox",
|
|
@@ -52,36 +52,36 @@ const m = ["data-disabled"], L = { key: 1 }, $ = ["value", "checked", "disabled"
|
|
|
52
52
|
value: e.initialValue,
|
|
53
53
|
checked: !!e.modelValue,
|
|
54
54
|
disabled: e.isDisabled,
|
|
55
|
-
class: a(
|
|
55
|
+
class: a(s.$style.input),
|
|
56
56
|
tabindex: "-1"
|
|
57
57
|
}, null, 42, $),
|
|
58
|
-
|
|
58
|
+
u("div", {
|
|
59
59
|
onKeydown: o[0] || (o[0] = f((E) => n.value?.click(), ["space"])),
|
|
60
60
|
"data-switcher": e.isSwitcher,
|
|
61
61
|
"data-disabled": e.isDisabled,
|
|
62
62
|
"data-error": e.error,
|
|
63
|
-
class: a(
|
|
63
|
+
class: a(s.$style.fake),
|
|
64
64
|
tabindex: "0"
|
|
65
65
|
}, [
|
|
66
|
-
e.isSwitcher ? i("", !0) : (
|
|
66
|
+
e.isSwitcher ? i("", !0) : (l(), t("div", {
|
|
67
67
|
key: 0,
|
|
68
|
-
class: a([
|
|
68
|
+
class: a([s.$style.line, s.$style.leftLine])
|
|
69
69
|
}, null, 2)),
|
|
70
|
-
e.isSwitcher ? i("", !0) : (
|
|
70
|
+
e.isSwitcher ? i("", !0) : (l(), t("div", {
|
|
71
71
|
key: 1,
|
|
72
|
-
class: a([
|
|
72
|
+
class: a([s.$style.line, s.$style.rightLine])
|
|
73
73
|
}, null, 2))
|
|
74
74
|
], 42, w),
|
|
75
|
-
e.labelSwitcher ? (
|
|
75
|
+
e.labelSwitcher ? (l(), t("span", S, [
|
|
76
76
|
_(r(e.labelSwitcher), 1),
|
|
77
|
-
e.isRequired ? (
|
|
77
|
+
e.isRequired ? (l(), t("span", {
|
|
78
78
|
key: 0,
|
|
79
|
-
class: a(
|
|
79
|
+
class: a(s.$style.required)
|
|
80
80
|
}, "*", 2)) : i("", !0)
|
|
81
81
|
])) : i("", !0)
|
|
82
82
|
], 10, m));
|
|
83
83
|
}
|
|
84
|
-
}), g = "
|
|
84
|
+
}), g = "_checkbox_udsu1_1", v = "_fake_udsu1_10", q = "_input_udsu1_20", B = "_line_udsu1_46", C = "_leftLine_udsu1_52", D = "_rightLine_udsu1_58", N = "_subLabel_udsu1_122", x = "_required_udsu1_127", M = {
|
|
85
85
|
checkbox: g,
|
|
86
86
|
fake: v,
|
|
87
87
|
input: q,
|