@tantainnovative/ndpr-toolkit 3.5.1 → 3.6.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 (199) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/README.md +29 -8
  3. package/dist/adapters.d.mts +137 -3
  4. package/dist/adapters.d.ts +137 -3
  5. package/dist/adapters.js +1 -2
  6. package/dist/adapters.mjs +1 -2
  7. package/dist/breach.d.mts +80 -1
  8. package/dist/breach.d.ts +80 -1
  9. package/dist/breach.js +1 -2
  10. package/dist/breach.mjs +1 -2
  11. package/dist/{chunk-PATONNTZ.mjs → chunk-3HOXQNCH.mjs} +1 -2
  12. package/dist/{chunk-MJGOLP5M.js → chunk-3IA3KDII.js} +1 -2
  13. package/dist/{chunk-M2TPT5GB.js → chunk-3JPDTXGC.js} +1 -2
  14. package/dist/{chunk-BKRETVJ6.js → chunk-3YTAOT5O.js} +1 -2
  15. package/dist/{chunk-GOU6FU6Y.js → chunk-4CVBQC66.js} +1 -2
  16. package/dist/{chunk-E4NCJ7RD.mjs → chunk-4G3SRVRI.mjs} +1 -2
  17. package/dist/{chunk-6QPRDQZF.js → chunk-4QXTB3L6.js} +1 -2
  18. package/dist/{chunk-XNSZ7KUH.js → chunk-5GVMKUMP.js} +1 -2
  19. package/dist/chunk-66NQ5CVY.mjs +1 -0
  20. package/dist/chunk-732C2EVN.js +1 -0
  21. package/dist/chunk-7BJXI2HI.mjs +1 -0
  22. package/dist/{chunk-C5QO3SX4.js → chunk-7IFSWCQP.js} +1 -2
  23. package/dist/{chunk-A4PK7JB2.js → chunk-7ZZO7GVB.js} +1 -2
  24. package/dist/chunk-AME4HJR4.js +1 -0
  25. package/dist/chunk-AOHKVFAS.mjs +322 -0
  26. package/dist/{chunk-HO5M7M4M.js → chunk-B46SJB5V.js} +1 -2
  27. package/dist/chunk-BFAX7JQA.mjs +1 -0
  28. package/dist/{chunk-ID2NYIVE.mjs → chunk-BNHQFZHL.mjs} +2 -3
  29. package/dist/{chunk-RLYTX3MM.js → chunk-BRS52EDT.js} +1 -2
  30. package/dist/{chunk-OPYQIJKY.js → chunk-C7IDR2IV.js} +1 -2
  31. package/dist/{chunk-CISJAQ6W.mjs → chunk-COD3RMTL.mjs} +1 -2
  32. package/dist/chunk-CR2QZTGW.js +1 -0
  33. package/dist/{chunk-6WIP33TW.mjs → chunk-DBZSN4WP.mjs} +1 -2
  34. package/dist/{chunk-74Z23WUA.mjs → chunk-EEQALYOY.mjs} +1 -2
  35. package/dist/chunk-EFIBHKQE.mjs +1 -0
  36. package/dist/{chunk-GKKAK6ES.mjs → chunk-EWVK45Z3.mjs} +1 -2
  37. package/dist/{chunk-QSVVAZVT.mjs → chunk-EXEXUAF6.mjs} +1 -2
  38. package/dist/chunk-EZCGTHQV.js +6 -0
  39. package/dist/{chunk-SYMQJO2W.mjs → chunk-GTYXVAJX.mjs} +2 -3
  40. package/dist/{chunk-6FGCGLH5.mjs → chunk-H3XJV2IR.mjs} +1 -2
  41. package/dist/chunk-HBLGN4SD.js +1 -0
  42. package/dist/{chunk-MCWV7S2G.js → chunk-HHK5LHEG.js} +1 -2
  43. package/dist/{chunk-XHROISIF.mjs → chunk-HWHBINVN.mjs} +1 -2
  44. package/dist/{chunk-3EGQWLJ6.js → chunk-I2LMQWK3.js} +2 -3
  45. package/dist/{chunk-NQNFS3QI.js → chunk-I3Y4LOSL.js} +4 -5
  46. package/dist/chunk-ITCY2Z66.mjs +4 -0
  47. package/dist/{chunk-Z6IIMLZU.mjs → chunk-KDAZQO3N.mjs} +1 -2
  48. package/dist/{chunk-J5WCPZLW.js → chunk-L2BRFMVS.js} +1 -2
  49. package/dist/chunk-L2VO3MEJ.js +1 -0
  50. package/dist/{chunk-R5FW5XUQ.mjs → chunk-LQTARVPU.mjs} +1 -2
  51. package/dist/{chunk-6TA2MVTU.mjs → chunk-LRRENTT5.mjs} +1 -2
  52. package/dist/chunk-LTPSN2SU.mjs +1 -0
  53. package/dist/{chunk-LIM64IV2.js → chunk-LVGT3DLT.js} +2 -3
  54. package/dist/{chunk-TXBZPCGF.mjs → chunk-LWIKDDSU.mjs} +1 -2
  55. package/dist/chunk-MPBPAEZC.mjs +1 -0
  56. package/dist/{chunk-Z73T6MWY.js → chunk-N3MQQUQP.js} +39 -35
  57. package/dist/{chunk-HGGLW5TE.js → chunk-NUWVPRNI.js} +1 -2
  58. package/dist/chunk-O45PKBZA.mjs +6 -0
  59. package/dist/chunk-O6CUBNXK.mjs +3 -0
  60. package/dist/{chunk-7SMLHZ4B.js → chunk-P4LNLCSF.js} +1 -2
  61. package/dist/{chunk-VWPGIES4.mjs → chunk-PCU6GKBE.mjs} +1 -2
  62. package/dist/chunk-PGI2LM6P.js +103 -0
  63. package/dist/{chunk-U62QYKVG.mjs → chunk-PJNKQPQP.mjs} +1 -2
  64. package/dist/chunk-PL4XNCQA.mjs +1 -0
  65. package/dist/{chunk-LSNL4XR5.js → chunk-PZRQWPWD.js} +1 -2
  66. package/dist/chunk-Q64735OC.js +144 -0
  67. package/dist/chunk-QPRYXVH2.js +1 -0
  68. package/dist/{chunk-MQFZHA2D.js → chunk-RFPLZDIO.js} +1 -2
  69. package/dist/chunk-RMQ7OLNY.mjs +144 -0
  70. package/dist/chunk-ROTLSZMV.js +1 -0
  71. package/dist/{chunk-2AW7KAZO.mjs → chunk-RPXRPGHL.mjs} +1 -2
  72. package/dist/chunk-RV2VMWZJ.mjs +1 -0
  73. package/dist/chunk-RXZFYBUJ.js +1 -0
  74. package/dist/chunk-RYREGZVQ.js +1 -0
  75. package/dist/{chunk-B4Z5MBUC.mjs → chunk-RZ6GC6WN.mjs} +1 -2
  76. package/dist/chunk-S6COXIZA.js +2 -0
  77. package/dist/chunk-SFGW37LE.mjs +1 -0
  78. package/dist/{chunk-3NQQSU4P.js → chunk-SJDDNB6M.js} +1 -2
  79. package/dist/chunk-SJRIOZ4K.mjs +1 -0
  80. package/dist/{chunk-H3EYBSVP.mjs → chunk-TMXK4QKK.mjs} +2 -3
  81. package/dist/{chunk-P42Z5CFE.js → chunk-TQZWJGJ2.js} +1 -2
  82. package/dist/{chunk-EPT2K355.mjs → chunk-U5RWJRGA.mjs} +1 -2
  83. package/dist/{chunk-R3OYAJI6.mjs → chunk-UASG46LP.mjs} +1 -2
  84. package/dist/{chunk-RXL6CZAI.js → chunk-UAV7V4EM.js} +1 -2
  85. package/dist/chunk-UI536RU2.js +3 -0
  86. package/dist/{chunk-7AVN424U.js → chunk-UTFBKL73.js} +1 -2
  87. package/dist/{chunk-I54CDQGN.js → chunk-UXUMYP4L.js} +1 -2
  88. package/dist/chunk-V3RYHNHN.js +1 -0
  89. package/dist/{chunk-P3PULLYP.mjs → chunk-V7UFP6QU.mjs} +1 -2
  90. package/dist/{chunk-I4M2AA3N.js → chunk-VJTQXVAF.js} +1 -2
  91. package/dist/{chunk-ELKB2AFZ.js → chunk-VWED6UTN.js} +1 -2
  92. package/dist/{chunk-LU7PKE7Y.mjs → chunk-VYAL2TGT.mjs} +1 -2
  93. package/dist/chunk-W47OSMT6.js +2 -0
  94. package/dist/chunk-W65ZWTLD.mjs +1 -0
  95. package/dist/chunk-W7RBGZCC.js +1 -0
  96. package/dist/{chunk-5HL4UBFV.js → chunk-WDDCKYWA.js} +1 -2
  97. package/dist/{chunk-DJGS7SSN.mjs → chunk-WTGKZX7J.mjs} +1 -2
  98. package/dist/{chunk-TDDAYVKK.js → chunk-WZYCBW2R.js} +1 -2
  99. package/dist/chunk-X3GCGC3H.mjs +103 -0
  100. package/dist/chunk-XJO4DH3L.mjs +2 -0
  101. package/dist/{chunk-LWXZMKC2.js → chunk-XO3VQYTL.js} +7 -8
  102. package/dist/{chunk-IZCWCE7W.mjs → chunk-XOH4WXOZ.mjs} +1 -2
  103. package/dist/{chunk-SHMJNRHO.mjs → chunk-XP5PL6K7.mjs} +1 -2
  104. package/dist/{chunk-CKGJK4D7.mjs → chunk-Y3MKMAFQ.mjs} +2 -3
  105. package/dist/chunk-YFBDJ4FH.js +1 -0
  106. package/dist/chunk-YTU4FNM2.mjs +1 -0
  107. package/dist/{chunk-TV4U6AIS.js → chunk-Z763UI5U.js} +1 -2
  108. package/dist/chunk-ZHFLBL63.mjs +2 -0
  109. package/dist/{chunk-RRVKUCFR.mjs → chunk-ZIZL37BG.mjs} +1 -2
  110. package/dist/{chunk-WWT2ZSNU.mjs → chunk-ZJYULEER.mjs} +1 -2
  111. package/dist/{chunk-LJNNPAFU.mjs → chunk-ZQZJNKVB.mjs} +1 -2
  112. package/dist/chunk-ZVOIR4QH.js +4 -0
  113. package/dist/consent.js +1 -2
  114. package/dist/consent.mjs +1 -2
  115. package/dist/core.d.mts +98 -19
  116. package/dist/core.d.ts +98 -19
  117. package/dist/core.js +1 -2
  118. package/dist/core.mjs +1 -2
  119. package/dist/cross-border.d.mts +36 -14
  120. package/dist/cross-border.d.ts +36 -14
  121. package/dist/cross-border.js +1 -2
  122. package/dist/cross-border.mjs +1 -2
  123. package/dist/dpia.d.mts +4 -4
  124. package/dist/dpia.d.ts +4 -4
  125. package/dist/dpia.js +1 -2
  126. package/dist/dpia.mjs +1 -2
  127. package/dist/dsr.d.mts +30 -17
  128. package/dist/dsr.d.ts +30 -17
  129. package/dist/dsr.js +1 -2
  130. package/dist/dsr.mjs +1 -2
  131. package/dist/hooks.d.mts +113 -20
  132. package/dist/hooks.d.ts +113 -20
  133. package/dist/hooks.js +1 -2
  134. package/dist/hooks.mjs +1 -2
  135. package/dist/index.d.mts +422 -26
  136. package/dist/index.d.ts +422 -26
  137. package/dist/index.js +1 -2
  138. package/dist/index.mjs +1 -2
  139. package/dist/lawful-basis.js +1 -2
  140. package/dist/lawful-basis.mjs +1 -2
  141. package/dist/policy.js +1 -2
  142. package/dist/policy.mjs +1 -2
  143. package/dist/presets-consent.d.mts +139 -0
  144. package/dist/presets-consent.d.ts +139 -0
  145. package/dist/presets-consent.js +2 -0
  146. package/dist/presets-consent.mjs +2 -0
  147. package/dist/presets-dsr.d.mts +133 -0
  148. package/dist/presets-dsr.d.ts +133 -0
  149. package/dist/presets-dsr.js +2 -0
  150. package/dist/presets-dsr.mjs +2 -0
  151. package/dist/presets-policy.d.mts +203 -0
  152. package/dist/presets-policy.d.ts +203 -0
  153. package/dist/presets-policy.js +2 -0
  154. package/dist/presets-policy.mjs +2 -0
  155. package/dist/presets.d.mts +127 -5
  156. package/dist/presets.d.ts +127 -5
  157. package/dist/presets.js +1 -2
  158. package/dist/presets.mjs +1 -2
  159. package/dist/ropa.js +1 -2
  160. package/dist/ropa.mjs +1 -2
  161. package/dist/server.d.mts +226 -22
  162. package/dist/server.d.ts +226 -22
  163. package/dist/server.js +1 -2
  164. package/dist/server.mjs +1 -2
  165. package/dist/styles.css +34 -0
  166. package/dist/unstyled.d.mts +3 -1
  167. package/dist/unstyled.d.ts +3 -1
  168. package/dist/unstyled.js +1 -2
  169. package/dist/unstyled.mjs +1 -2
  170. package/package.json +83 -20
  171. package/dist/chunk-3VQAYQR7.js +0 -7
  172. package/dist/chunk-6HZL2WDU.mjs +0 -2
  173. package/dist/chunk-75TJPK2N.mjs +0 -2
  174. package/dist/chunk-ABDB7LEV.mjs +0 -2
  175. package/dist/chunk-AYKLAEOU.mjs +0 -2
  176. package/dist/chunk-C4YM4UMI.js +0 -2
  177. package/dist/chunk-CKJAECGV.js +0 -2
  178. package/dist/chunk-CPK5D5FY.js +0 -132
  179. package/dist/chunk-CWHBCQGT.mjs +0 -2
  180. package/dist/chunk-E64TU6IU.js +0 -2
  181. package/dist/chunk-F5TXUA4O.mjs +0 -4
  182. package/dist/chunk-GN5C32JB.mjs +0 -2
  183. package/dist/chunk-GRLIPT5V.mjs +0 -132
  184. package/dist/chunk-I557S566.mjs +0 -15
  185. package/dist/chunk-JBSCER34.js +0 -2
  186. package/dist/chunk-JFFOPHU3.mjs +0 -318
  187. package/dist/chunk-KF3EFJEF.mjs +0 -3
  188. package/dist/chunk-ORFC66EA.js +0 -4
  189. package/dist/chunk-RY3PGVLZ.mjs +0 -2
  190. package/dist/chunk-S4GRSNB4.js +0 -2
  191. package/dist/chunk-SCWNM4PC.mjs +0 -2
  192. package/dist/chunk-SKKOMFXH.js +0 -81
  193. package/dist/chunk-TCN22KYP.mjs +0 -7
  194. package/dist/chunk-TUNQUVHU.mjs +0 -81
  195. package/dist/chunk-VIQUXWJC.js +0 -2
  196. package/dist/chunk-WTJGLNTB.js +0 -3
  197. package/dist/chunk-XIM7KMD6.js +0 -2
  198. package/dist/chunk-YPKUHSK4.js +0 -15
  199. package/dist/chunk-ZPKVLTSX.js +0 -2
