@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
|
|
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(),
|
|
10
|
-
return (s,
|
|
9
|
+
const t = P(), a = c(() => t.class ?? "icon");
|
|
10
|
+
return (s, u) => (n(), r("svg", {
|
|
11
11
|
"aria-hidden": "true",
|
|
12
|
-
class:
|
|
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"],
|
|
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,
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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 (
|
|
77
|
+
return (g, p) => (n(), r("div", null, [
|
|
78
78
|
e("div", null, [
|
|
79
79
|
e("div", {
|
|
80
|
-
class:
|
|
80
|
+
class: M(["m-banner", a.value]),
|
|
81
81
|
role: s.value,
|
|
82
|
-
"aria-label":
|
|
82
|
+
"aria-label": u.value
|
|
83
83
|
}, [
|
|
84
|
-
e("div",
|
|
85
|
-
|
|
86
|
-
d(
|
|
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
|
-
}),
|
|
93
|
-
const
|
|
94
|
-
for (const [s,
|
|
95
|
-
|
|
96
|
-
return
|
|
97
|
-
},
|
|
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
|
|
108
|
-
switch (
|
|
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
|
-
}),
|
|
117
|
-
() =>
|
|
118
|
-
),
|
|
116
|
+
}), l = c(
|
|
117
|
+
() => a.iconAnimated ? "m-button--animated-right" : ""
|
|
118
|
+
), g = () => {
|
|
119
119
|
s("click");
|
|
120
120
|
};
|
|
121
|
-
return (
|
|
122
|
-
onClick:
|
|
123
|
-
disabled:
|
|
124
|
-
class:
|
|
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(
|
|
128
|
-
|
|
127
|
+
d(p.$slots, "default"),
|
|
128
|
+
p.icon ? (n(), V($(b), {
|
|
129
129
|
key: 0,
|
|
130
|
-
icon:
|
|
130
|
+
icon: p.icon,
|
|
131
131
|
class: "m-button__icon"
|
|
132
132
|
}, null, 8, ["icon"])) : f("", !0)
|
|
133
133
|
])
|
|
134
|
-
], 10,
|
|
134
|
+
], 10, K));
|
|
135
135
|
}
|
|
136
|
-
}),
|
|
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,
|
|
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
|
-
}),
|
|
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 (
|
|
175
|
-
class:
|
|
176
|
-
"aria-label":
|
|
174
|
+
return (l, g) => (n(), r("div", {
|
|
175
|
+
class: M(["m-callout", s.value]),
|
|
176
|
+
"aria-label": u.value
|
|
177
177
|
}, [
|
|
178
|
-
e("div",
|
|
178
|
+
e("div", Z, [
|
|
179
179
|
e("div", ee, [
|
|
180
|
-
d(
|
|
181
|
-
|
|
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(
|
|
187
|
+
d(l.$slots, "header", {}, void 0, !0)
|
|
188
188
|
]),
|
|
189
189
|
e("div", ae, [
|
|
190
190
|
e("p", null, [
|
|
191
|
-
d(
|
|
191
|
+
d(l.$slots, "content", { class: "m-callout__content" }, void 0, !0)
|
|
192
192
|
])
|
|
193
193
|
])
|
|
194
194
|
])
|
|
195
195
|
])
|
|
196
196
|
])
|
|
197
|
-
], 10,
|
|
197
|
+
], 10, Y));
|
|
198
198
|
}
|
|
199
|
-
}), re = /* @__PURE__ */
|
|
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
|
|
211
|
-
return (s,
|
|
210
|
+
const a = t;
|
|
211
|
+
return (s, u) => (n(), r("div", {
|
|
212
212
|
class: "card",
|
|
213
|
-
onClick:
|
|
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 ? (
|
|
219
|
+
s.tagline ? (n(), r("div", ue, _(s.tagline), 1)) : f("", !0),
|
|
220
220
|
e("div", null, [
|
|
221
|
-
e("h3", null,
|
|
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__ */
|
|
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,
|
|
233
|
+
return (t, a) => (n(), r("div", pe, [
|
|
234
234
|
d(t.$slots, "default", {}, void 0, !0)
|
|
235
235
|
]));
|
|
236
236
|
}
|
|
237
|
-
}), fe = /* @__PURE__ */
|
|
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,
|
|
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(),
|
|
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
|
|
251
|
-
let
|
|
252
|
-
return
|
|
253
|
-
fullStars:
|
|
254
|
-
emptyStars:
|
|
255
|
-
isHalfStar:
|
|
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 (
|
|
259
|
-
class:
|
|
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(
|
|
265
|
+
d(m.$slots, "initials")
|
|
264
266
|
]),
|
|
265
267
|
e("div", ye, [
|
|
266
268
|
e("span", $e, [
|
|
267
|
-
d(
|
|
269
|
+
d(m.$slots, "author")
|
|
268
270
|
]),
|
|
269
|
-
s.value ? (
|
|
271
|
+
s.value ? (n(), r("span", be, [
|
|
270
272
|
e("span", Ce, [
|
|
271
273
|
h(" "),
|
|
272
|
-
d(
|
|
274
|
+
d(m.$slots, "datePrefix")
|
|
273
275
|
]),
|
|
274
|
-
e("span",
|
|
276
|
+
e("span", Me, [
|
|
275
277
|
h(" "),
|
|
276
|
-
d(
|
|
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: ${
|
|
284
|
+
"aria-label": `Bewertung: ${m.rating} von ${I} Sternen`
|
|
283
285
|
}, [
|
|
284
|
-
(
|
|
285
|
-
key:
|
|
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
|
-
|
|
290
|
+
E($(b), { icon: "solid-star" })
|
|
289
291
|
]))), 128)),
|
|
290
|
-
p.value.isHalfStar ? (
|
|
291
|
-
|
|
292
|
+
p.value.isHalfStar ? (n(), r("div", we, [
|
|
293
|
+
E($(b), { icon: "half-star" })
|
|
292
294
|
])) : f("", !0),
|
|
293
|
-
(
|
|
294
|
-
key:
|
|
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
|
-
|
|
299
|
+
E($(b), { icon: "solid-star" })
|
|
298
300
|
]))), 128)),
|
|
299
|
-
e("div", Se,
|
|
300
|
-
], 8,
|
|
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(
|
|
307
|
+
d(m.$slots, "headline")
|
|
306
308
|
]),
|
|
307
309
|
e("div", Ae, [
|
|
308
|
-
d(
|
|
310
|
+
d(m.$slots, "text")
|
|
309
311
|
])
|
|
310
312
|
])
|
|
311
313
|
], 2));
|
|
312
314
|
}
|
|
313
|
-
}),
|
|
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,
|
|
327
|
-
return (s,
|
|
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(
|
|
334
|
+
h(_(a.value), 1)
|
|
333
335
|
]),
|
|
334
336
|
datePrefix: C(() => [
|
|
335
337
|
h("am")
|
|
336
338
|
]),
|
|
337
339
|
author: C(() => [
|
|
338
|
-
h(
|
|
340
|
+
h(_(s.author), 1)
|
|
339
341
|
]),
|
|
340
342
|
headline: C(() => [
|
|
341
|
-
h(
|
|
343
|
+
h(_(s.headline), 1)
|
|
342
344
|
]),
|
|
343
345
|
text: C(() => [
|
|
344
|
-
h(
|
|
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(
|
|
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),
|
|
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
|
-
},
|
|
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
|
|
397
|
-
if (
|
|
398
|
-
const
|
|
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
|
-
(
|
|
402
|
+
(w) => w.toLowerCase().startsWith(i) && w.toLowerCase() !== i
|
|
401
403
|
);
|
|
402
|
-
}),
|
|
403
|
-
return (
|
|
404
|
-
class:
|
|
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(
|
|
408
|
-
|
|
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,
|
|
415
|
+
e("p", He, _(i.errorMsg), 1),
|
|
414
416
|
e("div", qe, [
|
|
415
|
-
|
|
417
|
+
u.prefix ? (n(), r("div", Fe, [
|
|
416
418
|
e("span", null, [
|
|
417
|
-
d(
|
|
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:
|
|
423
|
-
"onUpdate:modelValue":
|
|
424
|
-
"aria-describedby":
|
|
425
|
-
placeholder:
|
|
426
|
-
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,
|
|
430
|
+
[z, a.value]
|
|
429
431
|
]),
|
|
430
|
-
|
|
431
|
-
(
|
|
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:
|
|
434
|
-
onClick: (rt) =>
|
|
435
|
-
},
|
|
435
|
+
key: S,
|
|
436
|
+
onClick: (rt) => k(S)
|
|
437
|
+
}, _(S), 9, je))), 128))
|
|
436
438
|
])) : f("", !0),
|
|
437
|
-
|
|
439
|
+
i.suffixIcon ? (n(), r("button", {
|
|
438
440
|
key: 2,
|
|
439
441
|
class: "m-input__suffix",
|
|
440
|
-
onClick:
|
|
442
|
+
onClick: y
|
|
441
443
|
}, [
|
|
442
|
-
(
|
|
444
|
+
(n(), r("svg", ze, [
|
|
443
445
|
e("use", {
|
|
444
|
-
"xlink:href": "#icon-" +
|
|
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",
|
|
452
|
+
e("p", xe, _(i.hint), 1)
|
|
451
453
|
], 2));
|
|
452
454
|
}
|
|
453
|
-
}),
|
|
455
|
+
}), Je = {
|
|
454
456
|
class: "m-intro m-intro-static-image",
|
|
455
457
|
style: { "background-color": "var(--color-neutrals-blue-xlight)" }
|
|
456
|
-
},
|
|
458
|
+
}, Ke = { class: "container" }, Qe = { style: { width: "66.6%" } }, Ye = {
|
|
457
459
|
key: 0,
|
|
458
460
|
class: "m-intro-vertical__tagline"
|
|
459
|
-
},
|
|
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,
|
|
471
|
-
e("div",
|
|
472
|
-
e("div",
|
|
472
|
+
return (t, a) => (n(), r("div", Je, [
|
|
473
|
+
e("div", Ke, [
|
|
474
|
+
e("div", Qe, [
|
|
473
475
|
e("div", null, [
|
|
474
|
-
t.tagline ? (
|
|
475
|
-
e("h1",
|
|
476
|
+
t.tagline ? (n(), r("p", Ye, _(t.tagline), 1)) : f("", !0),
|
|
477
|
+
e("h1", Ze, _(t.title), 1)
|
|
476
478
|
]),
|
|
477
|
-
t.divider ? (
|
|
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__ */
|
|
489
|
+
}), at = /* @__PURE__ */ A(nt, [["__scopeId", "data-v-9ad3adc7"]]), R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
488
490
|
__proto__: null,
|
|
489
|
-
MucBanner:
|
|
490
|
-
MucButton:
|
|
491
|
+
MucBanner: J,
|
|
492
|
+
MucButton: Q,
|
|
491
493
|
MucCallout: re,
|
|
492
494
|
MucCard: _e,
|
|
493
495
|
MucCardContainer: fe,
|
|
494
496
|
MucComment: D,
|
|
495
|
-
MucCommentText:
|
|
496
|
-
MucForm:
|
|
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
|
|
502
|
-
o.component(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
|
-
|
|
507
|
-
|
|
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
|
-
|
|
513
|
-
|
|
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.
|
|
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": "^
|
|
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
|
|
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 = +(
|
|
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(
|
|
151
|
-
let emptyStars = Math.floor(MAX_STARS -
|
|
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 (
|
|
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;
|