@tantainnovative/ndpr-toolkit 2.4.0 → 3.0.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 (184) 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-BIqSVjfC.d.mts} +4 -98
  19. package/dist/{policy-D2_jh5-T.d.ts → PolicyExporter-BNWaPBGU.d.ts} +4 -98
  20. package/dist/PolicyGenerator-BvcWPbxp.d.mts +96 -0
  21. package/dist/PolicyGenerator-BzRwtlgn.d.ts +96 -0
  22. package/dist/{ropa-entry-B0D7X1GV.d.ts → ROPAManager-BS4eB8Hw.d.mts} +4 -5
  23. package/dist/{ropa-entry-DiOThOc2.d.mts → ROPAManager-qxTrXLkD.d.ts} +4 -5
  24. package/dist/{breach-ouXoVTWs.d.ts → RegulatoryReportGenerator-BUYgzTTT.d.ts} +6 -162
  25. package/dist/{breach-yRiyyc4n.d.mts → RegulatoryReportGenerator-DwcHcEFp.d.mts} +6 -162
  26. package/dist/StepIndicator-D-nwRTyo.d.mts +171 -0
  27. package/dist/StepIndicator-D9ZATz_O.d.ts +171 -0
  28. package/dist/adapters.d.mts +25 -0
  29. package/dist/adapters.d.ts +25 -0
  30. package/dist/adapters.js +2 -0
  31. package/dist/adapters.mjs +2 -0
  32. package/dist/breach.d.mts +43 -4
  33. package/dist/breach.d.ts +43 -4
  34. package/dist/breach.js +1 -1
  35. package/dist/breach.mjs +1 -1
  36. package/dist/chunk-27NYSWUG.mjs +2 -0
  37. package/dist/chunk-2ORDHJRD.js +2 -0
  38. package/dist/chunk-2W7ARAW2.js +2 -0
  39. package/dist/chunk-3F34NACG.js +2 -0
  40. package/dist/chunk-3RGJV3VF.js +7 -0
  41. package/dist/chunk-3UWT64FI.mjs +2 -0
  42. package/dist/chunk-3V23O4ZJ.js +2 -0
  43. package/dist/chunk-3XAUN5IM.mjs +3 -0
  44. package/dist/chunk-5VMHKNJY.js +2 -0
  45. package/dist/chunk-6D3ZUGBB.mjs +2 -0
  46. package/dist/chunk-6E54NSAO.mjs +2 -0
  47. package/dist/chunk-7F5F5YWI.mjs +2 -0
  48. package/dist/chunk-7FIUX3ZM.js +89 -0
  49. package/dist/chunk-FR7ZYZXB.js +2 -0
  50. package/dist/chunk-FY5G6DGZ.js +7 -0
  51. package/dist/chunk-G26I6MP5.mjs +2 -0
  52. package/dist/chunk-GPJVTGHR.mjs +2 -0
  53. package/dist/chunk-GVANK6PL.js +3 -0
  54. package/dist/chunk-HNZK7LY3.mjs +2 -0
  55. package/dist/chunk-IKEPXHCZ.js +2 -0
  56. package/dist/chunk-IQQW52EF.js +2 -0
  57. package/dist/chunk-ISSGO2YT.mjs +72 -0
  58. package/dist/chunk-J6IKAGUP.mjs +89 -0
  59. package/dist/chunk-KHRBU5K7.js +2 -0
  60. package/dist/chunk-KNE4NXCY.mjs +7 -0
  61. package/dist/chunk-LFNA6WYQ.mjs +2 -0
  62. package/dist/chunk-NPI5T6NH.mjs +7 -0
  63. package/dist/chunk-NPLXE43Q.mjs +2 -0
  64. package/dist/chunk-P7BSBCB3.js +2 -0
  65. package/dist/chunk-PEH5GIMN.js +2 -0
  66. package/dist/chunk-RSUDIFZV.mjs +2 -0
  67. package/dist/chunk-SBNAMPAP.mjs +2 -0
  68. package/dist/chunk-SVCRYM4I.mjs +2 -0
  69. package/dist/chunk-U6VWHC46.js +72 -0
  70. package/dist/chunk-UK656RCG.js +2 -0
  71. package/dist/chunk-UNKXYVXY.js +2 -0
  72. package/dist/chunk-UOSEH6DC.js +2 -0
  73. package/dist/chunk-V37BM2LF.js +2 -0
  74. package/dist/chunk-V3MXWGXU.mjs +2 -0
  75. package/dist/chunk-VDZKGCAF.js +2 -0
  76. package/dist/chunk-WLSW4Z4W.mjs +2 -0
  77. package/dist/chunk-XSK4BSZJ.mjs +2 -0
  78. package/dist/chunk-YJCGEOLO.mjs +2 -0
  79. package/dist/chunk-ZCZ5RRZO.js +2 -0
  80. package/dist/compliance-score-racQe_E_.d.mts +115 -0
  81. package/dist/compliance-score-racQe_E_.d.ts +115 -0
  82. package/dist/consent.d.mts +67 -295
  83. package/dist/consent.d.ts +67 -295
  84. package/dist/consent.js +1 -1
  85. package/dist/consent.mjs +1 -1
  86. package/dist/core.d.mts +8 -5
  87. package/dist/core.d.ts +8 -5
  88. package/dist/core.js +1 -1
  89. package/dist/core.mjs +1 -1
  90. package/dist/cross-border-BBi9rZyO.d.mts +54 -0
  91. package/dist/cross-border-Dy-U9Hu6.d.ts +54 -0
  92. package/dist/{cross-border-BMcqLvjC.d.mts → cross-border-UyT00llA.d.mts} +1 -52
  93. package/dist/{cross-border-BMcqLvjC.d.ts → cross-border-UyT00llA.d.ts} +1 -52
  94. package/dist/cross-border.d.mts +32 -4
  95. package/dist/cross-border.d.ts +32 -4
  96. package/dist/cross-border.js +1 -1
  97. package/dist/cross-border.mjs +1 -1
  98. package/dist/dpia.d.mts +28 -284
  99. package/dist/dpia.d.ts +28 -284
  100. package/dist/dpia.js +1 -1
  101. package/dist/dpia.mjs +1 -1
  102. package/dist/dsr.d.mts +36 -4
  103. package/dist/dsr.d.ts +36 -4
  104. package/dist/dsr.js +1 -1
  105. package/dist/dsr.mjs +1 -1
  106. package/dist/hooks.d.mts +21 -10
  107. package/dist/hooks.d.ts +21 -10
  108. package/dist/hooks.js +1 -1
  109. package/dist/hooks.mjs +1 -1
  110. package/dist/index.d.mts +28 -18
  111. package/dist/index.d.ts +28 -18
  112. package/dist/index.js +1 -1
  113. package/dist/index.mjs +1 -1
  114. package/dist/lawful-basis.d.mts +31 -4
  115. package/dist/lawful-basis.d.ts +31 -4
  116. package/dist/lawful-basis.js +1 -1
  117. package/dist/lawful-basis.mjs +1 -1
  118. package/dist/policy.d.mts +36 -4
  119. package/dist/policy.d.ts +36 -4
  120. package/dist/policy.js +1 -1
  121. package/dist/policy.mjs +1 -1
  122. package/dist/presets.d.mts +124 -0
  123. package/dist/presets.d.ts +124 -0
  124. package/dist/presets.js +2 -0
  125. package/dist/presets.mjs +2 -0
  126. package/dist/{ropa-Li6UlL5H.d.ts → ropa-BDTM06tr.d.ts} +1 -49
  127. package/dist/{ropa-DP7pPPql.d.mts → ropa-CFHuT7jE.d.mts} +1 -49
  128. package/dist/ropa-CyynscU6.d.ts +51 -0
  129. package/dist/ropa-NIgxd8uP.d.mts +51 -0
  130. package/dist/ropa.d.mts +30 -4
  131. package/dist/ropa.d.ts +30 -4
  132. package/dist/ropa.js +1 -1
  133. package/dist/ropa.mjs +1 -1
  134. package/dist/styling-B7CBzYG7.d.ts +165 -0
  135. package/dist/styling-uJLsBbER.d.mts +165 -0
  136. package/dist/types-DK2CoKOC.d.mts +10 -0
  137. package/dist/types-DK2CoKOC.d.ts +10 -0
  138. package/dist/unstyled.d.mts +4 -4
  139. package/dist/unstyled.d.ts +4 -4
  140. package/dist/{useBreach-BBSoIcZO.d.mts → useBreach-CPr86Yan.d.mts} +18 -2
  141. package/dist/{useBreach-lFLbSyAN.d.ts → useBreach-DkVXvtJK.d.ts} +18 -2
  142. package/dist/{useConsent-D0pAfTlb.d.ts → useConsent-DCNkIJHR.d.mts} +12 -2
  143. package/dist/{useConsent-DOt2Njst.d.mts → useConsent-dOcELSfX.d.ts} +12 -2
  144. package/dist/{useCrossBorderTransfer-DmtACeqW.d.ts → useCrossBorderTransfer-BGNZt2lk.d.mts} +15 -3
  145. package/dist/{useCrossBorderTransfer-BZVFCXfr.d.mts → useCrossBorderTransfer-COqjgjsu.d.ts} +15 -3
  146. package/dist/{useDPIA-DBsg2yZx.d.ts → useDPIA-Dl16Te3r.d.ts} +13 -2
  147. package/dist/{useDPIA-Da7-Q_yW.d.mts → useDPIA-DzWye8JB.d.mts} +13 -2
  148. package/dist/{useDSR-YYZ6FYFs.d.mts → useDSR-C1LksCfP.d.mts} +13 -2
  149. package/dist/{useDSR-CYI7WCXr.d.ts → useDSR-DZel52O1.d.ts} +13 -2
  150. package/dist/{useDefaultPrivacyPolicy-CUluF_ic.d.mts → useDefaultPrivacyPolicy-BsYttRey.d.mts} +13 -2
  151. package/dist/{useDefaultPrivacyPolicy-B7kTHbZh.d.ts → useDefaultPrivacyPolicy-C-mG-A5S.d.ts} +13 -2
  152. package/dist/{useLawfulBasis-CpWuHtyh.d.mts → useLawfulBasis-CKJ-kw84.d.mts} +13 -2
  153. package/dist/{useLawfulBasis-CCWF9waR.d.ts → useLawfulBasis-DFTmu1ca.d.ts} +13 -2
  154. package/dist/{useROPA-BhJ3kvHp.d.ts → useROPA-BSSU1rfx.d.ts} +14 -2
  155. package/dist/{useROPA-DLFdjkxP.d.mts → useROPA-C2hjaBTz.d.mts} +14 -2
  156. package/package.json +18 -2
  157. package/dist/chunk-2XFAV267.mjs +0 -2
  158. package/dist/chunk-32UIWTGD.js +0 -72
  159. package/dist/chunk-3YCV2BA6.js +0 -2
  160. package/dist/chunk-4A354HL3.js +0 -2
  161. package/dist/chunk-5ZBO2UPH.js +0 -2
  162. package/dist/chunk-6GGGTRDZ.mjs +0 -2
  163. package/dist/chunk-BGHQTZAC.js +0 -94
  164. package/dist/chunk-BZTTQS4A.mjs +0 -7
  165. package/dist/chunk-EKVTLHBQ.js +0 -2
  166. package/dist/chunk-GMLNWS2N.mjs +0 -2
  167. package/dist/chunk-IBEKLDBY.mjs +0 -2
  168. package/dist/chunk-K3GMTMQ6.js +0 -2
  169. package/dist/chunk-L52PDW6O.mjs +0 -2
  170. package/dist/chunk-LI6WJ3LZ.js +0 -2
  171. package/dist/chunk-LXRXDTPI.js +0 -2
  172. package/dist/chunk-NW4A3JW6.mjs +0 -2
  173. package/dist/chunk-OITITR6K.mjs +0 -2
  174. package/dist/chunk-PDJGTQMY.mjs +0 -2
  175. package/dist/chunk-SKJCQKFL.mjs +0 -94
  176. package/dist/chunk-T44JQT2O.mjs +0 -2
  177. package/dist/chunk-TCJCE6WN.js +0 -2
  178. package/dist/chunk-VMJBW3EF.mjs +0 -2
  179. package/dist/chunk-WW3X3ELF.js +0 -2
  180. package/dist/chunk-XMYUYQH7.mjs +0 -72
  181. package/dist/chunk-ZNTMZ6NM.js +0 -7
  182. package/dist/chunk-ZU73VG3X.js +0 -2
  183. package/dist/dsr-190YpijW.d.ts +0 -307
  184. package/dist/dsr-BTT-Xd7H.d.mts +0 -307
