@bobbykim/mcl-container 0.5.1 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,159 @@
1
+ import { ColorPalette } from '@bobbykim/manguito-theme';
2
+ import { ColumnWidth } from '@bobbykim/manguito-theme';
3
+ import { ComponentOptionsMixin } from 'vue';
4
+ import { DefineComponent } from 'vue';
5
+ import { DirectionX } from '@bobbykim/manguito-theme';
6
+ import { ExtractPropTypes } from 'vue';
7
+ import { HeadingLevel } from '@bobbykim/manguito-theme';
8
+ import { HeadingSize } from '@bobbykim/manguito-theme';
9
+ import { PropType } from 'vue';
10
+ import { PublicProps } from 'vue';
11
+
12
+ declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
13
+
14
+ declare type __VLS_NonUndefinedable_2<T> = T extends undefined ? never : T;
15
+
16
+ declare type __VLS_Prettify<T> = {
17
+ [K in keyof T]: T[K];
18
+ } & {};
19
+
20
+ declare type __VLS_Prettify_2<T> = {
21
+ [K in keyof T]: T[K];
22
+ } & {};
23
+
24
+ declare type __VLS_TypePropsToRuntimeProps<T> = {
25
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
26
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
27
+ } : {
28
+ type: PropType<T[K]>;
29
+ required: true;
30
+ };
31
+ };
32
+
33
+ declare type __VLS_TypePropsToRuntimeProps_2<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
35
+ type: PropType<__VLS_NonUndefinedable_2<T[K]>>;
36
+ } : {
37
+ type: PropType<T[K]>;
38
+ required: true;
39
+ };
40
+ };
41
+
42
+ declare type __VLS_WithDefaults<P, D> = {
43
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
44
+ default: D[K];
45
+ }> : P[K];
46
+ };
47
+
48
+ declare type __VLS_WithDefaults_2<P, D> = {
49
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify_2<P[K] & {
50
+ default: D[K];
51
+ }> : P[K];
52
+ };
53
+
54
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
55
+ new (): {
56
+ $slots: S;
57
+ };
58
+ };
59
+
60
+ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
61
+ new (): {
62
+ $slots: S;
63
+ };
64
+ };
65
+
66
+ export declare const MclContainerA: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
67
+ sectionBg?: ColorPalette | undefined;
68
+ containerBg?: ColorPalette | undefined;
69
+ topDirection?: DirectionX | undefined;
70
+ bottomDirection?: DirectionX | undefined;
71
+ twoColumns?: boolean | undefined;
72
+ leftColumnWidth?: ColumnWidth | undefined;
73
+ }>, {
74
+ sectionBg: string;
75
+ containerBg: string;
76
+ topDirection: string;
77
+ bottomDirection: string;
78
+ twoColumns: boolean;
79
+ leftColumnWidth: number;
80
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
81
+ sectionBg?: ColorPalette | undefined;
82
+ containerBg?: ColorPalette | undefined;
83
+ topDirection?: DirectionX | undefined;
84
+ bottomDirection?: DirectionX | undefined;
85
+ twoColumns?: boolean | undefined;
86
+ leftColumnWidth?: ColumnWidth | undefined;
87
+ }>, {
88
+ sectionBg: string;
89
+ containerBg: string;
90
+ topDirection: string;
91
+ bottomDirection: string;
92
+ twoColumns: boolean;
93
+ leftColumnWidth: number;
94
+ }>>>, {
95
+ sectionBg: ColorPalette;
96
+ containerBg: ColorPalette;
97
+ topDirection: DirectionX;
98
+ bottomDirection: DirectionX;
99
+ twoColumns: boolean;
100
+ leftColumnWidth: ColumnWidth;
101
+ }, {}>, Readonly<{
102
+ 'left-column': any;
103
+ 'right-column': any;
104
+ }> & {
105
+ 'left-column': any;
106
+ 'right-column': any;
107
+ }>;
108
+
109
+ export declare const MclContainerB: __VLS_WithTemplateSlots_2<DefineComponent<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_2<{
110
+ sectionBgColor?: ColorPalette | undefined;
111
+ containerBgColor?: ColorPalette | undefined;
112
+ imageSource: string;
113
+ imgHeightMobile?: number | undefined;
114
+ imgHeightDesktop?: number | undefined;
115
+ title: string;
116
+ titleLevel?: HeadingLevel | undefined;
117
+ titleSize?: HeadingSize | undefined;
118
+ titleColor?: ColorPalette | undefined;
119
+ }>, {
120
+ sectionBgColor: string;
121
+ containerBgColor: string;
122
+ imgHeightMobile: number;
123
+ imgHeightDesktop: number;
124
+ titleLevel: string;
125
+ titleSize: string;
126
+ titleColor: string;
127
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_2<{
128
+ sectionBgColor?: ColorPalette | undefined;
129
+ containerBgColor?: ColorPalette | undefined;
130
+ imageSource: string;
131
+ imgHeightMobile?: number | undefined;
132
+ imgHeightDesktop?: number | undefined;
133
+ title: string;
134
+ titleLevel?: HeadingLevel | undefined;
135
+ titleSize?: HeadingSize | undefined;
136
+ titleColor?: ColorPalette | undefined;
137
+ }>, {
138
+ sectionBgColor: string;
139
+ containerBgColor: string;
140
+ imgHeightMobile: number;
141
+ imgHeightDesktop: number;
142
+ titleLevel: string;
143
+ titleSize: string;
144
+ titleColor: string;
145
+ }>>>, {
146
+ sectionBgColor: ColorPalette;
147
+ containerBgColor: ColorPalette;
148
+ imgHeightMobile: number;
149
+ imgHeightDesktop: number;
150
+ titleLevel: HeadingLevel;
151
+ titleSize: HeadingSize;
152
+ titleColor: ColorPalette;
153
+ }, {}>, Readonly<{
154
+ content: any;
155
+ }> & {
156
+ content: any;
157
+ }>;
158
+
159
+ export { }
@@ -0,0 +1,160 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".parallax-container[data-v-f3bc2137]{height:var(--container-height-mobile, 256px)}.parallax-image[data-v-f3bc2137]{height:var(--container-height-mobile, 256px);background-image:var(--bg-image);background-position:center top}@media screen and (min-width: 768px){.parallax-container[data-v-f3bc2137],.parallax-image[data-v-f3bc2137]{height:var(--container-height-desktop, 384px)}}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
+ import { defineComponent as f, useSlots as h, openBlock as p, createElementBlock as d, normalizeClass as i, unref as r, createElementVNode as t, renderSlot as g, createCommentVNode as v, computed as C, resolveComponent as _, normalizeStyle as B, createVNode as b, withCtx as x, pushScopeId as y, popScopeId as w } from "vue";
3
+ import n from "@bobbykim/manguito-theme";
4
+ const L = { class: "relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]" }, $ = ["points"], H = { 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"], z = /* @__PURE__ */ f({
5
+ __name: "MclContainerA",
6
+ props: {
7
+ sectionBg: { default: "light-1" },
8
+ containerBg: { default: "primary" },
9
+ topDirection: { default: "left" },
10
+ bottomDirection: { default: "left" },
11
+ twoColumns: { type: Boolean, default: !0 },
12
+ leftColumnWidth: { default: 50 }
13
+ },
14
+ setup(s) {
15
+ h();
16
+ const l = (e, o) => e === "top" ? o === "left" ? "0,0 100,100 0,100" : "100,0 100,100 0,100" : o === "left" ? "0,0 100,0 0,100" : "0,0 100,0 100,100", a = (e, o) => {
17
+ if (!e)
18
+ return "md:col-span-4";
19
+ switch (o) {
20
+ case 25:
21
+ return "md:col-span-1";
22
+ case 50:
23
+ return "md:col-span-2";
24
+ case 75:
25
+ return "md:col-span-3";
26
+ case 100:
27
+ return "md:col-span-4";
28
+ default:
29
+ return "";
30
+ }
31
+ }, c = (e, o) => {
32
+ if (!e)
33
+ return "";
34
+ switch (o) {
35
+ case 25:
36
+ return "md:col-span-3";
37
+ case 50:
38
+ return "md:col-span-2";
39
+ case 75:
40
+ return "md:col-span-1";
41
+ case 100:
42
+ default:
43
+ return "";
44
+ }
45
+ };
46
+ return (e, o) => (p(), d("section", {
47
+ class: i(["py-lg lg:py-xl", r(n)("BGCOLOR", e.sectionBg)])
48
+ }, [
49
+ t("div", L, [
50
+ (p(), d("svg", {
51
+ class: i(["block absolute left-0 inset-x-0 h-full w-full", r(n)("SVGFILL", e.containerBg)]),
52
+ viewBox: "0 0 100 100",
53
+ preserveAspectRatio: "none",
54
+ "aria-hidden": "true"
55
+ }, [
56
+ t("polygon", {
57
+ points: l("top", e.topDirection)
58
+ }, null, 8, $)
59
+ ], 2))
60
+ ]),
61
+ t("div", {
62
+ class: i(["py-md md:py-lg lg:py-xl px-sm md:px-md lg:px-lg", r(n)("BGCOLOR", e.containerBg)])
63
+ }, [
64
+ t("div", H, [
65
+ t("div", {
66
+ class: i(a(e.twoColumns, e.leftColumnWidth))
67
+ }, [
68
+ g(e.$slots, "left-column")
69
+ ], 2),
70
+ e.twoColumns && e.leftColumnWidth !== 100 ? (p(), d("div", {
71
+ key: 0,
72
+ class: i(c(e.twoColumns, e.leftColumnWidth))
73
+ }, [
74
+ g(e.$slots, "right-column")
75
+ ], 2)) : v("", !0)
76
+ ])
77
+ ], 2),
78
+ t("div", S, [
79
+ (p(), d("svg", {
80
+ class: i(["block absolute left-0 inset-x-0 h-full w-full", r(n)("SVGFILL", e.containerBg)]),
81
+ viewBox: "0 0 100 100",
82
+ preserveAspectRatio: "none",
83
+ "aria-hidden": "true"
84
+ }, [
85
+ t("polygon", {
86
+ points: l("bottom", e.bottomDirection)
87
+ }, null, 8, k)
88
+ ], 2))
89
+ ])
90
+ ], 2));
91
+ }
92
+ }), M = (s) => (y("data-v-f3bc2137"), s = s(), w(), s), O = /* @__PURE__ */ M(() => /* @__PURE__ */ t("div", { class: "absolute parallax-image bg-fixed bg-cover w-full top-0 left-0 bg-no-repeat" }, null, -1)), I = { class: "container relative z-[10] px-xs top-[-48px] md:top-[-96px] max-w-[1140px]" }, R = { class: "w-full" }, D = ["innerHTML"], G = { class: "mt-sm" }, W = /* @__PURE__ */ f({
93
+ __name: "MclContainerB",
94
+ props: {
95
+ sectionBgColor: { default: "transparent" },
96
+ containerBgColor: { default: "light-2" },
97
+ imageSource: {},
98
+ imgHeightMobile: { default: 256 },
99
+ imgHeightDesktop: { default: 384 },
100
+ title: {},
101
+ titleLevel: { default: "h2" },
102
+ titleSize: { default: "md" },
103
+ titleColor: { default: "dark-3" }
104
+ },
105
+ setup(s) {
106
+ const l = s;
107
+ h();
108
+ const a = (e, o, u) => {
109
+ let m;
110
+ return e === "h1" ? m = n("H1", o) : e === "h2" ? m = n("H2", o) : m = n("H3", o), `${m} ${n("TEXTCOLOR", u)}`;
111
+ }, c = C(() => ({
112
+ "--bg-image": `url('${l.imageSource}')`,
113
+ "--container-height-mobile": `${l.imgHeightMobile}px`,
114
+ "--container-height-desktop": `${l.imgHeightDesktop > l.imgHeightMobile ? l.imgHeightDesktop : l.imgHeightMobile}px`
115
+ }));
116
+ return (e, o) => {
117
+ const u = _("compoenent");
118
+ return p(), d("section", {
119
+ class: i(["relative pt-xl md:pt-3xl", r(n)("BGCOLOR", e.sectionBgColor)])
120
+ }, [
121
+ t("div", {
122
+ class: "relative parallax-container",
123
+ style: B(c.value)
124
+ }, [
125
+ O,
126
+ t("div", I, [
127
+ t("div", {
128
+ class: i([r(n)("BGCOLOR", e.containerBgColor), "py-md md:py-lg px-xs md:px-md lg:p-xl"])
129
+ }, [
130
+ t("div", R, [
131
+ b(u, { is: e.titleLevel }, {
132
+ default: x(() => [
133
+ t("span", {
134
+ class: i(a(e.titleLevel, e.titleSize, e.titleColor)),
135
+ innerHTML: e.title
136
+ }, null, 10, D)
137
+ ]),
138
+ _: 1
139
+ }, 8, ["is"]),
140
+ t("div", G, [
141
+ g(e.$slots, "content", {}, void 0, !0)
142
+ ])
143
+ ])
144
+ ], 2)
145
+ ])
146
+ ], 4)
147
+ ], 2);
148
+ };
149
+ }
150
+ });
151
+ const T = (s, l) => {
152
+ const a = s.__vccOpts || s;
153
+ for (const [c, e] of l)
154
+ a[c] = e;
155
+ return a;
156
+ }, E = /* @__PURE__ */ T(W, [["__scopeId", "data-v-f3bc2137"]]);
157
+ export {
158
+ z as MclContainerA,
159
+ E as MclContainerB
160
+ };
@@ -0,0 +1,2 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".parallax-container[data-v-f3bc2137]{height:var(--container-height-mobile, 256px)}.parallax-image[data-v-f3bc2137]{height:var(--container-height-mobile, 256px);background-image:var(--bg-image);background-position:center top}@media screen and (min-width: 768px){.parallax-container[data-v-f3bc2137],.parallax-image[data-v-f3bc2137]{height:var(--container-height-desktop, 384px)}}")),document.head.appendChild(e)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
+ (function(i,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):(i=typeof globalThis<"u"?globalThis:i||self,e(i.MclContainer={},i.Vue,i.ManguitoTheme))})(this,function(i,e,l){"use strict";const m={class:"relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]"},p=["points"],f={class:"container grid md:grid-cols-4 gap-4"},h={class:"relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]"},g=["points"],u=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(s){e.useSlots();const n=(t,o)=>t==="top"?o==="left"?"0,0 100,100 0,100":"100,0 100,100 0,100":o==="left"?"0,0 100,0 0,100":"0,0 100,0 100,100",r=(t,o)=>{if(!t)return"md:col-span-4";switch(o){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=(t,o)=>{if(!t)return"";switch(o){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(t,o)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["py-lg lg:py-xl",e.unref(l)("BGCOLOR",t.sectionBg)])},[e.createElementVNode("div",m,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["block absolute left-0 inset-x-0 h-full w-full",e.unref(l)("SVGFILL",t.containerBg)]),viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true"},[e.createElementVNode("polygon",{points:n("top",t.topDirection)},null,8,p)],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(l)("BGCOLOR",t.containerBg)])},[e.createElementVNode("div",f,[e.createElementVNode("div",{class:e.normalizeClass(r(t.twoColumns,t.leftColumnWidth))},[e.renderSlot(t.$slots,"left-column")],2),t.twoColumns&&t.leftColumnWidth!==100?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(a(t.twoColumns,t.leftColumnWidth))},[e.renderSlot(t.$slots,"right-column")],2)):e.createCommentVNode("",!0)])],2),e.createElementVNode("div",h,[(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass(["block absolute left-0 inset-x-0 h-full w-full",e.unref(l)("SVGFILL",t.containerBg)]),viewBox:"0 0 100 100",preserveAspectRatio:"none","aria-hidden":"true"},[e.createElementVNode("polygon",{points:n("bottom",t.bottomDirection)},null,8,g)],2))])],2))}}),C=(s=>(e.pushScopeId("data-v-f3bc2137"),s=s(),e.popScopeId(),s))(()=>e.createElementVNode("div",{class:"absolute parallax-image bg-fixed bg-cover w-full top-0 left-0 bg-no-repeat"},null,-1)),_={class:"container relative z-[10] px-xs top-[-48px] md:top-[-96px] max-w-[1140px]"},B={class:"w-full"},b=["innerHTML"],y={class:"mt-sm"},k=e.defineComponent({__name:"MclContainerB",props:{sectionBgColor:{default:"transparent"},containerBgColor:{default:"light-2"},imageSource:{},imgHeightMobile:{default:256},imgHeightDesktop:{default:384},title:{},titleLevel:{default:"h2"},titleSize:{default:"md"},titleColor:{default:"dark-3"}},setup(s){const n=s;e.useSlots();const r=(t,o,d)=>{let c;return t==="h1"?c=l("H1",o):t==="h2"?c=l("H2",o):c=l("H3",o),`${c} ${l("TEXTCOLOR",d)}`},a=e.computed(()=>({"--bg-image":`url('${n.imageSource}')`,"--container-height-mobile":`${n.imgHeightMobile}px`,"--container-height-desktop":`${n.imgHeightDesktop>n.imgHeightMobile?n.imgHeightDesktop:n.imgHeightMobile}px`}));return(t,o)=>{const d=e.resolveComponent("compoenent");return e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass(["relative pt-xl md:pt-3xl",e.unref(l)("BGCOLOR",t.sectionBgColor)])},[e.createElementVNode("div",{class:"relative parallax-container",style:e.normalizeStyle(a.value)},[C,e.createElementVNode("div",_,[e.createElementVNode("div",{class:e.normalizeClass([e.unref(l)("BGCOLOR",t.containerBgColor),"py-md md:py-lg px-xs md:px-md lg:p-xl"])},[e.createElementVNode("div",B,[e.createVNode(d,{is:t.titleLevel},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(r(t.titleLevel,t.titleSize,t.titleColor)),innerHTML:t.title},null,10,b)]),_:1},8,["is"]),e.createElementVNode("div",y,[e.renderSlot(t.$slots,"content",{},void 0,!0)])])],2)])],4)],2)}}}),x="",E=((s,n)=>{const r=s.__vccOpts||s;for(const[a,t]of n)r[a]=t;return r})(k,[["__scopeId","data-v-f3bc2137"]]);i.MclContainerA=u,i.MclContainerB=E,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,11 +1,23 @@
1
1
  {
2
2
  "name": "@bobbykim/mcl-container",
3
- "version": "0.5.1",
4
- "description": "",
3
+ "version": "0.6.1",
4
+ "description": "basic container components based on manguito-theme",
5
5
  "type": "module",
6
- "main": "index.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "main": "./dist/mcl-container.umd.cjs",
10
+ "module": "./dist/mcl-container.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/mcl-container.js",
15
+ "require": "./dist/mcl-container.umd.cjs",
16
+ "types": "./dist/index.d.ts"
17
+ }
18
+ },
7
19
  "scripts": {
8
- "build": "vue-tsc --project tsconfig.vue.json && tsc --project tsconfig.ts.json"
20
+ "build": "vite build"
9
21
  },
10
22
  "author": {
11
23
  "name": "Bobby Kim",
@@ -21,7 +33,17 @@
21
33
  },
22
34
  "license": "MIT",
23
35
  "dependencies": {
24
- "@bobbykim/manguito-theme": "^0.18.0"
36
+ "@bobbykim/manguito-theme": "0.20.0",
37
+ "vue": "^3.3.10"
38
+ },
39
+ "devDependencies": {
40
+ "@vitejs/plugin-vue": "^4.5.2",
41
+ "sass": "^1.69.5",
42
+ "typescript": "^5.3.3",
43
+ "vite": "^4.5.1",
44
+ "vite-plugin-css-injected-by-js": "^3.5.0",
45
+ "vite-plugin-dts": "^3.8.3",
46
+ "vue-tsc": "^1.8.25"
25
47
  },
26
- "gitHead": "969800695a9a902bc9d0c19ad6ab002caace8061"
48
+ "gitHead": "2e677770b8628a9616237cd3812af2dcb20ee5bb"
27
49
  }
package/CHANGELOG.md DELETED
@@ -1,56 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [0.5.1](https://github.com/bobbykim89/manguito-component-library/compare/@bobbykim/mcl-container@0.5.0...@bobbykim/mcl-container@0.5.1) (2024-04-01)
7
-
8
- **Note:** Version bump only for package @bobbykim/mcl-container
9
-
10
-
11
-
12
-
13
-
14
- # [0.5.0](https://github.com/bobbykim89/manguito-component-library/compare/@bobbykim/mcl-container@0.3.0...@bobbykim/mcl-container@0.5.0) (2024-03-24)
15
-
16
-
17
- ### Features
18
-
19
- * build and release ([a372086](https://github.com/bobbykim89/manguito-component-library/commit/a3720861fb40dd6ec1d0e3dda1f06e2479967432))
20
- * **components/*:** prepublish build ([c8eb95a](https://github.com/bobbykim89/manguito-component-library/commit/c8eb95a0ede6727bf183d2e9ad634ae64af1411d))
21
- * tsconfig update, slots and emits update ([c30ff80](https://github.com/bobbykim89/manguito-component-library/commit/c30ff804c961d205ac097e20cd51285a15ca8966))
22
-
23
-
24
-
25
-
26
-
27
- # [0.4.0](https://github.com/bobbykim89/manguito-component-library/compare/@bobbykim/mcl-container@0.3.0...@bobbykim/mcl-container@0.4.0) (2024-03-21)
28
-
29
-
30
- ### Features
31
-
32
- * tsconfig update, slots and emits update ([c30ff80](https://github.com/bobbykim89/manguito-component-library/commit/c30ff804c961d205ac097e20cd51285a15ca8966))
33
-
34
-
35
-
36
-
37
-
38
- # [0.3.0](https://github.com/bobbykim89/manguito-component-library/compare/@bobbykim/mcl-container@0.2.0...@bobbykim/mcl-container@0.3.0) (2024-02-27)
39
-
40
-
41
- ### Features
42
-
43
- * **/components/**/README.md,/deprecated:** update readme files, move deprecated packages to deprecated folder ([c0f8f7d](https://github.com/bobbykim89/manguito-component-library/commit/c0f8f7df158b8fcd99b4e3d191e02e3c8a9c144d))
44
-
45
-
46
-
47
-
48
-
49
- # 0.2.0 (2024-02-27)
50
-
51
-
52
- ### Features
53
-
54
- * **mcl-container:** add mcl-container-b with story page ([95b522d](https://github.com/bobbykim89/manguito-component-library/commit/95b522d61a9a86422c5fbb8105a27a3957d453ac))
55
- * **mcl-header:** init mcl-header package and add mcl-header-a component ([29fe8d7](https://github.com/bobbykim89/manguito-component-library/commit/29fe8d7b62bed93d307f340e9a378f1dfe58a03a))
56
- * **stories/*:** ran package:build to build type declaration, move deprecated story files into deprecated folder ([ffc487d](https://github.com/bobbykim89/manguito-component-library/commit/ffc487dbcc093be7a3ccfeae98c5e10e8372a0e3))
package/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import MclContainerA from './lib/mcl-container-a/MclContainerA.vue';
2
- import MclContainerB from './lib/mcl-container-b/MclContainerB.vue';
3
- export { MclContainerA, MclContainerB };
package/index.js DELETED
@@ -1,3 +0,0 @@
1
- import MclContainerA from './lib/mcl-container-a/MclContainerA.vue';
2
- import MclContainerB from './lib/mcl-container-b/MclContainerB.vue';
3
- export { MclContainerA, MclContainerB };
package/index.ts DELETED
@@ -1,4 +0,0 @@
1
- import MclContainerA from './lib/mcl-container-a/MclContainerA.vue'
2
- import MclContainerB from './lib/mcl-container-b/MclContainerB.vue'
3
-
4
- export { MclContainerA, MclContainerB }
@@ -1,134 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- ColorPalette,
4
- ColumnWidth,
5
- DirectionX,
6
- DirectionY,
7
- } from '@bobbykim/manguito-theme'
8
- import generateClass from '@bobbykim/manguito-theme'
9
-
10
- const props = withDefaults(
11
- defineProps<{
12
- sectionBg?: ColorPalette
13
- containerBg?: ColorPalette
14
- topDirection?: DirectionX
15
- bottomDirection?: DirectionX
16
- twoColumns?: boolean
17
- leftColumnWidth?: ColumnWidth
18
- }>(),
19
- {
20
- sectionBg: 'light-1',
21
- containerBg: 'primary',
22
- topDirection: 'left',
23
- bottomDirection: 'left',
24
- twoColumns: true,
25
- leftColumnWidth: 50,
26
- }
27
- )
28
- const slots = defineSlots<{
29
- 'left-column': any
30
- 'right-column': any
31
- }>()
32
-
33
- const generatePoints = (
34
- location: DirectionY,
35
- direction: DirectionX
36
- ): string => {
37
- /**
38
- * @location - 'top'||'bottom'
39
- * @direction - topDirection || bottomDirection
40
- */
41
- if (location === 'top') {
42
- return direction === 'left' ? '0,0 100,100 0,100' : '100,0 100,100 0,100'
43
- }
44
- return direction === 'left' ? '0,0 100,0 0,100' : '0,0 100,0 100,100'
45
- }
46
- const getLeftColumnWidth = (
47
- dRightCol: boolean,
48
- lColWidth: ColumnWidth
49
- ): string => {
50
- /**
51
- * @drightCol - twoColumns
52
- * @lColWidth - leftColumnWidth
53
- */
54
- if (!dRightCol) {
55
- return 'md:col-span-4'
56
- }
57
- switch (lColWidth) {
58
- case 25:
59
- return 'md:col-span-1'
60
- case 50:
61
- return 'md:col-span-2'
62
- case 75:
63
- return 'md:col-span-3'
64
- case 100:
65
- return 'md:col-span-4'
66
- default:
67
- return ''
68
- }
69
- }
70
- const getRightColumnWIdth = (
71
- dRightCol: boolean,
72
- lColWidth: ColumnWidth
73
- ): string => {
74
- if (!dRightCol) {
75
- return ''
76
- }
77
- switch (lColWidth) {
78
- case 25:
79
- return 'md:col-span-3'
80
- case 50:
81
- return 'md:col-span-2'
82
- case 75:
83
- return 'md:col-span-1'
84
- case 100:
85
- default:
86
- return ''
87
- }
88
- }
89
- </script>
90
-
91
- <template>
92
- <section class="py-lg lg:py-xl" :class="generateClass('BGCOLOR', sectionBg)">
93
- <div class="relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]">
94
- <svg
95
- class="block absolute left-0 inset-x-0 h-full w-full"
96
- :class="generateClass('SVGFILL', containerBg)"
97
- viewBox="0 0 100 100"
98
- preserveAspectRatio="none"
99
- aria-hidden="true"
100
- >
101
- <polygon :points="generatePoints('top', topDirection)" />
102
- </svg>
103
- </div>
104
- <div
105
- class="py-md md:py-lg lg:py-xl px-sm md:px-md lg:px-lg"
106
- :class="generateClass('BGCOLOR', containerBg)"
107
- >
108
- <div class="container grid md:grid-cols-4 gap-4">
109
- <div :class="getLeftColumnWidth(twoColumns, leftColumnWidth)">
110
- <slot name="left-column"></slot>
111
- </div>
112
- <div
113
- v-if="twoColumns && leftColumnWidth !== 100"
114
- :class="getRightColumnWIdth(twoColumns, leftColumnWidth)"
115
- >
116
- <slot name="right-column"></slot>
117
- </div>
118
- </div>
119
- </div>
120
- <div class="relative min-h-[36px] md:min-h-[48px] lg:min-h-[60px]">
121
- <svg
122
- class="block absolute left-0 inset-x-0 h-full w-full"
123
- :class="generateClass('SVGFILL', containerBg)"
124
- viewBox="0 0 100 100"
125
- preserveAspectRatio="none"
126
- aria-hidden="true"
127
- >
128
- <polygon :points="generatePoints('bottom', bottomDirection)" />
129
- </svg>
130
- </div>
131
- </section>
132
- </template>
133
-
134
- <style lang="scss" scoped></style>
@@ -1,66 +0,0 @@
1
- import type { ColorPalette, ColumnWidth, DirectionX } from '@bobbykim/manguito-theme';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
- sectionBg?: ColorPalette | undefined;
4
- containerBg?: ColorPalette | undefined;
5
- topDirection?: DirectionX | undefined;
6
- bottomDirection?: DirectionX | undefined;
7
- twoColumns?: boolean | undefined;
8
- leftColumnWidth?: ColumnWidth | undefined;
9
- }>, {
10
- sectionBg: string;
11
- containerBg: string;
12
- topDirection: string;
13
- bottomDirection: string;
14
- twoColumns: boolean;
15
- leftColumnWidth: number;
16
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
17
- sectionBg?: ColorPalette | undefined;
18
- containerBg?: ColorPalette | undefined;
19
- topDirection?: DirectionX | undefined;
20
- bottomDirection?: DirectionX | undefined;
21
- twoColumns?: boolean | undefined;
22
- leftColumnWidth?: ColumnWidth | undefined;
23
- }>, {
24
- sectionBg: string;
25
- containerBg: string;
26
- topDirection: string;
27
- bottomDirection: string;
28
- twoColumns: boolean;
29
- leftColumnWidth: number;
30
- }>>>, {
31
- sectionBg: ColorPalette;
32
- containerBg: ColorPalette;
33
- topDirection: DirectionX;
34
- bottomDirection: DirectionX;
35
- twoColumns: boolean;
36
- leftColumnWidth: ColumnWidth;
37
- }, {}>, Readonly<{
38
- 'left-column': any;
39
- 'right-column': any;
40
- }> & {
41
- 'left-column': any;
42
- 'right-column': any;
43
- }>;
44
- export default _default;
45
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
46
- type __VLS_TypePropsToRuntimeProps<T> = {
47
- [K in keyof T]-?: {} extends Pick<T, K> ? {
48
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
49
- } : {
50
- type: import('vue').PropType<T[K]>;
51
- required: true;
52
- };
53
- };
54
- type __VLS_WithDefaults<P, D> = {
55
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
56
- default: D[K];
57
- }> : P[K];
58
- };
59
- type __VLS_Prettify<T> = {
60
- [K in keyof T]: T[K];
61
- } & {};
62
- type __VLS_WithTemplateSlots<T, S> = T & {
63
- new (): {
64
- $slots: S;
65
- };
66
- };
@@ -1,125 +0,0 @@
1
- <script setup lang="ts">
2
- import type {
3
- ColorPalette,
4
- HeadingLevel,
5
- HeadingSize,
6
- } from '@bobbykim/manguito-theme'
7
- import generateClass from '@bobbykim/manguito-theme'
8
- import { computed } from 'vue'
9
-
10
- const props = withDefaults(
11
- defineProps<{
12
- sectionBgColor?: ColorPalette
13
- containerBgColor?: ColorPalette
14
- imageSource: string
15
- imgHeightMobile?: number
16
- imgHeightDesktop?: number
17
- title: string
18
- titleLevel?: HeadingLevel
19
- titleSize?: HeadingSize
20
- titleColor?: ColorPalette
21
- }>(),
22
- {
23
- sectionBgColor: 'transparent',
24
- containerBgColor: 'light-2',
25
- imgHeightMobile: 256,
26
- imgHeightDesktop: 384,
27
- titleLevel: 'h2',
28
- titleSize: 'md',
29
- titleColor: 'dark-3',
30
- }
31
- )
32
-
33
- const slots = defineSlots<{
34
- content: any
35
- }>()
36
-
37
- const getTitleClass = (
38
- level: HeadingLevel,
39
- size: HeadingSize,
40
- color: ColorPalette
41
- ): string => {
42
- /**
43
- * @level - titleLevel
44
- * @size - titleSize
45
- * @Color - titleColor
46
- */
47
- let heading: string
48
- // let textColor: string = textColorClass[Color]
49
- if (level === 'h1') {
50
- // heading = h1Class[size]
51
- heading = generateClass('H1', size)
52
- } else if (level === 'h2') {
53
- // heading = h2Class[size]
54
- heading = generateClass('H2', size)
55
- } else {
56
- // heading = h3Class[size]
57
- heading = generateClass('H3', size)
58
- }
59
- return `${heading} ${generateClass('TEXTCOLOR', color)}`
60
- }
61
-
62
- const parallaxImage = computed(() => {
63
- return {
64
- '--bg-image': `url('${props.imageSource}')`,
65
- '--container-height-mobile': `${props.imgHeightMobile}px`,
66
- '--container-height-desktop': `${
67
- props.imgHeightDesktop > props.imgHeightMobile
68
- ? props.imgHeightDesktop
69
- : props.imgHeightMobile
70
- }px`,
71
- }
72
- })
73
- </script>
74
-
75
- <template>
76
- <section
77
- class="relative pt-xl md:pt-3xl"
78
- :class="generateClass('BGCOLOR', sectionBgColor)"
79
- >
80
- <div class="relative parallax-container" :style="parallaxImage">
81
- <div
82
- class="absolute parallax-image bg-fixed bg-cover w-full top-0 left-0 bg-no-repeat"
83
- ></div>
84
- <div
85
- class="container relative z-[10] px-xs top-[-48px] md:top-[-96px] max-w-[1140px]"
86
- >
87
- <div
88
- :class="generateClass('BGCOLOR', containerBgColor)"
89
- class="py-md md:py-lg px-xs md:px-md lg:p-xl"
90
- >
91
- <div class="w-full">
92
- <compoenent :is="titleLevel">
93
- <span
94
- :class="getTitleClass(titleLevel, titleSize, titleColor)"
95
- v-html="title"
96
- ></span>
97
- </compoenent>
98
- <div class="mt-sm">
99
- <slot name="content" />
100
- </div>
101
- </div>
102
- </div>
103
- </div>
104
- </div>
105
- </section>
106
- </template>
107
-
108
- <style lang="scss" scoped>
109
- .parallax-container {
110
- height: var(--container-height-mobile, 256px);
111
- }
112
- .parallax-image {
113
- height: var(--container-height-mobile, 256px);
114
- background-image: var(--bg-image);
115
- background-position: center top;
116
- }
117
- @media screen and (min-width: 768px) {
118
- .parallax-container {
119
- height: var(--container-height-desktop, 384px);
120
- }
121
- .parallax-image {
122
- height: var(--container-height-desktop, 384px);
123
- }
124
- }
125
- </style>
@@ -1,73 +0,0 @@
1
- import type { ColorPalette, HeadingLevel, HeadingSize } from '@bobbykim/manguito-theme';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
- sectionBgColor?: ColorPalette | undefined;
4
- containerBgColor?: ColorPalette | undefined;
5
- imageSource: string;
6
- imgHeightMobile?: number | undefined;
7
- imgHeightDesktop?: number | undefined;
8
- title: string;
9
- titleLevel?: HeadingLevel | undefined;
10
- titleSize?: HeadingSize | undefined;
11
- titleColor?: ColorPalette | undefined;
12
- }>, {
13
- sectionBgColor: string;
14
- containerBgColor: string;
15
- imgHeightMobile: number;
16
- imgHeightDesktop: number;
17
- titleLevel: string;
18
- titleSize: string;
19
- titleColor: string;
20
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
21
- sectionBgColor?: ColorPalette | undefined;
22
- containerBgColor?: ColorPalette | undefined;
23
- imageSource: string;
24
- imgHeightMobile?: number | undefined;
25
- imgHeightDesktop?: number | undefined;
26
- title: string;
27
- titleLevel?: HeadingLevel | undefined;
28
- titleSize?: HeadingSize | undefined;
29
- titleColor?: ColorPalette | undefined;
30
- }>, {
31
- sectionBgColor: string;
32
- containerBgColor: string;
33
- imgHeightMobile: number;
34
- imgHeightDesktop: number;
35
- titleLevel: string;
36
- titleSize: string;
37
- titleColor: string;
38
- }>>>, {
39
- titleColor: ColorPalette;
40
- sectionBgColor: ColorPalette;
41
- containerBgColor: ColorPalette;
42
- imgHeightMobile: number;
43
- imgHeightDesktop: number;
44
- titleLevel: HeadingLevel;
45
- titleSize: HeadingSize;
46
- }, {}>, Readonly<{
47
- content: any;
48
- }> & {
49
- content: any;
50
- }>;
51
- export default _default;
52
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
53
- type __VLS_TypePropsToRuntimeProps<T> = {
54
- [K in keyof T]-?: {} extends Pick<T, K> ? {
55
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
56
- } : {
57
- type: import('vue').PropType<T[K]>;
58
- required: true;
59
- };
60
- };
61
- type __VLS_WithDefaults<P, D> = {
62
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
63
- default: D[K];
64
- }> : P[K];
65
- };
66
- type __VLS_Prettify<T> = {
67
- [K in keyof T]: T[K];
68
- } & {};
69
- type __VLS_WithTemplateSlots<T, S> = T & {
70
- new (): {
71
- $slots: S;
72
- };
73
- };
package/tsconfig.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "include": ["./**/*.ts", "./**/*.vue"],
4
- "exclude": ["node_modules", "./**/*.vue.d.ts"]
5
- }
package/tsconfig.ts.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "include": ["./**/*.ts"],
4
- "exclude": ["node_modules", "./**/*.vue.d.ts", "./**/*.vue"],
5
- "compilerOptions": {
6
- "skipLibCheck": true,
7
- "declaration": true
8
- }
9
- }
package/tsconfig.vue.json DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "include": ["./**/*.vue"],
4
- "exclude": ["node_modules"],
5
- "compilerOptions": {
6
- "declaration": true,
7
- "emitDeclarationOnly": true
8
- }
9
- }