flicker-alerts 1.0.78 → 1.0.80

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.js CHANGED
@@ -15,6 +15,9 @@ const FlickerAlerts = {
15
15
  'top-left': { top: '0', left: '0', flexDirection: 'column' },
16
16
  'bottom-right': { bottom: '0', right: '0', flexDirection: 'column-reverse' },
17
17
  'bottom-left': { bottom: '0', left: '0', flexDirection: 'column-reverse' },
18
+ 'center': { top: '50%', left: '50%', transform: 'translate(-50%, -50%)', flexDirection: 'column' },
19
+ 'top-center': { top: '1rem', left: '50%', transform: 'translateX(-50%)', flexDirection: 'column' },
20
+ 'bottom-center': { bottom: '1rem', left: '50%', transform: 'translateX(-50%)', flexDirection: 'column-reverse' },
18
21
  };
19
22
  Object.assign(container.style, positionStyles[position] || positionStyles['top-right']);
20
23
  }
@@ -75,6 +78,7 @@ const FlickerAlerts = {
75
78
  },
76
79
  };
77
80
 
81
+
78
82
  // Botões de teste - Eles podem ser removidos se não forem necessários
79
83
  if (typeof document !== 'undefined') {
80
84
  document.getElementById('success-btn')?.addEventListener('click', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flicker-alerts",
3
- "version": "1.0.78",
3
+ "version": "1.0.80",
4
4
  "repository": "https://www.linkedin.com/in/bruno-carneiro-9a53aa190/",
5
5
  "homepage": "https://flickeralerts.netlify.app/",
6
6
  "description": "Biblioteca para alertas animados",
package/readme.md CHANGED
@@ -51,7 +51,9 @@ FlickerAlerts.showAlert({
51
51
  type: 'success', // 'success', 'info', 'warning', 'danger'
52
52
  title: 'Sucesso!',
53
53
  message: 'Operação realizada com sucesso.',
54
- position: 'top-right', // 'top-right', 'top-left', 'bottom-right', 'bottom-left', 'center'
54
+ position: 'top-right', // Você pode usar qualquer uma das opções abaixo:
55
+ // 'top-right', 'top-left', 'bottom-right', 'bottom-left',
56
+ // 'center', 'top-center', 'bottom-center'
55
57
  duration: 5000
56
58
  });
57
59
  ```
@@ -156,7 +158,7 @@ Essa abordagem é recomendada para garantir que o estilo seja incluído no build
156
158
  | `type` | `string` | Tipo do alerta: `success`, `info`, `warning`, `danger`. |
157
159
  | `title` | `string` | Título do alerta. |
158
160
  | `message` | `string` | Mensagem do alerta. |
159
- | `position` | `string` | Posição: `top-right`, `top-left`, `bottom-right`, etc. |
161
+ | `position` | `string` |Posição: `top-right`, `top-left`, `bottom-right`, `bottom-left`, `center`, `top-center`, `bottom-center`.|
160
162
  | `duration` | `number` | Duração do alerta em milissegundos. |
161
163
 
162
164
  ---
package/style.css CHANGED
@@ -1,21 +1,15 @@
1
1
 
2
2
  #alerts-container {
3
3
  position: fixed;
4
- top: 0;
5
- right: 0;
6
4
  display: flex;
7
- flex-direction: column-reverse;
8
- align-items: flex-end;
9
5
  gap: 10px;
10
- width: auto;
11
- pointer-events: none;
6
+ pointer-events: none;
12
7
  }
13
8
 
14
-
15
9
  .notification {
16
- margin: 5px 20px 5px 0;
10
+ margin: 20px 20px 0px 20px;
17
11
  background-color: #ffffff;
18
- border: 1px solid #ced4da;
12
+ border: 1px solid #ced4da;
19
13
  box-shadow: 6px 6px 6px rgba(0, 0, 0, 0.1);
20
14
  border-radius: 10px;
21
15
  padding: 20px;
@@ -29,6 +23,7 @@
29
23
  pointer-events: auto;
30
24
  }
31
25
 
26
+
32
27
  .notification .icon {
33
28
  display: flex;
34
29
  align-items: center;
@@ -168,45 +163,51 @@
168
163
  .top-right {
169
164
  top: 1rem;
170
165
  right: 1rem;
166
+ flex-direction: column;
171
167
  }
172
168
 
173
169
  .top-left {
174
170
  top: 1rem;
175
171
  left: 1rem;
172
+ flex-direction: column;
176
173
  }
177
174
 
178
175
  .bottom-right {
179
176
  bottom: 1rem;
180
177
  right: 1rem;
178
+ flex-direction: column-reverse;
181
179
  }
182
180
 
183
181
  .bottom-left {
184
182
  bottom: 1rem;
185
183
  left: 1rem;
184
+ flex-direction: column-reverse;
186
185
  }
187
186
 
188
187
  .center {
189
188
  top: 50%;
190
189
  left: 50%;
191
190
  transform: translate(-50%, -50%);
191
+ flex-direction: column;
192
192
  }
193
193
 
194
194
  .top-center {
195
195
  top: 1rem;
196
196
  left: 50%;
197
197
  transform: translateX(-50%);
198
+ flex-direction: column;
198
199
  }
199
200
 
200
- .bottom-center {
201
+ .bottom-center {
201
202
  bottom: 1rem;
202
203
  left: 50%;
203
204
  transform: translateX(-50%);
205
+ flex-direction: column-reverse;
204
206
  }
205
207
 
206
208
 
207
209
 
208
210
 
209
-
210
211
  .notification .progress-bar {
211
212
  position: absolute;
212
213
  bottom: 0;