@@ -0,0 +1,2 @@
1
+ import {a as a$a}from'./chunk-3UWT64FI.mjs';import {a as a$5}from'./chunk-ELKEZEV5.mjs';import {a as a$7}from'./chunk-4JUDKBA2.mjs';import {a as a$8}from'./chunk-4VVARDN2.mjs';import {a as a$9}from'./chunk-GPJVTGHR.mjs';import'./chunk-TXBZPCGF.mjs';import'./chunk-QKK5S54L.mjs';import'./chunk-PYEX7DFR.mjs';import {a}from'./chunk-7F5F5YWI.mjs';import {a as a$1}from'./chunk-6D3ZUGBB.mjs';import {a as a$4}from'./chunk-V3MXWGXU.mjs';import {a as a$2}from'./chunk-3XAUN5IM.mjs';import'./chunk-FXTZDKDC.mjs';import {a as a$3}from'./chunk-KNE4NXCY.mjs';import {c,b}from'./chunk-CAB7O3GR.mjs';import'./chunk-AYKLAEOU.mjs';import {b as b$1,a as a$6,d,c as c$1}from'./chunk-WWT2ZSNU.mjs';import {jsx}from'react/jsx-runtime';import {useState,useEffect}from'react';var L=[{id:"essential",label:"Essential Cookies",description:"Required for basic site functionality. Cannot be disabled.",required:true,purpose:"Site operation"},{id:"analytics",label:"Analytics",description:"Help us understand how visitors use our site to improve the experience.",required:false,purpose:"Usage analytics"},{id:"marketing",label:"Marketing",description:"Used to deliver relevant advertisements and track campaign effectiveness.",required:false,purpose:"Targeted advertising"},{id:"preferences",label:"Preferences",description:"Remember your settings and preferences for a personalised experience.",required:false,purpose:"Personalisation"}],I=({extraOptions:c=[],options:t,adapter:l,position:p="bottom",classNames:r,unstyled:n,onSave:a$1})=>{let u=t!=null?t:[...L,...c];return jsx(a,{options:u,onSave:f=>{l&&l.save(f),a$1==null||a$1(f);},position:p,classNames:r,unstyled:n,manageStorage:!l})};var F=[{id:"access",name:"Access My Data",description:"Request a copy of your personal data held by us",ndpaSection:"Section 30",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"rectification",name:"Correct My Data",description:"Request corrections to inaccurate personal data",ndpaSection:"Section 31",estimatedCompletionTime:30,requiresAdditionalInfo:true,additionalFields:[{id:"correction_details",label:"What data needs to be corrected?",type:"textarea",required:true,placeholder:"Please describe the inaccurate data and what the correct information should be"}]},{id:"erasure",name:"Delete My Data",description:"Request deletion of your personal data",ndpaSection:"Section 32",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"portability",name:"Export My Data",description:"Receive your data in a portable format",ndpaSection:"Section 34",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"restrict",name:"Restrict Processing",description:"Request restriction of data processing",ndpaSection:"Section 33",estimatedCompletionTime:30,requiresAdditionalInfo:false},{id:"object",name:"Object to Processing",description:"Object to processing of your personal data",ndpaSection:"Section 35",estimatedCompletionTime:30,requiresAdditionalInfo:false}],k=({requestTypes:c=F,adapter:t,classNames:l,unstyled:p,onSubmit:r=()=>{}})=>jsx(a$1,{requestTypes:c,onSubmit:a=>{t&&t.save(a),r(a);},classNames:l,unstyled:p});var E=[{id:"unauthorized_access",name:"Unauthorized Access",description:"Unauthorized access to personal data",defaultSeverity:"high"},{id:"data_loss",name:"Data Loss",description:"Loss of personal data",defaultSeverity:"high"},{id:"data_theft",name:"Data Theft",description:"Theft of personal data",defaultSeverity:"critical"},{id:"system_breach",name:"System Breach",description:"Breach of system containing personal data",defaultSeverity:"critical"},{id:"accidental_disclosure",name:"Accidental Disclosure",description:"Unintended disclosure of personal data",defaultSeverity:"medium"}],M=({categories:c=E,adapter:t,classNames:l,unstyled:p,onSubmit:r=()=>{}})=>jsx(a$2,{categories:c,onSubmit:a=>{t&&t.save(a),r(a);},classNames:l,unstyled:p});var G=({sections:c$1=b,variables:t=c,adapter:l,classNames:p,unstyled:r,onGenerate:n=()=>{}})=>jsx(a$3,{sections:c$1,variables:t,onGenerate:u=>{l&&l.save(u),n(u);},classNames:p,unstyled:r});var V=[{id:"project_overview",title:"Project Overview",description:"Provide basic details about the processing activity being assessed.",order:0,questions:[{id:"project_name",text:"What is the name of the project or processing activity?",type:"text",required:true},{id:"project_description",text:"Describe the nature and purpose of the processing.",guidance:"Include what personal data will be collected, why it is needed, and how it will be used.",type:"textarea",required:true},{id:"data_controller",text:"Who is the data controller responsible for this processing?",type:"text",required:true}]},{id:"necessity",title:"Necessity & Proportionality",description:"Assess whether the processing is necessary and proportionate to the purposes.",order:1,questions:[{id:"lawful_basis",text:"What is the lawful basis for processing under the NDPA 2023?",type:"select",required:true,options:[{value:"consent",label:"Consent (Section 25(1)(a))"},{value:"contract",label:"Contract (Section 25(1)(b))"},{value:"legal_obligation",label:"Legal Obligation (Section 25(1)(c))"},{value:"vital_interests",label:"Vital Interests (Section 25(1)(d))"},{value:"public_task",label:"Public Task (Section 25(1)(e))"},{value:"legitimate_interests",label:"Legitimate Interests (Section 25(1)(f))"}]},{id:"data_minimisation",text:"Is the processing limited to what is necessary for the specified purpose?",type:"radio",required:true,options:[{value:"yes",label:"Yes \u2014 only minimum data is collected",riskLevel:"low"},{value:"partial",label:"Partially \u2014 some additional data may be collected",riskLevel:"medium"},{value:"no",label:"No \u2014 more data is collected than strictly necessary",riskLevel:"high"}]}]},{id:"risk_identification",title:"Risk Identification",description:"Identify and assess risks to data subjects arising from the processing.",order:2,questions:[{id:"sensitive_data",text:"Does the processing involve sensitive personal data (e.g., health, biometric, financial, children's data)?",type:"radio",required:true,options:[{value:"no",label:"No sensitive data",riskLevel:"low"},{value:"yes_protected",label:"Yes, with appropriate safeguards",riskLevel:"medium"},{value:"yes_unprotected",label:"Yes, without adequate safeguards",riskLevel:"high"}]},{id:"scale",text:"What is the scale of processing?",type:"radio",required:true,options:[{value:"small",label:"Small scale (fewer than 1,000 individuals)",riskLevel:"low"},{value:"medium",label:"Medium scale (1,000 to 100,000 individuals)",riskLevel:"medium"},{value:"large",label:"Large scale (over 100,000 individuals)",riskLevel:"high"}]},{id:"cross_border",text:"Will data be transferred outside Nigeria?",type:"radio",required:true,options:[{value:"no",label:"No international transfers",riskLevel:"low"},{value:"adequate",label:"Yes, to countries with adequate protection",riskLevel:"medium"},{value:"inadequate",label:"Yes, to countries without adequate protection",riskLevel:"high"}]}]},{id:"mitigation",title:"Risk Mitigation & Measures",description:"Document the measures taken to address identified risks.",order:3,questions:[{id:"security_measures",text:"What technical and organisational security measures are in place?",guidance:"Include encryption, access controls, pseudonymisation, staff training, etc.",type:"textarea",required:true},{id:"retention_period",text:"What is the data retention period?",guidance:"Specify how long data will be kept and the criteria used to determine this.",type:"text",required:true},{id:"dpo_consulted",text:"Has the Data Protection Officer (DPO) been consulted on this assessment?",type:"radio",required:false,options:[{value:"yes",label:"Yes",riskLevel:"low"},{value:"no",label:"No",riskLevel:"medium"},{value:"na",label:"Not applicable \u2014 no DPO appointed",riskLevel:"medium"}]}]}],j=({sections:c=V,adapter:t,classNames:l,unstyled:p,onComplete:r=()=>{}})=>{let[n,a]=useState({}),[u,y]=useState(0),f=(i,q)=>{a(O=>b$1(a$6({},O),{[i]:q}));},e=()=>{u<c.length-1?y(i=>i+1):(t&&t.save(n),r(n));},s=()=>{u>0&&y(i=>i-1);},o=Math.round((u+1)/c.length*100);return jsx(a$4,{sections:c,answers:n,onAnswerChange:f,currentSectionIndex:u,onNextSection:e,onPrevSection:s,progress:o,classNames:l,unstyled:p})};var H=({initialActivities:c=[],adapter:t,classNames:l,unstyled:p})=>{let[r,n]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return c}),a=e=>{t&&t.save(e);};return jsx(a$5,{activities:r,onAddActivity:e=>{let s=Date.now(),o=b$1(a$6({},e),{id:`activity-${s}`,createdAt:s,updatedAt:s}),i=[...r,o];n(i),a(i);},onUpdateActivity:(e,s)=>{let o=r.map(i=>i.id===e?b$1(a$6(a$6({},i),s),{updatedAt:Date.now()}):i);n(o),a(o);},onArchiveActivity:e=>{let s=r.map(o=>o.id===e?b$1(a$6({},o),{status:"inactive",updatedAt:Date.now()}):o);n(s),a(s);},classNames:l,unstyled:p})};var K=({initialTransfers:c=[],adapter:t,classNames:l,unstyled:p})=>{let[r,n]=useState(()=>{if(t){let e=t.load();if(e&&!(e instanceof Promise))return e}return c}),a=e=>{t&&t.save(e);};return jsx(a$7,{transfers:r,onAddTransfer:e=>{let s=Date.now(),o=b$1(a$6({},e),{id:`transfer-${s}`,createdAt:s,updatedAt:s}),i=[...r,o];n(i),a(i);},onUpdateTransfer:(e,s)=>{let o=r.map(i=>i.id===e?b$1(a$6(a$6({},i),s),{updatedAt:Date.now()}):i);n(o),a(o);},onRemoveTransfer:e=>{let s=r.filter(o=>o.id!==e);n(s),a(s);},classNames:l,unstyled:p})};var te={id:"ndpr-ropa-default",organizationName:"Your Organisation",organizationContact:"",organizationAddress:"",records:[],lastUpdated:Date.now(),version:"1.0"},re=({initialData:c,adapter:t,classNames:l,unstyled:p})=>{let[r,n]=useState(c!=null?c:te);useEffect(()=>{if(!t)return;let e=false;return d(null,null,function*(){let o=yield t.load();!e&&o&&n(o);}),()=>{e=true;}},[t]);let a=e=>{t&&t.save(e);};return jsx(a$8,{ropa:r,onAddRecord:e=>{let s=b$1(a$6({},r),{records:[...r.records,e],lastUpdated:Date.now()});n(s),a(s);},onUpdateRecord:(e,s)=>{let o=b$1(a$6({},r),{records:r.records.map(i=>i.id===e?b$1(a$6(a$6({},i),s),{updatedAt:Date.now()}):i),lastUpdated:Date.now()});n(o),a(o);},onArchiveRecord:e=>{let s=b$1(a$6({},r),{records:r.records.map(o=>o.id===e?b$1(a$6({},o),{status:"archived",updatedAt:Date.now()}):o),lastUpdated:Date.now()});n(s),a(s);},classNames:l,unstyled:p})};var oe=l=>{var p=l,{input:c}=p,t=c$1(p,["input"]);let r=a$9(c);return jsx(a$a,a$6({report:r},t))};export{M as NDPRBreachReport,oe as NDPRComplianceDashboard,I as NDPRConsent,K as NDPRCrossBorder,j as NDPRDPIA,H as NDPRLawfulBasis,G as NDPRPrivacyPolicy,re as NDPRROPA,k as NDPRSubjectRights};//# sourceMappingURL=presets.mjs.map
2
+ //# sourceMappingURL=presets.mjs.map
@@ -149,52 +149,4 @@ interface ROPASummary {
149
149
  lastUpdated: number;
150
150
  }
