@tantainnovative/ndpr-toolkit 1.0.5 → 1.0.7

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 (263) hide show
  1. package/README.md +88 -14
  2. package/dist/components/breach-notification/BreachNotificationForm.d.ts +18 -0
  3. package/dist/components/breach-notification/BreachNotificationForm.d.ts.map +1 -0
  4. package/dist/components/consent/ConsentBanner.d.ts +30 -0
  5. package/dist/components/consent/ConsentBanner.d.ts.map +1 -0
  6. package/dist/components/consent/ConsentManager.d.ts +51 -0
  7. package/dist/components/consent/ConsentManager.d.ts.map +1 -0
  8. package/dist/components/consent/ConsentSettings.d.ts +15 -0
  9. package/dist/components/consent/ConsentSettings.d.ts.map +1 -0
  10. package/dist/components/consent/unstyled/UnstyledConsentBanner.d.ts +7 -0
  11. package/dist/components/consent/unstyled/UnstyledConsentBanner.d.ts.map +1 -0
  12. package/dist/components/consent/unstyled/UnstyledConsentSettings.d.ts +7 -0
  13. package/dist/components/consent/unstyled/UnstyledConsentSettings.d.ts.map +1 -0
  14. package/dist/components/consent/unstyled/UnstyledConsentToggle.d.ts +8 -0
  15. package/dist/components/consent/unstyled/UnstyledConsentToggle.d.ts.map +1 -0
  16. package/dist/components/consent/unstyled/index.d.ts +4 -0
  17. package/dist/components/consent/unstyled/index.d.ts.map +1 -0
  18. package/dist/components/data-subject-rights/DataSubjectRequestForm.d.ts +14 -0
  19. package/dist/components/data-subject-rights/DataSubjectRequestForm.d.ts.map +1 -0
  20. package/dist/components/docs/DocLayout.d.ts +9 -0
  21. package/dist/components/docs/DocLayout.d.ts.map +1 -0
  22. package/dist/components/docs/index.d.ts +2 -0
  23. package/dist/components/docs/index.d.ts.map +1 -0
  24. package/dist/components/dpia/DPIAQuestionnaire.d.ts +9 -0
  25. package/dist/components/dpia/DPIAQuestionnaire.d.ts.map +1 -0
  26. package/dist/components/privacy-policy/PolicyGenerator.d.ts +12 -0
  27. package/dist/components/privacy-policy/PolicyGenerator.d.ts.map +1 -0
  28. package/dist/components/privacy-policy/data.d.ts +8 -0
  29. package/dist/components/privacy-policy/data.d.ts.map +1 -0
  30. package/dist/components/privacy-policy/shared/CheckboxField.d.ts +13 -0
  31. package/dist/components/privacy-policy/shared/CheckboxField.d.ts.map +1 -0
  32. package/dist/components/privacy-policy/shared/CheckboxGroup.d.ts +13 -0
  33. package/dist/components/privacy-policy/shared/CheckboxGroup.d.ts.map +1 -0
  34. package/dist/components/privacy-policy/shared/FormField.d.ts +13 -0
  35. package/dist/components/privacy-policy/shared/FormField.d.ts.map +1 -0
  36. package/dist/components/privacy-policy/shared/StepIndicator.d.ts +8 -0
  37. package/dist/components/privacy-policy/shared/StepIndicator.d.ts.map +1 -0
  38. package/dist/components/privacy-policy/steps/CustomSectionsStep.d.ts +15 -0
  39. package/dist/components/privacy-policy/steps/CustomSectionsStep.d.ts.map +1 -0
  40. package/dist/components/privacy-policy/steps/DataCollectionStep.d.ts +20 -0
  41. package/dist/components/privacy-policy/steps/DataCollectionStep.d.ts.map +1 -0
  42. package/dist/components/privacy-policy/steps/DataSharingStep.d.ts +34 -0
  43. package/dist/components/privacy-policy/steps/DataSharingStep.d.ts.map +1 -0
  44. package/dist/components/privacy-policy/steps/OrganizationInfoStep.d.ts +17 -0
  45. package/dist/components/privacy-policy/steps/OrganizationInfoStep.d.ts.map +1 -0
  46. package/dist/components/privacy-policy/steps/PolicyPreviewStep.d.ts +30 -0
  47. package/dist/components/privacy-policy/steps/PolicyPreviewStep.d.ts.map +1 -0
  48. package/dist/components/ui/Badge.d.ts +10 -0
  49. package/dist/components/ui/Badge.d.ts.map +1 -0
  50. package/dist/components/ui/Button.d.ts +11 -0
  51. package/dist/components/ui/Button.d.ts.map +1 -0
  52. package/dist/components/ui/Card.d.ts +10 -0
  53. package/dist/components/ui/Card.d.ts.map +1 -0
  54. package/dist/components/ui/Checkbox.d.ts +8 -0
  55. package/dist/components/ui/Checkbox.d.ts.map +1 -0
  56. package/dist/components/ui/FormField.d.ts +11 -0
  57. package/dist/components/ui/FormField.d.ts.map +1 -0
  58. package/dist/components/ui/Input.d.ts +6 -0
  59. package/dist/components/ui/Input.d.ts.map +1 -0
  60. package/dist/components/ui/Select.d.ts +6 -0
  61. package/dist/components/ui/Select.d.ts.map +1 -0
  62. package/dist/components/ui/TextArea.d.ts +6 -0
  63. package/dist/components/ui/TextArea.d.ts.map +1 -0
  64. package/dist/components/ui/dialog.d.ts +18 -0
  65. package/dist/components/ui/dialog.d.ts.map +1 -0
  66. package/dist/components/ui/label.d.ts +5 -0
  67. package/dist/components/ui/label.d.ts.map +1 -0
  68. package/dist/components/ui/switch.d.ts +5 -0
  69. package/dist/components/ui/switch.d.ts.map +1 -0
  70. package/dist/components/ui/tabs.d.ts +8 -0
  71. package/dist/components/ui/tabs.d.ts.map +1 -0
  72. package/dist/contexts/ConsentContext.d.ts +35 -0
  73. package/dist/contexts/ConsentContext.d.ts.map +1 -0
  74. package/dist/contexts/GenericConsentContext.d.ts +11 -0
  75. package/dist/contexts/GenericConsentContext.d.ts.map +1 -0
  76. package/dist/hooks/useConsent.d.ts +12 -0
  77. package/dist/hooks/useConsent.d.ts.map +1 -0
  78. package/dist/hooks/useConsentActions.d.ts +12 -0
  79. package/dist/hooks/useConsentActions.d.ts.map +1 -0
  80. package/dist/hooks/useConsentManager.d.ts +14 -0
  81. package/dist/hooks/useConsentManager.d.ts.map +1 -0
  82. package/dist/hooks/useConsentState.d.ts +10 -0
  83. package/dist/hooks/useConsentState.d.ts.map +1 -0
  84. package/dist/index.d.mts +256 -0
  85. package/dist/index.d.ts +24 -0
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.js +2 -0
  88. package/dist/index.js.map +1 -0
  89. package/dist/index.mjs +2 -0
  90. package/dist/index.mjs.map +1 -0
  91. package/dist/lib/consentService.d.ts +11 -0
  92. package/dist/lib/consentService.d.ts.map +1 -0
  93. package/dist/lib/dpiaQuestions.d.ts +3 -0
  94. package/dist/lib/dpiaQuestions.d.ts.map +1 -0
  95. package/dist/lib/requestService.d.ts +10 -0
  96. package/dist/lib/requestService.d.ts.map +1 -0
  97. package/dist/lib/utils.d.ts +3 -0
  98. package/dist/lib/utils.d.ts.map +1 -0
  99. package/dist/styles.css +38 -0
  100. package/dist/types/consent.d.ts +57 -0
  101. package/dist/types/consent.d.ts.map +1 -0
  102. package/dist/types/index.d.ts +91 -0
  103. package/dist/types/index.d.ts.map +1 -0
  104. package/dist/unstyled.d.mts +22 -0
  105. package/dist/unstyled.d.ts +2 -0
  106. package/dist/unstyled.d.ts.map +1 -0
  107. package/dist/unstyled.js +2 -0
  108. package/dist/unstyled.js.map +1 -0
  109. package/dist/unstyled.mjs +2 -0
  110. package/dist/unstyled.mjs.map +1 -0
  111. package/package.json +33 -5
  112. package/CHANGELOG.md +0 -16
  113. package/CNAME +0 -1
  114. package/CONTRIBUTING.md +0 -87
  115. package/RELEASE-NOTES-v1.0.0.md +0 -140
  116. package/RELEASE-NOTES-v1.0.1.md +0 -69
  117. package/SECURITY.md +0 -21
  118. package/components.json +0 -21
  119. package/eslint.config.mjs +0 -16
  120. package/next-env.d.ts +0 -5
  121. package/next.config.js +0 -15
  122. package/next.config.ts +0 -62
  123. package/packages/ndpr-toolkit/README.md +0 -467
  124. package/packages/ndpr-toolkit/dist/components/breach/BreachNotificationManager.d.ts +0 -62
  125. package/packages/ndpr-toolkit/dist/components/breach/BreachReportForm.d.ts +0 -66
  126. package/packages/ndpr-toolkit/dist/components/breach/BreachRiskAssessment.d.ts +0 -50
  127. package/packages/ndpr-toolkit/dist/components/breach/RegulatoryReportGenerator.d.ts +0 -94
  128. package/packages/ndpr-toolkit/dist/components/consent/ConsentBanner.d.ts +0 -79
  129. package/packages/ndpr-toolkit/dist/components/consent/ConsentManager.d.ts +0 -73
  130. package/packages/ndpr-toolkit/dist/components/consent/ConsentStorage.d.ts +0 -41
  131. package/packages/ndpr-toolkit/dist/components/dpia/DPIAQuestionnaire.d.ts +0 -70
  132. package/packages/ndpr-toolkit/dist/components/dpia/DPIAReport.d.ts +0 -40
  133. package/packages/ndpr-toolkit/dist/components/dpia/StepIndicator.d.ts +0 -64
  134. package/packages/ndpr-toolkit/dist/components/dsr/DSRDashboard.d.ts +0 -58
  135. package/packages/ndpr-toolkit/dist/components/dsr/DSRRequestForm.d.ts +0 -74
  136. package/packages/ndpr-toolkit/dist/components/dsr/DSRTracker.d.ts +0 -56
  137. package/packages/ndpr-toolkit/dist/components/policy/PolicyExporter.d.ts +0 -65
  138. package/packages/ndpr-toolkit/dist/components/policy/PolicyGenerator.d.ts +0 -54
  139. package/packages/ndpr-toolkit/dist/components/policy/PolicyPreview.d.ts +0 -71
  140. package/packages/ndpr-toolkit/dist/hooks/useBreach.d.ts +0 -97
  141. package/packages/ndpr-toolkit/dist/hooks/useConsent.d.ts +0 -63
  142. package/packages/ndpr-toolkit/dist/hooks/useDPIA.d.ts +0 -92
  143. package/packages/ndpr-toolkit/dist/hooks/useDSR.d.ts +0 -72
  144. package/packages/ndpr-toolkit/dist/hooks/usePrivacyPolicy.d.ts +0 -87
  145. package/packages/ndpr-toolkit/dist/index.d.ts +0 -31
  146. package/packages/ndpr-toolkit/dist/index.esm.js +0 -2
  147. package/packages/ndpr-toolkit/dist/index.esm.js.map +0 -1
  148. package/packages/ndpr-toolkit/dist/index.js +0 -2
  149. package/packages/ndpr-toolkit/dist/index.js.map +0 -1
  150. package/packages/ndpr-toolkit/dist/setupTests.d.ts +0 -2
  151. package/packages/ndpr-toolkit/dist/types/breach.d.ts +0 -239
  152. package/packages/ndpr-toolkit/dist/types/consent.d.ts +0 -95
  153. package/packages/ndpr-toolkit/dist/types/dpia.d.ts +0 -196
  154. package/packages/ndpr-toolkit/dist/types/dsr.d.ts +0 -162
  155. package/packages/ndpr-toolkit/dist/types/privacy.d.ts +0 -204
  156. package/packages/ndpr-toolkit/dist/utils/breach.d.ts +0 -14
  157. package/packages/ndpr-toolkit/dist/utils/consent.d.ts +0 -10
  158. package/packages/ndpr-toolkit/dist/utils/dpia.d.ts +0 -12
  159. package/packages/ndpr-toolkit/dist/utils/dsr.d.ts +0 -11
  160. package/packages/ndpr-toolkit/dist/utils/privacy.d.ts +0 -12
  161. package/packages/ndpr-toolkit/package-lock.json +0 -8197
  162. package/packages/ndpr-toolkit/package.json +0 -71
  163. package/packages/ndpr-toolkit/rollup.config.js +0 -34
  164. package/packages/ndpr-toolkit/src/components/breach/BreachNotificationManager.tsx +0 -701
  165. package/packages/ndpr-toolkit/src/components/breach/BreachReportForm.tsx +0 -631
  166. package/packages/ndpr-toolkit/src/components/breach/BreachRiskAssessment.tsx +0 -569
  167. package/packages/ndpr-toolkit/src/components/breach/RegulatoryReportGenerator.tsx +0 -496
  168. package/packages/ndpr-toolkit/src/components/consent/ConsentBanner.tsx +0 -270
  169. package/packages/ndpr-toolkit/src/components/consent/ConsentManager.tsx +0 -217
  170. package/packages/ndpr-toolkit/src/components/consent/ConsentStorage.tsx +0 -206
  171. package/packages/ndpr-toolkit/src/components/dpia/DPIAQuestionnaire.tsx +0 -342
  172. package/packages/ndpr-toolkit/src/components/dpia/DPIAReport.tsx +0 -373
  173. package/packages/ndpr-toolkit/src/components/dpia/StepIndicator.tsx +0 -174
  174. package/packages/ndpr-toolkit/src/components/dsr/DSRDashboard.tsx +0 -717
  175. package/packages/ndpr-toolkit/src/components/dsr/DSRRequestForm.tsx +0 -476
  176. package/packages/ndpr-toolkit/src/components/dsr/DSRTracker.tsx +0 -620
  177. package/packages/ndpr-toolkit/src/components/policy/PolicyExporter.tsx +0 -541
  178. package/packages/ndpr-toolkit/src/components/policy/PolicyGenerator.tsx +0 -454
  179. package/packages/ndpr-toolkit/src/components/policy/PolicyPreview.tsx +0 -333
  180. package/packages/ndpr-toolkit/src/hooks/useBreach.ts +0 -409
  181. package/packages/ndpr-toolkit/src/hooks/useConsent.ts +0 -263
  182. package/packages/ndpr-toolkit/src/hooks/useDPIA.ts +0 -457
  183. package/packages/ndpr-toolkit/src/hooks/useDSR.ts +0 -236
  184. package/packages/ndpr-toolkit/src/hooks/usePrivacyPolicy.ts +0 -428
  185. package/packages/ndpr-toolkit/src/index.ts +0 -44
  186. package/packages/ndpr-toolkit/src/setupTests.ts +0 -5
  187. package/packages/ndpr-toolkit/src/types/breach.ts +0 -283
  188. package/packages/ndpr-toolkit/src/types/consent.ts +0 -111
  189. package/packages/ndpr-toolkit/src/types/dpia.ts +0 -236
  190. package/packages/ndpr-toolkit/src/types/dsr.ts +0 -192
  191. package/packages/ndpr-toolkit/src/types/index.ts +0 -42
  192. package/packages/ndpr-toolkit/src/types/privacy.ts +0 -246
  193. package/packages/ndpr-toolkit/src/utils/breach.ts +0 -122
  194. package/packages/ndpr-toolkit/src/utils/consent.ts +0 -51
  195. package/packages/ndpr-toolkit/src/utils/dpia.ts +0 -104
  196. package/packages/ndpr-toolkit/src/utils/dsr.ts +0 -77
  197. package/packages/ndpr-toolkit/src/utils/privacy.ts +0 -100
  198. package/packages/ndpr-toolkit/tsconfig.json +0 -23
  199. package/postcss.config.mjs +0 -5
  200. package/public/NDPR TOOLKIT.svg +0 -1
  201. package/public/favicon/android-chrome-192x192.png +0 -0
  202. package/public/favicon/android-chrome-512x512.png +0 -0
  203. package/public/favicon/apple-touch-icon.png +0 -0
  204. package/public/favicon/favicon-16x16.png +0 -0
  205. package/public/favicon/favicon-32x32.png +0 -0
  206. package/public/favicon/site.webmanifest +0 -1
  207. package/public/file.svg +0 -1
  208. package/public/globe.svg +0 -1
  209. package/public/ndpr-toolkit-logo.svg +0 -108
  210. package/public/next.svg +0 -1
  211. package/public/vercel.svg +0 -1
  212. package/public/window.svg +0 -1
  213. package/src/app/accessibility.css +0 -70
  214. package/src/app/favicon.ico +0 -0
  215. package/src/app/globals.css +0 -123
  216. package/src/app/layout.tsx +0 -37
  217. package/src/app/ndpr-demos/breach/page.tsx +0 -354
  218. package/src/app/ndpr-demos/consent/page.tsx +0 -366
  219. package/src/app/ndpr-demos/dpia/page.tsx +0 -495
  220. package/src/app/ndpr-demos/dsr/page.tsx +0 -280
  221. package/src/app/ndpr-demos/page.tsx +0 -73
  222. package/src/app/ndpr-demos/policy/page.tsx +0 -771
  223. package/src/app/page.tsx +0 -452
  224. package/src/components/ErrorBoundary.tsx +0 -90
  225. package/src/components/breach-notification/BreachNotificationForm.tsx +0 -479
  226. package/src/components/consent/ConsentBanner.tsx +0 -193
  227. package/src/components/data-subject-rights/DataSubjectRequestForm.tsx +0 -530
  228. package/src/components/dpia/DPIAQuestionnaire.tsx +0 -523
  229. package/src/components/privacy-policy/PolicyGenerator.tsx +0 -1062
  230. package/src/components/privacy-policy/data.ts +0 -98
  231. package/src/components/privacy-policy/shared/CheckboxField.tsx +0 -38
  232. package/src/components/privacy-policy/shared/CheckboxGroup.tsx +0 -85
  233. package/src/components/privacy-policy/shared/FormField.tsx +0 -79
  234. package/src/components/privacy-policy/shared/StepIndicator.tsx +0 -86
  235. package/src/components/privacy-policy/steps/CustomSectionsStep.tsx +0 -361
  236. package/src/components/privacy-policy/steps/DataCollectionStep.tsx +0 -231
  237. package/src/components/privacy-policy/steps/DataSharingStep.tsx +0 -418
  238. package/src/components/privacy-policy/steps/OrganizationInfoStep.tsx +0 -202
  239. package/src/components/privacy-policy/steps/PolicyPreviewStep.tsx +0 -226
  240. package/src/components/ui/Badge.tsx +0 -46
  241. package/src/components/ui/Button.tsx +0 -59
  242. package/src/components/ui/Card.tsx +0 -92
  243. package/src/components/ui/Checkbox.tsx +0 -57
  244. package/src/components/ui/FormField.tsx +0 -50
  245. package/src/components/ui/Input.tsx +0 -38
  246. package/src/components/ui/Loading.tsx +0 -201
  247. package/src/components/ui/Select.tsx +0 -42
  248. package/src/components/ui/TextArea.tsx +0 -38
  249. package/src/components/ui/label.tsx +0 -24
  250. package/src/components/ui/switch.tsx +0 -31
  251. package/src/components/ui/tabs.tsx +0 -66
  252. package/src/hooks/useConsent.ts +0 -70
  253. package/src/hooks/useLoadingState.ts +0 -85
  254. package/src/lib/consentService.ts +0 -144
  255. package/src/lib/dpiaQuestions.ts +0 -188
  256. package/src/lib/requestService.ts +0 -79
  257. package/src/lib/sanitize.ts +0 -108
  258. package/src/lib/storage.ts +0 -222
  259. package/src/lib/utils.ts +0 -6
  260. package/src/types/html-to-docx.d.ts +0 -30
  261. package/src/types/index.ts +0 -77
  262. package/tailwind.config.ts +0 -65
  263. package/tsconfig.json +0 -41
