mediacube-ui-v2 0.0.263 → 0.0.266

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,5 +1,6 @@
1
- import { defineComponent as S, defineAsyncComponent as m, computed as v, onMounted as g, onBeforeUnmount as x, openBlock as a, createElementBlock as f, normalizeStyle as D, Fragment as V, renderList as b, createBlock as d, unref as y, mergeProps as _, withCtx as i, Suspense as k, createVNode as M, resolveDynamicComponent as E } from "vue";
2
- const B = /* @__PURE__ */ S({
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({
3
4
  __name: "McDrawerContainer",
4
5
  props: {
5
6
  drawerServiceState: {
@@ -19,8 +20,8 @@ const B = /* @__PURE__ */ S({
19
20
  default: () => ({})
20
21
  }
21
22
  },
22
- setup(w) {
23
- const h = m(() => import("./McDrawerSafeComponent.vue.js")), C = m(() => import("./McDrawer.vue.js")), r = w, n = v(() => r.reactiveProps.drawers.map((o, t) => {
23
+ setup(_) {
24
+ const y = C(() => import("./McDrawer.vue.js")), r = _, n = m(() => r.reactiveProps.drawers.map((o, t) => {
24
25
  const e = r.reactiveProps.drawers.length - 1 - t, s = Math.min(e, r.drawersMaxInCascade - 1), c = r.reactiveProps.drawers.findLastIndex(
25
26
  // @ts-ignore
26
27
  // eslint-disable-next-line no-prototype-builtins
@@ -33,7 +34,7 @@ const B = /* @__PURE__ */ S({
33
34
  indent: s * r.drawersCascadeIndent,
34
35
  can_show_overlay: t === c
35
36
  };
36
- })), P = v(() => ({
37
+ })), w = m(() => ({
37
38
  zIndex: r.reactiveProps.drawers.length ? 10004 : -1,
38
39
  visibility: r.reactiveProps.drawers.length ? "visible" : "hidden"
39
40
  })), l = (o) => {
@@ -47,15 +48,15 @@ const B = /* @__PURE__ */ S({
47
48
  t.close();
48
49
  }
49
50
  };
50
- return g(() => {
51
+ return P(() => {
51
52
  document.addEventListener("keyup", u);
52
- }), x(() => {
53
+ }), g(() => {
53
54
  document.removeEventListener("keyup", u);
54
- }), (o, t) => (a(), f("div", {
55
+ }), (o, t) => (a(), v("div", {
55
56
  class: "mc-drawer-container",
56
- style: D(P.value)
57
+ style: S(w.value)
57
58
  }, [
58
- (a(!0), f(V, null, b(n.value, (e, s) => (a(), d(y(C), _({
59
+ (a(!0), v(x, null, V(n.value, (e, s) => (a(), d(b(y), f({
59
60
  key: e.id,
60
61
  modelValue: e.modelValue,
61
62
  "onUpdate:modelValue": (c) => e.modelValue = c
@@ -68,11 +69,11 @@ const B = /* @__PURE__ */ S({
68
69
  default: i(() => [
69
70
  (a(), d(k, null, {
70
71
  default: i(() => [
71
- M(y(h), {
72
+ D(I, {
72
73
  onErrorCaptured: () => l(e)
73
74
  }, {
74
75
  default: i(() => [
75
- (a(), d(E(e.component), _({ ref_for: !0 }, e.componentProps, {
76
+ (a(), d(E(e.component), f({ ref_for: !0 }, e.componentProps, {
76
77
  onCloseDrawer: () => l(e)
77
78
  }), null, 16, ["onCloseDrawer"]))
78
79
  ]),
@@ -88,5 +89,5 @@ const B = /* @__PURE__ */ S({
88
89
  }
89
90
  });
90
91
  export {
91
- B as default
92
+ O as default
92
93
  };
@@ -1,4 +1,12 @@
1
- import f from "./McDrawerSafeComponent.vue2.js";
1
+ import { defineComponent as o, onErrorCaptured as n, renderSlot as a } from "vue";
2
+ const m = /* @__PURE__ */ o({
3
+ __name: "McDrawerSafeComponent",
4
+ emits: ["error-captured"],
5
+ setup(s, { emit: e }) {
6
+ const t = e;
7
+ return n((r) => (console.error(r), t("error-captured"), !1)), (r, p) => a(r.$slots, "default");
8
+ }
9
+ });
2
10
  export {
3
- f as default
11
+ m as default
4
12
  };
@@ -1,12 +1,4 @@
1
- import { defineComponent as o, onErrorCaptured as n, renderSlot as a } from "vue";
2
- const m = /* @__PURE__ */ o({
3
- __name: "McDrawerSafeComponent",
4
- emits: ["error-captured"],
5
- setup(s, { emit: e }) {
6
- const t = e;
7
- return n((r) => (console.error(r), t("error-captured"), !1)), (r, p) => a(r.$slots, "default");
8
- }
9
- });
1
+ import f from "./McDrawerSafeComponent.vue.js";
10
2
  export {
11
- m as default
3
+ f as default
12
4
  };
@@ -1,5 +1,6 @@
1
- import { defineComponent as v, defineAsyncComponent as y, computed as C, onMounted as k, watch as h, onBeforeUnmount as P, openBlock as r, createElementBlock as c, normalizeStyle as _, Fragment as S, renderList as B, createBlock as d, Suspense as V, withCtx as i, createVNode as g, unref as w, resolveDynamicComponent as E, mergeProps as b } from "vue";
2
- const M = ["onClose"], x = /* @__PURE__ */ v({
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({
3
4
  __name: "McModalContainer",
4
5
  props: {
5
6
  modalServiceState: {
@@ -12,7 +13,7 @@ const M = ["onClose"], x = /* @__PURE__ */ v({
12
13
  }
13
14
  },
14
15
  setup(p) {
15
- const m = y(() => import("../McDrawer/McDrawerSafeComponent.vue.js")), t = p, u = C(() => ({
16
+ const t = p, m = f(() => ({
16
17
  zIndex: t.reactiveProps.modals.length ? 99999 : -1,
17
18
  visibility: t.reactiveProps.modals.length ? "visible" : "hidden"
18
19
  })), l = (o) => {
@@ -26,32 +27,32 @@ const M = ["onClose"], x = /* @__PURE__ */ v({
26
27
  if (!(!e?.componentProps?.hasOwnProperty("clickBackdropToClose") || e?.componentProps?.clickBackdropToClose)) return;
27
28
  e.close();
28
29
  }
29
- }, f = (o) => {
30
+ }, u = (o) => {
30
31
  typeof window > "u" || (document.body.style.overflow = o ? "hidden" : "");
31
32
  };
32
- return k(() => {
33
- document.addEventListener("keyup", s), h(
33
+ return y(() => {
34
+ document.addEventListener("keyup", s), k(
34
35
  () => t.reactiveProps.modals.length,
35
- (o) => f(!!o),
36
+ (o) => u(!!o),
36
37
  { immediate: !0 }
37
38
  );
38
- }), P(() => {
39
+ }), C(() => {
39
40
  document.removeEventListener("keyup", s);
40
41
  }), (o, n) => (r(), c("div", {
41
42
  class: "mc-modal-container",
42
- style: _(u.value)
43
+ style: _(m.value)
43
44
  }, [
44
- (r(!0), c(S, null, B(t.reactiveProps.modals, (e) => (r(), c("div", {
45
+ (r(!0), c(h, null, P(t.reactiveProps.modals, (e) => (r(), c("div", {
45
46
  key: e.id,
46
47
  onClose: () => l(e)
47
48
  }, [
48
- (r(), d(V, null, {
49
+ (r(), d(S, null, {
49
50
  default: i(() => [
50
- g(w(m), {
51
+ B(w, {
51
52
  onErrorCaptured: () => l(e)
52
53
  }, {
53
54
  default: i(() => [
54
- (r(), d(E(e.component), b({
55
+ (r(), d(V(e.component), g({
55
56
  modelValue: e.modelValue,
56
57
  "onUpdate:modelValue": (a) => e.modelValue = a
57
58
  }, { ref_for: !0 }, e.componentProps, {
@@ -63,7 +64,7 @@ const M = ["onClose"], x = /* @__PURE__ */ v({
63
64
  ]),
64
65
  _: 2
65
66
  }, 1024))
66
- ], 40, M))), 128))
67
+ ], 40, E))), 128))
67
68
  ], 4));
68
69
  }
69
70
  });
@@ -0,0 +1,12 @@
1
+ import { defineComponent as t, onErrorCaptured as n, renderSlot as a } from "vue";
2
+ const m = /* @__PURE__ */ t({
3
+ __name: "McModalSafeComponent",
4
+ emits: ["error-captured"],
5
+ setup(s, { emit: r }) {
6
+ const o = r;
7
+ return n((e) => (console.error(e), o("error-captured"), !1)), (e, p) => a(e.$slots, "default");
8
+ }
9
+ });
10
+ export {
11
+ m as default
12
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./McModalSafeComponent.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,5 +1,89 @@
1
- import o from "./McToastContainer.vue2.js";
2
- import '../../../assets/components/templates/McToast/McToastContainer.css';/* empty css */
1
+ import { defineComponent as P, defineAsyncComponent as B, computed as c, openBlock as t, createElementBlock as n, Fragment as i, renderList as a, createBlock as u, unref as _, mergeProps as d, createCommentVNode as m } from "vue";
2
+ import { ToastPositions as p } from "../../../enums/Toast2.js";
3
+ const T = { class: "mc-toasts-container" }, $ = {
4
+ key: 0,
5
+ class: "mc-toasts-container__top mc-toasts-container__top--left"
6
+ }, L = {
7
+ key: 1,
8
+ class: "mc-toasts-container__top mc-toasts-container__top--center"
9
+ }, R = {
10
+ key: 2,
11
+ class: "mc-toasts-container__top mc-toasts-container__top--right"
12
+ }, x = {
13
+ key: 3,
14
+ class: "mc-toasts-container__bottom mc-toasts-container__bottom--left"
15
+ }, M = {
16
+ key: 4,
17
+ class: "mc-toasts-container__bottom mc-toasts-container__bottom--center"
18
+ }, j = {
19
+ key: 5,
20
+ class: "mc-toasts-container__bottom mc-toasts-container__bottom--right"
21
+ }, N = /* @__PURE__ */ P({
22
+ __name: "McToastContainer",
23
+ props: {
24
+ reactiveProps: {
25
+ type: Object,
26
+ default: () => ({
27
+ toasts: []
28
+ })
29
+ }
30
+ },
31
+ setup(b) {
32
+ const r = B(() => import("./McToast.vue.js")), s = b, f = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.TopLeft).reverse()), C = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.TopCenter).reverse()), h = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.TopRight).reverse()), k = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.BottomLeft)), y = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.BottomCenter)), g = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.BottomRight)), l = (o) => {
33
+ o.close();
34
+ };
35
+ return (o, A) => (t(), n("div", T, [
36
+ f.value.length ? (t(), n("div", $, [
37
+ (t(!0), n(i, null, a(f.value, (e) => (t(), u(_(r), d({
38
+ key: e.id
39
+ }, { ref_for: !0 }, e, {
40
+ toast: e,
41
+ onClosed: (v) => l(e)
42
+ }), null, 16, ["toast", "onClosed"]))), 128))
43
+ ])) : m("", !0),
44
+ C.value.length ? (t(), n("div", L, [
45
+ (t(!0), n(i, null, a(C.value, (e) => (t(), u(_(r), d({
46
+ key: e.id
47
+ }, { ref_for: !0 }, e, {
48
+ toast: e,
49
+ onClosed: (v) => l(e)
50
+ }), null, 16, ["toast", "onClosed"]))), 128))
51
+ ])) : m("", !0),
52
+ h.value.length ? (t(), n("div", R, [
53
+ (t(!0), n(i, null, a(h.value, (e) => (t(), u(_(r), d({
54
+ key: e.id
55
+ }, { ref_for: !0 }, e, {
56
+ toast: e,
57
+ onClosed: (v) => l(e)
58
+ }), null, 16, ["toast", "onClosed"]))), 128))
59
+ ])) : m("", !0),
60
+ k.value.length ? (t(), n("div", x, [
61
+ (t(!0), n(i, null, a(k.value, (e) => (t(), u(_(r), d({
62
+ key: e.id
63
+ }, { ref_for: !0 }, e, {
64
+ toast: e,
65
+ onClosed: (v) => l(e)
66
+ }), null, 16, ["toast", "onClosed"]))), 128))
67
+ ])) : m("", !0),
68
+ y.value.length ? (t(), n("div", M, [
69
+ (t(!0), n(i, null, a(y.value, (e) => (t(), u(_(r), d({
70
+ key: e.id
71
+ }, { ref_for: !0 }, e, {
72
+ toast: e,
73
+ onClosed: (v) => l(e)
74
+ }), null, 16, ["toast", "onClosed"]))), 128))
75
+ ])) : m("", !0),
76
+ g.value.length ? (t(), n("div", j, [
77
+ (t(!0), n(i, null, a(g.value, (e) => (t(), u(_(r), d({
78
+ key: e.id
79
+ }, { ref_for: !0 }, e, {
80
+ toast: e,
81
+ onClosed: (v) => l(e)
82
+ }), null, 16, ["toast", "onClosed"]))), 128))
83
+ ])) : m("", !0)
84
+ ]));
85
+ }
86
+ });
3
87
  export {
4
- o as default
88
+ N as default
5
89
  };
@@ -0,0 +1,5 @@
1
+ import o from "./McToastContainer.vue.js";
2
+ import '../../../assets/components/templates/McToast/McToastContainer.css';/* empty css */
3
+ export {
4
+ o as default
5
+ };
@@ -1,18 +1,20 @@
1
- import { defineAsyncComponent as u, reactive as f, shallowRef as v, inject as h, markRaw as S, h as O, render as g } from "vue";
2
- import { getStoredAppContext as p } from "../storedAppContext.js";
1
+ import { reactive as u, shallowRef as M, inject as v, markRaw as h, defineAsyncComponent as S, h as O, render as g } from "vue";
2
+ import { getStoredAppContext as f } from "../storedAppContext.js";
3
3
  import { useHelper as y } from "./useHelper2.js";
4
- const E = u(() => import("../components/templates/McModal/McModalContainer.vue.js")), i = y(), d = {}, a = f({
4
+ import E from "../components/templates/McModal/McModalContainer.vue2.js";
5
+ import '../assets/components/templates/McModal/McModalContainer.css';/* empty css */
6
+ const i = y(), d = {}, a = u({
5
7
  isOpen: !1,
6
8
  activeModal: null,
7
9
  closeServiceState: () => {
8
10
  a.isOpen = !1, e.modals = [];
9
11
  }
10
- }), C = v({}), e = f({ modals: [] }), w = { name: "McModalAsyncError", render: () => null }, A = (o) => {
12
+ }), p = M({}), e = u({ modals: [] }), w = { name: "McModalAsyncError", render: () => null }, A = (o) => {
11
13
  if (!o) return o;
12
14
  const t = o.toString();
13
15
  if (d[t]) return d[t];
14
16
  let l = o;
15
- return typeof o == "function" && (l = u({
17
+ return typeof o == "function" && (l = S({
16
18
  loader: () => {
17
19
  const n = o();
18
20
  return n != null && typeof n.then == "function" ? n : Promise.resolve(n);
@@ -32,11 +34,11 @@ const E = u(() => import("../components/templates/McModal/McModalContainer.vue.j
32
34
  modalServiceState: a,
33
35
  reactiveProps: e
34
36
  });
35
- t.appContext = p(), g(t, o);
37
+ t.appContext = f(), g(t, o);
36
38
  }, R = () => {
37
- p() && x();
38
- }, L = (o, t = {}) => {
39
- const l = C.value[o];
39
+ f() && x();
40
+ }, _ = (o, t = {}) => {
41
+ const l = p.value[o];
40
42
  if (!l)
41
43
  return console.warn(`Modal ${o} not registered`);
42
44
  R();
@@ -45,8 +47,8 @@ const E = u(() => import("../components/templates/McModal/McModalContainer.vue.j
45
47
  n.modelValue = !0, a.activeModal = n;
46
48
  return;
47
49
  }
48
- const M = S(A(l)), c = o, m = {
49
- component: M,
50
+ const C = h(A(l)), c = o, m = {
51
+ component: C,
50
52
  componentName: o,
51
53
  componentProps: t,
52
54
  modelValue: !0,
@@ -59,19 +61,19 @@ const E = u(() => import("../components/templates/McModal/McModalContainer.vue.j
59
61
  }
60
62
  };
61
63
  e.modals.push(m), a.isOpen = !0, a.activeModal = m;
62
- }, V = (o) => {
64
+ }, L = (o) => {
63
65
  (i.findLastSafe(e.modals, (l) => l.componentName === o) || e.modals[e.modals.length - 1])?.close();
64
- }, P = () => {
66
+ }, V = () => {
65
67
  e.modals.forEach((o) => o.close());
66
68
  };
67
- function j() {
68
- const o = h("dsOptions", {});
69
- return o.modalComponents && (C.value = o.modalComponents), {
70
- showModal: L,
71
- closeModal: V,
72
- closeAllModals: P
69
+ function z() {
70
+ const o = v("dsOptions", {});
71
+ return o.modalComponents && (p.value = o.modalComponents), {
72
+ showModal: _,
73
+ closeModal: L,
74
+ closeAllModals: V
73
75
  };
74
76
  }
75
77
  export {
76
- j as useModal
78
+ z as useModal
77
79
  };
@@ -1,14 +1,16 @@
1
- import { useRandomNumber as E } from "./useRandomNumber2.js";
2
- import { defineAsyncComponent as y, ref as w, shallowRef as b, reactive as O, inject as x, h as A, render as B } from "vue";
3
- import { ToastPositions as P } from "../enums/Toast2.js";
4
- import { useTheme as R } from "./useTheme2.js";
5
- const _ = y(() => import("../components/templates/McToast/McToastContainer.vue.js")), e = {
6
- position: P.BottomCenter,
1
+ import { useRandomNumber as C } from "./useRandomNumber2.js";
2
+ import { ref as w, shallowRef as y, reactive as b, inject as O, h as _, render as x } from "vue";
3
+ import { ToastPositions as B } from "../enums/Toast2.js";
4
+ import { useTheme as P } from "./useTheme2.js";
5
+ import R from "../components/templates/McToast/McToastContainer.vue.js";
6
+ import '../assets/components/templates/McToast/McToastContainer.css';/* empty css */
7
+ const e = {
8
+ position: B.BottomCenter,
7
9
  duration: 3e3
8
- }, r = w({}), a = b({
10
+ }, r = w({}), a = y({
9
11
  duration: e.duration,
10
12
  position: e.position
11
- }), i = O({
13
+ }), i = b({
12
14
  toasts: []
13
15
  });
14
16
  class c {
@@ -35,10 +37,10 @@ class c {
35
37
  closable: p,
36
38
  show_time: f,
37
39
  actions: v = [],
38
- onClose: C,
40
+ onClose: E,
39
41
  onTimeEnd: T
40
42
  }) {
41
- this.id = o || E().timestamp(5), this.duration = s || a.value.duration || e.duration, this.position = n || a.value.position || e.position, this.variation = m, this.icon = u, this.title = l, this.description = h, this.closable = p || !1, this.show_time = f || !1, this.actions = v, this.onClose = C, this.onTimeEnd = T;
43
+ this.id = o || C().timestamp(5), this.duration = s || a.value.duration || e.duration, this.position = n || a.value.position || e.position, this.variation = m, this.icon = u, this.title = l, this.description = h, this.closable = p || !1, this.show_time = f || !1, this.actions = v, this.onClose = E, this.onTimeEnd = T;
42
44
  }
43
45
  destroy = () => {
44
46
  i.toasts = i.toasts.filter((o) => o.id !== this.id);
@@ -63,22 +65,22 @@ function j(t) {
63
65
  function k() {
64
66
  i.toasts.forEach((t) => t.destroy());
65
67
  }
66
- const D = () => {
68
+ const A = () => {
67
69
  const t = document.createElement("div");
68
70
  t.id = "toast-container", document.body.appendChild(t);
69
- const o = A(_, { reactiveProps: i });
70
- B(o, t);
71
+ const o = _(R, { reactiveProps: i });
72
+ x(o, t);
71
73
  }, d = () => {
72
- document.getElementById("toast-container") || D();
74
+ document.getElementById("toast-container") || A();
73
75
  };
74
- function F() {
75
- const t = x("dsOptions", {});
76
- return r.value = R("toast"), t.toasts && (a.value = t.toasts), {
76
+ function G() {
77
+ const t = O("dsOptions", {});
78
+ return r.value = P("toast"), t.toasts && (a.value = t.toasts), {
77
79
  show: g,
78
80
  info: j,
79
81
  hideAll: k
80
82
  };
81
83
  }
82
84
  export {
83
- F as useToast
85
+ G as useToast
84
86
  };
@@ -0,0 +1,13 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
+ "error-captured": (...args: any[]) => void;
3
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
+ "onError-captured"?: ((...args: any[]) => any) | undefined;
5
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
6
+ default?(_: {}): any;
7
+ }>;
8
+ export default _default;
9
+ type __VLS_WithTemplateSlots<T, S> = T & {
10
+ new (): {
11
+ $slots: S;
12
+ };
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediacube-ui-v2",
3
- "version": "0.0.263",
3
+ "version": "0.0.266",
4
4
  "license": "MIT",
5
5
  "description": "Design system for Mediacube services",
6
6
  "sideEffects": [
@@ -87,6 +87,7 @@
87
87
  "import": "./dist/utils/*.js",
88
88
  "default": "./dist/utils/*.js"
89
89
  },
90
+ "./consts/*": "./dist/consts/*.js",
90
91
  "./iconsSprite.svg": "./dist/iconsSprite.svg",
91
92
  "./iconsSpriteFlags.svg": "./dist/iconsSpriteFlags.svg",
92
93
  "./iconsSpriteGrads.svg": "./dist/iconsSpriteGrads.svg",
@@ -1,89 +0,0 @@
1
- import { defineComponent as P, defineAsyncComponent as B, computed as c, openBlock as t, createElementBlock as n, Fragment as i, renderList as a, createBlock as u, unref as _, mergeProps as d, createCommentVNode as m } from "vue";
2
- import { ToastPositions as p } from "../../../enums/Toast2.js";
3
- const T = { class: "mc-toasts-container" }, $ = {
4
- key: 0,
5
- class: "mc-toasts-container__top mc-toasts-container__top--left"
6
- }, L = {
7
- key: 1,
8
- class: "mc-toasts-container__top mc-toasts-container__top--center"
9
- }, R = {
10
- key: 2,
11
- class: "mc-toasts-container__top mc-toasts-container__top--right"
12
- }, x = {
13
- key: 3,
14
- class: "mc-toasts-container__bottom mc-toasts-container__bottom--left"
15
- }, M = {
16
- key: 4,
17
- class: "mc-toasts-container__bottom mc-toasts-container__bottom--center"
18
- }, j = {
19
- key: 5,
20
- class: "mc-toasts-container__bottom mc-toasts-container__bottom--right"
21
- }, N = /* @__PURE__ */ P({
22
- __name: "McToastContainer",
23
- props: {
24
- reactiveProps: {
25
- type: Object,
26
- default: () => ({
27
- toasts: []
28
- })
29
- }
30
- },
31
- setup(b) {
32
- const r = B(() => import("./McToast.vue.js")), s = b, f = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.TopLeft).reverse()), C = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.TopCenter).reverse()), h = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.TopRight).reverse()), k = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.BottomLeft)), y = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.BottomCenter)), g = c(() => s.reactiveProps.toasts.filter((o) => o.position === p.BottomRight)), l = (o) => {
33
- o.close();
34
- };
35
- return (o, A) => (t(), n("div", T, [
36
- f.value.length ? (t(), n("div", $, [
37
- (t(!0), n(i, null, a(f.value, (e) => (t(), u(_(r), d({
38
- key: e.id
39
- }, { ref_for: !0 }, e, {
40
- toast: e,
41
- onClosed: (v) => l(e)
42
- }), null, 16, ["toast", "onClosed"]))), 128))
43
- ])) : m("", !0),
44
- C.value.length ? (t(), n("div", L, [
45
- (t(!0), n(i, null, a(C.value, (e) => (t(), u(_(r), d({
46
- key: e.id
47
- }, { ref_for: !0 }, e, {
48
- toast: e,
49
- onClosed: (v) => l(e)
50
- }), null, 16, ["toast", "onClosed"]))), 128))
51
- ])) : m("", !0),
52
- h.value.length ? (t(), n("div", R, [
53
- (t(!0), n(i, null, a(h.value, (e) => (t(), u(_(r), d({
54
- key: e.id
55
- }, { ref_for: !0 }, e, {
56
- toast: e,
57
- onClosed: (v) => l(e)
58
- }), null, 16, ["toast", "onClosed"]))), 128))
59
- ])) : m("", !0),
60
- k.value.length ? (t(), n("div", x, [
61
- (t(!0), n(i, null, a(k.value, (e) => (t(), u(_(r), d({
62
- key: e.id
63
- }, { ref_for: !0 }, e, {
64
- toast: e,
65
- onClosed: (v) => l(e)
66
- }), null, 16, ["toast", "onClosed"]))), 128))
67
- ])) : m("", !0),
68
- y.value.length ? (t(), n("div", M, [
69
- (t(!0), n(i, null, a(y.value, (e) => (t(), u(_(r), d({
70
- key: e.id
71
- }, { ref_for: !0 }, e, {
72
- toast: e,
73
- onClosed: (v) => l(e)
74
- }), null, 16, ["toast", "onClosed"]))), 128))
75
- ])) : m("", !0),
76
- g.value.length ? (t(), n("div", j, [
77
- (t(!0), n(i, null, a(g.value, (e) => (t(), u(_(r), d({
78
- key: e.id
79
- }, { ref_for: !0 }, e, {
80
- toast: e,
81
- onClosed: (v) => l(e)
82
- }), null, 16, ["toast", "onClosed"]))), 128))
83
- ])) : m("", !0)
84
- ]));
85
- }
86
- });
87
- export {
88
- N as default
89
- };