151
151
 
152
- /**
153
- * Compliance gap found in a processing record
154
- */
155
- interface ROPAComplianceGap {
156
- recordId: string;
157
- recordName: string;
158
- gaps: string[];
159
- }
160
- /**
161
- * Validation result for a processing record
162
- */
163
- interface ROPAValidationResult {
164
- valid: boolean;
165
- errors: string[];
166
- }
167
- /**
168
- * Validates a processing record to ensure all required fields are present
169
- * and properly filled per NDPA 2023 requirements.
170
- *
171
- * @param record - The processing record to validate
172
- * @returns Validation result with any errors found
173
- */
174
- declare function validateProcessingRecord(record: ProcessingRecord): ROPAValidationResult;
175
- /**
176
- * Generates a summary of the Record of Processing Activities.
177
- * Provides statistics and identifies records that are due for review.
178
- *
179
- * @param ropa - The full Record of Processing Activities
180
- * @returns Summary statistics for the ROPA
181
- */
182
- declare function generateROPASummary(ropa: RecordOfProcessingActivities): ROPASummary;
183
- /**
184
- * Exports the Record of Processing Activities to a CSV string.
185
- * The CSV includes all key fields from each processing record.
186
- *
187
- * @param ropa - The full Record of Processing Activities
188
- * @returns CSV-formatted string
189
- */
190
- declare function exportROPAToCSV(ropa: RecordOfProcessingActivities): string;
191
- /**
192
- * Identifies compliance gaps in the Record of Processing Activities.
193
- * Finds records that are missing required information per NDPA 2023.
194
- *
195
- * @param ropa - The full Record of Processing Activities
196
- * @returns Array of compliance gaps grouped by record
197
- */
198
- declare function identifyComplianceGaps(ropa: RecordOfProcessingActivities): ROPAComplianceGap[];
199
-
200
- export { type ProcessingRecord as P, type ROPAComplianceGap as R, type ROPASummary as a, type ROPAValidationResult as b, type RecordOfProcessingActivities as c, exportROPAToCSV as e, generateROPASummary as g, identifyComplianceGaps as i, validateProcessingRecord as v };
152
+ export type { ProcessingRecord as P, ROPASummary as R, RecordOfProcessingActivities as a };
@@ -149,52 +149,4 @@ interface ROPASummary {
149
149
  lastUpdated: number;
150
150
  }
