@muenchen/muc-patternlab-vue 1.8.0-beta.7 → 1.8.0-beta.8

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.
@@ -0,0 +1,43 @@
1
+ declare const _default: {
2
+ component: import('vue').DefineComponent<{
3
+ icon: {
4
+ type: import('vue').PropType<string>;
5
+ required: true;
6
+ };
7
+ color: {
8
+ type: import('vue').PropType<string>;
9
+ };
10
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
11
+ icon: {
12
+ type: import('vue').PropType<string>;
13
+ required: true;
14
+ };
15
+ color: {
16
+ type: import('vue').PropType<string>;
17
+ };
18
+ }>>, {}, {}>;
19
+ title: string;
20
+ tags: string[];
21
+ args: {
22
+ onClick: import('@vitest/spy').Mock<any, any>;
23
+ };
24
+ parameters: {
25
+ docs: {
26
+ description: {
27
+ component: string;
28
+ };
29
+ };
30
+ };
31
+ };
32
+ export default _default;
33
+ export declare const Weather: {
34
+ args: {
35
+ icon: string;
36
+ };
37
+ };
38
+ export declare const Youtube: {
39
+ args: {
40
+ icon: string;
41
+ color: string;
42
+ };
43
+ };
@@ -0,0 +1,29 @@
1
+ declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
+ /**
3
+ * String of the icon to be displayed.
4
+ */
5
+ icon: string;
6
+ /**
7
+ * Optional css-color for the icon.
8
+ */
9
+ color?: string | undefined;
10
+ }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
11
+ /**
12
+ * String of the icon to be displayed.
13
+ */
14
+ icon: string;
15
+ /**
16
+ * Optional css-color for the icon.
17
+ */
18
+ color?: string | undefined;
19
+ }>>>, {}, {}>;
20
+ export default _default;
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToRuntimeProps<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
@@ -0,0 +1,3 @@
1
+ import { default as MucIcon } from './MucIcon.vue';
2
+
3
+ export { MucIcon };
@@ -3,6 +3,7 @@ import { MucButton } from './Button';
3
3
  import { MucCallout } from './Callout';
4
4
  import { MucCard, MucCardContainer } from './Card';
5
5
  import { MucComment, MucCommentText } from './Comment/';
6
+ import { MucIcon } from './Icon';
6
7
  import { MucIntro } from './Intro';
7
8
 