@@ -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;
@@ -1,467 +0,0 @@
1
- # NDPR Toolkit
2
-
3
- <div align="center">
4
-
5
- ![NDPR Toolkit Logo](https://via.placeholder.com/200x200?text=NDPR+Toolkit)
6
-
7
- A comprehensive enterprise solution for implementing NDPR-compliant features in web applications, aligned with the Nigerian Data Protection Regulation (NDPR) and Data Protection Act (DPA).
8
-
9
- [![npm version](https://img.shields.io/npm/v/@tantainnovative/ndpr-toolkit.svg)](https://www.npmjs.com/package/@tantainnovative/ndpr-toolkit)
10
- [![license](https://img.shields.io/npm/l/@tantainnovative/ndpr-toolkit.svg)](https://github.com/tantainnovative/ndpr-toolkit/blob/main/LICENSE)
11
- [![TypeScript](https://img.shields.io/badge/TypeScript-4.9%2B-blue)](https://www.typescriptlang.org/)
12
- [![React](https://img.shields.io/badge/React-18.0%2B-blue)](https://reactjs.org/)
13
-
14
- </div>
15
-
16
- ## Overview
17
-
18
- The NDPR Toolkit is an enterprise-grade solution that provides a comprehensive set of React components, hooks, and utilities to help organizations implement NDPR-compliant features in their web applications with minimal development effort. Designed by compliance experts and developers, this toolkit offers a complete solution for privacy policy management, consent handling, data subject rights, breach notification, and data protection impact assessments.
19
-
20
- > **NDPR Toolkit is actively maintained and regularly updated to ensure compliance with the latest Nigerian data protection regulations.**
21
-
22
- ## Key Features
23
-
24
- ### Privacy Policy Management
25
-
26
- - **PolicyGenerator**: Create customizable, NDPR-compliant privacy policies with an intuitive form interface
27
- - **PolicyPreview**: Display generated policies with professional formatting and section navigation
28
- - **PolicyExporter**: Export policies in multiple formats (PDF, HTML, Markdown) with compliance notices
29
-
30
- ### Consent Management
31
-
32
- - **ConsentBanner**: Implement cookie consent banners with customizable appearance and behavior
33
- - **ConsentManager**: Track and manage user consent preferences across your application
34
- - **ConsentStorage**: Securely store and retrieve consent records with built-in persistence
35
-
36
- ### Data Subject Rights (DSR)
37
-
38
- - **DSRRequestForm**: Collect and validate data subject requests with comprehensive form validation
39
- - **DSRTracker**: Monitor the status and progress of data subject requests
40
- - **DSRDashboard**: Visualize and manage all data subject requests in one place
41
-
42
- ### Data Protection Impact Assessment (DPIA)
43
-
44
- - **DPIAQuestionnaire**: Guide users through the DPIA process with step-by-step questionnaires
45
- - **DPIAReport**: Generate comprehensive DPIA reports based on questionnaire responses
46
- - **StepIndicator**: Track progress through multi-step DPIA processes
47
-
48
- ### Breach Notification
49
-
50
- - **BreachReportForm**: Collect essential information about data breaches
51
- - **BreachRiskAssessment**: Evaluate the risk level of reported breaches
52
- - **RegulatoryReportGenerator**: Create NDPR-compliant breach notification reports
53
- - **BreachNotificationManager**: Manage the entire breach notification workflow
54
-
55
- ### Enterprise Features
56
-
57
- - **Advanced Conditional Logic**: Support for complex conditional blocks in policy templates
58
- - **Professional Formatting**: Enterprise-ready formatting for all exported documents
59
- - **Comprehensive Type System**: Full TypeScript support with detailed interfaces and type definitions
60
- - **Modular Architecture**: Use only the components you need with tree-shakable imports
61
- - **Accessibility**: WCAG 2.1 AA compliant components for inclusive user experiences
62
-
63
- ## Installation
64
-
65
- ```bash
66
- # Using npm
67
- npm install @tantainnovative/ndpr-toolkit
68
-
69
- # Using yarn
70
- yarn add @tantainnovative/ndpr-toolkit
71
-
72
- # Using pnpm
73
- pnpm add @tantainnovative/ndpr-toolkit
74
- ```
75
-
76
- ### React 19 Compatibility
77
-
78
- If you&apos;re using React 19 and encounter peer dependency warnings with other packages in your project, you can use the `--legacy-peer-deps` flag:
79
-
80
- ```bash
81
- npm install @tantainnovative/ndpr-toolkit --legacy-peer-deps
82
- ```
83
-
84
- Alternatively, you can create a `.npmrc` file in your project root with the following content:
85
-
86
- ```
87
- legacy-peer-deps=true
88
- ```
89
-
90
- This will make npm ignore peer dependency conflicts during installation.
91
-
92
- ## Quick Start
93
-
94
- ### Consent Management
95
-
96
- ```jsx
97
- import { ConsentBanner, ConsentManager, ConsentStorage, useConsent } from '@tantainnovative/ndpr-toolkit';
98
-
99
- function MyApp() {
100
- return (
101
- <ConsentManager
102
- options={[
103
- {
104
- id: 'necessary',
105
- label: 'Necessary Cookies',
106
- description: 'Essential cookies for the website to function.',
107
- required: true
108
- },
109
- {
110
- id: 'analytics',
111
- label: 'Analytics Cookies',
112
- description: 'Cookies that help us understand how you use our website.',
113
- required: false
114
- }
115
- ]}
116
- storageKey="my-app-consent"
117
- autoLoad={true}
118
- autoSave={true}
119
- >
120
- <AppContent />
121
- <ConsentBanner
122
- position="bottom"
123
- privacyPolicyUrl="/privacy-policy"
124
- showPreferences={true}
125
- onSave={(consents) => console.log('Consent saved:', consents)}
126
- />
127
- </ConsentManager>
128
- );
129
- }
130
-
131
- function AppContent() {
132
- // Use the useConsent hook to manage consent state
133
- const { consents, hasConsented, updateConsent } = useConsent();
134
-
135
- // Check if user has given consent for analytics
136
- if (hasConsented('analytics')) {
137
- // Initialize analytics
138
- }
139
-
140
- return (
141
- <div>
142
- {/* Your app content */}
143
- </div>
144
- );
145
- }
146
- ```
147
-
148
- ### Privacy Policy Generator
149
-
150
- ```jsx
151
- import { PolicyGenerator, PolicyPreview, PolicyExporter, usePrivacyPolicy } from '@tantainnovative/ndpr-toolkit';
152
-
153
- function PrivacyPolicyPage() {
154
- const { policy, updateVariableValue, generatePolicy } = usePrivacyPolicy();
155
- const [generatedPolicy, setGeneratedPolicy] = useState(null);
156
-
157
- // Define your variables
158
- const variables = {
159
- organizationName: 'Acme Corporation',
160
- websiteUrl: 'https://acme.com',
161
- contactEmail: 'privacy@acme.com',
162
- lastUpdated: new Date().toLocaleDateString()
163
- };
164
-
165
- return (
166
- <div>
167
- {!generatedPolicy ? (
168
- <PolicyGenerator
169
- templates={[
170
- {
171
- id: 'standard',
172
- name: 'Standard Privacy Policy',
173
- description: 'A comprehensive privacy policy suitable for most websites and applications.',
174
- sections: [
175
- {
176
- id: 'introduction',
177
- title: 'Introduction',
178
- template: 'This Privacy Policy explains how {{organizationName}} collects, uses, and protects your personal data when you visit {{websiteUrl}}.',
179
- required: true,
180
- included: true
181
- },
182
- // More sections...
183
- ]
184
- }
185
- ]}
186
- variables={variables}
187
- onComplete={(data) => {
188
- // Generate policy with variables
189
- const result = generatePolicyText(data.sections, variables);
190
- setGeneratedPolicy({
191
- title: `Privacy Policy for ${variables.organizationName}`,
192
- content: result.fullText,
193
- lastUpdated: new Date()
194
- });
195
- }}
196
- />
197
- ) : (
198
- <>
199
- <PolicyPreview
200
- policy={generatedPolicy}
201
- variables={variables}
202
- onVariableChange={(newVariables) => {
203
- // Update variables and regenerate policy
204
- }}
205
- />
206
-
207
- <PolicyExporter
208
- policy={generatedPolicy}
209
- formats={['html', 'pdf', 'markdown']}
210
- filename="privacy-policy"
211
- />
212
- </>
213
- )}
214
- </div>
215
- );
216
- }
217
- ```
218
-
219
- ## Component Categories
220
-
221
- ### Consent Management
222
- - `ConsentBanner`: Cookie consent banner with customizable options
223
- - `ConsentManager`: Component for managing consent preferences
224
- - `ConsentStorage`: Storage mechanism for consent settings with support for localStorage, sessionStorage, and cookies
225
- - `useConsent`: Hook for managing consent state
226
-
227
- ### Data Subject Rights
228
- - `DSRRequestForm`: Form for submitting data subject rights requests
229
- - `DSRDashboard`: Admin dashboard for managing DSR requests
230
- - `DSRTracker`: Component for tracking the status of DSR requests
231
- - `useDSR`: Hook for managing DSR state
232
- - Types: `DSRType`, `DSRStatus`, `DSRRequest` for type-safe implementation
233
-
234
- ### DPIA (Data Protection Impact Assessment)
235
- - `DPIAQuestionnaire`: Interactive questionnaire for conducting DPIAs
236
- - `DPIAReport`: Component for generating DPIA reports
237
- - `StepIndicator`: Progress indicator for multi-step processes
238
- - `useDPIA`: Hook for managing DPIA state
239
- - Types: `DPIAQuestion`, `DPIASection`, `DPIARisk`, `DPIAResult` for structured assessments
240
-
241
- ### Breach Notification
242
- - `BreachReportForm`: Form for reporting data breaches
243
- - `BreachRiskAssessment`: Tool for assessing breach risk and severity
244
- - `BreachNotificationManager`: Component for managing breach notifications
245
- - `RegulatoryReportGenerator`: Tool for generating regulatory reports for NITDA
246
- - `useBreach`: Hook for managing breach notification state
247
- - Types: `BreachReport`, `RiskAssessment`, `NotificationRequirement` for compliance with 72-hour notification requirements
248
-
249
- ### Privacy Policy
250
- - `PolicyGenerator`: Component for generating privacy policies
251
- - `PolicyPreview`: Preview component for privacy policies
252
- - `PolicyExporter`: Tool for exporting privacy policies to different formats
253
- - `generatePolicyText`: Utility for creating dynamic policies with variable support
254
- - `usePrivacyPolicy`: Hook for managing privacy policy state
255
-
256
- ## Implementation Guides
257
-
258
- ### Setting Up Consent Management
259
-
260
- ```jsx
261
- // 1. Wrap your application with ConsentManager
262
- import { ConsentManager } from 'ndpr-toolkit';
263
-
264
- function App() {
265
- return (
266
- <ConsentManager
267
- options={[
268
- { id: 'necessary', label: 'Necessary', description: '...', required: true },
269
- { id: 'analytics', label: 'Analytics', description: '...', required: false },
270
- { id: 'marketing', label: 'Marketing', description: '...', required: false }
271
- ]}
272
- storageKey="my-app-consent"
273
- autoLoad={true}
274
- autoSave={true}
275
- >
276
- <YourApp />
277
- </ConsentManager>
278
- );
279
- }
280
-
281
- // 2. Add the ConsentBanner to your layout
282
- import { ConsentBanner } from 'ndpr-toolkit';
283
-
284
- function Layout({ children }) {
285
- return (
286
- <>
287
- {children}
288
- <ConsentBanner
289
- position="bottom"
290
- privacyPolicyUrl="/privacy-policy"
291
- showPreferences={true}
292
- />
293
- </>
294
- );
295
- }
296
-
297
- // 3. Use the consent values in your components
298
- import { useConsent } from 'ndpr-toolkit';
299
-
300
- function AnalyticsComponent() {
301
- const { hasConsented } = useConsent();
302
-
303
- useEffect(() => {
304
- if (hasConsented('analytics')) {
305
- // Initialize analytics
306
- }
307
- }, [hasConsented]);
308
-
309
- return null;
310
- }
311
- ```
312
-
313
- ### Implementing a Data Subject Rights Portal
314
-
315
- ```jsx
316
- import { DSRRequestForm, DSRTracker, DSRDashboard, useDSR } from '@tantainnovative/ndpr-toolkit';
317
-
318
- // 1. Create a form for data subjects to submit requests
319
- function DSRPortal() {
320
- const { submitRequest } = useDSR();
321
-
322
- const handleSubmit = (formData) => {
323
- const request = submitRequest({
324
- type: formData.type,
325
- subject: {
326
- name: formData.name,
327
- email: formData.email,
328
- phone: formData.phone
329
- },
330
- details: formData.details
331
- });
332
-
333
- // Show confirmation with tracking ID
334
- alert(`Your request has been submitted. Your tracking ID is: ${request.id}`);
335
- };
336
-
337
- return (
338
- <DSRRequestForm
339
- onSubmit={handleSubmit}
340
- requestTypes={[
341
- { id: 'access', label: 'Access my data' },
342
- { id: 'rectification', label: 'Correct my data' },
343
- { id: 'erasure', label: 'Delete my data' },
344
- { id: 'restriction', label: 'Restrict processing of my data' },
345
- { id: 'portability', label: 'Data portability' },
346
- { id: 'objection', label: 'Object to processing' }
347
- ]}
348
- />
349
- );
350
- }
351
-
352
- // 2. Create an admin dashboard for managing requests
353
- import { DSRDashboard } from '@tantainnovative/ndpr-toolkit';
354
-
355
- function AdminDashboard() {
356
- const { requests, updateRequest, deleteRequest } = useDSR();
357
-
358
- return (
359
- <DSRDashboard
360
- requests={requests}
361
- onUpdateRequest={updateRequest}
362
- onDeleteRequest={deleteRequest}
363
- />
364
- );
365
- }
366
- ```
367
-
368
- ### Setting Up a Breach Notification System
369
-
370
- ```jsx
371
- import { BreachReportForm, BreachRiskAssessment, RegulatoryReportGenerator, useBreach } from '@tantainnovative/ndpr-toolkit';
372
-
373
- // 1. Create a form for reporting breaches
374
- function BreachReporting() {
375
- const { submitBreachReport } = useBreach();
376
-
377
- const handleSubmit = (formData) => {
378
- const report = submitBreachReport({
379
- title: formData.title,
380
- description: formData.description,
381
- category: formData.category,
382
- discoveredAt: Date.now(),
383
- reporter: {
384
- name: formData.reporterName,
385
- email: formData.reporterEmail,
386
- department: formData.department
387
- },
388
- affectedSystems: formData.systems,
389
- dataTypes: formData.dataTypes,
390
- status: 'ongoing'
391
- });
392
-
393
- // Redirect to risk assessment
394
- navigate(`/breach/${report.id}/assess`);
395
- };
396
-
397
- return (
398
- <BreachReportForm
399
- onSubmit={handleSubmit}
400
- categories={[
401
- { id: 'unauthorized-access', label: 'Unauthorized Access' },
402
- { id: 'data-loss', label: 'Data Loss' },
403
- { id: 'system-compromise', label: 'System Compromise' }
404
- ]}
405
- />
406
- );
407
- }
408
-
409
- // 2. Create a risk assessment component
410
- function RiskAssessment({ breachId }) {
411
- const { performRiskAssessment, determineNotificationRequirements } = useBreach();
412
-
413
- const handleAssessment = (assessmentData) => {
414
- const assessment = performRiskAssessment({
415
- breachId,
416
- assessor: {
417
- name: 'Jane Smith',
418
- role: 'Data Protection Officer',
419
- email: 'jane@example.com'
420
- },
421
- ...assessmentData
422
- });
423
-
424
- const requirements = determineNotificationRequirements({
425
- breachId,
426
- riskAssessmentId: assessment.id
427
- });
428
-
429
- // Show notification requirements
430
- if (requirements.nitdaNotificationRequired) {
431
- // Deadline is 72 hours from discovery
432
- const deadline = new Date(requirements.nitdaNotificationDeadline);
433
- alert(`NITDA notification required by ${deadline.toLocaleString()}`);
434
- }
435
- };
436
-
437
- return (
438
- <BreachRiskAssessment
439
- breachId={breachId}
440
- onComplete={handleAssessment}
441
- />
442
- );
443
- }
444
- ```
445
-
446
- ## Documentation
447
-
448
- For detailed documentation, visit [https://ndpr-toolkit.tantainnovative.com/docs](https://ndpr-toolkit.tantainnovative.com/docs)
449
-
450
- ### API Reference
451
-
452
- Detailed API documentation is available for all components:
453
-
454
- - [Consent Management](https://ndpr-toolkit.tantainnovative.com/docs/components/consent-management)
455
- - [Data Subject Rights](https://ndpr-toolkit.tantainnovative.com/docs/components/data-subject-rights)
456
- - [DPIA Questionnaire](https://ndpr-toolkit.tantainnovative.com/docs/components/dpia-questionnaire)
457
- - [Breach Notification](https://ndpr-toolkit.tantainnovative.com/docs/components/breach-notification)
458
- - [Privacy Policy Generator](https://ndpr-toolkit.tantainnovative.com/docs/components/privacy-policy-generator)
459
- - [React Hooks](https://ndpr-toolkit.tantainnovative.com/docs/components/hooks)
460
-
461
- ## Contributing
462
-
463
- Contributions are welcome! Please feel free to submit a Pull Request.
464
-
465
- ## License
466
-
467
- MIT © Tanta Innovative