ilibras-widget 1.4.0 → 1.5.2

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * iLibras Widget v1.4.0
2
+ * iLibras Widget v1.5.2
3
3
  * https://github.com/Dimendes-Solucoes/Ilibras_widget
4
4
  * Licença MIT
5
5
  *
@@ -27,28 +27,28 @@
27
27
  }
28
28
 
29
29
  /* Posicionamento */
30
- .ilibras-widget-bottom-right {
30
+ #ilibras-widget-container .ilibras-widget-bottom-right {
31
31
  bottom: 30px;
32
32
  right: 30px;
33
33
  }
34
34
 
35
- .ilibras-widget-bottom-left {
35
+ #ilibras-widget-container .ilibras-widget-bottom-left {
36
36
  bottom: 30px;
37
37
  left: 30px;
38
38
  }
39
39
 
40
- .ilibras-widget-top-right {
40
+ #ilibras-widget-container .ilibras-widget-top-right {
41
41
  top: 30px;
42
42
  right: 30px;
43
43
  }
44
44
 
45
- .ilibras-widget-top-left {
45
+ #ilibras-widget-container .ilibras-widget-top-left {
46
46
  top: 30px;
47
47
  left: 30px;
48
48
  }
49
49
 
50
50
  /* Botão flutuante (apenas ícone) */
51
- .ilibras-widget-button {
51
+ #ilibras-widget-container .ilibras-widget-button {
52
52
  position: relative;
53
53
  border: none;
54
54
  font: inherit;
@@ -70,23 +70,23 @@
70
70
  z-index: 10001;
71
71
  }
72
72
 
73
- .ilibras-widget-button img {
73
+ #ilibras-widget-container .ilibras-widget-button img {
74
74
  width: 64px;
75
75
  height: 64px;
76
76
  }
77
77
 
78
78
  .ilibras-widget-button:hover,
79
- .ilibras-widget-button:active {
79
+ #ilibras-widget-container .ilibras-widget-button:active {
80
80
  transform: none;
81
81
  box-shadow: none;
82
82
  }
83
83
 
84
- .ilibras-widget-button svg {
84
+ #ilibras-widget-container .ilibras-widget-button svg {
85
85
  filter: none;
86
86
  }
87
87
 
88
88
  /* Badge de notificação */
89
- .ilibras-widget-badge {
89
+ #ilibras-widget-container .ilibras-widget-badge {
90
90
  position: absolute;
91
91
  top: -2px;
92
92
  right: -2px;
@@ -114,7 +114,7 @@
114
114
  }
115
115
 
116
116
  /* Modal */
117
- .ilibras-widget-modal {
117
+ #ilibras-widget-container .ilibras-widget-modal {
118
118
  position: fixed;
119
119
  /* responsivo ao tamanho do monitor */
120
120
  width: clamp(320px, 26vw, 480px);
@@ -131,7 +131,7 @@
131
131
  overflow: hidden;
132
132
  }
133
133
 
