@yoobic/yobi 8.3.0-47 → 8.3.0-48

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.
@@ -4296,7 +4296,7 @@ export class YooFormDynamicComponent {
4296
4296
  categories: field.categories,
4297
4297
  values: field.values,
4298
4298
  images: field.images,
4299
- answer: field.complexAnswer,
4299
+ answer: field.answer || field.complexAnswer,
4300
4300
  isVisible: this.isCurrentSlide(slideIndex),
4301
4301
  numberSteps: this.steps && this.steps.length,
4302
4302
  mode: field.swipeMode,
@@ -566,6 +566,13 @@ span.fr-img-caption.fr-view {
566
566
  margin: 5px 0 5px 5px;
567
567
  max-width: calc(100% - 5px); }
568
568
 
569
+ :host(.swipecards) .top-container {
570
+ height: 100%;
571
+ }
572
+ :host(.swipecards) .top-container .content-container {
573
+ height: 100% !important;
574
+ }
575
+
569
576
  :host(.mission) {
570
577
  background: var(--stable-10, rgba(173, 173, 173, 0.1));
571
578
  }
@@ -296,118 +296,72 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
296
296
  display: block !important;
297
297
  }
298
298
 
299
- :host {
299
+ :host(:not([readonly])) {
300
300
  position: relative;
301
301
  display: block;
302
302
  height: 100%;
303
303
  }
304
- :host yoo-banner {
304
+ :host(:not([readonly])) yoo-banner {
305
305
  height: 0;
306
306
  }
307
- :host #instructions {
307
+ :host(:not([readonly])) main {
308
+ display: grid;
308
309
  height: 100%;
309
310
  transition: opacity 1s ease-in-out;
310
311
  }
311
- :host #instructions #header {
312
- display: flex;
313
- flex-direction: column;
314
- }
315
- :host #instructions #header #title {
316
- font-weight: bold;
317
- }
318
- :host #instructions #categories {
319
- display: inline-grid;
320
- grid-template-columns: 1fr 0.5fr 1fr;
321
- width: 100%;
322
- margin: var(--spacing-24, 1.5rem) 0;
323
- text-align: center;
324
- }
325
- :host #instructions #categories .category {
326
- display: flex;
327
- flex-direction: column;
328
- height: 100%;
329
- padding: 0;
330
- color: var(--stable, #adadad);
331
- }
332
- :host #instructions #categories .category p {
333
- max-width: 75%;
334
- margin: auto;
335
- padding: var(--spacing-16, 1rem) 0;
336
- font-weight: bold;
337
- }
338
- :host #instructions #categories .category yoo-tag {
339
- margin: 0 auto;
340
- }
341
- :host #instructions yoo-button {
342
- position: absolute;
343
- right: 0;
344
- bottom: 0;
345
- z-index: 1;
346
- box-sizing: border-box;
347
- }
348
- :host #instructions #document {
349
- background-color: var(--light, #ffffff);
350
- }
351
- :host #instructions #document .document-title {
352
- padding: 0 var(--spacing-16, 1rem);
353
- font-size: var(--font-size-16, 1rem);
354
- }
355
- :host #instructions #document yoo-form-document {
356
- --outer-container-padding: cssvar(spacing-16) cssvar(spacing-16);
357
- width: calc(100% - var(--spacing-16, 1rem));
358
- }
359
- :host [direction].card {
360
- z-index: 5;
312
+ :host(:not([readonly])) [direction] .card {
361
313
  transition: transform 0.35s !important;
362
314
  transform: translate(0%, 9%) scale(1);
363
315
  opacity: 1;
364
316
  }
365
- :host [direction].card.current .content-category {
366
- color: var(--light, #ffffff);
367
- opacity: 1 !important;
368
- transition: opacity 0.35s linear;
317
+ :host(:not([readonly])) [direction] .card.current [class^=content]::after {
318
+ opacity: 0.8 !important;
369
319
  }
370
- :host [direction].card.current.card + .card {
320
+ :host(:not([readonly])) [direction] .card.current .content-text {
321
+ color: var(--stable-light, #f1f1f1);
322
+ }
323
+ :host(:not([readonly])) [direction] .card.current.card + .card {
371
324
  transform: translate(0%, 9%) scale(1);
372
325
  opacity: 1;
373
326
  }
374
- :host [direction].card.current.card + .card .content-image,
375
- :host [direction].card.current.card + .card .content-text {
327
+ :host(:not([readonly])) [direction] .card.current.card + .card .content-image,
328
+ :host(:not([readonly])) [direction] .card.current.card + .card .content-text {
376
329
  opacity: 1 !important;
377
330
  }
378
- :host [direction].card.current.card + .card + .card {
331
+ :host(:not([readonly])) [direction] .card.current.card + .card + .card {
379
332
  transform: translate(0%, 3.5%) scale(0.95);
380
333
  opacity: 1;
381
334
  }
382
- :host [direction].card.current.card + .card + .card + .card {
335
+ :host(:not([readonly])) [direction] .card.current.card + .card + .card + .card {
383
336
  transform: translate(0%, -2%) scale(0.9);
384
337
  opacity: 1;
385
338
  }
386
- :host [direction=left]#game, :host [direction=left].current > .content-category {
339
+ :host(:not([readonly])) [direction=left] #background,
340
+ :host(:not([readonly])) [direction=left] .current [class^=content]::after {
387
341
  background-color: var(--app-color, #5a30f4) !important;
388
342
  }
389
- :host [direction=left].current {
343
+ :host(:not([readonly])) [direction=left] .current {
390
344
  transform: translate(0%, 9%) scale(1) rotate(-3.5deg) !important;
391
345
  }
392
- :host [direction=right]#game, :host [direction=right].current > .content-category {
346
+ :host(:not([readonly])) [direction=right] #background,
347
+ :host(:not([readonly])) [direction=right] .current [class^=content]::after {
393
348
  background-color: var(--warning, #ed6e33) !important;
394
349
  }
395
- :host [direction=right].current {
350
+ :host(:not([readonly])) [direction=right] .current {
396
351
  transform: translate(0%, 9%) scale(1) rotate(3.5deg) !important;
397
352
  }
398
- :host #game {
353
+ :host(:not([readonly])) #game #background {
399
354
  position: relative;
400
- width: 100%;
355
+ display: flex;
356
+ align-items: center;
357
+ justify-content: center;
358
+ height: 100%;
359
+ max-height: calc(min(65vw, 16rem) * 1.3333333333 - var(--spacing-40, 2.5rem));
401
360
  background-color: var(--dark, #000000);
402
361
  transition: background-color 0.25s ease-in-out;
403
362
  }
404
- :host #game #end-message {
405
- position: absolute;
406
- top: 50%;
407
- left: 50%;
408
- transform: translate(-50%, -50%);
409
- width: calc(100% - 4rem);
410
- max-width: 25rem;
363
+ :host(:not([readonly])) #game #end-message {
364
+ display: grid;
411
365
  color: var(--light, #ffffff);
412
366
  font-size: var(--font-size-18, 1.125rem);
413
367
  text-align: center;
@@ -415,56 +369,41 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
415
369
  opacity: 0;
416
370
  transition: opacity 0.5s ease-in-out;
417
371
  }
418
- :host #game #end-message.rtl {
419
- top: 50%;
420
- right: 50%;
421
- transform: translate(50%, -50%);
422
- }
423
- :host #game #end-message yoo-lottie {
372
+ :host(:not([readonly])) #game #end-message yoo-lottie {
424
373
  width: 30%;
425
374
  margin: 0 auto;
426
375
  }
427
- :host #game #end-message div {
428
- padding: var(--spacing-16, 1rem) 0;
376
+ :host(:not([readonly])) #game #end-message div {
429
377
  font-weight: bold;
430
378
  font-size: var(--font-size-24, 1.5rem);
431
379
  }
432
- :host #game #end-message.active {
380
+ :host(:not([readonly])) #game #end-message span {
381
+ padding-top: var(--spacing-16, 1rem);
382
+ }
383
+ :host(:not([readonly])) #game #end-message.active {
433
384
  visibility: visible;
434
385
  opacity: 1;
435
386
  }
436
- :host #game:after {
437
- display: block;
438
- height: 0;
439
- padding-top: 85%;
440
- content: "";
387
+ :host(:not([readonly])) #cards,
388
+ :host(:not([readonly])) .card {
389
+ width: 100%;
390
+ height: 100%;
441
391
  }
442
- :host #cards {
392
+ :host(:not([readonly])) #cards {
443
393
  position: absolute;
444
- top: 50%;
394
+ top: 0;
445
395
  left: 50%;
446
- transform: translate(-50%, -50%);
447
- width: 100%;
448
- width: 65%;
449
- max-width: 16rem;
450
- height: 100%;
396
+ max-width: min(65vw, 16rem);
397
+ max-height: calc(min(65vw, 16rem) * 1.3333333333 - var(--spacing-40, 2.5rem));
451
398
  margin-top: var(--spacing-16, 1rem);
399
+ transform: translateX(-50%);
452
400
  }
453
- :host #cards.rtl {
454
- top: 50%;
455
- right: 50%;
456
- transform: translate(50%, -50%);
457
- }
458
- :host #cards .card {
401
+ :host(:not([readonly])) #cards .card {
459
402
  position: absolute;
460
403
  top: 0;
461
404
  right: 0;
462
405
  bottom: 0;
463
406
  left: 0;
464
- width: 100%;
465
- max-width: 16rem;
466
- height: 100%;
467
- max-height: 21.3333333333rem;
468
407
  margin: 0 auto;
469
408
  overflow: hidden;
470
409
  color: var(--dark, #000000);
@@ -476,19 +415,19 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
476
415
  transition: transform 0.25s, opacity 0.25s, background-color 0.25s;
477
416
  will-change: transform, opacity;
478
417
  }
479
- :host #cards .card:not([direction]) {
418
+ :host(:not([readonly])) #cards .card:not([direction]) {
480
419
  transform: translate(0, -5%) scale(0.85);
481
420
  opacity: 0;
482
421
  }
483
- :host #cards .card.current {
422
+ :host(:not([readonly])) #cards .card.current {
484
423
  z-index: 3;
485
424
  }
486
- :host #cards .card.current:not(.revealing) {
425
+ :host(:not([readonly])) #cards .card.current:not(.revealing) {
487
426
  transform: translate(0%, 9%) scale(1);
488
427
  opacity: 1;
489
428
  transition-delay: 200ms;
490
429
  }
491
- :host #cards .card.current.revealing {
430
+ :host(:not([readonly])) #cards .card.current.revealing {
492
431
  animation: "current" 0.25s ease-in-out;
493
432
  animation-delay: 150ms;
494
433
  animation-fill-mode: forwards;
@@ -499,15 +438,15 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
499
438
  opacity: 1;
500
439
  }
501
440
  }