151
151
 
152
- /**
153
- * Compliance gap found in a processing record
154
- */
155
- interface ROPAComplianceGap {
156
- recordId: string;
157
- recordName: string;
158
- gaps: string[];
159
- }
160
- /**
161
- * Validation result for a processing record
162
- */
163
- interface ROPAValidationResult {
164
- valid: boolean;
165
- errors: string[];
166
- }
167
- /**
168
- * Validates a processing record to ensure all required fields are present
169
- * and properly filled per NDPA 2023 requirements.
170
- *
171
- * @param record - The processing record to validate
172
- * @returns Validation result with any errors found
173
- */
174
- declare function validateProcessingRecord(record: ProcessingRecord): ROPAValidationResult;
175
- /**
176
- * Generates a summary of the Record of Processing Activities.
177
- * Provides statistics and identifies records that are due for review.
178
- *
179
- * @param ropa - The full Record of Processing Activities
180
- * @returns Summary statistics for the ROPA
181
- */
182
- declare function generateROPASummary(ropa: RecordOfProcessingActivities): ROPASummary;
183
- /**
184
- * Exports the Record of Processing Activities to a CSV string.
185
- * The CSV includes all key fields from each processing record.
186
- *
187
- * @param ropa - The full Record of Processing Activities
188
- * @returns CSV-formatted string
189
- */
190
- declare function exportROPAToCSV(ropa: RecordOfProcessingActivities): string;
191
- /**
192
- * Identifies compliance gaps in the Record of Processing Activities.
193
- * Finds records that are missing required information per NDPA 2023.
194
- *
195
- * @param ropa - The full Record of Processing Activities
196
- * @returns Array of compliance gaps grouped by record
197
- */
198
- declare function identifyComplianceGaps(ropa: RecordOfProcessingActivities): ROPAComplianceGap[];
199
-
200
- export { type ProcessingRecord as P, type ROPAComplianceGap as R, type ROPASummary as a, type ROPAValidationResult as b, type RecordOfProcessingActivities as c, exportROPAToCSV as e, generateROPASummary as g, identifyComplianceGaps as i, validateProcessingRecord as v };
152
+ export type { ProcessingRecord as P, ROPASummary as R, RecordOfProcessingActivities as a };
@@ -0,0 +1,51 @@
1
+ import { a as RecordOfProcessingActivities, R as ROPASummary, P as ProcessingRecord } from './ropa-BDTM06tr.js';
2
+
3
+ /**
4
+ * Compliance gap found in a processing record
5
+ */
6
+ interface ROPAComplianceGap {
7
+ recordId: string;
8
+ recordName: string;
9
+ gaps: string[];
10
+ }
11
+ /**
12
+ * Validation result for a processing record
13
+ */
14
+ interface ROPAValidationResult {
15
+ valid: boolean;
16
+ errors: string[];
17
+ }
18
+ /**
19
+ * Validates a processing record to ensure all required fields are present
20
+ * and properly filled per NDPA 2023 requirements.
21
+ *
22
+ * @param record - The processing record to validate
23
+ * @returns Validation result with any errors found
24
+ */
25
+ declare function validateProcessingRecord(record: ProcessingRecord): ROPAValidationResult;
26
+ /**
27
+ * Generates a summary of the Record of Processing Activities.
28
+ * Provides statistics and identifies records that are due for review.
29
+ *
30
+ * @param ropa - The full Record of Processing Activities
31
+ * @returns Summary statistics for the ROPA
32
+ */
33
+ declare function generateROPASummary(ropa: RecordOfProcessingActivities): ROPASummary;
34
+ /**
35
+ * Exports the Record of Processing Activities to a CSV string.
36
+ * The CSV includes all key fields from each processing record.
37
+ *
38
+ * @param ropa - The full Record of Processing Activities
39
+ * @returns CSV-formatted string
40
+ */
41
+ declare function exportROPAToCSV(ropa: RecordOfProcessingActivities): string;
42
+ /**
43
+ * Identifies compliance gaps in the Record of Processing Activities.
44
+ * Finds records that are missing required information per NDPA 2023.
45
+ *
46
+ * @param ropa - The full Record of Processing Activities
47
+ * @returns Array of compliance gaps grouped by record
48
+ */
49
+ declare function identifyComplianceGaps(ropa: RecordOfProcessingActivities): ROPAComplianceGap[];
50
+
51
+ export { type ROPAComplianceGap as R, type ROPAValidationResult as a, exportROPAToCSV as e, generateROPASummary as g, identifyComplianceGaps as i, validateProcessingRecord as v };
@@ -0,0 +1,51 @@
1
+ import { a as RecordOfProcessingActivities, R as ROPASummary, P as ProcessingRecord } from './ropa-CFHuT7jE.mjs';
2
+
3
+ /**
4
+ * Compliance gap found in a processing record
5
+ */
6
+ interface ROPAComplianceGap {
7
+ recordId: string;
8
+ recordName: string;
9
+ gaps: string[];
10
+ }
11
+ /**
12
+ * Validation result for a processing record
13
+ */
14
+ interface ROPAValidationResult {
15
+ valid: boolean;
16
+ errors: string[];
17
+ }
18
+ /**
19
+ * Validates a processing record to ensure all required fields are present
20
+ * and properly filled per NDPA 2023 requirements.
21
+ *
22
+ * @param record - The processing record to validate
23
+ * @returns Validation result with any errors found
24
+ */
25
+ declare function validateProcessingRecord(record: ProcessingRecord): ROPAValidationResult;
26
+ /**
27
+ * Generates a summary of the Record of Processing Activities.
28
+ * Provides statistics and identifies records that are due for review.
29
+ *
30
+ * @param ropa - The full Record of Processing Activities
31
+ * @returns Summary statistics for the ROPA
32
+ */
33
+ declare function generateROPASummary(ropa: RecordOfProcessingActivities): ROPASummary;
34
+ /**
35
+ * Exports the Record of Processing Activities to a CSV string.
36
+ * The CSV includes all key fields from each processing record.
37
+ *
38
+ * @param ropa - The full Record of Processing Activities
39
+ * @returns CSV-formatted string
40
+ */
41
+ declare function exportROPAToCSV(ropa: RecordOfProcessingActivities): string;
42
+ /**
43
+ * Identifies compliance gaps in the Record of Processing Activities.
44
+ * Finds records that are missing required information per NDPA 2023.
45
+ *
46
+ * @param ropa - The full Record of Processing Activities
47
+ * @returns Array of compliance gaps grouped by record
48
+ */
49
+ declare function identifyComplianceGaps(ropa: RecordOfProcessingActivities): ROPAComplianceGap[];
50
+
51
+ export { type ROPAComplianceGap as R, type ROPAValidationResult as a, exportROPAToCSV as e, generateROPASummary as g, identifyComplianceGaps as i, validateProcessingRecord as v };
package/dist/ropa.d.mts CHANGED
@@ -1,5 +1,31 @@
1
- export { R as ROPAManager } from './ropa-entry-DiOThOc2.mjs';
2
- export { U as UseROPAOptions, a as UseROPAReturn, u as useROPA } from './useROPA-DLFdjkxP.mjs';
3
- export { P as ProcessingRecord, R as ROPAComplianceGap, a as ROPASummary, b as ROPAValidationResult, c as RecordOfProcessingActivities, e as exportROPAToCSV, g as generateROPASummary, i as identifyComplianceGaps, v as validateProcessingRecord } from './ropa-DP7pPPql.mjs';
4
- import 'react';
1
+ import { b as ROPAManagerProps } from './ROPAManager-BS4eB8Hw.mjs';
2
+ export { R as ROPAManager } from './ROPAManager-BS4eB8Hw.mjs';
3
+ import { a as UseROPAReturn } from './useROPA-C2hjaBTz.mjs';
4
+ export { U as UseROPAOptions, u as useROPA } from './useROPA-C2hjaBTz.mjs';
5
+ export { R as ROPAComplianceGap, a as ROPAValidationResult, e as exportROPAToCSV, g as generateROPASummary, i as identifyComplianceGaps, v as validateProcessingRecord } from './ropa-NIgxd8uP.mjs';
6
+ import { a as RecordOfProcessingActivities, P as ProcessingRecord } from './ropa-CFHuT7jE.mjs';
7
+ export { R as ROPASummary } from './ropa-CFHuT7jE.mjs';
8
+ import * as React from 'react';
9
+ import React__default from 'react';
10
+ import { S as StorageAdapter } from './types-DK2CoKOC.mjs';
5
11
  import './lawful-basis-Cv1VmDLn.mjs';
