@muenchen/muc-patternlab-vue 1.8.0-beta.7 → 1.8.0-beta.9
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.
- package/dist/components/Icon/MucIcon.stories.d.ts +43 -0
- package/dist/components/Icon/MucIcon.vue.d.ts +29 -0
- package/dist/components/Icon/index.d.ts +3 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/muc-patternlab-vue.es.js +136 -115
- package/package.json +4 -5
- package/src/components/Button/MucButton.vue +3 -1
- package/src/components/Icon/MucIcon.stories.ts +35 -0
- package/src/components/Icon/MucIcon.vue +23 -0
- package/src/components/Icon/index.ts +3 -0
- package/src/components/index.ts +2 -0
- package/dist/types/components/Banner/MucBanner.stories.d.ts +0 -76
- package/dist/types/components/Banner/MucBanner.vue.d.ts +0 -52
- package/dist/types/components/Banner/index.d.ts +0 -2
- package/dist/types/components/BuisnessHours/BusinessHourType.d.ts +0 -25
- package/dist/types/components/BuisnessHours/BusinessHours.stories.d.ts +0 -116
- package/dist/types/components/BuisnessHours/MucBusinessHours.vue.d.ts +0 -72
- package/dist/types/components/Button/MucButton.stories.d.ts +0 -158
- package/dist/types/components/Button/MucButton.vue.d.ts +0 -93
- package/dist/types/components/Button/index.d.ts +0 -2
- package/dist/types/components/Callout/MucCallout.stories.d.ts +0 -89
- package/dist/types/components/Callout/MucCallout.vue.d.ts +0 -71
- package/dist/types/components/Callout/index.d.ts +0 -2
- package/dist/types/components/Card/MucCard.stories.d.ts +0 -165
- package/dist/types/components/Card/MucCard.vue.d.ts +0 -44
- package/dist/types/components/Card/MucCardContainer.stories.d.ts +0 -148
- package/dist/types/components/Card/MucCardContainer.vue.d.ts +0 -17
- package/dist/types/components/Card/index.d.ts +0 -3
- package/dist/types/components/Comment/CommentType.d.ts +0 -2
- package/dist/types/components/Comment/MucComment.stories.d.ts +0 -106
- package/dist/types/components/Comment/MucComment.vue.d.ts +0 -103
- package/dist/types/components/Comment/MucCommentText.stories.d.ts +0 -93
- package/dist/types/components/Comment/MucCommentText.vue.d.ts +0 -47
- package/dist/types/components/Comment/index.d.ts +0 -3
- package/dist/types/components/Intro/MucIntro.stories.d.ts +0 -97
- package/dist/types/components/Intro/MucIntro.vue.d.ts +0 -52
- package/dist/types/components/Intro/index.d.ts +0 -2
- package/dist/types/components/index.d.ts +0 -7
- package/dist/types/index.d.ts +0 -7
|
@@ -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
|
+
};
|
|
@@ -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
|
|
2
|
-
const
|
|
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),
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 (
|
|
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",
|
|
52
|
-
|
|
51
|
+
t("div", D, [
|
|
52
|
+
H,
|
|
53
53
|
t("p", null, [
|
|
54
|
-
c(
|
|
54
|
+
c(d.$slots, "default")
|
|
55
55
|
])
|
|
56
56
|
])
|
|
57
|
-
], 10,
|
|
57
|
+
], 10, P)
|
|
58
58
|
])
|
|
59
59
|
]));
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
61
|
+
}), N = ["disabled"], V = {
|
|
62
62
|
key: 0,
|
|
63
63
|
"aria-hidden": "true",
|
|
64
64
|
class: "m-button__icon"
|
|
65
|
-
},
|
|
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 =
|
|
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,36 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
81
81
|
default:
|
|
82
82
|
return "m-button--primary";
|
|
83
83
|
}
|
|
84
|
-
}),
|
|
84
|
+
}), d = u(
|
|
85
|
+
() => s.iconAnimated ? "m-button--animated-right" : ""
|
|
86
|
+
), p = () => {
|
|
85
87
|
n("click");
|
|
86
88
|
};
|
|
87
89
|
return (r, $) => (o(), i("button", {
|
|
88
90
|
onClick: p,
|
|
89
91
|
disabled: r.disabled,
|
|
90
|
-
class: b(["m-button", [l.value,
|
|
92
|
+
class: b(["m-button", [l.value, d.value]])
|
|
91
93
|
}, [
|
|
92
94
|
t("span", null, [
|
|
93
95
|
c(r.$slots, "default"),
|
|
94
|
-
r.icon ? (o(), i("svg",
|
|
96
|
+
r.icon ? (o(), i("svg", V, [
|
|
95
97
|
t("use", {
|
|
96
98
|
"xlink:href": "#icon-" + r.icon
|
|
97
|
-
}, null, 8,
|
|
99
|
+
}, null, 8, W)
|
|
98
100
|
])) : g("", !0)
|
|
99
101
|
])
|
|
100
|
-
], 10,
|
|
102
|
+
], 10, N));
|
|
101
103
|
}
|
|
102
|
-
}), F = ["aria-label"],
|
|
104
|
+
}), F = ["aria-label"], U = { class: "m-callout__inner" }, x = { class: "m-callout__icon" }, X = {
|
|
103
105
|
"aria-hidden": "true",
|
|
104
106
|
class: "icon"
|
|
105
|
-
},
|
|
107
|
+
}, 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
108
|
__name: "MucCallout",
|
|
107
109
|
props: {
|
|
108
110
|
type: { default: "info" }
|
|
109
111
|
},
|
|
110
112
|
setup(a) {
|
|
111
|
-
const e = a, s =
|
|
113
|
+
const e = a, s = u(() => {
|
|
112
114
|
switch (e.type) {
|
|
113
115
|
case "error":
|
|
114
116
|
return "warning";
|
|
@@ -117,7 +119,7 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
117
119
|
default:
|
|
118
120
|
return "information";
|
|
119
121
|
}
|
|
120
|
-
}), n =
|
|
122
|
+
}), n = u(() => {
|
|
121
123
|
switch (e.type) {
|
|
122
124
|
case "error":
|
|
123
125
|
return "m-callout--error";
|
|
@@ -128,7 +130,7 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
128
130
|
default:
|
|
129
131
|
return "m-callout--default";
|
|
130
132
|
}
|
|
131
|
-
}), l =
|
|
133
|
+
}), l = u(() => {
|
|
132
134
|
switch (e.type) {
|
|
133
135
|
case "success":
|
|
134
136
|
return "Erfolgreich";
|
|
@@ -140,28 +142,28 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
140
142
|
return "Information";
|
|
141
143
|
}
|
|
142
144
|
});
|
|
143
|
-
return (
|
|
145
|
+
return (d, p) => (o(), i("div", {
|
|
144
146
|
class: b(["m-callout", n.value]),
|
|
145
147
|
"aria-label": l.value
|
|
146
148
|
}, [
|
|
147
|
-
t("div",
|
|
148
|
-
t("div",
|
|
149
|
-
c(
|
|
150
|
-
(o(), i("svg",
|
|
149
|
+
t("div", U, [
|
|
150
|
+
t("div", x, [
|
|
151
|
+
c(d.$slots, "icon", {}, () => [
|
|
152
|
+
(o(), i("svg", X, [
|
|
151
153
|
t("use", {
|
|
152
154
|
"xlink:href": `#icon-${s.value}`
|
|
153
|
-
}, null, 8,
|
|
155
|
+
}, null, 8, q)
|
|
154
156
|
]))
|
|
155
157
|
], !0)
|
|
156
158
|
]),
|
|
157
|
-
t("div",
|
|
158
|
-
t("div",
|
|
159
|
-
t("div", J, [
|
|
160
|
-
c(u.$slots, "header", {}, void 0, !0)
|
|
161
|
-
]),
|
|
159
|
+
t("div", G, [
|
|
160
|
+
t("div", J, [
|
|
162
161
|
t("div", K, [
|
|
162
|
+
c(d.$slots, "header", {}, void 0, !0)
|
|
163
|
+
]),
|
|
164
|
+
t("div", Q, [
|
|
163
165
|
t("p", null, [
|
|
164
|
-
c(
|
|
166
|
+
c(d.$slots, "content", { class: "m-callout__content" }, void 0, !0)
|
|
165
167
|
])
|
|
166
168
|
])
|
|
167
169
|
])
|
|
@@ -174,10 +176,10 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
174
176
|
for (const [n, l] of e)
|
|
175
177
|
s[n] = l;
|
|
176
178
|
return s;
|
|
177
|
-
},
|
|
179
|
+
}, 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
180
|
key: 0,
|
|
179
181
|
class: "card-tagline"
|
|
180
|
-
},
|
|
182
|
+
}, at = /* @__PURE__ */ tt(() => /* @__PURE__ */ t("div", { class: "muc-divider" }, null, -1)), ot = /* @__PURE__ */ m({
|
|
181
183
|
__name: "MucCard",
|
|
182
184
|
props: {
|
|
183
185
|
title: {},
|
|
@@ -188,67 +190,67 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
188
190
|
const s = e;
|
|
189
191
|
return (n, l) => (o(), i("div", {
|
|
190
192
|
class: "card",
|
|
191
|
-
onClick: l[0] || (l[0] = (
|
|
193
|
+
onClick: l[0] || (l[0] = (d) => s("click", d))
|
|
192
194
|
}, [
|
|
193
|
-
t("div",
|
|
194
|
-
t("div",
|
|
195
|
+
t("div", et, [
|
|
196
|
+
t("div", nt, [
|
|
195
197
|
c(n.$slots, "headerPrefix", {}, void 0, !0),
|
|
196
198
|
t("div", null, [
|
|
197
|
-
n.tagline ? (o(), i("div",
|
|
199
|
+
n.tagline ? (o(), i("div", st, _(n.tagline), 1)) : g("", !0),
|
|
198
200
|
t("div", null, [
|
|
199
201
|
t("h3", null, _(n.title), 1)
|
|
200
202
|
])
|
|
201
203
|
])
|
|
202
204
|
]),
|
|
203
|
-
|
|
205
|
+
at,
|
|
204
206
|
c(n.$slots, "content", {}, void 0, !0)
|
|
205
207
|
])
|
|
206
208
|
]));
|
|
207
209
|
}
|
|
208
|
-
}),
|
|
210
|
+
}), it = /* @__PURE__ */ k(ot, [["__scopeId", "data-v-acf0a1dd"]]), rt = { class: "container card-container" }, ct = /* @__PURE__ */ m({
|
|
209
211
|
__name: "MucCardContainer",
|
|
210
212
|
setup(a) {
|
|
211
|
-
return (e, s) => (o(), i("div",
|
|
213
|
+
return (e, s) => (o(), i("div", rt, [
|
|
212
214
|
c(e.$slots, "default", {}, void 0, !0)
|
|
213
215
|
]));
|
|
214
216
|
}
|
|
215
|
-
}),
|
|
217
|
+
}), 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
218
|
"aria-hidden": "true",
|
|
217
219
|
class: "icon"
|
|
218
220
|
}, [
|
|
219
221
|
/* @__PURE__ */ t("use", { "xlink:href": "#icon-solid-star" })
|
|
220
|
-
], -1),
|
|
221
|
-
|
|
222
|
-
],
|
|
222
|
+
], -1), $t = [
|
|
223
|
+
gt
|
|
224
|
+
], yt = {
|
|
223
225
|
key: 0,
|
|
224
226
|
class: "m-star-rating__item m-star-rating__item--half"
|
|
225
|
-
},
|
|
227
|
+
}, bt = /* @__PURE__ */ t("svg", {
|
|
226
228
|
"aria-hidden": "true",
|
|
227
229
|
class: "icon"
|
|
228
230
|
}, [
|
|
229
231
|
/* @__PURE__ */ t("use", { "xlink:href": "#icon-half-star" })
|
|
230
|
-
], -1),
|
|
231
|
-
|
|
232
|
-
],
|
|
232
|
+
], -1), kt = [
|
|
233
|
+
bt
|
|
234
|
+
], Ct = /* @__PURE__ */ t("svg", {
|
|
233
235
|
"aria-hidden": "true",
|
|
234
236
|
class: "icon"
|
|
235
237
|
}, [
|
|
236
238
|
/* @__PURE__ */ t("use", { "xlink:href": "#icon-solid-star" })
|
|
237
|
-
], -1),
|
|
238
|
-
|
|
239
|
-
],
|
|
239
|
+
], -1), Mt = [
|
|
240
|
+
Ct
|
|
241
|
+
], 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
242
|
__name: "MucComment",
|
|
241
243
|
props: {
|
|
242
244
|
rating: {},
|
|
243
245
|
variant: { default: "listing" }
|
|
244
246
|
},
|
|
245
247
|
setup(a) {
|
|
246
|
-
const e = A(), s = a, n =
|
|
248
|
+
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
249
|
minimumFractionDigits: 1
|
|
248
|
-
})), p =
|
|
250
|
+
})), p = u(() => {
|
|
249
251
|
const r = +(s.rating % 1).toFixed(1);
|
|
250
252
|
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 <=
|
|
253
|
+
return s.rating !== 0 && s.rating !== y && (r <= At ? v++ : r >= Ot ? $++ : C = !0), {
|
|
252
254
|
fullStars: $,
|
|
253
255
|
emptyStars: v,
|
|
254
256
|
isHalfStar: C
|
|
@@ -257,21 +259,21 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
257
259
|
return (r, $) => (o(), i("div", {
|
|
258
260
|
class: b(["m-comment", l.value])
|
|
259
261
|
}, [
|
|
260
|
-
t("div",
|
|
262
|
+
t("div", ut, [
|
|
261
263
|
t("div", dt, [
|
|
262
264
|
c(r.$slots, "initials")
|
|
263
265
|
]),
|
|
264
|
-
t("div",
|
|
265
|
-
t("span",
|
|
266
|
+
t("div", _t, [
|
|
267
|
+
t("span", mt, [
|
|
266
268
|
c(r.$slots, "author")
|
|
267
269
|
]),
|
|
268
|
-
n.value ? (o(), i("span",
|
|
269
|
-
t("span",
|
|
270
|
-
|
|
270
|
+
n.value ? (o(), i("span", ht, [
|
|
271
|
+
t("span", pt, [
|
|
272
|
+
h(" "),
|
|
271
273
|
c(r.$slots, "datePrefix")
|
|
272
274
|
]),
|
|
273
|
-
t("span",
|
|
274
|
-
|
|
275
|
+
t("span", vt, [
|
|
276
|
+
h(" "),
|
|
275
277
|
c(r.$slots, "date")
|
|
276
278
|
])
|
|
277
279
|
])) : g("", !0),
|
|
@@ -283,18 +285,18 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
283
285
|
(o(!0), i(M, null, S(p.value.fullStars, (v) => (o(), i("div", {
|
|
284
286
|
key: v,
|
|
285
287
|
class: "m-star-rating__item m-star-rating__item--full"
|
|
286
|
-
},
|
|
287
|
-
p.value.isHalfStar ? (o(), i("div",
|
|
288
|
+
}, $t))), 128)),
|
|
289
|
+
p.value.isHalfStar ? (o(), i("div", yt, kt)) : g("", !0),
|
|
288
290
|
(o(!0), i(M, null, S(p.value.emptyStars, (v) => (o(), i("div", {
|
|
289
291
|
key: v,
|
|
290
292
|
class: "m-star-rating__item"
|
|
291
|
-
},
|
|
292
|
-
t("div",
|
|
293
|
-
], 8,
|
|
293
|
+
}, Mt))), 128)),
|
|
294
|
+
t("div", St, _(d.value), 1)
|
|
295
|
+
], 8, ft)
|
|
294
296
|
])
|
|
295
297
|
]),
|
|
296
|
-
t("div",
|
|
297
|
-
t("div",
|
|
298
|
+
t("div", wt, [
|
|
299
|
+
t("div", It, [
|
|
298
300
|
c(r.$slots, "headline")
|
|
299
301
|
]),
|
|
300
302
|
t("div", Et, [
|
|
@@ -303,7 +305,7 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
303
305
|
])
|
|
304
306
|
], 2));
|
|
305
307
|
}
|
|
306
|
-
}),
|
|
308
|
+
}), Rt = " ", Tt = /* @__PURE__ */ m({
|
|
307
309
|
__name: "MucCommentText",
|
|
308
310
|
props: {
|
|
309
311
|
datePrefix: { default: "am" },
|
|
@@ -316,47 +318,64 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
316
318
|
variant: { default: "listing" }
|
|
317
319
|
},
|
|
318
320
|
setup(a) {
|
|
319
|
-
const e = a, s =
|
|
320
|
-
return (n, l) => (o(), O(R(
|
|
321
|
+
const e = a, s = u(() => ((e.initials ?? e.author.split(Rt).map((n) => n.charAt(0)).join("")).match(/^.|.$/g) ?? [""]).join(""));
|
|
322
|
+
return (n, l) => (o(), O(R(I), {
|
|
321
323
|
rating: n.rating,
|
|
322
324
|
variant: n.variant
|
|
323
325
|
}, T({
|
|
324
326
|
initials: f(() => [
|
|
325
|
-
|
|
327
|
+
h(_(s.value), 1)
|
|
326
328
|
]),
|
|
327
329
|
datePrefix: f(() => [
|
|
328
|
-
|
|
330
|
+
h("am")
|
|
329
331
|
]),
|
|
330
332
|
author: f(() => [
|
|
331
|
-
|
|
333
|
+
h(_(n.author), 1)
|
|
332
334
|
]),
|
|
333
335
|
headline: f(() => [
|
|
334
|
-
|
|
336
|
+
h(_(n.headline), 1)
|
|
335
337
|
]),
|
|
336
338
|
text: f(() => [
|
|
337
|
-
|
|
339
|
+
h(_(n.text), 1)
|
|
338
340
|
]),
|
|
339
341
|
_: 2
|
|
340
342
|
}, [
|
|
341
343
|
n.date ? {
|
|
342
344
|
name: "date",
|
|
343
345
|
fn: f(() => [
|
|
344
|
-
|
|
346
|
+
h(_(n.date), 1)
|
|
345
347
|
]),
|
|
346
348
|
key: "0"
|
|
347
349
|
} : void 0
|
|
348
350
|
]), 1032, ["rating", "variant"]));
|
|
349
351
|
}
|
|
350
|
-
}),
|
|
352
|
+
}), Lt = ["href"], Pt = /* @__PURE__ */ m({
|
|
353
|
+
__name: "MucIcon",
|
|
354
|
+
props: {
|
|
355
|
+
icon: {},
|
|
356
|
+
color: {}
|
|
357
|
+
},
|
|
358
|
+
setup(a) {
|
|
359
|
+
return (e, s) => (o(), i("svg", {
|
|
360
|
+
"aria-hidden": "true",
|
|
361
|
+
class: "m-button__icon",
|
|
362
|
+
style: L({ color: e.color })
|
|
363
|
+
}, [
|
|
364
|
+
t("use", {
|
|
365
|
+
href: "#icon-" + e.icon
|
|
366
|
+
}, null, 8, Lt)
|
|
367
|
+
], 4));
|
|
368
|
+
}
|
|
369
|
+
}), Dt = {
|
|
351
370
|
class: "m-intro m-intro-static-image",
|
|
352
371
|
style: { "background-color": "var(--color-neutrals-blue-xlight)" }
|
|
353
|
-
},
|
|
372
|
+
}, Ht = { class: "container" }, jt = { style: { width: "66.6%" } }, Nt = {
|
|
354
373
|
key: 0,
|
|
355
374
|
class: "m-intro-vertical__tagline"
|
|
356
|
-
},
|
|
375
|
+
}, Vt = { class: "m-intro-vertical__title" }, Wt = {
|
|
357
376
|
key: 0,
|
|
358
377
|
class: "muc-divider"
|
|
359
|
-
},
|
|
378
|
+
}, zt = { class: "m-intro-vertical__content" }, Ft = { style: { "padding-bottom": "32px" } }, Ut = /* @__PURE__ */ m({
|
|
360
379
|
__name: "MucIntro",
|
|
361
380
|
props: {
|
|
362
381
|
title: {},
|
|
@@ -364,16 +383,16 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
364
383
|
divider: { type: Boolean }
|
|
365
384
|
},
|
|
366
385
|
setup(a) {
|
|
367
|
-
return (e, s) => (o(), i("div",
|
|
368
|
-
t("div",
|
|
369
|
-
t("div",
|
|
386
|
+
return (e, s) => (o(), i("div", Dt, [
|
|
387
|
+
t("div", Ht, [
|
|
388
|
+
t("div", jt, [
|
|
370
389
|
t("div", null, [
|
|
371
|
-
e.tagline ? (o(), i("p",
|
|
372
|
-
t("h1",
|
|
390
|
+
e.tagline ? (o(), i("p", Nt, _(e.tagline), 1)) : g("", !0),
|
|
391
|
+
t("h1", Vt, _(e.title), 1)
|
|
373
392
|
]),
|
|
374
|
-
e.divider ? (o(), i("div",
|
|
375
|
-
t("div",
|
|
376
|
-
t("p",
|
|
393
|
+
e.divider ? (o(), i("div", Wt)) : g("", !0),
|
|
394
|
+
t("div", zt, [
|
|
395
|
+
t("p", Ft, [
|
|
377
396
|
c(e.$slots, "default", {}, void 0, !0)
|
|
378
397
|
])
|
|
379
398
|
])
|
|
@@ -381,30 +400,32 @@ const L = ["role", "aria-label"], P = { class: "container-fluid" }, D = /* @__PU
|
|
|
381
400
|
])
|
|
382
401
|
]));
|
|
383
402
|
}
|
|
384
|
-
}),
|
|
403
|
+
}), xt = /* @__PURE__ */ k(Ut, [["__scopeId", "data-v-3957c1bd"]]), w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
385
404
|
__proto__: null,
|
|
386
|
-
MucBanner:
|
|
387
|
-
MucButton:
|
|
388
|
-
MucCallout:
|
|
389
|
-
MucCard:
|
|
390
|
-
MucCardContainer:
|
|
391
|
-
MucComment:
|
|
392
|
-
MucCommentText:
|
|
393
|
-
|
|
405
|
+
MucBanner: j,
|
|
406
|
+
MucButton: z,
|
|
407
|
+
MucCallout: Z,
|
|
408
|
+
MucCard: it,
|
|
409
|
+
MucCardContainer: lt,
|
|
410
|
+
MucComment: I,
|
|
411
|
+
MucCommentText: Tt,
|
|
412
|
+
MucIcon: Pt,
|
|
413
|
+
MucIntro: xt
|
|
394
414
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
395
|
-
function
|
|
415
|
+
function Xt(a) {
|
|
396
416
|
for (const e in w)
|
|
397
417
|
a.component(e, w[e]);
|
|
398
418
|
}
|
|
399
|
-
const
|
|
419
|
+
const Gt = { install: Xt };
|
|
400
420
|
export {
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
421
|
+
j as MucBanner,
|
|
422
|
+
z as MucButton,
|
|
423
|
+
Z as MucCallout,
|
|
424
|
+
it as MucCard,
|
|
425
|
+
lt as MucCardContainer,
|
|
426
|
+
I as MucComment,
|
|
427
|
+
Tt as MucCommentText,
|
|
428
|
+
Pt as MucIcon,
|
|
429
|
+
xt as MucIntro,
|
|
430
|
+
Gt as default
|
|
410
431
|
};
|
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.
|
|
6
|
+
"version": "1.8.0-beta.9",
|
|
7
7
|
"private": false,
|
|
8
8
|
"module": "./dist/muc-patternlab-vue.es.js",
|
|
9
9
|
"types": "./dist/types/index.d.ts",
|
|
@@ -33,12 +33,11 @@
|
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
35
|
"scripts": {
|
|
36
|
-
"build": "rimraf dist && npm run
|
|
36
|
+
"build": "rimraf dist && npm run build-only",
|
|
37
37
|
"test:unit": "vitest",
|
|
38
38
|
"build-only": "vite build",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"format": "prettier --write ./",
|
|
39
|
+
"lint": "prettier . --check && eslint . --ignore-path .gitignore && vue-tsc -p tsconfig.json --emitDeclarationOnly --skipLibCheck --composite false",
|
|
40
|
+
"fix": "prettier . --write && eslint . --fix --ignore-path .gitignore",
|
|
42
41
|
"semantic-release": "semantic-release",
|
|
43
42
|
"storybook": "storybook dev -p 6006",
|
|
44
43
|
"build-storybook": "storybook build"
|
|
@@ -79,7 +79,9 @@ const buttonVariantClass = computed(() => {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
const iconAnimatedClass = computed(() =>
|
|
82
|
+
const iconAnimatedClass = computed(() =>
|
|
83
|
+
props.iconAnimated ? "m-button--animated-right" : ""
|
|
84
|
+
);
|
|
83
85
|
|
|
84
86
|
const handleClick = () => {
|
|
85
87
|
emit("click");
|
|
@@ -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
|
+
};
|