@bobbykim/manguito-theme 0.18.0 → 0.20.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.
Files changed (68) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +12 -12
  3. package/dist/core.cjs +2 -0
  4. package/dist/core.d.ts +790 -0
  5. package/dist/core.js +2175 -0
  6. package/dist/mcl-theme.cjs +1 -0
  7. package/dist/mcl-theme.d.ts +12 -0
  8. package/dist/mcl-theme.js +608 -0
  9. package/package.json +28 -7
  10. package/CHANGELOG.md +0 -150
  11. package/index.d.ts +0 -14
  12. package/index.js +0 -19
  13. package/index.ts +0 -31
  14. package/lib/alert/Alert.vue +0 -92
  15. package/lib/alert/Alert.vue.d.ts +0 -65
  16. package/lib/collapse/Collapse.vue +0 -118
  17. package/lib/collapse/Collapse.vue.d.ts +0 -55
  18. package/lib/composables/index.d.ts +0 -1
  19. package/lib/composables/index.js +0 -1
  20. package/lib/composables/index.ts +0 -1
  21. package/lib/composables/observeVisible.d.ts +0 -6
  22. package/lib/composables/observeVisible.js +0 -24
  23. package/lib/composables/observeVisible.ts +0 -30
  24. package/lib/directives/index.d.ts +0 -6
  25. package/lib/directives/index.js +0 -186
  26. package/lib/directives/index.ts +0 -211
  27. package/lib/directives/index.types.d.ts +0 -14
  28. package/lib/directives/index.types.js +0 -1
  29. package/lib/directives/index.types.ts +0 -15
  30. package/lib/dropdown/DropdownContainer.vue +0 -50
  31. package/lib/dropdown/DropdownContainer.vue.d.ts +0 -19
  32. package/lib/dropdown/DropdownContent.vue +0 -69
  33. package/lib/dropdown/DropdownContent.vue.d.ts +0 -42
  34. package/lib/dropdown/index.types.d.ts +0 -4
  35. package/lib/dropdown/index.types.js +0 -1
  36. package/lib/dropdown/index.types.ts +0 -4
  37. package/lib/header/HeaderHorizontal.vue +0 -158
  38. package/lib/header/HeaderHorizontal.vue.d.ts +0 -84
  39. package/lib/header/HeaderVertical.vue +0 -116
  40. package/lib/header/HeaderVertical.vue.d.ts +0 -70
  41. package/lib/header/NavDrawer.vue +0 -121
  42. package/lib/header/NavDrawer.vue.d.ts +0 -43
  43. package/lib/header/index.types.d.ts +0 -1
  44. package/lib/header/index.types.js +0 -1
  45. package/lib/header/index.types.ts +0 -1
  46. package/lib/modal/Modal.vue +0 -213
  47. package/lib/modal/Modal.vue.d.ts +0 -108
  48. package/lib/sidebar/Sidebar.vue +0 -242
  49. package/lib/sidebar/Sidebar.vue.d.ts +0 -113
  50. package/lib/theme/generateClass.d.ts +0 -2
  51. package/lib/theme/generateClass.js +0 -18
  52. package/lib/theme/generateClass.ts +0 -25
  53. package/lib/theme/index.d.ts +0 -95
  54. package/lib/theme/index.js +0 -642
  55. package/lib/theme/index.ts +0 -676
  56. package/lib/theme/theme.d.ts +0 -89
  57. package/lib/theme/theme.js +0 -851
  58. package/lib/theme/theme.ts +0 -893
  59. package/lib/theme/theme.types.d.ts +0 -21
  60. package/lib/theme/theme.types.js +0 -1
  61. package/lib/theme/theme.types.ts +0 -68
  62. package/lib/tooltip/index.d.ts +0 -62
  63. package/lib/tooltip/index.js +0 -71
  64. package/lib/tooltip/index.ts +0 -76
  65. package/themeVariables.cjs +0 -607
  66. package/tsconfig.json +0 -5
  67. package/tsconfig.ts.json +0 -9
  68. package/tsconfig.vue.json +0 -9
