2020-01-29 13:37:25 -06:00
|
|
|
<template>
|
2020-02-06 04:11:14 -06:00
|
|
|
<transition-group v-if="$store.state.device.animation"
|
2020-02-15 03:39:45 -06:00
|
|
|
class="uupnnhew"
|
|
|
|
:data-direction="direction"
|
|
|
|
:data-reversed="reversed ? 'true' : 'false'"
|
|
|
|
name="staggered"
|
2020-01-29 13:37:25 -06:00
|
|
|
tag="div"
|
|
|
|
appear
|
|
|
|
>
|
|
|
|
<slot></slot>
|
|
|
|
</transition-group>
|
2020-02-06 04:11:14 -06:00
|
|
|
<div v-else>
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2020-01-29 13:37:25 -06:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
props: {
|
|
|
|
delay: {
|
|
|
|
type: Number,
|
|
|
|
required: false,
|
|
|
|
default: 40
|
|
|
|
},
|
|
|
|
direction: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: 'down'
|
2020-02-05 23:23:01 -06:00
|
|
|
},
|
|
|
|
reversed: {
|
|
|
|
type: Boolean,
|
|
|
|
required: false,
|
|
|
|
default: false
|
2020-01-29 13:37:25 -06:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
focus() {
|
|
|
|
this.$slots.default[0].elm.focus();
|
|
|
|
}
|
2020-02-15 03:39:45 -06:00
|
|
|
},
|
2020-01-29 13:37:25 -06:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2020-02-15 03:39:45 -06:00
|
|
|
.staggered-move {
|
|
|
|
transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1) !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.uupnnhew[data-direction="up"] {
|
|
|
|
.staggered-enter {
|
|
|
|
opacity: 0;
|
|
|
|
transform: translateY(64px);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.uupnnhew[data-direction="down"] {
|
|
|
|
.staggered-enter {
|
|
|
|
opacity: 0;
|
|
|
|
transform: translateY(-64px);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.uupnnhew[data-reversed="true"] {
|
|
|
|
@for $i from 1 through 30 {
|
|
|
|
.staggered-enter-active:nth-last-child(#{$i}) {
|
|
|
|
transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1) (15ms * ($i - 1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.uupnnhew[data-reversed="false"] {
|
|
|
|
@for $i from 1 through 30 {
|
|
|
|
.staggered-enter-active:nth-child(#{$i}) {
|
|
|
|
transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1) (15ms * ($i - 1));
|
|
|
|
}
|
|
|
|
}
|
2020-01-29 13:37:25 -06:00
|
|
|
}
|
|
|
|
</style>
|