@teammodlr/ui-kit 2.1.15 → 2.1.16
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 +10 -0
- package/lib/index.cjs.js +7 -7
- package/lib/index.es.js +1373 -1367
- package/package.json +1 -1
- package/src/components/modal/Modal.vue +11 -4
package/package.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
:leave-active-class="fade.leaveActive"
|
|
7
7
|
:enter-from-class="fade.enterFrom"
|
|
8
8
|
:leave-to-class="fade.leaveTo">
|
|
9
|
-
<div class="ui-modal" v-if="isOpen">
|
|
9
|
+
<div class="ui-modal" v-if="isOpen" :style="{ zIndex: zIndex }">
|
|
10
10
|
<div :class="style.mask" :style="{ zIndex: zIndex }"></div>
|
|
11
11
|
<div
|
|
12
12
|
tabIndex="-1"
|
|
13
13
|
@keydown="onWrapperKeyDown"
|
|
14
14
|
ref="wrapperRef"
|
|
15
15
|
role="dialog"
|
|
16
|
-
:class="computedWrapperClasses"
|
|
16
|
+
:class="{ computedWrapperClasses, ...{ wrapClassName } }"
|
|
17
17
|
:style="computedWrapperStyles"
|
|
18
18
|
@click="onOutsideClick">
|
|
19
19
|
<!-- <Transition-->
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
:class="computedContainerClasses"
|
|
31
31
|
@mousedown="onContentMouseDown"
|
|
32
32
|
@mouseup="onContentMouseUp"
|
|
33
|
+
v-bind="$attrs"
|
|
33
34
|
ref="target">
|
|
34
35
|
<template v-if="loading">
|
|
35
36
|
<slot name="loading"> Loading...</slot>
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
<slot name="body"></slot>
|
|
55
56
|
<slot></slot>
|
|
56
57
|
</div>
|
|
57
|
-
<div :class="style.footer">
|
|
58
|
+
<div :class="style.footer" v-if="hasFooter">
|
|
58
59
|
<slot name="footer"></slot>
|
|
59
60
|
</div>
|
|
60
61
|
</div>
|
|
@@ -93,6 +94,10 @@ export default defineComponent({
|
|
|
93
94
|
type: Boolean,
|
|
94
95
|
default: false
|
|
95
96
|
},
|
|
97
|
+
wrapClassName: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: ''
|
|
100
|
+
},
|
|
96
101
|
// @deprecated
|
|
97
102
|
canClickOutside: {
|
|
98
103
|
type: Boolean,
|
|
@@ -131,6 +136,7 @@ export default defineComponent({
|
|
|
131
136
|
const wrapperRef = shallowRef<HTMLDivElement>();
|
|
132
137
|
const zIndex = ref(props.zIndex ?? nextZIndex());
|
|
133
138
|
const hasSidebar = computed(() => !!slots.sidebar);
|
|
139
|
+
const hasFooter = computed(() => !!slots.footer);
|
|
134
140
|
const transformOrigin = ref<string>();
|
|
135
141
|
|
|
136
142
|
const contentStyleRef = computed(() => {
|
|
@@ -292,7 +298,8 @@ export default defineComponent({
|
|
|
292
298
|
fade,
|
|
293
299
|
contentStyleRef,
|
|
294
300
|
wrapperRef,
|
|
295
|
-
hasSidebar
|
|
301
|
+
hasSidebar,
|
|
302
|
+
hasFooter
|
|
296
303
|
};
|
|
297
304
|
}
|
|
298
305
|
});
|