@@ -1,213 +0,0 @@
1
- <script setup lang="ts">
2
- import { Transition, computed, ref, watch } from 'vue'
3
- import type { ColorPalette, VerticalAlignment } from '../../'
4
- import generateClass, { vClickOutside } from '../../'
5
- import { observeVisibleAttr } from '../composables'
6
-
7
- const props = withDefaults(
8
- defineProps<{
9
- title?: string
10
- titleColor?: ColorPalette
11
- className?: string
12
- visible?: boolean
13
- noBackdrop?: boolean
14
- noHeader?: boolean
15
- color?: ColorPalette
16
- backdropColor?: ColorPalette
17
- placement?: VerticalAlignment
18
- }>(),
19
- {
20
- titleColor: 'dark-3',
21
- className: '',
22
- visible: false,
23
- noBackdrop: false,
24
- noHeader: false,
25
- color: 'light-1',
26
- backdropColor: 'dark-4',
27
- placement: 'center',
28
- }
29
- )
30
-
31
- const slots = defineSlots<{
32
- header(props: { close: () => void; status: boolean }): any
33
- body(props: { close: () => void; status: boolean }): any
34
- footer(props: { close: () => void; status: boolean }): any
35
- }>()
36
- const emit = defineEmits<{
37
- (e: 'open', visible: boolean): void
38
- (e: 'close', visible: boolean): void
39
- }>()
40
- const modalRef = ref<HTMLElement | undefined>()
41
- const toggle = ref<boolean>(props.visible)
42
- const toggleComplete = ref<boolean>(false)
43
-
44
- const toggleModal = (): void => {
45
- toggle.value = !toggle.value
46
- }
47
- const openModal = (): void => {
48
- toggle.value = true
49
- }
50
- const closeModal = (): void => {
51
- if (toggleComplete.value === true) {
52
- toggle.value = false
53
- }
54
- }
55
- const emitOpenEvent = () => {
56
- emit('open', true)
57
- }
58
- const emitCloseEvent = () => {
59
- emit('close', false)
60
- }
61
- const handlePlacementVar = computed(() => {
62
- let placementVariable: number
63
- if (props.placement === 'top') {
64
- placementVariable = 25
65
- } else if (props.placement === 'bottom') {
66
- placementVariable = 75
67
- } else {
68
- placementVariable = 50
69
- }
70
- return { '--vertical-placement': placementVariable + '%' }
71
- })
72
-
73
- /**
74
- * @TransitionFunctions
75
- * Handle toggleComplete value after completion of animation
76
- */
77
- const onAfterEnter = () => {
78
- toggleComplete.value = true
79
- }
80
- const onAfterLeave = () => {
81
- toggleComplete.value = false
82
- }
83
-
84
- // set nutation observer watching `visible` attribute in element
85
- const handleVisibility = (visible: boolean = false) => {
86
- toggle.value = visible
87
- }
88
-
89
- observeVisibleAttr(modalRef, handleVisibility)
90
-
91
- watch(
92
- () => props.visible,
93
- (newValue) => {
94
- toggle.value = newValue
95
- }
96
- )
97
- watch(toggle, (newValue) => {
98
- if (newValue === true) {
99
- emitOpenEvent()
100
- } else if (newValue === false && toggleComplete.value === true) {
101
- emitCloseEvent()
102
- }
103
- })
104
- defineExpose({
105
- toggle: toggleModal,
106
- close: closeModal,
107
- open: openModal,
108
- })
109
- </script>
110
-
111
- <template>
112
- <div :style="handlePlacementVar" :visible="toggle" ref="modalRef">
113
- <!-- <button :id="modalId" @click="handleToggleEvent" class="hidden"></button> -->
114
- <Transition name="fade" appear tag="div" v-if="!noBackdrop">
115
- <section
116
- v-if="toggle"
117
- @click="closeModal"
118
- class="fixed inset-0 overflow-y-auto bg-opacity-70 backdrop-blur z-[100]"
119
- :class="generateClass('BGCOLOR', backdropColor)"
120
- ></section>
121
- </Transition>
122
- <Transition
123
- name="slide-down"
124
- tag="div"
125
- @after-enter="onAfterEnter"
126
- @after-leave="onAfterLeave"
127
- appear
128
- >
129
- <div
130
- v-if="toggle"
131
- class="vertical-placement fixed w-full max-w-md z-[110] px-xs"
132
- >
133
- <div
134
- v-click-outside="closeModal"
135
- :class="[generateClass('BGCOLOR', color), className]"
136
- class="relative overscroll-contain overflow-y-scroll max-h-[80vh] md:max-h-[60vh]"
137
- >
138
- <div v-if="!noHeader" class="sticky top-0">
139
- <slot name="header" :close="closeModal" :status="toggle">
140
- <div
141
- class="flex justify-between items-center p-xs border-b-2"
142
- :class="generateClass('BGCOLOR', color)"
143
- >
144
- <h3
145
- v-if="title"
146
- class="h3-md"
147
- :class="generateClass('TEXTCOLOR', titleColor)"
148
- >
149
- {{ title }}
150
- </h3>
151
- <button @click="closeModal">
152
- <svg
153
- xmlns="http://www.w3.org/2000/svg"
154
- height="1em"
155
- viewBox="0 0 384 512"
156
- class="hover:opacity-75 focus:opacity-75 transition-opacity duration-300 ease-in h-sm"
157
- :class="[generateClass('SVGFILL', titleColor)]"
158
- >
159
- <!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
160
- <path
161
- d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"
162
- />
163
- </svg>
164
- </button>
165
- </div>
166
- </slot>
167
- </div>
168
- <slot name="body" :close="closeModal" :status="toggle" />
169
- <div class="sticky bottom-0" v-if="slots['footer']">
170
- <slot name="footer" :close="closeModal" :status="toggle" />
171
- </div>
172
- </div>
173
- </div>
174
- </Transition>
175
- </div>
176
- </template>
177
-
178
- <style scoped lang="scss">
179
- .vertical-placement {
180
- top: var(--vertical-placement);
181
- left: 50%;
182
- transform: translateY(calc(-1 * var(--vertical-placement))) translateX(-50%);
183
- }
184
- .fade-enter-active,
185
- .fade-leave-active {
186
- transition-property: opacity;
187
- transition-duration: 300ms;
188
- transition-timing-function: linear;
189
- }
190
-
191
- .fade-enter-from,
192
- .fade-leave-to {
193
- opacity: 0;
194
- }
195
-
196
- .slide-down-enter-active {
197
- animation: slide-down 300ms ease;
198
- }
199
- .slide-down-leave-active {
200
- animation: slide-down reverse 300ms ease;
201
- }
202
-
203
- @keyframes slide-down {
204
- 0% {
205
- opacity: 0;
206
- transform: translateY(-100%) translateX(-50%);
207
- }
208
- 100% {
209
- opacity: 1;
210
- transform: translateY(calc(-1 * var(--vertical-placement))) translateX(-50%);
211
- }
212
- }
213
- </style>
@@ -1,108 +0,0 @@
1
- import type { ColorPalette, VerticalAlignment } from '../../';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
- title?: string | undefined;
4
- titleColor?: ColorPalette | undefined;
5
- className?: string | undefined;
6
- visible?: boolean | undefined;
7
- noBackdrop?: boolean | undefined;
8
- noHeader?: boolean | undefined;
9
- color?: ColorPalette | undefined;
10
- backdropColor?: ColorPalette | undefined;
11
- placement?: VerticalAlignment | undefined;
12
- }>, {
13
- titleColor: string;
14
- className: string;
15
- visible: boolean;
16
- noBackdrop: boolean;
17
- noHeader: boolean;
18
- color: string;
19
- backdropColor: string;
20
- placement: string;
21
- }>, {
22
- toggle: () => void;
23
- close: () => void;
24
- open: () => void;
25
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
- open: (visible: boolean) => void;
27
- close: (visible: boolean) => void;
28
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
29
- title?: string | undefined;
30
- titleColor?: ColorPalette | undefined;
31
- className?: string | undefined;
32
- visible?: boolean | undefined;
33
- noBackdrop?: boolean | undefined;
34
- noHeader?: boolean | undefined;
35
- color?: ColorPalette | undefined;
36
- backdropColor?: ColorPalette | undefined;
37
- placement?: VerticalAlignment | undefined;
38
- }>, {
39
- titleColor: string;
40
- className: string;
41
- visible: boolean;
42
- noBackdrop: boolean;
43
- noHeader: boolean;
44
- color: string;
45
- backdropColor: string;
46
- placement: string;
47
- }>>> & {
48
- onOpen?: ((visible: boolean) => any) | undefined;
49
- onClose?: ((visible: boolean) => any) | undefined;
50
- }, {
51
- visible: boolean;
52
- className: string;
53
- color: ColorPalette;
54
- titleColor: ColorPalette;
55
- noBackdrop: boolean;
56
- noHeader: boolean;
57
- backdropColor: ColorPalette;
58
- placement: VerticalAlignment;
59
- }, {}>, Readonly<{
60
- header(props: {
61
- close: () => void;
62
- status: boolean;
63
- }): any;
64
- body(props: {
65
- close: () => void;
66
- status: boolean;
67
- }): any;
68
- footer(props: {
69
- close: () => void;
70
- status: boolean;
71
- }): any;
72
- }> & {
73
- header(props: {
74
- close: () => void;
75
- status: boolean;
76
- }): any;
77
- body(props: {
78
- close: () => void;
79
- status: boolean;
80
- }): any;
81
- footer(props: {
82
- close: () => void;
83
- status: boolean;
84
- }): any;
85
- }>;
86
- export default _default;
87
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
88
- type __VLS_TypePropsToRuntimeProps<T> = {
89
- [K in keyof T]-?: {} extends Pick<T, K> ? {
90
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
91
- } : {
92
- type: import('vue').PropType<T[K]>;
93
- required: true;
94
- };
95
- };
96
- type __VLS_WithDefaults<P, D> = {
97
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
98
- default: D[K];
99
- }> : P[K];
100
- };
101
- type __VLS_Prettify<T> = {
102
- [K in keyof T]: T[K];
103
- } & {};
104
- type __VLS_WithTemplateSlots<T, S> = T & {
105
- new (): {
106
- $slots: S;
107
- };
108
- };
@@ -1,242 +0,0 @@
1
- <script setup lang="ts">
2
- import { Transition, computed, ref, watch } from 'vue'
3
- import type { ColorPalette, DirectionX } from '../../'
4
- import generateClass, { vClickOutside } from '../../'
5
- import { observeVisibleAttr } from '../composables'
6
-
7
- const props = withDefaults(
8
- defineProps<{
9
- title?: string
10
- titleColor?: ColorPalette
11
- className?: string
12
- visible?: boolean
13
- noBackdrop?: boolean
14
- noHeader?: boolean
15
- color?: ColorPalette
16
- backdropColor?: ColorPalette
17
- placement?: DirectionX
18
- width?: string | number
19
- }>(),
20
- {
21
- titleColor: 'dark-3',
22
- className: '',
23
- visible: false,
24
- noBackdrop: false,
25
- noHeader: false,
26
- color: 'light-1',
27
- backdropColor: 'dark-4',
28
- placement: 'left',
29
- width: 300,
30
- }
31
- )
32
-
33
- const slots = defineSlots<{
34
- header(props: { close: () => void; status: boolean }): any
35
- body(props: { close: () => void; status: boolean }): any
36
- footer(props: { close: () => void; status: boolean }): any
37
- }>()
38
- const emit = defineEmits<{
39
- (e: 'open', visible: boolean): void
40
- (e: 'close', visible: boolean): void
41
- }>()
42
- const toggle = ref<boolean>(props.visible)
43
- const toggleComplete = ref<boolean>(false)
44
- const sidebarRef = ref<HTMLElement | undefined>()
45
- const headerRef = ref<HTMLElement>()
46
- const footerRef = ref<HTMLElement>()
47
-
48
- const toggleSidebar = (): void => {
49
- toggle.value = !toggle.value
50
- }
51
- const openSidebar = (): void => {
52
- toggle.value = true
53
- }
54
- const closeSidebar = (): void => {
55
- if (toggleComplete.value === true) {
56
- toggle.value = false
57
- }
58
- }
59
- const emitOpenEvent = () => {
60
- emit('open', true)
61
- }
62
- const emitCloseEvent = () => {
63
- emit('close', false)
64
- }
65
- const handleStyleVariables = computed(() => {
66
- return {
67
- '--sidebar-width': `${props.width}px`,
68
- '--header-height':
69
- headerRef.value && toggle.value
70
- ? headerRef.value.scrollHeight + 'px'
71
- : '0px',
72
- '--footer-height':
73
- footerRef.value && toggle.value
74
- ? footerRef.value.scrollHeight + 'px'
75
- : '0px',
76
- }
77
- })
78
- const sidebarClass = computed(() => {
79
- return props.placement === 'left' ? 'sidebar-left' : 'sidebar-right'
80
- })
81
-
82
- /**
83
- * @TransitionFunctions
84
- * Handle toggleComplete value after completion of animation
85
- */
86
- const onAfterEnter = () => {
87
- toggleComplete.value = true
88
- }
89
- const onAfterLeave = () => {
90
- toggleComplete.value = false
91
- }
92
-
93
- // set nutation observer watching `visible` attribute in element
94
- const handleVisibility = (visible: boolean = false) => {
95
- toggle.value = visible
96
- }
97
-
98
- observeVisibleAttr(sidebarRef, handleVisibility)
99
-
100
- watch(
101
- () => props.visible,
102
- (newValue) => {
103
- toggle.value = newValue
104
- }
105
- )
106
- watch(toggle, (newValue) => {
107
- if (newValue === true) {
108
- emitOpenEvent()
109
- } else if (newValue === false && toggleComplete.value === true) {
110
- emitCloseEvent()
111
- }
112
- })
113
- defineExpose({
114
- toggle: toggleSidebar,
115
- open: openSidebar,
116
- close: closeSidebar,
117
- })
118
- </script>
119
-
120
- <template>
121
- <div :style="handleStyleVariables" :visible="toggle" ref="sidebarRef">
122
- <!-- <button :id="sidebarId" @click="handleToggleEvent" class="hidden"></button> -->
123
- <Transition name="fade" appear tag="div" v-if="!noBackdrop">
124
- <section
125
- v-if="toggle"
126
- @click="closeSidebar"
127
- class="fixed inset-0 overflow-y-auto bg-opacity-70 backdrop-blur z-[100]"
128
- :class="generateClass('BGCOLOR', backdropColor)"
129
- ></section>
130
- </Transition>
131
- <Transition
132
- :name="sidebarClass"
133
- @after-enter="onAfterEnter"
134
- @after-leave="onAfterLeave"
135
- appear
136
- >
137
- <div
138
- v-if="toggle"
139
- v-click-outside="closeSidebar"
140
- class="sidebar-body fixed h-full overflow-hidden inset-y-0 shadow z-[110]"
141
- :class="[placement === 'left' ? 'left-0' : 'right-0']"
142
- >
143
- <div
144
- class="relative h-full overscroll-contain overflow-y-scroll"
145
- :class="[generateClass('BGCOLOR', color), className]"
146
- >
147
- <div v-if="!noHeader" class="sticky top-0" ref="headerRef">
148
- <slot name="header" :close="closeSidebar" :status="toggle">
149
- <div
150
- class="flex justify-between items-center p-xs"
151
- :class="generateClass('BGCOLOR', color)"
152
- >
153
- <h3
154
- v-if="title"
155
- class="h3-md"
156
- :class="generateClass('TEXTCOLOR', titleColor)"
157
- >
158
- {{ title }}
159
- </h3>
160
- <button @click="closeSidebar">
161
- <svg
162
- xmlns="http://www.w3.org/2000/svg"
163
- height="1em"
164
- viewBox="0 0 384 512"
165
- class="hover:opacity-75 focus:opacity-75 transition-opacity duration-300 ease-in h-sm"
166
- :class="[generateClass('SVGFILL', titleColor)]"
167
- >
168
- <!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
169
- <path
170
- d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"
171
- />
172
- </svg>
173
- </button>
174
- </div>
175
- </slot>
176
- </div>
177
-
178
- <div class="sidebar-body-height">
179
- <slot name="body" :close="closeSidebar" :status="toggle" />
180
- </div>
181
-
182
- <div class="sticky bottom-0" ref="footerRef" v-if="slots['footer']">
183
- <slot name="footer" :close="closeSidebar" :status="toggle" />
184
- </div>
185
- </div>
186
- </div>
187
- </Transition>
188
- </div>
189
- </template>
190
-
191
- <style scoped lang="scss">
192
- .sidebar-body {
193
- width: 100%;
194
- }
195
- .sidebar-body-height {
196
- min-height: calc(100vh - var(--header-height) - var(--footer-height));
197
- }
198
-
199
- .fade-enter-active,
200
- .fade-leave-active {
201
- transition-property: opacity;
202
- transition-duration: 300ms;
203
- transition-timing-function: linear;
204
- }
205
-
206
- .fade-enter-from,
207
- .fade-leave-to {
208
- opacity: 0;
209
- }
210
-
211
- .sidebar-left-enter-active,
212
- .sidebar-left-leave-active,
213
- .sidebar-right-enter-active,
214
- .sidebar-right-leave-active {
215
- transition-property: transform, opacity;
216
- transition-duration: 300ms;
217
- transition-timing-function: linear;
218
- }
219
-
220
- .sidebar-left-enter-from,
221
- .sidebar-left-leave-to {
222
- transform: translateX(-100%);
223
- }
224
- .sidebar-right-enter-from,
225
- .sidebar-right-leave-to {
226
- transform: translateX(100%);
227
- }
228
-
229
- @media screen and (min-width: 768px) {
230
- .sidebar-body {
231
- width: var(--sidebar-width);
232
- }
233
- .sidebar-left-enter-from,
234
- .sidebar-left-leave-to {
235
- transform: translateX(calc(-1 * var(--sidebar-width)));
236
- }
237
- .sidebar-right-enter-from,
238
- .sidebar-right-leave-to {
239
- transform: translateX(var(--sidebar-width));
240
- }
241
- }
242
- </style>
@@ -1,113 +0,0 @@
1
- import type { ColorPalette, DirectionX } from '../../';
2
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
3
- title?: string | undefined;
4
- titleColor?: ColorPalette | undefined;
5
- className?: string | undefined;
6
- visible?: boolean | undefined;
7
- noBackdrop?: boolean | undefined;
8
- noHeader?: boolean | undefined;
9
- color?: ColorPalette | undefined;
10
- backdropColor?: ColorPalette | undefined;
11
- placement?: DirectionX | undefined;
12
- width?: string | number | undefined;
13
- }>, {
14
- titleColor: string;
15
- className: string;
16
- visible: boolean;
17
- noBackdrop: boolean;
18
- noHeader: boolean;
19
- color: string;
20
- backdropColor: string;
21
- placement: string;
22
- width: number;
23
- }>, {
24
- toggle: () => void;
25
- open: () => void;
26
- close: () => void;
27
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
28
- open: (visible: boolean) => void;
29
- close: (visible: boolean) => void;
30
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
31
- title?: string | undefined;
32
- titleColor?: ColorPalette | undefined;
33
- className?: string | undefined;
34
- visible?: boolean | undefined;
35
- noBackdrop?: boolean | undefined;
36
- noHeader?: boolean | undefined;
37
- color?: ColorPalette | undefined;
38
- backdropColor?: ColorPalette | undefined;
39
- placement?: DirectionX | undefined;
40
- width?: string | number | undefined;
41
- }>, {
42
- titleColor: string;
43
- className: string;
44
- visible: boolean;
45
- noBackdrop: boolean;
46
- noHeader: boolean;
47
- color: string;
48
- backdropColor: string;
49
- placement: string;
50
- width: number;
51
- }>>> & {
52
- onOpen?: ((visible: boolean) => any) | undefined;
53
- onClose?: ((visible: boolean) => any) | undefined;
54
- }, {
55
- visible: boolean;
56
- className: string;
57
- color: ColorPalette;
58
- width: string | number;
59
- titleColor: ColorPalette;
60
- noBackdrop: boolean;
61
- noHeader: boolean;
62
- backdropColor: ColorPalette;
63
- placement: DirectionX;
64
- }, {}>, Readonly<{
65
- header(props: {
66
- close: () => void;
67
- status: boolean;
68
- }): any;
69
- body(props: {
70
- close: () => void;
71
- status: boolean;
72
- }): any;
73
- footer(props: {
74
- close: () => void;
75
- status: boolean;
76
- }): any;
77
- }> & {
78
- header(props: {
79
- close: () => void;
80
- status: boolean;
81
- }): any;
82
- body(props: {
83
- close: () => void;
84
- status: boolean;
85
- }): any;
86
- footer(props: {
87
- close: () => void;
88
- status: boolean;
89
- }): any;
90
- }>;
91
- export default _default;
92
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
93
- type __VLS_TypePropsToRuntimeProps<T> = {
94
- [K in keyof T]-?: {} extends Pick<T, K> ? {
95
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
96
- } : {
97
- type: import('vue').PropType<T[K]>;
98
- required: true;
99
- };
100
- };
101
- type __VLS_WithDefaults<P, D> = {
102
- [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
103
- default: D[K];
104
- }> : P[K];
105
- };
106
- type __VLS_Prettify<T> = {
107
- [K in keyof T]: T[K];
108
- } & {};
109
- type __VLS_WithTemplateSlots<T, S> = T & {
110
- new (): {
111
- $slots: S;
112
- };
113
- };
@@ -1,2 +0,0 @@
1
- import type { ClassType, InputType } from '.';
2
- export declare const generateClass: (type: ClassType, value: InputType) => string;
@@ -1,18 +0,0 @@
1
- import GenerateMCLClass, { borderWidthType, colorType, scaleType, textType, } from '.';
2
- export const generateClass = (type, value) => {
3
- const mclGenerate = new GenerateMCLClass(type, value);
4
- if (colorType.includes(type)) {
5
- return mclGenerate.generateColorClass();
6
- }
7
- if (textType.includes(type)) {
8
- return mclGenerate.generateTextClass();
9
- }
10
- if (borderWidthType.includes(type)) {
11
- return mclGenerate.generateBorderWidthClass();
12
- }
13
- if (scaleType.includes(type)) {
14
- return mclGenerate.generateScaleClass();
15
- }
16
- // return spacing type if all of above is false
17
- return mclGenerate.generateSpacingClass();
18
- };