@muenchen/muc-patternlab-vue 1.12.0-beta.2 → 1.12.1-beta.1

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,4 +1,4 @@
1
- import { defineComponent as v, useAttrs as P, computed as c, openBlock as a, createElementBlock as r, normalizeClass as k, normalizeStyle as H, createElementVNode as e, createVNode as S, unref as $, renderSlot as d, createBlock as R, createCommentVNode as f, toDisplayString as m, pushScopeId as q, popScopeId as F, useSlots as T, createTextVNode as h, Fragment as B, renderList as L, createSlots as N, withCtx as C, mergeModels as O, useModel as W, withDirectives as j, vModelDynamic as z } from "vue";
1
+ import { defineComponent as v, useAttrs as P, computed as c, openBlock as n, createElementBlock as r, normalizeClass as M, normalizeStyle as H, createElementVNode as e, createVNode as E, unref as $, renderSlot as d, createBlock as V, createCommentVNode as f, toDisplayString as _, pushScopeId as q, popScopeId as F, useSlots as T, createTextVNode as h, Fragment as B, renderList as L, createSlots as N, withCtx as C, mergeModels as O, useModel as W, withDirectives as j, vModelDynamic as z } from "vue";
2
2
  const U = ["href"], b = /* @__PURE__ */ v({
3
3
  __name: "MucIcon",
4
4
  props: {
@@ -6,10 +6,10 @@ const U = ["href"], b = /* @__PURE__ */ v({
6
6
  color: {}
7
7
  },
8
8
  setup(o) {
9
- const t = P(), n = c(() => t.class ?? "icon");
10
- return (s, l) => (a(), r("svg", {
9
+ const t = P(), a = c(() => t.class ?? "icon");
10
+ return (s, u) => (n(), r("svg", {
11
11
  "aria-hidden": "true",
12
- class: k(n.value),
12
+ class: M(a.value),
13
13
  style: H({ color: s.color })
14
14
  }, [
15
15
  e("use", {
@@ -17,13 +17,13 @@ const U = ["href"], b = /* @__PURE__ */ v({
17
17
  }, null, 8, U)
18
18
  ], 6));
19
19
  }
20
- }), X = ["role", "aria-label"], G = { class: "container-fluid" }, J = /* @__PURE__ */ v({
20
+ }), X = ["role", "aria-label"], x = { class: "container-fluid" }, G = /* @__PURE__ */ v({
21
21
  __name: "MucBanner",
22
22
  props: {
23
23
  type: { default: "info" }
24
24
  },
25
25
  setup(o) {
26
- const t = o, n = c(() => {
26
+ const t = o, a = c(() => {
27
27
  switch (t.type) {
28
28
  case "info":
29
29
  return "m-banner--info";
@@ -49,7 +49,7 @@ const U = ["href"], b = /* @__PURE__ */ v({
49
49
  default:
50
50
  return "dialog";
51
51
  }
52
- }), l = c(() => {
52
+ }), u = c(() => {
53
53
  switch (t.type) {
54
54
  case "info":
55
55
  return "Information";
@@ -62,7 +62,7 @@ const U = ["href"], b = /* @__PURE__ */ v({
62
62
  default:
63
63
  return "Information";
64
64
  }
65
- }), _ = c(() => {
65
+ }), l = c(() => {
66
66
  switch (t.type) {
67
67
  case "success":
68
68
  return "check";
@@ -74,27 +74,27 @@ const U = ["href"], b = /* @__PURE__ */ v({
74
74
  return "information";
75
75
  }
76
76
  });
77
- return (p, i) => (a(), r("div", null, [
77
+ return (g, p) => (n(), r("div", null, [
78
78
  e("div", null, [
79
79
  e("div", {
80
- class: k(["m-banner", n.value]),
80
+ class: M(["m-banner", a.value]),
81
81
  role: s.value,
82
- "aria-label": l.value
82
+ "aria-label": u.value
83
83
  }, [
84
- e("div", G, [
85
- S($(b), { icon: _.value }, null, 8, ["icon"]),
86
- d(p.$slots, "default", {}, void 0, !0)
84
+ e("div", x, [
85
+ E($(b), { icon: l.value }, null, 8, ["icon"]),
86
+ d(g.$slots, "default", {}, void 0, !0)
87
87
  ])
88
88
  ], 10, X)
89
89
  ])
90
90
  ]));
91
91
  }
92
- }), I = (o, t) => {
93
- const n = o.__vccOpts || o;
94
- for (const [s, l] of t)
95
- n[s] = l;
96
- return n;
97
- }, K = /* @__PURE__ */ I(J, [["__scopeId", "data-v-53bc7eca"]]), Q = ["disabled"], Y = /* @__PURE__ */ v({
92
+ }), A = (o, t) => {
93
+ const a = o.__vccOpts || o;
94
+ for (const [s, u] of t)
95
+ a[s] = u;
96
+ return a;
97
+ }, J = /* @__PURE__ */ A(G, [["__scopeId", "data-v-53bc7eca"]]), K = ["disabled"], Q = /* @__PURE__ */ v({
98
98
  __name: "MucButton",
99
99
  props: {
100
100
  variant: { default: "primary" },
@@ -104,8 +104,8 @@ const U = ["href"], b = /* @__PURE__ */ v({
104
104
  },
105
105
  emits: ["click"],
106
106
  setup(o, { emit: t }) {
107
- const n = o, s = t, l = c(() => {
108
- switch (n.variant) {
107
+ const a = o, s = t, u = c(() => {
108
+ switch (a.variant) {
109
109
  case "secondary":
110
110
  return "m-button--secondary";
111
111
  case "ghost":
@@ -113,33 +113,33 @@ const U = ["href"], b = /* @__PURE__ */ v({
113
113
  default:
114
114
  return "m-button--primary";
115
115
  }
116
- }), _ = c(
117
- () => n.iconAnimated ? "m-button--animated-right" : ""
118
- ), p = () => {
116
+ }), l = c(
117
+ () => a.iconAnimated ? "m-button--animated-right" : ""
118
+ ), g = () => {
119
119
  s("click");
120
120
  };
121
- return (i, y) => (a(), r("button", {
122
- onClick: p,
123
- disabled: i.disabled,
124
- class: k(["m-button", [l.value, _.value]])
121
+ return (p, m) => (n(), r("button", {
122
+ onClick: g,
123
+ disabled: p.disabled,
124
+ class: M(["m-button", [u.value, l.value]])
125
125
  }, [
126
126
  e("span", null, [
127
- d(i.$slots, "default"),
128
- i.icon ? (a(), R($(b), {
127
+ d(p.$slots, "default"),
128
+ p.icon ? (n(), V($(b), {
129
129
  key: 0,
130
- icon: i.icon,
130
+ icon: p.icon,
131
131
  class: "m-button__icon"
132
132
  }, null, 8, ["icon"])) : f("", !0)
133
133
  ])
134
- ], 10, Q));
134
+ ], 10, K));
135
135
  }
136
- }), Z = ["aria-label"], x = { class: "m-callout__inner" }, ee = { class: "m-callout__icon" }, te = { class: "m-callout__body" }, se = { class: "m-callout__body__inner" }, ne = { class: "m-callout__headline" }, ae = { class: "m-callout__content" }, oe = /* @__PURE__ */ v({
136
+ }), Y = ["aria-label"], Z = { class: "m-callout__inner" }, ee = { class: "m-callout__icon" }, te = { class: "m-callout__body" }, se = { class: "m-callout__body__inner" }, ne = { class: "m-callout__headline" }, ae = { class: "m-callout__content" }, oe = /* @__PURE__ */ v({
137
137
  __name: "MucCallout",
138
138
  props: {
139
139
  type: { default: "info" }
140
140
  },
141
141
  setup(o) {
142
- const t = o, n = c(() => {
142
+ const t = o, a = c(() => {
143
143
  switch (t.type) {
144
144
  case "error":
145
145
  return "warning";
@@ -159,7 +159,7 @@ const U = ["href"], b = /* @__PURE__ */ v({
159
159
  default:
160
160
  return "m-callout--default";
161
161
  }
162
- }), l = c(() => {
162
+ }), u = c(() => {
163
163
  switch (t.type) {
164
164
  case "success":
165
165
  return "Erfolgreich";
@@ -171,32 +171,32 @@ const U = ["href"], b = /* @__PURE__ */ v({
171
171
  return "Information";
172
172
  }
173
173
  });
174
- return (_, p) => (a(), r("div", {
175
- class: k(["m-callout", s.value]),
176
- "aria-label": l.value
174
+ return (l, g) => (n(), r("div", {
175
+ class: M(["m-callout", s.value]),
176
+ "aria-label": u.value
177
177
  }, [
178
- e("div", x, [
178
+ e("div", Z, [
179
179
  e("div", ee, [
180
- d(_.$slots, "icon", {}, () => [
181
- S($(b), { icon: n.value }, null, 8, ["icon"])
180
+ d(l.$slots, "icon", {}, () => [
181
+ E($(b), { icon: a.value }, null, 8, ["icon"])
182
182
  ], !0)
183
183
  ]),
184
184
  e("div", te, [
185
185
  e("div", se, [
186
186
  e("div", ne, [
187
- d(_.$slots, "header", {}, void 0, !0)
187
+ d(l.$slots, "header", {}, void 0, !0)
188
188
  ]),
189
189
  e("div", ae, [
190
190
  e("p", null, [
191
- d(_.$slots, "content", { class: "m-callout__content" }, void 0, !0)
191
+ d(l.$slots, "content", { class: "m-callout__content" }, void 0, !0)
192
192
  ])
193
193
  ])
194
194
  ])
195
195
  ])
196
196
  ])
197
- ], 10, Z));
197
+ ], 10, Y));
198
198
  }
199
- }), re = /* @__PURE__ */ I(oe, [["__scopeId", "data-v-e6cf4104"]]), ie = (o) => (q("data-v-acf0a1dd"), o = o(), F(), o), ce = { class: "card-content" }, le = { class: "card-header" }, ue = {
199
+ }), re = /* @__PURE__ */ A(oe, [["__scopeId", "data-v-e6cf4104"]]), ie = (o) => (q("data-v-acf0a1dd"), o = o(), F(), o), ce = { class: "card-content" }, le = { class: "card-header" }, ue = {
200
200
  key: 0,
201
201
  class: "card-tagline"
202
202
  }, de = /* @__PURE__ */ ie(() => /* @__PURE__ */ e("div", { class: "muc-divider" }, null, -1)), me = /* @__PURE__ */ v({
@@ -207,18 +207,18 @@ const U = ["href"], b = /* @__PURE__ */ v({
207
207
  },
208
208
  emits: ["click"],
209
209
  setup(o, { emit: t }) {
210
- const n = t;
211
- return (s, l) => (a(), r("div", {
210
+ const a = t;
211
+ return (s, u) => (n(), r("div", {
212
212
  class: "card",
213
- onClick: l[0] || (l[0] = (_) => n("click", _))
213
+ onClick: u[0] || (u[0] = (l) => a("click", l))
214
214
  }, [
215
215
  e("div", ce, [
216
216
  e("div", le, [
217
217
  d(s.$slots, "headerPrefix", {}, void 0, !0),
218
218
  e("div", null, [
219
- s.tagline ? (a(), r("div", ue, m(s.tagline), 1)) : f("", !0),
219
+ s.tagline ? (n(), r("div", ue, _(s.tagline), 1)) : f("", !0),
220
220
  e("div", null, [
221
- e("h3", null, m(s.title), 1)
221
+ e("h3", null, _(s.title), 1)
222
222
  ])
223
223
  ])
224
224
  ]),
@@ -227,90 +227,92 @@ const U = ["href"], b = /* @__PURE__ */ v({
227
227
  ])
228
228
  ]));
229
229
  }
230
- }), _e = /* @__PURE__ */ I(me, [["__scopeId", "data-v-acf0a1dd"]]), pe = { class: "container card-container" }, he = /* @__PURE__ */ v({
230
+ }), _e = /* @__PURE__ */ A(me, [["__scopeId", "data-v-acf0a1dd"]]), pe = { class: "container card-container" }, he = /* @__PURE__ */ v({
231
231
  __name: "MucCardContainer",
232
232
  setup(o) {
233
- return (t, n) => (a(), r("div", pe, [
233
+ return (t, a) => (n(), r("div", pe, [
234
234
  d(t.$slots, "default", {}, void 0, !0)
235
235
  ]));
236
236
  }
237
- }), fe = /* @__PURE__ */ I(he, [["__scopeId", "data-v-6740df8f"]]), ve = { class: "m-comment__head" }, ge = { class: "m-comment__initials" }, ye = { class: "m-comment__info" }, $e = { class: "m-comment__author" }, be = { key: 0 }, Ce = { class: "m-comment__author" }, ke = { class: "m-comment__date" }, Me = ["aria-label"], we = {
237
+ }), fe = /* @__PURE__ */ A(he, [["__scopeId", "data-v-6740df8f"]]), ve = { class: "m-comment__head" }, ge = { class: "m-comment__initials" }, ye = { class: "m-comment__info" }, $e = { class: "m-comment__author" }, be = { key: 0 }, Ce = { class: "m-comment__author" }, Me = { class: "m-comment__date" }, ke = ["aria-label"], we = {
238
238
  key: 0,
239
239
  class: "m-star-rating__item m-star-rating__item--half"
240
- }, Se = { class: "m-star-rating__numeric" }, Ie = { class: "m-comment__body" }, Ee = { class: "m-comment__headline" }, Ae = { class: "m-comment__text" }, Be = "de-DE", Le = 0.2, Oe = 0.8, A = 5, D = /* @__PURE__ */ v({
240
+ }, Se = { class: "m-star-rating__numeric" }, Ie = { class: "m-comment__body" }, Ee = { class: "m-comment__headline" }, Ae = { class: "m-comment__text" }, Be = "de-DE", Le = 0.2, Oe = 0.8, I = 5, D = /* @__PURE__ */ v({
241
241
  __name: "MucComment",
242
242
  props: {
243
243
  rating: {},
244
244
  variant: { default: "listing" }
245
245
  },
246
246
  setup(o) {
247
- const t = T(), n = o, s = c(() => !!t.date), l = c(() => n.variant === "slider" ? "m-comment--slider" : "m-comment--listing"), _ = c(() => n.rating.toLocaleString(Be.valueOf(), {
247
+ const t = T(), a = o, s = c(() => !!t.date), u = c(() => a.variant === "slider" ? "m-comment--slider" : "m-comment--listing"), l = c(
248
+ () => Math.min(Math.max(a.rating, 0), I)
249
+ ), g = c(() => l.value.toLocaleString(Be.valueOf(), {
248
250
  minimumFractionDigits: 1
249
251
  })), p = c(() => {
250
- const i = +(n.rating % 1).toFixed(1);
251
- let y = Math.min(Math.floor(n.rating), A), g = Math.floor(A - n.rating), E = !1;
252
- return n.rating !== 0 && n.rating !== A && (i <= Le ? g++ : i >= Oe ? y++ : E = !0), {
253
- fullStars: y,
254
- emptyStars: g,
255
- isHalfStar: E
252
+ const m = +(l.value % 1).toFixed(1);
253
+ let k = Math.min(Math.floor(l.value), I), y = Math.floor(I - l.value), i = !1;
254
+ return l.value !== 0 && l.value !== I && (m <= Le ? y++ : m >= Oe ? k++ : i = !0), {
255
+ fullStars: k,
256
+ emptyStars: y,
257
+ isHalfStar: i
256
258
  };
257
259
  });
258
- return (i, y) => (a(), r("div", {
259
- class: k(["m-comment", l.value])
260
+ return (m, k) => (n(), r("div", {
261
+ class: M(["m-comment", u.value])
260
262
  }, [
261
263
  e("div", ve, [
262
264
  e("div", ge, [
263
- d(i.$slots, "initials")
265
+ d(m.$slots, "initials")
264
266
  ]),
265
267
  e("div", ye, [
266
268
  e("span", $e, [
267
- d(i.$slots, "author")
269
+ d(m.$slots, "author")
268
270
  ]),
269
- s.value ? (a(), r("span", be, [
271
+ s.value ? (n(), r("span", be, [
270
272
  e("span", Ce, [
271
273
  h("  "),
272
- d(i.$slots, "datePrefix")
274
+ d(m.$slots, "datePrefix")
273
275
  ]),
274
- e("span", ke, [
276
+ e("span", Me, [
275
277
  h(" "),
276
- d(i.$slots, "date")
278
+ d(m.$slots, "date")
277
279
  ])
278
280
  ])) : f("", !0),
279
281
  e("div", {
280
282
  class: "m-star-rating",
281
283
  role: "img",
282
- "aria-label": `Bewertung: ${i.rating} von ${A} Sternen`
284
+ "aria-label": `Bewertung: ${m.rating} von ${I} Sternen`
283
285
  }, [
284
- (a(!0), r(B, null, L(p.value.fullStars, (g) => (a(), r("div", {
285
- key: g,
286
+ (n(!0), r(B, null, L(p.value.fullStars, (y) => (n(), r("div", {
287
+ key: y,
286
288
  class: "m-star-rating__item m-star-rating__item--full"
287
289
  }, [
288
- S($(b), { icon: "solid-star" })
290
+ E($(b), { icon: "solid-star" })
289
291
  ]))), 128)),
290
- p.value.isHalfStar ? (a(), r("div", we, [
291
- S($(b), { icon: "half-star" })
292
+ p.value.isHalfStar ? (n(), r("div", we, [
293
+ E($(b), { icon: "half-star" })
292
294
  ])) : f("", !0),
293
- (a(!0), r(B, null, L(p.value.emptyStars, (g) => (a(), r("div", {
294
- key: g,
295
+ (n(!0), r(B, null, L(p.value.emptyStars, (y) => (n(), r("div", {
296
+ key: y,
295
297
  class: "m-star-rating__item"
296
298
  }, [
297
- S($(b), { icon: "solid-star" })
299
+ E($(b), { icon: "solid-star" })
298
300
  ]))), 128)),
299
- e("div", Se, m(_.value), 1)
300
- ], 8, Me)
301
+ e("div", Se, _(g.value), 1)
302
+ ], 8, ke)
301
303
  ])
302
304
  ]),
303
305
  e("div", Ie, [
304
306
  e("div", Ee, [
305
- d(i.$slots, "headline")
307
+ d(m.$slots, "headline")
306
308
  ]),
307
309
  e("div", Ae, [
308
- d(i.$slots, "text")
310
+ d(m.$slots, "text")
309
311
  ])
310
312
  ])
311
313
  ], 2));
312
314
  }
313
- }), Ve = " ", Re = /* @__PURE__ */ v({
315
+ }), Re = " ", Ve = /* @__PURE__ */ v({
314
316
  __name: "MucCommentText",
315
317
  props: {
316
318
  datePrefix: { default: "am" },
@@ -323,32 +325,32 @@ const U = ["href"], b = /* @__PURE__ */ v({
323
325
  variant: { default: "listing" }
324
326
  },
325
327
  setup(o) {
326
- const t = o, n = c(() => ((t.initials ?? t.author.split(Ve).map((s) => s.charAt(0)).join("")).match(/^.|.$/g) ?? [""]).join(""));
327
- return (s, l) => (a(), R($(D), {
328
+ const t = o, a = c(() => ((t.initials ?? t.author.split(Re).map((s) => s.charAt(0)).join("")).match(/^.|.$/g) ?? [""]).join(""));
329
+ return (s, u) => (n(), V($(D), {
328
330
  rating: s.rating,
329
331
  variant: s.variant
330
332
  }, N({
331
333
  initials: C(() => [
332
- h(m(n.value), 1)
334
+ h(_(a.value), 1)
333
335
  ]),
334
336
  datePrefix: C(() => [
335
337
  h("am")
336
338
  ]),
337
339
  author: C(() => [
338
- h(m(s.author), 1)
340
+ h(_(s.author), 1)
339
341
  ]),
340
342
  headline: C(() => [
341
- h(m(s.headline), 1)
343
+ h(_(s.headline), 1)
342
344
  ]),
343
345
  text: C(() => [
344
- h(m(s.text), 1)
346
+ h(_(s.text), 1)
345
347
  ]),
346
348
  _: 2
347
349
  }, [
348
350
  s.date ? {
349
351
  name: "date",
350
352
  fn: C(() => [
351
- h(m(s.date), 1)
353
+ h(_(s.date), 1)
352
354
  ]),
353
355
  key: "0"
354
356
  } : void 0
@@ -373,10 +375,10 @@ const U = ["href"], b = /* @__PURE__ */ v({
373
375
  }, je = ["onClick"], ze = {
374
376
  "aria-hidden": "true",
375
377
  class: "icon"
376
- }, Ue = ["xlink:href"], Xe = /* @__PURE__ */ e("span", { class: "visually-hidden" }, "Suchen", -1), Ge = {
378
+ }, Ue = ["xlink:href"], Xe = /* @__PURE__ */ e("span", { class: "visually-hidden" }, "Suchen", -1), xe = {
377
379
  class: "m-hint",
378
380
  id: "text-input-hint"
379
- }, Je = /* @__PURE__ */ v({
381
+ }, Ge = /* @__PURE__ */ v({
380
382
  __name: "MucInput",
381
383
  props: /* @__PURE__ */ O({
382
384
  errorMsg: {},
@@ -393,70 +395,70 @@ const U = ["href"], b = /* @__PURE__ */ v({
393
395
  }),
394
396
  emits: /* @__PURE__ */ O(["suffixClick"], ["update:modelValue"]),
395
397
  setup(o, { emit: t }) {
396
- const n = W(o, "modelValue"), s = o, l = T(), _ = t, p = c(() => s.errorMsg ? "has-error" : ""), i = c(() => s.type === "search"), y = c(() => {
397
- if (n.value === "") return [];
398
- const u = n.value.toLowerCase();
398
+ const a = W(o, "modelValue"), s = o, u = T(), l = t, g = c(() => s.errorMsg ? "has-error" : ""), p = c(() => s.type === "search"), m = c(() => {
399
+ if (a.value === "") return [];
400
+ const i = a.value.toLowerCase();
399
401
  return s.datalist.filter(
400
- (M) => M.toLowerCase().startsWith(u) && M.toLowerCase() !== u
402
+ (w) => w.toLowerCase().startsWith(i) && w.toLowerCase() !== i
401
403
  );
402
- }), g = (u) => n.value = u, E = () => _("suffixClick");
403
- return (u, M) => (a(), r("div", {
404
- class: k(["m-form-group", p.value])
404
+ }), k = (i) => a.value = i, y = () => l("suffixClick");
405
+ return (i, w) => (n(), r("div", {
406
+ class: M(["m-form-group", g.value])
405
407
  }, [
406
408
  e("label", Te, [
407
- h(m(u.label) + " ", 1),
408
- u.required ? (a(), r("span", De, [
409
+ h(_(i.label) + " ", 1),
410
+ i.required ? (n(), r("span", De, [
409
411
  h(" * "),
410
412
  Pe
411
413
  ])) : f("", !0)
412
414
  ]),
413
- e("p", He, m(u.errorMsg), 1),
415
+ e("p", He, _(i.errorMsg), 1),
414
416
  e("div", qe, [
415
- l.prefix ? (a(), r("div", Fe, [
417
+ u.prefix ? (n(), r("div", Fe, [
416
418
  e("span", null, [
417
- d(u.$slots, "prefix")
419
+ d(i.$slots, "prefix")
418
420
  ])
419
421
  ])) : f("", !0),
420
422
  j(e("input", {
421
423
  class: "m-input autocomplete-input",
422
- type: u.type,
423
- "onUpdate:modelValue": M[0] || (M[0] = (w) => n.value = w),
424
- "aria-describedby": u.type + "-input",
425
- placeholder: u.placeholder,
426
- required: u.required
424
+ type: i.type,
425
+ "onUpdate:modelValue": w[0] || (w[0] = (S) => a.value = S),
426
+ "aria-describedby": i.type + "-input",
427
+ placeholder: i.placeholder,
428
+ required: i.required
427
429
  }, null, 8, Ne), [
428
- [z, n.value]
430
+ [z, a.value]
429
431
  ]),
430
- i.value && y.value.length !== 0 ? (a(), r("ul", We, [
431
- (a(!0), r(B, null, L(y.value, (w) => (a(), r("li", {
432
+ p.value && m.value.length !== 0 ? (n(), r("ul", We, [
433
+ (n(!0), r(B, null, L(m.value, (S) => (n(), r("li", {
432
434
  class: "autocomplete-result",
433
- key: w,
434
- onClick: (rt) => g(w)
435
- }, m(w), 9, je))), 128))
435
+ key: S,
436
+ onClick: (rt) => k(S)
437
+ }, _(S), 9, je))), 128))
436
438
  ])) : f("", !0),
437
- u.suffixIcon ? (a(), r("button", {
439
+ i.suffixIcon ? (n(), r("button", {
438
440
  key: 2,
439
441
  class: "m-input__suffix",
440
- onClick: E
442
+ onClick: y
441
443
  }, [
442
- (a(), r("svg", ze, [
444
+ (n(), r("svg", ze, [
443
445
  e("use", {
444
- "xlink:href": "#icon-" + u.suffixIcon
446
+ "xlink:href": "#icon-" + i.suffixIcon
445
447
  }, null, 8, Ue)
446
448
  ])),
447
449
  Xe
448
450
  ])) : f("", !0)
449
451
  ]),
450
- e("p", Ge, m(u.hint), 1)
452
+ e("p", xe, _(i.hint), 1)
451
453
  ], 2));
452
454
  }
453
- }), Ke = {
455
+ }), Je = {
454
456
  class: "m-intro m-intro-static-image",
455
457
  style: { "background-color": "var(--color-neutrals-blue-xlight)" }
456
- }, Qe = { class: "container" }, Ye = { style: { width: "66.6%" } }, Ze = {
458
+ }, Ke = { class: "container" }, Qe = { style: { width: "66.6%" } }, Ye = {
457
459
  key: 0,
458
460
  class: "m-intro-vertical__tagline"
459
- }, xe = { class: "m-intro-vertical__title" }, et = {
461
+ }, Ze = { class: "m-intro-vertical__title" }, et = {
460
462
  key: 0,
461
463
  class: "muc-divider"
462
464
  }, tt = { class: "m-intro-vertical__content" }, st = { style: { "padding-bottom": "32px" } }, nt = /* @__PURE__ */ v({
@@ -467,14 +469,14 @@ const U = ["href"], b = /* @__PURE__ */ v({
467
469
  divider: { type: Boolean }
468
470
  },
469
471
  setup(o) {
470
- return (t, n) => (a(), r("div", Ke, [
471
- e("div", Qe, [
472
- e("div", Ye, [
472
+ return (t, a) => (n(), r("div", Je, [
473
+ e("div", Ke, [
474
+ e("div", Qe, [
473
475
  e("div", null, [
474
- t.tagline ? (a(), r("p", Ze, m(t.tagline), 1)) : f("", !0),
475
- e("h1", xe, m(t.title), 1)
476
+ t.tagline ? (n(), r("p", Ye, _(t.tagline), 1)) : f("", !0),
477
+ e("h1", Ze, _(t.title), 1)
476
478
  ]),
477
- t.divider ? (a(), r("div", et)) : f("", !0),
479
+ t.divider ? (n(), r("div", et)) : f("", !0),
478
480
  e("div", tt, [
479
481
  e("p", st, [
480
482
  d(t.$slots, "default", {}, void 0, !0)
@@ -484,33 +486,33 @@ const U = ["href"], b = /* @__PURE__ */ v({
484
486
  ])
485
487
  ]));
486
488
  }
487
- }), at = /* @__PURE__ */ I(nt, [["__scopeId", "data-v-9ad3adc7"]]), V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
489
+ }), at = /* @__PURE__ */ A(nt, [["__scopeId", "data-v-9ad3adc7"]]), R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
488
490
  __proto__: null,
489
- MucBanner: K,
490
- MucButton: Y,
491
+ MucBanner: J,
492
+ MucButton: Q,
491
493
  MucCallout: re,
492
494
  MucCard: _e,
493
495
  MucCardContainer: fe,
494
496
  MucComment: D,
495
- MucCommentText: Re,
496
- MucForm: Je,
497
+ MucCommentText: Ve,
498
+ MucForm: Ge,
497
499
  MucIcon: b,
498
500
  MucIntro: at
499
501
  }, Symbol.toStringTag, { value: "Module" }));
500
502
  function ot(o) {
501
- for (const t in V)
502
- o.component(t, V[t]);
503
+ for (const t in R)
504
+ o.component(t, R[t]);
503
505
  }
504
506
  const ct = { install: ot };
505
507
  export {
506
- K as MucBanner,
507
- Y as MucButton,
508
+ J as MucBanner,
509
+ Q as MucButton,
508
510
  re as MucCallout,
509
511
  _e as MucCard,
510
512
  fe as MucCardContainer,
511
513
  D as MucComment,
512
- Re as MucCommentText,
513
- Je as MucForm,
514
+ Ve as MucCommentText,
515
+ Ge as MucForm,
514
516
  b as MucIcon,
515
517
  at as MucIntro,
516
518
  ct as default
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.12.0-beta.2",
6
+ "version": "1.12.1-beta.1",
7
7
  "private": false,
8
8
  "module": "./dist/muc-patternlab-vue.es.js",
9
9
  "types": "./dist/types/index.d.ts",
@@ -72,7 +72,7 @@
72
72
  "npm-run-all2": "^6.1.1",
73
73
  "prettier": "^3.0.3",
74
74
  "rimraf": "^6.0.0",
75
- "semantic-release": "^22.0.0",
75
+ "semantic-release": "^23.1.1",
76
76
  "semantic-release-gitmoji": "^1.6.5",
77
77
  "storybook": "^8.0.9",
78
78
  "typescript": "~5.5.0",
@@ -126,17 +126,27 @@ const showDate = computed(() => {
126
126
  return !!slots["date"];
127
127
  });
128
128
 
129
+ /**
130
+ * Computes class for given variant
131
+ */
129
132
  const commentClass = computed(() => {
130
133
  return props.variant === "slider"
131
134
  ? "m-comment--slider"
132
135
  : "m-comment--listing";
133
136
  });
134
137
 
138
+ /**
139
+ * Computes rating with min and max limits
140
+ */
141
+ const computedRating = computed(() =>
142
+ Math.min(Math.max(props.rating, 0), MAX_STARS)
143
+ );
144
+
135
145
  /*
136
146
  * Converts the dot used on decimal numbers and converts it to a comma.
137
147
  */
138
148
  const ratingWithDecimalComma = computed(() => {
139
- return props.rating.toLocaleString(LOCALES.valueOf(), {
149
+ return computedRating.value.toLocaleString(LOCALES.valueOf(), {
140
150
  minimumFractionDigits: 1,
141
151
  });
142
152
  });
@@ -145,14 +155,14 @@ const ratingWithDecimalComma = computed(() => {
145
155
  Calculates the amount of full, empty and half-stars to be displayed.
146
156
  */
147
157
  const evaluateRating = computed(() => {
148
- const decimalPart = +(props.rating % 1).toFixed(1); // ask Brendan Eich why "3.3 % 1 = 0.2999999999999998" and then come back
158
+ const decimalPart = +(computedRating.value % 1).toFixed(1); // ask Brendan Eich why "3.3 % 1 = 0.2999999999999998" and then come back
149
159
 
150
- let fullStars = Math.min(Math.floor(props.rating), MAX_STARS);
151
- let emptyStars = Math.floor(MAX_STARS - props.rating);
160
+ let fullStars = Math.min(Math.floor(computedRating.value), MAX_STARS);
161
+ let emptyStars = Math.floor(MAX_STARS - computedRating.value);
152
162
  let isHalfStar = false;
153
163
 
154
164
  // evaluating half-stars and if the rating is e.g. 3.9 an extra full star needs to be displayed
155
- if (props.rating !== 0.0 && props.rating !== MAX_STARS) {
165
+ if (computedRating.value !== 0.0 && computedRating.value !== MAX_STARS) {
156
166
  if (decimalPart <= LOWER_THRESHOLD) emptyStars++;
157
167
  else if (decimalPart >= UPPER_THRESHOLD) fullStars++;
158
168
  else isHalfStar = true;