@bobbykim/manguito-theme 0.18.0 → 0.19.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/LICENSE.md +1 -1
- package/README.md +2 -2
- package/dist/core.cjs +2 -0
- package/dist/core.d.ts +676 -0
- package/dist/core.js +2088 -0
- package/dist/mcl-theme.cjs +1 -0
- package/dist/mcl-theme.d.ts +12 -0
- package/dist/mcl-theme.js +608 -0
- package/package.json +28 -7
- package/CHANGELOG.md +0 -150
- package/index.d.ts +0 -14
- package/index.js +0 -19
- package/index.ts +0 -31
- package/lib/alert/Alert.vue +0 -92
- package/lib/alert/Alert.vue.d.ts +0 -65
- package/lib/collapse/Collapse.vue +0 -118
- package/lib/collapse/Collapse.vue.d.ts +0 -55
- package/lib/composables/index.d.ts +0 -1
- package/lib/composables/index.js +0 -1
- package/lib/composables/index.ts +0 -1
- package/lib/composables/observeVisible.d.ts +0 -6
- package/lib/composables/observeVisible.js +0 -24
- package/lib/composables/observeVisible.ts +0 -30
- package/lib/directives/index.d.ts +0 -6
- package/lib/directives/index.js +0 -186
- package/lib/directives/index.ts +0 -211
- package/lib/directives/index.types.d.ts +0 -14
- package/lib/directives/index.types.js +0 -1
- package/lib/directives/index.types.ts +0 -15
- package/lib/dropdown/DropdownContainer.vue +0 -50
- package/lib/dropdown/DropdownContainer.vue.d.ts +0 -19
- package/lib/dropdown/DropdownContent.vue +0 -69
- package/lib/dropdown/DropdownContent.vue.d.ts +0 -42
- package/lib/dropdown/index.types.d.ts +0 -4
- package/lib/dropdown/index.types.js +0 -1
- package/lib/dropdown/index.types.ts +0 -4
- package/lib/header/HeaderHorizontal.vue +0 -158
- package/lib/header/HeaderHorizontal.vue.d.ts +0 -84
- package/lib/header/HeaderVertical.vue +0 -116
- package/lib/header/HeaderVertical.vue.d.ts +0 -70
- package/lib/header/NavDrawer.vue +0 -121
- package/lib/header/NavDrawer.vue.d.ts +0 -43
- package/lib/header/index.types.d.ts +0 -1
- package/lib/header/index.types.js +0 -1
- package/lib/header/index.types.ts +0 -1
- package/lib/modal/Modal.vue +0 -213
- package/lib/modal/Modal.vue.d.ts +0 -108
- package/lib/sidebar/Sidebar.vue +0 -242
- package/lib/sidebar/Sidebar.vue.d.ts +0 -113
- package/lib/theme/generateClass.d.ts +0 -2
- package/lib/theme/generateClass.js +0 -18
- package/lib/theme/generateClass.ts +0 -25
- package/lib/theme/index.d.ts +0 -95
- package/lib/theme/index.js +0 -642
- package/lib/theme/index.ts +0 -676
- package/lib/theme/theme.d.ts +0 -89
- package/lib/theme/theme.js +0 -851
- package/lib/theme/theme.ts +0 -893
- package/lib/theme/theme.types.d.ts +0 -21
- package/lib/theme/theme.types.js +0 -1
- package/lib/theme/theme.types.ts +0 -68
- package/lib/tooltip/index.d.ts +0 -62
- package/lib/tooltip/index.js +0 -71
- package/lib/tooltip/index.ts +0 -76
- package/themeVariables.cjs +0 -607
- package/tsconfig.json +0 -5
- package/tsconfig.ts.json +0 -9
- package/tsconfig.vue.json +0 -9
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useWindowScroll } from '@vueuse/core'
|
|
3
|
-
import { computed, ref } from 'vue'
|
|
4
|
-
import type { ColorPalette } from '../../'
|
|
5
|
-
import generateClass from '../../'
|
|
6
|
-
import NavDrawer from './NavDrawer.vue'
|
|
7
|
-
import type { HeaderStickyOptionType } from './index.types'
|
|
8
|
-
|
|
9
|
-
const props = withDefaults(
|
|
10
|
-
defineProps<{
|
|
11
|
-
bgColor?: ColorPalette
|
|
12
|
-
mobileMenuBgColor?: ColorPalette
|
|
13
|
-
drawerBtnColor?: ColorPalette
|
|
14
|
-
drawerBtnBorder?: boolean
|
|
15
|
-
fadeInOnScroll?: boolean
|
|
16
|
-
scrollDistance?: number
|
|
17
|
-
sticky?: HeaderStickyOptionType
|
|
18
|
-
}>(),
|
|
19
|
-
{
|
|
20
|
-
bgColor: 'light-1',
|
|
21
|
-
mobileMenuBgColor: 'light-2',
|
|
22
|
-
drawerBtnColor: 'dark-1',
|
|
23
|
-
drawerBtnBorder: true,
|
|
24
|
-
fadeInOnScroll: true,
|
|
25
|
-
scrollDistance: 50,
|
|
26
|
-
sticky: 'all',
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
const slots = defineSlots<{
|
|
31
|
-
content: any
|
|
32
|
-
'content-right': any
|
|
33
|
-
'mobile-content'(props: { headerClose: () => void }): any
|
|
34
|
-
}>()
|
|
35
|
-
const navOpen = ref<boolean>(false)
|
|
36
|
-
const { y } = useWindowScroll()
|
|
37
|
-
const emit = defineEmits<{
|
|
38
|
-
(e: 'toggle-drawer', event: Event, open: boolean): void
|
|
39
|
-
}>()
|
|
40
|
-
|
|
41
|
-
const closeNav = (): void => {
|
|
42
|
-
navOpen.value = false
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const toggleNavButton = (e: Event): void => {
|
|
46
|
-
navOpen.value = !navOpen.value
|
|
47
|
-
emit('toggle-drawer', e, navOpen.value)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @TransitionFunctions
|
|
52
|
-
* @param {HTMLElement} el - passed any since transition handlers don't accept HTMLElement (accepts Element)
|
|
53
|
-
*/
|
|
54
|
-
const onEnter = (el: any) => {
|
|
55
|
-
el.style.height = 'auto'
|
|
56
|
-
const endWidth = getComputedStyle(el).height
|
|
57
|
-
el.style.height = '0px'
|
|
58
|
-
el.offsetHeight // force repaint
|
|
59
|
-
el.style.height = endWidth
|
|
60
|
-
}
|
|
61
|
-
const onAfterEnter = (el: any) => {
|
|
62
|
-
el.style.height = 'auto'
|
|
63
|
-
}
|
|
64
|
-
const onLeave = (el: any) => {
|
|
65
|
-
el.style.height = getComputedStyle(el).height
|
|
66
|
-
el.offsetHeight // force repaint
|
|
67
|
-
el.style.height = '0px'
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const handleHeaderClass = computed<string>(() => {
|
|
71
|
-
const { bgColor, sticky } = props
|
|
72
|
-
const classArray: string[] = [generateClass('BGCOLOR', bgColor)]
|
|
73
|
-
if (sticky === 'all') {
|
|
74
|
-
classArray.push('sticky top-0')
|
|
75
|
-
return classArray.join(' ')
|
|
76
|
-
}
|
|
77
|
-
if (sticky === 'tablet') {
|
|
78
|
-
classArray.push('md:sticky top-0')
|
|
79
|
-
return classArray.join(' ')
|
|
80
|
-
}
|
|
81
|
-
if (sticky === 'pc') {
|
|
82
|
-
classArray.push('lg:sticky top-0')
|
|
83
|
-
return classArray.join(' ')
|
|
84
|
-
}
|
|
85
|
-
return classArray.join(' ')
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
const handleFadeInOnScroll = computed(() => {
|
|
89
|
-
const { fadeInOnScroll, scrollDistance } = props
|
|
90
|
-
if (!fadeInOnScroll) {
|
|
91
|
-
return ''
|
|
92
|
-
}
|
|
93
|
-
return y.value >= scrollDistance
|
|
94
|
-
? 'lg:shadow-md bg-opacity-70'
|
|
95
|
-
: 'bg-opacity-100'
|
|
96
|
-
})
|
|
97
|
-
|
|
98
|
-
defineExpose({
|
|
99
|
-
headerClose: closeNav,
|
|
100
|
-
})
|
|
101
|
-
</script>
|
|
102
|
-
|
|
103
|
-
<template>
|
|
104
|
-
<header
|
|
105
|
-
class="w-full items-center z-50 transition ease-in duration-500 delay-150"
|
|
106
|
-
:class="[handleFadeInOnScroll, handleHeaderClass]"
|
|
107
|
-
>
|
|
108
|
-
<nav
|
|
109
|
-
class="flex flex-wrap items-center py-xs md:py-2xs mx-xs md:mx-sm align-middle justify-between sm:max-w-[640px] md:max-w-[768px] lg:max-w-[1024px] xl:max-w-[1280px] 2xl:max-w-[1536px]"
|
|
110
|
-
>
|
|
111
|
-
<div class="min-h-[24px]">
|
|
112
|
-
<slot name="content"></slot>
|
|
113
|
-
</div>
|
|
114
|
-
<div class="ml-auto">
|
|
115
|
-
<NavDrawer
|
|
116
|
-
:color="drawerBtnColor"
|
|
117
|
-
:display-border="drawerBtnBorder"
|
|
118
|
-
class="block lg:hidden"
|
|
119
|
-
@hbg-click="toggleNavButton"
|
|
120
|
-
:toggle="navOpen"
|
|
121
|
-
:nav-color="bgColor"
|
|
122
|
-
></NavDrawer>
|
|
123
|
-
<div v-if="slots['content-right']" class="hidden lg:block">
|
|
124
|
-
<slot name="content-right"></slot>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
</nav>
|
|
128
|
-
<!-- mobile menu -->
|
|
129
|
-
|
|
130
|
-
<div class="overflow-hidden lg:hidden">
|
|
131
|
-
<transition
|
|
132
|
-
name="collapse"
|
|
133
|
-
@enter="onEnter"
|
|
134
|
-
@after-enter="onAfterEnter"
|
|
135
|
-
@leave="onLeave"
|
|
136
|
-
>
|
|
137
|
-
<div
|
|
138
|
-
class="bg-opacity-80 rounded-md my-2xs mx-xs overflow-hidden"
|
|
139
|
-
v-if="navOpen"
|
|
140
|
-
:class="generateClass('BGCOLOR', mobileMenuBgColor)"
|
|
141
|
-
>
|
|
142
|
-
<div v-if="slots['mobile-content']">
|
|
143
|
-
<slot name="mobile-content" :header-close="closeNav"></slot>
|
|
144
|
-
</div>
|
|
145
|
-
</div>
|
|
146
|
-
</transition>
|
|
147
|
-
</div>
|
|
148
|
-
</header>
|
|
149
|
-
</template>
|
|
150
|
-
|
|
151
|
-
<style scoped lang="scss">
|
|
152
|
-
.collapse-enter-active {
|
|
153
|
-
transition: height 0.5s ease-in;
|
|
154
|
-
}
|
|
155
|
-
.collapse-leave-active {
|
|
156
|
-
transition: height 0.5s ease-out;
|
|
157
|
-
}
|
|
158
|
-
</style>
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { ColorPalette } from '../../';
|
|
2
|
-
import type { HeaderStickyOptionType } from './index.types';
|
|
3
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
-
bgColor?: ColorPalette | undefined;
|
|
5
|
-
mobileMenuBgColor?: ColorPalette | undefined;
|
|
6
|
-
drawerBtnColor?: ColorPalette | undefined;
|
|
7
|
-
drawerBtnBorder?: boolean | undefined;
|
|
8
|
-
fadeInOnScroll?: boolean | undefined;
|
|
9
|
-
scrollDistance?: number | undefined;
|
|
10
|
-
sticky?: HeaderStickyOptionType | undefined;
|
|
11
|
-
}>, {
|
|
12
|
-
bgColor: string;
|
|
13
|
-
mobileMenuBgColor: string;
|
|
14
|
-
drawerBtnColor: string;
|
|
15
|
-
drawerBtnBorder: boolean;
|
|
16
|
-
fadeInOnScroll: boolean;
|
|
17
|
-
scrollDistance: number;
|
|
18
|
-
sticky: string;
|
|
19
|
-
}>, {
|
|
20
|
-
headerClose: () => void;
|
|
21
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
22
|
-
"toggle-drawer": (event: Event, open: boolean) => void;
|
|
23
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
24
|
-
bgColor?: ColorPalette | undefined;
|
|
25
|
-
mobileMenuBgColor?: ColorPalette | undefined;
|
|
26
|
-
drawerBtnColor?: ColorPalette | undefined;
|
|
27
|
-
drawerBtnBorder?: boolean | undefined;
|
|
28
|
-
fadeInOnScroll?: boolean | undefined;
|
|
29
|
-
scrollDistance?: number | undefined;
|
|
30
|
-
sticky?: HeaderStickyOptionType | undefined;
|
|
31
|
-
}>, {
|
|
32
|
-
bgColor: string;
|
|
33
|
-
mobileMenuBgColor: string;
|
|
34
|
-
drawerBtnColor: string;
|
|
35
|
-
drawerBtnBorder: boolean;
|
|
36
|
-
fadeInOnScroll: boolean;
|
|
37
|
-
scrollDistance: number;
|
|
38
|
-
sticky: string;
|
|
39
|
-
}>>> & {
|
|
40
|
-
"onToggle-drawer"?: ((event: Event, open: boolean) => any) | undefined;
|
|
41
|
-
}, {
|
|
42
|
-
bgColor: ColorPalette;
|
|
43
|
-
mobileMenuBgColor: ColorPalette;
|
|
44
|
-
drawerBtnColor: ColorPalette;
|
|
45
|
-
drawerBtnBorder: boolean;
|
|
46
|
-
fadeInOnScroll: boolean;
|
|
47
|
-
scrollDistance: number;
|
|
48
|
-
sticky: HeaderStickyOptionType;
|
|
49
|
-
}, {}>, Readonly<{
|
|
50
|
-
content: any;
|
|
51
|
-
'content-right': any;
|
|
52
|
-
'mobile-content'(props: {
|
|
53
|
-
headerClose: () => void;
|
|
54
|
-
}): any;
|
|
55
|
-
}> & {
|
|
56
|
-
content: any;
|
|
57
|
-
'content-right': any;
|
|
58
|
-
'mobile-content'(props: {
|
|
59
|
-
headerClose: () => void;
|
|
60
|
-
}): any;
|
|
61
|
-
}>;
|
|
62
|
-
export default _default;
|
|
63
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
64
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
65
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
66
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
67
|
-
} : {
|
|
68
|
-
type: import('vue').PropType<T[K]>;
|
|
69
|
-
required: true;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
type __VLS_WithDefaults<P, D> = {
|
|
73
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
74
|
-
default: D[K];
|
|
75
|
-
}> : P[K];
|
|
76
|
-
};
|
|
77
|
-
type __VLS_Prettify<T> = {
|
|
78
|
-
[K in keyof T]: T[K];
|
|
79
|
-
} & {};
|
|
80
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
81
|
-
new (): {
|
|
82
|
-
$slots: S;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { Transition, computed, ref } from 'vue'
|
|
3
|
-
import type { ColorPalette } from '../../'
|
|
4
|
-
import generateClass from '../../'
|
|
5
|
-
import NavDrawer from './NavDrawer.vue'
|
|
6
|
-
const props = withDefaults(
|
|
7
|
-
defineProps<{
|
|
8
|
-
bgColor?: ColorPalette
|
|
9
|
-
drawerBtnColor?: ColorPalette
|
|
10
|
-
drawerBtnBorder?: boolean
|
|
11
|
-
headerWidth?: number
|
|
12
|
-
}>(),
|
|
13
|
-
{
|
|
14
|
-
bgColor: 'light-1',
|
|
15
|
-
drawerBtnColor: 'dark-1',
|
|
16
|
-
drawerBtnBorder: true,
|
|
17
|
-
headerWidth: 160,
|
|
18
|
-
}
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
const slots = defineSlots<{
|
|
22
|
-
default: any
|
|
23
|
-
content: any
|
|
24
|
-
'content-bottom': any
|
|
25
|
-
'mobile-content'(props: { headerClose: () => void }): any
|
|
26
|
-
}>()
|
|
27
|
-
const emit = defineEmits<{
|
|
28
|
-
(e: 'toggle-drawer', event: Event, open: boolean): void
|
|
29
|
-
}>()
|
|
30
|
-
const navOpen = ref<boolean>(false)
|
|
31
|
-
|
|
32
|
-
const toggleNavButton = (e: Event): void => {
|
|
33
|
-
navOpen.value = !navOpen.value
|
|
34
|
-
emit('toggle-drawer', e, navOpen.value)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const closeNav = (): void => {
|
|
38
|
-
navOpen.value = false
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const componentWidth = computed(() => {
|
|
42
|
-
return { '--header-width': `${props.headerWidth}px` }
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
defineExpose({
|
|
46
|
-
headerClose: closeNav,
|
|
47
|
-
})
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
<template>
|
|
51
|
-
<section class="lg:flex">
|
|
52
|
-
<header class="relative" :style="componentWidth">
|
|
53
|
-
<nav
|
|
54
|
-
class="hidden lg:block lg:sticky lg:top-0 lg:left-0 lg:h-[100vh] py-sm header-desktop overscroll-contain overflow-y-scroll"
|
|
55
|
-
:class="[generateClass('BGCOLOR', bgColor)]"
|
|
56
|
-
>
|
|
57
|
-
<div class="flex flex-col justify-between h-full">
|
|
58
|
-
<div>
|
|
59
|
-
<slot name="content" />
|
|
60
|
-
</div>
|
|
61
|
-
<div v-if="slots['content-bottom']">
|
|
62
|
-
<slot name="content-bottom" />
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</nav>
|
|
66
|
-
|
|
67
|
-
<div class="block fixed lg:hidden top-0 right-0 mr-xs mt-xs z-20">
|
|
68
|
-
<NavDrawer
|
|
69
|
-
:color="drawerBtnColor"
|
|
70
|
-
:display-border="drawerBtnBorder"
|
|
71
|
-
class="block lg:hidden relative"
|
|
72
|
-
@hbg-click="toggleNavButton"
|
|
73
|
-
:toggle="navOpen"
|
|
74
|
-
:nav-color="bgColor"
|
|
75
|
-
></NavDrawer>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
<!-- mobile menu -->
|
|
79
|
-
|
|
80
|
-
<div class="block lg:hidden relative">
|
|
81
|
-
<Transition name="slide-down" appear>
|
|
82
|
-
<div
|
|
83
|
-
class="fixed inset-0 overflow-y-scroll overscroll-contain py-lg px-sm"
|
|
84
|
-
v-if="navOpen"
|
|
85
|
-
:class="generateClass('BGCOLOR', bgColor)"
|
|
86
|
-
>
|
|
87
|
-
<div v-if="slots['mobile-content']" class="h-full">
|
|
88
|
-
<slot name="mobile-content" :header-close="closeNav" />
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</Transition>
|
|
92
|
-
</div>
|
|
93
|
-
</header>
|
|
94
|
-
<div class="w-full">
|
|
95
|
-
<slot />
|
|
96
|
-
</div>
|
|
97
|
-
</section>
|
|
98
|
-
</template>
|
|
99
|
-
|
|
100
|
-
<style scoped lang="scss">
|
|
101
|
-
.header-desktop {
|
|
102
|
-
width: 100%;
|
|
103
|
-
@media screen and (min-width: 1024px) {
|
|
104
|
-
width: var(--header-width);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
.slide-down-enter-active,
|
|
108
|
-
.slide-down-leave-active {
|
|
109
|
-
transition: transform 0.5s ease-in, opacity 0.5s ease-in;
|
|
110
|
-
}
|
|
111
|
-
.slide-down-enter-from,
|
|
112
|
-
.slide-down-leave-to {
|
|
113
|
-
opacity: 0;
|
|
114
|
-
transform: translateY(-100%);
|
|
115
|
-
}
|
|
116
|
-
</style>
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { ColorPalette } from '../../';
|
|
2
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
-
bgColor?: ColorPalette | undefined;
|
|
4
|
-
drawerBtnColor?: ColorPalette | undefined;
|
|
5
|
-
drawerBtnBorder?: boolean | undefined;
|
|
6
|
-
headerWidth?: number | undefined;
|
|
7
|
-
}>, {
|
|
8
|
-
bgColor: string;
|
|
9
|
-
drawerBtnColor: string;
|
|
10
|
-
drawerBtnBorder: boolean;
|
|
11
|
-
headerWidth: number;
|
|
12
|
-
}>, {
|
|
13
|
-
headerClose: () => void;
|
|
14
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
-
"toggle-drawer": (event: Event, open: boolean) => void;
|
|
16
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
17
|
-
bgColor?: ColorPalette | undefined;
|
|
18
|
-
drawerBtnColor?: ColorPalette | undefined;
|
|
19
|
-
drawerBtnBorder?: boolean | undefined;
|
|
20
|
-
headerWidth?: number | undefined;
|
|
21
|
-
}>, {
|
|
22
|
-
bgColor: string;
|
|
23
|
-
drawerBtnColor: string;
|
|
24
|
-
drawerBtnBorder: boolean;
|
|
25
|
-
headerWidth: number;
|
|
26
|
-
}>>> & {
|
|
27
|
-
"onToggle-drawer"?: ((event: Event, open: boolean) => any) | undefined;
|
|
28
|
-
}, {
|
|
29
|
-
bgColor: ColorPalette;
|
|
30
|
-
drawerBtnColor: ColorPalette;
|
|
31
|
-
drawerBtnBorder: boolean;
|
|
32
|
-
headerWidth: number;
|
|
33
|
-
}, {}>, Readonly<{
|
|
34
|
-
default: any;
|
|
35
|
-
content: any;
|
|
36
|
-
'content-bottom': any;
|
|
37
|
-
'mobile-content'(props: {
|
|
38
|
-
headerClose: () => void;
|
|
39
|
-
}): any;
|
|
40
|
-
}> & {
|
|
41
|
-
default: any;
|
|
42
|
-
content: any;
|
|
43
|
-
'content-bottom': any;
|
|
44
|
-
'mobile-content'(props: {
|
|
45
|
-
headerClose: () => void;
|
|
46
|
-
}): any;
|
|
47
|
-
}>;
|
|
48
|
-
export default _default;
|
|
49
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
50
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
51
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
52
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
53
|
-
} : {
|
|
54
|
-
type: import('vue').PropType<T[K]>;
|
|
55
|
-
required: true;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
type __VLS_WithDefaults<P, D> = {
|
|
59
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
60
|
-
default: D[K];
|
|
61
|
-
}> : P[K];
|
|
62
|
-
};
|
|
63
|
-
type __VLS_Prettify<T> = {
|
|
64
|
-
[K in keyof T]: T[K];
|
|
65
|
-
} & {};
|
|
66
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
67
|
-
new (): {
|
|
68
|
-
$slots: S;
|
|
69
|
-
};
|
|
70
|
-
};
|
package/lib/header/NavDrawer.vue
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } from 'vue'
|
|
3
|
-
import type { ColorPalette } from '../../'
|
|
4
|
-
import generateClass from '../../'
|
|
5
|
-
|
|
6
|
-
const props = withDefaults(
|
|
7
|
-
defineProps<{
|
|
8
|
-
color?: ColorPalette
|
|
9
|
-
displayBorder?: boolean
|
|
10
|
-
toggle: boolean
|
|
11
|
-
navColor: ColorPalette
|
|
12
|
-
}>(),
|
|
13
|
-
{
|
|
14
|
-
color: 'dark-2',
|
|
15
|
-
displayBorder: true,
|
|
16
|
-
}
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
const emit = defineEmits(['hbg-click'])
|
|
20
|
-
|
|
21
|
-
const handleButtonToggle = (e: Event): void => {
|
|
22
|
-
emit('hbg-click', e)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const hamburgetButtonState = computed({
|
|
26
|
-
get() {
|
|
27
|
-
return props.toggle
|
|
28
|
-
},
|
|
29
|
-
set(value) {
|
|
30
|
-
return value
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
const getBorderClass = (
|
|
35
|
-
bColor: ColorPalette,
|
|
36
|
-
border: boolean,
|
|
37
|
-
nColor: ColorPalette
|
|
38
|
-
): string => {
|
|
39
|
-
/**
|
|
40
|
-
* @bColor - color
|
|
41
|
-
* @border - displayBorder
|
|
42
|
-
* @nColor - navColor
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
const classArray: string[] = [
|
|
46
|
-
generateClass('RINGCOLOR', bColor),
|
|
47
|
-
generateClass('OFFSETRING', nColor),
|
|
48
|
-
]
|
|
49
|
-
|
|
50
|
-
if (border) {
|
|
51
|
-
classArray.push(generateClass('BORDER', bColor))
|
|
52
|
-
classArray.push('border')
|
|
53
|
-
}
|
|
54
|
-
return classArray.join(' ')
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const getHamburgerButtonClass = (color: ColorPalette): string => {
|
|
58
|
-
/**
|
|
59
|
-
* @color - color
|
|
60
|
-
*/
|
|
61
|
-
const classArray: string[] = [
|
|
62
|
-
generateClass('BGCOLOR', color),
|
|
63
|
-
generateClass('BEFOREBG', color),
|
|
64
|
-
generateClass('AFTERBG', color),
|
|
65
|
-
]
|
|
66
|
-
|
|
67
|
-
return classArray.join(' ')
|
|
68
|
-
}
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<template>
|
|
72
|
-
<button
|
|
73
|
-
class="p-3xs rounded-md aspect-square outline-none focus:ring-4 ring-offset-2 transition-all duration-300 ease-linear hover:opacity-70 focus:opacity-70 hamburger__button"
|
|
74
|
-
:class="getBorderClass(color, displayBorder, navColor)"
|
|
75
|
-
@click="handleButtonToggle"
|
|
76
|
-
>
|
|
77
|
-
<input
|
|
78
|
-
type="checkbox"
|
|
79
|
-
v-model="hamburgetButtonState"
|
|
80
|
-
class="hidden hamburger__checkbox"
|
|
81
|
-
/>
|
|
82
|
-
<div
|
|
83
|
-
class="relative h-[3px] w-sm hamburger__icon before:w-sm after:w-sm before:h-[3px] after:h-[3px] transition-all duration-300 ease-linear"
|
|
84
|
-
:class="getHamburgerButtonClass(color)"
|
|
85
|
-
></div>
|
|
86
|
-
</button>
|
|
87
|
-
</template>
|
|
88
|
-
|
|
89
|
-
<style lang="scss" scoped>
|
|
90
|
-
.hamburger__icon {
|
|
91
|
-
&::before,
|
|
92
|
-
&::after {
|
|
93
|
-
position: absolute;
|
|
94
|
-
left: 0;
|
|
95
|
-
transition: all 0.3s linear;
|
|
96
|
-
}
|
|
97
|
-
&::before {
|
|
98
|
-
top: -0.5rem;
|
|
99
|
-
}
|
|
100
|
-
&::after {
|
|
101
|
-
top: 0.5rem;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
.hamburger__button {
|
|
105
|
-
&:focus .hamburger__icon,
|
|
106
|
-
&:hover .hamburger__icon {
|
|
107
|
-
scale: 1.05;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
.hamburger__checkbox:checked + .hamburger__icon {
|
|
111
|
-
background-color: transparent;
|
|
112
|
-
}
|
|
113
|
-
.hamburger__checkbox:checked + .hamburger__icon::before {
|
|
114
|
-
top: 0;
|
|
115
|
-
transform: rotate(135deg);
|
|
116
|
-
}
|
|
117
|
-
.hamburger__checkbox:checked + .hamburger__icon::after {
|
|
118
|
-
top: 0;
|
|
119
|
-
transform: rotate(-135deg);
|
|
120
|
-
}
|
|
121
|
-
</style>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { ColorPalette } from '../../';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
-
color?: ColorPalette | undefined;
|
|
4
|
-
displayBorder?: boolean | undefined;
|
|
5
|
-
toggle: boolean;
|
|
6
|
-
navColor: ColorPalette;
|
|
7
|
-
}>, {
|
|
8
|
-
color: string;
|
|
9
|
-
displayBorder: boolean;
|
|
10
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
-
"hbg-click": (...args: any[]) => void;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
13
|
-
color?: ColorPalette | undefined;
|
|
14
|
-
displayBorder?: boolean | undefined;
|
|
15
|
-
toggle: boolean;
|
|
16
|
-
navColor: ColorPalette;
|
|
17
|
-
}>, {
|
|
18
|
-
color: string;
|
|
19
|
-
displayBorder: boolean;
|
|
20
|
-
}>>> & {
|
|
21
|
-
"onHbg-click"?: ((...args: any[]) => any) | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
color: ColorPalette;
|
|
24
|
-
displayBorder: boolean;
|
|
25
|
-
}, {}>;
|
|
26
|
-
export default _default;
|
|
27
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
28
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
29
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
30
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
31
|
-
} : {
|
|
32
|
-
type: import('vue').PropType<T[K]>;
|
|
33
|
-
required: true;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
type __VLS_WithDefaults<P, D> = {
|
|
37
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
38
|
-
default: D[K];
|
|
39
|
-
}> : P[K];
|
|
40
|
-
};
|
|
41
|
-
type __VLS_Prettify<T> = {
|
|
42
|
-
[K in keyof T]: T[K];
|
|
43
|
-
} & {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type HeaderStickyOptionType = 'none' | 'tablet' | 'pc' | 'all';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type HeaderStickyOptionType = 'none' | 'tablet' | 'pc' | 'all'
|