134
- .ilibras-widget-modal-open {
134
+ #ilibras-widget-container .ilibras-widget-modal-open {
135
135
  opacity: 1;
136
136
  visibility: visible;
137
137
  transform: translateY(0) scale(1);
@@ -139,26 +139,26 @@
139
139
 
140
140
  /* Posicionamento do modal baseado na posição do botão */
141
141
  .ilibras-widget-bottom-right .ilibras-widget-modal,
142
- .ilibras-widget-bottom-left .ilibras-widget-modal {
142
+ #ilibras-widget-container .ilibras-widget-bottom-left .ilibras-widget-modal {
143
143
  bottom: 105px;
144
144
  }
145
145
 
146
146
  .ilibras-widget-top-right .ilibras-widget-modal,
147
- .ilibras-widget-top-left .ilibras-widget-modal {
147
+ #ilibras-widget-container .ilibras-widget-top-left .ilibras-widget-modal {
148
148
  top: 105px;
149
149
  }
150
150
 
151
151
  .ilibras-widget-bottom-right .ilibras-widget-modal,
152
- .ilibras-widget-top-right .ilibras-widget-modal {
152
+ #ilibras-widget-container .ilibras-widget-top-right .ilibras-widget-modal {
153
153
  right: 0;
154
154
  }
155
155
 
156
156
  .ilibras-widget-bottom-left .ilibras-widget-modal,
157
- .ilibras-widget-top-left .ilibras-widget-modal {
157
+ #ilibras-widget-container .ilibras-widget-top-left .ilibras-widget-modal {
158
158
  left: 0;
159
159
  }
160
160
 
161
- .ilibras-widget-header {
161
+ #ilibras-widget-container .ilibras-widget-header {
162
162
  background: white;
163
163
  padding: 14px 24px;
164
164
  display: flex;
@@ -169,18 +169,18 @@
169
169
  border-bottom: 2px solid rgba(53,122,189,0.06);
170
170
  }
171
171
 
172
- .ilibras-widget-header-content {
172
+ #ilibras-widget-container .ilibras-widget-header-content {
173
173
  display: flex;
174
174
  align-items: center;
175
175
  gap: 16px;
176
176
  flex: 1;
177
177
  }
178
178
 
179
- .ilibras-widget-logo {
179
+ #ilibras-widget-container .ilibras-widget-logo {
180
180
  display: none !important;
181
181
  }
182
182
 
183
- .ilibras-widget-title {
183
+ #ilibras-widget-container .ilibras-widget-title {
184
184
  padding-left: 0;
185
185
  font-size: 17px;
186
186
  font-weight: 700;
@@ -188,7 +188,7 @@
188
188
  color: #1f4f7a;
189
189
  }
190
190
 
191
- .ilibras-widget-close {
191
+ #ilibras-widget-container .ilibras-widget-close {
192
192
  background: transparent;
193
193
  border: none;
194
194
  cursor: pointer;
@@ -203,22 +203,22 @@
203
203
  flex-shrink: 0;
204
204
  }
205
205
 
206
- .ilibras-widget-close:hover {
206
+ #ilibras-widget-container .ilibras-widget-close:hover {
207
207
  background: rgba(53,122,189,0.08);
208
208
  transform: translateY(-1px);
209
209
  }
210
210
 
211
- .ilibras-widget-close:active {
211
+ #ilibras-widget-container .ilibras-widget-close:active {
212
212
  background: rgba(53,122,189,0.12);
213
213
  }
214
214
 
215
215
  /* Body do modal */
216
- .ilibras-widget-body {
216
+ #ilibras-widget-container .ilibras-widget-body {
217
217
  padding: 20px !important;
218
218
  background: white; /* fundo branco do widget */
219
219
  }
220
220
 
221
- .ilibras-widget-message {
221
+ #ilibras-widget-container .ilibras-widget-message {
222
222
  background: rgba(74,144,226,0.06); /* leve tom da cor da logo */
223
223
  border-radius: 14px;
224
224
  border: 1px solid rgba(74,144,226,0.08);
@@ -229,19 +229,19 @@
229
229
  }
230
230
 
231
231
  /* Formulário */
232
- .ilibras-widget-form {
232
+ #ilibras-widget-container .ilibras-widget-form {
233
233
  display: flex;
234
234
  flex-direction: column;
235
235
  gap: 20px;
236
236
  }
237
237
 
238
- .ilibras-widget-form-group {
238
+ #ilibras-widget-container .ilibras-widget-form-group {
239
239
  display: flex;
240
240
  flex-direction: column;
241
241
  gap: 8px;
242
242
  }
243
243
 
244
- .ilibras-widget-form-group label {
244
+ #ilibras-widget-container .ilibras-widget-form-group label {
245
245
  font-size: 13px;
246
246
  font-weight: 500;
247
247
  color: #495057;
@@ -249,7 +249,7 @@
249
249
  }
250
250
 
251
251
  .ilibras-widget-form-group input[type="text"],
252
- .ilibras-widget-form-group input[type="tel"] {
252
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"] {
253
253
  background: #ffffff;
254
254
  border: 1px solid rgba(20,30,45,0.06);
255
255
  padding: 12px 14px !important;
@@ -258,7 +258,7 @@
258
258
  }
259
259
 
260
260
  .ilibras-widget-form-group input[type="text"]:focus,
261
- .ilibras-widget-form-group input[type="tel"]:focus {
261
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"]:focus {
262
262
  background: white;
263
263
  border-color: #357ABD;
264
264
  box-shadow: 0 6px 18px rgba(53,122,189,0.08);
@@ -266,12 +266,12 @@
266
266
  }
267
267
 
268
268
  .ilibras-widget-form-group input[type="text"]::placeholder,
269
- .ilibras-widget-form-group input[type="tel"]::placeholder {
269
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"]::placeholder {
270
270
  color: #6c757d;
271
271
  }
272
272
 
273
273
  /* Checkbox customizado */
274
- .ilibras-widget-checkbox-label {
274
+ #ilibras-widget-container .ilibras-widget-checkbox-label {
275
275
  display: flex;
276
276
  align-items: flex-start;
277
277
  gap: 10px;
@@ -283,7 +283,7 @@
283
283
  line-height: 1.4;
284
284
  }
285
285
 
286
- .ilibras-widget-checkbox-label input[type="checkbox"] {
286
+ #ilibras-widget-container .ilibras-widget-checkbox-label input[type="checkbox"] {
287
287
  margin-top: 2px;
288
288
  width: 18px;
289
289
  height: 18px;
@@ -291,13 +291,13 @@
291
291
  accent-color: #357ABD;
292
292
  }
293
293
 
294
- .ilibras-widget-checkbox-label span {
294
+ #ilibras-widget-container .ilibras-widget-checkbox-label span {
295
295
  flex: 1;
296
296
  }
297
297
 
298
298
  /* Botão de submit */
299
299
 
300
- .ilibras-widget-submit {
300
+ #ilibras-widget-container .ilibras-widget-submit {
301
301
  padding: 12px 14px !important;
302
302
  border-radius: 10px;
303
303
  font-size: 15px;
@@ -310,17 +310,17 @@
310
310
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.12s;
311
311
  }
312
312
 
313
- .ilibras-widget-submit:hover {
313
+ #ilibras-widget-container .ilibras-widget-submit:hover {
314
314
  transform: translateY(-2px);
315
315
  box-shadow: 0 8px 22px rgba(53,122,189,0.18);
316
316
  }
317
317
 
318
- .ilibras-widget-submit:active {
318
+ #ilibras-widget-container .ilibras-widget-submit:active {
319
319
  transform: translateY(0);
320
320
  box-shadow: 0 4px 10px rgba(53,122,189,0.12);
321
321
  }
322
322
 
323
- .ilibras-widget-submit:disabled {
323
+ #ilibras-widget-container .ilibras-widget-submit:disabled {
324
324
  opacity: 0.6;
325
325
  cursor: not-allowed;
326
326
  transform: none;
@@ -329,7 +329,7 @@
329
329
  /* Agendar é a segunda escolha, não a concorrente: contorno em vez de preenchido,
330
330
  para a hierarquia entre "agora" e "depois" ficar visível antes da leitura. O
331
331
  form tem gap de 20px; as margens negativas colam o botão na dica que o explica. */
332
- .ilibras-widget-agendar {
332
+ #ilibras-widget-container .ilibras-widget-agendar {
333
333
  padding: 11px 14px !important;
334
334
  border-radius: 10px;
335
335
  font-size: 15px;
@@ -343,73 +343,73 @@
343
343
  margin-top: -8px;
344
344
  }
345
345
 
346
- .ilibras-widget-agendar:hover:not(:disabled) {
346
+ #ilibras-widget-container .ilibras-widget-agendar:hover:not(:disabled) {
347
347
  background: #F2F7FD;
348
348
  border-color: #357ABD;
349
349
  }
350
350
 
351
- .ilibras-widget-agendar:disabled {
351
+ #ilibras-widget-container .ilibras-widget-agendar:disabled {
352
352
  opacity: 0.6;
353
353
  cursor: not-allowed;
354
354
  }
355
355
 
356
- .ilibras-widget-dica-agendar {
356
+ #ilibras-widget-container .ilibras-widget-dica-agendar {
357
357
  margin-top: -14px;
358
358
  text-align: center;
359
359
  }
360
360
 
361
361
  /* Responsividade */
362
362
  @media (max-width: 480px) {
363
- .ilibras-widget-modal {
363
+ #ilibras-widget-container .ilibras-widget-modal {
364
364
  width: calc(100vw - 40px);
365
365
  max-width: 100%;
366
366
  }
367
367
 
368
368
  .ilibras-widget-bottom-right,
369
- .ilibras-widget-bottom-left {
369
+ #ilibras-widget-container .ilibras-widget-bottom-left {
370
370
  bottom: 20px;
371
371
  left: 20px !important;
372
372
  right: 20px !important;
373
373
  }
374
374
 
375
375
  .ilibras-widget-top-right,
376
- .ilibras-widget-top-left {
376
+ #ilibras-widget-container .ilibras-widget-top-left {
377
377
  top: 20px;
378
378
  left: 20px !important;
379
379
  right: 20px !important;
380
380
  }
381
381
 
382
- .ilibras-widget-button {
382
+ #ilibras-widget-container .ilibras-widget-button {
383
383
  width: 64px;
384
384
  height: 64px;
385
385
  }
386
386
 
387
- .ilibras-widget-button svg {
387
+ #ilibras-widget-container .ilibras-widget-button svg {
388
388
  width: 32px;
389
389
  height: 32px;
390
390
  }
391
391
 
392
- .ilibras-widget-modal {
392
+ #ilibras-widget-container .ilibras-widget-modal {
393
393
  bottom: 94px !important;
394
394
  right: 0 !important;
395
395
  left: 0 !important;
396
396
  margin: 0 20px;
397
397
  }
398
398
 
399
- .ilibras-widget-body {
399
+ #ilibras-widget-container .ilibras-widget-body {
400
400
  padding: 18px 16px;
401
401
  }
402
402
  }
403
403
 
404
404
  @media (min-width: 1600px) {
405
- .ilibras-widget-modal {
405
+ #ilibras-widget-container .ilibras-widget-modal {
406
406
  width: clamp(360px, 20vw, 560px);
407
407
  }
408
408
  }
409
409
 
410
410
  .ilibras-widget-button:focus-visible,
411
411
  .ilibras-widget-close:focus-visible,
412
- .ilibras-widget-submit:focus-visible {
412
+ #ilibras-widget-container .ilibras-widget-submit:focus-visible {
413
413
  outline: 3px solid rgba(53,122,189,0.18);
414
414
  outline-offset: 3px;
415
415
  }
@@ -435,43 +435,43 @@
435
435
  /* Accessibilidade */
436
436
  .ilibras-widget-button:focus-visible,
437
437
  .ilibras-widget-close:focus-visible,
438
- .ilibras-widget-submit:focus-visible {
438
+ #ilibras-widget-container .ilibras-widget-submit:focus-visible {
439
439
  outline: 3px solid #4A90E2;
440
440
  outline-offset: 2px;
441
441
  }
442
442
 
443
443
  /* Tema escuro (opcional) */
444
444
  @media (prefers-color-scheme: dark) {
445
- .ilibras-widget-modal {
445
+ #ilibras-widget-container .ilibras-widget-modal {
446
446
  background: #1e1e1e;
447
447
  }
448
448
 
449
- .ilibras-widget-body {
449
+ #ilibras-widget-container .ilibras-widget-body {
450
450
  background: #2d2d2d;
451
451
  }
452
452
 
453
- .ilibras-widget-message {
453
+ #ilibras-widget-container .ilibras-widget-message {
454
454
  background: #363636;
455
455
  color: #e0e0e0;
456
456
  }
457
457
 
458
- .ilibras-widget-form-group label {
458
+ #ilibras-widget-container .ilibras-widget-form-group label {
459
459
  color: #b0b0b0;
460
460
  }
461
461
 
462
462
  .ilibras-widget-form-group input[type="text"],
463
- .ilibras-widget-form-group input[type="tel"] {
463
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"] {
464
464
  background: #363636;
465
465
  border-color: #4a4a4a;
466
466
  color: #e0e0e0;
467
467
  }
468
468
 
469
469
  .ilibras-widget-form-group input[type="text"]::placeholder,
470
- .ilibras-widget-form-group input[type="tel"]::placeholder {
470
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"]::placeholder {
471
471
  color: #6c6c6c;
472
472
  }
473
473
 
474
- .ilibras-widget-checkbox-label {
474
+ #ilibras-widget-container .ilibras-widget-checkbox-label {
475
475
  color: #b0b0b0;
476
476
  }
477
477
  }
@@ -485,7 +485,7 @@
485
485
 
486
486
  /* Visível só para leitor de tela. Não usa display:none — o que some da tela
487
487
  dessa forma some também da leitura. */
488
- .ilibras-widget-sr-only {
488
+ #ilibras-widget-container .ilibras-widget-sr-only {
489
489
  position: absolute !important;
490
490
  width: 1px;
491
491
  height: 1px;
@@ -499,7 +499,7 @@
499
499
 
500
500
  /* Armadilha do anti-robô: fora da tela e fora da leitura, mas presente no DOM
501
501
  (bot que ignora display:none continua encontrando e preenchendo). */
502
- .ilibras-widget-hp {
502
+ #ilibras-widget-container .ilibras-widget-hp {
503
503
  position: absolute !important;
504
504
  left: -9999px;
505
505
  top: auto;
@@ -510,23 +510,23 @@
510
510
 
511
511
  /* O diálogo fechado não pode receber foco: com hidden, nada dentro dele entra
512
512
  na ordem de tabulação. */
513
- .ilibras-widget-modal[hidden] {
513
+ #ilibras-widget-container .ilibras-widget-modal[hidden] {
514
514
  display: none !important;
515
515
  }
516
516
 
517
- .ilibras-widget-legenda {
517
+ #ilibras-widget-container .ilibras-widget-legenda {
518
518
  font-size: 12px;
519
519
  color: #495057;
520
520
  margin: 0 0 -8px 4px;
521
521
  }
522
522
 
523
- .ilibras-widget-dica {
523
+ #ilibras-widget-container .ilibras-widget-dica {
524
524
  font-size: 12px;
525
525
  color: #495057;
526
526
  padding-left: 4px;
527
527
  }
528
528
 
529
- .ilibras-widget-erro {
529
+ #ilibras-widget-container .ilibras-widget-erro {
530
530
  font-size: 13px;
531
531
  font-weight: 500;
532
532
  color: #b02a37;
@@ -538,23 +538,23 @@
538
538
 
539
539
  /* A cor não pode ser o único sinal de erro: quem não distingue vermelho
540
540
  precisa do símbolo e do texto. */
541
- .ilibras-widget-erro::before {
541
+ #ilibras-widget-container .ilibras-widget-erro::before {
542
542
  content: "\\26A0";
543
543
  font-size: 13px;
544
544
  line-height: 1.3;
545
545
  }
546
546
 
547
- .ilibras-widget-erro[hidden] {
547
+ #ilibras-widget-container .ilibras-widget-erro[hidden] {
548
548
  display: none;
549
549
  }
550
550
 
551
- .ilibras-widget-form-group input.ilibras-widget-invalido {
551
+ #ilibras-widget-container .ilibras-widget-form-group input.ilibras-widget-invalido {
552
552
  border-color: #b02a37;
553
553
  border-width: 2px;
554
554
  }
555
555
 
556
556
  /* Aviso de falha de serviço / limite de uso. */
557
- .ilibras-widget-aviso {
557
+ #ilibras-widget-container .ilibras-widget-aviso {
558
558
  background: #fdf2f2;
559
559
  border: 1px solid #f0c2c2;
560
560
  border-left: 4px solid #b02a37;
@@ -566,47 +566,47 @@
566
566
  line-height: 1.5;
567
567
  }
568
568
 
569
- .ilibras-widget-aviso[hidden] {
569
+ #ilibras-widget-container .ilibras-widget-aviso[hidden] {
570
570
  display: none;
571
571
  }
572
572
 
573
- .ilibras-widget-aviso:focus-visible {
573
+ #ilibras-widget-container .ilibras-widget-aviso:focus-visible {
574
574
  outline: 3px solid #b02a37;
575
575
  outline-offset: 2px;
576
576
  }
577
577
 
578
- .ilibras-widget-aviso-texto {
578
+ #ilibras-widget-container .ilibras-widget-aviso-texto {
579
579
  margin: 0;
580
580
  }
581
581
 
582
582
  /* Plano de contingência: aparece quando a API não responde. */
583
- .ilibras-widget-fallback {
583
+ #ilibras-widget-container .ilibras-widget-fallback {
584
584
  margin-top: 10px;
585
585
  padding-top: 10px;
586
586
  border-top: 1px solid #f0c2c2;
587
587
  font-size: 13px;
588
588
  }
589
589
 
590
- .ilibras-widget-fallback p {
590
+ #ilibras-widget-container .ilibras-widget-fallback p {
591
591
  margin: 0 0 6px;
592
592
  }
593
593
 
594
- .ilibras-widget-fallback ul {
594
+ #ilibras-widget-container .ilibras-widget-fallback ul {
595
595
  margin: 0;
596
596
  padding-left: 18px;
597
597
  list-style: disc;
598
598
  }
599
599
 
600
- .ilibras-widget-fallback li {
600
+ #ilibras-widget-container .ilibras-widget-fallback li {
601
601
  margin: 2px 0;
602
602
  }
603
603
 
604
- .ilibras-widget-fallback a {
604
+ #ilibras-widget-container .ilibras-widget-fallback a {
605
605
  color: #1f4f7a;
606
606
  font-weight: 600;
607
607
  }
608
608
 
609
- .ilibras-widget-status {
609
+ #ilibras-widget-container .ilibras-widget-status {
610
610
  font-size: 13px;
611
611
  color: #495057;
612
612
  margin: 0;
@@ -620,7 +620,7 @@
620
620
  .ilibras-widget-submit:focus-visible,
621
621
  .ilibras-widget-form-group input:focus-visible,
622
622
  .ilibras-widget-checkbox-label input:focus-visible,
623
- .ilibras-widget-fallback a:focus-visible {
623
+ #ilibras-widget-container .ilibras-widget-fallback a:focus-visible {
624
624
  outline: 3px solid #1f4f7a;
625
625
  outline-offset: 2px;
626
626
  }
@@ -631,14 +631,14 @@
631
631
  .ilibras-widget-modal,
632
632
  .ilibras-widget-form-group input,
633
633
  .ilibras-widget-submit,
634
- .ilibras-widget-aviso {
634
+ #ilibras-widget-container .ilibras-widget-aviso {
635
635
  border: 1px solid CanvasText;
636
636
  }
637
637
 
638
638
  .ilibras-widget-button:focus-visible,
639
639
  .ilibras-widget-close:focus-visible,
640
640
  .ilibras-widget-submit:focus-visible,
641
- .ilibras-widget-form-group input:focus-visible {
641
+ #ilibras-widget-container .ilibras-widget-form-group input:focus-visible {
642
642
  outline: 3px solid Highlight;
643
643
  }
644
644
  }
@@ -650,13 +650,13 @@
650
650
  .ilibras-widget-modal,
651
651
  .ilibras-widget-submit,
652
652
  .ilibras-widget-close,
653
- .ilibras-widget-badge {
653
+ #ilibras-widget-container .ilibras-widget-badge {
654
654
  animation: none !important;
655
655
  transition: none !important;
656
656
  }
657
657
 
658
658
  .ilibras-widget-submit:hover,
659
- .ilibras-widget-close:hover {
659
+ #ilibras-widget-container .ilibras-widget-close:hover {
660
660
  transform: none;
661
661
  }
662
662
  }
@@ -664,44 +664,44 @@
664
664
  @media (prefers-color-scheme: dark) {
665
665
  .ilibras-widget-legenda,
666
666
  .ilibras-widget-dica,
667
- .ilibras-widget-status {
667
+ #ilibras-widget-container .ilibras-widget-status {
668
668
  color: #c9c9c9;
669
669
  }
670
670
 
671
- .ilibras-widget-erro {
671
+ #ilibras-widget-container .ilibras-widget-erro {
672
672
  color: #ff9aa2;
673
673
  }
674
674
 
675
- .ilibras-widget-form-group input.ilibras-widget-invalido {
675
+ #ilibras-widget-container .ilibras-widget-form-group input.ilibras-widget-invalido {
676
676
  border-color: #ff9aa2;
677
677
  }
678
678
 
679
- .ilibras-widget-aviso {
679
+ #ilibras-widget-container .ilibras-widget-aviso {
680
680
  background: #3a2224;
681
681
  border-color: #6b3a3f;
682
682
  border-left-color: #ff9aa2;
683
683
  color: #ffd9dc;
684
684
  }
685
685
 
686
- .ilibras-widget-fallback {
686
+ #ilibras-widget-container .ilibras-widget-fallback {
687
687
  border-top-color: #6b3a3f;
688
688
  }
689
689
 
690
- .ilibras-widget-fallback a {
690
+ #ilibras-widget-container .ilibras-widget-fallback a {
691
691
  color: #9ecbff;
692
692
  }
693
693
 
694
- .ilibras-widget-title {
694
+ #ilibras-widget-container .ilibras-widget-title {
695
695
  color: #e6f0f8;
696
696
  }
697
697
 
698
- .ilibras-widget-header {
698
+ #ilibras-widget-container .ilibras-widget-header {
699
699
  background: #1e1e1e;
700
700
  border-left-color: #333;
701
701
  border-bottom-color: #333;
702
702
  }
703
703
 
704
- .ilibras-widget-close {
704
+ #ilibras-widget-container .ilibras-widget-close {
705
705
  color: #e0e0e0;
706
706
  }
707
707
  }
@@ -740,75 +740,6 @@
740
740
  texto: ""
741
741
  }
742
742
  };
743
- var DDDS = [
744
- 11,
745
- 12,
746
- 13,
747
- 14,
748
- 15,
749
- 16,
750
- 17,
751
- 18,
752
- 19,
753
- 21,
754
- 22,
755
- 24,
756
- 27,
757
- 28,
758
- 31,
759
- 32,
760
- 33,
761
- 34,
762
- 35,
763
- 37,
764
- 38,
765
- 41,
766
- 42,
767
- 43,
768
- 44,
769
- 45,
770
- 46,
771
- 47,
772
- 48,
773
- 49,
774
- 51,
775
- 53,
776
- 54,
777
- 55,
778
- 61,
779
- 62,
780
- 63,
781
- 64,
782
- 65,
783
- 66,
784
- 67,
785
- 68,
786
- 69,
787
- 71,
788
- 73,
789
- 74,
790
- 75,
791
- 77,
792
- 79,
793
- 81,
794
- 82,
795
- 83,
796
- 84,
797
- 85,
798
- 86,
799
- 87,
800
- 88,
801
- 89,
802
- 91,
803
- 92,
804
- 93,
805
- 94,
806
- 95,
807
- 96,
808
- 97,
809
- 98,
810
- 99
811
- ];
812
743
  var FOCAVEIS = 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
813
744
  var ILibrasWidget = class {
814
745
  constructor(config = {}) {
@@ -891,24 +822,6 @@
891
822
  <span class="ilibras-widget-erro" id="ilibras-name-erro" hidden></span>
892
823
  </div>
893
824
 
894
- <div class="ilibras-widget-form-group">
895
- <label for="ilibras-cpf">CPF <span aria-hidden="true">*</span></label>
896
- <input type="text" id="ilibras-cpf" name="cpf" placeholder="000.000.000-00"
897
- required aria-required="true" maxlength="14" autocomplete="off"
898
- inputmode="numeric" aria-describedby="ilibras-cpf-dica ilibras-cpf-erro" />
899
- <span class="ilibras-widget-dica" id="ilibras-cpf-dica">Somente números.</span>
900
- <span class="ilibras-widget-erro" id="ilibras-cpf-erro" hidden></span>
901
- </div>
902
-
903
- <div class="ilibras-widget-form-group">
904
- <label for="ilibras-phone">Telefone <span aria-hidden="true">*</span></label>
905
- <input type="tel" id="ilibras-phone" name="phone" placeholder="(00) 00000-0000"
906
- required aria-required="true" maxlength="15" autocomplete="tel"
907
- inputmode="numeric" aria-describedby="ilibras-phone-dica ilibras-phone-erro" />
908
- <span class="ilibras-widget-dica" id="ilibras-phone-dica">Com DDD. Ex.: (11) 98765-4321.</span>
909
- <span class="ilibras-widget-erro" id="ilibras-phone-erro" hidden></span>
910
- </div>
911
-
912
825
  <div class="ilibras-widget-form-group">
913
826
  <label for="ilibras-consent" class="ilibras-widget-checkbox-label">
914
827
  <input type="checkbox" id="ilibras-consent" name="consent" required aria-required="true"
@@ -974,14 +887,11 @@
974
887
  }
975
888
  if (e.key === "Tab") this.prenderFoco(e);
976
889
  });
977
- this.setupInputMasks();
978
- [["name", "nome"], ["cpf", "cpf"], ["phone", "telefone"]].forEach(([id, campo]) => {
979
- const input = this.container.querySelector("#ilibras-" + id);
980
- input.addEventListener("blur", () => {
981
- if (input.value.trim() !== "") this.validarCampo(campo);
982
- });
983
- input.addEventListener("input", () => this.limparErro(id));
890
+ const nome = this.container.querySelector("#ilibras-name");
891
+ nome.addEventListener("blur", () => {
892
+ if (nome.value.trim() !== "") this.validarCampo("nome");
984
893
  });
894
+ nome.addEventListener("input", () => this.limparErro("name"));
985
895
  this.container.querySelector("#ilibras-consent").addEventListener("change", () => this.limparErro("consent"));
986
896
  this.form.addEventListener("submit", (e) => this.handleSubmit(e, "fila"));
987
897
  if (this.agendar) {
@@ -1001,28 +911,6 @@
1001
911
  primeiro.focus();
1002
912
  }
1003
913
  }
1004
- setupInputMasks() {
1005
- const cpfInput = this.container.querySelector("#ilibras-cpf");
1006
- const phoneInput = this.container.querySelector("#ilibras-phone");
1007
- cpfInput.addEventListener("input", (e) => {
1008
- let value = e.target.value.replace(/\D/g, "").slice(0, 11);
1009
- value = value.replace(/(\d{3})(\d)/, "$1.$2");
1010
- value = value.replace(/(\d{3})(\d)/, "$1.$2");
1011
- value = value.replace(/(\d{3})(\d{1,2})$/, "$1-$2");
1012
- e.target.value = value;
1013
- });
1014
- phoneInput.addEventListener("input", (e) => {
1015
- let value = e.target.value.replace(/\D/g, "").slice(0, 11);
1016
- if (value.length <= 10) {
1017
- value = value.replace(/(\d{2})(\d)/, "($1) $2");
1018
- value = value.replace(/(\d{4})(\d)/, "$1-$2");
1019
- } else {
1020
- value = value.replace(/(\d{2})(\d)/, "($1) $2");
1021
- value = value.replace(/(\d{5})(\d)/, "$1-$2");
1022
- }
1023
- e.target.value = value;
1024
- });
1025
- }
1026
914
  toggleWidget() {
1027
915
  if (this.isOpen) this.closeWidget();
1028
916
  else this.openWidget();
@@ -1057,8 +945,6 @@
1057
945
  valores() {
1058
946
  return {
1059
947
  nome: this.container.querySelector("#ilibras-name").value.trim().replace(/\s+/g, " "),
1060
- cpf: this.container.querySelector("#ilibras-cpf").value.replace(/\D/g, ""),
1061
- telefone: this.container.querySelector("#ilibras-phone").value.replace(/\D/g, ""),
1062
948
  consentimento: this.container.querySelector("#ilibras-consent").checked,
1063
949
  honeypot: this.container.querySelector("#ilibras-site-url").value
1064
950
  };
@@ -1075,23 +961,6 @@
1075
961
  if (palavras.length < 2) return "Informe o nome completo (nome e sobrenome).";
1076
962
  return null;
1077
963
  }
1078
- if (campo === "cpf") {
1079
- if (!v.cpf) return "Informe seu CPF.";
1080
- if (!this.validateCPF(v.cpf)) return "CPF inválido. Verifique o número digitado.";
1081
- return null;
1082
- }
1083
- if (campo === "telefone") {
1084
- if (!v.telefone) return "Informe seu telefone com DDD.";
1085
- if (v.telefone.length < 10 || v.telefone.length > 11) {
1086
- return "O telefone deve ter DDD e 8 ou 9 dígitos.";
1087
- }
1088
- if (!DDDS.includes(parseInt(v.telefone.slice(0, 2), 10))) return "O DDD informado não existe.";
1089
- const assinante = v.telefone.slice(2);
1090
- if (/^(\d)\1+$/.test(assinante)) return "O telefone informado é inválido.";
1091
- const inicioOk = assinante.length === 9 ? assinante[0] === "9" : ["2", "3", "4", "5"].includes(assinante[0]);
1092
- if (!inicioOk) return "O telefone informado é inválido.";
1093
- return null;
1094
- }
1095
964
  if (campo === "consent" && !v.consentimento) {
1096
965
  return "É preciso aceitar para continuar.";
1097
966
  }
@@ -1099,7 +968,7 @@
1099
968
  }
1100
969
  validarCampo(campo) {
1101
970
  const erro = this.erroDoCampo(campo, this.valores());
1102
- const id = { nome: "name", cpf: "cpf", telefone: "phone", consent: "consent" }[campo];
971
+ const id = { nome: "name", consent: "consent" }[campo];
1103
972
  if (erro) this.mostrarErro(id, erro);
1104
973
  else this.limparErro(id);
1105
974
  return !erro;
@@ -1110,7 +979,7 @@
1110
979
  validarTudo() {
1111
980
  const v = this.valores();
1112
981
  let primeiroInvalido = null;
1113
- for (const [campo, id] of [["nome", "name"], ["cpf", "cpf"], ["telefone", "phone"], ["consent", "consent"]]) {
982
+ for (const [campo, id] of [["nome", "name"], ["consent", "consent"]]) {
1114
983
  const erro = this.erroDoCampo(campo, v);
1115
984
  if (erro) {
1116
985
  this.mostrarErro(id, erro);
@@ -1144,18 +1013,6 @@
1144
1013
  campo.classList.remove("ilibras-widget-invalido");
1145
1014
  }
1146
1015
  }
1147
- validateCPF(cpf) {
1148
- cpf = String(cpf).replace(/\D/g, "");
1149
- if (cpf.length !== 11 || /^(\d)\1{10}$/.test(cpf)) return false;
1150
- for (let t = 9; t < 11; t++) {
1151
- let soma = 0;
1152
- for (let i = 0; i < t; i++) soma += parseInt(cpf[i], 10) * (t + 1 - i);
1153
- const resto = soma % 11;
1154
- const digito = resto < 2 ? 0 : 11 - resto;
1155
- if (parseInt(cpf[t], 10) !== digito) return false;
1156
- }
1157
- return true;
1158
- }
1159
1016
  // ─── Avisos ─────────────────────────────────────────────────────────────
1160
1017
  mostrarAviso(mensagem, { fallback = false } = {}) {
1161
1018
  this.aviso.innerHTML = "";
@@ -1239,8 +1096,6 @@
1239
1096
  const v = this.valores();
1240
1097
  const corpo = new FormData();
1241
1098
  corpo.append("nome", v.nome);
1242
- corpo.append("cpf", v.cpf);
1243
- corpo.append("telefone", v.telefone);
1244
1099
  corpo.append("site_url", v.honeypot);
1245
1100
  corpo.append("iniciado_em", String(this.abertoEm || Date.now()));
1246
1101
  corpo.append("modo", modo);
@@ -1250,8 +1105,12 @@
1250
1105
  const destino = resultado.link_fila || resultado.link || resultado.url || resultado.redirect;
1251
1106
  if (!destino) throw new FalhaDeServico("resposta_inesperada");
1252
1107
  this.anunciar(modo === "agendamento" ? "Cadastro feito. Abrindo o calendário para escolher data e horário." : "Atendimento criado. Abrindo a sala de atendimento.");
1253
- const aba = window.open(destino, "_blank", "noopener");
1254
- if (!aba) window.location.assign(destino);
1108
+ const aba = window.open(destino, "_blank");
1109
+ if (aba) {
1110
+ aba.opener = null;
1111
+ } else {
1112
+ window.location.assign(destino);
1113
+ }
1255
1114
  this.form.reset();
1256
1115
  this.closeWidget();
1257
1116
  } catch (erro) {
@@ -1341,7 +1200,7 @@
1341
1200
  tratarFalha(erro) {
1342
1201
  const tipo = erro instanceof FalhaDeServico ? erro.tipo : "desconhecido";
1343
1202
  if (tipo === "validacao" && erro.detalhe.erros) {
1344
- const mapa = { nome: "name", cpf: "cpf", telefone: "phone" };
1203
+ const mapa = { nome: "name" };
1345
1204
  let primeiro = null;
1346
1205
  for (const [campo, mensagens2] of Object.entries(erro.detalhe.erros)) {
1347
1206
  const id = mapa[campo];