502
- :host #cards .card.second {
441
+ :host(:not([readonly])) #cards .card.second {
503
442
  z-index: 2;
504
443
  }
505
- :host #cards .card.second:not(.revealing) {
444
+ :host(:not([readonly])) #cards .card.second:not(.revealing) {
506
445
  transform: translate(0%, 3.5%) scale(0.95);
507
446
  opacity: 1;
508
447
  transition-delay: 400ms;
509
448
  }
510
- :host #cards .card.second.revealing {
449
+ :host(:not([readonly])) #cards .card.second.revealing {
511
450
  animation: "second" 0.25s ease-in-out;
512
451
  animation-delay: 300ms;
513
452
  animation-fill-mode: forwards;
@@ -518,15 +457,15 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
518
457
  opacity: 1;
519
458
  }
520
459
  }
521
- :host #cards .card.third {
460
+ :host(:not([readonly])) #cards .card.third {
522
461
  z-index: 1;
523
462
  }
524
- :host #cards .card.third:not(.revealing) {
463
+ :host(:not([readonly])) #cards .card.third:not(.revealing) {
525
464
  transform: translate(0%, -2%) scale(0.9);
526
465
  opacity: 1;
527
466
  transition-delay: 600ms;
528
467
  }
529
- :host #cards .card.third.revealing {
468
+ :host(:not([readonly])) #cards .card.third.revealing {
530
469
  animation: "third" 0.25s ease-in-out;
