@bobbykim/mcl-container 0.8.7 → 0.8.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/index.d.ts +30 -38
- package/dist/mcl-container.js +142 -147
- package/dist/mcl-container.umd.cjs +2 -2
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -8,56 +8,47 @@ import { HeadingLevel } from '@bobbykim/manguito-theme';
|
|
|
8
8
|
import { HeadingSize } from '@bobbykim/manguito-theme';
|
|
9
9
|
import { PublicProps } from 'vue';
|
|
10
10
|
|
|
11
|
-
declare const __VLS_component: DefineComponent<
|
|
12
|
-
sectionBg?: ColorPalette;
|
|
13
|
-
containerBg?: ColorPalette;
|
|
14
|
-
topDirection?: DirectionX;
|
|
15
|
-
bottomDirection?: DirectionX;
|
|
16
|
-
twoColumns?: boolean;
|
|
17
|
-
leftColumnWidth?: ColumnWidth;
|
|
18
|
-
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
19
|
-
sectionBg?: ColorPalette;
|
|
20
|
-
containerBg?: ColorPalette;
|
|
21
|
-
topDirection?: DirectionX;
|
|
22
|
-
bottomDirection?: DirectionX;
|
|
23
|
-
twoColumns?: boolean;
|
|
24
|
-
leftColumnWidth?: ColumnWidth;
|
|
25
|
-
}> & Readonly<{}>, {
|
|
11
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
26
12
|
sectionBg: ColorPalette;
|
|
27
13
|
containerBg: ColorPalette;
|
|
28
14
|
topDirection: DirectionX;
|
|
29
15
|
bottomDirection: DirectionX;
|
|
30
16
|
twoColumns: boolean;
|
|
31
17
|
leftColumnWidth: ColumnWidth;
|
|
32
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {},
|
|
18
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
|
|
33
19
|
|
|
34
|
-
declare const __VLS_component_2: DefineComponent<
|
|
35
|
-
sectionBgColor?: ColorPalette;
|
|
36
|
-
containerBgColor?: ColorPalette;
|
|
37
|
-
imageSource: string;
|
|
38
|
-
imageAlt: string;
|
|
39
|
-
title: string;
|
|
40
|
-
titleLevel?: HeadingLevel;
|
|
41
|
-
titleSize?: HeadingSize;
|
|
42
|
-
titleColor?: ColorPalette;
|
|
43
|
-
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{
|
|
44
|
-
sectionBgColor?: ColorPalette;
|
|
45
|
-
containerBgColor?: ColorPalette;
|
|
46
|
-
imageSource: string;
|
|
47
|
-
imageAlt: string;
|
|
48
|
-
title: string;
|
|
49
|
-
titleLevel?: HeadingLevel;
|
|
50
|
-
titleSize?: HeadingSize;
|
|
51
|
-
titleColor?: ColorPalette;
|
|
52
|
-
}> & Readonly<{}>, {
|
|
20
|
+
declare const __VLS_component_2: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{}>, {
|
|
53
21
|
sectionBgColor: ColorPalette;
|
|
54
22
|
containerBgColor: ColorPalette;
|
|
55
23
|
titleLevel: HeadingLevel;
|
|
56
24
|
titleSize: HeadingSize;
|
|
57
25
|
titleColor: ColorPalette;
|
|
58
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
26
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
27
|
+
mainContentElem: HTMLDivElement;
|
|
28
|
+
}, HTMLElement>;
|
|
29
|
+
|
|
30
|
+
declare type __VLS_Props = {
|
|
31
|
+
sectionBg?: ColorPalette;
|
|
32
|
+
containerBg?: ColorPalette;
|
|
33
|
+
topDirection?: DirectionX;
|
|
34
|
+
bottomDirection?: DirectionX;
|
|
35
|
+
twoColumns?: boolean;
|
|
36
|
+
leftColumnWidth?: ColumnWidth;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
declare type __VLS_Props_2 = {
|
|
40
|
+
sectionBgColor?: ColorPalette;
|
|
41
|
+
containerBgColor?: ColorPalette;
|
|
42
|
+
imageSource: string;
|
|
43
|
+
imageAlt: string;
|
|
44
|
+
title: string;
|
|
45
|
+
titleLevel?: HeadingLevel;
|
|
46
|
+
titleSize?: HeadingSize;
|
|
47
|
+
titleColor?: ColorPalette;
|
|
48
|
+
};
|
|
59
49
|
|
|
60
50
|
declare function __VLS_template(): {
|
|
51
|
+
attrs: Partial<{}>;
|
|
61
52
|
slots: Readonly<{
|
|
62
53
|
'left-column': any;
|
|
63
54
|
'right-column': any;
|
|
@@ -66,10 +57,11 @@ declare function __VLS_template(): {
|
|
|
66
57
|
'right-column': any;
|
|
67
58
|
};
|
|
68
59
|
refs: {};
|
|
69
|
-
|
|
60
|
+
rootEl: HTMLElement;
|
|
70
61
|
};
|
|
71
62
|
|
|
72
63
|
declare function __VLS_template_2(): {
|
|
64
|
+
attrs: Partial<{}>;
|
|
73
65
|
slots: Readonly<{
|
|
74
66
|
content: any;
|
|
75
67
|
}> & {
|
|
@@ -78,7 +70,7 @@ declare function __VLS_template_2(): {
|
|
|
78
70
|
refs: {
|
|
79
71
|
mainContentElem: HTMLDivElement;
|
|
80
72
|
};
|
|
81
|
-
|
|
73
|
+
rootEl: HTMLElement;
|
|
82
74
|
};
|
|
83
75
|
|
|
84
76
|
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
package/dist/mcl-container.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".space-hts[data-v-
|
|
2
|
-
import { defineComponent as
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".space-hts[data-v-f0d22262]{height:calc(var(--space-height) + 36px)}@media screen and (min-width:768px){.space-hts[data-v-f0d22262]{height:calc(var(--space-height) + 48px)}}@media screen and (min-width:1024px){.space-hts[data-v-f0d22262]{height:calc(var(--space-height) + 64px)}}.bg-image[data-v-f0d22262]{background-image:var(--bg-image)}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
+
import { defineComponent as R, useSlots as $, openBlock as g, createElementBlock as b, normalizeClass as d, unref as v, createElementVNode as c, renderSlot as B, createCommentVNode as G, onMounted as L, nextTick as M, getCurrentScope as D, onScopeDispose as E, getCurrentInstance as A, computed as x, shallowRef as S, watch as k, toValue as W, ref as I, normalizeStyle as _, createBlock as H, resolveDynamicComponent as V, withCtx as T, toDisplayString as F } from "vue";
|
|
3
3
|
import u from "@bobbykim/manguito-theme";
|
|
4
|
-
const N = { class: "
|
|
4
|
+
const N = { class: "lg:min-h-15 relative min-h-9 md:min-h-12" }, P = ["points"], j = { class: "container grid gap-4 md:grid-cols-4" }, U = { class: "lg:min-h-15 relative min-h-9 md:min-h-12" }, X = ["points"], de = /* @__PURE__ */ R({
|
|
5
5
|
__name: "MclContainerA",
|
|
6
6
|
props: {
|
|
7
7
|
sectionBg: { default: "light-1" },
|
|
@@ -12,11 +12,11 @@ const N = { class: "relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]" }, P
|
|
|
12
12
|
leftColumnWidth: { default: 50 }
|
|
13
13
|
},
|
|
14
14
|
setup(e) {
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
15
|
+
$();
|
|
16
|
+
const t = (l, s) => l === "top" ? s === "left" ? "0,0 100,100 0,100" : "100,0 100,100 0,100" : s === "left" ? "0,0 100,0 0,100" : "0,0 100,0 100,100", o = (l, s) => {
|
|
17
|
+
if (!l)
|
|
18
18
|
return "md:col-span-4";
|
|
19
|
-
switch (
|
|
19
|
+
switch (s) {
|
|
20
20
|
case 25:
|
|
21
21
|
return "md:col-span-1";
|
|
22
22
|
case 50:
|
|
@@ -28,70 +28,69 @@ const N = { class: "relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]" }, P
|
|
|
28
28
|
default:
|
|
29
29
|
return "";
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
if (!
|
|
31
|
+
}, a = (l, s) => {
|
|
32
|
+
if (!l)
|
|
33
33
|
return "";
|
|
34
|
-
switch (
|
|
34
|
+
switch (s) {
|
|
35
35
|
case 25:
|
|
36
36
|
return "md:col-span-3";
|
|
37
37
|
case 50:
|
|
38
38
|
return "md:col-span-2";
|
|
39
39
|
case 75:
|
|
40
40
|
return "md:col-span-1";
|
|
41
|
-
case 100:
|
|
42
41
|
default:
|
|
43
42
|
return "";
|
|
44
43
|
}
|
|
45
44
|
};
|
|
46
|
-
return (
|
|
47
|
-
class:
|
|
45
|
+
return (l, s) => (g(), b("section", {
|
|
46
|
+
class: d(["py-lg lg:py-xl", v(u)("BGCOLOR", e.sectionBg)])
|
|
48
47
|
}, [
|
|
49
|
-
|
|
50
|
-
(
|
|
51
|
-
class:
|
|
48
|
+
c("div", N, [
|
|
49
|
+
(g(), b("svg", {
|
|
50
|
+
class: d(["absolute inset-x-0 left-0 block h-full w-full", v(u)("SVGFILL", e.containerBg)]),
|
|
52
51
|
viewBox: "0 0 100 100",
|
|
53
52
|
preserveAspectRatio: "none",
|
|
54
53
|
"aria-hidden": "true"
|
|
55
54
|
}, [
|
|
56
|
-
|
|
57
|
-
points:
|
|
55
|
+
c("polygon", {
|
|
56
|
+
points: t("top", e.topDirection)
|
|
58
57
|
}, null, 8, P)
|
|
59
58
|
], 2))
|
|
60
59
|
]),
|
|
61
|
-
|
|
62
|
-
class:
|
|
60
|
+
c("div", {
|
|
61
|
+
class: d(["py-md md:py-lg lg:py-xl px-sm md:px-md lg:px-lg", v(u)("BGCOLOR", e.containerBg)])
|
|
63
62
|
}, [
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
class:
|
|
63
|
+
c("div", j, [
|
|
64
|
+
c("div", {
|
|
65
|
+
class: d(o(e.twoColumns, e.leftColumnWidth))
|
|
67
66
|
}, [
|
|
68
|
-
|
|
67
|
+
B(l.$slots, "left-column")
|
|
69
68
|
], 2),
|
|
70
|
-
|
|
69
|
+
e.twoColumns && e.leftColumnWidth !== 100 ? (g(), b("div", {
|
|
71
70
|
key: 0,
|
|
72
|
-
class:
|
|
71
|
+
class: d(a(e.twoColumns, e.leftColumnWidth))
|
|
73
72
|
}, [
|
|
74
|
-
|
|
75
|
-
], 2)) :
|
|
73
|
+
B(l.$slots, "right-column")
|
|
74
|
+
], 2)) : G("", !0)
|
|
76
75
|
])
|
|
77
76
|
], 2),
|
|
78
|
-
|
|
79
|
-
(
|
|
80
|
-
class:
|
|
77
|
+
c("div", U, [
|
|
78
|
+
(g(), b("svg", {
|
|
79
|
+
class: d(["absolute inset-x-0 left-0 block h-full w-full", v(u)("SVGFILL", e.containerBg)]),
|
|
81
80
|
viewBox: "0 0 100 100",
|
|
82
81
|
preserveAspectRatio: "none",
|
|
83
82
|
"aria-hidden": "true"
|
|
84
83
|
}, [
|
|
85
|
-
|
|
86
|
-
points:
|
|
84
|
+
c("polygon", {
|
|
85
|
+
points: t("bottom", e.bottomDirection)
|
|
87
86
|
}, null, 8, X)
|
|
88
87
|
], 2))
|
|
89
88
|
])
|
|
90
89
|
], 2));
|
|
91
90
|
}
|
|
92
91
|
});
|
|
93
|
-
function q(e) {
|
|
94
|
-
return
|
|
92
|
+
function q(e, t) {
|
|
93
|
+
return D() ? (E(e, t), !0) : !1;
|
|
95
94
|
}
|
|
96
95
|
const J = typeof window < "u" && typeof document < "u";
|
|
97
96
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
@@ -101,93 +100,89 @@ function K(e) {
|
|
|
101
100
|
function Q(e) {
|
|
102
101
|
return A();
|
|
103
102
|
}
|
|
104
|
-
function Y(e,
|
|
105
|
-
Q() ? L(e,
|
|
103
|
+
function Y(e, t = !0, o) {
|
|
104
|
+
Q() ? L(e, o) : t ? e() : M(e);
|
|
106
105
|
}
|
|
107
|
-
const
|
|
108
|
-
function
|
|
109
|
-
var
|
|
110
|
-
const
|
|
111
|
-
return (
|
|
106
|
+
const z = J ? window : void 0;
|
|
107
|
+
function p(e) {
|
|
108
|
+
var t;
|
|
109
|
+
const o = W(e);
|
|
110
|
+
return (t = o?.$el) !== null && t !== void 0 ? t : o;
|
|
112
111
|
}
|
|
112
|
+
// @__NO_SIDE_EFFECTS__
|
|
113
113
|
function Z() {
|
|
114
|
-
const e = S(!1),
|
|
115
|
-
return
|
|
114
|
+
const e = S(!1), t = A();
|
|
115
|
+
return t && L(() => {
|
|
116
116
|
e.value = !0;
|
|
117
|
-
},
|
|
117
|
+
}, t), e;
|
|
118
118
|
}
|
|
119
|
+
// @__NO_SIDE_EFFECTS__
|
|
119
120
|
function ee(e) {
|
|
120
|
-
const
|
|
121
|
-
return
|
|
121
|
+
const t = /* @__PURE__ */ Z();
|
|
122
|
+
return x(() => (t.value, !!e()));
|
|
122
123
|
}
|
|
123
|
-
function te(e,
|
|
124
|
-
const { window:
|
|
125
|
-
let
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
},
|
|
129
|
-
const
|
|
130
|
-
return Array.isArray(
|
|
131
|
-
}),
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
), b = () => {
|
|
142
|
-
r(), C();
|
|
124
|
+
function te(e, t, o = {}) {
|
|
125
|
+
const { window: a = z, ...l } = o;
|
|
126
|
+
let s;
|
|
127
|
+
const r = /* @__PURE__ */ ee(() => a && "ResizeObserver" in a), i = () => {
|
|
128
|
+
s && (s.disconnect(), s = void 0);
|
|
129
|
+
}, C = k(x(() => {
|
|
130
|
+
const f = W(e);
|
|
131
|
+
return Array.isArray(f) ? f.map((n) => p(n)) : [p(f)];
|
|
132
|
+
}), (f) => {
|
|
133
|
+
if (i(), r.value && a) {
|
|
134
|
+
s = new ResizeObserver(t);
|
|
135
|
+
for (const n of f) n && s.observe(n, l);
|
|
136
|
+
}
|
|
137
|
+
}, {
|
|
138
|
+
immediate: !0,
|
|
139
|
+
flush: "post"
|
|
140
|
+
}), m = () => {
|
|
141
|
+
i(), C();
|
|
143
142
|
};
|
|
144
|
-
return q(
|
|
145
|
-
isSupported:
|
|
146
|
-
stop:
|
|
143
|
+
return q(m), {
|
|
144
|
+
isSupported: r,
|
|
145
|
+
stop: m
|
|
147
146
|
};
|
|
148
147
|
}
|
|
149
|
-
function
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
);
|
|
148
|
+
function ne(e, t = {
|
|
149
|
+
width: 0,
|
|
150
|
+
height: 0
|
|
151
|
+
}, o = {}) {
|
|
152
|
+
const { window: a = z, box: l = "content-box" } = o, s = x(() => {
|
|
153
|
+
var n;
|
|
154
|
+
return (n = p(e)) === null || n === void 0 || (n = n.namespaceURI) === null || n === void 0 ? void 0 : n.includes("svg");
|
|
155
|
+
}), r = S(t.width), i = S(t.height), { stop: C } = te(e, ([n]) => {
|
|
156
|
+
const O = l === "border-box" ? n.borderBoxSize : l === "content-box" ? n.contentBoxSize : n.devicePixelContentBoxSize;
|
|
157
|
+
if (a && s.value) {
|
|
158
|
+
const w = p(e);
|
|
159
|
+
if (w) {
|
|
160
|
+
const h = w.getBoundingClientRect();
|
|
161
|
+
r.value = h.width, i.value = h.height;
|
|
162
|
+
}
|
|
163
|
+
} else if (O) {
|
|
164
|
+
const w = K(O);
|
|
165
|
+
r.value = w.reduce((h, { inlineSize: y }) => h + y, 0), i.value = w.reduce((h, { blockSize: y }) => h + y, 0);
|
|
166
|
+
} else
|
|
167
|
+
r.value = n.contentRect.width, i.value = n.contentRect.height;
|
|
168
|
+
}, o);
|
|
171
169
|
Y(() => {
|
|
172
|
-
const n =
|
|
173
|
-
n && (
|
|
170
|
+
const n = p(e);
|
|
171
|
+
n && (r.value = "offsetWidth" in n ? n.offsetWidth : t.width, i.value = "offsetHeight" in n ? n.offsetHeight : t.height);
|
|
174
172
|
});
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
);
|
|
181
|
-
function b() {
|
|
182
|
-
v(), C();
|
|
173
|
+
const m = k(() => p(e), (n) => {
|
|
174
|
+
r.value = n ? t.width : 0, i.value = n ? t.height : 0;
|
|
175
|
+
});
|
|
176
|
+
function f() {
|
|
177
|
+
C(), m();
|
|
183
178
|
}
|
|
184
179
|
return {
|
|
185
|
-
width:
|
|
186
|
-
height:
|
|
187
|
-
stop:
|
|
180
|
+
width: r,
|
|
181
|
+
height: i,
|
|
182
|
+
stop: f
|
|
188
183
|
};
|
|
189
184
|
}
|
|
190
|
-
const
|
|
185
|
+
const oe = { class: "relative" }, le = ["aria-label"], se = { class: "w-full" }, ie = { class: "mt-sm" }, ce = /* @__PURE__ */ R({
|
|
191
186
|
__name: "MclContainerB",
|
|
192
187
|
props: {
|
|
193
188
|
sectionBgColor: { default: "transparent" },
|
|
@@ -200,55 +195,55 @@ const ne = { class: "relative" }, se = ["aria-label"], le = { class: "w-full" },
|
|
|
200
195
|
titleColor: { default: "dark-3" }
|
|
201
196
|
},
|
|
202
197
|
setup(e) {
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
const
|
|
206
|
-
const { titleLevel:
|
|
207
|
-
h1: u("H1",
|
|
208
|
-
h2: u("H2",
|
|
209
|
-
h3: u("H3",
|
|
210
|
-
h4: u("H4",
|
|
198
|
+
const t = e;
|
|
199
|
+
$();
|
|
200
|
+
const o = I(), { height: a } = ne(o), l = x(() => {
|
|
201
|
+
const { titleLevel: r, titleSize: i, titleColor: C } = t, m = {
|
|
202
|
+
h1: u("H1", i),
|
|
203
|
+
h2: u("H2", i),
|
|
204
|
+
h3: u("H3", i),
|
|
205
|
+
h4: u("H4", i)
|
|
211
206
|
};
|
|
212
207
|
return [
|
|
213
|
-
u("TEXTCOLOR",
|
|
214
|
-
|
|
208
|
+
u("TEXTCOLOR", C),
|
|
209
|
+
m[r]
|
|
215
210
|
].join(" ");
|
|
216
|
-
}),
|
|
217
|
-
"--bg-image": `url('${
|
|
218
|
-
"--space-height": `${
|
|
211
|
+
}), s = x(() => ({
|
|
212
|
+
"--bg-image": `url('${t.imageSource}')`,
|
|
213
|
+
"--space-height": `${a.value / 2}px`
|
|
219
214
|
}));
|
|
220
|
-
return (
|
|
215
|
+
return (r, i) => (g(), b("section", {
|
|
221
216
|
class: "relative",
|
|
222
|
-
style:
|
|
217
|
+
style: _(s.value)
|
|
223
218
|
}, [
|
|
224
|
-
|
|
225
|
-
class:
|
|
219
|
+
c("div", {
|
|
220
|
+
class: d([v(u)("BGCOLOR", e.sectionBgColor), "space-hts"])
|
|
226
221
|
}, null, 2),
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
class: "absolute
|
|
222
|
+
c("div", oe, [
|
|
223
|
+
c("div", {
|
|
224
|
+
class: "bg-image absolute inset-0 bg-cover bg-fixed bg-top bg-no-repeat",
|
|
230
225
|
role: "img",
|
|
231
|
-
"aria-label":
|
|
232
|
-
}, null, 8,
|
|
233
|
-
|
|
234
|
-
class: "container relative z-
|
|
226
|
+
"aria-label": e.imageAlt
|
|
227
|
+
}, null, 8, le),
|
|
228
|
+
c("div", {
|
|
229
|
+
class: "px-xs max-w-285 container relative z-10 -translate-y-1/2",
|
|
235
230
|
ref_key: "mainContentElem",
|
|
236
|
-
ref:
|
|
231
|
+
ref: o
|
|
237
232
|
}, [
|
|
238
|
-
|
|
239
|
-
class:
|
|
233
|
+
c("div", {
|
|
234
|
+
class: d([v(u)("BGCOLOR", e.containerBgColor), "py-md md:py-lg px-xs md:px-md lg:p-xl"])
|
|
240
235
|
}, [
|
|
241
|
-
|
|
242
|
-
(
|
|
236
|
+
c("div", se, [
|
|
237
|
+
(g(), H(V(e.titleLevel), null, {
|
|
243
238
|
default: T(() => [
|
|
244
|
-
|
|
245
|
-
class:
|
|
246
|
-
}, F(
|
|
239
|
+
c("span", {
|
|
240
|
+
class: d(l.value)
|
|
241
|
+
}, F(e.title), 3)
|
|
247
242
|
]),
|
|
248
243
|
_: 1
|
|
249
244
|
})),
|
|
250
|
-
|
|
251
|
-
|
|
245
|
+
c("div", ie, [
|
|
246
|
+
B(r.$slots, "content", {}, void 0, !0)
|
|
252
247
|
])
|
|
253
248
|
])
|
|
254
249
|
], 2)
|
|
@@ -256,13 +251,13 @@ const ne = { class: "relative" }, se = ["aria-label"], le = { class: "w-full" },
|
|
|
256
251
|
])
|
|
257
252
|
], 4));
|
|
258
253
|
}
|
|
259
|
-
}),
|
|
260
|
-
const
|
|
261
|
-
for (const [
|
|
262
|
-
|
|
263
|
-
return
|
|
264
|
-
},
|
|
254
|
+
}), re = (e, t) => {
|
|
255
|
+
const o = e.__vccOpts || e;
|
|
256
|
+
for (const [a, l] of t)
|
|
257
|
+
o[a] = l;
|
|
258
|
+
return o;
|
|
259
|
+
}, fe = /* @__PURE__ */ re(ce, [["__scopeId", "data-v-f0d22262"]]);
|
|
265
260
|
export {
|
|
266
261
|
de as MclContainerA,
|
|
267
|
-
|
|
262
|
+
fe as MclContainerB
|
|
268
263
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".space-hts[data-v-
|
|
2
|
-
(function(
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".space-hts[data-v-f0d22262]{height:calc(var(--space-height) + 36px)}@media screen and (min-width:768px){.space-hts[data-v-f0d22262]{height:calc(var(--space-height) + 48px)}}@media screen and (min-width:1024px){.space-hts[data-v-f0d22262]{height:calc(var(--space-height) + 64px)}}.bg-image[data-v-f0d22262]{background-image:var(--bg-image)}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
+
(function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@bobbykim/manguito-theme")):typeof define=="function"&&define.amd?define(["exports","vue","@bobbykim/manguito-theme"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m.MclContainer={},m.Vue,m.ManguitoTheme))})(this,(function(m,e,a){"use strict";const y={class:"lg:min-h-15 relative min-h-9 md:min-h-12"},x=["points"],E={class:"container grid gap-4 md:grid-cols-4"},S={class:"lg:min-h-15 relative min-h-9 md:min-h-12"},k=["points"],V=e.defineComponent({__name:"MclContainerA",props:{sectionBg:{default:"light-1"},containerBg:{default:"primary"},topDirection:{default:"left"},bottomDirection:{default:"left"},twoColumns:{type:Boolean,default:!0},leftColumnWidth:{default:50}},setup(t){e.useSlots();const n=(i,s)=>i==="top"?s==="left"?"0,0 100,100 0,100":"100,0 100,100 0,100":s==="left"?"0,0 100,0 0,100":"0,0 100,0 100,100",l=(i,s)=>{if(!i)return"md:col-span-4";switch(s){case 25:return"md:col-span-1";case 50:return"md:col-span-2";case 75:return"md:col-span-3";case 100:return"md:col-span-4";default:return""}},d=(i,s)=>{if(!i)return"";switch(s){case 25:return"md:col-span-3";case 50:return"md:col-span-2";case 75:return"md:col-span-1";default:return""}};return(i,s)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["py-lg lg:py-xl",e.unref(a)("BGCOLOR",t.sectionBg)])},[e.createElementVNode("div",y,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["absolute inset-x-0 left-0 block h-full w-full",e.unref(a)("SVGFILL",t.containerBg)]),viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true"},[e.createElementVNode("polygon",{points:n("top",t.topDirection)},null,8,x)],2))]),e.createElementVNode("div",{class:e.normalizeClass(["py-md md:py-lg lg:py-xl px-sm md:px-md lg:px-lg",e.unref(a)("BGCOLOR",t.containerBg)])},[e.createElementVNode("div",E,[e.createElementVNode("div",{class:e.normalizeClass(l(t.twoColumns,t.leftColumnWidth))},[e.renderSlot(i.$slots,"left-column")],2),t.twoColumns&&t.leftColumnWidth!==100?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(d(t.twoColumns,t.leftColumnWidth))},[e.renderSlot(i.$slots,"right-column")],2)):e.createCommentVNode("",!0)])],2),e.createElementVNode("div",S,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["absolute inset-x-0 left-0 block h-full w-full",e.unref(a)("SVGFILL",t.containerBg)]),viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true"},[e.createElementVNode("polygon",{points:n("bottom",t.bottomDirection)},null,8,k)],2))])],2))}});function O(t,n){return e.getCurrentScope()?(e.onScopeDispose(t,n),!0):!1}const R=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function z(t){return Array.isArray(t)?t:[t]}function N(t){return e.getCurrentInstance()}function $(t,n=!0,l){N()?e.onMounted(t,l):n?t():e.nextTick(t)}const w=R?window:void 0;function u(t){var n;const l=e.toValue(t);return(n=l?.$el)!==null&&n!==void 0?n:l}function L(){const t=e.shallowRef(!1),n=e.getCurrentInstance();return n&&e.onMounted(()=>{t.value=!0},n),t}function M(t){const n=L();return e.computed(()=>(n.value,!!t()))}function A(t,n,l={}){const{window:d=w,...i}=l;let s;const r=M(()=>d&&"ResizeObserver"in d),c=()=>{s&&(s.disconnect(),s=void 0)},g=e.watch(e.computed(()=>{const f=e.toValue(t);return Array.isArray(f)?f.map(o=>u(o)):[u(f)]}),f=>{if(c(),r.value&&d){s=new ResizeObserver(n);for(const o of f)o&&s.observe(o,i)}},{immediate:!0,flush:"post"}),h=()=>{c(),g()};return O(h),{isSupported:r,stop:h}}function W(t,n={width:0,height:0},l={}){const{window:d=w,box:i="content-box"}=l,s=e.computed(()=>{var o;return(o=u(t))===null||o===void 0||(o=o.namespaceURI)===null||o===void 0?void 0:o.includes("svg")}),r=e.shallowRef(n.width),c=e.shallowRef(n.height),{stop:g}=A(t,([o])=>{const B=i==="border-box"?o.borderBoxSize:i==="content-box"?o.contentBoxSize:o.devicePixelContentBoxSize;if(d&&s.value){const C=u(t);if(C){const p=C.getBoundingClientRect();r.value=p.width,c.value=p.height}}else if(B){const C=z(B);r.value=C.reduce((p,{inlineSize:b})=>p+b,0),c.value=C.reduce((p,{blockSize:b})=>p+b,0)}else r.value=o.contentRect.width,c.value=o.contentRect.height},l);$(()=>{const o=u(t);o&&(r.value="offsetWidth"in o?o.offsetWidth:n.width,c.value="offsetHeight"in o?o.offsetHeight:n.height)});const h=e.watch(()=>u(t),o=>{r.value=o?n.width:0,c.value=o?n.height:0});function f(){g(),h()}return{width:r,height:c,stop:f}}const _={class:"relative"},G=["aria-label"],T={class:"w-full"},D={class:"mt-sm"},I=((t,n)=>{const l=t.__vccOpts||t;for(const[d,i]of n)l[d]=i;return l})(e.defineComponent({__name:"MclContainerB",props:{sectionBgColor:{default:"transparent"},containerBgColor:{default:"light-2"},imageSource:{},imageAlt:{},title:{},titleLevel:{default:"h2"},titleSize:{default:"md"},titleColor:{default:"dark-3"}},setup(t){const n=t;e.useSlots();const l=e.ref(),{height:d}=W(l),i=e.computed(()=>{const{titleLevel:r,titleSize:c,titleColor:g}=n,h={h1:a("H1",c),h2:a("H2",c),h3:a("H3",c),h4:a("H4",c)};return[a("TEXTCOLOR",g),h[r]].join(" ")}),s=e.computed(()=>({"--bg-image":`url('${n.imageSource}')`,"--space-height":`${d.value/2}px`}));return(r,c)=>(e.openBlock(),e.createElementBlock("section",{class:"relative",style:e.normalizeStyle(s.value)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("BGCOLOR",t.sectionBgColor),"space-hts"])},null,2),e.createElementVNode("div",_,[e.createElementVNode("div",{class:"bg-image absolute inset-0 bg-cover bg-fixed bg-top bg-no-repeat",role:"img","aria-label":t.imageAlt},null,8,G),e.createElementVNode("div",{class:"px-xs max-w-285 container relative z-10 -translate-y-1/2",ref_key:"mainContentElem",ref:l},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(a)("BGCOLOR",t.containerBgColor),"py-md md:py-lg px-xs md:px-md lg:p-xl"])},[e.createElementVNode("div",T,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.titleLevel),null,{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(i.value)},e.toDisplayString(t.title),3)]),_:1})),e.createElementVNode("div",D,[e.renderSlot(r.$slots,"content",{},void 0,!0)])])],2)],512)])],4))}}),[["__scopeId","data-v-f0d22262"]]);m.MclContainerA=V,m.MclContainerB=I,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobbykim/mcl-container",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.9",
|
|
4
4
|
"description": "basic container components based on manguito-theme",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"license": "MIT",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@bobbykim/manguito-theme": "0.28.
|
|
36
|
+
"@bobbykim/manguito-theme": "0.28.3",
|
|
37
37
|
"@vueuse/core": "^12.0.0",
|
|
38
38
|
"vue": "^3.5.13"
|
|
39
39
|
},
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"vite-plugin-dts": "^4.3.0",
|
|
47
47
|
"vue-tsc": "^2.1.10"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "fc1830324e5a409b68bbb2b39280fe0b3cf3673a"
|
|
50
50
|
}
|