@tantainnovative/ndpr-toolkit 1.0.5 → 1.0.7

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 (263) hide show
  1. package/README.md +88 -14
  2. package/dist/components/breach-notification/BreachNotificationForm.d.ts +18 -0
  3. package/dist/components/breach-notification/BreachNotificationForm.d.ts.map +1 -0
  4. package/dist/components/consent/ConsentBanner.d.ts +30 -0
  5. package/dist/components/consent/ConsentBanner.d.ts.map +1 -0
  6. package/dist/components/consent/ConsentManager.d.ts +51 -0
  7. package/dist/components/consent/ConsentManager.d.ts.map +1 -0
  8. package/dist/components/consent/ConsentSettings.d.ts +15 -0
  9. package/dist/components/consent/ConsentSettings.d.ts.map +1 -0
  10. package/dist/components/consent/unstyled/UnstyledConsentBanner.d.ts +7 -0
  11. package/dist/components/consent/unstyled/UnstyledConsentBanner.d.ts.map +1 -0
  12. package/dist/components/consent/unstyled/UnstyledConsentSettings.d.ts +7 -0
  13. package/dist/components/consent/unstyled/UnstyledConsentSettings.d.ts.map +1 -0
  14. package/dist/components/consent/unstyled/UnstyledConsentToggle.d.ts +8 -0
  15. package/dist/components/consent/unstyled/UnstyledConsentToggle.d.ts.map +1 -0
  16. package/dist/components/consent/unstyled/index.d.ts +4 -0
  17. package/dist/components/consent/unstyled/index.d.ts.map +1 -0
  18. package/dist/components/data-subject-rights/DataSubjectRequestForm.d.ts +14 -0
  19. package/dist/components/data-subject-rights/DataSubjectRequestForm.d.ts.map +1 -0
  20. package/dist/components/docs/DocLayout.d.ts +9 -0
  21. package/dist/components/docs/DocLayout.d.ts.map +1 -0
  22. package/dist/components/docs/index.d.ts +2 -0
  23. package/dist/components/docs/index.d.ts.map +1 -0
  24. package/dist/components/dpia/DPIAQuestionnaire.d.ts +9 -0
  25. package/dist/components/dpia/DPIAQuestionnaire.d.ts.map +1 -0
  26. package/dist/components/privacy-policy/PolicyGenerator.d.ts +12 -0
  27. package/dist/components/privacy-policy/PolicyGenerator.d.ts.map +1 -0
  28. package/dist/components/privacy-policy/data.d.ts +8 -0
  29. package/dist/components/privacy-policy/data.d.ts.map +1 -0
  30. package/dist/components/privacy-policy/shared/CheckboxField.d.ts +13 -0
  31. package/dist/components/privacy-policy/shared/CheckboxField.d.ts.map +1 -0
  32. package/dist/components/privacy-policy/shared/CheckboxGroup.d.ts +13 -0
  33. package/dist/components/privacy-policy/shared/CheckboxGroup.d.ts.map +1 -0
  34. package/dist/components/privacy-policy/shared/FormField.d.ts +13 -0
  35. package/dist/components/privacy-policy/shared/FormField.d.ts.map +1 -0
  36. package/dist/components/privacy-policy/shared/StepIndicator.d.ts +8 -0
  37. package/dist/components/privacy-policy/shared/StepIndicator.d.ts.map +1 -0
  38. package/dist/components/privacy-policy/steps/CustomSectionsStep.d.ts +15 -0
  39. package/dist/components/privacy-policy/steps/CustomSectionsStep.d.ts.map +1 -0
  40. package/dist/components/privacy-policy/steps/DataCollectionStep.d.ts +20 -0
  41. package/dist/components/privacy-policy/steps/DataCollectionStep.d.ts.map +1 -0
  42. package/dist/components/privacy-policy/steps/DataSharingStep.d.ts +34 -0
  43. package/dist/components/privacy-policy/steps/DataSharingStep.d.ts.map +1 -0
  44. package/dist/components/privacy-policy/steps/OrganizationInfoStep.d.ts +17 -0
  45. package/dist/components/privacy-policy/steps/OrganizationInfoStep.d.ts.map +1 -0
  46. package/dist/components/privacy-policy/steps/PolicyPreviewStep.d.ts +30 -0
  47. package/dist/components/privacy-policy/steps/PolicyPreviewStep.d.ts.map +1 -0
  48. package/dist/components/ui/Badge.d.ts +10 -0
  49. package/dist/components/ui/Badge.d.ts.map +1 -0
  50. package/dist/components/ui/Button.d.ts +11 -0
  51. package/dist/components/ui/Button.d.ts.map +1 -0
  52. package/dist/components/ui/Card.d.ts +10 -0
  53. package/dist/components/ui/Card.d.ts.map +1 -0
  54. package/dist/components/ui/Checkbox.d.ts +8 -0
  55. package/dist/components/ui/Checkbox.d.ts.map +1 -0
  56. package/dist/components/ui/FormField.d.ts +11 -0
  57. package/dist/components/ui/FormField.d.ts.map +1 -0
  58. package/dist/components/ui/Input.d.ts +6 -0
  59. package/dist/components/ui/Input.d.ts.map +1 -0
  60. package/dist/components/ui/Select.d.ts +6 -0
  61. package/dist/components/ui/Select.d.ts.map +1 -0
  62. package/dist/components/ui/TextArea.d.ts +6 -0
  63. package/dist/components/ui/TextArea.d.ts.map +1 -0
  64. package/dist/components/ui/dialog.d.ts +18 -0
  65. package/dist/components/ui/dialog.d.ts.map +1 -0
  66. package/dist/components/ui/label.d.ts +5 -0
  67. package/dist/components/ui/label.d.ts.map +1 -0
  68. package/dist/components/ui/switch.d.ts +5 -0
  69. package/dist/components/ui/switch.d.ts.map +1 -0
  70. package/dist/components/ui/tabs.d.ts +8 -0
  71. package/dist/components/ui/tabs.d.ts.map +1 -0
  72. package/dist/contexts/ConsentContext.d.ts +35 -0
  73. package/dist/contexts/ConsentContext.d.ts.map +1 -0
  74. package/dist/contexts/GenericConsentContext.d.ts +11 -0
  75. package/dist/contexts/GenericConsentContext.d.ts.map +1 -0
  76. package/dist/hooks/useConsent.d.ts +12 -0
  77. package/dist/hooks/useConsent.d.ts.map +1 -0
  78. package/dist/hooks/useConsentActions.d.ts +12 -0
  79. package/dist/hooks/useConsentActions.d.ts.map +1 -0
  80. package/dist/hooks/useConsentManager.d.ts +14 -0
  81. package/dist/hooks/useConsentManager.d.ts.map +1 -0
  82. package/dist/hooks/useConsentState.d.ts +10 -0
  83. package/dist/hooks/useConsentState.d.ts.map +1 -0
  84. package/dist/index.d.mts +256 -0
  85. package/dist/index.d.ts +24 -0
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.js +2 -0
  88. package/dist/index.js.map +1 -0
  89. package/dist/index.mjs +2 -0
  90. package/dist/index.mjs.map +1 -0
  91. package/dist/lib/consentService.d.ts +11 -0
  92. package/dist/lib/consentService.d.ts.map +1 -0
  93. package/dist/lib/dpiaQuestions.d.ts +3 -0
  94. package/dist/lib/dpiaQuestions.d.ts.map +1 -0
  95. package/dist/lib/requestService.d.ts +10 -0
  96. package/dist/lib/requestService.d.ts.map +1 -0
  97. package/dist/lib/utils.d.ts +3 -0
  98. package/dist/lib/utils.d.ts.map +1 -0
  99. package/dist/styles.css +38 -0
  100. package/dist/types/consent.d.ts +57 -0
  101. package/dist/types/consent.d.ts.map +1 -0
  102. package/dist/types/index.d.ts +91 -0
  103. package/dist/types/index.d.ts.map +1 -0
  104. package/dist/unstyled.d.mts +22 -0
  105. package/dist/unstyled.d.ts +2 -0
  106. package/dist/unstyled.d.ts.map +1 -0
  107. package/dist/unstyled.js +2 -0
  108. package/dist/unstyled.js.map +1 -0
  109. package/dist/unstyled.mjs +2 -0
  110. package/dist/unstyled.mjs.map +1 -0
  111. package/package.json +33 -5
  112. package/CHANGELOG.md +0 -16
  113. package/CNAME +0 -1
  114. package/CONTRIBUTING.md +0 -87
  115. package/RELEASE-NOTES-v1.0.0.md +0 -140
  116. package/RELEASE-NOTES-v1.0.1.md +0 -69
  117. package/SECURITY.md +0 -21
  118. package/components.json +0 -21
  119. package/eslint.config.mjs +0 -16
  120. package/next-env.d.ts +0 -5
  121. package/next.config.js +0 -15
  122. package/next.config.ts +0 -62
  123. package/packages/ndpr-toolkit/README.md +0 -467
  124. package/packages/ndpr-toolkit/dist/components/breach/BreachNotificationManager.d.ts +0 -62
  125. package/packages/ndpr-toolkit/dist/components/breach/BreachReportForm.d.ts +0 -66
  126. package/packages/ndpr-toolkit/dist/components/breach/BreachRiskAssessment.d.ts +0 -50
  127. package/packages/ndpr-toolkit/dist/components/breach/RegulatoryReportGenerator.d.ts +0 -94
  128. package/packages/ndpr-toolkit/dist/components/consent/ConsentBanner.d.ts +0 -79
  129. package/packages/ndpr-toolkit/dist/components/consent/ConsentManager.d.ts +0 -73
  130. package/packages/ndpr-toolkit/dist/components/consent/ConsentStorage.d.ts +0 -41
  131. package/packages/ndpr-toolkit/dist/components/dpia/DPIAQuestionnaire.d.ts +0 -70
  132. package/packages/ndpr-toolkit/dist/components/dpia/DPIAReport.d.ts +0 -40
  133. package/packages/ndpr-toolkit/dist/components/dpia/StepIndicator.d.ts +0 -64
  134. package/packages/ndpr-toolkit/dist/components/dsr/DSRDashboard.d.ts +0 -58
  135. package/packages/ndpr-toolkit/dist/components/dsr/DSRRequestForm.d.ts +0 -74
  136. package/packages/ndpr-toolkit/dist/components/dsr/DSRTracker.d.ts +0 -56
  137. package/packages/ndpr-toolkit/dist/components/policy/PolicyExporter.d.ts +0 -65
  138. package/packages/ndpr-toolkit/dist/components/policy/PolicyGenerator.d.ts +0 -54
  139. package/packages/ndpr-toolkit/dist/components/policy/PolicyPreview.d.ts +0 -71
  140. package/packages/ndpr-toolkit/dist/hooks/useBreach.d.ts +0 -97
  141. package/packages/ndpr-toolkit/dist/hooks/useConsent.d.ts +0 -63
  142. package/packages/ndpr-toolkit/dist/hooks/useDPIA.d.ts +0 -92
  143. package/packages/ndpr-toolkit/dist/hooks/useDSR.d.ts +0 -72
  144. package/packages/ndpr-toolkit/dist/hooks/usePrivacyPolicy.d.ts +0 -87
  145. package/packages/ndpr-toolkit/dist/index.d.ts +0 -31
  146. package/packages/ndpr-toolkit/dist/index.esm.js +0 -2
  147. package/packages/ndpr-toolkit/dist/index.esm.js.map +0 -1
  148. package/packages/ndpr-toolkit/dist/index.js +0 -2
  149. package/packages/ndpr-toolkit/dist/index.js.map +0 -1
  150. package/packages/ndpr-toolkit/dist/setupTests.d.ts +0 -2
  151. package/packages/ndpr-toolkit/dist/types/breach.d.ts +0 -239
  152. package/packages/ndpr-toolkit/dist/types/consent.d.ts +0 -95
  153. package/packages/ndpr-toolkit/dist/types/dpia.d.ts +0 -196
  154. package/packages/ndpr-toolkit/dist/types/dsr.d.ts +0 -162
  155. package/packages/ndpr-toolkit/dist/types/privacy.d.ts +0 -204
  156. package/packages/ndpr-toolkit/dist/utils/breach.d.ts +0 -14
  157. package/packages/ndpr-toolkit/dist/utils/consent.d.ts +0 -10
  158. package/packages/ndpr-toolkit/dist/utils/dpia.d.ts +0 -12
  159. package/packages/ndpr-toolkit/dist/utils/dsr.d.ts +0 -11
  160. package/packages/ndpr-toolkit/dist/utils/privacy.d.ts +0 -12
  161. package/packages/ndpr-toolkit/package-lock.json +0 -8197
  162. package/packages/ndpr-toolkit/package.json +0 -71
  163. package/packages/ndpr-toolkit/rollup.config.js +0 -34
  164. package/packages/ndpr-toolkit/src/components/breach/BreachNotificationManager.tsx +0 -701
  165. package/packages/ndpr-toolkit/src/components/breach/BreachReportForm.tsx +0 -631
  166. package/packages/ndpr-toolkit/src/components/breach/BreachRiskAssessment.tsx +0 -569
  167. package/packages/ndpr-toolkit/src/components/breach/RegulatoryReportGenerator.tsx +0 -496
  168. package/packages/ndpr-toolkit/src/components/consent/ConsentBanner.tsx +0 -270
  169. package/packages/ndpr-toolkit/src/components/consent/ConsentManager.tsx +0 -217
  170. package/packages/ndpr-toolkit/src/components/consent/ConsentStorage.tsx +0 -206
  171. package/packages/ndpr-toolkit/src/components/dpia/DPIAQuestionnaire.tsx +0 -342
  172. package/packages/ndpr-toolkit/src/components/dpia/DPIAReport.tsx +0 -373
  173. package/packages/ndpr-toolkit/src/components/dpia/StepIndicator.tsx +0 -174
  174. package/packages/ndpr-toolkit/src/components/dsr/DSRDashboard.tsx +0 -717
  175. package/packages/ndpr-toolkit/src/components/dsr/DSRRequestForm.tsx +0 -476
  176. package/packages/ndpr-toolkit/src/components/dsr/DSRTracker.tsx +0 -620
  177. package/packages/ndpr-toolkit/src/components/policy/PolicyExporter.tsx +0 -541
  178. package/packages/ndpr-toolkit/src/components/policy/PolicyGenerator.tsx +0 -454
  179. package/packages/ndpr-toolkit/src/components/policy/PolicyPreview.tsx +0 -333
  180. package/packages/ndpr-toolkit/src/hooks/useBreach.ts +0 -409
  181. package/packages/ndpr-toolkit/src/hooks/useConsent.ts +0 -263
  182. package/packages/ndpr-toolkit/src/hooks/useDPIA.ts +0 -457
  183. package/packages/ndpr-toolkit/src/hooks/useDSR.ts +0 -236
  184. package/packages/ndpr-toolkit/src/hooks/usePrivacyPolicy.ts +0 -428
  185. package/packages/ndpr-toolkit/src/index.ts +0 -44
  186. package/packages/ndpr-toolkit/src/setupTests.ts +0 -5
  187. package/packages/ndpr-toolkit/src/types/breach.ts +0 -283
  188. package/packages/ndpr-toolkit/src/types/consent.ts +0 -111
  189. package/packages/ndpr-toolkit/src/types/dpia.ts +0 -236
  190. package/packages/ndpr-toolkit/src/types/dsr.ts +0 -192
  191. package/packages/ndpr-toolkit/src/types/index.ts +0 -42
  192. package/packages/ndpr-toolkit/src/types/privacy.ts +0 -246
  193. package/packages/ndpr-toolkit/src/utils/breach.ts +0 -122
  194. package/packages/ndpr-toolkit/src/utils/consent.ts +0 -51
  195. package/packages/ndpr-toolkit/src/utils/dpia.ts +0 -104
  196. package/packages/ndpr-toolkit/src/utils/dsr.ts +0 -77
  197. package/packages/ndpr-toolkit/src/utils/privacy.ts +0 -100
  198. package/packages/ndpr-toolkit/tsconfig.json +0 -23
  199. package/postcss.config.mjs +0 -5
  200. package/public/NDPR TOOLKIT.svg +0 -1
  201. package/public/favicon/android-chrome-192x192.png +0 -0
  202. package/public/favicon/android-chrome-512x512.png +0 -0
  203. package/public/favicon/apple-touch-icon.png +0 -0
  204. package/public/favicon/favicon-16x16.png +0 -0
  205. package/public/favicon/favicon-32x32.png +0 -0
  206. package/public/favicon/site.webmanifest +0 -1
  207. package/public/file.svg +0 -1
  208. package/public/globe.svg +0 -1
  209. package/public/ndpr-toolkit-logo.svg +0 -108
  210. package/public/next.svg +0 -1
  211. package/public/vercel.svg +0 -1
  212. package/public/window.svg +0 -1
  213. package/src/app/accessibility.css +0 -70
  214. package/src/app/favicon.ico +0 -0
  215. package/src/app/globals.css +0 -123
  216. package/src/app/layout.tsx +0 -37
  217. package/src/app/ndpr-demos/breach/page.tsx +0 -354
  218. package/src/app/ndpr-demos/consent/page.tsx +0 -366
  219. package/src/app/ndpr-demos/dpia/page.tsx +0 -495
  220. package/src/app/ndpr-demos/dsr/page.tsx +0 -280
  221. package/src/app/ndpr-demos/page.tsx +0 -73
  222. package/src/app/ndpr-demos/policy/page.tsx +0 -771
  223. package/src/app/page.tsx +0 -452
  224. package/src/components/ErrorBoundary.tsx +0 -90
  225. package/src/components/breach-notification/BreachNotificationForm.tsx +0 -479
  226. package/src/components/consent/ConsentBanner.tsx +0 -193
  227. package/src/components/data-subject-rights/DataSubjectRequestForm.tsx +0 -530
  228. package/src/components/dpia/DPIAQuestionnaire.tsx +0 -523
  229. package/src/components/privacy-policy/PolicyGenerator.tsx +0 -1062
  230. package/src/components/privacy-policy/data.ts +0 -98
  231. package/src/components/privacy-policy/shared/CheckboxField.tsx +0 -38
  232. package/src/components/privacy-policy/shared/CheckboxGroup.tsx +0 -85
  233. package/src/components/privacy-policy/shared/FormField.tsx +0 -79
  234. package/src/components/privacy-policy/shared/StepIndicator.tsx +0 -86
  235. package/src/components/privacy-policy/steps/CustomSectionsStep.tsx +0 -361
  236. package/src/components/privacy-policy/steps/DataCollectionStep.tsx +0 -231
  237. package/src/components/privacy-policy/steps/DataSharingStep.tsx +0 -418
  238. package/src/components/privacy-policy/steps/OrganizationInfoStep.tsx +0 -202
  239. package/src/components/privacy-policy/steps/PolicyPreviewStep.tsx +0 -226
  240. package/src/components/ui/Badge.tsx +0 -46
  241. package/src/components/ui/Button.tsx +0 -59
  242. package/src/components/ui/Card.tsx +0 -92
  243. package/src/components/ui/Checkbox.tsx +0 -57
  244. package/src/components/ui/FormField.tsx +0 -50
  245. package/src/components/ui/Input.tsx +0 -38
  246. package/src/components/ui/Loading.tsx +0 -201
  247. package/src/components/ui/Select.tsx +0 -42
  248. package/src/components/ui/TextArea.tsx +0 -38
  249. package/src/components/ui/label.tsx +0 -24
  250. package/src/components/ui/switch.tsx +0 -31
  251. package/src/components/ui/tabs.tsx +0 -66
  252. package/src/hooks/useConsent.ts +0 -70
  253. package/src/hooks/useLoadingState.ts +0 -85
  254. package/src/lib/consentService.ts +0 -144
  255. package/src/lib/dpiaQuestions.ts +0 -188
  256. package/src/lib/requestService.ts +0 -79
  257. package/src/lib/sanitize.ts +0 -108
  258. package/src/lib/storage.ts +0 -222
  259. package/src/lib/utils.ts +0 -6
  260. package/src/types/html-to-docx.d.ts +0 -30
  261. package/src/types/index.ts +0 -77
  262. package/tailwind.config.ts +0 -65
  263. package/tsconfig.json +0 -41
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "outline" | "secondary" | "primary" | "success" | "danger" | "warning" | "info" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
+ }
8
+ declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLDivElement>>;
9
+ export { Badge, badgeVariants };
10
+ //# sourceMappingURL=Badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Badge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,aAAa;;8EAmBlB,CAAC;AAEF,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC,QAAA,MAAM,KAAK,mFAUV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export { Button, buttonVariants };
11
+ //# sourceMappingURL=Button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;8EA6BnB,CAAA;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,2CAUF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
4
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
5
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
10
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWjE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,GACZ,CAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ label?: string;
4
+ description?: string;
5
+ }
6
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
7
+ export { Checkbox };
8
+ //# sourceMappingURL=Checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,QAAQ,wFAyCb,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface FormFieldProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ id: string;
4
+ label: string;
5
+ description?: string;
6
+ error?: string;
7
+ required?: boolean;
8
+ }
9
+ declare const FormField: React.ForwardRefExoticComponent<FormFieldProps & React.RefAttributes<HTMLDivElement>>;
10
+ export { FormField };
11
+ //# sourceMappingURL=FormField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/components/ui/FormField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACnE,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,uFAgCd,CAAC;AAIF,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
3
+ }
4
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
5
+ export { Input };
6
+ //# sourceMappingURL=Input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;CAEpD;AAED,QAAA,MAAM,KAAK,qFAmBV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
3
+ }
4
+ declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
5
+ export { Select };
6
+ //# sourceMappingURL=Select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/ui/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAEtD;AAED,QAAA,MAAM,MAAM,uFAwBX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
3
+ }
4
+ declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
5
+ export { TextArea };
6
+ //# sourceMappingURL=TextArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/ui/TextArea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC;CAE1D;AAED,QAAA,MAAM,QAAQ,2FAoBb,CAAC;AAIF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import * as React from "react";
2
+ interface DialogProps {
3
+ open?: boolean;
4
+ onOpenChange?: (open: boolean) => void;
5
+ children: React.ReactNode;
6
+ }
7
+ declare const Dialog: ({ open, onOpenChange, children }: DialogProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
9
+ unstyled?: boolean;
10
+ } & React.RefAttributes<HTMLDivElement>>;
11
+ declare const DialogHeader: {
12
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
13
+ displayName: string;
14
+ };
15
+ declare const DialogTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
16
+ declare const DialogDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
17
+ export { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, };
18
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,QAAA,MAAM,MAAM,GAAI,kCAAkC,WAAW,mDAY5D,CAAA;AAED,QAAA,MAAM,aAAa;eAEmC,OAAO;wCAY3D,CAAA;AAGF,QAAA,MAAM,YAAY;8BAGf,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAQtC,CAAA;AAGD,QAAA,MAAM,WAAW,qHAYf,CAAA;AAGF,QAAA,MAAM,iBAAiB,yHASrB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Label };
5
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AAIvD,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAWlD;AAED,OAAO,EAAE,KAAK,EAAE,CAAA"}
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as SwitchPrimitive from "@radix-ui/react-switch";
3
+ declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Switch };
5
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/components/ui/switch.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAA;AAIzD,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAkBnD;AAED,OAAO,EAAE,MAAM,EAAE,CAAA"}
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
8
+ //# sourceMappingURL=tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAA;AAIrD,iBAAS,IAAI,CAAC,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,2CAQjD;AAED,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,2CAWjD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,2CAWpD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,2CAQpD;AAED,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,35 @@
1
+ import React, { ReactNode } from 'react';
2
+ export interface ConsentCategories {
3
+ necessary: boolean;
4
+ analytics: boolean;
5
+ marketing: boolean;
6
+ functional: boolean;
7
+ [key: string]: boolean;
8
+ }
9
+ export interface ConsentState {
10
+ hasUserConsented: boolean;
11
+ consentState: ConsentCategories;
12
+ showBanner: boolean;
13
+ showSettings: boolean;
14
+ }
15
+ export interface ConsentActions {
16
+ acceptAll: () => void;
17
+ rejectAll: () => void;
18
+ savePreferences: (preferences: Partial<ConsentCategories>) => void;
19
+ openSettings: () => void;
20
+ closeSettings: () => void;
21
+ updateConsent: (category: keyof ConsentCategories, value: boolean) => void;
22
+ }
23
+ export interface ConsentContextValue extends ConsentState, ConsentActions {
24
+ }
25
+ declare const ConsentContext: React.Context<ConsentContextValue | undefined>;
26
+ export interface ConsentProviderProps {
27
+ children: ReactNode;
28
+ initialConsent?: Partial<ConsentCategories>;
29
+ onConsentChange?: (consent: ConsentCategories) => void;
30
+ storageKey?: string;
31
+ }
32
+ export declare function ConsentProvider({ children, initialConsent, onConsentChange, storageKey, }: ConsentProviderProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function useConsent(): ConsentContextValue;
34
+ export { ConsentContext };
35
+ //# sourceMappingURL=ConsentContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConsentContext.d.ts","sourceRoot":"","sources":["../../src/contexts/ConsentContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA+D,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtG,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,iBAAiB,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,eAAe,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACnE,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,iBAAiB,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC5E;AAED,MAAM,WAAW,mBAAoB,SAAQ,YAAY,EAAE,cAAc;CAAG;AAE5E,QAAA,MAAM,cAAc,gDAA4D,CAAC;AAEjF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC5C,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AASD,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,cAAmB,EACnB,eAAe,EACf,UAA2B,GAC5B,EAAE,oBAAoB,2CAmHtB;AAED,wBAAgB,UAAU,wBAMzB;AAGD,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { BaseConsentCategories, DefaultConsentCategories, ConsentContextValue, ConsentProviderProps } from '@/types/consent';
3
+ /**
4
+ * Factory function to create a typed consent context
5
+ */
6
+ export declare function createConsentContext<T extends BaseConsentCategories = DefaultConsentCategories>(): {
7
+ ConsentContext: React.Context<ConsentContextValue<T> | undefined>;
8
+ ConsentProvider: ({ children, initialConsent, onConsentChange, storageKey, categories, }: ConsentProviderProps<T>) => import("react/jsx-runtime").JSX.Element;
9
+ useConsent: () => ConsentContextValue<T>;
10
+ };
11
+ //# sourceMappingURL=GenericConsentContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GenericConsentContext.d.ts","sourceRoot":"","sources":["../../src/contexts/GenericConsentContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiF,MAAM,OAAO,CAAC;AACtG,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EAGxB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,qBAAqB,GAAG,wBAAwB;;8FAS1F,oBAAoB,CAAC,CAAC,CAAC;;EAmJ3B"}
@@ -0,0 +1,12 @@
1
+ import { ConsentType, ConsentRecord } from '@/types';
2
+ export declare function useConsent(): {
3
+ consentRecord: ConsentRecord | null;
4
+ isLoading: boolean;
5
+ showBanner: boolean;
6
+ saveConsent: (consents: Record<ConsentType, boolean>, userId?: string) => ConsentRecord;
7
+ updateConsent: (consents: Record<ConsentType, boolean>, changeReason?: string, userId?: string) => ConsentRecord;
8
+ hasConsent: (type: ConsentType) => boolean;
9
+ openPreferences: () => void;
10
+ closePreferences: () => void;
11
+ };
12
+ //# sourceMappingURL=useConsent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConsent.d.ts","sourceRoot":"","sources":["../../src/hooks/useConsent.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAGrD,wBAAgB,UAAU;;;;4BAiBO,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,WAAW,MAAM;8BAQhE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,iBACvB,MAAM,WACZ,MAAM;uBAOS,WAAW,KAAG,OAAO;;;EAuBhD"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Hook to access only the consent actions without state
3
+ */
4
+ export declare function useConsentActions(): {
5
+ acceptAll: () => void;
6
+ rejectAll: () => void;
7
+ savePreferences: (preferences: Partial<import("@/contexts/ConsentContext").ConsentCategories>) => void;
8
+ openSettings: () => void;
9
+ closeSettings: () => void;
10
+ updateConsent: (category: keyof import("@/contexts/ConsentContext").ConsentCategories, value: boolean) => void;
11
+ };
12
+ //# sourceMappingURL=useConsentActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConsentActions.d.ts","sourceRoot":"","sources":["../../src/hooks/useConsentActions.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,iBAAiB;;;;;;;EAkBhC"}
@@ -0,0 +1,14 @@
1
+ import { useConsent } from '@/contexts/ConsentContext';
2
+ type ConsentEventType = 'consent:accepted' | 'consent:rejected' | 'consent:updated' | 'banner:shown' | 'banner:hidden' | 'settings:opened' | 'settings:closed';
3
+ type ConsentEventListener = (data?: any) => void;
4
+ interface ConsentEventManager {
5
+ on: (event: ConsentEventType, listener: ConsentEventListener) => () => void;
6
+ off: (event: ConsentEventType, listener: ConsentEventListener) => void;
7
+ emit: (event: ConsentEventType, data?: any) => void;
8
+ }
9
+ /**
10
+ * Advanced hook that provides event-driven consent management
11
+ */
12
+ export declare function useConsentManager(): ConsentEventManager & ReturnType<typeof useConsent>;
13
+ export {};
14
+ //# sourceMappingURL=useConsentManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConsentManager.d.ts","sourceRoot":"","sources":["../../src/hooks/useConsentManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,KAAK,gBAAgB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,iBAAiB,CAAC;AAEtB,KAAK,oBAAoB,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAEjD,UAAU,mBAAmB;IAC3B,EAAE,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,KAAK,MAAM,IAAI,CAAC;IAC5E,GAAG,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACvE,IAAI,EAAE,CAAC,KAAK,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CACrD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,mBAAmB,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CA4FvF"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Hook to access only the consent state without actions
3
+ */
4
+ export declare function useConsentState(): {
5
+ hasUserConsented: boolean;
6
+ consentState: import("@/contexts/ConsentContext").ConsentCategories;
7
+ showBanner: boolean;
8
+ showSettings: boolean;
9
+ };
10
+ //# sourceMappingURL=useConsentState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useConsentState.d.ts","sourceRoot":"","sources":["../../src/hooks/useConsentState.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,eAAe;;;;;EAS9B"}
@@ -0,0 +1,256 @@
1
+ import React$1, { ReactNode } from 'react';
2
+ export { ConsentBanner as UnstyledConsentBanner, ConsentSettings as UnstyledConsentSettings, ConsentToggle as UnstyledConsentToggle } from './unstyled.mjs';
3
+
4
+ interface ConsentCategories {
5
+ necessary: boolean;
6
+ analytics: boolean;
7
+ marketing: boolean;
8
+ functional: boolean;
9
+ [key: string]: boolean;
10
+ }
11
+ interface ConsentState$1 {
12
+ hasUserConsented: boolean;
13
+ consentState: ConsentCategories;
14
+ showBanner: boolean;
15
+ showSettings: boolean;
16
+ }
17
+ interface ConsentActions$1 {
18
+ acceptAll: () => void;
19
+ rejectAll: () => void;
20
+ savePreferences: (preferences: Partial<ConsentCategories>) => void;
21
+ openSettings: () => void;
22
+ closeSettings: () => void;
23
+ updateConsent: (category: keyof ConsentCategories, value: boolean) => void;
24
+ }
25
+ interface ConsentContextValue$1 extends ConsentState$1, ConsentActions$1 {
26
+ }
27
+ declare const ConsentContext: React$1.Context<ConsentContextValue$1 | undefined>;
28
+ interface ConsentProviderProps$1 {
29
+ children: ReactNode;
30
+ initialConsent?: Partial<ConsentCategories>;
31
+ onConsentChange?: (consent: ConsentCategories) => void;
32
+ storageKey?: string;
33
+ }
34
+ declare function ConsentProvider({ children, initialConsent, onConsentChange, storageKey, }: ConsentProviderProps$1): React$1.JSX.Element;
35
+ declare function useConsent(): ConsentContextValue$1;
36
+
37
+ /**
38
+ * Base consent categories interface that can be extended
39
+ */
40
+ interface BaseConsentCategories {
41
+ necessary: boolean;
42
+ [key: string]: boolean;
43
+ }
44
+ /**
45
+ * Default consent categories provided by the toolkit
46
+ */
47
+ interface DefaultConsentCategories extends BaseConsentCategories {
48
+ necessary: boolean;
49
+ analytics: boolean;
50
+ marketing: boolean;
51
+ functional: boolean;
52
+ }
53
+ /**
54
+ * Generic consent state interface
55
+ */
56
+ interface ConsentState<T extends BaseConsentCategories = DefaultConsentCategories> {
57
+ hasUserConsented: boolean;
58
+ consentState: T;
59
+ showBanner: boolean;
60
+ showSettings: boolean;
61
+ }
62
+ /**
63
+ * Generic consent actions interface
64
+ */
65
+ interface ConsentActions<T extends BaseConsentCategories = DefaultConsentCategories> {
66
+ acceptAll: () => void;
67
+ rejectAll: () => void;
68
+ savePreferences: (preferences: Partial<T>) => void;
69
+ openSettings: () => void;
70
+ closeSettings: () => void;
71
+ updateConsent: (category: keyof T, value: boolean) => void;
72
+ }
73
+ /**
74
+ * Combined consent context value
75
+ */
76
+ interface ConsentContextValue<T extends BaseConsentCategories = DefaultConsentCategories> extends ConsentState<T>, ConsentActions<T> {
77
+ }
78
+ /**
79
+ * Consent provider props with generic support
80
+ */
81
+ interface ConsentProviderProps<T extends BaseConsentCategories = DefaultConsentCategories> {
82
+ children: React.ReactNode;
83
+ initialConsent?: Partial<T>;
84
+ onConsentChange?: (consent: T) => void;
85
+ storageKey?: string;
86
+ categories?: Array<{
87
+ id: keyof T;
88
+ name: string;
89
+ description: string;
90
+ required?: boolean;
91
+ }>;
92
+ }
93
+
94
+ /**
95
+ * Factory function to create a typed consent context
96
+ */
97
+ declare function createConsentContext<T extends BaseConsentCategories = DefaultConsentCategories>(): {
98
+ ConsentContext: React$1.Context<ConsentContextValue<T> | undefined>;
99
+ ConsentProvider: ({ children, initialConsent, onConsentChange, storageKey, categories, }: ConsentProviderProps<T>) => React$1.JSX.Element;
100
+ useConsent: () => ConsentContextValue<T>;
101
+ };
102
+
103
+ interface ConsentBannerProps {
104
+ renderBanner?: (props: BannerProps) => ReactNode;
105
+ theme?: {
106
+ primaryColor?: string;
107
+ textColor?: string;
108
+ backgroundColor?: string;
109
+ };
110
+ position?: 'top' | 'bottom' | 'center';
111
+ animation?: 'slide' | 'fade' | 'none';
112
+ fullWidth?: boolean;
113
+ maxWidth?: string;
114
+ unstyled?: boolean;
115
+ className?: string;
116
+ children?: ReactNode;
117
+ }
118
+ interface ConsentBannerComponent extends React$1.FC<ConsentBannerProps> {
119
+ Message: React$1.FC<{
120
+ children: ReactNode;
121
+ className?: string;
122
+ }>;
123
+ Actions: React$1.FC<{
124
+ children: ReactNode;
125
+ className?: string;
126
+ }>;
127
+ }
128
+ declare const ConsentBanner: ConsentBannerComponent;
129
+
130
+ interface ConsentSettingsProps {
131
+ renderSettings?: (props: SettingsProps) => ReactNode;
132
+ theme?: {
133
+ primaryColor?: string;
134
+ textColor?: string;
135
+ backgroundColor?: string;
136
+ };
137
+ unstyled?: boolean;
138
+ className?: string;
139
+ children?: ReactNode;
140
+ }
141
+ declare const ConsentSettings: React$1.FC<ConsentSettingsProps>;
142
+
143
+ interface BannerProps {
144
+ onAcceptAll: () => void;
145
+ onRejectAll: () => void;
146
+ onOpenSettings: () => void;
147
+ }
148
+ interface SettingsProps {
149
+ consentState: ConsentCategories;
150
+ onUpdateConsent: (category: keyof ConsentCategories, value: boolean) => void;
151
+ onSave: () => void;
152
+ onClose: () => void;
153
+ }
154
+ interface RenderProps {
155
+ consents: ConsentCategories;
156
+ actions: ConsentActions$1;
157
+ ui: {
158
+ showBanner: boolean;
159
+ showSettings: boolean;
160
+ openSettings: () => void;
161
+ closeSettings: () => void;
162
+ };
163
+ }
164
+ interface ConsentManagerProps extends Omit<ConsentProviderProps$1, 'children'> {
165
+ children?: ReactNode | ((props: RenderProps) => ReactNode);
166
+ headless?: boolean;
167
+ renderBanner?: (props: BannerProps) => ReactNode;
168
+ renderSettings?: (props: SettingsProps) => ReactNode;
169
+ components?: {
170
+ Banner?: React$1.ComponentType<any>;
171
+ Settings?: React$1.ComponentType<any>;
172
+ };
173
+ theme?: {
174
+ primaryColor?: string;
175
+ textColor?: string;
176
+ backgroundColor?: string;
177
+ };
178
+ position?: 'top' | 'bottom' | 'center';
179
+ animation?: 'slide' | 'fade' | 'none';
180
+ fullWidth?: boolean;
181
+ maxWidth?: string;
182
+ }
183
+ interface ConsentManagerComponent extends React$1.FC<ConsentManagerProps> {
184
+ Banner: typeof ConsentBanner;
185
+ Settings: typeof ConsentSettings;
186
+ }
187
+ declare const ConsentManager: ConsentManagerComponent;
188
+
189
+ /**
190
+ * Hook to access only the consent state without actions
191
+ */
192
+ declare function useConsentState(): {
193
+ hasUserConsented: boolean;
194
+ consentState: ConsentCategories;
195
+ showBanner: boolean;
196
+ showSettings: boolean;
197
+ };
198
+
199
+ /**
200
+ * Hook to access only the consent actions without state
201
+ */
202
+ declare function useConsentActions(): {
203
+ acceptAll: () => void;
204
+ rejectAll: () => void;
205
+ savePreferences: (preferences: Partial<ConsentCategories>) => void;
206
+ openSettings: () => void;
207
+ closeSettings: () => void;
208
+ updateConsent: (category: keyof ConsentCategories, value: boolean) => void;
209
+ };
210
+
211
+ type ConsentEventType = 'consent:accepted' | 'consent:rejected' | 'consent:updated' | 'banner:shown' | 'banner:hidden' | 'settings:opened' | 'settings:closed';
212
+ type ConsentEventListener = (data?: any) => void;
213
+ interface ConsentEventManager {
214
+ on: (event: ConsentEventType, listener: ConsentEventListener) => () => void;
215
+ off: (event: ConsentEventType, listener: ConsentEventListener) => void;
216
+ emit: (event: ConsentEventType, data?: any) => void;
217
+ }
218
+ /**
219
+ * Advanced hook that provides event-driven consent management
220
+ */
221
+ declare function useConsentManager(): ConsentEventManager & ReturnType<typeof useConsent>;
222
+
223
+ type ConsentType = 'necessary' | 'functional' | 'analytics' | 'marketing';
224
+ interface ConsentRecord {
225
+ id: string;
226
+ userId?: string;
227
+ consents: Record<ConsentType, boolean>;
228
+ timestamp: string;
229
+ ipAddress?: string;
230
+ userAgent?: string;
231
+ }
232
+ interface ConsentHistoryEntry extends ConsentRecord {
233
+ changeReason?: string;
234
+ }
235
+
236
+ declare const consentService: {
237
+ saveConsent: (consents: Record<ConsentType, boolean>, userId?: string) => ConsentRecord;
238
+ getCurrentConsent: () => ConsentRecord | null;
239
+ getConsentHistory: () => ConsentHistoryEntry[];
240
+ updateConsent: (consents: Record<ConsentType, boolean>, changeReason?: string, userId?: string) => ConsentRecord;
241
+ clearConsentData: () => void;
242
+ hasConsent: (type: ConsentType) => boolean;
243
+ };
244
+
245
+ declare const cookieUtils: {
246
+ set: (name: string, value: string, days: number) => void;
247
+ get: (name: string) => string | null;
248
+ delete: (name: string) => void;
249
+ };
250
+ declare const consentStorage: {
251
+ save: (key: string, data: any) => void;
252
+ load: (key: string) => any | null;
253
+ remove: (key: string) => void;
254
+ };
255
+
256
+ export { type BannerProps, type BaseConsentCategories, type ConsentActions$1 as ConsentActions, ConsentBanner, type ConsentCategories, ConsentContext, type ConsentContextValue$1 as ConsentContextValue, ConsentManager, type ConsentManagerProps, ConsentProvider, type ConsentProviderProps, ConsentSettings, type ConsentState$1 as ConsentState, type DefaultConsentCategories, type RenderProps, type SettingsProps, consentService, consentStorage, cookieUtils, createConsentContext, useConsent, useConsentActions, useConsentManager, useConsentState };
@@ -0,0 +1,24 @@
1
+ export { ConsentProvider, useConsent, ConsentContext } from './contexts/ConsentContext';
2
+ export type { ConsentCategories, ConsentState, ConsentActions, ConsentContextValue } from './contexts/ConsentContext';
3
+ export { createConsentContext } from './contexts/GenericConsentContext';
4
+ export type { BaseConsentCategories, DefaultConsentCategories, ConsentProviderProps, } from './types/consent';
5
+ export { ConsentManager } from './components/consent/ConsentManager';
6
+ export { ConsentBanner } from './components/consent/ConsentBanner';
7
+ export { ConsentSettings } from './components/consent/ConsentSettings';
8
+ export type { ConsentManagerProps, BannerProps, SettingsProps, RenderProps } from './components/consent/ConsentManager';
9
+ export { UnstyledConsentBanner, UnstyledConsentSettings, UnstyledConsentToggle, } from './components/consent/unstyled';
10
+ export { useConsentState } from './hooks/useConsentState';
11
+ export { useConsentActions } from './hooks/useConsentActions';
12
+ export { useConsentManager } from './hooks/useConsentManager';
13
+ export { consentService } from './lib/consentService';
14
+ export declare const cookieUtils: {
15
+ set: (name: string, value: string, days: number) => void;
16
+ get: (name: string) => string | null;
17
+ delete: (name: string) => void;
18
+ };
19
+ export declare const consentStorage: {
20
+ save: (key: string, data: any) => void;
21
+ load: (key: string) => any | null;
22
+ remove: (key: string) => void;
23
+ };
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACxF,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAGtH,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,YAAY,EACV,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAGxH,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,eAAO,MAAM,WAAW;gBACV,MAAM,SAAS,MAAM,QAAQ,MAAM;gBAOnC,MAAM,KAAG,MAAM,GAAG,IAAI;mBAWnB,MAAM;CAItB,CAAC;AAGF,eAAO,MAAM,cAAc;gBACb,MAAM,QAAQ,GAAG;gBAIjB,MAAM,KAAG,GAAG,GAAG,IAAI;kBAKjB,MAAM;CAIrB,CAAC"}