update
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
.swal-button--loading {
|
||||
color: transparent;
|
||||
|
||||
& ~ .swal-button__loader {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.swal-button__loader {
|
||||
position: absolute;
|
||||
height: auto;
|
||||
width: 43px;
|
||||
z-index: 2;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
text-align: center;
|
||||
pointer-events: none;
|
||||
opacity: 0;
|
||||
|
||||
& div {
|
||||
display: inline-block;
|
||||
float: none;
|
||||
vertical-align: baseline;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
margin: 2px;
|
||||
opacity: 0.4;
|
||||
border-radius: 7px;
|
||||
background-color: rgba(255, 255, 255, 0.9);
|
||||
transition: background 0.2s;
|
||||
animation: swal-loading-anim 1s infinite;
|
||||
|
||||
&:nth-child(3n+2) {
|
||||
animation-delay: 0.15s;
|
||||
}
|
||||
|
||||
&:nth-child(3n+3) {
|
||||
animation-delay: 0.3s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes swal-loading-anim {
|
||||
0% { opacity: 0.4; }
|
||||
20% { opacity: 0.4; }
|
||||
50% { opacity: 1.0; }
|
||||
100% { opacity: 0.4; }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
:root {
|
||||
--swal-btn-confirm: #7cd1f9;
|
||||
--swal-btn-confirm-hover: color(var(--swal-btn-confirm) shade(3%));
|
||||
--swal-btn-confirm-active: color(var(--swal-btn-confirm) shade(10%));
|
||||
|
||||
--swal-btn-cancel: #EFEFEF;
|
||||
--swal-btn-cancel-hover: color(var(--swal-btn-cancel) shade(3%));
|
||||
--swal-btn-cancel-active: color(var(--swal-btn-cancel) shade(10%));
|
||||
|
||||
--swal-btn-danger: #e64942;
|
||||
--swal-btn-danger-hover: color(var(--swal-btn-danger) shade(3%));
|
||||
--swal-btn-danger-active: color(var(--swal-btn-danger) shade(10%));
|
||||
|
||||
--swal-focus-color: rgba(43, 114, 165, 0.3);
|
||||
}
|
||||
|
||||
.swal-footer {
|
||||
text-align: right;
|
||||
padding-top: 13px;
|
||||
margin-top: 13px;
|
||||
padding: 13px 16px;
|
||||
border-radius: inherit;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
.swal-button-container {
|
||||
margin: 5px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.swal-button {
|
||||
background-color: var(--swal-btn-confirm);
|
||||
color: white;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
border-radius: 5px;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
padding: 10px 24px;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
&:not([disabled]):hover {
|
||||
background-color: var(--swal-btn-confirm-hover);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--swal-btn-confirm-active);
|
||||
}
|
||||
&:focus {
|
||||
outline: none;
|
||||
box-shadow:
|
||||
0px 0px 0px 1px white,
|
||||
0px 0px 0px 3px rgba(43, 114, 165, 0.29);
|
||||
}
|
||||
&[disabled] {
|
||||
opacity: 0.5;
|
||||
cursor: default;
|
||||
}
|
||||
/* Remove ugly dotted lines in FireFox: */
|
||||
&::-moz-focus-inner {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
&--cancel {
|
||||
color: #555555;
|
||||
background-color: var(--swal-btn-cancel);
|
||||
&:not([disabled]):hover {
|
||||
background-color: var(--swal-btn-cancel-hover);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--swal-btn-cancel-active);
|
||||
}
|
||||
&:focus {
|
||||
box-shadow:
|
||||
0px 0px 0px 1px white,
|
||||
0px 0px 0px 3px rgba(116, 136, 150, 0.29);
|
||||
}
|
||||
}
|
||||
|
||||
&--danger {
|
||||
background-color: var(--swal-btn-danger);
|
||||
&:not([disabled]):hover {
|
||||
background-color: var(--swal-btn-danger-hover);
|
||||
}
|
||||
&:active {
|
||||
background-color: var(--swal-btn-danger-active);
|
||||
}
|
||||
&:focus {
|
||||
box-shadow:
|
||||
0px 0px 0px 1px white,
|
||||
0px 0px 0px 3px rgba(165, 43, 43, 0.29);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
.swal-content {
|
||||
padding: 0 20px;
|
||||
margin-top: 20px;
|
||||
font-size: initial;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
&__input,
|
||||
&__textarea {
|
||||
-webkit-appearance: none;
|
||||
background-color: white;
|
||||
border: none;
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
border: 1px solid rgba(0, 0, 0, 0.14);
|
||||
padding: 10px 13px;
|
||||
border-radius: 2px;
|
||||
transition: border-color 0.2s;
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: #6DB8FF;
|
||||
}
|
||||
}
|
||||
|
||||
&__textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
@import './icons/error';
|
||||
@import './icons/warning';
|
||||
@import './icons/success';
|
||||
@import './icons/info';
|
||||
|
||||
.swal-icon {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-width: 4px;
|
||||
border-style: solid;
|
||||
border-radius: 50%;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
box-sizing: content-box;
|
||||
margin: 20px auto;
|
||||
&:first-child {
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
&--custom {
|
||||
width: auto;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
& img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
:root {
|
||||
--swal-red: #F27474;
|
||||
}
|
||||
|
||||
.swal-icon--error {
|
||||
border-color: var(--swal-red);
|
||||
animation: animateErrorIcon 0.5s;
|
||||
|
||||
&__x-mark {
|
||||
position: relative;
|
||||
display: block;
|
||||
animation: animateXMark 0.5s;
|
||||
}
|
||||
|
||||
&__line {
|
||||
position: absolute;
|
||||
height: 5px;
|
||||
width: 47px;
|
||||
background-color: var(--swal-red);
|
||||
display: block;
|
||||
top: 37px;
|
||||
border-radius: 2px;
|
||||
|
||||
&--left {
|
||||
transform: rotate(45deg);
|
||||
left: 17px;
|
||||
}
|
||||
|
||||
&--right {
|
||||
transform: rotate(-45deg);
|
||||
transform: rotate(-45deg);
|
||||
right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animateErrorIcon {
|
||||
from {
|
||||
transform: rotateX(100deg);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: rotateX(0deg);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animateXMark {
|
||||
0% {
|
||||
transform: scale(0.4);
|
||||
margin-top: 26px;
|
||||
opacity: 0;
|
||||
}
|
||||
50% {
|
||||
transform: scale(0.4);
|
||||
margin-top: 26px;
|
||||
opacity: 0;
|
||||
}
|
||||
80% {
|
||||
transform: scale(1.15);
|
||||
margin-top: -6px;
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
margin-top: 0;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
:root {
|
||||
--swal-blue: #C9DAE1;
|
||||
}
|
||||
|
||||
.swal-icon--info {
|
||||
border-color: var(--swal-blue);
|
||||
|
||||
/* "i"-letter body */
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
height: 29px;
|
||||
left: 50%;
|
||||
bottom: 17px;
|
||||
border-radius: 2px;
|
||||
margin-left: -2px;
|
||||
background-color: var(--swal-blue);
|
||||
}
|
||||
/* "i"-letter dot */
|
||||
&::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
margin-left: -3px;
|
||||
top: 19px;
|
||||
background-color: var(--swal-blue);
|
||||
left: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
:root {
|
||||
--swal-green: #A5DC86;
|
||||
--swal-green-light: rgba(165, 220, 134, 0.2);
|
||||
}
|
||||
|
||||
.swal-icon--success {
|
||||
border-color: var(--swal-green);
|
||||
|
||||
/* Moving circular line */
|
||||
&::before,
|
||||
&::after {
|
||||
content: '';
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 120px;
|
||||
background: white;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
&::before {
|
||||
border-radius: 120px 0 0 120px;
|
||||
top: -7px;
|
||||
left: -33px;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: 60px 60px;
|
||||
}
|
||||
|
||||
&::after {
|
||||
border-radius: 0 120px 120px 0;
|
||||
top: -11px;
|
||||
left: 30px;
|
||||
transform: rotate(-45deg);
|
||||
transform-origin: 0px 60px;
|
||||
animation: rotatePlaceholder 4.25s ease-in;
|
||||
}
|
||||
|
||||
/* Ring */
|
||||
&__ring {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border: 4px solid var(--swal-green-light);
|
||||
border-radius: 50%;
|
||||
box-sizing: content-box;
|
||||
position: absolute;
|
||||
left: -4px;
|
||||
top: -4px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
/* Hide corners left from animation */
|
||||
&__hide-corners {
|
||||
width: 5px;
|
||||
height: 90px;
|
||||
background-color: white;
|
||||
padding: 1px;
|
||||
position: absolute;
|
||||
left: 28px;
|
||||
top: 8px;
|
||||
z-index: 1;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
&__line {
|
||||
height: 5px;
|
||||
background-color: var(--swal-green);
|
||||
display: block;
|
||||
border-radius: 2px;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
|
||||
&--tip {
|
||||
width: 25px;
|
||||
left: 14px;
|
||||
top: 46px;
|
||||
transform: rotate(45deg);
|
||||
animation: animateSuccessTip 0.75s;
|
||||
}
|
||||
&--long {
|
||||
width: 47px;
|
||||
right: 8px;
|
||||
top: 38px;
|
||||
transform: rotate(-45deg);
|
||||
animation: animateSuccessLong 0.75s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes rotatePlaceholder {
|
||||
0% {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
5% {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
12% {
|
||||
transform: rotate(-405deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(-405deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animateSuccessTip {
|
||||
0% {
|
||||
width: 0;
|
||||
left: 1px;
|
||||
top: 19px;
|
||||
}
|
||||
54% {
|
||||
width: 0;
|
||||
left: 1px;
|
||||
top: 19px;
|
||||
}
|
||||
70% {
|
||||
width: 50px;
|
||||
left: -8px;
|
||||
top: 37px;
|
||||
}
|
||||
84% {
|
||||
width: 17px;
|
||||
left: 21px;
|
||||
top: 48px;
|
||||
}
|
||||
100% {
|
||||
width: 25px;
|
||||
left: 14px;
|
||||
top: 45px;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes animateSuccessLong {
|
||||
0% {
|
||||
width: 0;
|
||||
right: 46px;
|
||||
top: 54px;
|
||||
}
|
||||
65% {
|
||||
width: 0;
|
||||
right: 46px;
|
||||
top: 54px;
|
||||
}
|
||||
84% {
|
||||
width: 55px;
|
||||
right: 0px;
|
||||
top: 35px;
|
||||
}
|
||||
100% {
|
||||
width: 47px;
|
||||
right: 8px;
|
||||
top: 38px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
:root {
|
||||
--swal-orange: #F8BB86;
|
||||
}
|
||||
|
||||
.swal-icon--warning {
|
||||
border-color: var(--swal-orange);
|
||||
animation: pulseWarning 0.75s infinite alternate;
|
||||
|
||||
/* Exclamation mark */
|
||||
&__body {
|
||||
position: absolute;
|
||||
width: 5px;
|
||||
height: 47px;
|
||||
left: 50%;
|
||||
top: 10px;
|
||||
border-radius: 2px;
|
||||
margin-left: -2px;
|
||||
background-color: var(--swal-orange);
|
||||
}
|
||||
|
||||
&__dot {
|
||||
position: absolute;
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
margin-left: -4px;
|
||||
left: 50%;
|
||||
bottom: -11px;
|
||||
background-color: var(--swal-orange);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pulseWarning {
|
||||
from {
|
||||
border-color: #F8D486;
|
||||
}
|
||||
to {
|
||||
border-color: var(--swal-orange);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
.swal-title {
|
||||
color: rgba(0, 0, 0, 0.65);
|
||||
font-weight: 600;
|
||||
text-transform: none;
|
||||
position: relative;
|
||||
display: block;
|
||||
padding: 13px 16px;
|
||||
font-size: 27px;
|
||||
line-height: normal;
|
||||
text-align: center;
|
||||
margin-bottom: 0px;
|
||||
&:first-child {
|
||||
margin-top: 26px;
|
||||
}
|
||||
&:not(:first-child) {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
&:not(:last-child) {
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
.swal-text {
|
||||
font-size: 16px;
|
||||
position: relative;
|
||||
float: none;
|
||||
line-height: normal;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0 10px;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 0.64);
|
||||
max-width: calc(100% - 20px);
|
||||
overflow-wrap: break-word;
|
||||
box-sizing: border-box;
|
||||
&:first-child {
|
||||
margin-top: 45px;
|
||||
}
|
||||
&:last-child {
|
||||
margin-bottom: 45px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user