8
- export { MucButton, MucBanner, MucIntro, MucCallout, MucCard, MucCardContainer, MucComment, MucCommentText, };
9
+ export { MucButton, MucBanner, MucIntro, MucCallout, MucCard, MucCardContainer, MucComment, MucCommentText, MucIcon, };
@@ -1,13 +1,13 @@
1
- import { defineComponent as h, computed as d, openBlock as o, createElementBlock as i, createElementVNode as t, normalizeClass as b, renderSlot as c, createCommentVNode as g, toDisplayString as _, pushScopeId as I, popScopeId as B, useSlots as A, createTextVNode as m, Fragment as M, renderList as S, createBlock as O, unref as R, createSlots as T, withCtx as f } from "vue";
2
- const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PURE__ */ t("svg", { class: "icon" }, [
1
+ import { defineComponent as m, computed as u, openBlock as o, createElementBlock as i, createElementVNode as t, normalizeClass as b, renderSlot as c, createCommentVNode as g, toDisplayString as _, pushScopeId as E, popScopeId as B, useSlots as A, createTextVNode as h, Fragment as M, renderList as S, createBlock as O, unref as R, createSlots as T, withCtx as f, normalizeStyle as L } from "vue";
2
+ const P = ["role", "aria-label"], D = { class: "container-fluid" }, H = /* @__PURE__ */ t("svg", { class: "icon" }, [
3
3
  /* @__PURE__ */ t("use", { href: "#icon-information" })
4
- ], -1), H = /* @__PURE__ */ h({
4
+ ], -1), j = /* @__PURE__ */ m({
5
5
  __name: "MucBanner",
6
6
  props: {
7
7
  type: { default: "info" }
8
8
  },
9
9
  setup(a) {
10
- const e = a, s = d(() => {
10
+ const e = a, s = u(() => {
11
11
  switch (e.type) {
12
12
  case "info":
13
13
  return "m-banner--info";
@@ -18,7 +18,7 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
18
18
  default:
19
19
  return "m-banner--info";
20
20
  }
21
- }), n = d(() => {
21
+ }), n = u(() => {
22
22
  switch (e.type) {
23
23
  case "info":
24
24
  return "dialog";
@@ -29,7 +29,7 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
29
29
  default:
30
30
  return "dialog";
31
31
  }
32
- }), l = d(() => {
32
+ }), l = u(() => {
33
33
  switch (e.type) {
34
34
  case "info":
35
35
  return "Information";
@@ -41,28 +41,28 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
41
41
  return "Information";
42
42
  }
43
43
  });
44
- return (u, p) => (o(), i("div", null, [
44
+ return (d, p) => (o(), i("div", null, [
45
45
  t("div", null, [
46
46
  t("div", {
47
47
  class: b(["m-banner", s.value]),
48
48
  role: n.value,
49
49
  "aria-label": l.value
50
50
  }, [
51
- t("div", P, [
52
- D,
51
+ t("div", D, [
52
+ H,
53
53
  t("p", null, [
54
- c(u.$slots, "default")
54
+ c(d.$slots, "default")
55
55
  ])
56
56
  ])
57
- ], 10, L)
57
+ ], 10, P)
58
58
  ])
59
59
  ]));
60
60
  }
61
- }), j = ["disabled"], N = {
61
+ }), N = ["disabled"], V = {
62
62
  key: 0,
63
63
  "aria-hidden": "true",
64
64
  class: "m-button__icon"
65
- }, V = ["xlink:href"], W = /* @__PURE__ */ h({
65
+ }, W = ["xlink:href"], z = /* @__PURE__ */ m({
66
66
  __name: "MucButton",
67
67
  props: {
68
68
  variant: { default: "primary" },
@@ -72,7 +72,7 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
72
72
  },
73
73
  emits: ["click"],
74
74
  setup(a, { emit: e }) {
75
- const s = a, n = e, l = d(() => {
75
+ const s = a, n = e, l = u(() => {
76
76
  switch (s.variant) {
77
77
  case "secondary":
78
78
  return "m-button--secondary";
@@ -81,34 +81,34 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
81
81
  default:
82
82
  return "m-button--primary";
83
83
  }
84
- }), u = d(() => s.iconAnimated ? "m-button--animated-right" : ""), p = () => {
84
+ }), d = u(() => s.iconAnimated ? "m-button--animated-right" : ""), p = () => {
85
85
  n("click");
86
86
  };
87
87
  return (r, $) => (o(), i("button", {
88
88
  onClick: p,
89
89
  disabled: r.disabled,
90
- class: b(["m-button", [l.value, u.value]])
90
+ class: b(["m-button", [l.value, d.value]])
91
91
  }, [
92
92
  t("span", null, [
93
93
  c(r.$slots, "default"),
94
- r.icon ? (o(), i("svg", N, [
94
+ r.icon ? (o(), i("svg", V, [
95
95
  t("use", {
96
96
  "xlink:href": "#icon-" + r.icon
97
- }, null, 8, V)
97
+ }, null, 8, W)
98
98
  ])) : g("", !0)
99
99
  ])
100
- ], 10, j));
100
+ ], 10, N));
101
101
  }
102
- }), F = ["aria-label"], x = { class: "m-callout__inner" }, z = { class: "m-callout__icon" }, U = {
102
+ }), F = ["aria-label"], U = { class: "m-callout__inner" }, x = { class: "m-callout__icon" }, X = {
103
103
  "aria-hidden": "true",
104
104
  class: "icon"
105
- }, X = ["xlink:href"], q = { class: "m-callout__body" }, G = { class: "m-callout__body__inner" }, J = { class: "m-callout__headline" }, K = { class: "m-callout__content" }, Q = /* @__PURE__ */ h({
105
+ }, q = ["xlink:href"], G = { class: "m-callout__body" }, J = { class: "m-callout__body__inner" }, K = { class: "m-callout__headline" }, Q = { class: "m-callout__content" }, Y = /* @__PURE__ */ m({
106
106
  __name: "MucCallout",
107
107
  props: {
108
108
  type: { default: "info" }
109
109
  },
110
110
  setup(a) {
111
- const e = a, s = d(() => {
111
+ const e = a, s = u(() => {
112
112
  switch (e.type) {
113
113
  case "error":
114
114
  return "warning";
@@ -117,7 +117,7 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
117
117
  default:
118
118
  return "information";
119
119
  }
120
- }), n = d(() => {
120
+ }), n = u(() => {
121
121
  switch (e.type) {
122
122
  case "error":
123
123
  return "m-callout--error";
@@ -128,7 +128,7 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
128
128
  default:
129
129
  return "m-callout--default";
130
130
  }
131
- }), l = d(() => {
131
+ }), l = u(() => {
132
132
  switch (e.type) {
133
133
  case "success":
134
134
  return "Erfolgreich";
@@ -140,28 +140,28 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
140
140
  return "Information";
141
141
  }
142
142
  });
143
- return (u, p) => (o(), i("div", {
143
+ return (d, p) => (o(), i("div", {
144
144
  class: b(["m-callout", n.value]),
145
145
  "aria-label": l.value
146
146
  }, [
147
- t("div", x, [
148
- t("div", z, [
149
- c(u.$slots, "icon", {}, () => [
150
- (o(), i("svg", U, [
147
+ t("div", U, [
148
+ t("div", x, [
149
+ c(d.$slots, "icon", {}, () => [
150
+ (o(), i("svg", X, [
151
151
  t("use", {
152
152
  "xlink:href": `#icon-${s.value}`
153
- }, null, 8, X)
153
+ }, null, 8, q)
154
154
  ]))
155
155
  ], !0)
156
156
  ]),
157
- t("div", q, [
158
- t("div", G, [
159
- t("div", J, [
160
- c(u.$slots, "header", {}, void 0, !0)
161
- ]),
157
+ t("div", G, [
158
+ t("div", J, [
162
159
  t("div", K, [
160
+ c(d.$slots, "header", {}, void 0, !0)
161
+ ]),
162
+ t("div", Q, [
163
163
  t("p", null, [
164
- c(u.$slots, "content", { class: "m-callout__content" }, void 0, !0)
164
+ c(d.$slots, "content", { class: "m-callout__content" }, void 0, !0)
165
165
  ])
166
166
  ])
167
167
  ])
@@ -174,10 +174,10 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
174
174
  for (const [n, l] of e)
175
175
  s[n] = l;
176
176
  return s;
177
- }, Y = /* @__PURE__ */ k(Q, [["__scopeId", "data-v-efad4956"]]), Z = (a) => (I("data-v-acf0a1dd"), a = a(), B(), a), tt = { class: "card-content" }, et = { class: "card-header" }, nt = {
177
+ }, Z = /* @__PURE__ */ k(Y, [["__scopeId", "data-v-efad4956"]]), tt = (a) => (E("data-v-acf0a1dd"), a = a(), B(), a), et = { class: "card-content" }, nt = { class: "card-header" }, st = {
178
178
  key: 0,
179
179
  class: "card-tagline"
180
- }, st = /* @__PURE__ */ Z(() => /* @__PURE__ */ t("div", { class: "muc-divider" }, null, -1)), at = /* @__PURE__ */ h({
180
+ }, at = /* @__PURE__ */ tt(() => /* @__PURE__ */ t("div", { class: "muc-divider" }, null, -1)), ot = /* @__PURE__ */ m({
181
181
  __name: "MucCard",
182
182
  props: {
183
183
  title: {},
@@ -188,67 +188,67 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
188
188
  const s = e;
189
189
  return (n, l) => (o(), i("div", {
190
190
  class: "card",
191
- onClick: l[0] || (l[0] = (u) => s("click", u))
191
+ onClick: l[0] || (l[0] = (d) => s("click", d))
192
192
  }, [
193
- t("div", tt, [
194
- t("div", et, [
193
+ t("div", et, [
194
+ t("div", nt, [
195
195
  c(n.$slots, "headerPrefix", {}, void 0, !0),
196
196
  t("div", null, [
197
- n.tagline ? (o(), i("div", nt, _(n.tagline), 1)) : g("", !0),
197
+ n.tagline ? (o(), i("div", st, _(n.tagline), 1)) : g("", !0),
198
198
  t("div", null, [
199
199
  t("h3", null, _(n.title), 1)
200
200
  ])
201
201
  ])
202
202
  ]),
203
- st,
203
+ at,
204
204
  c(n.$slots, "content", {}, void 0, !0)
205
205
  ])
206
206
  ]));
207
207
  }
208
- }), ot = /* @__PURE__ */ k(at, [["__scopeId", "data-v-acf0a1dd"]]), it = { class: "container card-container" }, rt = /* @__PURE__ */ h({
208
+ }), it = /* @__PURE__ */ k(ot, [["__scopeId", "data-v-acf0a1dd"]]), rt = { class: "container card-container" }, ct = /* @__PURE__ */ m({
209
209
  __name: "MucCardContainer",
210
210
  setup(a) {
211
- return (e, s) => (o(), i("div", it, [
211
+ return (e, s) => (o(), i("div", rt, [
212
212
  c(e.$slots, "default", {}, void 0, !0)
213
213
  ]));
214
214
  }
215
- }), ct = /* @__PURE__ */ k(rt, [["__scopeId", "data-v-6740df8f"]]), lt = { class: "m-comment__head" }, dt = { class: "m-comment__initials" }, ut = { class: "m-comment__info" }, _t = { class: "m-comment__author" }, mt = { key: 0 }, ht = { class: "m-comment__author" }, pt = { class: "m-comment__date" }, vt = ["aria-label"], ft = /* @__PURE__ */ t("svg", {
215
+ }), lt = /* @__PURE__ */ k(ct, [["__scopeId", "data-v-6740df8f"]]), ut = { class: "m-comment__head" }, dt = { class: "m-comment__initials" }, _t = { class: "m-comment__info" }, mt = { class: "m-comment__author" }, ht = { key: 0 }, pt = { class: "m-comment__author" }, vt = { class: "m-comment__date" }, ft = ["aria-label"], gt = /* @__PURE__ */ t("svg", {
216
216
  "aria-hidden": "true",
217
217
  class: "icon"
218
218
  }, [
219
219
  /* @__PURE__ */ t("use", { "xlink:href": "#icon-solid-star" })
220
- ], -1), gt = [
221
- ft
222
- ], $t = {
220
+ ], -1), $t = [
221
+ gt
222
+ ], yt = {
223
223
  key: 0,
224
224
  class: "m-star-rating__item m-star-rating__item--half"
225
- }, yt = /* @__PURE__ */ t("svg", {
225
+ }, bt = /* @__PURE__ */ t("svg", {
226
226
  "aria-hidden": "true",
227
227
  class: "icon"
228
228
  }, [
229
229
  /* @__PURE__ */ t("use", { "xlink:href": "#icon-half-star" })
230
- ], -1), bt = [
231
- yt
232
- ], kt = /* @__PURE__ */ t("svg", {
230
+ ], -1), kt = [
231
+ bt
232
+ ], Ct = /* @__PURE__ */ t("svg", {
233
233
  "aria-hidden": "true",
234
234
  class: "icon"
235
235
  }, [
236
236
  /* @__PURE__ */ t("use", { "xlink:href": "#icon-solid-star" })
237
- ], -1), Ct = [
238
- kt
239
- ], Mt = { class: "m-star-rating__numeric" }, St = { class: "m-comment__body" }, wt = { class: "m-comment__headline" }, Et = { class: "m-comment__text" }, It = "de-DE", Bt = 0.2, At = 0.8, y = 5, E = /* @__PURE__ */ h({
237
+ ], -1), Mt = [
238
+ Ct
239
+ ], St = { class: "m-star-rating__numeric" }, wt = { class: "m-comment__body" }, It = { class: "m-comment__headline" }, Et = { class: "m-comment__text" }, Bt = "de-DE", At = 0.2, Ot = 0.8, y = 5, I = /* @__PURE__ */ m({
240
240
  __name: "MucComment",
241
241
  props: {
242
242
  rating: {},
243
243
  variant: { default: "listing" }
244
244
  },
245
245
  setup(a) {
246
- const e = A(), s = a, n = d(() => !!e.date), l = d(() => s.variant === "slider" ? "m-comment--slider" : "m-comment--listing"), u = d(() => s.rating.toLocaleString(It.valueOf(), {
246
+ const e = A(), s = a, n = u(() => !!e.date), l = u(() => s.variant === "slider" ? "m-comment--slider" : "m-comment--listing"), d = u(() => s.rating.toLocaleString(Bt.valueOf(), {
247
247
  minimumFractionDigits: 1
248
- })), p = d(() => {
248
+ })), p = u(() => {
249
249
  const r = +(s.rating % 1).toFixed(1);
250
250
  let $ = Math.min(Math.floor(s.rating), y), v = Math.floor(y - s.rating), C = !1;
251
- return s.rating !== 0 && s.rating !== y && (r <= Bt ? v++ : r >= At ? $++ : C = !0), {
251
+ return s.rating !== 0 && s.rating !== y && (r <= At ? v++ : r >= Ot ? $++ : C = !0), {
252
252
  fullStars: $,
253
253
  emptyStars: v,
254
254
  isHalfStar: C
@@ -257,21 +257,21 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
257
257
  return (r, $) => (o(), i("div", {
258
258
  class: b(["m-comment", l.value])
259
259
  }, [
260
- t("div", lt, [
260
+ t("div", ut, [
261
261
  t("div", dt, [
262
262
  c(r.$slots, "initials")
263
263
  ]),
264
- t("div", ut, [
265
- t("span", _t, [
264
+ t("div", _t, [
265
+ t("span", mt, [
266
266
  c(r.$slots, "author")
267
267
  ]),
268
- n.value ? (o(), i("span", mt, [
269
- t("span", ht, [
270
- m(" "),
268
+ n.value ? (o(), i("span", ht, [
269
+ t("span", pt, [
270
+ h(" "),
271
271
  c(r.$slots, "datePrefix")
272
272
  ]),
273
- t("span", pt, [
274
- m(" "),
273
+ t("span", vt, [
274
+ h(" "),
275
275
  c(r.$slots, "date")
276
276
  ])
277
277
  ])) : g("", !0),
@@ -283,18 +283,18 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
283
283
  (o(!0), i(M, null, S(p.value.fullStars, (v) => (o(), i("div", {
284
284
  key: v,
285
285
  class: "m-star-rating__item m-star-rating__item--full"
286
- }, gt))), 128)),
287
- p.value.isHalfStar ? (o(), i("div", $t, bt)) : g("", !0),
286
+ }, $t))), 128)),
287
+ p.value.isHalfStar ? (o(), i("div", yt, kt)) : g("", !0),
288
288
  (o(!0), i(M, null, S(p.value.emptyStars, (v) => (o(), i("div", {
289
289
  key: v,
290
290
  class: "m-star-rating__item"
291
- }, Ct))), 128)),
292
- t("div", Mt, _(u.value), 1)
293
- ], 8, vt)
291
+ }, Mt))), 128)),
292
+ t("div", St, _(d.value), 1)
293
+ ], 8, ft)
294
294
  ])
295
295
  ]),
296
- t("div", St, [
297
- t("div", wt, [
296
+ t("div", wt, [
297
+ t("div", It, [
298
298
  c(r.$slots, "headline")
299
299
  ]),
300
300
  t("div", Et, [
@@ -303,7 +303,7 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
303
303
  ])
304
304
  ], 2));
305
305
  }
306
- }), Ot = " ", Rt = /* @__PURE__ */ h({
306
+ }), Rt = " ", Tt = /* @__PURE__ */ m({
307
307
  __name: "MucCommentText",
308
308
  props: {
309
309
  datePrefix: { default: "am" },
@@ -316,47 +316,64 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
316
316
  variant: { default: "listing" }
317
317
  },
318
318
  setup(a) {
319
- const e = a, s = d(() => ((e.initials ?? e.author.split(Ot).map((n) => n.charAt(0)).join("")).match(/^.|.$/g) ?? [""]).join(""));
320
- return (n, l) => (o(), O(R(E), {
319
+ const e = a, s = u(() => ((e.initials ?? e.author.split(Rt).map((n) => n.charAt(0)).join("")).match(/^.|.$/g) ?? [""]).join(""));
320
+ return (n, l) => (o(), O(R(I), {
321
321
  rating: n.rating,
322
322
  variant: n.variant
323
323
  }, T({
324
324
  initials: f(() => [
325
- m(_(s.value), 1)
325
+ h(_(s.value), 1)
326
326
  ]),
327
327
  datePrefix: f(() => [
328
- m("am")
328
+ h("am")
329
329
  ]),
330
330
  author: f(() => [
331
- m(_(n.author), 1)
331
+ h(_(n.author), 1)
332
332
  ]),
333
333
  headline: f(() => [
334
- m(_(n.headline), 1)
334
+ h(_(n.headline), 1)
335
335
  ]),
336
336
  text: f(() => [
337
- m(_(n.text), 1)
337
+ h(_(n.text), 1)
338
338
  ]),
339
339
  _: 2
340
340
  }, [
341
341
  n.date ? {
342
342
  name: "date",
343
343
  fn: f(() => [
344
- m(_(n.date), 1)
344
+ h(_(n.date), 1)
345
345
  ]),
346
346
  key: "0"
347
347
  } : void 0
348
348
  ]), 1032, ["rating", "variant"]));
349
349
  }
350
- }), Tt = {
350
+ }), Lt = ["href"], Pt = /* @__PURE__ */ m({
351
+ __name: "MucIcon",
352
+ props: {
353
+ icon: {},
354
+ color: {}
355
+ },
356
+ setup(a) {
357
+ return (e, s) => (o(), i("svg", {
358
+ "aria-hidden": "true",
359
+ class: "m-button__icon",
360
+ style: L({ color: e.color })
361
+ }, [
362
+ t("use", {
363
+ href: "#icon-" + e.icon
364
+ }, null, 8, Lt)
365
+ ], 4));
366
+ }
367
+ }), Dt = {
351
368
  class: "m-intro m-intro-static-image",
352
369
  style: { "background-color": "var(--color-neutrals-blue-xlight)" }
353
- }, Lt = { class: "container" }, Pt = { style: { width: "66.6%" } }, Dt = {
370
+ }, Ht = { class: "container" }, jt = { style: { width: "66.6%" } }, Nt = {
354
371
  key: 0,
355
372
  class: "m-intro-vertical__tagline"
356
- }, Ht = { class: "m-intro-vertical__title" }, jt = {
373
+ }, Vt = { class: "m-intro-vertical__title" }, Wt = {
357
374
  key: 0,
358
375
  class: "muc-divider"
359
- }, Nt = { class: "m-intro-vertical__content" }, Vt = { style: { "padding-bottom": "32px" } }, Wt = /* @__PURE__ */ h({
376
+ }, zt = { class: "m-intro-vertical__content" }, Ft = { style: { "padding-bottom": "32px" } }, Ut = /* @__PURE__ */ m({
360
377
  __name: "MucIntro",
361
378
  props: {
362
379
  title: {},
@@ -364,16 +381,16 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
364
381
  divider: { type: Boolean }
365
382
  },
366
383
  setup(a) {
367
- return (e, s) => (o(), i("div", Tt, [
368
- t("div", Lt, [
369
- t("div", Pt, [
384
+ return (e, s) => (o(), i("div", Dt, [
385
+ t("div", Ht, [
386
+ t("div", jt, [
370
387
  t("div", null, [
371
- e.tagline ? (o(), i("p", Dt, _(e.tagline), 1)) : g("", !0),
372
- t("h1", Ht, _(e.title), 1)
388
+ e.tagline ? (o(), i("p", Nt, _(e.tagline), 1)) : g("", !0),
389
+ t("h1", Vt, _(e.title), 1)
373
390
  ]),
374
- e.divider ? (o(), i("div", jt)) : g("", !0),
375
- t("div", Nt, [
376
- t("p", Vt, [
391
+ e.divider ? (o(), i("div", Wt)) : g("", !0),
392
+ t("div", zt, [
393
+ t("p", Ft, [
377
394
  c(e.$slots, "default", {}, void 0, !0)
378
395
  ])
379
396
  ])
@@ -381,30 +398,32 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
381
398
  ])
382
399
  ]));
383
400
  }
384
- }), Ft = /* @__PURE__ */ k(Wt, [["__scopeId", "data-v-3957c1bd"]]), w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
401
+ }), xt = /* @__PURE__ */ k(Ut, [["__scopeId", "data-v-3957c1bd"]]), w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
385
402
  __proto__: null,
386
- MucBanner: H,
387
- MucButton: W,
388
- MucCallout: Y,
389
- MucCard: ot,
390
- MucCardContainer: ct,
391
- MucComment: E,
392
- MucCommentText: Rt,
393
- MucIntro: Ft
403
+ MucBanner: j,
404
+ MucButton: z,
405
+ MucCallout: Z,
406
+ MucCard: it,
407
+ MucCardContainer: lt,
408
+ MucComment: I,
409
+ MucCommentText: Tt,
410
+ MucIcon: Pt,
411
+ MucIntro: xt
394
412
  }, Symbol.toStringTag, { value: "Module" }));
395
- function xt(a) {
413
+ function Xt(a) {
396
414
  for (const e in w)
397
415
  a.component(e, w[e]);
398
416
  }
399
- const Ut = { install: xt };
417
+ const Gt = { install: Xt };
400
418
  export {
401
- H as MucBanner,
402
- W as MucButton,
403
- Y as MucCallout,
404
- ot as MucCard,
405
- ct as MucCardContainer,
406
- E as MucComment,
407
- Rt as MucCommentText,
408
- Ft as MucIntro,
409
- Ut as default
419
+ j as MucBanner,
420
+ z as MucButton,
421
+ Z as MucCallout,
422
+ it as MucCard,
423
+ lt as MucCardContainer,
424
+ I as MucComment,
425
+ Tt as MucCommentText,
426
+ Pt as MucIcon,
427
+ xt as MucIntro,
428
+ Gt as default
410
429
  };
@@ -0,0 +1,43 @@
1
+ declare const _default: {
2
+ component: import("vue").DefineComponent<{
3
+ icon: {
4
+ type: import("vue").PropType<string>;
5
+ required: true;
6
+ };
7
+ color: {
8
+ type: import("vue").PropType<string>;
9
+ };
10
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
11
+ icon: {
12
+ type: import("vue").PropType<string>;
13
+ required: true;
14
+ };
15
+ color: {
16
+ type: import("vue").PropType<string>;
17
+ };
18
+ }>>, {}, {}>;
19
+ title: string;
20
+ tags: string[];
21
+ args: {
22
+ onClick: import("@vitest/spy").Mock<any, any>;
23
+ };
24
+ parameters: {
25
+ docs: {
26
+ description: {
27
+ component: string;
28
+ };
29
+ };
30
+ };
31
+ };
32
+ export default _default;
33
+ export declare const Weather: {
34
+ args: {
35
+ icon: string;
36
+ };
37
+ };
38
+ export declare const Youtube: {
39
+ args: {
40
+ icon: string;
41
+ color: string;
42
+ };
43
+ };
@@ -0,0 +1,29 @@
1
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<{
2
+ /**
3
+ * String of the icon to be displayed.
4
+ */
5
+ icon: string;
6
+ /**
7
+ * Optional css-color for the icon.
8
+ */
9
+ color?: string | undefined;
10
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
11
+ /**
12
+ * String of the icon to be displayed.
13
+ */
14
+ icon: string;
15
+ /**
16
+ * Optional css-color for the icon.
17
+ */
18
+ color?: string | undefined;
19
+ }>>>, {}, {}>;
20
+ export default _default;
21
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
+ type __VLS_TypePropsToOption<T> = {
23
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
24
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
+ } : {
26
+ type: import('vue').PropType<T[K]>;
27
+ required: true;
28
+ };
29
+ };
@@ -0,0 +1,2 @@
1
+ import MucIcon from "./MucIcon.vue";
2
+ export { MucIcon };
@@ -3,5 +3,6 @@ import { MucButton } from "./Button";
3
3
  import { MucCallout } from "./Callout";
4
4
  import { MucCard, MucCardContainer } from "./Card";
5
5
  import { MucComment, MucCommentText } from "./Comment/";
6
+ import { MucIcon } from "./Icon";
6
7
  import { MucIntro } from "./Intro";
7
- export { MucButton, MucBanner, MucIntro, MucCallout, MucCard, MucCardContainer, MucComment, MucCommentText, };
8
+ export { MucButton, MucBanner, MucIntro, MucCallout, MucCard, MucCardContainer, MucComment, MucCommentText, MucIcon, };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "FabianWilms",
4
4
  "description": "A vue component library of some of the components available from https://patternlab.muenchen.space",
5
5
  "license": "MIT",
6
- "version": "1.8.0-beta.7",
6
+ "version": "1.8.0-beta.8",
7
7
  "private": false,
8
8
  "module": "./dist/muc-patternlab-vue.es.js",
9
9
  "types": "./dist/types/index.d.ts",
@@ -0,0 +1,35 @@
1
+ import { fn } from "@storybook/test";
2
+
3
+ import MucIcon from "./MucIcon.vue";
4
+
5
+ export default {
6
+ component: MucIcon,
7
+ title: "MucIcon",
8
+ tags: ["autodocs"],
9
+ // 👇 Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked
10
+ args: { onClick: fn() },
11
+ parameters: {
12
+ docs: {
13
+ description: {
14
+ component: `The \`muc-icon\` component is a wrapper commponent for all icons in the patternlab.
15
+
16
+ [🔗 Patternlab-Docs](https://patternlab.muenchen.space/?p=viewall-guidelines-icons)
17
+ [🖼 Iconography](https://it-at-m.github.io/muc-patternlab-vue/?path=/docs/iconography--docs)
18
+ `,
19
+ },
20
+ },
21
+ },
22
+ };
23
+
24
+ export const Weather = {
25
+ args: {
26
+ icon: "weather",
27
+ },
28
+ };
29
+
30
+ export const Youtube = {
31
+ args: {
32
+ icon: "youtube",
33
+ color: "red",
34
+ },
35
+ };
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <svg
3
+ aria-hidden="true"
4
+ class="m-button__icon"
5
+ :style="{ color: color }"
6
+ >
7
+ <use :href="'#icon-' + icon" />
8
+ </svg>
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ defineProps<{
13
+ /**
14
+ * String of the icon to be displayed.
15
+ */
16
+ icon: string;
17
+
18
+ /**
19
+ * Optional css-color for the icon.
20
+ */
21
+ color?: string;
22
+ }>();
23
+ </script>
@@ -0,0 +1,3 @@
1
+ import MucIcon from "./MucIcon.vue";
2
+
3
+ export { MucIcon };
@@ -3,6 +3,7 @@ import { MucButton } from "./Button";
3
3
  import { MucCallout } from "./Callout";
4
4
  import { MucCard, MucCardContainer } from "./Card";
5
5
  import { MucComment, MucCommentText } from "./Comment/";
6
+ import { MucIcon } from "./Icon";
6
7
  import { MucIntro } from "./Intro";
7
8
 
8
9
  export {
@@ -14,4 +15,5 @@ export {
14
15
  MucCardContainer,
15
16
  MucComment,
16
17
  MucCommentText,
18
+ MucIcon,
17
19
  };