@bobbykim/mcl-footer 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
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.2.0 (2024-02-27)
7
+
8
+
9
+ ### Features
10
+
11
+ * **manguito-theme,mcl-cards,mcl-header,mcl-footer,mcl-carousel:** add vueuse as one of dependencies, update code to make them ssr friendly ([119a327](https://github.com/bobbykim89/manguito-component-library/commit/119a327adf1ca9866e6ac063bce5acd4790db612))
12
+ * **mcl-footer:** finialize adding controllers for mcl-footer-a component, add mdx doc page ([de3bee0](https://github.com/bobbykim89/manguito-component-library/commit/de3bee0cb0376e50eaa761b6815b9dd83f61b8ec))
13
+ * **mcl-footer:** init mcl-footer-a ([8b9fc27](https://github.com/bobbykim89/manguito-component-library/commit/8b9fc27c19f644459e659c84a413f01aeda3faca))
14
+ * **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/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Bobby Kim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # @bobbykim/mcl-footer
2
+
3
+ Add description
4
+
5
+ ## Demo
6
+
7
+ [MCL Histoire Page](https://manguito-component-library.vercel.app/story/{%story-link%})
8
+
9
+ ## Install
10
+
11
+ ## Usage
12
+
13
+ `import MclFooter from "@bobbykim/mcl-footer"`;
14
+
15
+ ## Maintainer
16
+
17
+ - **Bobby Kim** - _Initial work_
18
+
19
+ ## License
20
+
21
+ This project is licensed under the MIT License - see the [LICENSE.md](./LICENSE.md) file for details
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import MclFooterA from './lib/mcl-footer-a/MclFooterA.vue';
2
+ export * from './lib/mcl-footer-a/index.types';
3
+ export { MclFooterA };
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import MclFooterA from './lib/mcl-footer-a/MclFooterA.vue';
2
+ export * from './lib/mcl-footer-a/index.types';
3
+ export { MclFooterA };
package/index.ts ADDED
@@ -0,0 +1,4 @@
1
+ import MclFooterA from './lib/mcl-footer-a/MclFooterA.vue'
2
+ export * from './lib/mcl-footer-a/index.types'
3
+
4
+ export { MclFooterA }
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ viewBox="0 0 448 512"
5
+ fill="currentColor"
6
+ class="h-md w-md"
7
+ role="img"
8
+ >
9
+ <!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
10
+ <path
11
+ d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM277.3 415.7c-8.4 1.5-11.5-3.7-11.5-8 0-5.4.2-33 .2-55.3 0-15.6-5.2-25.5-11.3-30.7 37-4.1 76-9.2 76-73.1 0-18.2-6.5-27.3-17.1-39 1.7-4.3 7.4-22-1.7-45-13.9-4.3-45.7 17.9-45.7 17.9-13.2-3.7-27.5-5.6-41.6-5.6-14.1 0-28.4 1.9-41.6 5.6 0 0-31.8-22.2-45.7-17.9-9.1 22.9-3.5 40.6-1.7 45-10.6 11.7-15.6 20.8-15.6 39 0 63.6 37.3 69 74.3 73.1-4.8 4.3-9.1 11.7-10.6 22.3-9.5 4.3-33.8 11.7-48.3-13.9-9.1-15.8-25.5-17.1-25.5-17.1-16.2-.2-1.1 10.2-1.1 10.2 10.8 5 18.4 24.2 18.4 24.2 9.7 29.7 56.1 19.7 56.1 19.7 0 13.9.2 36.5.2 40.6 0 4.3-3 9.5-11.5 8-66-22.1-112.2-84.9-112.2-158.3 0-91.8 70.2-161.5 162-161.5S388 165.6 388 257.4c.1 73.4-44.7 136.3-110.7 158.3zm-98.1-61.1c-1.9.4-3.7-.4-3.9-1.7-.2-1.5 1.1-2.8 3-3.2 1.9-.2 3.7.6 3.9 1.9.3 1.3-1 2.6-3 3zm-9.5-.9c0 1.3-1.5 2.4-3.5 2.4-2.2.2-3.7-.9-3.7-2.4 0-1.3 1.5-2.4 3.5-2.4 1.9-.2 3.7.9 3.7 2.4zm-13.7-1.1c-.4 1.3-2.4 1.9-4.1 1.3-1.9-.4-3.2-1.9-2.8-3.2.4-1.3 2.4-1.9 4.1-1.5 2 .6 3.3 2.1 2.8 3.4zm-12.3-5.4c-.9 1.1-2.8.9-4.3-.6-1.5-1.3-1.9-3.2-.9-4.1.9-1.1 2.8-.9 4.3.6 1.3 1.3 1.8 3.3.9 4.1zm-9.1-9.1c-.9.6-2.6 0-3.7-1.5s-1.1-3.2 0-3.9c1.1-.9 2.8-.2 3.7 1.3 1.1 1.5 1.1 3.3 0 4.1zm-6.5-9.7c-.9.9-2.4.4-3.5-.6-1.1-1.3-1.3-2.8-.4-3.5.9-.9 2.4-.4 3.5.6 1.1 1.3 1.3 2.8.4 3.5zm-6.7-7.4c-.4.9-1.7 1.1-2.8.4-1.3-.6-1.9-1.7-1.5-2.6.4-.6 1.5-.9 2.8-.4 1.3.7 1.9 1.8 1.5 2.6z"
12
+ />
13
+ </svg>
14
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ viewBox="0 0 448 512"
5
+ fill="currentColor"
6
+ class="h-md w-md"
7
+ role="img"
8
+ >
9
+ <!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
10
+ <path
11
+ d="M224,202.66A53.34,53.34,0,1,0,277.36,256,53.38,53.38,0,0,0,224,202.66Zm124.71-41a54,54,0,0,0-30.41-30.41c-21-8.29-71-6.43-94.3-6.43s-73.25-1.93-94.31,6.43a54,54,0,0,0-30.41,30.41c-8.28,21-6.43,71.05-6.43,94.33S91,329.26,99.32,350.33a54,54,0,0,0,30.41,30.41c21,8.29,71,6.43,94.31,6.43s73.24,1.93,94.3-6.43a54,54,0,0,0,30.41-30.41c8.35-21,6.43-71.05,6.43-94.33S357.1,182.74,348.75,161.67ZM224,338a82,82,0,1,1,82-82A81.9,81.9,0,0,1,224,338Zm85.38-148.3a19.14,19.14,0,1,1,19.13-19.14A19.1,19.1,0,0,1,309.42,189.74ZM400,32H48A48,48,0,0,0,0,80V432a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V80A48,48,0,0,0,400,32ZM382.88,322c-1.29,25.63-7.14,48.34-25.85,67s-41.4,24.63-67,25.85c-26.41,1.49-105.59,1.49-132,0-25.63-1.29-48.26-7.15-67-25.85s-24.63-41.42-25.85-67c-1.49-26.42-1.49-105.61,0-132,1.29-25.63,7.07-48.34,25.85-67s41.47-24.56,67-25.78c26.41-1.49,105.59-1.49,132,0,25.63,1.29,48.33,7.15,67,25.85s24.63,41.42,25.85,67.05C384.37,216.44,384.37,295.56,382.88,322Z"
12
+ />
13
+ </svg>
14
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ viewBox="0 0 448 512"
5
+ fill="currentColor"
6
+ class="h-md w-md"
7
+ role="img"
8
+ >
9
+ <!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
10
+ <path
11
+ d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"
12
+ />
13
+ </svg>
14
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ viewBox="0 0 448 512"
5
+ fill="currentColor"
6
+ class="h-md w-md"
7
+ role="img"
8
+ >
9
+ <!--! Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
10
+ <path
11
+ d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-48.9 158.8c.2 2.8.2 5.7.2 8.5 0 86.7-66 186.6-186.6 186.6-37.2 0-71.7-10.8-100.7-29.4 5.3.6 10.4.8 15.8.8 30.7 0 58.9-10.4 81.4-28-28.8-.6-53-19.5-61.3-45.5 10.1 1.5 19.2 1.5 29.6-1.2-30-6.1-52.5-32.5-52.5-64.4v-.8c8.7 4.9 18.9 7.9 29.6 8.3a65.447 65.447 0 0 1-29.2-54.6c0-12.2 3.2-23.4 8.9-33.1 32.3 39.8 80.8 65.8 135.2 68.6-9.3-44.5 24-80.6 64-80.6 18.9 0 35.9 7.9 47.9 20.7 14.8-2.8 29-8.3 41.6-15.8-4.9 15.2-15.2 28-28.8 36.1 13.2-1.4 26-5.1 37.8-10.2-8.9 13.1-20.1 24.7-32.9 34z"
12
+ />
13
+ </svg>
14
+ </template>
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -0,0 +1,295 @@
1
+ <script setup lang="ts">
2
+ import type {
3
+ BodyText,
4
+ ColorPalette,
5
+ CtaTarget,
6
+ HeadingSize,
7
+ } from '@bobbykim/manguito-theme'
8
+ import generateClass from '@bobbykim/manguito-theme'
9
+ import SocialIcons from './SocialIcons.vue'
10
+ import type { MenuItemEvent, MenuItemType, SocialUrl } from './index.types'
11
+
12
+ const props = withDefaults(
13
+ defineProps<{
14
+ title: string
15
+ titleSize?: HeadingSize
16
+ titleColor?: ColorPalette
17
+ copyText?: string
18
+ logo: string
19
+ logoAlt?: string
20
+ logoAsLink?: boolean
21
+ logoLink: string
22
+ logoLinkTarget?: CtaTarget
23
+ displaySocialIcons?: boolean
24
+ socialIconColor: ColorPalette
25
+ socialLinks?: SocialUrl
26
+ menuItems: MenuItemType[]
27
+ secondaryMenuItems?: MenuItemType[]
28
+ menuItemAsLink?: boolean
29
+ menuTextSize?: BodyText
30
+ menuTextColor?: ColorPalette
31
+ menuTextBold?: boolean
32
+ displayHighlight?: boolean
33
+ highlightColor?: ColorPalette
34
+ bgColor?: ColorPalette
35
+ borderTopColor?: ColorPalette
36
+ headlineColor?: ColorPalette
37
+ }>(),
38
+ {
39
+ titleSize: 'md',
40
+ titleColor: 'light-1',
41
+ logoAsLink: true,
42
+ logoLinkTarget: '_self',
43
+ displaySocialIcons: true,
44
+ socialIconColor: 'light-1',
45
+ menuItemAsLink: true,
46
+ menuTextSize: 'md',
47
+ menuTextColor: 'light-1',
48
+ menuTextBold: false,
49
+ displayHighlight: true,
50
+ highlightColor: 'primary',
51
+ bgColor: 'dark-3',
52
+ borderTopColor: 'primary',
53
+ headlineColor: 'light-1',
54
+ }
55
+ )
56
+
57
+ const emit = defineEmits(['menu-click', 'logo-click', 'secondary-menu-click'])
58
+ type EmitType = 'menu' | 'logo' | 'secondary'
59
+
60
+ const getFooterClass = (bg: ColorPalette, border: ColorPalette): string => {
61
+ /**
62
+ * @bg - bgColor
63
+ * @border - borderTopColor
64
+ */
65
+
66
+ const classArray: string[] = [
67
+ generateClass('BGCOLOR', bg),
68
+ generateClass('BORDER', border),
69
+ ]
70
+ return classArray.join(' ')
71
+ }
72
+ const getTitleClass = (size: HeadingSize, color: ColorPalette): string => {
73
+ /**
74
+ * @size - titleSize
75
+ * @color - titleColor
76
+ */
77
+ const classArray: string[] = [
78
+ generateClass('H2', size),
79
+ generateClass('TEXTCOLOR', color),
80
+ ]
81
+ return classArray.join(' ')
82
+ }
83
+ const getMenuItemClass = (
84
+ size: BodyText,
85
+ color: ColorPalette,
86
+ bold: boolean
87
+ ): string => {
88
+ /**
89
+ * @size - menuTextSize
90
+ * @color - menuTextColor
91
+ * @bold - menuTextBold
92
+ */
93
+ const classArray: string[] = [
94
+ generateClass('BODYTEXT', size),
95
+ generateClass('TEXTCOLOR', color),
96
+ ]
97
+ if (bold) {
98
+ classArray.push('font-bold')
99
+ }
100
+ return classArray.join(' ')
101
+ }
102
+
103
+ const footerItemClick = (
104
+ e: Event,
105
+ title: string,
106
+ link: string,
107
+ target: CtaTarget = '_self',
108
+ itemLink: boolean,
109
+ emitType: EmitType
110
+ ): void => {
111
+ /**
112
+ * @e - $event
113
+ * @title - menuItems[#].title / title
114
+ * @link - menuItems[#].url / logoLink
115
+ * @target - menuItems[#].target / logoLinkTaget
116
+ * @itemlink - menuItemAsLink / logoAsLink
117
+ * @emitType - Non prop value type EmitType
118
+ */
119
+ !itemLink && e.preventDefault()
120
+
121
+ const eventObj: MenuItemEvent = {
122
+ event: e,
123
+ title,
124
+ link,
125
+ target: target ? target : '_self',
126
+ }
127
+ if (emitType === 'menu') {
128
+ emit('menu-click', eventObj)
129
+ }
130
+ if (emitType === 'logo') {
131
+ emit('logo-click', eventObj)
132
+ }
133
+ if (emitType === 'secondary') {
134
+ emit('secondary-menu-click', eventObj)
135
+ }
136
+ }
137
+ </script>
138
+
139
+ <template>
140
+ <footer
141
+ class="border-t-2 py-6 sm:py-8 md:py-12"
142
+ :class="getFooterClass(bgColor, borderTopColor)"
143
+ >
144
+ <div class="container px-xs md:px-lg lg:px-xl">
145
+ <div
146
+ class="flex flex-col md:flex-row flex-wrap justify-between mb-xs md:mb-md px-xs md:px-md border-b-2"
147
+ :class="generateClass('BORDER', headlineColor)"
148
+ >
149
+ <div class="h-lg md:h-xl align-middle mb-xs">
150
+ <a
151
+ :href="logoLink"
152
+ :target="logoLinkTarget"
153
+ class="h-full inline-block outline-none focus:ring-2 ring-offset-2 ring-offset-transparent rounded-md transition-all duration-300 ease-linear"
154
+ :class="generateClass('RINGCOLOR', titleColor)"
155
+ @click="
156
+ footerItemClick(
157
+ $event,
158
+ title,
159
+ logoLink,
160
+ logoLinkTarget,
161
+ logoAsLink,
162
+ 'logo'
163
+ )
164
+ "
165
+ >
166
+ <img class="inline-block h-full" :src="logo" :alt="logoAlt" />
167
+ </a>
168
+ </div>
169
+ <div
170
+ v-if="displaySocialIcons"
171
+ class="mb-xs flex items-center justify-end md:justify-center"
172
+ >
173
+ <!-- social icons -->
174
+ <social-icons
175
+ :social-links="socialLinks"
176
+ :icon-color="socialIconColor"
177
+ ></social-icons>
178
+ </div>
179
+ </div>
180
+ <div
181
+ class="flex flex-wrap md:justify-between items-center md:items-start gap-6 md:gap-8"
182
+ >
183
+ <div class="grid gap-2 justify-items-center basis-full md:basis-1/3">
184
+ <h2
185
+ class="inline-block align-middle tracking-wider"
186
+ :class="getTitleClass(titleSize, titleColor)"
187
+ v-html="title"
188
+ ></h2>
189
+ <small v-if="copyText" class="text-xs text-white align-middle mb-2">
190
+ &copy; {{ copyText + ' ' + new Date().getFullYear() }}
191
+ </small>
192
+ <div class="px-xs md:px-0">
193
+ <slot></slot>
194
+ </div>
195
+ </div>
196
+ <nav
197
+ class="text-sm flex flex-col md:flex-row items-center sm:items-start sm:flex-row text-center sm:text-left gap-xs justify-between md:justify-around grow md:basis-1/2"
198
+ >
199
+ <ul
200
+ class="flex flex-wrap md:flex-col justify-center items-center gap-2xs"
201
+ >
202
+ <li
203
+ v-for="(item, i) in menuItems"
204
+ :key="`first-nav-${i}`"
205
+ class="inline-block"
206
+ >
207
+ <a
208
+ :href="item.url"
209
+ :target="item.target"
210
+ class="tracking-wide outline-none nav__text"
211
+ :class="
212
+ getMenuItemClass(menuTextSize, menuTextColor, menuTextBold)
213
+ "
214
+ @click="
215
+ footerItemClick(
216
+ $event,
217
+ item.title,
218
+ item.url,
219
+ item.target,
220
+ menuItemAsLink,
221
+ 'menu'
222
+ )
223
+ "
224
+ v-html="item.title"
225
+ >
226
+ </a>
227
+ <div
228
+ v-if="displayHighlight"
229
+ class="relative top-3xs h-3xs nav__decorator"
230
+ :class="generateClass('BEFOREBG', highlightColor)"
231
+ ></div>
232
+ </li>
233
+ </ul>
234
+
235
+ <!-- secondary menu -->
236
+ <ul
237
+ v-if="secondaryMenuItems"
238
+ class="flex flex-wrap md:flex-col justify-center items-center gap-2xs"
239
+ >
240
+ <li
241
+ v-for="(item, i) in secondaryMenuItems"
242
+ :key="`second-nav-${i}`"
243
+ class="inline-block"
244
+ >
245
+ <a
246
+ :href="item.url"
247
+ :target="item.target"
248
+ class="tracking-wide outline-none nav__text"
249
+ :class="
250
+ getMenuItemClass(menuTextSize, menuTextColor, menuTextBold)
251
+ "
252
+ @click="
253
+ footerItemClick(
254
+ $event,
255
+ item.title,
256
+ item.url,
257
+ item.target,
258
+ menuItemAsLink,
259
+ 'secondary'
260
+ )
261
+ "
262
+ v-html="item.title"
263
+ >
264
+ </a>
265
+ <div
266
+ v-if="displayHighlight"
267
+ class="relative top-3xs h-3xs nav__decorator"
268
+ :class="generateClass('BEFOREBG', highlightColor)"
269
+ ></div>
270
+ </li>
271
+ </ul>
272
+ </nav>
273
+ </div>
274
+ </div>
275
+ </footer>
276
+ </template>
277
+
278
+ <style lang="scss" scoped>
279
+ .nav__decorator {
280
+ &::before {
281
+ content: '';
282
+ position: absolute;
283
+ bottom: 0;
284
+ left: 0;
285
+ height: 100%;
286
+ width: 0;
287
+ transition: width 0.3s linear;
288
+ }
289
+ }
290
+
291
+ .nav__text:focus + .nav__decorator::before,
292
+ .nav__text:hover + .nav__decorator::before {
293
+ width: 100%;
294
+ }
295
+ </style>
@@ -0,0 +1,132 @@
1
+ import type { BodyText, ColorPalette, CtaTarget, HeadingSize } from '@bobbykim/manguito-theme';
2
+ import type { MenuItemType, SocialUrl } from './index.types';
3
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ title: string;
5
+ titleSize?: HeadingSize | undefined;
6
+ titleColor?: ColorPalette | undefined;
7
+ copyText?: string | undefined;
8
+ logo: string;
9
+ logoAlt?: string | undefined;
10
+ logoAsLink?: boolean | undefined;
11
+ logoLink: string;
12
+ logoLinkTarget?: CtaTarget | undefined;
13
+ displaySocialIcons?: boolean | undefined;
14
+ socialIconColor: ColorPalette;
15
+ socialLinks?: SocialUrl | undefined;
16
+ menuItems: MenuItemType[];
17
+ secondaryMenuItems?: MenuItemType[] | undefined;
18
+ menuItemAsLink?: boolean | undefined;
19
+ menuTextSize?: BodyText | undefined;
20
+ menuTextColor?: ColorPalette | undefined;
21
+ menuTextBold?: boolean | undefined;
22
+ displayHighlight?: boolean | undefined;
23
+ highlightColor?: ColorPalette | undefined;
24
+ bgColor?: ColorPalette | undefined;
25
+ borderTopColor?: ColorPalette | undefined;
26
+ headlineColor?: ColorPalette | undefined;
27
+ }>, {
28
+ titleSize: string;
29
+ titleColor: string;
30
+ logoAsLink: boolean;
31
+ logoLinkTarget: string;
32
+ displaySocialIcons: boolean;
33
+ socialIconColor: string;
34
+ menuItemAsLink: boolean;
35
+ menuTextSize: string;
36
+ menuTextColor: string;
37
+ menuTextBold: boolean;
38
+ displayHighlight: boolean;
39
+ highlightColor: string;
40
+ bgColor: string;
41
+ borderTopColor: string;
42
+ headlineColor: string;
43
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
44
+ "menu-click": (...args: any[]) => void;
45
+ "logo-click": (...args: any[]) => void;
46
+ "secondary-menu-click": (...args: any[]) => void;
47
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
48
+ title: string;
49
+ titleSize?: HeadingSize | undefined;
50
+ titleColor?: ColorPalette | undefined;
51
+ copyText?: string | undefined;
52
+ logo: string;
53
+ logoAlt?: string | undefined;
54
+ logoAsLink?: boolean | undefined;
55
+ logoLink: string;
56
+ logoLinkTarget?: CtaTarget | undefined;
57
+ displaySocialIcons?: boolean | undefined;
58
+ socialIconColor: ColorPalette;
59
+ socialLinks?: SocialUrl | undefined;
60
+ menuItems: MenuItemType[];
61
+ secondaryMenuItems?: MenuItemType[] | undefined;
62
+ menuItemAsLink?: boolean | undefined;
63
+ menuTextSize?: BodyText | undefined;
64
+ menuTextColor?: ColorPalette | undefined;
65
+ menuTextBold?: boolean | undefined;
66
+ displayHighlight?: boolean | undefined;
67
+ highlightColor?: ColorPalette | undefined;
68
+ bgColor?: ColorPalette | undefined;
69
+ borderTopColor?: ColorPalette | undefined;
70
+ headlineColor?: ColorPalette | undefined;
71
+ }>, {
72
+ titleSize: string;
73
+ titleColor: string;
74
+ logoAsLink: boolean;
75
+ logoLinkTarget: string;
76
+ displaySocialIcons: boolean;
77
+ socialIconColor: string;
78
+ menuItemAsLink: boolean;
79
+ menuTextSize: string;
80
+ menuTextColor: string;
81
+ menuTextBold: boolean;
82
+ displayHighlight: boolean;
83
+ highlightColor: string;
84
+ bgColor: string;
85
+ borderTopColor: string;
86
+ headlineColor: string;
87
+ }>>> & {
88
+ "onMenu-click"?: ((...args: any[]) => any) | undefined;
89
+ "onLogo-click"?: ((...args: any[]) => any) | undefined;
90
+ "onSecondary-menu-click"?: ((...args: any[]) => any) | undefined;
91
+ }, {
92
+ titleColor: ColorPalette;
93
+ titleSize: HeadingSize;
94
+ logoAsLink: boolean;
95
+ logoLinkTarget: CtaTarget;
96
+ displaySocialIcons: boolean;
97
+ socialIconColor: ColorPalette;
98
+ menuItemAsLink: boolean;
99
+ menuTextSize: BodyText;
100
+ menuTextColor: ColorPalette;
101
+ menuTextBold: boolean;
102
+ displayHighlight: boolean;
103
+ highlightColor: ColorPalette;
104
+ bgColor: ColorPalette;
105
+ borderTopColor: ColorPalette;
106
+ headlineColor: ColorPalette;
107
+ }, {}>, {
108
+ default?(_: {}): any;
109
+ }>;
110
+ export default _default;
111
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
112
+ type __VLS_TypePropsToRuntimeProps<T> = {
113
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
114
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
115
+ } : {
116
+ type: import('vue').PropType<T[K]>;
117
+ required: true;
118
+ };
119
+ };
120
+ type __VLS_WithDefaults<P, D> = {
121
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
122
+ default: D[K];
123
+ }> : P[K];
124
+ };
125
+ type __VLS_Prettify<T> = {
126
+ [K in keyof T]: T[K];
127
+ } & {};
128
+ type __VLS_WithTemplateSlots<T, S> = T & {
129
+ new (): {
130
+ $slots: S;
131
+ };
132
+ };
@@ -0,0 +1,100 @@
1
+ <script setup lang="ts">
2
+ import { ref, markRaw, onMounted, computed } from 'vue'
3
+ import type { ColorPalette } from '@bobbykim/manguito-theme'
4
+ import generateClass from '@bobbykim/manguito-theme'
5
+ import type { SocialUrl } from './index.types'
6
+ // Import Icon files
7
+ import GithubIcon from '../common//icons/GithubIcon.vue'
8
+ import InstagramIcon from '../common/icons/InstagramIcon.vue'
9
+ import LinkedinIcon from '../common/icons/LinkedinIcon.vue'
10
+ import TwitterIcon from '../common/icons/TwitterIcon.vue'
11
+
12
+ const props = withDefaults(
13
+ defineProps<{
14
+ iconColor: ColorPalette
15
+ socialLinks?: SocialUrl
16
+ }>(),
17
+ {
18
+ iconColor: 'light-1',
19
+ }
20
+ )
21
+
22
+ interface IconList {
23
+ url: string
24
+ icon: any
25
+ label: string
26
+ }
27
+ const iconsRef = ref<any>([])
28
+
29
+ const handleIconsList = (): void => {
30
+ const { linkedin, instagram, github, twitter } = props.socialLinks!
31
+
32
+ const iconsList: IconList[] = []
33
+ if (linkedin) {
34
+ iconsList.push({
35
+ url: linkedin,
36
+ icon: markRaw(LinkedinIcon),
37
+ label: 'linkedin social icon',
38
+ })
39
+ }
40
+ if (github) {
41
+ iconsList.push({
42
+ url: github,
43
+ icon: markRaw(GithubIcon),
44
+ label: 'github social icon',
45
+ })
46
+ }
47
+ if (instagram) {
48
+ iconsList.push({
49
+ url: instagram,
50
+ icon: markRaw(InstagramIcon),
51
+ label: 'instagram social icon',
52
+ })
53
+ }
54
+ if (twitter) {
55
+ iconsList.push({
56
+ url: twitter,
57
+ icon: markRaw(TwitterIcon),
58
+ label: 'twitter social icon',
59
+ })
60
+ }
61
+ iconsRef.value = iconsList
62
+ }
63
+
64
+ const getIconList = computed(() => {
65
+ return iconsRef.value
66
+ })
67
+
68
+ const getIconColor = (color: ColorPalette): string => {
69
+ /**
70
+ * @color - iconColor
71
+ */
72
+ const classArray: string[] = [
73
+ generateClass('TEXTCOLOR', color),
74
+ generateClass('RINGCOLOR', color),
75
+ ]
76
+ return classArray.join(' ')
77
+ }
78
+
79
+ onMounted(() => {
80
+ handleIconsList()
81
+ })
82
+ </script>
83
+
84
+ <template>
85
+ <ul class="flex flex-wrap">
86
+ <li v-for="(item, index) in iconsRef" :key="index" class="mr-xs last:mr-0">
87
+ <a
88
+ :href="item.url"
89
+ target="_blank"
90
+ class="inline-block outline-none focus:ring-2 hover:ring-2 hover:opacity-70 ring-offset-2 ring-offset-transparent rounded-md transition-all duration-300 ease-linear"
91
+ :class="getIconColor(iconColor)"
92
+ :aria-label="item.label"
93
+ >
94
+ <component :is="item.icon"></component>
95
+ </a>
96
+ </li>
97
+ </ul>
98
+ </template>
99
+
100
+ <style lang="scss" scoped></style>
@@ -0,0 +1,33 @@
1
+ import type { ColorPalette } from '@bobbykim/manguito-theme';
2
+ import type { SocialUrl } from './index.types';
3
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
+ iconColor: ColorPalette;
5
+ socialLinks?: SocialUrl | undefined;
6
+ }>, {
7
+ iconColor: string;
8
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
+ iconColor: ColorPalette;
10
+ socialLinks?: SocialUrl | undefined;
11
+ }>, {
12
+ iconColor: string;
13
+ }>>>, {
14
+ iconColor: ColorPalette;
15
+ }, {}>;
16
+ export default _default;
17
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
18
+ type __VLS_TypePropsToRuntimeProps<T> = {
19
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
20
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
21
+ } : {
22
+ type: import('vue').PropType<T[K]>;
23
+ required: true;
24
+ };
25
+ };
26
+ type __VLS_WithDefaults<P, D> = {
27
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
28
+ default: D[K];
29
+ }> : P[K];
30
+ };
31
+ type __VLS_Prettify<T> = {
32
+ [K in keyof T]: T[K];
33
+ } & {};
@@ -0,0 +1,18 @@
1
+ import type { CtaTarget } from '@bobbykim/manguito-theme';
2
+ export interface MenuItemType {
3
+ title: string;
4
+ url: string;
5
+ target?: CtaTarget;
6
+ }
7
+ export interface SocialUrl {
8
+ linkedin?: string;
9
+ instagram?: string;
10
+ github?: string;
11
+ twitter?: string;
12
+ }
13
+ export interface MenuItemEvent {
14
+ event: Event;
15
+ title: string;
16
+ link: string;
17
+ target?: CtaTarget;
18
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
1
+ import type { CtaTarget } from '@bobbykim/manguito-theme'
2
+
3
+ export interface MenuItemType {
4
+ title: string
5
+ url: string
6
+ target?: CtaTarget
7
+ }
8
+
9
+ export interface SocialUrl {
10
+ linkedin?: string
11
+ instagram?: string
12
+ github?: string
13
+ twitter?: string
14
+ }
15
+
16
+ export interface MenuItemEvent {
17
+ event: Event
18
+ title: string
19
+ link: string
20
+ target?: CtaTarget
21
+ }
package/package.json ADDED
@@ -0,0 +1 @@
1
+ {"name":"@bobbykim/mcl-footer","version":"0.2.0","description":"","type":"module","main":"index.ts","scripts":{"build":"vue-tsc --project tsconfig.vue.json && tsc"},"author":{"name":"Bobby Kim","url":"https://www.devbobbykim.com/"},"homepage":"https://manguito-component-library.vercel.app/","repository":{"type":"git","url":"https://github.com/bobbykim89/manguito-component-library.git"},"publishConfig":{"access":"public"},"license":"MIT","dependencies":{"@bobbykim/manguito-theme":"^0.14.0"},"gitHead":"4d94a8d34988d926c8d465891fd7aa535cffdf33"}
package/tsconfig.json ADDED
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["./**/*.vue"],
4
+ "exclude": ["node_modules"],
5
+ "compilerOptions": {
6
+ "declaration": true,
7
+ "emitDeclarationOnly": true
8
+ }
9
+ }