@bobbykim/mcl-cards 0.7.4 → 0.8.0
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/index.d.ts +244 -423
- package/dist/mcl-cards.js +190 -198
- package/dist/mcl-cards.umd.cjs +2 -2
- package/package.json +11 -11
package/dist/mcl-cards.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.content-height[data-v-
|
|
2
|
-
import { defineComponent as
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.content-height[data-v-9021bcb6]{height:calc(100% - 200px)}.perspective[data-v-0d2f293c]{perspective:1800px}.card[data-v-0d2f293c]{transform-style:preserve-3d;transform:rotateY(0);backface-visibility:hidden}.flip-card[data-v-0d2f293c]{transform:rotateY(360deg)}.card[data-v-237930d5]{background-size:cover;background-position:center center;background-repeat:no-repeat;padding:var(--border-width);animation:bg-spin-237930d5 4s linear infinite}@keyframes bg-spin-237930d5{to{--border-angle: 360deg}}.card[data-v-237930d5]:hover{animation-play-state:paused}@property --border-angle{syntax: "<angle>"; inherits: true; initial-value: 0deg;}')),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
+
import { defineComponent as B, useSlots as L, computed as h, openBlock as g, createElementBlock as m, normalizeClass as n, createElementVNode as s, createCommentVNode as b, unref as A, withModifiers as S, renderSlot as T, toDisplayString as w, ref as R, normalizeStyle as H } from "vue";
|
|
3
3
|
import o from "@bobbykim/manguito-theme";
|
|
4
|
-
const
|
|
4
|
+
const M = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "relative"
|
|
7
|
-
},
|
|
7
|
+
}, E = ["src", "alt"], $ = ["innerHTML"], z = { class: "content-height flex flex-col justify-between" }, G = { class: "min-h-[100px] p-0" }, D = { class: "px-xs pt-sm" }, I = ["innerHTML"], X = ["innerHTML"], N = { class: "w-full px-xs" }, V = ["href", "target"], q = /* @__PURE__ */ B({
|
|
8
8
|
__name: "MclCardA",
|
|
9
9
|
props: {
|
|
10
10
|
title: {},
|
|
@@ -15,7 +15,6 @@ const E = {
|
|
|
15
15
|
displayImage: { type: Boolean, default: !0 },
|
|
16
16
|
imageSource: {},
|
|
17
17
|
imageAlt: {},
|
|
18
|
-
imageCors: { default: "anonymous" },
|
|
19
18
|
displayCta: { type: Boolean, default: !0 },
|
|
20
19
|
ctaAsLink: { type: Boolean, default: !1 },
|
|
21
20
|
ctaText: { default: "cta text" },
|
|
@@ -33,118 +32,111 @@ const E = {
|
|
|
33
32
|
displayShadow: { type: Boolean, default: !0 }
|
|
34
33
|
},
|
|
35
34
|
emits: ["card-click", "card-btn-click"],
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
35
|
+
setup(y, { emit: C }) {
|
|
36
|
+
const i = y;
|
|
38
37
|
L();
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
o("BORDER",
|
|
38
|
+
const u = C, v = h(() => {
|
|
39
|
+
const { borderColor: t, bgColor: r, rounded: e, enlargeOnHover: l, displayShadow: p } = i, d = [
|
|
40
|
+
o("BORDER", t),
|
|
42
41
|
o("BGCOLOR", r)
|
|
43
42
|
];
|
|
44
|
-
return
|
|
45
|
-
},
|
|
46
|
-
const l = [
|
|
47
|
-
o("H3",
|
|
43
|
+
return d.push(e ? "rounded-md" : "rounded-sm"), l && d.push("hover:scale-105 transition ease-in duration-300"), p && d.push("drop-shadow-md"), d.join(" ");
|
|
44
|
+
}), f = h(() => {
|
|
45
|
+
const { titleSize: t, titleColor: r, displayHighlight: e } = i, l = [
|
|
46
|
+
o("H3", t),
|
|
48
47
|
o("TEXTCOLOR", r)
|
|
49
48
|
];
|
|
50
|
-
return
|
|
51
|
-
}, k = (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
return l.push(e ? "mb-2xs" : "mb-xs"), l.join(" ");
|
|
50
|
+
}), k = h(() => {
|
|
51
|
+
const { labelTextColor: t, labelColor: r } = i;
|
|
52
|
+
return [
|
|
53
|
+
o("TEXTCOLOR", t),
|
|
54
|
+
o("BGCOLOR", r)
|
|
55
|
+
].join(" ");
|
|
56
|
+
}), x = h(() => {
|
|
57
|
+
const { ctaColor: t, rounded: r } = i, e = [o("BTNCOLOR", t)];
|
|
58
|
+
let p = ["light-1", "light-2", "light-3", "light-4"].includes(t) ? "text-black" : "text-white";
|
|
59
|
+
return e.push(p), r && e.push("btn-round"), e.join(" ");
|
|
60
|
+
}), a = (t) => {
|
|
61
|
+
const { title: r, ctaLink: e, ctaTarget: l, ctaAsLink: p } = i, d = {
|
|
60
62
|
title: r,
|
|
61
|
-
url:
|
|
63
|
+
url: e,
|
|
62
64
|
target: l || "_self"
|
|
63
65
|
};
|
|
64
|
-
!
|
|
65
|
-
},
|
|
66
|
-
const { title: r, ctaLink:
|
|
67
|
-
|
|
66
|
+
!p && t.preventDefault(), u("card-btn-click", t, d);
|
|
67
|
+
}, c = (t) => {
|
|
68
|
+
const { title: r, ctaLink: e, ctaTarget: l } = i;
|
|
69
|
+
u("card-click", t, {
|
|
68
70
|
title: r,
|
|
69
|
-
url:
|
|
71
|
+
url: e,
|
|
70
72
|
target: l || "_self"
|
|
71
73
|
});
|
|
72
74
|
};
|
|
73
|
-
return (
|
|
74
|
-
class:
|
|
75
|
-
|
|
76
|
-
y(
|
|
77
|
-
e.borderColor,
|
|
78
|
-
e.bgColor,
|
|
79
|
-
e.rounded,
|
|
80
|
-
e.enlargeOnHover,
|
|
81
|
-
e.displayShadow
|
|
82
|
-
)
|
|
83
|
-
]),
|
|
84
|
-
onClick: d
|
|
75
|
+
return (t, r) => (g(), m("div", {
|
|
76
|
+
class: n(["overflow-hidden border max-w-[450px] sm:max-w-[350px] w-full xs:w-auto flex-grow flex-shrink-0 cursor-pointer", v.value]),
|
|
77
|
+
onClick: c
|
|
85
78
|
}, [
|
|
86
|
-
|
|
79
|
+
t.displayImage ? (g(), m("div", M, [
|
|
87
80
|
s("img", {
|
|
88
|
-
src:
|
|
89
|
-
alt:
|
|
90
|
-
crossorigin: e.imageCors,
|
|
81
|
+
src: t.imageSource,
|
|
82
|
+
alt: t.imageAlt,
|
|
91
83
|
class: "object-cover object-top h-[220px] min-w-full"
|
|
92
|
-
}, null, 8,
|
|
93
|
-
|
|
84
|
+
}, null, 8, E),
|
|
85
|
+
t.displayLabel ? (g(), m("span", {
|
|
94
86
|
key: 0,
|
|
95
|
-
class:
|
|
96
|
-
innerHTML:
|
|
97
|
-
}, null, 10,
|
|
98
|
-
])) :
|
|
99
|
-
s("div",
|
|
100
|
-
s("div",
|
|
101
|
-
s("div",
|
|
102
|
-
!
|
|
87
|
+
class: n(["py-3xs px-2xs ml-xs inline-block font-bold text-xs absolute bottom-0 translate-y-[50%]", k.value]),
|
|
88
|
+
innerHTML: t.labelText
|
|
89
|
+
}, null, 10, $)) : b("", !0)
|
|
90
|
+
])) : b("", !0),
|
|
91
|
+
s("div", z, [
|
|
92
|
+
s("div", G, [
|
|
93
|
+
s("div", D, [
|
|
94
|
+
!t.displayImage && t.displayLabel ? (g(), m("span", {
|
|
103
95
|
key: 0,
|
|
104
|
-
class:
|
|
105
|
-
innerHTML:
|
|
106
|
-
}, null, 10,
|
|
96
|
+
class: n(["py-3xs px-2xs mb-2xs inline-block font-bold text-xs", k.value]),
|
|
97
|
+
innerHTML: t.labelText
|
|
98
|
+
}, null, 10, I)) : b("", !0),
|
|
107
99
|
s("h3", {
|
|
108
|
-
class:
|
|
109
|
-
innerHTML:
|
|
110
|
-
}, null, 10,
|
|
111
|
-
|
|
100
|
+
class: n(f.value),
|
|
101
|
+
innerHTML: t.title
|
|
102
|
+
}, null, 10, X),
|
|
103
|
+
t.displayHighlight ? (g(), m("div", {
|
|
112
104
|
key: 1,
|
|
113
|
-
class:
|
|
114
|
-
}, null, 2)) :
|
|
105
|
+
class: n(["mb-xs h-3xs w-md", A(o)("BGCOLOR", t.highlightColor)])
|
|
106
|
+
}, null, 2)) : b("", !0),
|
|
115
107
|
s("div", {
|
|
116
108
|
class: "mb-sm cursor-default",
|
|
117
|
-
onClick: r[0] || (r[0] =
|
|
109
|
+
onClick: r[0] || (r[0] = S(() => {
|
|
118
110
|
}, ["stop"]))
|
|
119
111
|
}, [
|
|
120
|
-
T(
|
|
112
|
+
T(t.$slots, "default", {}, void 0, !0)
|
|
121
113
|
])
|
|
122
114
|
])
|
|
123
115
|
]),
|
|
124
|
-
|
|
116
|
+
t.displayCta ? (g(), m("div", {
|
|
125
117
|
key: 0,
|
|
126
118
|
class: "pb-sm border-0 cursor-default",
|
|
127
|
-
onClick: r[2] || (r[2] =
|
|
119
|
+
onClick: r[2] || (r[2] = S(() => {
|
|
128
120
|
}, ["stop"]))
|
|
129
121
|
}, [
|
|
130
|
-
s("div",
|
|
122
|
+
s("div", N, [
|
|
131
123
|
s("a", {
|
|
132
|
-
href:
|
|
133
|
-
target:
|
|
134
|
-
class:
|
|
135
|
-
onClick: r[1] || (r[1] = (
|
|
136
|
-
},
|
|
124
|
+
href: t.ctaLink,
|
|
125
|
+
target: t.ctaTarget,
|
|
126
|
+
class: n(["btn btn-full", x.value]),
|
|
127
|
+
onClick: r[1] || (r[1] = (e) => a(e))
|
|
128
|
+
}, w(t.ctaText), 11, V)
|
|
137
129
|
])
|
|
138
|
-
])) :
|
|
130
|
+
])) : b("", !0)
|
|
139
131
|
])
|
|
140
132
|
], 2));
|
|
141
133
|
}
|
|
142
|
-
}),
|
|
143
|
-
const
|
|
144
|
-
for (const [
|
|
145
|
-
|
|
146
|
-
return
|
|
147
|
-
},
|
|
134
|
+
}), _ = (y, C) => {
|
|
135
|
+
const i = y.__vccOpts || y;
|
|
136
|
+
for (const [u, v] of C)
|
|
137
|
+
i[u] = v;
|
|
138
|
+
return i;
|
|
139
|
+
}, lt = /* @__PURE__ */ _(q, [["__scopeId", "data-v-9021bcb6"]]), W = ["href", "target"], F = { class: "absolute z-[15] flex flex-col justify-end items-start inset-0 p-xs [@media(hover:hover)]:opacity-0 hover:opacity-100 peer transition-opacity duration-200" }, P = ["innerHTML"], Y = ["src", "alt"], rt = /* @__PURE__ */ B({
|
|
148
140
|
__name: "MclCardB",
|
|
149
141
|
props: {
|
|
150
142
|
title: {},
|
|
@@ -154,7 +146,6 @@ const E = {
|
|
|
154
146
|
borderColor: { default: "light-3" },
|
|
155
147
|
imageSource: {},
|
|
156
148
|
imageAlt: {},
|
|
157
|
-
imageCors: { default: "anonymous" },
|
|
158
149
|
displayGrayScale: { type: Boolean, default: !0 },
|
|
159
150
|
ctaAsLink: { type: Boolean, default: !1 },
|
|
160
151
|
ctaLink: { default: "#" },
|
|
@@ -162,51 +153,56 @@ const E = {
|
|
|
162
153
|
rounded: { type: Boolean, default: !1 }
|
|
163
154
|
},
|
|
164
155
|
emits: ["card-click"],
|
|
165
|
-
setup(
|
|
166
|
-
const
|
|
156
|
+
setup(y, { emit: C }) {
|
|
157
|
+
const i = y;
|
|
167
158
|
L();
|
|
168
|
-
const
|
|
169
|
-
const
|
|
170
|
-
return
|
|
171
|
-
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
159
|
+
const u = C, v = h(() => {
|
|
160
|
+
const { borderColor: a, rounded: c } = i, t = [o("BORDER", a)];
|
|
161
|
+
return t.push(c ? "rounded-md" : "rounded-sm"), t.join(" ");
|
|
162
|
+
}), f = h(() => {
|
|
163
|
+
const { displayGrayScale: a } = i;
|
|
164
|
+
return a ? "[@media(hover:hover)]:grayscale peer-hover:grayscale-0" : "";
|
|
165
|
+
}), k = h(() => {
|
|
166
|
+
const { titleSize: a, titleColor: c, titleBlockColor: t } = i;
|
|
167
|
+
return [
|
|
168
|
+
o("H3", a),
|
|
169
|
+
o("TEXTCOLOR", c),
|
|
170
|
+
o("BGCOLOR", t)
|
|
171
|
+
].join(" ");
|
|
172
|
+
}), x = (a) => {
|
|
173
|
+
const { title: c, ctaLink: t, ctaTarget: r, ctaAsLink: e } = i;
|
|
174
|
+
!e && a.preventDefault();
|
|
178
175
|
const l = {
|
|
179
|
-
title:
|
|
180
|
-
url:
|
|
176
|
+
title: c,
|
|
177
|
+
url: t,
|
|
181
178
|
target: r || "_self"
|
|
182
179
|
};
|
|
183
|
-
console.log(l),
|
|
180
|
+
console.log(l), u("card-click", a, l);
|
|
184
181
|
};
|
|
185
|
-
return (a,
|
|
186
|
-
class:
|
|
182
|
+
return (a, c) => (g(), m("div", {
|
|
183
|
+
class: n(["relative max-w-[450px] sm:max-w-[350px] w-full xs:w-auto flex-grow flex-shrink-0 cursor-pointer overflow-hidden border", v.value])
|
|
187
184
|
}, [
|
|
188
185
|
s("a", {
|
|
189
186
|
href: a.ctaLink,
|
|
190
187
|
target: a.ctaTarget,
|
|
191
|
-
onClick:
|
|
188
|
+
onClick: c[0] || (c[0] = (t) => x(t))
|
|
192
189
|
}, [
|
|
193
|
-
s("div",
|
|
190
|
+
s("div", F, [
|
|
194
191
|
s("h3", {
|
|
195
192
|
innerHTML: a.title,
|
|
196
|
-
class:
|
|
197
|
-
}, null, 10,
|
|
193
|
+
class: n(["inline-block px-xs py-2xs mb-2xs pointer-events-none tracking-wide", k.value])
|
|
194
|
+
}, null, 10, P),
|
|
198
195
|
T(a.$slots, "default")
|
|
199
196
|
]),
|
|
200
197
|
s("img", {
|
|
201
198
|
src: a.imageSource,
|
|
202
199
|
alt: a.imageAlt,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
], 8, F)
|
|
200
|
+
class: n(["relative h-full w-full z-10 object-cover object-center aspect-[3/4] transition-all duration-200", f.value])
|
|
201
|
+
}, null, 10, Y)
|
|
202
|
+
], 8, W)
|
|
207
203
|
], 2));
|
|
208
204
|
}
|
|
209
|
-
}),
|
|
205
|
+
}), J = ["src", "alt"], K = /* @__PURE__ */ B({
|
|
210
206
|
__name: "MclCardC",
|
|
211
207
|
props: {
|
|
212
208
|
imageSource: {},
|
|
@@ -218,70 +214,64 @@ const E = {
|
|
|
218
214
|
highlightColor: { default: "light-3" },
|
|
219
215
|
highlightOpacity: { default: 80 },
|
|
220
216
|
displayTitle: { type: Boolean, default: !1 },
|
|
221
|
-
cardColor: { default: "primary" }
|
|
222
|
-
imageCors: { default: "anonymous" }
|
|
217
|
+
cardColor: { default: "primary" }
|
|
223
218
|
},
|
|
224
219
|
emits: ["card-click"],
|
|
225
|
-
setup(
|
|
226
|
-
const
|
|
220
|
+
setup(y, { emit: C }) {
|
|
221
|
+
const i = y;
|
|
227
222
|
L();
|
|
228
|
-
const
|
|
229
|
-
const a = [o("BGCOLOR",
|
|
230
|
-
return
|
|
231
|
-
}), k = (
|
|
232
|
-
const
|
|
223
|
+
const u = R(!1), v = C, f = h(() => {
|
|
224
|
+
const a = [o("BGCOLOR", i.cardColor)];
|
|
225
|
+
return u.value && a.push("flip-card"), a.join(" ");
|
|
226
|
+
}), k = h(() => {
|
|
227
|
+
const {
|
|
228
|
+
titleSize: a,
|
|
229
|
+
titleColor: c,
|
|
230
|
+
displayHighlight: t,
|
|
231
|
+
highlightColor: r,
|
|
232
|
+
highlightOpacity: e
|
|
233
|
+
} = i, l = [
|
|
233
234
|
o("H3", a),
|
|
234
|
-
o("TEXTCOLOR",
|
|
235
|
+
o("TEXTCOLOR", c)
|
|
235
236
|
];
|
|
236
|
-
return
|
|
237
|
-
},
|
|
238
|
-
a.preventDefault(),
|
|
237
|
+
return t && (l.push("px-xs py-2xs mb-2xs rounded"), l.push(o("BGCOLOR", r)), l.push(o("BGOPACITY", e))), l.join(" ");
|
|
238
|
+
}), x = (a) => {
|
|
239
|
+
a.preventDefault(), u.value && v("card-click", a), u.value = !0;
|
|
239
240
|
};
|
|
240
|
-
return (a,
|
|
241
|
-
class:
|
|
242
|
-
onClick:
|
|
241
|
+
return (a, c) => (g(), m("div", {
|
|
242
|
+
class: n(["relative aspect-square card transition duration-[1600ms] max-h-[400px] overflow-hidden", f.value]),
|
|
243
|
+
onClick: x
|
|
243
244
|
}, [
|
|
244
245
|
s("img", {
|
|
245
246
|
src: a.imageSource,
|
|
246
247
|
alt: a.imageAlt,
|
|
247
|
-
class:
|
|
248
|
-
|
|
249
|
-
"absolute
|
|
250
|
-
])
|
|
251
|
-
|
|
252
|
-
}, null, 10, K),
|
|
248
|
+
class: n([
|
|
249
|
+
u.value ? "opacity-100" : "opacity-0",
|
|
250
|
+
"absolute w-full h-full object-cover object-center aspect-square transition-opacity delay-500 duration-[800ms]"
|
|
251
|
+
])
|
|
252
|
+
}, null, 10, J),
|
|
253
253
|
s("div", {
|
|
254
|
-
class:
|
|
255
|
-
|
|
254
|
+
class: n([
|
|
255
|
+
u.value ? "cursor-pointer opacity-100" : "opacity-0",
|
|
256
256
|
"relative flex flex-col justify-end p-sm h-full transition delay-500 duration-[800ms]"
|
|
257
257
|
])
|
|
258
258
|
}, [
|
|
259
|
-
a.displayTitle ? (
|
|
259
|
+
a.displayTitle ? (g(), m("h3", {
|
|
260
260
|
key: 0,
|
|
261
|
-
class:
|
|
262
|
-
"relative self-start",
|
|
263
|
-
k(
|
|
264
|
-
a.titleSize,
|
|
265
|
-
a.titleColor,
|
|
266
|
-
a.displayHighlight,
|
|
267
|
-
a.highlightColor,
|
|
268
|
-
a.highlightOpacity
|
|
269
|
-
)
|
|
270
|
-
])
|
|
261
|
+
class: n(["relative self-start", k.value])
|
|
271
262
|
}, [
|
|
272
|
-
s("span", null,
|
|
273
|
-
], 2)) :
|
|
263
|
+
s("span", null, w(a.title), 1)
|
|
264
|
+
], 2)) : b("", !0),
|
|
274
265
|
T(a.$slots, "card-body", {}, void 0, !0)
|
|
275
266
|
], 2)
|
|
276
267
|
], 2));
|
|
277
268
|
}
|
|
278
|
-
}),
|
|
269
|
+
}), ot = /* @__PURE__ */ _(K, [["__scopeId", "data-v-0d2f293c"]]), Q = { class: "flex flex-col rounded-md overflow-hidden" }, U = ["src", "alt"], Z = ["href", "target"], tt = /* @__PURE__ */ B({
|
|
279
270
|
__name: "MclCardD",
|
|
280
271
|
props: {
|
|
281
272
|
displayImage: { type: Boolean, default: !0 },
|
|
282
273
|
imageSource: {},
|
|
283
274
|
imageAlt: { default: "" },
|
|
284
|
-
imageCors: { default: "anonymous" },
|
|
285
275
|
title: {},
|
|
286
276
|
titleSize: { default: "md" },
|
|
287
277
|
titleColor: { default: "dark-4" },
|
|
@@ -302,8 +292,8 @@ const E = {
|
|
|
302
292
|
customColor: {}
|
|
303
293
|
},
|
|
304
294
|
emits: ["card-click"],
|
|
305
|
-
setup(
|
|
306
|
-
const
|
|
295
|
+
setup(y, { emit: C }) {
|
|
296
|
+
const i = {
|
|
307
297
|
primary: "from-primary",
|
|
308
298
|
secondary: "from-secondary",
|
|
309
299
|
success: "from-success",
|
|
@@ -321,7 +311,7 @@ const E = {
|
|
|
321
311
|
black: "from-black",
|
|
322
312
|
white: "from-white",
|
|
323
313
|
transparent: "from-transparent"
|
|
324
|
-
},
|
|
314
|
+
}, u = {
|
|
325
315
|
primary: "via-primary",
|
|
326
316
|
secondary: "via-secondary",
|
|
327
317
|
success: "via-success",
|
|
@@ -339,7 +329,7 @@ const E = {
|
|
|
339
329
|
black: "via-black",
|
|
340
330
|
white: "via-white",
|
|
341
331
|
transparent: "via-transparent"
|
|
342
|
-
},
|
|
332
|
+
}, v = {
|
|
343
333
|
primary: "to-primary",
|
|
344
334
|
secondary: "to-secondary",
|
|
345
335
|
success: "to-success",
|
|
@@ -357,75 +347,77 @@ const E = {
|
|
|
357
347
|
black: "to-black",
|
|
358
348
|
white: "to-white",
|
|
359
349
|
transparent: "to-transparent"
|
|
360
|
-
},
|
|
350
|
+
}, f = y;
|
|
361
351
|
L();
|
|
362
|
-
const k = C,
|
|
363
|
-
|
|
364
|
-
o("TEXTCOLOR", l)
|
|
365
|
-
].join(" "), a = (t, l, u) => {
|
|
366
|
-
const n = [], O = ["light-1", "light-2", "light-3", "light-4"];
|
|
367
|
-
return t || n.push("mcl-link"), t && (n.push("btn"), n.push(o("BTNCOLOR", l))), t && u && n.push("btn-full"), t && !O.includes(l) && n.push("text-white"), n.join(" ");
|
|
368
|
-
}, d = S(() => ({
|
|
369
|
-
"--border-width": `${g.borderWidth}px`
|
|
370
|
-
})), e = S(() => {
|
|
371
|
-
const t = p[g.borderColor], l = c[g.gradient1], u = y[g.gradient2];
|
|
352
|
+
const k = C, x = h(() => {
|
|
353
|
+
const { titleSize: e, titleColor: l } = f;
|
|
372
354
|
return [
|
|
373
|
-
o("
|
|
374
|
-
|
|
355
|
+
o("H2", e),
|
|
356
|
+
o("TEXTCOLOR", l)
|
|
357
|
+
].join(" ");
|
|
358
|
+
}), a = h(() => {
|
|
359
|
+
const { ctaButton: e, ctaButtonColor: l, ctaButtonBlock: p } = f, d = [], O = ["light-1", "light-2", "light-3", "light-4"];
|
|
360
|
+
return e ? d.push("btn", o("BTNCOLOR", l)) : d.push("mcl-link"), e && p && d.push("btn-full"), e && !O.includes(l) && d.push("text-white"), d.join(" ");
|
|
361
|
+
}), c = h(() => ({
|
|
362
|
+
"--border-width": `${f.borderWidth}px`
|
|
363
|
+
})), t = h(() => {
|
|
364
|
+
const e = i[f.borderColor], l = u[f.gradient1], p = v[f.gradient2];
|
|
365
|
+
return [
|
|
366
|
+
o("BORDER", f.borderColor),
|
|
367
|
+
e,
|
|
375
368
|
l,
|
|
376
|
-
|
|
369
|
+
p
|
|
377
370
|
].join(" ");
|
|
378
|
-
}), r = (
|
|
379
|
-
const { title: l, ctaLink:
|
|
371
|
+
}), r = (e) => {
|
|
372
|
+
const { title: l, ctaLink: p, ctaLinkTarget: d, ctaAsLink: O } = f, j = {
|
|
380
373
|
title: l,
|
|
381
|
-
url:
|
|
382
|
-
target:
|
|
374
|
+
url: p,
|
|
375
|
+
target: d || "_self"
|
|
383
376
|
};
|
|
384
|
-
!O &&
|
|
377
|
+
!O && e.preventDefault(), k("card-click", e, j);
|
|
385
378
|
};
|
|
386
|
-
return (
|
|
387
|
-
class:
|
|
388
|
-
style:
|
|
379
|
+
return (e, l) => (g(), m("div", {
|
|
380
|
+
class: n(["card [--border-angle:0deg] bg-[conic-gradient(from_var(--border-angle),var(--tw-gradient-stops))] from-20% overflow-hidden rounded-md max-w-[450px] sm:max-w-[350px] w-full xs:w-auto flex-grow flex-shrink-0 border", t.value]),
|
|
381
|
+
style: H(c.value)
|
|
389
382
|
}, [
|
|
390
|
-
s("div",
|
|
391
|
-
|
|
383
|
+
s("div", Q, [
|
|
384
|
+
e.displayImage ? (g(), m("img", {
|
|
392
385
|
key: 0,
|
|
393
|
-
src:
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}, null, 8, Z)) : v("", !0),
|
|
386
|
+
src: e.imageSource,
|
|
387
|
+
class: "object-cover object-top max-h-[200px] min-w-full",
|
|
388
|
+
alt: e.imageAlt
|
|
389
|
+
}, null, 8, U)) : b("", !0),
|
|
398
390
|
s("div", {
|
|
399
|
-
class:
|
|
391
|
+
class: n(["p-xs", A(o)("BGCOLOR", e.bgColor)])
|
|
400
392
|
}, [
|
|
401
393
|
s("h3", {
|
|
402
|
-
class:
|
|
403
|
-
},
|
|
404
|
-
|
|
394
|
+
class: n(["mb-xs", x.value])
|
|
395
|
+
}, w(e.title), 3),
|
|
396
|
+
e.displayHighlight ? (g(), m("div", {
|
|
405
397
|
key: 0,
|
|
406
|
-
class:
|
|
407
|
-
}, null, 2)) :
|
|
398
|
+
class: n(["mb-xs h-3xs w-md", A(o)("BGCOLOR", e.highlightColor)])
|
|
399
|
+
}, null, 2)) : b("", !0),
|
|
408
400
|
s("div", null, [
|
|
409
|
-
T(
|
|
401
|
+
T(e.$slots, "default", {}, void 0, !0)
|
|
410
402
|
]),
|
|
411
403
|
s("div", {
|
|
412
|
-
class:
|
|
404
|
+
class: n(["mt-xs", { "mb-2xs": !e.ctaButton }])
|
|
413
405
|
}, [
|
|
414
406
|
s("a", {
|
|
415
|
-
href:
|
|
416
|
-
target:
|
|
417
|
-
class:
|
|
407
|
+
href: e.ctaLink,
|
|
408
|
+
target: e.ctaLinkTarget,
|
|
409
|
+
class: n(a.value),
|
|
418
410
|
onClick: r
|
|
419
|
-
},
|
|
411
|
+
}, w(e.ctaText), 11, Z)
|
|
420
412
|
], 2)
|
|
421
413
|
], 2)
|
|
422
414
|
])
|
|
423
415
|
], 6));
|
|
424
416
|
}
|
|
425
|
-
}),
|
|
417
|
+
}), st = /* @__PURE__ */ _(tt, [["__scopeId", "data-v-237930d5"]]);
|
|
426
418
|
export {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
419
|
+
lt as MclCardA,
|
|
420
|
+
rt as MclCardB,
|
|
421
|
+
ot as MclCardC,
|
|
422
|
+
st as MclCardD
|
|
431
423
|
};
|