@tantainnovative/ndpr-toolkit 2.4.1 → 3.2.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 (192) hide show
  1. package/README.md +226 -246
  2. package/dist/BreachReportForm-DpRrBoxU.d.ts +158 -0
  3. package/dist/BreachReportForm-yJ2Zl6gz.d.mts +158 -0
  4. package/dist/ConsentBanner-CDRT0o2k.d.mts +146 -0
  5. package/dist/ConsentBanner-Vxyt8SCX.d.ts +146 -0
  6. package/dist/{cross-border-entry-BrWVPly6.d.ts → CrossBorderTransferManager-D5Lc0e46.d.ts} +4 -5
  7. package/dist/{cross-border-entry-cCTvpwnT.d.mts → CrossBorderTransferManager-DkZhv9vD.d.mts} +4 -5
  8. package/dist/DPIAQuestionnaire-BkejviPj.d.mts +123 -0
  9. package/dist/DPIAQuestionnaire-DdSqXG3x.d.ts +123 -0
  10. package/dist/DSRRequestForm-BY8PogCU.d.mts +146 -0
  11. package/dist/DSRRequestForm-CHUg9cZh.d.ts +146 -0
  12. package/dist/DSRTracker-C6u_jAaK.d.mts +163 -0
  13. package/dist/DSRTracker-Dr_aT0pg.d.ts +163 -0
  14. package/dist/{lawful-basis-entry-CxZrofwG.d.mts → LawfulBasisTracker-CBqOxX1D.d.mts} +3 -5
  15. package/dist/{lawful-basis-entry-15qjKcNO.d.ts → LawfulBasisTracker-Cg30NbDA.d.ts} +3 -5
  16. package/dist/NDPRDashboard-CLJpEg0X.d.mts +44 -0
  17. package/dist/NDPRDashboard-DDWNd2Ah.d.ts +44 -0
  18. package/dist/{policy-E0fXZkda.d.mts → PolicyExporter-Bgi6nz82.d.mts} +5 -7
  19. package/dist/{policy-D2_jh5-T.d.ts → PolicyExporter-BnvuFncj.d.ts} +5 -7
  20. package/dist/{ropa-entry-B0D7X1GV.d.ts → ROPAManager-BS4eB8Hw.d.mts} +4 -5
  21. package/dist/{ropa-entry-DiOThOc2.d.mts → ROPAManager-qxTrXLkD.d.ts} +4 -5
  22. package/dist/RegulatoryReportGenerator-BUYgzTTT.d.ts +282 -0
  23. package/dist/RegulatoryReportGenerator-DwcHcEFp.d.mts +282 -0
  24. package/dist/StepIndicator-D-nwRTyo.d.mts +171 -0
  25. package/dist/StepIndicator-D9ZATz_O.d.ts +171 -0
  26. package/dist/adapters.d.mts +25 -0
  27. package/dist/adapters.d.ts +25 -0
  28. package/dist/adapters.js +2 -0
  29. package/dist/adapters.mjs +2 -0
  30. package/dist/breach.d.mts +36 -431
  31. package/dist/breach.d.ts +36 -431
  32. package/dist/breach.js +1 -1
  33. package/dist/breach.mjs +1 -1
  34. package/dist/chunk-27NYSWUG.mjs +2 -0
  35. package/dist/chunk-2ORDHJRD.js +2 -0
  36. package/dist/chunk-2W7ARAW2.js +2 -0
  37. package/dist/chunk-3F34NACG.js +2 -0
  38. package/dist/chunk-3UWT64FI.mjs +2 -0
  39. package/dist/chunk-3V23O4ZJ.js +2 -0
  40. package/dist/chunk-3XAUN5IM.mjs +3 -0
  41. package/dist/chunk-44W4H2EY.js +2 -0
  42. package/dist/chunk-5VMHKNJY.js +2 -0
  43. package/dist/chunk-6D3ZUGBB.mjs +2 -0
  44. package/dist/chunk-6E54NSAO.mjs +2 -0
  45. package/dist/chunk-7F5F5YWI.mjs +2 -0
  46. package/dist/chunk-DQLDX5X6.js +316 -0
  47. package/dist/chunk-FR7ZYZXB.js +2 -0
  48. package/dist/chunk-FY5G6DGZ.js +7 -0
  49. package/dist/chunk-G26I6MP5.mjs +2 -0
  50. package/dist/chunk-GCQRHMTQ.mjs +144 -0
  51. package/dist/chunk-GPJVTGHR.mjs +2 -0
  52. package/dist/chunk-GVANK6PL.js +3 -0
  53. package/dist/chunk-HNZK7LY3.mjs +2 -0
  54. package/dist/chunk-IKEPXHCZ.js +2 -0
  55. package/dist/chunk-IQQW52EF.js +2 -0
  56. package/dist/chunk-ISSGO2YT.mjs +72 -0
  57. package/dist/chunk-JZKH5RMC.js +3 -0
  58. package/dist/chunk-KHRBU5K7.js +2 -0
  59. package/dist/chunk-LFNA6WYQ.mjs +2 -0
  60. package/dist/chunk-LU4PFST7.js +144 -0
  61. package/dist/chunk-NPI5T6NH.mjs +7 -0
  62. package/dist/chunk-NPLXE43Q.mjs +2 -0
  63. package/dist/chunk-P7BSBCB3.js +2 -0
  64. package/dist/chunk-PEH5GIMN.js +2 -0
  65. package/dist/chunk-RSUDIFZV.mjs +2 -0
  66. package/dist/chunk-SBNAMPAP.mjs +2 -0
  67. package/dist/chunk-SVCRYM4I.mjs +2 -0
  68. package/dist/chunk-TKBZRULW.mjs +316 -0
  69. package/dist/chunk-TVW6KBVV.mjs +2 -0
  70. package/dist/chunk-U6VWHC46.js +72 -0
  71. package/dist/chunk-UK656RCG.js +2 -0
  72. package/dist/chunk-UNKXYVXY.js +2 -0
  73. package/dist/chunk-UOSEH6DC.js +2 -0
  74. package/dist/chunk-V37BM2LF.js +2 -0
  75. package/dist/chunk-V3MXWGXU.mjs +2 -0
  76. package/dist/chunk-VDZKGCAF.js +2 -0
  77. package/dist/chunk-WLSW4Z4W.mjs +2 -0
  78. package/dist/chunk-XSK4BSZJ.mjs +2 -0
  79. package/dist/chunk-YJCGEOLO.mjs +2 -0
  80. package/dist/chunk-ZCZ5RRZO.js +2 -0
  81. package/dist/chunk-ZQSX5ZHB.mjs +3 -0
  82. package/dist/compliance-score-racQe_E_.d.mts +115 -0
  83. package/dist/compliance-score-racQe_E_.d.ts +115 -0
  84. package/dist/consent.d.mts +67 -295
  85. package/dist/consent.d.ts +67 -295
  86. package/dist/consent.js +1 -1
  87. package/dist/consent.mjs +1 -1
  88. package/dist/core.d.mts +14 -48
  89. package/dist/core.d.ts +14 -48
  90. package/dist/core.js +1 -1
  91. package/dist/core.mjs +1 -1
  92. package/dist/cross-border-BBi9rZyO.d.mts +54 -0
  93. package/dist/cross-border-Dy-U9Hu6.d.ts +54 -0
  94. package/dist/{cross-border-BMcqLvjC.d.mts → cross-border-UyT00llA.d.mts} +1 -52
  95. package/dist/{cross-border-BMcqLvjC.d.ts → cross-border-UyT00llA.d.ts} +1 -52
  96. package/dist/cross-border.d.mts +32 -4
  97. package/dist/cross-border.d.ts +32 -4
  98. package/dist/cross-border.js +1 -1
  99. package/dist/cross-border.mjs +1 -1
  100. package/dist/dpia.d.mts +28 -284
  101. package/dist/dpia.d.ts +28 -284
  102. package/dist/dpia.js +1 -1
  103. package/dist/dpia.mjs +1 -1
  104. package/dist/dsr.d.mts +29 -300
  105. package/dist/dsr.d.ts +29 -300
  106. package/dist/dsr.js +1 -1
  107. package/dist/dsr.mjs +1 -1
  108. package/dist/hooks.d.mts +23 -10
  109. package/dist/hooks.d.ts +23 -10
  110. package/dist/hooks.js +1 -1
  111. package/dist/hooks.mjs +1 -1
  112. package/dist/index.d.mts +28 -19
  113. package/dist/index.d.ts +28 -19
  114. package/dist/index.js +1 -1
  115. package/dist/index.mjs +1 -1
  116. package/dist/lawful-basis.d.mts +31 -4
  117. package/dist/lawful-basis.d.ts +31 -4
  118. package/dist/lawful-basis.js +1 -1
  119. package/dist/lawful-basis.mjs +1 -1
  120. package/dist/policy-engine-C-tShzZH.d.mts +154 -0
  121. package/dist/policy-engine-DSQpT55_.d.ts +154 -0
  122. package/dist/policy-sections-CfNVBLCh.d.mts +54 -0
  123. package/dist/policy-sections-DqH0iZRf.d.ts +54 -0
  124. package/dist/policy.d.mts +117 -4
  125. package/dist/policy.d.ts +117 -4
  126. package/dist/policy.js +1 -1
  127. package/dist/policy.mjs +1 -1
  128. package/dist/presets.d.mts +114 -0
  129. package/dist/presets.d.ts +114 -0
  130. package/dist/presets.js +2 -0
  131. package/dist/presets.mjs +2 -0
  132. package/dist/{ropa-Li6UlL5H.d.ts → ropa-BDTM06tr.d.ts} +1 -49
  133. package/dist/{ropa-DP7pPPql.d.mts → ropa-CFHuT7jE.d.mts} +1 -49
  134. package/dist/ropa-CyynscU6.d.ts +51 -0
  135. package/dist/ropa-NIgxd8uP.d.mts +51 -0
  136. package/dist/ropa.d.mts +30 -4
  137. package/dist/ropa.d.ts +30 -4
  138. package/dist/ropa.js +1 -1
  139. package/dist/ropa.mjs +1 -1
  140. package/dist/sanitize-9mOO_cJW.d.mts +147 -0
  141. package/dist/sanitize-9mOO_cJW.d.ts +147 -0
  142. package/dist/styling-B7CBzYG7.d.ts +165 -0
  143. package/dist/styling-uJLsBbER.d.mts +165 -0
  144. package/dist/types-DK2CoKOC.d.mts +10 -0
  145. package/dist/types-DK2CoKOC.d.ts +10 -0
  146. package/dist/unstyled.d.mts +4 -4
  147. package/dist/unstyled.d.ts +4 -4
  148. package/dist/useAdaptivePolicyWizard-B9Op2gYM.d.ts +52 -0
  149. package/dist/useAdaptivePolicyWizard-N4eUM4Tj.d.mts +52 -0
  150. package/dist/{useBreach-BBSoIcZO.d.mts → useBreach-CPr86Yan.d.mts} +18 -2
  151. package/dist/{useBreach-lFLbSyAN.d.ts → useBreach-DkVXvtJK.d.ts} +18 -2
  152. package/dist/{useConsent-D0pAfTlb.d.ts → useConsent-DCNkIJHR.d.mts} +12 -2
  153. package/dist/{useConsent-DOt2Njst.d.mts → useConsent-dOcELSfX.d.ts} +12 -2
  154. package/dist/{useCrossBorderTransfer-DmtACeqW.d.ts → useCrossBorderTransfer-BGNZt2lk.d.mts} +15 -3
  155. package/dist/{useCrossBorderTransfer-BZVFCXfr.d.mts → useCrossBorderTransfer-COqjgjsu.d.ts} +15 -3
  156. package/dist/{useDPIA-DBsg2yZx.d.ts → useDPIA-Dl16Te3r.d.ts} +13 -2
  157. package/dist/{useDPIA-Da7-Q_yW.d.mts → useDPIA-DzWye8JB.d.mts} +13 -2
  158. package/dist/{useDSR-YYZ6FYFs.d.mts → useDSR-C1LksCfP.d.mts} +13 -2
  159. package/dist/{useDSR-CYI7WCXr.d.ts → useDSR-DZel52O1.d.ts} +13 -2
  160. package/dist/{useDefaultPrivacyPolicy-CUluF_ic.d.mts → useDefaultPrivacyPolicy-BsYttRey.d.mts} +13 -2
  161. package/dist/{useDefaultPrivacyPolicy-B7kTHbZh.d.ts → useDefaultPrivacyPolicy-C-mG-A5S.d.ts} +13 -2
  162. package/dist/{useLawfulBasis-CpWuHtyh.d.mts → useLawfulBasis-CKJ-kw84.d.mts} +13 -2
  163. package/dist/{useLawfulBasis-CCWF9waR.d.ts → useLawfulBasis-DFTmu1ca.d.ts} +13 -2
  164. package/dist/{useROPA-BhJ3kvHp.d.ts → useROPA-BSSU1rfx.d.ts} +14 -2
  165. package/dist/{useROPA-DLFdjkxP.d.mts → useROPA-C2hjaBTz.d.mts} +14 -2
  166. package/package.json +24 -3
  167. package/dist/chunk-2XFAV267.mjs +0 -2
  168. package/dist/chunk-32UIWTGD.js +0 -72
  169. package/dist/chunk-3YCV2BA6.js +0 -2
  170. package/dist/chunk-4A354HL3.js +0 -2
  171. package/dist/chunk-5ZBO2UPH.js +0 -2
  172. package/dist/chunk-6GGGTRDZ.mjs +0 -2
  173. package/dist/chunk-BZTTQS4A.mjs +0 -7
  174. package/dist/chunk-EKVTLHBQ.js +0 -2
  175. package/dist/chunk-GMLNWS2N.mjs +0 -2
  176. package/dist/chunk-IBEKLDBY.mjs +0 -2
  177. package/dist/chunk-ILCNDOBU.js +0 -2
  178. package/dist/chunk-K3GMTMQ6.js +0 -2
  179. package/dist/chunk-L52PDW6O.mjs +0 -2
  180. package/dist/chunk-LI6WJ3LZ.js +0 -2
  181. package/dist/chunk-LXRXDTPI.js +0 -2
  182. package/dist/chunk-NW4A3JW6.mjs +0 -2
  183. package/dist/chunk-OITITR6K.mjs +0 -2
  184. package/dist/chunk-PDJGTQMY.mjs +0 -2
  185. package/dist/chunk-T44JQT2O.mjs +0 -2
  186. package/dist/chunk-TCJCE6WN.js +0 -2
  187. package/dist/chunk-VMJBW3EF.mjs +0 -2
  188. package/dist/chunk-WSHSHIIM.mjs +0 -2
  189. package/dist/chunk-WW3X3ELF.js +0 -2
  190. package/dist/chunk-XMYUYQH7.mjs +0 -72
  191. package/dist/chunk-ZNTMZ6NM.js +0 -7
  192. package/dist/chunk-ZU73VG3X.js +0 -2
