@teammodlr/ui-kit 2.1.10 → 2.1.12
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/lib/components/modal/Modal.vue.d.ts +9 -0
- package/lib/index.cjs.js +1 -1
- package/lib/index.es.js +76 -68
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/components/modal/Modal.vue +28 -19
- package/src/components/modal/examples/basic.vue +57 -14
- package/src/components/modal/examples/sidebar.vue +5 -1
- package/src/components/modal/style/Modal.css.ts +3 -1
- package/src/components/select/style/Select.css.ts +1 -0
|
@@ -22,28 +22,33 @@
|
|
|
22
22
|
:class="containerClasses"
|
|
23
23
|
@click.stop
|
|
24
24
|
ref="target">
|
|
25
|
-
<
|
|
26
|
-
<slot name="
|
|
27
|
-
</
|
|
28
|
-
<
|
|
29
|
-
<div :class="style.
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
<template v-if="loading">
|
|
26
|
+
<slot name="loading"> Loading... </slot>
|
|
27
|
+
</template>
|
|
28
|
+
<template v-else>
|
|
29
|
+
<div :class="style.sidebar" v-if="hasSidebar">
|
|
30
|
+
<slot name="sidebar"></slot>
|
|
31
|
+
</div>
|
|
32
|
+
<div :class="style.content">
|
|
33
|
+
<div :class="style.header">
|
|
34
|
+
<div :class="style.title" v-if="title">
|
|
35
|
+
<div>
|
|
36
|
+
{{ title }}
|
|
37
|
+
</div>
|
|
33
38
|
</div>
|
|
34
39
|
</div>
|
|
40
|
+
<button
|
|
41
|
+
:class="style.close"
|
|
42
|
+
@click="close"></button>
|
|
43
|
+
<div :class="style.body">
|
|
44
|
+
<slot name="body"></slot>
|
|
45
|
+
<slot></slot>
|
|
46
|
+
</div>
|
|
47
|
+
<div :class="style.footer">
|
|
48
|
+
<slot name="footer"></slot>
|
|
49
|
+
</div>
|
|
35
50
|
</div>
|
|
36
|
-
|
|
37
|
-
:class="style.close"
|
|
38
|
-
@click="close"></button>
|
|
39
|
-
<div :class="style.body">
|
|
40
|
-
<slot name="body"></slot>
|
|
41
|
-
<slot></slot>
|
|
42
|
-
</div>
|
|
43
|
-
<div :class="style.footer">
|
|
44
|
-
<slot name="footer"></slot>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
51
|
+
</template>
|
|
47
52
|
</div>
|
|
48
53
|
</Transition>
|
|
49
54
|
</div>
|
|
@@ -71,6 +76,10 @@ export default defineComponent({
|
|
|
71
76
|
type: String,
|
|
72
77
|
default: ''
|
|
73
78
|
},
|
|
79
|
+
loading: {
|
|
80
|
+
type: Boolean,
|
|
81
|
+
default: false
|
|
82
|
+
},
|
|
74
83
|
canClickOutside: {
|
|
75
84
|
type: Boolean,
|
|
76
85
|
default: true
|
|
@@ -1,40 +1,83 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<MModal
|
|
2
|
+
<MModal
|
|
3
|
+
ref="modal"
|
|
4
|
+
:loading="true"
|
|
5
|
+
title="I am a modal"
|
|
6
|
+
size="md"
|
|
7
|
+
:canClickOutside="true"
|
|
8
|
+
:canBounceOnOpen="false"
|
|
9
|
+
:canSlideIn="true">
|
|
3
10
|
<template #body>
|
|
4
11
|
<div>
|
|
5
|
-
<MInput
|
|
6
|
-
/>
|
|
12
|
+
<MInput />
|
|
7
13
|
</div>
|
|
8
14
|
</template>
|
|
9
15
|
<template #footer>
|
|
10
|
-
<div style="display: flex; flex-grow: 1; justify-content: end
|
|
16
|
+
<div style="display: flex; flex-grow: 1; justify-content: end">
|
|
11
17
|
<MButton variant="primary" @click="modal?.close()">
|
|
12
18
|
Okay
|
|
13
19
|
</MButton>
|
|
14
|
-
<MButton style="margin-left: 8px
|
|
20
|
+
<MButton style="margin-left: 8px" @click="modal?.close()">
|
|
15
21
|
Cancel
|
|
16
22
|
</MButton>
|
|
17
23
|
</div>
|
|
18
24
|
</template>
|
|
19
25
|
</MModal>
|
|
20
26
|
|
|
21
|
-
<div style="position: relative; width: 100%; height: 1000px
|
|
22
|
-
<button
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
<div style="position: relative; width: 100%; height: 1000px">
|
|
28
|
+
<button
|
|
29
|
+
@click="open"
|
|
30
|
+
style="
|
|
31
|
+
position: absolute;
|
|
32
|
+
width: 100px;
|
|
33
|
+
height: 50px;
|
|
34
|
+
top: 0;
|
|
35
|
+
left: 0;
|
|
36
|
+
">
|
|
37
|
+
Top Left
|
|
38
|
+
</button>
|
|
39
|
+
<button
|
|
40
|
+
@click="open"
|
|
41
|
+
style="
|
|
42
|
+
position: absolute;
|
|
43
|
+
width: 100px;
|
|
44
|
+
height: 50px;
|
|
45
|
+
top: 0;
|
|
46
|
+
right: 0;
|
|
47
|
+
">
|
|
48
|
+
Top Right
|
|
49
|
+
</button>
|
|
50
|
+
<button
|
|
51
|
+
@click="open"
|
|
52
|
+
style="
|
|
53
|
+
position: absolute;
|
|
54
|
+
width: 100px;
|
|
55
|
+
height: 50px;
|
|
56
|
+
bottom: 0;
|
|
57
|
+
left: 0;
|
|
58
|
+
">
|
|
59
|
+
Bottom Left
|
|
60
|
+
</button>
|
|
61
|
+
<button
|
|
62
|
+
@click="open"
|
|
63
|
+
style="
|
|
64
|
+
position: absolute;
|
|
65
|
+
width: 100px;
|
|
66
|
+
height: 50px;
|
|
67
|
+
bottom: 0;
|
|
68
|
+
right: 0;
|
|
69
|
+
">
|
|
70
|
+
Bottom Right
|
|
71
|
+
</button>
|
|
28
72
|
</div>
|
|
29
73
|
</template>
|
|
30
74
|
|
|
31
75
|
<script lang="ts" setup>
|
|
32
|
-
import { ref } from 'vue'
|
|
76
|
+
import { ref } from 'vue';
|
|
33
77
|
|
|
34
78
|
const modal = ref<any>(null);
|
|
35
79
|
|
|
36
80
|
const open = (event: MouseEvent) => {
|
|
37
81
|
modal.value.open(event.target);
|
|
38
82
|
};
|
|
39
|
-
|
|
40
83
|
</script>
|
|
@@ -67,6 +67,7 @@ export const base = style({
|
|
|
67
67
|
resize: 'none',
|
|
68
68
|
cursor: 'pointer',
|
|
69
69
|
boxShadow: 'none',
|
|
70
|
+
backgroundColor: vars.backgroundColor,
|
|
70
71
|
transition: `color .3s ${themeVars.transition.default},
|
|
71
72
|
background-color .3s ${themeVars.transition.default},
|
|
72
73
|
box-shadow .3s ${themeVars.transition.default},
|