flicker-alerts 1.0.16 → 1.0.18
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/README.md +11 -0
 - package/index.d.ts +1 -1
 - package/index.html +15 -0
 - package/index.js +5 -2
 - package/package.json +2 -2
 - package/style.css +0 -1
 
    
        package/README.md
    CHANGED
    
    | 
         @@ -40,6 +40,9 @@ export class AppComponent { 
     | 
|
| 
       40 
40 
     | 
    
         
             
                  type: 'success',
         
     | 
| 
       41 
41 
     | 
    
         
             
                  title: 'Sucesso',
         
     | 
| 
       42 
42 
     | 
    
         
             
                  message: 'Operação concluída com sucesso!'
         
     | 
| 
      
 43 
     | 
    
         
            +
                  position: 'top-righ'
         
     | 
| 
      
 44 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
      
 45 
     | 
    
         
            +
                      
         
     | 
| 
       43 
46 
     | 
    
         
             
                });
         
     | 
| 
       44 
47 
     | 
    
         
             
              }
         
     | 
| 
       45 
48 
     | 
    
         | 
| 
         @@ -48,6 +51,8 @@ export class AppComponent { 
     | 
|
| 
       48 
51 
     | 
    
         
             
                  type: 'info',
         
     | 
| 
       49 
52 
     | 
    
         
             
                  title: 'Informação',
         
     | 
| 
       50 
53 
     | 
    
         
             
                  message: 'Aqui está uma informação importante.'
         
     | 
| 
      
 54 
     | 
    
         
            +
                   position: 'top-righ'
         
     | 
| 
      
 55 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
       51 
56 
     | 
    
         
             
                });
         
     | 
| 
       52 
57 
     | 
    
         
             
              }
         
     | 
| 
       53 
58 
     | 
    
         | 
| 
         @@ -56,6 +61,8 @@ export class AppComponent { 
     | 
|
| 
       56 
61 
     | 
    
         
             
                  type: 'warning',
         
     | 
| 
       57 
62 
     | 
    
         
             
                  title: 'Alerta',
         
     | 
| 
       58 
63 
     | 
    
         
             
                  message: 'Por favor, preste atenção nisso!'
         
     | 
| 
      
 64 
     | 
    
         
            +
                   position: 'top-righ'
         
     | 
| 
      
 65 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
       59 
66 
     | 
    
         
             
                });
         
     | 
| 
       60 
67 
     | 
    
         
             
              }
         
     | 
| 
       61 
68 
     | 
    
         | 
| 
         @@ -64,6 +71,8 @@ export class AppComponent { 
     | 
|
| 
       64 
71 
     | 
    
         
             
                  type: 'danger',
         
     | 
| 
       65 
72 
     | 
    
         
             
                  title: 'Erro',
         
     | 
| 
       66 
73 
     | 
    
         
             
                  message: 'Ocorreu um erro inesperado!'
         
     | 
| 
      
 74 
     | 
    
         
            +
                   position: 'top-righ'
         
     | 
| 
      
 75 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
       67 
76 
     | 
    
         
             
                });
         
     | 
| 
       68 
77 
     | 
    
         
             
              }
         
     | 
| 
       69 
78 
     | 
    
         
             
            }
         
     | 
| 
         @@ -96,6 +105,8 @@ function App() { 
     | 
|
| 
       96 
105 
     | 
    
         
             
                  type: 'success',
         
     | 
| 
       97 
106 
     | 
    
         
             
                  title: 'Sucesso',
         
     | 
| 
       98 
107 
     | 
    
         
             
                  message: 'Operação concluída com sucesso!'
         
     | 
| 
      
 108 
     | 
    
         
            +
                  position: 'top-righ'
         
     | 
| 
      
 109 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
       99 
110 
     | 
    
         
             
                });
         
     | 
| 
       100 
111 
     | 
    
         
             
              };
         
     | 
| 
       101 
112 
     | 
    
         
             
            }
         
     | 
    
        package/index.d.ts
    CHANGED
    
    | 
         @@ -5,7 +5,7 @@ declare module 'flicker-alerts' { 
     | 
|
| 
       5 
5 
     | 
    
         
             
                title: string;
         
     | 
| 
       6 
6 
     | 
    
         
             
                message: string;
         
     | 
| 
       7 
7 
     | 
    
         
             
                duration?: number; // Duração do alerta (opcional)
         
     | 
| 
       8 
     | 
    
         
            -
                position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center';   
     | 
| 
      
 8 
     | 
    
         
            +
                position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center';  
         
     | 
| 
       9 
9 
     | 
    
         
             
              }
         
     | 
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
              export default class FlickerAlerts {
         
     | 
    
        package/index.html
    CHANGED
    
    | 
         @@ -175,6 +175,9 @@ export class AppComponent { 
     | 
|
| 
       175 
175 
     | 
    
         
             
                  type: 'success',
         
     | 
| 
       176 
176 
     | 
    
         
             
                  title: 'Sucesso',
         
     | 
| 
       177 
177 
     | 
    
         
             
                  message: 'Operação concluída com sucesso!'
         
     | 
| 
      
 178 
     | 
    
         
            +
                  position: 'top-righ'
         
     | 
| 
      
 179 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
      
 180 
     | 
    
         
            +
             
     | 
| 
       178 
181 
     | 
    
         
             
                });
         
     | 
| 
       179 
182 
     | 
    
         
             
              }
         
     | 
| 
       180 
183 
     | 
    
         | 
