mhz-ui 1.2.28 → 1.2.30

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
- ._chip_yhjo1_1{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:4px 8px 3px;font-size:.875rem;background-color:var(--color-gray-light);border-bottom:1px solid var(--color-gray-dark);border-radius:8px}._chip_yhjo1_1[data-type=success]{color:var(--color-success-dark)}._chip_yhjo1_1[data-type=error]{color:var(--color-error-dark)}
1
+ ._chip_19glz_1{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:4px 8px 3px;font-size:.875rem;color:var(--color-black);background-color:var(--color-gray-light);border-bottom:1px solid var(--color-gray-dark);border-radius:8px}._chip_19glz_1[data-type=success]{color:var(--color-success-dark)}._chip_19glz_1[data-type=error]{color:var(--color-error-dark)}
@@ -1,6 +1,6 @@
1
1
  import "./UiChip.css";
2
- import { defineComponent as o, createElementBlock as c, openBlock as p, normalizeClass as n, renderSlot as a } from "vue";
3
- import { _ as l } from "../_plugin-vue_export-helper-CHgC5LLL.js";
2
+ import { defineComponent as o, createElementBlock as c, openBlock as p, normalizeClass as n, renderSlot as l } from "vue";
3
+ import { _ as a } from "../_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const r = "default", i = ["data-type"], _ = /* @__PURE__ */ o({
5
5
  __name: "UiChip",
