-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
59 changed files
with
2,706 additions
and
2,968 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
103 changes: 60 additions & 43 deletions
103
packages/vkui/src/components/ModalCard/ModalCard.module.css
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 |
---|---|---|
@@ -1,65 +1,82 @@ | ||
.host { | ||
box-sizing: border-box; | ||
position: absolute; | ||
inset-block-start: 0; | ||
padding: 8px; | ||
inset-inline-start: 0; | ||
padding: var(--vkui--spacing_size_m); | ||
margin-inline: auto; | ||
inline-size: 100%; | ||
block-size: 100%; | ||
display: flex; | ||
align-items: flex-end; | ||
box-sizing: border-box; | ||
} | ||
|
||
.host:focus { | ||
outline: none; | ||
} | ||
|
||
.in { | ||
inline-size: 100%; | ||
margin-inline: auto; | ||
transform: translateY(calc(100% + 16px)); | ||
transition: transform 340ms var(--vkui--animation_easing_platform); | ||
.hostMaxWidthS { | ||
max-inline-size: 400px; | ||
} | ||
|
||
/** | ||
* iOS | ||
*/ | ||
|
||
.ios .in { | ||
.hostMaxWidthM { | ||
max-inline-size: 414px; | ||
} | ||
|
||
/** | ||
* Android + vkcom | ||
*/ | ||
|
||
.android .in { | ||
.hostMaxWidthL { | ||
max-inline-size: 440px; | ||
} | ||
|
||
.vkcom .in { | ||
max-inline-size: 400px; | ||
} | ||
/* Mobile */ | ||
@media (--viewWidth-smallTabletMinus) { | ||
.host { | ||
--vkui_internal_ModalCard--snapPoint: 100%; | ||
--vkui_internal_ModalCard--safeAreaInsetBottom: var(--vkui_internal--safe_area_inset_bottom); | ||
|
||
/** | ||
* Desktop | ||
*/ | ||
position: absolute; | ||
inset-inline: 0; | ||
inset-block-end: 0; | ||
margin-block-end: var(--vkui_internal_ModalCard--safeAreaInsetBottom); | ||
transform: translate3d(0, calc(100% - var(--vkui_internal_ModalCard--snapPoint)), 0); | ||
transition: transform var(--vkui--animation_duration_l) var(--vkui--animation_easing_platform); | ||
} | ||
|
||
.desktop { | ||
align-items: center; | ||
} | ||
.hostStateEnter { | ||
transform: translate3d(0, 100%, 0); | ||
transition-property: none; | ||
} | ||
|
||
.hostStateEntering { | ||
transition-property: transform; | ||
transition-delay: 0.2s; | ||
} | ||
|
||
.desktop .in { | ||
transform: unset; | ||
opacity: 0; | ||
transition: opacity 340ms var(--vkui--animation_easing_platform); | ||
.hostStateExiting { | ||
transform: translate3d(0, 100%, 0); | ||
transition-property: transform; | ||
} | ||
|
||
.hostStateExited { | ||
transform: translate3d(0, 100%, 0); | ||
transition-property: transform; | ||
} | ||
} | ||
/* Desktop */ | ||
@media (--viewWidth-smallTabletPlus) { | ||
.host { | ||
margin-block: auto; | ||
opacity: 1; | ||
transition: opacity 340ms var(--vkui--animation_easing_platform); | ||
} | ||
|
||
.hostStateEnter { | ||
opacity: 0; | ||
transition-property: none; | ||
} | ||
|
||
.hostStateEntering { | ||
opacity: 1; | ||
} | ||
|
||
.hostStateExiting { | ||
opacity: 0; | ||
} | ||
|
||
/** | ||
* CMP: | ||
* ModalRoot | ||
*/ | ||
/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */ | ||
:global(.vkuiInternalModalRoot--touched) .in { | ||
transition: none; | ||
.hostStateExited { | ||
opacity: 0; | ||
} | ||
} |
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
Oops, something went wrong.