12
+
13
+ interface ROPAProviderProps {
14
+ initialData: RecordOfProcessingActivities;
15
+ adapter?: StorageAdapter<RecordOfProcessingActivities>;
16
+ onRecordAdd?: (record: ProcessingRecord) => void;
17
+ onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
18
+ onRecordArchive?: (id: string) => void;
19
+ children: React__default.ReactNode;
20
+ }
21
+ declare const ROPAProvider: React__default.FC<ROPAProviderProps>;
22
+
23
+ declare const ROPA: {
24
+ Provider: React.FC<ROPAProviderProps>;
25
+ Manager: React.FC<ROPAManagerProps>;
26
+ };
27
+
28
+ type ROPAContextValue = UseROPAReturn;
29
+ declare function useROPACompound(): ROPAContextValue;
30
+
31
+ export { ProcessingRecord, ROPA, ROPAProvider, type ROPAProviderProps, RecordOfProcessingActivities, StorageAdapter, UseROPAReturn, useROPACompound };
package/dist/ropa.d.ts CHANGED
@@ -1,5 +1,31 @@
1
- export { R as ROPAManager } from './ropa-entry-B0D7X1GV.js';
2
- export { U as UseROPAOptions, a as UseROPAReturn, u as useROPA } from './useROPA-BhJ3kvHp.js';
3
- export { P as ProcessingRecord, R as ROPAComplianceGap, a as ROPASummary, b as ROPAValidationResult, c as RecordOfProcessingActivities, e as exportROPAToCSV, g as generateROPASummary, i as identifyComplianceGaps, v as validateProcessingRecord } from './ropa-Li6UlL5H.js';
4
- import 'react';
1
+ import { b as ROPAManagerProps } from './ROPAManager-qxTrXLkD.js';
2
+ export { R as ROPAManager } from './ROPAManager-qxTrXLkD.js';
3
+ import { a as UseROPAReturn } from './useROPA-BSSU1rfx.js';
4
+ export { U as UseROPAOptions, u as useROPA } from './useROPA-BSSU1rfx.js';
5
+ export { R as ROPAComplianceGap, a as ROPAValidationResult, e as exportROPAToCSV, g as generateROPASummary, i as identifyComplianceGaps, v as validateProcessingRecord } from './ropa-CyynscU6.js';
6
+ import { a as RecordOfProcessingActivities, P as ProcessingRecord } from './ropa-BDTM06tr.js';
7
+ export { R as ROPASummary } from './ropa-BDTM06tr.js';
8
+ import * as React from 'react';
9
+ import React__default from 'react';
10
+ import { S as StorageAdapter } from './types-DK2CoKOC.js';
5
11
  import './lawful-basis-Cv1VmDLn.js';
