-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix bugs * fix footer * updated autocomplete-field * fix textarea autosize * fix drop-menu * fix textarea * fix vh * added mobile-adaptation * updated navbar, updated home-page * mobile-adaptation * added screen adaptation for forms * fix drop-menu * mobile adaptation for flatpickr, added app-modal * replaced classes from global.scss to mixins * fix audits-card --------- Co-authored-by: Yehor Podporinov <[email protected]>
- Loading branch information
1 parent
0e7d8d5
commit cd75cd9
Showing
42 changed files
with
733 additions
and
434 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<template> | ||
<teleport to="#app-modals"> | ||
<transition name="app-modal" appear> | ||
<div | ||
v-if="isResettable ? isShown : true" | ||
v-show="!isResettable ? isShown : true" | ||
class="app-modal" | ||
tabindex="0" | ||
role="button" | ||
ref="modalBackdropElement" | ||
@click="onBackdropClick" | ||
> | ||
<div class="app-modal__pane" v-bind="$attrs"> | ||
<slot :close="closeModal" /> | ||
</div> | ||
</div> | ||
</transition> | ||
</teleport> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { ref } from 'vue' | ||
const emit = defineEmits<{ | ||
(event: 'update:is-shown', value: boolean): void | ||
}>() | ||
const props = withDefaults( | ||
defineProps<{ | ||
isShown?: boolean | ||
isCloseByClickOutside?: boolean | ||
isResettable?: boolean | ||
}>(), | ||
{ | ||
isShown: false, | ||
isCloseByClickOutside: true, | ||
isResettable: true, | ||
}, | ||
) | ||
const modalBackdropElement = ref<HTMLDivElement | undefined>() | ||
const closeModal = () => { | ||
emit('update:is-shown', false) | ||
} | ||
const onBackdropClick = (event: Event) => { | ||
if ( | ||
props.isCloseByClickOutside && | ||
event.target === modalBackdropElement.value | ||
) { | ||
closeModal() | ||
event.preventDefault() | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
$z-index: 1300; | ||
.app-modal { | ||
display: flex; | ||
position: fixed; | ||
inset: 0; | ||
z-index: $z-index; | ||
height: vh(100); | ||
width: 100%; | ||
background: var(--backdrop-modal); | ||
overflow-y: auto; | ||
padding: var(--app-padding); | ||
&-enter-active, | ||
&-leave-active { | ||
transition: var(--field-transition-duration) ease-in-out; | ||
transition-property: opacity, transform; | ||
} | ||
&-enter-from, | ||
&-leave-to { | ||
opacity: 0; | ||
transform: scale(1.1); | ||
} | ||
} | ||
.app-modal__pane { | ||
position: relative; | ||
margin: auto; | ||
flex-shrink: 0; | ||
} | ||
</style> |
Oops, something went wrong.