@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
Binary file
@@ -1,123 +0,0 @@
1
- @import "tailwindcss";
2
- @import "tw-animate-css";
3
- @import "./accessibility.css";
4
-
5
- @custom-variant dark (&:is(.dark *));
6
-
7
- @theme inline {
8
- --color-background: var(--background);
9
- --color-foreground: var(--foreground);
10
- --font-sans: var(--font-geist-sans);
11
- --font-mono: var(--font-geist-mono);
12
- --color-sidebar-ring: var(--sidebar-ring);
13
- --color-sidebar-border: var(--sidebar-border);
14
- --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
15
- --color-sidebar-accent: var(--sidebar-accent);
16
- --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
17
- --color-sidebar-primary: var(--sidebar-primary);
18
- --color-sidebar-foreground: var(--sidebar-foreground);
19
- --color-sidebar: var(--sidebar);
20
- --color-chart-5: var(--chart-5);
21
- --color-chart-4: var(--chart-4);
22
- --color-chart-3: var(--chart-3);
23
- --color-chart-2: var(--chart-2);
24
- --color-chart-1: var(--chart-1);
25
- --color-ring: var(--ring);
26
- --color-input: var(--input);
27
- --color-border: var(--border);
28
- --color-destructive: var(--destructive);
29
- --color-accent-foreground: var(--accent-foreground);
30
- --color-accent: var(--accent);
31
- --color-muted-foreground: var(--muted-foreground);
32
- --color-muted: var(--muted);
33
- --color-secondary-foreground: var(--secondary-foreground);
34
- --color-secondary: var(--secondary);
35
- --color-primary-foreground: var(--primary-foreground);
36
- --color-primary: var(--primary);
37
- --color-popover-foreground: var(--popover-foreground);
38
- --color-popover: var(--popover);
39
- --color-card-foreground: var(--card-foreground);
40
- --color-card: var(--card);
41
- --radius-sm: calc(var(--radius) - 4px);
42
- --radius-md: calc(var(--radius) - 2px);
43
- --radius-lg: var(--radius);
44
- --radius-xl: calc(var(--radius) + 4px);
45
- }
46
-
47
- :root {
48
- --radius: 0.625rem;
49
- --background: oklch(1 0 0);
50
- --foreground: oklch(0.13 0.028 261.692);
51
- --card: oklch(1 0 0);
52
- --card-foreground: oklch(0.13 0.028 261.692);
53
- --popover: oklch(1 0 0);
54
- --popover-foreground: oklch(0.13 0.028 261.692);
55
- --primary: oklch(0.21 0.034 264.665);
56
- --primary-foreground: oklch(0.985 0.002 247.839);
57
- --secondary: oklch(0.967 0.003 264.542);
58
- --secondary-foreground: oklch(0.21 0.034 264.665);
59
- --muted: oklch(0.967 0.003 264.542);
60
- --muted-foreground: oklch(0.551 0.027 264.364);
61
- --accent: oklch(0.967 0.003 264.542);
62
- --accent-foreground: oklch(0.21 0.034 264.665);
63
- --destructive: oklch(0.577 0.245 27.325);
64
- --border: oklch(0.928 0.006 264.531);
65
- --input: oklch(0.928 0.006 264.531);
66
- --ring: oklch(0.707 0.022 261.325);
67
- --chart-1: oklch(0.646 0.222 41.116);
68
- --chart-2: oklch(0.6 0.118 184.704);
69
- --chart-3: oklch(0.398 0.07 227.392);
70
- --chart-4: oklch(0.828 0.189 84.429);
71
- --chart-5: oklch(0.769 0.188 70.08);
72
- --sidebar: oklch(0.985 0.002 247.839);
73
- --sidebar-foreground: oklch(0.13 0.028 261.692);
74
- --sidebar-primary: oklch(0.21 0.034 264.665);
75
- --sidebar-primary-foreground: oklch(0.985 0.002 247.839);
76
- --sidebar-accent: oklch(0.967 0.003 264.542);
77
- --sidebar-accent-foreground: oklch(0.21 0.034 264.665);
78
- --sidebar-border: oklch(0.928 0.006 264.531);
79
- --sidebar-ring: oklch(0.707 0.022 261.325);
80
- }
81
-
82
- .dark {
83
- --background: oklch(0.13 0.028 261.692);
84
- --foreground: oklch(0.985 0.002 247.839);
85
- --card: oklch(0.21 0.034 264.665);
86
- --card-foreground: oklch(0.985 0.002 247.839);
87
- --popover: oklch(0.21 0.034 264.665);
88
- --popover-foreground: oklch(0.985 0.002 247.839);
89
- --primary: oklch(0.928 0.006 264.531);
90
- --primary-foreground: oklch(0.21 0.034 264.665);
91
- --secondary: oklch(0.278 0.033 256.848);
92
- --secondary-foreground: oklch(0.985 0.002 247.839);
93
- --muted: oklch(0.278 0.033 256.848);
94
- --muted-foreground: oklch(0.707 0.022 261.325);
95
- --accent: oklch(0.278 0.033 256.848);
96
- --accent-foreground: oklch(0.985 0.002 247.839);
97
- --destructive: oklch(0.704 0.191 22.216);
98
- --border: oklch(1 0 0 / 10%);
99
- --input: oklch(1 0 0 / 15%);
100
- --ring: oklch(0.551 0.027 264.364);
101
- --chart-1: oklch(0.488 0.243 264.376);
102
- --chart-2: oklch(0.696 0.17 162.48);
103
- --chart-3: oklch(0.769 0.188 70.08);
104
- --chart-4: oklch(0.627 0.265 303.9);
105
- --chart-5: oklch(0.645 0.246 16.439);
106
- --sidebar: oklch(0.21 0.034 264.665);
107
- --sidebar-foreground: oklch(0.985 0.002 247.839);
108
- --sidebar-primary: oklch(0.488 0.243 264.376);
109
- --sidebar-primary-foreground: oklch(0.985 0.002 247.839);
110
- --sidebar-accent: oklch(0.278 0.033 256.848);
111
- --sidebar-accent-foreground: oklch(0.985 0.002 247.839);
112
- --sidebar-border: oklch(1 0 0 / 10%);
113
- --sidebar-ring: oklch(0.551 0.027 264.364);
114
- }
115
-
116
- @layer base {
117
- * {
118
- @apply border-border outline-ring/50;
119
- }
120
- body {
121
- @apply bg-background text-foreground;
122
- }
123
- }
@@ -1,37 +0,0 @@
1
- import type { Metadata } from "next";
2
- import { Geist, Geist_Mono } from "next/font/google";
3
- import { ErrorBoundary } from "@/components/ErrorBoundary";
4
- import "./globals.css";
5
-
6
- const geistSans = Geist({
7
- variable: "--font-geist-sans",
8
- subsets: ["latin"],
9
- });
10
-
11
- const geistMono = Geist_Mono({
12
- variable: "--font-geist-mono",
13
- subsets: ["latin"],
14
- });
15
-
16
- export const metadata: Metadata = {
17
- title: "NDPR Toolkit - Nigerian Data Protection Compliance",
18
- description: "Open-source toolkit for implementing NDPR and DPA compliant features in Nigerian applications",
19
- };
20
-
21
- export default function RootLayout({
22
- children,
23
- }: Readonly<{
24
- children: React.ReactNode;
25
- }>) {
26
- return (
27
- <html lang="en">
28
- <body
29
- className={`${geistSans.variable} ${geistMono.variable} antialiased`}
30
- >
31
- <ErrorBoundary>
32
- {children}
33
- </ErrorBoundary>
34
- </body>
35
- </html>
36
- );
37
- }
@@ -1,354 +0,0 @@
1
- 'use client';
2
-
3
- import React, { useState, useEffect } from 'react';
4
- import Link from 'next/link';
5
- import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
6
- import { BreachReportForm, BreachRiskAssessment, BreachNotificationManager, BreachReport, RiskAssessment, RegulatoryReportGenerator } from '@tantainnovative/ndpr-toolkit';
7
- import { v4 as uuidv4 } from 'uuid';
8
- import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '@/components/ui/Card';
9
-
10
- export default function BreachDemoPage() {
11
- const [activeTab, setActiveTab] = useState('notification');
12
- const [isClient, setIsClient] = useState(false);
13
- const [breaches, setBreaches] = useState<BreachReport[]>([]);
14
- const [riskAssessments, setRiskAssessments] = useState<RiskAssessment[]>([]);
15
- // Define interface based on documentation for regulatory notifications
16
- interface RegulatoryNotification {
17
- id: string;
18
- breachId: string;
19
- sentAt: number;
20
- method: 'email' | 'portal' | 'letter' | 'other';
21
- referenceNumber?: string;
22
- content: string;
23
- attachments?: Array<{
24
- id: string;
25
- name: string;
26
- type: string;
27
- url: string;
28
- }>;
29
- }
30
-
31
- const [regulatoryNotifications, setRegulatoryNotifications] = useState<RegulatoryNotification[]>([]);
32
- const [selectedBreach, setSelectedBreach] = useState<BreachReport | null>(null);
33
-
34
- // This effect runs only on the client side after hydration
35
- useEffect(() => {
36
- setIsClient(true);
37
-
38
- // Load sample data for demo purposes
39
- const sampleBreaches: BreachReport[] = [
40
- {
41
- id: uuidv4(),
42
- title: 'Customer Database Unauthorized Access',
43
- description: 'Unauthorized access to customer database detected through suspicious login patterns',
44
- category: 'unauthorized_access',
45
- discoveredAt: Date.now() - 5 * 24 * 60 * 60 * 1000, // 5 days ago
46
- reportedAt: Date.now() - 4 * 24 * 60 * 60 * 1000, // 4 days ago
47
- reporter: {
48
- name: 'John Smith',
49
- email: 'john@example.com',
50
- department: 'IT Security'
51
- },
52
- affectedSystems: ['customer_database', 'user_accounts'],
53
- dataTypes: ['name', 'email', 'phone', 'address'],
54
- estimatedAffectedSubjects: 1200,
55
- status: 'ongoing',
56
- initialActions: 'Access blocked, passwords reset, system isolated for investigation'
57
- },
58
- {
59
- id: uuidv4(),
60
- title: 'Employee Email Phishing Incident',
61
- description: 'Several employees clicked on phishing links potentially exposing credentials',
62
- category: 'phishing',
63
- discoveredAt: Date.now() - 10 * 24 * 60 * 60 * 1000, // 10 days ago
64
- reportedAt: Date.now() - 9 * 24 * 60 * 60 * 1000, // 9 days ago
65
- reporter: {
66
- name: 'Jane Doe',
67
- email: 'jane@example.com',
68
- department: 'HR'
69
- },
70
- affectedSystems: ['email_system', 'employee_accounts'],
71
- dataTypes: ['email credentials'],
72
- estimatedAffectedSubjects: 0, // No confirmed data exposure
73
- status: 'resolved',
74
- initialActions: 'Password resets, email scanning, blocking of malicious domains'
75
- },
76
- {
77
- id: uuidv4(),
78
- title: 'Lost Company Laptop',
79
- description: 'Employee reported company laptop lost during business travel',
80
- category: 'device_loss',
81
- discoveredAt: Date.now() - 15 * 24 * 60 * 60 * 1000, // 15 days ago
82
- reportedAt: Date.now() - 15 * 24 * 60 * 60 * 1000, // 15 days ago
83
- reporter: {
84
- name: 'Robert Johnson',
85
- email: 'robert@example.com',
86
- department: 'Sales'
87
- },
88
- affectedSystems: ['laptop_device', 'company_data'],
89
- dataTypes: ['name', 'email', 'project data'],
90
- estimatedAffectedSubjects: 50,
91
- status: 'resolved',
92
- initialActions: 'Remote wipe initiated, account passwords changed'
93
- }
94
- ];
95
-
96
- setBreaches(sampleBreaches);
97
- }, []);
98
-
99
- const handleSubmitBreach = (data: {
100
- title: string;
101
- description: string;
102
- category?: string;
103
- reporter?: {
104
- name?: string;
105
- email?: string;
106
- department?: string;
107
- };
108
- affectedSystems?: string[];
109
- dataTypes?: string[];
110
- estimatedAffectedSubjects?: number;
111
- initialActions?: string;
112
- }) => {
113
- const newBreach: BreachReport = {
114
- id: uuidv4(),
115
- title: data.title,
116
- description: data.description,
117
- category: data.category || 'other',
118
- discoveredAt: Date.now(),
119
- reportedAt: Date.now(),
120
- reporter: {
121
- name: data.reporter?.name || 'Anonymous',
122
- email: data.reporter?.email || 'anonymous@example.com',
123
- department: data.reporter?.department || 'Unknown'
124
- },
125
- affectedSystems: data.affectedSystems || [],
126
- dataTypes: data.dataTypes || [],
127
- estimatedAffectedSubjects: data.estimatedAffectedSubjects || 0,
128
- status: 'ongoing',
129
- initialActions: data.initialActions || ''
130
- };
131
-
132
- setBreaches((prev) => [newBreach, ...prev]);
133
- setActiveTab('register');
134
- };
135
-
136
- const handleUpdateBreach = (breachId: string, updates: Partial<BreachReport>) => {
137
- setBreaches((prev) =>
138
- prev.map((breach) => {
139
- if (breach.id === breachId) {
140
- return {
141
- ...breach,
142
- ...updates
143
- };
144
- }
145
- return breach;
146
- })
147
- );
148
- };
149
-
150
- const handleSelectBreach = (breachId: string) => {
151
- const breach = breaches.find((b) => b.id === breachId);
152
- setSelectedBreach(breach || null);
153
- setActiveTab('assessment');
154
- };
155
-
156
- // Add a function to handle regulatory notifications
157
- const handleGenerateReport = (breachId: string) => {
158
- if (!selectedBreach) return;
159
-
160
- // Create a sample regulatory notification based on the breach
161
- const newNotification: RegulatoryNotification = {
162
- id: uuidv4(),
163
- breachId: breachId,
164
- sentAt: Date.now(),
165
- method: 'email',
166
- content: `Notification regarding breach: ${selectedBreach.title}`,
167
- referenceNumber: `REF-${Date.now().toString().substring(0, 8)}`
168
- };
169
-
170
- // Add to notifications list
171
- setRegulatoryNotifications(prev => [...prev, newNotification]);
172
-
173
- // Update breach status
174
- handleUpdateBreach(breachId, { status: 'contained' }); // Using a valid status from the BreachReport type
175
- };
176
-
177
- if (!isClient) {
178
- return <div>Loading...</div>;
179
- }
180
-
181
- return (
182
- <div className="container mx-auto py-10">
183
- <div className="mb-6">
184
- <Link href="/ndpr-demos" className="text-blue-600 hover:underline">
185
- ← Back to NDPR Demos
186
- </Link>
187
- </div>
188
-
189
- <h1 className="text-3xl font-bold mb-8">Breach Management Demo</h1>
190
-
191
- <Tabs value={activeTab} onValueChange={setActiveTab}>
192
- <TabsList className="mb-6">
193
- <TabsTrigger value="notification">Breach Notification</TabsTrigger>
194
- <TabsTrigger value="register">Breach Register</TabsTrigger>
195
- <TabsTrigger value="assessment">Breach Assessment</TabsTrigger>
196
- </TabsList>
197
-
198
- <TabsContent value="notification" className="mt-6">
199
- <Card>
200
- <CardHeader>
201
- <CardTitle>Breach Notification Form</CardTitle>
202
- <CardDescription>
203
- This form is used to report and document data breaches within your organization.
204
- </CardDescription>
205
- </CardHeader>
206
- <CardContent>
207
- <BreachReportForm
208
- onSubmit={handleSubmitBreach}
209
- title="Report a Data Breach"
210
- categories={[
211
- { id: 'unauthorized_access', name: 'Unauthorized Access', description: 'Unauthorized access to systems or data', defaultSeverity: 'high' },
212
- { id: 'phishing', name: 'Phishing Attack', description: 'Phishing or social engineering attack', defaultSeverity: 'medium' },
213
- { id: 'device_loss', name: 'Device Loss/Theft', description: 'Loss or theft of device containing personal data', defaultSeverity: 'medium' },
214
- { id: 'malware', name: 'Malware/Ransomware', description: 'Malware or ransomware infection', defaultSeverity: 'high' },
215
- { id: 'other', name: 'Other', description: 'Other type of data breach', defaultSeverity: 'medium' }
216
- ]}
217
- />
218
- </CardContent>
219
- </Card>
220
- </TabsContent>
221
-
222
- <TabsContent value="register" className="mt-6">
223
- <Card>
224
- <CardHeader>
225
- <CardTitle>Breach Register</CardTitle>
226
- <CardDescription>
227
- This component maintains a register of all data breaches and their current status.
228
- </CardDescription>
229
- </CardHeader>
230
- <CardContent>
231
- <BreachNotificationManager
232
- breachReports={breaches}
233
- riskAssessments={riskAssessments}
234
- regulatoryNotifications={regulatoryNotifications}
235
- onSelectBreach={handleSelectBreach}
236
- onRequestAssessment={(breachId) => {
237
- handleSelectBreach(breachId);
238
- setActiveTab('assessment');
239
- }}
240
- onRequestNotification={(breachId: string) => {
241
- handleSelectBreach(breachId);
242
- // Generate a regulatory notification
243
- setTimeout(() => {
244
- if (selectedBreach) {
245
- handleGenerateReport(breachId);
246
- }
247
- }, 500);
248
- }}
249
- title="Data Breach Register"
250
- description="A record of all data breaches and security incidents affecting personal data."
251
- showBreachDetails={true}
252
- showNotificationTimeline={true}
253
- showDeadlineAlerts={true}
254
- />
255
- </CardContent>
256
- </Card>
257
- </TabsContent>
258
-
259
- <TabsContent value="assessment" className="mt-6">
260
- <Card>
261
- <CardHeader>
262
- <CardTitle>Breach Assessment</CardTitle>
263
- <CardDescription>
264
- This component helps assess the severity and impact of a data breach.
265
- </CardDescription>
266
- </CardHeader>
267
- <CardContent>
268
- {selectedBreach ? (
269
- <div className="space-y-8">
270
- <BreachRiskAssessment
271
- breachData={selectedBreach}
272
- onComplete={(assessment: RiskAssessment) => {
273
- if (selectedBreach) {
274
- // Update the breach status based on the assessment
275
- handleUpdateBreach(selectedBreach.id, {
276
- status: assessment.riskLevel === 'critical' ? 'ongoing' : 'contained',
277
- });
278
-
279
- // Store the risk assessment
280
- const newAssessment = {
281
- ...assessment,
282
- id: uuidv4(),
283
- breachId: selectedBreach.id,
284
- assessedAt: Date.now(),
285
- assessor: {
286
- name: 'Demo User',
287
- role: 'Data Protection Officer',
288
- email: 'dpo@example.com'
289
- }
290
- };
291
-
292
- setRiskAssessments(prev => {
293
- // Remove any existing assessment for this breach
294
- const filtered = prev.filter(a => a.breachId !== selectedBreach.id);
295
- // Add the new assessment
296
- return [...filtered, newAssessment];
297
- });
298
- }
299
- }}
300
- title="Breach Risk Assessment"
301
- description="Assess the severity, impact, and required actions for this data breach."
302
- className=""
303
- buttonClassName=""
304
- showBreachSummary={true}
305
- showNotificationRequirements={true}
306
- />
307
-
308
- {/* Add Regulatory Report Generator component */}
309
- <div className="mt-8 pt-8 border-t border-gray-200">
310
- <h3 className="text-lg font-medium mb-4">Generate Regulatory Report</h3>
311
- <RegulatoryReportGenerator
312
- breachData={selectedBreach}
313
- organizationInfo={{
314
- name: 'Example Company Ltd.',
315
- address: '123 Main Street, Lagos, Nigeria',
316
- dpoName: 'John Doe',
317
- dpoEmail: 'dpo@example.com',
318
- dpoPhone: '+234 123 456 7890'
319
- }}
320
- onGenerate={() => handleGenerateReport(selectedBreach.id)}
321
- />
322
- </div>
323
- </div>
324
- ) : (
325
- <div className="p-4 text-center">
326
- <p>No breach selected. Please select a breach from the Breach Register.</p>
327
- </div>
328
- )}
329
- </CardContent>
330
- </Card>
331
- </TabsContent>
332
- </Tabs>
333
-
334
- <div className="mt-10 p-4 bg-gray-100 rounded-lg">
335
- <h2 className="text-xl font-semibold mb-2">Implementation Notes</h2>
336
- <p className="mb-4">
337
- This demo showcases the breach management components from the NDPR Toolkit:
338
- </p>
339
- <ul className="list-disc pl-5 space-y-2">
340
- <li><code>BreachReportForm</code>: For reporting and documenting data breaches</li>
341
- <li><code>BreachRegister</code>: For maintaining a record of all data breaches</li>
342
- <li><code>BreachAssessment</code>: For assessing the severity and impact of breaches</li>
343
- </ul>
344
- <p className="mt-4">
345
- For detailed documentation, see the{' '}
346
- <Link href="/docs/components/breach-management" className="text-blue-600 hover:underline">
347
- Breach Management documentation
348
- </Link>
349
- .
350
- </p>
351
- </div>
352
- </div>
353
- );
354
- }