mhz-ui 1.3.7 → 1.3.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
- ._backdrop_jn54y_1{position:fixed;inset:0;z-index:998;display:flex;align-items:center;justify-content:center;background-color:var(--color-gray-transparent)}._dialog_jn54y_11{z-index:999;padding:0;outline:none;background-color:var(--color-white);border:none;border-radius:16px}._modal_jn54y_20{display:flex;flex-direction:column;gap:12px;width:var(--v5a895568);max-width:100%;height:auto;padding:24px;outline:none;box-shadow:0 0 16px 0 var(--color-gray-transparent)}._modal_jn54y_20[data-scrollable=true]{max-height:64dvh;overflow-y:auto}._header_jn54y_36{display:flex;justify-content:flex-end}._buttons_jn54y_41{display:flex;gap:16px}.dark ._modal_jn54y_20{background-color:var(--color-black);box-shadow:0 0 16px 0 var(--color-black-transparent)}.dark ._slot_jn54y_50{color:var(--color-white)}
1
+ ._backdrop_jn54y_1{position:fixed;inset:0;z-index:998;display:flex;align-items:center;justify-content:center;background-color:var(--color-gray-transparent)}._dialog_jn54y_11{z-index:999;padding:0;outline:none;background-color:var(--color-white);border:none;border-radius:16px}._modal_jn54y_20{display:flex;flex-direction:column;gap:12px;width:var(--v1c45205f);max-width:100%;height:auto;padding:24px;outline:none;box-shadow:0 0 16px 0 var(--color-gray-transparent)}._modal_jn54y_20[data-scrollable=true]{max-height:64dvh;overflow-y:auto}._header_jn54y_36{display:flex;justify-content:flex-end}._buttons_jn54y_41{display:flex;gap:16px}.dark ._modal_jn54y_20{background-color:var(--color-black);box-shadow:0 0 16px 0 var(--color-black-transparent)}.dark ._slot_jn54y_50{color:var(--color-white)}
@@ -1,10 +1,10 @@
1
1
  import "./UiModal.css";
2
- import { defineComponent as v, useCssVars as V, computed as $, ref as w, onMounted as B, watch as S, nextTick as j, createBlock as E, openBlock as n, Teleport as N, createElementBlock as c, createCommentVNode as m, normalizeClass as l, createElementVNode as s, mergeProps as U, withModifiers as u, createVNode as d, renderSlot as T, withCtx as f, createTextVNode as p, toDisplayString as _, unref as y } from "vue";
3
- import h from "../UiButton/UiButton.js";
4
- import A from "../UiClose/UiClose.js";
5
- import { M as k } from "../index-DajWja1y.js";
2
+ import { defineComponent as V, useCssVars as $, computed as w, ref as B, onMounted as S, watch as j, createBlock as E, openBlock as n, Teleport as N, createElementBlock as c, createCommentVNode as u, normalizeClass as l, createElementVNode as a, mergeProps as U, withModifiers as m, createVNode as d, renderSlot as T, withCtx as f, createTextVNode as p, toDisplayString as _, unref as y, nextTick as A } from "vue";
3
+ import g from "../UiButton/UiButton.js";
4
+ import D from "../UiClose/UiClose.js";
5
+ import { M as h } from "../index-DajWja1y.js";
6
6
  import { _ as R } from "../_plugin-vue_export-helper-CHgC5LLL.js";
