@craftsjs/alert 4.0.0 → 5.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.
Files changed (36) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +145 -144
  3. package/_craftsjs-alert.theme.scss +296 -296
  4. package/esm2020/craftsjs-alert.mjs +4 -4
  5. package/esm2020/lib/alert.module.mjs +67 -69
  6. package/esm2020/lib/components/dialog-alert/components/alert-info/alert-info.component.mjs +13 -13
  7. package/esm2020/lib/components/dialog-alert/components/alert-success/alert-success.component.mjs +13 -13
  8. package/esm2020/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.mjs +18 -18
  9. package/esm2020/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.mjs +18 -18
  10. package/esm2020/lib/components/dialog-alert/components/components.mjs +24 -24
  11. package/esm2020/lib/components/dialog-alert/components/error/error.component.mjs +13 -13
  12. package/esm2020/lib/components/dialog-alert/components/warning/warning.component.mjs +13 -13
  13. package/esm2020/lib/components/dialog-alert/dialog-alert.component.mjs +74 -74
  14. package/esm2020/lib/models/alert-enum.model.mjs +8 -8
  15. package/esm2020/lib/models/alert.model.mjs +2 -2
  16. package/esm2020/lib/services/alert.service.mjs +64 -64
  17. package/esm2020/public-api.mjs +16 -16
  18. package/fesm2015/craftsjs-alert.mjs +260 -261
  19. package/fesm2015/craftsjs-alert.mjs.map +1 -1
  20. package/fesm2020/craftsjs-alert.mjs +258 -259
  21. package/fesm2020/craftsjs-alert.mjs.map +1 -1
  22. package/{craftsjs-alert.d.ts → index.d.ts} +5 -5
  23. package/lib/alert.module.d.ts +20 -20
  24. package/lib/components/dialog-alert/components/alert-info/alert-info.component.d.ts +5 -5
  25. package/lib/components/dialog-alert/components/alert-success/alert-success.component.d.ts +5 -5
  26. package/lib/components/dialog-alert/components/buttons/alert-cancel-button/alert-cancel-button.component.d.ts +7 -7
  27. package/lib/components/dialog-alert/components/buttons/alert-ok-button/alert-ok-button.component.d.ts +7 -7
  28. package/lib/components/dialog-alert/components/components.d.ts +6 -6
  29. package/lib/components/dialog-alert/components/error/error.component.d.ts +5 -5
  30. package/lib/components/dialog-alert/components/warning/warning.component.d.ts +5 -5
  31. package/lib/components/dialog-alert/dialog-alert.component.d.ts +20 -20
  32. package/lib/models/alert-enum.model.d.ts +6 -6
  33. package/lib/models/alert.model.d.ts +12 -12
  34. package/lib/services/alert.service.d.ts +16 -16
  35. package/package.json +9 -9
  36. package/public-api.d.ts +12 -12
@@ -1,297 +1,297 @@
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
- @include alert-error($variables);
294
- @include alert-warning($variables);
295
- @include alert-info($variables);
296
- @include alert-success($variables);
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
+ @include alert-error($variables);
294
+ @include alert-warning($variables);
295
+ @include alert-info($variables);
296
+ @include alert-success($variables);
297
297
  }
@@ -1,5 +1,5 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
5
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JhZnRzanMtYWxlcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9jcmFmdHNqcy9hbGVydC9zcmMvY3JhZnRzanMtYWxlcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==