531
470
  animation-delay: 450ms;
532
471
  animation-fill-mode: forwards;
@@ -537,72 +476,91 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
537
476
  opacity: 1;
538
477
  }
539
478
  }
540
- :host #cards .card.current .content-image,
541
- :host #cards .card.current .content-text, :host #cards .card[direction] .content-image,
542
- :host #cards .card[direction] .content-text {
479
+ :host(:not([readonly])) #cards .card.current [class^=content],
480
+ :host(:not([readonly])) #cards .card.current [class^=content]::after {
481
+ transition: color 0.5s, background-color 0.5s ease-in-out, opacity 0.5s ease-in-out;
482
+ }
483
+ :host(:not([readonly])) #cards .card.current [class^=content]::after {
484
+ position: absolute;
485
+ top: 0;
486
+ left: 0;
487
+ z-index: 1;
488
+ display: flex;
489
+ align-items: center;
490
+ justify-content: center;
491
+ width: 100%;
492
+ height: 100%;
493
+ color: var(--light, #ffffff);
494
+ opacity: 0;
495
+ content: attr(data-category);
496
+ }
497
+ :host(:not([readonly])) #cards .card.current .content-image,
498
+ :host(:not([readonly])) #cards .card.current .content-text, :host(:not([readonly])) #cards .card[direction] .content-image,
499
+ :host(:not([readonly])) #cards .card[direction] .content-text {
543
500
  opacity: 1 !important;