7
- const z = ["data-scrollable"], D = /* @__PURE__ */ v({
7
+ const z = ["data-scrollable"], G = /* @__PURE__ */ V({
8
8
  inheritAttrs: !1,
9
9
  __name: "UiModal",
10
10
  props: {
@@ -15,24 +15,27 @@ const z = ["data-scrollable"], D = /* @__PURE__ */ v({
15
15
  lang: { default: "ru" }
16
16
  },
17
17
  emits: ["update:modelValue", "confirm"],
18
- setup(C, { emit: b }) {
19
- V((e) => ({
20
- v5a895568: g.value
18
+ setup(k, { emit: C }) {
19
+ $((e) => ({
20
+ v1c45205f: b.value
21
21
  }));
22
- const o = C, r = b, g = $(() => `${o.width}px`), a = w(null);
22
+ const o = k, r = C, b = w(() => `${o.width}px`), s = B(null);
23
+ function v() {
24
+ A(() => {
25
+ s.value?.open ? s.value.close() : s.value?.showModal();
26
+ });
27
+ }
23
28
  function M() {
24
29
  r("confirm"), t();
25
30
  }
26
31
  function t() {
27
32
  r("update:modelValue", !1);
28
33
  }
29
- return B(() => {
30
- S(
34
+ return S(() => {
35
+ j(
31
36
  () => o.modelValue,
32
- (e) => {
33
- e ? j(() => {
34
- a.value?.showModal();
35
- }) : a.value?.close();
37
+ () => {
38
+ v();
36
39
  },
37
40
  { immediate: !0 }
38
41
  );
@@ -42,24 +45,24 @@ const z = ["data-scrollable"], D = /* @__PURE__ */ v({
42
45
  class: l(e.$style.backdrop),
43
46
  onMousedown: t
44
47
  }, [
45
- s("dialog", U({
48
+ a("dialog", U({
46
49
  ref_key: "dialogRef",
47
- ref: a,
50
+ ref: s,
48
51
  class: e.$style.dialog,
49
- onCancel: u(t, ["prevent"])
52
+ onCancel: m(t, ["prevent"])
50
53
  }, e.$attrs), [
51
- s("div", {
54
+ a("div", {
52
55
  class: l(e.$style.modal),
53
- onMousedown: i[0] || (i[0] = u(() => {
56
+ onMousedown: i[0] || (i[0] = m(() => {
54
57
  }, ["stop"])),
55
58
  "data-scrollable": o.isScrollable
56
59
  }, [
57
- s("div", {
60
+ a("div", {
58
61
  class: l(e.$style.header)
59
62
  }, [
60
- d(A, { onClick: t })
63
+ d(D, { onClick: t })
61
64
  ], 2),
62
- s("div", {
65
+ a("div", {
63
66
  class: l(e.$style.slot)
64
67
  }, [
65
68
  T(e.$slots, "default")
@@ -68,37 +71,37 @@ const z = ["data-scrollable"], D = /* @__PURE__ */ v({
68
71
  key: 0,
69
72
  class: l(e.$style.buttons)
70
73
  }, [
71
- d(h, { onClick: M }, {
74
+ d(g, { onClick: M }, {
72
75
  default: f(() => [
73
- p(_(y(k)[o.lang].confirm), 1)
76
+ p(_(y(h)[o.lang].confirm), 1)
74
77
  ]),
75
78
  _: 1
76
79
  }),
77
- d(h, {
80
+ d(g, {
78
81
  layout: "secondary",
79
82
  onClick: t
80
83
  }, {
81
84
  default: f(() => [
82
- p(_(y(k)[o.lang].cancel), 1)
85
+ p(_(y(h)[o.lang].cancel), 1)
83
86
  ]),
84
87
  _: 1
85
88
  })
86
- ], 2)) : m("", !0)
89
+ ], 2)) : u("", !0)
87
90
  ], 42, z)
88
91
  ], 16)
89
- ], 34)) : m("", !0)
92
+ ], 34)) : u("", !0)
90
93
  ]));
91
94
  }
92
- }), G = "_backdrop_jn54y_1", P = "_dialog_jn54y_11", q = "_modal_jn54y_20", x = "_header_jn54y_36", F = "_buttons_jn54y_41", H = "_slot_jn54y_50", I = {
93
- backdrop: G,
94
- dialog: P,
95
- modal: q,
96
- header: x,
97
- buttons: F,
98
- slot: H
99
- }, J = {
100
- $style: I
101
- }, X = /* @__PURE__ */ R(D, [["__cssModules", J]]);
95
+ }), P = "_backdrop_jn54y_1", q = "_dialog_jn54y_11", x = "_modal_jn54y_20", F = "_header_jn54y_36", H = "_buttons_jn54y_41", I = "_slot_jn54y_50", J = {
96
+ backdrop: P,
97
+ dialog: q,
98
+ modal: x,
99
+ header: F,
100
+ buttons: H,
101
+ slot: I
102
+ }, K = {
103
+ $style: J
104
+ }, Y = /* @__PURE__ */ R(G, [["__cssModules", K]]);
102
105
  export {
103
- X as default
106
+ Y as default
104
107
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mhz-ui",
3
3
  "description": "Mhz ui kit",
4
- "version": "1.3.7",
4
+ "version": "1.3.8",
5
5
  "author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
6
6
  "license": "MIT",
7
7
  "type": "module",