mhz-ui 1.3.13 → 1.3.15

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_kayn8_1{width:100%;overflow:hidden;border:1px solid var(--color-gray);border-radius:8px}._container_kayn8_1 ._titleBar_kayn8_7{display:flex;align-items:center;justify-content:space-between;height:40px;padding:8px;font-weight:700;background-color:var(--color-gray-light-extra);border-bottom:1px solid var(--color-gray);border-top-left-radius:8px;border-top-right-radius:8px}._container_kayn8_1 ._titleBar_kayn8_7 ._navButton_kayn8_19{padding:0 8px;font-size:1.25rem;cursor:pointer;background:none;border:none}._container_kayn8_1 ._headings_kayn8_26{display:grid;grid-template-columns:repeat(7,1fr);height:37px;border-bottom:1px solid var(--color-gray)}._container_kayn8_1 ._headings_kayn8_26 ._weekday_kayn8_32{display:flex;align-items:center;justify-content:center;text-transform:capitalize}._container_kayn8_1 ._body_kayn8_38{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:minmax(72px,auto);gap:0}._container_kayn8_1 ._cell_kayn8_44{display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:flex-start;min-height:72px;padding:2px;background-color:var(--color-white);box-shadow:0 0 0 .2px var(--color-gray) inset}._container_kayn8_1 ._cell_kayn8_44._today_kayn8_55 ._cellDate_kayn8_55{font-weight:700}._container_kayn8_1 ._cell_kayn8_44._outOfRange_kayn8_58{cursor:not-allowed}._container_kayn8_1 ._cell_kayn8_44._outOfRange_kayn8_58 ._cellDate_kayn8_55{color:var(--color-gray)}._container_kayn8_1 ._cellDate_kayn8_55{display:flex;align-items:center;justify-content:center}._container_kayn8_1 ._cellEvents_kayn8_69{display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:flex-start;max-height:calc(100% - 24px);padding-bottom:6px}._container_kayn8_1 ._event_kayn8_78{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:12px;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}._container_kayn8_1 ._title_kayn8_7{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:1.125rem;font-weight:700;line-height:1;color:var(--color-gray-light)}.dark ._container_kayn8_1{border-color:var(--color-gray-dark-extra)}.dark ._container_kayn8_1 ._header_kayn8_108{color:var(--color-white);background-color:var(--color-primary-dark);border-bottom-color:var(--color-gray-dark-extra)}.dark ._container_kayn8_1 ._header_kayn8_108 ._titleBar_kayn8_7{background-color:var(--color-primary-dark);border-bottom-color:var(--color-gray-dark-extra)}.dark ._container_kayn8_1 ._header_kayn8_108 ._navButton_kayn8_19{color:var(--color-gray-dark)}.dark ._container_kayn8_1 ._header_kayn8_108 ._headings_kayn8_26{color:var(--color-white);background-color:var(--color-black);border-right:1px solid var(--color-gray-dark-extra);border-bottom:none;border-left:1px solid var(--color-gray-dark-extra)}.dark ._container_kayn8_1 ._cell_kayn8_44{background-color:var(--color-black);box-shadow:0 0 0 .2px var(--color-gray-dark) inset}.dark ._container_kayn8_1 ._cell_kayn8_44 ._cellDate_kayn8_55{color:var(--color-white)}.dark ._container_kayn8_1 ._cell_kayn8_44._outOfRange_kayn8_58 ._cellDate_kayn8_55{color:var(--color-gray-dark)}
1
+ ._container_6dq6w_1{width:100%;overflow:hidden;border:1px solid var(--color-gray);border-radius:8px}._container_6dq6w_1 ._titleBar_6dq6w_7{display:flex;align-items:center;justify-content:space-between;height:40px;padding:8px;font-weight:700;background-color:var(--color-gray-light-extra);border-bottom:1px solid var(--color-gray);border-top-left-radius:8px;border-top-right-radius:8px}._container_6dq6w_1 ._titleBar_6dq6w_7 ._navButton_6dq6w_19{padding:0 8px;font-size:1.25rem;cursor:pointer;background:none;border:none}._container_6dq6w_1 ._headings_6dq6w_26{display:grid;grid-template-columns:repeat(7,1fr);height:37px;border-bottom:1px solid var(--color-gray)}._container_6dq6w_1 ._headings_6dq6w_26 ._weekday_6dq6w_32{display:flex;align-items:center;justify-content:center;text-transform:capitalize}._container_6dq6w_1 ._body_6dq6w_38{display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:minmax(72px,auto);gap:0}._container_6dq6w_1 ._cell_6dq6w_44{display:flex;flex-direction:column;gap:2px;align-items:center;justify-content:flex-start;min-height:72px;padding:2px;background-color:var(--color-white);box-shadow:0 0 0 .2px var(--color-gray) inset}._container_6dq6w_1 ._cell_6dq6w_44._today_6dq6w_55 ._cellDate_6dq6w_55{font-weight:700}._container_6dq6w_1 ._cell_6dq6w_44[data-choose=true]{cursor:pointer}._container_6dq6w_1 ._cell_6dq6w_44._outOfRange_6dq6w_61{cursor:not-allowed}._container_6dq6w_1 ._cell_6dq6w_44._outOfRange_6dq6w_61 ._cellDate_6dq6w_55{color:var(--color-gray)}._container_6dq6w_1 ._cellDate_6dq6w_55{display:flex;align-items:center;justify-content:center}._container_6dq6w_1 ._cellEvents_6dq6w_72{display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:flex-start;max-height:calc(100% - 24px);padding-bottom:6px}._container_6dq6w_1 ._event_6dq6w_81{display:flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;cursor:pointer;-webkit-user-select:none;user-select:none;border:none;border-radius:12px;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}._container_6dq6w_1 ._title_6dq6w_7{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:1.125rem;font-weight:700;line-height:1;color:var(--color-gray-light)}.dark ._container_6dq6w_1{border-color:var(--color-gray-dark-extra)}.dark ._container_6dq6w_1 ._header_6dq6w_111{color:var(--color-white);background-color:var(--color-primary-dark);border-bottom-color:var(--color-gray-dark-extra)}.dark ._container_6dq6w_1 ._header_6dq6w_111 ._titleBar_6dq6w_7{background-color:var(--color-primary-dark);border-bottom-color:var(--color-gray-dark-extra)}.dark ._container_6dq6w_1 ._header_6dq6w_111 ._navButton_6dq6w_19{color:var(--color-gray-dark)}.dark ._container_6dq6w_1 ._header_6dq6w_111 ._headings_6dq6w_26{color:var(--color-white);background-color:var(--color-black);border-right:1px solid var(--color-gray-dark-extra);border-bottom:none;border-left:1px solid var(--color-gray-dark-extra)}.dark ._container_6dq6w_1 ._cell_6dq6w_44{background-color:var(--color-black);box-shadow:0 0 0 .2px var(--color-gray-dark) inset}.dark ._container_6dq6w_1 ._cell_6dq6w_44 ._cellDate_6dq6w_55{color:var(--color-white)}.dark ._container_6dq6w_1 ._cell_6dq6w_44._outOfRange_6dq6w_61 ._cellDate_6dq6w_55{color:var(--color-gray-dark)}
@@ -1,7 +1,7 @@
1
1
  import "./UiCalendar.css";
