react-lgpd-consent 0.1.4 → 0.1.5
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/dist/index.cjs +33 -20
- package/dist/index.js +36 -23
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -281,6 +281,7 @@ function ConsentProvider({
|
|
|
281
281
|
return {
|
|
282
282
|
consented: !!state.consented,
|
|
283
283
|
preferences: state.preferences,
|
|
284
|
+
isModalOpen: state.isModalOpen,
|
|
284
285
|
acceptAll,
|
|
285
286
|
rejectAll,
|
|
286
287
|
setPreference,
|
|
@@ -380,26 +381,38 @@ function CookieBanner({
|
|
|
380
381
|
}
|
|
381
382
|
);
|
|
382
383
|
if (blocking) {
|
|
383
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
385
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
386
|
+
import_Box.default,
|
|
387
|
+
{
|
|
388
|
+
sx: {
|
|
389
|
+
position: "fixed",
|
|
390
|
+
top: 0,
|
|
391
|
+
left: 0,
|
|
392
|
+
right: 0,
|
|
393
|
+
bottom: 0,
|
|
394
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
395
|
+
zIndex: 1299
|
|
396
|
+
// Abaixo do banner mas acima do conteúdo
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
),
|
|
400
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
401
|
+
import_Box.default,
|
|
402
|
+
{
|
|
403
|
+
sx: {
|
|
404
|
+
position: "fixed",
|
|
405
|
+
bottom: 0,
|
|
406
|
+
left: 0,
|
|
407
|
+
right: 0,
|
|
408
|
+
zIndex: 1300,
|
|
409
|
+
// Acima do overlay
|
|
410
|
+
p: 2
|
|
411
|
+
},
|
|
412
|
+
children: bannerContent
|
|
413
|
+
}
|
|
414
|
+
)
|
|
415
|
+
] });
|
|
403
416
|
}
|
|
404
417
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
405
418
|
import_Snackbar.default,
|
package/dist/index.js
CHANGED
|
@@ -237,6 +237,7 @@ function ConsentProvider({
|
|
|
237
237
|
return {
|
|
238
238
|
consented: !!state.consented,
|
|
239
239
|
preferences: state.preferences,
|
|
240
|
+
isModalOpen: state.isModalOpen,
|
|
240
241
|
acceptAll,
|
|
241
242
|
rejectAll,
|
|
242
243
|
setPreference,
|
|
@@ -285,7 +286,7 @@ function useConsentTexts() {
|
|
|
285
286
|
}
|
|
286
287
|
|
|
287
288
|
// src/components/CookieBanner.tsx
|
|
288
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
289
|
+
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
289
290
|
function CookieBanner({
|
|
290
291
|
policyLinkUrl,
|
|
291
292
|
debug,
|
|
@@ -336,26 +337,38 @@ function CookieBanner({
|
|
|
336
337
|
}
|
|
337
338
|
);
|
|
338
339
|
if (blocking) {
|
|
339
|
-
return /* @__PURE__ */
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
340
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
341
|
+
/* @__PURE__ */ jsx2(
|
|
342
|
+
Box,
|
|
343
|
+
{
|
|
344
|
+
sx: {
|
|
345
|
+
position: "fixed",
|
|
346
|
+
top: 0,
|
|
347
|
+
left: 0,
|
|
348
|
+
right: 0,
|
|
349
|
+
bottom: 0,
|
|
350
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
351
|
+
zIndex: 1299
|
|
352
|
+
// Abaixo do banner mas acima do conteúdo
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
),
|
|
356
|
+
/* @__PURE__ */ jsx2(
|
|
357
|
+
Box,
|
|
358
|
+
{
|
|
359
|
+
sx: {
|
|
360
|
+
position: "fixed",
|
|
361
|
+
bottom: 0,
|
|
362
|
+
left: 0,
|
|
363
|
+
right: 0,
|
|
364
|
+
zIndex: 1300,
|
|
365
|
+
// Acima do overlay
|
|
366
|
+
p: 2
|
|
367
|
+
},
|
|
368
|
+
children: bannerContent
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
] });
|
|
359
372
|
}
|
|
360
373
|
return /* @__PURE__ */ jsx2(
|
|
361
374
|
Snackbar,
|
|
@@ -439,11 +452,11 @@ function PreferencesModal({
|
|
|
439
452
|
}
|
|
440
453
|
|
|
441
454
|
// src/utils/ConsentGate.tsx
|
|
442
|
-
import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
|
|
455
|
+
import { Fragment as Fragment2, jsx as jsx4 } from "react/jsx-runtime";
|
|
443
456
|
function ConsentGate(props) {
|
|
444
457
|
const { preferences } = useConsent();
|
|
445
458
|
if (!preferences[props.category]) return null;
|
|
446
|
-
return /* @__PURE__ */ jsx4(
|
|
459
|
+
return /* @__PURE__ */ jsx4(Fragment2, { children: props.children });
|
|
447
460
|
}
|
|
448
461
|
|
|
449
462
|
// src/utils/scriptLoader.ts
|
package/package.json
CHANGED