mediacube-ui-v2 0.0.266 → 0.0.267

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,6 +1,6 @@
1
- import { defineComponent as h, defineAsyncComponent as C, computed as m, onMounted as P, onBeforeUnmount as g, openBlock as a, createElementBlock as v, normalizeStyle as S, Fragment as x, renderList as V, createBlock as d, unref as b, mergeProps as f, withCtx as i, Suspense as k, createVNode as D, resolveDynamicComponent as E } from "vue";
2
- import I from "./McDrawerSafeComponent.vue.js";
3
- const O = /* @__PURE__ */ h({
1
+ import { defineComponent as C, defineAsyncComponent as P, computed as u, onMounted as g, onBeforeUnmount as S, openBlock as a, createElementBlock as f, normalizeStyle as x, Fragment as V, renderList as b, createBlock as i, unref as k, mergeProps as _, withCtx as m, Suspense as D, createVNode as E, resolveDynamicComponent as I } from "vue";
2
+ import M from "./McDrawerSafeComponent.vue.js";
3
+ const O = /* @__PURE__ */ C({
4
4
  __name: "McDrawerContainer",
5
5
  props: {
6
6
  drawerServiceState: {
@@ -20,61 +20,61 @@ const O = /* @__PURE__ */ h({
20
20
  default: () => ({})
21
21
  }
22
22
  },
23
- setup(_) {
24
- const y = C(() => import("./McDrawer.vue.js")), r = _, n = m(() => r.reactiveProps.drawers.map((o, t) => {
25
- const e = r.reactiveProps.drawers.length - 1 - t, s = Math.min(e, r.drawersMaxInCascade - 1), c = r.reactiveProps.drawers.findLastIndex(
23
+ setup(y) {
24
+ const w = P(() => import("./McDrawer.vue.js")), l = y, o = u(() => l.reactiveProps.drawers ?? []), n = u(() => o.value.map((r, t) => {
25
+ const e = o.value.length - 1 - t, s = Math.min(e, l.drawersMaxInCascade - 1), d = o.value.findLastIndex(
26
26
  // @ts-ignore
27
27
  // eslint-disable-next-line no-prototype-builtins
28
- (p) => !p?.drawerProps.hasOwnProperty("showOverlay") || p.drawerProps?.showOverlay
28
+ (v) => !v?.drawerProps.hasOwnProperty("showOverlay") || v.drawerProps?.showOverlay
29
29
  );
30
30
  return {
31
- ...o,
31
+ ...r,
32
32
  indent_coefficient: e,
33
33
  real_coefficient: s,
34
- indent: s * r.drawersCascadeIndent,
35
- can_show_overlay: t === c
34
+ indent: s * l.drawersCascadeIndent,
35
+ can_show_overlay: t === d
36
36
  };
37
- })), w = m(() => ({
38
- zIndex: r.reactiveProps.drawers.length ? 10004 : -1,
39
- visibility: r.reactiveProps.drawers.length ? "visible" : "hidden"
40
- })), l = (o) => {
41
- o.close(), setTimeout(() => {
42
- n.value.every((t) => !t.modelValue) && r.drawerServiceState.closeServiceState();
43
- }, o?.drawerProps?.duration || 300);
44
- }, u = (o) => {
45
- if (o.code === "Escape" && n.value?.length) {
37
+ })), h = u(() => ({
38
+ zIndex: o.value.length ? 10004 : -1,
39
+ visibility: o.value.length ? "visible" : "hidden"
40
+ })), c = (r) => {
41
+ r.close(), setTimeout(() => {
42
+ n.value.every((t) => !t.modelValue) && l.drawerServiceState.closeServiceState();
43
+ }, r?.drawerProps?.duration || 300);
44
+ }, p = (r) => {
45
+ if (r.code === "Escape" && n.value?.length) {
46
46
  const t = n.value[n.value.length - 1];
47
47
  if (t.drawerProps?.disableBgClick) return;
48
48
  t.close();
49
49
  }
50
50
  };
51
- return P(() => {
52
- document.addEventListener("keyup", u);
53
- }), g(() => {
54
- document.removeEventListener("keyup", u);
55
- }), (o, t) => (a(), v("div", {
51
+ return g(() => {
52
+ document.addEventListener("keyup", p);
53
+ }), S(() => {
54
+ document.removeEventListener("keyup", p);
55
+ }), (r, t) => (a(), f("div", {
56
56
  class: "mc-drawer-container",
57
- style: S(w.value)
57
+ style: x(h.value)
58
58
  }, [
59
- (a(!0), v(x, null, V(n.value, (e, s) => (a(), d(b(y), f({
59
+ (a(!0), f(V, null, b(n.value, (e, s) => (a(), i(k(w), _({
60
60
  key: e.id,
61
61
  modelValue: e.modelValue,
62
- "onUpdate:modelValue": (c) => e.modelValue = c
62
+ "onUpdate:modelValue": (d) => e.modelValue = d
63
63
  }, { ref_for: !0 }, e.drawerProps, {
64
64
  "show-overlay": e.can_show_overlay,
65
- onClose: () => l(e),
65
+ onClose: () => c(e),
66
66
  class: ["mc-drawer-container__item", { "mc-drawer-container__item--multiple": n.value.length - 1 !== s }],
67
67
  style: e.indent ? { transform: `translateX(-${e.indent}px)` } : {}
68
68
  }), {
69
- default: i(() => [
70
- (a(), d(k, null, {
71
- default: i(() => [
72
- D(I, {
73
- onErrorCaptured: () => l(e)
69
+ default: m(() => [
70
+ (a(), i(D, null, {
71
+ default: m(() => [
72
+ E(M, {
73
+ onErrorCaptured: () => c(e)
74
74
  }, {
75
- default: i(() => [
76
- (a(), d(E(e.component), f({ ref_for: !0 }, e.componentProps, {
77
- onCloseDrawer: () => l(e)
75
+ default: m(() => [
76
+ (a(), i(I(e.component), _({ ref_for: !0 }, e.componentProps, {
77
+ onCloseDrawer: () => c(e)
78
78
  }), null, 16, ["onCloseDrawer"]))
79
79
  ]),
80
80
  _: 2
@@ -1,6 +1,6 @@
1
- import { defineComponent as v, computed as f, onMounted as y, watch as k, onBeforeUnmount as C, openBlock as r, createElementBlock as c, normalizeStyle as _, Fragment as h, renderList as P, createBlock as d, Suspense as S, withCtx as i, createVNode as B, resolveDynamicComponent as V, mergeProps as g } from "vue";
2
- import w from "./McModalSafeComponent.vue.js";
3
- const E = ["onClose"], x = /* @__PURE__ */ v({
1
+ import { defineComponent as y, computed as d, onMounted as k, watch as C, onBeforeUnmount as _, openBlock as l, createElementBlock as c, normalizeStyle as h, Fragment as S, renderList as B, createBlock as u, Suspense as V, withCtx as i, createVNode as g, resolveDynamicComponent as P, mergeProps as w } from "vue";
2
+ import E from "./McModalSafeComponent.vue.js";
3
+ const b = ["onClose"], L = /* @__PURE__ */ y({
4
4
  __name: "McModalContainer",
5
5
  props: {
6
6
  modalServiceState: {
@@ -9,54 +9,53 @@ const E = ["onClose"], x = /* @__PURE__ */ v({
9
9
  },
10
10
  reactiveProps: {
11
11
  type: Object,
12
- default: () => ({})
12
+ default: () => ({ modals: [] })
13
13
  }
14
14
  },
15
15
  setup(p) {
16
- const t = p, m = f(() => ({
17
- zIndex: t.reactiveProps.modals.length ? 99999 : -1,
18
- visibility: t.reactiveProps.modals.length ? "visible" : "hidden"
19
- })), l = (o) => {
20
- o.close(), setTimeout(() => {
21
- t.reactiveProps.modals.every((n) => !n.modelValue) && t.modalServiceState.closeServiceState();
16
+ const a = p, o = d(() => a.reactiveProps?.modals ?? []), m = d(() => ({
17
+ zIndex: o.value.length ? 99999 : -1,
18
+ visibility: o.value.length ? "visible" : "hidden"
19
+ })), r = (t) => {
20
+ t.close(), setTimeout(() => {
21
+ o.value.every((n) => !n.modelValue) && a.modalServiceState.closeServiceState();
22
22
  }, 300);
23
- }, s = (o) => {
24
- const n = t.reactiveProps?.modals;
25
- if (o.code === "Escape" && n?.length) {
26
- const e = n[n.length - 1];
27
- if (!(!e?.componentProps?.hasOwnProperty("clickBackdropToClose") || e?.componentProps?.clickBackdropToClose)) return;
28
- e.close();
23
+ }, s = (t) => {
24
+ if (t.code === "Escape" && o.value.length) {
25
+ const n = o.value[o.value.length - 1];
26
+ if (!(!n?.componentProps?.hasOwnProperty("clickBackdropToClose") || n?.componentProps?.clickBackdropToClose)) return;
27
+ n.close();
29
28
  }
30
- }, u = (o) => {
31
- typeof window > "u" || (document.body.style.overflow = o ? "hidden" : "");
29
+ }, v = (t) => {
30
+ typeof window > "u" || (document.body.style.overflow = t ? "hidden" : "");
32
31
  };
33
- return y(() => {
34
- document.addEventListener("keyup", s), k(
35
- () => t.reactiveProps.modals.length,
36
- (o) => u(!!o),
32
+ return k(() => {
33
+ document.addEventListener("keyup", s), C(
34
+ () => o.value.length,
35
+ (t) => v(!!t),
37
36
  { immediate: !0 }
38
37
  );
39
- }), C(() => {
38
+ }), _(() => {
40
39
  document.removeEventListener("keyup", s);
41
- }), (o, n) => (r(), c("div", {
40
+ }), (t, n) => (l(), c("div", {
42
41
  class: "mc-modal-container",
43
- style: _(m.value)
42
+ style: h(m.value)
44
43
  }, [
45
- (r(!0), c(h, null, P(t.reactiveProps.modals, (e) => (r(), c("div", {
44
+ (l(!0), c(S, null, B(o.value, (e) => (l(), c("div", {
46
45
  key: e.id,
47
- onClose: () => l(e)
46
+ onClose: () => r(e)
48
47
  }, [
49
- (r(), d(S, null, {
48
+ (l(), u(V, null, {
50
49
  default: i(() => [
51
- B(w, {
52
- onErrorCaptured: () => l(e)
50
+ g(E, {
51
+ onErrorCaptured: () => r(e)
53
52
  }, {
54
53
  default: i(() => [
55
- (r(), d(V(e.component), g({
54
+ (l(), u(P(e.component), w({
56
55
  modelValue: e.modelValue,
57
- "onUpdate:modelValue": (a) => e.modelValue = a
56
+ "onUpdate:modelValue": (f) => e.modelValue = f
58
57
  }, { ref_for: !0 }, e.componentProps, {
59
- onClosed: () => l(e)
58
+ onClosed: () => r(e)
60
59
  }), null, 16, ["modelValue", "onUpdate:modelValue", "onClosed"]))
61
60
  ]),
62
61
  _: 2
@@ -64,10 +63,10 @@ const E = ["onClose"], x = /* @__PURE__ */ v({
64
63
  ]),
65
64
  _: 2
66
65
  }, 1024))
67
- ], 40, E))), 128))
66
+ ], 40, b))), 128))
68
67
  ], 4));
69
68
  }
70
69
  });
71
70
  export {
72
- x as default
71
+ L as default
73
72
  };
@@ -9,7 +9,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
9
9
  type: () => {
10
10
  modals: IModalState[];
11
11
  };
12
- default: () => {};
12
+ default: () => {
13
+ modals: IModalState[];
14
+ };
13
15
  };
14
16
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
17
  modalServiceState: {
@@ -20,7 +22,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
20
22
  type: () => {
21
23
  modals: IModalState[];
22
24
  };
23
- default: () => {};
25
+ default: () => {
26
+ modals: IModalState[];
27
+ };
24
28
  };
25
29
  }>> & Readonly<{}>, {
26
30
  reactiveProps: {
@@ -7,7 +7,9 @@ declare const McModalContainer: import('vue').DefineComponent<import('vue').Extr
7
7
  type: () => {
8
8
  modals: import('../../../types/IModal').IModalState[];
9
9
  };
10
- default: () => {};
10
+ default: () => {
11
+ modals: import('../../../types/IModal').IModalState[];
12
+ };
11
13
  };
12
14
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
13
15
  modalServiceState: {
@@ -18,7 +20,9 @@ declare const McModalContainer: import('vue').DefineComponent<import('vue').Extr
18
20
  type: () => {
19
21
  modals: import('../../../types/IModal').IModalState[];
20
22
  };
21
- default: () => {};
23
+ default: () => {
24
+ modals: import('../../../types/IModal').IModalState[];
25
+ };
22
26
  };
23
27
  }>> & Readonly<{}>, {
24
28
  reactiveProps: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediacube-ui-v2",
3
- "version": "0.0.266",
3
+ "version": "0.0.267",
4
4
  "license": "MIT",
5
5
  "description": "Design system for Mediacube services",
6
6
  "sideEffects": [