mhz-ui 1.0.5 → 1.0.6

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
- ._inputBlock_1boy2_1{position:relative;display:flex;width:100%;border-radius:16px}._inputBlock_1boy2_1[data-mode=select]{cursor:pointer}._inputBlock_1boy2_1[data-mode=select]:hover ._input_1boy2_1{border:1px solid var(--color-gray-dark-extra)}._input_1boy2_1{width:100%;height:40px;padding:0 16px;font-size:1rem;border:1px solid var(--color-gray);border-radius:16px;outline:none}._input_1boy2_1:hover{border:1px solid var(--color-gray-dark-extra)}._input_1boy2_1:focus{border:1px solid var(--color-primary)}._input_1boy2_1:disabled{color:var(--color-gray-dark-extra);background:var(--color-gray-light-extra);border-color:var(--color-transparent)}._input_1boy2_1::placeholder{color:var(--color-gray-dark-extra)}._input_1boy2_1[data-mode=select]{pointer-events:none}._input_1boy2_1[data-append-icon=true]{padding-right:40px}._icon_1boy2_44{position:absolute;top:calc(50% - 8px);right:16px}
1
+ ._inputBlock_h3kt9_1{position:relative;display:flex;width:100%;border-radius:16px}._inputBlock_h3kt9_1[data-mode=select]{cursor:pointer}._inputBlock_h3kt9_1[data-mode=select]:hover ._input_h3kt9_1{border:1px solid var(--color-gray-dark-extra)}._input_h3kt9_1{width:100%;height:40px;padding:0 16px;font-size:1rem;border:1px solid var(--color-gray);border-radius:16px;outline:none}._input_h3kt9_1:hover{border:1px solid var(--color-gray-dark-extra)}._input_h3kt9_1:focus{border:1px solid var(--color-primary)}._input_h3kt9_1:disabled{color:var(--color-gray-dark-extra);background:var(--color-gray-light-extra);border-color:var(--color-transparent)}._input_h3kt9_1::placeholder{color:var(--color-gray-dark-extra)}._input_h3kt9_1[data-mode=select]{pointer-events:none}._input_h3kt9_1[data-append-icon=true]{padding-right:40px}._input_h3kt9_1[data-center=true]{text-align:center}._icon_h3kt9_47{position:absolute;top:calc(50% - 8px);right:16px}
@@ -18,6 +18,9 @@ declare const _default: import("vue").DefineComponent<{
18
18
  isFocus: {
19
19
  type: import("vue").PropType<boolean>;
20
20
  };
21
+ isCenter: {
22
+ type: import("vue").PropType<boolean>;
23
+ };
21
24
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "toggle")[], "update:modelValue" | "toggle", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
25
  isDisabled: {
23
26
  type: import("vue").PropType<boolean>;
@@ -37,6 +40,9 @@ declare const _default: import("vue").DefineComponent<{
37
40
  isFocus: {
38
41
  type: import("vue").PropType<boolean>;
39
42
  };
43
+ isCenter: {
44
+ type: import("vue").PropType<boolean>;
45
+ };
40
46
  }>> & {
41
47
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
42
48
  onToggle?: ((...args: any[]) => any) | undefined;
@@ -1,56 +1,58 @@
1
1
  import "./UiInput.css";
2
- import { defineComponent as p, ref as c, onMounted as m, nextTick as r, openBlock as s, createElementBlock as f, withKeys as y, normalizeClass as d, createElementVNode as _, mergeProps as b, createBlock as k, resolveDynamicComponent as B, createCommentVNode as g } from "vue";
2
+ import { defineComponent as u, ref as c, onMounted as r, nextTick as m, openBlock as s, createElementBlock as f, withKeys as y, normalizeClass as d, createElementVNode as _, mergeProps as k, createBlock as B, resolveDynamicComponent as b, createCommentVNode as g } from "vue";
3
3
  import { _ as v } from "../_plugin-vue_export-helper-dad06003.js";
4
- const I = ["data-mode", "tabindex"], $ = ["value", "disabled", "data-mode", "data-append-icon", "tabindex"], V = /* @__PURE__ */ p({
4
+ const I = ["data-mode", "tabindex"], C = ["value", "disabled", "data-mode", "data-center", "data-append-icon", "tabindex"], $ = /* @__PURE__ */ u({
5
5
  __name: "UiInput",
6
6
  props: {
7
7
  modelValue: { type: [String, Number, Boolean, null], default: "" },
8
8
  isDisabled: { type: Boolean },
9
9
  mode: { default: "default" },
10
10
  appendIcon: { type: [Function, Object], default: void 0 },
11
- isFocus: { type: Boolean }
11
+ isFocus: { type: Boolean },
12
+ isCenter: { type: Boolean }
12
13
  },
13
14
  emits: ["update:modelValue", "toggle"],
14
- setup(i, { emit: n }) {
15
+ setup(i, { emit: o }) {
15
16
  const e = i;
16
- function u(o) {
17
- n("update:modelValue", o.value);
17
+ function p(t) {
18
+ o("update:modelValue", t.value);
18
19
  }
19
20
  const l = c();
20
- return m(async () => {
21
- e.isFocus && (await r(), l.value?.focus());
22
- }), (o, t) => (s(), f("div", {
23
- onClick: t[1] || (t[1] = (a) => n("toggle")),
24
- onKeydown: t[2] || (t[2] = y((a) => n("toggle"), ["space"])),
25
- class: d(o.$style.inputBlock),
21
+ return r(async () => {
22
+ e.isFocus && (await m(), l.value?.focus());
23
+ }), (t, n) => (s(), f("div", {
24
+ onClick: n[1] || (n[1] = (a) => o("toggle")),
25
+ onKeydown: n[2] || (n[2] = y((a) => o("toggle"), ["space"])),
26
+ class: d(t.$style.inputBlock),
26
27
  "data-mode": e.mode,
27
28
  tabindex: e.mode === "default" ? "-1" : "0"
28
29
  }, [
29
- _("input", b({
30
+ _("input", k({
30
31
  value: e.modelValue,
31
- onInput: t[0] || (t[0] = (a) => u(a.target)),
32
+ onInput: n[0] || (n[0] = (a) => p(a.target)),
32
33
  disabled: e.isDisabled,
33
- class: o.$style.input
34
- }, o.$attrs, {
34
+ class: t.$style.input
35
+ }, t.$attrs, {
35
36
  ref_key: "input",
36
37
  ref: l,
37
38
  "data-mode": e.mode,
39
+ "data-center": e.isCenter,
38
40
  "data-append-icon": !!e.appendIcon,
39
41
  tabindex: e.mode === "default" ? "0" : "-1"
40
- }), null, 16, $),
41
- e.appendIcon ? (s(), k(B(e.appendIcon), {
42
+ }), null, 16, C),
43
+ e.appendIcon ? (s(), B(b(e.appendIcon), {
42
44
  key: 0,
43
- class: d(o.$style.icon)
45
+ class: d(t.$style.icon)
44
46
  }, null, 8, ["class"])) : g("", !0)
45
47
  ], 42, I));
46
48
  }
47
- }), C = "_inputBlock_1boy2_1", x = "_input_1boy2_1", w = "_icon_1boy2_44", D = {
48
- inputBlock: C,
49
+ }), V = "_inputBlock_h3kt9_1", x = "_input_h3kt9_1", w = "_icon_h3kt9_47", D = {
50
+ inputBlock: V,
49
51
  input: x,
50
52
  icon: w
51
53
  }, F = {
52
54
  $style: D
53
- }, E = /* @__PURE__ */ v(V, [["__cssModules", F]]);
55
+ }, h = /* @__PURE__ */ v($, [["__cssModules", F]]);
54
56
  export {
55
- E as default
57
+ h as default
56
58
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mhz-ui",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "mhz-ui",
5
5
  "author": "dergunov.com",
6
6
  "license": "MIT",
@@ -32,18 +32,18 @@
32
32
  "vue-router": "4.2.4"
33
33
  },
34
34
  "devDependencies": {
35
- "@storybook/addon-essentials": "7.3.2",
36
- "@storybook/addon-interactions": "7.3.2",
37
- "@storybook/addon-links": "7.3.2",
38
- "@storybook/blocks": "7.3.2",
39
- "@storybook/core-events": "7.3.2",
40
- "@storybook/preview-api": "7.3.2",
41
- "@storybook/vue3": "7.3.2",
42
- "@storybook/vue3-vite": "7.3.2",
35
+ "@storybook/addon-essentials": "7.4.0",
36
+ "@storybook/addon-interactions": "7.4.0",
37
+ "@storybook/addon-links": "7.4.0",
38
+ "@storybook/blocks": "7.4.0",
39
+ "@storybook/core-events": "7.4.0",
40
+ "@storybook/preview-api": "7.4.0",
41
+ "@storybook/vue3": "7.4.0",
42
+ "@storybook/vue3-vite": "7.4.0",
43
43
  "@types/node": "20.5.7",
44
- "@typescript-eslint/eslint-plugin": "6.4.1",
45
- "@typescript-eslint/parser": "6.4.1",
46
- "@vitejs/plugin-vue": "4.3.3",
44
+ "@typescript-eslint/eslint-plugin": "6.5.0",
45
+ "@typescript-eslint/parser": "6.5.0",
46
+ "@vitejs/plugin-vue": "4.3.4",
47
47
  "eslint": "8.48.0",
48
48
  "eslint-config-prettier": "9.0.0",
49
49
  "eslint-import-resolver-typescript": "3.6.0",
@@ -52,11 +52,11 @@
52
52
  "eslint-plugin-vue": "9.17.0",
53
53
  "postcss-html": "1.5.0",
54
54
  "postcss-scss": "4.0.7",
55
- "prettier": "3.0.2",
55
+ "prettier": "3.0.3",
56
56
  "react": "18.2.0",
57
57
  "react-dom": "18.2.0",
58
58
  "sass": "1.66.1",
59
- "storybook": "7.3.2",
59
+ "storybook": "7.4.0",
60
60
  "stylelint": "15.10.3",
61
61
  "stylelint-config-recess-order": "4.3.0",
62
62
  "stylelint-config-recommended-scss": "12.0.0",
@@ -64,10 +64,10 @@
64
64
  "stylelint-prettier": "4.0.2",
65
65
  "typescript": "5.2.2",
66
66
  "vite": "4.4.9",
67
- "vite-plugin-dts": "3.5.2",
67
+ "vite-plugin-dts": "3.5.3",
68
68
  "vite-plugin-static-copy": "0.17.0",
69
69
  "vite-svg-loader": "4.0.0",
70
- "vue-linters-config": "0.1.6",
70
+ "vue-linters-config": "0.1.9",
71
71
  "vue-tsc": "1.8.8"
72
72
  },
73
73
  "peerDependencies": {