@@ -0,0 +1,165 @@
1
+ import React__default from 'react';
2
+ import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.js';
3
+
4
+ interface ConsentManagerClassNames {
5
+ root?: string;
6
+ header?: string;
7
+ title?: string;
8
+ description?: string;
9
+ optionsList?: string;
10
+ optionItem?: string;
11
+ toggle?: string;
12
+ saveButton?: string;
13
+ resetButton?: string;
14
+ /** Alias for saveButton */
15
+ primaryButton?: string;
16
+ /** Alias for resetButton */
17
+ secondaryButton?: string;
18
+ }
19
+ interface ConsentManagerProps {
20
+ /**
21
+ * Array of consent options to display
22
+ */
23
+ options: ConsentOption[];
24
+ /**
25
+ * Current consent settings
26
+ */
27
+ settings?: ConsentSettings;
28
+ /**
29
+ * Callback function called when user saves their consent choices
30
+ */
31
+ onSave: (settings: ConsentSettings) => void;
32
+ /**
33
+ * Title displayed in the manager
34
+ * @default "Manage Your Privacy Settings"
35
+ */
36
+ title?: string;
37
+ /**
38
+ * Description text displayed in the manager
39
+ * @default "Update your consent preferences at any time. Required cookies cannot be disabled as they are necessary for the website to function. Consent management is provided in accordance with NDPA Sections 25-26."
40
+ */
41
+ description?: string;
42
+ /**
43
+ * Text for the save button
44
+ * @default "Save Preferences"
45
+ */
46
+ saveButtonText?: string;
47
+ /**
48
+ * Text for the reset button
49
+ * @default "Reset to Defaults"
50
+ */
51
+ resetButtonText?: string;
52
+ /**
53
+ * Version of the consent form
54
+ * @default "1.0"
55
+ */
56
+ version?: string;
57
+ /**
58
+ * Custom CSS class for the manager
59
+ */
60
+ className?: string;
61
+ /**
62
+ * Custom CSS class for the buttons
63
+ */
64
+ buttonClassName?: string;
65
+ /**
66
+ * Custom CSS class for the primary button
67
+ */
68
+ primaryButtonClassName?: string;
69
+ /**
70
+ * Custom CSS class for the secondary button
71
+ */
72
+ secondaryButtonClassName?: string;
73
+ /**
74
+ * Object of CSS class overrides keyed by semantic section name.
75
+ * Takes priority over buttonClassName / primaryButtonClassName / secondaryButtonClassName.
76
+ */
77
+ classNames?: ConsentManagerClassNames;
78
+ /**
79
+ * When true, all default Tailwind classes are removed so consumers
80
+ * can style from scratch using classNames.
81
+ */
82
+ unstyled?: boolean;
83
+ /**
84
+ * Whether to show a success message after saving
85
+ * @default true
86
+ */
87
+ showSuccessMessage?: boolean;
88
+ /**
89
+ * Success message to display after saving
90
+ * @default "Your preferences have been saved."
91
+ */
92
+ successMessage?: string;
93
+ /**
94
+ * Duration to show the success message (in milliseconds)
95
+ * @default 3000
96
+ */
97
+ successMessageDuration?: number;
98
+ }
99
+ /**
100
+ * Consent management component. Implements NDPA Sections 25-26 consent requirements,
101
+ * allowing data subjects to review and update their consent preferences.
102
+ */
103
+ declare const ConsentManager: React__default.FC<ConsentManagerProps>;
104
+
105
+ interface ConsentStorageClassNames {
106
+ root?: string;
107
+ }
108
+ interface ConsentStorageProps {
109
+ /**
110
+ * Current consent settings
111
+ */
112
+ settings: ConsentSettings;
113
+ /**
114
+ * Storage options for consent settings
115
+ */
116
+ storageOptions?: ConsentStorageOptions;
117
+ /**
118
+ * Callback function called when settings are loaded from storage
119
+ */
120
+ onLoad?: (settings: ConsentSettings | null) => void;
121
+ /**
122
+ * Callback function called when settings are saved to storage
123
+ */
124
+ onSave?: (settings: ConsentSettings) => void;
125
+ /**
126
+ * Whether to automatically save settings to storage
127
+ * @default true
128
+ */
129
+ autoSave?: boolean;
130
+ /**
131
+ * Whether to automatically load settings from storage on mount
132
+ * @default true
133
+ */
134
+ autoLoad?: boolean;
135
+ /**
136
+ * Object of CSS class overrides keyed by semantic section name.
137
+ */
138
+ classNames?: ConsentStorageClassNames;
139
+ /**
140
+ * When true, all default classes are removed so consumers
141
+ * can style from scratch using classNames.
142
+ */
143
+ unstyled?: boolean;
144
+ /**
145
+ * Children to render
146
+ * Can be either React nodes or a render prop function that receives storage methods
147
+ */
148
+ children?: React__default.ReactNode | ((props: {
149
+ loadSettings: () => ConsentSettings | null;
150
+ saveSettings: (settings: ConsentSettings) => void;
151
+ clearSettings: () => void;
152
+ loaded: boolean;
153
+ }) => React__default.ReactNode);
154
+ }
155
+ declare const ConsentStorage: ({ settings, storageOptions, onLoad, onSave, autoSave, autoLoad, classNames, unstyled, children }: ConsentStorageProps) => React__default.ReactElement | null;
156
+
157
+ /**
158
+ * Resolves class names for a component section.
159
+ * If unstyled is true, only the override class is used (or empty string).
160
+ * If an override is provided, it fully REPLACES the default — no appending.
161
+ * Otherwise the default class string is returned as-is.
162
+ */
163
+ declare function resolveClass(defaultClass: string, override?: string, unstyled?: boolean): string;
164
+
165
+ export { ConsentManager as C, type ConsentManagerClassNames as a, ConsentStorage as b, type ConsentStorageClassNames as c, type ConsentManagerProps as d, type ConsentStorageProps as e, resolveClass as r };
@@ -0,0 +1,165 @@
1
+ import React__default from 'react';
2
+ import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.mjs';
3
+
4
+ interface ConsentManagerClassNames {
5
+ root?: string;
6
+ header?: string;
7
+ title?: string;
8
+ description?: string;
9
+ optionsList?: string;
10
+ optionItem?: string;
11
+ toggle?: string;
12
+ saveButton?: string;
13
+ resetButton?: string;
14
+ /** Alias for saveButton */
15
+ primaryButton?: string;
16
+ /** Alias for resetButton */
17
+ secondaryButton?: string;
18
+ }
19
+ interface ConsentManagerProps {
20
+ /**
21
+ * Array of consent options to display
22
+ */
23
+ options: ConsentOption[];
24
+ /**
25
+ * Current consent settings
26
+ */
27
+ settings?: ConsentSettings;
28
+ /**
29
+ * Callback function called when user saves their consent choices
30
+ */
31
+ onSave: (settings: ConsentSettings) => void;
32
+ /**
33
+ * Title displayed in the manager
34
+ * @default "Manage Your Privacy Settings"
35
+ */
36
+ title?: string;
37
+ /**
38
+ * Description text displayed in the manager
39
+ * @default "Update your consent preferences at any time. Required cookies cannot be disabled as they are necessary for the website to function. Consent management is provided in accordance with NDPA Sections 25-26."
40
+ */
41
+ description?: string;
42
+ /**
43
+ * Text for the save button
44
+ * @default "Save Preferences"
45
+ */
46
+ saveButtonText?: string;
47
+ /**
48
+ * Text for the reset button
49
+ * @default "Reset to Defaults"
50
+ */
51
+ resetButtonText?: string;
52
+ /**
53
+ * Version of the consent form
54
+ * @default "1.0"
55
+ */
56
+ version?: string;
57
+ /**
58
+ * Custom CSS class for the manager
59
+ */
60
+ className?: string;
61
+ /**
62
+ * Custom CSS class for the buttons
63
+ */
64
+ buttonClassName?: string;
65
+ /**
66
+ * Custom CSS class for the primary button
67
+ */
68
+ primaryButtonClassName?: string;
69
+ /**
70
+ * Custom CSS class for the secondary button
71
+ */
72
+ secondaryButtonClassName?: string;
73
+ /**
74
+ * Object of CSS class overrides keyed by semantic section name.
75
+ * Takes priority over buttonClassName / primaryButtonClassName / secondaryButtonClassName.
76
+ */
77
+ classNames?: ConsentManagerClassNames;
78
+ /**
79
+ * When true, all default Tailwind classes are removed so consumers
80
+ * can style from scratch using classNames.
81
+ */
82
+ unstyled?: boolean;
83
+ /**
84
+ * Whether to show a success message after saving
85
+ * @default true
86
+ */
87
+ showSuccessMessage?: boolean;
88
+ /**
89
+ * Success message to display after saving
90
+ * @default "Your preferences have been saved."
91
+ */
92
+ successMessage?: string;
93
+ /**
94
+ * Duration to show the success message (in milliseconds)
95
+ * @default 3000
96
+ */
97
+ successMessageDuration?: number;
98
+ }
99
+ /**
100
+ * Consent management component. Implements NDPA Sections 25-26 consent requirements,
101
+ * allowing data subjects to review and update their consent preferences.
102
+ */
103
+ declare const ConsentManager: React__default.FC<ConsentManagerProps>;
104
+
105
+ interface ConsentStorageClassNames {
106
+ root?: string;
107
+ }
108
+ interface ConsentStorageProps {
109
+ /**
110
+ * Current consent settings
111
+ */
112
+ settings: ConsentSettings;
113
+ /**
114
+ * Storage options for consent settings
115
+ */
116
+ storageOptions?: ConsentStorageOptions;
117
+ /**
118
+ * Callback function called when settings are loaded from storage
119
+ */
120
+ onLoad?: (settings: ConsentSettings | null) => void;
121
+ /**
122
+ * Callback function called when settings are saved to storage
123
+ */
124
+ onSave?: (settings: ConsentSettings) => void;
125
+ /**
126
+ * Whether to automatically save settings to storage
127
+ * @default true
128
+ */
129
+ autoSave?: boolean;
130
+ /**
131
+ * Whether to automatically load settings from storage on mount
132
+ * @default true
133
+ */
134
+ autoLoad?: boolean;
135
+ /**
136
+ * Object of CSS class overrides keyed by semantic section name.
137
+ */
138
+ classNames?: ConsentStorageClassNames;
139
+ /**
140
+ * When true, all default classes are removed so consumers
141
+ * can style from scratch using classNames.
142
+ */
143
+ unstyled?: boolean;
144
+ /**
145
+ * Children to render
146
+ * Can be either React nodes or a render prop function that receives storage methods
147
+ */
148
+ children?: React__default.ReactNode | ((props: {
149
+ loadSettings: () => ConsentSettings | null;
150
+ saveSettings: (settings: ConsentSettings) => void;
151
+ clearSettings: () => void;
152
+ loaded: boolean;
153
+ }) => React__default.ReactNode);
154
+ }
155
+ declare const ConsentStorage: ({ settings, storageOptions, onLoad, onSave, autoSave, autoLoad, classNames, unstyled, children }: ConsentStorageProps) => React__default.ReactElement | null;
156
+
157
+ /**
158
+ * Resolves class names for a component section.
159
+ * If unstyled is true, only the override class is used (or empty string).
160
+ * If an override is provided, it fully REPLACES the default — no appending.
161
+ * Otherwise the default class string is returned as-is.
162
+ */
163
+ declare function resolveClass(defaultClass: string, override?: string, unstyled?: boolean): string;
164
+
165
+ export { ConsentManager as C, type ConsentManagerClassNames as a, ConsentStorage as b, type ConsentStorageClassNames as c, type ConsentManagerProps as d, type ConsentStorageProps as e, resolveClass as r };
@@ -0,0 +1,10 @@
1
+ interface StorageAdapter<T = unknown> {
2
+ /** Load persisted data. Called once on hook mount. */
3
+ load(): T | null | Promise<T | null>;
4
+ /** Persist data. Called on every state change. */
5
+ save(data: T): void | Promise<void>;
6
+ /** Clear persisted data. Called on reset. */
7
+ remove(): void | Promise<void>;
8
+ }
9
+
10
+ export type { StorageAdapter as S };
@@ -0,0 +1,10 @@
1
+ interface StorageAdapter<T = unknown> {
2
+ /** Load persisted data. Called once on hook mount. */
3
+ load(): T | null | Promise<T | null>;
4
+ /** Persist data. Called on every state change. */
5
+ save(data: T): void | Promise<void>;
6
+ /** Clear persisted data. Called on reset. */
7
+ remove(): void | Promise<void>;
8
+ }
9
+
10
+ export type { StorageAdapter as S };
@@ -1,22 +1,22 @@
1
- import React, { ReactNode } from 'react';
1
+ import React__default, { ReactNode } from 'react';
2
2
 