544
501
  }
545
- :host #cards .card[swiped] {
502
+ :host(:not([readonly])) #cards .card[swiped] {
546
503
  animation: fade-out 1s ease-out;
547
504
  animation-fill-mode: forwards;
548
505
  }
549
- :host #cards .card[swiped=left] {
506
+ :host(:not([readonly])) #cards .card[swiped=left] {
550
507
  transform: translate(-100%, 15%) rotate(-15deg);
551
508
  }
552
- :host #cards .card[swiped=right] {
509
+ :host(:not([readonly])) #cards .card[swiped=right] {
553
510
  transform: translate(100%, 15%) rotate(15deg);
554
511
  }
555
- :host #cards .card [class^=content] {
512
+ :host(:not([readonly])) #cards .card [class^=content] {
556
513
  position: absolute;
557
514
  width: 100%;
558
515
  height: 100%;
559
516
  word-break: break-word;
560
- opacity: 0;
561
517
  }
562
- :host #cards .card .content-category,
563
- :host #cards .card .content-text {
518
+ :host(:not([readonly])) #cards .card .content-text {
564
519
  display: flex;
565
520
  align-items: center;
566
521
  justify-content: center;
567
522
  box-sizing: border-box;
568
523
  padding: var(--spacing-16, 1rem);
569
524
  }
570
- :host #cards .card .content-image {
525
+ :host(:not([readonly])) #cards .card .content-image {
571
526
  transition: opacity 0.25s linear;
572
527
  }
573
- :host #cards .card[type=image] yoo-img {
528
+ :host(:not([readonly])) #cards .card[type=image] yoo-img {
574
529
  height: 100%;
575
530
  }
576
- :host #cards .card[type=textimage] .content-image {
531
+ :host(:not([readonly])) #cards .card[type=textimage] .content-image {
577
532
  top: 0;
578
533
  bottom: 3.5rem;
579
534
  }
580
- :host #cards .card[type=textimage] .content-image yoo-img {
535
+ :host(:not([readonly])) #cards .card[type=textimage] .content-image yoo-img {
581
536
  height: calc(100% - 3.5rem);
