@craftsjs/alert 5.0.0 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +146 -145
- package/_craftsjs-alert.theme.scss +414 -296
- package/esm2022/lib/alert.module.mjs +67 -0
- package/{esm2020 → esm2022}/lib/components/dialog-alert/components/alert-info/alert-info.component.mjs +4 -4
- package/esm2022/lib/components/dialog-alert/components/alert-success/alert-success.component.mjs +13 -0
- package/esm2022/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.mjs +18 -0
- package/{esm2020 → esm2022}/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.mjs +4 -4
- package/{esm2020 → esm2022}/lib/components/dialog-alert/components/components.mjs +1 -1
- package/esm2022/lib/components/dialog-alert/components/error/error.component.mjs +13 -0
- package/esm2022/lib/components/dialog-alert/components/warning/warning.component.mjs +13 -0
- package/esm2022/lib/components/dialog-alert/dialog-alert.component.mjs +74 -0
- package/{esm2020 → esm2022}/lib/models/alert-enum.model.mjs +1 -1
- package/esm2022/lib/models/alert.model.mjs +2 -0
- package/{esm2020 → esm2022}/lib/services/alert.service.mjs +5 -5
- package/{esm2020 → esm2022}/public-api.mjs +1 -1
- package/fesm2022/craftsjs-alert.mjs +296 -0
- package/fesm2022/craftsjs-alert.mjs.map +1 -0
- package/package.json +12 -17
- package/esm2020/lib/alert.module.mjs +0 -67
- package/esm2020/lib/components/dialog-alert/components/alert-success/alert-success.component.mjs +0 -13
- package/esm2020/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.mjs +0 -18
- package/esm2020/lib/components/dialog-alert/components/error/error.component.mjs +0 -13
- package/esm2020/lib/components/dialog-alert/components/warning/warning.component.mjs +0 -13
- package/esm2020/lib/components/dialog-alert/dialog-alert.component.mjs +0 -74
- package/esm2020/lib/models/alert.model.mjs +0 -2
- package/fesm2015/craftsjs-alert.mjs +0 -299
- package/fesm2015/craftsjs-alert.mjs.map +0 -1
- package/fesm2020/craftsjs-alert.mjs +0 -297
- package/fesm2020/craftsjs-alert.mjs.map +0 -1
- /package/{esm2020 → esm2022}/craftsjs-alert.mjs +0 -0
|
@@ -1,297 +1,415 @@
|
|
|
1
|
-
@mixin alert-info($variables) {
|
|
2
|
-
.alert-icon-info {
|
|
3
|
-
display: block;
|
|
4
|
-
border-color: map-get($variables, color-info) ;
|
|
5
|
-
|
|
6
|
-
&::before {
|
|
7
|
-
content: "";
|
|
8
|
-
position: absolute;
|
|
9
|
-
width: 5px;
|
|
10
|
-
height: 29px;
|
|
11
|
-
left: 50%;
|
|
12
|
-
bottom: 17px;
|
|
13
|
-
border-radius: 2px;
|
|
14
|
-
margin-left: -2px;
|
|
15
|
-
background-color: map-get($variables, color-info);
|
|
16
|
-
}
|
|
17
|
-
&::after {
|
|
18
|
-
content: "";
|
|
19
|
-
position: absolute;
|
|
20
|
-
width: 7px;
|
|
21
|
-
height: 7px;
|
|
22
|
-
border-radius: 50%;
|
|
23
|
-
margin-left: -3px;
|
|
24
|
-
top: 19px;
|
|
25
|
-
background-color: map-get($variables, color-info);
|
|
26
|
-
left: 50%;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
@mixin alert-success($variables) {
|
|
31
|
-
|
|
32
|
-
$green-light: rgba(165, 220, 134, 0.2);
|
|
33
|
-
|
|
34
|
-
.alert-icon-success {
|
|
35
|
-
border-color: map-get($variables, color-success);
|
|
36
|
-
display: block;
|
|
37
|
-
margin: 30px auto;
|
|
38
|
-
|
|
39
|
-
&::before,
|
|
40
|
-
&::after {
|
|
41
|
-
content: '';
|
|
42
|
-
border-radius: 50%;
|
|
43
|
-
position: absolute;
|
|
44
|
-
width: 65px;
|
|
45
|
-
height: 120px;
|
|
46
|
-
background: white;
|
|
47
|
-
transform: rotate(45deg);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
&::before {
|
|
51
|
-
border-radius: 120px 0 0 120px;
|
|
52
|
-
top: -7px;
|
|
53
|
-
left: -33px;
|
|
54
|
-
transform: rotate(-45deg);
|
|
55
|
-
transform-origin: 60px 60px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&::after {
|
|
59
|
-
border-radius: 0 120px 120px 0;
|
|
60
|
-
top: -11px;
|
|
61
|
-
left: 30px;
|
|
62
|
-
transform: rotate(-45deg);
|
|
63
|
-
transform-origin: 0px 60px;
|
|
64
|
-
animation: rotatePlaceholder 4.25s ease-in;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&-ring {
|
|
68
|
-
width: 80px;
|
|
69
|
-
height: 80px;
|
|
70
|
-
border: 4px solid $green-light;
|
|
71
|
-
border-radius: 50%;
|
|
72
|
-
box-sizing: content-box;
|
|
73
|
-
position: absolute;
|
|
74
|
-
left: -4px;
|
|
75
|
-
top: -4px;
|
|
76
|
-
z-index: 2;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&-hide-corners {
|
|
80
|
-
width: 5px;
|
|
81
|
-
height: 90px;
|
|
82
|
-
background-color: map-get($variables, text);
|
|
83
|
-
padding: 1px;
|
|
84
|
-
position: absolute;
|
|
85
|
-
left: 28px;
|
|
86
|
-
top: 8px;
|
|
87
|
-
z-index: 1;
|
|
88
|
-
transform: rotate(-45deg);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&-line {
|
|
92
|
-
height: 5px;
|
|
93
|
-
background-color: map-get($variables, color-success);
|
|
94
|
-
display: block;
|
|
95
|
-
border-radius: 2px;
|
|
96
|
-
position: absolute;
|
|
97
|
-
z-index: 2;
|
|
98
|
-
|
|
99
|
-
&-tip {
|
|
100
|
-
width: 25px;
|
|
101
|
-
left: 14px;
|
|
102
|
-
top: 46px;
|
|
103
|
-
transform: rotate(45deg);
|
|
104
|
-
animation: animateSuccessTip 0.75s;
|
|
105
|
-
}
|
|
106
|
-
&-long {
|
|
107
|
-
width: 47px;
|
|
108
|
-
right: 8px;
|
|
109
|
-
top: 38px;
|
|
110
|
-
transform: rotate(-45deg);
|
|
111
|
-
animation: animateSuccessLong 0.75s;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@keyframes rotatePlaceholder {
|
|
117
|
-
0% {
|
|
118
|
-
transform: rotate(-45deg);
|
|
119
|
-
}
|
|
120
|
-
5% {
|
|
121
|
-
transform: rotate(-45deg);
|
|
122
|
-
}
|
|
123
|
-
12% {
|
|
124
|
-
transform: rotate(-405deg);
|
|
125
|
-
}
|
|
126
|
-
100% {
|
|
127
|
-
transform: rotate(-405deg);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
@keyframes animateSuccessTip {
|
|
132
|
-
0% {
|
|
133
|
-
width: 0;
|
|
134
|
-
left: 1px;
|
|
135
|
-
top: 19px;
|
|
136
|
-
}
|
|
137
|
-
54% {
|
|
138
|
-
width: 0;
|
|
139
|
-
left: 1px;
|
|
140
|
-
top: 19px;
|
|
141
|
-
}
|
|
142
|
-
70% {
|
|
143
|
-
width: 50px;
|
|
144
|
-
left: -8px;
|
|
145
|
-
top: 37px;
|
|
146
|
-
}
|
|
147
|
-
84% {
|
|
148
|
-
width: 17px;
|
|
149
|
-
left: 21px;
|
|
150
|
-
top: 48px;
|
|
151
|
-
}
|
|
152
|
-
100% {
|
|
153
|
-
width: 25px;
|
|
154
|
-
left: 14px;
|
|
155
|
-
top: 45px;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@keyframes animateSuccessLong {
|
|
160
|
-
0% {
|
|
161
|
-
width: 0;
|
|
162
|
-
right: 46px;
|
|
163
|
-
top: 54px;
|
|
164
|
-
}
|
|
165
|
-
65% {
|
|
166
|
-
width: 0;
|
|
167
|
-
right: 46px;
|
|
168
|
-
top: 54px;
|
|
169
|
-
}
|
|
170
|
-
84% {
|
|
171
|
-
width: 55px;
|
|
172
|
-
right: 0px;
|
|
173
|
-
top: 35px;
|
|
174
|
-
}
|
|
175
|
-
100% {
|
|
176
|
-
width: 47px;
|
|
177
|
-
right: 8px;
|
|
178
|
-
top: 38px;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
@mixin alert-error($variables) {
|
|
184
|
-
|
|
185
|
-
.alert-icon-error {
|
|
186
|
-
border-color: map-get($variables, color-danger);
|
|
187
|
-
animation: animateErrorIcon 0.5s;
|
|
188
|
-
display: block;
|
|
189
|
-
|
|
190
|
-
&-x-mark {
|
|
191
|
-
position: relative;
|
|
192
|
-
display: block;
|
|
193
|
-
animation: animateXMark 0.5s;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
&-line {
|
|
197
|
-
position: absolute;
|
|
198
|
-
height: 5px;
|
|
199
|
-
width: 47px;
|
|
200
|
-
background-color: map-get($variables, color-danger);
|
|
201
|
-
display: block;
|
|
202
|
-
top: 37px;
|
|
203
|
-
border-radius: 2px;
|
|
204
|
-
|
|
205
|
-
&-left {
|
|
206
|
-
transform: rotate(45deg);
|
|
207
|
-
left: 17px;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
&-right {
|
|
211
|
-
transform: rotate(-45deg);
|
|
212
|
-
transform: rotate(-45deg);
|
|
213
|
-
right: 16px;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
@keyframes animateErrorIcon {
|
|
219
|
-
from {
|
|
220
|
-
transform: rotateX(100deg);
|
|
221
|
-
opacity: 0;
|
|
222
|
-
}
|
|
223
|
-
to {
|
|
224
|
-
transform: rotateX(0deg);
|
|
225
|
-
opacity: 1;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
@keyframes animateXMark {
|
|
230
|
-
0% {
|
|
231
|
-
transform: scale(0.4);
|
|
232
|
-
margin-top: 26px;
|
|
233
|
-
opacity: 0;
|
|
234
|
-
}
|
|
235
|
-
50% {
|
|
236
|
-
transform: scale(0.4);
|
|
237
|
-
margin-top: 26px;
|
|
238
|
-
opacity: 0;
|
|
239
|
-
}
|
|
240
|
-
80% {
|
|
241
|
-
transform: scale(1.15);
|
|
242
|
-
margin-top: -6px;
|
|
243
|
-
}
|
|
244
|
-
100% {
|
|
245
|
-
transform: scale(1);
|
|
246
|
-
margin-top: 0;
|
|
247
|
-
opacity: 1;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
@mixin alert-warning($variables) {
|
|
253
|
-
.alert-icon-warning {
|
|
254
|
-
border-color: map-get($variables, color-warning);
|
|
255
|
-
animation: pulseWarning 0.75s infinite alternate;
|
|
256
|
-
display: block;
|
|
257
|
-
|
|
258
|
-
&-body {
|
|
259
|
-
position: absolute;
|
|
260
|
-
width: 5px;
|
|
261
|
-
height: 47px;
|
|
262
|
-
left: 50%;
|
|
263
|
-
top: 10px;
|
|
264
|
-
border-radius: 2px;
|
|
265
|
-
margin-left: -2px;
|
|
266
|
-
background-color: map-get($variables, color-warning);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
&-dot {
|
|
270
|
-
position: absolute;
|
|
271
|
-
width: 7px;
|
|
272
|
-
height: 7px;
|
|
273
|
-
border-radius: 50%;
|
|
274
|
-
margin-left: -4px;
|
|
275
|
-
left: 50%;
|
|
276
|
-
bottom: -11px;
|
|
277
|
-
background-color: map-get($variables, color-warning);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
@keyframes pulseWarning {
|
|
282
|
-
from {
|
|
283
|
-
border-color: map-get($variables, color-warning);
|
|
284
|
-
}
|
|
285
|
-
to {
|
|
286
|
-
border-color: map-get($variables, color-warning);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
@mixin alert($variables) {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
1
|
+
@mixin alert-info($variables) {
|
|
2
|
+
.alert-icon-info {
|
|
3
|
+
display: block;
|
|
4
|
+
border-color: map-get($variables, color-info) ;
|
|
5
|
+
|
|
6
|
+
&::before {
|
|
7
|
+
content: "";
|
|
8
|
+
position: absolute;
|
|
9
|
+
width: 5px;
|
|
10
|
+
height: 29px;
|
|
11
|
+
left: 50%;
|
|
12
|
+
bottom: 17px;
|
|
13
|
+
border-radius: 2px;
|
|
14
|
+
margin-left: -2px;
|
|
15
|
+
background-color: map-get($variables, color-info);
|
|
16
|
+
}
|
|
17
|
+
&::after {
|
|
18
|
+
content: "";
|
|
19
|
+
position: absolute;
|
|
20
|
+
width: 7px;
|
|
21
|
+
height: 7px;
|
|
22
|
+
border-radius: 50%;
|
|
23
|
+
margin-left: -3px;
|
|
24
|
+
top: 19px;
|
|
25
|
+
background-color: map-get($variables, color-info);
|
|
26
|
+
left: 50%;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
@mixin alert-success($variables) {
|
|
31
|
+
|
|
32
|
+
$green-light: rgba(165, 220, 134, 0.2);
|
|
33
|
+
|
|
34
|
+
.alert-icon-success {
|
|
35
|
+
border-color: map-get($variables, color-success);
|
|
36
|
+
display: block;
|
|
37
|
+
margin: 30px auto;
|
|
38
|
+
|
|
39
|
+
&::before,
|
|
40
|
+
&::after {
|
|
41
|
+
content: '';
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
position: absolute;
|
|
44
|
+
width: 65px;
|
|
45
|
+
height: 120px;
|
|
46
|
+
background: white;
|
|
47
|
+
transform: rotate(45deg);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&::before {
|
|
51
|
+
border-radius: 120px 0 0 120px;
|
|
52
|
+
top: -7px;
|
|
53
|
+
left: -33px;
|
|
54
|
+
transform: rotate(-45deg);
|
|
55
|
+
transform-origin: 60px 60px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&::after {
|
|
59
|
+
border-radius: 0 120px 120px 0;
|
|
60
|
+
top: -11px;
|
|
61
|
+
left: 30px;
|
|
62
|
+
transform: rotate(-45deg);
|
|
63
|
+
transform-origin: 0px 60px;
|
|
64
|
+
animation: rotatePlaceholder 4.25s ease-in;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&-ring {
|
|
68
|
+
width: 80px;
|
|
69
|
+
height: 80px;
|
|
70
|
+
border: 4px solid $green-light;
|
|
71
|
+
border-radius: 50%;
|
|
72
|
+
box-sizing: content-box;
|
|
73
|
+
position: absolute;
|
|
74
|
+
left: -4px;
|
|
75
|
+
top: -4px;
|
|
76
|
+
z-index: 2;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&-hide-corners {
|
|
80
|
+
width: 5px;
|
|
81
|
+
height: 90px;
|
|
82
|
+
background-color: map-get($variables, text);
|
|
83
|
+
padding: 1px;
|
|
84
|
+
position: absolute;
|
|
85
|
+
left: 28px;
|
|
86
|
+
top: 8px;
|
|
87
|
+
z-index: 1;
|
|
88
|
+
transform: rotate(-45deg);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&-line {
|
|
92
|
+
height: 5px;
|
|
93
|
+
background-color: map-get($variables, color-success);
|
|
94
|
+
display: block;
|
|
95
|
+
border-radius: 2px;
|
|
96
|
+
position: absolute;
|
|
97
|
+
z-index: 2;
|
|
98
|
+
|
|
99
|
+
&-tip {
|
|
100
|
+
width: 25px;
|
|
101
|
+
left: 14px;
|
|
102
|
+
top: 46px;
|
|
103
|
+
transform: rotate(45deg);
|
|
104
|
+
animation: animateSuccessTip 0.75s;
|
|
105
|
+
}
|
|
106
|
+
&-long {
|
|
107
|
+
width: 47px;
|
|
108
|
+
right: 8px;
|
|
109
|
+
top: 38px;
|
|
110
|
+
transform: rotate(-45deg);
|
|
111
|
+
animation: animateSuccessLong 0.75s;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
@keyframes rotatePlaceholder {
|
|
117
|
+
0% {
|
|
118
|
+
transform: rotate(-45deg);
|
|
119
|
+
}
|
|
120
|
+
5% {
|
|
121
|
+
transform: rotate(-45deg);
|
|
122
|
+
}
|
|
123
|
+
12% {
|
|
124
|
+
transform: rotate(-405deg);
|
|
125
|
+
}
|
|
126
|
+
100% {
|
|
127
|
+
transform: rotate(-405deg);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@keyframes animateSuccessTip {
|
|
132
|
+
0% {
|
|
133
|
+
width: 0;
|
|
134
|
+
left: 1px;
|
|
135
|
+
top: 19px;
|
|
136
|
+
}
|
|
137
|
+
54% {
|
|
138
|
+
width: 0;
|
|
139
|
+
left: 1px;
|
|
140
|
+
top: 19px;
|
|
141
|
+
}
|
|
142
|
+
70% {
|
|
143
|
+
width: 50px;
|
|
144
|
+
left: -8px;
|
|
145
|
+
top: 37px;
|
|
146
|
+
}
|
|
147
|
+
84% {
|
|
148
|
+
width: 17px;
|
|
149
|
+
left: 21px;
|
|
150
|
+
top: 48px;
|
|
151
|
+
}
|
|
152
|
+
100% {
|
|
153
|
+
width: 25px;
|
|
154
|
+
left: 14px;
|
|
155
|
+
top: 45px;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@keyframes animateSuccessLong {
|
|
160
|
+
0% {
|
|
161
|
+
width: 0;
|
|
162
|
+
right: 46px;
|
|
163
|
+
top: 54px;
|
|
164
|
+
}
|
|
165
|
+
65% {
|
|
166
|
+
width: 0;
|
|
167
|
+
right: 46px;
|
|
168
|
+
top: 54px;
|
|
169
|
+
}
|
|
170
|
+
84% {
|
|
171
|
+
width: 55px;
|
|
172
|
+
right: 0px;
|
|
173
|
+
top: 35px;
|
|
174
|
+
}
|
|
175
|
+
100% {
|
|
176
|
+
width: 47px;
|
|
177
|
+
right: 8px;
|
|
178
|
+
top: 38px;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@mixin alert-error($variables) {
|
|
184
|
+
|
|
185
|
+
.alert-icon-error {
|
|
186
|
+
border-color: map-get($variables, color-danger);
|
|
187
|
+
animation: animateErrorIcon 0.5s;
|
|
188
|
+
display: block;
|
|
189
|
+
|
|
190
|
+
&-x-mark {
|
|
191
|
+
position: relative;
|
|
192
|
+
display: block;
|
|
193
|
+
animation: animateXMark 0.5s;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&-line {
|
|
197
|
+
position: absolute;
|
|
198
|
+
height: 5px;
|
|
199
|
+
width: 47px;
|
|
200
|
+
background-color: map-get($variables, color-danger);
|
|
201
|
+
display: block;
|
|
202
|
+
top: 37px;
|
|
203
|
+
border-radius: 2px;
|
|
204
|
+
|
|
205
|
+
&-left {
|
|
206
|
+
transform: rotate(45deg);
|
|
207
|
+
left: 17px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&-right {
|
|
211
|
+
transform: rotate(-45deg);
|
|
212
|
+
transform: rotate(-45deg);
|
|
213
|
+
right: 16px;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@keyframes animateErrorIcon {
|
|
219
|
+
from {
|
|
220
|
+
transform: rotateX(100deg);
|
|
221
|
+
opacity: 0;
|
|
222
|
+
}
|
|
223
|
+
to {
|
|
224
|
+
transform: rotateX(0deg);
|
|
225
|
+
opacity: 1;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@keyframes animateXMark {
|
|
230
|
+
0% {
|
|
231
|
+
transform: scale(0.4);
|
|
232
|
+
margin-top: 26px;
|
|
233
|
+
opacity: 0;
|
|
234
|
+
}
|
|
235
|
+
50% {
|
|
236
|
+
transform: scale(0.4);
|
|
237
|
+
margin-top: 26px;
|
|
238
|
+
opacity: 0;
|
|
239
|
+
}
|
|
240
|
+
80% {
|
|
241
|
+
transform: scale(1.15);
|
|
242
|
+
margin-top: -6px;
|
|
243
|
+
}
|
|
244
|
+
100% {
|
|
245
|
+
transform: scale(1);
|
|
246
|
+
margin-top: 0;
|
|
247
|
+
opacity: 1;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@mixin alert-warning($variables) {
|
|
253
|
+
.alert-icon-warning {
|
|
254
|
+
border-color: map-get($variables, color-warning);
|
|
255
|
+
animation: pulseWarning 0.75s infinite alternate;
|
|
256
|
+
display: block;
|
|
257
|
+
|
|
258
|
+
&-body {
|
|
259
|
+
position: absolute;
|
|
260
|
+
width: 5px;
|
|
261
|
+
height: 47px;
|
|
262
|
+
left: 50%;
|
|
263
|
+
top: 10px;
|
|
264
|
+
border-radius: 2px;
|
|
265
|
+
margin-left: -2px;
|
|
266
|
+
background-color: map-get($variables, color-warning);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
&-dot {
|
|
270
|
+
position: absolute;
|
|
271
|
+
width: 7px;
|
|
272
|
+
height: 7px;
|
|
273
|
+
border-radius: 50%;
|
|
274
|
+
margin-left: -4px;
|
|
275
|
+
left: 50%;
|
|
276
|
+
bottom: -11px;
|
|
277
|
+
background-color: map-get($variables, color-warning);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@keyframes pulseWarning {
|
|
282
|
+
from {
|
|
283
|
+
border-color: map-get($variables, color-warning);
|
|
284
|
+
}
|
|
285
|
+
to {
|
|
286
|
+
border-color: map-get($variables, color-warning);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
@mixin alert($variables, $theme) {
|
|
293
|
+
$foreground: map-get($theme, foreground);
|
|
294
|
+
|
|
295
|
+
.alert {
|
|
296
|
+
&-icon {
|
|
297
|
+
width: 80px;
|
|
298
|
+
height: 80px;
|
|
299
|
+
border-width: 4px;
|
|
300
|
+
border-style: solid;
|
|
301
|
+
border-radius: 50%;
|
|
302
|
+
padding: 0;
|
|
303
|
+
position: relative;
|
|
304
|
+
box-sizing: content-box;
|
|
305
|
+
margin: 20px auto;
|
|
306
|
+
|
|
307
|
+
&-custom {
|
|
308
|
+
width: auto;
|
|
309
|
+
height: auto;
|
|
310
|
+
max-width: 100%;
|
|
311
|
+
border: none;
|
|
312
|
+
border-radius: 0;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
& img {
|
|
316
|
+
max-width: 100%;
|
|
317
|
+
max-height: 100%;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
&-title {
|
|
322
|
+
color: map-get($foreground, 'text');
|
|
323
|
+
font-weight: 600;
|
|
324
|
+
text-transform: none;
|
|
325
|
+
position: relative;
|
|
326
|
+
display: block;
|
|
327
|
+
font-size: 27px;
|
|
328
|
+
line-height: normal;
|
|
329
|
+
text-align: center;
|
|
330
|
+
margin-bottom: 0px;
|
|
331
|
+
|
|
332
|
+
&:first-child {
|
|
333
|
+
margin-top: 26px;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
&:not(:first-child) {
|
|
337
|
+
padding-bottom: 0;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
&:not(:last-child) {
|
|
341
|
+
margin-bottom: 13px;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
&-text {
|
|
346
|
+
font-size: 16px;
|
|
347
|
+
position: relative;
|
|
348
|
+
float: none;
|
|
349
|
+
line-height: normal;
|
|
350
|
+
vertical-align: top;
|
|
351
|
+
text-align: center;
|
|
352
|
+
display: inline-block;
|
|
353
|
+
margin: 0;
|
|
354
|
+
padding: 0 10px;
|
|
355
|
+
font-weight: 400;
|
|
356
|
+
color: map-get($foreground, 'text');
|
|
357
|
+
overflow-wrap: break-word;
|
|
358
|
+
box-sizing: border-box;
|
|
359
|
+
width: 100%;
|
|
360
|
+
|
|
361
|
+
&:first-child {
|
|
362
|
+
margin-top: 45px;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
&:last-child {
|
|
366
|
+
margin-bottom: 45px;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
&-footer {
|
|
371
|
+
text-align: right;
|
|
372
|
+
padding-top: 13px;
|
|
373
|
+
margin-top: 13px;
|
|
374
|
+
padding: 13px 16px;
|
|
375
|
+
border-radius: inherit;
|
|
376
|
+
border-top-left-radius: 0;
|
|
377
|
+
border-top-right-radius: 0;
|
|
378
|
+
|
|
379
|
+
&-button-container {
|
|
380
|
+
margin: 5px;
|
|
381
|
+
display: inline-block;
|
|
382
|
+
position: relative;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
&>* {
|
|
386
|
+
display: inline-block;
|
|
387
|
+
margin-right: 0.5em;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
&>:last-child {
|
|
391
|
+
margin-right: inherit;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
@include alert-error($variables);
|
|
396
|
+
@include alert-warning($variables);
|
|
397
|
+
@include alert-info($variables);
|
|
398
|
+
@include alert-success($variables);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
@mixin alert-color($theme) {
|
|
402
|
+
$foreground: map-get($theme, foreground);
|
|
403
|
+
color: map-get($foreground, 'text');
|
|
404
|
+
|
|
405
|
+
.alert {
|
|
406
|
+
// change color title
|
|
407
|
+
&-title {
|
|
408
|
+
color: map-get($foreground, 'text');
|
|
409
|
+
}
|
|
410
|
+
// change color text
|
|
411
|
+
&-text {
|
|
412
|
+
color: map-get($foreground, 'text');
|
|
413
|
+
}
|
|
414
|
+
}
|
|
297
415
|
}
|