@magicfeedback/popup-sdk 1.5.0 → 1.7.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 +34 -1
- package/dist/assets/assets/style.css +1545 -602
- package/dist/chunk-W6MPSWMS.mjs +2302 -0
- package/dist/chunk-W6MPSWMS.mjs.map +1 -0
- package/dist/chunk-WNIUIOKF.mjs +2261 -0
- package/dist/chunk-WNIUIOKF.mjs.map +1 -0
- package/dist/index.d.mts +92 -1
- package/dist/index.d.ts +92 -1
- package/dist/index.js +3710 -1050
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -33
- package/dist/index.mjs.map +1 -1
- package/dist/react-native.d.mts +6 -0
- package/dist/react-native.d.ts +6 -0
- package/dist/react-native.js +2252 -90
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +94 -33
- package/dist/react-native.mjs.map +1 -1
- package/dist/{renderPopup-4WZ7V435.mjs → renderPopup-EWGKG53W.mjs} +77 -61
- package/dist/renderPopup-EWGKG53W.mjs.map +1 -0
- package/dist/renderPopup-IHGYFMXO.mjs +3114 -0
- package/dist/renderPopup-IHGYFMXO.mjs.map +1 -0
- package/package.json +2 -2
- package/dist/chunk-D7QAGWGC.mjs +0 -176
- package/dist/chunk-D7QAGWGC.mjs.map +0 -1
- package/dist/chunk-JSBMP4MI.mjs +0 -197
- package/dist/chunk-JSBMP4MI.mjs.map +0 -1
- package/dist/renderPopup-4WZ7V435.mjs.map +0 -1
- package/dist/renderPopup-PXJEND4Y.mjs +0 -2626
- package/dist/renderPopup-PXJEND4Y.mjs.map +0 -1
|
@@ -0,0 +1,2261 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// src/tracking/tracking-manager.ts
|
|
9
|
+
var InMemoryStorage = class {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.map = /* @__PURE__ */ new Map();
|
|
12
|
+
}
|
|
13
|
+
getItem(key) {
|
|
14
|
+
return this.map.has(key) ? this.map.get(key) : null;
|
|
15
|
+
}
|
|
16
|
+
setItem(key, value) {
|
|
17
|
+
this.map.set(key, value);
|
|
18
|
+
}
|
|
19
|
+
removeItem(key) {
|
|
20
|
+
this.map.delete(key);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
function createDefaultStorage() {
|
|
24
|
+
try {
|
|
25
|
+
if (typeof window !== "undefined" && window.localStorage) {
|
|
26
|
+
const ls = window.localStorage;
|
|
27
|
+
const probe = "__deepdots_probe__";
|
|
28
|
+
ls.setItem(probe, "1");
|
|
29
|
+
ls.removeItem(probe);
|
|
30
|
+
return {
|
|
31
|
+
getItem: (k) => ls.getItem(k),
|
|
32
|
+
setItem: (k, v) => ls.setItem(k, v),
|
|
33
|
+
removeItem: (k) => ls.removeItem(k)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
} catch {
|
|
37
|
+
}
|
|
38
|
+
return new InMemoryStorage();
|
|
39
|
+
}
|
|
40
|
+
var STORAGE_KEYS = {
|
|
41
|
+
userId: "deepdots.user_id",
|
|
42
|
+
firstSeen: "deepdots.user.first_seen",
|
|
43
|
+
contactAttributes: "deepdots.contact.attributes"
|
|
44
|
+
};
|
|
45
|
+
function buildSurveyIdentity(userId, sessionId, miniService = null, analyticsFeedbackSessionId = null) {
|
|
46
|
+
const profile = userId ? [{ key: "external-user-id", value: [userId] }] : [];
|
|
47
|
+
const metadata = [];
|
|
48
|
+
if (sessionId) metadata.push({ key: "session_id", value: [sessionId] });
|
|
49
|
+
if (userId) metadata.push({ key: "user_id", value: [userId] });
|
|
50
|
+
if (miniService) metadata.push({ key: "mini_service", value: [miniService] });
|
|
51
|
+
if (analyticsFeedbackSessionId) metadata.push({ key: "deepdots_analytics_feedback_session_id", value: [analyticsFeedbackSessionId] });
|
|
52
|
+
return { profile, metadata };
|
|
53
|
+
}
|
|
54
|
+
function defaultUuid() {
|
|
55
|
+
const g = typeof globalThis !== "undefined" ? globalThis : {};
|
|
56
|
+
if (g.crypto?.randomUUID) return g.crypto.randomUUID();
|
|
57
|
+
const bytes = new Uint8Array(16);
|
|
58
|
+
if (g.crypto?.getRandomValues) {
|
|
59
|
+
g.crypto.getRandomValues(bytes);
|
|
60
|
+
} else {
|
|
61
|
+
for (let i = 0; i < 16; i++) bytes[i] = Math.floor(Math.random() * 256);
|
|
62
|
+
}
|
|
63
|
+
bytes[6] = bytes[6] & 15 | 64;
|
|
64
|
+
bytes[8] = bytes[8] & 63 | 128;
|
|
65
|
+
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0"));
|
|
66
|
+
return `${hex.slice(0, 4).join("")}-${hex.slice(4, 6).join("")}-${hex.slice(6, 8).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10, 16).join("")}`;
|
|
67
|
+
}
|
|
68
|
+
var TrackingManager = class {
|
|
69
|
+
constructor(options) {
|
|
70
|
+
/** session_id cacheado, provisto por el backend (no se genera ni se persiste). */
|
|
71
|
+
this.sessionId = null;
|
|
72
|
+
this.userWasJustCreated = false;
|
|
73
|
+
this.storage = options.storage;
|
|
74
|
+
this.clientUserId = options.clientUserId;
|
|
75
|
+
this.now = options.now ?? (() => Date.now());
|
|
76
|
+
this.uuid = options.uuid ?? defaultUuid;
|
|
77
|
+
this.enabled = options.enabled ?? true;
|
|
78
|
+
}
|
|
79
|
+
isTrackingEnabled() {
|
|
80
|
+
return this.enabled;
|
|
81
|
+
}
|
|
82
|
+
setTrackingEnabled(enabled) {
|
|
83
|
+
this.enabled = enabled;
|
|
84
|
+
}
|
|
85
|
+
/** Resuelve el user_id según la regla: cliente > persistido > generar+persistir. */
|
|
86
|
+
getUserId() {
|
|
87
|
+
if (!this.enabled) return null;
|
|
88
|
+
if (this.clientUserId) return this.clientUserId;
|
|
89
|
+
const persisted = this.storage.getItem(STORAGE_KEYS.userId);
|
|
90
|
+
if (persisted) return persisted;
|
|
91
|
+
const id = this.uuid();
|
|
92
|
+
this.storage.setItem(STORAGE_KEYS.userId, id);
|
|
93
|
+
this.storage.setItem(STORAGE_KEYS.firstSeen, String(this.now()));
|
|
94
|
+
this.userWasJustCreated = true;
|
|
95
|
+
return id;
|
|
96
|
+
}
|
|
97
|
+
/** `true` solo en la primera sesión tras crear el user_id propio del SDK. */
|
|
98
|
+
isNewUser() {
|
|
99
|
+
return this.userWasJustCreated;
|
|
100
|
+
}
|
|
101
|
+
/** session_id actual provisto por el backend, o null si aún no llegó. */
|
|
102
|
+
getSessionId() {
|
|
103
|
+
if (!this.enabled) return null;
|
|
104
|
+
return this.sessionId;
|
|
105
|
+
}
|
|
106
|
+
/** Cachea el session_id devuelto por el backend (respuesta de POST /sdk/popups). */
|
|
107
|
+
setSessionId(sessionId) {
|
|
108
|
+
if (!this.enabled) return;
|
|
109
|
+
this.sessionId = sessionId;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// src/ui/font.ts
|
|
114
|
+
var FORMAT_BY_EXT = {
|
|
115
|
+
woff2: "woff2",
|
|
116
|
+
woff: "woff",
|
|
117
|
+
ttf: "truetype",
|
|
118
|
+
otf: "opentype"
|
|
119
|
+
};
|
|
120
|
+
function fontFormatFromUrl(url) {
|
|
121
|
+
const clean = url.split("?")[0].split("#")[0];
|
|
122
|
+
const ext = clean.slice(clean.lastIndexOf(".") + 1).toLowerCase();
|
|
123
|
+
return FORMAT_BY_EXT[ext];
|
|
124
|
+
}
|
|
125
|
+
function sanitizeFamily(family) {
|
|
126
|
+
return family.replace(/[^A-Za-z0-9 ._-]/g, "").trim();
|
|
127
|
+
}
|
|
128
|
+
function isSafeFontUrl(url) {
|
|
129
|
+
if (!/^(https?:|data:)/i.test(url)) return false;
|
|
130
|
+
return !/[\x00-\x20"<>\\]/.test(url);
|
|
131
|
+
}
|
|
132
|
+
function buildFontFamilyValue(family) {
|
|
133
|
+
const safe = sanitizeFamily(family);
|
|
134
|
+
return `"${safe}", -apple-system, system-ui, sans-serif`;
|
|
135
|
+
}
|
|
136
|
+
function buildFontFaceCss(family, url) {
|
|
137
|
+
if (!url || !isSafeFontUrl(url)) return "";
|
|
138
|
+
const safe = sanitizeFamily(family);
|
|
139
|
+
const fmt = fontFormatFromUrl(url);
|
|
140
|
+
const src = fmt ? `url("${url}") format("${fmt}")` : `url("${url}")`;
|
|
141
|
+
return `@font-face{font-family:"${safe}";src:${src};font-display:swap;}`;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// src/i18n/labels.ts
|
|
145
|
+
var EN = {
|
|
146
|
+
accept: "Send",
|
|
147
|
+
decline: "Cancel",
|
|
148
|
+
start: "Start survey",
|
|
149
|
+
complete: "Complete survey",
|
|
150
|
+
back: "Back",
|
|
151
|
+
question: "Question",
|
|
152
|
+
of: "of",
|
|
153
|
+
followUp: "Follow-up",
|
|
154
|
+
closeAria: "Close popup",
|
|
155
|
+
loadingAria: "Loading survey",
|
|
156
|
+
errorRequired: "Please answer the required question to continue.",
|
|
157
|
+
errorSubmit: "An error occurred while submitting. Please try again or close the popup."
|
|
158
|
+
};
|
|
159
|
+
var ES = {
|
|
160
|
+
accept: "Enviar",
|
|
161
|
+
decline: "Cancelar",
|
|
162
|
+
start: "Empezar encuesta",
|
|
163
|
+
complete: "Completar encuesta",
|
|
164
|
+
back: "Atr\xE1s",
|
|
165
|
+
question: "Pregunta",
|
|
166
|
+
of: "de",
|
|
167
|
+
followUp: "Seguimiento",
|
|
168
|
+
closeAria: "Cerrar ventana emergente",
|
|
169
|
+
loadingAria: "Cargando encuesta",
|
|
170
|
+
errorRequired: "Responde la pregunta obligatoria para continuar.",
|
|
171
|
+
errorSubmit: "Se produjo un error al enviar. Int\xE9ntalo de nuevo o cierra la ventana."
|
|
172
|
+
};
|
|
173
|
+
var DA = {
|
|
174
|
+
accept: "Send",
|
|
175
|
+
decline: "Annuller",
|
|
176
|
+
start: "Start unders\xF8gelse",
|
|
177
|
+
complete: "Afslut unders\xF8gelse",
|
|
178
|
+
back: "Tilbage",
|
|
179
|
+
question: "Sp\xF8rgsm\xE5l",
|
|
180
|
+
of: "af",
|
|
181
|
+
followUp: "Opf\xF8lgning",
|
|
182
|
+
closeAria: "Luk pop op",
|
|
183
|
+
loadingAria: "Indl\xE6ser unders\xF8gelse",
|
|
184
|
+
errorRequired: "Besvar venligst det obligatoriske sp\xF8rgsm\xE5l for at forts\xE6tte.",
|
|
185
|
+
errorSubmit: "Der opstod en fejl under afsendelsen. Pr\xF8v igen, eller luk pop op-vinduet."
|
|
186
|
+
};
|
|
187
|
+
var NO = {
|
|
188
|
+
accept: "Send",
|
|
189
|
+
decline: "Avbryt",
|
|
190
|
+
start: "Start unders\xF8kelse",
|
|
191
|
+
complete: "Fullf\xF8r unders\xF8kelse",
|
|
192
|
+
back: "Tilbake",
|
|
193
|
+
question: "Sp\xF8rsm\xE5l",
|
|
194
|
+
of: "av",
|
|
195
|
+
followUp: "Oppf\xF8lging",
|
|
196
|
+
closeAria: "Lukk popup",
|
|
197
|
+
loadingAria: "Laster unders\xF8kelse",
|
|
198
|
+
errorRequired: "Svar p\xE5 det obligatoriske sp\xF8rsm\xE5let for \xE5 fortsette.",
|
|
199
|
+
errorSubmit: "Det oppstod en feil under innsendingen. Pr\xF8v igjen, eller lukk popupen."
|
|
200
|
+
};
|
|
201
|
+
var SV = {
|
|
202
|
+
accept: "Skicka",
|
|
203
|
+
decline: "Avbryt",
|
|
204
|
+
start: "Starta unders\xF6kning",
|
|
205
|
+
complete: "Slutf\xF6r unders\xF6kning",
|
|
206
|
+
back: "Tillbaka",
|
|
207
|
+
question: "Fr\xE5ga",
|
|
208
|
+
of: "av",
|
|
209
|
+
followUp: "Uppf\xF6ljning",
|
|
210
|
+
closeAria: "St\xE4ng popup",
|
|
211
|
+
loadingAria: "Laddar unders\xF6kning",
|
|
212
|
+
errorRequired: "Svara p\xE5 den obligatoriska fr\xE5gan f\xF6r att forts\xE4tta.",
|
|
213
|
+
errorSubmit: "Ett fel uppstod vid inskickningen. F\xF6rs\xF6k igen eller st\xE4ng popupen."
|
|
214
|
+
};
|
|
215
|
+
var FI = {
|
|
216
|
+
accept: "L\xE4het\xE4",
|
|
217
|
+
decline: "Peruuta",
|
|
218
|
+
start: "Aloita kysely",
|
|
219
|
+
complete: "Viimeistele kysely",
|
|
220
|
+
back: "Takaisin",
|
|
221
|
+
question: "Kysymys",
|
|
222
|
+
of: "/",
|
|
223
|
+
followUp: "Jatkokysymys",
|
|
224
|
+
closeAria: "Sulje ponnahdusikkuna",
|
|
225
|
+
loadingAria: "Ladataan kysely\xE4",
|
|
226
|
+
errorRequired: "Vastaa pakolliseen kysymykseen jatkaaksesi.",
|
|
227
|
+
errorSubmit: "L\xE4hetyksess\xE4 tapahtui virhe. Yrit\xE4 uudelleen tai sulje ponnahdusikkuna."
|
|
228
|
+
};
|
|
229
|
+
var DE = {
|
|
230
|
+
accept: "Senden",
|
|
231
|
+
decline: "Abbrechen",
|
|
232
|
+
start: "Umfrage starten",
|
|
233
|
+
complete: "Umfrage abschlie\xDFen",
|
|
234
|
+
back: "Zur\xFCck",
|
|
235
|
+
question: "Frage",
|
|
236
|
+
of: "von",
|
|
237
|
+
followUp: "Folgefrage",
|
|
238
|
+
closeAria: "Popup schlie\xDFen",
|
|
239
|
+
loadingAria: "Umfrage wird geladen",
|
|
240
|
+
errorRequired: "Bitte beantworte die Pflichtfrage, um fortzufahren.",
|
|
241
|
+
errorSubmit: "Beim Senden ist ein Fehler aufgetreten. Versuche es erneut oder schlie\xDFe das Popup."
|
|
242
|
+
};
|
|
243
|
+
var FR = {
|
|
244
|
+
accept: "Envoyer",
|
|
245
|
+
decline: "Annuler",
|
|
246
|
+
start: "Commencer l'enqu\xEAte",
|
|
247
|
+
complete: "Terminer l'enqu\xEAte",
|
|
248
|
+
back: "Retour",
|
|
249
|
+
question: "Question",
|
|
250
|
+
of: "sur",
|
|
251
|
+
followUp: "Question compl\xE9mentaire",
|
|
252
|
+
closeAria: "Fermer la fen\xEAtre",
|
|
253
|
+
loadingAria: "Chargement de l'enqu\xEAte",
|
|
254
|
+
errorRequired: "Veuillez r\xE9pondre \xE0 la question obligatoire pour continuer.",
|
|
255
|
+
errorSubmit: "Une erreur s'est produite lors de l'envoi. R\xE9essayez ou fermez la fen\xEAtre."
|
|
256
|
+
};
|
|
257
|
+
var PT = {
|
|
258
|
+
accept: "Enviar",
|
|
259
|
+
decline: "Cancelar",
|
|
260
|
+
start: "Iniciar question\xE1rio",
|
|
261
|
+
complete: "Concluir question\xE1rio",
|
|
262
|
+
back: "Voltar",
|
|
263
|
+
question: "Pergunta",
|
|
264
|
+
of: "de",
|
|
265
|
+
followUp: "Seguimento",
|
|
266
|
+
closeAria: "Fechar janela",
|
|
267
|
+
loadingAria: "A carregar question\xE1rio",
|
|
268
|
+
errorRequired: "Responda \xE0 pergunta obrigat\xF3ria para continuar.",
|
|
269
|
+
errorSubmit: "Ocorreu um erro ao enviar. Tente novamente ou feche a janela."
|
|
270
|
+
};
|
|
271
|
+
var AR = {
|
|
272
|
+
accept: "\u0625\u0631\u0633\u0627\u0644",
|
|
273
|
+
decline: "\u0625\u0644\u063A\u0627\u0621",
|
|
274
|
+
start: "\u0627\u0628\u062F\u0623 \u0627\u0644\u0627\u0633\u062A\u0628\u064A\u0627\u0646",
|
|
275
|
+
complete: "\u0625\u0646\u0647\u0627\u0621 \u0627\u0644\u0627\u0633\u062A\u0628\u064A\u0627\u0646",
|
|
276
|
+
back: "\u0631\u062C\u0648\u0639",
|
|
277
|
+
question: "\u0633\u0624\u0627\u0644",
|
|
278
|
+
of: "\u0645\u0646",
|
|
279
|
+
followUp: "\u0633\u0624\u0627\u0644 \u0645\u062A\u0627\u0628\u0639\u0629",
|
|
280
|
+
closeAria: "\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0646\u0627\u0641\u0630\u0629 \u0627\u0644\u0645\u0646\u0628\u062B\u0642\u0629",
|
|
281
|
+
loadingAria: "\u062C\u0627\u0631\u064D \u062A\u062D\u0645\u064A\u0644 \u0627\u0644\u0627\u0633\u062A\u0628\u064A\u0627\u0646",
|
|
282
|
+
errorRequired: "\u064A\u0631\u062C\u0649 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0639\u0644\u0649 \u0627\u0644\u0633\u0624\u0627\u0644 \u0627\u0644\u0645\u0637\u0644\u0648\u0628 \u0644\u0644\u0645\u062A\u0627\u0628\u0639\u0629.",
|
|
283
|
+
errorSubmit: "\u062D\u062F\u062B \u062E\u0637\u0623 \u0623\u062B\u0646\u0627\u0621 \u0627\u0644\u0625\u0631\u0633\u0627\u0644. \u064A\u0631\u062C\u0649 \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u0645\u0631\u0629 \u0623\u062E\u0631\u0649 \u0623\u0648 \u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0646\u0627\u0641\u0630\u0629."
|
|
284
|
+
};
|
|
285
|
+
var BN = {
|
|
286
|
+
accept: "\u09AA\u09BE\u09A0\u09BE\u09A8",
|
|
287
|
+
decline: "\u09AC\u09BE\u09A4\u09BF\u09B2",
|
|
288
|
+
start: "\u099C\u09B0\u09BF\u09AA \u09B6\u09C1\u09B0\u09C1 \u0995\u09B0\u09C1\u09A8",
|
|
289
|
+
complete: "\u099C\u09B0\u09BF\u09AA \u09B8\u09AE\u09CD\u09AA\u09C2\u09B0\u09CD\u09A3 \u0995\u09B0\u09C1\u09A8",
|
|
290
|
+
back: "\u09AA\u09BF\u099B\u09A8\u09C7",
|
|
291
|
+
question: "\u09AA\u09CD\u09B0\u09B6\u09CD\u09A8",
|
|
292
|
+
of: "/",
|
|
293
|
+
followUp: "\u09AB\u09B2\u09CB-\u0986\u09AA",
|
|
294
|
+
closeAria: "\u09AA\u09AA\u0986\u09AA \u09AC\u09A8\u09CD\u09A7 \u0995\u09B0\u09C1\u09A8",
|
|
295
|
+
loadingAria: "\u099C\u09B0\u09BF\u09AA \u09B2\u09CB\u09A1 \u09B9\u099A\u09CD\u099B\u09C7",
|
|
296
|
+
errorRequired: "\u099A\u09BE\u09B2\u09BF\u09AF\u09BC\u09C7 \u09AF\u09C7\u09A4\u09C7 \u0986\u09AC\u09B6\u09CD\u09AF\u0995 \u09AA\u09CD\u09B0\u09B6\u09CD\u09A8\u09C7\u09B0 \u0989\u09A4\u09CD\u09A4\u09B0 \u09A6\u09BF\u09A8\u0964",
|
|
297
|
+
errorSubmit: "\u099C\u09AE\u09BE \u09A6\u09C7\u0993\u09AF\u09BC\u09BE\u09B0 \u09B8\u09AE\u09AF\u09BC \u098F\u0995\u099F\u09BF \u09A4\u09CD\u09B0\u09C1\u099F\u09BF \u0998\u099F\u09C7\u099B\u09C7\u0964 \u0986\u09AC\u09BE\u09B0 \u099A\u09C7\u09B7\u09CD\u099F\u09BE \u0995\u09B0\u09C1\u09A8 \u09AC\u09BE \u09AA\u09AA\u0986\u09AA \u09AC\u09A8\u09CD\u09A7 \u0995\u09B0\u09C1\u09A8\u0964"
|
|
298
|
+
};
|
|
299
|
+
var ZH_CN = {
|
|
300
|
+
accept: "\u53D1\u9001",
|
|
301
|
+
decline: "\u53D6\u6D88",
|
|
302
|
+
start: "\u5F00\u59CB\u95EE\u5377",
|
|
303
|
+
complete: "\u5B8C\u6210\u95EE\u5377",
|
|
304
|
+
back: "\u8FD4\u56DE",
|
|
305
|
+
question: "\u95EE\u9898",
|
|
306
|
+
of: "/",
|
|
307
|
+
followUp: "\u8FFD\u95EE",
|
|
308
|
+
closeAria: "\u5173\u95ED\u5F39\u7A97",
|
|
309
|
+
loadingAria: "\u6B63\u5728\u52A0\u8F7D\u95EE\u5377",
|
|
310
|
+
errorRequired: "\u8BF7\u56DE\u7B54\u5FC5\u7B54\u9898\u540E\u7EE7\u7EED\u3002",
|
|
311
|
+
errorSubmit: "\u63D0\u4EA4\u65F6\u51FA\u9519\u3002\u8BF7\u91CD\u8BD5\u6216\u5173\u95ED\u5F39\u7A97\u3002"
|
|
312
|
+
};
|
|
313
|
+
var LABELS = {
|
|
314
|
+
en: EN,
|
|
315
|
+
es: ES,
|
|
316
|
+
da: DA,
|
|
317
|
+
no: NO,
|
|
318
|
+
sv: SV,
|
|
319
|
+
fi: FI,
|
|
320
|
+
de: DE,
|
|
321
|
+
fr: FR,
|
|
322
|
+
pt: PT,
|
|
323
|
+
ar: AR,
|
|
324
|
+
bn: BN,
|
|
325
|
+
"zh-CN": ZH_CN
|
|
326
|
+
};
|
|
327
|
+
function resolveLocale(lang) {
|
|
328
|
+
if (typeof lang !== "string") return "en";
|
|
329
|
+
const normalized = lang.trim().toLowerCase().replace(/_/g, "-");
|
|
330
|
+
if (!normalized) return "en";
|
|
331
|
+
if (normalized === "zh" || normalized.startsWith("zh-")) return "zh-CN";
|
|
332
|
+
const primary = normalized.split("-")[0];
|
|
333
|
+
switch (primary) {
|
|
334
|
+
case "en":
|
|
335
|
+
return "en";
|
|
336
|
+
case "es":
|
|
337
|
+
return "es";
|
|
338
|
+
case "da":
|
|
339
|
+
return "da";
|
|
340
|
+
case "no":
|
|
341
|
+
case "nb":
|
|
342
|
+
case "nn":
|
|
343
|
+
return "no";
|
|
344
|
+
case "sv":
|
|
345
|
+
return "sv";
|
|
346
|
+
case "fi":
|
|
347
|
+
return "fi";
|
|
348
|
+
case "de":
|
|
349
|
+
return "de";
|
|
350
|
+
case "fr":
|
|
351
|
+
return "fr";
|
|
352
|
+
case "pt":
|
|
353
|
+
return "pt";
|
|
354
|
+
case "ar":
|
|
355
|
+
return "ar";
|
|
356
|
+
case "bn":
|
|
357
|
+
return "bn";
|
|
358
|
+
default:
|
|
359
|
+
return "en";
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
var RTL_LOCALES = ["ar"];
|
|
363
|
+
function isRtlLanguage(lang) {
|
|
364
|
+
return RTL_LOCALES.includes(resolveLocale(lang));
|
|
365
|
+
}
|
|
366
|
+
function directionFor(lang) {
|
|
367
|
+
return isRtlLanguage(lang) ? "rtl" : "ltr";
|
|
368
|
+
}
|
|
369
|
+
function getLabels(lang) {
|
|
370
|
+
return LABELS[resolveLocale(lang)];
|
|
371
|
+
}
|
|
372
|
+
function resolveActionLabels(actions, lang) {
|
|
373
|
+
const labels = getLabels(lang);
|
|
374
|
+
const pick = (value, fallback) => {
|
|
375
|
+
const trimmed = typeof value === "string" ? value.trim() : "";
|
|
376
|
+
return trimmed ? value : fallback;
|
|
377
|
+
};
|
|
378
|
+
return {
|
|
379
|
+
accept: pick(actions?.accept?.label, labels.accept),
|
|
380
|
+
decline: pick(actions?.decline?.label, labels.decline),
|
|
381
|
+
start: pick(actions?.start?.label, labels.start),
|
|
382
|
+
complete: pick(actions?.complete?.label, labels.complete),
|
|
383
|
+
back: pick(actions?.back?.label, labels.back)
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
var RESOLVE_LOCALE_JS = `function ddResolveLocale(lang){
|
|
387
|
+
if(typeof lang!=='string') return 'en';
|
|
388
|
+
var n=lang.trim().toLowerCase().replace(/_/g,'-');
|
|
389
|
+
if(!n) return 'en';
|
|
390
|
+
if(n==='zh'||n.indexOf('zh-')===0) return 'zh-CN';
|
|
391
|
+
var p=n.split('-')[0];
|
|
392
|
+
if(p==='en') return 'en';
|
|
393
|
+
if(p==='es') return 'es';
|
|
394
|
+
if(p==='da') return 'da';
|
|
395
|
+
if(p==='no'||p==='nb'||p==='nn') return 'no';
|
|
396
|
+
if(p==='sv') return 'sv';
|
|
397
|
+
if(p==='fi') return 'fi';
|
|
398
|
+
if(p==='de') return 'de';
|
|
399
|
+
if(p==='fr') return 'fr';
|
|
400
|
+
if(p==='pt') return 'pt';
|
|
401
|
+
if(p==='ar') return 'ar';
|
|
402
|
+
if(p==='bn') return 'bn';
|
|
403
|
+
return 'en';
|
|
404
|
+
}`;
|
|
405
|
+
|
|
406
|
+
// src/assets/style.css
|
|
407
|
+
var style_default = `/**
|
|
408
|
+
* NO EDITAR A MANO \u2014 generado por scripts/vendor-survey-css.mjs
|
|
409
|
+
*
|
|
410
|
+
* Copia de @magicfeedback/native@2.2.22 \u2192 dist/styles/magicfeedback-default.css
|
|
411
|
+
* (la hoja can\xF3nica del paquete, la que apunta su campo "style"), con estos cambios locales:
|
|
412
|
+
*
|
|
413
|
+
* 1. Sin el @import de Google Fonts (Nunito): no queremos una petici\xF3n externa desde la
|
|
414
|
+
* p\xE1gina del host, y la tipograf\xEDa la decide el popup.
|
|
415
|
+
* 2. .magicfeedback-container hereda la fuente del popup (var(--deepdots-font, inherit)).
|
|
416
|
+
* 3. Los selectores desnudos (h2, p, input, textarea, select, ::placeholder, .error) van
|
|
417
|
+
* acotados a .deepdots-popup: este CSS se inyecta en el <head> del host y sin acotar
|
|
418
|
+
* repintar\xEDa su web.
|
|
419
|
+
* 4. El grupo .magicfeedback-radio se cualifica como div.magicfeedback-radio (la clase acaba
|
|
420
|
+
* tambi\xE9n en el <input> del boolean).
|
|
421
|
+
* 5. Al final, un bloque de reglas propias del popup (fuente en los controles y padding del
|
|
422
|
+
* radio nativo).
|
|
423
|
+
*
|
|
424
|
+
* Las variables --mf-* se dejan en :root a prop\xF3sito: el modal del priority-list se portea a
|
|
425
|
+
* <body>, fuera de .deepdots-popup, y ah\xED las necesita.
|
|
426
|
+
*
|
|
427
|
+
* Para subir de versi\xF3n: npm i @magicfeedback/native@<v> && node scripts/vendor-survey-css.mjs
|
|
428
|
+
*/
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* @magicfeedback/native - Default Styles
|
|
432
|
+
* Clean, minimal, and elegant survey rendering
|
|
433
|
+
*/
|
|
434
|
+
|
|
435
|
+
/* @import de Google Fonts (Nunito) eliminado al vendorizar: la fuente la pone el popup. */
|
|
436
|
+
|
|
437
|
+
/* ========================================
|
|
438
|
+
CSS VARIABLES - Design SYSTEM
|
|
439
|
+
======================================== */
|
|
440
|
+
:root {
|
|
441
|
+
/* Colors - Minimal Pastel */
|
|
442
|
+
/* --mf-primary is the one source of truth for brand/accent color \u2014
|
|
443
|
+
every token below derives from it via color-mix() (or references
|
|
444
|
+
it directly) so changing this single value, here or via a
|
|
445
|
+
per-integration override, keeps hover/light/border states in
|
|
446
|
+
sync automatically instead of going stale independently. Scoped
|
|
447
|
+
to genuinely interactive/accent surfaces (buttons, selected
|
|
448
|
+
chips, focus rings) \u2014 general body text stays on its own neutral
|
|
449
|
+
scale below, not tied to the brand color. */
|
|
450
|
+
--mf-primary: #5d7bad;
|
|
451
|
+
--mf-primary-hover: color-mix(in srgb, var(--mf-primary) 85%, black);
|
|
452
|
+
--mf-primary-light: color-mix(in srgb, var(--mf-primary) 15%, white);
|
|
453
|
+
/* a translucent tint \u2014 mixed with transparent (opacity), not white,
|
|
454
|
+
so it reads as a soft shadow of the brand color rather than a
|
|
455
|
+
pastel of it. */
|
|
456
|
+
--mf-primary-border: color-mix(in srgb, var(--mf-primary) 35%, transparent);
|
|
457
|
+
|
|
458
|
+
--mf-text-primary: #1E293B;
|
|
459
|
+
--mf-text-secondary: #475569;
|
|
460
|
+
--mf-text-muted: #94A3B8;
|
|
461
|
+
|
|
462
|
+
--mf-bg-primary: #F8FAFC;
|
|
463
|
+
--mf-bg-secondary: #FFFFFF;
|
|
464
|
+
--mf-bg-hover: #EEF2F6;
|
|
465
|
+
|
|
466
|
+
--mf-border: #E2E8F0;
|
|
467
|
+
--mf-border-focus: var(--mf-primary);
|
|
468
|
+
|
|
469
|
+
--mf-success: #16A34A;
|
|
470
|
+
--mf-error: #EF4444;
|
|
471
|
+
--mf-warning: #F59E0B;
|
|
472
|
+
|
|
473
|
+
--mf-surface: #FFFFFF;
|
|
474
|
+
--mf-surface-alt: #F1F5F9;
|
|
475
|
+
--mf-accent: #38BDF8;
|
|
476
|
+
|
|
477
|
+
/* Spacing */
|
|
478
|
+
--mf-space-xs: 0.25rem;
|
|
479
|
+
--mf-space-sm: 0.5rem;
|
|
480
|
+
--mf-space-md: 0.75rem;
|
|
481
|
+
--mf-space-lg: 1rem;
|
|
482
|
+
--mf-space-xl: 1.5rem;
|
|
483
|
+
|
|
484
|
+
/* Border Radius */
|
|
485
|
+
--mf-radius-sm: 0.5rem;
|
|
486
|
+
--mf-radius-md: 0.75rem;
|
|
487
|
+
--mf-radius-lg: 1.25rem;
|
|
488
|
+
--mf-radius-full: 9999px;
|
|
489
|
+
|
|
490
|
+
/* Shadows */
|
|
491
|
+
--mf-shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.06);
|
|
492
|
+
--mf-shadow-md: 0 8px 20px rgba(15, 23, 42, 0.08);
|
|
493
|
+
--mf-shadow-lg: 0 16px 30px rgba(15, 23, 42, 0.12);
|
|
494
|
+
--mf-shadow-focus: 0 0 0 3px rgba(30, 41, 59, 0.15);
|
|
495
|
+
--mf-shadow-card: 0 18px 40px rgba(15, 23, 42, 0.08);
|
|
496
|
+
|
|
497
|
+
/* Typography */
|
|
498
|
+
--mf-font-sans: "Nunito", "Quicksand", "Avenir Next", "Trebuchet MS", sans-serif;
|
|
499
|
+
--mf-font-size-sm: 0.875rem;
|
|
500
|
+
--mf-font-size-base: 1rem;
|
|
501
|
+
--mf-font-size-lg: 1.125rem;
|
|
502
|
+
--mf-font-size-xl: 1.25rem;
|
|
503
|
+
--mf-line-height: 1.6;
|
|
504
|
+
|
|
505
|
+
/* Font Weights */
|
|
506
|
+
--mf-font-weight-normal: 400;
|
|
507
|
+
--mf-font-weight-medium: 500;
|
|
508
|
+
--mf-font-weight-semibold: 600;
|
|
509
|
+
--mf-font-weight-bold: 700;
|
|
510
|
+
--mf-font-weight-extrabold: 800;
|
|
511
|
+
|
|
512
|
+
/* Transitions */
|
|
513
|
+
--mf-transition: all 0.2s ease;
|
|
514
|
+
--mf-transition-fast: all 0.15s ease;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
/* ========================================
|
|
518
|
+
ANIMATIONS
|
|
519
|
+
======================================== */
|
|
520
|
+
@keyframes mf-fade-in {
|
|
521
|
+
from {
|
|
522
|
+
opacity: 0;
|
|
523
|
+
transform: translateY(8px);
|
|
524
|
+
}
|
|
525
|
+
to {
|
|
526
|
+
opacity: 1;
|
|
527
|
+
transform: translateY(0);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
@keyframes mf-slide-in {
|
|
532
|
+
from {
|
|
533
|
+
opacity: 0;
|
|
534
|
+
transform: translateX(-16px);
|
|
535
|
+
}
|
|
536
|
+
to {
|
|
537
|
+
opacity: 1;
|
|
538
|
+
transform: translateX(0);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
@keyframes mf-scale-in {
|
|
543
|
+
from {
|
|
544
|
+
opacity: 0;
|
|
545
|
+
transform: scale(0.95);
|
|
546
|
+
}
|
|
547
|
+
to {
|
|
548
|
+
opacity: 1;
|
|
549
|
+
transform: scale(1);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
@keyframes mf-pulse {
|
|
554
|
+
0%,
|
|
555
|
+
100% {
|
|
556
|
+
opacity: 1;
|
|
557
|
+
}
|
|
558
|
+
50% {
|
|
559
|
+
opacity: 0.8;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/* ========================================
|
|
564
|
+
BASE CONTAINER
|
|
565
|
+
======================================== */
|
|
566
|
+
.magicfeedback-container {
|
|
567
|
+
/* Local: hereda la fuente del popup; --deepdots-font viene de PopupStyle.font. */
|
|
568
|
+
font-family: var(--deepdots-font, inherit);
|
|
569
|
+
color: var(--mf-text-primary);
|
|
570
|
+
line-height: var(--mf-line-height);
|
|
571
|
+
animation: mf-fade-in 0.4s ease-out;
|
|
572
|
+
border-radius: var(--mf-radius-lg);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/* ========================================
|
|
576
|
+
MESSAGES
|
|
577
|
+
======================================== */
|
|
578
|
+
.magicfeedback-success-message,
|
|
579
|
+
.magicfeedback-info-message,
|
|
580
|
+
.magicfeedback-start-message {
|
|
581
|
+
padding: var(--mf-space-lg);
|
|
582
|
+
margin: var(--mf-space-lg) 0;
|
|
583
|
+
animation: mf-scale-in 0.3s ease-out;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/* .magicfeedback-info-message/-start-message are set via innerHTML (see
|
|
587
|
+
renderInfoPage.ts / questions.service.ts's renderStartMessage) \u2014 whatever
|
|
588
|
+
rich text a survey author writes lands here as real HTML, not just the
|
|
589
|
+
<p>/<img> pair this used to style. Covering the rest of what a rich-text
|
|
590
|
+
editor commonly outputs (headings, lists, links, emphasis, quotes, code,
|
|
591
|
+
rules) keeps that content on the same type scale and palette as the rest
|
|
592
|
+
of the widget instead of falling back to unstyled browser defaults. */
|
|
593
|
+
.magicfeedback-success-message > :first-child,
|
|
594
|
+
.magicfeedback-info-message > :first-child,
|
|
595
|
+
.magicfeedback-start-message > :first-child {
|
|
596
|
+
margin-top: 0;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
.magicfeedback-success-message > :last-child,
|
|
600
|
+
.magicfeedback-info-message > :last-child,
|
|
601
|
+
.magicfeedback-start-message > :last-child {
|
|
602
|
+
margin-bottom: 0;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.magicfeedback-success-message p,
|
|
606
|
+
.magicfeedback-info-message p,
|
|
607
|
+
.magicfeedback-start-message p {
|
|
608
|
+
font-size: var(--mf-font-size-base);
|
|
609
|
+
color: var(--mf-text-secondary);
|
|
610
|
+
margin: 0 0 var(--mf-space-md);
|
|
611
|
+
line-height: var(--mf-line-height);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.magicfeedback-info-message h1,
|
|
615
|
+
.magicfeedback-info-message h2,
|
|
616
|
+
.magicfeedback-info-message h3,
|
|
617
|
+
.magicfeedback-info-message h4,
|
|
618
|
+
.magicfeedback-info-message h5,
|
|
619
|
+
.magicfeedback-info-message h6,
|
|
620
|
+
.magicfeedback-start-message h1,
|
|
621
|
+
.magicfeedback-start-message h2,
|
|
622
|
+
.magicfeedback-start-message h3,
|
|
623
|
+
.magicfeedback-start-message h4,
|
|
624
|
+
.magicfeedback-start-message h5,
|
|
625
|
+
.magicfeedback-start-message h6 {
|
|
626
|
+
color: var(--mf-text-primary);
|
|
627
|
+
font-weight: var(--mf-font-weight-bold);
|
|
628
|
+
line-height: 1.3;
|
|
629
|
+
margin: var(--mf-space-lg) 0 var(--mf-space-sm);
|
|
630
|
+
text-align: start;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.magicfeedback-info-message h1, .magicfeedback-start-message h1 { font-size: var(--mf-font-size-xl); }
|
|
634
|
+
.magicfeedback-info-message h2, .magicfeedback-start-message h2 { font-size: var(--mf-font-size-lg); }
|
|
635
|
+
.magicfeedback-info-message h3,
|
|
636
|
+
.magicfeedback-info-message h4,
|
|
637
|
+
.magicfeedback-info-message h5,
|
|
638
|
+
.magicfeedback-info-message h6,
|
|
639
|
+
.magicfeedback-start-message h3,
|
|
640
|
+
.magicfeedback-start-message h4,
|
|
641
|
+
.magicfeedback-start-message h5,
|
|
642
|
+
.magicfeedback-start-message h6 { font-size: var(--mf-font-size-base); }
|
|
643
|
+
|
|
644
|
+
.magicfeedback-info-message strong,
|
|
645
|
+
.magicfeedback-info-message b,
|
|
646
|
+
.magicfeedback-start-message strong,
|
|
647
|
+
.magicfeedback-start-message b {
|
|
648
|
+
font-weight: var(--mf-font-weight-bold);
|
|
649
|
+
color: var(--mf-text-primary);
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.magicfeedback-info-message a,
|
|
653
|
+
.magicfeedback-start-message a {
|
|
654
|
+
color: var(--mf-primary);
|
|
655
|
+
text-decoration: underline;
|
|
656
|
+
text-underline-offset: 2px;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.magicfeedback-info-message a:hover,
|
|
660
|
+
.magicfeedback-start-message a:hover {
|
|
661
|
+
color: var(--mf-primary-hover);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.magicfeedback-info-message ul,
|
|
665
|
+
.magicfeedback-info-message ol,
|
|
666
|
+
.magicfeedback-start-message ul,
|
|
667
|
+
.magicfeedback-start-message ol {
|
|
668
|
+
margin: 0 0 var(--mf-space-md);
|
|
669
|
+
padding-inline-start: var(--mf-space-xl);
|
|
670
|
+
color: var(--mf-text-secondary);
|
|
671
|
+
line-height: var(--mf-line-height);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.magicfeedback-info-message li + li,
|
|
675
|
+
.magicfeedback-start-message li + li {
|
|
676
|
+
margin-top: var(--mf-space-xs);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.magicfeedback-info-message blockquote,
|
|
680
|
+
.magicfeedback-start-message blockquote {
|
|
681
|
+
margin: 0 0 var(--mf-space-md);
|
|
682
|
+
padding: var(--mf-space-sm) var(--mf-space-md);
|
|
683
|
+
border-inline-start: 3px solid var(--mf-primary-border);
|
|
684
|
+
color: var(--mf-text-secondary);
|
|
685
|
+
font-style: italic;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.magicfeedback-info-message code,
|
|
689
|
+
.magicfeedback-start-message code {
|
|
690
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
691
|
+
font-size: 0.9em;
|
|
692
|
+
background: var(--mf-bg-hover);
|
|
693
|
+
padding: 0.15em 0.4em;
|
|
694
|
+
border-radius: var(--mf-radius-sm);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.magicfeedback-info-message pre,
|
|
698
|
+
.magicfeedback-start-message pre {
|
|
699
|
+
margin: 0 0 var(--mf-space-md);
|
|
700
|
+
padding: var(--mf-space-md);
|
|
701
|
+
background: var(--mf-bg-hover);
|
|
702
|
+
border-radius: var(--mf-radius-md);
|
|
703
|
+
overflow-x: auto;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.magicfeedback-info-message pre code,
|
|
707
|
+
.magicfeedback-start-message pre code {
|
|
708
|
+
background: none;
|
|
709
|
+
padding: 0;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
.magicfeedback-info-message hr,
|
|
713
|
+
.magicfeedback-start-message hr {
|
|
714
|
+
border: none;
|
|
715
|
+
border-top: 1px solid var(--mf-border);
|
|
716
|
+
margin: var(--mf-space-lg) 0;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.magicfeedback-success-message img,
|
|
720
|
+
.magicfeedback-info-message img,
|
|
721
|
+
.magicfeedback-start-message img {
|
|
722
|
+
max-width: 100%;
|
|
723
|
+
height: auto;
|
|
724
|
+
margin: var(--mf-space-lg) auto;
|
|
725
|
+
display: block;
|
|
726
|
+
border-radius: var(--mf-radius-md);
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.magicfeedback-image {
|
|
730
|
+
max-height: 400px;
|
|
731
|
+
height: auto;
|
|
732
|
+
max-width: 100%;
|
|
733
|
+
margin: var(--mf-space-lg) auto;
|
|
734
|
+
display: block;
|
|
735
|
+
border-radius: var(--mf-radius-md);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/* ========================================
|
|
739
|
+
FORM STRUCTURE
|
|
740
|
+
======================================== */
|
|
741
|
+
.magicfeedback-form {
|
|
742
|
+
display: flex;
|
|
743
|
+
flex-direction: column;
|
|
744
|
+
gap: var(--mf-space-lg);
|
|
745
|
+
padding: clamp(16px, 2.5vw, 28px);
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
.magicfeedback-questions {
|
|
749
|
+
display: flex;
|
|
750
|
+
flex-direction: column;
|
|
751
|
+
gap: var(--mf-space-xl);
|
|
752
|
+
width: 100%;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.magicfeedback-div {
|
|
756
|
+
display: flex;
|
|
757
|
+
flex-direction: column;
|
|
758
|
+
gap: var(--mf-space-sm);
|
|
759
|
+
animation: mf-slide-in 0.3s ease-out;
|
|
760
|
+
background: var(--mf-bg-secondary);
|
|
761
|
+
border-radius: var(--mf-radius-md);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/* ========================================
|
|
765
|
+
LABELS & TYPOGRAPHY
|
|
766
|
+
======================================== */
|
|
767
|
+
.magicfeedback-label {
|
|
768
|
+
font-size: var(--mf-font-size-lg);
|
|
769
|
+
font-weight: var(--mf-font-weight-bold);
|
|
770
|
+
color: var(--mf-text-primary);
|
|
771
|
+
line-height: var(--mf-line-height);
|
|
772
|
+
text-align: start;
|
|
773
|
+
letter-spacing: -0.01em;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
.magicfeedback-sublabel {
|
|
777
|
+
font-size: var(--mf-font-size-base);
|
|
778
|
+
font-weight: var(--mf-font-weight-normal);
|
|
779
|
+
color: var(--mf-text-secondary);
|
|
780
|
+
margin-bottom: var(--mf-space-sm);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.deepdots-popup h2 {
|
|
784
|
+
font-size: var(--mf-font-size-xl);
|
|
785
|
+
font-weight: 600;
|
|
786
|
+
color: var(--mf-text-primary);
|
|
787
|
+
margin: 0 0 var(--mf-space-xl) 0;
|
|
788
|
+
text-align: center;
|
|
789
|
+
letter-spacing: -0.01em;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
.deepdots-popup p {
|
|
793
|
+
margin: 0;
|
|
794
|
+
font-size: var(--mf-font-size-sm);
|
|
795
|
+
color: var(--mf-text-secondary);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/* ========================================
|
|
799
|
+
FORM INPUTS
|
|
800
|
+
======================================== */
|
|
801
|
+
.deepdots-popup input[type="date"],
|
|
802
|
+
.deepdots-popup input[type="text"],
|
|
803
|
+
.deepdots-popup input[type="number"],
|
|
804
|
+
.deepdots-popup input[type="email"],
|
|
805
|
+
.deepdots-popup input[type="password"],
|
|
806
|
+
.deepdots-popup textarea,
|
|
807
|
+
.deepdots-popup select {
|
|
808
|
+
padding: 0.75rem 0.9rem;
|
|
809
|
+
font-size: var(--mf-font-size-base);
|
|
810
|
+
font-family: inherit;
|
|
811
|
+
color: var(--mf-text-primary);
|
|
812
|
+
background-color: var(--mf-surface);
|
|
813
|
+
border: 2px solid var(--mf-border);
|
|
814
|
+
border-radius: var(--mf-radius-md);
|
|
815
|
+
outline: none;
|
|
816
|
+
transition: var(--mf-transition);
|
|
817
|
+
-webkit-appearance: none;
|
|
818
|
+
appearance: none;
|
|
819
|
+
box-shadow: var(--mf-shadow-sm);
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
.deepdots-popup textarea {
|
|
823
|
+
min-height: 100px;
|
|
824
|
+
resize: vertical;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.deepdots-popup input::placeholder,
|
|
828
|
+
.deepdots-popup textarea::placeholder {
|
|
829
|
+
color: var(--mf-text-muted);
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
/* Remove number input spinners */
|
|
833
|
+
.deepdots-popup input::-webkit-outer-spin-button,
|
|
834
|
+
.deepdots-popup input::-webkit-inner-spin-button {
|
|
835
|
+
-webkit-appearance: none;
|
|
836
|
+
margin: 0;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
.deepdots-popup input[type="number"] {
|
|
840
|
+
/* -moz-appearance: textfield; removed for lint compatibility */
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
/* Custom Select Arrow */
|
|
844
|
+
.deepdots-popup select {
|
|
845
|
+
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");
|
|
846
|
+
background-repeat: no-repeat;
|
|
847
|
+
background-position: right var(--mf-space-md) center;
|
|
848
|
+
padding-inline-end: var(--mf-space-xl);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/* Error State */
|
|
852
|
+
.deepdots-popup input.error,
|
|
853
|
+
.deepdots-popup select.error,
|
|
854
|
+
.deepdots-popup textarea.error {
|
|
855
|
+
border-color: var(--mf-error);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.magicfeedback-error {
|
|
859
|
+
margin-top: var(--mf-space-xs);
|
|
860
|
+
font-size: var(--mf-font-size-sm);
|
|
861
|
+
color: var(--mf-error);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/* ========================================
|
|
865
|
+
CHECKBOX & RADIO OPTIONS
|
|
866
|
+
======================================== */
|
|
867
|
+
.magicfeedback-checkbox,
|
|
868
|
+
div.magicfeedback-radio {
|
|
869
|
+
display: flex;
|
|
870
|
+
flex-direction: column;
|
|
871
|
+
gap: var(--mf-space-sm);
|
|
872
|
+
width: 100%;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
.magicfeedback-checkbox-container,
|
|
876
|
+
.magicfeedback-radio-container {
|
|
877
|
+
display: flex;
|
|
878
|
+
align-items: center;
|
|
879
|
+
gap: var(--mf-space-sm);
|
|
880
|
+
padding: var(--mf-space-md);
|
|
881
|
+
border: 1.5px solid var(--mf-border);
|
|
882
|
+
border-radius: var(--mf-radius-md);
|
|
883
|
+
cursor: pointer;
|
|
884
|
+
transition: var(--mf-transition-fast);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
.magicfeedback-checkbox-container:hover,
|
|
888
|
+
.magicfeedback-radio-container:hover {
|
|
889
|
+
background-color: var(--mf-bg-hover);
|
|
890
|
+
border-color: var(--mf-primary);
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.magicfeedback-checkbox-container:has(input:checked),
|
|
894
|
+
.magicfeedback-radio-container:has(input:checked) {
|
|
895
|
+
background-color: var(--mf-primary-light);
|
|
896
|
+
border-color: var(--mf-primary);
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
.magicfeedback-checkbox input[type="checkbox"],
|
|
900
|
+
.magicfeedback-radio-container input[type="radio"] {
|
|
901
|
+
width: 18px;
|
|
902
|
+
height: 18px;
|
|
903
|
+
margin: 0;
|
|
904
|
+
cursor: pointer;
|
|
905
|
+
flex-shrink: 0;
|
|
906
|
+
accent-color: var(--mf-primary);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
.magicfeedback-checkbox label,
|
|
910
|
+
.magicfeedback-radio-container label {
|
|
911
|
+
font-size: var(--mf-font-size-base);
|
|
912
|
+
text-align: start;
|
|
913
|
+
color: var(--mf-text-primary);
|
|
914
|
+
cursor: pointer;
|
|
915
|
+
margin: 0;
|
|
916
|
+
flex: 1;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
/* ========================================
|
|
920
|
+
BOOLEAN OPTIONS
|
|
921
|
+
======================================== */
|
|
922
|
+
.magicfeedback-boolean-container {
|
|
923
|
+
display: flex;
|
|
924
|
+
gap: var(--mf-space-md);
|
|
925
|
+
width: 100%;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
.magicfeedback-boolean-option {
|
|
929
|
+
flex: 1;
|
|
930
|
+
position: relative;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
.magicfeedback-boolean-option input[type="radio"] {
|
|
934
|
+
position: absolute;
|
|
935
|
+
opacity: 0;
|
|
936
|
+
width: 0;
|
|
937
|
+
height: 0;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
.magicfeedback-boolean-option label {
|
|
941
|
+
display: flex;
|
|
942
|
+
align-items: center;
|
|
943
|
+
justify-content: center;
|
|
944
|
+
padding: var(--mf-space-md);
|
|
945
|
+
font-size: var(--mf-font-size-base);
|
|
946
|
+
font-weight: 500;
|
|
947
|
+
color: var(--mf-text-secondary);
|
|
948
|
+
border: 1.5px solid var(--mf-border);
|
|
949
|
+
border-radius: var(--mf-radius-md);
|
|
950
|
+
cursor: pointer;
|
|
951
|
+
transition: var(--mf-transition-fast);
|
|
952
|
+
margin: 0;
|
|
953
|
+
width: -webkit-fill-available;
|
|
954
|
+
height: inherit;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
.magicfeedback-boolean-option label:hover {
|
|
958
|
+
background-color: var(--mf-bg-hover);
|
|
959
|
+
border-color: var(--mf-primary);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.magicfeedback-boolean-option input[type="radio"]:checked + label {
|
|
963
|
+
color: var(--mf-primary);
|
|
964
|
+
background-color: var(--mf-primary-light);
|
|
965
|
+
border-color: var(--mf-primary);
|
|
966
|
+
font-weight: 600;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/* ========================================
|
|
970
|
+
RATING SYSTEMS
|
|
971
|
+
======================================== */
|
|
972
|
+
.magicfeedback-rating,
|
|
973
|
+
.magicfeedback-rating-number,
|
|
974
|
+
.magicfeedback-rating-star {
|
|
975
|
+
width: 100%;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
.magicfeedback-rating-container,
|
|
979
|
+
.magicfeedback-rating-number-container,
|
|
980
|
+
.magicfeedback-rating-star-container {
|
|
981
|
+
display: flex;
|
|
982
|
+
flex-wrap: wrap;
|
|
983
|
+
gap: var(--mf-space-sm);
|
|
984
|
+
justify-content: center;
|
|
985
|
+
align-items: center;
|
|
986
|
+
padding: var(--mf-space-md) 0;
|
|
987
|
+
list-style: none;
|
|
988
|
+
margin: 0;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/* Caption line below the row \u2014 min on one side, max on the other (swapped
|
|
992
|
+
for order: "rtl") \u2014 same simple, non-responsive pattern as the
|
|
993
|
+
rating-number row caption. Used by rating-star and rating-emoji. */
|
|
994
|
+
.magicfeedback-rating-placeholder {
|
|
995
|
+
display: flex;
|
|
996
|
+
justify-content: space-between;
|
|
997
|
+
gap: var(--mf-space-md);
|
|
998
|
+
width: 100%;
|
|
999
|
+
margin-top: var(--mf-space-sm);
|
|
1000
|
+
font-size: var(--mf-font-size-sm);
|
|
1001
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
1002
|
+
color: var(--mf-text-secondary);
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
.magicfeedback-rating-placeholder-value {
|
|
1006
|
+
overflow-wrap: anywhere;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
.magicfeedback-rating-placeholder-value:last-child {
|
|
1010
|
+
text-align: end;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/* Rating with Images */
|
|
1014
|
+
.magicfeedback-rating-option-label-container input[type="radio"] {
|
|
1015
|
+
position: absolute;
|
|
1016
|
+
opacity: 0;
|
|
1017
|
+
width: 0;
|
|
1018
|
+
height: 0;
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
.magicfeedback-rating-option-label-container img {
|
|
1022
|
+
width: 56px;
|
|
1023
|
+
height: 56px;
|
|
1024
|
+
cursor: pointer;
|
|
1025
|
+
transition: var(--mf-transition-fast);
|
|
1026
|
+
border-radius: var(--mf-radius-full);
|
|
1027
|
+
border: 2px solid transparent;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.magicfeedback-rating-option-label-container img:hover {
|
|
1031
|
+
transform: scale(1.1);
|
|
1032
|
+
border-color: var(--mf-primary);
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
.magicfeedback-rating-option-label-container input[type="radio"]:checked + img {
|
|
1036
|
+
border-color: var(--mf-primary);
|
|
1037
|
+
box-shadow: 0 0 0 3px var(--mf-primary-light);
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
.magicfeedback-rating-option-label-container label {
|
|
1041
|
+
display: block;
|
|
1042
|
+
text-align: center;
|
|
1043
|
+
font-size: var(--mf-font-size-sm);
|
|
1044
|
+
color: var(--mf-text-secondary);
|
|
1045
|
+
margin-top: var(--mf-space-xs);
|
|
1046
|
+
cursor: pointer;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
/* Rating Numbers \u2014 each option is its own outlined chip in the survey's
|
|
1050
|
+
primary color, with a gap between them. Row and column use the same
|
|
1051
|
+
chip; column additionally has room to show each option's own text
|
|
1052
|
+
plainly next to its number. */
|
|
1053
|
+
|
|
1054
|
+
/* Every size here is width:100%/flex:1 combined with the chip's own
|
|
1055
|
+
padding and border. Without border-box, the browser's default
|
|
1056
|
+
content-box adds that padding/border on TOP of the declared size, so
|
|
1057
|
+
the chip quietly overflows past its flex slot \u2014 reading as "not quite
|
|
1058
|
+
full width" or, worse, pushing into the next chip. */
|
|
1059
|
+
.magicfeedback-rating-number-container,
|
|
1060
|
+
.magicfeedback-rating-number-option,
|
|
1061
|
+
.magicfeedback-rating-number-option-label-container,
|
|
1062
|
+
.magicfeedback-rating-number-value {
|
|
1063
|
+
box-sizing: border-box;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
/* The shared rating-container rule (above, reused by star rating) sets
|
|
1067
|
+
align-items:center for its row-of-chips layout \u2014 in a stacked column
|
|
1068
|
+
that still nudges a 100%-wide chip inward instead of a true 0 offset.
|
|
1069
|
+
Force stretch so every chip fills the exact same width, flush on
|
|
1070
|
+
both sides. */
|
|
1071
|
+
.magicfeedback-rating-number-container-column,
|
|
1072
|
+
.magicfeedback-rating-number-container-column-reverse {
|
|
1073
|
+
align-items: stretch;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
/* Caption line below the row \u2014 the single place min/max labels live
|
|
1077
|
+
for row mode, shared by mobile and desktop. */
|
|
1078
|
+
.magicfeedback-rating-number-scale-labels {
|
|
1079
|
+
display: flex;
|
|
1080
|
+
justify-content: space-between;
|
|
1081
|
+
gap: var(--mf-space-md);
|
|
1082
|
+
margin-top: var(--mf-space-sm);
|
|
1083
|
+
font-size: var(--mf-font-size-sm);
|
|
1084
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
1085
|
+
color: var(--mf-text-secondary);
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
.magicfeedback-rating-number-scale-label {
|
|
1089
|
+
overflow-wrap: anywhere;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
.magicfeedback-rating-number-scale-label:last-child {
|
|
1093
|
+
text-align: end;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/* Column, no per-option text: each row is its own separated chip, so
|
|
1097
|
+
the min/max labels bookend the stack from outside it \u2014 one line
|
|
1098
|
+
above the first chip, one below the last. Margin goes on whichever
|
|
1099
|
+
side actually faces the list \u2014 the "before" label (always the first
|
|
1100
|
+
child) gets space below it, the "after" one (always right after the
|
|
1101
|
+
container, extra option row or not) gets space above it \u2014 so both
|
|
1102
|
+
sit the same distance from the chips regardless of which one it is. */
|
|
1103
|
+
.magicfeedback-rating-number-scale-label-block {
|
|
1104
|
+
font-size: var(--mf-font-size-sm);
|
|
1105
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
1106
|
+
color: var(--mf-text-secondary);
|
|
1107
|
+
text-align: center;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.magicfeedback-rating-number-scale-label-block:first-child {
|
|
1111
|
+
margin-bottom: var(--mf-space-sm);
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
.magicfeedback-rating-number-container + .magicfeedback-rating-number-scale-label-block {
|
|
1115
|
+
margin-top: var(--mf-space-sm);
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
.magicfeedback-rating-number-option {
|
|
1119
|
+
display: flex;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
.magicfeedback-rating-number-option-label-container {
|
|
1123
|
+
position: relative;
|
|
1124
|
+
width: 100%;
|
|
1125
|
+
display: flex;
|
|
1126
|
+
cursor: pointer;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
.magicfeedback-rating-number-option-label-container input[type="radio"] {
|
|
1130
|
+
position: absolute;
|
|
1131
|
+
opacity: 0;
|
|
1132
|
+
width: 0;
|
|
1133
|
+
height: 0;
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
.magicfeedback-rating-number-value {
|
|
1137
|
+
display: flex;
|
|
1138
|
+
align-items: center;
|
|
1139
|
+
justify-content: center;
|
|
1140
|
+
width: 100%;
|
|
1141
|
+
transition: var(--mf-transition-fast);
|
|
1142
|
+
color: var(--mf-text-secondary);
|
|
1143
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
/* Row: individual outlined chips in the survey's own primary color \u2014
|
|
1147
|
+
var(--mf-primary) so whatever brand color a given survey sets carries
|
|
1148
|
+
through automatically, no color hardcoded here. */
|
|
1149
|
+
.magicfeedback-rating-number-container-row,
|
|
1150
|
+
.magicfeedback-rating-number-container-row-reverse {
|
|
1151
|
+
flex-wrap: nowrap;
|
|
1152
|
+
gap: var(--mf-space-sm);
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
.magicfeedback-rating-number-option-row,
|
|
1156
|
+
.magicfeedback-rating-number-option-row-reverse {
|
|
1157
|
+
flex: 1 1 0;
|
|
1158
|
+
min-width: 0;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-value,
|
|
1162
|
+
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-value {
|
|
1163
|
+
min-height: 56px;
|
|
1164
|
+
padding: var(--mf-space-sm);
|
|
1165
|
+
border: 2px solid var(--mf-primary-border);
|
|
1166
|
+
border-radius: var(--mf-radius-md);
|
|
1167
|
+
background: var(--mf-bg-secondary);
|
|
1168
|
+
color: var(--mf-primary);
|
|
1169
|
+
font-size: var(--mf-font-size-lg);
|
|
1170
|
+
font-weight: var(--mf-font-weight-bold);
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/* More than 6 options (e.g. a 0-10 NPS scale): still one row, never
|
|
1174
|
+
wraps \u2014 but scaled down on purpose, so it reads as a compact chip
|
|
1175
|
+
rather than the same 56px button stretched thin. */
|
|
1176
|
+
.magicfeedback-rating-number-container-row--dense .magicfeedback-rating-number-option-row .magicfeedback-rating-number-value,
|
|
1177
|
+
.magicfeedback-rating-number-container-row--dense .magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-value {
|
|
1178
|
+
min-height: 36px;
|
|
1179
|
+
padding: var(--mf-space-xs);
|
|
1180
|
+
border-radius: var(--mf-radius-sm);
|
|
1181
|
+
font-size: 0.8rem;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value,
|
|
1185
|
+
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value {
|
|
1186
|
+
background: var(--mf-primary-light);
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
1190
|
+
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
1191
|
+
color: #fff;
|
|
1192
|
+
background-color: var(--mf-primary);
|
|
1193
|
+
box-shadow: var(--mf-shadow-md);
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
/* Extra option: always its own row below the scale, and styled like every
|
|
1197
|
+
other chip now \u2014 "doesn't apply" is still not a point on the 1..N
|
|
1198
|
+
continuum, but it no longer needs a different border style to say so. */
|
|
1199
|
+
.magicfeedback-rating-number-extra-row {
|
|
1200
|
+
display: flex;
|
|
1201
|
+
justify-content: center;
|
|
1202
|
+
margin-top: var(--mf-space-sm);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
.magicfeedback-rating-number-option--extra {
|
|
1206
|
+
flex: 0 1 auto;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-option-label-container {
|
|
1210
|
+
width: auto;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-value {
|
|
1214
|
+
min-height: 36px;
|
|
1215
|
+
padding: 0 var(--mf-space-md);
|
|
1216
|
+
border: 2px solid var(--mf-primary-border);
|
|
1217
|
+
border-radius: var(--mf-radius-md);
|
|
1218
|
+
background: var(--mf-bg-secondary);
|
|
1219
|
+
color: var(--mf-primary);
|
|
1220
|
+
font-size: var(--mf-font-size-sm);
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value {
|
|
1224
|
+
background: var(--mf-primary-light);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
1228
|
+
color: #fff;
|
|
1229
|
+
background-color: var(--mf-primary);
|
|
1230
|
+
box-shadow: var(--mf-shadow-md);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
/* Column: the same separated chips as row, just stacked \u2014 each option is
|
|
1234
|
+
its own outlined chip with a gap between them, not one shared box. */
|
|
1235
|
+
.magicfeedback-rating-number-container-column,
|
|
1236
|
+
.magicfeedback-rating-number-container-column-reverse {
|
|
1237
|
+
gap: var(--mf-space-sm);
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
.magicfeedback-rating-number-option-column,
|
|
1241
|
+
.magicfeedback-rating-number-option-column-reverse {
|
|
1242
|
+
width: 100%;
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-value,
|
|
1246
|
+
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-value {
|
|
1247
|
+
justify-content: flex-start;
|
|
1248
|
+
gap: var(--mf-space-sm);
|
|
1249
|
+
min-height: 48px;
|
|
1250
|
+
padding: var(--mf-space-sm) var(--mf-space-md);
|
|
1251
|
+
border: 2px solid var(--mf-primary-border);
|
|
1252
|
+
border-radius: var(--mf-radius-md);
|
|
1253
|
+
background: var(--mf-bg-secondary);
|
|
1254
|
+
color: var(--mf-primary);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value,
|
|
1258
|
+
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value {
|
|
1259
|
+
background: var(--mf-primary-light);
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
1263
|
+
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
1264
|
+
color: #fff;
|
|
1265
|
+
background-color: var(--mf-primary);
|
|
1266
|
+
box-shadow: var(--mf-shadow-md);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
.magicfeedback-rating-number-value-num {
|
|
1270
|
+
font-weight: var(--mf-font-weight-bold);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
/* Column with per-option text: a min-width so "1".."9" and "10" line up,
|
|
1274
|
+
with the label text starting at the same x. Skipped entirely when the
|
|
1275
|
+
column has no per-option text at all (--bare below) \u2014 with nothing to
|
|
1276
|
+
align against, the same left-shift bug from row mode would resurface. */
|
|
1277
|
+
.magicfeedback-rating-number-container-column:not(.magicfeedback-rating-number-container-column--bare) .magicfeedback-rating-number-value-num,
|
|
1278
|
+
.magicfeedback-rating-number-container-column-reverse:not(.magicfeedback-rating-number-container-column--bare) .magicfeedback-rating-number-value-num {
|
|
1279
|
+
flex: none;
|
|
1280
|
+
min-width: 1.4em;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
/* Column, no per-option text at all (only min/max, or nothing): a bare
|
|
1284
|
+
numbered list has nothing to left-align against, so center each
|
|
1285
|
+
number instead of stranding it on the left with blank space beside it. */
|
|
1286
|
+
.magicfeedback-rating-number-container-column--bare .magicfeedback-rating-number-value {
|
|
1287
|
+
justify-content: center;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
.magicfeedback-rating-number-value-label {
|
|
1291
|
+
font-weight: var(--mf-font-weight-medium);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
1295
|
+
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
1296
|
+
color: #fff;
|
|
1297
|
+
background-color: var(--mf-primary);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
/* Star Rating */
|
|
1301
|
+
.magicfeedback-rating-star-container {
|
|
1302
|
+
justify-content: center;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
.magicfeedback-rating-star-option:not(:checked) > .rating__star {
|
|
1306
|
+
font-size: 40px;
|
|
1307
|
+
color: var(--mf-border);
|
|
1308
|
+
cursor: pointer;
|
|
1309
|
+
margin: 0 var(--mf-space-xs);
|
|
1310
|
+
transition: var(--mf-transition-fast);
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover,
|
|
1314
|
+
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover ~ span {
|
|
1315
|
+
color: #fbbf24;
|
|
1316
|
+
transform: scale(1.1);
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
.magicfeedback-rating-star-selected {
|
|
1320
|
+
color: #fbbf24 !important;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
/* ========================================
|
|
1324
|
+
MULTIPLE CHOICE WITH IMAGES
|
|
1325
|
+
======================================== */
|
|
1326
|
+
.magicfeedback-multiple-choice-image-option {
|
|
1327
|
+
display: flex;
|
|
1328
|
+
border-radius: var(--mf-radius-md);
|
|
1329
|
+
overflow: hidden;
|
|
1330
|
+
transition: var(--mf-transition-fast);
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
.magicfeedback-image-option-label-container {
|
|
1334
|
+
cursor: pointer;
|
|
1335
|
+
border-radius: var(--mf-radius-md);
|
|
1336
|
+
overflow: hidden;
|
|
1337
|
+
transition: var(--mf-transition-fast);
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
.magicfeedback-image-option-label-container input[type="radio"],
|
|
1341
|
+
.magicfeedback-image-option-label-container input[type="checkbox"] {
|
|
1342
|
+
position: absolute;
|
|
1343
|
+
opacity: 0;
|
|
1344
|
+
width: 0;
|
|
1345
|
+
height: 0;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
.magicfeedback-image-option-label-container img {
|
|
1349
|
+
width: 100%;
|
|
1350
|
+
height: auto;
|
|
1351
|
+
display: block;
|
|
1352
|
+
border: 2px solid var(--mf-border);
|
|
1353
|
+
border-radius: var(--mf-radius-md);
|
|
1354
|
+
transition: var(--mf-transition-fast);
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
.magicfeedback-image-option-label-container:hover img {
|
|
1358
|
+
border-color: var(--mf-primary);
|
|
1359
|
+
box-shadow: var(--mf-shadow-md);
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
.magicfeedback-image-option-label-container input:checked + img {
|
|
1363
|
+
border-color: var(--mf-primary);
|
|
1364
|
+
box-shadow: 0 0 0 3px var(--mf-primary-light);
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
/* ========================================
|
|
1368
|
+
MATRIX QUESTIONS
|
|
1369
|
+
======================================== */
|
|
1370
|
+
.magicfeedback-multi-question-matrix-container {
|
|
1371
|
+
width: 100%;
|
|
1372
|
+
overflow-x: auto;
|
|
1373
|
+
border-radius: var(--mf-radius-md);
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
.magicfeedback-multi-question-matrix-table {
|
|
1377
|
+
width: 100%;
|
|
1378
|
+
border-collapse: separate;
|
|
1379
|
+
border-spacing: 0 var(--mf-space-xs);
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
.magicfeedback-multi-question-matrix-table th {
|
|
1383
|
+
padding: var(--mf-space-md);
|
|
1384
|
+
text-align: center;
|
|
1385
|
+
font-size: var(--mf-font-size-sm);
|
|
1386
|
+
font-weight: 500;
|
|
1387
|
+
color: var(--mf-text-secondary);
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
.magicfeedback-multi-question-matrix-row-tr {
|
|
1391
|
+
background-color: var(--mf-bg-primary);
|
|
1392
|
+
border-radius: var(--mf-radius-md);
|
|
1393
|
+
transition: var(--mf-transition-fast);
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
.magicfeedback-multi-question-matrix-row-tr:nth-child(even) {
|
|
1397
|
+
background-color: var(--mf-bg-secondary);
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
.magicfeedback-multi-question-matrix-row-tr:hover {
|
|
1401
|
+
background-color: var(--mf-bg-hover);
|
|
1402
|
+
box-shadow: var(--mf-shadow-sm);
|
|
1403
|
+
}
|
|
1404
|
+
|
|
1405
|
+
.magicfeedback-multi-question-matrix-table td {
|
|
1406
|
+
padding: var(--mf-space-md);
|
|
1407
|
+
text-align: center;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
.magicfeedback-multi-question-matrix-label {
|
|
1411
|
+
text-align: start;
|
|
1412
|
+
font-size: var(--mf-font-size-base);
|
|
1413
|
+
color: var(--mf-text-primary);
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
.magicfeedback-multi-question-matrix-table input[type="radio"] {
|
|
1417
|
+
width: 20px;
|
|
1418
|
+
height: 20px;
|
|
1419
|
+
cursor: pointer;
|
|
1420
|
+
accent-color: var(--mf-primary);
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/* ========================================
|
|
1424
|
+
PRIORITY LIST
|
|
1425
|
+
======================================== */
|
|
1426
|
+
.magicfeedback-priority-list-item {
|
|
1427
|
+
display: flex;
|
|
1428
|
+
align-items: center;
|
|
1429
|
+
justify-content: space-between;
|
|
1430
|
+
padding: var(--mf-space-md);
|
|
1431
|
+
margin: var(--mf-space-sm) 0;
|
|
1432
|
+
background-color: var(--mf-bg-primary);
|
|
1433
|
+
border: 1.5px solid var(--mf-border);
|
|
1434
|
+
border-radius: var(--mf-radius-md);
|
|
1435
|
+
transition: var(--mf-transition-fast);
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
.magicfeedback-priority-list-item:hover {
|
|
1439
|
+
box-shadow: var(--mf-shadow-sm);
|
|
1440
|
+
border-color: var(--mf-primary);
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
.magicfeedback-priority-list-item-label {
|
|
1444
|
+
flex: 1;
|
|
1445
|
+
font-size: var(--mf-font-size-base);
|
|
1446
|
+
text-align: start;
|
|
1447
|
+
color: var(--mf-text-primary);
|
|
1448
|
+
margin: 0;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
.magicfeedback-priority-list-arrow-up,
|
|
1452
|
+
.magicfeedback-priority-list-arrow-down {
|
|
1453
|
+
padding: var(--mf-space-xs);
|
|
1454
|
+
font-size: var(--mf-font-size-lg);
|
|
1455
|
+
color: var(--mf-text-secondary);
|
|
1456
|
+
cursor: pointer;
|
|
1457
|
+
transition: var(--mf-transition-fast);
|
|
1458
|
+
user-select: none;
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
.magicfeedback-priority-list-arrow-up:hover,
|
|
1462
|
+
.magicfeedback-priority-list-arrow-down:hover {
|
|
1463
|
+
color: var(--mf-primary);
|
|
1464
|
+
transform: scale(1.2);
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
/* ========================================
|
|
1468
|
+
POINT SYSTEM
|
|
1469
|
+
======================================== */
|
|
1470
|
+
.magicfeedback-point-system-item {
|
|
1471
|
+
display: flex;
|
|
1472
|
+
align-items: center;
|
|
1473
|
+
justify-content: space-between;
|
|
1474
|
+
padding: var(--mf-space-md);
|
|
1475
|
+
margin: var(--mf-space-sm) 0;
|
|
1476
|
+
background-color: var(--mf-bg-primary);
|
|
1477
|
+
border: 1.5px solid var(--mf-border);
|
|
1478
|
+
border-radius: var(--mf-radius-md);
|
|
1479
|
+
min-height: 45px;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
.magicfeedback-point-system-item label {
|
|
1483
|
+
flex: 1;
|
|
1484
|
+
font-size: var(--mf-font-size-base);
|
|
1485
|
+
color: var(--mf-text-primary);
|
|
1486
|
+
margin: 0;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
.magicfeedback-point-system-input-container {
|
|
1490
|
+
display: flex;
|
|
1491
|
+
align-items: center;
|
|
1492
|
+
gap: var(--mf-space-sm);
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
.magicfeedback-point-system-item input {
|
|
1496
|
+
width: 80px;
|
|
1497
|
+
min-width: 80px;
|
|
1498
|
+
padding: var(--mf-space-sm);
|
|
1499
|
+
text-align: center;
|
|
1500
|
+
font-size: var(--mf-font-size-base);
|
|
1501
|
+
border: 1.5px solid var(--mf-border);
|
|
1502
|
+
border-radius: var(--mf-radius-md);
|
|
1503
|
+
margin: 0;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
.magicfeedback-point-system-total {
|
|
1507
|
+
display: flex;
|
|
1508
|
+
justify-content: flex-end;
|
|
1509
|
+
margin-top: var(--mf-space-md);
|
|
1510
|
+
font-size: var(--mf-font-size-base);
|
|
1511
|
+
font-weight: 600;
|
|
1512
|
+
color: var(--mf-text-primary);
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
/* ========================================
|
|
1516
|
+
CONSENT
|
|
1517
|
+
======================================== */
|
|
1518
|
+
.magicfeedback-consent-container {
|
|
1519
|
+
display: flex;
|
|
1520
|
+
flex-direction: row;
|
|
1521
|
+
align-items: center;
|
|
1522
|
+
gap: var(--mf-space-sm);
|
|
1523
|
+
padding: var(--mf-space-md);
|
|
1524
|
+
background-color: var(--mf-bg-secondary);
|
|
1525
|
+
border-radius: var(--mf-radius-md);
|
|
1526
|
+
margin: var(--mf-space-md) 0;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
.magicfeedback-consent-container input[type="checkbox"] {
|
|
1530
|
+
margin-top: 2px;
|
|
1531
|
+
flex-shrink: 0;
|
|
1532
|
+
accent-color: var(--mf-primary);
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
.magicfeedback-consent-container label {
|
|
1536
|
+
flex: 1;
|
|
1537
|
+
font-size: var(--mf-font-size-sm);
|
|
1538
|
+
text-align: start;
|
|
1539
|
+
color: var(--mf-text-secondary);
|
|
1540
|
+
line-height: var(--mf-line-height);
|
|
1541
|
+
cursor: pointer;
|
|
1542
|
+
margin-bottom: 0;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
/* ========================================
|
|
1546
|
+
ACTION BUTTONS
|
|
1547
|
+
======================================== */
|
|
1548
|
+
.magicfeedback-action-container {
|
|
1549
|
+
display: flex;
|
|
1550
|
+
align-items: center;
|
|
1551
|
+
justify-content: space-between;
|
|
1552
|
+
gap: var(--mf-space-md);
|
|
1553
|
+
margin-top: var(--mf-space-xl);
|
|
1554
|
+
padding-top: var(--mf-space-lg);
|
|
1555
|
+
border-top: 1px solid var(--mf-border);
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
.magicfeedback-submit {
|
|
1559
|
+
padding: 0.8rem 1.6rem;
|
|
1560
|
+
font-size: var(--mf-font-size-base);
|
|
1561
|
+
font-weight: 800;
|
|
1562
|
+
color: #FFFFFF;
|
|
1563
|
+
background-color: var(--mf-primary);
|
|
1564
|
+
border: 2px solid var(--mf-primary);
|
|
1565
|
+
border-radius: var(--mf-radius-full);
|
|
1566
|
+
cursor: pointer;
|
|
1567
|
+
transition: var(--mf-transition-fast);
|
|
1568
|
+
box-shadow: var(--mf-shadow-md);
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
.magicfeedback-submit:hover {
|
|
1572
|
+
background-color: var(--mf-primary-hover);
|
|
1573
|
+
box-shadow: var(--mf-shadow-lg);
|
|
1574
|
+
transform: translateY(-2px);
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
.magicfeedback-submit:active {
|
|
1578
|
+
transform: translateY(0);
|
|
1579
|
+
box-shadow: var(--mf-shadow-sm);
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
.magicfeedback-submit:disabled {
|
|
1583
|
+
opacity: 0.5;
|
|
1584
|
+
cursor: not-allowed;
|
|
1585
|
+
transform: none;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
.magicfeedback-back {
|
|
1589
|
+
padding: 0.65rem 1rem;
|
|
1590
|
+
font-size: var(--mf-font-size-base);
|
|
1591
|
+
font-weight: 700;
|
|
1592
|
+
color: var(--mf-primary);
|
|
1593
|
+
background-color: var(--mf-bg-secondary);
|
|
1594
|
+
border: 2px solid var(--mf-border);
|
|
1595
|
+
border-radius: var(--mf-radius-full);
|
|
1596
|
+
cursor: pointer;
|
|
1597
|
+
transition: var(--mf-transition-fast);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
.magicfeedback-back:hover {
|
|
1601
|
+
border-color: var(--mf-primary);
|
|
1602
|
+
background-color: var(--mf-bg-hover);
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
/* ========================================
|
|
1606
|
+
SKIP & COUNTER
|
|
1607
|
+
======================================== */
|
|
1608
|
+
.magicfeedback-skip-container {
|
|
1609
|
+
display: flex;
|
|
1610
|
+
align-items: center;
|
|
1611
|
+
gap: var(--mf-space-xs);
|
|
1612
|
+
padding: 0;
|
|
1613
|
+
margin: 0;
|
|
1614
|
+
font-size: var(--mf-font-size-sm);
|
|
1615
|
+
color: var(--mf-text-muted);
|
|
1616
|
+
background: transparent;
|
|
1617
|
+
border: none;
|
|
1618
|
+
cursor: pointer;
|
|
1619
|
+
transition: var(--mf-transition-fast);
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
.magicfeedback-skip-container:hover {
|
|
1623
|
+
color: var(--mf-primary);
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
.magicfeedback-skip-container input[type="checkbox"] {
|
|
1627
|
+
margin: 0;
|
|
1628
|
+
cursor: pointer;
|
|
1629
|
+
accent-color: var(--mf-primary);
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
.magicfeedback-counter {
|
|
1633
|
+
display: flex;
|
|
1634
|
+
justify-content: flex-end;
|
|
1635
|
+
margin-top: var(--mf-space-md);
|
|
1636
|
+
font-size: var(--mf-font-size-sm);
|
|
1637
|
+
color: var(--mf-text-muted);
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
/* ========================================
|
|
1641
|
+
MODAL STYLES
|
|
1642
|
+
======================================== */
|
|
1643
|
+
/* Modal backdrop */
|
|
1644
|
+
.magicfeedback-modal-backdrop {
|
|
1645
|
+
position: fixed;
|
|
1646
|
+
top: 0;
|
|
1647
|
+
left: 0;
|
|
1648
|
+
width: 100vw;
|
|
1649
|
+
height: 100vh;
|
|
1650
|
+
background: rgba(0,0,0,0.4);
|
|
1651
|
+
display: none; /* toggled to flex when open */
|
|
1652
|
+
align-items: center;
|
|
1653
|
+
justify-content: center;
|
|
1654
|
+
z-index: 9999;
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
/* Modal container */
|
|
1658
|
+
.magicfeedback-modal {
|
|
1659
|
+
background: #fff;
|
|
1660
|
+
border-radius: 8px;
|
|
1661
|
+
box-shadow: 0 8px 24px rgba(0,0,0,0.2);
|
|
1662
|
+
max-width: 520px;
|
|
1663
|
+
width: 90%;
|
|
1664
|
+
max-height: 80vh;
|
|
1665
|
+
/* Flex column so the options list scrolls while the actions footer
|
|
1666
|
+
(counter + confirm button) stays pinned and always visible. */
|
|
1667
|
+
display: flex;
|
|
1668
|
+
flex-direction: column;
|
|
1669
|
+
overflow: hidden;
|
|
1670
|
+
padding: 16px;
|
|
1671
|
+
position: relative;
|
|
1672
|
+
/* Portalled to document.body (see renderPriorityList.ts) to escape the
|
|
1673
|
+
host page's overflow/z-index \u2014 so it never inherits
|
|
1674
|
+
.magicfeedback-container's neutral text color and instead inherits
|
|
1675
|
+
whatever color the host page's own <body> happens to set. Needs its
|
|
1676
|
+
own explicit baseline rather than relying on that inheritance. */
|
|
1677
|
+
color: var(--mf-text-primary);
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
/* Modal actions */
|
|
1681
|
+
.magicfeedback-modal-actions {
|
|
1682
|
+
display: flex;
|
|
1683
|
+
justify-content: flex-end;
|
|
1684
|
+
gap: 8px;
|
|
1685
|
+
margin-top: 12px;
|
|
1686
|
+
flex-shrink: 0;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
.magicfeedback-modal-counter {
|
|
1690
|
+
margin-inline-end: auto;
|
|
1691
|
+
display: flex;
|
|
1692
|
+
align-items: center;
|
|
1693
|
+
font-size: 14px;
|
|
1694
|
+
color: var(--mf-text-secondary);
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
/* Modal list */
|
|
1698
|
+
.magicfeedback-modal-list {
|
|
1699
|
+
display: flex;
|
|
1700
|
+
flex-direction: column;
|
|
1701
|
+
gap: 8px;
|
|
1702
|
+
/* Scrollable area; footer stays fixed below it. */
|
|
1703
|
+
flex: 1 1 auto;
|
|
1704
|
+
overflow-y: auto;
|
|
1705
|
+
min-height: 0;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
.magicfeedback-modal-row {
|
|
1709
|
+
display: flex;
|
|
1710
|
+
align-items: center;
|
|
1711
|
+
gap: 10px;
|
|
1712
|
+
cursor: pointer;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
/* Priority list header */
|
|
1716
|
+
.magicfeedback-priority-list-header {
|
|
1717
|
+
display: flex;
|
|
1718
|
+
align-items: center;
|
|
1719
|
+
justify-content: space-between;
|
|
1720
|
+
gap: 12px;
|
|
1721
|
+
margin-bottom: 8px;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
.magicfeedback-priority-list-reorder {
|
|
1725
|
+
margin-top: 8px;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
.magicfeedback-priority-list-list {
|
|
1729
|
+
padding: 0;
|
|
1730
|
+
list-style: none;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
.magicfeedback-priority-list-item {
|
|
1734
|
+
display: flex;
|
|
1735
|
+
justify-content: space-between;
|
|
1736
|
+
align-items: center;
|
|
1737
|
+
margin: 5px 0;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
.magicfeedback-priority-list-item-label {
|
|
1741
|
+
font-size: 15px;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
.magicfeedback-priority-list-arrows {
|
|
1745
|
+
display: flex;
|
|
1746
|
+
align-items: center;
|
|
1747
|
+
gap: 6px;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
/* Buttons */
|
|
1751
|
+
.magicfeedback-button {
|
|
1752
|
+
appearance: none;
|
|
1753
|
+
border: 2px solid var(--mf-border);
|
|
1754
|
+
border-radius: var(--mf-radius-full);
|
|
1755
|
+
background: var(--mf-bg-secondary);
|
|
1756
|
+
color: var(--mf-text-primary);
|
|
1757
|
+
padding: 0.6rem 1rem;
|
|
1758
|
+
font-size: 14px;
|
|
1759
|
+
font-weight: 700;
|
|
1760
|
+
cursor: pointer;
|
|
1761
|
+
box-shadow: var(--mf-shadow-sm);
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
.magicfeedback-button:hover {
|
|
1765
|
+
background: var(--mf-bg-hover);
|
|
1766
|
+
border-color: var(--mf-primary);
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
.magicfeedback-button:active {
|
|
1770
|
+
transform: translateY(1px);
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
.magicfeedback-button-primary {
|
|
1774
|
+
border-color: var(--mf-primary);
|
|
1775
|
+
background: var(--mf-primary);
|
|
1776
|
+
color: #fff;
|
|
1777
|
+
box-shadow: var(--mf-shadow-md);
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
.magicfeedback-button-primary:hover {
|
|
1781
|
+
background: var(--mf-primary-hover);
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
.magicfeedback-button-primary:active {
|
|
1785
|
+
background: var(--mf-primary-hover);
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
/* Warning flash */
|
|
1789
|
+
.magicfeedback-warning {
|
|
1790
|
+
color: #C70039;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
/* Start message button */
|
|
1794
|
+
.magicfeedback-start-message-button {
|
|
1795
|
+
appearance: none;
|
|
1796
|
+
border: 2px solid var(--mf-primary);
|
|
1797
|
+
border-radius: var(--mf-radius-full);
|
|
1798
|
+
background: var(--mf-primary);
|
|
1799
|
+
color: #fff;
|
|
1800
|
+
padding: 0.8rem 1.4rem;
|
|
1801
|
+
font-size: 15px;
|
|
1802
|
+
font-weight: 800;
|
|
1803
|
+
cursor: pointer;
|
|
1804
|
+
box-shadow: var(--mf-shadow-md);
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
.magicfeedback-start-message-button:hover {
|
|
1808
|
+
background: var(--mf-primary-hover);
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
/* ========================================
|
|
1812
|
+
RESPONSIVE DESIGN
|
|
1813
|
+
======================================== */
|
|
1814
|
+
@media (max-width: 768px) {
|
|
1815
|
+
:root {
|
|
1816
|
+
--mf-space-lg: 1.25rem;
|
|
1817
|
+
--mf-space-xl: 1.5rem;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
.magicfeedback-container {
|
|
1821
|
+
padding: 12px;
|
|
1822
|
+
border-radius: var(--mf-radius-md);
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
.magicfeedback-form {
|
|
1826
|
+
padding: 14px;
|
|
1827
|
+
border-radius: var(--mf-radius-md);
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
.magicfeedback-div {
|
|
1831
|
+
padding: 12px;
|
|
1832
|
+
gap: var(--mf-space-lg)
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.magicfeedback-label {
|
|
1836
|
+
font-size: var(--mf-font-size-base);
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
.deepdots-popup input[type="date"],
|
|
1840
|
+
.deepdots-popup input[type="text"],
|
|
1841
|
+
.deepdots-popup input[type="number"],
|
|
1842
|
+
.deepdots-popup input[type="email"],
|
|
1843
|
+
.deepdots-popup input[type="password"],
|
|
1844
|
+
.deepdots-popup textarea,
|
|
1845
|
+
.deepdots-popup select {
|
|
1846
|
+
padding: 0.85rem 0.95rem;
|
|
1847
|
+
font-size: 1rem;
|
|
1848
|
+
min-height: 46px;
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
/*
|
|
1852
|
+
.magicfeedback-radio-container,
|
|
1853
|
+
.magicfeedback-checkbox-container,
|
|
1854
|
+
.magicfeedback-boolean-container,
|
|
1855
|
+
.magicfeedback-consent-container {
|
|
1856
|
+
width: 100%;
|
|
1857
|
+
}
|
|
1858
|
+
*/
|
|
1859
|
+
|
|
1860
|
+
.magicfeedback-radio-container,
|
|
1861
|
+
.magicfeedback-checkbox-container {
|
|
1862
|
+
padding: 10px 12px;
|
|
1863
|
+
border-radius: var(--mf-radius-md);
|
|
1864
|
+
border: 1px solid var(--mf-border);
|
|
1865
|
+
gap: 10px;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
.magicfeedback-rating-container,
|
|
1869
|
+
.magicfeedback-rating-number-container,
|
|
1870
|
+
.magicfeedback-rating-star-container {
|
|
1871
|
+
gap: 10px;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
.magicfeedback-boolean-container {
|
|
1875
|
+
flex-direction: column;
|
|
1876
|
+
gap: 10px;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1879
|
+
.magicfeedback-rating-number-container-row,
|
|
1880
|
+
.magicfeedback-rating-number-container-row-reverse {
|
|
1881
|
+
gap: 6px;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-value,
|
|
1885
|
+
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-value {
|
|
1886
|
+
min-height: 44px;
|
|
1887
|
+
padding: var(--mf-space-xs);
|
|
1888
|
+
font-size: 0.9rem;
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
.magicfeedback-action-container {
|
|
1892
|
+
flex-direction: column-reverse;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
.magicfeedback-submit,
|
|
1896
|
+
.magicfeedback-back {
|
|
1897
|
+
width: 100%;
|
|
1898
|
+
text-align: center;
|
|
1899
|
+
min-height: 48px;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
/* ========================================
|
|
1904
|
+
ACCESSIBILITY
|
|
1905
|
+
======================================== */
|
|
1906
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1907
|
+
*,
|
|
1908
|
+
*::before,
|
|
1909
|
+
*::after {
|
|
1910
|
+
animation-duration: 0.01ms !important;
|
|
1911
|
+
animation-iteration-count: 1 !important;
|
|
1912
|
+
transition-duration: 0.01ms !important;
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
/* ========================================
|
|
1918
|
+
UTILITY CLASSES
|
|
1919
|
+
======================================== */
|
|
1920
|
+
.magicfeedback-visually-hidden {
|
|
1921
|
+
position: absolute;
|
|
1922
|
+
width: 1px;
|
|
1923
|
+
height: 1px;
|
|
1924
|
+
padding: 0;
|
|
1925
|
+
margin: -1px;
|
|
1926
|
+
overflow: hidden;
|
|
1927
|
+
clip: rect(0, 0, 0, 0);
|
|
1928
|
+
white-space: nowrap;
|
|
1929
|
+
border-width: 0;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
.magicfeedback-modal-close {
|
|
1933
|
+
position: absolute;
|
|
1934
|
+
top: 8px;
|
|
1935
|
+
inset-inline-end: 8px;
|
|
1936
|
+
background: transparent;
|
|
1937
|
+
border: none;
|
|
1938
|
+
font-size: 20px;
|
|
1939
|
+
line-height: 1;
|
|
1940
|
+
cursor: pointer;
|
|
1941
|
+
color: #666;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
.magicfeedback-modal-close:hover,
|
|
1945
|
+
.magicfeedback-modal-close:focus {
|
|
1946
|
+
color: #000;
|
|
1947
|
+
outline: none;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
/* ========================================
|
|
1951
|
+
FILE / IMAGE UPLOAD
|
|
1952
|
+
======================================== */
|
|
1953
|
+
.magicfeedback-upload {
|
|
1954
|
+
display: flex;
|
|
1955
|
+
flex-direction: column;
|
|
1956
|
+
gap: var(--mf-space-md);
|
|
1957
|
+
width: 100%;
|
|
1958
|
+
margin: 10px 0;
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
/* The native input is an invisible, focusable overlay covering the dropzone. */
|
|
1962
|
+
.magicfeedback-upload-native {
|
|
1963
|
+
position: absolute;
|
|
1964
|
+
inset: 0;
|
|
1965
|
+
width: 100%;
|
|
1966
|
+
height: 100%;
|
|
1967
|
+
margin: 0;
|
|
1968
|
+
padding: 0;
|
|
1969
|
+
opacity: 0;
|
|
1970
|
+
cursor: pointer;
|
|
1971
|
+
z-index: 2;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
.magicfeedback-upload-dropzone {
|
|
1975
|
+
position: relative;
|
|
1976
|
+
display: flex;
|
|
1977
|
+
flex-direction: column;
|
|
1978
|
+
align-items: center;
|
|
1979
|
+
justify-content: center;
|
|
1980
|
+
gap: var(--mf-space-sm);
|
|
1981
|
+
box-sizing: border-box;
|
|
1982
|
+
width: 100%;
|
|
1983
|
+
min-height: 150px;
|
|
1984
|
+
padding: var(--mf-space-xl);
|
|
1985
|
+
text-align: center;
|
|
1986
|
+
border: 2px dashed var(--mf-border);
|
|
1987
|
+
border-radius: var(--mf-radius-md);
|
|
1988
|
+
background-color: var(--mf-surface-alt);
|
|
1989
|
+
cursor: pointer;
|
|
1990
|
+
transition: var(--mf-transition);
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
.magicfeedback-upload-dropzone:hover {
|
|
1994
|
+
border-color: var(--mf-primary);
|
|
1995
|
+
background-color: var(--mf-bg-hover);
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
.magicfeedback-upload-dropzone:focus-within {
|
|
1999
|
+
border-color: var(--mf-primary);
|
|
2000
|
+
box-shadow: var(--mf-shadow-focus);
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
.magicfeedback-upload-dropzone.is-dragover {
|
|
2004
|
+
border-color: var(--mf-primary);
|
|
2005
|
+
border-style: solid;
|
|
2006
|
+
background-color: var(--mf-primary-light);
|
|
2007
|
+
box-shadow: var(--mf-shadow-focus);
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
.magicfeedback-upload-icon {
|
|
2011
|
+
display: inline-flex;
|
|
2012
|
+
align-items: center;
|
|
2013
|
+
justify-content: center;
|
|
2014
|
+
width: 46px;
|
|
2015
|
+
height: 46px;
|
|
2016
|
+
color: var(--mf-primary);
|
|
2017
|
+
background-color: var(--mf-surface);
|
|
2018
|
+
border-radius: var(--mf-radius-full);
|
|
2019
|
+
box-shadow: var(--mf-shadow-sm);
|
|
2020
|
+
pointer-events: none;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
.magicfeedback-upload-icon svg {
|
|
2024
|
+
width: 24px;
|
|
2025
|
+
height: 24px;
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
.magicfeedback-upload-cta {
|
|
2029
|
+
font-family: inherit;
|
|
2030
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
2031
|
+
font-size: var(--mf-font-size-base);
|
|
2032
|
+
color: var(--mf-text-primary);
|
|
2033
|
+
pointer-events: none;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
.magicfeedback-upload-hint {
|
|
2037
|
+
font-family: inherit;
|
|
2038
|
+
font-size: var(--mf-font-size-sm);
|
|
2039
|
+
color: var(--mf-text-muted);
|
|
2040
|
+
pointer-events: none;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
.magicfeedback-upload-list {
|
|
2044
|
+
display: flex;
|
|
2045
|
+
flex-direction: column;
|
|
2046
|
+
gap: var(--mf-space-sm);
|
|
2047
|
+
width: 100%;
|
|
2048
|
+
margin: 0;
|
|
2049
|
+
padding: 0;
|
|
2050
|
+
list-style: none;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
.magicfeedback-upload-list:empty {
|
|
2054
|
+
display: none;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
.magicfeedback-upload-file-item {
|
|
2058
|
+
display: flex;
|
|
2059
|
+
align-items: center;
|
|
2060
|
+
gap: var(--mf-space-md);
|
|
2061
|
+
padding: var(--mf-space-sm) var(--mf-space-md);
|
|
2062
|
+
background-color: var(--mf-surface);
|
|
2063
|
+
border: 1px solid var(--mf-border);
|
|
2064
|
+
border-radius: var(--mf-radius-sm);
|
|
2065
|
+
box-shadow: var(--mf-shadow-sm);
|
|
2066
|
+
animation: mf-scale-in 0.2s ease-out;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
.magicfeedback-upload-thumb {
|
|
2070
|
+
flex: 0 0 auto;
|
|
2071
|
+
display: inline-flex;
|
|
2072
|
+
align-items: center;
|
|
2073
|
+
justify-content: center;
|
|
2074
|
+
width: 40px;
|
|
2075
|
+
height: 40px;
|
|
2076
|
+
overflow: hidden;
|
|
2077
|
+
color: var(--mf-text-secondary);
|
|
2078
|
+
background-color: var(--mf-surface-alt);
|
|
2079
|
+
border-radius: var(--mf-radius-sm);
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
.magicfeedback-upload-thumb img {
|
|
2083
|
+
width: 100%;
|
|
2084
|
+
height: 100%;
|
|
2085
|
+
object-fit: cover;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
.magicfeedback-upload-thumb svg {
|
|
2089
|
+
width: 20px;
|
|
2090
|
+
height: 20px;
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
.magicfeedback-upload-file-info {
|
|
2094
|
+
display: flex;
|
|
2095
|
+
flex-direction: column;
|
|
2096
|
+
flex: 1 1 auto;
|
|
2097
|
+
min-width: 0;
|
|
2098
|
+
text-align: start;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
.magicfeedback-upload-file-name {
|
|
2102
|
+
font-family: inherit;
|
|
2103
|
+
font-size: var(--mf-font-size-sm);
|
|
2104
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
2105
|
+
color: var(--mf-text-primary);
|
|
2106
|
+
white-space: nowrap;
|
|
2107
|
+
overflow: hidden;
|
|
2108
|
+
text-overflow: ellipsis;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
.magicfeedback-upload-file-size {
|
|
2112
|
+
font-family: inherit;
|
|
2113
|
+
font-size: 0.75rem;
|
|
2114
|
+
color: var(--mf-text-muted);
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
.magicfeedback-upload-remove {
|
|
2118
|
+
flex: 0 0 auto;
|
|
2119
|
+
display: inline-flex;
|
|
2120
|
+
align-items: center;
|
|
2121
|
+
justify-content: center;
|
|
2122
|
+
width: 30px;
|
|
2123
|
+
height: 30px;
|
|
2124
|
+
padding: 0;
|
|
2125
|
+
color: var(--mf-text-muted);
|
|
2126
|
+
background-color: transparent;
|
|
2127
|
+
border: none;
|
|
2128
|
+
border-radius: var(--mf-radius-full);
|
|
2129
|
+
cursor: pointer;
|
|
2130
|
+
transition: var(--mf-transition-fast);
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
.magicfeedback-upload-remove:hover,
|
|
2134
|
+
.magicfeedback-upload-remove:focus-visible {
|
|
2135
|
+
color: var(--mf-error);
|
|
2136
|
+
background-color: var(--mf-primary-light);
|
|
2137
|
+
outline: none;
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
.magicfeedback-upload-remove svg {
|
|
2141
|
+
width: 16px;
|
|
2142
|
+
height: 16px;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
.magicfeedback-upload-error {
|
|
2146
|
+
display: none;
|
|
2147
|
+
font-family: inherit;
|
|
2148
|
+
font-size: var(--mf-font-size-sm);
|
|
2149
|
+
color: var(--mf-error);
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
.magicfeedback-upload-error.is-visible {
|
|
2153
|
+
display: block;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
/* ========================================
|
|
2157
|
+
RTL (Arabic)
|
|
2158
|
+
========================================
|
|
2159
|
+
The SDK stamps dir="rtl" (and .magicfeedback-rtl) on the survey container
|
|
2160
|
+
for right-to-left languages. Everything else in this stylesheet uses logical
|
|
2161
|
+
properties (text-align: start, padding-inline-*, inset-inline-*), so it
|
|
2162
|
+
mirrors on its own; only the handful of rules that cannot be expressed
|
|
2163
|
+
logically live here.
|
|
2164
|
+
|
|
2165
|
+
Rules are scoped to [dir="rtl"] inside our own subtree so a host page that is
|
|
2166
|
+
itself RTL, or one that embeds an Arabic survey in an LTR page, both render
|
|
2167
|
+
correctly. */
|
|
2168
|
+
|
|
2169
|
+
/* background-position has no logical form: move the select caret to the
|
|
2170
|
+
left edge, opposite the padding that inset-inline-end already mirrored. */
|
|
2171
|
+
[dir="rtl"] select {
|
|
2172
|
+
background-position: left var(--mf-space-md) center;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
/* Emails, URLs, numbers, dates and phone numbers are latin/numeric content
|
|
2176
|
+
even in an Arabic survey: keep their own direction LTR so punctuation
|
|
2177
|
+
(@, ., +, /) lands where the user expects, but align them to the start of
|
|
2178
|
+
the RTL line so they still read as part of the form. */
|
|
2179
|
+
[dir="rtl"] input[type="email"],
|
|
2180
|
+
[dir="rtl"] input[type="url"],
|
|
2181
|
+
[dir="rtl"] input[type="number"],
|
|
2182
|
+
[dir="rtl"] input[type="tel"],
|
|
2183
|
+
[dir="rtl"] input[type="date"],
|
|
2184
|
+
[dir="rtl"] input[type="time"] {
|
|
2185
|
+
direction: ltr;
|
|
2186
|
+
text-align: right;
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
/* Mirror of mf-slide-in: questions enter from the reading edge. */
|
|
2190
|
+
@keyframes mf-slide-in-rtl {
|
|
2191
|
+
from {
|
|
2192
|
+
opacity: 0;
|
|
2193
|
+
transform: translateX(16px);
|
|
2194
|
+
}
|
|
2195
|
+
to {
|
|
2196
|
+
opacity: 1;
|
|
2197
|
+
transform: translateX(0);
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
[dir="rtl"] .magicfeedback-div {
|
|
2202
|
+
animation-name: mf-slide-in-rtl;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
/* ========================================
|
|
2206
|
+
LOCAL \u2014 reglas del popup, no vienen del paquete
|
|
2207
|
+
======================================== */
|
|
2208
|
+
|
|
2209
|
+
/* Los controles de formulario no heredan font-family: cuando el popup trae fuente propia
|
|
2210
|
+
(clase deepdots-has-font), se les fuerza la del contenedor. */
|
|
2211
|
+
.deepdots-popup.deepdots-has-font button,
|
|
2212
|
+
.deepdots-popup.deepdots-has-font input,
|
|
2213
|
+
.deepdots-popup.deepdots-has-font textarea,
|
|
2214
|
+
.deepdots-popup.deepdots-has-font select {
|
|
2215
|
+
font-family: var(--deepdots-font, inherit);
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
/* WebKit s\xED aplica el padding al radio nativo: con padding el control se dibuja enorme (se vio
|
|
2219
|
+
en iOS, WebView de RN y Safari, no en Chrome). El paquete ya no lo pone, pero la regla es
|
|
2220
|
+
barata y evita que vuelva. */
|
|
2221
|
+
.deepdots-popup input[type="radio"] {
|
|
2222
|
+
padding: 0;
|
|
2223
|
+
}
|
|
2224
|
+
`;
|
|
2225
|
+
|
|
2226
|
+
// src/util/logger.ts
|
|
2227
|
+
var active = console;
|
|
2228
|
+
function setLogger(logger) {
|
|
2229
|
+
active = logger ?? console;
|
|
2230
|
+
}
|
|
2231
|
+
function sdkLog(...args) {
|
|
2232
|
+
active.log(...args);
|
|
2233
|
+
}
|
|
2234
|
+
function sdkWarn(...args) {
|
|
2235
|
+
(active.warn ?? active.log)(...args);
|
|
2236
|
+
}
|
|
2237
|
+
function sdkError(...args) {
|
|
2238
|
+
(active.error ?? active.log)(...args);
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
export {
|
|
2242
|
+
__require,
|
|
2243
|
+
createDefaultStorage,
|
|
2244
|
+
STORAGE_KEYS,
|
|
2245
|
+
buildSurveyIdentity,
|
|
2246
|
+
TrackingManager,
|
|
2247
|
+
buildFontFamilyValue,
|
|
2248
|
+
buildFontFaceCss,
|
|
2249
|
+
LABELS,
|
|
2250
|
+
RTL_LOCALES,
|
|
2251
|
+
directionFor,
|
|
2252
|
+
getLabels,
|
|
2253
|
+
resolveActionLabels,
|
|
2254
|
+
RESOLVE_LOCALE_JS,
|
|
2255
|
+
style_default,
|
|
2256
|
+
setLogger,
|
|
2257
|
+
sdkLog,
|
|
2258
|
+
sdkWarn,
|
|
2259
|
+
sdkError
|
|
2260
|
+
};
|
|
2261
|
+
//# sourceMappingURL=chunk-WNIUIOKF.mjs.map
|