@tantainnovative/ndpr-toolkit 3.4.1 → 3.5.1

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 (177) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/adapters.d.mts +34 -25
  3. package/dist/adapters.d.ts +34 -25
  4. package/dist/breach.d.mts +803 -44
  5. package/dist/breach.d.ts +803 -44
  6. package/dist/breach.js +1 -1
  7. package/dist/breach.mjs +1 -1
  8. package/dist/{chunk-ASLMPY54.js → chunk-3EGQWLJ6.js} +3 -3
  9. package/dist/chunk-B4Z5MBUC.mjs +2 -0
  10. package/dist/{chunk-LSCMXAPY.mjs → chunk-CKGJK4D7.mjs} +3 -3
  11. package/dist/{chunk-XSEZDQLB.js → chunk-CKJAECGV.js} +2 -2
  12. package/dist/{chunk-AHSMDPG5.js → chunk-CPK5D5FY.js} +2 -2
  13. package/dist/{chunk-DCJK5OZT.mjs → chunk-CWHBCQGT.mjs} +2 -2
  14. package/dist/{chunk-MLOWRZXO.mjs → chunk-F5TXUA4O.mjs} +3 -3
  15. package/dist/{chunk-BN77GP4W.mjs → chunk-GN5C32JB.mjs} +2 -2
  16. package/dist/{chunk-ZLSWOFAY.mjs → chunk-GRLIPT5V.mjs} +2 -2
  17. package/dist/{chunk-DUY6F3GT.mjs → chunk-H3EYBSVP.mjs} +3 -3
  18. package/dist/{chunk-NFJ4CB63.mjs → chunk-ID2NYIVE.mjs} +3 -3
  19. package/dist/chunk-J5WCPZLW.js +2 -0
  20. package/dist/{chunk-P2YV6DR3.js → chunk-LIM64IV2.js} +3 -3
  21. package/dist/chunk-LU7PKE7Y.mjs +2 -0
  22. package/dist/{chunk-HQSU7LGM.js → chunk-LWXZMKC2.js} +4 -4
  23. package/dist/{chunk-4BOEFDDE.js → chunk-ORFC66EA.js} +3 -3
  24. package/dist/{chunk-VTITKWGX.mjs → chunk-QSVVAZVT.mjs} +2 -2
  25. package/dist/chunk-SCWNM4PC.mjs +2 -0
  26. package/dist/{chunk-EHAZIKDX.js → chunk-SKKOMFXH.js} +2 -2
  27. package/dist/{chunk-WH6ZMUOS.mjs → chunk-TUNQUVHU.mjs} +2 -2
  28. package/dist/chunk-TV4U6AIS.js +2 -0
  29. package/dist/{chunk-ZYLDLGFL.js → chunk-VIQUXWJC.js} +2 -2
  30. package/dist/{chunk-SUEGUY35.js → chunk-XIM7KMD6.js} +2 -2
  31. package/dist/{chunk-P6QAFBCV.js → chunk-XNSZ7KUH.js} +2 -2
  32. package/dist/consent.d.mts +648 -84
  33. package/dist/consent.d.ts +648 -84
  34. package/dist/consent.js +1 -1
  35. package/dist/consent.mjs +1 -1
  36. package/dist/core.d.mts +2049 -23
  37. package/dist/core.d.ts +2049 -23
  38. package/dist/core.js +1 -1
  39. package/dist/core.mjs +1 -1
  40. package/dist/cross-border.d.mts +470 -99
  41. package/dist/cross-border.d.ts +470 -99
  42. package/dist/dpia.d.mts +591 -37
  43. package/dist/dpia.d.ts +591 -37
  44. package/dist/dsr.d.mts +654 -37
  45. package/dist/dsr.d.ts +654 -37
  46. package/dist/dsr.js +1 -1
  47. package/dist/dsr.mjs +1 -1
  48. package/dist/hooks.d.mts +2174 -30
  49. package/dist/hooks.d.ts +2174 -30
  50. package/dist/hooks.js +1 -1
  51. package/dist/hooks.mjs +1 -1
  52. package/dist/index.d.mts +4428 -43
  53. package/dist/index.d.ts +4428 -43
  54. package/dist/index.js +1 -1
  55. package/dist/index.mjs +1 -1
  56. package/dist/lawful-basis.d.mts +368 -32
  57. package/dist/lawful-basis.d.ts +368 -32
  58. package/dist/policy.d.mts +1178 -83
  59. package/dist/policy.d.ts +1178 -83
  60. package/dist/policy.js +1 -1
  61. package/dist/policy.mjs +1 -1
  62. package/dist/presets.d.mts +1020 -114
  63. package/dist/presets.d.ts +1020 -114
  64. package/dist/presets.js +1 -1
  65. package/dist/presets.mjs +1 -1
  66. package/dist/ropa.d.mts +396 -31
  67. package/dist/ropa.d.ts +396 -31
  68. package/dist/ropa.js +1 -1
  69. package/dist/ropa.mjs +1 -1
  70. package/dist/server.d.mts +2133 -24
  71. package/dist/server.d.ts +2133 -24
  72. package/dist/server.js +1 -1
  73. package/dist/server.mjs +1 -1
  74. package/dist/unstyled.d.mts +523 -55
  75. package/dist/unstyled.d.ts +523 -55
  76. package/dist/unstyled.js +1 -1
  77. package/dist/unstyled.mjs +1 -1
  78. package/package.json +3 -3
  79. package/dist/BreachReportForm-DpRrBoxU.d.ts +0 -158
  80. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +0 -158
  81. package/dist/ConsentBanner-F5ayys5K.d.mts +0 -156
  82. package/dist/ConsentBanner-VqIPophc.d.ts +0 -156
  83. package/dist/ConsentManager-C7I3PDe8.d.mts +0 -105
  84. package/dist/ConsentManager-CQ2IZtUU.d.ts +0 -105
  85. package/dist/CrossBorderTransferManager-D5Lc0e46.d.ts +0 -90
  86. package/dist/CrossBorderTransferManager-DkZhv9vD.d.mts +0 -90
  87. package/dist/DPIAQuestionnaire-VXBoWFMC.d.ts +0 -123
  88. package/dist/DPIAQuestionnaire-jkt1Veb6.d.mts +0 -123
  89. package/dist/DSRRequestForm-D8rPTNmU.d.ts +0 -146
  90. package/dist/DSRRequestForm-DRouEr9j.d.mts +0 -146
  91. package/dist/DSRTracker-Bl__d4df.d.ts +0 -163
  92. package/dist/DSRTracker-CSVDfgQQ.d.mts +0 -163
  93. package/dist/LawfulBasisTracker-CBqOxX1D.d.mts +0 -85
  94. package/dist/LawfulBasisTracker-Cg30NbDA.d.ts +0 -85
  95. package/dist/NDPRDashboard-CLJpEg0X.d.mts +0 -44
  96. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +0 -44
  97. package/dist/NDPRProvider-DYFb8xEl.d.ts +0 -68
  98. package/dist/NDPRProvider-U3QNu6MA.d.mts +0 -68
  99. package/dist/PolicyExporter-Bgi6nz82.d.mts +0 -291
  100. package/dist/PolicyExporter-BnvuFncj.d.ts +0 -291
  101. package/dist/ROPAManager-BS4eB8Hw.d.mts +0 -79
  102. package/dist/ROPAManager-qxTrXLkD.d.ts +0 -79
  103. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +0 -282
  104. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +0 -282
  105. package/dist/StepIndicator-CgrlokSV.d.ts +0 -171
  106. package/dist/StepIndicator-W8S_QjgO.d.mts +0 -171
  107. package/dist/breach-B_-6lDqS.d.mts +0 -17
  108. package/dist/breach-CzXqSsaY.d.ts +0 -17
  109. package/dist/breach-Eu9byel8.d.mts +0 -185
  110. package/dist/breach-Eu9byel8.d.ts +0 -185
  111. package/dist/chunk-2L7BSG7G.mjs +0 -2
  112. package/dist/chunk-5X32J5IA.mjs +0 -2
  113. package/dist/chunk-7D2OIPHH.mjs +0 -2
  114. package/dist/chunk-JKKRPS4P.js +0 -2
  115. package/dist/chunk-UHTJ6UFW.js +0 -2
  116. package/dist/compliance-score-racQe_E_.d.mts +0 -115
  117. package/dist/compliance-score-racQe_E_.d.ts +0 -115
  118. package/dist/consent-CmVzqZUk.d.mts +0 -99
  119. package/dist/consent-CmVzqZUk.d.ts +0 -99
  120. package/dist/consent-audit-BdByjYlM.d.mts +0 -65
  121. package/dist/consent-audit-DhbfMR0n.d.ts +0 -65
  122. package/dist/cross-border-BBi9rZyO.d.mts +0 -54
  123. package/dist/cross-border-Dy-U9Hu6.d.ts +0 -54
  124. package/dist/cross-border-UyT00llA.d.mts +0 -141
  125. package/dist/cross-border-UyT00llA.d.ts +0 -141
  126. package/dist/docx-4n8g4zul.d.mts +0 -64
  127. package/dist/docx-VvcTLYZM.d.ts +0 -64
  128. package/dist/dpia-D82hUrJe.d.ts +0 -15
  129. package/dist/dpia-DQDFw2_l.d.mts +0 -15
  130. package/dist/dpia-c9GiiOq0.d.mts +0 -137
  131. package/dist/dpia-c9GiiOq0.d.ts +0 -137
  132. package/dist/dsr-CIx5sd7e.d.ts +0 -14
  133. package/dist/dsr-XZ_HqTlA.d.mts +0 -14
  134. package/dist/dsr-yKbqX531.d.mts +0 -128
  135. package/dist/dsr-yKbqX531.d.ts +0 -128
  136. package/dist/lawful-basis-BEyI0kGg.d.ts +0 -57
  137. package/dist/lawful-basis-C2eGaoHM.d.mts +0 -57
  138. package/dist/lawful-basis-Cv1VmDLn.d.mts +0 -112
  139. package/dist/lawful-basis-Cv1VmDLn.d.ts +0 -112
  140. package/dist/locale-CxJx2tzn.d.mts +0 -25
  141. package/dist/locale-DSkrtf-c.d.ts +0 -25
  142. package/dist/policy-engine-5qTfp2z4.d.mts +0 -174
  143. package/dist/policy-engine-DzPxskOK.d.ts +0 -174
  144. package/dist/policy-sections-9tCb7VU7.d.ts +0 -56
  145. package/dist/policy-sections-CBWcJv-R.d.mts +0 -56
  146. package/dist/policy-templates-DhLwq4R-.d.ts +0 -43
  147. package/dist/policy-templates-DwYl2329.d.mts +0 -43
  148. package/dist/privacy-Ca6te9Ir.d.mts +0 -138
  149. package/dist/privacy-Ca6te9Ir.d.ts +0 -138
  150. package/dist/ropa-BDTM06tr.d.ts +0 -152
  151. package/dist/ropa-CFHuT7jE.d.mts +0 -152
  152. package/dist/ropa-CyynscU6.d.ts +0 -51
  153. package/dist/ropa-NIgxd8uP.d.mts +0 -51
  154. package/dist/sanitize-CxxwKxAx.d.mts +0 -94
  155. package/dist/sanitize-CxxwKxAx.d.ts +0 -94
  156. package/dist/styling-BMDGQDgS.d.mts +0 -64
  157. package/dist/styling-BaoQtV06.d.ts +0 -64
  158. package/dist/types-DK2CoKOC.d.mts +0 -10
  159. package/dist/types-DK2CoKOC.d.ts +0 -10
  160. package/dist/useAdaptivePolicyWizard-BSLyltzZ.d.mts +0 -52
  161. package/dist/useAdaptivePolicyWizard-CL7C7MTZ.d.ts +0 -52
  162. package/dist/useBreach-CPr86Yan.d.mts +0 -115
  163. package/dist/useBreach-DkVXvtJK.d.ts +0 -115
  164. package/dist/useConsent-DCNkIJHR.d.mts +0 -75
  165. package/dist/useConsent-dOcELSfX.d.ts +0 -75
  166. package/dist/useCrossBorderTransfer-DixjLjN1.d.mts +0 -78
  167. package/dist/useCrossBorderTransfer-DvSq06lv.d.ts +0 -78
  168. package/dist/useDPIA-B6180UQn.d.mts +0 -109
  169. package/dist/useDPIA-CTqbNbww.d.ts +0 -109
  170. package/dist/useDSR-WvHk8_iu.d.mts +0 -85
  171. package/dist/useDSR-wH4H6hSM.d.ts +0 -85
  172. package/dist/useDefaultPrivacyPolicy-Cs2WQSYQ.d.mts +0 -162
  173. package/dist/useDefaultPrivacyPolicy-DkOqMg2e.d.ts +0 -162
  174. package/dist/useLawfulBasis-CKJ-kw84.d.mts +0 -79
  175. package/dist/useLawfulBasis-DFTmu1ca.d.ts +0 -79
  176. package/dist/useROPA-BSSU1rfx.d.ts +0 -76
  177. 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 };