package/dist/hooks.d.mts CHANGED
@@ -1,3 +1,5 @@
1
+ import { RefObject } from 'react';
2
+
1
3
  /**
2
4
  * Adequacy status of a destination country
3
5
  */
@@ -57,10 +59,51 @@ export declare interface BreachReport {
57
59
  affectedSystems: string[];
58
60
  /** Types of data involved in the breach */
59
61
  dataTypes: string[];
60
- /** Whether sensitive personal data is involved (NDPA Section 27) */
62
+ /** Whether sensitive personal data is involved (NDPA Section 30) */
61
63
  involvesSensitiveData?: boolean;
62
64
  /** Estimated number of data subjects affected */
63
65
  estimatedAffectedSubjects?: number;
66
+ /**
67
+ * Approximate number of personal data RECORDS concerned (distinct from subject count).
68
+ * Required content under NDPA Section 40(1)(a) and Section 40(2).
69
+ */
70
+ approximateRecordCount?: number;
71
+ /**
72
+ * Categories of data subjects affected (e.g. customers, employees, minors, patients).
73
+ * Required content under NDPA Section 40(1)(a) and Section 40(2).
74
+ */
75
+ dataSubjectCategories?: string[];
76
+ /**
77
+ * Likely consequences of the breach for affected data subjects (e.g. identity theft,
78
+ * financial loss, reputational damage). Reported to the NDPC and, where applicable,
79
+ * communicated to data subjects under Section 40(3).
80
+ */
81
+ likelyConsequences?: string;
82
+ /**
83
+ * Measures taken or proposed to mitigate adverse effects of the breach.
84
+ * Required content for Section 40(3) communications to data subjects.
85
+ */
86
+ mitigationMeasures?: string;
87
+ /**
88
+ * Whether this is a phased / interim report submitted before full investigation
89
+ * is complete. The NDPC permits phased reporting where complete information is
90
+ * not available within 72 hours.
91
+ */
92
+ isPhasedReport?: boolean;
93
+ /**
94
+ * ID of the prior phased report this report supplements, if any.
95
+ */
96
+ supplementsReportId?: string;
97
+ /**
98
+ * Data Protection Officer contact details. The DPO is the named contact point
99
+ * for the NDPC per NDPA Section 32(3)(c). Required content in the regulatory
100
+ * report (Section 40(2)).
101
+ */
102
+ dpoContact?: {
103
+ name: string;
104
+ email: string;
105
+ phone?: string;
106
+ };
64
107
  /** Whether the breach is ongoing or contained */
65
108
  status: 'ongoing' | 'contained' | 'resolved';
66
109
  /** Initial actions taken to address the breach */
@@ -404,10 +447,10 @@ declare interface DOCXExportOptions {
404
447
  }
405
448
 
406
449
  /** A map of question IDs to their answer values */
407
- declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
450
+ export declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
408
451
 
409
452
  /** Possible value types for a DPIA answer */
410
- declare type DPIAAnswerValue = string | number | boolean | string[];
453
+ export declare type DPIAAnswerValue = string | number | boolean | string[];
411
454
 
412
455
  /**
413
456
  * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
@@ -626,20 +669,25 @@ export declare interface DSRRequest {
626
669
  export declare type DSRStatus = 'pending' | 'awaitingVerification' | 'inProgress' | 'completed' | 'rejected';
627
670
 
628
671
  /**
629
- * Data Subject Rights types aligned with NDPA 2023 Part IV (Sections 29-36)
672
+ * Data Subject Rights types aligned with NDPA 2023 Part VI (Sections 34-38)
673
+ * and the related provisions in Part V (Section 27 — information to the data subject)
674
+ * and Part X (Section 46 — complaint to the Commission).
675
+ *
676
+ * Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
630
677
  */
631
678
  /**
632
- * Types of data subject requests per NDPA Part IV
633
- * - 'information': Right to be informed (Section 29)
634
- * - 'access': Right of access (Section 30)
635
- * - 'rectification': Right to rectification (Section 31)
636
- * - 'erasure': Right to erasure (Section 32)
637
- * - 'restriction': Right to restrict processing (Section 33)
638
- * - 'portability': Right to data portability (Section 34)
639
- * - 'objection': Right to object (Section 35)
640
- * - 'automated_decision_making': Rights related to automated decision-making (Section 36)
679
+ * Types of data subject requests per NDPA Part VI
680
+ * - 'information': Right to be informed (Section 27 — provision of information; Section 34(1)(a))
681
+ * - 'access': Right of access / confirmation + data copy (Section 34(1)(a)–(b))
682
+ * - 'rectification': Right to rectification (Section 34(1)(c))
683
+ * - 'erasure': Right to erasure (Section 34(1)(d), Section 34(2))
684
+ * - 'restriction': Right to restrict processing (Section 34(1)(e))
685
+ * - 'portability': Right to data portability (Section 38)
686
+ * - 'objection': Right to object (Section 36)
687
+ * - 'automated_decision_making': Rights re. automated decisions / profiling (Section 37)
688
+ * - 'withdraw_consent': Right to withdraw consent (Section 35)
641
689
  */
642
- export declare type DSRType = 'information' | 'access' | 'rectification' | 'erasure' | 'restriction' | 'portability' | 'objection' | 'automated_decision_making';
690
+ export declare type DSRType = 'information' | 'access' | 'rectification' | 'erasure' | 'restriction' | 'portability' | 'objection' | 'automated_decision_making' | 'withdraw_consent';
643
691
 
644
692
  declare type EffortLevel = 'low' | 'medium' | 'high';
645
693
 
@@ -1181,7 +1229,9 @@ declare interface RequestType {
1181
1229
  /** Description of what this request type entails */
1182
1230
  description: string;
1183
1231
  /**
1184
- * NDPA section reference (e.g., "Section 30" for access requests)
1232
+ * NDPA 2023 section reference for this right
1233
+ * (e.g., "Section 34(1)(a)" for access, "Section 38" for portability).
1234
+ * Used for display purposes only — verify the exact subsection with counsel.
1185
1235
  */
1186
1236
  ndpaSection?: string;
1187
1237
  /**
@@ -1330,8 +1380,11 @@ declare interface ThirdPartyProcessor {
1330
1380
  }
1331
1381
 
1332
1382
  /**
1333
- * Cross-Border Data Transfer types aligned with NDPA 2023 Part VI (Sections 41-45)
1334
- * Personal data may only be transferred outside Nigeria under specific conditions
1383
+ * Cross-Border Data Transfer types aligned with NDPA 2023 Part VIII (Sections 41-43).
1384
+ * Personal data may only be transferred outside Nigeria under the bases listed in
1385
+ * Section 41(1), where Section 42 defines adequacy and Section 43 lists derogations.
1386
+ *
1387
+ * Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
1335
1388
  */
1336
1389
  /**
1337
1390
  * Transfer mechanisms recognized under the NDPA
@@ -1878,9 +1931,10 @@ declare interface UseDSRReturn {
1878
1931
  */
1879
1932
  requests: DSRRequest[];
1880
1933
  /**
1881
- * Submit a new request
1934
+ * Submit a new request. The hook assigns `id`, `status`, `createdAt`,
1935
+ * `updatedAt`, and `dueDate` — pass everything else.
1882
1936
  */
1883
- submitRequest: (requestData: Omit<DSRRequest, 'id' | 'status' | 'submittedAt' | 'updatedAt' | 'estimatedCompletionDate'>) => DSRRequest;
1937
+ submitRequest: (requestData: Omit<DSRRequest, 'id' | 'status' | 'createdAt' | 'updatedAt' | 'dueDate'>) => DSRRequest;
1884
1938
  /**
1885
1939
  * Update an existing request
1886
1940
  */
@@ -1892,7 +1946,12 @@ declare interface UseDSRReturn {
1892
1946
  /**
1893
1947
  * Get requests by status
1894
1948
  */
1895
- getRequestsByStatus: (status: RequestStatus) => DSRRequest[];
1949
+ /**
1950
+ * Filter requests by status. Accepts both the modern `DSRStatus` union and
1951
+ * the deprecated `RequestStatus` for backward compatibility — pass the
1952
+ * modern values (`'pending' | 'awaitingVerification' | 'inProgress' | ...`).
1953
+ */
1954
+ getRequestsByStatus: (status: DSRStatus | RequestStatus) => DSRRequest[];
1896
1955
  /**
1897
1956
  * Get requests by type
1898
1957
  */
@@ -1915,6 +1974,40 @@ declare interface UseDSRReturn {
1915
1974
  isLoading: boolean;
1916
1975
  }
1917
1976
 
1977
+ /**
1978
+ * Trap keyboard focus inside a container while it is active, and restore
1979
+ * focus to the element that was active before activation when the container
1980
+ * deactivates. Centralises the trap/restore logic that was previously
1981
+ * duplicated (and broken — no restore) inside ConsentBanner.
1982
+ *
1983
+ * @example
1984
+ * ```tsx
1985
+ * const ref = useFocusTrap<HTMLDivElement>({ active: isOpen, onEscape: close });
1986
+ * return <div ref={ref}>...</div>;
1987
+ * ```
1988
+ */
1989
+ export declare function useFocusTrap<T extends HTMLElement = HTMLElement>(options: UseFocusTrapOptions): RefObject<T | null>;
1990
+
1991
+ export declare interface UseFocusTrapOptions {
1992
+ /**
1993
+ * Whether the focus trap is active. When transitioning from false → true,
1994
+ * the hook captures `document.activeElement` and moves focus into the
1995
+ * container; when transitioning back to false, the captured element is
1996
+ * re-focused (WCAG 2.4.3 — focus order).
1997
+ */
1998
+ active: boolean;
1999
+ /**
2000
+ * Optional callback fired on Escape keydown while the trap is active.
2001
+ * Typical use is to close the surrounding dialog.
2002
+ */
2003
+ onEscape?: () => void;
2004
+ /**
2005
+ * If false, do not auto-focus the first interactive element inside the
2006
+ * container on activation. Defaults to true.
2007
+ */
2008
+ autoFocus?: boolean;
2009
+ }
2010
+
1918
2011
  /**
1919
2012
  * Hook for managing lawful basis documentation for processing activities
1920
2013
  * in compliance with NDPA 2023 Section 25.
package/dist/hooks.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { RefObject } from 'react';
2
+
1
3
  /**
2
4
  * Adequacy status of a destination country
3
5
  */
@@ -57,10 +59,51 @@ export declare interface BreachReport {
57
59
  affectedSystems: string[];
58
60
  /** Types of data involved in the breach */
59
61
  dataTypes: string[];
60
- /** Whether sensitive personal data is involved (NDPA Section 27) */
62
+ /** Whether sensitive personal data is involved (NDPA Section 30) */
61
63
  involvesSensitiveData?: boolean;
62
64
  /** Estimated number of data subjects affected */
63
65
  estimatedAffectedSubjects?: number;
66
+ /**
67
+ * Approximate number of personal data RECORDS concerned (distinct from subject count).
68
+ * Required content under NDPA Section 40(1)(a) and Section 40(2).
69
+ */
70
+ approximateRecordCount?: number;
71
+ /**
72
+ * Categories of data subjects affected (e.g. customers, employees, minors, patients).
73
+ * Required content under NDPA Section 40(1)(a) and Section 40(2).
74
+ */
75
+ dataSubjectCategories?: string[];
76
+ /**
77
+ * Likely consequences of the breach for affected data subjects (e.g. identity theft,
78
+ * financial loss, reputational damage). Reported to the NDPC and, where applicable,
79
+ * communicated to data subjects under Section 40(3).
80
+ */
81
+ likelyConsequences?: string;
82
+ /**
83
+ * Measures taken or proposed to mitigate adverse effects of the breach.
84
+ * Required content for Section 40(3) communications to data subjects.
85
+ */
86
+ mitigationMeasures?: string;
87
+ /**
88
+ * Whether this is a phased / interim report submitted before full investigation
89
+ * is complete. The NDPC permits phased reporting where complete information is
90
+ * not available within 72 hours.
91
+ */
92
+ isPhasedReport?: boolean;
93
+ /**
94
+ * ID of the prior phased report this report supplements, if any.
95
+ */
96
+ supplementsReportId?: string;
97
+ /**
98
+ * Data Protection Officer contact details. The DPO is the named contact point
99
+ * for the NDPC per NDPA Section 32(3)(c). Required content in the regulatory
100
+ * report (Section 40(2)).
101
+ */
102
+ dpoContact?: {
103
+ name: string;
104
+ email: string;
105
+ phone?: string;
106
+ };
64
107
  /** Whether the breach is ongoing or contained */
65
108
  status: 'ongoing' | 'contained' | 'resolved';
66
109
  /** Initial actions taken to address the breach */
@@ -404,10 +447,10 @@ declare interface DOCXExportOptions {
404
447
  }
405
448
 
406
449
  /** A map of question IDs to their answer values */
407
- declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
450
+ export declare type DPIAAnswerMap = Record<string, DPIAAnswerValue>;
408
451
 
409
452
  /** Possible value types for a DPIA answer */
410
- declare type DPIAAnswerValue = string | number | boolean | string[];
453
+ export declare type DPIAAnswerValue = string | number | boolean | string[];
411
454
 
412
455
  /**
413
456
  * Data Protection Impact Assessment types aligned with NDPA 2023 Sections 38-39
@@ -626,20 +669,25 @@ export declare interface DSRRequest {
626
669
  export declare type DSRStatus = 'pending' | 'awaitingVerification' | 'inProgress' | 'completed' | 'rejected';
627
670
 
628
671
  /**
629
- * Data Subject Rights types aligned with NDPA 2023 Part IV (Sections 29-36)
672
+ * Data Subject Rights types aligned with NDPA 2023 Part VI (Sections 34-38)
673
+ * and the related provisions in Part V (Section 27 — information to the data subject)
674
+ * and Part X (Section 46 — complaint to the Commission).
675
+ *
676
+ * Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
630
677
  */
631
678
  /**
632
- * Types of data subject requests per NDPA Part IV
633
- * - 'information': Right to be informed (Section 29)
634
- * - 'access': Right of access (Section 30)
635
- * - 'rectification': Right to rectification (Section 31)
636
- * - 'erasure': Right to erasure (Section 32)
637
- * - 'restriction': Right to restrict processing (Section 33)
638
- * - 'portability': Right to data portability (Section 34)
639
- * - 'objection': Right to object (Section 35)
640
- * - 'automated_decision_making': Rights related to automated decision-making (Section 36)
679
+ * Types of data subject requests per NDPA Part VI
680
+ * - 'information': Right to be informed (Section 27 — provision of information; Section 34(1)(a))
681
+ * - 'access': Right of access / confirmation + data copy (Section 34(1)(a)–(b))
682
+ * - 'rectification': Right to rectification (Section 34(1)(c))
683
+ * - 'erasure': Right to erasure (Section 34(1)(d), Section 34(2))
684
+ * - 'restriction': Right to restrict processing (Section 34(1)(e))
685
+ * - 'portability': Right to data portability (Section 38)
686
+ * - 'objection': Right to object (Section 36)
687
+ * - 'automated_decision_making': Rights re. automated decisions / profiling (Section 37)
688
+ * - 'withdraw_consent': Right to withdraw consent (Section 35)
641
689
  */
642
- export declare type DSRType = 'information' | 'access' | 'rectification' | 'erasure' | 'restriction' | 'portability' | 'objection' | 'automated_decision_making';
690
+ export declare type DSRType = 'information' | 'access' | 'rectification' | 'erasure' | 'restriction' | 'portability' | 'objection' | 'automated_decision_making' | 'withdraw_consent';
643
691
 
644
692
  declare type EffortLevel = 'low' | 'medium' | 'high';
645
693
 
@@ -1181,7 +1229,9 @@ declare interface RequestType {
1181
1229
  /** Description of what this request type entails */
1182
1230
  description: string;
1183
1231
  /**
1184
- * NDPA section reference (e.g., "Section 30" for access requests)
1232
+ * NDPA 2023 section reference for this right
1233
+ * (e.g., "Section 34(1)(a)" for access, "Section 38" for portability).
1234
+ * Used for display purposes only — verify the exact subsection with counsel.
1185
1235
  */
1186
1236
  ndpaSection?: string;
1187
1237
  /**
@@ -1330,8 +1380,11 @@ declare interface ThirdPartyProcessor {
1330
1380
  }
1331
1381
 
1332
1382
  /**
1333
- * Cross-Border Data Transfer types aligned with NDPA 2023 Part VI (Sections 41-45)
1334
- * Personal data may only be transferred outside Nigeria under specific conditions
1383
+ * Cross-Border Data Transfer types aligned with NDPA 2023 Part VIII (Sections 41-43).
1384
+ * Personal data may only be transferred outside Nigeria under the bases listed in
1385
+ * Section 41(1), where Section 42 defines adequacy and Section 43 lists derogations.
1386
+ *
1387
+ * Note: These are guidance labels — not legal advice. Verify with your DPO or counsel.
1335
1388
  */
1336
1389
  /**
1337
1390
  * Transfer mechanisms recognized under the NDPA
@@ -1878,9 +1931,10 @@ declare interface UseDSRReturn {
1878
1931
  */
1879
1932
  requests: DSRRequest[];
1880
1933
  /**
1881
- * Submit a new request
1934
+ * Submit a new request. The hook assigns `id`, `status`, `createdAt`,
1935
+ * `updatedAt`, and `dueDate` — pass everything else.
1882
1936
  */
1883
- submitRequest: (requestData: Omit<DSRRequest, 'id' | 'status' | 'submittedAt' | 'updatedAt' | 'estimatedCompletionDate'>) => DSRRequest;
1937
+ submitRequest: (requestData: Omit<DSRRequest, 'id' | 'status' | 'createdAt' | 'updatedAt' | 'dueDate'>) => DSRRequest;
1884
1938
  /**
1885
1939
  * Update an existing request
1886
1940
  */
@@ -1892,7 +1946,12 @@ declare interface UseDSRReturn {
1892
1946
  /**
1893
1947
  * Get requests by status
1894
1948
  */
1895
- getRequestsByStatus: (status: RequestStatus) => DSRRequest[];
1949
+ /**
1950
+ * Filter requests by status. Accepts both the modern `DSRStatus` union and
1951
+ * the deprecated `RequestStatus` for backward compatibility — pass the
1952
+ * modern values (`'pending' | 'awaitingVerification' | 'inProgress' | ...`).
1953
+ */
1954
+ getRequestsByStatus: (status: DSRStatus | RequestStatus) => DSRRequest[];
1896
1955
  /**
1897
1956
  * Get requests by type
1898
1957
  */
@@ -1915,6 +1974,40 @@ declare interface UseDSRReturn {
1915
1974
  isLoading: boolean;
1916
1975
  }
1917
1976
 
1977
+ /**
1978
+ * Trap keyboard focus inside a container while it is active, and restore
1979
+ * focus to the element that was active before activation when the container
1980
+ * deactivates. Centralises the trap/restore logic that was previously
1981
+ * duplicated (and broken — no restore) inside ConsentBanner.
1982
+ *
1983
+ * @example
1984
+ * ```tsx
1985
+ * const ref = useFocusTrap<HTMLDivElement>({ active: isOpen, onEscape: close });
1986
+ * return <div ref={ref}>...</div>;
1987
+ * ```
1988
+ */
1989
+ export declare function useFocusTrap<T extends HTMLElement = HTMLElement>(options: UseFocusTrapOptions): RefObject<T | null>;
1990
+
1991
+ export declare interface UseFocusTrapOptions {
1992
+ /**
1993
+ * Whether the focus trap is active. When transitioning from false → true,
1994
+ * the hook captures `document.activeElement` and moves focus into the
1995
+ * container; when transitioning back to false, the captured element is
1996
+ * re-focused (WCAG 2.4.3 — focus order).
1997
+ */
1998
+ active: boolean;
1999
+ /**
2000
+ * Optional callback fired on Escape keydown while the trap is active.
2001
+ * Typical use is to close the surrounding dialog.
2002
+ */
2003
+ onEscape?: () => void;
2004
+ /**
2005
+ * If false, do not auto-focus the first interactive element inside the
2006
+ * container on activation. Defaults to true.
2007
+ */
2008
+ autoFocus?: boolean;
2009
+ }
2010
+
1918
2011
  /**
1919
2012
  * Hook for managing lawful basis documentation for processing activities
1920
2013
  * in compliance with NDPA 2023 Section 25.
package/dist/hooks.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- 'use strict';var chunkORFC66EA_js=require('./chunk-ORFC66EA.js'),chunkTV4U6AIS_js=require('./chunk-TV4U6AIS.js'),chunk7AVN424U_js=require('./chunk-7AVN424U.js'),chunkMCWV7S2G_js=require('./chunk-MCWV7S2G.js'),chunkM2TPT5GB_js=require('./chunk-M2TPT5GB.js');require('./chunk-Z73T6MWY.js'),require('./chunk-YPKUHSK4.js'),require('./chunk-LIM64IV2.js');var chunkS4GRSNB4_js=require('./chunk-S4GRSNB4.js');require('./chunk-CPK5D5FY.js'),require('./chunk-TDDAYVKK.js'),require('./chunk-C4YM4UMI.js'),require('./chunk-GOU6FU6Y.js');var chunk7SMLHZ4B_js=require('./chunk-7SMLHZ4B.js');require('./chunk-A4PK7JB2.js'),require('./chunk-HO5M7M4M.js');var chunkCKJAECGV_js=require('./chunk-CKJAECGV.js');require('./chunk-J5WCPZLW.js');var chunkOPYQIJKY_js=require('./chunk-OPYQIJKY.js');require('./chunk-P42Z5CFE.js');var chunkI4M2AA3N_js=require('./chunk-I4M2AA3N.js');require('./chunk-BKRETVJ6.js'),require('./chunk-ELKB2AFZ.js'),require('./chunk-MQFZHA2D.js');var react=require('react');function l({input:e}){let r=JSON.stringify(e);return react.useMemo(()=>chunkS4GRSNB4_js.a(e),[r])}Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkORFC66EA_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkTV4U6AIS_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkTV4U6AIS_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunk7AVN424U_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkMCWV7S2G_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkM2TPT5GB_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunk7SMLHZ4B_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkCKJAECGV_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkOPYQIJKY_js.a}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkI4M2AA3N_js.a}});exports.useComplianceScore=l;//# sourceMappingURL=hooks.js.map
3
- //# sourceMappingURL=hooks.js.map
2
+ 'use strict';var chunkRYREGZVQ_js=require('./chunk-RYREGZVQ.js'),chunkZ763UI5U_js=require('./chunk-Z763UI5U.js'),chunkUTFBKL73_js=require('./chunk-UTFBKL73.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunk3JPDTXGC_js=require('./chunk-3JPDTXGC.js'),chunkUI536RU2_js=require('./chunk-UI536RU2.js');require('./chunk-N3MQQUQP.js'),require('./chunk-LVGT3DLT.js'),require('./chunk-QPRYXVH2.js'),require('./chunk-Q64735OC.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-4CVBQC66.js');var chunkP4LNLCSF_js=require('./chunk-P4LNLCSF.js'),chunkL2VO3MEJ_js=require('./chunk-L2VO3MEJ.js');require('./chunk-7ZZO7GVB.js'),require('./chunk-B46SJB5V.js');var chunkHBLGN4SD_js=require('./chunk-HBLGN4SD.js');require('./chunk-L2BRFMVS.js');var chunkC7IDR2IV_js=require('./chunk-C7IDR2IV.js');require('./chunk-TQZWJGJ2.js');var chunkVJTQXVAF_js=require('./chunk-VJTQXVAF.js');require('./chunk-3YTAOT5O.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkRYREGZVQ_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkZ763UI5U_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkZ763UI5U_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkUTFBKL73_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunk3JPDTXGC_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkUI536RU2_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkP4LNLCSF_js.a}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkL2VO3MEJ_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkHBLGN4SD_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkC7IDR2IV_js.a}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkVJTQXVAF_js.a}});
package/dist/hooks.mjs CHANGED
@@ -1,3 +1,2 @@
1
1
  "use client";
2
- export{a as useAdaptivePolicyWizard}from'./chunk-F5TXUA4O.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-LU7PKE7Y.mjs';export{a as useLawfulBasis}from'./chunk-E4NCJ7RD.mjs';export{a as useCrossBorderTransfer}from'./chunk-Z6IIMLZU.mjs';export{a as useROPA}from'./chunk-2AW7KAZO.mjs';import'./chunk-JFFOPHU3.mjs';import'./chunk-I557S566.mjs';import'./chunk-CKGJK4D7.mjs';import {a}from'./chunk-ABDB7LEV.mjs';import'./chunk-GRLIPT5V.mjs';import'./chunk-TXBZPCGF.mjs';import'./chunk-75TJPK2N.mjs';import'./chunk-SHMJNRHO.mjs';export{a as useConsent}from'./chunk-VWPGIES4.mjs';import'./chunk-R3OYAJI6.mjs';import'./chunk-U62QYKVG.mjs';export{a as useDSR}from'./chunk-CWHBCQGT.mjs';import'./chunk-B4Z5MBUC.mjs';export{a as useDPIA}from'./chunk-6FGCGLH5.mjs';import'./chunk-6TA2MVTU.mjs';export{a as useBreach}from'./chunk-PATONNTZ.mjs';import'./chunk-DJGS7SSN.mjs';import'./chunk-6WIP33TW.mjs';import'./chunk-WWT2ZSNU.mjs';import {useMemo}from'react';function l({input:e}){let r=JSON.stringify(e);return useMemo(()=>a(e),[r])}export{l as useComplianceScore};//# sourceMappingURL=hooks.mjs.map
3
- //# sourceMappingURL=hooks.mjs.map
2
+ export{a as useComplianceScore}from'./chunk-W65ZWTLD.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-VYAL2TGT.mjs';export{a as useLawfulBasis}from'./chunk-4G3SRVRI.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-RPXRPGHL.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-O6CUBNXK.mjs';import'./chunk-AOHKVFAS.mjs';import'./chunk-Y3MKMAFQ.mjs';import'./chunk-EFIBHKQE.mjs';import'./chunk-RMQ7OLNY.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-XP5PL6K7.mjs';export{a as useConsent}from'./chunk-PCU6GKBE.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-UASG46LP.mjs';import'./chunk-PJNKQPQP.mjs';export{a as useDSR}from'./chunk-MPBPAEZC.mjs';import'./chunk-RZ6GC6WN.mjs';export{a as useDPIA}from'./chunk-H3XJV2IR.mjs';import'./chunk-LRRENTT5.mjs';export{a as useBreach}from'./chunk-3HOXQNCH.mjs';import'./chunk-WTGKZX7J.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';