@tantainnovative/ndpr-toolkit 3.4.0 → 3.5.0

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 (188) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +80 -38
  3. package/dist/adapters.d.mts +34 -25
  4. package/dist/adapters.d.ts +34 -25
  5. package/dist/breach.d.mts +803 -44
  6. package/dist/breach.d.ts +803 -44
  7. package/dist/breach.js +2 -1
  8. package/dist/breach.mjs +2 -1
  9. package/dist/{chunk-2WH4DLV5.js → chunk-3EGQWLJ6.js} +3 -3
  10. package/dist/chunk-B4Z5MBUC.mjs +2 -0
  11. package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
  12. package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
  13. package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
  14. package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
  15. package/dist/{chunk-KSERBMXW.mjs → chunk-F5TXUA4O.mjs} +3 -3
  16. package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
  17. package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
  18. package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
  19. package/dist/{chunk-MG73MOZC.mjs → chunk-I557S566.mjs} +2 -2
  20. package/dist/{chunk-QVULSG6J.mjs → chunk-ID2NYIVE.mjs} +3 -3
  21. package/dist/chunk-J5WCPZLW.js +2 -0
  22. package/dist/{chunk-4R42ZNO7.mjs → chunk-JFFOPHU3.mjs} +57 -57
  23. package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
  24. package/dist/chunk-LU7PKE7Y.mjs +2 -0
  25. package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
  26. package/dist/{chunk-XMBSJJ5U.js → chunk-ORFC66EA.js} +3 -3
  27. package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
  28. package/dist/chunk-SCWNM4PC.mjs +2 -0
  29. package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
  30. package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
  31. package/dist/chunk-TV4U6AIS.js +2 -0
  32. package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
  33. package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
  34. package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
  35. package/dist/{chunk-RNTNHVKZ.js → chunk-YPKUHSK4.js} +2 -2
  36. package/dist/{chunk-UFPSUO52.js → chunk-Z73T6MWY.js} +57 -57
  37. package/dist/consent.d.mts +648 -84
  38. package/dist/consent.d.ts +648 -84
  39. package/dist/consent.js +2 -1
  40. package/dist/consent.mjs +2 -1
  41. package/dist/core.d.mts +2049 -23
  42. package/dist/core.d.ts +2049 -23
  43. package/dist/core.js +1 -1
  44. package/dist/core.mjs +1 -1
  45. package/dist/cross-border.d.mts +470 -99
  46. package/dist/cross-border.d.ts +470 -99
  47. package/dist/cross-border.js +1 -0
  48. package/dist/cross-border.mjs +1 -0
  49. package/dist/dpia.d.mts +591 -37
  50. package/dist/dpia.d.ts +591 -37
  51. package/dist/dpia.js +1 -0
  52. package/dist/dpia.mjs +1 -0
  53. package/dist/dsr.d.mts +654 -37
  54. package/dist/dsr.d.ts +654 -37
  55. package/dist/dsr.js +2 -1
  56. package/dist/dsr.mjs +2 -1
  57. package/dist/hooks.d.mts +2174 -30
  58. package/dist/hooks.d.ts +2174 -30
  59. package/dist/hooks.js +2 -1
  60. package/dist/hooks.mjs +2 -1
  61. package/dist/index.d.mts +4428 -43
  62. package/dist/index.d.ts +4428 -43
  63. package/dist/index.js +2 -1
  64. package/dist/index.mjs +2 -1
  65. package/dist/lawful-basis.d.mts +368 -32
  66. package/dist/lawful-basis.d.ts +368 -32
  67. package/dist/lawful-basis.js +1 -0
  68. package/dist/lawful-basis.mjs +1 -0
  69. package/dist/policy.d.mts +1178 -83
  70. package/dist/policy.d.ts +1178 -83
  71. package/dist/policy.js +2 -1
  72. package/dist/policy.mjs +2 -1
  73. package/dist/presets.d.mts +1020 -114
  74. package/dist/presets.d.ts +1020 -114
  75. package/dist/presets.js +2 -1
  76. package/dist/presets.mjs +2 -1
  77. package/dist/ropa.d.mts +396 -31
  78. package/dist/ropa.d.ts +396 -31
  79. package/dist/ropa.js +2 -1
  80. package/dist/ropa.mjs +2 -1
  81. package/dist/server.d.mts +2133 -24
  82. package/dist/server.d.ts +2133 -24
  83. package/dist/server.js +1 -1
  84. package/dist/server.mjs +1 -1
  85. package/dist/unstyled.d.mts +523 -55
  86. package/dist/unstyled.d.ts +523 -55
  87. package/dist/unstyled.js +2 -1
  88. package/dist/unstyled.mjs +2 -1
  89. package/package.json +3 -3
  90. package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
  91. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
  92. package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
  93. package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
  94. package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
  95. package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
  96. package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
  97. package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
  98. package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
  99. package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
  100. package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
  101. package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
  102. package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
  103. package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
  104. package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
  105. package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
  106. package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
  107. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
  108. package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
  109. package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
  110. package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
  111. package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
  112. package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
  113. package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
  114. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
  115. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
  116. package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
  117. package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
  118. package/dist/breach-B_-6lDqS.d.mts +0 -17
  119. package/dist/breach-CzXqSsaY.d.ts +0 -17
  120. package/dist/breach-Eu9byel8.d.mts +0 -185
  121. package/dist/breach-Eu9byel8.d.ts +0 -185
  122. package/dist/chunk-5X32J5IA.mjs +0 -2
  123. package/dist/chunk-7D2OIPHH.mjs +0 -2
  124. package/dist/chunk-JKKRPS4P.js +0 -2
  125. package/dist/chunk-NCOZB2WU.mjs +0 -2
  126. package/dist/chunk-RGNP45VR.js +0 -2
  127. package/dist/compliance-score-racQe_E_.d.mts +0 -115
  128. package/dist/compliance-score-racQe_E_.d.ts +0 -115
  129. package/dist/consent-CmVzqZUk.d.mts +0 -99
  130. package/dist/consent-CmVzqZUk.d.ts +0 -99
  131. package/dist/consent-audit-BdByjYlM.d.mts +0 -65
  132. package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
  133. package/dist/cross-border-BBi9rZyO.d.mts +0 -54
  134. package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
  135. package/dist/cross-border-UyT00llA.d.mts +0 -141
  136. package/dist/cross-border-UyT00llA.d.ts +0 -141
  137. package/dist/docx-BxKascXN.d.ts +0 -64
  138. package/dist/docx-CV7Vsry_.d.mts +0 -64
  139. package/dist/dpia-D82hUrJe.d.ts +0 -15
  140. package/dist/dpia-DQDFw2_l.d.mts +0 -15
  141. package/dist/dpia-c9GiiOq0.d.mts +0 -137
  142. package/dist/dpia-c9GiiOq0.d.ts +0 -137
  143. package/dist/dsr-CIx5sd7e.d.ts +0 -14
  144. package/dist/dsr-XZ_HqTlA.d.mts +0 -14
  145. package/dist/dsr-yKbqX531.d.mts +0 -128
  146. package/dist/dsr-yKbqX531.d.ts +0 -128
  147. package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
  148. package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
  149. package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
  150. package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
  151. package/dist/locale-CxJx2tzn.d.mts +0 -25
  152. package/dist/locale-DSkrtf-c.d.ts +0 -25
  153. package/dist/policy-engine-CCUCud2T.d.ts +0 -154
  154. package/dist/policy-engine-fYSqEqSW.d.mts +0 -154
  155. package/dist/policy-sections-BYx6fEFk.d.ts +0 -56
  156. package/dist/policy-sections-Dm97Nq8m.d.mts +0 -56
  157. package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
  158. package/dist/policy-templates-DwYl2329.d.mts +0 -43
  159. package/dist/privacy-Ca6te9Ir.d.mts +0 -138
  160. package/dist/privacy-Ca6te9Ir.d.ts +0 -138
  161. package/dist/ropa-BDTM06tr.d.ts +0 -152
  162. package/dist/ropa-CFHuT7jE.d.mts +0 -152
  163. package/dist/ropa-CyynscU6.d.ts +0 -51
  164. package/dist/ropa-NIgxd8uP.d.mts +0 -51
  165. package/dist/sanitize-CxxwKxAx.d.mts +0 -94
  166. package/dist/sanitize-CxxwKxAx.d.ts +0 -94
  167. package/dist/styling-BMDGQDgS.d.mts +0 -64
  168. package/dist/styling-BaoQtV06.d.ts +0 -64
  169. package/dist/types-DK2CoKOC.d.mts +0 -10
  170. package/dist/types-DK2CoKOC.d.ts +0 -10
  171. package/dist/useAdaptivePolicyWizard-BnjW4OR4.d.mts +0 -52
  172. package/dist/useAdaptivePolicyWizard-sb3m4-Zk.d.ts +0 -52
  173. package/dist/useBreach-CPr86Yan.d.mts +0 -115
  174. package/dist/useBreach-DkVXvtJK.d.ts +0 -115
  175. package/dist/useConsent-DCNkIJHR.d.mts +0 -75
  176. package/dist/useConsent-dOcELSfX.d.ts +0 -75
  177. package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
  178. package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
  179. package/dist/useDPIA-B6180UQn.d.mts +0 -109
  180. package/dist/useDPIA-CTqbNbww.d.ts +0 -109
  181. package/dist/useDSR-WvHk8_iu.d.mts +0 -85
  182. package/dist/useDSR-wH4H6hSM.d.ts +0 -85
  183. package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
  184. package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
  185. package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
  186. package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
  187. package/dist/useROPA-BSSU1rfx.d.ts +0 -76
  188. package/dist/useROPA-C2hjaBTz.d.mts +0 -76