3
3
  interface UnstyledConsentBannerProps {
4
4
  className?: string;
5
5
  children?: ReactNode;
6
6
  }
7
- declare const UnstyledConsentBanner: React.FC<UnstyledConsentBannerProps>;
7
+ declare const UnstyledConsentBanner: React__default.FC<UnstyledConsentBannerProps>;
8
8
 
9
9
  interface UnstyledConsentSettingsProps {
10
10
  className?: string;
11
11
  children?: ReactNode;
12
12
  }
13
- declare const UnstyledConsentSettings: React.FC<UnstyledConsentSettingsProps>;
13
+ declare const UnstyledConsentSettings: React__default.FC<UnstyledConsentSettingsProps>;
14
14
 
15
15
  interface UnstyledConsentToggleProps {
16
16
  category: 'analytics' | 'marketing' | 'functional';
17
17
  className?: string;
18
18
  label?: string;
19
19
  }
20
- declare const UnstyledConsentToggle: React.FC<UnstyledConsentToggleProps>;
20
+ declare const UnstyledConsentToggle: React__default.FC<UnstyledConsentToggleProps>;
21
21
 
22
22
  export { UnstyledConsentBanner as ConsentBanner, UnstyledConsentSettings as ConsentSettings, UnstyledConsentToggle as ConsentToggle };
