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 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.jsx)(
384
- import_Box.default,
385
- {
386
- sx: {
387
- position: "fixed",
388
- top: 0,
389
- left: 0,
390
- right: 0,
391
- bottom: 0,
392
- backgroundColor: "rgba(0, 0, 0, 0.5)",
393
- display: "flex",
394
- alignItems: "center",
395
- justifyContent: "center",
396
- zIndex: 1300,
397
- // Above MUI Modal
398
- p: 2
399
- },
400
- children: bannerContent
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__ */ jsx2(
340
- Box,
341
- {
342
- sx: {
343
- position: "fixed",
344
- top: 0,
345
- left: 0,
346
- right: 0,
347
- bottom: 0,
348
- backgroundColor: "rgba(0, 0, 0, 0.5)",
349
- display: "flex",
350
- alignItems: "center",
351
- justifyContent: "center",
352
- zIndex: 1300,
353
- // Above MUI Modal
354
- p: 2
355
- },
356
- children: bannerContent
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(Fragment, { children: props.children });
459
+ return /* @__PURE__ */ jsx4(Fragment2, { children: props.children });
447
460
  }
448
461
 
449
462
  // src/utils/scriptLoader.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-lgpd-consent",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Biblioteca de consentimento de cookies (LGPD) para React e Next.js, com contexto, banner e modal personalizáveis usando MUI.",
5
5
  "keywords": [
6
6
  "lgpd",