-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdialog.component.scss
128 lines (105 loc) · 2.06 KB
/
dialog.component.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
@use "elx/a11y" as *;
@use "elx/layout";
@use "elx/style/color";
@use "elx/style/elevation";
@use "elx/style/type";
.elx-dialog-overlay,
.elx-dialog-backdrop {
@include layout.flex(column, center, center);
width: 100vw;
height: 100vh;
pointer-events: none;
}
.elx-dialog-backdrop--blocking {
background: color.background(900, 0.6);
pointer-events: auto;
}
.elx-dialog {
@include layout.flex(column);
width: 512px;
max-width: 100%;
pointer-events: auto;
}
.elx-dialog-main {
background: color.background(400);
}
.elx-dialog-heading {
@include layout.flex(row, center);
padding: 32px 24px 18px;
border-top: 3px solid color.primary();
&__icon {
margin-right: 8px;
color: color.accent(700);
}
&__title {
margin: 0;
@include type.h3;
}
.elx-dialog[role="alert"] & {
border-top-color: color.warning();
&__icon {
color: color.warning(600);
}
}
.loader & {
border-top: none;
}
}
@keyframes indeterminate-animation {
0% { transform: translateX(0) scaleX(0); }
40% { transform: translateX(0) scaleX(0.4); }
100% { transform: translateX(100%) scaleX(0.5); }
}
.elx-dialog-progress {
height: 3px;
background: color.accent(400);
overflow: hidden;
&--indeterminate::after {
content: "";
display: block;
width: 100%;
height: 100%;
background: color.accent(700);
animation: indeterminate-animation 1s infinite linear;
transform-origin: 0% 50%;
}
&__value {
display: block;
height: 100%;
background: color.accent(700);
}
}
.elx-dialog-body {
padding: 0 24px 32px;
@include type.text;
> *:last-child {
margin-bottom: 0;
}
}
.elx-dialog-footer {
@include layout.flex(row, stretch, flex-end);
height: rem(48);
background: color.background(500, 0.6);
backdrop-filter: blur(24px);
.elx-btn {
height: 100%;
padding: 0 40px;
&--tertiary {
background: transparent;
color: color.white();
.elx-icon {
color: color.accent(700);
}
&:hover {
background: color.background(100, 0.125);
}
}
&:focus {
position: relative;
z-index: 1;
}
.elx-icon {
margin-left: -8px;
}
}
}