@@ -1,22 +1,22 @@
1
- import React, { ReactNode } from 'react';
1
+ import React__default, { ReactNode } from 'react';
2
2
 
3
3
  interface UnstyledConsentBannerProps {
4
4
  className?: string;
5
5
  children?: ReactNode;
6
6
  }
7
- declare const UnstyledConsentBanner: React.FC<UnstyledConsentBannerProps>;
7
+ declare const UnstyledConsentBanner: React__default.FC<UnstyledConsentBannerProps>;
8
8
 
9
9
  interface UnstyledConsentSettingsProps {
10
10
  className?: string;
11
11
  children?: ReactNode;
12
12
  }
13
- declare const UnstyledConsentSettings: React.FC<UnstyledConsentSettingsProps>;
13
+ declare const UnstyledConsentSettings: React__default.FC<UnstyledConsentSettingsProps>;
14
14
 
15
15
  interface UnstyledConsentToggleProps {
16
16
  category: 'analytics' | 'marketing' | 'functional';
17
17
  className?: string;
18
18
  label?: string;
19
19
  }
20
- declare const UnstyledConsentToggle: React.FC<UnstyledConsentToggleProps>;
20
+ declare const UnstyledConsentToggle: React__default.FC<UnstyledConsentToggleProps>;
21
21
 
