mhz-ui 1.0.17 → 1.0.19
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 +40 -33
- package/dist/UiButton/UiButton.js +24 -20
- package/dist/UiCheckbox/UiCheckbox.css +1 -1
- package/dist/UiCheckbox/UiCheckbox.d.ts +3 -3
- package/dist/UiCheckbox/UiCheckbox.js +67 -58
- package/dist/UiEditor/UiEditor.js +272 -268
- package/dist/UiInput/UiInput.js +47 -36
- package/package.json +22 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._breadcrumbs_1xdvy_1,._links_1xdvy_6{display:flex;gap:4px}._link_1xdvy_6{color:var(--color-gray-dark);text-decoration:none}._link_1xdvy_6[data-link=true]{color:var(--color-primary);cursor:pointer}._link_1xdvy_6[data-link=true]:hover{color:var(--color-primary-dark)}._link_1xdvy_6[data-color=white]{color:var(--color-white)}._link_1xdvy_6[data-color=white]:hover{color:var(--color-gray-light)}._slash_1xdvy_29{color:var(--color-gray-dark)}._slash_1xdvy_29[data-color=white]{color:var(--color-white)}
|
|
@@ -1,62 +1,69 @@
|
|
|
1
1
|
import "./UiBreadcrumbs.css";
|
|
2
|
-
import { defineComponent as m, computed as
|
|
2
|
+
import { defineComponent as m, computed as d, openBlock as s, createElementBlock as r, normalizeClass as l, Fragment as p, renderList as u, createBlock as _, resolveDynamicComponent as b, withCtx as h, createElementVNode as i, toDisplayString as k, createCommentVNode as y } from "vue";
|
|
3
3
|
import { RouterLink as f } from "vue-router";
|
|
4
4
|
import { _ as g } from "../_plugin-vue_export-helper-dad06003.js";
|
|
5
|
-
const
|
|
5
|
+
const v = "default", B = {
|
|
6
|
+
itemprop: "name",
|
|
7
|
+
"data-test": "ui-breadcrumb-title"
|
|
8
|
+
}, C = ["data-color"], L = ["content"], $ = /* @__PURE__ */ m({
|
|
6
9
|
__name: "UiBreadcrumbs",
|
|
7
10
|
props: {
|
|
8
11
|
links: {},
|
|
9
|
-
color: { default:
|
|
12
|
+
color: { default: v }
|
|
10
13
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const t =
|
|
13
|
-
return (o,
|
|
14
|
-
class:
|
|
14
|
+
setup(n) {
|
|
15
|
+
const t = n, c = d(() => window.IS_STORYBOOK ? "a" : f);
|
|
16
|
+
return (o, T) => (s(), r("div", {
|
|
17
|
+
class: l(o.$style.breadcrumbs),
|
|
15
18
|
itemscope: "",
|
|
16
19
|
itemtype: "https://schema.org/BreadcrumbList"
|
|
17
20
|
}, [
|
|
18
|
-
(s(!0),
|
|
21
|
+
(s(!0), r(p, null, u(t.links, (e, a) => (s(), r("div", {
|
|
19
22
|
key: `${e.title}${e.url}`,
|
|
20
|
-
class:
|
|
23
|
+
class: l(o.$style.links),
|
|
21
24
|
itemprop: "itemListElement",
|
|
22
25
|
itemscope: "",
|
|
23
|
-
itemtype: "https://schema.org/ListItem"
|
|
26
|
+
itemtype: "https://schema.org/ListItem",
|
|
27
|
+
"data-test": "ui-breadcrumb"
|
|
24
28
|
}, [
|
|
25
|
-
(s(), _(
|
|
29
|
+
(s(), _(b(a === t.links.length - 1 ? "div" : c.value), {
|
|
26
30
|
to: e.url,
|
|
27
|
-
class:
|
|
28
|
-
"data-link":
|
|
29
|
-
"data-
|
|
31
|
+
class: l(o.$style.link),
|
|
32
|
+
"data-link": a !== t.links.length - 1,
|
|
33
|
+
"data-color": t.color,
|
|
30
34
|
itemid: e.url,
|
|
31
35
|
itemtype: "https://schema.org/Thing",
|
|
32
36
|
itemscope: "",
|
|
33
|
-
itemprop: "item"
|
|
37
|
+
itemprop: "item",
|
|
38
|
+
"data-test": "ui-breadcrumb-link"
|
|
34
39
|
}, {
|
|
35
|
-
default:
|
|
36
|
-
|
|
40
|
+
default: h(() => [
|
|
41
|
+
i("span", B, k(e.title), 1)
|
|
37
42
|
]),
|
|
38
43
|
_: 2
|
|
39
|
-
}, 1032, ["to", "class", "data-link", "data-
|
|
40
|
-
|
|
44
|
+
}, 1032, ["to", "class", "data-link", "data-color", "itemid"])),
|
|
45
|
+
a !== t.links.length - 1 ? (s(), r("span", {
|
|
41
46
|
key: 0,
|
|
42
|
-
class:
|
|
43
|
-
"data-
|
|
44
|
-
|
|
45
|
-
|
|
47
|
+
class: l(o.$style.slash),
|
|
48
|
+
"data-color": t.color,
|
|
49
|
+
"data-test": "ui-breadcrumb-slash"
|
|
50
|
+
}, "/", 10, C)) : y("", !0),
|
|
51
|
+
i("meta", {
|
|
46
52
|
itemprop: "position",
|
|
47
|
-
content: (
|
|
48
|
-
|
|
53
|
+
content: (a + 1).toString(),
|
|
54
|
+
"data-test": "ui-breadcrumb-position"
|
|
55
|
+
}, null, 8, L)
|
|
49
56
|
], 2))), 128))
|
|
50
57
|
], 2));
|
|
51
58
|
}
|
|
52
|
-
}),
|
|
53
|
-
breadcrumbs:
|
|
54
|
-
links:
|
|
59
|
+
}), O = "_breadcrumbs_1xdvy_1", E = "_links_1xdvy_6", S = "_link_1xdvy_6", w = "_slash_1xdvy_29", D = {
|
|
60
|
+
breadcrumbs: O,
|
|
61
|
+
links: E,
|
|
55
62
|
link: S,
|
|
56
|
-
slash:
|
|
57
|
-
},
|
|
58
|
-
$style:
|
|
59
|
-
},
|
|
63
|
+
slash: w
|
|
64
|
+
}, R = {
|
|
65
|
+
$style: D
|
|
66
|
+
}, M = /* @__PURE__ */ g($, [["__cssModules", R]]);
|
|
60
67
|
export {
|
|
61
|
-
|
|
68
|
+
M as default
|
|
62
69
|
};
|
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
import "./UiButton.css";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { _ as
|
|
4
|
-
const p = ["data-layout", "type", "disabled"],
|
|
2
|
+
import { defineComponent as s, openBlock as e, createElementBlock as a, normalizeClass as c, createBlock as l, resolveDynamicComponent as u, createCommentVNode as i, renderSlot as d } from "vue";
|
|
3
|
+
import { _ as r } from "../_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const p = "primary", _ = "button", y = void 0, m = ["data-layout", "type", "disabled"], b = /* @__PURE__ */ s({
|
|
5
5
|
__name: "UiButton",
|
|
6
6
|
props: {
|
|
7
|
-
layout: { default:
|
|
8
|
-
type: { default:
|
|
7
|
+
layout: { default: p },
|
|
8
|
+
type: { default: _ },
|
|
9
9
|
isDisabled: { type: Boolean },
|
|
10
|
-
icon: { type: [Function, Object], default:
|
|
10
|
+
icon: { type: [Function, Object], default: y }
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const t =
|
|
14
|
-
return (
|
|
15
|
-
class:
|
|
12
|
+
setup(n) {
|
|
13
|
+
const t = n;
|
|
14
|
+
return (o, U) => (e(), a("button", {
|
|
15
|
+
class: c(o.$style.button),
|
|
16
16
|
"data-layout": t.layout,
|
|
17
17
|
type: t.type,
|
|
18
|
-
disabled: t.isDisabled
|
|
18
|
+
disabled: t.isDisabled,
|
|
19
|
+
"data-test": "ui-button"
|
|
19
20
|
}, [
|
|
20
|
-
t.icon ? (
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
t.icon ? (e(), l(u(t.icon), {
|
|
22
|
+
key: 0,
|
|
23
|
+
"data-test": "ui-button-icon"
|
|
24
|
+
})) : i("", !0),
|
|
25
|
+
d(o.$slots, "default")
|
|
26
|
+
], 10, m));
|
|
23
27
|
}
|
|
24
|
-
}),
|
|
25
|
-
button:
|
|
26
|
-
},
|
|
27
|
-
$style:
|
|
28
|
-
},
|
|
28
|
+
}), f = "_button_178ej_1", B = {
|
|
29
|
+
button: f
|
|
30
|
+
}, D = {
|
|
31
|
+
$style: B
|
|
32
|
+
}, T = /* @__PURE__ */ r(b, [["__cssModules", D]]);
|
|
29
33
|
export {
|
|
30
|
-
|
|
34
|
+
T as default
|
|
31
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._checkbox_1931l_1{position:relative;display:flex;flex-direction:row-reverse;gap:8px;width:fit-content;cursor:pointer;user-select:none}._checkbox_1931l_1:hover ._fake_1931l_10{border-color:var(--color-primary)}._checkbox_1931l_1:hover ._fake_1931l_10[data-switcher=true]{background-color:var(--color-gray-dark);border:none}._checkbox_1931l_1:hover ._fake_1931l_10[data-disabled=true]:not([data-switcher=true]){border-color:var(--color-gray)}._checkbox_1931l_1:hover ._input_1931l_20:checked+._fake_1931l_10{background-color:var(--color-primary-dark);border-color:var(--color-primary-dark)}._checkbox_1931l_1:hover ._input_1931l_20:checked+._fake_1931l_10[data-disabled=true][data-switcher=true]{background-color:var(--color-gray)}._checkbox_1931l_1:hover ._input_1931l_20:checked+._fake_1931l_10[data-disabled=true]:not([data-switcher=true]){background-color:var(--color-gray);border-color:var(--color-gray)}._checkbox_1931l_1[data-disabled=true]{color:var(--color-gray-dark)}._input_1931l_20{position:absolute;z-index:1;appearance:none;border:none}._input_1931l_20:checked+._fake_1931l_10{position:relative;background-color:var(--color-primary);border-color:var(--color-primary)}._input_1931l_20:checked+._fake_1931l_10 ._line_1931l_46{position:absolute;height:2px;background-color:var(--color-white);border-radius:2px}._input_1931l_20:checked+._fake_1931l_10 ._leftLine_1931l_52{top:55%;left:10%;width:40%;transform:rotate(45deg)}._input_1931l_20:checked+._fake_1931l_10 ._rightLine_1931l_58{top:45%;left:30%;width:65%;transform:rotate(-45deg)}._input_1931l_20:checked+._fake_1931l_10[data-switcher=true]:before{transform:translate(20px)}._fake_1931l_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_1931l_10:focus{width:20px;height:20px;outline:auto}._fake_1931l_10[data-switcher=true]{position:relative;width:40px;height:20px;background-color:var(--color-gray);border:none;border-radius:16px;transition:all .3s}._fake_1931l_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_1931l_10[data-disabled=true]:not([data-switcher=true]){background-color:var(--color-gray);border-color:var(--color-gray)}._fake_1931l_10[data-disabled=true]:not([data-switcher=true]):focus{outline:none}._fake_1931l_10[data-disabled=true][data-switcher=true]{background-color:var(--color-gray);border-color:var(--color-gray)}._fake_1931l_10[data-disabled=true][data-switcher=true]:focus{outline:none}._fake_1931l_10[data-error=true]{border-color:var(--color-error)}._labelSub_1931l_122{font-size:.875rem;color:var(--color-gray-dark-extra)}._required_1931l_127{color:var(--color-error)}
|
|
@@ -15,7 +15,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
type: import("vue").PropType<InitialValue>;
|
|
16
16
|
default: boolean;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
labelSub: {
|
|
19
19
|
type: import("vue").PropType<string>;
|
|
20
20
|
default: string;
|
|
21
21
|
};
|
|
@@ -49,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
type: import("vue").PropType<InitialValue>;
|
|
50
50
|
default: boolean;
|
|
51
51
|
};
|
|
52
|
-
|
|
52
|
+
labelSub: {
|
|
53
53
|
type: import("vue").PropType<string>;
|
|
54
54
|
default: string;
|
|
55
55
|
};
|
|
@@ -73,7 +73,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
73
73
|
label: string;
|
|
74
74
|
initialValue: InitialValue;
|
|
75
75
|
modelValue: InitialValue;
|
|
76
|
-
|
|
76
|
+
labelSub: string;
|
|
77
77
|
labelSwitcher: string;
|
|
78
78
|
error: string | boolean;
|
|
79
79
|
}, {}>;
|
|
@@ -1,98 +1,107 @@
|
|
|
1
1
|
import "./UiCheckbox.css";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
2
|
+
import { defineComponent as _, ref as p, openBlock as l, createElementBlock as a, withModifiers as y, normalizeClass as s, toDisplayString as r, createCommentVNode as i, createElementVNode as c, withKeys as f } from "vue";
|
|
3
|
+
import { _ as m } from "../_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const u = !1, d = "", S = ["data-disabled"], w = { key: 1 }, x = { "data-test": "ui-checkbox-label" }, L = ["value", "checked", "disabled"], $ = ["data-switcher", "data-disabled", "data-error"], q = { key: 2 }, V = { "data-test": "ui-checkbox-label-switcher" }, g = /* @__PURE__ */ _({
|
|
5
5
|
__name: "UiCheckbox",
|
|
6
6
|
props: {
|
|
7
|
-
initialValue: { type: [Boolean, String, Number], default:
|
|
8
|
-
modelValue: { type: [Boolean, String, Number], default:
|
|
9
|
-
label: { default:
|
|
10
|
-
|
|
11
|
-
labelSwitcher: { default:
|
|
7
|
+
initialValue: { type: [Boolean, String, Number], default: u },
|
|
8
|
+
modelValue: { type: [Boolean, String, Number], default: u },
|
|
9
|
+
label: { default: d },
|
|
10
|
+
labelSub: { default: d },
|
|
11
|
+
labelSwitcher: { default: d },
|
|
12
12
|
error: { type: [String, Boolean], default: !1 },
|
|
13
13
|
isRequired: { type: Boolean },
|
|
14
14
|
isDisabled: { type: Boolean },
|
|
15
15
|
isSwitcher: { type: Boolean }
|
|
16
16
|
},
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
|
-
setup(
|
|
19
|
-
const e =
|
|
20
|
-
function
|
|
21
|
-
if (
|
|
22
|
-
let
|
|
23
|
-
|
|
18
|
+
setup(b, { emit: h }) {
|
|
19
|
+
const e = b, o = p();
|
|
20
|
+
function k() {
|
|
21
|
+
if (o.value) {
|
|
22
|
+
let t;
|
|
23
|
+
o.value.checked ? t = e.initialValue ? e.initialValue : !0 : t = !1, h("update:modelValue", t);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
return (
|
|
27
|
-
onClick:
|
|
26
|
+
return (t, n) => (l(), a("label", {
|
|
27
|
+
onClick: n[1] || (n[1] = y(() => {
|
|
28
28
|
}, ["stop"])),
|
|
29
29
|
"data-disabled": e.isDisabled,
|
|
30
|
-
class:
|
|
30
|
+
class: s(t.$style.checkbox),
|
|
31
|
+
"data-test": "ui-checkbox"
|
|
31
32
|
}, [
|
|
32
|
-
e.error ? (l(),
|
|
33
|
+
e.error ? (l(), a("span", {
|
|
33
34
|
key: 0,
|
|
34
|
-
class:
|
|
35
|
+
class: s(t.$style.required),
|
|
36
|
+
"data-test": "ui-checkbox-error"
|
|
35
37
|
}, r(e.error), 3)) : i("", !0),
|
|
36
|
-
e.label ? (l(),
|
|
37
|
-
|
|
38
|
-
e.
|
|
38
|
+
e.label ? (l(), a("span", w, [
|
|
39
|
+
c("span", x, r(e.label), 1),
|
|
40
|
+
e.labelSub ? (l(), a("span", {
|
|
39
41
|
key: 0,
|
|
40
|
-
class:
|
|
41
|
-
|
|
42
|
-
e.
|
|
42
|
+
class: s(t.$style.labelSub),
|
|
43
|
+
"data-test": "ui-checkbox-label-sub"
|
|
44
|
+
}, r(e.labelSub), 3)) : i("", !0),
|
|
45
|
+
e.isRequired ? (l(), a("span", {
|
|
43
46
|
key: 1,
|
|
44
|
-
class:
|
|
47
|
+
class: s(t.$style.required),
|
|
48
|
+
"data-test": "ui-checkbox-required"
|
|
45
49
|
}, "*", 2)) : i("", !0)
|
|
46
50
|
])) : i("", !0),
|
|
47
|
-
|
|
48
|
-
onChange:
|
|
51
|
+
c("input", {
|
|
52
|
+
onChange: k,
|
|
49
53
|
type: "checkbox",
|
|
50
54
|
ref_key: "checkbox",
|
|
51
|
-
ref:
|
|
55
|
+
ref: o,
|
|
52
56
|
value: e.initialValue,
|
|
53
57
|
checked: !!e.modelValue,
|
|
54
58
|
disabled: e.isDisabled,
|
|
55
|
-
class:
|
|
56
|
-
tabindex: "-1"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
class: s(t.$style.input),
|
|
60
|
+
tabindex: "-1",
|
|
61
|
+
"data-test": "ui-checkbox-input"
|
|
62
|
+
}, null, 42, L),
|
|
63
|
+
c("div", {
|
|
64
|
+
onKeydown: n[0] || (n[0] = f((F) => o.value?.click(), ["space"])),
|
|
60
65
|
"data-switcher": e.isSwitcher,
|
|
61
66
|
"data-disabled": e.isDisabled,
|
|
62
|
-
"data-error": e.error,
|
|
63
|
-
class:
|
|
64
|
-
tabindex: "0"
|
|
67
|
+
"data-error": !!e.error,
|
|
68
|
+
class: s(t.$style.fake),
|
|
69
|
+
tabindex: "0",
|
|
70
|
+
"data-test": "ui-checkbox-fake"
|
|
65
71
|
}, [
|
|
66
|
-
e.isSwitcher ? i("", !0) : (l(),
|
|
72
|
+
e.isSwitcher ? i("", !0) : (l(), a("div", {
|
|
67
73
|
key: 0,
|
|
68
|
-
class:
|
|
74
|
+
class: s([t.$style.line, t.$style.leftLine]),
|
|
75
|
+
"data-test": "ui-checkbox-line"
|
|
69
76
|
}, null, 2)),
|
|
70
|
-
e.isSwitcher ? i("", !0) : (l(),
|
|
77
|
+
e.isSwitcher ? i("", !0) : (l(), a("div", {
|
|
71
78
|
key: 1,
|
|
72
|
-
class:
|
|
79
|
+
class: s([t.$style.line, t.$style.rightLine]),
|
|
80
|
+
"data-test": "ui-checkbox-line"
|
|
73
81
|
}, null, 2))
|
|
74
|
-
], 42,
|
|
75
|
-
e.labelSwitcher ? (l(),
|
|
76
|
-
|
|
77
|
-
e.isRequired ? (l(),
|
|
82
|
+
], 42, $),
|
|
83
|
+
e.labelSwitcher ? (l(), a("span", q, [
|
|
84
|
+
c("span", V, r(e.labelSwitcher), 1),
|
|
85
|
+
e.isRequired ? (l(), a("span", {
|
|
78
86
|
key: 0,
|
|
79
|
-
class:
|
|
87
|
+
class: s(t.$style.required),
|
|
88
|
+
"data-test": "ui-checkbox-required-switcher"
|
|
80
89
|
}, "*", 2)) : i("", !0)
|
|
81
90
|
])) : i("", !0)
|
|
82
|
-
], 10,
|
|
91
|
+
], 10, S));
|
|
83
92
|
}
|
|
84
|
-
}),
|
|
85
|
-
checkbox:
|
|
86
|
-
fake:
|
|
87
|
-
input:
|
|
88
|
-
line:
|
|
89
|
-
leftLine:
|
|
90
|
-
rightLine:
|
|
91
|
-
|
|
92
|
-
required:
|
|
93
|
+
}), v = "_checkbox_1931l_1", B = "_fake_1931l_10", C = "_input_1931l_20", D = "_line_1931l_46", E = "_leftLine_1931l_52", U = "_rightLine_1931l_58", A = "_labelSub_1931l_122", M = "_required_1931l_127", N = {
|
|
94
|
+
checkbox: v,
|
|
95
|
+
fake: B,
|
|
96
|
+
input: C,
|
|
97
|
+
line: D,
|
|
98
|
+
leftLine: E,
|
|
99
|
+
rightLine: U,
|
|
100
|
+
labelSub: A,
|
|
101
|
+
required: M
|
|
93
102
|
}, R = {
|
|
94
|
-
$style:
|
|
95
|
-
}, z = /* @__PURE__ */
|
|
103
|
+
$style: N
|
|
104
|
+
}, z = /* @__PURE__ */ m(g, [["__cssModules", R]]);
|
|
96
105
|
export {
|
|
97
106
|
z as default
|
|
98
107
|
};
|