@tantainnovative/ndpr-toolkit 1.0.3 → 1.0.5
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.
- package/next-env.d.ts +5 -0
- package/package.json +1 -1
- package/packages/ndpr-toolkit/dist/components/breach/BreachNotificationManager.d.ts +62 -0
- package/packages/ndpr-toolkit/dist/components/breach/BreachReportForm.d.ts +66 -0
- package/packages/ndpr-toolkit/dist/components/breach/BreachRiskAssessment.d.ts +50 -0
- package/packages/ndpr-toolkit/dist/components/breach/RegulatoryReportGenerator.d.ts +94 -0
- package/packages/ndpr-toolkit/dist/components/consent/ConsentBanner.d.ts +79 -0
- package/packages/ndpr-toolkit/dist/components/consent/ConsentManager.d.ts +73 -0
- package/packages/ndpr-toolkit/dist/components/consent/ConsentStorage.d.ts +41 -0
- package/packages/ndpr-toolkit/dist/components/dpia/DPIAQuestionnaire.d.ts +70 -0
- package/packages/ndpr-toolkit/dist/components/dpia/DPIAReport.d.ts +40 -0
- package/packages/ndpr-toolkit/dist/components/dpia/StepIndicator.d.ts +64 -0
- package/packages/ndpr-toolkit/dist/components/dsr/DSRDashboard.d.ts +58 -0
- package/packages/ndpr-toolkit/dist/components/dsr/DSRRequestForm.d.ts +74 -0
- package/packages/ndpr-toolkit/dist/components/dsr/DSRTracker.d.ts +56 -0
- package/packages/ndpr-toolkit/dist/components/policy/PolicyExporter.d.ts +65 -0
- package/packages/ndpr-toolkit/dist/components/policy/PolicyGenerator.d.ts +54 -0
- package/packages/ndpr-toolkit/dist/components/policy/PolicyPreview.d.ts +71 -0
- package/packages/ndpr-toolkit/dist/hooks/useBreach.d.ts +97 -0
- package/packages/ndpr-toolkit/dist/hooks/useConsent.d.ts +63 -0
- package/packages/ndpr-toolkit/dist/hooks/useDPIA.d.ts +92 -0
- package/packages/ndpr-toolkit/dist/hooks/useDSR.d.ts +72 -0
- package/packages/ndpr-toolkit/dist/hooks/usePrivacyPolicy.d.ts +87 -0
- package/packages/ndpr-toolkit/dist/index.d.ts +31 -0
- package/packages/ndpr-toolkit/dist/index.esm.js +2 -0
- package/packages/ndpr-toolkit/dist/index.esm.js.map +1 -0
- package/packages/ndpr-toolkit/dist/index.js +2 -0
- package/packages/ndpr-toolkit/dist/index.js.map +1 -0
- package/packages/ndpr-toolkit/dist/setupTests.d.ts +2 -0
- package/packages/ndpr-toolkit/dist/types/breach.d.ts +239 -0
- package/packages/ndpr-toolkit/dist/types/consent.d.ts +95 -0
- package/packages/ndpr-toolkit/dist/types/dpia.d.ts +196 -0
- package/packages/ndpr-toolkit/dist/types/dsr.d.ts +162 -0
- package/packages/ndpr-toolkit/dist/types/privacy.d.ts +204 -0
- package/packages/ndpr-toolkit/dist/utils/breach.d.ts +14 -0
- package/packages/ndpr-toolkit/dist/utils/consent.d.ts +10 -0
- package/packages/ndpr-toolkit/dist/utils/dpia.d.ts +12 -0
- package/packages/ndpr-toolkit/dist/utils/dsr.d.ts +11 -0
- package/packages/ndpr-toolkit/dist/utils/privacy.d.ts +12 -0
- package/src/components/consent/ConsentBanner.tsx +82 -48
- package/src/components/data-subject-rights/DataSubjectRequestForm.tsx +240 -129
- package/src/components/dpia/DPIAQuestionnaire.tsx +162 -122
- package/src/components/privacy-policy/PolicyGenerator.tsx +5 -5
- package/src/components/privacy-policy/steps/CustomSectionsStep.tsx +103 -77
- package/src/components/privacy-policy/steps/PolicyPreviewStep.tsx +117 -63
- package/src/hooks/useConsent.ts +16 -10
- package/src/lib/consentService.ts +44 -37
- package/src/lib/dpiaQuestions.ts +139 -99
- package/src/lib/requestService.ts +21 -17
- package/src/types/index.ts +13 -8
- package/.claude/settings.local.json +0 -20
- package/.eslintrc.json +0 -10
- package/.github/workflows/ci.yml +0 -36
- package/.github/workflows/nextjs.yml +0 -104
- package/.husky/commit-msg +0 -4
- package/.husky/pre-commit +0 -4
- package/.lintstagedrc.js +0 -4
- package/.nvmrc +0 -1
- package/.versionrc +0 -17
- package/CLAUDE.md +0 -90
- package/commitlint.config.js +0 -36
- package/jest.config.js +0 -31
- package/jest.setup.js +0 -15
- package/packages/ndpr-toolkit/jest.config.js +0 -23
- package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentBanner.test.tsx +0 -119
- package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentManager.test.tsx +0 -122
- package/packages/ndpr-toolkit/src/__tests__/components/consent/ConsentStorage.test.tsx +0 -270
- package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRDashboard.test.tsx +0 -199
- package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRRequestForm.test.tsx +0 -224
- package/packages/ndpr-toolkit/src/__tests__/components/dsr/DSRTracker.test.tsx +0 -104
- package/packages/ndpr-toolkit/src/__tests__/hooks/useConsent.test.tsx +0 -161
- package/packages/ndpr-toolkit/src/__tests__/hooks/useDSR.test.tsx +0 -330
- package/packages/ndpr-toolkit/src/__tests__/utils/breach.test.ts +0 -149
- package/packages/ndpr-toolkit/src/__tests__/utils/consent.test.ts +0 -88
- package/packages/ndpr-toolkit/src/__tests__/utils/dpia.test.ts +0 -160
- package/packages/ndpr-toolkit/src/__tests__/utils/dsr.test.ts +0 -110
- package/packages/ndpr-toolkit/src/__tests__/utils/privacy.test.ts +0 -97
- package/src/__tests__/example.test.ts +0 -13
- package/src/__tests__/requestService.test.ts +0 -57
- package/src/app/docs/components/DocLayout.tsx +0 -267
- package/src/app/docs/components/breach-notification/page.tsx +0 -797
- package/src/app/docs/components/consent-management/page.tsx +0 -576
- package/src/app/docs/components/data-subject-rights/page.tsx +0 -511
- package/src/app/docs/components/dpia-questionnaire/layout.tsx +0 -15
- package/src/app/docs/components/dpia-questionnaire/metadata.ts +0 -31
- package/src/app/docs/components/dpia-questionnaire/page.tsx +0 -666
- package/src/app/docs/components/hooks/page.tsx +0 -305
- package/src/app/docs/components/page.tsx +0 -84
- package/src/app/docs/components/privacy-policy-generator/page.tsx +0 -634
- package/src/app/docs/guides/breach-notification-process/components/BestPractices.tsx +0 -123
- package/src/app/docs/guides/breach-notification-process/components/ImplementationSteps.tsx +0 -328
- package/src/app/docs/guides/breach-notification-process/components/Introduction.tsx +0 -28
- package/src/app/docs/guides/breach-notification-process/components/NotificationTimeline.tsx +0 -91
- package/src/app/docs/guides/breach-notification-process/components/Resources.tsx +0 -118
- package/src/app/docs/guides/breach-notification-process/page.tsx +0 -39
- package/src/app/docs/guides/conducting-dpia/page.tsx +0 -593
- package/src/app/docs/guides/data-subject-requests/page.tsx +0 -666
- package/src/app/docs/guides/managing-consent/page.tsx +0 -738
- package/src/app/docs/guides/ndpr-compliance-checklist/components/ComplianceChecklist.tsx +0 -296
- package/src/app/docs/guides/ndpr-compliance-checklist/components/ImplementationTools.tsx +0 -145
- package/src/app/docs/guides/ndpr-compliance-checklist/components/Introduction.tsx +0 -33
- package/src/app/docs/guides/ndpr-compliance-checklist/components/KeyRequirements.tsx +0 -99
- package/src/app/docs/guides/ndpr-compliance-checklist/components/Resources.tsx +0 -159
- package/src/app/docs/guides/ndpr-compliance-checklist/page.tsx +0 -38
- package/src/app/docs/guides/page.tsx +0 -67
- package/src/app/docs/layout.tsx +0 -15
- package/src/app/docs/metadata.ts +0 -31
- package/src/app/docs/page.tsx +0 -572
- package/src/components/docs/DocLayout.tsx +0 -289
- package/src/components/docs/index.ts +0 -2
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import Link from 'next/link';
|
|
4
|
-
import { DocLayout } from '../DocLayout';
|
|
5
|
-
import { Button } from '@/components/ui/Button';
|
|
6
|
-
import { Card, CardContent } from '@/components/ui/Card';
|
|
7
|
-
|
|
8
|
-
export default function HooksDocs() {
|
|
9
|
-
return (
|
|
10
|
-
<DocLayout
|
|
11
|
-
title="React Hooks"
|
|
12
|
-
description="Custom React hooks for managing state and logic in NDPR-compliant applications"
|
|
13
|
-
>
|
|
14
|
-
<div className="flex mb-6 space-x-2">
|
|
15
|
-
<Button asChild variant="outline" size="sm">
|
|
16
|
-
<a href="https://github.com/tantainnovative/ndpr-toolkit/tree/main/src/hooks" target="_blank" rel="noopener noreferrer">
|
|
17
|
-
View Source
|
|
18
|
-
</a>
|
|
19
|
-
</Button>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<section id="overview" className="mb-8">
|
|
23
|
-
<h2 className="text-2xl font-bold mb-4">Overview</h2>
|
|
24
|
-
<p className="mb-4">
|
|
25
|
-
The NDPR Toolkit provides a set of custom React hooks to help manage state and logic in your NDPR-compliant applications.
|
|
26
|
-
These hooks encapsulate common functionality and make it easier to implement complex features.
|
|
27
|
-
</p>
|
|
28
|
-
</section>
|
|
29
|
-
|
|
30
|
-
<section id="hooks" className="mb-8">
|
|
31
|
-
<h2 className="text-2xl font-bold mb-4">Available Hooks</h2>
|
|
32
|
-
|
|
33
|
-
<div className="space-y-6">
|
|
34
|
-
<div className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
|
|
35
|
-
<h3 className="text-xl font-bold mb-2">useConsent</h3>
|
|
36
|
-
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
|
37
|
-
A hook for managing consent state and preferences.
|
|
38
|
-
</p>
|
|
39
|
-
<div className="bg-gray-800 text-gray-200 p-4 rounded-md overflow-x-auto">
|
|
40
|
-
<pre><code>{`import { useConsent } from '@tantainnovative/ndpr-toolkit';
|
|
41
|
-
|
|
42
|
-
function ConsentManager() {
|
|
43
|
-
const {
|
|
44
|
-
consents, // Current consent settings
|
|
45
|
-
updateConsent, // Function to update a specific consent
|
|
46
|
-
saveConsents, // Function to save all consents
|
|
47
|
-
resetConsents, // Function to reset consents to default
|
|
48
|
-
hasConsented, // Function to check if user has consented to a specific option
|
|
49
|
-
isConsentRequired // Function to check if consent is required
|
|
50
|
-
} = useConsent();
|
|
51
|
-
|
|
52
|
-
// Example usage
|
|
53
|
-
return (
|
|
54
|
-
<div>
|
|
55
|
-
<h2>Consent Preferences</h2>
|
|
56
|
-
<label>
|
|
57
|
-
<input
|
|
58
|
-
type="checkbox"
|
|
59
|
-
checked={hasConsented('analytics')}
|
|
60
|
-
onChange={(e) => updateConsent('analytics', e.target.checked)}
|
|
61
|
-
/>
|
|
62
|
-
Analytics Cookies
|
|
63
|
-
</label>
|
|
64
|
-
<button onClick={() => saveConsents()}>Save Preferences</button>
|
|
65
|
-
</div>
|
|
66
|
-
);
|
|
67
|
-
}`}</code></pre>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<div className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
|
|
72
|
-
<h3 className="text-xl font-bold mb-2">useDSR</h3>
|
|
73
|
-
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
|
74
|
-
A hook for managing Data Subject Rights (DSR) requests.
|
|
75
|
-
</p>
|
|
76
|
-
<div className="bg-gray-800 text-gray-200 p-4 rounded-md overflow-x-auto">
|
|
77
|
-
<pre><code>{`import { useDSR } from '@tantainnovative/ndpr-toolkit';
|
|
78
|
-
|
|
79
|
-
function DSRManager() {
|
|
80
|
-
const {
|
|
81
|
-
requests, // List of DSR requests
|
|
82
|
-
submitRequest, // Function to submit a new request
|
|
83
|
-
updateRequest, // Function to update an existing request
|
|
84
|
-
getRequestById, // Function to get a request by ID
|
|
85
|
-
filterRequests // Function to filter requests by criteria
|
|
86
|
-
} = useDSR();
|
|
87
|
-
|
|
88
|
-
// Example usage
|
|
89
|
-
const handleSubmit = (formData) => {
|
|
90
|
-
submitRequest({
|
|
91
|
-
type: 'access',
|
|
92
|
-
subject: {
|
|
93
|
-
name: formData.name,
|
|
94
|
-
email: formData.email,
|
|
95
|
-
phone: formData.phone
|
|
96
|
-
},
|
|
97
|
-
description: formData.description
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
return (
|
|
102
|
-
<div>
|
|
103
|
-
<h2>DSR Requests</h2>
|
|
104
|
-
<ul>
|
|
105
|
-
{requests.map(request => (
|
|
106
|
-
<li key={request.id}>
|
|
107
|
-
{request.subject.name} - {request.type} - {request.status}
|
|
108
|
-
</li>
|
|
109
|
-
))}
|
|
110
|
-
</ul>
|
|
111
|
-
</div>
|
|
112
|
-
);
|
|
113
|
-
}`}</code></pre>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
|
|
117
|
-
<div className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
|
|
118
|
-
<h3 className="text-xl font-bold mb-2">useDPIA</h3>
|
|
119
|
-
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
|
120
|
-
A hook for managing Data Protection Impact Assessment (DPIA) state.
|
|
121
|
-
</p>
|
|
122
|
-
<div className="bg-gray-800 text-gray-200 p-4 rounded-md overflow-x-auto">
|
|
123
|
-
<pre><code>{`import { useDPIA } from '@tantainnovative/ndpr-toolkit';
|
|
124
|
-
|
|
125
|
-
function DPIAManager() {
|
|
126
|
-
const {
|
|
127
|
-
assessment, // Current DPIA assessment
|
|
128
|
-
currentStep, // Current step in the DPIA process
|
|
129
|
-
totalSteps, // Total number of steps
|
|
130
|
-
goToStep, // Function to navigate to a specific step
|
|
131
|
-
nextStep, // Function to go to the next step
|
|
132
|
-
prevStep, // Function to go to the previous step
|
|
133
|
-
updateAnswer, // Function to update an answer
|
|
134
|
-
calculateRisk, // Function to calculate risk score
|
|
135
|
-
generateReport // Function to generate a DPIA report
|
|
136
|
-
} = useDPIA();
|
|
137
|
-
|
|
138
|
-
// Example usage
|
|
139
|
-
return (
|
|
140
|
-
<div>
|
|
141
|
-
<h2>DPIA Questionnaire</h2>
|
|
142
|
-
<p>Step {currentStep} of {totalSteps}</p>
|
|
143
|
-
<button onClick={prevStep} disabled={currentStep === 1}>Previous</button>
|
|
144
|
-
<button onClick={nextStep} disabled={currentStep === totalSteps}>Next</button>
|
|
145
|
-
<button onClick={generateReport}>Generate Report</button>
|
|
146
|
-
</div>
|
|
147
|
-
);
|
|
148
|
-
}`}</code></pre>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
<div className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
|
|
153
|
-
<h3 className="text-xl font-bold mb-2">useBreach</h3>
|
|
154
|
-
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
|
155
|
-
A hook for managing data breach notifications and assessments.
|
|
156
|
-
</p>
|
|
157
|
-
<div className="bg-gray-800 text-gray-200 p-4 rounded-md overflow-x-auto">
|
|
158
|
-
<pre><code>{`import { useBreach } from '@tantainnovative/ndpr-toolkit';
|
|
159
|
-
|
|
160
|
-
function BreachManager() {
|
|
161
|
-
const {
|
|
162
|
-
breaches, // List of breach reports
|
|
163
|
-
currentBreach, // Currently selected breach
|
|
164
|
-
submitBreachReport, // Function to submit a new breach report
|
|
165
|
-
updateBreachStatus, // Function to update breach status
|
|
166
|
-
assessRisk, // Function to assess breach risk
|
|
167
|
-
generateReport // Function to generate regulatory reports
|
|
168
|
-
} = useBreach();
|
|
169
|
-
|
|
170
|
-
// Example usage
|
|
171
|
-
return (
|
|
172
|
-
<div>
|
|
173
|
-
<h2>Data Breach Management</h2>
|
|
174
|
-
<ul>
|
|
175
|
-
{breaches.map(breach => (
|
|
176
|
-
<li key={breach.id}>
|
|
177
|
-
{breach.title} - {breach.status} - Risk Level: {breach.riskLevel}
|
|
178
|
-
</li>
|
|
179
|
-
))}
|
|
180
|
-
</ul>
|
|
181
|
-
</div>
|
|
182
|
-
);
|
|
183
|
-
}`}</code></pre>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
|
|
187
|
-
<div className="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700">
|
|
188
|
-
<h3 className="text-xl font-bold mb-2">usePrivacyPolicy</h3>
|
|
189
|
-
<p className="text-gray-600 dark:text-gray-300 mb-4">
|
|
190
|
-
A hook for managing privacy policy generation and customization.
|
|
191
|
-
</p>
|
|
192
|
-
<div className="bg-gray-800 text-gray-200 p-4 rounded-md overflow-x-auto">
|
|
193
|
-
<pre><code>{`import { usePrivacyPolicy } from '@tantainnovative/ndpr-toolkit';
|
|
194
|
-
|
|
195
|
-
function PrivacyPolicyManager() {
|
|
196
|
-
const {
|
|
197
|
-
policy, // Current privacy policy
|
|
198
|
-
selectedTemplate, // Selected policy template
|
|
199
|
-
organizationInfo, // Organization information
|
|
200
|
-
selectTemplate, // Function to select a template
|
|
201
|
-
updateOrganizationInfo, // Function to update organization info
|
|
202
|
-
toggleSection, // Function to toggle a section on/off
|
|
203
|
-
updateSectionContent, // Function to update section content
|
|
204
|
-
updateVariableValue, // Function to update a variable value
|
|
205
|
-
generatePolicy, // Function to generate the policy
|
|
206
|
-
getPolicyText, // Function to get the policy text
|
|
207
|
-
resetPolicy, // Function to reset the policy
|
|
208
|
-
isValid // Function to check if policy is valid
|
|
209
|
-
} = usePrivacyPolicy();
|
|
210
|
-
|
|
211
|
-
// Example usage
|
|
212
|
-
return (
|
|
213
|
-
<div>
|
|
214
|
-
<h2>Privacy Policy Generator</h2>
|
|
215
|
-
<button onClick={() => selectTemplate('standard')}>
|
|
216
|
-
Use Standard Template
|
|
217
|
-
</button>
|
|
218
|
-
<input
|
|
219
|
-
type="text"
|
|
220
|
-
value={organizationInfo.name}
|
|
221
|
-
onChange={(e) => updateOrganizationInfo('name', e.target.value)}
|
|
222
|
-
placeholder="Organization Name"
|
|
223
|
-
/>
|
|
224
|
-
<button onClick={generatePolicy} disabled={!isValid()}>
|
|
225
|
-
Generate Policy
|
|
226
|
-
</button>
|
|
227
|
-
<div>
|
|
228
|
-
<h3>Preview</h3>
|
|
229
|
-
<div>{policy?.fullText}</div>
|
|
230
|
-
</div>
|
|
231
|
-
</div>
|
|
232
|
-
);
|
|
233
|
-
}`}</code></pre>
|
|
234
|
-
</div>
|
|
235
|
-
</div>
|
|
236
|
-
</div>
|
|
237
|
-
</section>
|
|
238
|
-
|
|
239
|
-
<section id="best-practices" className="mb-8">
|
|
240
|
-
<h2 className="text-2xl font-bold mb-4">Best Practices</h2>
|
|
241
|
-
<div className="prose prose-blue dark:prose-invert max-w-none">
|
|
242
|
-
<ul>
|
|
243
|
-
<li>
|
|
244
|
-
<strong>Use hooks at the top level</strong> - Always use React hooks at the top level of your component, not inside loops, conditions, or nested functions.
|
|
245
|
-
</li>
|
|
246
|
-
<li>
|
|
247
|
-
<strong>Combine with context</strong> - For global state management, consider using these hooks with React Context to share state across components.
|
|
248
|
-
</li>
|
|
249
|
-
<li>
|
|
250
|
-
<strong>Customize storage options</strong> - Most hooks accept storage options to customize how data is persisted. Use this to implement your own storage mechanisms.
|
|
251
|
-
</li>
|
|
252
|
-
<li>
|
|
253
|
-
<strong>Handle loading states</strong> - Check for loading states before rendering components that depend on data from hooks.
|
|
254
|
-
</li>
|
|
255
|
-
</ul>
|
|
256
|
-
</div>
|
|
257
|
-
</section>
|
|
258
|
-
|
|
259
|
-
<section id="related" className="mb-8">
|
|
260
|
-
<h2 className="text-2xl font-bold mb-4">Related Components</h2>
|
|
261
|
-
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
262
|
-
<Card>
|
|
263
|
-
<CardContent className="p-4">
|
|
264
|
-
<h3 className="text-lg font-semibold mb-2">Consent Management</h3>
|
|
265
|
-
<p className="text-sm text-gray-500 dark:text-gray-400 mb-4">
|
|
266
|
-
Components that work with the useConsent hook
|
|
267
|
-
</p>
|
|
268
|
-
<Button asChild variant="outline" size="sm">
|
|
269
|
-
<Link href="/docs/components/consent-management">
|
|
270
|
-
View Components
|
|
271
|
-
</Link>
|
|
272
|
-
</Button>
|
|
273
|
-
</CardContent>
|
|
274
|
-
</Card>
|
|
275
|
-
<Card>
|
|
276
|
-
<CardContent className="p-4">
|
|
277
|
-
<h3 className="text-lg font-semibold mb-2">Data Subject Rights</h3>
|
|
278
|
-
<p className="text-sm text-gray-500 dark:text-gray-400 mb-4">
|
|
279
|
-
Components that work with the useDSR hook
|
|
280
|
-
</p>
|
|
281
|
-
<Button asChild variant="outline" size="sm">
|
|
282
|
-
<Link href="/docs/components/data-subject-rights">
|
|
283
|
-
View Components
|
|
284
|
-
</Link>
|
|
285
|
-
</Button>
|
|
286
|
-
</CardContent>
|
|
287
|
-
</Card>
|
|
288
|
-
<Card>
|
|
289
|
-
<CardContent className="p-4">
|
|
290
|
-
<h3 className="text-lg font-semibold mb-2">Privacy Policy</h3>
|
|
291
|
-
<p className="text-sm text-gray-500 dark:text-gray-400 mb-4">
|
|
292
|
-
Components that work with the usePrivacyPolicy hook
|
|
293
|
-
</p>
|
|
294
|
-
<Button asChild variant="outline" size="sm">
|
|
295
|
-
<Link href="/docs/components/privacy-policy-generator">
|
|
296
|
-
View Components
|
|
297
|
-
</Link>
|
|
298
|
-
</Button>
|
|
299
|
-
</CardContent>
|
|
300
|
-
</Card>
|
|
301
|
-
</div>
|
|
302
|
-
</section>
|
|
303
|
-
</DocLayout>
|
|
304
|
-
);
|
|
305
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import Link from 'next/link';
|
|
4
|
-
import { DocLayout } from './DocLayout';
|
|
5
|
-
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/Card';
|
|
6
|
-
import { Button } from '@/components/ui/Button';
|
|
7
|
-
|
|
8
|
-
export default function ComponentsPage() {
|
|
9
|
-
return (
|
|
10
|
-
<DocLayout
|
|
11
|
-
title="Components"
|
|
12
|
-
description="Documentation for NDPR Toolkit components"
|
|
13
|
-
>
|
|
14
|
-
<p className="mb-6">
|
|
15
|
-
The NDPR Toolkit provides a comprehensive set of components to help you implement NDPR-compliant features in your applications.
|
|
16
|
-
Each component is designed to address specific compliance requirements and can be easily integrated into your existing codebase.
|
|
17
|
-
</p>
|
|
18
|
-
|
|
19
|
-
<div className="grid grid-cols-1 gap-6 sm:grid-cols-2">
|
|
20
|
-
{[
|
|
21
|
-
{
|
|
22
|
-
title: 'Privacy Policy Management',
|
|
23
|
-
description: 'Components for creating, previewing, and exporting NDPR-compliant privacy policies',
|
|
24
|
-
href: '/docs/components/privacy-policy-generator',
|
|
25
|
-
components: ['PolicyGenerator', 'PolicyPreview', 'PolicyExporter']
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
title: 'Consent Management',
|
|
29
|
-
description: 'Components for collecting, storing, and managing user consent in compliance with NDPR requirements',
|
|
30
|
-
href: '/docs/components/consent-management',
|
|
31
|
-
components: ['ConsentBanner', 'ConsentManager', 'ConsentStorage']
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
title: 'Data Subject Rights',
|
|
35
|
-
description: 'Complete system for handling data subject access requests and other rights',
|
|
36
|
-
href: '/docs/components/data-subject-rights',
|
|
37
|
-
components: ['DSRRequestForm', 'DSRTracker', 'DSRDashboard']
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
title: 'DPIA Questionnaire',
|
|
41
|
-
description: 'Interactive questionnaire for conducting Data Protection Impact Assessments with reporting capabilities',
|
|
42
|
-
href: '/docs/components/dpia-questionnaire',
|
|
43
|
-
components: ['DPIAQuestionnaire', 'DPIAReport', 'StepIndicator']
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
title: 'Breach Notification',
|
|
47
|
-
description: 'Comprehensive tools for managing, assessing, and reporting data breaches within required timeframes',
|
|
48
|
-
href: '/docs/components/breach-notification',
|
|
49
|
-
components: ['BreachReportForm', 'BreachRiskAssessment', 'RegulatoryReportGenerator', 'BreachNotificationManager']
|
|
50
|
-
},
|
|
51
|
-
].map((component) => (
|
|
52
|
-
<Card key={component.title}>
|
|
53
|
-
<CardHeader>
|
|
54
|
-
<CardTitle>{component.title}</CardTitle>
|
|
55
|
-
</CardHeader>
|
|
56
|
-
<CardContent>
|
|
57
|
-
<p className="text-gray-500 dark:text-gray-400 mb-4">{component.description}</p>
|
|
58
|
-
|
|
59
|
-
{component.components && (
|
|
60
|
-
<div className="mb-4">
|
|
61
|
-
<h4 className="text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">Components:</h4>
|
|
62
|
-
<ul className="list-disc list-inside text-sm text-gray-500 dark:text-gray-400">
|
|
63
|
-
{component.components.map((comp: string) => (
|
|
64
|
-
<li key={comp}><code className="bg-gray-100 dark:bg-gray-800 px-1 py-0.5 rounded text-xs">{comp}</code></li>
|
|
65
|
-
))}
|
|
66
|
-
</ul>
|
|
67
|
-
</div>
|
|
68
|
-
)}
|
|
69
|
-
|
|
70
|
-
<Button asChild variant="outline">
|
|
71
|
-
<Link href={component.href}>
|
|
72
|
-
View Documentation
|
|
73
|
-
<svg className="w-4 h-4 ml-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
74
|
-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M14 5l7 7m0 0l-7 7m7-7H3" />
|
|
75
|
-
</svg>
|
|
76
|
-
</Link>
|
|
77
|
-
</Button>
|
|
78
|
-
</CardContent>
|
|
79
|
-
</Card>
|
|
80
|
-
))}
|
|
81
|
-
</div>
|
|
82
|
-
</DocLayout>
|
|
83
|
-
);
|
|
84
|
-
}
|