22
22
  export { UnstyledConsentBanner as ConsentBanner, UnstyledConsentSettings as ConsentSettings, UnstyledConsentToggle as ConsentToggle };
@@ -0,0 +1,52 @@
1
+ import { c as PrivacyPolicy, P as PolicySection } from './privacy-Ca6te9Ir.js';
2
+ import { P as PolicyDraft, C as ComplianceGap, T as TemplateContext, b as CustomSection, a as ComplianceResult, e as PDFExportOptions, f as DOCXExportOptions, H as HTMLExportOptions } from './policy-engine-DSQpT55_.js';
3
+ import { S as StorageAdapter } from './types-DK2CoKOC.js';
4
+
5
+ interface UseAdaptivePolicyWizardOptions {
6
+ adapter?: StorageAdapter<PolicyDraft>;
7
+ onComplete?: (policy: PrivacyPolicy) => void;
8
+ onComplianceChange?: (score: number, gaps: ComplianceGap[]) => void;
9
+ }
10
+ interface UseAdaptivePolicyWizardReturn {
11
+ currentStep: number;
12
+ goToStep: (step: number) => void;
13
+ nextStep: () => void;
14
+ prevStep: () => void;
15
+ canProceed: boolean;
16
+ context: TemplateContext;
17
+ updateContext: (updates: Partial<TemplateContext>) => void;
18
+ updateOrg: (updates: Partial<TemplateContext['org']>) => void;
19
+ toggleDataCategory: (categoryId: string) => void;
20
+ togglePurpose: (purpose: string) => void;
21
+ addProcessor: (processor: {
22
+ name: string;
23
+ purpose: string;
24
+ country: string;
25
+ }) => void;
26
+ removeProcessor: (index: number) => void;
27
+ policy: PrivacyPolicy | null;
28
+ sections: PolicySection[];
29
+ customSections: CustomSection[];
30
+ addCustomSection: (section: Omit<CustomSection, 'id' | 'required'>) => void;
31
+ updateCustomSection: (id: string, updates: Partial<CustomSection>) => void;
32
+ removeCustomSection: (id: string) => void;
33
+ reorderSections: (sectionId: string, direction: 'up' | 'down') => void;
34
+ editSectionContent: (sectionId: string, content: string) => void;
35
+ sectionOverrides: Record<string, string>;
36
+ complianceScore: number;
37
+ complianceResult: ComplianceResult;
38
+ complianceGaps: ComplianceGap[];
39
+ applyFix: (gapId: string) => void;
40
+ handleExportPDF: (options?: PDFExportOptions) => Promise<Blob>;
41
+ handleExportDOCX: (options?: DOCXExportOptions) => Promise<Blob>;
42
+ handleExportHTML: (options?: HTMLExportOptions) => string;
43
+ handleExportMarkdown: () => string;
44
+ isDraftSaved: boolean;
45
+ lastSavedAt: number | null;
46
+ saveDraft: () => Promise<void>;
47
+ discardDraft: () => void;
48
+ isLoading: boolean;
49
+ }
50
+ declare function useAdaptivePolicyWizard(options?: UseAdaptivePolicyWizardOptions): UseAdaptivePolicyWizardReturn;
51
+
52
+ export { type UseAdaptivePolicyWizardOptions as U, type UseAdaptivePolicyWizardReturn as a, useAdaptivePolicyWizard as u };
@@ -0,0 +1,52 @@
1
+ import { c as PrivacyPolicy, P as PolicySection } from './privacy-Ca6te9Ir.mjs';
2
+ import { P as PolicyDraft, C as ComplianceGap, T as TemplateContext, b as CustomSection, a as ComplianceResult, e as PDFExportOptions, f as DOCXExportOptions, H as HTMLExportOptions } from './policy-engine-C-tShzZH.mjs';
3
+ import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
4
+
5
+ interface UseAdaptivePolicyWizardOptions {
6
+ adapter?: StorageAdapter<PolicyDraft>;
7
+ onComplete?: (policy: PrivacyPolicy) => void;
8
+ onComplianceChange?: (score: number, gaps: ComplianceGap[]) => void;
9
+ }
10
+ interface UseAdaptivePolicyWizardReturn {
11
+ currentStep: number;
12
+ goToStep: (step: number) => void;
13
+ nextStep: () => void;
14
+ prevStep: () => void;
15
+ canProceed: boolean;
16
+ context: TemplateContext;
17
+ updateContext: (updates: Partial<TemplateContext>) => void;
18
+ updateOrg: (updates: Partial<TemplateContext['org']>) => void;
19
+ toggleDataCategory: (categoryId: string) => void;
20
+ togglePurpose: (purpose: string) => void;
21
+ addProcessor: (processor: {
22
+ name: string;
23
+ purpose: string;
24
+ country: string;
25
+ }) => void;
26
+ removeProcessor: (index: number) => void;
27
+ policy: PrivacyPolicy | null;
28
+ sections: PolicySection[];
29
+ customSections: CustomSection[];
30
+ addCustomSection: (section: Omit<CustomSection, 'id' | 'required'>) => void;
31
+ updateCustomSection: (id: string, updates: Partial<CustomSection>) => void;
32
+ removeCustomSection: (id: string) => void;
33
+ reorderSections: (sectionId: string, direction: 'up' | 'down') => void;
34
+ editSectionContent: (sectionId: string, content: string) => void;
35
+ sectionOverrides: Record<string, string>;
36
+ complianceScore: number;
37
+ complianceResult: ComplianceResult;
38
+ complianceGaps: ComplianceGap[];
39
+ applyFix: (gapId: string) => void;
40
+ handleExportPDF: (options?: PDFExportOptions) => Promise<Blob>;
41
+ handleExportDOCX: (options?: DOCXExportOptions) => Promise<Blob>;
42
+ handleExportHTML: (options?: HTMLExportOptions) => string;
43
+ handleExportMarkdown: () => string;
44
+ isDraftSaved: boolean;
45
+ lastSavedAt: number | null;
46
+ saveDraft: () => Promise<void>;
47
+ discardDraft: () => void;
48
+ isLoading: boolean;
49
+ }
50
+ declare function useAdaptivePolicyWizard(options?: UseAdaptivePolicyWizardOptions): UseAdaptivePolicyWizardReturn;
51
+
52
+ export { type UseAdaptivePolicyWizardOptions as U, type UseAdaptivePolicyWizardReturn as a, useAdaptivePolicyWizard as u };
@@ -1,5 +1,11 @@
1
1
  import { B as BreachCategory, a as BreachReport, b as RiskAssessment, R as RegulatoryNotification, N as NotificationRequirement } from './breach-Eu9byel8.mjs';
