mediacube-ui-v2 0.0.272 → 0.0.273

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,89 +1,5 @@
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
- });
1
+ import o from "./McToastContainer.vue2.js";
2
+ import '../../../assets/components/templates/McToast/McToastContainer.css';/* empty css */
87
3
  export {
88
- N as default
4
+ o as default
89
5
  };
@@ -0,0 +1,89 @@
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
+ };
@@ -1,16 +1,14 @@
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,
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,
9
7
  duration: 3e3
10
- }, r = w({}), a = y({
8
+ }, r = w({}), a = b({
11
9
  duration: e.duration,
12
10
  position: e.position
13
- }), i = b({
11
+ }), i = O({
14
12
  toasts: []
15
13
  });
16
14
  class c {
@@ -37,10 +35,10 @@ class c {
37
35
  closable: p,
38
36
  show_time: f,
39
37
  actions: v = [],
40
- onClose: E,
38
+ onClose: C,
41
39
  onTimeEnd: T
42
40
  }) {
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;
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;
44
42
  }
45
43
  destroy = () => {
46
44
  i.toasts = i.toasts.filter((o) => o.id !== this.id);
@@ -65,22 +63,22 @@ function j(t) {
65
63
  function k() {
66
64
  i.toasts.forEach((t) => t.destroy());
67
65
  }
68
- const A = () => {
66
+ const D = () => {
69
67
  const t = document.createElement("div");
70
68
  t.id = "toast-container", document.body.appendChild(t);
71
- const o = _(R, { reactiveProps: i });
72
- x(o, t);
69
+ const o = A(_, { reactiveProps: i });
70
+ B(o, t);
73
71
  }, d = () => {
74
- document.getElementById("toast-container") || A();
72
+ document.getElementById("toast-container") || D();
75
73
  };
76
- function G() {
77
- const t = O("dsOptions", {});
78
- return r.value = P("toast"), t.toasts && (a.value = t.toasts), {
74
+ function F() {
75
+ const t = x("dsOptions", {});
76
+ return r.value = R("toast"), t.toasts && (a.value = t.toasts), {
79
77
  show: g,
80
78
  info: j,
81
79
  hideAll: k
82
80
  };
83
81
  }
84
82
  export {
85
- G as useToast
83
+ F as useToast
86
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediacube-ui-v2",
3
- "version": "0.0.272",
3
+ "version": "0.0.273",
4
4
  "license": "MIT",
5
5
  "description": "Design system for Mediacube services",
6
6
  "sideEffects": [
@@ -132,9 +132,6 @@
132
132
  "peerDependencies": {
133
133
  "vue": "^3.5.30"
134
134
  },
135
- "overrides": {
136
- "vue": "3.5.30"
137
- },
138
135
  "devDependencies": {
139
136
  "@chromatic-com/storybook": "^1.6.1",
140
137
  "@rushstack/eslint-patch": "^1.8.0",
@@ -1,5 +0,0 @@
1
- import o from "./McToastContainer.vue.js";
2
- import '../../../assets/components/templates/McToast/McToastContainer.css';/* empty css */
3
- export {
4
- o as default
5
- };