feat: implement modal service and components for enhanced user interaction, including modal showcase in demo page
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
:host {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.modal-shell {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 2000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem;
|
||||
background: rgba(16, 18, 22, 0.48);
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
.modal-shell__dialog {
|
||||
width: min(100%, 40rem);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.modal-shell__dialog.modal-sm {
|
||||
width: min(100%, 24rem);
|
||||
}
|
||||
|
||||
.modal-shell__dialog.modal-lg {
|
||||
width: min(100%, 52rem);
|
||||
}
|
||||
|
||||
.modal-shell__dialog.modal-xl {
|
||||
width: min(100%, 68rem);
|
||||
}
|
||||
|
||||
.modal-shell__dialog--full {
|
||||
width: min(100%, 92rem);
|
||||
height: min(100%, calc(100dvh - 2rem));
|
||||
}
|
||||
|
||||
.modal-shell__content {
|
||||
max-height: calc(100dvh - 2rem);
|
||||
border-radius: 1.25rem;
|
||||
background:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 248, 248, 0.98));
|
||||
}
|
||||
|
||||
.modal-shell__dialog--full .modal-shell__content {
|
||||
height: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.modal-shell__header {
|
||||
align-items: flex-start;
|
||||
padding: 1.25rem 1.25rem 0.75rem;
|
||||
}
|
||||
|
||||
.modal-shell__title {
|
||||
margin: 0;
|
||||
font-size: clamp(1.15rem, 1rem + 0.4vw, 1.5rem);
|
||||
font-weight: 700;
|
||||
line-height: 1.15;
|
||||
color: #202020;
|
||||
}
|
||||
|
||||
.modal-shell__body {
|
||||
padding: 0 1.25rem 1.25rem;
|
||||
color: #303030;
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.modal-shell {
|
||||
padding: 0.75rem;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.modal-shell__dialog,
|
||||
.modal-shell__dialog.modal-sm,
|
||||
.modal-shell__dialog.modal-lg,
|
||||
.modal-shell__dialog.modal-xl,
|
||||
.modal-shell__dialog--full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.modal-shell__content {
|
||||
max-height: min(100dvh - 1.5rem, 48rem);
|
||||
border-radius: 1.25rem 1.25rem 0.75rem 0.75rem;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user