2
+ import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
2
3
 
4
+ type BreachCompositeState = {
5
+ reports: BreachReport[];
6
+ assessments: RiskAssessment[];
7
+ notifications: RegulatoryNotification[];
8
+ };
3
9
  interface UseBreachOptions {
4
10
  /**
5
11
  * Available breach categories
@@ -9,14 +15,20 @@ interface UseBreachOptions {
9
15
  * Initial breach reports
10
16
  */
11
17
  initialReports?: BreachReport[];
18
+ /**
19
+ * Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
20
+ */
21
+ adapter?: StorageAdapter<BreachCompositeState>;
12
22
  /**
13
23
  * Storage key for breach data
14
24
  * @default "ndpr_breach_data"
25
+ * @deprecated Use adapter instead
15
26
  */
16
27
  storageKey?: string;
17
28
  /**
18
29
  * Whether to use local storage to persist breach data
19
30
  * @default true
31
+ * @deprecated Use adapter instead
20
32
  */
21
33
  useLocalStorage?: boolean;
22
34
  /**
@@ -90,10 +102,14 @@ interface UseBreachReturn {
90
102
  * Clear all breach data
91
103
  */
92
104
  clearBreachData: () => void;
105
+ /**
106
+ * Whether the adapter is still loading data (relevant for async adapters)
107
+ */
108
+ isLoading: boolean;
93
109
  }