582
537
  }
583
- :host #cards .card[type=textimage] .content-text,
584
- :host #cards .card[type=textimage] .content-category {
538
+ :host(:not([readonly])) #cards .card[type=textimage] .content-text {
585
539
  bottom: 0;
586
540
  height: 3.5rem;
587
541
  }
588
- :host #actions {
542
+ :host(:not([readonly])) #actions {
589
543
  position: absolute;
590
- left: 50%;
591
- z-index: 1;
544
+ top: calc(109% + var(--spacing-16, 1rem));
592
545
  display: inline-grid;
593
546
  grid-template-columns: 1fr 1fr 1fr;
594
547
  width: 100%;
595
- max-width: 85%;
548
+ max-width: min(65vw, 16rem);
549
+ margin-top: var(--spacing-16, 1rem);
550
+ padding-bottom: var(--spacing-16, 1rem);
596
551
  line-height: 2.5;
597
- transform: translate(-50%, 80%);
598
552
  }
599
- :host #actions .action {
553
+ :host(:not([readonly])) #actions .action {
600
554
  display: flex;
601
555
  flex-direction: column;
602
556
  align-items: center;
603
557
  justify-content: flex-start;
558
+ line-height: 1.75;
604
559
  text-align: center;
605
560
  }
561
+ :host(:not([readonly])) #actions .action yoo-button {
562
+ margin-bottom: var(--spacing-08, 0.5rem);
563
+ }
606
564
 
607
565
  :host([readonly]) {
608
566
  display: flex;
@@ -720,74 +678,106 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
720
678
  transition: transform 0.8s linear;
721
679
  }
722
680
 
723
- :host([live-preview]),
724
- :host(.mobile) {
725
- min-height: 60vh;
726
- }
727
- :host([live-preview]) #instructions #header,
728
- :host(.mobile) #instructions #header {
681
+ :host([live-preview][view=instructions]) #instructions #header,
682
+ :host(.mobile[view=instructions]) #instructions #header {
729
683
  padding: var(--spacing-16, 1rem);
730
684
  background: var(--dark, #000000);
731
685
  border-radius: var(--border-radius-04, 0.25rem);
732
686
  }
733
- :host([live-preview]) #instructions #header #title,
734
- :host(.mobile) #instructions #header #title {
687
+ :host([live-preview][view=instructions]) #instructions #header #title,
688
+ :host(.mobile[view=instructions]) #instructions #header #title {
735
689
  color: var(--light, #ffffff);
736
690
  font-weight: bold;
737
691
  font-size: var(--font-size-28, 1.75rem);
738
692
  }
739
- :host([live-preview]) #instructions yoo-button,
740
- :host(.mobile) #instructions yoo-button {
741
- position: absolute;
742
- bottom: 0;
743
- width: stretch;
693
+
694
+ :host(.web:not([live-preview])) #cards {
695
+ transform: translate(-50%, 0);
696
+ }
697
+ :host(.web:not([live-preview])) .action:nth-child(2) {
698
+ margin-top: calc(10% + 3rem);
699
+ }
700
+ :host(.web:not([live-preview])) #header {
701
+ display: flex;
702
+ flex-direction: column;
703
+ padding: var(--spacing-08, 0.5rem) var(--spacing-16, 1rem);
704
+ line-height: 1.75;
705
+ text-align: center;
706
+ background-color: var(--stable-ultralight, #fafafa);
707
+ }
708
+ :host(.web:not([live-preview])) #header #title {
709
+ color: var(--dark, #000000) !important;
710
+ font-weight: bold;
711
+ font-size: var(--font-size-28, 1.75rem);
744
712
  }
745
713
 
746
- :host(.web:not([live-preview])) #instructions {
747
- position: relative;
714
+ :host(.web:not([live-preview])[view=game]) main {
715
+ grid-template-rows: auto 100% 1fr;
716
+ }
717
+ :host(.web:not([live-preview])[view=game]) main #actions {
718
+ top: 109%;
719
+ min-width: 32rem;
720
+ margin-top: 0;
748
721
  }
