@magicfeedback/popup-sdk 1.22.1 → 1.23.0
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/README.md +8 -2
- package/dist/2.2.47-BYEZ6PUX.mjs +2428 -0
- package/dist/2.2.47-BYEZ6PUX.mjs.map +1 -0
- package/dist/2.2.47-ZZQRJNYY.mjs +2428 -0
- package/dist/2.2.47-ZZQRJNYY.mjs.map +1 -0
- package/dist/assets/assets/style.css +8 -1
- package/dist/assets/assets/survey-css/2.2.47.css +2420 -0
- package/dist/{chunk-5UURWEOR.mjs → chunk-7PNQVCOR.mjs} +156 -5
- package/dist/chunk-7PNQVCOR.mjs.map +1 -0
- package/dist/{chunk-4TNJ2IBB.mjs → chunk-HDCZ2QGX.mjs} +156 -5
- package/dist/chunk-HDCZ2QGX.mjs.map +1 -0
- package/dist/{chunk-6HPKIMVM.mjs → chunk-OXAYYIUH.mjs} +156 -5
- package/dist/chunk-OXAYYIUH.mjs.map +1 -0
- package/dist/index.d.mts +36 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +4022 -1311
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +125 -60
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.d.mts +36 -0
- package/dist/index.native.d.ts +36 -0
- package/dist/index.native.js +4022 -1311
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +125 -60
- package/dist/index.native.mjs.map +1 -1
- package/dist/react-native.d.mts +25 -0
- package/dist/react-native.d.ts +25 -0
- package/dist/react-native.js +2820 -181
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +125 -60
- package/dist/react-native.mjs.map +1 -1
- package/dist/{renderPopup-SFDIFFUT.mjs → renderPopup-I565DNZX.mjs} +18 -29
- package/dist/renderPopup-I565DNZX.mjs.map +1 -0
- package/dist/{renderPopup-L5TROMDQ.mjs → renderPopup-KWAMONIN.mjs} +1210 -1149
- package/dist/renderPopup-KWAMONIN.mjs.map +1 -0
- package/dist/{renderPopup-UXD7L3FX.mjs → renderPopup-USTJXQJ6.mjs} +1210 -1149
- package/dist/renderPopup-USTJXQJ6.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/chunk-4TNJ2IBB.mjs.map +0 -1
- package/dist/chunk-5UURWEOR.mjs.map +0 -1
- package/dist/chunk-6HPKIMVM.mjs.map +0 -1
- package/dist/renderPopup-L5TROMDQ.mjs.map +0 -1
- package/dist/renderPopup-SFDIFFUT.mjs.map +0 -1
- package/dist/renderPopup-UXD7L3FX.mjs.map +0 -1
package/dist/react-native.js
CHANGED
|
@@ -192,7 +192,7 @@ var SDK_VERSION, SDK_IDENTIFIER, POPUP_CHANNEL;
|
|
|
192
192
|
var init_version = __esm({
|
|
193
193
|
"src/version.ts"() {
|
|
194
194
|
"use strict";
|
|
195
|
-
SDK_VERSION = "1.
|
|
195
|
+
SDK_VERSION = "1.23.0";
|
|
196
196
|
SDK_IDENTIFIER = `${"react-native"}@${SDK_VERSION}`;
|
|
197
197
|
POPUP_CHANNEL = "popup";
|
|
198
198
|
}
|
|
@@ -312,6 +312,48 @@ var init_tracking_manager = __esm({
|
|
|
312
312
|
}
|
|
313
313
|
});
|
|
314
314
|
|
|
315
|
+
// src/ui/placement.ts
|
|
316
|
+
function isPosition(value) {
|
|
317
|
+
return typeof value === "string" && Object.prototype.hasOwnProperty.call(ALIGN, value);
|
|
318
|
+
}
|
|
319
|
+
function resolvePlacement(style) {
|
|
320
|
+
const position = isPosition(style?.position) ? style.position : "center";
|
|
321
|
+
const size = style?.size === "small" ? "small" : "regular";
|
|
322
|
+
const blocksPage = position === "center" || style?.blockPage === true;
|
|
323
|
+
const align = ALIGN[position];
|
|
324
|
+
return {
|
|
325
|
+
position,
|
|
326
|
+
size,
|
|
327
|
+
blocksPage,
|
|
328
|
+
justifyContent: align.justifyContent,
|
|
329
|
+
alignItems: align.alignItems,
|
|
330
|
+
padding: position === "center" ? "0" : "16px",
|
|
331
|
+
background: blocksPage ? BACKDROP_COLOR : "transparent",
|
|
332
|
+
cardMaxWidthPx: CARD_MAX_WIDTH_PX[size]
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
var CARD_MAX_WIDTH_PX, SMALL_CARD_MOBILE_MAX_PX, BACKDROP_COLOR, ALIGN;
|
|
336
|
+
var init_placement = __esm({
|
|
337
|
+
"src/ui/placement.ts"() {
|
|
338
|
+
"use strict";
|
|
339
|
+
CARD_MAX_WIDTH_PX = {
|
|
340
|
+
small: 360,
|
|
341
|
+
regular: 600
|
|
342
|
+
};
|
|
343
|
+
SMALL_CARD_MOBILE_MAX_PX = 300;
|
|
344
|
+
BACKDROP_COLOR = "rgba(0,0,0,0.5)";
|
|
345
|
+
ALIGN = {
|
|
346
|
+
center: { justifyContent: "center", alignItems: "center" },
|
|
347
|
+
bottom: { justifyContent: "center", alignItems: "flex-end" },
|
|
348
|
+
"bottom-right": { justifyContent: "flex-end", alignItems: "flex-end" },
|
|
349
|
+
"bottom-left": { justifyContent: "flex-start", alignItems: "flex-end" },
|
|
350
|
+
top: { justifyContent: "center", alignItems: "flex-start" },
|
|
351
|
+
"top-right": { justifyContent: "flex-end", alignItems: "flex-start" },
|
|
352
|
+
"top-left": { justifyContent: "flex-start", alignItems: "flex-start" }
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
|
|
315
357
|
// src/ui/surveySdkVersion.ts
|
|
316
358
|
function isSemver(value) {
|
|
317
359
|
return typeof value === "string" && SEMVER.test(value);
|
|
@@ -354,8 +396,8 @@ var init_surveySdkVersion = __esm({
|
|
|
354
396
|
"src/ui/surveySdkVersion.ts"() {
|
|
355
397
|
"use strict";
|
|
356
398
|
init_version();
|
|
357
|
-
BUNDLED_SURVEY_SDK_VERSION = "2.2.
|
|
358
|
-
SUPPORTED_SURVEY_SDK_VERSIONS = ["2.2.38", "2.2.39", "2.2.44"];
|
|
399
|
+
BUNDLED_SURVEY_SDK_VERSION = "2.2.47";
|
|
400
|
+
SUPPORTED_SURVEY_SDK_VERSIONS = ["2.2.38", "2.2.39", "2.2.44", "2.2.47"];
|
|
359
401
|
SEMVER = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
|
|
360
402
|
}
|
|
361
403
|
});
|
|
@@ -502,6 +544,8 @@ var init_labels = __esm({
|
|
|
502
544
|
back: "Back",
|
|
503
545
|
question: "Question",
|
|
504
546
|
of: "of",
|
|
547
|
+
answeredOf: "{answered} of {total} answered",
|
|
548
|
+
answered: "{answered} answered",
|
|
505
549
|
followUp: "Follow-up",
|
|
506
550
|
closeAria: "Close popup",
|
|
507
551
|
loadingAria: "Loading survey",
|
|
@@ -518,6 +562,8 @@ var init_labels = __esm({
|
|
|
518
562
|
back: "Atr\xE1s",
|
|
519
563
|
question: "Pregunta",
|
|
520
564
|
of: "de",
|
|
565
|
+
answeredOf: "{answered} de {total} respondidas",
|
|
566
|
+
answered: "{answered} respondidas",
|
|
521
567
|
followUp: "Seguimiento",
|
|
522
568
|
closeAria: "Cerrar ventana emergente",
|
|
523
569
|
loadingAria: "Cargando encuesta",
|
|
@@ -534,6 +580,8 @@ var init_labels = __esm({
|
|
|
534
580
|
back: "Tilbage",
|
|
535
581
|
question: "Sp\xF8rgsm\xE5l",
|
|
536
582
|
of: "af",
|
|
583
|
+
answeredOf: "{answered} af {total} besvaret",
|
|
584
|
+
answered: "{answered} besvaret",
|
|
537
585
|
followUp: "Opf\xF8lgning",
|
|
538
586
|
closeAria: "Luk pop op",
|
|
539
587
|
loadingAria: "Indl\xE6ser unders\xF8gelse",
|
|
@@ -550,6 +598,8 @@ var init_labels = __esm({
|
|
|
550
598
|
back: "Tilbake",
|
|
551
599
|
question: "Sp\xF8rsm\xE5l",
|
|
552
600
|
of: "av",
|
|
601
|
+
answeredOf: "{answered} av {total} besvart",
|
|
602
|
+
answered: "{answered} besvart",
|
|
553
603
|
followUp: "Oppf\xF8lging",
|
|
554
604
|
closeAria: "Lukk popup",
|
|
555
605
|
loadingAria: "Laster unders\xF8kelse",
|
|
@@ -566,6 +616,8 @@ var init_labels = __esm({
|
|
|
566
616
|
back: "Tillbaka",
|
|
567
617
|
question: "Fr\xE5ga",
|
|
568
618
|
of: "av",
|
|
619
|
+
answeredOf: "{answered} av {total} besvarade",
|
|
620
|
+
answered: "{answered} besvarade",
|
|
569
621
|
followUp: "Uppf\xF6ljning",
|
|
570
622
|
closeAria: "St\xE4ng popup",
|
|
571
623
|
loadingAria: "Laddar unders\xF6kning",
|
|
@@ -582,6 +634,8 @@ var init_labels = __esm({
|
|
|
582
634
|
back: "Takaisin",
|
|
583
635
|
question: "Kysymys",
|
|
584
636
|
of: "/",
|
|
637
|
+
answeredOf: "{answered}/{total} vastattu",
|
|
638
|
+
answered: "{answered} vastattu",
|
|
585
639
|
followUp: "Jatkokysymys",
|
|
586
640
|
closeAria: "Sulje ponnahdusikkuna",
|
|
587
641
|
loadingAria: "Ladataan kysely\xE4",
|
|
@@ -598,6 +652,8 @@ var init_labels = __esm({
|
|
|
598
652
|
back: "Zur\xFCck",
|
|
599
653
|
question: "Frage",
|
|
600
654
|
of: "von",
|
|
655
|
+
answeredOf: "{answered} von {total} beantwortet",
|
|
656
|
+
answered: "{answered} beantwortet",
|
|
601
657
|
followUp: "Folgefrage",
|
|
602
658
|
closeAria: "Popup schlie\xDFen",
|
|
603
659
|
loadingAria: "Umfrage wird geladen",
|
|
@@ -614,6 +670,8 @@ var init_labels = __esm({
|
|
|
614
670
|
back: "Retour",
|
|
615
671
|
question: "Question",
|
|
616
672
|
of: "sur",
|
|
673
|
+
answeredOf: "{answered} sur {total} r\xE9pondues",
|
|
674
|
+
answered: "{answered} r\xE9pondues",
|
|
617
675
|
followUp: "Question compl\xE9mentaire",
|
|
618
676
|
closeAria: "Fermer la fen\xEAtre",
|
|
619
677
|
loadingAria: "Chargement de l'enqu\xEAte",
|
|
@@ -630,6 +688,8 @@ var init_labels = __esm({
|
|
|
630
688
|
back: "Voltar",
|
|
631
689
|
question: "Pergunta",
|
|
632
690
|
of: "de",
|
|
691
|
+
answeredOf: "{answered} de {total} respondidas",
|
|
692
|
+
answered: "{answered} respondidas",
|
|
633
693
|
followUp: "Seguimento",
|
|
634
694
|
closeAria: "Fechar janela",
|
|
635
695
|
loadingAria: "A carregar question\xE1rio",
|
|
@@ -646,6 +706,8 @@ var init_labels = __esm({
|
|
|
646
706
|
back: "\u0631\u062C\u0648\u0639",
|
|
647
707
|
question: "\u0633\u0624\u0627\u0644",
|
|
648
708
|
of: "\u0645\u0646",
|
|
709
|
+
answeredOf: "\u062A\u0645\u062A \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0639\u0644\u0649 {answered} \u0645\u0646 {total}",
|
|
710
|
+
answered: "\u062A\u0645\u062A \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0639\u0644\u0649 {answered}",
|
|
649
711
|
followUp: "\u0633\u0624\u0627\u0644 \u0645\u062A\u0627\u0628\u0639\u0629",
|
|
650
712
|
closeAria: "\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0645\u0646\u0628\u062B\u0642\u0629",
|
|
651
713
|
loadingAria: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0627\u0633\u062A\u0628\u064A\u0627\u0646",
|
|
@@ -662,6 +724,8 @@ var init_labels = __esm({
|
|
|
662
724
|
back: "\u09AA\u09BF\u099B\u09A8\u09C7",
|
|
663
725
|
question: "\u09AA\u09CD\u09B0\u09B6\u09CD\u09A8",
|
|
664
726
|
of: "/",
|
|
727
|
+
answeredOf: "{total}\u099F\u09BF\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 {answered}\u099F\u09BF\u09B0 \u0989\u09A4\u09CD\u09A4\u09B0 \u09A6\u09C7\u0993\u09AF\u09BC\u09BE \u09B9\u09AF\u09BC\u09C7\u099B\u09C7",
|
|
728
|
+
answered: "{answered}\u099F\u09BF\u09B0 \u0989\u09A4\u09CD\u09A4\u09B0 \u09A6\u09C7\u0993\u09AF\u09BC\u09BE \u09B9\u09AF\u09BC\u09C7\u099B\u09C7",
|
|
665
729
|
followUp: "\u09AB\u09B2\u09CB-\u0986\u09AA",
|
|
666
730
|
closeAria: "\u09AA\u09AA\u0986\u09AA \u09AC\u09A8\u09CD\u09A7 \u0995\u09B0\u09C1\u09A8",
|
|
667
731
|
loadingAria: "\u099C\u09B0\u09BF\u09AA \u09B2\u09CB\u09A1 \u09B9\u099A\u09CD\u099B\u09C7",
|
|
@@ -678,6 +742,8 @@ var init_labels = __esm({
|
|
|
678
742
|
back: "\u8FD4\u56DE",
|
|
679
743
|
question: "\u95EE\u9898",
|
|
680
744
|
of: "/",
|
|
745
|
+
answeredOf: "\u5DF2\u56DE\u7B54 {answered} / {total} \u9898",
|
|
746
|
+
answered: "\u5DF2\u56DE\u7B54 {answered} \u9898",
|
|
681
747
|
followUp: "\u8FFD\u95EE",
|
|
682
748
|
closeAria: "\u5173\u95ED\u5F39\u7A97",
|
|
683
749
|
loadingAria: "\u6B63\u5728\u52A0\u8F7D\u95EE\u5377",
|
|
@@ -694,6 +760,8 @@ var init_labels = __esm({
|
|
|
694
760
|
back: "\u041D\u0430\u0437\u0430\u0434",
|
|
695
761
|
question: "\u0412\u044A\u043F\u0440\u043E\u0441",
|
|
696
762
|
of: "\u043E\u0442",
|
|
763
|
+
answeredOf: "\u041E\u0442\u0433\u043E\u0432\u043E\u0440\u0435\u043D\u0438 {answered} \u043E\u0442 {total}",
|
|
764
|
+
answered: "\u041E\u0442\u0433\u043E\u0432\u043E\u0440\u0435\u043D\u0438: {answered}",
|
|
697
765
|
followUp: "\u0414\u043E\u043F\u044A\u043B\u043D\u0438\u0442\u0435\u043B\u0435\u043D \u0432\u044A\u043F\u0440\u043E\u0441",
|
|
698
766
|
closeAria: "\u0417\u0430\u0442\u0432\u0430\u0440\u044F\u043D\u0435 \u043D\u0430 \u0438\u0437\u0441\u043A\u0430\u0447\u0430\u0449\u0438\u044F \u043F\u0440\u043E\u0437\u043E\u0440\u0435\u0446",
|
|
699
767
|
loadingAria: "\u0410\u043D\u043A\u0435\u0442\u0430\u0442\u0430 \u0441\u0435 \u0437\u0430\u0440\u0435\u0436\u0434\u0430",
|
|
@@ -710,6 +778,8 @@ var init_labels = __esm({
|
|
|
710
778
|
back: "Zp\u011Bt",
|
|
711
779
|
question: "Ot\xE1zka",
|
|
712
780
|
of: "z",
|
|
781
|
+
answeredOf: "Zodpov\u011Bzeno {answered} z {total}",
|
|
782
|
+
answered: "Zodpov\u011Bzeno: {answered}",
|
|
713
783
|
followUp: "Dopl\u0148uj\xEDc\xED ot\xE1zka",
|
|
714
784
|
closeAria: "Zav\u0159\xEDt vyskakovac\xED okno",
|
|
715
785
|
loadingAria: "Na\u010D\xEDt\xE1n\xED pr\u016Fzkumu",
|
|
@@ -726,6 +796,8 @@ var init_labels = __esm({
|
|
|
726
796
|
back: "\u03A0\u03AF\u03C3\u03C9",
|
|
727
797
|
question: "\u0395\u03C1\u03CE\u03C4\u03B7\u03C3\u03B7",
|
|
728
798
|
of: "\u03B1\u03C0\u03CC",
|
|
799
|
+
answeredOf: "\u0391\u03C0\u03B1\u03BD\u03C4\u03AE\u03B8\u03B7\u03BA\u03B1\u03BD {answered} \u03B1\u03C0\u03CC {total}",
|
|
800
|
+
answered: "\u0391\u03C0\u03B1\u03BD\u03C4\u03AE\u03B8\u03B7\u03BA\u03B1\u03BD: {answered}",
|
|
729
801
|
followUp: "\u03A3\u03C5\u03BC\u03C0\u03BB\u03B7\u03C1\u03C9\u03BC\u03B1\u03C4\u03B9\u03BA\u03AE \u03B5\u03C1\u03CE\u03C4\u03B7\u03C3\u03B7",
|
|
730
802
|
closeAria: "\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF \u03B1\u03BD\u03B1\u03B4\u03C5\u03CC\u03BC\u03B5\u03BD\u03BF\u03C5 \u03C0\u03B1\u03C1\u03B1\u03B8\u03CD\u03C1\u03BF\u03C5",
|
|
731
803
|
loadingAria: "\u03A6\u03CC\u03C1\u03C4\u03C9\u03C3\u03B7 \u03AD\u03C1\u03B5\u03C5\u03BD\u03B1\u03C2",
|
|
@@ -742,6 +814,8 @@ var init_labels = __esm({
|
|
|
742
814
|
back: "Tagasi",
|
|
743
815
|
question: "K\xFCsimus",
|
|
744
816
|
of: "/",
|
|
817
|
+
answeredOf: "Vastatud {answered}/{total}",
|
|
818
|
+
answered: "Vastatud: {answered}",
|
|
745
819
|
followUp: "T\xE4psustav k\xFCsimus",
|
|
746
820
|
closeAria: "Sulge h\xFCpikaken",
|
|
747
821
|
loadingAria: "K\xFCsitluse laadimine",
|
|
@@ -758,6 +832,8 @@ var init_labels = __esm({
|
|
|
758
832
|
back: "Siar",
|
|
759
833
|
question: "Ceist",
|
|
760
834
|
of: "as",
|
|
835
|
+
answeredOf: "{answered} as {total} freagartha",
|
|
836
|
+
answered: "{answered} freagartha",
|
|
761
837
|
followUp: "Ceist leantach",
|
|
762
838
|
closeAria: "D\xFAn an phreabfhuinneog",
|
|
763
839
|
loadingAria: "Suirbh\xE9 \xE1 l\xF3d\xE1il",
|
|
@@ -774,6 +850,8 @@ var init_labels = __esm({
|
|
|
774
850
|
back: "Natrag",
|
|
775
851
|
question: "Pitanje",
|
|
776
852
|
of: "od",
|
|
853
|
+
answeredOf: "Odgovoreno {answered} od {total}",
|
|
854
|
+
answered: "Odgovoreno: {answered}",
|
|
777
855
|
followUp: "Dodatno pitanje",
|
|
778
856
|
closeAria: "Zatvori sko\u010Dni prozor",
|
|
779
857
|
loadingAria: "U\u010Ditavanje ankete",
|
|
@@ -790,6 +868,8 @@ var init_labels = __esm({
|
|
|
790
868
|
back: "Vissza",
|
|
791
869
|
question: "K\xE9rd\xE9s",
|
|
792
870
|
of: "/",
|
|
871
|
+
answeredOf: "{answered} / {total} megv\xE1laszolva",
|
|
872
|
+
answered: "{answered} megv\xE1laszolva",
|
|
793
873
|
followUp: "Kieg\xE9sz\xEDt\u0151 k\xE9rd\xE9s",
|
|
794
874
|
closeAria: "Felugr\xF3 ablak bez\xE1r\xE1sa",
|
|
795
875
|
loadingAria: "K\xE9rd\u0151\xEDv bet\xF6lt\xE9se",
|
|
@@ -806,6 +886,8 @@ var init_labels = __esm({
|
|
|
806
886
|
back: "Indietro",
|
|
807
887
|
question: "Domanda",
|
|
808
888
|
of: "di",
|
|
889
|
+
answeredOf: "{answered} di {total} risposte",
|
|
890
|
+
answered: "{answered} risposte",
|
|
809
891
|
followUp: "Approfondimento",
|
|
810
892
|
closeAria: "Chiudi popup",
|
|
811
893
|
loadingAria: "Caricamento del sondaggio",
|
|
@@ -822,6 +904,8 @@ var init_labels = __esm({
|
|
|
822
904
|
back: "Atgal",
|
|
823
905
|
question: "Klausimas",
|
|
824
906
|
of: "i\u0161",
|
|
907
|
+
answeredOf: "Atsakyta {answered} i\u0161 {total}",
|
|
908
|
+
answered: "Atsakyta: {answered}",
|
|
825
909
|
followUp: "Papildomas klausimas",
|
|
826
910
|
closeAria: "U\u017Edaryti i\u0161\u0161okant\u012F lang\u0105",
|
|
827
911
|
loadingAria: "\u012Ekeliama apklausa",
|
|
@@ -838,6 +922,8 @@ var init_labels = __esm({
|
|
|
838
922
|
back: "Atpaka\u013C",
|
|
839
923
|
question: "Jaut\u0101jums",
|
|
840
924
|
of: "no",
|
|
925
|
+
answeredOf: "Atbild\u0113ti {answered} no {total}",
|
|
926
|
+
answered: "Atbild\u0113ti: {answered}",
|
|
841
927
|
followUp: "Papildjaut\u0101jums",
|
|
842
928
|
closeAria: "Aizv\u0113rt uznirsto\u0161o logu",
|
|
843
929
|
loadingAria: "Notiek aptaujas iel\u0101de",
|
|
@@ -854,6 +940,8 @@ var init_labels = __esm({
|
|
|
854
940
|
back: "Lura",
|
|
855
941
|
question: "Mistoqsija",
|
|
856
942
|
of: "minn",
|
|
943
|
+
answeredOf: "{answered} minn {total} imwie\u0121ba",
|
|
944
|
+
answered: "{answered} imwie\u0121ba",
|
|
857
945
|
followUp: "Mistoqsija ta' segwitu",
|
|
858
946
|
closeAria: "Ag\u0127laq il-popup",
|
|
859
947
|
loadingAria: "Qed jitg\u0127abba l-ist\u0127arri\u0121",
|
|
@@ -870,6 +958,8 @@ var init_labels = __esm({
|
|
|
870
958
|
back: "Terug",
|
|
871
959
|
question: "Vraag",
|
|
872
960
|
of: "van",
|
|
961
|
+
answeredOf: "{answered} van {total} beantwoord",
|
|
962
|
+
answered: "{answered} beantwoord",
|
|
873
963
|
followUp: "Vervolgvraag",
|
|
874
964
|
closeAria: "Pop-up sluiten",
|
|
875
965
|
loadingAria: "Enqu\xEAte wordt geladen",
|
|
@@ -886,6 +976,8 @@ var init_labels = __esm({
|
|
|
886
976
|
back: "Wstecz",
|
|
887
977
|
question: "Pytanie",
|
|
888
978
|
of: "z",
|
|
979
|
+
answeredOf: "Odpowiedziano na {answered} z {total}",
|
|
980
|
+
answered: "Odpowiedziano: {answered}",
|
|
889
981
|
followUp: "Pytanie uzupe\u0142niaj\u0105ce",
|
|
890
982
|
closeAria: "Zamknij okno",
|
|
891
983
|
loadingAria: "\u0141adowanie ankiety",
|
|
@@ -902,6 +994,8 @@ var init_labels = __esm({
|
|
|
902
994
|
back: "\xCEnapoi",
|
|
903
995
|
question: "\xCEntrebarea",
|
|
904
996
|
of: "din",
|
|
997
|
+
answeredOf: "{answered} din {total} r\u0103spunse",
|
|
998
|
+
answered: "{answered} r\u0103spunse",
|
|
905
999
|
followUp: "\xCEntrebare suplimentar\u0103",
|
|
906
1000
|
closeAria: "\xCEnchide\u021Bi fereastra pop-up",
|
|
907
1001
|
loadingAria: "Se \xEEncarc\u0103 sondajul",
|
|
@@ -918,6 +1012,8 @@ var init_labels = __esm({
|
|
|
918
1012
|
back: "Sp\xE4\u0165",
|
|
919
1013
|
question: "Ot\xE1zka",
|
|
920
1014
|
of: "z",
|
|
1015
|
+
answeredOf: "Zodpovedan\xE9 {answered} z {total}",
|
|
1016
|
+
answered: "Zodpovedan\xE9: {answered}",
|
|
921
1017
|
followUp: "Dopl\u0148uj\xFAca ot\xE1zka",
|
|
922
1018
|
closeAria: "Zavrie\u0165 vyskakovacie okno",
|
|
923
1019
|
loadingAria: "Na\u010D\xEDtava sa prieskum",
|
|
@@ -934,6 +1030,8 @@ var init_labels = __esm({
|
|
|
934
1030
|
back: "Nazaj",
|
|
935
1031
|
question: "Vpra\u0161anje",
|
|
936
1032
|
of: "od",
|
|
1033
|
+
answeredOf: "Odgovorjeno {answered} od {total}",
|
|
1034
|
+
answered: "Odgovorjeno: {answered}",
|
|
937
1035
|
followUp: "Dodatno vpra\u0161anje",
|
|
938
1036
|
closeAria: "Zapri pojavno okno",
|
|
939
1037
|
loadingAria: "Nalaganje ankete",
|
|
@@ -950,6 +1048,8 @@ var init_labels = __esm({
|
|
|
950
1048
|
back: "Enrere",
|
|
951
1049
|
question: "Pregunta",
|
|
952
1050
|
of: "de",
|
|
1051
|
+
answeredOf: "{answered} de {total} respostes",
|
|
1052
|
+
answered: "{answered} respostes",
|
|
953
1053
|
followUp: "Seguiment",
|
|
954
1054
|
closeAria: "Tanca la finestra emergent",
|
|
955
1055
|
loadingAria: "S'est\xE0 carregant l'enquesta",
|
|
@@ -1128,6 +1228,58 @@ function ddSetSurveyBusy(el, busy){
|
|
|
1128
1228
|
}
|
|
1129
1229
|
});
|
|
1130
1230
|
|
|
1231
|
+
// src/ui/progressView.ts
|
|
1232
|
+
function fillAnswered(template, answered, total) {
|
|
1233
|
+
return template.split("{answered}").join(String(answered)).split("{total}").join(String(total));
|
|
1234
|
+
}
|
|
1235
|
+
function progressView(input, labels) {
|
|
1236
|
+
const total = input.total;
|
|
1237
|
+
const progress = input.progress;
|
|
1238
|
+
const percentage = input.unit === "percentage";
|
|
1239
|
+
if (total <= 1) return { visible: false, percent: 0, current: "", rest: "" };
|
|
1240
|
+
if (input.mode !== "completed") {
|
|
1241
|
+
if (input.completed) return { visible: false, percent: 0, current: "", rest: "" };
|
|
1242
|
+
const current = clamp(progress + 1, 1, total);
|
|
1243
|
+
const percent2 = clamp(current / total * 100, 0, 100);
|
|
1244
|
+
if (percentage) return { visible: true, percent: percent2, current: `${Math.round(percent2)}%`, rest: "" };
|
|
1245
|
+
const label = clamp(Math.floor(progress) + 1, 1, total);
|
|
1246
|
+
return { visible: true, percent: percent2, current: `${labels.question} ${label}`, rest: ` ${labels.of} ${total}` };
|
|
1247
|
+
}
|
|
1248
|
+
const answered = input.completed ? clamp(Math.floor(progress) + 1, 1, total) : clamp(Math.floor(progress), 0, total);
|
|
1249
|
+
const shownTotal = input.completed ? answered : total;
|
|
1250
|
+
const percent = input.completed ? 100 : clamp(answered / total * 100, 0, 100);
|
|
1251
|
+
if (percentage) return { visible: true, percent, current: `${Math.round(percent)}%`, rest: "" };
|
|
1252
|
+
return { visible: true, percent, current: fillAnswered(labels.answeredOf, answered, shownTotal), rest: "" };
|
|
1253
|
+
}
|
|
1254
|
+
var clamp, PROGRESS_VIEW_JS;
|
|
1255
|
+
var init_progressView = __esm({
|
|
1256
|
+
"src/ui/progressView.ts"() {
|
|
1257
|
+
"use strict";
|
|
1258
|
+
clamp = (n, min, max) => Math.min(max, Math.max(min, n));
|
|
1259
|
+
PROGRESS_VIEW_JS = `
|
|
1260
|
+
function ddProgressView(input, labels){
|
|
1261
|
+
function clamp(n,a,b){ return Math.min(b,Math.max(a,n)); }
|
|
1262
|
+
function fill(t,a,n){ return String(t).split('{answered}').join(String(a)).split('{total}').join(String(n)); }
|
|
1263
|
+
var total=input.total, progress=input.progress, pctUnit=input.unit==='percentage';
|
|
1264
|
+
if(total<=1){ return {visible:false,percent:0,current:'',rest:''}; }
|
|
1265
|
+
if(input.mode!=='completed'){
|
|
1266
|
+
if(input.completed){ return {visible:false,percent:0,current:'',rest:''}; }
|
|
1267
|
+
var cur=clamp(progress+1,1,total);
|
|
1268
|
+
var pct=clamp((cur/total)*100,0,100);
|
|
1269
|
+
if(pctUnit){ return {visible:true,percent:pct,current:Math.round(pct)+'%',rest:''}; }
|
|
1270
|
+
var lab=clamp(Math.floor(progress)+1,1,total);
|
|
1271
|
+
return {visible:true,percent:pct,current:labels.question+' '+lab,rest:' '+labels.of+' '+total};
|
|
1272
|
+
}
|
|
1273
|
+
var answered=input.completed ? clamp(Math.floor(progress)+1,1,total) : clamp(Math.floor(progress),0,total);
|
|
1274
|
+
var shown=input.completed ? answered : total;
|
|
1275
|
+
var p2=input.completed ? 100 : clamp((answered/total)*100,0,100);
|
|
1276
|
+
if(pctUnit){ return {visible:true,percent:p2,current:Math.round(p2)+'%',rest:''}; }
|
|
1277
|
+
return {visible:true,percent:p2,current:fill(labels.answeredOf,answered,shown),rest:''};
|
|
1278
|
+
}
|
|
1279
|
+
`;
|
|
1280
|
+
}
|
|
1281
|
+
});
|
|
1282
|
+
|
|
1131
1283
|
// src/ui/submitError.ts
|
|
1132
1284
|
function submitErrorText(error) {
|
|
1133
1285
|
if (!error) return "";
|
|
@@ -1178,7 +1330,7 @@ var init_style = __esm({
|
|
|
1178
1330
|
style_default = `/**
|
|
1179
1331
|
* NO EDITAR A MANO \u2014 generado por scripts/vendor-survey-css.mjs
|
|
1180
1332
|
*
|
|
1181
|
-
* Copia de @magicfeedback/native@2.2.
|
|
1333
|
+
* Copia de @magicfeedback/native@2.2.47 \u2192 dist/styles/magicfeedback-default.css
|
|
1182
1334
|
* (la hoja can\xF3nica del paquete, la que apunta su campo "style"), con estos cambios locales:
|
|
1183
1335
|
*
|
|
1184
1336
|
* 1. Sin el @import de Google Fonts (Nunito): no queremos una petici\xF3n externa desde la
|
|
@@ -1420,6 +1572,11 @@ var init_style = __esm({
|
|
|
1420
1572
|
padding: var(--mf-space-lg);
|
|
1421
1573
|
margin: var(--mf-space-lg) 0;
|
|
1422
1574
|
animation: mf-scale-in 0.3s ease-out;
|
|
1575
|
+
/* A long word or URL with no spaces wraps instead of running off the card
|
|
1576
|
+
(Lemu, 23-nov: an info page with "Hehehe\u2026" was cut on the right).
|
|
1577
|
+
break-word, not anywhere: it only breaks a word that does not fit and
|
|
1578
|
+
leaves the min-content width alone, so nothing in a flex row shrinks. */
|
|
1579
|
+
overflow-wrap: break-word;
|
|
1423
1580
|
}
|
|
1424
1581
|
|
|
1425
1582
|
/* .magicfeedback-info-message/-start-message are set via innerHTML (see
|
|
@@ -1606,6 +1763,7 @@ var init_style = __esm({
|
|
|
1606
1763
|
LABELS & TYPOGRAPHY
|
|
1607
1764
|
======================================== */
|
|
1608
1765
|
.magicfeedback-label {
|
|
1766
|
+
overflow-wrap: break-word;
|
|
1609
1767
|
font-size: var(--mf-font-size-lg);
|
|
1610
1768
|
font-weight: var(--mf-font-weight-bold);
|
|
1611
1769
|
color: var(--mf-text-primary);
|
|
@@ -1615,6 +1773,7 @@ var init_style = __esm({
|
|
|
1615
1773
|
}
|
|
1616
1774
|
|
|
1617
1775
|
.magicfeedback-sublabel {
|
|
1776
|
+
overflow-wrap: break-word;
|
|
1618
1777
|
font-size: var(--mf-font-size-base);
|
|
1619
1778
|
font-weight: var(--mf-font-weight-normal);
|
|
1620
1779
|
color: var(--mf-text-secondary);
|
|
@@ -3605,64 +3764,2406 @@ function sdkWarn(...args) {
|
|
|
3605
3764
|
function sdkError(...args) {
|
|
3606
3765
|
(active.error ?? active.log)(...args);
|
|
3607
3766
|
}
|
|
3608
|
-
var active;
|
|
3609
|
-
var init_logger = __esm({
|
|
3610
|
-
"src/util/logger.ts"() {
|
|
3611
|
-
"use strict";
|
|
3612
|
-
active = console;
|
|
3613
|
-
}
|
|
3614
|
-
});
|
|
3767
|
+
var active;
|
|
3768
|
+
var init_logger = __esm({
|
|
3769
|
+
"src/util/logger.ts"() {
|
|
3770
|
+
"use strict";
|
|
3771
|
+
active = console;
|
|
3772
|
+
}
|
|
3773
|
+
});
|
|
3774
|
+
|
|
3775
|
+
// src/ui/logo.ts
|
|
3776
|
+
function insertPopupLogo(parent, anchor, style, id) {
|
|
3777
|
+
if (!style?.logo) return null;
|
|
3778
|
+
if (parent.ownerDocument.getElementById(id)) return null;
|
|
3779
|
+
const img = parent.ownerDocument.createElement("img");
|
|
3780
|
+
img.id = id;
|
|
3781
|
+
img.src = style.logo;
|
|
3782
|
+
img.alt = "Logo";
|
|
3783
|
+
img.style.cssText = BASE_CSS;
|
|
3784
|
+
if (style.logoSize && MAX_HEIGHT[style.logoSize]) {
|
|
3785
|
+
img.style.maxHeight = MAX_HEIGHT[style.logoSize];
|
|
3786
|
+
}
|
|
3787
|
+
switch (style.logoPosition) {
|
|
3788
|
+
case "left":
|
|
3789
|
+
img.style.margin = "12px 0 0 0";
|
|
3790
|
+
img.style.setProperty("margin-inline-start", "0");
|
|
3791
|
+
img.style.setProperty("margin-inline-end", "16px");
|
|
3792
|
+
break;
|
|
3793
|
+
case "right":
|
|
3794
|
+
img.style.margin = "12px 0 0 0";
|
|
3795
|
+
img.style.setProperty("margin-inline-start", "auto");
|
|
3796
|
+
img.style.setProperty("margin-inline-end", "0");
|
|
3797
|
+
break;
|
|
3798
|
+
case "center":
|
|
3799
|
+
img.style.margin = "12px auto 0 auto";
|
|
3800
|
+
break;
|
|
3801
|
+
}
|
|
3802
|
+
parent.insertBefore(img, anchor);
|
|
3803
|
+
return img;
|
|
3804
|
+
}
|
|
3805
|
+
var BASE_CSS, MAX_HEIGHT;
|
|
3806
|
+
var init_logo = __esm({
|
|
3807
|
+
"src/ui/logo.ts"() {
|
|
3808
|
+
"use strict";
|
|
3809
|
+
BASE_CSS = "max-height:40px; max-width:100%; object-fit:contain; display:block; margin:12px 0 0 0;";
|
|
3810
|
+
MAX_HEIGHT = {
|
|
3811
|
+
small: "30px",
|
|
3812
|
+
medium: "50px",
|
|
3813
|
+
large: "70px"
|
|
3814
|
+
};
|
|
3815
|
+
}
|
|
3816
|
+
});
|
|
3817
|
+
|
|
3818
|
+
// src/assets/survey-css/2.2.38.css
|
|
3819
|
+
var require__ = __commonJS({
|
|
3820
|
+
"src/assets/survey-css/2.2.38.css"(exports, module2) {
|
|
3821
|
+
module2.exports = `/**
|
|
3822
|
+
* NO EDITAR A MANO \u2014 generado por scripts/vendor-survey-css.mjs
|
|
3823
|
+
*
|
|
3824
|
+
* Copia de @magicfeedback/native@2.2.38 \u2192 dist/styles/magicfeedback-default.css
|
|
3825
|
+
* (la hoja can\xF3nica del paquete, la que apunta su campo "style"), con estos cambios locales:
|
|
3826
|
+
*
|
|
3827
|
+
* 1. Sin el @import de Google Fonts (Nunito): no queremos una petici\xF3n externa desde la
|
|
3828
|
+
* p\xE1gina del host, y la tipograf\xEDa la decide el popup.
|
|
3829
|
+
* 2. .magicfeedback-container hereda la fuente del popup (var(--deepdots-font, inherit)).
|
|
3830
|
+
* 3. Los selectores desnudos (h2, p, input, textarea, select, ::placeholder, .error) van
|
|
3831
|
+
* acotados a .deepdots-popup: este CSS se inyecta en el <head> del host y sin acotar
|
|
3832
|
+
* repintar\xEDa su web.
|
|
3833
|
+
* 4. El grupo .magicfeedback-radio se cualifica como div.magicfeedback-radio (la clase acaba
|
|
3834
|
+
* tambi\xE9n en el <input> del boolean).
|
|
3835
|
+
* 5. Todo :hover va dentro de @media (hover: hover): en t\xE1ctil WebKit deja el hover pegado
|
|
3836
|
+
* en el \xFAltimo punto tocado y la opci\xF3n de la p\xE1gina siguiente parec\xEDa seleccionada.
|
|
3837
|
+
* 6. Al final, un bloque de reglas propias del popup (fuente en los controles y padding del
|
|
3838
|
+
* radio nativo).
|
|
3839
|
+
*
|
|
3840
|
+
* Las variables --mf-* se dejan en :root a prop\xF3sito: el modal del priority-list se portea a
|
|
3841
|
+
* <body>, fuera de .deepdots-popup, y ah\xED las necesita.
|
|
3842
|
+
*
|
|
3843
|
+
* Para subir de versi\xF3n: npm i @magicfeedback/native@<v> && node scripts/vendor-survey-css.mjs
|
|
3844
|
+
*/
|
|
3845
|
+
|
|
3846
|
+
/**
|
|
3847
|
+
* @magicfeedback/native - Default Styles
|
|
3848
|
+
* Clean, minimal, and elegant survey rendering
|
|
3849
|
+
*/
|
|
3850
|
+
|
|
3851
|
+
/* @import de Google Fonts (Nunito) eliminado al vendorizar: la fuente la pone el popup. */
|
|
3852
|
+
|
|
3853
|
+
/* ========================================
|
|
3854
|
+
CSS VARIABLES - Design SYSTEM
|
|
3855
|
+
======================================== */
|
|
3856
|
+
:root {
|
|
3857
|
+
/* Colors - Minimal Pastel */
|
|
3858
|
+
/* --mf-primary is the one source of truth for brand/accent color \u2014
|
|
3859
|
+
every token below derives from it via color-mix() (or references
|
|
3860
|
+
it directly) so changing this single value, here or via a
|
|
3861
|
+
per-integration override, keeps hover/light/border states in
|
|
3862
|
+
sync automatically instead of going stale independently. Scoped
|
|
3863
|
+
to genuinely interactive/accent surfaces (buttons, selected
|
|
3864
|
+
chips, focus rings) \u2014 general body text stays on its own neutral
|
|
3865
|
+
scale below, not tied to the brand color. */
|
|
3866
|
+
--mf-primary: #5d7bad;
|
|
3867
|
+
--mf-primary-hover: color-mix(in srgb, var(--mf-primary) 85%, black);
|
|
3868
|
+
--mf-primary-light: color-mix(in srgb, var(--mf-primary) 15%, white);
|
|
3869
|
+
/* a translucent tint \u2014 mixed with transparent (opacity), not white,
|
|
3870
|
+
so it reads as a soft shadow of the brand color rather than a
|
|
3871
|
+
pastel of it. */
|
|
3872
|
+
--mf-primary-border: color-mix(in srgb, var(--mf-primary) 35%, transparent);
|
|
3873
|
+
|
|
3874
|
+
--mf-text-primary: #1E293B;
|
|
3875
|
+
--mf-text-secondary: #475569;
|
|
3876
|
+
--mf-text-muted: #94A3B8;
|
|
3877
|
+
|
|
3878
|
+
--mf-bg-primary: #F8FAFC;
|
|
3879
|
+
--mf-bg-secondary: #FFFFFF;
|
|
3880
|
+
--mf-bg-hover: #EEF2F6;
|
|
3881
|
+
|
|
3882
|
+
--mf-border: #E2E8F0;
|
|
3883
|
+
--mf-border-focus: var(--mf-primary);
|
|
3884
|
+
|
|
3885
|
+
--mf-success: #16A34A;
|
|
3886
|
+
--mf-error: #EF4444;
|
|
3887
|
+
--mf-warning: #F59E0B;
|
|
3888
|
+
|
|
3889
|
+
--mf-surface: #FFFFFF;
|
|
3890
|
+
--mf-surface-alt: #F1F5F9;
|
|
3891
|
+
--mf-accent: #38BDF8;
|
|
3892
|
+
|
|
3893
|
+
/* Spacing */
|
|
3894
|
+
--mf-space-xs: 0.25rem;
|
|
3895
|
+
--mf-space-sm: 0.5rem;
|
|
3896
|
+
--mf-space-md: 0.75rem;
|
|
3897
|
+
--mf-space-lg: 1rem;
|
|
3898
|
+
--mf-space-xl: 1.5rem;
|
|
3899
|
+
|
|
3900
|
+
/* Border Radius */
|
|
3901
|
+
--mf-radius-sm: 0.5rem;
|
|
3902
|
+
--mf-radius-md: 0.75rem;
|
|
3903
|
+
--mf-radius-lg: 1.25rem;
|
|
3904
|
+
--mf-radius-full: 9999px;
|
|
3905
|
+
|
|
3906
|
+
/* Shadows */
|
|
3907
|
+
--mf-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.06);
|
|
3908
|
+
--mf-shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
|
|
3909
|
+
--mf-shadow-lg: 0 16px 30px rgba(15, 23, 42, 0.12);
|
|
3910
|
+
--mf-shadow-focus: 0 0 0 3px rgba(30, 41, 59, 0.15);
|
|
3911
|
+
--mf-shadow-card: 0 18px 40px rgba(15, 23, 42, 0.08);
|
|
3912
|
+
|
|
3913
|
+
/* Typography */
|
|
3914
|
+
--mf-font-sans: "Nunito", "Quicksand", "Avenir Next", "Trebuchet MS", sans-serif;
|
|
3915
|
+
--mf-font-size-sm: 0.875rem;
|
|
3916
|
+
--mf-font-size-base: 1rem;
|
|
3917
|
+
--mf-font-size-lg: 1.125rem;
|
|
3918
|
+
--mf-font-size-xl: 1.25rem;
|
|
3919
|
+
--mf-line-height: 1.6;
|
|
3920
|
+
|
|
3921
|
+
/* Font Weights */
|
|
3922
|
+
--mf-font-weight-normal: 400;
|
|
3923
|
+
--mf-font-weight-medium: 500;
|
|
3924
|
+
--mf-font-weight-semibold: 600;
|
|
3925
|
+
--mf-font-weight-bold: 700;
|
|
3926
|
+
--mf-font-weight-extrabold: 800;
|
|
3927
|
+
|
|
3928
|
+
/* Transitions */
|
|
3929
|
+
--mf-transition: all 0.2s ease;
|
|
3930
|
+
--mf-transition-fast: all 0.15s ease;
|
|
3931
|
+
}
|
|
3932
|
+
|
|
3933
|
+
/* ========================================
|
|
3934
|
+
ANIMATIONS
|
|
3935
|
+
======================================== */
|
|
3936
|
+
@keyframes mf-fade-in {
|
|
3937
|
+
from {
|
|
3938
|
+
opacity: 0;
|
|
3939
|
+
transform: translateY(8px);
|
|
3940
|
+
}
|
|
3941
|
+
to {
|
|
3942
|
+
opacity: 1;
|
|
3943
|
+
transform: translateY(0);
|
|
3944
|
+
}
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3947
|
+
@keyframes mf-slide-in {
|
|
3948
|
+
from {
|
|
3949
|
+
opacity: 0;
|
|
3950
|
+
transform: translateX(-16px);
|
|
3951
|
+
}
|
|
3952
|
+
to {
|
|
3953
|
+
opacity: 1;
|
|
3954
|
+
transform: translateX(0);
|
|
3955
|
+
}
|
|
3956
|
+
}
|
|
3957
|
+
|
|
3958
|
+
@keyframes mf-scale-in {
|
|
3959
|
+
from {
|
|
3960
|
+
opacity: 0;
|
|
3961
|
+
transform: scale(0.95);
|
|
3962
|
+
}
|
|
3963
|
+
to {
|
|
3964
|
+
opacity: 1;
|
|
3965
|
+
transform: scale(1);
|
|
3966
|
+
}
|
|
3967
|
+
}
|
|
3968
|
+
|
|
3969
|
+
@keyframes mf-pulse {
|
|
3970
|
+
0%,
|
|
3971
|
+
100% {
|
|
3972
|
+
opacity: 1;
|
|
3973
|
+
}
|
|
3974
|
+
50% {
|
|
3975
|
+
opacity: 0.8;
|
|
3976
|
+
}
|
|
3977
|
+
}
|
|
3978
|
+
|
|
3979
|
+
/* ========================================
|
|
3980
|
+
BASE CONTAINER
|
|
3981
|
+
======================================== */
|
|
3982
|
+
.magicfeedback-container {
|
|
3983
|
+
/* Local: hereda la fuente del popup; --deepdots-font viene de PopupStyle.font. */
|
|
3984
|
+
font-family: var(--deepdots-font, inherit);
|
|
3985
|
+
color: var(--mf-text-primary);
|
|
3986
|
+
line-height: var(--mf-line-height);
|
|
3987
|
+
animation: mf-fade-in 0.4s ease-out;
|
|
3988
|
+
border-radius: var(--mf-radius-lg);
|
|
3989
|
+
}
|
|
3990
|
+
|
|
3991
|
+
/* ========================================
|
|
3992
|
+
MESSAGES
|
|
3993
|
+
======================================== */
|
|
3994
|
+
.magicfeedback-success-message,
|
|
3995
|
+
.magicfeedback-info-message,
|
|
3996
|
+
.magicfeedback-start-message {
|
|
3997
|
+
padding: var(--mf-space-lg);
|
|
3998
|
+
margin: var(--mf-space-lg) 0;
|
|
3999
|
+
animation: mf-scale-in 0.3s ease-out;
|
|
4000
|
+
}
|
|
4001
|
+
|
|
4002
|
+
/* .magicfeedback-info-message/-start-message are set via innerHTML (see
|
|
4003
|
+
renderInfoPage.ts / questions.service.ts's renderStartMessage) \u2014 whatever
|
|
4004
|
+
rich text a survey author writes lands here as real HTML, not just the
|
|
4005
|
+
<p>/<img> pair this used to style. Covering the rest of what a rich-text
|
|
4006
|
+
editor commonly outputs (headings, lists, links, emphasis, quotes, code,
|
|
4007
|
+
rules) keeps that content on the same type scale and palette as the rest
|
|
4008
|
+
of the widget instead of falling back to unstyled browser defaults. */
|
|
4009
|
+
.magicfeedback-success-message > :first-child,
|
|
4010
|
+
.magicfeedback-info-message > :first-child,
|
|
4011
|
+
.magicfeedback-start-message > :first-child {
|
|
4012
|
+
margin-top: 0;
|
|
4013
|
+
}
|
|
4014
|
+
|
|
4015
|
+
.magicfeedback-success-message > :last-child,
|
|
4016
|
+
.magicfeedback-info-message > :last-child,
|
|
4017
|
+
.magicfeedback-start-message > :last-child {
|
|
4018
|
+
margin-bottom: 0;
|
|
4019
|
+
}
|
|
4020
|
+
|
|
4021
|
+
.magicfeedback-success-message p,
|
|
4022
|
+
.magicfeedback-info-message p,
|
|
4023
|
+
.magicfeedback-start-message p {
|
|
4024
|
+
font-size: var(--mf-font-size-base);
|
|
4025
|
+
color: var(--mf-text-secondary);
|
|
4026
|
+
margin: 0 0 var(--mf-space-md);
|
|
4027
|
+
line-height: var(--mf-line-height);
|
|
4028
|
+
}
|
|
4029
|
+
|
|
4030
|
+
.magicfeedback-info-message h1,
|
|
4031
|
+
.magicfeedback-info-message h2,
|
|
4032
|
+
.magicfeedback-info-message h3,
|
|
4033
|
+
.magicfeedback-info-message h4,
|
|
4034
|
+
.magicfeedback-info-message h5,
|
|
4035
|
+
.magicfeedback-info-message h6,
|
|
4036
|
+
.magicfeedback-start-message h1,
|
|
4037
|
+
.magicfeedback-start-message h2,
|
|
4038
|
+
.magicfeedback-start-message h3,
|
|
4039
|
+
.magicfeedback-start-message h4,
|
|
4040
|
+
.magicfeedback-start-message h5,
|
|
4041
|
+
.magicfeedback-start-message h6 {
|
|
4042
|
+
color: var(--mf-text-primary);
|
|
4043
|
+
font-weight: var(--mf-font-weight-bold);
|
|
4044
|
+
line-height: 1.3;
|
|
4045
|
+
margin: var(--mf-space-lg) 0 var(--mf-space-sm);
|
|
4046
|
+
text-align: start;
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4049
|
+
.magicfeedback-info-message h1, .magicfeedback-start-message h1 { font-size: var(--mf-font-size-xl); }
|
|
4050
|
+
.magicfeedback-info-message h2, .magicfeedback-start-message h2 { font-size: var(--mf-font-size-lg); }
|
|
4051
|
+
.magicfeedback-info-message h3,
|
|
4052
|
+
.magicfeedback-info-message h4,
|
|
4053
|
+
.magicfeedback-info-message h5,
|
|
4054
|
+
.magicfeedback-info-message h6,
|
|
4055
|
+
.magicfeedback-start-message h3,
|
|
4056
|
+
.magicfeedback-start-message h4,
|
|
4057
|
+
.magicfeedback-start-message h5,
|
|
4058
|
+
.magicfeedback-start-message h6 { font-size: var(--mf-font-size-base); }
|
|
4059
|
+
|
|
4060
|
+
.magicfeedback-info-message strong,
|
|
4061
|
+
.magicfeedback-info-message b,
|
|
4062
|
+
.magicfeedback-start-message strong,
|
|
4063
|
+
.magicfeedback-start-message b {
|
|
4064
|
+
font-weight: var(--mf-font-weight-bold);
|
|
4065
|
+
color: var(--mf-text-primary);
|
|
4066
|
+
}
|
|
4067
|
+
|
|
4068
|
+
.magicfeedback-info-message a,
|
|
4069
|
+
.magicfeedback-start-message a {
|
|
4070
|
+
color: var(--mf-primary);
|
|
4071
|
+
text-decoration: underline;
|
|
4072
|
+
text-underline-offset: 2px;
|
|
4073
|
+
}
|
|
4074
|
+
|
|
4075
|
+
@media (hover: hover) {
|
|
4076
|
+
.magicfeedback-info-message a:hover,
|
|
4077
|
+
.magicfeedback-start-message a:hover {
|
|
4078
|
+
color: var(--mf-primary-hover);
|
|
4079
|
+
}
|
|
4080
|
+
}
|
|
4081
|
+
|
|
4082
|
+
.magicfeedback-info-message ul,
|
|
4083
|
+
.magicfeedback-info-message ol,
|
|
4084
|
+
.magicfeedback-start-message ul,
|
|
4085
|
+
.magicfeedback-start-message ol {
|
|
4086
|
+
margin: 0 0 var(--mf-space-md);
|
|
4087
|
+
padding-inline-start: var(--mf-space-xl);
|
|
4088
|
+
color: var(--mf-text-secondary);
|
|
4089
|
+
line-height: var(--mf-line-height);
|
|
4090
|
+
}
|
|
4091
|
+
|
|
4092
|
+
.magicfeedback-info-message li + li,
|
|
4093
|
+
.magicfeedback-start-message li + li {
|
|
4094
|
+
margin-top: var(--mf-space-xs);
|
|
4095
|
+
}
|
|
4096
|
+
|
|
4097
|
+
.magicfeedback-info-message blockquote,
|
|
4098
|
+
.magicfeedback-start-message blockquote {
|
|
4099
|
+
margin: 0 0 var(--mf-space-md);
|
|
4100
|
+
padding: var(--mf-space-sm) var(--mf-space-md);
|
|
4101
|
+
border-inline-start: 3px solid var(--mf-primary-border);
|
|
4102
|
+
color: var(--mf-text-secondary);
|
|
4103
|
+
font-style: italic;
|
|
4104
|
+
}
|
|
4105
|
+
|
|
4106
|
+
.magicfeedback-info-message code,
|
|
4107
|
+
.magicfeedback-start-message code {
|
|
4108
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
4109
|
+
font-size: 0.9em;
|
|
4110
|
+
background: var(--mf-bg-hover);
|
|
4111
|
+
padding: 0.15em 0.4em;
|
|
4112
|
+
border-radius: var(--mf-radius-sm);
|
|
4113
|
+
}
|
|
4114
|
+
|
|
4115
|
+
.magicfeedback-info-message pre,
|
|
4116
|
+
.magicfeedback-start-message pre {
|
|
4117
|
+
margin: 0 0 var(--mf-space-md);
|
|
4118
|
+
padding: var(--mf-space-md);
|
|
4119
|
+
background: var(--mf-bg-hover);
|
|
4120
|
+
border-radius: var(--mf-radius-md);
|
|
4121
|
+
overflow-x: auto;
|
|
4122
|
+
}
|
|
4123
|
+
|
|
4124
|
+
.magicfeedback-info-message pre code,
|
|
4125
|
+
.magicfeedback-start-message pre code {
|
|
4126
|
+
background: none;
|
|
4127
|
+
padding: 0;
|
|
4128
|
+
}
|
|
4129
|
+
|
|
4130
|
+
.magicfeedback-info-message hr,
|
|
4131
|
+
.magicfeedback-start-message hr {
|
|
4132
|
+
border: none;
|
|
4133
|
+
border-top: 1px solid var(--mf-border);
|
|
4134
|
+
margin: var(--mf-space-lg) 0;
|
|
4135
|
+
}
|
|
4136
|
+
|
|
4137
|
+
.magicfeedback-success-message img,
|
|
4138
|
+
.magicfeedback-info-message img,
|
|
4139
|
+
.magicfeedback-start-message img {
|
|
4140
|
+
max-width: 100%;
|
|
4141
|
+
height: auto;
|
|
4142
|
+
margin: var(--mf-space-lg) auto;
|
|
4143
|
+
display: block;
|
|
4144
|
+
border-radius: var(--mf-radius-md);
|
|
4145
|
+
}
|
|
4146
|
+
|
|
4147
|
+
.magicfeedback-image {
|
|
4148
|
+
max-height: 400px;
|
|
4149
|
+
height: auto;
|
|
4150
|
+
max-width: 100%;
|
|
4151
|
+
margin: var(--mf-space-lg) auto;
|
|
4152
|
+
display: block;
|
|
4153
|
+
border-radius: var(--mf-radius-md);
|
|
4154
|
+
}
|
|
4155
|
+
|
|
4156
|
+
/* ========================================
|
|
4157
|
+
FORM STRUCTURE
|
|
4158
|
+
======================================== */
|
|
4159
|
+
.magicfeedback-form {
|
|
4160
|
+
display: flex;
|
|
4161
|
+
flex-direction: column;
|
|
4162
|
+
gap: var(--mf-space-lg);
|
|
4163
|
+
padding: clamp(16px, 2.5vw, 28px);
|
|
4164
|
+
}
|
|
4165
|
+
|
|
4166
|
+
.magicfeedback-questions {
|
|
4167
|
+
display: flex;
|
|
4168
|
+
flex-direction: column;
|
|
4169
|
+
gap: var(--mf-space-xl);
|
|
4170
|
+
width: 100%;
|
|
4171
|
+
}
|
|
4172
|
+
|
|
4173
|
+
.magicfeedback-div {
|
|
4174
|
+
display: flex;
|
|
4175
|
+
flex-direction: column;
|
|
4176
|
+
gap: var(--mf-space-sm);
|
|
4177
|
+
animation: mf-slide-in 0.3s ease-out;
|
|
4178
|
+
background: var(--mf-bg-secondary);
|
|
4179
|
+
border-radius: var(--mf-radius-md);
|
|
4180
|
+
}
|
|
4181
|
+
|
|
4182
|
+
/* ========================================
|
|
4183
|
+
LABELS & TYPOGRAPHY
|
|
4184
|
+
======================================== */
|
|
4185
|
+
.magicfeedback-label {
|
|
4186
|
+
font-size: var(--mf-font-size-lg);
|
|
4187
|
+
font-weight: var(--mf-font-weight-bold);
|
|
4188
|
+
color: var(--mf-text-primary);
|
|
4189
|
+
line-height: var(--mf-line-height);
|
|
4190
|
+
text-align: start;
|
|
4191
|
+
letter-spacing: -0.01em;
|
|
4192
|
+
}
|
|
4193
|
+
|
|
4194
|
+
.magicfeedback-sublabel {
|
|
4195
|
+
font-size: var(--mf-font-size-base);
|
|
4196
|
+
font-weight: var(--mf-font-weight-normal);
|
|
4197
|
+
color: var(--mf-text-secondary);
|
|
4198
|
+
margin-bottom: var(--mf-space-sm);
|
|
4199
|
+
}
|
|
4200
|
+
|
|
4201
|
+
.deepdots-popup h2 {
|
|
4202
|
+
font-size: var(--mf-font-size-xl);
|
|
4203
|
+
font-weight: 600;
|
|
4204
|
+
color: var(--mf-text-primary);
|
|
4205
|
+
margin: 0 0 var(--mf-space-xl) 0;
|
|
4206
|
+
text-align: center;
|
|
4207
|
+
letter-spacing: -0.01em;
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4210
|
+
.deepdots-popup p {
|
|
4211
|
+
margin: 0;
|
|
4212
|
+
font-size: var(--mf-font-size-sm);
|
|
4213
|
+
color: var(--mf-text-secondary);
|
|
4214
|
+
}
|
|
4215
|
+
|
|
4216
|
+
/* ========================================
|
|
4217
|
+
FORM INPUTS
|
|
4218
|
+
======================================== */
|
|
4219
|
+
.deepdots-popup input[type="date"],
|
|
4220
|
+
.deepdots-popup input[type="text"],
|
|
4221
|
+
.deepdots-popup input[type="number"],
|
|
4222
|
+
.deepdots-popup input[type="email"],
|
|
4223
|
+
.deepdots-popup input[type="password"],
|
|
4224
|
+
.deepdots-popup textarea,
|
|
4225
|
+
.deepdots-popup select {
|
|
4226
|
+
padding: 0.75rem 0.9rem;
|
|
4227
|
+
font-size: var(--mf-font-size-base);
|
|
4228
|
+
font-family: inherit;
|
|
4229
|
+
color: var(--mf-text-primary);
|
|
4230
|
+
background-color: var(--mf-surface);
|
|
4231
|
+
border: 2px solid var(--mf-border);
|
|
4232
|
+
border-radius: var(--mf-radius-md);
|
|
4233
|
+
outline: none;
|
|
4234
|
+
transition: var(--mf-transition);
|
|
4235
|
+
-webkit-appearance: none;
|
|
4236
|
+
appearance: none;
|
|
4237
|
+
box-shadow: var(--mf-shadow-sm);
|
|
4238
|
+
}
|
|
4239
|
+
|
|
4240
|
+
.deepdots-popup textarea {
|
|
4241
|
+
min-height: 100px;
|
|
4242
|
+
resize: vertical;
|
|
4243
|
+
}
|
|
4244
|
+
|
|
4245
|
+
.deepdots-popup input::placeholder,
|
|
4246
|
+
.deepdots-popup textarea::placeholder {
|
|
4247
|
+
color: var(--mf-text-muted);
|
|
4248
|
+
}
|
|
4249
|
+
|
|
4250
|
+
/* Remove number input spinners */
|
|
4251
|
+
.deepdots-popup input::-webkit-outer-spin-button,
|
|
4252
|
+
.deepdots-popup input::-webkit-inner-spin-button {
|
|
4253
|
+
-webkit-appearance: none;
|
|
4254
|
+
margin: 0;
|
|
4255
|
+
}
|
|
4256
|
+
|
|
4257
|
+
.deepdots-popup input[type="number"] {
|
|
4258
|
+
/* -moz-appearance: textfield; removed for lint compatibility */
|
|
4259
|
+
}
|
|
4260
|
+
|
|
4261
|
+
/* Email @ button (assets.atButton). --mf-secondary is defined by MagicSurvey;
|
|
4262
|
+
the fallback is the same #2E2E2E. */
|
|
4263
|
+
.magicfeedback-email-container {
|
|
4264
|
+
display: flex;
|
|
4265
|
+
flex-direction: column;
|
|
4266
|
+
gap: var(--mf-space-sm);
|
|
4267
|
+
}
|
|
4268
|
+
|
|
4269
|
+
.magicfeedback-email-row {
|
|
4270
|
+
display: flex;
|
|
4271
|
+
align-items: stretch;
|
|
4272
|
+
gap: var(--mf-space-sm);
|
|
4273
|
+
}
|
|
4274
|
+
|
|
4275
|
+
.magicfeedback-email-row input[type="email"] {
|
|
4276
|
+
flex: 1 1 auto;
|
|
4277
|
+
min-width: 0;
|
|
4278
|
+
}
|
|
4279
|
+
|
|
4280
|
+
.magicfeedback-email-inset {
|
|
4281
|
+
position: relative;
|
|
4282
|
+
}
|
|
4283
|
+
|
|
4284
|
+
.magicfeedback-email-inset input[type="email"] {
|
|
4285
|
+
width: 100%;
|
|
4286
|
+
box-sizing: border-box;
|
|
4287
|
+
padding-inline-end: 3.6rem;
|
|
4288
|
+
}
|
|
4289
|
+
|
|
4290
|
+
.magicfeedback-email-row input[type="email"]:focus,
|
|
4291
|
+
.magicfeedback-email-inset input[type="email"]:focus {
|
|
4292
|
+
border-color: var(--mf-border-focus);
|
|
4293
|
+
}
|
|
4294
|
+
|
|
4295
|
+
.magicfeedback-email-at {
|
|
4296
|
+
flex: none;
|
|
4297
|
+
aspect-ratio: 1;
|
|
4298
|
+
align-self: stretch;
|
|
4299
|
+
min-width: 46px;
|
|
4300
|
+
display: grid;
|
|
4301
|
+
place-items: center;
|
|
4302
|
+
padding: 0;
|
|
4303
|
+
font-family: inherit;
|
|
4304
|
+
font-size: 1.35rem;
|
|
4305
|
+
font-weight: var(--mf-font-weight-extrabold);
|
|
4306
|
+
line-height: 1;
|
|
4307
|
+
color: #FFFFFF;
|
|
4308
|
+
background-color: var(--mf-secondary, #2E2E2E);
|
|
4309
|
+
border: 2px solid var(--mf-secondary, #2E2E2E);
|
|
4310
|
+
border-radius: var(--mf-radius-full);
|
|
4311
|
+
cursor: pointer;
|
|
4312
|
+
box-shadow: var(--mf-shadow-sm);
|
|
4313
|
+
-webkit-tap-highlight-color: transparent;
|
|
4314
|
+
touch-action: manipulation;
|
|
4315
|
+
-webkit-user-select: none;
|
|
4316
|
+
user-select: none;
|
|
4317
|
+
transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
|
|
4318
|
+
}
|
|
4319
|
+
|
|
4320
|
+
.magicfeedback-email-at:active {
|
|
4321
|
+
background-color: color-mix(in srgb, var(--mf-secondary, #2E2E2E) 85%, black);
|
|
4322
|
+
transform: scale(0.92);
|
|
4323
|
+
box-shadow: none;
|
|
4324
|
+
}
|
|
4325
|
+
|
|
4326
|
+
.magicfeedback-email-at:focus-visible {
|
|
4327
|
+
outline: 3px solid var(--mf-primary-border);
|
|
4328
|
+
outline-offset: 2px;
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
.magicfeedback-email-inset .magicfeedback-email-at {
|
|
4332
|
+
position: absolute;
|
|
4333
|
+
inset-inline-end: 7px;
|
|
4334
|
+
top: 50%;
|
|
4335
|
+
transform: translateY(-50%);
|
|
4336
|
+
width: 2.5rem;
|
|
4337
|
+
height: 2.5rem;
|
|
4338
|
+
min-width: 0;
|
|
4339
|
+
aspect-ratio: auto;
|
|
4340
|
+
font-size: 1.15rem;
|
|
4341
|
+
color: var(--mf-text-primary);
|
|
4342
|
+
background-color: var(--mf-surface-alt);
|
|
4343
|
+
border: 1px solid var(--mf-border);
|
|
4344
|
+
box-shadow: none;
|
|
4345
|
+
}
|
|
4346
|
+
|
|
4347
|
+
.magicfeedback-email-inset .magicfeedback-email-at:active {
|
|
4348
|
+
transform: translateY(-50%) scale(0.9);
|
|
4349
|
+
color: var(--mf-primary);
|
|
4350
|
+
background-color: var(--mf-primary-light);
|
|
4351
|
+
border-color: var(--mf-primary-border);
|
|
4352
|
+
}
|
|
4353
|
+
|
|
4354
|
+
.magicfeedback-email-hint {
|
|
4355
|
+
margin: 0;
|
|
4356
|
+
font-size: var(--mf-font-size-sm);
|
|
4357
|
+
line-height: 1.45;
|
|
4358
|
+
color: var(--mf-text-secondary);
|
|
4359
|
+
}
|
|
4360
|
+
|
|
4361
|
+
.magicfeedback-email-hint b {
|
|
4362
|
+
font-weight: var(--mf-font-weight-extrabold);
|
|
4363
|
+
color: var(--mf-text-primary);
|
|
4364
|
+
}
|
|
4365
|
+
|
|
4366
|
+
/* Custom Select Arrow */
|
|
4367
|
+
.deepdots-popup select {
|
|
4368
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
|
|
4369
|
+
background-repeat: no-repeat;
|
|
4370
|
+
background-position: right var(--mf-space-md) center;
|
|
4371
|
+
padding-inline-end: var(--mf-space-xl);
|
|
4372
|
+
}
|
|
4373
|
+
|
|
4374
|
+
/* Error State */
|
|
4375
|
+
.deepdots-popup input.error,
|
|
4376
|
+
.deepdots-popup select.error,
|
|
4377
|
+
.deepdots-popup textarea.error {
|
|
4378
|
+
border-color: var(--mf-error);
|
|
4379
|
+
}
|
|
4380
|
+
|
|
4381
|
+
.magicfeedback-error {
|
|
4382
|
+
margin-top: var(--mf-space-xs);
|
|
4383
|
+
font-size: var(--mf-font-size-sm);
|
|
4384
|
+
color: var(--mf-error);
|
|
4385
|
+
}
|
|
4386
|
+
|
|
4387
|
+
/* ========================================
|
|
4388
|
+
CHECKBOX & RADIO OPTIONS
|
|
4389
|
+
======================================== */
|
|
4390
|
+
.magicfeedback-checkbox,
|
|
4391
|
+
div.magicfeedback-radio {
|
|
4392
|
+
display: flex;
|
|
4393
|
+
flex-direction: column;
|
|
4394
|
+
gap: var(--mf-space-sm);
|
|
4395
|
+
width: 100%;
|
|
4396
|
+
}
|
|
4397
|
+
|
|
4398
|
+
/* Single choice in a row (assets.direction "row"): one equal box per
|
|
4399
|
+
option. The "other" text field wraps to its own line below. Stacked
|
|
4400
|
+
(phone, or too narrow) it is the usual vertical list again. */
|
|
4401
|
+
.magicfeedback-radio--row {
|
|
4402
|
+
flex-direction: row;
|
|
4403
|
+
flex-wrap: wrap;
|
|
4404
|
+
}
|
|
4405
|
+
|
|
4406
|
+
.magicfeedback-radio--row > .magicfeedback-radio-container {
|
|
4407
|
+
flex: 1 1 0;
|
|
4408
|
+
min-width: 0;
|
|
4409
|
+
}
|
|
4410
|
+
|
|
4411
|
+
.magicfeedback-radio--row > .magicfeedback-extra-option {
|
|
4412
|
+
flex-basis: 100%;
|
|
4413
|
+
}
|
|
4414
|
+
|
|
4415
|
+
.magicfeedback-radio--row.magicfeedback-radio--stacked {
|
|
4416
|
+
flex-direction: column;
|
|
4417
|
+
flex-wrap: nowrap;
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4420
|
+
.magicfeedback-radio--row.magicfeedback-radio--stacked > .magicfeedback-radio-container {
|
|
4421
|
+
flex: none;
|
|
4422
|
+
}
|
|
4423
|
+
|
|
4424
|
+
.magicfeedback-radio--row .magicfeedback-radio-container label {
|
|
4425
|
+
overflow-wrap: anywhere;
|
|
4426
|
+
}
|
|
4427
|
+
|
|
4428
|
+
.magicfeedback-checkbox-container,
|
|
4429
|
+
.magicfeedback-radio-container {
|
|
4430
|
+
display: flex;
|
|
4431
|
+
align-items: center;
|
|
4432
|
+
gap: var(--mf-space-sm);
|
|
4433
|
+
padding: var(--mf-space-md);
|
|
4434
|
+
border: 1.5px solid var(--mf-border);
|
|
4435
|
+
border-radius: var(--mf-radius-md);
|
|
4436
|
+
cursor: pointer;
|
|
4437
|
+
transition: var(--mf-transition-fast);
|
|
4438
|
+
}
|
|
4439
|
+
|
|
4440
|
+
@media (hover: hover) {
|
|
4441
|
+
.magicfeedback-checkbox-container:hover,
|
|
4442
|
+
.magicfeedback-radio-container:hover {
|
|
4443
|
+
background-color: var(--mf-bg-hover);
|
|
4444
|
+
border-color: var(--mf-primary);
|
|
4445
|
+
}
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
.magicfeedback-checkbox-container:has(input:checked),
|
|
4449
|
+
.magicfeedback-radio-container:has(input:checked) {
|
|
4450
|
+
background-color: var(--mf-primary-light);
|
|
4451
|
+
border-color: var(--mf-primary);
|
|
4452
|
+
}
|
|
4453
|
+
|
|
4454
|
+
.magicfeedback-checkbox input[type="checkbox"],
|
|
4455
|
+
.magicfeedback-radio-container input[type="radio"] {
|
|
4456
|
+
width: 18px;
|
|
4457
|
+
height: 18px;
|
|
4458
|
+
margin: 0;
|
|
4459
|
+
cursor: pointer;
|
|
4460
|
+
flex-shrink: 0;
|
|
4461
|
+
accent-color: var(--mf-primary);
|
|
4462
|
+
}
|
|
4463
|
+
|
|
4464
|
+
.magicfeedback-checkbox label,
|
|
4465
|
+
.magicfeedback-radio-container label {
|
|
4466
|
+
font-size: var(--mf-font-size-base);
|
|
4467
|
+
text-align: start;
|
|
4468
|
+
color: var(--mf-text-primary);
|
|
4469
|
+
cursor: pointer;
|
|
4470
|
+
margin: 0;
|
|
4471
|
+
flex: 1;
|
|
4472
|
+
}
|
|
4473
|
+
|
|
4474
|
+
/* ========================================
|
|
4475
|
+
BOOLEAN OPTIONS
|
|
4476
|
+
======================================== */
|
|
4477
|
+
.magicfeedback-boolean-container {
|
|
4478
|
+
display: flex;
|
|
4479
|
+
gap: var(--mf-space-md);
|
|
4480
|
+
width: 100%;
|
|
4481
|
+
}
|
|
4482
|
+
|
|
4483
|
+
.magicfeedback-boolean-option {
|
|
4484
|
+
flex: 1;
|
|
4485
|
+
position: relative;
|
|
4486
|
+
}
|
|
4487
|
+
|
|
4488
|
+
.magicfeedback-boolean-option input[type="radio"] {
|
|
4489
|
+
position: absolute;
|
|
4490
|
+
opacity: 0;
|
|
4491
|
+
width: 0;
|
|
4492
|
+
height: 0;
|
|
4493
|
+
}
|
|
4494
|
+
|
|
4495
|
+
.magicfeedback-boolean-option label {
|
|
4496
|
+
display: flex;
|
|
4497
|
+
align-items: center;
|
|
4498
|
+
justify-content: center;
|
|
4499
|
+
padding: var(--mf-space-md);
|
|
4500
|
+
font-size: var(--mf-font-size-base);
|
|
4501
|
+
font-weight: 500;
|
|
4502
|
+
color: var(--mf-text-secondary);
|
|
4503
|
+
border: 1.5px solid var(--mf-border);
|
|
4504
|
+
border-radius: var(--mf-radius-md);
|
|
4505
|
+
cursor: pointer;
|
|
4506
|
+
transition: var(--mf-transition-fast);
|
|
4507
|
+
margin: 0;
|
|
4508
|
+
width: -webkit-fill-available;
|
|
4509
|
+
height: inherit;
|
|
4510
|
+
}
|
|
4511
|
+
|
|
4512
|
+
@media (hover: hover) {
|
|
4513
|
+
.magicfeedback-boolean-option label:hover {
|
|
4514
|
+
background-color: var(--mf-bg-hover);
|
|
4515
|
+
border-color: var(--mf-primary);
|
|
4516
|
+
}
|
|
4517
|
+
}
|
|
4518
|
+
|
|
4519
|
+
.magicfeedback-boolean-option input[type="radio"]:checked + label {
|
|
4520
|
+
color: var(--mf-primary);
|
|
4521
|
+
background-color: var(--mf-primary-light);
|
|
4522
|
+
border-color: var(--mf-primary);
|
|
4523
|
+
font-weight: 600;
|
|
4524
|
+
}
|
|
4525
|
+
|
|
4526
|
+
/* ========================================
|
|
4527
|
+
RATING SYSTEMS
|
|
4528
|
+
======================================== */
|
|
4529
|
+
.magicfeedback-rating,
|
|
4530
|
+
.magicfeedback-rating-number,
|
|
4531
|
+
.magicfeedback-rating-star {
|
|
4532
|
+
width: 100%;
|
|
4533
|
+
}
|
|
4534
|
+
|
|
4535
|
+
.magicfeedback-rating-container,
|
|
4536
|
+
.magicfeedback-rating-number-container,
|
|
4537
|
+
.magicfeedback-rating-star-container {
|
|
4538
|
+
display: flex;
|
|
4539
|
+
flex-wrap: wrap;
|
|
4540
|
+
gap: var(--mf-space-sm);
|
|
4541
|
+
justify-content: center;
|
|
4542
|
+
align-items: center;
|
|
4543
|
+
padding: var(--mf-space-md) 0;
|
|
4544
|
+
list-style: none;
|
|
4545
|
+
margin: 0;
|
|
4546
|
+
}
|
|
4547
|
+
|
|
4548
|
+
/* Caption line below the row \u2014 min on one side, max on the other (swapped
|
|
4549
|
+
for order: "rtl") \u2014 same simple, non-responsive pattern as the
|
|
4550
|
+
rating-number row caption. Used by rating-star and rating-emoji. */
|
|
4551
|
+
.magicfeedback-rating-placeholder {
|
|
4552
|
+
display: flex;
|
|
4553
|
+
justify-content: space-between;
|
|
4554
|
+
gap: var(--mf-space-md);
|
|
4555
|
+
width: 100%;
|
|
4556
|
+
margin-top: var(--mf-space-sm);
|
|
4557
|
+
font-size: var(--mf-font-size-sm);
|
|
4558
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
4559
|
+
color: var(--mf-text-secondary);
|
|
4560
|
+
}
|
|
4561
|
+
|
|
4562
|
+
.magicfeedback-rating-placeholder-value {
|
|
4563
|
+
overflow-wrap: anywhere;
|
|
4564
|
+
}
|
|
4565
|
+
|
|
4566
|
+
.magicfeedback-rating-placeholder-value:last-child {
|
|
4567
|
+
text-align: end;
|
|
4568
|
+
}
|
|
4569
|
+
|
|
4570
|
+
/* Rating with Images */
|
|
4571
|
+
.magicfeedback-rating-option-label-container input[type="radio"] {
|
|
4572
|
+
position: absolute;
|
|
4573
|
+
opacity: 0;
|
|
4574
|
+
width: 0;
|
|
4575
|
+
height: 0;
|
|
4576
|
+
}
|
|
4577
|
+
|
|
4578
|
+
.magicfeedback-rating-option-label-container img {
|
|
4579
|
+
width: 56px;
|
|
4580
|
+
height: 56px;
|
|
4581
|
+
cursor: pointer;
|
|
4582
|
+
transition: var(--mf-transition-fast);
|
|
4583
|
+
border-radius: var(--mf-radius-full);
|
|
4584
|
+
border: 2px solid transparent;
|
|
4585
|
+
}
|
|
4586
|
+
|
|
4587
|
+
@media (hover: hover) {
|
|
4588
|
+
.magicfeedback-rating-option-label-container img:hover {
|
|
4589
|
+
transform: scale(1.1);
|
|
4590
|
+
border-color: var(--mf-primary);
|
|
4591
|
+
}
|
|
4592
|
+
}
|
|
4593
|
+
|
|
4594
|
+
.magicfeedback-rating-option-label-container input[type="radio"]:checked + img {
|
|
4595
|
+
border-color: var(--mf-primary);
|
|
4596
|
+
box-shadow: 0 0 0 3px var(--mf-primary-light);
|
|
4597
|
+
}
|
|
4598
|
+
|
|
4599
|
+
.magicfeedback-rating-option-label-container label {
|
|
4600
|
+
display: block;
|
|
4601
|
+
text-align: center;
|
|
4602
|
+
font-size: var(--mf-font-size-sm);
|
|
4603
|
+
color: var(--mf-text-secondary);
|
|
4604
|
+
margin-top: var(--mf-space-xs);
|
|
4605
|
+
cursor: pointer;
|
|
4606
|
+
}
|
|
4607
|
+
|
|
4608
|
+
/* Rating Numbers \u2014 each option is its own outlined chip in the survey's
|
|
4609
|
+
primary color, with a gap between them. Row and column use the same
|
|
4610
|
+
chip; column additionally has room to show each option's own text
|
|
4611
|
+
plainly next to its number. */
|
|
4612
|
+
|
|
4613
|
+
/* Every size here is width:100%/flex:1 combined with the chip's own
|
|
4614
|
+
padding and border. Without border-box, the browser's default
|
|
4615
|
+
content-box adds that padding/border on TOP of the declared size, so
|
|
4616
|
+
the chip quietly overflows past its flex slot \u2014 reading as "not quite
|
|
4617
|
+
full width" or, worse, pushing into the next chip. */
|
|
4618
|
+
.magicfeedback-rating-number-container,
|
|
4619
|
+
.magicfeedback-rating-number-option,
|
|
4620
|
+
.magicfeedback-rating-number-option-label-container,
|
|
4621
|
+
.magicfeedback-rating-number-value {
|
|
4622
|
+
box-sizing: border-box;
|
|
4623
|
+
}
|
|
4624
|
+
|
|
4625
|
+
/* The shared rating-container rule (above, reused by star rating) sets
|
|
4626
|
+
align-items:center for its row-of-chips layout \u2014 in a stacked column
|
|
4627
|
+
that still nudges a 100%-wide chip inward instead of a true 0 offset.
|
|
4628
|
+
Force stretch so every chip fills the exact same width, flush on
|
|
4629
|
+
both sides. */
|
|
4630
|
+
.magicfeedback-rating-number-container-column,
|
|
4631
|
+
.magicfeedback-rating-number-container-column-reverse {
|
|
4632
|
+
align-items: stretch;
|
|
4633
|
+
}
|
|
4634
|
+
|
|
4635
|
+
/* Caption line below the row \u2014 the single place min/max labels live
|
|
4636
|
+
for row mode, shared by mobile and desktop. */
|
|
4637
|
+
.magicfeedback-rating-number-scale-labels {
|
|
4638
|
+
display: flex;
|
|
4639
|
+
justify-content: space-between;
|
|
4640
|
+
gap: var(--mf-space-md);
|
|
4641
|
+
margin-top: var(--mf-space-sm);
|
|
4642
|
+
font-size: var(--mf-font-size-sm);
|
|
4643
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
4644
|
+
color: var(--mf-text-secondary);
|
|
4645
|
+
}
|
|
4646
|
+
|
|
4647
|
+
.magicfeedback-rating-number-scale-label {
|
|
4648
|
+
overflow-wrap: anywhere;
|
|
4649
|
+
}
|
|
4650
|
+
|
|
4651
|
+
/* assets.minMaxPlaceholderPosition: the caption above or below the row. */
|
|
4652
|
+
.magicfeedback-rating-number-scale-labels--top {
|
|
4653
|
+
margin-top: 0;
|
|
4654
|
+
margin-bottom: var(--mf-space-sm);
|
|
4655
|
+
}
|
|
4656
|
+
|
|
4657
|
+
.magicfeedback-rating-number-scale-labels--bottom {
|
|
4658
|
+
margin-top: var(--mf-space-sm);
|
|
4659
|
+
margin-bottom: 0;
|
|
4660
|
+
}
|
|
4661
|
+
|
|
4662
|
+
/* Row with a text per number: the text sits above each chip (below with
|
|
4663
|
+
numberPlaceholdersPosition "bottom"). The option is a column laid out
|
|
4664
|
+
inline; this only spaces and styles the text. */
|
|
4665
|
+
.magicfeedback-rating-number-option--captioned {
|
|
4666
|
+
gap: var(--mf-space-xs);
|
|
4667
|
+
}
|
|
4668
|
+
|
|
4669
|
+
.magicfeedback-rating-number-option-caption {
|
|
4670
|
+
font-size: var(--mf-font-size-sm);
|
|
4671
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
4672
|
+
color: var(--mf-text-secondary);
|
|
4673
|
+
text-align: center;
|
|
4674
|
+
line-height: 1.25;
|
|
4675
|
+
overflow-wrap: anywhere;
|
|
4676
|
+
cursor: pointer;
|
|
4677
|
+
}
|
|
4678
|
+
|
|
4679
|
+
.magicfeedback-rating-number-scale-label:last-child {
|
|
4680
|
+
text-align: end;
|
|
4681
|
+
}
|
|
4682
|
+
|
|
4683
|
+
/* Column, no per-option text: each row is its own separated chip, so
|
|
4684
|
+
the min/max labels bookend the stack from outside it \u2014 one line
|
|
4685
|
+
above the first chip, one below the last. Margin goes on whichever
|
|
4686
|
+
side actually faces the list \u2014 the "before" label (always the first
|
|
4687
|
+
child) gets space below it, the "after" one (always right after the
|
|
4688
|
+
container, extra option row or not) gets space above it \u2014 so both
|
|
4689
|
+
sit the same distance from the chips regardless of which one it is. */
|
|
4690
|
+
.magicfeedback-rating-number-scale-label-block {
|
|
4691
|
+
font-size: var(--mf-font-size-sm);
|
|
4692
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
4693
|
+
color: var(--mf-text-secondary);
|
|
4694
|
+
text-align: center;
|
|
4695
|
+
}
|
|
4696
|
+
|
|
4697
|
+
.magicfeedback-rating-number-scale-label-block:first-child {
|
|
4698
|
+
margin-bottom: var(--mf-space-sm);
|
|
4699
|
+
}
|
|
4700
|
+
|
|
4701
|
+
.magicfeedback-rating-number-container + .magicfeedback-rating-number-scale-label-block {
|
|
4702
|
+
margin-top: var(--mf-space-sm);
|
|
4703
|
+
}
|
|
4704
|
+
|
|
4705
|
+
.magicfeedback-rating-number-option {
|
|
4706
|
+
display: flex;
|
|
4707
|
+
}
|
|
4708
|
+
|
|
4709
|
+
.magicfeedback-rating-number-option-label-container {
|
|
4710
|
+
position: relative;
|
|
4711
|
+
width: 100%;
|
|
4712
|
+
display: flex;
|
|
4713
|
+
cursor: pointer;
|
|
4714
|
+
}
|
|
4715
|
+
|
|
4716
|
+
.magicfeedback-rating-number-option-label-container input[type="radio"] {
|
|
4717
|
+
position: absolute;
|
|
4718
|
+
opacity: 0;
|
|
4719
|
+
width: 0;
|
|
4720
|
+
height: 0;
|
|
4721
|
+
}
|
|
4722
|
+
|
|
4723
|
+
.magicfeedback-rating-number-value {
|
|
4724
|
+
display: flex;
|
|
4725
|
+
align-items: center;
|
|
4726
|
+
justify-content: center;
|
|
4727
|
+
width: 100%;
|
|
4728
|
+
transition: var(--mf-transition-fast);
|
|
4729
|
+
color: var(--mf-text-secondary);
|
|
4730
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
4731
|
+
}
|
|
4732
|
+
|
|
4733
|
+
/* Row: individual outlined chips in the survey's own primary color \u2014
|
|
4734
|
+
var(--mf-primary) so whatever brand color a given survey sets carries
|
|
4735
|
+
through automatically, no color hardcoded here. */
|
|
4736
|
+
.magicfeedback-rating-number-container-row,
|
|
4737
|
+
.magicfeedback-rating-number-container-row-reverse {
|
|
4738
|
+
flex-wrap: nowrap;
|
|
4739
|
+
gap: var(--mf-space-sm);
|
|
4740
|
+
}
|
|
4741
|
+
|
|
4742
|
+
.magicfeedback-rating-number-option-row,
|
|
4743
|
+
.magicfeedback-rating-number-option-row-reverse {
|
|
4744
|
+
flex: 1 1 0;
|
|
4745
|
+
min-width: 0;
|
|
4746
|
+
}
|
|
4747
|
+
|
|
4748
|
+
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-value,
|
|
4749
|
+
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-value {
|
|
4750
|
+
min-height: 56px;
|
|
4751
|
+
padding: var(--mf-space-sm);
|
|
4752
|
+
border: 2px solid var(--mf-primary-border);
|
|
4753
|
+
border-radius: var(--mf-radius-md);
|
|
4754
|
+
background: var(--mf-bg-secondary);
|
|
4755
|
+
color: var(--mf-primary);
|
|
4756
|
+
font-size: var(--mf-font-size-lg);
|
|
4757
|
+
font-weight: var(--mf-font-weight-bold);
|
|
4758
|
+
}
|
|
4759
|
+
|
|
4760
|
+
/* More than 6 options (e.g. a 0-10 NPS scale): still one row, never
|
|
4761
|
+
wraps \u2014 but scaled down on purpose, so it reads as a compact chip
|
|
4762
|
+
rather than the same 56px button stretched thin. */
|
|
4763
|
+
.magicfeedback-rating-number-container-row--dense .magicfeedback-rating-number-option-row .magicfeedback-rating-number-value,
|
|
4764
|
+
.magicfeedback-rating-number-container-row--dense .magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-value {
|
|
4765
|
+
min-height: 36px;
|
|
4766
|
+
padding: var(--mf-space-xs);
|
|
4767
|
+
border-radius: var(--mf-radius-sm);
|
|
4768
|
+
font-size: 0.8rem;
|
|
4769
|
+
}
|
|
4770
|
+
|
|
4771
|
+
@media (hover: hover) {
|
|
4772
|
+
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value,
|
|
4773
|
+
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value {
|
|
4774
|
+
background: var(--mf-primary-light);
|
|
4775
|
+
}
|
|
4776
|
+
}
|
|
4777
|
+
|
|
4778
|
+
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
4779
|
+
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
4780
|
+
color: #fff;
|
|
4781
|
+
background-color: var(--mf-primary);
|
|
4782
|
+
box-shadow: var(--mf-shadow-md);
|
|
4783
|
+
}
|
|
4784
|
+
|
|
4785
|
+
/* Extra option: always its own row below the scale, and styled like every
|
|
4786
|
+
other chip now \u2014 "doesn't apply" is still not a point on the 1..N
|
|
4787
|
+
continuum, but it no longer needs a different border style to say so. */
|
|
4788
|
+
.magicfeedback-rating-number-extra-row {
|
|
4789
|
+
display: flex;
|
|
4790
|
+
justify-content: center;
|
|
4791
|
+
margin-top: var(--mf-space-sm);
|
|
4792
|
+
}
|
|
4793
|
+
|
|
4794
|
+
.magicfeedback-rating-number-option--extra {
|
|
4795
|
+
flex: 0 1 auto;
|
|
4796
|
+
}
|
|
4797
|
+
|
|
4798
|
+
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-option-label-container {
|
|
4799
|
+
width: auto;
|
|
4800
|
+
}
|
|
4801
|
+
|
|
4802
|
+
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-value {
|
|
4803
|
+
min-height: 36px;
|
|
4804
|
+
padding: 0 var(--mf-space-md);
|
|
4805
|
+
border: 2px solid var(--mf-primary-border);
|
|
4806
|
+
border-radius: var(--mf-radius-md);
|
|
4807
|
+
background: var(--mf-bg-secondary);
|
|
4808
|
+
color: var(--mf-primary);
|
|
4809
|
+
font-size: var(--mf-font-size-sm);
|
|
4810
|
+
}
|
|
4811
|
+
|
|
4812
|
+
@media (hover: hover) {
|
|
4813
|
+
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value {
|
|
4814
|
+
background: var(--mf-primary-light);
|
|
4815
|
+
}
|
|
4816
|
+
}
|
|
4817
|
+
|
|
4818
|
+
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
4819
|
+
color: #fff;
|
|
4820
|
+
background-color: var(--mf-primary);
|
|
4821
|
+
box-shadow: var(--mf-shadow-md);
|
|
4822
|
+
}
|
|
4823
|
+
|
|
4824
|
+
/* Column: the same separated chips as row, just stacked \u2014 each option is
|
|
4825
|
+
its own outlined chip with a gap between them, not one shared box. */
|
|
4826
|
+
.magicfeedback-rating-number-container-column,
|
|
4827
|
+
.magicfeedback-rating-number-container-column-reverse {
|
|
4828
|
+
gap: var(--mf-space-sm);
|
|
4829
|
+
}
|
|
4830
|
+
|
|
4831
|
+
.magicfeedback-rating-number-option-column,
|
|
4832
|
+
.magicfeedback-rating-number-option-column-reverse {
|
|
4833
|
+
width: 100%;
|
|
4834
|
+
}
|
|
4835
|
+
|
|
4836
|
+
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-value,
|
|
4837
|
+
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-value {
|
|
4838
|
+
justify-content: flex-start;
|
|
4839
|
+
gap: var(--mf-space-sm);
|
|
4840
|
+
min-height: 48px;
|
|
4841
|
+
padding: var(--mf-space-sm) var(--mf-space-md);
|
|
4842
|
+
border: 2px solid var(--mf-primary-border);
|
|
4843
|
+
border-radius: var(--mf-radius-md);
|
|
4844
|
+
background: var(--mf-bg-secondary);
|
|
4845
|
+
color: var(--mf-primary);
|
|
4846
|
+
}
|
|
4847
|
+
|
|
4848
|
+
@media (hover: hover) {
|
|
4849
|
+
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value,
|
|
4850
|
+
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value {
|
|
4851
|
+
background: var(--mf-primary-light);
|
|
4852
|
+
}
|
|
4853
|
+
}
|
|
4854
|
+
|
|
4855
|
+
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
4856
|
+
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
4857
|
+
color: #fff;
|
|
4858
|
+
background-color: var(--mf-primary);
|
|
4859
|
+
box-shadow: var(--mf-shadow-md);
|
|
4860
|
+
}
|
|
4861
|
+
|
|
4862
|
+
.magicfeedback-rating-number-value-num {
|
|
4863
|
+
font-weight: var(--mf-font-weight-bold);
|
|
4864
|
+
}
|
|
4865
|
+
|
|
4866
|
+
/* Column with per-option text: a min-width so "1".."9" and "10" line up,
|
|
4867
|
+
with the label text starting at the same x. Skipped entirely when the
|
|
4868
|
+
column has no per-option text at all (--bare below) \u2014 with nothing to
|
|
4869
|
+
align against, the same left-shift bug from row mode would resurface. */
|
|
4870
|
+
.magicfeedback-rating-number-container-column:not(.magicfeedback-rating-number-container-column--bare) .magicfeedback-rating-number-value-num,
|
|
4871
|
+
.magicfeedback-rating-number-container-column-reverse:not(.magicfeedback-rating-number-container-column--bare) .magicfeedback-rating-number-value-num {
|
|
4872
|
+
flex: none;
|
|
4873
|
+
min-width: 1.4em;
|
|
4874
|
+
}
|
|
4875
|
+
|
|
4876
|
+
/* Column, no per-option text at all (only min/max, or nothing): a bare
|
|
4877
|
+
numbered list has nothing to left-align against, so center each
|
|
4878
|
+
number instead of stranding it on the left with blank space beside it. */
|
|
4879
|
+
.magicfeedback-rating-number-container-column--bare .magicfeedback-rating-number-value {
|
|
4880
|
+
justify-content: center;
|
|
4881
|
+
}
|
|
4882
|
+
|
|
4883
|
+
.magicfeedback-rating-number-value-label {
|
|
4884
|
+
font-weight: var(--mf-font-weight-medium);
|
|
4885
|
+
}
|
|
4886
|
+
|
|
4887
|
+
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
4888
|
+
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
4889
|
+
color: #fff;
|
|
4890
|
+
background-color: var(--mf-primary);
|
|
4891
|
+
}
|
|
4892
|
+
|
|
4893
|
+
/* Star Rating */
|
|
4894
|
+
.magicfeedback-rating-star-container {
|
|
4895
|
+
justify-content: center;
|
|
4896
|
+
}
|
|
4897
|
+
|
|
4898
|
+
.magicfeedback-rating-star-option:not(:checked) > .rating__star {
|
|
4899
|
+
font-size: 40px;
|
|
4900
|
+
color: var(--mf-border);
|
|
4901
|
+
cursor: pointer;
|
|
4902
|
+
margin: 0 var(--mf-space-xs);
|
|
4903
|
+
transition: var(--mf-transition-fast);
|
|
4904
|
+
}
|
|
4905
|
+
|
|
4906
|
+
@media (hover: hover) {
|
|
4907
|
+
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover,
|
|
4908
|
+
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover ~ span {
|
|
4909
|
+
color: #fbbf24;
|
|
4910
|
+
transform: scale(1.1);
|
|
4911
|
+
}
|
|
4912
|
+
}
|
|
4913
|
+
|
|
4914
|
+
.magicfeedback-rating-star-selected {
|
|
4915
|
+
color: #fbbf24 !important;
|
|
4916
|
+
}
|
|
4917
|
+
|
|
4918
|
+
/* ========================================
|
|
4919
|
+
MULTIPLE CHOICE WITH IMAGES
|
|
4920
|
+
======================================== */
|
|
4921
|
+
.magicfeedback-multiple-choice-image-option {
|
|
4922
|
+
display: flex;
|
|
4923
|
+
border-radius: var(--mf-radius-md);
|
|
4924
|
+
overflow: hidden;
|
|
4925
|
+
transition: var(--mf-transition-fast);
|
|
4926
|
+
}
|
|
4927
|
+
|
|
4928
|
+
.magicfeedback-image-option-label-container {
|
|
4929
|
+
cursor: pointer;
|
|
4930
|
+
border-radius: var(--mf-radius-md);
|
|
4931
|
+
overflow: hidden;
|
|
4932
|
+
transition: var(--mf-transition-fast);
|
|
4933
|
+
}
|
|
4934
|
+
|
|
4935
|
+
.magicfeedback-image-option-label-container input[type="radio"],
|
|
4936
|
+
.magicfeedback-image-option-label-container input[type="checkbox"] {
|
|
4937
|
+
position: absolute;
|
|
4938
|
+
opacity: 0;
|
|
4939
|
+
width: 0;
|
|
4940
|
+
height: 0;
|
|
4941
|
+
}
|
|
4942
|
+
|
|
4943
|
+
.magicfeedback-image-option-label-container img {
|
|
4944
|
+
width: 100%;
|
|
4945
|
+
height: auto;
|
|
4946
|
+
display: block;
|
|
4947
|
+
border: 2px solid var(--mf-border);
|
|
4948
|
+
border-radius: var(--mf-radius-md);
|
|
4949
|
+
transition: var(--mf-transition-fast);
|
|
4950
|
+
}
|
|
4951
|
+
|
|
4952
|
+
@media (hover: hover) {
|
|
4953
|
+
.magicfeedback-image-option-label-container:hover img {
|
|
4954
|
+
border-color: var(--mf-primary);
|
|
4955
|
+
box-shadow: var(--mf-shadow-md);
|
|
4956
|
+
}
|
|
4957
|
+
}
|
|
4958
|
+
|
|
4959
|
+
.magicfeedback-image-option-label-container input:checked + img {
|
|
4960
|
+
border-color: var(--mf-primary);
|
|
4961
|
+
box-shadow: 0 0 0 3px var(--mf-primary-light);
|
|
4962
|
+
}
|
|
4963
|
+
|
|
4964
|
+
/* ========================================
|
|
4965
|
+
MATRIX QUESTIONS
|
|
4966
|
+
======================================== */
|
|
4967
|
+
.magicfeedback-multi-question-matrix-container {
|
|
4968
|
+
width: 100%;
|
|
4969
|
+
overflow-x: auto;
|
|
4970
|
+
border-radius: var(--mf-radius-md);
|
|
4971
|
+
/* the layout follows the space the survey gets (a pop-in, a sidebar),
|
|
4972
|
+
not the size of the window */
|
|
4973
|
+
container-type: inline-size;
|
|
4974
|
+
}
|
|
4975
|
+
|
|
4976
|
+
.magicfeedback-multi-question-matrix-table {
|
|
4977
|
+
width: 100%;
|
|
4978
|
+
border-collapse: separate;
|
|
4979
|
+
border-spacing: 0 var(--mf-space-xs);
|
|
4980
|
+
}
|
|
4981
|
+
|
|
4982
|
+
.magicfeedback-multi-question-matrix-table th {
|
|
4983
|
+
padding: var(--mf-space-md);
|
|
4984
|
+
text-align: center;
|
|
4985
|
+
font-size: var(--mf-font-size-sm);
|
|
4986
|
+
font-weight: 500;
|
|
4987
|
+
color: var(--mf-text-secondary);
|
|
4988
|
+
}
|
|
4989
|
+
|
|
4990
|
+
.magicfeedback-multi-question-matrix-row-tr {
|
|
4991
|
+
background-color: var(--mf-bg-primary);
|
|
4992
|
+
border-radius: var(--mf-radius-md);
|
|
4993
|
+
transition: var(--mf-transition-fast);
|
|
4994
|
+
}
|
|
4995
|
+
|
|
4996
|
+
.magicfeedback-multi-question-matrix-row-tr:nth-child(even) {
|
|
4997
|
+
background-color: var(--mf-bg-secondary);
|
|
4998
|
+
}
|
|
4999
|
+
|
|
5000
|
+
@media (hover: hover) {
|
|
5001
|
+
.magicfeedback-multi-question-matrix-row-tr:hover {
|
|
5002
|
+
background-color: var(--mf-bg-hover);
|
|
5003
|
+
box-shadow: var(--mf-shadow-sm);
|
|
5004
|
+
}
|
|
5005
|
+
}
|
|
5006
|
+
|
|
5007
|
+
.magicfeedback-multi-question-matrix-table td {
|
|
5008
|
+
padding: var(--mf-space-md);
|
|
5009
|
+
text-align: center;
|
|
5010
|
+
}
|
|
5011
|
+
|
|
5012
|
+
.magicfeedback-multi-question-matrix-label {
|
|
5013
|
+
text-align: start;
|
|
5014
|
+
font-size: var(--mf-font-size-base);
|
|
5015
|
+
color: var(--mf-text-primary);
|
|
5016
|
+
}
|
|
5017
|
+
|
|
5018
|
+
.magicfeedback-multi-question-matrix-table input[type="radio"] {
|
|
5019
|
+
width: 20px;
|
|
5020
|
+
height: 20px;
|
|
5021
|
+
cursor: pointer;
|
|
5022
|
+
accent-color: var(--mf-primary);
|
|
5023
|
+
}
|
|
5024
|
+
|
|
5025
|
+
.magicfeedback-multi-question-matrix-question {
|
|
5026
|
+
min-width: 200px;
|
|
5027
|
+
padding: 10px;
|
|
5028
|
+
}
|
|
5029
|
+
|
|
5030
|
+
/* the column header names the option in a table; the per-cell label is for
|
|
5031
|
+
screen readers until the rows stack */
|
|
5032
|
+
.magicfeedback-multi-question-matrix-option-label {
|
|
5033
|
+
position: absolute;
|
|
5034
|
+
width: 1px;
|
|
5035
|
+
height: 1px;
|
|
5036
|
+
overflow: hidden;
|
|
5037
|
+
clip: rect(0, 0, 0, 0);
|
|
5038
|
+
white-space: nowrap;
|
|
5039
|
+
}
|
|
5040
|
+
|
|
5041
|
+
/* narrow container: every row becomes its own question with the options
|
|
5042
|
+
stacked underneath, instead of a table cut off at the side */
|
|
5043
|
+
@container (max-width: 599px) {
|
|
5044
|
+
.magicfeedback-multi-question-matrix-table,
|
|
5045
|
+
.magicfeedback-multi-question-matrix-table tbody,
|
|
5046
|
+
.magicfeedback-multi-question-matrix-table tr,
|
|
5047
|
+
.magicfeedback-multi-question-matrix-table td {
|
|
5048
|
+
display: block;
|
|
5049
|
+
width: 100%;
|
|
5050
|
+
}
|
|
5051
|
+
|
|
5052
|
+
.magicfeedback-multi-question-matrix-table thead {
|
|
5053
|
+
display: none;
|
|
5054
|
+
}
|
|
5055
|
+
|
|
5056
|
+
.magicfeedback-multi-question-matrix-row-tr,
|
|
5057
|
+
.magicfeedback-multi-question-matrix-row-tr:nth-child(even) {
|
|
5058
|
+
margin-bottom: var(--mf-space-lg);
|
|
5059
|
+
background: transparent;
|
|
5060
|
+
box-shadow: none;
|
|
5061
|
+
}
|
|
5062
|
+
|
|
5063
|
+
@media (hover: hover) {
|
|
5064
|
+
.magicfeedback-multi-question-matrix-row-tr:hover {
|
|
5065
|
+
margin-bottom: var(--mf-space-lg);
|
|
5066
|
+
background: transparent;
|
|
5067
|
+
box-shadow: none;
|
|
5068
|
+
}
|
|
5069
|
+
}
|
|
5070
|
+
|
|
5071
|
+
.magicfeedback-multi-question-matrix-table td.magicfeedback-multi-question-matrix-question {
|
|
5072
|
+
min-width: 0;
|
|
5073
|
+
padding: 0 0 var(--mf-space-sm);
|
|
5074
|
+
text-align: start;
|
|
5075
|
+
}
|
|
5076
|
+
|
|
5077
|
+
.magicfeedback-multi-question-matrix-question .magicfeedback-multi-question-matrix-label {
|
|
5078
|
+
font-weight: 600;
|
|
5079
|
+
}
|
|
5080
|
+
|
|
5081
|
+
.magicfeedback-multi-question-matrix-table td.magicfeedback-multi-question-matrix-option {
|
|
5082
|
+
display: flex;
|
|
5083
|
+
align-items: center;
|
|
5084
|
+
gap: var(--mf-space-sm);
|
|
5085
|
+
margin-bottom: var(--mf-space-sm);
|
|
5086
|
+
padding: 0 var(--mf-space-md);
|
|
5087
|
+
text-align: start;
|
|
5088
|
+
background: var(--mf-bg-secondary);
|
|
5089
|
+
border: 2px solid var(--mf-border);
|
|
5090
|
+
border-radius: var(--mf-radius-md);
|
|
5091
|
+
cursor: pointer;
|
|
5092
|
+
transition: var(--mf-transition-fast);
|
|
5093
|
+
}
|
|
5094
|
+
|
|
5095
|
+
@media (hover: hover) {
|
|
5096
|
+
.magicfeedback-multi-question-matrix-option:hover {
|
|
5097
|
+
border-color: var(--mf-primary-border);
|
|
5098
|
+
}
|
|
5099
|
+
}
|
|
5100
|
+
|
|
5101
|
+
.magicfeedback-multi-question-matrix-option:has(input:checked) {
|
|
5102
|
+
border-color: var(--mf-primary);
|
|
5103
|
+
background: var(--mf-primary-light);
|
|
5104
|
+
}
|
|
5105
|
+
|
|
5106
|
+
.magicfeedback-multi-question-matrix-table .magicfeedback-multi-question-matrix-option input[type="radio"] {
|
|
5107
|
+
flex-shrink: 0;
|
|
5108
|
+
}
|
|
5109
|
+
|
|
5110
|
+
/* the whole card is the click target */
|
|
5111
|
+
.magicfeedback-multi-question-matrix-option-label {
|
|
5112
|
+
position: static;
|
|
5113
|
+
flex: 1;
|
|
5114
|
+
width: auto;
|
|
5115
|
+
height: auto;
|
|
5116
|
+
padding: var(--mf-space-md) 0;
|
|
5117
|
+
overflow: visible;
|
|
5118
|
+
clip: auto;
|
|
5119
|
+
white-space: normal;
|
|
5120
|
+
font-size: var(--mf-font-size-base);
|
|
5121
|
+
color: var(--mf-text-primary);
|
|
5122
|
+
cursor: pointer;
|
|
5123
|
+
}
|
|
5124
|
+
}
|
|
5125
|
+
|
|
5126
|
+
/* ========================================
|
|
5127
|
+
MAXDIFF (BEST\u2013WORST)
|
|
5128
|
+
======================================== */
|
|
5129
|
+
.magicfeedback-max-diff {
|
|
5130
|
+
/* "least" gets its own hue, apart from the brand color "most" uses; dark
|
|
5131
|
+
enough to read as header text and to hold the white center dot */
|
|
5132
|
+
--mf-max-diff-worst: #b45309;
|
|
5133
|
+
width: 100%;
|
|
5134
|
+
}
|
|
5135
|
+
|
|
5136
|
+
.magicfeedback-max-diff-container {
|
|
5137
|
+
width: 100%;
|
|
5138
|
+
/* the layout follows the space the survey gets (a pop-in, a sidebar),
|
|
5139
|
+
not the size of the window */
|
|
5140
|
+
container-type: inline-size;
|
|
5141
|
+
}
|
|
5142
|
+
|
|
5143
|
+
.magicfeedback-max-diff-progress {
|
|
5144
|
+
display: flex;
|
|
5145
|
+
align-items: center;
|
|
5146
|
+
gap: var(--mf-space-md);
|
|
5147
|
+
margin-bottom: var(--mf-space-lg);
|
|
5148
|
+
}
|
|
5149
|
+
|
|
5150
|
+
.magicfeedback-max-diff-progress-label {
|
|
5151
|
+
font-size: 0.8125rem;
|
|
5152
|
+
font-weight: var(--mf-font-weight-bold);
|
|
5153
|
+
letter-spacing: 0.04em;
|
|
5154
|
+
text-transform: uppercase;
|
|
5155
|
+
white-space: nowrap;
|
|
5156
|
+
color: var(--mf-text-secondary);
|
|
5157
|
+
}
|
|
5158
|
+
|
|
5159
|
+
.magicfeedback-max-diff-progress-track {
|
|
5160
|
+
flex: 1;
|
|
5161
|
+
height: 6px;
|
|
5162
|
+
overflow: hidden;
|
|
5163
|
+
border-radius: var(--mf-radius-full);
|
|
5164
|
+
background: var(--mf-border);
|
|
5165
|
+
}
|
|
5166
|
+
|
|
5167
|
+
.magicfeedback-max-diff-progress-fill {
|
|
5168
|
+
display: block;
|
|
5169
|
+
height: 100%;
|
|
5170
|
+
border-radius: var(--mf-radius-full);
|
|
5171
|
+
background: var(--mf-primary);
|
|
5172
|
+
}
|
|
5173
|
+
|
|
5174
|
+
.magicfeedback-max-diff-table {
|
|
5175
|
+
width: 100%;
|
|
5176
|
+
border-collapse: collapse;
|
|
5177
|
+
}
|
|
5178
|
+
|
|
5179
|
+
.magicfeedback-max-diff-head,
|
|
5180
|
+
.magicfeedback-max-diff-head-spacer {
|
|
5181
|
+
border-bottom: 1px solid var(--mf-border);
|
|
5182
|
+
}
|
|
5183
|
+
|
|
5184
|
+
.magicfeedback-max-diff-head {
|
|
5185
|
+
width: 11rem;
|
|
5186
|
+
padding: 0 var(--mf-space-sm) var(--mf-space-sm);
|
|
5187
|
+
font-size: 0.8125rem;
|
|
5188
|
+
font-weight: var(--mf-font-weight-extrabold);
|
|
5189
|
+
letter-spacing: 0.04em;
|
|
5190
|
+
text-transform: uppercase;
|
|
5191
|
+
text-align: center;
|
|
5192
|
+
vertical-align: bottom;
|
|
5193
|
+
}
|
|
5194
|
+
|
|
5195
|
+
.magicfeedback-max-diff-head-best {
|
|
5196
|
+
color: var(--mf-primary);
|
|
5197
|
+
}
|
|
5198
|
+
|
|
5199
|
+
.magicfeedback-max-diff-head-worst {
|
|
5200
|
+
color: var(--mf-max-diff-worst);
|
|
5201
|
+
}
|
|
5202
|
+
|
|
5203
|
+
.magicfeedback-max-diff-head-label {
|
|
5204
|
+
display: inline-flex;
|
|
5205
|
+
align-items: center;
|
|
5206
|
+
gap: 6px;
|
|
5207
|
+
}
|
|
5208
|
+
|
|
5209
|
+
.magicfeedback-max-diff-row {
|
|
5210
|
+
transition: background-color 0.15s ease;
|
|
5211
|
+
}
|
|
5212
|
+
|
|
5213
|
+
.magicfeedback-max-diff-row > * {
|
|
5214
|
+
border-bottom: 1px solid var(--mf-border);
|
|
5215
|
+
}
|
|
5216
|
+
|
|
5217
|
+
.magicfeedback-max-diff-row:has(.magicfeedback-max-diff-best:checked) {
|
|
5218
|
+
background-color: color-mix(in srgb, var(--mf-primary) 8%, transparent);
|
|
5219
|
+
}
|
|
5220
|
+
|
|
5221
|
+
.magicfeedback-max-diff-row:has(.magicfeedback-max-diff-worst:checked) {
|
|
5222
|
+
background-color: color-mix(in srgb, var(--mf-max-diff-worst) 8%, transparent);
|
|
5223
|
+
}
|
|
5224
|
+
|
|
5225
|
+
.magicfeedback-max-diff-item {
|
|
5226
|
+
padding: var(--mf-space-md) var(--mf-space-sm);
|
|
5227
|
+
font-size: 1.0625rem;
|
|
5228
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
5229
|
+
line-height: 1.4;
|
|
5230
|
+
text-align: center;
|
|
5231
|
+
color: var(--mf-text-primary);
|
|
5232
|
+
}
|
|
5233
|
+
|
|
5234
|
+
.magicfeedback-max-diff-row:has(input:checked) .magicfeedback-max-diff-item {
|
|
5235
|
+
font-weight: var(--mf-font-weight-extrabold);
|
|
5236
|
+
}
|
|
5237
|
+
|
|
5238
|
+
.magicfeedback-max-diff-cell {
|
|
5239
|
+
padding: 0;
|
|
5240
|
+
}
|
|
5241
|
+
|
|
5242
|
+
/* the whole cell is the click target */
|
|
5243
|
+
.magicfeedback-max-diff-pick {
|
|
5244
|
+
display: flex;
|
|
5245
|
+
align-items: center;
|
|
5246
|
+
justify-content: center;
|
|
5247
|
+
min-height: 64px;
|
|
5248
|
+
cursor: pointer;
|
|
5249
|
+
}
|
|
5250
|
+
|
|
5251
|
+
.magicfeedback-max-diff-input {
|
|
5252
|
+
appearance: none;
|
|
5253
|
+
-webkit-appearance: none;
|
|
5254
|
+
flex-shrink: 0;
|
|
5255
|
+
width: 26px;
|
|
5256
|
+
height: 26px;
|
|
5257
|
+
margin: 0;
|
|
5258
|
+
border: 2px solid color-mix(in srgb, var(--mf-text-secondary) 80%, white);
|
|
5259
|
+
border-radius: var(--mf-radius-full);
|
|
5260
|
+
background: var(--mf-bg-secondary);
|
|
5261
|
+
cursor: pointer;
|
|
5262
|
+
transition: var(--mf-transition-fast);
|
|
5263
|
+
}
|
|
5264
|
+
|
|
5265
|
+
@media (hover: hover) {
|
|
5266
|
+
.magicfeedback-max-diff-pick:hover .magicfeedback-max-diff-input {
|
|
5267
|
+
transform: scale(1.08);
|
|
5268
|
+
}
|
|
5269
|
+
}
|
|
5270
|
+
|
|
5271
|
+
.magicfeedback-max-diff-best:checked {
|
|
5272
|
+
border-color: var(--mf-primary);
|
|
5273
|
+
background: radial-gradient(circle, #FFFFFF 0 4px, var(--mf-primary) 4.5px);
|
|
5274
|
+
}
|
|
5275
|
+
|
|
5276
|
+
.magicfeedback-max-diff-worst:checked {
|
|
5277
|
+
border-color: var(--mf-max-diff-worst);
|
|
5278
|
+
background: radial-gradient(circle, #FFFFFF 0 4px, var(--mf-max-diff-worst) 4.5px);
|
|
5279
|
+
}
|
|
5280
|
+
|
|
5281
|
+
.magicfeedback-max-diff-input:focus-visible {
|
|
5282
|
+
outline: 3px solid var(--mf-primary-border);
|
|
5283
|
+
outline-offset: 3px;
|
|
5284
|
+
}
|
|
5285
|
+
|
|
5286
|
+
/* narrow container: same table, slimmer pick columns and the header icon
|
|
5287
|
+
stacked over its label */
|
|
5288
|
+
@container (max-width: 599px) {
|
|
5289
|
+
.magicfeedback-max-diff-head {
|
|
5290
|
+
width: 4.75rem;
|
|
5291
|
+
padding-inline: 2px;
|
|
5292
|
+
font-size: 0.6875rem;
|
|
5293
|
+
}
|
|
5294
|
+
|
|
5295
|
+
.magicfeedback-max-diff-head-label {
|
|
5296
|
+
flex-direction: column;
|
|
5297
|
+
gap: 2px;
|
|
5298
|
+
}
|
|
5299
|
+
|
|
5300
|
+
.magicfeedback-max-diff-item {
|
|
5301
|
+
padding-inline: 4px;
|
|
5302
|
+
font-size: var(--mf-font-size-base);
|
|
5303
|
+
}
|
|
5304
|
+
|
|
5305
|
+
.magicfeedback-max-diff-pick {
|
|
5306
|
+
min-height: 68px;
|
|
5307
|
+
}
|
|
5308
|
+
|
|
5309
|
+
.magicfeedback-max-diff-input {
|
|
5310
|
+
width: 28px;
|
|
5311
|
+
height: 28px;
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
|
|
5315
|
+
/* ========================================
|
|
5316
|
+
PRIORITY LIST
|
|
5317
|
+
======================================== */
|
|
5318
|
+
.magicfeedback-priority-list-item {
|
|
5319
|
+
display: flex;
|
|
5320
|
+
align-items: center;
|
|
5321
|
+
justify-content: space-between;
|
|
5322
|
+
padding: var(--mf-space-md);
|
|
5323
|
+
margin: var(--mf-space-sm) 0;
|
|
5324
|
+
background-color: var(--mf-bg-primary);
|
|
5325
|
+
border: 1.5px solid var(--mf-border);
|
|
5326
|
+
border-radius: var(--mf-radius-md);
|
|
5327
|
+
transition: var(--mf-transition-fast);
|
|
5328
|
+
}
|
|
5329
|
+
|
|
5330
|
+
@media (hover: hover) {
|
|
5331
|
+
.magicfeedback-priority-list-item:hover {
|
|
5332
|
+
box-shadow: var(--mf-shadow-sm);
|
|
5333
|
+
border-color: var(--mf-primary);
|
|
5334
|
+
}
|
|
5335
|
+
}
|
|
5336
|
+
|
|
5337
|
+
.magicfeedback-priority-list-item-label {
|
|
5338
|
+
flex: 1;
|
|
5339
|
+
font-size: var(--mf-font-size-base);
|
|
5340
|
+
text-align: start;
|
|
5341
|
+
color: var(--mf-text-primary);
|
|
5342
|
+
margin: 0;
|
|
5343
|
+
}
|
|
5344
|
+
|
|
5345
|
+
.magicfeedback-priority-list-arrow-up,
|
|
5346
|
+
.magicfeedback-priority-list-arrow-down {
|
|
5347
|
+
padding: var(--mf-space-xs);
|
|
5348
|
+
font-size: var(--mf-font-size-lg);
|
|
5349
|
+
color: var(--mf-text-secondary);
|
|
5350
|
+
cursor: pointer;
|
|
5351
|
+
transition: var(--mf-transition-fast);
|
|
5352
|
+
user-select: none;
|
|
5353
|
+
}
|
|
5354
|
+
|
|
5355
|
+
@media (hover: hover) {
|
|
5356
|
+
.magicfeedback-priority-list-arrow-up:hover,
|
|
5357
|
+
.magicfeedback-priority-list-arrow-down:hover {
|
|
5358
|
+
color: var(--mf-primary);
|
|
5359
|
+
transform: scale(1.2);
|
|
5360
|
+
}
|
|
5361
|
+
}
|
|
5362
|
+
|
|
5363
|
+
/* ========================================
|
|
5364
|
+
POINT SYSTEM
|
|
5365
|
+
======================================== */
|
|
5366
|
+
.magicfeedback-point-system-item {
|
|
5367
|
+
display: flex;
|
|
5368
|
+
align-items: center;
|
|
5369
|
+
justify-content: space-between;
|
|
5370
|
+
padding: var(--mf-space-md);
|
|
5371
|
+
margin: var(--mf-space-sm) 0;
|
|
5372
|
+
background-color: var(--mf-bg-primary);
|
|
5373
|
+
border: 1.5px solid var(--mf-border);
|
|
5374
|
+
border-radius: var(--mf-radius-md);
|
|
5375
|
+
min-height: 45px;
|
|
5376
|
+
}
|
|
5377
|
+
|
|
5378
|
+
.magicfeedback-point-system-item label {
|
|
5379
|
+
flex: 1;
|
|
5380
|
+
font-size: var(--mf-font-size-base);
|
|
5381
|
+
color: var(--mf-text-primary);
|
|
5382
|
+
margin: 0;
|
|
5383
|
+
}
|
|
5384
|
+
|
|
5385
|
+
.magicfeedback-point-system-input-container {
|
|
5386
|
+
display: flex;
|
|
5387
|
+
align-items: center;
|
|
5388
|
+
gap: var(--mf-space-sm);
|
|
5389
|
+
}
|
|
5390
|
+
|
|
5391
|
+
.magicfeedback-point-system-item input {
|
|
5392
|
+
width: 80px;
|
|
5393
|
+
min-width: 80px;
|
|
5394
|
+
padding: var(--mf-space-sm);
|
|
5395
|
+
text-align: center;
|
|
5396
|
+
font-size: var(--mf-font-size-base);
|
|
5397
|
+
border: 1.5px solid var(--mf-border);
|
|
5398
|
+
border-radius: var(--mf-radius-md);
|
|
5399
|
+
margin: 0;
|
|
5400
|
+
}
|
|
5401
|
+
|
|
5402
|
+
.magicfeedback-point-system-total {
|
|
5403
|
+
display: flex;
|
|
5404
|
+
justify-content: flex-end;
|
|
5405
|
+
margin-top: var(--mf-space-md);
|
|
5406
|
+
font-size: var(--mf-font-size-base);
|
|
5407
|
+
font-weight: 600;
|
|
5408
|
+
color: var(--mf-text-primary);
|
|
5409
|
+
}
|
|
5410
|
+
|
|
5411
|
+
/* ========================================
|
|
5412
|
+
CONSENT
|
|
5413
|
+
======================================== */
|
|
5414
|
+
.magicfeedback-consent-container {
|
|
5415
|
+
display: flex;
|
|
5416
|
+
flex-direction: row;
|
|
5417
|
+
align-items: center;
|
|
5418
|
+
gap: var(--mf-space-sm);
|
|
5419
|
+
padding: var(--mf-space-md);
|
|
5420
|
+
background-color: var(--mf-bg-secondary);
|
|
5421
|
+
border-radius: var(--mf-radius-md);
|
|
5422
|
+
margin: var(--mf-space-md) 0;
|
|
5423
|
+
}
|
|
5424
|
+
|
|
5425
|
+
.magicfeedback-consent-container input[type="checkbox"] {
|
|
5426
|
+
margin-top: 2px;
|
|
5427
|
+
flex-shrink: 0;
|
|
5428
|
+
accent-color: var(--mf-primary);
|
|
5429
|
+
}
|
|
5430
|
+
|
|
5431
|
+
.magicfeedback-consent-container label {
|
|
5432
|
+
flex: 1;
|
|
5433
|
+
font-size: var(--mf-font-size-sm);
|
|
5434
|
+
text-align: start;
|
|
5435
|
+
color: var(--mf-text-secondary);
|
|
5436
|
+
line-height: var(--mf-line-height);
|
|
5437
|
+
cursor: pointer;
|
|
5438
|
+
margin-bottom: 0;
|
|
5439
|
+
}
|
|
5440
|
+
|
|
5441
|
+
/* ========================================
|
|
5442
|
+
ACTION BUTTONS
|
|
5443
|
+
======================================== */
|
|
5444
|
+
.magicfeedback-action-container {
|
|
5445
|
+
display: flex;
|
|
5446
|
+
align-items: center;
|
|
5447
|
+
justify-content: space-between;
|
|
5448
|
+
gap: var(--mf-space-md);
|
|
5449
|
+
margin-top: var(--mf-space-xl);
|
|
5450
|
+
padding-top: var(--mf-space-lg);
|
|
5451
|
+
border-top: 1px solid var(--mf-border);
|
|
5452
|
+
}
|
|
5453
|
+
|
|
5454
|
+
.magicfeedback-submit {
|
|
5455
|
+
padding: 0.8rem 1.6rem;
|
|
5456
|
+
font-size: var(--mf-font-size-base);
|
|
5457
|
+
font-weight: 800;
|
|
5458
|
+
color: #FFFFFF;
|
|
5459
|
+
background-color: var(--mf-primary);
|
|
5460
|
+
border: 2px solid var(--mf-primary);
|
|
5461
|
+
border-radius: var(--mf-radius-full);
|
|
5462
|
+
cursor: pointer;
|
|
5463
|
+
transition: var(--mf-transition-fast);
|
|
5464
|
+
box-shadow: var(--mf-shadow-md);
|
|
5465
|
+
}
|
|
5466
|
+
|
|
5467
|
+
@media (hover: hover) {
|
|
5468
|
+
.magicfeedback-submit:hover {
|
|
5469
|
+
background-color: var(--mf-primary-hover);
|
|
5470
|
+
box-shadow: var(--mf-shadow-lg);
|
|
5471
|
+
transform: translateY(-2px);
|
|
5472
|
+
}
|
|
5473
|
+
}
|
|
5474
|
+
|
|
5475
|
+
.magicfeedback-submit:active {
|
|
5476
|
+
transform: translateY(0);
|
|
5477
|
+
box-shadow: var(--mf-shadow-sm);
|
|
5478
|
+
}
|
|
5479
|
+
|
|
5480
|
+
.magicfeedback-submit:disabled {
|
|
5481
|
+
opacity: 0.5;
|
|
5482
|
+
cursor: not-allowed;
|
|
5483
|
+
transform: none;
|
|
5484
|
+
}
|
|
5485
|
+
|
|
5486
|
+
.magicfeedback-back {
|
|
5487
|
+
padding: 0.65rem 1rem;
|
|
5488
|
+
font-size: var(--mf-font-size-base);
|
|
5489
|
+
font-weight: 700;
|
|
5490
|
+
color: var(--mf-primary);
|
|
5491
|
+
background-color: var(--mf-bg-secondary);
|
|
5492
|
+
border: 2px solid var(--mf-border);
|
|
5493
|
+
border-radius: var(--mf-radius-full);
|
|
5494
|
+
cursor: pointer;
|
|
5495
|
+
transition: var(--mf-transition-fast);
|
|
5496
|
+
}
|
|
5497
|
+
|
|
5498
|
+
@media (hover: hover) {
|
|
5499
|
+
.magicfeedback-back:hover {
|
|
5500
|
+
border-color: var(--mf-primary);
|
|
5501
|
+
background-color: var(--mf-bg-hover);
|
|
5502
|
+
}
|
|
5503
|
+
}
|
|
5504
|
+
|
|
5505
|
+
/* hidden on the first page; keep the submit button on the right */
|
|
5506
|
+
.magicfeedback-back[hidden] {
|
|
5507
|
+
display: none;
|
|
5508
|
+
}
|
|
5509
|
+
|
|
5510
|
+
.magicfeedback-action-container .magicfeedback-submit {
|
|
5511
|
+
margin-left: auto;
|
|
5512
|
+
}
|
|
5513
|
+
|
|
5514
|
+
/* ========================================
|
|
5515
|
+
SKIP & COUNTER
|
|
5516
|
+
======================================== */
|
|
5517
|
+
.magicfeedback-skip-container {
|
|
5518
|
+
display: flex;
|
|
5519
|
+
align-items: center;
|
|
5520
|
+
gap: var(--mf-space-xs);
|
|
5521
|
+
padding: 0;
|
|
5522
|
+
margin: 0;
|
|
5523
|
+
font-size: var(--mf-font-size-sm);
|
|
5524
|
+
color: var(--mf-text-muted);
|
|
5525
|
+
background: transparent;
|
|
5526
|
+
border: none;
|
|
5527
|
+
cursor: pointer;
|
|
5528
|
+
transition: var(--mf-transition-fast);
|
|
5529
|
+
}
|
|
5530
|
+
|
|
5531
|
+
@media (hover: hover) {
|
|
5532
|
+
.magicfeedback-skip-container:hover {
|
|
5533
|
+
color: var(--mf-primary);
|
|
5534
|
+
}
|
|
5535
|
+
}
|
|
5536
|
+
|
|
5537
|
+
.magicfeedback-skip-container input[type="checkbox"] {
|
|
5538
|
+
margin: 0;
|
|
5539
|
+
cursor: pointer;
|
|
5540
|
+
accent-color: var(--mf-primary);
|
|
5541
|
+
}
|
|
5542
|
+
|
|
5543
|
+
.magicfeedback-counter {
|
|
5544
|
+
display: flex;
|
|
5545
|
+
justify-content: flex-end;
|
|
5546
|
+
margin-top: var(--mf-space-md);
|
|
5547
|
+
font-size: var(--mf-font-size-sm);
|
|
5548
|
+
color: var(--mf-text-muted);
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5551
|
+
/* ========================================
|
|
5552
|
+
MODAL STYLES
|
|
5553
|
+
======================================== */
|
|
5554
|
+
/* Modal backdrop */
|
|
5555
|
+
.magicfeedback-modal-backdrop {
|
|
5556
|
+
position: fixed;
|
|
5557
|
+
top: 0;
|
|
5558
|
+
left: 0;
|
|
5559
|
+
width: 100vw;
|
|
5560
|
+
height: 100vh;
|
|
5561
|
+
background: rgba(0,0,0,0.4);
|
|
5562
|
+
display: none; /* toggled to flex when open */
|
|
5563
|
+
align-items: center;
|
|
5564
|
+
justify-content: center;
|
|
5565
|
+
z-index: 9999;
|
|
5566
|
+
}
|
|
5567
|
+
|
|
5568
|
+
/* Modal container */
|
|
5569
|
+
.magicfeedback-modal {
|
|
5570
|
+
background: #fff;
|
|
5571
|
+
border-radius: 8px;
|
|
5572
|
+
box-shadow: 0 8px 24px rgba(0,0,0,0.2);
|
|
5573
|
+
max-width: 520px;
|
|
5574
|
+
width: 90%;
|
|
5575
|
+
max-height: 80vh;
|
|
5576
|
+
/* Flex column so the options list scrolls while the actions footer
|
|
5577
|
+
(counter + confirm button) stays pinned and always visible. */
|
|
5578
|
+
display: flex;
|
|
5579
|
+
flex-direction: column;
|
|
5580
|
+
overflow: hidden;
|
|
5581
|
+
padding: 16px;
|
|
5582
|
+
position: relative;
|
|
5583
|
+
/* Portalled to document.body (see renderPriorityList.ts) to escape the
|
|
5584
|
+
host page's overflow/z-index \u2014 so it never inherits
|
|
5585
|
+
.magicfeedback-container's neutral text color and instead inherits
|
|
5586
|
+
whatever color the host page's own <body> happens to set. Needs its
|
|
5587
|
+
own explicit baseline rather than relying on that inheritance. */
|
|
5588
|
+
color: var(--mf-text-primary);
|
|
5589
|
+
}
|
|
5590
|
+
|
|
5591
|
+
/* Modal actions */
|
|
5592
|
+
.magicfeedback-modal-actions {
|
|
5593
|
+
display: flex;
|
|
5594
|
+
justify-content: flex-end;
|
|
5595
|
+
gap: 8px;
|
|
5596
|
+
margin-top: 12px;
|
|
5597
|
+
flex-shrink: 0;
|
|
5598
|
+
}
|
|
5599
|
+
|
|
5600
|
+
.magicfeedback-modal-counter {
|
|
5601
|
+
margin-inline-end: auto;
|
|
5602
|
+
display: flex;
|
|
5603
|
+
align-items: center;
|
|
5604
|
+
font-size: 14px;
|
|
5605
|
+
color: var(--mf-text-secondary);
|
|
5606
|
+
}
|
|
5607
|
+
|
|
5608
|
+
/* Modal list */
|
|
5609
|
+
.magicfeedback-modal-list {
|
|
5610
|
+
display: flex;
|
|
5611
|
+
flex-direction: column;
|
|
5612
|
+
gap: 8px;
|
|
5613
|
+
/* Scrollable area; footer stays fixed below it. */
|
|
5614
|
+
flex: 1 1 auto;
|
|
5615
|
+
overflow-y: auto;
|
|
5616
|
+
min-height: 0;
|
|
5617
|
+
}
|
|
5618
|
+
|
|
5619
|
+
.magicfeedback-modal-row {
|
|
5620
|
+
display: flex;
|
|
5621
|
+
align-items: center;
|
|
5622
|
+
gap: 10px;
|
|
5623
|
+
cursor: pointer;
|
|
5624
|
+
}
|
|
5625
|
+
|
|
5626
|
+
/* Priority list header */
|
|
5627
|
+
.magicfeedback-priority-list-header {
|
|
5628
|
+
display: flex;
|
|
5629
|
+
align-items: center;
|
|
5630
|
+
justify-content: space-between;
|
|
5631
|
+
gap: 12px;
|
|
5632
|
+
margin-bottom: 8px;
|
|
5633
|
+
}
|
|
5634
|
+
|
|
5635
|
+
.magicfeedback-priority-list-reorder {
|
|
5636
|
+
margin-top: 8px;
|
|
5637
|
+
}
|
|
5638
|
+
|
|
5639
|
+
.magicfeedback-priority-list-list {
|
|
5640
|
+
padding: 0;
|
|
5641
|
+
list-style: none;
|
|
5642
|
+
}
|
|
5643
|
+
|
|
5644
|
+
.magicfeedback-priority-list-item {
|
|
5645
|
+
display: flex;
|
|
5646
|
+
justify-content: space-between;
|
|
5647
|
+
align-items: center;
|
|
5648
|
+
margin: 5px 0;
|
|
5649
|
+
}
|
|
5650
|
+
|
|
5651
|
+
.magicfeedback-priority-list-item-label {
|
|
5652
|
+
font-size: 15px;
|
|
5653
|
+
}
|
|
5654
|
+
|
|
5655
|
+
.magicfeedback-priority-list-arrows {
|
|
5656
|
+
display: flex;
|
|
5657
|
+
align-items: center;
|
|
5658
|
+
gap: 6px;
|
|
5659
|
+
}
|
|
5660
|
+
|
|
5661
|
+
/* Buttons */
|
|
5662
|
+
.magicfeedback-button {
|
|
5663
|
+
appearance: none;
|
|
5664
|
+
border: 2px solid var(--mf-border);
|
|
5665
|
+
border-radius: var(--mf-radius-full);
|
|
5666
|
+
background: var(--mf-bg-secondary);
|
|
5667
|
+
color: var(--mf-text-primary);
|
|
5668
|
+
padding: 0.6rem 1rem;
|
|
5669
|
+
font-size: 14px;
|
|
5670
|
+
font-weight: 700;
|
|
5671
|
+
cursor: pointer;
|
|
5672
|
+
box-shadow: var(--mf-shadow-sm);
|
|
5673
|
+
}
|
|
5674
|
+
|
|
5675
|
+
@media (hover: hover) {
|
|
5676
|
+
.magicfeedback-button:hover {
|
|
5677
|
+
background: var(--mf-bg-hover);
|
|
5678
|
+
border-color: var(--mf-primary);
|
|
5679
|
+
}
|
|
5680
|
+
}
|
|
5681
|
+
|
|
5682
|
+
.magicfeedback-button:active {
|
|
5683
|
+
transform: translateY(1px);
|
|
5684
|
+
}
|
|
5685
|
+
|
|
5686
|
+
.magicfeedback-button-primary {
|
|
5687
|
+
border-color: var(--mf-primary);
|
|
5688
|
+
background: var(--mf-primary);
|
|
5689
|
+
color: #fff;
|
|
5690
|
+
box-shadow: var(--mf-shadow-md);
|
|
5691
|
+
}
|
|
5692
|
+
|
|
5693
|
+
@media (hover: hover) {
|
|
5694
|
+
.magicfeedback-button-primary:hover {
|
|
5695
|
+
background: var(--mf-primary-hover);
|
|
5696
|
+
}
|
|
5697
|
+
}
|
|
5698
|
+
|
|
5699
|
+
.magicfeedback-button-primary:active {
|
|
5700
|
+
background: var(--mf-primary-hover);
|
|
5701
|
+
}
|
|
5702
|
+
|
|
5703
|
+
/* Warning flash */
|
|
5704
|
+
.magicfeedback-warning {
|
|
5705
|
+
color: #C70039;
|
|
5706
|
+
}
|
|
5707
|
+
|
|
5708
|
+
/* Start message button */
|
|
5709
|
+
.magicfeedback-start-message-button {
|
|
5710
|
+
appearance: none;
|
|
5711
|
+
border: 2px solid var(--mf-primary);
|
|
5712
|
+
border-radius: var(--mf-radius-full);
|
|
5713
|
+
background: var(--mf-primary);
|
|
5714
|
+
color: #fff;
|
|
5715
|
+
padding: 0.8rem 1.4rem;
|
|
5716
|
+
font-size: 15px;
|
|
5717
|
+
font-weight: 800;
|
|
5718
|
+
cursor: pointer;
|
|
5719
|
+
box-shadow: var(--mf-shadow-md);
|
|
5720
|
+
}
|
|
5721
|
+
|
|
5722
|
+
@media (hover: hover) {
|
|
5723
|
+
.magicfeedback-start-message-button:hover {
|
|
5724
|
+
background: var(--mf-primary-hover);
|
|
5725
|
+
}
|
|
5726
|
+
}
|
|
5727
|
+
|
|
5728
|
+
/* ========================================
|
|
5729
|
+
RESPONSIVE DESIGN
|
|
5730
|
+
======================================== */
|
|
5731
|
+
@media (max-width: 768px) {
|
|
5732
|
+
:root {
|
|
5733
|
+
--mf-space-lg: 1.25rem;
|
|
5734
|
+
--mf-space-xl: 1.5rem;
|
|
5735
|
+
}
|
|
5736
|
+
|
|
5737
|
+
.magicfeedback-container {
|
|
5738
|
+
padding: 12px;
|
|
5739
|
+
border-radius: var(--mf-radius-md);
|
|
5740
|
+
}
|
|
5741
|
+
|
|
5742
|
+
.magicfeedback-form {
|
|
5743
|
+
padding: 14px;
|
|
5744
|
+
border-radius: var(--mf-radius-md);
|
|
5745
|
+
}
|
|
5746
|
+
|
|
5747
|
+
.magicfeedback-div {
|
|
5748
|
+
padding: 12px;
|
|
5749
|
+
gap: var(--mf-space-lg)
|
|
5750
|
+
}
|
|
5751
|
+
|
|
5752
|
+
.magicfeedback-label {
|
|
5753
|
+
font-size: var(--mf-font-size-base);
|
|
5754
|
+
}
|
|
5755
|
+
|
|
5756
|
+
.deepdots-popup input[type="date"],
|
|
5757
|
+
.deepdots-popup input[type="text"],
|
|
5758
|
+
.deepdots-popup input[type="number"],
|
|
5759
|
+
.deepdots-popup input[type="email"],
|
|
5760
|
+
.deepdots-popup input[type="password"],
|
|
5761
|
+
.deepdots-popup textarea,
|
|
5762
|
+
.deepdots-popup select {
|
|
5763
|
+
padding: 0.85rem 0.95rem;
|
|
5764
|
+
font-size: 1rem;
|
|
5765
|
+
min-height: 46px;
|
|
5766
|
+
}
|
|
5767
|
+
|
|
5768
|
+
/*
|
|
5769
|
+
.magicfeedback-radio-container,
|
|
5770
|
+
.magicfeedback-checkbox-container,
|
|
5771
|
+
.magicfeedback-boolean-container,
|
|
5772
|
+
.magicfeedback-consent-container {
|
|
5773
|
+
width: 100%;
|
|
5774
|
+
}
|
|
5775
|
+
*/
|
|
5776
|
+
|
|
5777
|
+
.magicfeedback-radio-container,
|
|
5778
|
+
.magicfeedback-checkbox-container {
|
|
5779
|
+
padding: 10px 12px;
|
|
5780
|
+
border-radius: var(--mf-radius-md);
|
|
5781
|
+
border: 1px solid var(--mf-border);
|
|
5782
|
+
gap: 10px;
|
|
5783
|
+
}
|
|
5784
|
+
|
|
5785
|
+
.magicfeedback-rating-container,
|
|
5786
|
+
.magicfeedback-rating-number-container,
|
|
5787
|
+
.magicfeedback-rating-star-container {
|
|
5788
|
+
gap: 10px;
|
|
5789
|
+
}
|
|
5790
|
+
|
|
5791
|
+
.magicfeedback-boolean-container {
|
|
5792
|
+
flex-direction: column;
|
|
5793
|
+
gap: 10px;
|
|
5794
|
+
}
|
|
5795
|
+
|
|
5796
|
+
.magicfeedback-rating-number-container-row,
|
|
5797
|
+
.magicfeedback-rating-number-container-row-reverse {
|
|
5798
|
+
gap: 6px;
|
|
5799
|
+
}
|
|
5800
|
+
|
|
5801
|
+
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-value,
|
|
5802
|
+
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-value {
|
|
5803
|
+
min-height: 44px;
|
|
5804
|
+
padding: var(--mf-space-xs);
|
|
5805
|
+
font-size: 0.9rem;
|
|
5806
|
+
}
|
|
5807
|
+
|
|
5808
|
+
.magicfeedback-action-container {
|
|
5809
|
+
flex-direction: column-reverse;
|
|
5810
|
+
}
|
|
5811
|
+
|
|
5812
|
+
.magicfeedback-submit,
|
|
5813
|
+
.magicfeedback-back {
|
|
5814
|
+
width: 100%;
|
|
5815
|
+
text-align: center;
|
|
5816
|
+
min-height: 48px;
|
|
5817
|
+
}
|
|
5818
|
+
}
|
|
5819
|
+
|
|
5820
|
+
/* ========================================
|
|
5821
|
+
ACCESSIBILITY
|
|
5822
|
+
======================================== */
|
|
5823
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5824
|
+
*,
|
|
5825
|
+
*::before,
|
|
5826
|
+
*::after {
|
|
5827
|
+
animation-duration: 0.01ms !important;
|
|
5828
|
+
animation-iteration-count: 1 !important;
|
|
5829
|
+
transition-duration: 0.01ms !important;
|
|
5830
|
+
}
|
|
5831
|
+
}
|
|
5832
|
+
|
|
5833
|
+
|
|
5834
|
+
/* ========================================
|
|
5835
|
+
UTILITY CLASSES
|
|
5836
|
+
======================================== */
|
|
5837
|
+
.magicfeedback-visually-hidden {
|
|
5838
|
+
position: absolute;
|
|
5839
|
+
width: 1px;
|
|
5840
|
+
height: 1px;
|
|
5841
|
+
padding: 0;
|
|
5842
|
+
margin: -1px;
|
|
5843
|
+
overflow: hidden;
|
|
5844
|
+
clip: rect(0, 0, 0, 0);
|
|
5845
|
+
white-space: nowrap;
|
|
5846
|
+
border-width: 0;
|
|
5847
|
+
}
|
|
5848
|
+
|
|
5849
|
+
.magicfeedback-modal-close {
|
|
5850
|
+
position: absolute;
|
|
5851
|
+
top: 8px;
|
|
5852
|
+
inset-inline-end: 8px;
|
|
5853
|
+
background: transparent;
|
|
5854
|
+
border: none;
|
|
5855
|
+
font-size: 20px;
|
|
5856
|
+
line-height: 1;
|
|
5857
|
+
cursor: pointer;
|
|
5858
|
+
color: #666;
|
|
5859
|
+
}
|
|
5860
|
+
|
|
5861
|
+
.magicfeedback-modal-close:focus {
|
|
5862
|
+
color: #000;
|
|
5863
|
+
outline: none;
|
|
5864
|
+
}
|
|
5865
|
+
|
|
5866
|
+
@media (hover: hover) {
|
|
5867
|
+
.magicfeedback-modal-close:hover {
|
|
5868
|
+
color: #000;
|
|
5869
|
+
outline: none;
|
|
5870
|
+
}
|
|
5871
|
+
}
|
|
5872
|
+
|
|
5873
|
+
/* ========================================
|
|
5874
|
+
FILE / IMAGE UPLOAD
|
|
5875
|
+
======================================== */
|
|
5876
|
+
.magicfeedback-upload {
|
|
5877
|
+
display: flex;
|
|
5878
|
+
flex-direction: column;
|
|
5879
|
+
gap: var(--mf-space-md);
|
|
5880
|
+
width: 100%;
|
|
5881
|
+
margin: 10px 0;
|
|
5882
|
+
}
|
|
5883
|
+
|
|
5884
|
+
/* The native input is an invisible, focusable overlay covering the dropzone. */
|
|
5885
|
+
.magicfeedback-upload-native {
|
|
5886
|
+
position: absolute;
|
|
5887
|
+
inset: 0;
|
|
5888
|
+
width: 100%;
|
|
5889
|
+
height: 100%;
|
|
5890
|
+
margin: 0;
|
|
5891
|
+
padding: 0;
|
|
5892
|
+
opacity: 0;
|
|
5893
|
+
cursor: pointer;
|
|
5894
|
+
z-index: 2;
|
|
5895
|
+
}
|
|
5896
|
+
|
|
5897
|
+
.magicfeedback-upload-dropzone {
|
|
5898
|
+
position: relative;
|
|
5899
|
+
display: flex;
|
|
5900
|
+
flex-direction: column;
|
|
5901
|
+
align-items: center;
|
|
5902
|
+
justify-content: center;
|
|
5903
|
+
gap: var(--mf-space-sm);
|
|
5904
|
+
box-sizing: border-box;
|
|
5905
|
+
width: 100%;
|
|
5906
|
+
min-height: 150px;
|
|
5907
|
+
padding: var(--mf-space-xl);
|
|
5908
|
+
text-align: center;
|
|
5909
|
+
border: 2px dashed var(--mf-border);
|
|
5910
|
+
border-radius: var(--mf-radius-md);
|
|
5911
|
+
background-color: var(--mf-surface-alt);
|
|
5912
|
+
cursor: pointer;
|
|
5913
|
+
transition: var(--mf-transition);
|
|
5914
|
+
}
|
|
5915
|
+
|
|
5916
|
+
@media (hover: hover) {
|
|
5917
|
+
.magicfeedback-upload-dropzone:hover {
|
|
5918
|
+
border-color: var(--mf-primary);
|
|
5919
|
+
background-color: var(--mf-bg-hover);
|
|
5920
|
+
}
|
|
5921
|
+
}
|
|
5922
|
+
|
|
5923
|
+
.magicfeedback-upload-dropzone:focus-within {
|
|
5924
|
+
border-color: var(--mf-primary);
|
|
5925
|
+
box-shadow: var(--mf-shadow-focus);
|
|
5926
|
+
}
|
|
5927
|
+
|
|
5928
|
+
.magicfeedback-upload-dropzone.is-dragover {
|
|
5929
|
+
border-color: var(--mf-primary);
|
|
5930
|
+
border-style: solid;
|
|
5931
|
+
background-color: var(--mf-primary-light);
|
|
5932
|
+
box-shadow: var(--mf-shadow-focus);
|
|
5933
|
+
}
|
|
5934
|
+
|
|
5935
|
+
.magicfeedback-upload-icon {
|
|
5936
|
+
display: inline-flex;
|
|
5937
|
+
align-items: center;
|
|
5938
|
+
justify-content: center;
|
|
5939
|
+
width: 46px;
|
|
5940
|
+
height: 46px;
|
|
5941
|
+
color: var(--mf-primary);
|
|
5942
|
+
background-color: var(--mf-surface);
|
|
5943
|
+
border-radius: var(--mf-radius-full);
|
|
5944
|
+
box-shadow: var(--mf-shadow-sm);
|
|
5945
|
+
pointer-events: none;
|
|
5946
|
+
}
|
|
5947
|
+
|
|
5948
|
+
.magicfeedback-upload-icon svg {
|
|
5949
|
+
width: 24px;
|
|
5950
|
+
height: 24px;
|
|
5951
|
+
}
|
|
5952
|
+
|
|
5953
|
+
.magicfeedback-upload-cta {
|
|
5954
|
+
font-family: inherit;
|
|
5955
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
5956
|
+
font-size: var(--mf-font-size-base);
|
|
5957
|
+
color: var(--mf-text-primary);
|
|
5958
|
+
pointer-events: none;
|
|
5959
|
+
}
|
|
5960
|
+
|
|
5961
|
+
.magicfeedback-upload-hint {
|
|
5962
|
+
font-family: inherit;
|
|
5963
|
+
font-size: var(--mf-font-size-sm);
|
|
5964
|
+
color: var(--mf-text-muted);
|
|
5965
|
+
pointer-events: none;
|
|
5966
|
+
}
|
|
5967
|
+
|
|
5968
|
+
.magicfeedback-upload-list {
|
|
5969
|
+
display: flex;
|
|
5970
|
+
flex-direction: column;
|
|
5971
|
+
gap: var(--mf-space-sm);
|
|
5972
|
+
width: 100%;
|
|
5973
|
+
margin: 0;
|
|
5974
|
+
padding: 0;
|
|
5975
|
+
list-style: none;
|
|
5976
|
+
}
|
|
5977
|
+
|
|
5978
|
+
.magicfeedback-upload-list:empty {
|
|
5979
|
+
display: none;
|
|
5980
|
+
}
|
|
5981
|
+
|
|
5982
|
+
.magicfeedback-upload-file-item {
|
|
5983
|
+
display: flex;
|
|
5984
|
+
align-items: center;
|
|
5985
|
+
gap: var(--mf-space-md);
|
|
5986
|
+
padding: var(--mf-space-sm) var(--mf-space-md);
|
|
5987
|
+
background-color: var(--mf-surface);
|
|
5988
|
+
border: 1px solid var(--mf-border);
|
|
5989
|
+
border-radius: var(--mf-radius-sm);
|
|
5990
|
+
box-shadow: var(--mf-shadow-sm);
|
|
5991
|
+
animation: mf-scale-in 0.2s ease-out;
|
|
5992
|
+
}
|
|
5993
|
+
|
|
5994
|
+
.magicfeedback-upload-thumb {
|
|
5995
|
+
flex: 0 0 auto;
|
|
5996
|
+
display: inline-flex;
|
|
5997
|
+
align-items: center;
|
|
5998
|
+
justify-content: center;
|
|
5999
|
+
width: 40px;
|
|
6000
|
+
height: 40px;
|
|
6001
|
+
overflow: hidden;
|
|
6002
|
+
color: var(--mf-text-secondary);
|
|
6003
|
+
background-color: var(--mf-surface-alt);
|
|
6004
|
+
border-radius: var(--mf-radius-sm);
|
|
6005
|
+
}
|
|
6006
|
+
|
|
6007
|
+
.magicfeedback-upload-thumb img {
|
|
6008
|
+
width: 100%;
|
|
6009
|
+
height: 100%;
|
|
6010
|
+
object-fit: cover;
|
|
6011
|
+
}
|
|
6012
|
+
|
|
6013
|
+
.magicfeedback-upload-thumb svg {
|
|
6014
|
+
width: 20px;
|
|
6015
|
+
height: 20px;
|
|
6016
|
+
}
|
|
6017
|
+
|
|
6018
|
+
.magicfeedback-upload-file-info {
|
|
6019
|
+
display: flex;
|
|
6020
|
+
flex-direction: column;
|
|
6021
|
+
flex: 1 1 auto;
|
|
6022
|
+
min-width: 0;
|
|
6023
|
+
text-align: start;
|
|
6024
|
+
}
|
|
6025
|
+
|
|
6026
|
+
.magicfeedback-upload-file-name {
|
|
6027
|
+
font-family: inherit;
|
|
6028
|
+
font-size: var(--mf-font-size-sm);
|
|
6029
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
6030
|
+
color: var(--mf-text-primary);
|
|
6031
|
+
white-space: nowrap;
|
|
6032
|
+
overflow: hidden;
|
|
6033
|
+
text-overflow: ellipsis;
|
|
6034
|
+
}
|
|
6035
|
+
|
|
6036
|
+
.magicfeedback-upload-file-size {
|
|
6037
|
+
font-family: inherit;
|
|
6038
|
+
font-size: 0.75rem;
|
|
6039
|
+
color: var(--mf-text-muted);
|
|
6040
|
+
}
|
|
6041
|
+
|
|
6042
|
+
.magicfeedback-upload-remove {
|
|
6043
|
+
flex: 0 0 auto;
|
|
6044
|
+
display: inline-flex;
|
|
6045
|
+
align-items: center;
|
|
6046
|
+
justify-content: center;
|
|
6047
|
+
width: 30px;
|
|
6048
|
+
height: 30px;
|
|
6049
|
+
padding: 0;
|
|
6050
|
+
color: var(--mf-text-muted);
|
|
6051
|
+
background-color: transparent;
|
|
6052
|
+
border: none;
|
|
6053
|
+
border-radius: var(--mf-radius-full);
|
|
6054
|
+
cursor: pointer;
|
|
6055
|
+
transition: var(--mf-transition-fast);
|
|
6056
|
+
}
|
|
6057
|
+
|
|
6058
|
+
.magicfeedback-upload-remove:focus-visible {
|
|
6059
|
+
color: var(--mf-error);
|
|
6060
|
+
background-color: var(--mf-primary-light);
|
|
6061
|
+
outline: none;
|
|
6062
|
+
}
|
|
6063
|
+
|
|
6064
|
+
@media (hover: hover) {
|
|
6065
|
+
.magicfeedback-upload-remove:hover {
|
|
6066
|
+
color: var(--mf-error);
|
|
6067
|
+
background-color: var(--mf-primary-light);
|
|
6068
|
+
outline: none;
|
|
6069
|
+
}
|
|
6070
|
+
}
|
|
6071
|
+
|
|
6072
|
+
.magicfeedback-upload-remove svg {
|
|
6073
|
+
width: 16px;
|
|
6074
|
+
height: 16px;
|
|
6075
|
+
}
|
|
6076
|
+
|
|
6077
|
+
.magicfeedback-upload-error {
|
|
6078
|
+
display: none;
|
|
6079
|
+
font-family: inherit;
|
|
6080
|
+
font-size: var(--mf-font-size-sm);
|
|
6081
|
+
color: var(--mf-error);
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
.magicfeedback-upload-error.is-visible {
|
|
6085
|
+
display: block;
|
|
6086
|
+
}
|
|
6087
|
+
|
|
6088
|
+
/* ========================================
|
|
6089
|
+
RTL (Arabic)
|
|
6090
|
+
========================================
|
|
6091
|
+
The SDK stamps dir="rtl" (and .magicfeedback-rtl) on the survey container
|
|
6092
|
+
for right-to-left languages. Everything else in this stylesheet uses logical
|
|
6093
|
+
properties (text-align: start, padding-inline-*, inset-inline-*), so it
|
|
6094
|
+
mirrors on its own; only the handful of rules that cannot be expressed
|
|
6095
|
+
logically live here.
|
|
6096
|
+
|
|
6097
|
+
Rules are scoped to [dir="rtl"] inside our own subtree so a host page that is
|
|
6098
|
+
itself RTL, or one that embeds an Arabic survey in an LTR page, both render
|
|
6099
|
+
correctly. */
|
|
6100
|
+
|
|
6101
|
+
/* background-position has no logical form: move the select caret to the
|
|
6102
|
+
left edge, opposite the padding that inset-inline-end already mirrored. */
|
|
6103
|
+
[dir="rtl"] select {
|
|
6104
|
+
background-position: left var(--mf-space-md) center;
|
|
6105
|
+
}
|
|
6106
|
+
|
|
6107
|
+
/* Emails, URLs, numbers, dates and phone numbers are latin/numeric content
|
|
6108
|
+
even in an Arabic survey: keep their own direction LTR so punctuation
|
|
6109
|
+
(@, ., +, /) lands where the user expects, but align them to the start of
|
|
6110
|
+
the RTL line so they still read as part of the form. */
|
|
6111
|
+
[dir="rtl"] input[type="email"],
|
|
6112
|
+
[dir="rtl"] input[type="url"],
|
|
6113
|
+
[dir="rtl"] input[type="number"],
|
|
6114
|
+
[dir="rtl"] input[type="tel"],
|
|
6115
|
+
[dir="rtl"] input[type="date"],
|
|
6116
|
+
[dir="rtl"] input[type="time"] {
|
|
6117
|
+
direction: ltr;
|
|
6118
|
+
text-align: right;
|
|
6119
|
+
}
|
|
6120
|
+
|
|
6121
|
+
/* Mirror of mf-slide-in: questions enter from the reading edge. */
|
|
6122
|
+
@keyframes mf-slide-in-rtl {
|
|
6123
|
+
from {
|
|
6124
|
+
opacity: 0;
|
|
6125
|
+
transform: translateX(16px);
|
|
6126
|
+
}
|
|
6127
|
+
to {
|
|
6128
|
+
opacity: 1;
|
|
6129
|
+
transform: translateX(0);
|
|
6130
|
+
}
|
|
6131
|
+
}
|
|
6132
|
+
|
|
6133
|
+
[dir="rtl"] .magicfeedback-div {
|
|
6134
|
+
animation-name: mf-slide-in-rtl;
|
|
6135
|
+
}
|
|
6136
|
+
|
|
6137
|
+
/* ========================================
|
|
6138
|
+
LOCAL \u2014 reglas del popup, no vienen del paquete
|
|
6139
|
+
======================================== */
|
|
6140
|
+
|
|
6141
|
+
/* Los controles de formulario no heredan font-family: cuando el popup trae fuente propia
|
|
6142
|
+
(clase deepdots-has-font), se les fuerza la del contenedor. */
|
|
6143
|
+
.deepdots-popup.deepdots-has-font button,
|
|
6144
|
+
.deepdots-popup.deepdots-has-font input,
|
|
6145
|
+
.deepdots-popup.deepdots-has-font textarea,
|
|
6146
|
+
.deepdots-popup.deepdots-has-font select {
|
|
6147
|
+
font-family: var(--deepdots-font, inherit);
|
|
6148
|
+
}
|
|
3615
6149
|
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
img.id = id;
|
|
3622
|
-
img.src = style.logo;
|
|
3623
|
-
img.alt = "Logo";
|
|
3624
|
-
img.style.cssText = BASE_CSS;
|
|
3625
|
-
if (style.logoSize && MAX_HEIGHT[style.logoSize]) {
|
|
3626
|
-
img.style.maxHeight = MAX_HEIGHT[style.logoSize];
|
|
3627
|
-
}
|
|
3628
|
-
switch (style.logoPosition) {
|
|
3629
|
-
case "left":
|
|
3630
|
-
img.style.margin = "12px 0 0 0";
|
|
3631
|
-
img.style.setProperty("margin-inline-start", "0");
|
|
3632
|
-
img.style.setProperty("margin-inline-end", "16px");
|
|
3633
|
-
break;
|
|
3634
|
-
case "right":
|
|
3635
|
-
img.style.margin = "12px 0 0 0";
|
|
3636
|
-
img.style.setProperty("margin-inline-start", "auto");
|
|
3637
|
-
img.style.setProperty("margin-inline-end", "0");
|
|
3638
|
-
break;
|
|
3639
|
-
case "center":
|
|
3640
|
-
img.style.margin = "12px auto 0 auto";
|
|
3641
|
-
break;
|
|
3642
|
-
}
|
|
3643
|
-
parent.insertBefore(img, anchor);
|
|
3644
|
-
return img;
|
|
6150
|
+
/* WebKit s\xED aplica el padding al radio nativo: con padding el control se dibuja enorme (se vio
|
|
6151
|
+
en iOS, WebView de RN y Safari, no en Chrome). El paquete ya no lo pone, pero la regla es
|
|
6152
|
+
barata y evita que vuelva. */
|
|
6153
|
+
.deepdots-popup input[type="radio"] {
|
|
6154
|
+
padding: 0;
|
|
3645
6155
|
}
|
|
3646
|
-
|
|
3647
|
-
var init_logo = __esm({
|
|
3648
|
-
"src/ui/logo.ts"() {
|
|
3649
|
-
"use strict";
|
|
3650
|
-
BASE_CSS = "max-height:40px; max-width:100%; object-fit:contain; display:block; margin:12px 0 0 0;";
|
|
3651
|
-
MAX_HEIGHT = {
|
|
3652
|
-
small: "30px",
|
|
3653
|
-
medium: "50px",
|
|
3654
|
-
large: "70px"
|
|
3655
|
-
};
|
|
6156
|
+
`;
|
|
3656
6157
|
}
|
|
3657
6158
|
});
|
|
3658
6159
|
|
|
3659
|
-
// src/assets/survey-css/2.2.
|
|
3660
|
-
var
|
|
3661
|
-
"src/assets/survey-css/2.2.
|
|
6160
|
+
// src/assets/survey-css/2.2.39.css
|
|
6161
|
+
var require__2 = __commonJS({
|
|
6162
|
+
"src/assets/survey-css/2.2.39.css"(exports, module2) {
|
|
3662
6163
|
module2.exports = `/**
|
|
3663
6164
|
* NO EDITAR A MANO \u2014 generado por scripts/vendor-survey-css.mjs
|
|
3664
6165
|
*
|
|
3665
|
-
* Copia de @magicfeedback/native@2.2.
|
|
6166
|
+
* Copia de @magicfeedback/native@2.2.39 \u2192 dist/styles/magicfeedback-default.css
|
|
3666
6167
|
* (la hoja can\xF3nica del paquete, la que apunta su campo "style"), con estos cambios locales:
|
|
3667
6168
|
*
|
|
3668
6169
|
* 1. Sin el @import de Google Fonts (Nunito): no queremos una petici\xF3n externa desde la
|
|
@@ -4194,6 +6695,7 @@ var require__ = __commonJS({
|
|
|
4194
6695
|
|
|
4195
6696
|
.magicfeedback-email-hint {
|
|
4196
6697
|
margin: 0;
|
|
6698
|
+
text-align: start;
|
|
4197
6699
|
font-size: var(--mf-font-size-sm);
|
|
4198
6700
|
line-height: 1.45;
|
|
4199
6701
|
color: var(--mf-text-secondary);
|
|
@@ -5998,21 +8500,21 @@ div.magicfeedback-radio {
|
|
|
5998
8500
|
}
|
|
5999
8501
|
});
|
|
6000
8502
|
|
|
6001
|
-
// src/assets/survey-css/2.2.
|
|
6002
|
-
var
|
|
6003
|
-
"src/assets/survey-css/2.2.
|
|
8503
|
+
// src/assets/survey-css/2.2.44.css
|
|
8504
|
+
var require__3 = __commonJS({
|
|
8505
|
+
"src/assets/survey-css/2.2.44.css"(exports, module2) {
|
|
6004
8506
|
module2.exports = `/**
|
|
6005
8507
|
* NO EDITAR A MANO \u2014 generado por scripts/vendor-survey-css.mjs
|
|
6006
8508
|
*
|
|
6007
|
-
* Copia de @magicfeedback/native@2.2.
|
|
8509
|
+
* Copia de @magicfeedback/native@2.2.44 \u2192 dist/styles/magicfeedback-default.css
|
|
6008
8510
|
* (la hoja can\xF3nica del paquete, la que apunta su campo "style"), con estos cambios locales:
|
|
6009
8511
|
*
|
|
6010
8512
|
* 1. Sin el @import de Google Fonts (Nunito): no queremos una petici\xF3n externa desde la
|
|
6011
8513
|
* p\xE1gina del host, y la tipograf\xEDa la decide el popup.
|
|
6012
8514
|
* 2. .magicfeedback-container hereda la fuente del popup (var(--deepdots-font, inherit)).
|
|
6013
|
-
* 3. Los selectores
|
|
6014
|
-
*
|
|
6015
|
-
*
|
|
8515
|
+
* 3. Los selectores de elementos (h2, p, input\u2026) vienen acotados por el paquete con
|
|
8516
|
+
* :where(.magicfeedback-container, \u2026) desde 2.2.43 (DD-180); ese prefijo se cambia por
|
|
8517
|
+
* .deepdots-popup, el mismo alcance que antes (tambi\xE9n visten t\xEDtulo y mensaje final).
|
|
6016
8518
|
* 4. El grupo .magicfeedback-radio se cualifica como div.magicfeedback-radio (la clase acaba
|
|
6017
8519
|
* tambi\xE9n en el <input> del boolean).
|
|
6018
8520
|
* 5. Todo :hover va dentro de @media (hover: hover): en t\xE1ctil WebKit deja el hover pegado
|
|
@@ -6048,11 +8550,16 @@ var require__2 = __commonJS({
|
|
|
6048
8550
|
scale below, not tied to the brand color. */
|
|
6049
8551
|
--mf-primary: #5d7bad;
|
|
6050
8552
|
--mf-primary-hover: color-mix(in srgb, var(--mf-primary) 85%, black);
|
|
6051
|
-
--mf-
|
|
8553
|
+
/* --mf-tint-base is what light tints mix into: white here, the dark
|
|
8554
|
+
surface in dark mode (DD-238). */
|
|
8555
|
+
--mf-tint-base: #FFFFFF;
|
|
8556
|
+
--mf-primary-light-mix: 15%;
|
|
8557
|
+
--mf-primary-border-mix: 35%;
|
|
8558
|
+
--mf-primary-light: color-mix(in srgb, var(--mf-primary) var(--mf-primary-light-mix), var(--mf-tint-base));
|
|
6052
8559
|
/* a translucent tint \u2014 mixed with transparent (opacity), not white,
|
|
6053
8560
|
so it reads as a soft shadow of the brand color rather than a
|
|
6054
8561
|
pastel of it. */
|
|
6055
|
-
--mf-primary-border: color-mix(in srgb, var(--mf-primary)
|
|
8562
|
+
--mf-primary-border: color-mix(in srgb, var(--mf-primary) var(--mf-primary-border-mix), transparent);
|
|
6056
8563
|
|
|
6057
8564
|
--mf-text-primary: #1E293B;
|
|
6058
8565
|
--mf-text-secondary: #475569;
|
|
@@ -6073,6 +8580,15 @@ var require__2 = __commonJS({
|
|
|
6073
8580
|
--mf-surface-alt: #F1F5F9;
|
|
6074
8581
|
--mf-accent: #38BDF8;
|
|
6075
8582
|
|
|
8583
|
+
/* Colors that used to be hard-coded in rules and render code (DD-238) */
|
|
8584
|
+
--mf-on-primary: #FFFFFF;
|
|
8585
|
+
--mf-text-strong: #000000;
|
|
8586
|
+
--mf-danger-text: #C70039;
|
|
8587
|
+
--mf-star: #fbbf24;
|
|
8588
|
+
--mf-star-empty: #CCCCCC;
|
|
8589
|
+
--mf-overlay: rgba(0, 0, 0, 0.4);
|
|
8590
|
+
--mf-shadow-modal: 0 8px 24px rgba(0, 0, 0, 0.2);
|
|
8591
|
+
|
|
6076
8592
|
/* Spacing */
|
|
6077
8593
|
--mf-space-xs: 0.25rem;
|
|
6078
8594
|
--mf-space-sm: 0.5rem;
|
|
@@ -6113,6 +8629,58 @@ var require__2 = __commonJS({
|
|
|
6113
8629
|
--mf-transition-fast: all 0.15s ease;
|
|
6114
8630
|
}
|
|
6115
8631
|
|
|
8632
|
+
/* ========================================
|
|
8633
|
+
DARK MODE (DD-238)
|
|
8634
|
+
Set by the SDK on the container (and the portaled modal backdrop) when the
|
|
8635
|
+
survey Style background is dark, or when the host forces mode: 'dark'.
|
|
8636
|
+
The Style's own dark background colors are written inline on the same
|
|
8637
|
+
element, so they win over the defaults below; the derived tokens use var()
|
|
8638
|
+
so they resolve against those inline values.
|
|
8639
|
+
======================================== */
|
|
8640
|
+
.magicfeedback-container[data-mf-mode="dark"],
|
|
8641
|
+
.magicfeedback-preview[data-mf-mode="dark"],
|
|
8642
|
+
.magicfeedback-modal-backdrop[data-mf-mode="dark"] {
|
|
8643
|
+
color-scheme: dark;
|
|
8644
|
+
|
|
8645
|
+
--mf-text-primary: #F1F5F9;
|
|
8646
|
+
--mf-text-secondary: #CBD5E1;
|
|
8647
|
+
--mf-text-muted: #94A3B8;
|
|
8648
|
+
--mf-text-strong: #FFFFFF;
|
|
8649
|
+
|
|
8650
|
+
--mf-bg-primary: #0F172A;
|
|
8651
|
+
--mf-bg-secondary: #1E293B;
|
|
8652
|
+
--mf-surface: #1E293B;
|
|
8653
|
+
--mf-surface-alt: color-mix(in srgb, var(--mf-surface) 90%, white);
|
|
8654
|
+
--mf-bg-hover: color-mix(in srgb, var(--mf-surface) 84%, white);
|
|
8655
|
+
--mf-border: color-mix(in srgb, var(--mf-surface) 72%, white);
|
|
8656
|
+
|
|
8657
|
+
--mf-tint-base: var(--mf-surface);
|
|
8658
|
+
--mf-primary-light-mix: 30%;
|
|
8659
|
+
--mf-primary-border-mix: 55%;
|
|
8660
|
+
--mf-primary-light: color-mix(in srgb, var(--mf-primary) var(--mf-primary-light-mix), var(--mf-tint-base));
|
|
8661
|
+
--mf-primary-border: color-mix(in srgb, var(--mf-primary) var(--mf-primary-border-mix), transparent);
|
|
8662
|
+
|
|
8663
|
+
--mf-success: #4ADE80;
|
|
8664
|
+
--mf-error: #F87171;
|
|
8665
|
+
--mf-warning: #FBBF24;
|
|
8666
|
+
--mf-danger-text: #FF8FA3;
|
|
8667
|
+
--mf-star-empty: color-mix(in srgb, var(--mf-surface) 60%, white);
|
|
8668
|
+
--mf-overlay: rgba(0, 0, 0, 0.6);
|
|
8669
|
+
|
|
8670
|
+
--mf-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
|
|
8671
|
+
--mf-shadow-md: 0 8px 20px rgba(0, 0, 0, 0.35);
|
|
8672
|
+
--mf-shadow-lg: 0 16px 30px rgba(0, 0, 0, 0.45);
|
|
8673
|
+
--mf-shadow-focus: 0 0 0 3px rgba(241, 245, 249, 0.25);
|
|
8674
|
+
--mf-shadow-card: 0 18px 40px rgba(0, 0, 0, 0.35);
|
|
8675
|
+
--mf-shadow-modal: 0 8px 24px rgba(0, 0, 0, 0.6);
|
|
8676
|
+
}
|
|
8677
|
+
|
|
8678
|
+
/* Priority list arrows are a black SVG image: flip them to light. */
|
|
8679
|
+
[data-mf-mode="dark"] .magicfeedback-priority-list-arrow-up,
|
|
8680
|
+
[data-mf-mode="dark"] .magicfeedback-priority-list-arrow-down {
|
|
8681
|
+
filter: invert(1);
|
|
8682
|
+
}
|
|
8683
|
+
|
|
6116
8684
|
/* ========================================
|
|
6117
8685
|
ANIMATIONS
|
|
6118
8686
|
======================================== */
|
|
@@ -6381,6 +8949,12 @@ var require__2 = __commonJS({
|
|
|
6381
8949
|
margin-bottom: var(--mf-space-sm);
|
|
6382
8950
|
}
|
|
6383
8951
|
|
|
8952
|
+
/* Element rules (h2, p, inputs, ...) are scoped to the survey container, the
|
|
8953
|
+
previewQuestion() host and the priority-list modal, which is portaled to
|
|
8954
|
+
<body>. This sheet is
|
|
8955
|
+
loaded on the host page, so a bare \`p\` or \`input\` would restyle the host
|
|
8956
|
+
app too. :where() keeps the specificity of the bare selector, so every
|
|
8957
|
+
.magicfeedback-* rule still wins over these as before. */
|
|
6384
8958
|
.deepdots-popup h2 {
|
|
6385
8959
|
font-size: var(--mf-font-size-xl);
|
|
6386
8960
|
font-weight: 600;
|
|
@@ -6487,7 +9061,7 @@ var require__2 = __commonJS({
|
|
|
6487
9061
|
font-size: 1.35rem;
|
|
6488
9062
|
font-weight: var(--mf-font-weight-extrabold);
|
|
6489
9063
|
line-height: 1;
|
|
6490
|
-
color:
|
|
9064
|
+
color: var(--mf-on-primary);
|
|
6491
9065
|
background-color: var(--mf-secondary, #2E2E2E);
|
|
6492
9066
|
border: 2px solid var(--mf-secondary, #2E2E2E);
|
|
6493
9067
|
border-radius: var(--mf-radius-full);
|
|
@@ -6961,7 +9535,7 @@ div.magicfeedback-radio {
|
|
|
6961
9535
|
|
|
6962
9536
|
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
6963
9537
|
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
6964
|
-
color:
|
|
9538
|
+
color: var(--mf-on-primary);
|
|
6965
9539
|
background-color: var(--mf-primary);
|
|
6966
9540
|
box-shadow: var(--mf-shadow-md);
|
|
6967
9541
|
}
|
|
@@ -7000,7 +9574,7 @@ div.magicfeedback-radio {
|
|
|
7000
9574
|
}
|
|
7001
9575
|
|
|
7002
9576
|
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
7003
|
-
color:
|
|
9577
|
+
color: var(--mf-on-primary);
|
|
7004
9578
|
background-color: var(--mf-primary);
|
|
7005
9579
|
box-shadow: var(--mf-shadow-md);
|
|
7006
9580
|
}
|
|
@@ -7038,7 +9612,7 @@ div.magicfeedback-radio {
|
|
|
7038
9612
|
|
|
7039
9613
|
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
7040
9614
|
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
7041
|
-
color:
|
|
9615
|
+
color: var(--mf-on-primary);
|
|
7042
9616
|
background-color: var(--mf-primary);
|
|
7043
9617
|
box-shadow: var(--mf-shadow-md);
|
|
7044
9618
|
}
|
|
@@ -7070,7 +9644,7 @@ div.magicfeedback-radio {
|
|
|
7070
9644
|
|
|
7071
9645
|
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
7072
9646
|
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
7073
|
-
color:
|
|
9647
|
+
color: var(--mf-on-primary);
|
|
7074
9648
|
background-color: var(--mf-primary);
|
|
7075
9649
|
}
|
|
7076
9650
|
|
|
@@ -7090,13 +9664,13 @@ div.magicfeedback-radio {
|
|
|
7090
9664
|
@media (hover: hover) {
|
|
7091
9665
|
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover,
|
|
7092
9666
|
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover ~ span {
|
|
7093
|
-
color:
|
|
9667
|
+
color: var(--mf-star);
|
|
7094
9668
|
transform: scale(1.1);
|
|
7095
9669
|
}
|
|
7096
9670
|
}
|
|
7097
9671
|
|
|
7098
9672
|
.magicfeedback-rating-star-selected {
|
|
7099
|
-
color:
|
|
9673
|
+
color: var(--mf-star) !important;
|
|
7100
9674
|
}
|
|
7101
9675
|
|
|
7102
9676
|
/* ========================================
|
|
@@ -7317,6 +9891,10 @@ div.magicfeedback-radio {
|
|
|
7317
9891
|
width: 100%;
|
|
7318
9892
|
}
|
|
7319
9893
|
|
|
9894
|
+
[data-mf-mode="dark"] .magicfeedback-max-diff {
|
|
9895
|
+
--mf-max-diff-worst: #F59E0B;
|
|
9896
|
+
}
|
|
9897
|
+
|
|
7320
9898
|
.magicfeedback-max-diff-container {
|
|
7321
9899
|
width: 100%;
|
|
7322
9900
|
/* the layout follows the space the survey gets (a pop-in, a sidebar),
|
|
@@ -7439,7 +10017,7 @@ div.magicfeedback-radio {
|
|
|
7439
10017
|
width: 26px;
|
|
7440
10018
|
height: 26px;
|
|
7441
10019
|
margin: 0;
|
|
7442
|
-
border: 2px solid color-mix(in srgb, var(--mf-text-secondary) 80%,
|
|
10020
|
+
border: 2px solid color-mix(in srgb, var(--mf-text-secondary) 80%, var(--mf-tint-base));
|
|
7443
10021
|
border-radius: var(--mf-radius-full);
|
|
7444
10022
|
background: var(--mf-bg-secondary);
|
|
7445
10023
|
cursor: pointer;
|
|
@@ -7454,12 +10032,12 @@ div.magicfeedback-radio {
|
|
|
7454
10032
|
|
|
7455
10033
|
.magicfeedback-max-diff-best:checked {
|
|
7456
10034
|
border-color: var(--mf-primary);
|
|
7457
|
-
background: radial-gradient(circle,
|
|
10035
|
+
background: radial-gradient(circle, var(--mf-on-primary) 0 4px, var(--mf-primary) 4.5px);
|
|
7458
10036
|
}
|
|
7459
10037
|
|
|
7460
10038
|
.magicfeedback-max-diff-worst:checked {
|
|
7461
10039
|
border-color: var(--mf-max-diff-worst);
|
|
7462
|
-
background: radial-gradient(circle,
|
|
10040
|
+
background: radial-gradient(circle, var(--mf-on-primary) 0 4px, var(--mf-max-diff-worst) 4.5px);
|
|
7463
10041
|
}
|
|
7464
10042
|
|
|
7465
10043
|
.magicfeedback-max-diff-input:focus-visible {
|
|
@@ -7639,7 +10217,7 @@ div.magicfeedback-radio {
|
|
|
7639
10217
|
padding: 0.8rem 1.6rem;
|
|
7640
10218
|
font-size: var(--mf-font-size-base);
|
|
7641
10219
|
font-weight: 800;
|
|
7642
|
-
color:
|
|
10220
|
+
color: var(--mf-on-primary);
|
|
7643
10221
|
background-color: var(--mf-primary);
|
|
7644
10222
|
border: 2px solid var(--mf-primary);
|
|
7645
10223
|
border-radius: var(--mf-radius-full);
|
|
@@ -7742,7 +10320,7 @@ div.magicfeedback-radio {
|
|
|
7742
10320
|
left: 0;
|
|
7743
10321
|
width: 100vw;
|
|
7744
10322
|
height: 100vh;
|
|
7745
|
-
background:
|
|
10323
|
+
background: var(--mf-overlay);
|
|
7746
10324
|
display: none; /* toggled to flex when open */
|
|
7747
10325
|
align-items: center;
|
|
7748
10326
|
justify-content: center;
|
|
@@ -7751,9 +10329,10 @@ div.magicfeedback-radio {
|
|
|
7751
10329
|
|
|
7752
10330
|
/* Modal container */
|
|
7753
10331
|
.magicfeedback-modal {
|
|
7754
|
-
background:
|
|
10332
|
+
background: var(--mf-surface);
|
|
10333
|
+
color: var(--mf-text-primary);
|
|
7755
10334
|
border-radius: 8px;
|
|
7756
|
-
box-shadow:
|
|
10335
|
+
box-shadow: var(--mf-shadow-modal);
|
|
7757
10336
|
max-width: 520px;
|
|
7758
10337
|
width: 90%;
|
|
7759
10338
|
max-height: 80vh;
|
|
@@ -7870,7 +10449,7 @@ div.magicfeedback-radio {
|
|
|
7870
10449
|
.magicfeedback-button-primary {
|
|
7871
10450
|
border-color: var(--mf-primary);
|
|
7872
10451
|
background: var(--mf-primary);
|
|
7873
|
-
color:
|
|
10452
|
+
color: var(--mf-on-primary);
|
|
7874
10453
|
box-shadow: var(--mf-shadow-md);
|
|
7875
10454
|
}
|
|
7876
10455
|
|
|
@@ -7886,7 +10465,7 @@ div.magicfeedback-radio {
|
|
|
7886
10465
|
|
|
7887
10466
|
/* Warning flash */
|
|
7888
10467
|
.magicfeedback-warning {
|
|
7889
|
-
color:
|
|
10468
|
+
color: var(--mf-danger-text);
|
|
7890
10469
|
}
|
|
7891
10470
|
|
|
7892
10471
|
/* Start message button */
|
|
@@ -7895,7 +10474,7 @@ div.magicfeedback-radio {
|
|
|
7895
10474
|
border: 2px solid var(--mf-primary);
|
|
7896
10475
|
border-radius: var(--mf-radius-full);
|
|
7897
10476
|
background: var(--mf-primary);
|
|
7898
|
-
color:
|
|
10477
|
+
color: var(--mf-on-primary);
|
|
7899
10478
|
padding: 0.8rem 1.4rem;
|
|
7900
10479
|
font-size: 15px;
|
|
7901
10480
|
font-weight: 800;
|
|
@@ -8005,9 +10584,9 @@ div.magicfeedback-radio {
|
|
|
8005
10584
|
ACCESSIBILITY
|
|
8006
10585
|
======================================== */
|
|
8007
10586
|
@media (prefers-reduced-motion: reduce) {
|
|
8008
|
-
*,
|
|
8009
|
-
*::before,
|
|
8010
|
-
*::after {
|
|
10587
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop), .deepdots-popup *,
|
|
10588
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop)::before, .deepdots-popup *::before,
|
|
10589
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop)::after, .deepdots-popup *::after {
|
|
8011
10590
|
animation-duration: 0.01ms !important;
|
|
8012
10591
|
animation-iteration-count: 1 !important;
|
|
8013
10592
|
transition-duration: 0.01ms !important;
|
|
@@ -8039,17 +10618,17 @@ div.magicfeedback-radio {
|
|
|
8039
10618
|
font-size: 20px;
|
|
8040
10619
|
line-height: 1;
|
|
8041
10620
|
cursor: pointer;
|
|
8042
|
-
color:
|
|
10621
|
+
color: var(--mf-text-muted);
|
|
8043
10622
|
}
|
|
8044
10623
|
|
|
8045
10624
|
.magicfeedback-modal-close:focus {
|
|
8046
|
-
color:
|
|
10625
|
+
color: var(--mf-text-strong);
|
|
8047
10626
|
outline: none;
|
|
8048
10627
|
}
|
|
8049
10628
|
|
|
8050
10629
|
@media (hover: hover) {
|
|
8051
10630
|
.magicfeedback-modal-close:hover {
|
|
8052
|
-
color:
|
|
10631
|
+
color: var(--mf-text-strong);
|
|
8053
10632
|
outline: none;
|
|
8054
10633
|
}
|
|
8055
10634
|
}
|
|
@@ -8284,7 +10863,7 @@ div.magicfeedback-radio {
|
|
|
8284
10863
|
|
|
8285
10864
|
/* background-position has no logical form: move the select caret to the
|
|
8286
10865
|
left edge, opposite the padding that inset-inline-end already mirrored. */
|
|
8287
|
-
[dir="rtl"] select {
|
|
10866
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop)[dir="rtl"] select {
|
|
8288
10867
|
background-position: left var(--mf-space-md) center;
|
|
8289
10868
|
}
|
|
8290
10869
|
|
|
@@ -8292,12 +10871,12 @@ div.magicfeedback-radio {
|
|
|
8292
10871
|
even in an Arabic survey: keep their own direction LTR so punctuation
|
|
8293
10872
|
(@, ., +, /) lands where the user expects, but align them to the start of
|
|
8294
10873
|
the RTL line so they still read as part of the form. */
|
|
8295
|
-
[dir="rtl"] input[type="email"],
|
|
8296
|
-
[dir="rtl"] input[type="url"],
|
|
8297
|
-
[dir="rtl"] input[type="number"],
|
|
8298
|
-
[dir="rtl"] input[type="tel"],
|
|
8299
|
-
[dir="rtl"] input[type="date"],
|
|
8300
|
-
[dir="rtl"] input[type="time"] {
|
|
10874
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop)[dir="rtl"] input[type="email"],
|
|
10875
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop)[dir="rtl"] input[type="url"],
|
|
10876
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop)[dir="rtl"] input[type="number"],
|
|
10877
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop)[dir="rtl"] input[type="tel"],
|
|
10878
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop)[dir="rtl"] input[type="date"],
|
|
10879
|
+
:where(.magicfeedback-container, .magicfeedback-preview, .magicfeedback-modal-backdrop)[dir="rtl"] input[type="time"] {
|
|
8301
10880
|
direction: ltr;
|
|
8302
10881
|
text-align: right;
|
|
8303
10882
|
}
|
|
@@ -8341,13 +10920,13 @@ div.magicfeedback-radio {
|
|
|
8341
10920
|
}
|
|
8342
10921
|
});
|
|
8343
10922
|
|
|
8344
|
-
// src/assets/survey-css/2.2.
|
|
8345
|
-
var
|
|
8346
|
-
"src/assets/survey-css/2.2.
|
|
10923
|
+
// src/assets/survey-css/2.2.47.css
|
|
10924
|
+
var require__4 = __commonJS({
|
|
10925
|
+
"src/assets/survey-css/2.2.47.css"(exports, module2) {
|
|
8347
10926
|
module2.exports = `/**
|
|
8348
10927
|
* NO EDITAR A MANO \u2014 generado por scripts/vendor-survey-css.mjs
|
|
8349
10928
|
*
|
|
8350
|
-
* Copia de @magicfeedback/native@2.2.
|
|
10929
|
+
* Copia de @magicfeedback/native@2.2.47 \u2192 dist/styles/magicfeedback-default.css
|
|
8351
10930
|
* (la hoja can\xF3nica del paquete, la que apunta su campo "style"), con estos cambios locales:
|
|
8352
10931
|
*
|
|
8353
10932
|
* 1. Sin el @import de Google Fonts (Nunito): no queremos una petici\xF3n externa desde la
|
|
@@ -8589,6 +11168,11 @@ var require__3 = __commonJS({
|
|
|
8589
11168
|
padding: var(--mf-space-lg);
|
|
8590
11169
|
margin: var(--mf-space-lg) 0;
|
|
8591
11170
|
animation: mf-scale-in 0.3s ease-out;
|
|
11171
|
+
/* A long word or URL with no spaces wraps instead of running off the card
|
|
11172
|
+
(Lemu, 23-nov: an info page with "Hehehe\u2026" was cut on the right).
|
|
11173
|
+
break-word, not anywhere: it only breaks a word that does not fit and
|
|
11174
|
+
leaves the min-content width alone, so nothing in a flex row shrinks. */
|
|
11175
|
+
overflow-wrap: break-word;
|
|
8592
11176
|
}
|
|
8593
11177
|
|
|
8594
11178
|
/* .magicfeedback-info-message/-start-message are set via innerHTML (see
|
|
@@ -8775,6 +11359,7 @@ var require__3 = __commonJS({
|
|
|
8775
11359
|
LABELS & TYPOGRAPHY
|
|
8776
11360
|
======================================== */
|
|
8777
11361
|
.magicfeedback-label {
|
|
11362
|
+
overflow-wrap: break-word;
|
|
8778
11363
|
font-size: var(--mf-font-size-lg);
|
|
8779
11364
|
font-weight: var(--mf-font-weight-bold);
|
|
8780
11365
|
color: var(--mf-text-primary);
|
|
@@ -8784,6 +11369,7 @@ var require__3 = __commonJS({
|
|
|
8784
11369
|
}
|
|
8785
11370
|
|
|
8786
11371
|
.magicfeedback-sublabel {
|
|
11372
|
+
overflow-wrap: break-word;
|
|
8787
11373
|
font-size: var(--mf-font-size-base);
|
|
8788
11374
|
font-weight: var(--mf-font-weight-normal);
|
|
8789
11375
|
color: var(--mf-text-secondary);
|
|
@@ -10769,7 +13355,8 @@ var init_surveyCss = __esm({
|
|
|
10769
13355
|
SURVEY_CSS_LOADERS = {
|
|
10770
13356
|
"2.2.38": () => Promise.resolve().then(() => __toESM(require__())),
|
|
10771
13357
|
"2.2.39": () => Promise.resolve().then(() => __toESM(require__2())),
|
|
10772
|
-
"2.2.44": () => Promise.resolve().then(() => __toESM(require__3()))
|
|
13358
|
+
"2.2.44": () => Promise.resolve().then(() => __toESM(require__3())),
|
|
13359
|
+
"2.2.47": () => Promise.resolve().then(() => __toESM(require__4()))
|
|
10773
13360
|
};
|
|
10774
13361
|
}
|
|
10775
13362
|
});
|
|
@@ -10999,17 +13586,8 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
10999
13586
|
const appearance = options?.appearance;
|
|
11000
13587
|
let forcedMode = resolveForcedMode(appearance, systemPrefersDark());
|
|
11001
13588
|
let theme = chromePalette(chromeColors(null, style?.theme, forcedMode).dark);
|
|
11002
|
-
const
|
|
11003
|
-
|
|
11004
|
-
"bottom": { justifyContent: "center", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
11005
|
-
"bottom-right": { justifyContent: "flex-end", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
11006
|
-
"bottom-left": { justifyContent: "flex-start", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
11007
|
-
"top": { justifyContent: "center", alignItems: "flex-start", padding: "16px", background: "transparent" },
|
|
11008
|
-
"top-right": { justifyContent: "flex-end", alignItems: "flex-start", padding: "16px", background: "transparent" },
|
|
11009
|
-
"top-left": { justifyContent: "flex-start", alignItems: "flex-start", padding: "16px", background: "transparent" }
|
|
11010
|
-
};
|
|
11011
|
-
const pos = positionMap[style?.position ?? "center"] ?? positionMap["center"];
|
|
11012
|
-
const passThrough = pos.background === "transparent";
|
|
13589
|
+
const pos = resolvePlacement(style);
|
|
13590
|
+
const passThrough = !pos.blocksPage;
|
|
11013
13591
|
const popup = document.createElement("div");
|
|
11014
13592
|
popup.id = "dd-popup";
|
|
11015
13593
|
popup.className = "deepdots-popup";
|
|
@@ -11025,7 +13603,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
11025
13603
|
border-radius: 8px;
|
|
11026
13604
|
padding: 24px;
|
|
11027
13605
|
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
|
11028
|
-
max-width:
|
|
13606
|
+
max-width: ${pos.cardMaxWidthPx}px;
|
|
11029
13607
|
width: 90%;
|
|
11030
13608
|
max-height: 90vh;
|
|
11031
13609
|
min-height: 200px;
|
|
@@ -11096,6 +13674,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
11096
13674
|
let progressEnabled = options?.showProgressBar === true;
|
|
11097
13675
|
let progressShowUnit = true;
|
|
11098
13676
|
let progressUnit = "fraction";
|
|
13677
|
+
let progressMode = "current";
|
|
11099
13678
|
const progressEl = document.createElement("div");
|
|
11100
13679
|
progressEl.id = "dd-progress";
|
|
11101
13680
|
progressEl.className = "deepdots-progress";
|
|
@@ -11132,26 +13711,19 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
11132
13711
|
function updateProgress(p) {
|
|
11133
13712
|
const total = typeof p.total === "number" ? p.total : 0;
|
|
11134
13713
|
const progress = typeof p.progress === "number" ? p.progress : 0;
|
|
11135
|
-
|
|
13714
|
+
const view = progressView({ progress, total, completed: p.completed, mode: progressMode, unit: progressUnit }, labels);
|
|
13715
|
+
if (!progressEnabled || onStartPage || !view.visible) {
|
|
11136
13716
|
progressEl.style.display = "none";
|
|
11137
13717
|
containerContent.style.paddingTop = "16px";
|
|
11138
13718
|
return;
|
|
11139
13719
|
}
|
|
11140
13720
|
progressEl.style.display = "flex";
|
|
11141
13721
|
containerContent.style.paddingTop = "0";
|
|
11142
|
-
|
|
11143
|
-
const pct = Math.min(100, Math.max(0, current / total * 100));
|
|
11144
|
-
progressBar.style.width = `${pct}%`;
|
|
11145
|
-
const label = Math.min(total, Math.max(1, Math.floor(progress) + 1));
|
|
13722
|
+
progressBar.style.width = `${view.percent}%`;
|
|
11146
13723
|
progressLabel.style.display = progressShowUnit ? "block" : "none";
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
} else {
|
|
11151
|
-
progressCurrent.textContent = `${labels.question} ${label}`;
|
|
11152
|
-
progressTotal.textContent = ` ${labels.of} ${total}`;
|
|
11153
|
-
}
|
|
11154
|
-
progressFollowUp.style.display = p.followup ? "inline-block" : "none";
|
|
13724
|
+
progressCurrent.textContent = view.current;
|
|
13725
|
+
progressTotal.textContent = view.rest;
|
|
13726
|
+
progressFollowUp.style.display = p.followup && !p.completed ? "inline-block" : "none";
|
|
11155
13727
|
}
|
|
11156
13728
|
ensureMagicFeedbackStyles(cspNonce);
|
|
11157
13729
|
ensureSurveyAlignmentStyles(cspNonce);
|
|
@@ -11457,7 +14029,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
11457
14029
|
container.style.justifyContent = pos.justifyContent;
|
|
11458
14030
|
container.style.alignItems = pos.alignItems;
|
|
11459
14031
|
container.style.background = pos.background;
|
|
11460
|
-
|
|
14032
|
+
container.style.padding = pos.padding;
|
|
11461
14033
|
let revealed = false;
|
|
11462
14034
|
let revealTimer = null;
|
|
11463
14035
|
let surveyLoaded = false;
|
|
@@ -11604,6 +14176,7 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
11604
14176
|
if (options?.showProgressBar === void 0) progressEnabled = s.showProgressBar === true;
|
|
11605
14177
|
if (s.showProgressUnit !== void 0) progressShowUnit = s.showProgressUnit !== false;
|
|
11606
14178
|
if (s.progressUnit) progressUnit = s.progressUnit;
|
|
14179
|
+
if (s.progressMode) progressMode = s.progressMode;
|
|
11607
14180
|
loadedStyle = s;
|
|
11608
14181
|
applyAppearanceColors(loadedStyle);
|
|
11609
14182
|
if (s.contentAlign) {
|
|
@@ -11684,6 +14257,7 @@ var SURVEY_ALIGNMENT_STYLE_ID;
|
|
|
11684
14257
|
var init_renderPopup = __esm({
|
|
11685
14258
|
"src/ui/renderPopup.ts"() {
|
|
11686
14259
|
"use strict";
|
|
14260
|
+
init_placement();
|
|
11687
14261
|
init_tracking_manager();
|
|
11688
14262
|
init_font();
|
|
11689
14263
|
init_logo();
|
|
@@ -11691,6 +14265,7 @@ var init_renderPopup = __esm({
|
|
|
11691
14265
|
init_chromeContrast();
|
|
11692
14266
|
init_appearance();
|
|
11693
14267
|
init_busy();
|
|
14268
|
+
init_progressView();
|
|
11694
14269
|
init_logger();
|
|
11695
14270
|
init_labels();
|
|
11696
14271
|
init_reveal();
|
|
@@ -11715,6 +14290,20 @@ var import_react = require("react");
|
|
|
11715
14290
|
var import_react_native = require("react-native");
|
|
11716
14291
|
var import_react_native_webview = require("react-native-webview");
|
|
11717
14292
|
|
|
14293
|
+
// src/core/local-dev-host.ts
|
|
14294
|
+
function isLocalDevHost(hostname) {
|
|
14295
|
+
if (!hostname) return false;
|
|
14296
|
+
const h = hostname.toLowerCase().replace(/^\[|\]$/g, "");
|
|
14297
|
+
return h === "localhost" || h.endsWith(".localhost") || h === "0.0.0.0" || h === "::1" || /^127(\.\d{1,3}){3}$/.test(h);
|
|
14298
|
+
}
|
|
14299
|
+
function currentHostname() {
|
|
14300
|
+
try {
|
|
14301
|
+
return typeof location !== "undefined" && typeof location.hostname === "string" ? location.hostname : void 0;
|
|
14302
|
+
} catch {
|
|
14303
|
+
return void 0;
|
|
14304
|
+
}
|
|
14305
|
+
}
|
|
14306
|
+
|
|
11718
14307
|
// src/core/deepdots-popups.ts
|
|
11719
14308
|
init_appearance();
|
|
11720
14309
|
|
|
@@ -11910,6 +14499,7 @@ function resolveEnvironment(nodeEnv) {
|
|
|
11910
14499
|
init_tracking_manager();
|
|
11911
14500
|
|
|
11912
14501
|
// src/ui/surveyHtml.ts
|
|
14502
|
+
init_placement();
|
|
11913
14503
|
init_surveySdkVersion();
|
|
11914
14504
|
init_font();
|
|
11915
14505
|
init_labels();
|
|
@@ -11918,6 +14508,7 @@ init_surveyPalette();
|
|
|
11918
14508
|
init_chromeContrast();
|
|
11919
14509
|
init_appearance();
|
|
11920
14510
|
init_busy();
|
|
14511
|
+
init_progressView();
|
|
11921
14512
|
init_submitError();
|
|
11922
14513
|
init_style();
|
|
11923
14514
|
var REVEAL_JS = `
|
|
@@ -11944,15 +14535,6 @@ function ddCreateReveal(popup, onReveal, timeoutMs){
|
|
|
11944
14535
|
timer=setTimeout(reveal, timeoutMs);
|
|
11945
14536
|
return { reveal: reveal, whenPainted: revealWhenPainted };
|
|
11946
14537
|
}`;
|
|
11947
|
-
var POSITION_MAP = {
|
|
11948
|
-
center: { justifyContent: "center", alignItems: "center", padding: "0", background: "rgba(0,0,0,0.5)" },
|
|
11949
|
-
bottom: { justifyContent: "center", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
11950
|
-
"bottom-right": { justifyContent: "flex-end", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
11951
|
-
"bottom-left": { justifyContent: "flex-start", alignItems: "flex-end", padding: "16px", background: "transparent" },
|
|
11952
|
-
top: { justifyContent: "center", alignItems: "flex-start", padding: "16px", background: "transparent" },
|
|
11953
|
-
"top-right": { justifyContent: "flex-end", alignItems: "flex-start", padding: "16px", background: "transparent" },
|
|
11954
|
-
"top-left": { justifyContent: "flex-start", alignItems: "flex-start", padding: "16px", background: "transparent" }
|
|
11955
|
-
};
|
|
11956
14538
|
function jsonForScript(value) {
|
|
11957
14539
|
return JSON.stringify(value ?? null).replace(/</g, "\\u003C").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
11958
14540
|
}
|
|
@@ -11981,7 +14563,7 @@ function buildSurveyHtml(opts) {
|
|
|
11981
14563
|
const textPrimary = isDark2 ? "#f0f0f0" : "#111";
|
|
11982
14564
|
const textMuted = isDark2 ? "#9ca3af" : "#6b7280";
|
|
11983
14565
|
const trackBg = isDark2 ? "#3f3f46" : "#e5e7eb";
|
|
11984
|
-
const pos =
|
|
14566
|
+
const pos = resolvePlacement({ position: opts.position, size: opts.size, blockPage: opts.blockPage });
|
|
11985
14567
|
const chrome = opts.chrome !== false;
|
|
11986
14568
|
const bodyBg = chrome ? pos.background : "transparent";
|
|
11987
14569
|
const bodyPadding = chrome ? pos.padding : "0";
|
|
@@ -11989,12 +14571,12 @@ function buildSurveyHtml(opts) {
|
|
|
11989
14571
|
const cardBg = chrome ? popupBg : "transparent";
|
|
11990
14572
|
const cardShadow = chrome ? "0 4px 6px rgba(0,0,0,0.1)" : "none";
|
|
11991
14573
|
const cardRadius = chrome ? "8px" : "0";
|
|
11992
|
-
const cardMaxWidth = chrome ?
|
|
14574
|
+
const cardMaxWidth = chrome ? `${pos.cardMaxWidthPx}px` : "none";
|
|
11993
14575
|
const cardWidth = chrome ? "90%" : "100%";
|
|
11994
14576
|
const cardMinHeight = chrome ? "200px" : "0";
|
|
11995
14577
|
const cardHeight = chrome ? "auto" : "100%";
|
|
11996
14578
|
const cardMaxHeight = chrome ? "90vh" : "100%";
|
|
11997
|
-
const mobileCard = chrome ? `.deepdots-popup{width:calc(100% - 24px);max-width:calc(100% - 24px);border-radius:12px;padding:calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)) 16px}` : `.deepdots-popup{width:100%;max-width:100%;border-radius:0;padding:16px}`;
|
|
14579
|
+
const mobileCard = chrome ? `.deepdots-popup{width:calc(100% - 24px);max-width:${pos.size === "small" ? `min(${SMALL_CARD_MOBILE_MAX_PX}px, calc(100% - 24px))` : "calc(100% - 24px)"};border-radius:12px;padding:calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)) 16px}` : `.deepdots-popup{width:100%;max-width:100%;border-radius:0;padding:16px}`;
|
|
11998
14580
|
const titleJson = jsonForScript(opts.title ?? "");
|
|
11999
14581
|
const customCss = (opts.surveyCss ?? "").replace(/<\/\s*style/gi, "<\\/style");
|
|
12000
14582
|
const progressPref = opts.showProgressBar === void 0 ? "null" : String(opts.showProgressBar);
|
|
@@ -12206,13 +14788,17 @@ ${customCss}
|
|
|
12206
14788
|
var progressEnabled=progressPref===true;
|
|
12207
14789
|
var progressShowUnit=true;
|
|
12208
14790
|
var progressUnit='fraction';
|
|
14791
|
+
// DD-210: qu\xE9 cuenta la barra (style.progressMode).
|
|
14792
|
+
var progressMode='current';
|
|
14793
|
+
${PROGRESS_VIEW_JS}
|
|
12209
14794
|
var onStartPage=false;
|
|
12210
14795
|
|
|
12211
14796
|
function updateProgress(p){
|
|
12212
14797
|
var total=p&&typeof p.total==='number'?p.total:0;
|
|
12213
14798
|
var progress=p&&typeof p.progress==='number'?p.progress:0;
|
|
12214
|
-
//
|
|
12215
|
-
|
|
14799
|
+
// Reglas en ddProgressView (espejo de progressView.ts, MagicSurvey y el SDK nativo).
|
|
14800
|
+
var view=ddProgressView({progress:progress,total:total,completed:!!(p&&p.completed),mode:progressMode,unit:progressUnit},DD_LABELS_ACTIVE);
|
|
14801
|
+
if(!progressEnabled||onStartPage||!view.visible){
|
|
12216
14802
|
progressEl.style.display='none';
|
|
12217
14803
|
// Sin barra, el hueco cabecera\u2192pregunta lo pone el contenido.
|
|
12218
14804
|
content.style.paddingTop='16px';
|
|
@@ -12221,22 +14807,11 @@ ${customCss}
|
|
|
12221
14807
|
progressEl.style.display='flex';
|
|
12222
14808
|
// Con barra, el hueco inferior ya lo pone el bloque de progreso: no duplicarlo.
|
|
12223
14809
|
content.style.paddingTop='0';
|
|
12224
|
-
|
|
12225
|
-
// suman +0.5 y avanzan media casilla) y la etiqueta redondea hacia abajo, porque una
|
|
12226
|
-
// follow-up es un paso DENTRO de la misma pregunta, no la siguiente.
|
|
12227
|
-
var current=Math.min(total,Math.max(1,progress+1));
|
|
12228
|
-
var pct=Math.min(100,Math.max(0,(current/total)*100));
|
|
12229
|
-
progressBar.style.width=pct+'%';
|
|
12230
|
-
var label=Math.min(total,Math.max(1,Math.floor(progress)+1));
|
|
14810
|
+
progressBar.style.width=view.percent+'%';
|
|
12231
14811
|
progressLabel.style.display=progressShowUnit?'block':'none';
|
|
12232
|
-
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
} else {
|
|
12236
|
-
progressCurrent.textContent=DD_LABELS_ACTIVE.question+' '+label;
|
|
12237
|
-
progressTotal.textContent=' '+DD_LABELS_ACTIVE.of+' '+total;
|
|
12238
|
-
}
|
|
12239
|
-
progressFollowUp.style.display=p&&p.followup?'inline-block':'none';
|
|
14812
|
+
progressCurrent.textContent=view.current;
|
|
14813
|
+
progressTotal.textContent=view.rest;
|
|
14814
|
+
progressFollowUp.style.display=p&&p.followup&&!p.completed?'inline-block':'none';
|
|
12240
14815
|
}
|
|
12241
14816
|
|
|
12242
14817
|
backBtn.textContent=${backLabel};
|
|
@@ -12463,6 +15038,7 @@ ${REVEAL_JS}
|
|
|
12463
15038
|
if(progressPref===null){ progressEnabled=s.showProgressBar===true; }
|
|
12464
15039
|
if(s.showProgressUnit!==undefined){ progressShowUnit=s.showProgressUnit!==false; }
|
|
12465
15040
|
if(s.progressUnit){ progressUnit=s.progressUnit; }
|
|
15041
|
+
if(s.progressMode){ progressMode=s.progressMode; }
|
|
12466
15042
|
// Fondo, textos, botones y barra: Style + theme + modo de la app (DD-247, DD-241).
|
|
12467
15043
|
ddApplyAppearanceColors(s);
|
|
12468
15044
|
if(s.contentAlign){ main.style.justifyContent = s.contentAlign==='center' ? 'center' : 'flex-start'; }
|
|
@@ -12631,6 +15207,8 @@ var ReactNativePopupRenderer = class {
|
|
|
12631
15207
|
font: style?.font,
|
|
12632
15208
|
theme: style?.theme,
|
|
12633
15209
|
position: style?.position,
|
|
15210
|
+
size: style?.size,
|
|
15211
|
+
blockPage: style?.blockPage,
|
|
12634
15212
|
actions,
|
|
12635
15213
|
// renderChrome:false (init) → HTML sin tarjeta/overlay: el host lo envuelve en su Modal.
|
|
12636
15214
|
chrome: renderChrome,
|
|
@@ -13685,6 +16263,35 @@ var ContactManager = class {
|
|
|
13685
16263
|
var STACK_MAX = 8e3;
|
|
13686
16264
|
var QUEUE_KEY = "deepdots.crash.queue";
|
|
13687
16265
|
var MAX_QUEUED = 20;
|
|
16266
|
+
var BENIGN_ERROR_PATTERNS = [
|
|
16267
|
+
/ResizeObserver loop completed with undelivered notifications/i,
|
|
16268
|
+
/ResizeObserver loop limit exceeded/i
|
|
16269
|
+
];
|
|
16270
|
+
var NON_FATAL_ERROR_PATTERNS = [
|
|
16271
|
+
/auth\/network-request-failed/i,
|
|
16272
|
+
// IndexedDB cerrándose (pestaña en segundo plano, otra pestaña actualiza la versión, logout).
|
|
16273
|
+
/connection is closing/i
|
|
16274
|
+
];
|
|
16275
|
+
function errorText(error) {
|
|
16276
|
+
if (error && typeof error === "object") {
|
|
16277
|
+
const e = error;
|
|
16278
|
+
return [e.name, e.code, e.message].filter((v) => typeof v === "string").join(" ");
|
|
16279
|
+
}
|
|
16280
|
+
return String(error ?? "");
|
|
16281
|
+
}
|
|
16282
|
+
var matches = (text, patterns) => patterns.some((p) => p.test(text));
|
|
16283
|
+
function isBenignError(error) {
|
|
16284
|
+
return matches(errorText(error), BENIGN_ERROR_PATTERNS);
|
|
16285
|
+
}
|
|
16286
|
+
function isNonFatalNoise(error) {
|
|
16287
|
+
return matches(errorText(error), NON_FATAL_ERROR_PATTERNS);
|
|
16288
|
+
}
|
|
16289
|
+
function reclassify(r) {
|
|
16290
|
+
const text = `${r.crashType} ${r.message}`;
|
|
16291
|
+
if (matches(text, BENIGN_ERROR_PATTERNS)) return null;
|
|
16292
|
+
if (matches(text, NON_FATAL_ERROR_PATTERNS)) return { ...r, fatal: false, severity: "warning" };
|
|
16293
|
+
return r;
|
|
16294
|
+
}
|
|
13688
16295
|
function crashRecordToParams(r) {
|
|
13689
16296
|
const params = {
|
|
13690
16297
|
crashed_at: r.crashedAt,
|
|
@@ -13742,7 +16349,8 @@ var CrashReporter = class {
|
|
|
13742
16349
|
/** API pública del host: reporta un error (app viva) → emite el evento ya. */
|
|
13743
16350
|
reportError(error, options = {}) {
|
|
13744
16351
|
if (!this.isEnabled()) return;
|
|
13745
|
-
|
|
16352
|
+
if (isBenignError(error)) return;
|
|
16353
|
+
const severity = isNonFatalNoise(error) ? "warning" : options.severity ?? "error";
|
|
13746
16354
|
const handled = options.handled ?? true;
|
|
13747
16355
|
const fatal = severity === "fatal";
|
|
13748
16356
|
const record = this.buildRecord(error, severity, handled, fatal, options.context);
|
|
@@ -13750,6 +16358,11 @@ var CrashReporter = class {
|
|
|
13750
16358
|
}
|
|
13751
16359
|
/** Captura un error no manejado (fatal) → persiste a disco para replay en el siguiente arranque. */
|
|
13752
16360
|
captureUnhandled(error) {
|
|
16361
|
+
if (isBenignError(error)) return;
|
|
16362
|
+
if (isNonFatalNoise(error)) {
|
|
16363
|
+
this.persist(this.buildRecord(error, "warning", false, false));
|
|
16364
|
+
return;
|
|
16365
|
+
}
|
|
13753
16366
|
this.persist(this.buildRecord(error, "fatal", false, true));
|
|
13754
16367
|
}
|
|
13755
16368
|
/** Persiste un crash no capturado a disco para reenviarlo en el siguiente arranque. */
|
|
@@ -13785,7 +16398,7 @@ var CrashReporter = class {
|
|
|
13785
16398
|
} catch {
|
|
13786
16399
|
}
|
|
13787
16400
|
}
|
|
13788
|
-
return queue2;
|
|
16401
|
+
return queue2.map(reclassify).filter((r) => r !== null);
|
|
13789
16402
|
}
|
|
13790
16403
|
/** Instala los handlers globales de errores no capturados (no-op sin `window`). Idempotente. */
|
|
13791
16404
|
install() {
|
|
@@ -14084,6 +16697,7 @@ var ANALYTICS_BACKGROUND_RESUME_WINDOW_MS = 5 * 6e4;
|
|
|
14084
16697
|
var RESERVED_EVENT_PREFIX = "deepdots_";
|
|
14085
16698
|
var CUSTOM_EVENT_PREFIX = "deepdots_event_";
|
|
14086
16699
|
var MAX_PENDING_TRIGGERS = 20;
|
|
16700
|
+
var CONTACT_SYNC_TIMEOUT_MS = 1500;
|
|
14087
16701
|
function triggerDelayMs(delaySeconds) {
|
|
14088
16702
|
const n = typeof delaySeconds === "number" ? delaySeconds : Number(delaySeconds);
|
|
14089
16703
|
return Number.isFinite(n) && n > 0 ? Math.round(n * 1e3) : 0;
|
|
@@ -14156,6 +16770,8 @@ var DeepdotsPopups = class {
|
|
|
14156
16770
|
this.engagement = null;
|
|
14157
16771
|
/** Atributos internos del usuario identificado → POST /sdk/popups/contact. Null si no hay userId. */
|
|
14158
16772
|
this.contact = null;
|
|
16773
|
+
/** DD-561: contact POST of `init()`, awaited (with a cap) by the popups GET. Null if none. */
|
|
16774
|
+
this.contactSync = null;
|
|
14159
16775
|
/** Storage resuelto en init() (inyectado por el host o localStorage). Reusado al cambiar de usuario. */
|
|
14160
16776
|
this.storage = null;
|
|
14161
16777
|
/** Marca si ya se inició la navegación manual (setScreen) — para RN sin History API. */
|
|
@@ -14243,19 +16859,24 @@ var DeepdotsPopups = class {
|
|
|
14243
16859
|
post: (body) => this.postContact(body)
|
|
14244
16860
|
});
|
|
14245
16861
|
if (config.contactAttributes) {
|
|
14246
|
-
|
|
16862
|
+
this.contactSync = this.setContactAttributes(config.contactAttributes);
|
|
14247
16863
|
}
|
|
14248
16864
|
}
|
|
14249
16865
|
this.log("tracking \xB7 user_id:", this.tracking.getUserId(), "\xB7 new_user:", this.tracking.isNewUser(), "\xB7 enabled:", this.tracking.isTrackingEnabled());
|
|
14250
|
-
|
|
16866
|
+
const localDev = (config.platform ?? "web") === "web" && !config.trackLocalhost && isLocalDevHost(currentHostname());
|
|
16867
|
+
const analyticsKeys = localDev ? void 0 : config.analytics;
|
|
16868
|
+
if (localDev && config.analytics) {
|
|
16869
|
+
this.log("analytics \xB7 localhost: no se env\xEDa (trackLocalhost: true para enviar)");
|
|
16870
|
+
}
|
|
16871
|
+
this.analyticsIntegration = analyticsKeys?.integration;
|
|
14251
16872
|
const resumable = this.readResumableSession();
|
|
14252
16873
|
if (resumable) {
|
|
14253
16874
|
this.analyticsFeedbackSessionId = resumable.sessionId;
|
|
14254
16875
|
this.suspended = { at: resumable.at, userId: resumable.userId, windowMs: ANALYTICS_RESUME_WINDOW_MS };
|
|
14255
16876
|
}
|
|
14256
|
-
const analyticsSink =
|
|
16877
|
+
const analyticsSink = analyticsKeys ? createFeedbackSink({
|
|
14257
16878
|
baseUrl: this.baseUrl,
|
|
14258
|
-
keys:
|
|
16879
|
+
keys: analyticsKeys,
|
|
14259
16880
|
log: (...a) => this.log(...a),
|
|
14260
16881
|
initialSessionId: resumable?.sessionId,
|
|
14261
16882
|
// En móvil (RN) la app puede morir con el lote de cierre sin entregar: se
|
|
@@ -14303,7 +16924,7 @@ var DeepdotsPopups = class {
|
|
|
14303
16924
|
});
|
|
14304
16925
|
this.installCrashHandlers();
|
|
14305
16926
|
this.geoEnabled = config.geolocation ?? true;
|
|
14306
|
-
this.geoWanted = this.geoEnabled && !!
|
|
16927
|
+
this.geoWanted = this.geoEnabled && !!analyticsKeys;
|
|
14307
16928
|
this.resolveGeo();
|
|
14308
16929
|
this.navObserver = new NavigationObserver();
|
|
14309
16930
|
this.navObserver.onVisit(
|
|
@@ -15161,38 +17782,38 @@ var DeepdotsPopups = class {
|
|
|
15161
17782
|
this.debug("No language available for lang comparison", { popupId: def.id, langs });
|
|
15162
17783
|
return true;
|
|
15163
17784
|
}
|
|
15164
|
-
const
|
|
17785
|
+
const matches2 = langs.some(
|
|
15165
17786
|
(lang) => typeof lang === "string" && currentLang.startsWith(lang.toLowerCase())
|
|
15166
17787
|
);
|
|
15167
|
-
if (!
|
|
17788
|
+
if (!matches2) {
|
|
15168
17789
|
this.debug("Lang mismatch for popup", { popupId: def.id, langs, currentLang });
|
|
15169
17790
|
}
|
|
15170
|
-
return
|
|
17791
|
+
return matches2;
|
|
15171
17792
|
}
|
|
15172
17793
|
/** `segments.path`: rutas donde el popup PUEDE mostrarse. Sin lista, en todas. */
|
|
15173
17794
|
matchesSegmentsPath(def, pathUrl) {
|
|
15174
17795
|
const paths = def.segments?.path;
|
|
15175
17796
|
if (!Array.isArray(paths) || paths.length === 0) return true;
|
|
15176
|
-
const
|
|
15177
|
-
if (!
|
|
17797
|
+
const location2 = this.resolveCurrentLocation(pathUrl);
|
|
17798
|
+
if (!location2) {
|
|
15178
17799
|
this.debug("No window.location available for path comparison", { popupId: def.id, paths });
|
|
15179
17800
|
return true;
|
|
15180
17801
|
}
|
|
15181
|
-
const
|
|
15182
|
-
const match = this.matchesPathCandidate(rawCandidate,
|
|
17802
|
+
const matches2 = paths.some((rawCandidate) => {
|
|
17803
|
+
const match = this.matchesPathCandidate(rawCandidate, location2);
|
|
15183
17804
|
this.debug("Path comparison", {
|
|
15184
17805
|
popupId: def.id,
|
|
15185
17806
|
candidate: rawCandidate,
|
|
15186
|
-
currentPath:
|
|
15187
|
-
currentHref:
|
|
17807
|
+
currentPath: location2.path,
|
|
17808
|
+
currentHref: location2.href,
|
|
15188
17809
|
match
|
|
15189
17810
|
});
|
|
15190
17811
|
return match;
|
|
15191
17812
|
});
|
|
15192
|
-
if (!
|
|
15193
|
-
this.debug("No path match for popup", { popupId: def.id, paths, currentPath:
|
|
17813
|
+
if (!matches2) {
|
|
17814
|
+
this.debug("No path match for popup", { popupId: def.id, paths, currentPath: location2.path });
|
|
15194
17815
|
}
|
|
15195
|
-
return
|
|
17816
|
+
return matches2;
|
|
15196
17817
|
}
|
|
15197
17818
|
/**
|
|
15198
17819
|
* `segments.excludedPaths`: rutas donde el popup NO debe mostrarse. Gana sobre
|
|
@@ -15202,18 +17823,18 @@ var DeepdotsPopups = class {
|
|
|
15202
17823
|
isPathExcluded(def, pathUrl) {
|
|
15203
17824
|
const excluded = def.segments?.excludedPaths;
|
|
15204
17825
|
if (!Array.isArray(excluded) || excluded.length === 0) return false;
|
|
15205
|
-
const
|
|
15206
|
-
if (!
|
|
17826
|
+
const location2 = this.resolveCurrentLocation(pathUrl);
|
|
17827
|
+
if (!location2) {
|
|
15207
17828
|
this.debug("No window.location available for excluded path comparison", { popupId: def.id, excluded });
|
|
15208
17829
|
return false;
|
|
15209
17830
|
}
|
|
15210
|
-
const hit = excluded.find((rawCandidate) => this.matchesPathCandidate(rawCandidate,
|
|
17831
|
+
const hit = excluded.find((rawCandidate) => this.matchesPathCandidate(rawCandidate, location2));
|
|
15211
17832
|
if (hit !== void 0) {
|
|
15212
17833
|
this.debug("Popup excluded by path", {
|
|
15213
17834
|
popupId: def.id,
|
|
15214
17835
|
candidate: hit,
|
|
15215
|
-
currentPath:
|
|
15216
|
-
currentHref:
|
|
17836
|
+
currentPath: location2.path,
|
|
17837
|
+
currentHref: location2.href
|
|
15217
17838
|
});
|
|
15218
17839
|
return true;
|
|
15219
17840
|
}
|
|
@@ -15229,17 +17850,17 @@ var DeepdotsPopups = class {
|
|
|
15229
17850
|
* y no puede tumbar la evaluación del trigger entero (mismo fallo que hubo con
|
|
15230
17851
|
* `segments.lang`).
|
|
15231
17852
|
*/
|
|
15232
|
-
matchesPathCandidate(rawCandidate,
|
|
17853
|
+
matchesPathCandidate(rawCandidate, location2) {
|
|
15233
17854
|
if (typeof rawCandidate !== "string") return false;
|
|
15234
17855
|
const candidate = this.normalizeUrl(rawCandidate);
|
|
15235
17856
|
if (!candidate) return false;
|
|
15236
17857
|
if (candidate.startsWith("http://") || candidate.startsWith("https://")) {
|
|
15237
|
-
return
|
|
17858
|
+
return location2.href === candidate;
|
|
15238
17859
|
}
|
|
15239
17860
|
if (candidate.startsWith("/")) {
|
|
15240
|
-
return
|
|
17861
|
+
return location2.href.includes(candidate);
|
|
15241
17862
|
}
|
|
15242
|
-
return
|
|
17863
|
+
return location2.path === candidate;
|
|
15243
17864
|
}
|
|
15244
17865
|
/** href + pathname normalizados de la ruta a evaluar, o null si no hay `window.location`. */
|
|
15245
17866
|
resolveCurrentLocation(pathUrl) {
|
|
@@ -15405,6 +18026,7 @@ var DeepdotsPopups = class {
|
|
|
15405
18026
|
this.log("Missing apiKey or baseUrl. Skipping popups fetch.");
|
|
15406
18027
|
return [];
|
|
15407
18028
|
}
|
|
18029
|
+
if (this.contactSync) await this.waitForContactSync();
|
|
15408
18030
|
const filter = userId ? { where: { userId } } : null;
|
|
15409
18031
|
const query = filter ? `?filter=${encodeURIComponent(JSON.stringify(filter))}` : "";
|
|
15410
18032
|
const endpoint = `${baseUrl}/sdk/${encodeURIComponent(apiKey)}/popups${query}`;
|
|
@@ -15427,6 +18049,23 @@ var DeepdotsPopups = class {
|
|
|
15427
18049
|
return null;
|
|
15428
18050
|
}
|
|
15429
18051
|
}
|
|
18052
|
+
/**
|
|
18053
|
+
* DD-561: espera al POST de contact de `init()` antes del GET de popups, como mucho
|
|
18054
|
+
* `CONTACT_SYNC_TIMEOUT_MS`. Sin atributos nuevos la promesa ya está resuelta y no hay espera.
|
|
18055
|
+
* Nunca rechaza.
|
|
18056
|
+
*/
|
|
18057
|
+
async waitForContactSync() {
|
|
18058
|
+
const pending2 = this.contactSync;
|
|
18059
|
+
this.contactSync = null;
|
|
18060
|
+
if (!pending2) return;
|
|
18061
|
+
let timer;
|
|
18062
|
+
const timeout = new Promise((resolve) => {
|
|
18063
|
+
timer = setTimeout(() => resolve("timeout"), CONTACT_SYNC_TIMEOUT_MS);
|
|
18064
|
+
});
|
|
18065
|
+
const result = await Promise.race([pending2.then(() => "done", () => "done"), timeout]);
|
|
18066
|
+
if (timer) clearTimeout(timer);
|
|
18067
|
+
if (result === "timeout") this.log("contact \xB7 POST still pending, fetching popups anyway");
|
|
18068
|
+
}
|
|
15430
18069
|
/**
|
|
15431
18070
|
* Envía los atributos de contact a la API (`POST /sdk/popups/contact`). Rechaza si no se
|
|
15432
18071
|
* pudo enviar (sin red o respuesta no-2xx), para que `ContactManager` no guarde la caché
|