@@ -1,158 +0,0 @@
1
- import React__default from 'react';
2
- import { B as BreachCategory } from './breach-Eu9byel8.js';
3
-
4
- /**
5
- * Represents the data submitted by the breach report form.
6
- */
7
- interface BreachFormSubmission {
8
- /** Title/summary of the breach */
9
- title: string;
10
- /** Detailed description of the breach */
11
- description: string;
12
- /** Breach category identifier */
13
- category: string;
14
- /** Timestamp (ms) when the breach was discovered */
15
- discoveredAt: number;
16
- /** Timestamp (ms) when the breach occurred (if known) */
17
- occurredAt?: number;
18
- /** Timestamp (ms) when the form was submitted */
19
- reportedAt: number;
20
- /** Person reporting the breach */
21
- reporter: {
22
- name: string;
23
- email: string;
24
- department: string;
25
- phone?: string;
26
- };
27
- /** Systems or applications affected by the breach */
28
- affectedSystems: string[];
29
- /** Types of data involved in the breach */
30
- dataTypes: string[];
31
- /** Estimated number of affected data subjects */
32
- estimatedAffectedSubjects?: number;
33
- /** Current status of the breach */
34
- status: 'ongoing' | 'contained' | 'resolved';
35
- /** Initial actions taken to address the breach */
36
- initialActions?: string;
37
- /** File attachments included with the report */
38
- attachments: Array<{
39
- name: string;
40
- type: string;
41
- size: number;
42
- file: File;
43
- }>;
44
- }
45
- interface BreachReportFormClassNames {
46
- root?: string;
47
- title?: string;
48
- form?: string;
49
- fieldGroup?: string;
50
- label?: string;
51
- input?: string;
52
- select?: string;
53
- textarea?: string;
54
- submitButton?: string;
55
- /** Alias for submitButton */
56
- primaryButton?: string;
57
- notice?: string;
58
- /** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
59
- loadingOverlay?: string;
60
- }
61
- interface BreachReportFormProps {
62
- /**
63
- * Available breach categories
64
- */
65
- categories: BreachCategory[];
66
- /**
67
- * Callback function called when form is submitted
68
- */
69
- onSubmit: (data: BreachFormSubmission) => void;
70
- /**
71
- * Callback function called when form validation fails
72
- */
73
- onValidationError?: (errors: Record<string, string>) => void;
74
- /**
75
- * Title displayed on the form
76
- * @default "Report a Data Breach"
77
- */
78
- title?: string;
79
- /**
80
- * Description text displayed on the form
81
- * @default "Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required."
82
- */
83
- formDescription?: string;
84
- /**
85
- * Text for the submit button
86
- * @default "Submit Report"
87
- */
88
- submitButtonText?: string;
89
- /**
90
- * Custom CSS class for the form
91
- */
92
- className?: string;
93
- /**
94
- * Custom CSS class for the submit button
95
- */
96
- buttonClassName?: string;
97
- /**
98
- * Override class names for individual elements
99
- */
100
- classNames?: BreachReportFormClassNames;
101
- /**
102
- * Remove all default styles, only applying classNames overrides
103
- */
104
- unstyled?: boolean;
105
- /**
106
- * Whether the form is currently submitting.
107
- * When true, the submit button is disabled and shows "Submitting..." text.
108
- */
109
- isSubmitting?: boolean;
110
- /**
111
- * Whether to show a confirmation message after submission
112
- * @default true
113
- */
114
- showConfirmation?: boolean;
115
- /**
116
- * Confirmation message to display after submission
117
- * @default "Your breach report has been submitted successfully. The data protection team has been notified."
118
- */
119
- confirmationMessage?: string;
120
- /**
121
- * Whether to allow file attachments
122
- * @default true
123
- */
124
- allowAttachments?: boolean;
125
- /**
126
- * Maximum number of attachments allowed
127
- * @default 5
128
- */
129
- maxAttachments?: number;
130
- /**
131
- * Maximum file size for attachments (in bytes)
132
- * @default 5242880 (5MB)
133
- */
134
- maxFileSize?: number;
135
- /**
136
- * Allowed file types for attachments
137
- * @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
138
- */
139
- allowedFileTypes?: string[];
140
- /**
141
- * Default values to pre-fill form fields.
142
- * Useful for editing existing breach reports or pre-populating known data.
143
- */
144
- defaultValues?: Partial<BreachFormSubmission>;
145
- /**
146
- * Callback fired when the form is reset via the Reset button.
147
- * To fully remount the component (clearing all internal state),
148
- * change the `key` prop from the parent.
149
- */
150
- onReset?: () => void;
151
- }
152
- /**
153
- * Breach report form component. Implements NDPA Section 40 breach notification requirements,
154
- * enabling organizations to document and report data breaches within the mandated 72-hour window.
155
- */
156
- declare const BreachReportForm: React__default.FC<BreachReportFormProps>;
157
-
158
- export { type BreachFormSubmission as B, BreachReportForm as a, type BreachReportFormClassNames as b, type BreachReportFormProps as c };
@@ -1,158 +0,0 @@
1
- import React__default from 'react';
2
- import { B as BreachCategory } from './breach-Eu9byel8.mjs';
3
-
4
- /**
5
- * Represents the data submitted by the breach report form.
6
- */
7
- interface BreachFormSubmission {
8
- /** Title/summary of the breach */
9
- title: string;
10
- /** Detailed description of the breach */
11
- description: string;
12
- /** Breach category identifier */
13
- category: string;
14
- /** Timestamp (ms) when the breach was discovered */
15
- discoveredAt: number;
16
- /** Timestamp (ms) when the breach occurred (if known) */
17
- occurredAt?: number;
18
- /** Timestamp (ms) when the form was submitted */
19
- reportedAt: number;
20
- /** Person reporting the breach */
21
- reporter: {
22
- name: string;
23
- email: string;
24
- department: string;
25
- phone?: string;
26
- };
27
- /** Systems or applications affected by the breach */
28
- affectedSystems: string[];
29
- /** Types of data involved in the breach */
30
- dataTypes: string[];
31
- /** Estimated number of affected data subjects */
32
- estimatedAffectedSubjects?: number;
33
- /** Current status of the breach */
34
- status: 'ongoing' | 'contained' | 'resolved';
35
- /** Initial actions taken to address the breach */
36
- initialActions?: string;
37
- /** File attachments included with the report */
38
- attachments: Array<{
39
- name: string;
40
- type: string;
41
- size: number;
42
- file: File;
43
- }>;
44
- }
45
- interface BreachReportFormClassNames {
46
- root?: string;
47
- title?: string;
48
- form?: string;
49
- fieldGroup?: string;
50
- label?: string;
51
- input?: string;
52
- select?: string;
53
- textarea?: string;
54
- submitButton?: string;
55
- /** Alias for submitButton */
56
- primaryButton?: string;
57
- notice?: string;
58
- /** Custom class applied when isSubmitting is true (e.g. a loading overlay) */
59
- loadingOverlay?: string;
60
- }
61
- interface BreachReportFormProps {
62
- /**
63
- * Available breach categories
64
- */
65
- categories: BreachCategory[];
66
- /**
67
- * Callback function called when form is submitted
68
- */
69
- onSubmit: (data: BreachFormSubmission) => void;
70
- /**
71
- * Callback function called when form validation fails
72
- */
73
- onValidationError?: (errors: Record<string, string>) => void;
74
- /**
75
- * Title displayed on the form
76
- * @default "Report a Data Breach"
77
- */
78
- title?: string;
79
- /**
80
- * Description text displayed on the form
81
- * @default "Use this form to report a suspected or confirmed data breach in accordance with NDPA Section 40. All fields marked with * are required."
82
- */
83
- formDescription?: string;
84
- /**
85
- * Text for the submit button
86
- * @default "Submit Report"
87
- */
88
- submitButtonText?: string;
89
- /**
90
- * Custom CSS class for the form
91
- */
92
- className?: string;
93
- /**
94
- * Custom CSS class for the submit button
95
- */
96
- buttonClassName?: string;
97
- /**
98
- * Override class names for individual elements
99
- */
100
- classNames?: BreachReportFormClassNames;
101
- /**
102
- * Remove all default styles, only applying classNames overrides
103
- */
104
- unstyled?: boolean;
105
- /**
106
- * Whether the form is currently submitting.
107
- * When true, the submit button is disabled and shows "Submitting..." text.
108
- */
109
- isSubmitting?: boolean;
110
- /**
111
- * Whether to show a confirmation message after submission
112
- * @default true
113
- */
114
- showConfirmation?: boolean;
115
- /**
116
- * Confirmation message to display after submission
117
- * @default "Your breach report has been submitted successfully. The data protection team has been notified."
118
- */
119
- confirmationMessage?: string;
120
- /**
121
- * Whether to allow file attachments
122
- * @default true
123
- */
124
- allowAttachments?: boolean;
125
- /**
126
- * Maximum number of attachments allowed
127
- * @default 5
128
- */
129
- maxAttachments?: number;
130
- /**
131
- * Maximum file size for attachments (in bytes)
132
- * @default 5242880 (5MB)
133
- */
134
- maxFileSize?: number;
135
- /**
136
- * Allowed file types for attachments
137
- * @default ['.pdf', '.jpg', '.jpeg', '.png', '.doc', '.docx', '.xls', '.xlsx', '.txt']
138
- */
139
- allowedFileTypes?: string[];
140
- /**
141
- * Default values to pre-fill form fields.
142
- * Useful for editing existing breach reports or pre-populating known data.
143
- */
144
- defaultValues?: Partial<BreachFormSubmission>;
145
- /**
146
- * Callback fired when the form is reset via the Reset button.
147
- * To fully remount the component (clearing all internal state),
148
- * change the `key` prop from the parent.
149
- */
150
- onReset?: () => void;
151
- }
152
- /**
153
- * Breach report form component. Implements NDPA Section 40 breach notification requirements,
154
- * enabling organizations to document and report data breaches within the mandated 72-hour window.
155
- */
156
- declare const BreachReportForm: React__default.FC<BreachReportFormProps>;
157
-
158
- export { type BreachFormSubmission as B, BreachReportForm as a, type BreachReportFormClassNames as b, type BreachReportFormProps as c };
@@ -1,156 +0,0 @@
1
- import React__default from 'react';
2
- import { C as ConsentOption, a as ConsentSettings } from './consent-CmVzqZUk.mjs';
3
-
4
- interface ConsentAnalyticsEvent {
5
- action: 'shown' | 'accepted_all' | 'rejected_all' | 'customized' | 'dismissed';
6
- timestamp: number;
7
- version: string;
8
- categories?: Record<string, boolean>;
9
- }
10
- interface ConsentBannerClassNames {
11
- root?: string;
12
- container?: string;
13
- title?: string;
14
- description?: string;
15
- optionsList?: string;
16
- optionItem?: string;
17
- optionCheckbox?: string;
18
- optionLabel?: string;
19
- optionDescription?: string;
20
- buttonGroup?: string;
21
- acceptButton?: string;
22
- rejectButton?: string;
23
- customizeButton?: string;
24
- saveButton?: string;
25
- customizePanel?: string;
26
- selectAllButton?: string;
27
- /** Alias for acceptButton */
28
- primaryButton?: string;
29
- /** Alias for rejectButton */
30
- secondaryButton?: string;
31
- }
32
- interface ConsentBannerProps {
33
- /**
34
- * Array of consent options to display
35
- */
36
- options: ConsentOption[];
37
- /**
38
- * Callback function called when user saves their consent choices
39
- */
40
- onSave: (settings: ConsentSettings) => void;
41
- /**
42
- * Title displayed on the banner
43
- * @default "We Value Your Privacy"
44
- */
45
- title?: string;
46
- /**
47
- * Description text displayed on the banner
48
- * @default "We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26."
49
- */
50
- description?: string;
51
- /**
52
- * Text for the accept all button
53
- * @default "Accept All"
54
- */
55
- acceptAllButtonText?: string;
56
- /**
57
- * Text for the reject all button
58
- * @default "Reject All"
59
- */
60
- rejectAllButtonText?: string;
61
- /**
62
- * Text for the customize button
63
- * @default "Customize"
64
- */
65
- customizeButtonText?: string;
66
- /**
67
- * Text for the save button
68
- * @default "Save Preferences"
69
- */
70
- saveButtonText?: string;
71
- /**
72
- * Position of the banner.
73
- * 'top', 'bottom', and 'center' render via a portal to document.body
74
- * with fixed positioning so the banner overlays the page.
75
- * 'inline' renders in the normal DOM tree without a portal.
76
- * @default "bottom"
77
- */
78
- position?: 'top' | 'bottom' | 'center' | 'inline';
79
- /**
80
- * Visual treatment.
81
- * - 'bar' (default): full-width strip pinned to the edge.
82
- * - 'card' : bounded floating card with rounded corners and a margin
83
- * from the screen edges. Pairs well with `position="bottom"`.
84
- * - 'modal' : centered card with a backdrop overlay. Forces center
85
- * placement regardless of `position`.
86
- * @default "bar"
87
- */
88
- variant?: 'bar' | 'card' | 'modal';
89
- /**
90
- * z-index applied to the fixed-position banner.
91
- * Ignored when position is 'inline'.
92
- * @default 9999
93
- */
94
- zIndex?: number;
95
- /**
96
- * Version of the consent form
97
- * @default "1.0"
98
- */
99
- version?: string;
100
- /**
101
- * Whether to show the banner
102
- * If not provided, the banner will be shown if no consent has been saved
103
- */
104
- show?: boolean;
105
- /**
106
- * Storage key for consent settings
107
- * @default "ndpr_consent"
108
- */
109
- storageKey?: string;
110
- /**
111
- * Whether the banner manages its own localStorage persistence.
112
- * Set to false when an external storage mechanism (e.g., ConsentStorage)
113
- * is responsible for persisting consent settings under the same key.
114
- * This avoids race conditions where two writers target the same storage key.
115
- * @default true
116
- */
117
- manageStorage?: boolean;
118
- /**
119
- * Custom CSS class for the banner
120
- */
121
- className?: string;
122
- /**
123
- * Custom CSS class for the buttons
124
- */
125
- buttonClassName?: string;
126
- /**
127
- * Custom CSS class for the primary button
128
- */
129
- primaryButtonClassName?: string;
130
- /**
131
- * Custom CSS class for the secondary button
132
- */
133
- secondaryButtonClassName?: string;
134
- /**
135
- * Object of CSS class overrides keyed by semantic section name.
136
- * Takes priority over buttonClassName / primaryButtonClassName / secondaryButtonClassName.
137
- */
138
- classNames?: ConsentBannerClassNames;
139
- /**
140
- * When true, all default Tailwind classes are removed so consumers
141
- * can style from scratch using classNames.
142
- */
143
- unstyled?: boolean;
144
- /**
145
- * Optional analytics callback fired on each user interaction.
146
- * Called when the banner is shown, accepted, rejected, customized, or dismissed.
147
- */
148
- onAnalytics?: (event: ConsentAnalyticsEvent) => void;
149
- }
150
- /**
151
- * Consent banner component. Implements NDPA Sections 25-26 consent requirements
152
- * for obtaining and managing data subject consent.
153
- */
154
- declare const ConsentBanner: React__default.FC<ConsentBannerProps>;
155
-
156
- export { type ConsentAnalyticsEvent as C, ConsentBanner as a, type ConsentBannerClassNames as b, type ConsentBannerProps as c };
@@ -1,156 +0,0 @@
1
- import React__default from 'react';
2
- import { C as ConsentOption, a as ConsentSettings } from './consent-CmVzqZUk.js';
3
-
4
- interface ConsentAnalyticsEvent {
5
- action: 'shown' | 'accepted_all' | 'rejected_all' | 'customized' | 'dismissed';
6
- timestamp: number;
7
- version: string;
8
- categories?: Record<string, boolean>;
9
- }
10
- interface ConsentBannerClassNames {
11
- root?: string;
12
- container?: string;
13
- title?: string;
14
- description?: string;
15
- optionsList?: string;
16
- optionItem?: string;
17
- optionCheckbox?: string;
18
- optionLabel?: string;
19
- optionDescription?: string;
20
- buttonGroup?: string;
21
- acceptButton?: string;
22
- rejectButton?: string;
23
- customizeButton?: string;
24
- saveButton?: string;
25
- customizePanel?: string;
26
- selectAllButton?: string;
27
- /** Alias for acceptButton */
28
- primaryButton?: string;
29
- /** Alias for rejectButton */
30
- secondaryButton?: string;
31
- }
32
- interface ConsentBannerProps {
33
- /**
34
- * Array of consent options to display
35
- */
36
- options: ConsentOption[];
37
- /**
38
- * Callback function called when user saves their consent choices
39
- */
40
- onSave: (settings: ConsentSettings) => void;
41
- /**
42
- * Title displayed on the banner
43
- * @default "We Value Your Privacy"
44
- */
45
- title?: string;
46
- /**
47
- * Description text displayed on the banner
48
- * @default "We use cookies and similar technologies to provide our services and enhance your experience. Your consent is collected in accordance with NDPA Sections 25-26."
49
- */
50
- description?: string;
51
- /**
52
- * Text for the accept all button
53
- * @default "Accept All"
54
- */
55
- acceptAllButtonText?: string;
56
- /**
57
- * Text for the reject all button
58
- * @default "Reject All"
59
- */
60
- rejectAllButtonText?: string;
61
- /**
62
- * Text for the customize button
63
- * @default "Customize"
64
- */
65
- customizeButtonText?: string;
66
- /**
67
- * Text for the save button
68
- * @default "Save Preferences"
69
- */
70
- saveButtonText?: string;
71
- /**
72
- * Position of the banner.
73
- * 'top', 'bottom', and 'center' render via a portal to document.body
74
- * with fixed positioning so the banner overlays the page.
75
- * 'inline' renders in the normal DOM tree without a portal.
76
- * @default "bottom"
77
- */
78
- position?: 'top' | 'bottom' | 'center' | 'inline';
79
- /**
80
- * Visual treatment.
81
- * - 'bar' (default): full-width strip pinned to the edge.
82
- * - 'card' : bounded floating card with rounded corners and a margin
83
- * from the screen edges. Pairs well with `position="bottom"`.
84
- * - 'modal' : centered card with a backdrop overlay. Forces center
85
- * placement regardless of `position`.
86
- * @default "bar"
87
- */
88
- variant?: 'bar' | 'card' | 'modal';
89
- /**
90
- * z-index applied to the fixed-position banner.
91
- * Ignored when position is 'inline'.
92
- * @default 9999
93
- */
94
- zIndex?: number;
95
- /**
96
- * Version of the consent form
97
- * @default "1.0"
98
- */
99
- version?: string;
100
- /**
101
- * Whether to show the banner
102
- * If not provided, the banner will be shown if no consent has been saved
103
- */
104
- show?: boolean;
105
- /**
106
- * Storage key for consent settings
107
- * @default "ndpr_consent"
108
- */
109
- storageKey?: string;
110
- /**
111
- * Whether the banner manages its own localStorage persistence.
112
- * Set to false when an external storage mechanism (e.g., ConsentStorage)
113
- * is responsible for persisting consent settings under the same key.
114
- * This avoids race conditions where two writers target the same storage key.
115
- * @default true
116
- */
117
- manageStorage?: boolean;
118
- /**
119
- * Custom CSS class for the banner
120
- */
121
- className?: string;
122
- /**
123
- * Custom CSS class for the buttons
124
- */
125
- buttonClassName?: string;
126
- /**
127
- * Custom CSS class for the primary button
128
- */
129
- primaryButtonClassName?: string;
130
- /**
131
- * Custom CSS class for the secondary button
132
- */
133
- secondaryButtonClassName?: string;
134
- /**
135
- * Object of CSS class overrides keyed by semantic section name.
136
- * Takes priority over buttonClassName / primaryButtonClassName / secondaryButtonClassName.
137
- */
138
- classNames?: ConsentBannerClassNames;
139
- /**
140
- * When true, all default Tailwind classes are removed so consumers
141
- * can style from scratch using classNames.
142
- */
143
- unstyled?: boolean;
144
- /**
145
- * Optional analytics callback fired on each user interaction.
146
- * Called when the banner is shown, accepted, rejected, customized, or dismissed.
147
- */
148
- onAnalytics?: (event: ConsentAnalyticsEvent) => void;
149
- }
150
- /**
151
- * Consent banner component. Implements NDPA Sections 25-26 consent requirements
152
- * for obtaining and managing data subject consent.
153
- */
154
- declare const ConsentBanner: React__default.FC<ConsentBannerProps>;
155
-
156
- export { type ConsentAnalyticsEvent as C, ConsentBanner as a, type ConsentBannerClassNames as b, type ConsentBannerProps as c };