@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 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, {}, any>;
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, {}, any>;
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
- attrs: Partial<{}>;
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
- attrs: Partial<{}>;
73
+ rootEl: HTMLElement;
82
74
  };
83
75
 
84
76
  declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -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-fb05edc4]{height:calc(var(--space-height) + 36px)}@media screen and (min-width: 768px){.space-hts[data-v-fb05edc4]{height:calc(var(--space-height) + 48px)}}@media screen and (min-width: 1024px){.space-hts[data-v-fb05edc4]{height:calc(var(--space-height) + 64px)}}.bg-image[data-v-fb05edc4]{background-image:var(--bg-image)}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- import { defineComponent as O, useSlots as R, createElementBlock as y, openBlock as m, normalizeClass as p, unref as h, createElementVNode as a, createCommentVNode as z, renderSlot as x, onMounted as L, nextTick as G, getCurrentScope as M, onScopeDispose as D, getCurrentInstance as A, computed as B, shallowRef as S, watch as k, toValue as W, ref as E, normalizeStyle as I, createBlock as H, resolveDynamicComponent as V, withCtx as T, toDisplayString as F } from "vue";
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: "relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]" }, P = ["points"], j = { class: "container grid md:grid-cols-4 gap-4" }, U = { class: "relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]" }, X = ["points"], de = /* @__PURE__ */ O({
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
- R();
16
- const o = (t, i) => t === "top" ? i === "left" ? "0,0 100,100 0,100" : "100,0 100,100 0,100" : i === "left" ? "0,0 100,0 0,100" : "0,0 100,0 100,100", s = (t, i) => {
17
- if (!t)
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 (i) {
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
- }, c = (t, i) => {
32
- if (!t)
31
+ }, a = (l, s) => {
32
+ if (!l)
33
33
  return "";
34
- switch (i) {
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 (t, i) => (m(), y("section", {
47
- class: p(["py-lg lg:py-xl", h(u)("BGCOLOR", t.sectionBg)])
45
+ return (l, s) => (g(), b("section", {
46
+ class: d(["py-lg lg:py-xl", v(u)("BGCOLOR", e.sectionBg)])
48
47
  }, [
49
- a("div", N, [
50
- (m(), y("svg", {
51
- class: p(["block absolute left-0 inset-x-0 h-full w-full", h(u)("SVGFILL", t.containerBg)]),
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
- a("polygon", {
57
- points: o("top", t.topDirection)
55
+ c("polygon", {
56
+ points: t("top", e.topDirection)
58
57
  }, null, 8, P)
59
58
  ], 2))
60
59
  ]),
61
- a("div", {
62
- class: p(["py-md md:py-lg lg:py-xl px-sm md:px-md lg:px-lg", h(u)("BGCOLOR", t.containerBg)])
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
- a("div", j, [
65
- a("div", {
66
- class: p(s(t.twoColumns, t.leftColumnWidth))
63
+ c("div", j, [
64
+ c("div", {
65
+ class: d(o(e.twoColumns, e.leftColumnWidth))
67
66
  }, [
68
- x(t.$slots, "left-column")
67
+ B(l.$slots, "left-column")
69
68
  ], 2),
70
- t.twoColumns && t.leftColumnWidth !== 100 ? (m(), y("div", {
69
+ e.twoColumns && e.leftColumnWidth !== 100 ? (g(), b("div", {
71
70
  key: 0,
72
- class: p(c(t.twoColumns, t.leftColumnWidth))
71
+ class: d(a(e.twoColumns, e.leftColumnWidth))
73
72
  }, [
74
- x(t.$slots, "right-column")
75
- ], 2)) : z("", !0)
73
+ B(l.$slots, "right-column")
74
+ ], 2)) : G("", !0)
76
75
  ])
77
76
  ], 2),
78
- a("div", U, [
79
- (m(), y("svg", {
80
- class: p(["block absolute left-0 inset-x-0 h-full w-full", h(u)("SVGFILL", t.containerBg)]),
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
- a("polygon", {
86
- points: o("bottom", t.bottomDirection)
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 M() ? (D(e), !0) : !1;
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, o = !0, s) {
105
- Q() ? L(e, s) : o ? e() : G(e);
103
+ function Y(e, t = !0, o) {
104
+ Q() ? L(e, o) : t ? e() : M(e);
106
105
  }
107
- const $ = J ? window : void 0;
108
- function g(e) {
109
- var o;
110
- const s = W(e);
111
- return (o = s == null ? void 0 : s.$el) != null ? o : s;
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), o = A();
115
- return o && L(() => {
114
+ const e = S(!1), t = A();
115
+ return t && L(() => {
116
116
  e.value = !0;
117
- }, o), e;
117
+ }, t), e;
118
118
  }
119
+ // @__NO_SIDE_EFFECTS__
119
120
  function ee(e) {
120
- const o = Z();
121
- return B(() => (o.value, !!e()));
121
+ const t = /* @__PURE__ */ Z();
122
+ return x(() => (t.value, !!e()));
122
123
  }
123
- function te(e, o, s = {}) {
124
- const { window: c = $, ...t } = s;
125
- let i;
126
- const l = ee(() => c && "ResizeObserver" in c), r = () => {
127
- i && (i.disconnect(), i = void 0);
128
- }, v = B(() => {
129
- const n = W(e);
130
- return Array.isArray(n) ? n.map((d) => g(d)) : [g(n)];
131
- }), C = k(
132
- v,
133
- (n) => {
134
- if (r(), l.value && c) {
135
- i = new ResizeObserver(o);
136
- for (const d of n)
137
- d && i.observe(d, t);
138
- }
139
- },
140
- { immediate: !0, flush: "post" }
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(b), {
145
- isSupported: l,
146
- stop: b
143
+ return q(m), {
144
+ isSupported: r,
145
+ stop: m
147
146
  };
148
147
  }
149
- function oe(e, o = { width: 0, height: 0 }, s = {}) {
150
- const { window: c = $, box: t = "content-box" } = s, i = B(() => {
151
- var n, d;
152
- return (d = (n = g(e)) == null ? void 0 : n.namespaceURI) == null ? void 0 : d.includes("svg");
153
- }), l = S(o.width), r = S(o.height), { stop: v } = te(
154
- e,
155
- ([n]) => {
156
- const d = t === "border-box" ? n.borderBoxSize : t === "content-box" ? n.contentBoxSize : n.devicePixelContentBoxSize;
157
- if (c && i.value) {
158
- const w = g(e);
159
- if (w) {
160
- const f = w.getBoundingClientRect();
161
- l.value = f.width, r.value = f.height;
162
- }
163
- } else if (d) {
164
- const w = K(d);
165
- l.value = w.reduce((f, { inlineSize: _ }) => f + _, 0), r.value = w.reduce((f, { blockSize: _ }) => f + _, 0);
166
- } else
167
- l.value = n.contentRect.width, r.value = n.contentRect.height;
168
- },
169
- s
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 = g(e);
173
- n && (l.value = "offsetWidth" in n ? n.offsetWidth : o.width, r.value = "offsetHeight" in n ? n.offsetHeight : o.height);
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 C = k(
176
- () => g(e),
177
- (n) => {
178
- l.value = n ? o.width : 0, r.value = n ? o.height : 0;
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: l,
186
- height: r,
187
- stop: b
180
+ width: r,
181
+ height: i,
182
+ stop: f
188
183
  };
189
184
  }
190
- const ne = { class: "relative" }, se = ["aria-label"], le = { class: "w-full" }, ie = { class: "mt-sm" }, re = /* @__PURE__ */ O({
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 o = e;
204
- R();
205
- const s = E(), { height: c } = oe(s), t = B(() => {
206
- const { titleLevel: l, titleSize: r, titleColor: v } = o, C = {
207
- h1: u("H1", r),
208
- h2: u("H2", r),
209
- h3: u("H3", r),
210
- h4: u("H4", r)
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", v),
214
- C[l]
208
+ u("TEXTCOLOR", C),
209
+ m[r]
215
210
  ].join(" ");
216
- }), i = B(() => ({
217
- "--bg-image": `url('${o.imageSource}')`,
218
- "--space-height": `${c.value / 2}px`
211
+ }), s = x(() => ({
212
+ "--bg-image": `url('${t.imageSource}')`,
213
+ "--space-height": `${a.value / 2}px`
219
214
  }));
220
- return (l, r) => (m(), y("section", {
215
+ return (r, i) => (g(), b("section", {
221
216
  class: "relative",
222
- style: I(i.value)
217
+ style: _(s.value)
223
218
  }, [
224
- a("div", {
225
- class: p([h(u)("BGCOLOR", l.sectionBgColor), "space-hts"])
219
+ c("div", {
220
+ class: d([v(u)("BGCOLOR", e.sectionBgColor), "space-hts"])
226
221
  }, null, 2),
227
- a("div", ne, [
228
- a("div", {
229
- class: "absolute bg-fixed bg-cover bg-top inset-0 bg-no-repeat bg-image",
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": l.imageAlt
232
- }, null, 8, se),
233
- a("div", {
234
- class: "container relative z-[10] -translate-y-1/2 px-xs max-w-[1140px]",
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: s
231
+ ref: o
237
232
  }, [
238
- a("div", {
239
- class: p([h(u)("BGCOLOR", l.containerBgColor), "py-md md:py-lg px-xs md:px-md lg:p-xl"])
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
- a("div", le, [
242
- (m(), H(V(l.titleLevel), null, {
236
+ c("div", se, [
237
+ (g(), H(V(e.titleLevel), null, {
243
238
  default: T(() => [
244
- a("span", {
245
- class: p(t.value)
246
- }, F(l.title), 3)
239
+ c("span", {
240
+ class: d(l.value)
241
+ }, F(e.title), 3)
247
242
  ]),
248
243
  _: 1
249
244
  })),
250
- a("div", ie, [
251
- x(l.$slots, "content", {}, void 0, !0)
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
- }), ae = (e, o) => {
260
- const s = e.__vccOpts || e;
261
- for (const [c, t] of o)
262
- s[c] = t;
263
- return s;
264
- }, pe = /* @__PURE__ */ ae(re, [["__scopeId", "data-v-fb05edc4"]]);
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
- pe as MclContainerB
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-fb05edc4]{height:calc(var(--space-height) + 36px)}@media screen and (min-width: 768px){.space-hts[data-v-fb05edc4]{height:calc(var(--space-height) + 48px)}}@media screen and (min-width: 1024px){.space-hts[data-v-fb05edc4]{height:calc(var(--space-height) + 64px)}}.bg-image[data-v-fb05edc4]{background-image:var(--bg-image)}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- (function(p,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):(p=typeof globalThis<"u"?globalThis:p||self,e(p.MclContainer={},p.Vue,p.ManguitoTheme))})(this,function(p,e,d){"use strict";const y={class:"relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]"},_=["points"],E={class:"container grid md:grid-cols-4 gap-4"},S={class:"relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]"},k=["points"],x=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=(o,r)=>o==="top"?r==="left"?"0,0 100,100 0,100":"100,0 100,100 0,100":r==="left"?"0,0 100,0 0,100":"0,0 100,0 100,100",s=(o,r)=>{if(!o)return"md:col-span-4";switch(r){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""}},a=(o,r)=>{if(!o)return"";switch(r){case 25:return"md:col-span-3";case 50:return"md:col-span-2";case 75:return"md:col-span-1";case 100:default:return""}};return(o,r)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["py-lg lg:py-xl",e.unref(d)("BGCOLOR",o.sectionBg)])},[e.createElementVNode("div",y,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["block absolute left-0 inset-x-0 h-full w-full",e.unref(d)("SVGFILL",o.containerBg)]),viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true"},[e.createElementVNode("polygon",{points:n("top",o.topDirection)},null,8,_)],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(d)("BGCOLOR",o.containerBg)])},[e.createElementVNode("div",E,[e.createElementVNode("div",{class:e.normalizeClass(s(o.twoColumns,o.leftColumnWidth))},[e.renderSlot(o.$slots,"left-column")],2),o.twoColumns&&o.leftColumnWidth!==100?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a(o.twoColumns,o.leftColumnWidth))},[e.renderSlot(o.$slots,"right-column")],2)):e.createCommentVNode("",!0)])],2),e.createElementVNode("div",S,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["block absolute left-0 inset-x-0 h-full w-full",e.unref(d)("SVGFILL",o.containerBg)]),viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true"},[e.createElementVNode("polygon",{points:n("bottom",o.bottomDirection)},null,8,k)],2))])],2))}});function V(t){return e.getCurrentScope()?(e.onScopeDispose(t),!0):!1}const O=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function R(t){return Array.isArray(t)?t:[t]}function z(t){return e.getCurrentInstance()}function N(t,n=!0,s){z()?e.onMounted(t,s):n?t():e.nextTick(t)}const w=O?window:void 0;function f(t){var n;const s=e.toValue(t);return(n=s==null?void 0:s.$el)!=null?n:s}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,s={}){const{window:a=w,...o}=s;let r;const i=M(()=>a&&"ResizeObserver"in a),c=()=>{r&&(r.disconnect(),r=void 0)},h=e.computed(()=>{const l=e.toValue(t);return Array.isArray(l)?l.map(m=>f(m)):[f(l)]}),g=e.watch(h,l=>{if(c(),i.value&&a){r=new ResizeObserver(n);for(const m of l)m&&r.observe(m,o)}},{immediate:!0,flush:"post"}),b=()=>{c(),g()};return V(b),{isSupported:i,stop:b}}function W(t,n={width:0,height:0},s={}){const{window:a=w,box:o="content-box"}=s,r=e.computed(()=>{var l,m;return(m=(l=f(t))==null?void 0:l.namespaceURI)==null?void 0:m.includes("svg")}),i=e.shallowRef(n.width),c=e.shallowRef(n.height),{stop:h}=A(t,([l])=>{const m=o==="border-box"?l.borderBoxSize:o==="content-box"?l.contentBoxSize:l.devicePixelContentBoxSize;if(a&&r.value){const C=f(t);if(C){const u=C.getBoundingClientRect();i.value=u.width,c.value=u.height}}else if(m){const C=R(m);i.value=C.reduce((u,{inlineSize:B})=>u+B,0),c.value=C.reduce((u,{blockSize:B})=>u+B,0)}else i.value=l.contentRect.width,c.value=l.contentRect.height},s);N(()=>{const l=f(t);l&&(i.value="offsetWidth"in l?l.offsetWidth:n.width,c.value="offsetHeight"in l?l.offsetHeight:n.height)});const g=e.watch(()=>f(t),l=>{i.value=l?n.width:0,c.value=l?n.height:0});function b(){h(),g()}return{width:i,height:c,stop:b}}const $={class:"relative"},G=["aria-label"],T={class:"w-full"},D={class:"mt-sm"},I=((t,n)=>{const s=t.__vccOpts||t;for(const[a,o]of n)s[a]=o;return s})(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 s=e.ref(),{height:a}=W(s),o=e.computed(()=>{const{titleLevel:i,titleSize:c,titleColor:h}=n,g={h1:d("H1",c),h2:d("H2",c),h3:d("H3",c),h4:d("H4",c)};return[d("TEXTCOLOR",h),g[i]].join(" ")}),r=e.computed(()=>({"--bg-image":`url('${n.imageSource}')`,"--space-height":`${a.value/2}px`}));return(i,c)=>(e.openBlock(),e.createElementBlock("section",{class:"relative",style:e.normalizeStyle(r.value)},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(d)("BGCOLOR",i.sectionBgColor),"space-hts"])},null,2),e.createElementVNode("div",$,[e.createElementVNode("div",{class:"absolute bg-fixed bg-cover bg-top inset-0 bg-no-repeat bg-image",role:"img","aria-label":i.imageAlt},null,8,G),e.createElementVNode("div",{class:"container relative z-[10] -translate-y-1/2 px-xs max-w-[1140px]",ref_key:"mainContentElem",ref:s},[e.createElementVNode("div",{class:e.normalizeClass([e.unref(d)("BGCOLOR",i.containerBgColor),"py-md md:py-lg px-xs md:px-md lg:p-xl"])},[e.createElementVNode("div",T,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.titleLevel),null,{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(o.value)},e.toDisplayString(i.title),3)]),_:1})),e.createElementVNode("div",D,[e.renderSlot(i.$slots,"content",{},void 0,!0)])])],2)],512)])],4))}}),[["__scopeId","data-v-fb05edc4"]]);p.MclContainerA=x,p.MclContainerB=I,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
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.7",
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.1",
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": "9ffea0493c49e2c7df51c45e3c2f72d256663048"
49
+ "gitHead": "fc1830324e5a409b68bbb2b39280fe0b3cf3673a"
50
50
  }