@c15t/react 2.0.0-rc.0 → 2.0.0-rc.10

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 (715) hide show
  1. package/README.md +12 -3
  2. package/client/components/consent-banner.js +4 -0
  3. package/client/components/consent-dialog-link.js +3 -0
  4. package/client/components/consent-dialog-trigger.js +3 -0
  5. package/client/components/consent-dialog.js +4 -0
  6. package/client/components/consent-widget.js +4 -0
  7. package/client/components/frame.js +3 -0
  8. package/dist/components/consent-banner/atoms/overlay.cjs +1 -1
  9. package/dist/components/consent-banner/atoms/overlay.js +1 -1
  10. package/dist/components/consent-banner/atoms/root.cjs +1 -1
  11. package/dist/components/consent-banner/atoms/root.js +1 -1
  12. package/dist/components/consent-banner/components.cjs +1 -1
  13. package/dist/components/consent-banner/components.js +1 -1
  14. package/dist/components/consent-banner/consent-banner.cjs +1 -1
  15. package/dist/components/consent-banner/consent-banner.js +1 -1
  16. package/dist/components/consent-banner/error-boundary.cjs +1 -1
  17. package/dist/components/consent-banner/index.cjs +1 -1
  18. package/dist/components/consent-banner/index.js +1 -1
  19. package/dist/components/consent-banner/policy-actions.cjs +1 -0
  20. package/dist/components/consent-banner/policy-actions.js +1 -0
  21. package/dist/components/consent-dialog/atoms/card.cjs +1 -1
  22. package/dist/components/consent-dialog/atoms/card.js +1 -1
  23. package/dist/components/consent-dialog/atoms/overlay.cjs +1 -1
  24. package/dist/components/consent-dialog/atoms/overlay.js +1 -1
  25. package/dist/components/consent-dialog/atoms/root.cjs +1 -1
  26. package/dist/components/consent-dialog/atoms/root.js +1 -1
  27. package/dist/components/consent-dialog/consent-dialog.cjs +1 -1
  28. package/dist/components/consent-dialog/consent-dialog.js +1 -1
  29. package/dist/components/consent-dialog/index.cjs +1 -1
  30. package/dist/components/consent-dialog/index.js +1 -1
  31. package/dist/components/consent-dialog-link/index.cjs +1 -0
  32. package/dist/components/consent-dialog-link/index.js +1 -0
  33. package/dist/components/consent-dialog-trigger/atoms/button.cjs +1 -1
  34. package/dist/components/consent-dialog-trigger/atoms/button.js +1 -1
  35. package/dist/components/consent-dialog-trigger/atoms/icon.cjs +1 -1
  36. package/dist/components/consent-dialog-trigger/atoms/icon.js +1 -1
  37. package/dist/components/consent-dialog-trigger/atoms/root.cjs +1 -1
  38. package/dist/components/consent-dialog-trigger/atoms/root.js +1 -1
  39. package/dist/components/consent-dialog-trigger/atoms/text.cjs +1 -1
  40. package/dist/components/consent-dialog-trigger/atoms/text.js +1 -1
  41. package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +1 -1
  42. package/dist/components/consent-dialog-trigger/consent-dialog-trigger.js +1 -1
  43. package/dist/components/consent-dialog-trigger/index.cjs +1 -1
  44. package/dist/components/consent-dialog-trigger/index.js +1 -1
  45. package/dist/components/consent-dialog-trigger/types.cjs +1 -1
  46. package/dist/components/consent-dialog-trigger/use-draggable.cjs +1 -1
  47. package/dist/components/consent-dialog-trigger/use-draggable.js +1 -1
  48. package/dist/components/consent-preferences-link/consent-preferences-link.cjs +1 -0
  49. package/dist/components/consent-preferences-link/consent-preferences-link.js +1 -0
  50. package/dist/components/consent-preferences-link/index.cjs +1 -0
  51. package/dist/components/consent-preferences-link/index.js +1 -0
  52. package/dist/components/consent-widget/atoms/accordion.cjs +1 -1
  53. package/dist/components/consent-widget/atoms/accordion.js +1 -1
  54. package/dist/components/consent-widget/atoms/button.cjs +1 -1
  55. package/dist/components/consent-widget/atoms/button.js +1 -1
  56. package/dist/components/consent-widget/atoms/footer.cjs +1 -1
  57. package/dist/components/consent-widget/atoms/footer.js +1 -1
  58. package/dist/components/consent-widget/atoms/root.cjs +1 -1
  59. package/dist/components/consent-widget/atoms/root.js +1 -1
  60. package/dist/components/consent-widget/consent-widget.cjs +1 -1
  61. package/dist/components/consent-widget/consent-widget.js +1 -1
  62. package/dist/components/consent-widget/index.cjs +1 -1
  63. package/dist/components/consent-widget/index.js +1 -1
  64. package/dist/components/consent-widget/policy-actions.cjs +1 -0
  65. package/dist/components/consent-widget/policy-actions.js +1 -0
  66. package/dist/components/consent-widget/types.cjs +1 -1
  67. package/dist/components/frame/atoms.cjs +1 -1
  68. package/dist/components/frame/atoms.js +1 -1
  69. package/dist/components/frame/frame.cjs +1 -1
  70. package/dist/components/frame/frame.js +1 -1
  71. package/dist/components/frame/index.cjs +1 -1
  72. package/dist/components/frame/index.js +1 -1
  73. package/dist/components/frame/types.cjs +1 -1
  74. package/dist/components/iab-consent-banner/atoms/button-group.cjs +1 -1
  75. package/dist/components/iab-consent-banner/atoms/button-group.js +1 -1
  76. package/dist/components/iab-consent-banner/atoms/card.cjs +1 -1
  77. package/dist/components/iab-consent-banner/atoms/card.js +1 -1
  78. package/dist/components/iab-consent-banner/atoms/description.cjs +1 -1
  79. package/dist/components/iab-consent-banner/atoms/description.js +1 -1
  80. package/dist/components/iab-consent-banner/atoms/footer.cjs +1 -1
  81. package/dist/components/iab-consent-banner/atoms/footer.js +1 -1
  82. package/dist/components/iab-consent-banner/atoms/header.cjs +1 -1
  83. package/dist/components/iab-consent-banner/atoms/header.js +1 -1
  84. package/dist/components/iab-consent-banner/atoms/overlay.cjs +1 -1
  85. package/dist/components/iab-consent-banner/atoms/overlay.js +1 -1
  86. package/dist/components/iab-consent-banner/atoms/root.cjs +1 -1
  87. package/dist/components/iab-consent-banner/atoms/root.js +1 -1
  88. package/dist/components/iab-consent-banner/atoms/title.cjs +1 -1
  89. package/dist/components/iab-consent-banner/atoms/title.js +1 -1
  90. package/dist/components/iab-consent-banner/iab-consent-banner.cjs +1 -1
  91. package/dist/components/iab-consent-banner/iab-consent-banner.js +1 -1
  92. package/dist/components/iab-consent-banner/index.cjs +1 -1
  93. package/dist/components/iab-consent-banner/index.js +1 -1
  94. package/dist/components/iab-consent-dialog/atoms/card.cjs +1 -1
  95. package/dist/components/iab-consent-dialog/atoms/card.js +1 -1
  96. package/dist/components/iab-consent-dialog/atoms/content.cjs +1 -1
  97. package/dist/components/iab-consent-dialog/atoms/content.js +1 -1
  98. package/dist/components/iab-consent-dialog/atoms/footer.cjs +1 -1
  99. package/dist/components/iab-consent-dialog/atoms/footer.js +1 -1
  100. package/dist/components/iab-consent-dialog/atoms/header.cjs +1 -1
  101. package/dist/components/iab-consent-dialog/atoms/header.js +1 -1
  102. package/dist/components/iab-consent-dialog/atoms/overlay.cjs +1 -1
  103. package/dist/components/iab-consent-dialog/atoms/overlay.js +1 -1
  104. package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +1 -1
  105. package/dist/components/iab-consent-dialog/atoms/purpose-item.js +1 -1
  106. package/dist/components/iab-consent-dialog/atoms/root.cjs +1 -1
  107. package/dist/components/iab-consent-dialog/atoms/root.js +1 -1
  108. package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +1 -1
  109. package/dist/components/iab-consent-dialog/atoms/stack-item.js +1 -1
  110. package/dist/components/iab-consent-dialog/atoms/tabs.cjs +1 -1
  111. package/dist/components/iab-consent-dialog/atoms/tabs.js +1 -1
  112. package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +1 -1
  113. package/dist/components/iab-consent-dialog/atoms/vendor-list.js +1 -1
  114. package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +1 -1
  115. package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +1 -1
  116. package/dist/components/iab-consent-dialog/iab-consent-dialog.js +1 -1
  117. package/dist/components/iab-consent-dialog/index.cjs +1 -1
  118. package/dist/components/iab-consent-dialog/index.js +1 -1
  119. package/dist/components/iab-consent-dialog/types.cjs +1 -1
  120. package/dist/components/iab-consent-dialog/use-iab-translations.cjs +1 -1
  121. package/dist/components/shared/libs/polymorphic.cjs +1 -1
  122. package/dist/components/shared/libs/recursive-clone-children.cjs +1 -1
  123. package/dist/components/shared/libs/slot.cjs +1 -0
  124. package/dist/components/shared/libs/slot.js +1 -0
  125. package/dist/components/shared/libs/use-controllable-state.cjs +1 -0
  126. package/dist/components/shared/libs/use-controllable-state.js +1 -0
  127. package/dist/components/shared/policy-actions.cjs +1 -0
  128. package/dist/components/shared/policy-actions.js +1 -0
  129. package/dist/components/shared/primitives/box.cjs +1 -1
  130. package/dist/components/shared/primitives/box.js +1 -1
  131. package/dist/components/shared/primitives/button.cjs +1 -1
  132. package/dist/components/shared/primitives/button.js +1 -1
  133. package/dist/components/shared/primitives/button.types.cjs +1 -1
  134. package/dist/components/shared/primitives/legal-links/index.cjs +1 -1
  135. package/dist/components/shared/primitives/legal-links/index.js +1 -1
  136. package/dist/components/shared/ui/accordion/accordion.cjs +1 -1
  137. package/dist/components/shared/ui/accordion/accordion.js +1 -1
  138. package/dist/components/shared/ui/accordion/accordion.types.cjs +1 -1
  139. package/dist/components/shared/ui/accordion/index.cjs +1 -1
  140. package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +1 -1
  141. package/dist/components/shared/ui/animated-collapse/index.cjs +1 -1
  142. package/dist/components/shared/ui/animated-collapse/index.js +1 -1
  143. package/dist/components/shared/ui/branding.cjs +1 -0
  144. package/dist/components/shared/ui/branding.js +1 -0
  145. package/dist/components/shared/ui/button/button.cjs +1 -1
  146. package/dist/components/shared/ui/button/button.js +1 -1
  147. package/dist/components/shared/ui/button/button.types.cjs +1 -1
  148. package/dist/components/shared/ui/button/index.cjs +1 -1
  149. package/dist/components/shared/ui/collapsible/collapsible.cjs +1 -0
  150. package/dist/components/shared/ui/collapsible/collapsible.js +1 -0
  151. package/dist/components/shared/ui/collapsible/index.cjs +1 -0
  152. package/dist/components/shared/ui/collapsible/index.js +1 -0
  153. package/dist/components/shared/ui/dialog/dialog.cjs +1 -0
  154. package/dist/components/shared/ui/dialog/dialog.js +1 -0
  155. package/dist/components/shared/ui/dialog/index.cjs +1 -0
  156. package/dist/components/shared/ui/dialog/index.js +1 -0
  157. package/dist/components/shared/ui/icon.cjs +1 -1
  158. package/dist/components/shared/ui/logo.cjs +1 -1
  159. package/dist/components/shared/ui/logo.js +1 -1
  160. package/dist/components/shared/ui/preference-item/index.cjs +1 -0
  161. package/dist/components/shared/ui/preference-item/index.js +1 -0
  162. package/dist/components/shared/ui/preference-item/preference-item.cjs +1 -0
  163. package/dist/components/shared/ui/preference-item/preference-item.js +1 -0
  164. package/dist/components/shared/ui/switch/index.cjs +1 -1
  165. package/dist/components/shared/ui/switch/index.js +1 -1
  166. package/dist/components/shared/ui/switch/switch.cjs +1 -1
  167. package/dist/components/shared/ui/switch/switch.js +1 -1
  168. package/dist/components/shared/ui/switch/switch.types.cjs +1 -1
  169. package/dist/components/shared/ui/tabs/index.cjs +1 -0
  170. package/dist/components/shared/ui/tabs/index.js +1 -0
  171. package/dist/components/shared/ui/tabs/tabs.cjs +1 -0
  172. package/dist/components/shared/ui/tabs/tabs.js +1 -0
  173. package/dist/context/consent-manager-context.cjs +1 -1
  174. package/dist/context/consent-tracking-context.cjs +1 -1
  175. package/dist/context/theme-context.cjs +1 -1
  176. package/dist/headless.cjs +1 -1
  177. package/dist/headless.js +1 -1
  178. package/dist/hooks/index.cjs +1 -1
  179. package/dist/hooks/index.js +1 -1
  180. package/dist/hooks/use-color-scheme.cjs +1 -1
  181. package/dist/hooks/use-component-config.cjs +1 -1
  182. package/dist/hooks/use-consent-dialog-trigger.cjs +1 -0
  183. package/dist/hooks/use-consent-dialog-trigger.js +1 -0
  184. package/dist/hooks/use-consent-manager.cjs +1 -1
  185. package/dist/hooks/use-consent-manager.js +1 -1
  186. package/dist/hooks/use-focus-trap.cjs +1 -1
  187. package/dist/hooks/use-focus-trap.js +1 -1
  188. package/dist/hooks/use-headless-consent-ui.cjs +1 -0
  189. package/dist/hooks/use-headless-consent-ui.js +1 -0
  190. package/dist/hooks/use-headless-iab-consent-ui.cjs +1 -0
  191. package/dist/hooks/use-headless-iab-consent-ui.js +1 -0
  192. package/dist/hooks/use-reduced-motion.cjs +1 -1
  193. package/dist/hooks/use-reduced-motion.js +1 -1
  194. package/dist/hooks/use-scroll-lock.cjs +1 -1
  195. package/dist/hooks/use-scroll-lock.js +1 -1
  196. package/dist/hooks/use-ssr-status.cjs +1 -1
  197. package/dist/hooks/use-styles.cjs +1 -1
  198. package/dist/hooks/use-text-direction.cjs +1 -1
  199. package/dist/hooks/use-theme.cjs +1 -1
  200. package/dist/hooks/use-theme.js +1 -1
  201. package/dist/hooks/use-translations.cjs +1 -1
  202. package/dist/iab/styles.css +11 -0
  203. package/dist/iab/styles.tw3.css +14 -0
  204. package/dist/iab.cjs +1 -0
  205. package/dist/iab.js +1 -0
  206. package/dist/index.cjs +1 -1
  207. package/dist/index.js +1 -1
  208. package/dist/primitives/accordion.cjs +1 -0
  209. package/dist/primitives/accordion.js +1 -0
  210. package/dist/primitives/button.cjs +1 -0
  211. package/dist/primitives/button.js +1 -0
  212. package/dist/primitives/collapsible.cjs +1 -0
  213. package/dist/primitives/collapsible.js +1 -0
  214. package/dist/primitives/dialog.cjs +1 -0
  215. package/dist/primitives/dialog.js +1 -0
  216. package/dist/primitives/preference-item.cjs +1 -0
  217. package/dist/primitives/preference-item.js +1 -0
  218. package/dist/primitives/switch.cjs +1 -0
  219. package/dist/primitives/switch.js +1 -0
  220. package/dist/primitives/tabs.cjs +1 -0
  221. package/dist/primitives/tabs.js +1 -0
  222. package/dist/primitives.cjs +1 -0
  223. package/dist/primitives.js +1 -0
  224. package/dist/providers/consent-manager-provider.cjs +1 -1
  225. package/dist/providers/consent-manager-provider.js +1 -1
  226. package/dist/server/fetch-ssr-data.cjs +1 -1
  227. package/dist/server/fetch-ssr-data.js +1 -1
  228. package/dist/server/headers.cjs +1 -1
  229. package/dist/server/headers.js +1 -1
  230. package/dist/server/index.cjs +1 -1
  231. package/dist/server/index.js +1 -1
  232. package/dist/server/init-cache-key.cjs +1 -0
  233. package/dist/server/init-cache-key.js +1 -0
  234. package/dist/server/normalize-url.cjs +1 -1
  235. package/dist/server/types.cjs +1 -1
  236. package/dist/styles.css +10 -0
  237. package/dist/styles.tw3.css +13 -0
  238. package/dist/types/consent-manager.cjs +1 -1
  239. package/dist/types/theme/index.cjs +1 -1
  240. package/dist/types/theme/style-keys.cjs +1 -1
  241. package/dist/types/theme/style-types.cjs +1 -1
  242. package/dist/utils/cn.cjs +1 -1
  243. package/dist/utils/merge-styles.cjs +1 -1
  244. package/dist/utils/test-helpers.cjs +1 -1
  245. package/dist/utils/test-helpers.js +1 -1
  246. package/dist/utils/theme-utils.cjs +1 -1
  247. package/dist/version.cjs +1 -1
  248. package/dist/version.js +1 -1
  249. package/{dist → dist-types}/components/consent-banner/atoms/overlay.d.ts +1 -2
  250. package/{dist → dist-types}/components/consent-banner/atoms/root.d.ts +44 -14
  251. package/{dist → dist-types}/components/consent-banner/components.d.ts +4 -5
  252. package/{dist → dist-types}/components/consent-banner/consent-banner.d.ts +14 -8
  253. package/{dist → dist-types}/components/consent-banner/error-boundary.d.ts +0 -1
  254. package/{dist → dist-types}/components/consent-banner/index.d.ts +48 -26
  255. package/dist-types/components/consent-banner/policy-actions.d.ts +11 -0
  256. package/{dist → dist-types}/components/consent-dialog/atoms/card.d.ts +14 -8
  257. package/{dist → dist-types}/components/consent-dialog/atoms/overlay.d.ts +1 -2
  258. package/{dist → dist-types}/components/consent-dialog/atoms/root.d.ts +1 -2
  259. package/{dist → dist-types}/components/consent-dialog/consent-dialog.d.ts +2 -3
  260. package/{dist → dist-types}/components/consent-dialog/index.d.ts +31 -10
  261. package/dist-types/components/consent-dialog-link/index.d.ts +1 -0
  262. package/{dist → dist-types}/components/consent-dialog-trigger/atoms/button.d.ts +0 -1
  263. package/{dist → dist-types}/components/consent-dialog-trigger/atoms/icon.d.ts +1 -2
  264. package/{dist → dist-types}/components/consent-dialog-trigger/atoms/root.d.ts +0 -1
  265. package/{dist → dist-types}/components/consent-dialog-trigger/atoms/text.d.ts +0 -1
  266. package/{dist → dist-types}/components/consent-dialog-trigger/consent-dialog-trigger.d.ts +2 -3
  267. package/{dist → dist-types}/components/consent-dialog-trigger/index.d.ts +0 -1
  268. package/{dist → dist-types}/components/consent-dialog-trigger/types.d.ts +2 -3
  269. package/{dist → dist-types}/components/consent-dialog-trigger/use-draggable.d.ts +1 -2
  270. package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +15 -0
  271. package/dist-types/components/consent-preferences-link/index.d.ts +1 -0
  272. package/dist-types/components/consent-widget/atoms/accordion.d.ts +28 -0
  273. package/{dist → dist-types}/components/consent-widget/atoms/button.d.ts +1 -2
  274. package/{dist → dist-types}/components/consent-widget/atoms/footer.d.ts +0 -1
  275. package/{dist → dist-types}/components/consent-widget/atoms/root.d.ts +1 -7
  276. package/{dist → dist-types}/components/consent-widget/consent-widget.d.ts +0 -1
  277. package/{dist → dist-types}/components/consent-widget/index.d.ts +27 -8
  278. package/dist-types/components/consent-widget/policy-actions.d.ts +11 -0
  279. package/{dist → dist-types}/components/consent-widget/types.d.ts +2 -3
  280. package/{dist → dist-types}/components/frame/atoms.d.ts +1 -2
  281. package/{dist → dist-types}/components/frame/frame.d.ts +0 -1
  282. package/{dist → dist-types}/components/frame/index.d.ts +1 -2
  283. package/{dist → dist-types}/components/frame/types.d.ts +0 -1
  284. package/{dist → dist-types}/components/iab-consent-banner/atoms/button-group.d.ts +0 -1
  285. package/{dist → dist-types}/components/iab-consent-banner/atoms/card.d.ts +0 -1
  286. package/{dist → dist-types}/components/iab-consent-banner/atoms/description.d.ts +0 -1
  287. package/{dist → dist-types}/components/iab-consent-banner/atoms/footer.d.ts +0 -1
  288. package/{dist → dist-types}/components/iab-consent-banner/atoms/header.d.ts +0 -1
  289. package/{dist → dist-types}/components/iab-consent-banner/atoms/overlay.d.ts +0 -1
  290. package/{dist → dist-types}/components/iab-consent-banner/atoms/root.d.ts +0 -1
  291. package/{dist → dist-types}/components/iab-consent-banner/atoms/title.d.ts +0 -1
  292. package/{dist → dist-types}/components/iab-consent-banner/iab-consent-banner.d.ts +0 -1
  293. package/{dist → dist-types}/components/iab-consent-banner/index.d.ts +1 -2
  294. package/{dist → dist-types}/components/iab-consent-dialog/atoms/card.d.ts +0 -1
  295. package/{dist → dist-types}/components/iab-consent-dialog/atoms/content.d.ts +0 -1
  296. package/{dist → dist-types}/components/iab-consent-dialog/atoms/footer.d.ts +0 -1
  297. package/{dist → dist-types}/components/iab-consent-dialog/atoms/header.d.ts +0 -1
  298. package/{dist → dist-types}/components/iab-consent-dialog/atoms/overlay.d.ts +0 -1
  299. package/{dist → dist-types}/components/iab-consent-dialog/atoms/purpose-item.d.ts +0 -1
  300. package/{dist → dist-types}/components/iab-consent-dialog/atoms/root.d.ts +0 -1
  301. package/{dist → dist-types}/components/iab-consent-dialog/atoms/stack-item.d.ts +0 -1
  302. package/dist-types/components/iab-consent-dialog/atoms/tabs.d.ts +12 -0
  303. package/{dist → dist-types}/components/iab-consent-dialog/atoms/vendor-list.d.ts +0 -1
  304. package/{dist → dist-types}/components/iab-consent-dialog/hooks/use-gvl-data.d.ts +0 -1
  305. package/{dist → dist-types}/components/iab-consent-dialog/iab-consent-dialog.d.ts +0 -1
  306. package/{dist → dist-types}/components/iab-consent-dialog/index.d.ts +1 -2
  307. package/{dist → dist-types}/components/iab-consent-dialog/types.d.ts +0 -1
  308. package/{dist → dist-types}/components/iab-consent-dialog/use-iab-translations.d.ts +0 -1
  309. package/{dist → dist-types}/components/shared/libs/polymorphic.d.ts +0 -1
  310. package/{dist → dist-types}/components/shared/libs/recursive-clone-children.d.ts +0 -1
  311. package/dist-types/components/shared/libs/slot.d.ts +6 -0
  312. package/dist-types/components/shared/libs/use-controllable-state.d.ts +7 -0
  313. package/dist-types/components/shared/policy-actions.d.ts +29 -0
  314. package/{dist → dist-types}/components/shared/primitives/box.d.ts +0 -1
  315. package/{dist → dist-types}/components/shared/primitives/button.d.ts +4 -1
  316. package/{dist → dist-types}/components/shared/primitives/button.types.d.ts +17 -1
  317. package/{dist → dist-types}/components/shared/primitives/legal-links/index.d.ts +0 -45
  318. package/{dist → dist-types}/components/shared/ui/accordion/accordion.d.ts +32 -68
  319. package/{dist → dist-types}/components/shared/ui/accordion/accordion.types.d.ts +0 -1
  320. package/{dist → dist-types}/components/shared/ui/accordion/index.d.ts +0 -1
  321. package/{dist → dist-types}/components/shared/ui/animated-collapse/animated-collapse.d.ts +0 -1
  322. package/{dist → dist-types}/components/shared/ui/animated-collapse/index.d.ts +0 -1
  323. package/dist-types/components/shared/ui/branding.d.ts +27 -0
  324. package/{dist → dist-types}/components/shared/ui/button/button.d.ts +2 -3
  325. package/{dist → dist-types}/components/shared/ui/button/button.types.d.ts +0 -1
  326. package/{dist → dist-types}/components/shared/ui/button/index.d.ts +0 -1
  327. package/dist-types/components/shared/ui/collapsible/collapsible.d.ts +20 -0
  328. package/dist-types/components/shared/ui/collapsible/index.d.ts +1 -0
  329. package/dist-types/components/shared/ui/dialog/dialog.d.ts +29 -0
  330. package/dist-types/components/shared/ui/dialog/index.d.ts +1 -0
  331. package/{dist → dist-types}/components/shared/ui/icon.d.ts +0 -1
  332. package/{dist → dist-types}/components/shared/ui/logo.d.ts +8 -1
  333. package/dist-types/components/shared/ui/preference-item/index.d.ts +1 -0
  334. package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +33 -0
  335. package/dist-types/components/shared/ui/switch/index.d.ts +2 -0
  336. package/dist-types/components/shared/ui/switch/switch.d.ts +20 -0
  337. package/{dist → dist-types}/components/shared/ui/switch/switch.types.d.ts +0 -1
  338. package/dist-types/components/shared/ui/tabs/index.d.ts +1 -0
  339. package/dist-types/components/shared/ui/tabs/tabs.d.ts +28 -0
  340. package/{dist → dist-types}/context/consent-manager-context.d.ts +0 -1
  341. package/{dist → dist-types}/context/consent-tracking-context.d.ts +0 -1
  342. package/{dist → dist-types}/context/theme-context.d.ts +0 -1
  343. package/dist-types/headless.d.ts +9 -0
  344. package/{dist → dist-types}/hooks/index.d.ts +3 -1
  345. package/{dist → dist-types}/hooks/use-color-scheme.d.ts +0 -1
  346. package/{dist → dist-types}/hooks/use-component-config.d.ts +0 -1
  347. package/dist-types/hooks/use-consent-dialog-trigger.d.ts +10 -0
  348. package/{dist → dist-types}/hooks/use-consent-manager.d.ts +0 -1
  349. package/{dist → dist-types}/hooks/use-focus-trap.d.ts +0 -1
  350. package/dist-types/hooks/use-headless-consent-ui.d.ts +46 -0
  351. package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +41 -0
  352. package/{dist → dist-types}/hooks/use-reduced-motion.d.ts +0 -1
  353. package/{dist → dist-types}/hooks/use-scroll-lock.d.ts +0 -1
  354. package/{dist → dist-types}/hooks/use-ssr-status.d.ts +2 -2
  355. package/{dist → dist-types}/hooks/use-styles.d.ts +0 -1
  356. package/{dist → dist-types}/hooks/use-text-direction.d.ts +0 -1
  357. package/{dist → dist-types}/hooks/use-theme.d.ts +0 -1
  358. package/{dist → dist-types}/hooks/use-translations.d.ts +0 -1
  359. package/dist-types/iab.d.ts +24 -0
  360. package/{dist → dist-types}/index.d.ts +5 -6
  361. package/dist-types/primitives/accordion.d.ts +1 -0
  362. package/dist-types/primitives/button.d.ts +1 -0
  363. package/dist-types/primitives/collapsible.d.ts +1 -0
  364. package/dist-types/primitives/dialog.d.ts +1 -0
  365. package/dist-types/primitives/preference-item.d.ts +1 -0
  366. package/dist-types/primitives/switch.d.ts +1 -0
  367. package/dist-types/primitives/tabs.d.ts +1 -0
  368. package/dist-types/primitives.d.ts +7 -0
  369. package/{dist → dist-types}/providers/consent-manager-provider.d.ts +0 -1
  370. package/{dist → dist-types}/server/fetch-ssr-data.d.ts +0 -1
  371. package/{dist → dist-types}/server/headers.d.ts +2 -2
  372. package/{dist → dist-types}/server/index.d.ts +1 -1
  373. package/dist-types/server/init-cache-key.d.ts +21 -0
  374. package/{dist → dist-types}/server/normalize-url.d.ts +0 -1
  375. package/{dist → dist-types}/server/types.d.ts +0 -1
  376. package/{dist → dist-types}/types/consent-manager.d.ts +7 -1
  377. package/{dist → dist-types}/types/theme/index.d.ts +0 -1
  378. package/{dist → dist-types}/types/theme/style-keys.d.ts +0 -1
  379. package/{dist → dist-types}/types/theme/style-types.d.ts +2 -1
  380. package/{dist → dist-types}/utils/cn.d.ts +0 -1
  381. package/{dist → dist-types}/utils/merge-styles.d.ts +0 -1
  382. package/{dist → dist-types}/utils/test-helpers.d.ts +0 -1
  383. package/{dist → dist-types}/utils/theme-utils.d.ts +1 -2
  384. package/dist-types/version.d.ts +1 -0
  385. package/docs/README.md +76 -0
  386. package/docs/building-headless-components.md +266 -0
  387. package/docs/callbacks.md +184 -0
  388. package/docs/components/consent-banner.md +298 -0
  389. package/docs/components/consent-dialog-link.md +59 -0
  390. package/docs/components/consent-dialog-trigger.md +103 -0
  391. package/docs/components/consent-dialog.md +177 -0
  392. package/docs/components/consent-manager-provider.md +425 -0
  393. package/docs/components/consent-widget.md +160 -0
  394. package/docs/components/dev-tools.md +63 -0
  395. package/docs/components/frame.md +73 -0
  396. package/docs/concepts/client-modes.md +175 -0
  397. package/docs/concepts/consent-categories.md +97 -0
  398. package/docs/concepts/consent-models.md +112 -0
  399. package/docs/concepts/cookie-management.md +122 -0
  400. package/docs/concepts/glossary.md +23 -0
  401. package/docs/concepts/initialization-flow.md +148 -0
  402. package/docs/concepts/policy-packs.md +227 -0
  403. package/docs/headless.md +190 -0
  404. package/docs/hooks/use-color-scheme.md +40 -0
  405. package/docs/hooks/use-consent-manager/checking-consent.md +94 -0
  406. package/docs/hooks/use-consent-manager/location-info.md +95 -0
  407. package/docs/hooks/use-consent-manager/overview.md +420 -0
  408. package/docs/hooks/use-consent-manager/setting-consent.md +92 -0
  409. package/docs/hooks/use-draggable.md +57 -0
  410. package/docs/hooks/use-focus-trap.md +41 -0
  411. package/docs/hooks/use-reduced-motion.md +35 -0
  412. package/docs/hooks/use-ssr-status.md +31 -0
  413. package/docs/hooks/use-text-direction.md +49 -0
  414. package/docs/hooks/use-translations.md +118 -0
  415. package/docs/iab/consent-banner.md +92 -0
  416. package/docs/iab/consent-dialog.md +132 -0
  417. package/docs/iab/overview.md +125 -0
  418. package/docs/iab/use-gvl-data.md +208 -0
  419. package/docs/iframe-blocking.md +107 -0
  420. package/docs/integrations/building-integrations.md +405 -0
  421. package/docs/integrations/databuddy.md +203 -0
  422. package/docs/integrations/google-tag-manager.md +153 -0
  423. package/docs/integrations/google-tag.md +122 -0
  424. package/docs/integrations/linkedin-insights.md +109 -0
  425. package/docs/integrations/meta-pixel.md +342 -0
  426. package/docs/integrations/microsoft-uet.md +112 -0
  427. package/docs/integrations/overview.md +105 -0
  428. package/docs/integrations/posthog.md +199 -0
  429. package/docs/integrations/tiktok-pixel.md +113 -0
  430. package/docs/integrations/x-pixel.md +143 -0
  431. package/docs/internationalization.md +197 -0
  432. package/docs/network-blocker.md +178 -0
  433. package/docs/optimization.md +113 -0
  434. package/docs/policy-packs.md +240 -0
  435. package/docs/quickstart.md +152 -0
  436. package/docs/script-loader.md +321 -0
  437. package/docs/server-side.md +153 -0
  438. package/docs/styling/classnames.md +92 -0
  439. package/docs/styling/color-scheme.md +82 -0
  440. package/docs/styling/css-variables.md +92 -0
  441. package/docs/styling/overview.md +459 -0
  442. package/docs/styling/slots.md +127 -0
  443. package/docs/styling/tailwind.md +113 -0
  444. package/docs/styling/tokens.md +216 -0
  445. package/docs/troubleshooting.md +137 -0
  446. package/iab/styles.css +1 -0
  447. package/package.json +87 -27
  448. package/readme.json +6 -0
  449. package/src/iab/styles.css +11 -0
  450. package/src/iab/styles.tw3.css +14 -0
  451. package/src/styles.css +10 -0
  452. package/src/styles.tw3.css +13 -0
  453. package/styles.css +1 -0
  454. package/dist/components/__tests__/active-ui-transitions.e2e.test.cjs +0 -1
  455. package/dist/components/__tests__/active-ui-transitions.e2e.test.js +0 -1
  456. package/dist/components/__tests__/consent-flow.e2e.test.cjs +0 -1
  457. package/dist/components/__tests__/consent-flow.e2e.test.js +0 -1
  458. package/dist/components/__tests__/models-prop.e2e.test.cjs +0 -1
  459. package/dist/components/__tests__/models-prop.e2e.test.js +0 -1
  460. package/dist/components/__tests__/ui-source-tracking.e2e.test.cjs +0 -1
  461. package/dist/components/__tests__/ui-source-tracking.e2e.test.js +0 -1
  462. package/dist/components/consent-banner/atoms/overlay.d.ts.map +0 -1
  463. package/dist/components/consent-banner/atoms/root.d.ts.map +0 -1
  464. package/dist/components/consent-banner/components.d.ts.map +0 -1
  465. package/dist/components/consent-banner/consent-banner.d.ts.map +0 -1
  466. package/dist/components/consent-banner/error-boundary.d.ts.map +0 -1
  467. package/dist/components/consent-banner/index.d.ts.map +0 -1
  468. package/dist/components/consent-dialog/atoms/card.d.ts.map +0 -1
  469. package/dist/components/consent-dialog/atoms/overlay.d.ts.map +0 -1
  470. package/dist/components/consent-dialog/atoms/root.d.ts.map +0 -1
  471. package/dist/components/consent-dialog/consent-dialog.d.ts.map +0 -1
  472. package/dist/components/consent-dialog/index.d.ts.map +0 -1
  473. package/dist/components/consent-dialog-trigger/atoms/button.d.ts.map +0 -1
  474. package/dist/components/consent-dialog-trigger/atoms/icon.d.ts.map +0 -1
  475. package/dist/components/consent-dialog-trigger/atoms/root.d.ts.map +0 -1
  476. package/dist/components/consent-dialog-trigger/atoms/text.d.ts.map +0 -1
  477. package/dist/components/consent-dialog-trigger/consent-dialog-trigger.d.ts.map +0 -1
  478. package/dist/components/consent-dialog-trigger/index.d.ts.map +0 -1
  479. package/dist/components/consent-dialog-trigger/types.d.ts.map +0 -1
  480. package/dist/components/consent-dialog-trigger/use-draggable.d.ts.map +0 -1
  481. package/dist/components/consent-widget/atoms/accordion.d.ts +0 -46
  482. package/dist/components/consent-widget/atoms/accordion.d.ts.map +0 -1
  483. package/dist/components/consent-widget/atoms/button.d.ts.map +0 -1
  484. package/dist/components/consent-widget/atoms/footer.d.ts.map +0 -1
  485. package/dist/components/consent-widget/atoms/root.d.ts.map +0 -1
  486. package/dist/components/consent-widget/consent-widget.d.ts.map +0 -1
  487. package/dist/components/consent-widget/index.d.ts.map +0 -1
  488. package/dist/components/consent-widget/types.d.ts.map +0 -1
  489. package/dist/components/frame/atoms.d.ts.map +0 -1
  490. package/dist/components/frame/frame.d.ts.map +0 -1
  491. package/dist/components/frame/index.d.ts.map +0 -1
  492. package/dist/components/frame/types.d.ts.map +0 -1
  493. package/dist/components/iab/__tests__/e2e-setup.cjs +0 -1
  494. package/dist/components/iab/__tests__/e2e-setup.js +0 -1
  495. package/dist/components/iab/__tests__/fixtures/mock-consent-state.cjs +0 -1
  496. package/dist/components/iab/__tests__/fixtures/mock-consent-state.d.ts +0 -212
  497. package/dist/components/iab/__tests__/fixtures/mock-consent-state.d.ts.map +0 -1
  498. package/dist/components/iab/__tests__/fixtures/mock-consent-state.js +0 -1
  499. package/dist/components/iab/__tests__/iab-banner.e2e.test.cjs +0 -1
  500. package/dist/components/iab/__tests__/iab-banner.e2e.test.js +0 -1
  501. package/dist/components/iab/__tests__/iab-consent-flow.e2e.test.cjs +0 -1
  502. package/dist/components/iab/__tests__/iab-consent-flow.e2e.test.js +0 -1
  503. package/dist/components/iab/__tests__/iab-events.e2e.test.cjs +0 -1
  504. package/dist/components/iab/__tests__/iab-events.e2e.test.js +0 -1
  505. package/dist/components/iab/__tests__/iab-gvl.e2e.test.cjs +0 -1
  506. package/dist/components/iab/__tests__/iab-gvl.e2e.test.js +0 -1
  507. package/dist/components/iab/__tests__/iab-preference-center.e2e.test.cjs +0 -1
  508. package/dist/components/iab/__tests__/iab-preference-center.e2e.test.js +0 -1
  509. package/dist/components/iab/__tests__/iab-storage.e2e.test.cjs +0 -1
  510. package/dist/components/iab/__tests__/iab-storage.e2e.test.js +0 -1
  511. package/dist/components/iab/__tests__/iab-stub.e2e.test.cjs +0 -1
  512. package/dist/components/iab/__tests__/iab-stub.e2e.test.js +0 -1
  513. package/dist/components/iab/__tests__/iab-tcfapi.e2e.test.cjs +0 -1
  514. package/dist/components/iab/__tests__/iab-tcfapi.e2e.test.js +0 -1
  515. package/dist/components/iab/__tests__/msw-handlers.cjs +0 -1
  516. package/dist/components/iab/__tests__/msw-handlers.js +0 -1
  517. package/dist/components/iab-consent-banner/__tests__/iab-consent-banner.test.cjs +0 -1
  518. package/dist/components/iab-consent-banner/__tests__/iab-consent-banner.test.js +0 -1
  519. package/dist/components/iab-consent-banner/atoms/button-group.d.ts.map +0 -1
  520. package/dist/components/iab-consent-banner/atoms/card.d.ts.map +0 -1
  521. package/dist/components/iab-consent-banner/atoms/description.d.ts.map +0 -1
  522. package/dist/components/iab-consent-banner/atoms/footer.d.ts.map +0 -1
  523. package/dist/components/iab-consent-banner/atoms/header.d.ts.map +0 -1
  524. package/dist/components/iab-consent-banner/atoms/overlay.d.ts.map +0 -1
  525. package/dist/components/iab-consent-banner/atoms/root.d.ts.map +0 -1
  526. package/dist/components/iab-consent-banner/atoms/title.d.ts.map +0 -1
  527. package/dist/components/iab-consent-banner/iab-consent-banner.d.ts.map +0 -1
  528. package/dist/components/iab-consent-banner/index.d.ts.map +0 -1
  529. package/dist/components/iab-consent-dialog/__tests__/legitimate-interest-ui.test.cjs +0 -1
  530. package/dist/components/iab-consent-dialog/__tests__/legitimate-interest-ui.test.js +0 -1
  531. package/dist/components/iab-consent-dialog/__tests__/preference-center.test.cjs +0 -1
  532. package/dist/components/iab-consent-dialog/__tests__/preference-center.test.js +0 -1
  533. package/dist/components/iab-consent-dialog/__tests__/purposes-tab.test.cjs +0 -1
  534. package/dist/components/iab-consent-dialog/__tests__/purposes-tab.test.js +0 -1
  535. package/dist/components/iab-consent-dialog/__tests__/vendors-tab.test.cjs +0 -1
  536. package/dist/components/iab-consent-dialog/__tests__/vendors-tab.test.js +0 -1
  537. package/dist/components/iab-consent-dialog/atoms/card.d.ts.map +0 -1
  538. package/dist/components/iab-consent-dialog/atoms/content.d.ts.map +0 -1
  539. package/dist/components/iab-consent-dialog/atoms/footer.d.ts.map +0 -1
  540. package/dist/components/iab-consent-dialog/atoms/header.d.ts.map +0 -1
  541. package/dist/components/iab-consent-dialog/atoms/overlay.d.ts.map +0 -1
  542. package/dist/components/iab-consent-dialog/atoms/purpose-item.d.ts.map +0 -1
  543. package/dist/components/iab-consent-dialog/atoms/root.d.ts.map +0 -1
  544. package/dist/components/iab-consent-dialog/atoms/stack-item.d.ts.map +0 -1
  545. package/dist/components/iab-consent-dialog/atoms/tabs.d.ts +0 -40
  546. package/dist/components/iab-consent-dialog/atoms/tabs.d.ts.map +0 -1
  547. package/dist/components/iab-consent-dialog/atoms/vendor-list.d.ts.map +0 -1
  548. package/dist/components/iab-consent-dialog/hooks/use-gvl-data.d.ts.map +0 -1
  549. package/dist/components/iab-consent-dialog/iab-consent-dialog.d.ts.map +0 -1
  550. package/dist/components/iab-consent-dialog/index.d.ts.map +0 -1
  551. package/dist/components/iab-consent-dialog/types.d.ts.map +0 -1
  552. package/dist/components/iab-consent-dialog/use-iab-translations.d.ts.map +0 -1
  553. package/dist/components/shared/libs/polymorphic.d.ts.map +0 -1
  554. package/dist/components/shared/libs/recursive-clone-children.d.ts.map +0 -1
  555. package/dist/components/shared/primitives/box.d.ts.map +0 -1
  556. package/dist/components/shared/primitives/button.d.ts.map +0 -1
  557. package/dist/components/shared/primitives/button.types.d.ts.map +0 -1
  558. package/dist/components/shared/primitives/legal-links/index.d.ts.map +0 -1
  559. package/dist/components/shared/ui/__tests__/primitives.test.cjs +0 -1
  560. package/dist/components/shared/ui/__tests__/primitives.test.js +0 -1
  561. package/dist/components/shared/ui/accordion/accordion.d.ts.map +0 -1
  562. package/dist/components/shared/ui/accordion/accordion.types.d.ts.map +0 -1
  563. package/dist/components/shared/ui/accordion/index.d.ts.map +0 -1
  564. package/dist/components/shared/ui/animated-collapse/animated-collapse.d.ts.map +0 -1
  565. package/dist/components/shared/ui/animated-collapse/index.d.ts.map +0 -1
  566. package/dist/components/shared/ui/button/button.d.ts.map +0 -1
  567. package/dist/components/shared/ui/button/button.types.d.ts.map +0 -1
  568. package/dist/components/shared/ui/button/index.d.ts.map +0 -1
  569. package/dist/components/shared/ui/icon.d.ts.map +0 -1
  570. package/dist/components/shared/ui/logo.d.ts.map +0 -1
  571. package/dist/components/shared/ui/switch/index.d.ts +0 -3
  572. package/dist/components/shared/ui/switch/index.d.ts.map +0 -1
  573. package/dist/components/shared/ui/switch/switch.d.ts +0 -45
  574. package/dist/components/shared/ui/switch/switch.d.ts.map +0 -1
  575. package/dist/components/shared/ui/switch/switch.types.d.ts.map +0 -1
  576. package/dist/context/consent-manager-context.d.ts.map +0 -1
  577. package/dist/context/consent-tracking-context.d.ts.map +0 -1
  578. package/dist/context/theme-context.d.ts.map +0 -1
  579. package/dist/headless.d.ts +0 -8
  580. package/dist/headless.d.ts.map +0 -1
  581. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.cjs +0 -1
  582. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.js +0 -1
  583. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.cjs +0 -1
  584. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.js +0 -1
  585. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.cjs +0 -1
  586. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.js +0 -1
  587. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.cjs +0 -1
  588. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.js +0 -1
  589. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.cjs +0 -1
  590. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.js +0 -1
  591. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.cjs +0 -1
  592. package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.js +0 -1
  593. package/dist/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.cjs +0 -1
  594. package/dist/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.js +0 -1
  595. package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.cjs +0 -1
  596. package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.js +0 -1
  597. package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.cjs +0 -1
  598. package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.js +0 -1
  599. package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.cjs +0 -1
  600. package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.js +0 -1
  601. package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.cjs +0 -1
  602. package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.js +0 -1
  603. package/dist/hooks/__tests__/__screenshots__/use-theme.test.tsx/useTheme-local-theme-takes-precedence-over-global-theme-1.cjs +0 -1
  604. package/dist/hooks/__tests__/__screenshots__/use-theme.test.tsx/useTheme-local-theme-takes-precedence-over-global-theme-1.js +0 -1
  605. package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.cjs +0 -1
  606. package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.js +0 -1
  607. package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.cjs +0 -1
  608. package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.js +0 -1
  609. package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-merges-custom-translations-with-defaults-1.cjs +0 -1
  610. package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-merges-custom-translations-with-defaults-1.js +0 -1
  611. package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-returns-English-translations-by-default-1.cjs +0 -1
  612. package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-returns-English-translations-by-default-1.js +0 -1
  613. package/dist/hooks/__tests__/use-color-scheme.test.cjs +0 -1
  614. package/dist/hooks/__tests__/use-color-scheme.test.js +0 -1
  615. package/dist/hooks/__tests__/use-consent-manager.test.cjs +0 -1
  616. package/dist/hooks/__tests__/use-consent-manager.test.js +0 -1
  617. package/dist/hooks/__tests__/use-focus-trap.test.cjs +0 -1
  618. package/dist/hooks/__tests__/use-focus-trap.test.js +0 -1
  619. package/dist/hooks/__tests__/use-scroll-lock.test.cjs +0 -1
  620. package/dist/hooks/__tests__/use-scroll-lock.test.js +0 -1
  621. package/dist/hooks/__tests__/use-styles.test.cjs +0 -1
  622. package/dist/hooks/__tests__/use-styles.test.js +0 -1
  623. package/dist/hooks/__tests__/use-theme.test.cjs +0 -1
  624. package/dist/hooks/__tests__/use-theme.test.js +0 -1
  625. package/dist/hooks/__tests__/use-translations.test.cjs +0 -1
  626. package/dist/hooks/__tests__/use-translations.test.js +0 -1
  627. package/dist/hooks/index.d.ts.map +0 -1
  628. package/dist/hooks/use-color-scheme.d.ts.map +0 -1
  629. package/dist/hooks/use-component-config.d.ts.map +0 -1
  630. package/dist/hooks/use-consent-manager.d.ts.map +0 -1
  631. package/dist/hooks/use-focus-trap.d.ts.map +0 -1
  632. package/dist/hooks/use-reduced-motion.d.ts.map +0 -1
  633. package/dist/hooks/use-scroll-lock.d.ts.map +0 -1
  634. package/dist/hooks/use-ssr-status.d.ts.map +0 -1
  635. package/dist/hooks/use-styles.d.ts.map +0 -1
  636. package/dist/hooks/use-text-direction.d.ts.map +0 -1
  637. package/dist/hooks/use-theme.d.ts.map +0 -1
  638. package/dist/hooks/use-translations.d.ts.map +0 -1
  639. package/dist/index.d.ts.map +0 -1
  640. package/dist/mockServiceWorker.js +0 -349
  641. package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.cjs +0 -1
  642. package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.js +0 -1
  643. package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-not-make-additional-requests-when-props-change-but-core-options-remain-same-1.cjs +0 -1
  644. package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-not-make-additional-requests-when-props-change-but-core-options-remain-same-1.js +0 -1
  645. package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.cjs +0 -1
  646. package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.js +0 -1
  647. package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.cjs +0 -1
  648. package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.js +0 -1
  649. package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.cjs +0 -1
  650. package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.js +0 -1
  651. package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.cjs +0 -1
  652. package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.js +0 -1
  653. package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.cjs +0 -1
  654. package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.js +0 -1
  655. package/dist/providers/__tests__/provider-basic.test.cjs +0 -1
  656. package/dist/providers/__tests__/provider-basic.test.js +0 -1
  657. package/dist/providers/__tests__/provider-context.test.cjs +0 -1
  658. package/dist/providers/__tests__/provider-context.test.js +0 -1
  659. package/dist/providers/__tests__/provider-errors.test.cjs +0 -1
  660. package/dist/providers/__tests__/provider-errors.test.js +0 -1
  661. package/dist/providers/__tests__/provider-hydration.test.cjs +0 -1
  662. package/dist/providers/__tests__/provider-hydration.test.js +0 -1
  663. package/dist/providers/__tests__/test-helpers.cjs +0 -1
  664. package/dist/providers/__tests__/test-helpers.js +0 -1
  665. package/dist/providers/consent-manager-provider.d.ts.map +0 -1
  666. package/dist/server/fetch-ssr-data.d.ts.map +0 -1
  667. package/dist/server/headers.d.ts.map +0 -1
  668. package/dist/server/headers.test.cjs +0 -1
  669. package/dist/server/headers.test.d.ts +0 -2
  670. package/dist/server/headers.test.d.ts.map +0 -1
  671. package/dist/server/headers.test.js +0 -1
  672. package/dist/server/index.d.ts.map +0 -1
  673. package/dist/server/normalize-url.d.ts.map +0 -1
  674. package/dist/server/normalize-url.test.cjs +0 -1
  675. package/dist/server/normalize-url.test.d.ts +0 -2
  676. package/dist/server/normalize-url.test.d.ts.map +0 -1
  677. package/dist/server/normalize-url.test.js +0 -1
  678. package/dist/server/types.d.ts.map +0 -1
  679. package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.png +0 -0
  680. package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-not-make-additional-requests-when-props-change-but-core-options-remain-same-1.png +0 -0
  681. package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.png +0 -0
  682. package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.png +0 -0
  683. package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.png +0 -0
  684. package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.png +0 -0
  685. package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.png +0 -0
  686. package/dist/static/image/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.png +0 -0
  687. package/dist/static/image/useColorScheme-handles-default-theme-based-on-document-class-1.png +0 -0
  688. package/dist/static/image/useColorScheme-responds-to-system-preference-1.png +0 -0
  689. package/dist/static/image/useColorScheme-sets-dark-theme-correctly-1.png +0 -0
  690. package/dist/static/image/useColorScheme-updates-theme-when-default-theme-changes-1.png +0 -0
  691. package/dist/static/image/useColorScheme-updates-theme-when-system-preference-changes-1.png +0 -0
  692. package/dist/static/image/useConsentManager-provides-manager-object-when-configured-1.png +0 -0
  693. package/dist/static/image/useStyles-handles-string-className-correctly-1.png +0 -0
  694. package/dist/static/image/useStyles-merges-theme-and-component-styles-correctly-1.png +0 -0
  695. package/dist/static/image/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.png +0 -0
  696. package/dist/static/image/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.png +0 -0
  697. package/dist/static/image/useTheme-local-theme-takes-precedence-over-global-theme-1.png +0 -0
  698. package/dist/static/image/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.png +0 -0
  699. package/dist/static/image/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.png +0 -0
  700. package/dist/static/image/useTranslations-merges-custom-translations-with-defaults-1.png +0 -0
  701. package/dist/static/image/useTranslations-returns-English-translations-by-default-1.png +0 -0
  702. package/dist/test-setup.browser.cjs +0 -1
  703. package/dist/test-setup.browser.d.ts +0 -8
  704. package/dist/test-setup.browser.d.ts.map +0 -1
  705. package/dist/test-setup.browser.js +0 -1
  706. package/dist/types/consent-manager.d.ts.map +0 -1
  707. package/dist/types/theme/index.d.ts.map +0 -1
  708. package/dist/types/theme/style-keys.d.ts.map +0 -1
  709. package/dist/types/theme/style-types.d.ts.map +0 -1
  710. package/dist/utils/cn.d.ts.map +0 -1
  711. package/dist/utils/merge-styles.d.ts.map +0 -1
  712. package/dist/utils/test-helpers.d.ts.map +0 -1
  713. package/dist/utils/theme-utils.d.ts.map +0 -1
  714. package/dist/version.d.ts +0 -2
  715. package/dist/version.d.ts.map +0 -1