94
110
  /**
95
111
  * Hook for managing data breach notifications in compliance with the NDPA (Section 40)
96
112
  */
97
- declare function useBreach({ categories, initialReports, storageKey, useLocalStorage, onReport, onAssessment, onNotification }: UseBreachOptions): UseBreachReturn;
113
+ declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
98
114
 
99
- export { useBreach as u };
115
+ export { type UseBreachReturn as U, useBreach as u };
@@ -1,5 +1,11 @@
1
1
  import { B as BreachCategory, a as BreachReport, b as RiskAssessment, R as RegulatoryNotification, N as NotificationRequirement } from './breach-Eu9byel8.js';
2
+ import { S as StorageAdapter } from './types-DK2CoKOC.js';
2
3
 
4
+ type BreachCompositeState = {
5
+ reports: BreachReport[];
6
+ assessments: RiskAssessment[];
7
+ notifications: RegulatoryNotification[];
8
+ };
3
9
  interface UseBreachOptions {
4
10
  /**
5
11
  * Available breach categories
@@ -9,14 +15,20 @@ interface UseBreachOptions {
9
15
  * Initial breach reports
10
16
  */
11
17
  initialReports?: BreachReport[];
18
+ /**
19
+ * Pluggable storage adapter. When provided, takes precedence over storageKey/useLocalStorage.
20
+ */
21
+ adapter?: StorageAdapter<BreachCompositeState>;
12
22
  /**
13
23
  * Storage key for breach data
14
24
  * @default "ndpr_breach_data"
25
+ * @deprecated Use adapter instead
15
26
  */
16
27
  storageKey?: string;
17
28
  /**
18
29
  * Whether to use local storage to persist breach data
19
30
  * @default true
31
+ * @deprecated Use adapter instead
20
32
  */
21
33
  useLocalStorage?: boolean;
22
34
  /**
@@ -90,10 +102,14 @@ interface UseBreachReturn {
90
102
  * Clear all breach data
91
103
  */
92
104
  clearBreachData: () => void;
105
+ /**
106
+ * Whether the adapter is still loading data (relevant for async adapters)
107
+ */
108
+ isLoading: boolean;
93
109
  }
