flicker-alerts 1.0.13 → 1.0.16

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'; // Nova propriedade 'position'
8
+ position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center'; // Nova propriedade 'position' com 'bottom-center'
9
9
  }
10
10
 
11
11
  export default class FlickerAlerts {
package/index.js CHANGED
@@ -8,10 +8,12 @@ const FlickerAlerts = {
8
8
  // Cria o container se ele não existir
9
9
  container = document.createElement('div');
10
10
  container.id = 'alerts-container';
11
- container.className = position; // Aplica a classe para posicionar com base na posição fornecida
12
11
  document.body.appendChild(container); // Adiciona o container ao body
13
12
  }
14
13
 
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
16
+
15
17
  // Criação do alerta
16
18
  const alertBox = document.createElement('div');
17
19
  alertBox.className = `alert-custom alert-${type}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flicker-alerts",
3
- "version": "1.0.13",
3
+ "version": "1.0.16",
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.10"
19
+ "flicker-alerts": "^1.0.16"
20
20
  }
21
21
  }
package/style.css CHANGED
@@ -23,10 +23,10 @@
23
23
  display: flex;
24
24
  align-items: center;
25
25
  justify-content: center;
26
- width: 2.5rem; /* Ajusta o tamanho do ícone */
27
- height: 2.5rem;
26
+ width: 2rem; /* Diminui o tamanho do círculo */
27
+ height: 2rem; /* Diminui o tamanho do círculo */
28
28
  border-radius: 50%;
29
- font-size: 1.3rem; /* Tamanho do ícone */
29
+ font-size: 1rem; /* Diminui o tamanho do ícone */
30
30
  line-height: 0;
31
31
  margin-right: 1rem; /* Espaço entre o ícone e o conteúdo */
32
32
  }
@@ -107,7 +107,7 @@
107
107
  }
108
108
 
109
109
  /* Classes para o container de alertas */
110
- .top-right, .top-left, .bottom-right, .bottom-left, .center {
110
+ .top-right, .top-left, .bottom-right, .bottom-left, .center, .top-center, .bottom-center {
111
111
  position: fixed;
112
112
  display: flex;
113
113
  flex-direction: column;
@@ -142,6 +142,19 @@
142
142
  transform: translate(-50%, -50%);
143
143
  }
144
144
 
145
+ .top-center {
146
+ top: 1rem;
147
+ left: 50%;
148
+ transform: translateX(-50%);
149
+ }
150
+
151
+ /* Novo estilo para o bottom-center */
152
+ .bottom-center {
153
+ bottom: 1rem;
154
+ left: 50%;
155
+ transform: translateX(-50%);
156
+ }
157
+
145
158
  /* Barra de progresso */
146
159
  .progress-bar {
147
160
  position: absolute;