6
6
  props: {
@@ -8,18 +8,18 @@ const r = "default", i = ["data-type"], _ = /* @__PURE__ */ o({
8
8
  },
9
9
  setup(e) {
10
10
  const s = e;
11
- return (t, m) => (p(), c("div", {
11
+ return (t, u) => (p(), c("div", {
12
12
  class: n(t.$style.chip),
13
13
  "data-type": s.type
14
14
  }, [
15
- a(t.$slots, "default")
15
+ l(t.$slots, "default")
16
16
  ], 10, i));
17
17
  }
18
- }), d = "_chip_yhjo1_1", f = {
18
+ }), d = "_chip_19glz_1", f = {
19
19
  chip: d
20
- }, h = {
20
+ }, m = {
21
21
  $style: f
22
- }, C = /* @__PURE__ */ l(_, [["__cssModules", h]]);
22
+ }, C = /* @__PURE__ */ a(_, [["__cssModules", m]]);
23
23
  export {
24
24
  C as default
25
25
  };
@@ -1 +1 @@
1
- ._flex_1rw48_1{display:flex;flex-grow:var(--1effbfbd);flex-shrink:var(--01038f1a);flex-direction:var(--6e1595d6);flex-wrap:var(--3036dcf4);gap:var(--de6b7634);align-items:var(--6e09b5a5);justify-content:var(--750a0533);width:var(--18d24716)}
1
+ ._flex_si9vt_1{display:flex;flex-grow:var(--61824a30);flex-shrink:var(--c7399644);flex-direction:var(--5bfadb0b);flex-wrap:var(--3f140fc2);gap:var(--f414cf4a);align-items:var(--4416f6e0);justify-content:var(--43cd669e);width:var(--7076914b)}.dark ._flex_si9vt_1{color:var(--color-white)}
@@ -1,10 +1,10 @@
1
1
  import "./UiFlex.css";
2
2
  import { defineComponent as i, useCssVars as f, computed as t, createBlock as m, openBlock as g, resolveDynamicComponent as w, normalizeClass as _, withCtx as y, renderSlot as C } from "vue";
3
- import { _ as x } from "../_plugin-vue_export-helper-CHgC5LLL.js";
4
- const v = "div", h = "normal", k = "normal", A = "8", F = /* @__PURE__ */ i({
3
+ import { _ as v } from "../_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const x = "div", h = "normal", k = "normal", A = "8", F = /* @__PURE__ */ i({
5
5
  __name: "UiFlex",
6
6
  props: {
7
- tag: { default: v },
7
+ tag: { default: x },
8
8
  column: { type: Boolean },
9
9
  align: { default: h },
10
10
  justify: { default: k },
@@ -15,16 +15,16 @@ const v = "div", h = "normal", k = "normal", A = "8", F = /* @__PURE__ */ i({
15
15
  },
16
16
  setup(e) {
17
17
  f((o) => ({
18
- "1effbfbd": p.value,
19
- "01038f1a": d.value,
20
- "6e1595d6": s.value,
21
- "3036dcf4": r.value,
22
- de6b7634: u.value,
23
- "6e09b5a5": n.value,
24
- "750a0533": l.value,
25
- "18d24716": c.value
18
+ "61824a30": p.value,
19
+ c7399644: c.value,
20
+ "5bfadb0b": s.value,
21
+ "3f140fc2": r.value,
22
+ f414cf4a: u.value,
23
+ "4416f6e0": n.value,
24
+ "43cd669e": l.value,
25
+ "7076914b": d.value
26
26
  }));
27
- const a = e, s = t(() => a.column ? "column" : "row"), n = t(() => a.align), l = t(() => a.justify), r = t(() => a.wrap ? "wrap" : "nowrap"), u = t(() => a.gap ? `${a.gap}px` : "0"), d = t(() => a.shrink ? "1" : "0"), p = t(() => a.grow ? "1" : "0"), c = t(() => a.grow ? "100%" : "auto");
27
+ const a = e, s = t(() => a.column ? "column" : "row"), n = t(() => a.align), l = t(() => a.justify), r = t(() => a.wrap ? "wrap" : "nowrap"), u = t(() => a.gap ? `${a.gap}px` : "0"), c = t(() => a.shrink ? "1" : "0"), p = t(() => a.grow ? "1" : "0"), d = t(() => a.grow ? "100%" : "auto");
28
28
  return (o, D) => (g(), m(w(a.tag), {
29
29
  class: _(o.$style.flex),
30
30
  "data-column": a.column,
@@ -41,11 +41,11 @@ const v = "div", h = "normal", k = "normal", A = "8", F = /* @__PURE__ */ i({
41
41
  _: 3
42
42
  }, 8, ["class", "data-column", "data-align", "data-justify", "data-wrap", "data-gap", "data-shrink", "data-grow"]));
43
43
  }
44
- }), U = "_flex_1rw48_1", j = {
44
+ }), U = "_flex_si9vt_1", j = {
45
45
  flex: U
46
46
  }, B = {
47
47
  $style: j
48
- }, b = /* @__PURE__ */ x(F, [["__cssModules", B]]);
48
+ }, b = /* @__PURE__ */ v(F, [["__cssModules", B]]);
49
49
  export {
50
50
  b as default
51
51
  };
@@ -1 +1 @@
1
- ._container_1txdi_1{position:fixed;inset:0;z-index:999;display:flex;align-items:center;justify-content:center;width:100%;height:100dvh;background-color:var(--color-gray-transparent)}._modal_1txdi_13{position:relative;display:flex;flex-direction:column;gap:12px;width:var(--146d874f);max-width:100%;height:auto;padding:24px;outline:none;background-color:var(--color-white);border-radius:16px;box-shadow:0 0 16px 0 var(--color-gray-transparent)}._modal_1txdi_13[data-scrollable=true]{max-height:64dvh;overflow-y:auto}._header_1txdi_32{display:flex;justify-content:flex-end}._buttons_1txdi_37{display:flex;gap:16px}.dark ._modal_1txdi_13{background-color:var(--color-black)}
1
+ ._container_130xv_1{position:fixed;inset:0;z-index:999;display:flex;align-items:center;justify-content:center;width:100%;height:100dvh;background-color:var(--color-gray-transparent)}._modal_130xv_13{position:relative;display:flex;flex-direction:column;gap:12px;width:var(--3713408b);max-width:100%;height:auto;padding:24px;outline:none;background-color:var(--color-white);border-radius:16px;box-shadow:0 0 16px 0 var(--color-gray-transparent)}._modal_130xv_13[data-scrollable=true]{max-height:64dvh;overflow-y:auto}._header_130xv_32{display:flex;justify-content:flex-end}._buttons_130xv_37{display:flex;gap:16px}.dark ._modal_130xv_13{background-color:var(--color-black);box-shadow:0 0 16px 0 var(--color-black-transparent)}.dark ._slot_130xv_46{color:var(--color-white)}
@@ -1,8 +1,8 @@
1
1
  import "./UiModal.css";
2
- import { defineComponent as M, useCssVars as S, computed as k, ref as $, watch as x, createElementBlock as u, createCommentVNode as c, openBlock as m, normalizeClass as l, createElementVNode as n, withModifiers as B, createVNode as d, renderSlot as g, withCtx as f, createTextVNode as p, toDisplayString as _, unref as y } from "vue";
3
- import C from "../UiButton/UiButton.js";
2
+ import { defineComponent as M, useCssVars as S, computed as $, ref as k, watch as x, createElementBlock as c, createCommentVNode as u, openBlock as m, normalizeClass as t, createElementVNode as n, withModifiers as B, createVNode as d, renderSlot as g, withCtx as f, createTextVNode as p, toDisplayString as _, unref as y } from "vue";
3
+ import v from "../UiButton/UiButton.js";
4
4
  import E from "../UiClose/UiClose.js";
5
- import { M as V } from "../index-DajWja1y.js";
5
+ import { M as b } from "../index-DajWja1y.js";
6
6
  import { _ as N } from "../_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  const U = ["data-scrollable"], T = /* @__PURE__ */ M({
8
8
  __name: "UiModal",
@@ -14,76 +14,79 @@ const U = ["data-scrollable"], T = /* @__PURE__ */ M({
14
14
  lang: { default: "ru" }
15
15
  },
16
16
  emits: ["update:modelValue", "confirm"],
17
- setup(b, { emit: h }) {
17
+ setup(C, { emit: V }) {
18
18
  S((o) => ({
19
- "146d874f": v.value
19
+ "3713408b": h.value
20
20
  }));
21
- const e = b, a = h, v = k(() => `${e.width}px`), i = document.querySelector("body"), t = $(!1);
21
+ const e = C, s = V, h = $(() => `${e.width}px`), r = document.querySelector("body"), l = k(!1);
22
22
  x(
23
23
  () => e.modelValue,
24
24
  () => {
25
25
  const o = e.modelValue ? "hidden" : "auto";
26
- i && (i.style.overflow = o), e.modelValue && (t.value = !0, setTimeout(() => {
27
- t.value = !1;
26
+ r && (r.style.overflow = o), e.modelValue && (l.value = !0, setTimeout(() => {
27
+ l.value = !1;
28
28
  }, 100));
29
29
  }
30
30
  );
31
31
  function w() {
32
- a("confirm"), a("update:modelValue", !1);
32
+ s("confirm"), s("update:modelValue", !1);
33
33
  }
34
- function s() {
35
- t.value || a("update:modelValue", !1), t.value = !1;
34
+ function a() {
35
+ l.value || s("update:modelValue", !1), l.value = !1;
36
36
  }
37
- return (o, r) => e.modelValue ? (m(), u("div", {
37
+ return (o, i) => e.modelValue ? (m(), c("div", {
38
38
  key: 0,
39
- onMousedown: s,
40
- class: l(o.$style.container)
39
+ onMousedown: a,
40
+ class: t(o.$style.container)
41
41
  }, [
42
42
  n("div", {
43
- onMousedown: r[0] || (r[0] = B(() => {
43
+ onMousedown: i[0] || (i[0] = B(() => {
44
44
  }, ["stop"])),
45
- class: l(o.$style.modal),
45
+ class: t(o.$style.modal),
46
46
  "data-scrollable": e.isScrollable
47
47
  }, [
48
48
  n("div", {
49
- class: l(o.$style.header)
49
+ class: t(o.$style.header)
50
50
  }, [
51
- d(E, { onClick: s })
51
+ d(E, { onClick: a })
52
52
  ], 2),
53
- n("div", null, [
53
+ n("div", {
54
+ class: t(o.$style.slot)
55
+ }, [
54
56
  g(o.$slots, "default")
55
- ]),
56
- e.isConfirm ? (m(), u("div", {
57
+ ], 2),
58
+ e.isConfirm ? (m(), c("div", {
57
59
  key: 0,
58
- class: l(o.$style.buttons)
60
+ class: t(o.$style.buttons)
59
61
  }, [
60
- d(C, { onClick: w }, {
62
+ d(v, { onClick: w }, {
61
63
  default: f(() => [
62
- p(_(y(V)[e.lang].confirm), 1)
64
+ p(_(y(b)[e.lang].confirm), 1)
63
65
  ]),
64
66
  _: 1
65
67
  }),
66
- d(C, {
68
+ d(v, {
67
69
  layout: "secondary",
68
- onClick: s
70
+ onClick: a
69
71
  }, {
70
72
  default: f(() => [
71
- p(_(y(V)[e.lang].cancel), 1)
73
+ p(_(y(b)[e.lang].cancel), 1)
72
74
  ]),
73
75
  _: 1
74
76
  })
75
- ], 2)) : c("", !0)
77
+ ], 2)) : u("", !0)
76
78
  ], 42, U)
77
- ], 34)) : c("", !0);
79
+ ], 34)) : u("", !0);
78
80
  }
79
- }), q = "_container_1txdi_1", z = "_modal_1txdi_13", A = "_header_1txdi_32", D = "_buttons_1txdi_37", G = {
81
+ }), q = "_container_130xv_1", z = "_modal_130xv_13", A = "_header_130xv_32", D = "_buttons_130xv_37", G = "_slot_130xv_46", H = {
80
82
  container: q,
81
83
  modal: z,
82
84
  header: A,
83
- buttons: D
84
- }, H = {
85
- $style: G
86
- }, L = /* @__PURE__ */ N(T, [["__cssModules", H]]);
85
+ buttons: D,
86
+ slot: G
87
+ }, j = {
88
+ $style: H
89
+ }, O = /* @__PURE__ */ N(T, [["__cssModules", j]]);
87
90
  export {
88
- L as default
91
+ O as default
89
92
  };
@@ -1 +1 @@
1
- ._tableBlock_t33ld_1{width:100%;overflow-x:auto}._scrollMessage_t33ld_6{margin-bottom:8px}._table_t33ld_1{width:100%;border:1px solid var(--color-gray);border-radius:8px}._table_t33ld_1 td{padding:6px 16px;vertical-align:top;border-top:1px solid var(--color-gray)}._table_t33ld_1 td[data-grow]{width:100%}._table_t33ld_1 td[data-no-wrap]{text-wrap:nowrap}._th_t33ld_27{padding:8px 16px;text-align:left;background-color:var(--color-gray-light-extra)}._th_t33ld_27:first-child{border-top-left-radius:8px}._th_t33ld_27:last-child{border-top-right-radius:8px}._label_t33ld_39{display:flex;gap:4px;align-items:center;width:fit-content;font-size:1rem;font-weight:700;color:var(--color-black);text-wrap:nowrap;cursor:pointer;user-select:none}._label_t33ld_39[data-loading=true]{color:var(--color-transparent)}._sort_t33ld_55{display:flex;padding:0;cursor:pointer;background-color:var(--color-transparent);border:none}._arrow_t33ld_63{color:var(--color-black)}._arrow_t33ld_63[data-loading=true]{color:var(--color-transparent)}._arrow_t33ld_63[data-current=true]:not(._arrow_t33ld_63[data-loading=true]){color:var(--color-primary)}.dark ._table_t33ld_1,.dark ._table_t33ld_1 td{border:1px solid var(--color-gray-dark-extra)}.dark ._th_t33ld_27{background-color:var(--color-gray-dark-extra)}.dark ._label_t33ld_39{color:var(--color-white)}
1
+ ._tableBlock_1ky8m_1{width:100%;overflow-x:auto}._scrollMessage_1ky8m_6{margin-bottom:8px}._table_1ky8m_1{width:100%;border:1px solid var(--color-gray);border-radius:8px}._table_1ky8m_1 td{padding:6px 16px;vertical-align:top;border-top:1px solid var(--color-gray)}._table_1ky8m_1 td[data-grow]{width:100%}._table_1ky8m_1 td[data-no-wrap]{text-wrap:nowrap}._th_1ky8m_27{padding:8px 16px;text-align:left;background-color:var(--color-gray-light-extra)}._th_1ky8m_27:first-child{border-top-left-radius:6px}._th_1ky8m_27:last-child{border-top-right-radius:6px}._label_1ky8m_39{display:flex;gap:4px;align-items:center;width:fit-content;font-size:1rem;font-weight:700;color:var(--color-black);text-wrap:nowrap;cursor:pointer;user-select:none}._label_1ky8m_39[data-loading=true]{color:var(--color-transparent)}._sort_1ky8m_55{display:flex;padding:0;cursor:pointer;background-color:var(--color-transparent);border:none}._arrow_1ky8m_63{color:var(--color-black)}._arrow_1ky8m_63[data-loading=true]{color:var(--color-transparent)}._arrow_1ky8m_63[data-current=true]:not(._arrow_1ky8m_63[data-loading=true]){color:var(--color-primary)}.dark ._table_1ky8m_1,.dark ._table_1ky8m_1 td{border:1px solid var(--color-gray-dark-extra)}.dark ._th_1ky8m_27{background-color:var(--color-gray-dark-extra)}.dark ._label_1ky8m_39{color:var(--color-white)}
@@ -1,8 +1,8 @@
1
1
  import "./UiTable.css";
2
- import { defineComponent as y, ref as i, onMounted as k, onBeforeUnmount as V, createElementBlock as o, openBlock as n, normalizeClass as a, createCommentVNode as b, createElementVNode as s, toDisplayString as p, unref as $, Fragment as S, renderList as w, renderSlot as B } from "vue";
2
+ import { defineComponent as g, ref as d, onMounted as v, onBeforeUnmount as V, createElementBlock as o, openBlock as n, normalizeClass as a, createCommentVNode as b, createElementVNode as s, toDisplayString as y, unref as $, Fragment as S, renderList as w, renderSlot as B } from "vue";
3
3
  import { M as h } from "../index-DajWja1y.js";
4
4
  import { _ as M } from "../_plugin-vue_export-helper-CHgC5LLL.js";
5
- const E = ["data-loading"], C = ["onClick", "data-current"], L = ["data-current", "data-loading"], z = ["data-current", "data-loading"], A = /* @__PURE__ */ y({
5
+ const E = ["data-loading"], C = ["onClick", "data-current"], L = ["data-current", "data-loading"], z = ["data-current", "data-loading"], A = /* @__PURE__ */ g({
6
6
  __name: "UiTable",
7
7
  props: {
8
8
  headers: {},
@@ -11,22 +11,22 @@ const E = ["data-loading"], C = ["onClick", "data-current"], L = ["data-current"
11
11
  lang: { default: "ru" }
12
12
  },
13
13
  emits: ["update:modelValue", "reset"],
14
- setup(f, { emit: g }) {
15
- const l = f, m = g, r = i(), c = i(), _ = i(!1);
16
- function d() {
14
+ setup(k, { emit: p }) {
15
+ const l = k, m = p, r = d(), c = d(), _ = d(!1);
16
+ function u() {
17
17
  if (r.value && c.value) {
18
- const e = Number(getComputedStyle(r.value).width.slice(0, -2)), u = Number(getComputedStyle(c.value).width.slice(0, -2));
19
- _.value = u - 2 > e;
18
+ const e = Number(getComputedStyle(r.value).width.slice(0, -2)), i = Number(getComputedStyle(c.value).width.slice(0, -2));
19
+ _.value = i - 2 > e;
20
20
  }
21
21
  }
22
- function v(e) {
22
+ function f(e) {
23
23
  l.modelValue?.value === e ? m("update:modelValue", { value: e, isAsc: !l.modelValue?.isAsc }) : m("reset", e);
24
24
  }
25
- return k(() => {
26
- d(), window.addEventListener("resize", d, !0);
25
+ return v(() => {
26
+ u(), window.addEventListener("resize", u, !0);
27
27
  }), V(() => {
28
- window.removeEventListener("resize", d, !0);
29
- }), (e, u) => (n(), o("div", {
28
+ window.removeEventListener("resize", u, !0);
29
+ }), (e, i) => (n(), o("div", {
30
30
  class: a(e.$style.tableBlock),
31
31
  ref_key: "tableBlock",
32
32
  ref: r
@@ -34,7 +34,7 @@ const E = ["data-loading"], C = ["onClick", "data-current"], L = ["data-current"
34
34
  _.value ? (n(), o("div", {
35
35
  key: 0,
36
36
  class: a(e.$style.scrollMessage)
37
- }, p($(h)[l.lang].tableIsScrollable), 3)) : b("", !0),
37
+ }, y($(h)[l.lang].tableIsScrollable), 3)) : b("", !0),
38
38
  s("table", {
39
39
  class: a(e.$style.table),
40
40
  cellpadding: "8",
@@ -53,10 +53,10 @@ const E = ["data-loading"], C = ["onClick", "data-current"], L = ["data-current"
53
53
  class: a(e.$style.label),
54
54
  "data-loading": l.isLoading
55
55
  }, [
56
- s("span", null, p(t.title), 1),
56
+ s("span", null, y(t.title), 1),
57
57
  t.value ? (n(), o("button", {
58
58
  key: 0,
59
- onClick: (H) => v(t.value),
59
+ onClick: (H) => f(t.value),
60
60
  class: a(e.$style.sort),
61
61
  type: "button",
62
62
  "data-current": l.modelValue?.value === t.value
@@ -82,7 +82,7 @@ const E = ["data-loading"], C = ["onClick", "data-current"], L = ["data-current"
82
82
  ], 2)
83
83
  ], 2));
84
84
  }
85
- }), N = "_tableBlock_t33ld_1", T = "_scrollMessage_t33ld_6", U = "_table_t33ld_1", q = "_th_t33ld_27", D = "_label_t33ld_39", F = "_sort_t33ld_55", G = "_arrow_t33ld_63", I = {
85
+ }), N = "_tableBlock_1ky8m_1", T = "_scrollMessage_1ky8m_6", U = "_table_1ky8m_1", q = "_th_1ky8m_27", D = "_label_1ky8m_39", F = "_sort_1ky8m_55", G = "_arrow_1ky8m_63", I = {
86
86
  tableBlock: N,
87
87
  scrollMessage: T,
88
88
  table: U,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mhz-ui",
3
3
  "description": "Mhz ui kit",
4
- "version": "1.2.28",
4
+ "version": "1.2.30",
5
5
  "author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
6
6
  "license": "MIT",
7
7
  "type": "module",