12
+
13
+ interface ROPAProviderProps {
14
+ initialData: RecordOfProcessingActivities;
15
+ adapter?: StorageAdapter<RecordOfProcessingActivities>;
16
+ onRecordAdd?: (record: ProcessingRecord) => void;
17
+ onRecordUpdate?: (id: string, updates: Partial<ProcessingRecord>) => void;
18
+ onRecordArchive?: (id: string) => void;
19
+ children: React__default.ReactNode;
20
+ }
21
+ declare const ROPAProvider: React__default.FC<ROPAProviderProps>;
22
+
23
+ declare const ROPA: {
24
+ Provider: React.FC<ROPAProviderProps>;
25
+ Manager: React.FC<ROPAManagerProps>;
26
+ };
27
+
28
+ type ROPAContextValue = UseROPAReturn;
29
+ declare function useROPACompound(): ROPAContextValue;
30
+
31
+ export { ProcessingRecord, ROPA, ROPAProvider, type ROPAProviderProps, RecordOfProcessingActivities, StorageAdapter, UseROPAReturn, useROPACompound };
package/dist/ropa.js CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkUZ5EZOA7_js=require('./chunk-UZ5EZOA7.js'),chunk4A354HL3_js=require('./chunk-4A354HL3.js'),chunkSWF3YVE5_js=require('./chunk-SWF3YVE5.js');require('./chunk-E64TU6IU.js'),require('./chunk-MQFZHA2D.js');Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkUZ5EZOA7_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunk4A354HL3_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunkSWF3YVE5_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunkSWF3YVE5_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunkSWF3YVE5_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunkSWF3YVE5_js.a}});//# sourceMappingURL=ropa.js.map
1
+ 'use strict';var chunkUZ5EZOA7_js=require('./chunk-UZ5EZOA7.js'),chunkKHRBU5K7_js=require('./chunk-KHRBU5K7.js'),chunkSWF3YVE5_js=require('./chunk-SWF3YVE5.js');require('./chunk-E64TU6IU.js'),require('./chunk-MQFZHA2D.js');var react=require('react'),jsxRuntime=require('react/jsx-runtime');var p=react.createContext(null);function u(){let r=react.useContext(p);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var e=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=chunkKHRBU5K7_js.a({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsxRuntime.jsx(p.Provider,{value:R,children:s})};var v={Provider:e,Manager:chunkUZ5EZOA7_js.a};Object.defineProperty(exports,"ROPAManager",{enumerable:true,get:function(){return chunkUZ5EZOA7_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkKHRBU5K7_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunkSWF3YVE5_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunkSWF3YVE5_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunkSWF3YVE5_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunkSWF3YVE5_js.a}});exports.ROPA=v;exports.ROPAProvider=e;exports.useROPACompound=u;//# sourceMappingURL=ropa.js.map
2
2
  //# sourceMappingURL=ropa.js.map
package/dist/ropa.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export{a as ROPAManager}from'./chunk-4VVARDN2.mjs';export{a as useROPA}from'./chunk-T44JQT2O.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-PYEX7DFR.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-WWT2ZSNU.mjs';//# sourceMappingURL=ropa.mjs.map
1
+ import {a}from'./chunk-4VVARDN2.mjs';export{a as ROPAManager}from'./chunk-4VVARDN2.mjs';import {a as a$1}from'./chunk-WLSW4Z4W.mjs';export{a as useROPA}from'./chunk-WLSW4Z4W.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-PYEX7DFR.mjs';import'./chunk-AYKLAEOU.mjs';import'./chunk-WWT2ZSNU.mjs';import {createContext,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null);function u(){let r=useContext(p);if(!r)throw new Error("ROPA compound components must be wrapped in <ROPA.Provider>. Example: <ROPA.Provider initialData={...}><ROPA.Manager /></ROPA.Provider>");return r}var e=({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a,children:s})=>{let R=a$1({initialData:r,adapter:i,onRecordAdd:P,onRecordUpdate:n,onRecordArchive:a});return jsx(p.Provider,{value:R,children:s})};var v={Provider:e,Manager:a};export{v as ROPA,e as ROPAProvider,u as useROPACompound};//# sourceMappingURL=ropa.mjs.map
2
2
  //# sourceMappingURL=ropa.mjs.map
@@ -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 };