flicker-alerts 1.0.16 → 1.0.17

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/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'; // Nova propriedade 'position' com '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.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
- // Garantir que o container tenha a classe 'position' adequada
15
- container.className = position; // Aplica a classe para posicionar com base na posição fornecida
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.16",
3
+ "version": "1.0.17",
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.16"
19
+ "flicker-alerts": "^1.0.17"
20
20
  }
21
21
  }
package/style.css CHANGED
@@ -148,7 +148,6 @@
148
148
  transform: translateX(-50%);
149
149
  }
150
150
 
151
- /* Novo estilo para o bottom-center */
152
151
  .bottom-center {
153
152
  bottom: 1rem;
154
153
  left: 50%;