mhz-ui 1.4.7 → 1.4.8

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
- ._container_4z663_1{display:flex;gap:16px}._upload_4z663_6{display:flex;flex-direction:column;gap:4px}._addButton_4z663_12{display:flex;flex-direction:column;gap:8px;min-width:200px}._text_4z663_19{font-size:.75rem}._text_4z663_19[data-error=true]{color:var(--color-error)}._input_4z663_26{display:none}._name_4z663_30{flex:1;max-width:136px;overflow:hidden;text-overflow:ellipsis}._file_4z663_37{display:flex;gap:8px;align-items:center}._error_4z663_43{color:var(--color-error)}._uploadButton_4z663_47[data-label=true]{margin-top:28px}.dark ._label_4z663_51,.dark ._text_4z663_19,.dark ._name_4z663_30{color:var(--color-white)}
1
+ ._container_t6pvx_1{display:flex;gap:16px}._upload_t6pvx_6{display:flex;flex-direction:column;gap:4px}._addButton_t6pvx_12{display:flex;flex-direction:column;gap:8px;min-width:200px}._text_t6pvx_19{font-size:.75rem}._text_t6pvx_19[data-error=true]{color:var(--color-error)}._input_t6pvx_26{display:none}._name_t6pvx_30{flex:1;max-width:136px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._file_t6pvx_38{display:flex;gap:8px;align-items:center}._error_t6pvx_44{color:var(--color-error)}._uploadButton_t6pvx_48[data-label=true]{margin-top:28px}.dark ._label_t6pvx_52,.dark ._text_t6pvx_19,.dark ._name_t6pvx_30{color:var(--color-white)}
@@ -1,20 +1,20 @@
1
1
  import "./UiUpload.css";
2
- import { openBlock as a, createElementBlock as o, createStaticVNode as C, defineComponent as q, shallowRef as z, computed as w, normalizeClass as i, createElementVNode as d, toDisplayString as s, createCommentVNode as f, createVNode as m, unref as r, withCtx as _, createTextVNode as v, Fragment as M, renderList as I, withDirectives as E, vShow as F } from "vue";
2
+ import { openBlock as a, createElementBlock as o, createStaticVNode as C, defineComponent as q, shallowRef as B, computed as w, normalizeClass as i, createElementVNode as d, toDisplayString as s, createCommentVNode as f, createVNode as v, unref as r, withCtx as m, createTextVNode as _, Fragment as M, renderList as z, withDirectives as I, vShow as E } from "vue";
3
3
  import y from "../UiButton/UiButton.js";
4
4
  import { M as u } from "../index-cvhOyRHT.js";
5
- import { _ as N } from "../_plugin-vue_export-helper-CHgC5LLL.js";
6
- const U = {
5
+ import { _ as F } from "../_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const N = {
7
7
  xmlns: "http://www.w3.org/2000/svg",
8
8
  width: "16",
9
9
  height: "16",
10
10
  fill: "none"
11
11
  };
12
- function V(g, p) {
13
- return a(), o("svg", U, [...p[0] || (p[0] = [
12
+ function U(g, p) {
13
+ return a(), o("svg", N, [...p[0] || (p[0] = [
14
14
  C('<g fill="currentColor" fill-rule="evenodd" clip-path="url(#a)" clip-rule="evenodd"><path d="M12.219 0h.875Q15.532.469 16 2.906v.875a3.6 3.6 0 0 1-.766 1.719l-4.546 4.547q-1.536 1.189-3.376.562a3.55 3.55 0 0 1-1.234-.828q-.37-.747.39-1.078a1 1 0 0 1 .438.031q.3.253.625.47 1.09.563 2.125-.095 2.288-2.241 4.547-4.515.928-1.322-.062-2.594-1.287-1.184-2.735-.203a143 143 0 0 1-2.531 2.5q-.72.3-1.016-.422a.8.8 0 0 1 .094-.562L10.531.733A3.6 3.6 0 0 1 12.22 0"></path><path d="M3.781 16h-.875Q.47 15.532 0 13.094v-.875q.151-.96.766-1.719l4.172-4.172Q6.594 5.062 8.53 5.86q.46.227.844.563a.75.75 0 0 1 .266.797q-.274.609-.922.422l-.688-.5q-1.065-.513-2.062.125-2.1 2.053-4.172 4.14-.94 1.35.094 2.625 1.189 1.08 2.578.266l2.281-2.219q.88-.318 1.031.594a.7.7 0 0 1-.11.39Q6.587 14.15 5.5 15.235A3.6 3.6 0 0 1 3.781 16"></path></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h16v16H0z"></path></clipPath></defs>', 2)
15
15
  ])]);
16
16
  }
17
- const x = { render: V }, L = 10 * 1024 * 1024;
17
+ const V = { render: U }, L = 10 * 1024 * 1024;
18
18
  new File([""], "file1.png");
19
19
  new File([""], "file2.png");
20
20
  const Q = ["data-error"], j = ["accept", "multiple"], A = ["data-label"], R = /* @__PURE__ */ q({
@@ -34,125 +34,125 @@ const Q = ["data-error"], j = ["accept", "multiple"], A = ["data-label"], R = /*
34
34
  },
35
35
  emits: ["add", "remove", "upload"],
36
36
  setup(g, { emit: p }) {
37
- const e = g, c = p, b = z(), h = z(0), B = w(() => e.extensions.map((l) => `.${l}`).join(","));
38
- function k() {
37
+ const e = g, c = p, b = B(), h = B(0), k = w(() => e.extensions.map((t) => `.${t}`).join(","));
38
+ function D() {
39
39
  b?.value?.click?.();
40
40
  }
41
- async function $(l) {
42
- l && (c("remove", l), h.value++);
41
+ async function $(t) {
42
+ t && (c("remove", t), h.value++);
43
43
  }
44
- function D(l) {
44
+ function S(t) {
45
45
  if (e.isSingle) {
46
- const t = l.files?.[0];
47
- t?.size && t.size < e.limit && c("add", t);
46
+ const l = t.files?.[0];
47
+ l?.size && l.size < e.limit && c("add", l);
48
48
  } else {
49
- const t = l.files;
50
- if (t === null) return;
51
- for (const n of t)
49
+ const l = t.files;
50
+ if (l === null) return;
51
+ for (const n of l)
52
52
  n.size > 0 && n.size < e.limit && c("add", n);
53
53
  }
54
54
  }
55
- return (l, t) => (a(), o("div", {
56
- class: i(l.$style.container)
55
+ return (t, l) => (a(), o("div", {
56
+ class: i(t.$style.container)
57
57
  }, [
58
58
  d("div", {
59
- class: i(l.$style.upload)
59
+ class: i(t.$style.upload)
60
60
  }, [
61
61
  e.label ? (a(), o("div", {
62
62
  key: 0,
63
- class: i(l.$style.label)
63
+ class: i(t.$style.label)
64
64
  }, [
65
65
  d("span", null, s(e.label), 1),
66
66
  e.isRequired ? (a(), o("span", {
67
67
  key: 0,
68
- class: i(l.$style.error)
68
+ class: i(t.$style.error)
69
69
  }, "*", 2)) : f("", !0)
70
70
  ], 2)) : f("", !0),
71
71
  d("div", {
72
- class: i(l.$style.addButton)
72
+ class: i(t.$style.addButton)
73
73
  }, [
74
- m(y, {
75
- onClick: k,
74
+ v(y, {
75
+ onClick: D,
76
76
  layout: "secondary",
77
77
  isDisabled: e.isDisabled || e.isSingle && e.files.length > 0 || e.isSingle && !!e.file,
78
- icon: r(x)
78
+ icon: r(V)
79
79
  }, {
80
- default: _(() => [
81
- v(s(r(u)[e.lang].add), 1)
80
+ default: m(() => [
81
+ _(s(r(u)[e.lang].add), 1)
82
82
  ]),
83
83
  _: 1
84
84
  }, 8, ["isDisabled", "icon"]),
85
85
  d("div", {
86
- class: i(l.$style.text),
86
+ class: i(t.$style.text),
87
87
  "data-error": !!e.error
88
88
  }, s(r(u)[e.lang].sizeUpTo) + " " + s(e.limit / (1024 * 1024)) + " Mb, " + s(e.extensions.join(", ")) + ". ", 11, Q)
89
89
  ], 2),
90
90
  (a(), o("input", {
91
91
  type: "file",
92
- onInput: t[0] || (t[0] = (n) => D(n.target)),
92
+ onInput: l[0] || (l[0] = (n) => S(n.target)),
93
93
  ref_key: "input",
94
94
  ref: b,
95
- class: i(l.$style.input),
95
+ class: i(t.$style.input),
96
96
  key: h.value,
97
- accept: B.value,
97
+ accept: k.value,
98
98
  multiple: !e.isSingle
99
99
  }, null, 42, j)),
100
- e.files?.length && !e.file ? (a(!0), o(M, { key: 1 }, I(g.files, (n, S) => (a(), o("div", {
101
- key: `${n}-${S}`,
102
- class: i(l.$style.file)
100
+ e.files?.length && !e.file ? (a(!0), o(M, { key: 1 }, z(g.files, (n, x) => (a(), o("div", {
101
+ key: `${n}-${x}`,
102
+ class: i(t.$style.file)
103
103
  }, [
104
104
  d("div", {
105
- class: i(l.$style.name)
105
+ class: i(t.$style.name)
106
106
  }, s(n.name), 3),
107
- m(y, {
108
- onClick: (le) => $(n),
107
+ v(y, {
108
+ onClick: (te) => $(n),
109
109
  isDisabled: e.isDisabled,
110
110
  layout: "plain"
111
111
  }, {
112
- default: _(() => [
113
- v(s(r(u)[e.lang].remove), 1)
112
+ default: m(() => [
113
+ _(s(r(u)[e.lang].remove), 1)
114
114
  ]),
115
115
  _: 1
116
116
  }, 8, ["onClick", "isDisabled"])
117
117
  ], 2))), 128)) : f("", !0),
118
118
  e.isSingle && e.file ? (a(), o("div", {
119
119
  key: 2,
120
- class: i(l.$style.file)
120
+ class: i(t.$style.file)
121
121
  }, [
122
122
  d("div", {
123
- class: i(l.$style.name)
123
+ class: i(t.$style.name)
124
124
  }, s(e.file.name), 3),
125
- m(y, {
126
- onClick: t[1] || (t[1] = (n) => $(e.file)),
125
+ v(y, {
126
+ onClick: l[1] || (l[1] = (n) => $(e.file)),
127
127
  isDisabled: e.isDisabled,
128
128
  layout: "plain"
129
129
  }, {
130
- default: _(() => [
131
- v(s(r(u)[e.lang].remove), 1)
130
+ default: m(() => [
131
+ _(s(r(u)[e.lang].remove), 1)
132
132
  ]),
133
133
  _: 1
134
134
  }, 8, ["isDisabled"])
135
135
  ], 2)) : f("", !0)
136
136
  ], 2),
137
- E(d("div", {
138
- class: i(l.$style.uploadButton),
137
+ I(d("div", {
138
+ class: i(t.$style.uploadButton),
139
139
  "data-label": !!e.label
140
140
  }, [
141
- m(y, {
142
- onClick: t[2] || (t[2] = (n) => c("upload")),
141
+ v(y, {
142
+ onClick: l[2] || (l[2] = (n) => c("upload")),
143
143
  isDisabled: e.isDisabled
144
144
  }, {
145
- default: _(() => [
146
- v(s(e.uploadButtonText || r(u)[e.lang].upload), 1)
145
+ default: m(() => [
146
+ _(s(e.uploadButtonText || r(u)[e.lang].upload), 1)
147
147
  ]),
148
148
  _: 1
149
149
  }, 8, ["isDisabled"])
150
150
  ], 10, A), [
151
- [F, e.isSingle && e.file || e.files.length > 0]
151
+ [E, e.isSingle && e.file || e.files.length > 0]
152
152
  ])
153
153
  ], 2));
154
154
  }
155
- }), T = "_container_4z663_1", P = "_upload_4z663_6", G = "_addButton_4z663_12", H = "_text_4z663_19", K = "_input_4z663_26", Z = "_name_4z663_30", J = "_file_4z663_37", O = "_error_4z663_43", W = "_uploadButton_4z663_47", X = "_label_4z663_51", Y = {
155
+ }), T = "_container_t6pvx_1", P = "_upload_t6pvx_6", G = "_addButton_t6pvx_12", H = "_text_t6pvx_19", K = "_input_t6pvx_26", Z = "_name_t6pvx_30", J = "_file_t6pvx_38", O = "_error_t6pvx_44", W = "_uploadButton_t6pvx_48", X = "_label_t6pvx_52", Y = {
156
156
  container: T,
157
157
  upload: P,
158
158
  addButton: G,
@@ -165,7 +165,7 @@ const Q = ["data-error"], j = ["accept", "multiple"], A = ["data-label"], R = /*
165
165
  label: X
166
166
  }, ee = {
167
167
  $style: Y
168
- }, ae = /* @__PURE__ */ N(R, [["__cssModules", ee]]);
168
+ }, ae = /* @__PURE__ */ F(R, [["__cssModules", ee]]);
169
169
  export {
170
170
  ae as default
171
171
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mhz-ui",
3
3
  "description": "Mhz ui kit",
4
- "version": "1.4.7",
4
+ "version": "1.4.8",
5
5
  "author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -40,15 +40,15 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/js": "10.0.1",
43
- "@storybook/addon-docs": "10.2.10",
44
- "@storybook/addon-themes": "10.2.10",
45
- "@storybook/vue3": "10.2.10",
46
- "@storybook/vue3-vite": "10.2.10",
43
+ "@storybook/addon-docs": "10.2.12",
44
+ "@storybook/addon-themes": "10.2.12",
45
+ "@storybook/vue3": "10.2.12",
46
+ "@storybook/vue3-vite": "10.2.12",
47
47
  "@types/node": "25.3.0",
48
48
  "@vitejs/plugin-vue": "6.0.4",
49
49
  "@vitest/coverage-v8": "4.1.0-beta.4",
50
50
  "@vue/test-utils": "2.4.6",
51
- "eslint": "10.0.1",
51
+ "eslint": "10.0.2",
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",
@@ -62,7 +62,7 @@
62
62
  "postcss-scss": "4.0.9",
63
63
  "prettier": "3.8.1",
64
64
  "sass-embedded": "1.97.3",
65
- "storybook": "10.2.10",
65
+ "storybook": "10.2.12",
66
66
  "stylelint": "17.3.0",
67
67
  "stylelint-config-recess-order": "7.6.1",
68
68
  "stylelint-config-recommended-scss": "17.0.0",
@@ -70,7 +70,7 @@
70
70
  "stylelint-order": "7.0.1",
71
71
  "stylelint-prettier": "5.0.3",
72
72
  "typescript": "5.9.3",
73
- "typescript-eslint": "8.56.0",
73
+ "typescript-eslint": "8.56.1",
74
74
  "vite": "7.3.1",
75
75
  "vite-plugin-dts": "4.5.4",
76
76
  "vite-plugin-static-copy": "3.2.0",