@teammodlr/ui-kit 2.1.18 → 2.1.19
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 +1 -0
- package/lib/index.cjs.js +1 -1
- package/lib/index.es.js +1204 -1207
- package/package.json +1 -1
- package/src/components/modal/Modal.vue +59 -56
package/package.json
CHANGED
|
@@ -1,71 +1,73 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Teleport :to="'body'">
|
|
3
|
-
<
|
|
3
|
+
<TransitionGroup
|
|
4
4
|
type="animation"
|
|
5
5
|
:enter-active-class="fade.enterActive"
|
|
6
6
|
:leave-active-class="fade.leaveActive"
|
|
7
7
|
:enter-from-class="fade.enterFrom"
|
|
8
8
|
:leave-to-class="fade.leaveTo">
|
|
9
|
-
<div
|
|
10
|
-
|
|
9
|
+
<div
|
|
10
|
+
:class="style.mask"
|
|
11
|
+
:style="{ zIndex: nextZIndex() }"
|
|
12
|
+
v-if="isOpen"></div>
|
|
13
|
+
<div
|
|
14
|
+
tabIndex="-1"
|
|
15
|
+
v-if="isOpen"
|
|
16
|
+
@keydown="onWrapperKeyDown"
|
|
17
|
+
ref="wrapperRef"
|
|
18
|
+
role="dialog"
|
|
19
|
+
:class="computedWrapperClasses"
|
|
20
|
+
:style="computedWrapperStyles"
|
|
21
|
+
@click="onOutsideClick">
|
|
22
|
+
<!-- <Transition-->
|
|
23
|
+
<!-- type="animation"-->
|
|
24
|
+
<!-- :enter-active-class="modalScale.enterActive"-->
|
|
25
|
+
<!-- :leave-active-class="modalScale.leaveActive"-->
|
|
26
|
+
<!-- :enter-from-class="modalScale.enterFrom"-->
|
|
27
|
+
<!-- :leave-to-class="modalScale.leaveTo">-->
|
|
11
28
|
<div
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:class="computedWrapperClasses"
|
|
17
|
-
:style="computedWrapperStyles"
|
|
18
|
-
@click="onOutsideClick">
|
|
19
|
-
<!-- <Transition-->
|
|
20
|
-
<!-- type="animation"-->
|
|
21
|
-
<!-- :enter-active-class="modalScale.enterActive"-->
|
|
22
|
-
<!-- :leave-active-class="modalScale.leaveActive"-->
|
|
23
|
-
<!-- :enter-from-class="modalScale.enterFrom"-->
|
|
24
|
-
<!-- :leave-to-class="modalScale.leaveTo">-->
|
|
29
|
+
:class="computedModalClasses"
|
|
30
|
+
role="document"
|
|
31
|
+
v-bind="$attrs"
|
|
32
|
+
:style="contentStyleRef">
|
|
25
33
|
<div
|
|
26
|
-
:class="
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<div
|
|
44
|
-
v-if="title || showClose"
|
|
45
|
-
:class="style.header">
|
|
46
|
-
<div :class="style.title" v-if="title">
|
|
47
|
-
<div>{{ title }}</div>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
<button
|
|
51
|
-
v-if="showClose"
|
|
52
|
-
:class="style.close"
|
|
53
|
-
@click="close"></button>
|
|
54
|
-
<div :class="style.body">
|
|
55
|
-
<slot name="body"></slot>
|
|
56
|
-
<slot></slot>
|
|
57
|
-
</div>
|
|
58
|
-
<div :class="style.footer" v-if="hasFooter">
|
|
59
|
-
<slot name="footer"></slot>
|
|
34
|
+
:class="computedContainerClasses"
|
|
35
|
+
@mousedown="onContentMouseDown"
|
|
36
|
+
@mouseup="onContentMouseUp"
|
|
37
|
+
ref="target">
|
|
38
|
+
<template v-if="loading">
|
|
39
|
+
<slot name="loading"> Loading...</slot>
|
|
40
|
+
</template>
|
|
41
|
+
<template v-else>
|
|
42
|
+
<div :class="style.sidebar" v-if="hasSidebar">
|
|
43
|
+
<slot name="sidebar"></slot>
|
|
44
|
+
</div>
|
|
45
|
+
<div :class="style.content">
|
|
46
|
+
<div
|
|
47
|
+
v-if="title || showClose"
|
|
48
|
+
:class="style.header">
|
|
49
|
+
<div :class="style.title" v-if="title">
|
|
50
|
+
<div>{{ title }}</div>
|
|
60
51
|
</div>
|
|
61
52
|
</div>
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
<button
|
|
54
|
+
v-if="showClose"
|
|
55
|
+
:class="style.close"
|
|
56
|
+
@click="close"></button>
|
|
57
|
+
<div :class="style.body">
|
|
58
|
+
<slot name="body"></slot>
|
|
59
|
+
<slot></slot>
|
|
60
|
+
</div>
|
|
61
|
+
<div :class="style.footer" v-if="hasFooter">
|
|
62
|
+
<slot name="footer"></slot>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
64
66
|
</div>
|
|
65
|
-
<!-- </Transition>-->
|
|
66
67
|
</div>
|
|
68
|
+
<!-- </Transition>-->
|
|
67
69
|
</div>
|
|
68
|
-
</
|
|
70
|
+
</TransitionGroup>
|
|
69
71
|
</Teleport>
|
|
70
72
|
</template>
|
|
71
73
|
|
|
@@ -190,7 +192,7 @@ export default defineComponent({
|
|
|
190
192
|
|
|
191
193
|
const computedWrapperStyles = computed(() => {
|
|
192
194
|
return {
|
|
193
|
-
zIndex:
|
|
195
|
+
zIndex: nextZIndex()
|
|
194
196
|
};
|
|
195
197
|
});
|
|
196
198
|
|
|
@@ -300,7 +302,8 @@ export default defineComponent({
|
|
|
300
302
|
contentStyleRef,
|
|
301
303
|
wrapperRef,
|
|
302
304
|
hasSidebar,
|
|
303
|
-
hasFooter
|
|
305
|
+
hasFooter,
|
|
306
|
+
nextZIndex
|
|
304
307
|
};
|
|
305
308
|
}
|
|
306
309
|
});
|