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
  *
@@ -53,28 +53,28 @@ var CSS = `/**
53
53
  }
54
54
 
55
55
  /* Posicionamento */
56
- .ilibras-widget-bottom-right {
56
+ #ilibras-widget-container .ilibras-widget-bottom-right {
57
57
  bottom: 30px;
58
58
  right: 30px;
59
59
  }
60
60
 
61
- .ilibras-widget-bottom-left {
61
+ #ilibras-widget-container .ilibras-widget-bottom-left {
62
62
  bottom: 30px;
63
63
  left: 30px;
64
64
  }
65
65
 
66
- .ilibras-widget-top-right {
66
+ #ilibras-widget-container .ilibras-widget-top-right {
67
67
  top: 30px;
68
68
  right: 30px;
69
69
  }
70
70
 
71
- .ilibras-widget-top-left {
71
+ #ilibras-widget-container .ilibras-widget-top-left {
72
72
  top: 30px;
73
73
  left: 30px;
74
74
  }
75
75
 
76
76
  /* Botão flutuante (apenas ícone) */
77
- .ilibras-widget-button {
77
+ #ilibras-widget-container .ilibras-widget-button {
78
78
  position: relative;
79
79
  border: none;
80
80
  font: inherit;
@@ -96,23 +96,23 @@ var CSS = `/**
96
96
  z-index: 10001;
97
97
  }
98
98
 
99
- .ilibras-widget-button img {
99
+ #ilibras-widget-container .ilibras-widget-button img {
100
100
  width: 64px;
101
101
  height: 64px;
102
102
  }
103
103
 
104
104
  .ilibras-widget-button:hover,
105
- .ilibras-widget-button:active {
105
+ #ilibras-widget-container .ilibras-widget-button:active {
106
106
  transform: none;
107
107
  box-shadow: none;
108
108
  }
109
109
 
110
- .ilibras-widget-button svg {
110
+ #ilibras-widget-container .ilibras-widget-button svg {
111
111
  filter: none;
112
112
  }
113
113
 
114
114
  /* Badge de notificação */
