@tantainnovative/ndpr-toolkit 1.0.5 → 1.0.6

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.
Files changed (159) hide show
  1. package/README.md +447 -84
  2. package/dist/index.esm.js +2 -0
  3. package/dist/index.esm.js.map +1 -0
  4. package/dist/index.js +2 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/types/index.d.ts +35 -0
  7. package/package.json +52 -70
  8. package/CHANGELOG.md +0 -16
  9. package/CNAME +0 -1
  10. package/CONTRIBUTING.md +0 -87
  11. package/RELEASE-NOTES-v1.0.0.md +0 -140
  12. package/RELEASE-NOTES-v1.0.1.md +0 -69
  13. package/SECURITY.md +0 -21
  14. package/components.json +0 -21
  15. package/eslint.config.mjs +0 -16
  16. package/next-env.d.ts +0 -5
  17. package/next.config.js +0 -15
  18. package/next.config.ts +0 -62
  19. package/packages/ndpr-toolkit/README.md +0 -467
  20. package/packages/ndpr-toolkit/dist/index.esm.js +0 -2
  21. package/packages/ndpr-toolkit/dist/index.esm.js.map +0 -1
  22. package/packages/ndpr-toolkit/dist/index.js +0 -2
  23. package/packages/ndpr-toolkit/dist/index.js.map +0 -1
  24. package/packages/ndpr-toolkit/package-lock.json +0 -8197
  25. package/packages/ndpr-toolkit/package.json +0 -71
  26. package/packages/ndpr-toolkit/rollup.config.js +0 -34
  27. package/packages/ndpr-toolkit/src/components/breach/BreachNotificationManager.tsx +0 -701
  28. package/packages/ndpr-toolkit/src/components/breach/BreachReportForm.tsx +0 -631
  29. package/packages/ndpr-toolkit/src/components/breach/BreachRiskAssessment.tsx +0 -569
  30. package/packages/ndpr-toolkit/src/components/breach/RegulatoryReportGenerator.tsx +0 -496
  31. package/packages/ndpr-toolkit/src/components/consent/ConsentBanner.tsx +0 -270
  32. package/packages/ndpr-toolkit/src/components/consent/ConsentManager.tsx +0 -217
  33. package/packages/ndpr-toolkit/src/components/consent/ConsentStorage.tsx +0 -206
  34. package/packages/ndpr-toolkit/src/components/dpia/DPIAQuestionnaire.tsx +0 -342
  35. package/packages/ndpr-toolkit/src/components/dpia/DPIAReport.tsx +0 -373
  36. package/packages/ndpr-toolkit/src/components/dpia/StepIndicator.tsx +0 -174
  37. package/packages/ndpr-toolkit/src/components/dsr/DSRDashboard.tsx +0 -717
  38. package/packages/ndpr-toolkit/src/components/dsr/DSRRequestForm.tsx +0 -476
  39. package/packages/ndpr-toolkit/src/components/dsr/DSRTracker.tsx +0 -620
  40. package/packages/ndpr-toolkit/src/components/policy/PolicyExporter.tsx +0 -541
  41. package/packages/ndpr-toolkit/src/components/policy/PolicyGenerator.tsx +0 -454
  42. package/packages/ndpr-toolkit/src/components/policy/PolicyPreview.tsx +0 -333
  43. package/packages/ndpr-toolkit/src/hooks/useBreach.ts +0 -409
  44. package/packages/ndpr-toolkit/src/hooks/useConsent.ts +0 -263
  45. package/packages/ndpr-toolkit/src/hooks/useDPIA.ts +0 -457
  46. package/packages/ndpr-toolkit/src/hooks/useDSR.ts +0 -236
  47. package/packages/ndpr-toolkit/src/hooks/usePrivacyPolicy.ts +0 -428
  48. package/packages/ndpr-toolkit/src/index.ts +0 -44
  49. package/packages/ndpr-toolkit/src/setupTests.ts +0 -5
  50. package/packages/ndpr-toolkit/src/types/breach.ts +0 -283
  51. package/packages/ndpr-toolkit/src/types/consent.ts +0 -111
  52. package/packages/ndpr-toolkit/src/types/dpia.ts +0 -236
  53. package/packages/ndpr-toolkit/src/types/dsr.ts +0 -192
  54. package/packages/ndpr-toolkit/src/types/index.ts +0 -42
  55. package/packages/ndpr-toolkit/src/types/privacy.ts +0 -246
  56. package/packages/ndpr-toolkit/src/utils/breach.ts +0 -122
  57. package/packages/ndpr-toolkit/src/utils/consent.ts +0 -51
  58. package/packages/ndpr-toolkit/src/utils/dpia.ts +0 -104
  59. package/packages/ndpr-toolkit/src/utils/dsr.ts +0 -77
  60. package/packages/ndpr-toolkit/src/utils/privacy.ts +0 -100
  61. package/packages/ndpr-toolkit/tsconfig.json +0 -23
  62. package/postcss.config.mjs +0 -5
  63. package/public/NDPR TOOLKIT.svg +0 -1
  64. package/public/favicon/android-chrome-192x192.png +0 -0
  65. package/public/favicon/android-chrome-512x512.png +0 -0
  66. package/public/favicon/apple-touch-icon.png +0 -0
  67. package/public/favicon/favicon-16x16.png +0 -0
  68. package/public/favicon/favicon-32x32.png +0 -0
  69. package/public/favicon/site.webmanifest +0 -1
  70. package/public/file.svg +0 -1
  71. package/public/globe.svg +0 -1
  72. package/public/ndpr-toolkit-logo.svg +0 -108
  73. package/public/next.svg +0 -1
  74. package/public/vercel.svg +0 -1
  75. package/public/window.svg +0 -1
  76. package/src/app/accessibility.css +0 -70
  77. package/src/app/favicon.ico +0 -0
  78. package/src/app/globals.css +0 -123
  79. package/src/app/layout.tsx +0 -37
  80. package/src/app/ndpr-demos/breach/page.tsx +0 -354
  81. package/src/app/ndpr-demos/consent/page.tsx +0 -366
  82. package/src/app/ndpr-demos/dpia/page.tsx +0 -495
  83. package/src/app/ndpr-demos/dsr/page.tsx +0 -280
  84. package/src/app/ndpr-demos/page.tsx +0 -73
  85. package/src/app/ndpr-demos/policy/page.tsx +0 -771
  86. package/src/app/page.tsx +0 -452
  87. package/src/components/ErrorBoundary.tsx +0 -90
  88. package/src/components/breach-notification/BreachNotificationForm.tsx +0 -479
  89. package/src/components/consent/ConsentBanner.tsx +0 -193
  90. package/src/components/data-subject-rights/DataSubjectRequestForm.tsx +0 -530
  91. package/src/components/dpia/DPIAQuestionnaire.tsx +0 -523
  92. package/src/components/privacy-policy/PolicyGenerator.tsx +0 -1062
  93. package/src/components/privacy-policy/data.ts +0 -98
  94. package/src/components/privacy-policy/shared/CheckboxField.tsx +0 -38
  95. package/src/components/privacy-policy/shared/CheckboxGroup.tsx +0 -85
  96. package/src/components/privacy-policy/shared/FormField.tsx +0 -79
  97. package/src/components/privacy-policy/shared/StepIndicator.tsx +0 -86
  98. package/src/components/privacy-policy/steps/CustomSectionsStep.tsx +0 -361
  99. package/src/components/privacy-policy/steps/DataCollectionStep.tsx +0 -231
  100. package/src/components/privacy-policy/steps/DataSharingStep.tsx +0 -418
  101. package/src/components/privacy-policy/steps/OrganizationInfoStep.tsx +0 -202
  102. package/src/components/privacy-policy/steps/PolicyPreviewStep.tsx +0 -226
  103. package/src/components/ui/Badge.tsx +0 -46
  104. package/src/components/ui/Button.tsx +0 -59
  105. package/src/components/ui/Card.tsx +0 -92
  106. package/src/components/ui/Checkbox.tsx +0 -57
  107. package/src/components/ui/FormField.tsx +0 -50
  108. package/src/components/ui/Input.tsx +0 -38
  109. package/src/components/ui/Loading.tsx +0 -201
  110. package/src/components/ui/Select.tsx +0 -42
  111. package/src/components/ui/TextArea.tsx +0 -38
  112. package/src/components/ui/label.tsx +0 -24
  113. package/src/components/ui/switch.tsx +0 -31
  114. package/src/components/ui/tabs.tsx +0 -66
  115. package/src/hooks/useConsent.ts +0 -70
  116. package/src/hooks/useLoadingState.ts +0 -85
  117. package/src/lib/consentService.ts +0 -144
  118. package/src/lib/dpiaQuestions.ts +0 -188
  119. package/src/lib/requestService.ts +0 -79
  120. package/src/lib/sanitize.ts +0 -108
  121. package/src/lib/storage.ts +0 -222
  122. package/src/lib/utils.ts +0 -6
  123. package/src/types/html-to-docx.d.ts +0 -30
  124. package/src/types/index.ts +0 -77
  125. package/tailwind.config.ts +0 -65
  126. package/tsconfig.json +0 -41
  127. /package/{packages/ndpr-toolkit/dist → dist}/components/breach/BreachNotificationManager.d.ts +0 -0
  128. /package/{packages/ndpr-toolkit/dist → dist}/components/breach/BreachReportForm.d.ts +0 -0
  129. /package/{packages/ndpr-toolkit/dist → dist}/components/breach/BreachRiskAssessment.d.ts +0 -0
  130. /package/{packages/ndpr-toolkit/dist → dist}/components/breach/RegulatoryReportGenerator.d.ts +0 -0
  131. /package/{packages/ndpr-toolkit/dist → dist}/components/consent/ConsentBanner.d.ts +0 -0
  132. /package/{packages/ndpr-toolkit/dist → dist}/components/consent/ConsentManager.d.ts +0 -0
  133. /package/{packages/ndpr-toolkit/dist → dist}/components/consent/ConsentStorage.d.ts +0 -0
  134. /package/{packages/ndpr-toolkit/dist → dist}/components/dpia/DPIAQuestionnaire.d.ts +0 -0
  135. /package/{packages/ndpr-toolkit/dist → dist}/components/dpia/DPIAReport.d.ts +0 -0
  136. /package/{packages/ndpr-toolkit/dist → dist}/components/dpia/StepIndicator.d.ts +0 -0
  137. /package/{packages/ndpr-toolkit/dist → dist}/components/dsr/DSRDashboard.d.ts +0 -0
  138. /package/{packages/ndpr-toolkit/dist → dist}/components/dsr/DSRRequestForm.d.ts +0 -0
  139. /package/{packages/ndpr-toolkit/dist → dist}/components/dsr/DSRTracker.d.ts +0 -0
  140. /package/{packages/ndpr-toolkit/dist → dist}/components/policy/PolicyExporter.d.ts +0 -0
  141. /package/{packages/ndpr-toolkit/dist → dist}/components/policy/PolicyGenerator.d.ts +0 -0
  142. /package/{packages/ndpr-toolkit/dist → dist}/components/policy/PolicyPreview.d.ts +0 -0
  143. /package/{packages/ndpr-toolkit/dist → dist}/hooks/useBreach.d.ts +0 -0
  144. /package/{packages/ndpr-toolkit/dist → dist}/hooks/useConsent.d.ts +0 -0
  145. /package/{packages/ndpr-toolkit/dist → dist}/hooks/useDPIA.d.ts +0 -0
  146. /package/{packages/ndpr-toolkit/dist → dist}/hooks/useDSR.d.ts +0 -0
  147. /package/{packages/ndpr-toolkit/dist → dist}/hooks/usePrivacyPolicy.d.ts +0 -0
  148. /package/{packages/ndpr-toolkit/dist → dist}/index.d.ts +0 -0
  149. /package/{packages/ndpr-toolkit/dist → dist}/setupTests.d.ts +0 -0
  150. /package/{packages/ndpr-toolkit/dist → dist}/types/breach.d.ts +0 -0
  151. /package/{packages/ndpr-toolkit/dist → dist}/types/consent.d.ts +0 -0
  152. /package/{packages/ndpr-toolkit/dist → dist}/types/dpia.d.ts +0 -0
  153. /package/{packages/ndpr-toolkit/dist → dist}/types/dsr.d.ts +0 -0
  154. /package/{packages/ndpr-toolkit/dist → dist}/types/privacy.d.ts +0 -0
  155. /package/{packages/ndpr-toolkit/dist → dist}/utils/breach.d.ts +0 -0
  156. /package/{packages/ndpr-toolkit/dist → dist}/utils/consent.d.ts +0 -0
  157. /package/{packages/ndpr-toolkit/dist → dist}/utils/dpia.d.ts +0 -0
  158. /package/{packages/ndpr-toolkit/dist → dist}/utils/dsr.d.ts +0 -0
  159. /package/{packages/ndpr-toolkit/dist → dist}/utils/privacy.d.ts +0 -0