94
110
  /**
95
111
  * Hook for managing data breach notifications in compliance with the NDPA (Section 40)
96
112
  */
97
- declare function useBreach({ categories, initialReports, storageKey, useLocalStorage, onReport, onAssessment, onNotification }: UseBreachOptions): UseBreachReturn;
113
+ declare function useBreach({ categories, initialReports, adapter, storageKey, useLocalStorage, onReport, onAssessment, onNotification, }: UseBreachOptions): UseBreachReturn;
98
114
 
99
- export { useBreach as u };
115
+ export { type UseBreachReturn as U, useBreach as u };
@@ -1,12 +1,18 @@
1
- import { C as ConsentOption, b as ConsentStorageOptions, a as ConsentSettings } from './consent-CmVzqZUk.js';
1
+ import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.mjs';
2
+ import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
2
3
 
3
4
  interface UseConsentOptions {
4
5
  /**
5
6
  * Consent options to present to the user
6
7
  */
7
8
  options: ConsentOption[];
9
+ /**
10
+ * Pluggable storage adapter. When provided, takes precedence over storageOptions.
11
+ */
12
+ adapter?: StorageAdapter<ConsentSettings>;
8
13
  /**
9
14
  * Storage options for consent settings
15
+ * @deprecated Use adapter instead
10
16
  */
11
17
  storageOptions?: ConsentStorageOptions;
12
18
  /**
@@ -56,10 +62,14 @@ interface UseConsentReturn {
56
62
  * Reset consent settings (clear from storage)
57
63
  */
58
64
  resetConsent: () => void;
65
+ /**
66
+ * Whether the adapter is still loading data (relevant for async adapters)
67
+ */
68
+ isLoading: boolean;
59
69
  }
60
70
  /**
61
71
  * Hook for managing user consent in compliance with NDPA
62
72
  */
63
- declare function useConsent({ options, storageOptions, version, onChange }: UseConsentOptions): UseConsentReturn;
73
+ declare function useConsent({ options, adapter, storageOptions, version, onChange, }: UseConsentOptions): UseConsentReturn;
64
74
 
65
75
  export { useConsent as u };
@@ -1,12 +1,18 @@
1
- import { C as ConsentOption, b as ConsentStorageOptions, a as ConsentSettings } from './consent-CmVzqZUk.mjs';
1
+ import { C as ConsentOption, a as ConsentSettings, b as ConsentStorageOptions } from './consent-CmVzqZUk.js';
2
+ import { S as StorageAdapter } from './types-DK2CoKOC.js';
2
3
 
3
4
  interface UseConsentOptions {
4
5
  /**
5
6
  * Consent options to present to the user
6
7
  */
7
8
  options: ConsentOption[];
9
+ /**
10
+ * Pluggable storage adapter. When provided, takes precedence over storageOptions.
11
+ */
12
+ adapter?: StorageAdapter<ConsentSettings>;
8
13
  /**
9
14
  * Storage options for consent settings
15
+ * @deprecated Use adapter instead
10
16
  */
11
17
  storageOptions?: ConsentStorageOptions;
12
18
  /**
@@ -56,10 +62,14 @@ interface UseConsentReturn {
56
62
  * Reset consent settings (clear from storage)
57
63
  */
58
64
  resetConsent: () => void;
65
+ /**
66
+ * Whether the adapter is still loading data (relevant for async adapters)
67
+ */
68
+ isLoading: boolean;
59
69
  }
60
70
  /**
61
71
  * Hook for managing user consent in compliance with NDPA
62
72
  */
63
- declare function useConsent({ options, storageOptions, version, onChange }: UseConsentOptions): UseConsentReturn;
73
+ declare function useConsent({ options, adapter, storageOptions, version, onChange, }: UseConsentOptions): UseConsentReturn;
64
74
 
65
75
  export { useConsent as u };