@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
@@ -1,418 +0,0 @@
1
- 'use client';
2
-
3
- import React, { useRef } from 'react';
4
- import CheckboxField from '../shared/CheckboxField';
5
- import CheckboxGroup from '../shared/CheckboxGroup';
6
- import FormField from '../shared/FormField';
7
- import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/Card';
8
- import { TextArea } from '@/components/ui/TextArea';
9
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
- import { cn } from '@/lib/utils';
11
-
12
- interface DataSharingStepProps {
13
- formData: {
14
- thirdPartySharing: boolean;
15
- thirdParties: string[];
16
- thirdPartyCategories: string[];
17
- thirdPartyPurposes: string[];
18
- cookiesUsed: boolean;
19
- cookieTypes: string[];
20
- cookieLifespan: string;
21
- trackingTechnologies: string[];
22
- internationalTransfers: boolean;
23
- transferCountries: string[];
24
- transferSafeguards: string[];
25
- processesChildrenData: boolean;
26
- childrenDataDetails: string;
27
- processesSpecialCategories: boolean;
28
- specialCategoriesDetails: string;
29
- dataBreachProcedures: string;
30
- regulatoryCompliance: string[];
31
- };
32
- errors: Record<string, string>;
33
- onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => void;
34
- onToggleItem: (
35
- category:
36
- 'cookieTypes' |
37
- 'transferCountries' |
38
- 'trackingTechnologies' |
39
- 'transferSafeguards' |
40
- 'thirdPartyCategories' |
41
- 'thirdPartyPurposes' |
42
- 'regulatoryCompliance',
43
- item: string
44
- ) => void;
45
- onAddThirdParty: () => void;
46
- onRemoveThirdParty: (index: number) => void;
47
- defaultCookieTypes: string[];
48
- commonTransferCountries: string[];
49
- trackingTechnologies: string[];
50
- transferSafeguards: string[];
51
- }
52
-
53
- export default function DataSharingStep({
54
- formData,
55
- errors,
56
- onChange,
57
- onToggleItem,
58
- onAddThirdParty,
59
- onRemoveThirdParty,
60
- defaultCookieTypes,
61
- commonTransferCountries,
62
- trackingTechnologies,
63
- transferSafeguards,
64
- }: DataSharingStepProps) {
65
- const thirdPartyInputRef = useRef<HTMLInputElement>(null);
66
-
67
- // Define third party categories
68
- const thirdPartyCategories = [
69
- 'Cloud service providers',
70
- 'Payment processors',
71
- 'Analytics providers',
72
- 'Marketing and advertising partners',
73
- 'Customer support services',
74
- 'Social media platforms',
75
- 'Delivery and logistics providers',
76
- 'IT and system maintenance providers',
77
- 'Professional advisors (legal, accounting)',
78
- 'Regulatory authorities',
79
- 'Business partners',
80
- 'Affiliates and subsidiaries'
81
- ];
82
-
83
- // Define third party purposes
84
- const thirdPartyPurposes = [
85
- 'Processing payments',
86
- 'Delivering products or services',
87
- 'Customer support',
88
- 'Analytics and performance monitoring',
89
- 'Marketing and advertising',
90
- 'Fraud prevention and security',
91
- 'Legal and regulatory compliance',
92
- 'Service optimization',
93
- 'Research and development',
94
- 'Business operations'
95
- ];
96
-
97
- // Define regulatory compliance options
98
- const regulatoryComplianceOptions = [
99
- 'General Data Protection Regulation (GDPR)',
100
- 'California Consumer Privacy Act (CCPA)',
101
- 'Personal Information Protection and Electronic Documents Act (PIPEDA)',
102
- 'Health Insurance Portability and Accountability Act (HIPAA)',
103
- 'Children\'s Online Privacy Protection Act (COPPA)',
104
- 'Payment Card Industry Data Security Standard (PCI DSS)',
105
- 'South Africa\'s Protection of Personal Information Act (POPIA)',
106
- 'Kenya\'s Data Protection Act',
107
- 'Ghana\'s Data Protection Act',
108
- 'ISO 27001 Information Security Standard'
109
- ];
110
-
111
- return (
112
- <div className="space-y-8">
113
- {/* Third-Party Sharing */}
114
- <Card className="overflow-hidden shadow-md border border-gray-200 dark:border-gray-700">
115
- <CardHeader className="bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3">
116
- <CardTitle className="text-lg font-semibold text-gray-800 dark:text-white">Third-Party Sharing</CardTitle>
117
- <CardDescription className="text-sm text-gray-600 dark:text-gray-300">
118
- Specify if and how you share personal data with third parties
119
- </CardDescription>
120
- </CardHeader>
121
- <CardContent className="pt-5">
122
- <CheckboxField
123
- id="thirdPartySharing"
124
- name="thirdPartySharing"
125
- label="We don&apos;t share your data with third parties"
126
- checked={formData.thirdPartySharing}
127
- onChange={onChange}
128
- className="mb-4"
129
- />
130
-
131
- {formData.thirdPartySharing && (
132
- <div className="space-y-4">
133
- <FormField
134
- id="thirdPartyInput"
135
- label="Add Specific Third Parties"
136
- error={errors.thirdParties}
137
- >
138
- <div className="flex space-x-2 mb-2">
139
- <input
140
- ref={thirdPartyInputRef}
141
- type="text"
142
- id="thirdPartyInput"
143
- placeholder="e.g., Google Analytics, Stripe"
144
- className="block w-full rounded-md border-gray-300 dark:border-gray-600 shadow-sm focus:border-blue-500 focus:ring-blue-500 dark:bg-gray-700 dark:text-white sm:text-sm"
145
- />
146
- <button
147
- type="button"
148
- onClick={onAddThirdParty}
149
- className="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md shadow-sm text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
150
- >
151
- Add
152
- </button>
153
- </div>
154
- </FormField>
155
-
156
- {formData.thirdParties.length > 0 && (
157
- <div className="mt-2">
158
- <label className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">Added Third Parties:</label>
159
- <ul className="space-y-1">
160
- {formData.thirdParties.map((party, index) => (
161
- <li key={index} className="flex justify-between items-center bg-gray-50 dark:bg-gray-800 px-3 py-2 rounded-md text-sm">
162
- <span>{party}</span>
163
- <button
164
- type="button"
165
- onClick={() => onRemoveThirdParty(index)}
166
- className="text-red-600 hover:text-red-800 dark:text-red-400 dark:hover:text-red-300"
167
- >
168
- Remove
169
- </button>
170
- </li>
171
- ))}
172
- </ul>
173
- </div>
174
- )}
175
-
176
- <CheckboxGroup
177
- title="Categories of Third Parties"
178
- items={thirdPartyCategories}
179
- selectedItems={formData.thirdPartyCategories}
180
- onToggleItem={(item) => onToggleItem('thirdPartyCategories', item)}
181
- required
182
- error={errors.thirdPartyCategories}
183
- columns={1}
184
- />
185
-
186
- <CheckboxGroup
187
- title="Purposes of Sharing"
188
- items={thirdPartyPurposes}
189
- selectedItems={formData.thirdPartyPurposes}
190
- onToggleItem={(item) => onToggleItem('thirdPartyPurposes', item)}
191
- required
192
- error={errors.thirdPartyPurposes}
193
- columns={1}
194
- />
195
- </div>
196
- )}
197
- </CardContent>
198
- </Card>
199
-
200
- {/* Cookies and Tracking */}
201
- <Card className="overflow-hidden shadow-md border border-gray-200 dark:border-gray-700">
202
- <CardHeader className="bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3">
203
- <CardTitle className="text-lg font-semibold text-gray-800 dark:text-white">Cookies and Tracking Technologies</CardTitle>
204
- <CardDescription className="text-sm text-gray-600 dark:text-gray-300">
205
- Specify how you use cookies and other tracking technologies
206
- </CardDescription>
207
- </CardHeader>
208
- <CardContent className="pt-5">
209
- <CheckboxField
210
- id="cookiesUsed"
211
- name="cookiesUsed"
212
- label="We use cookies and similar tracking technologies"
213
- checked={formData.cookiesUsed}
214
- onChange={onChange}
215
- className="mb-4"
216
- />
217
-
218
- {formData.cookiesUsed && (
219
- <div className="space-y-4">
220
- <CheckboxGroup
221
- title="Types of Cookies Used"
222
- items={defaultCookieTypes}
223
- selectedItems={formData.cookieTypes}
224
- onToggleItem={(item) => onToggleItem('cookieTypes', item)}
225
- required
226
- error={errors.cookieTypes}
227
- columns={2}
228
- />
229
-
230
- <FormField
231
- id="cookieLifespan"
232
- label="Cookie Lifespan"
233
- required
234
- error={errors.cookieLifespan}
235
- >
236
- <select
237
- id="cookieLifespan"
238
- name="cookieLifespan"
239
- value={formData.cookieLifespan}
240
- onChange={onChange}
241
- className={`mt-1 block w-full rounded-md shadow-sm sm:text-sm ${
242
- errors.cookieLifespan
243
- ? 'border-red-300 focus:border-red-500 focus:ring-red-500'
244
- : 'border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500'
245
- } dark:bg-gray-700 dark:text-white`}
246
- >
247
- <option value="">Select cookie lifespan</option>
248
- <option value="Session only">Session only</option>
249
- <option value="1 day">1 day</option>
250
- <option value="7 days">7 days</option>
251
- <option value="30 days">30 days</option>
252
- <option value="90 days">90 days</option>
253
- <option value="1 year">1 year</option>
254
- <option value="2 years">2 years</option>
255
- <option value="Varies by cookie type">Varies by cookie type</option>
256
- </select>
257
- </FormField>
258
-
259
- <CheckboxGroup
260
- title="Other Tracking Technologies Used"
261
- items={trackingTechnologies}
262
- selectedItems={formData.trackingTechnologies}
263
- onToggleItem={(item) => onToggleItem('trackingTechnologies', item)}
264
- columns={2}
265
- />
266
- </div>
267
- )}
268
- </CardContent>
269
- </Card>
270
-
271
- {/* International Transfers */}
272
- <Card className="overflow-hidden shadow-md border border-gray-200 dark:border-gray-700">
273
- <CardHeader className="bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3">
274
- <CardTitle className="text-lg font-semibold text-gray-800 dark:text-white">International Data Transfers</CardTitle>
275
- <CardDescription className="text-sm text-gray-600 dark:text-gray-300">
276
- Specify if you transfer data internationally and the safeguards in place
277
- </CardDescription>
278
- </CardHeader>
279
- <CardContent className="pt-5">
280
- <CheckboxField
281
- id="internationalTransfers"
282
- name="internationalTransfers"
283
- label="We transfer data internationally"
284
- checked={formData.internationalTransfers}
285
- onChange={onChange}
286
- className="mb-4"
287
- />
288
-
289
- {formData.internationalTransfers && (
290
- <div className="space-y-4">
291
- <CheckboxGroup
292
- title="Countries or Regions of Transfer"
293
- items={commonTransferCountries}
294
- selectedItems={formData.transferCountries}
295
- onToggleItem={(item) => onToggleItem('transferCountries', item)}
296
- required
297
- error={errors.transferCountries}
298
- columns={2}
299
- />
300
-
301
- <CheckboxGroup
302
- title="Transfer Safeguards"
303
- items={transferSafeguards}
304
- selectedItems={formData.transferSafeguards}
305
- onToggleItem={(item) => onToggleItem('transferSafeguards', item)}
306
- required
307
- error={errors.transferSafeguards}
308
- columns={1}
309
- />
310
- </div>
311
- )}
312
- </CardContent>
313
- </Card>
314
-
315
- {/* Special Categories */}
316
- <Card className="overflow-hidden shadow-md border border-gray-200 dark:border-gray-700">
317
- <CardHeader className="bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3">
318
- <CardTitle className="text-lg font-semibold text-gray-800 dark:text-white">Special Categories of Data</CardTitle>
319
- <CardDescription className="text-sm text-gray-600 dark:text-gray-300">
320
- Specify if you process children&apos;s data or special categories of personal data
321
- </CardDescription>
322
- </CardHeader>
323
- <CardContent className="pt-5">
324
- <div className="space-y-4">
325
- <CheckboxField
326
- id="processesChildrenData"
327
- name="processesChildrenData"
328
- label="We process data of children under 18"
329
- checked={formData.processesChildrenData}
330
- onChange={onChange}
331
- className="mb-2"
332
- />
333
-
334
- {formData.processesChildrenData && (
335
- <FormField
336
- id="childrenDataDetails"
337
- label="Details about children's data processing"
338
- required
339
- error={errors.childrenDataDetails}
340
- >
341
- <TextArea
342
- id="childrenDataDetails"
343
- name="childrenDataDetails"
344
- value={formData.childrenDataDetails}
345
- onChange={onChange}
346
- rows={3}
347
- placeholder="Explain how you collect, use, and protect children's data, including parental consent mechanisms"
348
- />
349
- </FormField>
350
- )}
351
-
352
- <CheckboxField
353
- id="processesSpecialCategories"
354
- name="processesSpecialCategories"
355
- label="We process special categories of data (race, ethnicity, health, biometric, etc.)"
356
- checked={formData.processesSpecialCategories}
357
- onChange={onChange}
358
- className="mb-2"
359
- />
360
-
361
- {formData.processesSpecialCategories && (
362
- <FormField
363
- id="specialCategoriesDetails"
364
- label="Details about special category data processing"
365
- required
366
- error={errors.specialCategoriesDetails}
367
- >
368
- <TextArea
369
- id="specialCategoriesDetails"
370
- name="specialCategoriesDetails"
371
- value={formData.specialCategoriesDetails}
372
- onChange={onChange}
373
- rows={3}
374
- placeholder="Explain what special categories of data you process, why, and the legal basis for processing"
375
- />
376
- </FormField>
377
- )}
378
- </div>
379
- </CardContent>
380
- </Card>
381
-
382
- {/* Additional Compliance */}
383
- <Card className="overflow-hidden shadow-md border border-gray-200 dark:border-gray-700">
384
- <CardHeader className="bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3">
385
- <CardTitle className="text-lg font-semibold text-gray-800 dark:text-white">Additional Compliance</CardTitle>
386
- <CardDescription className="text-sm text-gray-600 dark:text-gray-300">
387
- Specify additional compliance measures and regulatory frameworks
388
- </CardDescription>
389
- </CardHeader>
390
- <CardContent className="pt-5">
391
- <div className="space-y-4">
392
- <FormField
393
- id="dataBreachProcedures"
394
- label="Data Breach Procedures"
395
- >
396
- <TextArea
397
- id="dataBreachProcedures"
398
- name="dataBreachProcedures"
399
- value={formData.dataBreachProcedures}
400
- onChange={onChange}
401
- rows={3}
402
- placeholder="Describe your procedures for handling data breaches, including notification timelines"
403
- />
404
- </FormField>
405
-
406
- <CheckboxGroup
407
- title="Additional Regulatory Compliance"
408
- items={regulatoryComplianceOptions}
409
- selectedItems={formData.regulatoryCompliance}
410
- onToggleItem={(item) => onToggleItem('regulatoryCompliance', item)}
411
- columns={1}
412
- />
413
- </div>
414
- </CardContent>
415
- </Card>
416
- </div>
417
- );
418
- }
@@ -1,202 +0,0 @@
1
- 'use client';
2
-
3
- import React from 'react';
4
- import { FormField } from '@/components/ui/FormField';
5
- import { Input } from '@/components/ui/Input';
6
- import { TextArea } from '@/components/ui/TextArea';
7
- import { Checkbox } from '@/components/ui/Checkbox';
8
- import { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/Card';
9
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
- import { cn } from '@/lib/utils';
11
-
12
- interface OrganizationInfoStepProps {
13
- formData: {
14
- organizationName: string;
15
- organizationContact: string;
16
- organizationWebsite: string;
17
- organizationAddress: string;
18
- hasDPO: boolean;
19
- dpoContact: string;
20
- includeNDPRCompliance: boolean;
21
- };
22
- errors: Record<string, string>;
23
- onChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
24
- }
25
-
26
- export default function OrganizationInfoStep({
27
- formData,
28
- errors,
29
- onChange,
30
- }: OrganizationInfoStepProps) {
31
- return (
32
- <div className="space-y-8">
33
- <Card className="overflow-hidden shadow-md border border-gray-200 dark:border-gray-700">
34
- <CardHeader className="bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3">
35
- <CardTitle className="text-lg font-semibold text-gray-800 dark:text-white">Organization Details</CardTitle>
36
- <CardDescription className="text-sm text-gray-600 dark:text-gray-300">
37
- Provide information about your organization for the privacy policy
38
- </CardDescription>
39
- </CardHeader>
40
- <CardContent className="pt-5">
41
-
42
- <div className="grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4">
43
- <FormField
44
- id="organizationName"
45
- label="Organization Name"
46
- required
47
- error={errors.organizationName}
48
- className="md:col-span-2"
49
- >
50
- <Input
51
- type="text"
52
- id="organizationName"
53
- name="organizationName"
54
- value={formData.organizationName}
55
- onChange={onChange}
56
- placeholder="e.g., Acme Corporation"
57
- aria-required="true"
58
- className={errors.organizationName ? 'border-red-300 focus:border-red-500 focus:ring-red-500' : ''}
59
- />
60
- </FormField>
61
-
62
- <FormField
63
- id="organizationContact"
64
- label="Contact Information"
65
- required
66
- error={errors.organizationContact}
67
- >
68
- <div className="relative">
69
- <div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
70
- <svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
71
- <path d="M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z" />
72
- <path d="M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z" />
73
- </svg>
74
- </div>
75
- <Input
76
- type="text"
77
- id="organizationContact"
78
- name="organizationContact"
79
- value={formData.organizationContact}
80
- onChange={onChange}
81
- placeholder="email@example.com or phone"
82
- aria-required="true"
83
- className={`pl-10 ${errors.organizationContact ? 'border-red-300 focus:border-red-500 focus:ring-red-500' : ''}`}
84
- />
85
- </div>
86
- </FormField>
87
-
88
- <FormField
89
- id="organizationWebsite"
90
- label="Website (Optional)"
91
- error={errors.organizationWebsite}
92
- >
93
- <div className="relative">
94
- <div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
95
- <svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
96
- <path fillRule="evenodd" d="M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z" clipRule="evenodd" />
97
- </svg>
98
- </div>
99
- <Input
100
- type="text"
101
- id="organizationWebsite"
102
- name="organizationWebsite"
103
- value={formData.organizationWebsite}
104
- onChange={onChange}
105
- placeholder="e.g., https://www.example.com"
106
- className="pl-10"
107
- />
108
- </div>
109
- </FormField>
110
- </div>
111
-
112
- <FormField
113
- id="organizationAddress"
114
- label="Address (Optional)"
115
- error={errors.organizationAddress}
116
- className="mt-4"
117
- >
118
- <TextArea
119
- id="organizationAddress"
120
- name="organizationAddress"
121
- value={formData.organizationAddress}
122
- onChange={onChange}
123
- rows={2}
124
- placeholder="e.g., 123 Main Street, Lagos, Nigeria"
125
- />
126
- </FormField>
127
- </CardContent>
128
- </Card>
129
-
130
- <Card className="overflow-hidden shadow-md border border-gray-200 dark:border-gray-700">
131
- <CardHeader className="bg-gradient-to-r from-slate-100 to-gray-100 dark:from-slate-800 dark:to-gray-800 pb-3">
132
- <CardTitle className="text-lg font-semibold text-gray-800 dark:text-white">Compliance Settings</CardTitle>
133
- <CardDescription className="text-sm text-gray-600 dark:text-gray-300">
134
- Configure data protection compliance options
135
- </CardDescription>
136
- </CardHeader>
137
- <CardContent className="pt-5">
138
-
139
- <Checkbox
140
- id="hasDPO"
141
- name="hasDPO"
142
- label="We have a Data Protection Officer (DPO)"
143
- checked={formData.hasDPO}
144
- onChange={onChange}
145
- />
146
-
147
- {formData.hasDPO && (
148
- <div className="ml-8 mt-2 mb-4">
149
- <FormField
150
- id="dpoContact"
151
- label="DPO Contact Information"
152
- required
153
- error={errors.dpoContact}
154
- >
155
- <div className="relative">
156
- <div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
157
- <svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5 text-gray-400" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
158
- <path fillRule="evenodd" d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" clipRule="evenodd" />
159
- </svg>
160
- </div>
161
- <Input
162
- type="text"
163
- id="dpoContact"
164
- name="dpoContact"
165
- value={formData.dpoContact}
166
- onChange={onChange}
167
- placeholder="dpo@example.com or phone number"
168
- aria-required="true"
169
- className={`pl-10 ${errors.dpoContact ? 'border-red-300 focus:border-red-500 focus:ring-red-500' : ''}`}
170
- />
171
- </div>
172
- </FormField>
173
- </div>
174
- )}
175
-
176
- <Checkbox
177
- id="includeNDPRCompliance"
178
- name="includeNDPRCompliance"
179
- label="Include NDPR and DPA compliance statements"
180
- checked={formData.includeNDPRCompliance}
181
- onChange={onChange}
182
- />
183
-
184
- <div className="mt-4 p-3 bg-indigo-50 dark:bg-indigo-900/20 rounded-lg border border-indigo-100 dark:border-indigo-800/30">
185
- <div className="flex">
186
- <div className="flex-shrink-0">
187
- <svg className="h-5 w-5 text-indigo-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
188
- <path fillRule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clipRule="evenodd" />
189
- </svg>
190
- </div>
191
- <div className="ml-3 flex-1 md:flex md:justify-between">
192
- <p className="text-sm text-indigo-700 dark:text-indigo-300">
193
- Including compliance statements helps demonstrate your commitment to data protection regulations.
194
- </p>
195
- </div>
196
- </div>
197
- </div>
198
- </CardContent>
199
- </Card>
200
- </div>
201
- );
202
- }