@@ -0,0 +1,160 @@
1
+ ---
2
+ title: ConsentWidget
3
+ description: An inline consent management widget for embedding in settings or privacy pages. Shows category toggles with accordion layout.
4
+ ---
5
+ `ConsentWidget` is a standalone, inline consent management widget. Unlike `ConsentDialog` (which is a modal), the widget embeds directly in your page layout - ideal for privacy settings pages, account preferences, or any page where users should be able to manage consent without a modal overlay.
6
+
7
+ ## Basic Usage
8
+
9
+ ```tsx
10
+ import { ConsentWidget } from '@c15t/react';
11
+
12
+ export function PrivacySettingsPage() {
13
+ return (
14
+ <>
15
+ <h1>Privacy Settings</h1>
16
+ <p>Manage your cookie preferences below.</p>
17
+ <ConsentWidget />
18
+ </>
19
+ );
20
+ }
21
+ ```
22
+
23
+ ## Configuration
24
+
25
+ ```tsx
26
+ <ConsentWidget
27
+ hideBranding
28
+ legalLinks={['privacyPolicy', 'cookiePolicy']}
29
+ noStyle={false}
30
+ disableAnimation={false}
31
+ />
32
+ ```
33
+
34
+ ## Accordion Behavior
35
+
36
+ Each consent category is rendered as an expandable accordion item. Clicking the category header expands it to show a description and any associated services. Users can toggle individual categories on or off using the switch control. The `necessary` category is always enabled and cannot be toggled.
37
+
38
+ ## Styling First
39
+
40
+ > ℹ️ **Info:**
41
+ > Most widget customization should stay in the stock component. Use theme tokens and slots such as consentWidgetAccordion, consentWidgetFooter, and toggle before reaching for compound components. See Styling Overview.
42
+
43
+ ```tsx
44
+ <ConsentManagerProvider
45
+ options={{
46
+ theme: {
47
+ colors: {
48
+ surface: '#fffdf8',
49
+ surfaceHover: '#f6f3ee',
50
+ },
51
+ slots: {
52
+ consentWidgetAccordion: 'rounded-3xl border border-black/10',
53
+ consentWidgetFooter: 'border-t border-black/10 px-6',
54
+ toggle: 'shadow-sm',
55
+ },
56
+ },
57
+ }}
58
+ >
59
+ <ConsentWidget />
60
+ </ConsentManagerProvider>
61
+ ```
62
+
63
+ Widget copy should be changed through `ConsentManagerProvider.options.i18n` so the inline UI stays aligned with the rest of the consent experience.
64
+
65
+ ## Advanced: Compound Components
66
+
67
+ Use compound components only when you need to rearrange the widget's existing primitives while keeping policy-aware action grouping:
68
+
69
+ ```tsx
70
+ <ConsentWidget.Root>
71
+ <ConsentWidget.Accordion type="multiple">
72
+ <ConsentWidget.AccordionItems />
73
+ </ConsentWidget.Accordion>
74
+ <ConsentWidget.PolicyActions />
75
+ </ConsentWidget.Root>
76
+ ```
77
+
78
+ * `ConsentWidget.Root` — Theme context provider
79
+ * `ConsentWidget.Accordion` — Radix-based accordion root
80
+ * `ConsentWidget.AccordionItems` — Auto-generates toggle items from consent config
81
+ * `ConsentWidget.AccordionItem` — Individual category item
82
+ * `ConsentWidget.AccordionTrigger` — Clickable header for each item
83
+ * `ConsentWidget.AccordionContent` — Collapsible content area
84
+ * `ConsentWidget.AccordionArrow` — Expand/collapse indicator
85
+ * `ConsentWidget.Switch` — Category toggle switch
86
+ * `ConsentWidget.PolicyActions` — Renders grouped policy-aware actions
87
+ * `ConsentWidget.Footer` — Footer container
88
+ * `ConsentWidget.FooterSubGroup` — Groups related buttons
89
+ * `ConsentWidget.AcceptAllButton` — Accepts all consent
90
+ * `ConsentWidget.RejectButton` — Rejects all consent
91
+ * `ConsentWidget.SaveButton` — Saves custom selections
92
+
93
+ ## Using `renderAction` with c15t Defaults
94
+
95
+ `ConsentWidget.PolicyActions` renders stock c15t buttons and translations by default.
96
+
97
+ ```tsx
98
+ <ConsentWidget.PolicyActions />
99
+ ```
100
+
101
+ `renderAction` is optional. Return the stock button compounds when you want custom mapping while preserving built-in c15t behavior and copy:
102
+
103
+ ```tsx
104
+ <ConsentWidget.PolicyActions
105
+ renderAction={(action, props) => {
106
+ const { key, ...buttonProps } = props
107
+
108
+ switch (action) {
109
+ case 'accept':
110
+ return <ConsentWidget.AcceptAllButton key={key} {...buttonProps} />
111
+ case 'reject':
112
+ return <ConsentWidget.RejectButton key={key} {...buttonProps} />
113
+ case 'customize':
114
+ return <ConsentWidget.SaveButton key={key} {...buttonProps} />
115
+ }
116
+ }}
117
+ />
118
+ ```
119
+
120
+ Use `useTranslations()` only when you are replacing the button markup entirely:
121
+
122
+ ```tsx
123
+ import { ConsentWidget, useTranslations } from '@c15t/react';
124
+
125
+ export function CustomWidgetActions() {
126
+ const { common } = useTranslations();
127
+
128
+ return (
129
+ <ConsentWidget.PolicyActions
130
+ renderAction={(action, props) => (
131
+ <button
132
+ key={props.key}
133
+ type="button"
134
+ className={props.isPrimary ? 'btn-primary' : 'btn-secondary'}
135
+ style={props.style}
136
+ >
137
+ {action === 'accept'
138
+ ? common.acceptAll
139
+ : action === 'reject'
140
+ ? common.rejectAll
141
+ : common.save}
142
+ </button>
143
+ )}
144
+ />
145
+ );
146
+ }
147
+ ```
148
+
149
+ For a fixed footer layout, render `ConsentWidget.Footer` and `ConsentWidget.FooterSubGroup` manually instead of using `ConsentWidget.PolicyActions`.
150
+
151
+ If the stock widget structure is already correct, stay with tokens and slots instead of rebuilding the layout.
152
+
153
+ ## Props
154
+
155
+ ### ConsentWidgetProps
156
+
157
+ |Property|Type|Description|Default|Required|
158
+ |:--|:--|:--|:--|:--:|
159
+ |hideBranding|boolean \|undefined|Controls whether to hide the branding in the widget footer.|-|Optional|
160
+ |legalLinks|(keyof LegalLinksTranslations)\[] \|null \|undefined|Controls which legal links to display in the widget footer.|-|Optional|
@@ -0,0 +1,63 @@
1
+ ---
2
+ title: DevTools
3
+ description: A development tool for inspecting consent state, geolocation, loaded scripts, and consent events in real time.
4
+ ---
5
+ `DevTools` is a floating panel that shows the internal state of the consent manager. Use it during development to inspect consent values, geolocation results, loaded scripts, and debug consent flows. Also exported as `C15TDevTools` if you need to avoid naming conflicts with other devtools.
6
+
7
+ > ℹ️ **Info:**
8
+ > DevTools should only be included in development builds. The component renders nothing to the React tree - it injects directly into document.body.
9
+
10
+ ## Installation
11
+
12
+ DevTools lives in a separate package to keep it out of production bundles:
13
+
14
+ ```bash
15
+ bun add -D @c15t/dev-tools
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```tsx
21
+ import { type ReactNode } from 'react';
22
+ import { ConsentManagerProvider } from '@c15t/react';
23
+ import { DevTools } from '@c15t/dev-tools/react';
24
+
25
+ export function ConsentManager({ children }: { children: ReactNode }) {
26
+ return (
27
+ <ConsentManagerProvider options={{ mode: 'hosted', backendURL: 'https://your-instance.c15t.dev' }}>
28
+ {children}
29
+ {process.env.NODE_ENV === 'development' && <DevTools />}
30
+ </ConsentManagerProvider>
31
+ );
32
+ }
33
+ ```
34
+
35
+ ## Configuration
36
+
37
+ ```tsx
38
+ <DevTools
39
+ position="bottom-right" // 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
40
+ defaultOpen={false} // Start with panel open
41
+ namespace="c15tStore" // Store namespace to connect to
42
+ disabled={false} // Disable without removing from tree
43
+ />
44
+ ```
45
+
46
+ ## Panels
47
+
48
+ |Panel|What it shows|
49
+ |--|--|
50
+ |**Consents**|Current consent state for all categories|
51
+ |**Location**|Detected jurisdiction, country, region, and consent model|
52
+ |**Scripts**|Configured scripts and their load status|
53
+ |**IAB**|IAB TCF state (when enabled) - TC string, vendor consents, purposes|
54
+ |**Events**|Timeline of consent events and state changes|
55
+ |**Actions**|Buttons to trigger consent actions (accept all, reject all, reset)|
56
+
57
+ ## Props
58
+
59
+ ### C15TDevToolsProps
60
+
61
+ |Property|Type|Description|Default|Required|
62
+ |:--|:--|:--|:--|:--:|
63
+ |disabled|boolean \|undefined|Whether the DevTools should be disabled Useful for production builds|false|Optional|
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: Frame
3
+ description: A consent-gated content wrapper - children only mount when the required consent category is granted.
4
+ ---
5
+ `Frame` conditionally renders its children based on consent state. When consent for the specified category is not granted, a placeholder is shown instead. Children are not mounted at all until consent is given, preventing any network requests or script execution.
6
+
7
+ ## Basic Usage
8
+
9
+ ```tsx
10
+ import { Frame } from '@c15t/react';
11
+
12
+ function YouTubeEmbed() {
13
+ return (
14
+ <Frame category="marketing">
15
+ <iframe
16
+ src="https://www.youtube.com/embed/dQw4w9WgXcQ"
17
+ width="560"
18
+ height="315"
19
+ allowFullScreen
20
+ />
21
+ </Frame>
22
+ );
23
+ }
24
+ ```
25
+
26
+ ## Custom Placeholder
27
+
28
+ Replace the default placeholder:
29
+
30
+ ```tsx
31
+ <Frame
32
+ category="experience"
33
+ placeholder={
34
+ <div className="rounded-lg border p-8 text-center">
35
+ <p>This content requires experience cookies.</p>
36
+ <p>Please enable them in your privacy settings.</p>
37
+ </div>
38
+ }
39
+ >
40
+ <InteractiveWidget />
41
+ </Frame>
42
+ ```
43
+
44
+ ## Compound Components
45
+
46
+ Build fully custom placeholder layouts:
47
+
48
+ ```tsx
49
+ <Frame.Root category="marketing">
50
+ <Frame.Title category="marketing" />
51
+ <Frame.Button category="marketing" />
52
+ </Frame.Root>
53
+ ```
54
+
55
+ * `Frame.Root` - Container with default placeholder styling
56
+ * `Frame.Title` - Displays a consent-request message with the category name
57
+ * `Frame.Button` - Button that opens the consent dialog for the specified category
58
+
59
+ ## Automatic Category Registration
60
+
61
+ When `Frame` mounts, it automatically adds its `category` to the active `consentCategories` list. This means you don't need to explicitly list the category in your provider's `consentCategories` option - if a `Frame` component uses it, it will be registered.
62
+
63
+ ## Props
64
+
65
+ ### FrameProps
66
+
67
+ |Property|Type|Description|Default|Required|
68
+ |:--|:--|:--|:--|:--:|
69
+ |children|ReactNode|Content rendered when consent is granted. Children are not mounted until consent is given, preventing unnecessary network requests.|-|✅ Required|
70
+ |category|AllConsentNames|Consent category required to render children.|-|✅ Required|
71
+ |placeholder|ReactNode|A custom placeholder component to display when consent is not met. If not provided, a default placeholder will be displayed.|-|Optional|
72
+ |noStyle|boolean \|undefined|When true, removes all default styling from the component|false|Optional|
73
+ |theme|any|Custom theme to override default styles while maintaining structure and accessibility. Merges with defaults. Ignored when \`noStyle=\{true}\`.|undefined|Optional|
@@ -0,0 +1,175 @@
1
+ ---
2
+ title: Client Modes
3
+ description: Choose how c15t connects to its backend - full hosted integration, offline-only, or bring your own backend.
4
+ ---
5
+ c15t supports three client modes that determine how consent data is stored and synchronized. Choose the mode that matches your infrastructure:
6
+
7
+ * **Hosted mode** - Recommended for production. Backend-backed consent with geolocation, centralized policy resolution, audit history, and offline fallback.
8
+ * **Offline mode** - Browser-only storage with no network requests. Best for local development, demos, static deployments, or controlled fallback scenarios.
9
+ * **Custom mode** - Bring your own backend with custom endpoint handlers
10
+
11
+ > ℹ️ **Info:**
12
+ > If you need durable consent records, server-side enforcement, or automatic jurisdiction detection, use hosted mode. Offline mode cannot provide those guarantees because consent lives only in the browser.
13
+
14
+ <span id="c15t-mode" />
15
+
16
+ ## Hosted Mode (Recommended)
17
+
18
+ The default mode. Connects to a c15t backend for full consent lifecycle management. We recommend using [inth.com](https://inth.com) for a fully managed experience, but you can [self-host](/docs/self-host) as well.
19
+
20
+ > ℹ️ **Info:**
21
+ > mode: 'hosted' is the preferred value. The legacy alias mode: 'c15t' is still supported for backward compatibility.
22
+
23
+ **What happens:**
24
+
25
+ 1. On page load, the client calls `/init` to fetch geolocation, jurisdiction, localized translation strings
26
+ 2. When the user grants or changes consent, it is saved locally before being synced to the backend.
27
+ 3. If the backend is unreachable, it falls back to Offline mode and re-syncs with the backend when it's available
28
+
29
+ **Configuration:**
30
+
31
+ * `backendURL` (required) - API endpoint path
32
+
33
+ **Why it is the default for production:**
34
+
35
+ * The backend stays the source of truth for policy, translations, and jurisdiction logic
36
+ * Consent decisions can be stored beyond the current browser session for audit and support workflows
37
+ * Server-side systems can preload consent-aware behavior instead of waiting for client-only storage
38
+ * If the backend is temporarily unavailable, c15t can fall back locally and re-sync later
39
+
40
+ **Best for:** Production apps that need geolocation-based jurisdiction detection, consent record storage, and compliance audit trails.
41
+
42
+ ```tsx
43
+ import { type ReactNode } from 'react';
44
+ import { ConsentManagerProvider, ConsentBanner } from '@c15t/react';
45
+
46
+ export function ConsentManager({ children }: { children: ReactNode }) {
47
+ return (
48
+ <ConsentManagerProvider
49
+ options={{
50
+ mode: 'hosted',
51
+ backendURL: 'https://your-instance.c15t.dev',
52
+ }}
53
+ >
54
+ <ConsentBanner />
55
+ {children}
56
+ </ConsentManagerProvider>
57
+ );
58
+ }
59
+ ```
60
+
61
+ ## Offline Mode
62
+
63
+ No network requests. Consent is stored entirely in the browser using localStorage and cookies.
64
+
65
+ **What happens:**
66
+
67
+ 1. Default jurisdiction is GDPR unless manually set via `overrides`
68
+ 2. Consent preferences persist locally only
69
+ 3. No server-side consent records or analytics
70
+
71
+ > ℹ️ **Info:**
72
+ > Important: Offline mode still stores consent locally (cookie + localStorage). It only skips backend storage and sync.
73
+
74
+ ### Consequences of Browser-Only Storage
75
+
76
+ If consent is not stored at all (for example, storage is blocked or frequently cleared):
77
+
78
+ * Users are treated as new visitors and must re-consent repeatedly
79
+ * Preferences are lost across browser resets, private sessions, and device changes
80
+ * You have no reliable audit evidence to prove prior consent choices
81
+ * Support and compliance teams have no centralized visibility into consent history by default
82
+ * Server-side systems cannot apply prior consent decisions before client initialization
83
+
84
+ **Trade-offs:**
85
+
86
+ * No automatic geolocation or jurisdiction detection
87
+ * No consent audit trail
88
+ * No centralized policy or translation updates without shipping frontend changes
89
+ * No cross-device sync
90
+ * No server-side visibility before client initialization
91
+ * Works without any backend infrastructure
92
+
93
+ **Best for:** Local development, Storybook/static demos, resilience fallback, or simpler sites that explicitly accept browser-only consent storage.
94
+
95
+ ```tsx
96
+ import { type ReactNode } from 'react';
97
+ import { ConsentManagerProvider, ConsentBanner } from '@c15t/react';
98
+
99
+ export function ConsentManager({ children }: { children: ReactNode }) {
100
+ return (
101
+ <ConsentManagerProvider
102
+ options={{
103
+ mode: 'offline',
104
+ overrides: {
105
+ country: 'DE', // Override country to trigger GDPR jurisdiction
106
+ },
107
+ }}
108
+ >
109
+ <ConsentBanner />
110
+ {children}
111
+ </ConsentManagerProvider>
112
+ );
113
+ }
114
+ ```
115
+
116
+ ## Custom Mode
117
+
118
+ Bring your own backend. You provide handler functions for each consent endpoint, and c15t calls them instead of making HTTP requests.
119
+
120
+ **What happens:**
121
+
122
+ 1. On page load, the client calls your endpoint handler to fetch geolocation, jurisdiction, localized translation strings
123
+ 2. When the user grants or changes consent, it is saved locally before being synced to the backend.
124
+ 3. If one of your handlers fails, c15t returns a handler error and keeps local consent state, but automatic offline fallback and retry queue behavior is not provided for custom handlers by default
125
+
126
+ This lets you integrate c15t with any existing API - your CRM, your own consent database, or a third-party compliance service.
127
+
128
+ **Best for:** Teams with existing consent infrastructure that want c15t's frontend without its backend.
129
+
130
+ ```tsx
131
+ import { type ReactNode } from 'react';
132
+ import { ConsentManagerProvider, ConsentBanner } from '@c15t/react';
133
+
134
+ export function ConsentManager({ children }: { children: ReactNode }) {
135
+ return (
136
+ <ConsentManagerProvider
137
+ options={{
138
+ mode: 'custom',
139
+ endpointHandlers: {
140
+ async init() {
141
+ const res = await fetch('/my-api/consent/init');
142
+ const data = await res.json();
143
+ return { data, response: res, error: null };
144
+ },
145
+ async setConsent(options) {
146
+ const res = await fetch('/my-api/consent', {
147
+ method: 'POST',
148
+ headers: { 'Content-Type': 'application/json' },
149
+ body: JSON.stringify(options?.body),
150
+ });
151
+ return { data: await res.json(), response: res, error: null };
152
+ },
153
+ },
154
+ }}
155
+ >
156
+ <ConsentBanner />
157
+ {children}
158
+ </ConsentManagerProvider>
159
+ );
160
+ }
161
+ ```
162
+
163
+ ## Choosing a Mode
164
+
165
+ |Feature|Hosted|Offline|Custom|
166
+ |--|--|--|--|
167
+ |Geolocation|Automatic|Manual via overrides|Your implementation|
168
+ |Policy source of truth|Backend-managed|Bundled into the frontend|Your implementation|
169
+ |Consent sync|API|Local only|Your implementation|
170
+ |Audit trail|Backend records|Not available|Your implementation|
171
+ |Server-side consent awareness|Supported|Not available|Your implementation|
172
+ |SSR data|Supported|Not available|Your implementation|
173
+ |Analytics|Built-in|Not available|Your implementation|
174
+ |Infrastructure|c15t backend|None|Your backend|
175
+ |Setup effort|Minimal|Zero|Moderate|
@@ -0,0 +1,97 @@
1
+ ---
2
+ title: Consent Categories
3
+ description: How c15t organizes tracking technologies into five consent categories.
4
+ ---
5
+ c15t organizes tracking technologies into five consent categories that align with GDPR and ePrivacy Directive requirements. Rather than asking users to approve or deny individual cookies or scripts, each category groups related tracking purposes together so users can make meaningful, informed choices about how their data is used.
6
+
7
+ > ℹ️ **Info:**
8
+ > Why categories, not cookie lists? Many consent banners list individual cookie names like \_ga, \_gid, or \_fbp. This is counterproductive:Technical names are meaningless to users — nobody knows what \_gid does by reading its name.Information overload drives "accept all" — a wall of cookie names pushes users toward dismissing the banner as fast as possible, which is the opposite of informed consent.Purpose is what matters — privacy regulations (GDPR, ePrivacy) require clear information about the purposes of data processing, not a cookie-by-cookie inventory.Cookie lists go stale — third-party scripts change their cookie names across versions, creating a maintenance burden that provides no real transparency.c15t's category-based approach — "measurement", "marketing", "experience" — communicates purpose directly. Users understand why data is collected, not how it is stored.
9
+
10
+ Configure which categories your app supports in the provider:
11
+
12
+ ```tsx
13
+ import { type ReactNode } from 'react';
14
+ import { ConsentManagerProvider } from '@c15t/react';
15
+
16
+ export function ConsentManager({ children }: { children: ReactNode }) {
17
+ return (
18
+ <ConsentManagerProvider
19
+ options={{
20
+ mode: 'hosted',
21
+ backendURL: 'https://your-instance.c15t.dev',
22
+ consentCategories: ['necessary', 'measurement', 'marketing'],
23
+ }}
24
+ >
25
+ {children}
26
+ </ConsentManagerProvider>
27
+ );
28
+ }
29
+ ```
30
+
31
+ ## The Five Categories
32
+
33
+ |Category|Default|Toggleable|Description|
34
+ |--|--|--|--|
35
+ |`necessary`|`true`|No|Strictly necessary to operate or deliver the service|
36
+ |`functionality`|`false`|Yes|Basic interactions and functionalities|
37
+ |`experience`|`false`|Yes|Improve quality of user experience|
38
+ |`measurement`|`false`|Yes|Measure traffic and analyze behavior|
39
+ |`marketing`|`false`|Yes|Deliver personalized ads or marketing content|
40
+
41
+ The `necessary` category has `disabled: true` set internally, which prevents the user from toggling it off in the consent UI. All other categories can be freely toggled by the user.
42
+
43
+ Note that all categories except `necessary` have `display: false` by default. A category appears in the consent UI only if you include it in `consentCategories`. Categories not listed are hidden from the UI, but they still exist in consent state and may be affected by model-level behavior (for example, auto-grant in `opt-out` or `null` model flows).
44
+
45
+ Check if a specific category has consent using the `has()` method:
46
+
47
+ ```tsx
48
+ import { useConsentManager } from '@c15t/react';
49
+
50
+ function AnalyticsLoader() {
51
+ const { has } = useConsentManager();
52
+
53
+ if (has('measurement')) {
54
+ // Safe to load analytics scripts
55
+ }
56
+
57
+ return null;
58
+ }
59
+ ```
60
+
61
+ ## Configuring Categories
62
+
63
+ The `consentCategories` array controls which consent categories are presented to the user in the consent UI. Only categories you list in this array will appear as toggleable options in the consent banner or modal.
64
+
65
+ The `necessary` category is always implicitly included even if you do not add it to the array. You never need to worry about accidentally omitting it -- c15t ensures it is always present and always enabled.
66
+
67
+ For example, if you set:
68
+
69
+ ```
70
+ consentCategories: ['necessary', 'measurement', 'marketing']
71
+ ```
72
+
73
+ then only those three categories will show toggles in the consent UI. The `functionality` and `experience` categories will not appear as user-configurable toggles.
74
+
75
+ In `opt-in`/`iab` flows, hidden categories usually remain `false` unless you explicitly set them. In `opt-out`/`null` flows, categories may be auto-granted even when hidden.
76
+
77
+ This gives you precise control over which consent choices to present to your users. A simple blog that only runs an analytics script might only need `measurement`. A media site with ad integrations would include `marketing`. A SaaS application with personalization features might add `experience` and `functionality` as well. You choose what is relevant to your site and c15t handles the rest - storing consent state, exposing it through hooks, and ensuring the right categories are active based on the user's choices.
78
+
79
+ You can dynamically update which categories are active:
80
+
81
+ ```tsx
82
+ import { useConsentManager } from '@c15t/react';
83
+
84
+ function CategoryManager() {
85
+ const { consentCategories, setConsentCategories } = useConsentManager();
86
+
87
+ const addExperienceCategory = () => {
88
+ setConsentCategories([...consentCategories, 'experience']);
89
+ };
90
+
91
+ return (
92
+ <button onClick={addExperienceCategory}>
93
+ Enable experience features
94
+ </button>
95
+ );
96
+ }
97
+ ```
@@ -0,0 +1,112 @@
1
+ ---
2
+ title: Consent Models
3
+ description: How c15t determines consent behavior based on legal jurisdiction.
4
+ ---
5
+ c15t supports four consent models that control how consent defaults, banner visibility, and category gating behave:
6
+
7
+ |Model|Philosophy|Banner|Categories default to|
8
+ |--|--|--|--|
9
+ |`opt-in`|Explicit consent required|Blocking banner|`false` (except `necessary`)|
10
+ |`opt-out`|Processing allowed by default|Non-blocking notice|`true` (all granted)|
11
+ |`iab`|IAB TCF 2.3 for programmatic ads|TCF banner|Managed by TCF framework|
12
+ |`null`|No regulation detected|No banner|`true` (all auto-granted)|
13
+
14
+ There are two ways c15t determines which model applies:
15
+
16
+ 1. **Policy packs** (recommended) — you explicitly set the model per region in a `PolicyConfig`. This gives you full control over which regions get which model. See [Policy Packs](/docs/frameworks/react/concepts/policy-packs).
17
+
18
+ 2. **Automatic jurisdiction mapping** (legacy default) — when no policy pack is configured, c15t detects the visitor's jurisdiction via geolocation and maps it to a model using the table below. This still works but gives you less control over categories, UI, and scope.
19
+
20
+ > ℹ️ **Info:**
21
+ > When using policy packs, the consent.model field in each policy directly sets the model — the automatic jurisdiction mapping is bypassed for that request.
22
+
23
+ Read the current consent model from the hook:
24
+
25
+ ```tsx
26
+ import { useConsentManager } from '@c15t/react';
27
+
28
+ function ConsentStatus() {
29
+ const { model, policy } = useConsentManager();
30
+
31
+ return (
32
+ <p>
33
+ Current consent model: {model ?? 'detecting...'}
34
+ {policy && ` (from policy: ${policy.id})`}
35
+ </p>
36
+ );
37
+ }
38
+ ```
39
+
40
+ ## The Four Models
41
+
42
+ ### Opt-in
43
+
44
+ The strictest consent model, used for GDPR and similar regulations that require explicit, affirmative consent before any non-essential data processing occurs. All consent categories except `necessary` default to `false`. A consent banner must be shown before any tracking scripts load.
45
+
46
+ Applies to: EU (GDPR), UK (UK GDPR), Switzerland, Brazil (LGPD), Japan (APPI), South Korea (PIPA), Quebec (Law 25). Also the fallback for unknown jurisdiction codes.
47
+
48
+ ### Opt-out
49
+
50
+ Used for CCPA-style regulations where data processing is permitted by default until the user exercises their right to opt out. All consent categories default to `true`. A blocking banner is not required — the typical pattern is a non-intrusive notice or footer link.
51
+
52
+ Applies to: California (CCPA), Canada (PIPEDA), Australia.
53
+
54
+ When the policy has `consent.gpc: true`, the browser's Global Privacy Control signal (`Sec-GPC: 1` or `navigator.globalPrivacyControl`) is respected — `marketing` and `measurement` are denied while other categories remain granted. The built-in California presets enable this by default. See [Policy Packs — GPC](/docs/frameworks/react/concepts/policy-packs#gpc) for details.
55
+
56
+ ### IAB
57
+
58
+ IAB Transparency and Consent Framework (TCF) 2.3 mode for programmatic advertising compliance. Only activates when two conditions are met: the jurisdiction is `GDPR` or `UK_GDPR`, and `iab.enabled` is `true` in your configuration.
59
+
60
+ When active, IAB mode generates TC strings, registers the `__tcfapi` CMP API, and works with the Global Vendor List (GVL) for machine-readable consent signals. If `iab.enabled` is not set, GDPR jurisdictions fall back to standard opt-in.
61
+
62
+ ### null
63
+
64
+ Returned when no jurisdiction is detected (`NONE` or `null`). No banner is displayed. On first visit, all categories are auto-granted.
65
+
66
+ ## Jurisdiction Mapping
67
+
68
+ When no policy pack is configured, c15t maps jurisdictions to models automatically:
69
+
70
+ |Jurisdiction Code|Region|Consent Model|
71
+ |--|--|--|
72
+ |`GDPR`|European Union|opt-in|
73
+ |`UK_GDPR`|United Kingdom|opt-in|
74
+ |`CH`|Switzerland|opt-in|
75
+ |`BR`|Brazil (LGPD)|opt-in|
76
+ |`APPI`|Japan|opt-in|
77
+ |`PIPA`|South Korea|opt-in|
78
+ |`PIPEDA`|Canada (excl. Quebec)|opt-out|
79
+ |`QC_LAW25`|Quebec, Canada|opt-in|
80
+ |`CCPA`|California, USA|opt-out|
81
+ |`AU`|Australia|opt-out|
82
+ |`NONE`|No jurisdiction|null|
83
+ |*(unknown)*|Any other|opt-in|
84
+
85
+ **IAB override:** If `iab.enabled: true` and the jurisdiction is `GDPR` or `UK_GDPR`, the model becomes `'iab'` instead of `'opt-in'`. This override only applies to those two jurisdictions.
86
+
87
+ > ℹ️ **Info:**
88
+ > With policy packs, you set the model explicitly per policy — the automatic mapping above is only used as a fallback when no policy pack is configured, or for non-policy-pack features like auto-granting in opt-out jurisdictions.
89
+
90
+ Override the detected jurisdiction for testing:
91
+
92
+ ```tsx
93
+ import { useConsentManager } from '@c15t/react';
94
+
95
+ function JurisdictionTester() {
96
+ const { setOverrides } = useConsentManager();
97
+
98
+ return (
99
+ <div>
100
+ <button onClick={() => setOverrides({ country: 'DE' })}>
101
+ Test as EU visitor
102
+ </button>
103
+ <button onClick={() => setOverrides({ country: 'US', region: 'CA' })}>
104
+ Test as California visitor
105
+ </button>
106
+ </div>
107
+ );
108
+ }
109
+ ```
110
+
111
+ > ℹ️ **Info:**
112
+ > For full control over which model applies where — plus UI customization, category scoping, and re-prompting — see Policy Packs.