@webitel/ui-sdk 24.4.32 → 24.4.34
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webitel/ui-sdk",
|
|
3
|
-
"version": "24.4.
|
|
3
|
+
"version": "24.4.34",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@floating-ui/vue": "^1.0.1",
|
|
38
|
+
"@morev/vue-transitions": "^3.0.2",
|
|
38
39
|
"@vuelidate/core": "^2.0.3",
|
|
39
40
|
"@vuelidate/validators": "^2.0.4",
|
|
40
41
|
"@vuepic/vue-datepicker": "^4.4.0",
|
|
@@ -1,72 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<transition
|
|
3
|
-
name="expand"
|
|
4
|
-
@after-enter="afterEnter"
|
|
5
|
-
@enter="enter"
|
|
6
|
-
@leave="leave"
|
|
7
|
-
>
|
|
2
|
+
<transition-expand>
|
|
8
3
|
<slot />
|
|
9
|
-
</transition>
|
|
4
|
+
</transition-expand>
|
|
10
5
|
</template>
|
|
11
6
|
|
|
12
|
-
<script>
|
|
13
|
-
|
|
14
|
-
// https://markus.oberlehner.net/blog/transition-to-height-auto-with-vue/
|
|
15
|
-
export default {
|
|
16
|
-
name: 'WtExpandTransition',
|
|
17
|
-
methods: {
|
|
18
|
-
afterEnter(element) {
|
|
19
|
-
element.style.height = 'auto';
|
|
20
|
-
},
|
|
21
|
-
enter(element) {
|
|
22
|
-
const { width } = getComputedStyle(element);
|
|
23
|
-
element.style.width = width;
|
|
24
|
-
element.style.position = 'absolute';
|
|
25
|
-
element.style.visibility = 'hidden';
|
|
26
|
-
element.style.height = 'auto';
|
|
27
|
-
|
|
28
|
-
const { height } = getComputedStyle(element);
|
|
29
|
-
element.style.width = null;
|
|
30
|
-
element.style.position = null;
|
|
31
|
-
element.style.visibility = null;
|
|
32
|
-
element.style.height = 0;
|
|
33
|
-
|
|
34
|
-
// Force repaint to make sure the
|
|
35
|
-
// animation is triggered correctly.
|
|
36
|
-
// eslint-disable-next-line no-unused-expressions
|
|
37
|
-
getComputedStyle(element).height;
|
|
38
|
-
|
|
39
|
-
// eslint-disable-next-line no-return-assign
|
|
40
|
-
requestAnimationFrame(() => element.style.height = height);
|
|
41
|
-
},
|
|
42
|
-
leave(element) {
|
|
43
|
-
const { height } = getComputedStyle(element);
|
|
44
|
-
element.style.height = height;
|
|
45
|
-
// eslint-disable-next-line no-unused-expressions
|
|
46
|
-
getComputedStyle(element).height;
|
|
47
|
-
|
|
48
|
-
// eslint-disable-next-line no-return-assign
|
|
49
|
-
requestAnimationFrame(() => element.style.height = 0);
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
};
|
|
7
|
+
<script setup>
|
|
8
|
+
import { TransitionExpand } from '@morev/vue-transitions';
|
|
53
9
|
</script>
|
|
54
10
|
|
|
55
11
|
<style lang="scss">
|
|
56
|
-
.expand-enter-active,
|
|
57
|
-
.expand-leave-active {
|
|
58
|
-
transition: height var(--transition);
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
}
|
|
61
12
|
|
|
62
|
-
.expand-enter,
|
|
63
|
-
.expand-leave-to {
|
|
64
|
-
height: 0;
|
|
65
|
-
}
|
|
66
|
-
/*
|
|
67
|
-
// expand animation optimization
|
|
68
|
-
transform: translateZ(0);
|
|
69
|
-
backface-visibility: hidden;
|
|
70
|
-
perspective: 1000px;
|
|
71
|
-
*/
|
|
72
13
|
</style>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
<wt-expand-transition
|
|
26
|
-
v-
|
|
26
|
+
v-if="opened"
|
|
27
27
|
>
|
|
28
28
|
<div
|
|
29
29
|
class="wt-expansion-panel-body"
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
|
|
37
37
|
<script setup>
|
|
38
38
|
import { ref, watch } from 'vue';
|
|
39
|
+
import WtExpandTransition from '../transitions/wt-expand-transition.vue';
|
|
39
40
|
|
|
40
41
|
const props = defineProps({
|
|
41
42
|
size: {
|