{"_id":"@dloizides/legal-ui","name":"@dloizides/legal-ui","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@dloizides/legal-ui","version":"1.0.1","description":"GDPR cookie-consent banner + privacy/terms modals (RN-web) for the dloizides.com portfolio. Shares the @dloizides/ui-feedback UI context and @dloizides/ui-icons.","keywords":["react","react-native","react-native-web","gdpr","cookie-consent","privacy","legal","dloizides"],"author":{"name":"dloizides"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/openmindednewby/legal-ui.git"},"homepage":"https://github.com/openmindednewby/legal-ui#readme","bugs":{"url":"https://github.com/openmindednewby/legal-ui/issues"},"main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"react-native":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"browser":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"import":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"default":{"types":"./dist/index.d.ts","default":"./dist/index.js"}}},"sideEffects":false,"engines":{"node":">=18.0.0"},"scripts":{"build":"rimraf dist && tsup","build:watch":"tsup --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","lint":"eslint src --ext .ts,.tsx","lint:fix":"eslint src --ext .ts,.tsx --fix","typecheck":"tsc --noEmit","clean":"rimraf dist","security:audit":"npm audit --audit-level=high","deps:outdated":"npm outdated || exit 0","deps:unused":"npx depcheck --ignores \"@types/jest,@types/node,@types/react,@types/react-dom,rimraf,react-native,react-native-web,react-native-svg\"","deps:licenses":"npx license-checker --onlyAllow \"MIT;Apache-2.0;ISC;BSD-2-Clause;BSD-3-Clause;0BSD;Unlicense;CC0-1.0\"","deps:health":"npm run deps:outdated && npm run deps:unused","prepublishOnly":"npm run clean && npm run build && npm run test","version":"npm run build"},"peerDependencies":{"@dloizides/ui-feedback":">=1.1.0","@dloizides/ui-icons":">=1.0.1","react":">=18.0.0","react-native":">=0.74.0","react-native-svg":">=13.0.0"},"devDependencies":{"@dloizides/ui-feedback":"^1.1.0","@dloizides/ui-icons":"^1.0.1","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.6.3","@testing-library/react":"^16.1.0","@types/jest":"^29.5.0","@types/node":"^20.19.32","@types/react":"^19.0.0","@types/react-dom":"^19.0.0","@typescript-eslint/eslint-plugin":"^7.0.0","@typescript-eslint/parser":"^7.0.0","eslint":"^8.57.0","eslint-plugin-react":"^7.34.0","eslint-plugin-react-hooks":"^4.6.0","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","react":"^19.2.4","react-dom":"^19.2.4","react-native":"0.81.5","react-native-svg":"15.12.1","react-native-web":"^0.21.0","rimraf":"^5.0.0","ts-jest":"^29.1.0","tsup":"^8.0.0","typescript":"^5.4.0"},"_id":"@dloizides/legal-ui@1.0.1","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-xc5rFNPTlgQlr15wp3Rn6anMOnybGg3bIWOURQ96gED1Jia2h2CBUwSR81j7UekuOF0wWWjQWGc+BE3Hz/jT9A==","shasum":"12a239e9d4f4751cea875a54a1f87b97337719f3","tarball":"https://registry.npmjs.org/@dloizides/legal-ui/-/legal-ui-1.0.1.tgz","fileCount":10,"unpackedSize":140730,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIE999mp+3zx2SwFMegmUFBkiP4WxMbGmVTT86yt352ChAiArqcKDB4O7vgGXCVwkVxNVSAZIhBdDu9tJcJWk/pUybA=="}]},"_npmUser":{"name":"dloizides","email":"loizidesdemetris@gmail.com"},"directories":{},"maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/legal-ui_1.0.1_1781600130043_0.1708213919025885"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-16T08:55:29.918Z","1.0.1":"2026-06-16T08:55:30.182Z","modified":"2026-06-16T08:55:30.340Z"},"maintainers":[{"name":"dloizides","email":"loizidesdemetris@gmail.com"}],"description":"GDPR cookie-consent banner + privacy/terms modals (RN-web) for the dloizides.com portfolio. Shares the @dloizides/ui-feedback UI context and @dloizides/ui-icons.","homepage":"https://github.com/openmindednewby/legal-ui#readme","keywords":["react","react-native","react-native-web","gdpr","cookie-consent","privacy","legal","dloizides"],"repository":{"type":"git","url":"git+https://github.com/openmindednewby/legal-ui.git"},"author":{"name":"dloizides"},"bugs":{"url":"https://github.com/openmindednewby/legal-ui/issues"},"license":"MIT","readme":"# @dloizides/legal-ui\n\nGDPR **cookie-consent banner** + **privacy/terms modals** (RN-web) for the dloizides.com portfolio.\nReads theme + translations from the shared `@dloizides/ui-feedback` context (`useUi`) and icons from\n`@dloizides/ui-icons`.\n\n## Components\n\n| Export | Purpose |\n|--------|---------|\n| `CookieConsentBanner` | Bottom-of-screen GDPR banner: accept all / reject all / customise; persists in localStorage. |\n| `useCookieConsent` | Hook: `{ consent, showBanner, acceptAll, rejectAll, savePreferences }`. |\n| `PrivacyPolicyModal` / `TermsOfServiceModal` | Full-screen legal modals built from translated sections. |\n| `LegalSection` | Title + body block used inside the modals. |\n| `ConsentButton` | The banner's button primitive. |\n| `LEGAL_TEST_IDS`, `COOKIE_CONSENT_STORAGE_KEY`, `CONSENT_VERSION`, `CookieConsent` | constants/types. |\n\n`LegalPage` (the full standalone legal screen) is intentionally NOT here — it couples to app-specific\nlanding layout + SEO; extract when shared.\n\n## Install\n\n```bash\nnpm install @dloizides/legal-ui @dloizides/ui-feedback @dloizides/ui-icons react-native-svg\n```\n\n## Usage\n\nMount a `FeedbackUiProvider` / `UiProvider` (from `@dloizides/ui-feedback`) at the app root, then render\nthe banner once:\n\n```tsx\nimport { CookieConsentBanner } from '@dloizides/legal-ui';\n\n<CookieConsentBanner />\n```\n\nThe components call the injected `t(key)` with `cookieConsent.*`, `legal.privacyPolicy.*`,\n`legal.termsOfService.*` and `common.close*` keys — provide them in your locale files.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-2d070965fcd7ba7a3af933322ad3a347"}