@@ -0,0 +1,35 @@
1
+ export * from './consent';
2
+ export * from './dsr';
3
+ export * from './dpia';
4
+ export * from './breach';
5
+ export * from './privacy';
6
+ export interface NDPRConfig {
7
+ organizationName: string;
8
+ organizationContact: string;
9
+ defaultLanguage?: string;
10
+ enableAnalytics?: boolean;
11
+ consentOptions?: {
12
+ position?: 'top' | 'bottom' | 'center';
13
+ theme?: 'light' | 'dark' | 'auto';
14
+ };
15
+ }
16
+ export interface ErrorResponse {
17
+ error: string;
18
+ message: string;
19
+ details?: Record<string, any>;
20
+ timestamp: string;
21
+ }
22
+ export interface ValidationError {
23
+ field: string;
24
+ message: string;
25
+ code?: string;
26
+ }
27
+ export type EventHandler<T = void> = (data: T) => void | Promise<void>;
28
+ export interface PaginatedResponse<T> {
29
+ data: T[];
30
+ total: number;
31
+ page: number;
32
+ pageSize: number;
33
+ hasNext: boolean;
34
+ hasPrevious: boolean;
35
+ }
package/package.json CHANGED
@@ -1,89 +1,71 @@
1
1
  {
2
2
  "name": "@tantainnovative/ndpr-toolkit",
3
- "version": "1.0.5",
4
- "private": false,
5
- "description": "Nigerian Data Protection Compliance Toolkit for implementing NDPR and DPA compliant features",
3
+ "version": "1.0.6",
4
+ "description": "A comprehensive toolkit for implementing NDPR-compliant features in web applications",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.esm.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
6
11
  "scripts": {
7
- "dev": "next dev --turbopack",
8
- "build": "next build",
9
- "start": "next start",
10
- "lint": "next lint",
11
- "test": "jest --passWithNoTests",
12
- "prepare": "husky install",
13
- "export": "next export",
14
- "build:static": "next build",
15
- "deploy": "next build && touch out/.nojekyll && gh-pages -d out",
16
- "release": "standard-version",
17
- "release:minor": "standard-version --release-as minor",
18
- "release:major": "standard-version --release-as major",
19
- "release:patch": "standard-version --release-as patch"
12
+ "build": "rollup -c",
13
+ "dev": "rollup -c -w",
14
+ "test": "jest",
15
+ "lint": "eslint src --ext .ts,.tsx",
16
+ "prepublishOnly": "npm run build"
20
17
  },
21
18
  "keywords": [
22
19
  "ndpr",
23
- "dpa",
24
- "nigeria",
25
20
  "data-protection",
26
- "compliance",
27
21
  "privacy",
28
- "gdpr"
22
+ "compliance",
23
+ "nigeria",
24
+ "consent",
25
+ "dpia",
26
+ "data-subject-rights",
27
+ "breach-notification"
29
28
  ],
30
29
  "author": "Tanta Innovative",
31
30
  "license": "MIT",
32
31
  "repository": {
33
32
  "type": "git",
34
- "url": "git+https://github.com/tantainnovative/ndpr-toolkit.git"
33
+ "url": "https://github.com/tantainnovative/ndpr-toolkit"
35
34
  },
36
- "bugs": {
37
- "url": "https://github.com/tantainnovative/ndpr-toolkit/issues"
35
+ "publishConfig": {
36
+ "access": "public"
38
37
  },
39
- "homepage": "https://github.com/tantainnovative/ndpr-toolkit#readme",
40
- "dependencies": {
41
- "@radix-ui/react-label": "^2.1.4",
42
- "@radix-ui/react-slot": "^1.2.0",
43
- "@radix-ui/react-switch": "^1.2.2",
44
- "@radix-ui/react-tabs": "^1.1.9",
45
- "@tantainnovative/ndpr-toolkit": "^1.0.1",
46
- "class-variance-authority": "^0.7.1",
47
- "clsx": "^2.1.1",
48
- "docx": "^9.4.1",
49
- "gray-matter": "^4.0.3",
50
- "html-to-docx": "^1.8.0",
51
- "jspdf": "^3.0.1",
52
- "jspdf-autotable": "^5.0.2",
53
- "lucide-react": "^0.507.0",
54
- "next": "15.3.1",
55
- "next-mdx-remote": "^5.0.0",
56
- "nextra": "^4.2.17",
57
- "nextra-theme-docs": "^4.2.17",
58
- "react": "^19.0.0",
59
- "react-dom": "^19.0.0",
60
- "react-markdown": "^10.1.0",
61
- "tailwind-merge": "^2.6.0",
62
- "uuid": "^11.1.0"
38
+ "peerDependencies": {
39
+ "react": "^18.0.0 || ^19.0.0",
40
+ "react-dom": "^18.0.0 || ^19.0.0"
63
41
  },
64
42
  "devDependencies": {
65
- "@commitlint/cli": "^19.0.0",
66
- "@commitlint/config-conventional": "^19.0.0",
67
- "@eslint/eslintrc": "^3",
68
- "@tailwindcss/postcss": "^4.1.5",
69
- "@testing-library/jest-dom": "^6.6.3",
70
- "@testing-library/react": "^16.3.0",
71
- "@types/jest": "^29.5.0",
72
- "@types/node": "^20",
73
- "@types/react": "^19",
74
- "@types/react-dom": "^19",
75
- "@types/uuid": "^9.0.0",
76
- "autoprefixer": "^10.4.21",
77
- "eslint": "^9",
78
- "eslint-config-next": "15.3.1",
79
- "gh-pages": "^6.3.0",
80
- "husky": "^9.0.0",
81
- "jest": "^29.5.0",
82
- "jest-environment-jsdom": "^29.5.0",
83
- "prettier": "^3.6.2",
84
- "standard-version": "^9.5.0",
85
- "tailwindcss": "^4",
86
- "tw-animate-css": "^1.2.9",
87
- "typescript": "^5"
43
+ "@rollup/plugin-commonjs": "^22.0.0",
44
+ "@rollup/plugin-node-resolve": "^13.3.0",
45
+ "@rollup/plugin-typescript": "^8.3.2",
46
+ "@testing-library/jest-dom": "^5.17.0",
47
+ "@testing-library/react": "^13.4.0",
48
+ "@testing-library/react-hooks": "^8.0.1",
49
+ "@testing-library/user-event": "^14.6.1",
50
+ "@types/jest": "^28.1.6",
51
+ "@types/react": "^18.0.0",
52
+ "@types/react-dom": "^18.0.0",
53
+ "@typescript-eslint/eslint-plugin": "^5.27.0",
54
+ "@typescript-eslint/parser": "^5.27.0",
55
+ "eslint": "^8.16.0",
56
+ "eslint-plugin-react": "^7.30.0",
57
+ "eslint-plugin-react-hooks": "^4.5.0",
58
+ "identity-obj-proxy": "^3.0.0",
59
+ "jest": "^28.1.0",
60
+ "jest-environment-jsdom": "^28.1.3",
61
+ "react-test-renderer": "^18.2.0",
62
+ "rollup": "^2.75.5",
63
+ "rollup-plugin-peer-deps-external": "^2.2.4",
64
+ "rollup-plugin-terser": "^7.0.2",
65
+ "ts-jest": "^28.0.8",
66
+ "typescript": "^4.7.2"
67
+ },
68
+ "dependencies": {
69
+ "tslib": "^2.4.0"
88
70
  }
89
71
  }
package/CHANGELOG.md DELETED
@@ -1,16 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
-
5
- ## 1.0.0 (2025-05-02)
6
-
7
-
8
- ### Features
9
-
10
- * initial implementation of NDPR-Toolkit with all key components ([b41aeef](https://github.com/tantainnovative/ndpr-toolkit/commit/b41aeefe3184ce69ed09f3d8c0fdacb860a98427))
11
-
12
-
13
- ### Bug Fixes
14
-
15
- * resolve ESLint errors for successful build ([3f78939](https://github.com/tantainnovative/ndpr-toolkit/commit/3f7893902cc7ec67913a7e19f6a804d01e69896e))
16
- * resolve type errors for successful build ([b827186](https://github.com/tantainnovative/ndpr-toolkit/commit/b8271865a77b097f0ce839ad13555b4bfe12fe2e))
package/CNAME DELETED
@@ -1 +0,0 @@
1
- ndprtoolkit.com.ng
package/CONTRIBUTING.md DELETED
@@ -1,87 +0,0 @@
1
- # Contributing to NDPR-Toolkit
2
-
3
- Thank you for considering contributing to the Nigerian Data Protection Compliance Toolkit! This document outlines the process for contributing to this project.
4
-
5
- ## Code of Conduct
6
-
7
- By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and considerate of others.
8
-
9
- ## How to Contribute
10
-
11
- ### Reporting Bugs
12
-
13
- If you find a bug, please create an issue in the GitHub repository with the following information:
14
-
15
- 1. A clear, descriptive title
16
- 2. Steps to reproduce the bug
17
- 3. Expected behavior
18
- 4. Actual behavior
19
- 5. Screenshots (if applicable)
20
- 6. Environment information (browser, OS, etc.)
21
-
22
- ### Suggesting Features
23
-
24
- We welcome feature suggestions! Please create an issue with:
25
-
26
- 1. A clear, descriptive title
27
- 2. Detailed description of the proposed feature
28
- 3. Any relevant examples or mockups
29
- 4. Explanation of why this feature would be useful to the project
30
-
31
- ### Pull Requests
32
-
33
- We follow a standard GitHub workflow:
34
-
35
- 1. Fork the repository
36
- 2. Create a new branch for your feature or bug fix
37
- 3. Make your changes
38
- 4. Write or update tests as needed
39
- 5. Ensure all tests pass
40
- 6. Commit your changes using conventional commit messages
41
- 7. Push to your fork
42
- 8. Submit a pull request
43
-
44
- ### Commit Message Convention
45
-
46
- We use conventional commits to automate versioning and changelog generation. Please format your commit messages as follows:
47
-
48
- ```
49
- <type>(<scope>): <description>
50
-
51
- [optional body]
52
-
53
- [optional footer(s)]
54
- ```
55
-
56
- Types include:
57
- - `feat`: A new feature
58
- - `fix`: A bug fix
59
- - `docs`: Documentation changes
60
- - `style`: Code style changes (formatting, etc.)
61
- - `refactor`: Code changes that neither fix bugs nor add features
62
- - `perf`: Performance improvements
63
- - `test`: Adding or updating tests
64
- - `chore`: Changes to the build process or auxiliary tools
65
-
66
- Example:
67
- ```
68
- feat(consent): add ability to customize consent banner colors
69
- ```
70
-
71
- ## Development Setup
72
-
73
- 1. Clone your fork of the repository
74
- 2. Install dependencies: `npm install`
75
- 3. Start the development server: `npm run dev`
76
- 4. Make your changes
77
- 5. Run tests: `npm test`
78
-
79
- ## Release Process
80
-
81
- Releases are managed by the maintainers using semantic versioning. The process is automated through GitHub Actions.
82
-
83
- ## Questions?
84
-
85
- If you have any questions about contributing, please open an issue with your question.
86
-
87
- Thank you for contributing to the NDPR-Toolkit!
@@ -1,140 +0,0 @@
1
- # NDPR Toolkit v1.0.0 Release Notes
2
-
3
- **Release Date:** May 4, 2025
4
- **Package:** [@tantainnovative/ndpr-toolkit](https://www.npmjs.com/package/@tantainnovative/ndpr-toolkit)
5
- **Version:** 1.0.0 (Initial Stable Release)
6
-
7
- ## Overview
8
-
9
- We are excited to announce the official release of the NDPR Toolkit v1.0.0, a comprehensive solution for implementing Nigeria Data Protection Regulation (NDPR) compliance features in web applications. This enterprise-ready toolkit provides a complete set of components, hooks, and utilities to help organizations meet their NDPR compliance obligations efficiently and effectively.
10
-
11
- ## Key Features
12
-
13
- ### 1. Privacy Policy Management
14
- - **PolicyGenerator**: Create customizable, NDPR-compliant privacy policies with an intuitive form interface
15
- - **PolicyPreview**: Display generated policies with professional formatting and section navigation
16
- - **PolicyExporter**: Export policies in multiple formats (PDF, HTML, Markdown) with compliance notices
17
-
18
- ### 2. Consent Management
19
- - **ConsentBanner**: Implement cookie consent banners with customizable appearance and behavior
20
- - **ConsentManager**: Track and manage user consent preferences across your application
21
- - **ConsentStorage**: Securely store and retrieve consent records with built-in persistence
22
-
23
- ### 3. Data Subject Rights (DSR)
24
- - **DSRRequestForm**: Collect and validate data subject requests with comprehensive form validation
25
- - **DSRTracker**: Monitor the status and progress of data subject requests
26
- - **DSRDashboard**: Visualize and manage all data subject requests in one place
27
-
28
- ### 4. Data Protection Impact Assessment (DPIA)
29
- - **DPIAQuestionnaire**: Guide users through the DPIA process with step-by-step questionnaires
30
- - **DPIAReport**: Generate comprehensive DPIA reports based on questionnaire responses
31
- - **StepIndicator**: Track progress through multi-step DPIA processes
32
-
33
- ### 5. Breach Notification
34
- - **BreachReportForm**: Collect essential information about data breaches
35
- - **BreachRiskAssessment**: Evaluate the risk level of reported breaches
36
- - **RegulatoryReportGenerator**: Create NDPR-compliant breach notification reports
37
- - **BreachNotificationManager**: Manage the entire breach notification workflow
38
-
39
- ## Technical Specifications
40
-
41
- - **Framework Compatibility**: React 18+
42
- - **TypeScript Support**: Full TypeScript definitions for all components and utilities
43
- - **Modular Architecture**: Use only what you need with tree-shakable imports
44
- - **Customization**: Extensive theming and styling options
45
- - **Accessibility**: WCAG 2.1 AA compliant components
46
- - **Performance**: Optimized bundle size with minimal dependencies
47
-
48
- ## Installation
49
-
50
- ```bash
51
- # Using npm
52
- npm install @tantainnovative/ndpr-toolkit
53
-
54
- # Using yarn
55
- yarn add @tantainnovative/ndpr-toolkit
56
-
57
- # Using pnpm
58
- pnpm add @tantainnovative/ndpr-toolkit
59
- ```
60
-
61
- ## Usage Example
62
-
63
- ```jsx
64
- import { ConsentBanner, useConsent } from '@tantainnovative/ndpr-toolkit';
65
-
66
- function App() {
67
- const { consent, updateConsent } = useConsent();
68
-
69
- return (
70
- <div className="app">
71
- <ConsentBanner
72
- title="Cookie Consent"
73
- description="We use cookies to enhance your browsing experience."
74
- cookieCategories={[
75
- { id: 'necessary', name: 'Necessary', required: true },
76
- { id: 'analytics', name: 'Analytics' },
77
- { id: 'marketing', name: 'Marketing' }
78
- ]}
79
- onAccept={(categories) => updateConsent(categories)}
80
- onReject={() => updateConsent(['necessary'])}
81
- />
82
- {/* Your app content */}
83
- </div>
84
- );
85
- }
86
- ```
87
-
88
- ## Documentation
89
-
90
- Comprehensive documentation is available at:
91
- - [GitHub Repository](https://github.com/tantainnovative/ndpr-toolkit)
92
- - [Implementation Guides](https://github.com/tantainnovative/ndpr-toolkit/docs)
93
- - [API Reference](https://github.com/tantainnovative/ndpr-toolkit/docs/api)
94
-
95
- ## Breaking Changes
96
-
97
- This is the initial stable release, so there are no breaking changes from previous versions.
98
-
99
- ## Bug Fixes
100
-
101
- - Fixed conditional rendering in policy templates
102
- - Resolved issues with form validation in DSR components
103
- - Improved error handling in consent management
104
- - Fixed accessibility issues in UI components
105
-
106
- ## Performance Improvements
107
-
108
- - Optimized bundle size with tree-shaking
109
- - Improved rendering performance of complex forms
110
- - Reduced memory usage in data management utilities
111
-
112
- ## Security Enhancements
113
-
114
- - Implemented secure storage for consent records
115
- - Added data sanitization for all user inputs
116
- - Enhanced protection against XSS attacks
117
-
118
- ## Upcoming Features
119
-
120
- We're already working on the next release, which will include:
121
- - Integration with popular authentication providers
122
- - Enhanced reporting capabilities
123
- - Additional export formats
124
- - Internationalization support
125
-
126
- ## Acknowledgements
127
-
128
- We would like to thank all contributors and early adopters who provided valuable feedback during the development of this toolkit.
129
-
130
- ## License
131
-
132
- MIT License - See LICENSE file for details.
133
-
134
- ## Support
135
-
136
- For enterprise support, please contact support@tantainnovative.com
137
-
138
- ---
139
-
140
- © 2025 Tanta Innovative. All rights reserved.
@@ -1,69 +0,0 @@
1
- # NDPR Toolkit v1.0.1 Release Notes
2
-
3
- **Release Date:** May 4, 2025
4
- **Package:** [@tantainnovative/ndpr-toolkit](https://www.npmjs.com/package/@tantainnovative/ndpr-toolkit)
5
- **Version:** 1.0.1
6
-
7
- ## Overview
8
-
9
- This release adds React 19 compatibility to the NDPR Toolkit while maintaining support for React 18. The update ensures that the toolkit can be seamlessly integrated into projects using either React version.
10
-
11
- ## What's New
12
-
13
- ### React 19 Compatibility
14
-
15
- - Updated peer dependencies to support both React 18 and React 19
16
- - Added installation instructions for React 19 users
17
- - Maintained full functionality across all components with the newer React version
18
-
19
- ### Installation Notes
20
-
21
- When using the toolkit with React 19, you may encounter peer dependency warnings with other packages in your project. To resolve these, you can use the `--legacy-peer-deps` flag:
22
-
23
- ```bash
24
- npm install @tantainnovative/ndpr-toolkit --legacy-peer-deps
25
- ```
26
-
27
- Alternatively, you can create a `.npmrc` file in your project root with the following content:
28
-
29
- ```
30
- legacy-peer-deps=true
31
- ```
32
-
33
- This will make npm ignore peer dependency conflicts during installation.
34
-
35
- ## Technical Specifications
36
-
37
- - **Framework Compatibility**: React 18+ and React 19+
38
- - **TypeScript Support**: Full TypeScript definitions for all components and utilities
39
- - **Modular Architecture**: Use only what you need with tree-shakable imports
40
- - **Customization**: Extensive theming and styling options
41
- - **Accessibility**: WCAG 2.1 AA compliant components
42
- - **Performance**: Optimized bundle size with minimal dependencies
43
-
44
- ## Bug Fixes
45
-
46
- - No bug fixes in this release; this is purely a compatibility update
47
-
48
- ## Documentation Updates
49
-
50
- - Added React 19 compatibility notes to README.md
51
- - Updated installation instructions with guidance for handling peer dependency conflicts
52
-
53
- ## Upgrading from v1.0.0
54
-
55
- This is a drop-in replacement for v1.0.0 with no breaking changes. To upgrade:
56
-
57
- ```bash
58
- npm install @tantainnovative/ndpr-toolkit@1.0.1
59
- ```
60
-
61
- Or with peer dependency resolution:
62
-
63
- ```bash
64
- npm install @tantainnovative/ndpr-toolkit@1.0.1 --legacy-peer-deps
65
- ```
66
-
67
- ---
68
-
69
- © 2025 Tanta Innovative. All rights reserved.
package/SECURITY.md DELETED
@@ -1,21 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- Use this section to tell people about which versions of your project are
6
- currently being supported with security updates.
7
-
8
- | Version | Supported |
9
- | ------- | ------------------ |
10
- | 5.1.x | :white_check_mark: |
11
- | 5.0.x | :x: |
12
- | 4.0.x | :white_check_mark: |
13
- | < 4.0 | :x: |
14
-
15
- ## Reporting a Vulnerability
16
-
17
- Use this section to tell people how to report a vulnerability.
18
-
19
- Tell them where to go, how often they can expect to get an update on a
20
- reported vulnerability, what to expect if the vulnerability is accepted or
21
- declined, etc.
package/components.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://ui.shadcn.com/schema.json",
3
- "style": "new-york",
4
- "rsc": true,
5
- "tsx": true,
6
- "tailwind": {
7
- "config": "",
8
- "css": "src/app/globals.css",
9
- "baseColor": "gray",
10
- "cssVariables": true,
11
- "prefix": ""
12
- },
13
- "aliases": {
14
- "components": "@/components",
15
- "utils": "@/lib/utils",
16
- "ui": "@/components/ui",
17
- "lib": "@/lib",
18
- "hooks": "@/hooks"
19
- },
20
- "iconLibrary": "lucide"
21
- }
package/eslint.config.mjs DELETED
@@ -1,16 +0,0 @@
1
- import { dirname } from "path";
2
- import { fileURLToPath } from "url";
3
- import { FlatCompat } from "@eslint/eslintrc";
4
-
5
- const __filename = fileURLToPath(import.meta.url);
6
- const __dirname = dirname(__filename);
7
-
8
- const compat = new FlatCompat({
9
- baseDirectory: __dirname,
10
- });
11
-
12
- const eslintConfig = [
13
- ...compat.extends("next/core-web-vitals", "next/typescript"),
14
- ];
15
-
16
- export default eslintConfig;
package/next-env.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
3
-
4
- // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
package/next.config.js DELETED
@@ -1,15 +0,0 @@
1
- /** @type {import('next').NextConfig} */
2
- const nextConfig = {
3
- output: 'export',
4
- basePath: '',
5
- images: {
6
- unoptimized: true,
7
- },
8
- eslint: {
9
- // Warning: This allows production builds to successfully complete even if
10
- // your project has ESLint errors.
11
- ignoreDuringBuilds: true,
12
- },
13
- }
14
-
15
- module.exports = nextConfig
package/next.config.ts DELETED
@@ -1,62 +0,0 @@
1
- import type { NextConfig } from "next";
2
-
3
- // Check if we're in development mode
4
- const isDevelopment = process.env.NODE_ENV === 'development';
5
-
6
- // Repository name for GitHub Pages
7
- const REPO_NAME = 'ndpr-toolkit';
8
-
9
- const nextConfig: NextConfig = {
10
- reactStrictMode: true,
11
-
12
- // These settings apply to all environments
13
- poweredByHeader: false,
14
-
15
- // Fix for hydration errors
16
- // This ensures consistent rendering between server and client
17
- experimental: {
18
- // Reduce hydration mismatches by making SSR output match client rendering
19
- scrollRestoration: true,
20
- },
21
-
22
- // Optimize fonts to reduce hydration mismatches
23
- optimizeFonts: true,
24
-
25
- // Suppress hydration warnings in development
26
- onDemandEntries: {
27
- // Keep pages in memory for longer to avoid reloading
28
- maxInactiveAge: 25 * 1000,
29
- pagesBufferLength: 5,
30
- },
31
-
32
- // Only use static export, basePath and assetPrefix in production
33
- ...(isDevelopment
34
- ? {
35
- // Development config - no basePath or static export
36
- }
37
- : {
38
- // Production config for GitHub Pages
39
- output: 'export', // Enable static HTML export
40
- trailingSlash: true, // Important for GitHub Pages to work correctly with routing
41
- images: {
42
- unoptimized: true, // Required for static export
43
- },
44
- basePath: `/${REPO_NAME}`,
45
- assetPrefix: `/${REPO_NAME}`,
46
- }
47
- ),
48
- };
49
-
50
- // Add a custom export script to generate a .nojekyll file
51
- // This prevents GitHub Pages from ignoring files that begin with an underscore
52
- if (process.env.NODE_ENV === 'production') {
53
- const { execSync } = require('child_process');
54
- try {
55
- execSync('touch out/.nojekyll');
56
- console.log('Created .nojekyll file');
57
- } catch (error) {
58
- console.error('Error creating .nojekyll file:', error);
59
- }
60
- }
61
-
62
- export default nextConfig;