| 
         @@ -183,6 +186,9 @@ export class AppComponent { 
     | 
|
| 
       183 
186 
     | 
    
         
             
                  type: 'info',
         
     | 
| 
       184 
187 
     | 
    
         
             
                  title: 'Informação',
         
     | 
| 
       185 
188 
     | 
    
         
             
                  message: 'Aqui está uma informação importante.'
         
     | 
| 
      
 189 
     | 
    
         
            +
                  position: 'top-righ'
         
     | 
| 
      
 190 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
      
 191 
     | 
    
         
            +
             
     | 
| 
       186 
192 
     | 
    
         
             
                });
         
     | 
| 
       187 
193 
     | 
    
         
             
              }
         
     | 
| 
       188 
194 
     | 
    
         | 
| 
         @@ -191,6 +197,9 @@ export class AppComponent { 
     | 
|
| 
       191 
197 
     | 
    
         
             
                  type: 'warning',
         
     | 
| 
       192 
198 
     | 
    
         
             
                  title: 'Alerta',
         
     | 
| 
       193 
199 
     | 
    
         
             
                  message: 'Por favor, preste atenção nisso!'
         
     | 
| 
      
 200 
     | 
    
         
            +
                  position: 'top-righ'
         
     | 
| 
      
 201 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
      
 202 
     | 
    
         
            +
             
     | 
| 
       194 
203 
     | 
    
         
             
                });
         
     | 
| 
       195 
204 
     | 
    
         
             
              }
         
     | 
| 
       196 
205 
     | 
    
         | 
| 
         @@ -199,6 +208,9 @@ export class AppComponent { 
     | 
|
| 
       199 
208 
     | 
    
         
             
                  type: 'danger',
         
     | 
| 
       200 
209 
     | 
    
         
             
                  title: 'Erro',
         
     | 
| 
       201 
210 
     | 
    
         
             
                  message: 'Ocorreu um erro inesperado!'
         
     | 
| 
      
 211 
     | 
    
         
            +
                  position: 'top-righ'
         
     | 
| 
      
 212 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
      
 213 
     | 
    
         
            +
             
     | 
| 
       202 
214 
     | 
    
         
             
                });
         
     | 
| 
       203 
215 
     | 
    
         
             
              }
         
     | 
| 
       204 
216 
     | 
    
         | 
| 
         @@ -227,6 +239,9 @@ function App() { 
     | 
|
| 
       227 
239 
     | 
    
         
             
                  type: 'success',
         
     | 
| 
       228 
240 
     | 
    
         
             
                  title: 'Sucesso',
         
     | 
| 
       229 
241 
     | 
    
         
             
                  message: 'Operação concluída com sucesso!'
         
     | 
| 
      
 242 
     | 
    
         
            +
                  position: 'top-righ'
         
     | 
| 
      
 243 
     | 
    
         
            +
                  // Em 'position', você pode escolher entre: 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center', 'top-center' ou 'bottom-center';
         
     | 
| 
      
 244 
     | 
    
         
            +
             
     | 
| 
       230 
245 
     | 
    
         
             
                });
         
     | 
| 
       231 
246 
     | 
    
         
             
              };
         
     | 
| 
       232 
247 
     | 
    
         | 
    
        package/index.js
    CHANGED
    
    | 
         @@ -9,10 +9,13 @@ const FlickerAlerts = { 
     | 
|
| 
       9 
9 
     | 
    
         
             
                    container = document.createElement('div');
         
     | 
| 
       10 
10 
     | 
    
         
             
                    container.id = 'alerts-container';
         
     | 
| 
       11 
11 
     | 
    
         
             
                    document.body.appendChild(container); // Adiciona o container ao body
         
     | 
| 
      
 12 
     | 
    
         
            +
                  } else {
         
     | 
| 
      
 13 
     | 
    
         
            +
                    // Limpar as classes anteriores de posição
         
     | 
| 
      
 14 
     | 
    
         
            +
                    container.className = ''; 
         
     | 
| 
       12 
15 
     | 
    
         
             
                  }
         
     | 
| 
       13 
16 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
                  //  
     | 
| 
       15 
     | 
    
         
            -
                  container. 
     | 
| 
      
 17 
     | 
    
         
            +
                  // Aplica a nova classe de posição
         
     | 
| 
      
 18 
     | 
    
         
            +
                  container.classList.add(position);
         
     | 
| 
       16 
19 
     | 
    
         | 
| 
       17 
20 
     | 
    
         
             
                  // Criação do alerta
         
     | 
| 
       18 
21 
     | 
    
         
             
                  const alertBox = document.createElement('div');
         
     | 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "flicker-alerts",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "1.0. 
     | 
| 
      
 3 
     | 
    
         
            +
              "version": "1.0.18",
         
     | 
| 
       4 
4 
     | 
    
         
             
              "description": "Biblioteca para alertas animados",
         
     | 
| 
       5 
5 
     | 
    
         
             
              "main": "index.js",
         
     | 
| 
       6 
6 
     | 
    
         
             
              "types": "index.d.ts",
         
     | 
| 
         @@ -16,6 +16,6 @@ 
     | 
|
| 
       16 
16 
     | 
    
         
             
              "author": "",
         
     | 
| 
       17 
17 
     | 
    
         
             
              "license": "MIT",
         
     | 
| 
       18 
18 
     | 
    
         
             
              "dependencies": {
         
     | 
| 
       19 
     | 
    
         
            -
                "flicker-alerts": "^1.0. 
     | 
| 
      
 19 
     | 
    
         
            +
                "flicker-alerts": "^1.0.18"
         
     | 
| 
       20 
20 
     | 
    
         
             
              }
         
     | 
| 
       21 
21 
     | 
    
         
             
            }
         
     |