2
- import { defineComponent as L, ref as z, computed as d, onBeforeMount as A, createElementBlock as c, openBlock as u, normalizeClass as a, createElementVNode as l, toDisplayString as i, Fragment as h, renderList as k, withModifiers as H, normalizeStyle as N } from "vue";
3
- import { _ as P } from "../_plugin-vue_export-helper-CHgC5LLL.js";
4
- const V = ["onClick"], W = ["onClick"], j = /* @__PURE__ */ L({
2
+ import { defineComponent as U, ref as H, computed as D, onBeforeMount as L, createElementBlock as c, openBlock as u, normalizeClass as a, createElementVNode as l, toDisplayString as d, Fragment as h, renderList as w, withModifiers as P, normalizeStyle as z } from "vue";
3
+ import { _ as A } from "../_plugin-vue_export-helper-CHgC5LLL.js";
4
+ const N = ["onClick", "data-choose"], V = ["onClick"], W = /* @__PURE__ */ U({
5
5
  __name: "UiCalendar",
6
6
  props: {
7
7
  isDisablePastDates: { type: Boolean },
@@ -9,68 +9,71 @@ const V = ["onClick"], W = ["onClick"], j = /* @__PURE__ */ L({
9
9
  lang: { default: "ru" }
10
10
  },
11
11
  emits: ["update", "eventClick", "chooseDate"],
12
- setup(C, { emit: B }) {
13
- const y = C, D = B, s = z(/* @__PURE__ */ new Date()), m = d(() => {
12
+ setup(C, { emit: q }) {
13
+ const i = C, y = q, s = H(/* @__PURE__ */ new Date()), m = D(() => {
14
14
  const e = /* @__PURE__ */ new Date();
15
15
  return e.setHours(0, 0, 0, 0), e;
16
- }), p = d(() => new Date(s.value.getFullYear(), s.value.getMonth(), 1)), O = d(() => {
16
+ }), p = D(() => new Date(s.value.getFullYear(), s.value.getMonth(), 1)), B = D(() => {
17
17
  const e = { month: "long", year: "numeric" };
18
- let t = p.value.toLocaleDateString(y.lang, e);
19
- return t.length > 0 && (t = t.charAt(0).toUpperCase() + t.slice(1)), y.lang === "ru" && (t = t.replace(/ г\.$/, "")), t;
20
- }), b = d(() => {
18
+ let t = p.value.toLocaleDateString(i.lang, e);
19
+ return t.length > 0 && (t = t.charAt(0).toUpperCase() + t.slice(1)), i.lang === "ru" && (t = t.replace(/ г\.$/, "")), t;
20
+ }), b = D(() => {
21
21
  const e = new Date(p.value);
22
22
  e.setDate(1);
23
23
  const t = (e.getDay() + 6) % 7;
24
24
  return e.setDate(e.getDate() - t), Array.from({ length: 7 }, (n, r) => {
25
25
  const o = new Date(e);
26
- return o.setDate(e.getDate() + r), o.toLocaleDateString(y.lang, { weekday: "short" });
26
+ return o.setDate(e.getDate() + r), o.toLocaleDateString(i.lang, { weekday: "short" });
27
27
  });
28
- }), g = d(() => {
28
+ }), g = D(() => {
29
29
  const e = new Date(s.value.getFullYear(), s.value.getMonth(), 1), t = new Date(s.value.getFullYear(), s.value.getMonth() + 1, 0), n = (e.getDay() + 6) % 7, r = new Date(e);
30
30
  r.setDate(e.getDate() - n);
31
31
  const o = (7 - t.getDay()) % 7, f = new Date(t);
32
32
  f.setDate(t.getDate() + o);
33
- const U = Math.floor((f.getTime() - r.getTime()) / (1e3 * 60 * 60 * 24)) + 1, M = [];
34
- for (let _ = 0; _ < U; _++) {
33
+ const T = Math.floor((f.getTime() - r.getTime()) / (1e3 * 60 * 60 * 24)) + 1, M = [];
34
+ for (let _ = 0; _ < T; _++) {
35
35
  const $ = new Date(r);
36
36
  $.setDate(r.getDate() + _), M.push($);
37
37
  }
38
38
  return M;
39
39
  });
40
40
  function v() {
41
- const e = { dateFrom: g.value[0], dateTo: g.value.at(-1) };
42
- D("update", e);
41
+ const e = {
42
+ dateFrom: g.value[0],
43
+ dateTo: new Date(g.value.at(-1)?.setHours(23, 59, 59))
44
+ };
45
+ y("update", e);
43
46
  }
44
- function F(e) {
45
- return y.events.filter((t) => {
47
+ function O(e) {
48
+ return i.events.filter((t) => {
46
49
  if (!t.start) return !1;
47
50
  const n = new Date(t.start);
48
51
  return n.getDate() === e.getDate() && n.getMonth() === e.getMonth() && n.getFullYear() === e.getFullYear();
49
52
  });
50
53
  }
51
- function E(e) {
54
+ function F(e) {
52
55
  return e.toDateString() === m.value.toDateString();
53
56
  }
54
- function w(e) {
55
- if (y.isDisablePastDates) {
57
+ function k(e) {
58
+ if (i.isDisablePastDates) {
56
59
  const t = new Date(e);
57
60
  if (t.setHours(0, 0, 0, 0), t < m.value) return !0;
58
61
  }
59
62
  return !1;
60
63
  }
61
- function Y() {
64
+ function E() {
62
65
  s.value = new Date(s.value.getFullYear(), s.value.getMonth() - 1, 1), v();
63
66
  }
64
- function S() {
67
+ function Y() {
65
68
  s.value = new Date(s.value.getFullYear(), s.value.getMonth() + 1, 1), v();
66
69
  }
67
- function R(e) {
68
- D("eventClick", e);
70
+ function S(e) {
71
+ y("eventClick", e);
69
72
  }
70
- function T(e) {
71
- w(e) || D("chooseDate", e);
73
+ function R(e) {
74
+ k(e) || y("chooseDate", e);
72
75
  }
73
- return A(() => {
76
+ return L(() => {
74
77
  v();
75
78
  }), (e, t) => (u(), c("div", {
76
79
  class: a(e.$style.container)
@@ -82,57 +85,58 @@ const V = ["onClick"], W = ["onClick"], j = /* @__PURE__ */ L({
82
85
  class: a(e.$style.titleBar)
83
86
  }, [
84
87
  l("button", {
85
- onClick: Y,
88
+ onClick: E,
86
89
  class: a(e.$style.navButton),
87
90
  type: "button"
88
- }, i("<"), 2),
89
- l("span", null, i(O.value), 1),
91
+ }, d("<"), 2),
92
+ l("span", null, d(B.value), 1),
90
93
  l("button", {
91
- onClick: S,
94
+ onClick: Y,
92
95
  class: a(e.$style.navButton),
93
96
  type: "button"
94
- }, i(">"), 2)
97
+ }, d(">"), 2)
95
98
  ], 2),
96
99
  l("div", {
97
100
  class: a(e.$style.headings)
98
101
  }, [
99
- (u(!0), c(h, null, k(b.value, (n) => (u(), c("div", {
102
+ (u(!0), c(h, null, w(b.value, (n) => (u(), c("div", {
100
103
  key: n,
101
104
  class: a(e.$style.weekday)
102
- }, i(n), 3))), 128))
105
+ }, d(n), 3))), 128))
103
106
  ], 2)
104
107
  ], 2),
105
108
  l("div", {
106
109
  class: a(e.$style.body)
107
110
  }, [
108
- (u(!0), c(h, null, k(g.value, (n, r) => (u(), c("div", {
111
+ (u(!0), c(h, null, w(g.value, (n, r) => (u(), c("div", {
109
112
  key: r,
110
- class: a([e.$style.cell, { [e.$style.today]: E(n), [e.$style.outOfRange]: w(n) }]),
111
- onClick: (o) => T(n)
113
+ class: a([e.$style.cell, { [e.$style.today]: F(n), [e.$style.outOfRange]: k(n) }]),
114
+ onClick: (o) => R(n),
115
+ "data-choose": i.isDisablePastDates
112
116
  }, [
113
117
  l("div", {
114
118
  class: a(e.$style.cellDate)
115
- }, i(n.getDate()), 3),
119
+ }, d(n.getDate()), 3),
116
120
  l("div", {
117
121
  class: a(e.$style.cellEvents)
118
122
  }, [
119
- (u(!0), c(h, null, k(F(n), (o) => (u(), c("div", {
123
+ (u(!0), c(h, null, w(O(n), (o) => (u(), c("div", {
120
124
  key: o.id,
121
125
  class: a(e.$style.event),
122
- style: N({ background: o.color }),
123
- onClick: H((f) => R(o), ["stop"])
126
+ style: z({ background: o.color }),
127
+ onClick: P((f) => S(o), ["stop"])
124
128
  }, [
125
129
  l("div", {
126
130
  class: a(e.$style.title)
127
- }, i(o.title), 3)
128
- ], 14, W))), 128))
131
+ }, d(o.title), 3)
132
+ ], 14, V))), 128))
129
133
  ], 2)
130
- ], 10, V))), 128))
134
+ ], 10, N))), 128))
131
135
  ], 2)
132
136
  ], 2));
133
137
  }
134
- }), q = "_container_kayn8_1", G = "_titleBar_kayn8_7", I = "_navButton_kayn8_19", J = "_headings_kayn8_26", K = "_weekday_kayn8_32", Q = "_body_kayn8_38", X = "_cell_kayn8_44", Z = "_today_kayn8_55", x = "_cellDate_kayn8_55", ee = "_outOfRange_kayn8_58", te = "_cellEvents_kayn8_69", ne = "_event_kayn8_78", ae = "_title_kayn8_7", se = "_header_kayn8_108", oe = {
135
- container: q,
138
+ }), j = "_container_6dq6w_1", G = "_titleBar_6dq6w_7", I = "_navButton_6dq6w_19", J = "_headings_6dq6w_26", K = "_weekday_6dq6w_32", Q = "_body_6dq6w_38", X = "_cell_6dq6w_44", Z = "_today_6dq6w_55", x = "_cellDate_6dq6w_55", ee = "_outOfRange_6dq6w_61", te = "_cellEvents_6dq6w_72", ne = "_event_6dq6w_81", ae = "_title_6dq6w_7", se = "_header_6dq6w_111", oe = {
139
+ container: j,
136
140
  titleBar: G,
137
141
  navButton: I,
138
142
  headings: J,
@@ -148,7 +152,7 @@ const V = ["onClick"], W = ["onClick"], j = /* @__PURE__ */ L({
148
152
  header: se
149
153
  }, le = {
150
154
  $style: oe
151
- }, ue = /* @__PURE__ */ P(j, [["__cssModules", le]]);
155
+ }, ue = /* @__PURE__ */ A(W, [["__cssModules", le]]);
152
156
  export {
153
157
  ue as default
154
158
  };
@@ -16374,7 +16374,7 @@ var Ng = H.create({
16374
16374
  },
16375
16375
  addProseMirrorPlugins() {
16376
16376
  var n;
16377
- const e = new K(this.name), t = ((n = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : n.name) || this.options.node || "paragraph", r = Object.entries(this.editor.schema.nodes).map(([, s]) => s).filter((s) => (this.options.notAfter || []).concat(t).includes(s.name));
16377
+ const e = new K(this.name), t = this.options.node || ((n = this.editor.schema.topNodeType.contentMatch.defaultType) == null ? void 0 : n.name) || "paragraph", r = Object.entries(this.editor.schema.nodes).map(([, s]) => s).filter((s) => (this.options.notAfter || []).concat(t).includes(s.name));
16378
16378
  return [
16379
16379
  new $({
16380
16380
  key: e,
@@ -1,7 +1,7 @@
1
1
  import "./UiSearch.css";
2
2
  import { createElementBlock as r, openBlock as o, createElementVNode as M, defineComponent as N, ref as I, computed as T, normalizeClass as S, createVNode as $, createCommentVNode as g, unref as V, withKeys as z, Fragment as p, createTextVNode as w, toDisplayString as v, renderList as C, createBlock as B, resolveDynamicComponent as O, withCtx as R } from "vue";
3
3
  import { RouterLink as U } from "vue-router";
4
- import { o as D } from "../index-CGEFkmQc.js";
4
+ import { o as D } from "../index-Dvnq-rTV.js";
5
5
  import F from "../UiInput/UiInput.js";
6
6
  import { M as E } from "../index-DajWja1y.js";
7
7
  import { _ as L } from "../_plugin-vue_export-helper-CHgC5LLL.js";
@@ -1,6 +1,6 @@
1
1
  import "./UiSelect.css";
2
2
  import { createElementBlock as l, openBlock as s, createElementVNode as B, defineComponent as W, ref as u, computed as b, normalizeClass as p, createCommentVNode as F, createVNode as M, unref as m, Fragment as X, renderList as Y, withKeys as f, withModifiers as D, toDisplayString as T } from "vue";
3
- import { o as Z } from "../index-CGEFkmQc.js";
3
+ import { o as Z } from "../index-Dvnq-rTV.js";
4
4
  import N from "../UiInput/UiInput.js";
5
5
  import { M as O } from "../index-DajWja1y.js";
6
6
  import { _ as x } from "../_plugin-vue_export-helper-CHgC5LLL.js";
@@ -0,0 +1,109 @@
1
+ import { watch as S, computed as j, toValue as a, unref as C } from "vue";
2
+ const I = typeof window < "u" && typeof document < "u";
3
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
4
+ const L = Object.prototype.toString, O = (t) => L.call(t) === "[object Object]", y = () => {
5
+ };
6
+ function P(t) {
7
+ return Array.isArray(t) ? t : [t];
8
+ }
9
+ function w(t, c, r) {
10
+ return S(t, c, {
11
+ ...r,
12
+ immediate: !0
13
+ });
14
+ }
15
+ const k = I ? window : void 0;
16
+ function p(t) {
17
+ var c;
18
+ const r = a(t);
19
+ return (c = r?.$el) !== null && c !== void 0 ? c : r;
20
+ }
21
+ function T(...t) {
22
+ const c = (o, i, l, d) => (o.addEventListener(i, l, d), () => o.removeEventListener(i, l, d)), r = j(() => {
23
+ const o = P(a(t[0])).filter((i) => i != null);
24
+ return o.every((i) => typeof i != "string") ? o : void 0;
25
+ });
26
+ return w(() => {
27
+ var o, i;
28
+ return [
29
+ (o = (i = r.value) === null || i === void 0 ? void 0 : i.map((l) => p(l))) !== null && o !== void 0 ? o : [k].filter((l) => l != null),
30
+ P(a(r.value ? t[1] : t[0])),
31
+ P(C(r.value ? t[2] : t[1])),
32
+ a(r.value ? t[3] : t[2])
33
+ ];
34
+ }, ([o, i, l, d], b, s) => {
35
+ if (!o?.length || !i?.length || !l?.length) return;
36
+ const v = O(d) ? { ...d } : d, g = o.flatMap((f) => i.flatMap((h) => l.map((m) => c(f, h, m, v))));
37
+ s(() => {
38
+ g.forEach((f) => f());
39
+ });
40
+ }, { flush: "post" });
41
+ }
42
+ function W(t, c, r = {}) {
43
+ const { window: o = k, ignore: i = [], capture: l = !0, detectIframe: d = !1, controls: b = !1 } = r;
44
+ if (!o) return b ? {
45
+ stop: y,
46
+ cancel: y,
47
+ trigger: y
48
+ } : y;
49
+ let s = !0;
50
+ const v = (e) => a(i).some((n) => {
51
+ if (typeof n == "string") return Array.from(o.document.querySelectorAll(n)).some((u) => u === e.target || e.composedPath().includes(u));
52
+ {
53
+ const u = p(n);
54
+ return u && (e.target === u || e.composedPath().includes(u));
55
+ }
56
+ });
57
+ function g(e) {
58
+ const n = a(e);
59
+ return n && n.$.subTree.shapeFlag === 16;
60
+ }
61
+ function f(e, n) {
62
+ const u = a(e), E = u.$.subTree && u.$.subTree.children;
63
+ return E == null || !Array.isArray(E) ? !1 : E.some(($) => $.el === n.target || n.composedPath().includes($.el));
64
+ }
65
+ const h = (e) => {
66
+ const n = p(t);
67
+ if (e.target != null && !(!(n instanceof Element) && g(t) && f(t, e)) && !(!n || n === e.target || e.composedPath().includes(n))) {
68
+ if ("detail" in e && e.detail === 0 && (s = !v(e)), !s) {
69
+ s = !0;
70
+ return;
71
+ }
72
+ c(e);
73
+ }
74
+ };
75
+ let m = !1;
76
+ const M = [
77
+ T(o, "click", (e) => {
78
+ m || (m = !0, setTimeout(() => {
79
+ m = !1;
80
+ }, 0), h(e));
81
+ }, {
82
+ passive: !0,
83
+ capture: l
84
+ }),
85
+ T(o, "pointerdown", (e) => {
86
+ const n = p(t);
87
+ s = !v(e) && !!(n && !e.composedPath().includes(n));
88
+ }, { passive: !0 }),
89
+ d && T(o, "blur", (e) => {
90
+ setTimeout(() => {
91
+ var n;
92
+ const u = p(t);
93
+ ((n = o.document.activeElement) === null || n === void 0 ? void 0 : n.tagName) === "IFRAME" && !u?.contains(o.document.activeElement) && c(e);
94
+ }, 0);
95
+ }, { passive: !0 })
96
+ ].filter(Boolean), A = () => M.forEach((e) => e());
97
+ return b ? {
98
+ stop: A,
99
+ cancel: () => {
100
+ s = !1;
101
+ },
102
+ trigger: (e) => {
103
+ s = !0, h(e), s = !1;
104
+ }
105
+ } : A;
106
+ }
107
+ export {
108
+ W as o
109
+ };
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.13",
4
+ "version": "1.3.15",
5
5
  "author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -25,28 +25,28 @@
25
25
  "test:cov": "vitest run --coverage"
26
26
  },
27
27
  "dependencies": {
28
- "@tiptap/pm": "3.11.0",
29
- "@tiptap/starter-kit": "3.11.0",
30
- "@tiptap/vue-3": "3.11.0",
28
+ "@tiptap/pm": "3.11.1",
29
+ "@tiptap/starter-kit": "3.11.1",
30
+ "@tiptap/vue-3": "3.11.1",
31
31
  "@vueform/slider": "2.1.10",
32
- "@vueuse/core": "14.0.0",
33
- "@vueuse/integrations": "14.0.0",
32
+ "@vueuse/core": "14.1.0",
33
+ "@vueuse/integrations": "14.1.0",
34
34
  "chart.js": "4.5.1",
35
35
  "mhz-helpers": "*",
36
36
  "perfect-debounce": "2.0.0",
37
- "vue": "3.5.24",
37
+ "vue": "3.5.25",
38
38
  "vue-chartjs": "5.3.3",
39
39
  "vue-router": "4.6.3"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@eslint/js": "9.39.1",
43
- "@storybook/addon-docs": "10.0.8",
44
- "@storybook/addon-themes": "10.0.8",
45
- "@storybook/vue3": "10.0.8",
46
- "@storybook/vue3-vite": "10.0.8",
43
+ "@storybook/addon-docs": "10.1.2",
44
+ "@storybook/addon-themes": "10.1.2",
45
+ "@storybook/vue3": "10.1.2",
46
+ "@storybook/vue3-vite": "10.1.2",
47
47
  "@types/node": "24.10.1",
48
48
  "@vitejs/plugin-vue": "6.0.2",
49
- "@vitest/coverage-v8": "4.0.12",
49
+ "@vitest/coverage-v8": "4.0.14",
50
50
  "@vue/test-utils": "2.4.6",
51
51
  "eslint": "9.39.1",
52
52
  "eslint-config-prettier": "10.1.8",
@@ -55,33 +55,33 @@
55
55
  "eslint-plugin-prettier": "5.5.4",
56
56
  "eslint-plugin-sonarjs": "3.0.5",
57
57
  "eslint-plugin-unicorn": "62.0.0",
58
- "eslint-plugin-vue": "10.5.1",
58
+ "eslint-plugin-vue": "10.6.2",
59
59
  "globals": "16.5.0",
60
- "happy-dom": "20.0.10",
60
+ "happy-dom": "20.0.11",
61
61
  "postcss-html": "1.8.0",
62
62
  "postcss-scss": "4.0.9",
63
- "prettier": "3.6.2",
63
+ "prettier": "3.7.3",
64
64
  "sass-embedded": "1.93.3",
65
- "storybook": "10.0.8",
66
- "stylelint": "16.25.0",
65
+ "storybook": "10.1.2",
66
+ "stylelint": "16.26.1",
67
67
  "stylelint-config-recess-order": "7.4.0",
68
68
  "stylelint-config-recommended-scss": "16.0.2",
69
69
  "stylelint-config-recommended-vue": "1.6.1",
70
70
  "stylelint-order": "7.0.0",
71
71
  "stylelint-prettier": "5.0.3",
72
72
  "typescript": "5.9.3",
73
- "typescript-eslint": "8.47.0",
73
+ "typescript-eslint": "8.48.0",
74
74
  "vite": "7.2.4",
75
75
  "vite-plugin-dts": "4.5.4",
76
76
  "vite-plugin-static-copy": "3.1.4",
77
77
  "vite-svg-loader": "5.1.0",
78
- "vitest": "4.0.12",
78
+ "vitest": "4.0.14",
79
79
  "vue-eslint-parser": "10.2.0",
80
80
  "vue-linters-config": "0.5.4",
81
- "vue-tsc": "3.1.4"
81
+ "vue-tsc": "3.1.5"
82
82
  },
83
83
  "peerDependencies": {
84
- "vue": "3.5.24",
84
+ "vue": "3.5.25",
85
85
  "vue-router": "4.6.3"
86
86
  },
87
87
  "engines": {
@@ -1,114 +0,0 @@
1
- import { watch as C, getCurrentScope as M, onScopeDispose as O, computed as j, toValue as d, unref as I } from "vue";
2
- function L(t, i) {
3
- return M() ? (O(t, i), !0) : !1;
4
- }
5
- const W = typeof window < "u" && typeof document < "u";
6
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
7
- const w = Object.prototype.toString, R = (t) => w.call(t) === "[object Object]", v = () => {
8
- };
9
- function T(t) {
10
- return Array.isArray(t) ? t : [t];
11
- }
12
- function D(t, i, c) {
13
- return C(t, i, {
14
- ...c,
15
- immediate: !0
16
- });
17
- }
18
- const k = W ? window : void 0;
19
- function m(t) {
20
- var i;
21
- const c = d(t);
22
- return (i = c?.$el) !== null && i !== void 0 ? i : c;
23
- }
24
- function A(...t) {
25
- const i = [], c = () => {
26
- i.forEach((r) => r()), i.length = 0;
27
- }, s = (r, o, l, a) => (r.addEventListener(o, l, a), () => r.removeEventListener(o, l, a)), f = j(() => {
28
- const r = T(d(t[0])).filter((o) => o != null);
29
- return r.every((o) => typeof o != "string") ? r : void 0;
30
- }), y = D(() => {
31
- var r, o;
32
- return [
33
- (r = (o = f.value) === null || o === void 0 ? void 0 : o.map((l) => m(l))) !== null && r !== void 0 ? r : [k].filter((l) => l != null),
34
- T(d(f.value ? t[1] : t[0])),
35
- T(I(f.value ? t[2] : t[1])),
36
- d(f.value ? t[3] : t[2])
37
- ];
38
- }, ([r, o, l, a]) => {
39
- if (c(), !r?.length || !o?.length || !l?.length) return;
40
- const b = R(a) ? { ...a } : a;
41
- i.push(...r.flatMap((h) => o.flatMap((p) => l.map((E) => s(h, p, E, b)))));
42
- }, { flush: "post" }), g = () => {
43
- y(), c();
44
- };
45
- return L(c), g;
46
- }
47
- function G(t, i, c = {}) {
48
- const { window: s = k, ignore: f = [], capture: y = !0, detectIframe: g = !1, controls: r = !1 } = c;
49
- if (!s) return r ? {
50
- stop: v,
51
- cancel: v,
52
- trigger: v
53
- } : v;
54
- let o = !0;
55
- const l = (e) => d(f).some((n) => {
56
- if (typeof n == "string") return Array.from(s.document.querySelectorAll(n)).some((u) => u === e.target || e.composedPath().includes(u));
57
- {
58
- const u = m(n);
59
- return u && (e.target === u || e.composedPath().includes(u));
60
- }
61
- });
62
- function a(e) {
63
- const n = d(e);
64
- return n && n.$.subTree.shapeFlag === 16;
65
- }
66
- function b(e, n) {
67
- const u = d(e), P = u.$.subTree && u.$.subTree.children;
68
- return P == null || !Array.isArray(P) ? !1 : P.some(($) => $.el === n.target || n.composedPath().includes($.el));
69
- }
70
- const h = (e) => {
71
- const n = m(t);
72
- if (e.target != null && !(!(n instanceof Element) && a(t) && b(t, e)) && !(!n || n === e.target || e.composedPath().includes(n))) {
73
- if ("detail" in e && e.detail === 0 && (o = !l(e)), !o) {
74
- o = !0;
75
- return;
76
- }
77
- i(e);
78
- }
79
- };
80
- let p = !1;
81
- const E = [
82
- A(s, "click", (e) => {
83
- p || (p = !0, setTimeout(() => {
84
- p = !1;
85
- }, 0), h(e));
86
- }, {
87
- passive: !0,
88
- capture: y
89
- }),
90
- A(s, "pointerdown", (e) => {
91
- const n = m(t);
92
- o = !l(e) && !!(n && !e.composedPath().includes(n));
93
- }, { passive: !0 }),
94
- g && A(s, "blur", (e) => {
95
- setTimeout(() => {
96
- var n;
97
- const u = m(t);
98
- ((n = s.document.activeElement) === null || n === void 0 ? void 0 : n.tagName) === "IFRAME" && !u?.contains(s.document.activeElement) && i(e);
99
- }, 0);
100
- }, { passive: !0 })
101
- ].filter(Boolean), S = () => E.forEach((e) => e());
102
- return r ? {
103
- stop: S,
104
- cancel: () => {
105
- o = !1;
106
- },
107
- trigger: (e) => {
108
- o = !0, h(e), o = !1;
109
- }
110
- } : S;
111
- }
112
- export {
113
- G as o
114
- };