mediacube-ui-v2 0.0.322 → 0.0.324

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
1
  {
2
2
  "catalogSchemaVersion": 2,
3
- "libraryVersion": "0.0.322",
3
+ "libraryVersion": "0.0.324",
4
4
  "packageName": "mediacube-ui-v2",
5
5
  "pathHash": "9b6f3b8016b22ac7",
6
6
  "componentCount": 76,
@@ -1,5 +1,5 @@
1
- import { defineComponent as k, useId as x, ref as o, computed as H, onMounted as C, nextTick as S, watch as v, openBlock as B, createBlock as $, resolveDynamicComponent as M, unref as b, normalizeClass as D, withCtx as T, renderSlot as z } from "vue";
2
- const E = /* @__PURE__ */ k({
1
+ import { defineComponent as w, useId as x, ref as o, computed as H, onMounted as C, nextTick as S, watch as v, openBlock as B, createBlock as $, resolveDynamicComponent as M, unref as b, normalizeClass as D, withCtx as T, renderSlot as z } from "vue";
2
+ const E = /* @__PURE__ */ w({
3
3
  __name: "McSlideUpDown",
4
4
  props: {
5
5
  /*
@@ -38,7 +38,7 @@ const E = /* @__PURE__ */ k({
38
38
  },
39
39
  emits: ["slide-open-start", "slide-close-start", "slide-open-end", "slide-close-end"],
40
40
  setup(f, { emit: p }) {
41
- const i = p, a = f, h = x(), t = o(a.active), u = o(!1), r = o(!1), n = o(null), s = o(), m = H(() => ({
41
+ const i = p, s = f, h = x(), t = o(s.active), u = o(!1), r = o(!1), n = o(null), a = o(), m = H(() => ({
42
42
  "mc-slide-up-down": !0,
43
43
  "mc-slide-up-down--server-open": !u.value && t.value,
44
44
  "mc-slide-up-down--server-close": !u.value && !t.value
@@ -46,11 +46,11 @@ const E = /* @__PURE__ */ k({
46
46
  const l = getComputedStyle(e).height;
47
47
  return l === "auto" || l === "" ? e.offsetHeight : parseFloat(l) || 0;
48
48
  }, g = () => {
49
- if (!s.value) return;
50
- const e = s.value;
49
+ if (!a.value) return;
50
+ const e = a.value;
51
51
  t.value ? e.style.height = "auto" : e.style.height = "0";
52
52
  }, _ = (e) => {
53
- const l = s.value;
53
+ const l = a.value;
54
54
  if (!l) {
55
55
  t.value = e;
56
56
  return;
@@ -61,13 +61,14 @@ const E = /* @__PURE__ */ k({
61
61
  t.value = e, r.value = !1, l.style.height = e ? "auto" : "0";
62
62
  return;
63
63
  }
64
- r.value = !0, i(e ? "slide-open-start" : "slide-close-start", t.value), n.value = l.animate(
65
- [{ height: `${d}px` }, { height: `${c}px` }],
66
- { duration: a.duration, easing: a.type, fill: "forwards" }
67
- ), n.value.onfinish = () => {
68
- if (t.value = a.active, r.value = !1, s.value) {
69
- const w = s.value;
70
- w.style.height = t.value ? "auto" : "0";
64
+ r.value = !0, i(e ? "slide-open-start" : "slide-close-start", t.value), n.value = l.animate([{ height: `${d}px` }, { height: `${c}px` }], {
65
+ duration: s.duration,
66
+ easing: s.type,
67
+ fill: "none"
68
+ }), n.value.onfinish = () => {
69
+ if (t.value = e, r.value = !1, a.value) {
70
+ const k = a.value;
71
+ k.style.height = t.value ? "auto" : "0";
71
72
  }
72
73
  i(e ? "slide-open-end" : "slide-close-end", t.value);
73
74
  };
@@ -77,18 +78,18 @@ const E = /* @__PURE__ */ k({
77
78
  u.value = !0;
78
79
  });
79
80
  }), v(
80
- () => a.active,
81
+ () => s.active,
81
82
  () => {
82
- _(a.active);
83
+ _(s.active);
83
84
  }
84
85
  ), v(
85
- () => s.value,
86
+ () => a.value,
86
87
  () => {
87
88
  g();
88
89
  }
89
- ), (e, l) => (B(), $(M(a.tag), {
90
+ ), (e, l) => (B(), $(M(s.tag), {
90
91
  ref_key: "container",
91
- ref: s,
92
+ ref: a,
92
93
  class: D(m.value),
93
94
  key: `mc-slide-up-down-key-${b(h)}`
94
95
  }, {
@@ -1,4 +1,4 @@
1
- import { defineComponent as x, defineAsyncComponent as a, computed as p, onMounted as V, openBlock as s, createElementBlock as k, unref as e, normalizeStyle as $, normalizeClass as A, createVNode as r, createSlots as C, withCtx as o, createTextVNode as l, toDisplayString as d, Fragment as P, renderList as E, createBlock as S, withModifiers as z, createCommentVNode as L } from "vue";
1
+ import { defineComponent as x, defineAsyncComponent as a, computed as c, onMounted as V, openBlock as s, createElementBlock as k, unref as e, normalizeStyle as $, normalizeClass as A, createVNode as i, createSlots as C, withCtx as o, createTextVNode as p, toDisplayString as d, Fragment as P, renderList as E, createBlock as S, withModifiers as h, createCommentVNode as L } from "vue";
2
2
  import { ToastPositions as j } from "../../../enums/Toast2.js";
3
3
  import { useTimer as D } from "../../../composables/useTimer2.js";
4
4
  import { ButtonSize as F } from "../../../enums/ui/Button2.js";
@@ -68,32 +68,32 @@ const R = /* @__PURE__ */ x({
68
68
  }
69
69
  },
70
70
  emits: ["closed"],
71
- setup(B, { emit: M }) {
72
- const b = a(() => import("../../patterns/McPreview/McPreview.vue.js")), m = a(() => import("../../elements/McSvgIcon/McSvgIcon.vue.js")), f = a(() => import("../../elements/McTitle/McTitle.vue.js")), y = a(() => import("../../elements/McButton/McButton.vue.js")), h = M, t = B, v = W("toast"), g = p(() => t.variation || v.component.variation), u = D(t.toast.timeEnd, t.duration), w = p(() => ({
71
+ setup(z, { emit: B }) {
72
+ const M = a(() => import("../../patterns/McPreview/McPreview.vue.js")), l = a(() => import("../../elements/McSvgIcon/McSvgIcon.vue.js")), f = a(() => import("../../elements/McTitle/McTitle.vue.js")), y = a(() => import("../../elements/McButton/McButton.vue.js")), b = B, t = z, v = W("toast"), g = c(() => t.variation || v.component.variation), m = D(t.toast.timeEnd, t.duration), _ = c(() => ({
73
73
  "mc-toast": !0,
74
74
  [`mc-toast--variation-${g.value}`]: !0
75
- })), N = p(() => ({
75
+ })), w = c(() => ({
76
76
  "--mc-toast-background-color": v.colors[g.value]
77
- })), T = () => {
78
- h("closed", t.toast);
79
- }, _ = (c) => {
80
- c && c(), t.toast.destroy();
77
+ })), N = () => {
78
+ b("closed", t.toast);
79
+ }, T = (u) => {
80
+ u && u(), t.toast.destroy();
81
81
  };
82
82
  return V(() => {
83
- u.start();
84
- }), (c, i) => (s(), k("div", {
85
- class: A(w.value),
86
- style: $(N.value),
87
- onMouseenter: i[0] || (i[0] = (n) => e(u).pause()),
88
- onMouseleave: i[1] || (i[1] = (n) => e(u).start())
83
+ m.start();
84
+ }), (u, r) => (s(), k("div", {
85
+ class: A(_.value),
86
+ style: $(w.value),
87
+ onMouseenter: r[0] || (r[0] = (n) => e(m).pause()),
88
+ onMouseleave: r[1] || (r[1] = (n) => e(m).start())
89
89
  }, [
90
- r(e(b), {
90
+ i(e(M), {
91
91
  size: e(I).L
92
92
  }, C({ _: 2 }, [
93
93
  t.icon ? {
94
94
  name: "left",
95
95
  fn: o(() => [
96
- r(e(m), {
96
+ i(e(l), {
97
97
  name: t.icon,
98
98
  size: "300"
99
99
  }, null, 8, ["name"])
@@ -103,9 +103,9 @@ const R = /* @__PURE__ */ x({
103
103
  t.title ? {
104
104
  name: "top",
105
105
  fn: o(() => [
106
- r(e(f), null, {
106
+ i(e(f), null, {
107
107
  default: o(() => [
108
- l(d(t.title), 1)
108
+ p(d(t.title), 1)
109
109
  ]),
110
110
  _: 1
111
111
  })
@@ -115,9 +115,9 @@ const R = /* @__PURE__ */ x({
115
115
  t.description ? {
116
116
  name: "bottom",
117
117
  fn: o(() => [
118
- r(e(f), null, {
118
+ i(e(f), null, {
119
119
  default: o(() => [
120
- l(d(t.description), 1)
120
+ p(d(t.description), 1)
121
121
  ]),
122
122
  _: 1
123
123
  })
@@ -132,17 +132,17 @@ const R = /* @__PURE__ */ x({
132
132
  size: e(F).Xs,
133
133
  variation: n.variation || "gray-outline",
134
134
  weight: e(O).Normal,
135
- onClick: z(() => _(n.handler), ["stop"])
135
+ onClick: h(() => T(n.handler), ["stop"])
136
136
  }, C({
137
137
  default: o(() => [
138
- l(" " + d(n.title), 1)
138
+ p(" " + d(n.title), 1)
139
139
  ]),
140
140
  _: 2
141
141
  }, [
142
142
  n.icon ? {
143
143
  name: "icon-prepend",
144
144
  fn: o(() => [
145
- r(e(m), {
145
+ i(e(l), {
146
146
  name: n.icon
147
147
  }, null, 8, ["name"])
148
148
  ]),
@@ -151,14 +151,11 @@ const R = /* @__PURE__ */ x({
151
151
  ]), 1032, ["size", "variation", "weight", "onClick"]))), 128)),
152
152
  t.closable ? (s(), S(e(y), {
153
153
  key: 0,
154
- onClick: z(T, ["stop"]),
154
+ onClick: h(N, ["stop"]),
155
155
  variation: "gray-link"
156
156
  }, {
157
157
  "icon-append": o(() => [
158
- r(e(m), { name: "close" })
159
- ]),
160
- default: o(() => [
161
- i[2] || (i[2] = l(" a ", -1))
158
+ i(e(l), { name: "close" })
162
159
  ]),
163
160
  _: 1
164
161
  })) : L("", !0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediacube-ui-v2",
3
- "version": "0.0.322",
3
+ "version": "0.0.324",
4
4
  "license": "MIT",
5
5
  "description": "Design system for Mediacube services",
6
6
  "sideEffects": [