115
- .ilibras-widget-badge {
115
+ #ilibras-widget-container .ilibras-widget-badge {
116
116
  position: absolute;
117
117
  top: -2px;
118
118
  right: -2px;
@@ -140,7 +140,7 @@ var CSS = `/**
140
140
  }
141
141
 
142
142
  /* Modal */
143
- .ilibras-widget-modal {
143
+ #ilibras-widget-container .ilibras-widget-modal {
144
144
  position: fixed;
145
145
  /* responsivo ao tamanho do monitor */
146
146
  width: clamp(320px, 26vw, 480px);
@@ -157,7 +157,7 @@ var CSS = `/**
157
157
  overflow: hidden;
158
158
  }
159
159
 
160
- .ilibras-widget-modal-open {
160
+ #ilibras-widget-container .ilibras-widget-modal-open {
161
161
  opacity: 1;
162
162
  visibility: visible;
163
163
  transform: translateY(0) scale(1);
@@ -165,26 +165,26 @@ var CSS = `/**
165
165
 
166
166
  /* Posicionamento do modal baseado na posição do botão */
167
167
  .ilibras-widget-bottom-right .ilibras-widget-modal,
168
- .ilibras-widget-bottom-left .ilibras-widget-modal {
168
+ #ilibras-widget-container .ilibras-widget-bottom-left .ilibras-widget-modal {
169
169
  bottom: 105px;
170
170
  }
171
171
 
172
172
  .ilibras-widget-top-right .ilibras-widget-modal,
173
- .ilibras-widget-top-left .ilibras-widget-modal {
173
+ #ilibras-widget-container .ilibras-widget-top-left .ilibras-widget-modal {
174
174
  top: 105px;
175
175
  }
176
176
 
177
177
  .ilibras-widget-bottom-right .ilibras-widget-modal,
178
- .ilibras-widget-top-right .ilibras-widget-modal {
178
+ #ilibras-widget-container .ilibras-widget-top-right .ilibras-widget-modal {
179
179
  right: 0;
180
180
  }
181
181
 
182
182
  .ilibras-widget-bottom-left .ilibras-widget-modal,
183
- .ilibras-widget-top-left .ilibras-widget-modal {
183
+ #ilibras-widget-container .ilibras-widget-top-left .ilibras-widget-modal {
184
184
  left: 0;
185
185
  }
186
186
 
187
- .ilibras-widget-header {
187
+ #ilibras-widget-container .ilibras-widget-header {
188
188
  background: white;
189
189
  padding: 14px 24px;
190
190
  display: flex;
@@ -195,18 +195,18 @@ var CSS = `/**
195
195
  border-bottom: 2px solid rgba(53,122,189,0.06);
196
196
  }
197
197
 
198
- .ilibras-widget-header-content {
198
+ #ilibras-widget-container .ilibras-widget-header-content {
199
199
  display: flex;
200
200
  align-items: center;
201
201
  gap: 16px;
202
202
  flex: 1;
203
203
  }
204
204
 
205
- .ilibras-widget-logo {
205
+ #ilibras-widget-container .ilibras-widget-logo {
206
206
  display: none !important;
207
207
  }
208
208
 
209
- .ilibras-widget-title {
209
+ #ilibras-widget-container .ilibras-widget-title {
210
210
  padding-left: 0;
211
211
  font-size: 17px;
212
212
  font-weight: 700;
@@ -214,7 +214,7 @@ var CSS = `/**
214
214
  color: #1f4f7a;
215
215
  }
216
216
 
217
- .ilibras-widget-close {
217
+ #ilibras-widget-container .ilibras-widget-close {
218
218
  background: transparent;
219
219
  border: none;
220
220
  cursor: pointer;
@@ -229,22 +229,22 @@ var CSS = `/**
229
229
  flex-shrink: 0;
230
230
  }
231
231
 
232
- .ilibras-widget-close:hover {
232
+ #ilibras-widget-container .ilibras-widget-close:hover {
233
233
  background: rgba(53,122,189,0.08);
234
234
  transform: translateY(-1px);
235
235
  }
236
236
 
237
- .ilibras-widget-close:active {
237
+ #ilibras-widget-container .ilibras-widget-close:active {
238
238
  background: rgba(53,122,189,0.12);
239
239
  }
240
240
 
241
241
  /* Body do modal */
242
- .ilibras-widget-body {
242
+ #ilibras-widget-container .ilibras-widget-body {
243
243
  padding: 20px !important;
244
244
  background: white; /* fundo branco do widget */
245
245
  }
246
246
 
247
- .ilibras-widget-message {
247
+ #ilibras-widget-container .ilibras-widget-message {
248
248
  background: rgba(74,144,226,0.06); /* leve tom da cor da logo */
249
249
  border-radius: 14px;
250
250
  border: 1px solid rgba(74,144,226,0.08);
@@ -255,19 +255,19 @@ var CSS = `/**
255
255
  }
256
256
 
257
257
  /* Formulário */
258
- .ilibras-widget-form {
258
+ #ilibras-widget-container .ilibras-widget-form {
259
259
  display: flex;
260
260
  flex-direction: column;
261
261
  gap: 20px;
262
262
  }
263
263
 
264
- .ilibras-widget-form-group {
264
+ #ilibras-widget-container .ilibras-widget-form-group {
265
265
  display: flex;
266
266
  flex-direction: column;
267
267
  gap: 8px;
268
268
  }
269
269
 
270
- .ilibras-widget-form-group label {
270
+ #ilibras-widget-container .ilibras-widget-form-group label {
271
271
  font-size: 13px;
272
272
  font-weight: 500;
273
273
  color: #495057;
@@ -275,7 +275,7 @@ var CSS = `/**
275
275
  }
276
276
 
277
277
  .ilibras-widget-form-group input[type="text"],
278
- .ilibras-widget-form-group input[type="tel"] {
278
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"] {
279
279
  background: #ffffff;
280
280
  border: 1px solid rgba(20,30,45,0.06);
281
281
  padding: 12px 14px !important;
@@ -284,7 +284,7 @@ var CSS = `/**
284
284
  }
285
285
 
286
286
  .ilibras-widget-form-group input[type="text"]:focus,
287
- .ilibras-widget-form-group input[type="tel"]:focus {
287
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"]:focus {
288
288
  background: white;
289
289
  border-color: #357ABD;
290
290
  box-shadow: 0 6px 18px rgba(53,122,189,0.08);
@@ -292,12 +292,12 @@ var CSS = `/**
292
292
  }
293
293
 
294
294
  .ilibras-widget-form-group input[type="text"]::placeholder,
295
- .ilibras-widget-form-group input[type="tel"]::placeholder {
295
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"]::placeholder {
296
296
  color: #6c757d;
297
297
  }
298
298
 
299
299
  /* Checkbox customizado */
300
- .ilibras-widget-checkbox-label {
300
+ #ilibras-widget-container .ilibras-widget-checkbox-label {
301
301
  display: flex;
302
302
  align-items: flex-start;
303
303
  gap: 10px;
@@ -309,7 +309,7 @@ var CSS = `/**
309
309
  line-height: 1.4;
310
310
  }
311
311
 
312
- .ilibras-widget-checkbox-label input[type="checkbox"] {
312
+ #ilibras-widget-container .ilibras-widget-checkbox-label input[type="checkbox"] {
313
313
  margin-top: 2px;
314
314
  width: 18px;
315
315
  height: 18px;
@@ -317,13 +317,13 @@ var CSS = `/**
317
317
  accent-color: #357ABD;
318
318
  }
319
319
 
320
- .ilibras-widget-checkbox-label span {
320
+ #ilibras-widget-container .ilibras-widget-checkbox-label span {
321
321
  flex: 1;
322
322
  }
323
323
 
324
324
  /* Botão de submit */
325
325
 
326
- .ilibras-widget-submit {
326
+ #ilibras-widget-container .ilibras-widget-submit {
327
327
  padding: 12px 14px !important;
328
328
  border-radius: 10px;
329
329
  font-size: 15px;
@@ -336,17 +336,17 @@ var CSS = `/**
336
336
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.12s;
337
337
  }
338
338
 
339
- .ilibras-widget-submit:hover {
339
+ #ilibras-widget-container .ilibras-widget-submit:hover {
340
340
  transform: translateY(-2px);
341
341
  box-shadow: 0 8px 22px rgba(53,122,189,0.18);
342
342
  }
343
343
 
344
- .ilibras-widget-submit:active {
344
+ #ilibras-widget-container .ilibras-widget-submit:active {
345
345
  transform: translateY(0);
346
346
  box-shadow: 0 4px 10px rgba(53,122,189,0.12);
347
347
  }
348
348
 
349
- .ilibras-widget-submit:disabled {
349
+ #ilibras-widget-container .ilibras-widget-submit:disabled {
350
350
  opacity: 0.6;
351
351
  cursor: not-allowed;
352
352
  transform: none;
@@ -355,7 +355,7 @@ var CSS = `/**
355
355
  /* Agendar é a segunda escolha, não a concorrente: contorno em vez de preenchido,
356
356
  para a hierarquia entre "agora" e "depois" ficar visível antes da leitura. O
357
357
  form tem gap de 20px; as margens negativas colam o botão na dica que o explica. */
358
- .ilibras-widget-agendar {
358
+ #ilibras-widget-container .ilibras-widget-agendar {
359
359
  padding: 11px 14px !important;
360
360
  border-radius: 10px;
361
361
  font-size: 15px;
@@ -369,73 +369,73 @@ var CSS = `/**
369
369
  margin-top: -8px;
370
370
  }
371
371
 
372
- .ilibras-widget-agendar:hover:not(:disabled) {
372
+ #ilibras-widget-container .ilibras-widget-agendar:hover:not(:disabled) {
373
373
  background: #F2F7FD;
374
374
  border-color: #357ABD;
375
375
  }
376
376
 
377
- .ilibras-widget-agendar:disabled {
377
+ #ilibras-widget-container .ilibras-widget-agendar:disabled {
378
378
  opacity: 0.6;
379
379
  cursor: not-allowed;
380
380
  }
381
381
 
382
- .ilibras-widget-dica-agendar {
382
+ #ilibras-widget-container .ilibras-widget-dica-agendar {
383
383
  margin-top: -14px;
384
384
  text-align: center;
385
385
  }
386
386
 
387
387
  /* Responsividade */
388
388
  @media (max-width: 480px) {
389
- .ilibras-widget-modal {
389
+ #ilibras-widget-container .ilibras-widget-modal {
390
390
  width: calc(100vw - 40px);
391
391
  max-width: 100%;
392
392
  }
393
393
 
394
394
  .ilibras-widget-bottom-right,
395
- .ilibras-widget-bottom-left {
395
+ #ilibras-widget-container .ilibras-widget-bottom-left {
396
396
  bottom: 20px;
397
397
  left: 20px !important;
398
398
  right: 20px !important;
399
399
  }
400
400
 
401
401
  .ilibras-widget-top-right,
402
- .ilibras-widget-top-left {
402
+ #ilibras-widget-container .ilibras-widget-top-left {
403
403
  top: 20px;
404
404
  left: 20px !important;
405
405
  right: 20px !important;
406
406
  }
407
407
 
408
- .ilibras-widget-button {
408
+ #ilibras-widget-container .ilibras-widget-button {
409
409
  width: 64px;
410
410
  height: 64px;
411
411
  }
412
412
 
413
- .ilibras-widget-button svg {
413
+ #ilibras-widget-container .ilibras-widget-button svg {
414
414
  width: 32px;
415
415
  height: 32px;
416
416
  }
417
417
 
418
- .ilibras-widget-modal {
418
+ #ilibras-widget-container .ilibras-widget-modal {
419
419
  bottom: 94px !important;
420
420
  right: 0 !important;
421
421
  left: 0 !important;
422
422
  margin: 0 20px;
423
423
  }
424
424
 
425
- .ilibras-widget-body {
425
+ #ilibras-widget-container .ilibras-widget-body {
426
426
  padding: 18px 16px;
427
427
  }
428
428
  }
429
429
 
430
430
  @media (min-width: 1600px) {
431
- .ilibras-widget-modal {
431
+ #ilibras-widget-container .ilibras-widget-modal {
432
432
  width: clamp(360px, 20vw, 560px);
433
433
  }
434
434
  }
435
435
 
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 rgba(53,122,189,0.18);
440
440
  outline-offset: 3px;
441
441
  }
@@ -461,43 +461,43 @@ var CSS = `/**
461
461
  /* Accessibilidade */
462
462
  .ilibras-widget-button:focus-visible,
463
463
  .ilibras-widget-close:focus-visible,
464
- .ilibras-widget-submit:focus-visible {
464
+ #ilibras-widget-container .ilibras-widget-submit:focus-visible {
465
465
  outline: 3px solid #4A90E2;
466
466
  outline-offset: 2px;
467
467
  }
468
468
 
469
469
  /* Tema escuro (opcional) */
470
470
  @media (prefers-color-scheme: dark) {
471
- .ilibras-widget-modal {
471
+ #ilibras-widget-container .ilibras-widget-modal {
472
472
  background: #1e1e1e;
473
473
  }
474
474
 
475
- .ilibras-widget-body {
475
+ #ilibras-widget-container .ilibras-widget-body {
476
476
  background: #2d2d2d;
477
477
  }
478
478
 
479
- .ilibras-widget-message {
479
+ #ilibras-widget-container .ilibras-widget-message {
480
480
  background: #363636;
481
481
  color: #e0e0e0;
482
482
  }
483
483
 
484
- .ilibras-widget-form-group label {
484
+ #ilibras-widget-container .ilibras-widget-form-group label {
485
485
  color: #b0b0b0;
486
486
  }
487
487
 
488
488
  .ilibras-widget-form-group input[type="text"],
489
- .ilibras-widget-form-group input[type="tel"] {
489
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"] {
490
490
  background: #363636;
491
491
  border-color: #4a4a4a;
492
492
  color: #e0e0e0;
493
493
  }
494
494
 
495
495
  .ilibras-widget-form-group input[type="text"]::placeholder,
496
- .ilibras-widget-form-group input[type="tel"]::placeholder {
496
+ #ilibras-widget-container .ilibras-widget-form-group input[type="tel"]::placeholder {
497
497
  color: #6c6c6c;
498
498
  }
499
499
 
500
- .ilibras-widget-checkbox-label {
500
+ #ilibras-widget-container .ilibras-widget-checkbox-label {
501
501
  color: #b0b0b0;
502
502
  }
503
503
  }
@@ -511,7 +511,7 @@ var CSS = `/**
511
511
 
512
512
  /* Visível só para leitor de tela. Não usa display:none — o que some da tela
513
513
  dessa forma some também da leitura. */
514
- .ilibras-widget-sr-only {
514
+ #ilibras-widget-container .ilibras-widget-sr-only {
515
515
  position: absolute !important;
516
516
  width: 1px;
517
517
  height: 1px;
@@ -525,7 +525,7 @@ var CSS = `/**
525
525
 
526
526
  /* Armadilha do anti-robô: fora da tela e fora da leitura, mas presente no DOM
527
527
  (bot que ignora display:none continua encontrando e preenchendo). */
528
- .ilibras-widget-hp {
528
+ #ilibras-widget-container .ilibras-widget-hp {
529
529
  position: absolute !important;
530
530
  left: -9999px;
531
531
  top: auto;
@@ -536,23 +536,23 @@ var CSS = `/**
536
536
 
537
537
  /* O diálogo fechado não pode receber foco: com hidden, nada dentro dele entra
538
538
  na ordem de tabulação. */
539
- .ilibras-widget-modal[hidden] {
539
+ #ilibras-widget-container .ilibras-widget-modal[hidden] {
540
540
  display: none !important;
541
541
  }
542
542
 
543
- .ilibras-widget-legenda {
543
+ #ilibras-widget-container .ilibras-widget-legenda {
544
544
  font-size: 12px;
545
545
  color: #495057;
546
546
  margin: 0 0 -8px 4px;
547
547
  }
548
548
 
549
- .ilibras-widget-dica {
549
+ #ilibras-widget-container .ilibras-widget-dica {
550
550
  font-size: 12px;
551
551
  color: #495057;
552
552
  padding-left: 4px;
553
553
  }
554
554
 
555
- .ilibras-widget-erro {
555
+ #ilibras-widget-container .ilibras-widget-erro {
556
556
  font-size: 13px;
557
557
  font-weight: 500;
558
558
  color: #b02a37;
@@ -564,23 +564,23 @@ var CSS = `/**
564
564
 
565
565
  /* A cor não pode ser o único sinal de erro: quem não distingue vermelho
566
566
  precisa do símbolo e do texto. */
567
- .ilibras-widget-erro::before {
567
+ #ilibras-widget-container .ilibras-widget-erro::before {
568
568
  content: "\\26A0";
569
569
  font-size: 13px;
570
570
  line-height: 1.3;
571
571
  }
572
572
 
573
- .ilibras-widget-erro[hidden] {
573
+ #ilibras-widget-container .ilibras-widget-erro[hidden] {
574
574
  display: none;
575
575
  }
576
576
 
577
- .ilibras-widget-form-group input.ilibras-widget-invalido {
577
+ #ilibras-widget-container .ilibras-widget-form-group input.ilibras-widget-invalido {
578
578
  border-color: #b02a37;
579
579
  border-width: 2px;
580
580
  }
581
581
 
582
582
  /* Aviso de falha de serviço / limite de uso. */
583
- .ilibras-widget-aviso {
583
+ #ilibras-widget-container .ilibras-widget-aviso {
584
584
  background: #fdf2f2;
585
585
  border: 1px solid #f0c2c2;
586
586
  border-left: 4px solid #b02a37;
@@ -592,47 +592,47 @@ var CSS = `/**
592
592
  line-height: 1.5;
593
593
  }
594
594
 
595
- .ilibras-widget-aviso[hidden] {
595
+ #ilibras-widget-container .ilibras-widget-aviso[hidden] {
596
596
  display: none;
597
597
  }
598
598
 
599
- .ilibras-widget-aviso:focus-visible {
599
+ #ilibras-widget-container .ilibras-widget-aviso:focus-visible {
600
600
  outline: 3px solid #b02a37;
601
601
  outline-offset: 2px;
602
602
  }
603
603
 
604
- .ilibras-widget-aviso-texto {
604
+ #ilibras-widget-container .ilibras-widget-aviso-texto {
605
605
  margin: 0;
606
606
  }
607
607
 
608
608
  /* Plano de contingência: aparece quando a API não responde. */
609
- .ilibras-widget-fallback {
609
+ #ilibras-widget-container .ilibras-widget-fallback {
610
610
  margin-top: 10px;
611
611
  padding-top: 10px;
612
612
  border-top: 1px solid #f0c2c2;
613
613
  font-size: 13px;
614
614
  }
615
615
 
616
- .ilibras-widget-fallback p {
616
+ #ilibras-widget-container .ilibras-widget-fallback p {
617
617
  margin: 0 0 6px;
618
618
  }
619
619
 
620
- .ilibras-widget-fallback ul {
620
+ #ilibras-widget-container .ilibras-widget-fallback ul {
621
621
  margin: 0;
622
622
  padding-left: 18px;
623
623
  list-style: disc;
624
624
  }
625
625
 
626
- .ilibras-widget-fallback li {
626
+ #ilibras-widget-container .ilibras-widget-fallback li {
627
627
  margin: 2px 0;
628
628
  }
629
629
 
630
- .ilibras-widget-fallback a {
630
+ #ilibras-widget-container .ilibras-widget-fallback a {
631
631
  color: #1f4f7a;
632
632
  font-weight: 600;
633
633
  }
634
634
 
635
- .ilibras-widget-status {
635
+ #ilibras-widget-container .ilibras-widget-status {
636
636
  font-size: 13px;
637
637
  color: #495057;
638
638
  margin: 0;
@@ -646,7 +646,7 @@ var CSS = `/**
646
646
  .ilibras-widget-submit:focus-visible,
647
647
  .ilibras-widget-form-group input:focus-visible,
648
648
  .ilibras-widget-checkbox-label input:focus-visible,
649
- .ilibras-widget-fallback a:focus-visible {
649
+ #ilibras-widget-container .ilibras-widget-fallback a:focus-visible {
650
650
  outline: 3px solid #1f4f7a;
651
651
  outline-offset: 2px;
652
652
  }
@@ -657,14 +657,14 @@ var CSS = `/**
657
657
  .ilibras-widget-modal,
658
658
  .ilibras-widget-form-group input,
659
659
  .ilibras-widget-submit,
660
- .ilibras-widget-aviso {
660
+ #ilibras-widget-container .ilibras-widget-aviso {
661
661
  border: 1px solid CanvasText;
662
662
  }
663
663
 
664
664
  .ilibras-widget-button:focus-visible,
665
665
  .ilibras-widget-close:focus-visible,
666
666
  .ilibras-widget-submit:focus-visible,
667
- .ilibras-widget-form-group input:focus-visible {
667
+ #ilibras-widget-container .ilibras-widget-form-group input:focus-visible {
668
668
  outline: 3px solid Highlight;
669
669
  }
670
670
  }
@@ -676,13 +676,13 @@ var CSS = `/**
676
676
  .ilibras-widget-modal,
677
677
  .ilibras-widget-submit,
678
678
  .ilibras-widget-close,
679
- .ilibras-widget-badge {
679
+ #ilibras-widget-container .ilibras-widget-badge {
680
680
  animation: none !important;
681
681
  transition: none !important;
682
682
  }
683
683
 
684
684
  .ilibras-widget-submit:hover,
685
- .ilibras-widget-close:hover {
685
+ #ilibras-widget-container .ilibras-widget-close:hover {
686
686
  transform: none;
687
687
  }
688
688
  }
@@ -690,44 +690,44 @@ var CSS = `/**
690
690
  @media (prefers-color-scheme: dark) {
691
691
  .ilibras-widget-legenda,
692
692
  .ilibras-widget-dica,
693
- .ilibras-widget-status {
693
+ #ilibras-widget-container .ilibras-widget-status {
694
694
  color: #c9c9c9;
695
695
  }
696
696
 
697
- .ilibras-widget-erro {
697
+ #ilibras-widget-container .ilibras-widget-erro {
698
698
  color: #ff9aa2;
699
699
  }
700
700
 
701
- .ilibras-widget-form-group input.ilibras-widget-invalido {
701
+ #ilibras-widget-container .ilibras-widget-form-group input.ilibras-widget-invalido {
702
702
  border-color: #ff9aa2;
703
703
  }
704
704
 
705
- .ilibras-widget-aviso {
705
+ #ilibras-widget-container .ilibras-widget-aviso {
706
706
  background: #3a2224;
707
707
  border-color: #6b3a3f;
708
708
  border-left-color: #ff9aa2;
709
709
  color: #ffd9dc;
710
710
  }
711
711
 
712
- .ilibras-widget-fallback {
712
+ #ilibras-widget-container .ilibras-widget-fallback {
713
713
  border-top-color: #6b3a3f;
714
714
  }
715
715
 
716
- .ilibras-widget-fallback a {
716
+ #ilibras-widget-container .ilibras-widget-fallback a {
717
717
  color: #9ecbff;
718
718
  }
719
719
 
720
- .ilibras-widget-title {
720
+ #ilibras-widget-container .ilibras-widget-title {
721
721
  color: #e6f0f8;
722
722
  }
723
723
 
724
- .ilibras-widget-header {
724
+ #ilibras-widget-container .ilibras-widget-header {
725
725
  background: #1e1e1e;
726
726
  border-left-color: #333;
727
727
  border-bottom-color: #333;
728
728
  }
729
729
 
730
- .ilibras-widget-close {
730
+ #ilibras-widget-container .ilibras-widget-close {
731
731
  color: #e0e0e0;
732
732
  }
733
733
  }
@@ -766,75 +766,6 @@ var defaultConfig = {
766
766
  texto: ""
767
767
  }
768
768
  };
769
- var DDDS = [
770
- 11,
771
- 12,
772
- 13,
773
- 14,
774
- 15,
775
- 16,
776
- 17,
777
- 18,
778
- 19,
779
- 21,
780
- 22,
781
- 24,
782
- 27,
783
- 28,
784
- 31,
785
- 32,
786
- 33,
787
- 34,
788
- 35,
789
- 37,
790
- 38,
791
- 41,
792
- 42,
793
- 43,
794
- 44,
795
- 45,
796
- 46,
797
- 47,
798
- 48,
799
- 49,
800
- 51,
801
- 53,
802
- 54,
803
- 55,
804
- 61,
805
- 62,
806
- 63,
807
- 64,
808
- 65,
809
- 66,
810
- 67,
811
- 68,
812
- 69,
813
- 71,
814
- 73,
815
- 74,
816
- 75,
817
- 77,
818
- 79,
819
- 81,
820
- 82,
821
- 83,
822
- 84,
823
- 85,
824
- 86,
825
- 87,
826
- 88,
827
- 89,
828
- 91,
829
- 92,
830
- 93,
831
- 94,
832
- 95,
833
- 96,
834
- 97,
835
- 98,
836
- 99
837
- ];
838
769
  var FOCAVEIS = 'a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
839
770
  var ILibrasWidget = class {
840
771
  constructor(config = {}) {
@@ -917,24 +848,6 @@ var ILibrasWidget = class {
917
848
  <span class="ilibras-widget-erro" id="ilibras-name-erro" hidden></span>
918
849
  </div>
919
850
 
920
- <div class="ilibras-widget-form-group">
921
- <label for="ilibras-cpf">CPF <span aria-hidden="true">*</span></label>
922
- <input type="text" id="ilibras-cpf" name="cpf" placeholder="000.000.000-00"
923
- required aria-required="true" maxlength="14" autocomplete="off"
924
- inputmode="numeric" aria-describedby="ilibras-cpf-dica ilibras-cpf-erro" />
925
- <span class="ilibras-widget-dica" id="ilibras-cpf-dica">Somente números.</span>
926
- <span class="ilibras-widget-erro" id="ilibras-cpf-erro" hidden></span>
927
- </div>
928
-
929
- <div class="ilibras-widget-form-group">
930
- <label for="ilibras-phone">Telefone <span aria-hidden="true">*</span></label>
931
- <input type="tel" id="ilibras-phone" name="phone" placeholder="(00) 00000-0000"
932
- required aria-required="true" maxlength="15" autocomplete="tel"
933
- inputmode="numeric" aria-describedby="ilibras-phone-dica ilibras-phone-erro" />
934
- <span class="ilibras-widget-dica" id="ilibras-phone-dica">Com DDD. Ex.: (11) 98765-4321.</span>
935
- <span class="ilibras-widget-erro" id="ilibras-phone-erro" hidden></span>
936
- </div>
937
-
938
851
  <div class="ilibras-widget-form-group">
939
852
  <label for="ilibras-consent" class="ilibras-widget-checkbox-label">
940
853
  <input type="checkbox" id="ilibras-consent" name="consent" required aria-required="true"
@@ -1000,14 +913,11 @@ var ILibrasWidget = class {
1000
913
  }
1001
914
  if (e.key === "Tab") this.prenderFoco(e);
1002
915
  });
1003
- this.setupInputMasks();
1004
- [["name", "nome"], ["cpf", "cpf"], ["phone", "telefone"]].forEach(([id, campo]) => {
1005
- const input = this.container.querySelector("#ilibras-" + id);
1006
- input.addEventListener("blur", () => {
1007
- if (input.value.trim() !== "") this.validarCampo(campo);
1008
- });
1009
- input.addEventListener("input", () => this.limparErro(id));
916
+ const nome = this.container.querySelector("#ilibras-name");
917
+ nome.addEventListener("blur", () => {
918
+ if (nome.value.trim() !== "") this.validarCampo("nome");
1010
919
  });
920
+ nome.addEventListener("input", () => this.limparErro("name"));
1011
921
  this.container.querySelector("#ilibras-consent").addEventListener("change", () => this.limparErro("consent"));
1012
922
  this.form.addEventListener("submit", (e) => this.handleSubmit(e, "fila"));
1013
923
  if (this.agendar) {
@@ -1027,28 +937,6 @@ var ILibrasWidget = class {
1027
937
  primeiro.focus();
1028
938
  }
1029
939
  }
1030
- setupInputMasks() {
1031
- const cpfInput = this.container.querySelector("#ilibras-cpf");
1032
- const phoneInput = this.container.querySelector("#ilibras-phone");
1033
- cpfInput.addEventListener("input", (e) => {
1034
- let value = e.target.value.replace(/\D/g, "").slice(0, 11);
1035
- value = value.replace(/(\d{3})(\d)/, "$1.$2");
1036
- value = value.replace(/(\d{3})(\d)/, "$1.$2");
1037
- value = value.replace(/(\d{3})(\d{1,2})$/, "$1-$2");
1038
- e.target.value = value;
1039
- });
1040
- phoneInput.addEventListener("input", (e) => {
1041
- let value = e.target.value.replace(/\D/g, "").slice(0, 11);
1042
- if (value.length <= 10) {
1043
- value = value.replace(/(\d{2})(\d)/, "($1) $2");
1044
- value = value.replace(/(\d{4})(\d)/, "$1-$2");
1045
- } else {
1046
- value = value.replace(/(\d{2})(\d)/, "($1) $2");
1047
- value = value.replace(/(\d{5})(\d)/, "$1-$2");
1048
- }
1049
- e.target.value = value;
1050
- });
1051
- }
1052
940
  toggleWidget() {
1053
941
  if (this.isOpen) this.closeWidget();
1054
942
  else this.openWidget();
@@ -1083,8 +971,6 @@ var ILibrasWidget = class {
1083
971
  valores() {
1084
972
  return {
1085
973
  nome: this.container.querySelector("#ilibras-name").value.trim().replace(/\s+/g, " "),
1086
- cpf: this.container.querySelector("#ilibras-cpf").value.replace(/\D/g, ""),
1087
- telefone: this.container.querySelector("#ilibras-phone").value.replace(/\D/g, ""),
1088
974
  consentimento: this.container.querySelector("#ilibras-consent").checked,
1089
975
  honeypot: this.container.querySelector("#ilibras-site-url").value
1090
976
  };
@@ -1101,23 +987,6 @@ var ILibrasWidget = class {
1101
987
  if (palavras.length < 2) return "Informe o nome completo (nome e sobrenome).";
1102
988
  return null;
1103
989
  }
1104
- if (campo === "cpf") {
1105
- if (!v.cpf) return "Informe seu CPF.";
1106
- if (!this.validateCPF(v.cpf)) return "CPF inválido. Verifique o número digitado.";
1107
- return null;
1108
- }
1109
- if (campo === "telefone") {
1110
- if (!v.telefone) return "Informe seu telefone com DDD.";
1111
- if (v.telefone.length < 10 || v.telefone.length > 11) {
1112
- return "O telefone deve ter DDD e 8 ou 9 dígitos.";
1113
- }
1114
- if (!DDDS.includes(parseInt(v.telefone.slice(0, 2), 10))) return "O DDD informado não existe.";
1115
- const assinante = v.telefone.slice(2);
1116
- if (/^(\d)\1+$/.test(assinante)) return "O telefone informado é inválido.";
1117
- const inicioOk = assinante.length === 9 ? assinante[0] === "9" : ["2", "3", "4", "5"].includes(assinante[0]);
1118
- if (!inicioOk) return "O telefone informado é inválido.";
1119
- return null;
1120
- }
1121
990
  if (campo === "consent" && !v.consentimento) {
1122
991
  return "É preciso aceitar para continuar.";
1123
992
  }
@@ -1125,7 +994,7 @@ var ILibrasWidget = class {
1125
994
  }
1126
995
  validarCampo(campo) {
1127
996
  const erro = this.erroDoCampo(campo, this.valores());
1128
- const id = { nome: "name", cpf: "cpf", telefone: "phone", consent: "consent" }[campo];
997
+ const id = { nome: "name", consent: "consent" }[campo];
1129
998
  if (erro) this.mostrarErro(id, erro);
1130
999
  else this.limparErro(id);
1131
1000
  return !erro;
@@ -1136,7 +1005,7 @@ var ILibrasWidget = class {
1136
1005
  validarTudo() {
1137
1006
  const v = this.valores();
1138
1007
  let primeiroInvalido = null;
1139
- for (const [campo, id] of [["nome", "name"], ["cpf", "cpf"], ["telefone", "phone"], ["consent", "consent"]]) {
1008
+ for (const [campo, id] of [["nome", "name"], ["consent", "consent"]]) {
1140
1009
  const erro = this.erroDoCampo(campo, v);
1141
1010
  if (erro) {
1142
1011
  this.mostrarErro(id, erro);
@@ -1170,18 +1039,6 @@ var ILibrasWidget = class {
1170
1039
  campo.classList.remove("ilibras-widget-invalido");
1171
1040
  }
1172
1041
  }
1173
- validateCPF(cpf) {
1174
- cpf = String(cpf).replace(/\D/g, "");
1175
- if (cpf.length !== 11 || /^(\d)\1{10}$/.test(cpf)) return false;
1176
- for (let t = 9; t < 11; t++) {
1177
- let soma = 0;
1178
- for (let i = 0; i < t; i++) soma += parseInt(cpf[i], 10) * (t + 1 - i);
1179
- const resto = soma % 11;
1180
- const digito = resto < 2 ? 0 : 11 - resto;
1181
- if (parseInt(cpf[t], 10) !== digito) return false;
1182
- }
1183
- return true;
1184
- }
1185
1042
  // ─── Avisos ─────────────────────────────────────────────────────────────
1186
1043
  mostrarAviso(mensagem, { fallback = false } = {}) {
1187
1044
  this.aviso.innerHTML = "";
@@ -1265,8 +1122,6 @@ var ILibrasWidget = class {
1265
1122
  const v = this.valores();
1266
1123
  const corpo = new FormData();
1267
1124
  corpo.append("nome", v.nome);
1268
- corpo.append("cpf", v.cpf);
1269
- corpo.append("telefone", v.telefone);
1270
1125
  corpo.append("site_url", v.honeypot);
1271
1126
  corpo.append("iniciado_em", String(this.abertoEm || Date.now()));
1272
1127
  corpo.append("modo", modo);
@@ -1276,8 +1131,12 @@ var ILibrasWidget = class {
1276
1131
  const destino = resultado.link_fila || resultado.link || resultado.url || resultado.redirect;
1277
1132
  if (!destino) throw new FalhaDeServico("resposta_inesperada");
1278
1133
  this.anunciar(modo === "agendamento" ? "Cadastro feito. Abrindo o calendário para escolher data e horário." : "Atendimento criado. Abrindo a sala de atendimento.");
1279
- const aba = window.open(destino, "_blank", "noopener");
1280
- if (!aba) window.location.assign(destino);
1134
+ const aba = window.open(destino, "_blank");
1135
+ if (aba) {
1136
+ aba.opener = null;
1137
+ } else {
1138
+ window.location.assign(destino);
1139
+ }
1281
1140
  this.form.reset();
1282
1141
  this.closeWidget();
1283
1142
  } catch (erro) {
@@ -1367,7 +1226,7 @@ var ILibrasWidget = class {
1367
1226
  tratarFalha(erro) {
1368
1227
  const tipo = erro instanceof FalhaDeServico ? erro.tipo : "desconhecido";
1369
1228
  if (tipo === "validacao" && erro.detalhe.erros) {
1370
- const mapa = { nome: "name", cpf: "cpf", telefone: "phone" };
1229
+ const mapa = { nome: "name" };
1371
1230
  let primeiro = null;
1372
1231
  for (const [campo, mensagens2] of Object.entries(erro.detalhe.erros)) {
1373
1232
  const id = mapa[campo];