749
- :host(.web:not([live-preview])) #instructions yoo-icon[name=swipe-explanation] {
722
+
723
+ :host(.web:not([live-preview])[view=instructions]) yoo-icon[name=swipe-explanation] {
750
724
  width: 5rem;
751
725
  height: 5rem;
752
726
  margin: auto;
753
727
  --inner-width: 5rem;
754
728
  --inner-height: 5rem;
755
729
  }
756
- :host(.web:not([live-preview])) #instructions yoo-button {
730
+ :host(.web:not([live-preview])[view=instructions]) yoo-button {
757
731
  position: fixed;
758
732
  right: var(--spacing-32, 2rem);
759
733
  bottom: var(--spacing-16, 1rem);
760
- z-index: 1;
761
- transform: translateY(-50%);
762
734
  }
763
- :host(.web:not([live-preview])) #game {
764
- height: 60%;
765
- max-height: 21rem;
735
+
736
+ :host([view=instructions]) main {
737
+ grid-template-rows: 1fr auto;
766
738
  }
767
- :host(.web:not([live-preview])) #game #cards {
768
- top: 5%;
769
- margin-top: unset;
770
- transform: translate(-50%, 0);
739
+ :host([view=instructions]) main #instructions #header {
740
+ display: flex;
741
+ flex-direction: column;
771
742
  }
772
- :host(.web:not([live-preview])) #actions {
773
- align-items: start;
774
- max-width: unset;
775
- margin-top: 2.5%;
776
- transform: translate(-50%, 0);
743
+ :host([view=instructions]) main #instructions #header #title {
744
+ font-weight: bold;
777
745
  }
778
- :host(.web:not([live-preview])) #actions .action:nth-child(2) {
779
- align-self: end;
746
+ :host([view=instructions]) main #instructions #categories {
747
+ display: inline-grid;
748
+ grid-template-columns: 1fr 0.5fr 1fr;
749
+ width: 100%;
750
+ margin: var(--spacing-24, 1.5rem) 0;
751
+ text-align: center;
780
752
  }
781
- :host(.web:not([live-preview])) #header {
753
+ :host([view=instructions]) main #instructions #categories .category {
782
754
  display: flex;
783
755
  flex-direction: column;
784
- padding: var(--spacing-08, 0.5rem) var(--spacing-16, 1rem);
785
- line-height: 1.75;
786
- text-align: center;
787
- background-color: var(--stable-ultralight, #fafafa);
756
+ height: 100%;
757
+ padding: 0;
758
+ color: var(--stable, #adadad);
788
759
  }
789
- :host(.web:not([live-preview])) #header #title {
790
- color: var(--dark, #000000) !important;
760
+ :host([view=instructions]) main #instructions #categories .category p {
761
+ max-width: 75%;
762
+ margin: auto;
763
+ padding: var(--spacing-16, 1rem) 0;
791
764
  font-weight: bold;
792
- font-size: var(--font-size-28, 1.75rem);
765
+ }
766
+ :host([view=instructions]) main #instructions #categories .category yoo-tag {
767
+ margin: 0 auto;
768
+ }
769
+ :host([view=instructions]) main #instructions #document {
770
+ background-color: var(--light, #ffffff);
771
+ }
772
+ :host([view=instructions]) main #instructions #document .document-title {
773
+ padding: 0 var(--spacing-16, 1rem);
774
+ font-size: var(--font-size-16, 1rem);
775
+ }
776
+ :host([view=instructions]) main #instructions #document yoo-form-document {
777
+ --outer-container-padding: cssvar(spacing-16) cssvar(spacing-16);
778
+ width: calc(100% - var(--spacing-16, 1rem));
779
+ }
780
+ :host([view=instructions]) main yoo-button {
781
+ align-items: flex-end;
782
+ padding-bottom: var(--spacing-16, 1rem);
793
783
  }