mhz-ui 0.0.1 → 1.0.1
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/UiButton/UiButton.css +1 -1
- package/dist/UiButton/UiButton.d.ts +13 -3
- package/dist/UiButton/UiButton.js +18 -16
- package/dist/UiCheckbox/UiCheckbox.css +1 -0
- package/dist/UiCheckbox/UiCheckbox.d.ts +71 -0
- package/dist/UiCheckbox/UiCheckbox.js +92 -0
- package/dist/UiEditor/UiEditor.css +1 -0
- package/dist/UiEditor/UiEditor.d.ts +14 -0
- package/dist/UiEditor/UiEditor.js +14872 -0
- package/dist/UiField/UiField.css +1 -1
- package/dist/UiField/UiField.js +18 -18
- package/dist/UiInput/UiInput.css +1 -1
- package/dist/UiInput/UiInput.d.ts +35 -7
- package/dist/UiInput/UiInput.js +47 -26
- package/dist/UiPagination/UiPagination.css +1 -0
- package/dist/UiPagination/UiPagination.d.ts +20 -0
- package/dist/UiPagination/UiPagination.js +54 -0
- package/dist/UiSelect/UiSelect.css +1 -0
- package/dist/UiSelect/UiSelect.d.ts +31 -0
- package/dist/UiSelect/UiSelect.js +226 -0
- package/dist/UiTable/UiTable.css +1 -0
- package/dist/UiTable/UiTable.d.ts +19 -0
- package/dist/UiTable/UiTable.js +62 -0
- package/dist/UiUpload/UiUpload.css +1 -0
- package/dist/UiUpload/UiUpload.d.ts +81 -0
- package/dist/UiUpload/UiUpload.js +150 -0
- package/dist/base.scss +25 -0
- package/dist/colors.scss +7 -6
- package/dist/index.d.ts +10 -3
- package/dist/index.ts +10 -3
- package/dist/toast/toast.css +1 -0
- package/dist/toast/toast.d.ts +9 -0
- package/dist/toast/toast.js +34 -0
- package/dist/transitions.scss +9 -0
- package/package.json +30 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._button_7dtc2_1{position:relative;display:inline-flex;flex-shrink:0;gap:12px;align-items:center;justify-content:center;height:44px;padding:16px 32px;overflow:hidden;font-size:.875rem;line-height:1.5;color:var(--color-white);text-decoration:none;white-space:nowrap;user-select:none;background:var(--color-primary);border:2px solid var(--color-transparent);border-radius:16px;transition:all .2s}._button_7dtc2_1:hover{color:var(--color-white);cursor:pointer;background:var(--color-primary-dark);border-color:var(--color-transparent)}._button_7dtc2_1:disabled{color:var(--color-gray-dark-extra);cursor:default;background:var(--color-gray-light-extra)}._button_7dtc2_1[data-layout=secondary]{color:var(--color-primary);background-color:var(--color-white);border-color:var(--color-primary)}._button_7dtc2_1[data-layout=secondary]:hover{color:var(--color-primary-dark);border-color:var(--color-primary-dark)}._button_7dtc2_1[data-layout=secondary]:disabled{color:var(--color-gray-dark-extra);background:var(--color-white);border-color:var(--color-gray-light-extra)}._button_7dtc2_1[data-layout=plain]{height:auto;padding:0;font-size:1rem;color:var(--color-primary);text-decoration:underline;background:none;border:none}._button_7dtc2_1[data-layout=plain]:hover{color:var(--color-primary-dark)}._button_7dtc2_1[data-layout=plain]:disabled{color:var(--color-gray-dark-extra)}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { FunctionalComponent } from 'vue';
|
|
1
2
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
3
|
layout: {
|
|
3
|
-
type: import("vue").PropType<"primary" | "secondary">;
|
|
4
|
+
type: import("vue").PropType<"primary" | "secondary" | "plain">;
|
|
4
5
|
default: string;
|
|
5
6
|
};
|
|
6
7
|
type: {
|
|
@@ -10,9 +11,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
10
11
|
isDisabled: {
|
|
11
12
|
type: import("vue").PropType<boolean>;
|
|
12
13
|
};
|
|
14
|
+
icon: {
|
|
15
|
+
type: import("vue").PropType<FunctionalComponent<{}, {}, any>>;
|
|
16
|
+
default: undefined;
|
|
17
|
+
};
|
|
13
18
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
14
19
|
layout: {
|
|
15
|
-
type: import("vue").PropType<"primary" | "secondary">;
|
|
20
|
+
type: import("vue").PropType<"primary" | "secondary" | "plain">;
|
|
16
21
|
default: string;
|
|
17
22
|
};
|
|
18
23
|
type: {
|
|
@@ -22,9 +27,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
22
27
|
isDisabled: {
|
|
23
28
|
type: import("vue").PropType<boolean>;
|
|
24
29
|
};
|
|
30
|
+
icon: {
|
|
31
|
+
type: import("vue").PropType<FunctionalComponent<{}, {}, any>>;
|
|
32
|
+
default: undefined;
|
|
33
|
+
};
|
|
25
34
|
}>>, {
|
|
26
|
-
layout: "primary" | "secondary";
|
|
35
|
+
layout: "primary" | "secondary" | "plain";
|
|
27
36
|
type: "submit" | "button";
|
|
37
|
+
icon: FunctionalComponent<{}, {}, any>;
|
|
28
38
|
}, {}>, {
|
|
29
39
|
default?(_: {}): any;
|
|
30
40
|
}>;
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import "./UiButton.css";
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
2
|
+
import { defineComponent as n, openBlock as o, createElementBlock as a, normalizeClass as l, createBlock as c, resolveDynamicComponent as u, createCommentVNode as r, renderSlot as d } from "vue";
|
|
3
|
+
import { _ as i } from "../_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const p = ["data-layout", "type", "disabled"], y = /* @__PURE__ */ n({
|
|
5
5
|
__name: "UiButton",
|
|
6
6
|
props: {
|
|
7
7
|
layout: { default: "primary" },
|
|
8
8
|
type: { default: "button" },
|
|
9
|
-
isDisabled: { type: Boolean }
|
|
9
|
+
isDisabled: { type: Boolean },
|
|
10
|
+
icon: { type: [Function, Object], default: void 0 }
|
|
10
11
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const t =
|
|
13
|
-
return (
|
|
14
|
-
class: l(
|
|
12
|
+
setup(s) {
|
|
13
|
+
const t = s;
|
|
14
|
+
return (e, f) => (o(), a("button", {
|
|
15
|
+
class: l(e.$style.button),
|
|
15
16
|
"data-layout": t.layout,
|
|
16
17
|
type: t.type,
|
|
17
18
|
disabled: t.isDisabled
|
|
18
19
|
}, [
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
t.icon ? (o(), c(u(t.icon), { key: 0 })) : r("", !0),
|
|
21
|
+
d(e.$slots, "default")
|
|
22
|
+
], 10, p));
|
|
21
23
|
}
|
|
22
|
-
}),
|
|
23
|
-
button:
|
|
24
|
-
},
|
|
25
|
-
$style:
|
|
26
|
-
},
|
|
24
|
+
}), m = "_button_7dtc2_1", _ = {
|
|
25
|
+
button: m
|
|
26
|
+
}, b = {
|
|
27
|
+
$style: _
|
|
28
|
+
}, C = /* @__PURE__ */ i(y, [["__cssModules", b]]);
|
|
27
29
|
export {
|
|
28
|
-
|
|
30
|
+
C as default
|
|
29
31
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._checkbox_cubj5_1{position:relative;display:flex;flex-direction:row-reverse;gap:8px;width:fit-content;cursor:pointer;user-select:none}._checkbox_cubj5_1:hover ._fake_cubj5_10{border-color:var(--color-primary)}._checkbox_cubj5_1:hover ._fake_cubj5_10[data-switcher=true]{background-color:var(--color-gray-dark);border:none}._checkbox_cubj5_1:hover ._fake_cubj5_10[data-disabled=true]:not([data-switcher=true]){border-color:var(--color-gray)}._checkbox_cubj5_1:hover ._input_cubj5_20:checked+._fake_cubj5_10{background-color:var(--color-primary-dark);border-color:var(--color-primary-dark)}._checkbox_cubj5_1:hover ._input_cubj5_20:checked+._fake_cubj5_10[data-disabled=true][data-switcher=true]{background-color:var(--color-gray)}._checkbox_cubj5_1:hover ._input_cubj5_20:checked+._fake_cubj5_10[data-disabled=true]:not([data-switcher=true]){background-color:var(--color-gray);border-color:var(--color-gray)}._checkbox_cubj5_1[data-disabled=true]{color:var(--color-gray-dark)}._input_cubj5_20{position:absolute;z-index:1;appearance:none;border:none}._input_cubj5_20:checked+._fake_cubj5_10{position:relative;background-color:var(--color-primary);border-color:var(--color-primary)}._input_cubj5_20:checked+._fake_cubj5_10 ._line_cubj5_46{position:absolute;height:2px;background-color:var(--color-white);border-radius:2px}._input_cubj5_20:checked+._fake_cubj5_10 ._leftLine_cubj5_52{top:55%;left:10%;width:40%;transform:rotate(45deg)}._input_cubj5_20:checked+._fake_cubj5_10 ._rightLine_cubj5_58{top:45%;left:30%;width:65%;transform:rotate(-45deg)}._input_cubj5_20:checked+._fake_cubj5_10[data-switcher=true]:before{transform:translate(20px)}._fake_cubj5_10{z-index:1;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_cubj5_10:focus{width:20px;height:20px;outline:auto}._fake_cubj5_10[data-switcher=true]{position:relative;width:40px;height:20px;background-color:var(--color-gray);border:none;border-radius:16px;transition:all .3s}._fake_cubj5_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_cubj5_10[data-disabled=true]:not([data-switcher=true]){background-color:var(--color-gray);border-color:var(--color-gray)}._fake_cubj5_10[data-disabled=true]:not([data-switcher=true]):focus{outline:none}._fake_cubj5_10[data-disabled=true][data-switcher=true]{background-color:var(--color-gray);border-color:var(--color-gray)}._fake_cubj5_10[data-disabled=true][data-switcher=true]:focus{outline:none}._fake_cubj5_10[data-error=true]{border-color:var(--color-error)}._required_cubj5_122{color:var(--color-error)}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
type InitialValue = boolean | string | number;
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{
|
|
3
|
+
isDisabled: {
|
|
4
|
+
type: import("vue").PropType<boolean>;
|
|
5
|
+
};
|
|
6
|
+
label: {
|
|
7
|
+
type: import("vue").PropType<string>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
initialValue: {
|
|
11
|
+
type: import("vue").PropType<InitialValue>;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: import("vue").PropType<InitialValue>;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
|
+
labelSwitcher: {
|
|
19
|
+
type: import("vue").PropType<string>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
error: {
|
|
23
|
+
type: import("vue").PropType<string | boolean>;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
isRequired: {
|
|
27
|
+
type: import("vue").PropType<boolean>;
|
|
28
|
+
};
|
|
29
|
+
isSwitcher: {
|
|
30
|
+
type: import("vue").PropType<boolean>;
|
|
31
|
+
};
|
|
32
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
33
|
+
isDisabled: {
|
|
34
|
+
type: import("vue").PropType<boolean>;
|
|
35
|
+
};
|
|
36
|
+
label: {
|
|
37
|
+
type: import("vue").PropType<string>;
|
|
38
|
+
default: string;
|
|
39
|
+
};
|
|
40
|
+
initialValue: {
|
|
41
|
+
type: import("vue").PropType<InitialValue>;
|
|
42
|
+
default: boolean;
|
|
43
|
+
};
|
|
44
|
+
modelValue: {
|
|
45
|
+
type: import("vue").PropType<InitialValue>;
|
|
46
|
+
default: boolean;
|
|
47
|
+
};
|
|
48
|
+
labelSwitcher: {
|
|
49
|
+
type: import("vue").PropType<string>;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
error: {
|
|
53
|
+
type: import("vue").PropType<string | boolean>;
|
|
54
|
+
default: boolean;
|
|
55
|
+
};
|
|
56
|
+
isRequired: {
|
|
57
|
+
type: import("vue").PropType<boolean>;
|
|
58
|
+
};
|
|
59
|
+
isSwitcher: {
|
|
60
|
+
type: import("vue").PropType<boolean>;
|
|
61
|
+
};
|
|
62
|
+
}>> & {
|
|
63
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
label: string;
|
|
66
|
+
initialValue: InitialValue;
|
|
67
|
+
modelValue: InitialValue;
|
|
68
|
+
labelSwitcher: string;
|
|
69
|
+
error: string | boolean;
|
|
70
|
+
}, {}>;
|
|
71
|
+
export default _default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import "./UiCheckbox.css";
|
|
2
|
+
import { defineComponent as h, ref as f, openBlock as l, createElementBlock as i, withModifiers as y, normalizeClass as s, toDisplayString as r, createCommentVNode as a, createTextVNode as d, createElementVNode as c, withKeys as _ } from "vue";
|
|
3
|
+
import { _ as k } from "../_plugin-vue_export-helper-dad06003.js";
|
|
4
|
+
const m = ["data-disabled"], w = { key: 1 }, $ = ["value", "checked", "disabled"], S = ["data-switcher", "data-disabled", "data-error"], V = { key: 2 }, g = /* @__PURE__ */ h({
|
|
5
|
+
__name: "UiCheckbox",
|
|
6
|
+
props: {
|
|
7
|
+
initialValue: { type: [Boolean, String, Number], default: !1 },
|
|
8
|
+
modelValue: { type: [Boolean, String, Number], default: !1 },
|
|
9
|
+
label: { default: "" },
|
|
10
|
+
labelSwitcher: { default: "" },
|
|
11
|
+
error: { type: [String, Boolean], default: !1 },
|
|
12
|
+
isRequired: { type: Boolean },
|
|
13
|
+
isDisabled: { type: Boolean },
|
|
14
|
+
isSwitcher: { type: Boolean }
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(u, { emit: b }) {
|
|
18
|
+
const e = u, n = f();
|
|
19
|
+
function p() {
|
|
20
|
+
if (n.value) {
|
|
21
|
+
let t;
|
|
22
|
+
n.value.checked ? t = e.initialValue ? e.initialValue : !0 : t = !1, b("update:modelValue", t);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return (t, o) => (l(), i("label", {
|
|
26
|
+
onClick: o[1] || (o[1] = y(() => {
|
|
27
|
+
}, ["stop"])),
|
|
28
|
+
"data-disabled": e.isDisabled,
|
|
29
|
+
class: s(t.$style.checkbox)
|
|
30
|
+
}, [
|
|
31
|
+
e.error ? (l(), i("span", {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: s(t.$style.required)
|
|
34
|
+
}, r(e.error), 3)) : a("", !0),
|
|
35
|
+
e.label ? (l(), i("span", w, [
|
|
36
|
+
d(r(e.label), 1),
|
|
37
|
+
e.isRequired ? (l(), i("span", {
|
|
38
|
+
key: 0,
|
|
39
|
+
class: s(t.$style.required)
|
|
40
|
+
}, "*", 2)) : a("", !0)
|
|
41
|
+
])) : a("", !0),
|
|
42
|
+
c("input", {
|
|
43
|
+
onChange: p,
|
|
44
|
+
type: "checkbox",
|
|
45
|
+
ref_key: "checkbox",
|
|
46
|
+
ref: n,
|
|
47
|
+
value: e.initialValue,
|
|
48
|
+
checked: !!e.modelValue,
|
|
49
|
+
disabled: e.isDisabled,
|
|
50
|
+
class: s(t.$style.input),
|
|
51
|
+
tabindex: "-1"
|
|
52
|
+
}, null, 42, $),
|
|
53
|
+
c("div", {
|
|
54
|
+
onKeydown: o[0] || (o[0] = _((M) => n.value?.click(), ["space"])),
|
|
55
|
+
"data-switcher": e.isSwitcher,
|
|
56
|
+
"data-disabled": e.isDisabled,
|
|
57
|
+
"data-error": e.error,
|
|
58
|
+
class: s(t.$style.fake),
|
|
59
|
+
tabindex: "0"
|
|
60
|
+
}, [
|
|
61
|
+
e.isSwitcher ? a("", !0) : (l(), i("div", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: s([t.$style.line, t.$style.leftLine])
|
|
64
|
+
}, null, 2)),
|
|
65
|
+
e.isSwitcher ? a("", !0) : (l(), i("div", {
|
|
66
|
+
key: 1,
|
|
67
|
+
class: s([t.$style.line, t.$style.rightLine])
|
|
68
|
+
}, null, 2))
|
|
69
|
+
], 42, S),
|
|
70
|
+
e.labelSwitcher ? (l(), i("span", V, [
|
|
71
|
+
d(r(e.labelSwitcher), 1),
|
|
72
|
+
e.isRequired ? (l(), i("span", {
|
|
73
|
+
key: 0,
|
|
74
|
+
class: s(t.$style.required)
|
|
75
|
+
}, "*", 2)) : a("", !0)
|
|
76
|
+
])) : a("", !0)
|
|
77
|
+
], 10, m));
|
|
78
|
+
}
|
|
79
|
+
}), v = "_checkbox_cubj5_1", q = "_fake_cubj5_10", B = "_input_cubj5_20", C = "_line_cubj5_46", L = "_leftLine_cubj5_52", j = "_rightLine_cubj5_58", x = "_required_cubj5_122", D = {
|
|
80
|
+
checkbox: v,
|
|
81
|
+
fake: q,
|
|
82
|
+
input: B,
|
|
83
|
+
line: C,
|
|
84
|
+
leftLine: L,
|
|
85
|
+
rightLine: j,
|
|
86
|
+
required: x
|
|
87
|
+
}, N = {
|
|
88
|
+
$style: D
|
|
89
|
+
}, K = /* @__PURE__ */ k(g, [["__cssModules", N]]);
|
|
90
|
+
export {
|
|
91
|
+
K as default
|
|
92
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_1jv52_1{display:flex;flex-direction:column;width:100%;border:1px solid var(--color-gray);border-radius:16px}._container_1jv52_1:focus-within{border:1px solid var(--color-primary)}._container_1jv52_1:hover{cursor:text}._container_1jv52_1:hover:not(:focus-within){border:1px solid var(--color-gray-dark-extra)}._actions_1jv52_18{display:flex;gap:4px;padding:4px;border-bottom:1px solid var(--color-gray)}._action_1jv52_18{display:flex;align-items:center;justify-content:center;min-width:32px;padding:8px;font-weight:700;cursor:pointer;background-color:var(--color-transparent);border:none;border-radius:8px}._action_1jv52_18:hover{background-color:var(--color-primary-light)}._editor_1jv52_41{padding:8px 16px;font-size:1rem;outline:none}._editor_1jv52_41 .ProseMirror{outline:none}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: import("vue").PropType<string>;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
modelValue: {
|
|
8
|
+
type: import("vue").PropType<string>;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}>> & {
|
|
12
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
}, {}, {}>;
|
|
14
|
+
export default _default;
|