@c15t/react 2.0.4 → 2.2.0-canary-20260727202135

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 (332) hide show
  1. package/AGENTS.md +155 -0
  2. package/README.md +29 -14
  3. package/client/components/integrations.js +3 -0
  4. package/dist/components/consent-banner/atoms/overlay.cjs +1 -1
  5. package/dist/components/consent-banner/atoms/root.cjs +1 -1
  6. package/dist/components/consent-banner/components.cjs +1 -1
  7. package/dist/components/consent-banner/consent-banner.cjs +1 -1
  8. package/dist/components/consent-banner/error-boundary.cjs +1 -1
  9. package/dist/components/consent-banner/index.cjs +1 -1
  10. package/dist/components/consent-banner/policy-actions.cjs +1 -1
  11. package/dist/components/consent-dialog/atoms/card.cjs +1 -1
  12. package/dist/components/consent-dialog/atoms/overlay.cjs +1 -1
  13. package/dist/components/consent-dialog/atoms/root.cjs +1 -1
  14. package/dist/components/consent-dialog/consent-dialog.cjs +1 -1
  15. package/dist/components/consent-dialog/index.cjs +1 -1
  16. package/dist/components/consent-dialog-link/index.cjs +1 -1
  17. package/dist/components/consent-dialog-trigger/atoms/button.cjs +1 -1
  18. package/dist/components/consent-dialog-trigger/atoms/button.js +1 -1
  19. package/dist/components/consent-dialog-trigger/atoms/icon.cjs +1 -1
  20. package/dist/components/consent-dialog-trigger/atoms/root.cjs +1 -1
  21. package/dist/components/consent-dialog-trigger/atoms/text.cjs +1 -1
  22. package/dist/components/consent-dialog-trigger/atoms/toolbar.cjs +1 -0
  23. package/dist/components/consent-dialog-trigger/atoms/toolbar.js +1 -0
  24. package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.cjs +1 -0
  25. package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.js +1 -0
  26. package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +1 -1
  27. package/dist/components/consent-dialog-trigger/index.cjs +1 -1
  28. package/dist/components/consent-dialog-trigger/index.js +1 -1
  29. package/dist/components/consent-dialog-trigger/use-draggable.cjs +1 -1
  30. package/dist/components/consent-preferences-link/consent-preferences-link.cjs +1 -1
  31. package/dist/components/consent-preferences-link/index.cjs +1 -1
  32. package/dist/components/consent-widget/atoms/accordion.cjs +1 -1
  33. package/dist/components/consent-widget/atoms/button.cjs +1 -1
  34. package/dist/components/consent-widget/atoms/footer.cjs +1 -1
  35. package/dist/components/consent-widget/atoms/root.cjs +1 -1
  36. package/dist/components/consent-widget/consent-widget.cjs +1 -1
  37. package/dist/components/consent-widget/index.cjs +1 -1
  38. package/dist/components/consent-widget/policy-actions.cjs +1 -1
  39. package/dist/components/frame/atoms.cjs +1 -1
  40. package/dist/components/frame/atoms.js +1 -1
  41. package/dist/components/frame/frame.cjs +1 -1
  42. package/dist/components/frame/index.cjs +1 -1
  43. package/dist/components/iab-consent-banner/atoms/button-group.cjs +1 -1
  44. package/dist/components/iab-consent-banner/atoms/card.cjs +1 -1
  45. package/dist/components/iab-consent-banner/atoms/description.cjs +1 -1
  46. package/dist/components/iab-consent-banner/atoms/footer.cjs +1 -1
  47. package/dist/components/iab-consent-banner/atoms/header.cjs +1 -1
  48. package/dist/components/iab-consent-banner/atoms/overlay.cjs +1 -1
  49. package/dist/components/iab-consent-banner/atoms/root.cjs +1 -1
  50. package/dist/components/iab-consent-banner/atoms/title.cjs +1 -1
  51. package/dist/components/iab-consent-banner/iab-consent-banner.cjs +1 -1
  52. package/dist/components/iab-consent-banner/iab-consent-banner.js +1 -1
  53. package/dist/components/iab-consent-banner/index.cjs +1 -1
  54. package/dist/components/iab-consent-dialog/atoms/card.cjs +1 -1
  55. package/dist/components/iab-consent-dialog/atoms/content.cjs +1 -1
  56. package/dist/components/iab-consent-dialog/atoms/footer.cjs +1 -1
  57. package/dist/components/iab-consent-dialog/atoms/header.cjs +1 -1
  58. package/dist/components/iab-consent-dialog/atoms/overlay.cjs +1 -1
  59. package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +1 -1
  60. package/dist/components/iab-consent-dialog/atoms/root.cjs +1 -1
  61. package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +1 -1
  62. package/dist/components/iab-consent-dialog/atoms/tabs.cjs +1 -1
  63. package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +1 -1
  64. package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +1 -1
  65. package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +1 -1
  66. package/dist/components/iab-consent-dialog/index.cjs +1 -1
  67. package/dist/components/iab-consent-dialog/use-iab-translations.cjs +1 -1
  68. package/dist/components/integrations/google-map.cjs +1 -0
  69. package/dist/components/integrations/google-map.js +1 -0
  70. package/dist/components/integrations/index.cjs +1 -0
  71. package/dist/components/integrations/index.js +1 -0
  72. package/dist/components/integrations/shared.cjs +1 -0
  73. package/dist/components/integrations/shared.js +1 -0
  74. package/dist/components/integrations/youtube-embed.cjs +1 -0
  75. package/dist/components/integrations/youtube-embed.js +1 -0
  76. package/dist/components/shared/libs/recursive-clone-children.cjs +1 -1
  77. package/dist/components/shared/libs/slot.cjs +1 -1
  78. package/dist/components/shared/libs/use-controllable-state.cjs +1 -1
  79. package/dist/components/shared/policy-actions.cjs +1 -1
  80. package/dist/components/shared/primitives/box.cjs +1 -1
  81. package/dist/components/shared/primitives/button.cjs +1 -1
  82. package/dist/components/shared/primitives/button.js +1 -1
  83. package/dist/components/shared/primitives/legal-links/index.cjs +1 -1
  84. package/dist/components/shared/primitives/legal-links/index.js +1 -1
  85. package/dist/components/shared/ui/accordion/accordion.cjs +1 -1
  86. package/dist/components/shared/ui/accordion/index.cjs +1 -1
  87. package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +1 -1
  88. package/dist/components/shared/ui/animated-collapse/index.cjs +1 -1
  89. package/dist/components/shared/ui/branding.cjs +1 -1
  90. package/dist/components/shared/ui/button/button.cjs +1 -1
  91. package/dist/components/shared/ui/button/index.cjs +1 -1
  92. package/dist/components/shared/ui/collapsible/collapsible.cjs +1 -1
  93. package/dist/components/shared/ui/collapsible/index.cjs +1 -1
  94. package/dist/components/shared/ui/dialog/dialog.cjs +1 -1
  95. package/dist/components/shared/ui/dialog/index.cjs +1 -1
  96. package/dist/components/shared/ui/icon.cjs +1 -1
  97. package/dist/components/shared/ui/logo.cjs +1 -1
  98. package/dist/components/shared/ui/preference-item/index.cjs +1 -1
  99. package/dist/components/shared/ui/preference-item/preference-item.cjs +1 -1
  100. package/dist/components/shared/ui/switch/index.cjs +1 -1
  101. package/dist/components/shared/ui/switch/switch.cjs +1 -1
  102. package/dist/components/shared/ui/tabs/index.cjs +1 -1
  103. package/dist/components/shared/ui/tabs/tabs.cjs +1 -1
  104. package/dist/context/consent-manager-context.cjs +1 -1
  105. package/dist/context/consent-tracking-context.cjs +1 -1
  106. package/dist/context/theme-context.cjs +1 -1
  107. package/dist/headless.cjs +1 -1
  108. package/dist/headless.js +1 -1
  109. package/dist/hooks/index.cjs +1 -1
  110. package/dist/hooks/index.js +1 -1
  111. package/dist/hooks/use-color-scheme.cjs +1 -1
  112. package/dist/hooks/use-component-config.cjs +1 -1
  113. package/dist/hooks/use-consent-dialog-trigger.cjs +1 -1
  114. package/dist/hooks/use-consent-manager.cjs +1 -1
  115. package/dist/hooks/use-consent-script.cjs +1 -0
  116. package/dist/hooks/use-consent-script.js +1 -0
  117. package/dist/hooks/use-focus-trap.cjs +1 -1
  118. package/dist/hooks/use-headless-consent-ui.cjs +1 -1
  119. package/dist/hooks/use-headless-iab-consent-ui.cjs +1 -1
  120. package/dist/hooks/use-reduced-motion.cjs +1 -1
  121. package/dist/hooks/use-scroll-lock.cjs +1 -1
  122. package/dist/hooks/use-ssr-status.cjs +1 -1
  123. package/dist/hooks/use-styles.cjs +1 -1
  124. package/dist/hooks/use-text-direction.cjs +1 -1
  125. package/dist/hooks/use-theme.cjs +1 -1
  126. package/dist/hooks/use-translations.cjs +1 -1
  127. package/dist/iab.cjs +1 -1
  128. package/dist/index.cjs +1 -1
  129. package/dist/index.js +1 -1
  130. package/dist/primitives/accordion.cjs +1 -1
  131. package/dist/primitives/button.cjs +1 -1
  132. package/dist/primitives/collapsible.cjs +1 -1
  133. package/dist/primitives/dialog.cjs +1 -1
  134. package/dist/primitives/preference-item.cjs +1 -1
  135. package/dist/primitives/switch.cjs +1 -1
  136. package/dist/primitives/tabs.cjs +1 -1
  137. package/dist/primitives.cjs +1 -1
  138. package/dist/providers/consent-manager-provider.cjs +1 -1
  139. package/dist/server/fetch-ssr-data.cjs +1 -1
  140. package/dist/server/fetch-ssr-data.js +1 -1
  141. package/dist/server/headers.cjs +1 -1
  142. package/dist/server/headers.js +1 -1
  143. package/dist/server/index.cjs +1 -1
  144. package/dist/server/init-cache-key.cjs +1 -1
  145. package/dist/server/normalize-url.cjs +1 -1
  146. package/dist/styles.tw3.css +1 -1
  147. package/dist/types/theme/index.cjs +1 -1
  148. package/dist/types/theme/style-types.cjs +1 -1
  149. package/dist/utils/cn.cjs +1 -1
  150. package/dist/utils/merge-styles.cjs +1 -1
  151. package/dist/utils/test-helpers.cjs +1 -1
  152. package/dist/utils/theme-utils.cjs +1 -1
  153. package/dist/version.cjs +1 -1
  154. package/dist/version.js +1 -1
  155. package/dist-types/components/consent-banner/components.d.ts +2 -2
  156. package/dist-types/components/consent-banner/policy-actions.d.ts +1 -1
  157. package/dist-types/components/consent-dialog/atoms/card.d.ts +5 -5
  158. package/dist-types/components/consent-dialog-trigger/atoms/toolbar.d.ts +22 -0
  159. package/dist-types/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.d.ts +35 -0
  160. package/dist-types/components/consent-dialog-trigger/index.d.ts +2 -1
  161. package/dist-types/components/consent-dialog-trigger/types.d.ts +111 -6
  162. package/dist-types/components/consent-widget/atoms/accordion.d.ts +4 -4
  163. package/dist-types/components/consent-widget/consent-widget.d.ts +1 -1
  164. package/dist-types/components/consent-widget/policy-actions.d.ts +1 -1
  165. package/dist-types/components/integrations/google-map.d.ts +82 -0
  166. package/dist-types/components/integrations/index.d.ts +2 -0
  167. package/dist-types/components/integrations/shared.d.ts +12 -0
  168. package/dist-types/components/integrations/youtube-embed.d.ts +95 -0
  169. package/dist-types/components/shared/policy-actions.d.ts +1 -1
  170. package/dist-types/components/shared/primitives/button.d.ts +36 -2
  171. package/dist-types/components/shared/primitives/legal-links/index.d.ts +1 -1
  172. package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
  173. package/dist-types/components/shared/ui/branding.d.ts +3 -3
  174. package/dist-types/components/shared/ui/button/button.d.ts +1 -1
  175. package/dist-types/components/shared/ui/dialog/dialog.d.ts +1 -1
  176. package/dist-types/components/shared/ui/logo.d.ts +8 -8
  177. package/dist-types/headless.d.ts +1 -0
  178. package/dist-types/hooks/index.d.ts +1 -0
  179. package/dist-types/hooks/use-consent-script.d.ts +80 -0
  180. package/dist-types/index.d.ts +3 -1
  181. package/dist-types/providers/consent-manager-provider.d.ts +1 -1
  182. package/dist-types/server/headers.d.ts +1 -1
  183. package/dist-types/utils/theme-utils.d.ts +1 -1
  184. package/dist-types/version.d.ts +1 -1
  185. package/docs/README.md +155 -76
  186. package/docs/{building-headless-components.md → frameworks/react/building-headless-components.md} +3 -1
  187. package/docs/{callbacks.md → frameworks/react/callbacks.md} +3 -1
  188. package/docs/{components → frameworks/react/components}/consent-banner.md +10 -21
  189. package/docs/{components → frameworks/react/components}/consent-dialog-link.md +8 -5
  190. package/docs/frameworks/react/components/consent-dialog-trigger.md +202 -0
  191. package/docs/{components → frameworks/react/components}/consent-dialog.md +7 -15
  192. package/docs/frameworks/react/components/consent-manager-provider.md +228 -0
  193. package/docs/{components → frameworks/react/components}/consent-widget.md +8 -6
  194. package/docs/{components → frameworks/react/components}/dev-tools.md +9 -6
  195. package/docs/{components → frameworks/react/components}/frame.md +8 -9
  196. package/docs/{concepts → frameworks/react/concepts}/client-modes.md +4 -2
  197. package/docs/{concepts → frameworks/react/concepts}/consent-categories.md +1 -0
  198. package/docs/{concepts → frameworks/react/concepts}/consent-models.md +1 -0
  199. package/docs/{concepts → frameworks/react/concepts}/cookie-management.md +3 -3
  200. package/docs/{concepts → frameworks/react/concepts}/glossary.md +1 -0
  201. package/docs/{concepts → frameworks/react/concepts}/initialization-flow.md +1 -0
  202. package/docs/{concepts → frameworks/react/concepts}/policy-packs.md +1 -0
  203. package/docs/{headless.md → frameworks/react/headless.md} +3 -1
  204. package/docs/{hooks → frameworks/react/hooks}/use-color-scheme.md +1 -0
  205. package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/checking-consent.md +3 -1
  206. package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/location-info.md +3 -1
  207. package/docs/frameworks/react/hooks/use-consent-manager/overview.md +172 -0
  208. package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/setting-consent.md +3 -1
  209. package/docs/{hooks → frameworks/react/hooks}/use-draggable.md +3 -1
  210. package/docs/{hooks → frameworks/react/hooks}/use-focus-trap.md +1 -0
  211. package/docs/{hooks → frameworks/react/hooks}/use-reduced-motion.md +3 -1
  212. package/docs/{hooks → frameworks/react/hooks}/use-ssr-status.md +6 -5
  213. package/docs/{hooks → frameworks/react/hooks}/use-text-direction.md +1 -0
  214. package/docs/frameworks/react/hooks/use-translations.md +55 -0
  215. package/docs/{iab → frameworks/react/iab}/consent-banner.md +9 -12
  216. package/docs/{iab → frameworks/react/iab}/consent-dialog.md +9 -14
  217. package/docs/{iab → frameworks/react/iab}/overview.md +4 -2
  218. package/docs/{iab → frameworks/react/iab}/use-gvl-data.md +3 -2
  219. package/docs/{iframe-blocking.md → frameworks/react/iframe-blocking.md} +8 -9
  220. package/docs/{internationalization.md → frameworks/react/internationalization.md} +13 -3
  221. package/docs/{network-blocker.md → frameworks/react/network-blocker.md} +13 -51
  222. package/docs/{optimization.md → frameworks/react/optimization.md} +3 -2
  223. package/docs/{policy-packs.md → frameworks/react/policy-packs.md} +3 -1
  224. package/docs/{quickstart.md → frameworks/react/quickstart.md} +26 -42
  225. package/docs/frameworks/react/script-loader.md +553 -0
  226. package/docs/{server-side.md → frameworks/react/server-side.md} +9 -4
  227. package/docs/{styling → frameworks/react/styling}/classnames.md +3 -1
  228. package/docs/{styling → frameworks/react/styling}/color-scheme.md +3 -1
  229. package/docs/frameworks/react/styling/css-variables.md +53 -0
  230. package/docs/frameworks/react/styling/overview.md +302 -0
  231. package/docs/frameworks/react/styling/slots.md +94 -0
  232. package/docs/{styling → frameworks/react/styling}/tailwind.md +3 -1
  233. package/docs/frameworks/react/styling/tokens.md +156 -0
  234. package/docs/{troubleshooting.md → frameworks/react/troubleshooting.md} +3 -1
  235. package/docs/integrations/adobe-analytics.md +160 -0
  236. package/docs/integrations/ahrefs-analytics.md +157 -0
  237. package/docs/integrations/amplitude.md +230 -0
  238. package/docs/integrations/building-integrations.md +15 -181
  239. package/docs/integrations/clearbit.md +130 -0
  240. package/docs/integrations/cloudflare-web-analytics.md +126 -0
  241. package/docs/integrations/crisp.md +140 -0
  242. package/docs/integrations/databuddy.md +152 -150
  243. package/docs/integrations/fathom-analytics.md +150 -0
  244. package/docs/integrations/google-maps.md +263 -0
  245. package/docs/integrations/google-tag-manager.md +102 -101
  246. package/docs/integrations/google-tag.md +104 -92
  247. package/docs/integrations/heap.md +219 -0
  248. package/docs/integrations/hightouch.md +199 -0
  249. package/docs/integrations/hotjar.md +143 -0
  250. package/docs/integrations/intercom.md +144 -0
  251. package/docs/integrations/linkedin-insights.md +142 -90
  252. package/docs/integrations/logrocket.md +175 -0
  253. package/docs/integrations/matomo-analytics.md +171 -0
  254. package/docs/integrations/meta-pixel.md +379 -309
  255. package/docs/integrations/microsoft-clarity.md +173 -0
  256. package/docs/integrations/microsoft-uet.md +135 -91
  257. package/docs/integrations/mixpanel-analytics.md +130 -0
  258. package/docs/integrations/overview.md +119 -75
  259. package/docs/integrations/pirsch.md +142 -0
  260. package/docs/integrations/plausible-analytics.md +154 -0
  261. package/docs/integrations/posthog.md +186 -127
  262. package/docs/integrations/promptwatch.md +121 -0
  263. package/docs/integrations/reddit-pixel.md +241 -0
  264. package/docs/integrations/rudderstack.md +271 -0
  265. package/docs/integrations/rybbit-analytics.md +143 -0
  266. package/docs/integrations/segment.md +146 -0
  267. package/docs/integrations/snapchat-pixel.md +163 -0
  268. package/docs/integrations/tiktok-pixel.md +101 -91
  269. package/docs/integrations/umami-analytics.md +148 -0
  270. package/docs/integrations/vercel-analytics.md +141 -0
  271. package/docs/integrations/x-pixel.md +123 -109
  272. package/docs/integrations/youtube.md +193 -0
  273. package/docs/shared/concepts/client-modes.md +103 -0
  274. package/docs/shared/concepts/consent-categories.md +41 -0
  275. package/docs/shared/concepts/consent-models.md +72 -0
  276. package/docs/shared/concepts/cookie-management.md +88 -0
  277. package/docs/shared/concepts/glossary.md +24 -0
  278. package/docs/shared/concepts/initialization-flow.md +105 -0
  279. package/docs/shared/concepts/policy-packs.md +225 -0
  280. package/docs/shared/react/components/consent-banner.md +242 -0
  281. package/docs/shared/react/components/consent-dialog-link.md +45 -0
  282. package/docs/shared/react/components/consent-dialog-trigger.md +185 -0
  283. package/docs/shared/react/components/consent-dialog.md +119 -0
  284. package/docs/shared/react/components/consent-manager-provider.md +183 -0
  285. package/docs/shared/react/components/consent-widget.md +121 -0
  286. package/docs/shared/react/components/dev-tools.md +81 -0
  287. package/docs/shared/react/components/frame.md +52 -0
  288. package/docs/shared/react/guides/building-headless-components.md +110 -0
  289. package/docs/shared/react/guides/callbacks.md +89 -0
  290. package/docs/shared/react/guides/headless.md +31 -0
  291. package/docs/shared/react/guides/iframe-blocking.md +65 -0
  292. package/docs/shared/react/guides/internationalization.md +123 -0
  293. package/docs/shared/react/guides/network-blocker.md +72 -0
  294. package/docs/shared/react/guides/optimization.md +44 -0
  295. package/docs/shared/react/guides/policy-packs.md +173 -0
  296. package/docs/shared/react/guides/script-loader.md +309 -0
  297. package/docs/shared/react/hooks/use-color-scheme.md +31 -0
  298. package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +95 -0
  299. package/docs/shared/react/hooks/use-consent-manager/location-info.md +96 -0
  300. package/docs/shared/react/hooks/use-consent-manager/overview.md +74 -0
  301. package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +93 -0
  302. package/docs/shared/react/hooks/use-draggable.md +30 -0
  303. package/docs/shared/react/hooks/use-focus-trap.md +20 -0
  304. package/docs/shared/react/hooks/use-reduced-motion.md +33 -0
  305. package/docs/shared/react/hooks/use-ssr-status.md +16 -0
  306. package/docs/shared/react/hooks/use-text-direction.md +38 -0
  307. package/docs/shared/react/hooks/use-translations.md +15 -0
  308. package/docs/shared/react/iab/consent-banner.md +60 -0
  309. package/docs/shared/react/iab/consent-dialog.md +76 -0
  310. package/docs/shared/react/iab/overview.md +80 -0
  311. package/docs/shared/react/iab/use-gvl-data.md +21 -0
  312. package/docs/shared/react/styling/classnames.md +93 -0
  313. package/docs/shared/react/styling/color-scheme.md +35 -0
  314. package/docs/shared/react/styling/css-variables.md +53 -0
  315. package/docs/shared/react/styling/overview.md +261 -0
  316. package/docs/shared/react/styling/slots.md +93 -0
  317. package/docs/shared/react/styling/stylesheet-entrypoint.md +8 -0
  318. package/docs/shared/react/styling/tailwind.md +88 -0
  319. package/docs/shared/react/styling/tokens.md +155 -0
  320. package/docs/shared/troubleshooting.md +82 -0
  321. package/package.json +23 -12
  322. package/readme.json +12 -7
  323. package/docs/ai-agents.md +0 -111
  324. package/docs/components/consent-dialog-trigger.md +0 -103
  325. package/docs/components/consent-manager-provider.md +0 -425
  326. package/docs/hooks/use-consent-manager/overview.md +0 -420
  327. package/docs/hooks/use-translations.md +0 -118
  328. package/docs/script-loader.md +0 -321
  329. package/docs/styling/css-variables.md +0 -92
  330. package/docs/styling/overview.md +0 -460
  331. package/docs/styling/slots.md +0 -128
  332. package/docs/styling/tokens.md +0 -216
@@ -37,7 +37,7 @@ declare const ConsentBannerTitle: import("react").ForwardRefExoticComponent<Omit
37
37
  * ```
38
38
  */
39
39
  declare const ConsentBannerDescription: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & {
40
- legalLinks?: InlineLegalLinksProps["links"];
40
+ legalLinks?: InlineLegalLinksProps['links'];
41
41
  } & import("react").RefAttributes<HTMLDivElement>>;
42
42
  /**
43
43
  * Footer component for the consent banner.
@@ -129,7 +129,7 @@ declare const ConsentBannerCustomizeButton: import("react").ForwardRefExoticComp
129
129
  declare const ConsentBannerAcceptButton: import("react").ForwardRefExoticComponent<ConsentButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
130
130
  declare const Title: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
131
131
  declare const Description: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & {
132
- legalLinks?: InlineLegalLinksProps["links"];
132
+ legalLinks?: InlineLegalLinksProps['links'];
133
133
  } & import("react").RefAttributes<HTMLDivElement>>;
134
134
  declare const Footer: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
135
135
  declare const FooterSubGroup: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -6,6 +6,6 @@ export interface ConsentBannerPolicyActionRenderProps extends PolicyActionRender
6
6
  export interface ConsentBannerPolicyActionsProps {
7
7
  renderAction?: (action: HeadlessConsentBannerAction, props: ConsentBannerPolicyActionRenderProps) => ReactNode;
8
8
  }
9
- export declare function ConsentBannerPolicyActions({ renderAction, }: ConsentBannerPolicyActionsProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function ConsentBannerPolicyActions({ renderAction, }: ConsentBannerPolicyActionsProps): import("react").JSX.Element;
10
10
  declare const PolicyActions: typeof ConsentBannerPolicyActions;
11
11
  export { PolicyActions };
@@ -38,7 +38,7 @@ declare const ConsentDialogHeaderTitle: import("react").ForwardRefExoticComponen
38
38
  * - Can include legal links inline with the description
39
39
  */
40
40
  declare const ConsentDialogHeaderDescription: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & {
41
- legalLinks?: InlineLegalLinksProps["links"];
41
+ legalLinks?: InlineLegalLinksProps['links'];
42
42
  } & import("react").RefAttributes<HTMLDivElement>>;
43
43
  /**
44
44
  * The main content area of the consent dialog.
@@ -65,7 +65,7 @@ type BrandingProps = {
65
65
  className?: string;
66
66
  'data-testid'?: string;
67
67
  };
68
- export declare function Branding(props: BrandingProps): import("react/jsx-runtime").JSX.Element;
68
+ export declare function Branding(props: BrandingProps): import("react").JSX.Element;
69
69
  /**
70
70
  * A pre-configured privacy settings card.
71
71
  * Combines all consent dialog components with default content for privacy customization.
@@ -91,9 +91,9 @@ export declare function Branding(props: BrandingProps): import("react/jsx-runtim
91
91
  */
92
92
  declare const ConsentCustomizationCard: ({ noStyle, legalLinks, hideBranding, }: {
93
93
  noStyle?: boolean;
94
- legalLinks?: InlineLegalLinksProps["links"];
94
+ legalLinks?: InlineLegalLinksProps['links'];
95
95
  hideBranding?: boolean;
96
- }) => import("react/jsx-runtime").JSX.Element;
96
+ }) => import("react").JSX.Element;
97
97
  declare const Card: import("react").ForwardRefExoticComponent<{
98
98
  /** The content to be rendered inside the consent dialog card */
99
99
  children?: ReactNode;
@@ -101,7 +101,7 @@ declare const Card: import("react").ForwardRefExoticComponent<{
101
101
  declare const Header: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
102
102
  declare const HeaderTitle: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
103
103
  declare const HeaderDescription: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & {
104
- legalLinks?: InlineLegalLinksProps["links"];
104
+ legalLinks?: InlineLegalLinksProps['links'];
105
105
  } & import("react").RefAttributes<HTMLDivElement>>;
106
106
  declare const Content: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
107
107
  declare const Footer: import("react").ForwardRefExoticComponent<BoxProps & {
@@ -0,0 +1,22 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { ClassNameStyle } from '../../../types/theme';
3
+ import type { ConsentDialogTriggerToolbarAction, ConsentDialogTriggerToolbarPreferences, TriggerOrientation, TriggerSize } from '../types';
4
+ export interface TriggerToolbarProps extends Omit<ClassNameStyle, 'baseClassName'> {
5
+ /** App-owned actions rendered alongside the preferences action. */
6
+ actions: readonly ConsentDialogTriggerToolbarAction[];
7
+ /** Customization for the built-in preferences action. */
8
+ preferences: ConsentDialogTriggerToolbarPreferences;
9
+ /** Size of each toolbar item. @default 'md' */
10
+ size?: TriggerSize;
11
+ /** Layout direction for the toolbar. @default 'horizontal' */
12
+ orientation?: TriggerOrientation;
13
+ /** Accessible name for the toolbar group. @default 'Privacy controls' */
14
+ ariaLabel?: string;
15
+ }
16
+ /**
17
+ * A draggable group of app-owned actions and one built-in preferences action.
18
+ */
19
+ export declare function TriggerToolbar({ actions, preferences, size, orientation, ariaLabel, className, style, noStyle, }: TriggerToolbarProps): ReactNode;
20
+ export declare namespace TriggerToolbar {
21
+ var displayName: string;
22
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Standalone configurable toolbar for resurfacing consent preferences alongside
3
+ * app-owned controls.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ import type { ReactNode } from 'react';
8
+ import type { ConsentDialogTriggerToolbarProps } from './types';
9
+ /**
10
+ * A draggable toolbar that always includes one action for opening consent
11
+ * preferences and can include app-owned actions such as theme or support
12
+ * controls.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <ConsentDialogTriggerToolbar
17
+ * ariaLabel="Website controls"
18
+ * actions={[
19
+ * {
20
+ * id: 'theme',
21
+ * label: 'Switch to dark theme',
22
+ * icon: <MoonIcon />,
23
+ * pressed: isDark,
24
+ * onSelect: toggleTheme,
25
+ * },
26
+ * ]}
27
+ * />
28
+ * ```
29
+ *
30
+ * @returns The toolbar portal, or `null` while hidden or server-rendered.
31
+ */
32
+ export declare function ConsentDialogTriggerToolbar({ actions, preferences, orientation, defaultPosition, persistPosition, ariaLabel, showWhen, size, className, style, noStyle, onPositionChange, }: ConsentDialogTriggerToolbarProps): ReactNode;
33
+ export declare namespace ConsentDialogTriggerToolbar {
34
+ var displayName: string;
35
+ }
@@ -4,5 +4,6 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
  export { ConsentDialogTrigger, type ConsentDialogTriggerCompound, TriggerButton, type TriggerButtonProps, TriggerIcon, type TriggerIconProps, TriggerRoot, type TriggerRootProps, TriggerText, type TriggerTextProps, useTriggerContext, } from './consent-dialog-trigger';
7
- export type { ConsentDialogTriggerProps, CornerPosition, TriggerIcon as TriggerIconType, TriggerSize, TriggerVisibility, } from './types';
7
+ export { ConsentDialogTriggerToolbar } from './consent-dialog-trigger-toolbar';
8
+ export type { ConsentDialogTriggerProps, ConsentDialogTriggerToolbarAction, ConsentDialogTriggerToolbarPreferences, ConsentDialogTriggerToolbarProps, CornerPosition, TriggerIcon as TriggerIconType, TriggerOrientation, TriggerSize, TriggerVisibility, } from './types';
8
9
  export { type UseDraggableOptions, type UseDraggableReturn, useDraggable, } from './use-draggable';
@@ -1,12 +1,13 @@
1
1
  /**
2
- * Type definitions for the ConsentDialogTrigger component.
2
+ * Type definitions for the consent dialog trigger components.
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
6
  import type { CornerPosition } from '@c15t/ui/utils/trigger-utils';
7
7
  import type { ReactNode } from 'react';
8
+ import type { ClassNameStyle } from '../../types/theme';
8
9
  /**
9
- * Icon options for the trigger button.
10
+ * Icon rendered by a consent dialog trigger control.
10
11
  *
11
12
  * - `'branding'` - Shows c15t or INTH logo based on branding setting
12
13
  * - `'fingerprint'` - Generic fingerprint/privacy icon
@@ -15,7 +16,7 @@ import type { ReactNode } from 'react';
15
16
  */
16
17
  export type TriggerIcon = 'branding' | 'fingerprint' | 'settings' | ReactNode;
17
18
  /**
18
- * Visibility options for when to show the trigger.
19
+ * Visibility options for when to show a trigger.
19
20
  *
20
21
  * - `'always'` - Always visible
21
22
  * - `'after-consent'` - Only visible after user has made a consent choice
@@ -23,11 +24,15 @@ export type TriggerIcon = 'branding' | 'fingerprint' | 'settings' | ReactNode;
23
24
  */
24
25
  export type TriggerVisibility = 'always' | 'after-consent' | 'never';
25
26
  /**
26
- * Size options for the trigger button.
27
+ * Size options for trigger controls.
27
28
  */
28
29
  export type TriggerSize = 'sm' | 'md' | 'lg';
29
30
  /**
30
- * Props for the ConsentDialogTrigger component.
31
+ * Layout direction for the consent dialog trigger toolbar.
32
+ */
33
+ export type TriggerOrientation = 'horizontal' | 'vertical';
34
+ /**
35
+ * Props for the existing single-button ConsentDialogTrigger component.
31
36
  */
32
37
  export interface ConsentDialogTriggerProps {
33
38
  /**
@@ -78,7 +83,7 @@ export interface ConsentDialogTriggerProps {
78
83
  */
79
84
  size?: TriggerSize;
80
85
  /**
81
- * Callback fired when the trigger is clicked (before opening dialog).
86
+ * Callback fired when the trigger is clicked, before opening the dialog.
82
87
  */
83
88
  onClick?: () => void;
84
89
  /**
@@ -86,6 +91,106 @@ export interface ConsentDialogTriggerProps {
86
91
  */
87
92
  onPositionChange?: (position: CornerPosition) => void;
88
93
  }
94
+ /**
95
+ * A custom action displayed in ConsentDialogTriggerToolbar.
96
+ */
97
+ export interface ConsentDialogTriggerToolbarAction {
98
+ /** Stable key for the action. */
99
+ id: string;
100
+ /** Accessible name announced for the action button. */
101
+ label: string;
102
+ /** Icon displayed in the action. */
103
+ icon: TriggerIcon;
104
+ /** Callback fired when the action is selected. */
105
+ onSelect: () => void;
106
+ /** Whether the action is disabled. */
107
+ disabled?: boolean;
108
+ /** Whether the action represents a currently active toggle state. */
109
+ pressed?: boolean;
110
+ /** Additional CSS class names for the action button. */
111
+ className?: string;
112
+ /** Inline styles for the action button. */
113
+ style?: ClassNameStyle['style'];
114
+ }
115
+ /**
116
+ * Customization for the toolbar's built-in privacy preferences action.
117
+ */
118
+ export interface ConsentDialogTriggerToolbarPreferences {
119
+ /**
120
+ * Accessible name announced for the preferences button.
121
+ *
122
+ * @default 'Open privacy settings'
123
+ */
124
+ label?: string;
125
+ /**
126
+ * Icon displayed in the preferences button.
127
+ *
128
+ * @default 'branding'
129
+ */
130
+ icon?: TriggerIcon;
131
+ /** Callback fired before the preferences dialog opens. */
132
+ onSelect?: () => void;
133
+ /** Additional CSS class names for the preferences button. */
134
+ className?: string;
135
+ /** Inline styles for the preferences button. */
136
+ style?: ClassNameStyle['style'];
137
+ }
138
+ /**
139
+ * Props for the standalone ConsentDialogTriggerToolbar component.
140
+ */
141
+ export interface ConsentDialogTriggerToolbarProps extends Omit<ClassNameStyle, 'baseClassName'> {
142
+ /**
143
+ * App-owned actions rendered alongside the built-in preferences action.
144
+ *
145
+ * @default []
146
+ */
147
+ actions?: readonly ConsentDialogTriggerToolbarAction[];
148
+ /**
149
+ * Customization for the built-in preferences action. The toolbar always
150
+ * renders exactly one preferences action.
151
+ */
152
+ preferences?: ConsentDialogTriggerToolbarPreferences;
153
+ /**
154
+ * Layout direction for the toolbar.
155
+ *
156
+ * @default 'horizontal'
157
+ */
158
+ orientation?: TriggerOrientation;
159
+ /**
160
+ * Default corner position for the toolbar.
161
+ *
162
+ * @default 'bottom-right'
163
+ */
164
+ defaultPosition?: CornerPosition;
165
+ /**
166
+ * Whether to persist the user's position preference in localStorage.
167
+ *
168
+ * @default true
169
+ */
170
+ persistPosition?: boolean;
171
+ /**
172
+ * Accessible label for the toolbar.
173
+ *
174
+ * @default 'Privacy controls'
175
+ */
176
+ ariaLabel?: string;
177
+ /**
178
+ * Controls when the toolbar is visible.
179
+ *
180
+ * @default 'always'
181
+ */
182
+ showWhen?: TriggerVisibility;
183
+ /**
184
+ * Size of each toolbar action.
185
+ *
186
+ * @default 'md'
187
+ */
188
+ size?: TriggerSize;
189
+ /**
190
+ * Callback fired when the corner position changes.
191
+ */
192
+ onPositionChange?: (position: CornerPosition) => void;
193
+ }
89
194
  /**
90
195
  * Re-export CornerPosition for convenience.
91
196
  */
@@ -14,15 +14,15 @@ type ConsentWidgetAccordionProps = Omit<BoxProps, 'themeKey'> & {
14
14
  type?: 'multiple' | 'single';
15
15
  value?: string | string[];
16
16
  };
17
- declare const ConsentWidgetAccordion: ({ "data-testid": dataTestId, children, className, noStyle, onValueChange, style, type, value, ...props }: ConsentWidgetAccordionProps) => import("react/jsx-runtime").JSX.Element;
18
- declare const ConsentWidgetAccordionItems: () => import("react/jsx-runtime").JSX.Element[];
17
+ declare const ConsentWidgetAccordion: ({ 'data-testid': dataTestId, children, className, noStyle, onValueChange, style, type, value, ...props }: ConsentWidgetAccordionProps) => import("react").JSX.Element;
18
+ declare const ConsentWidgetAccordionItems: () => import("react").JSX.Element[];
19
19
  declare const ConsentWidgetAccordionItem: import("react").ForwardRefExoticComponent<Omit<PreferenceItem.PreferenceItemRootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
20
20
  declare const AccordionTriggerInner: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
21
21
  declare const AccordionTrigger: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<HTMLDivElement>>;
22
22
  declare const AccordionContent: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemContentProps & import("react").RefAttributes<HTMLDivElement>>;
23
23
  declare const AccordionArrow: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemSlotProps & import("react").RefAttributes<HTMLDivElement>>;
24
- declare const Accordion: ({ "data-testid": dataTestId, children, className, noStyle, onValueChange, style, type, value, ...props }: ConsentWidgetAccordionProps) => import("react/jsx-runtime").JSX.Element;
24
+ declare const Accordion: ({ 'data-testid': dataTestId, children, className, noStyle, onValueChange, style, type, value, ...props }: ConsentWidgetAccordionProps) => import("react").JSX.Element;
25
25
  declare const Switch: import("react").ForwardRefExoticComponent<RadixSwitch.SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
26
- declare const AccordionItems: () => import("react/jsx-runtime").JSX.Element[];
26
+ declare const AccordionItems: () => import("react").JSX.Element[];
27
27
  declare const AccordionItem: import("react").ForwardRefExoticComponent<Omit<PreferenceItem.PreferenceItemRootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
28
28
  export { Accordion, AccordionArrow, AccordionContent, AccordionItem, AccordionItems, AccordionTrigger, AccordionTriggerInner, ConsentWidgetAccordion, ConsentWidgetAccordionArrow, ConsentWidgetAccordionContent, ConsentWidgetAccordionItem, ConsentWidgetAccordionItems, ConsentWidgetAccordionTrigger, ConsentWidgetAccordionTriggerInner, ConsentWidgetSwitch, Switch, };
@@ -1,2 +1,2 @@
1
1
  import type { ConsentWidgetProps } from './types';
2
- export declare const ConsentWidget: ({ hideBranding, noStyle: localNoStyle, disableAnimation: localDisableAnimation, scrollLock: localScrollLock, trapFocus: localTrapFocus, ...props }: ConsentWidgetProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ConsentWidget: ({ hideBranding, noStyle: localNoStyle, disableAnimation: localDisableAnimation, scrollLock: localScrollLock, trapFocus: localTrapFocus, ...props }: ConsentWidgetProps) => import("react").JSX.Element;
@@ -6,6 +6,6 @@ export interface ConsentWidgetPolicyActionRenderProps extends PolicyActionRender
6
6
  export interface ConsentWidgetPolicyActionsProps {
7
7
  renderAction?: (action: HeadlessConsentDialogAction, props: ConsentWidgetPolicyActionRenderProps) => ReactNode;
8
8
  }
9
- export declare function ConsentWidgetPolicyActions({ renderAction, }: ConsentWidgetPolicyActionsProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function ConsentWidgetPolicyActions({ renderAction, }: ConsentWidgetPolicyActionsProps): import("react").JSX.Element;
10
10
  declare const PolicyActions: typeof ConsentWidgetPolicyActions;
11
11
  export { PolicyActions };
@@ -0,0 +1,82 @@
1
+ import type { AllConsentNames } from 'c15t';
2
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
3
+ export type GoogleMapCoordinates = google.maps.LatLngLiteral;
4
+ export type GoogleMapsApi = typeof google;
5
+ export type GoogleMapInstance = google.maps.Map;
6
+ export type GoogleMapOptions = google.maps.MapOptions;
7
+ export type GoogleMapsLibrary = 'addressValidation' | 'airQuality' | 'core' | 'drawing' | 'elevation' | 'geocoding' | 'geometry' | 'journeySharing' | 'maps' | 'maps3d' | 'marker' | 'places' | 'routes' | 'streetView' | 'visualization';
8
+ export interface GoogleMapProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'onError'> {
9
+ /** Browser API key for the Google Maps JavaScript API. */
10
+ apiKey: string;
11
+ /** Initial and controlled center of the map. */
12
+ center: GoogleMapCoordinates;
13
+ /**
14
+ * Initial and controlled zoom level.
15
+ *
16
+ * @default 12
17
+ */
18
+ zoom?: number;
19
+ /**
20
+ * Cloud map id. Changing this value recreates the map because Google treats
21
+ * it as construction-time configuration.
22
+ */
23
+ mapId?: string;
24
+ /** Additional options passed to the Google Maps constructor. */
25
+ options?: Omit<GoogleMapOptions, 'center' | 'zoom' | 'mapId'>;
26
+ /**
27
+ * Consent category required before the Maps SDK loads.
28
+ *
29
+ * @default 'measurement'
30
+ */
31
+ consentCategory?: AllConsentNames;
32
+ /** Google Maps libraries to load with the shared page-level SDK. */
33
+ libraries?: GoogleMapsLibrary[];
34
+ /** Language used by Maps controls and service responses. */
35
+ language?: string;
36
+ /** Two-character region code used for Maps localization and biasing. */
37
+ region?: string;
38
+ /** Google Maps JavaScript API version channel. */
39
+ version?: string;
40
+ /** Limits referrer information sent to Google to the current origin. */
41
+ authReferrerPolicy?: 'origin';
42
+ /** Google Maps usage-tracking channel. */
43
+ channel?: string;
44
+ /** Cloud map ids to preload with the Maps SDK. */
45
+ mapIds?: string[];
46
+ /** Google Maps solution-channel identifier. */
47
+ solutionChannel?: string;
48
+ /** CSP nonce applied to the Maps script registration. */
49
+ nonce?: string;
50
+ /**
51
+ * Shared c15t script registration id.
52
+ *
53
+ * Keep this id and all loader options consistent across the page.
54
+ *
55
+ * @default 'c15t-google-maps'
56
+ */
57
+ scriptId?: string;
58
+ /**
59
+ * Time to wait for the Maps readiness callback before reporting an error.
60
+ *
61
+ * @default 15000
62
+ */
63
+ timeoutMs?: number;
64
+ /**
65
+ * Change this value to retry a failed loader or map initialization.
66
+ * Successful page-level loader registrations remain shared.
67
+ *
68
+ * @default 0
69
+ */
70
+ retryKey?: string | number;
71
+ /** Content shown before the configured consent category is allowed. */
72
+ placeholder?: ReactNode;
73
+ /** Content shown while the Maps SDK or map instance is loading. */
74
+ loadingFallback?: ReactNode;
75
+ /** Content shown when configuration, loading, authentication, or setup fails. */
76
+ errorFallback?: ReactNode;
77
+ /** Called when the map instance is ready. */
78
+ onReady?: (map: GoogleMapInstance, api: GoogleMapsApi) => void;
79
+ /** Called when configuration, loading, authentication, or setup fails. */
80
+ onError?: (error: Error) => void;
81
+ }
82
+ export declare const GoogleMap: import("react").ForwardRefExoticComponent<Omit<GoogleMapProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,2 @@
1
+ export { GoogleMap, type GoogleMapCoordinates, type GoogleMapInstance, type GoogleMapOptions, type GoogleMapProps, type GoogleMapsApi, type GoogleMapsLibrary, } from './google-map';
2
+ export { YouTubeEmbed, type YouTubeEmbedParams, type YouTubeEmbedProps, type YouTubeSrcSource, type YouTubeVideoIdSource, } from './youtube-embed';
@@ -0,0 +1,12 @@
1
+ import type { AllConsentNames } from 'c15t';
2
+ import type { ComponentPropsWithoutRef, ReactNode } from 'react';
3
+ import { FrameRoot } from '../frame';
4
+ export declare function IntegrationPlaceholder({ category, children, showButton, ...props }: {
5
+ category: AllConsentNames;
6
+ children?: ReactNode;
7
+ showButton?: boolean;
8
+ } & Omit<ComponentPropsWithoutRef<typeof FrameRoot>, 'children'>): import("react").JSX.Element;
9
+ export declare function IntegrationStatus({ category, status, }: {
10
+ category: AllConsentNames;
11
+ status: 'error' | 'loading';
12
+ }): import("react").JSX.Element;
@@ -0,0 +1,95 @@
1
+ import type { AllConsentNames } from 'c15t';
2
+ import { type ComponentPropsWithRef, type ReactNode } from 'react';
3
+ import { type FrameProps } from '../frame';
4
+ export type YouTubeEmbedParams = Record<string, string | number | boolean | null | undefined>;
5
+ interface YouTubeEmbedBaseProps extends Omit<ComponentPropsWithRef<'iframe'>, 'children' | 'src' | 'title'> {
6
+ /**
7
+ * Accessible title for the embedded player.
8
+ */
9
+ title: string;
10
+ /**
11
+ * Consent category required before the iframe mounts.
12
+ *
13
+ * @default 'marketing'
14
+ */
15
+ consentCategory?: AllConsentNames;
16
+ /**
17
+ * Class name for the iframe element targeted by the forwarded ref.
18
+ */
19
+ className?: string;
20
+ /**
21
+ * Class name for the consent-gated frame wrapper.
22
+ */
23
+ wrapperClassName?: string;
24
+ /**
25
+ * Placeholder rendered while consent is missing.
26
+ */
27
+ placeholder?: ReactNode;
28
+ /**
29
+ * Fallback rendered when the iframe cannot be configured or when the
30
+ * browser reports a native iframe loading error.
31
+ *
32
+ * YouTube player-level errors require the IFrame Player API and are not
33
+ * reported reliably by a standard cross-origin iframe.
34
+ */
35
+ errorFallback?: ReactNode;
36
+ /**
37
+ * Fallback rendered after consent while the iframe is loading.
38
+ */
39
+ loadingFallback?: ReactNode;
40
+ /**
41
+ * Additional props passed to the underlying Frame component.
42
+ */
43
+ frameProps?: Omit<FrameProps, 'children' | 'category' | 'className' | 'placeholder'>;
44
+ }
45
+ export interface YouTubeVideoIdSource {
46
+ /**
47
+ * YouTube video id. Use this for first-party construction of the embed URL.
48
+ */
49
+ videoId: string;
50
+ src?: never;
51
+ /**
52
+ * Whether to use youtube-nocookie.com.
53
+ *
54
+ * @default true
55
+ */
56
+ privacyEnhanced?: boolean;
57
+ /**
58
+ * Optional start time in seconds. This takes precedence over `params.start`.
59
+ */
60
+ start?: number;
61
+ /**
62
+ * Additional query params for the generated embed URL.
63
+ */
64
+ params?: YouTubeEmbedParams;
65
+ }
66
+ export interface YouTubeSrcSource {
67
+ /**
68
+ * Fully formed YouTube embed URL. Use this when migrating existing embeds.
69
+ */
70
+ src: string;
71
+ videoId?: never;
72
+ privacyEnhanced?: never;
73
+ start?: never;
74
+ params?: never;
75
+ }
76
+ export type YouTubeEmbedProps = YouTubeEmbedBaseProps & (YouTubeVideoIdSource | YouTubeSrcSource);
77
+ /**
78
+ * Renders a YouTube iframe behind c15t consent gating.
79
+ *
80
+ * Use `videoId` for a privacy-enhanced URL built by c15t, or `src` to migrate
81
+ * an existing complete embed URL. The two source modes are mutually exclusive.
82
+ * The iframe is mounted only after consent and includes responsive 16:9 layout,
83
+ * native lazy loading, and a visible loading state by default.
84
+ *
85
+ * @example
86
+ * ```tsx
87
+ * <YouTubeEmbed
88
+ * consentCategory="marketing"
89
+ * title="Product demo"
90
+ * videoId="dQw4w9WgXcQ"
91
+ * />
92
+ * ```
93
+ */
94
+ export declare const YouTubeEmbed: import("react").ForwardRefExoticComponent<(Omit<YouTubeEmbedBaseProps & YouTubeSrcSource, "ref"> | Omit<YouTubeEmbedBaseProps & YouTubeVideoIdSource, "ref">) & import("react").RefAttributes<HTMLIFrameElement>>;
95
+ export {};
@@ -25,5 +25,5 @@ interface PolicyActionsRendererProps<TAction extends string> {
25
25
  renderDefaultAction: (action: TAction, props: PolicyActionRenderProps<TAction>) => ReactNode;
26
26
  renderAction?: (action: TAction, props: PolicyActionRenderProps<TAction>) => ReactNode;
27
27
  }
28
- export declare function PolicyActionsRenderer<TAction extends string>({ state, Footer, FooterSubGroup, classNames, renderDefaultAction, renderAction, }: PolicyActionsRendererProps<TAction>): import("react/jsx-runtime").JSX.Element;
28
+ export declare function PolicyActionsRenderer<TAction extends string>({ state, Footer, FooterSubGroup, classNames, renderDefaultAction, renderAction, }: PolicyActionsRendererProps<TAction>): import("react").JSX.Element;
29
29
  export {};
@@ -1,7 +1,41 @@
1
1
  import type { AllConsentNames } from 'c15t';
2
+ import { useTheme } from '../../../hooks/use-theme';
2
3
  import * as Button from '../ui/button';
4
+ import type { ButtonVariantsProps } from '../ui/button/button';
3
5
  import type { ConsentButtonProps } from './button.types';
4
6
  type ConsentActionThemeKey = 'accept' | 'reject' | 'customize';
7
+ /**
8
+ * Resolves the final variant and mode for a consent button.
9
+ *
10
+ * @param params.consentAction Semantic consent action key.
11
+ * @param params.isPrimary Whether the action is primary in the current UI.
12
+ * @param params.theme Active theme containing `consentActions` overrides.
13
+ * @param params.variant Explicit `ButtonVariantsProps['variant']` override.
14
+ * @param params.mode Explicit `ButtonVariantsProps['mode']` override.
15
+ * @returns The resolved `{ variant, mode }` pair for the button.
16
+ *
17
+ * @remarks
18
+ * Resolution order:
19
+ * 1. Explicit `variant` / `mode` props
20
+ * 2. `theme.consentActions[consentAction]`
21
+ * 3. `theme.consentActions.primary` (when the policy marks the action primary)
22
+ * 4. `theme.consentActions.default`
23
+ * 5. `params.fallback`, or the hardcoded fallback based on `isPrimary`
24
+ */
25
+ export declare function resolveConsentButtonStyle(params: {
26
+ consentAction?: ConsentActionThemeKey;
27
+ isPrimary?: boolean;
28
+ theme?: ReturnType<typeof useTheme>['theme'];
29
+ variant?: ButtonVariantsProps['variant'];
30
+ mode?: ButtonVariantsProps['mode'];
31
+ fallback?: {
32
+ variant: NonNullable<ButtonVariantsProps['variant']>;
33
+ mode: NonNullable<ButtonVariantsProps['mode']>;
34
+ };
35
+ }): {
36
+ variant: Button.ButtonVariant;
37
+ mode: Button.ButtonMode;
38
+ };
5
39
  /**
6
40
  * Button component that allows users to reject non-essential cookies.
7
41
  *
@@ -17,10 +51,10 @@ type ConsentActionThemeKey = 'accept' | 'reject' | 'customize';
17
51
  *
18
52
  * @public
19
53
  */
20
- export declare const ConsentButton: import("react").ForwardRefExoticComponent<ConsentButtonProps & Button.ButtonVariantsProps & {
54
+ export declare const ConsentButton: import("react").ForwardRefExoticComponent<ConsentButtonProps & ButtonVariantsProps & {
21
55
  consentAction?: ConsentActionThemeKey;
22
56
  isPrimary?: boolean;
23
- action: "accept-consent" | "reject-consent" | "custom-consent" | "open-consent-dialog" | "set-consent";
57
+ action: 'accept-consent' | 'reject-consent' | 'custom-consent' | 'open-consent-dialog' | 'set-consent';
24
58
  category?: AllConsentNames;
25
59
  closeConsentDialog?: boolean;
26
60
  closeConsentBanner?: boolean;
@@ -42,7 +42,7 @@ export interface InlineLegalLinksProps {
42
42
  * />
43
43
  * ```
44
44
  */
45
- export declare function InlineLegalLinks({ links, themeKey, testIdPrefix, }: InlineLegalLinksProps): import("react/jsx-runtime").JSX.Element | null;
45
+ export declare function InlineLegalLinks({ links, themeKey, testIdPrefix, }: InlineLegalLinksProps): import("react").JSX.Element | null;
46
46
  /**
47
47
  * Valid theme key prefixes for the LegalLinks component.
48
48
  */
@@ -47,7 +47,7 @@ declare const AccordionTrigger: import("react").ForwardRefExoticComponent<Accord
47
47
  export interface AccordionIconBaseProps extends Record<string, unknown> {
48
48
  noStyle?: boolean;
49
49
  }
50
- declare function AccordionIcon<T extends ElementType>({ className, noStyle, as, ...rest }: PolymorphicComponentProps<T, AccordionIconBaseProps>): import("react/jsx-runtime").JSX.Element;
50
+ declare function AccordionIcon<T extends ElementType>({ className, noStyle, as, ...rest }: PolymorphicComponentProps<T, AccordionIconBaseProps>): import("react").JSX.Element;
51
51
  declare namespace AccordionIcon {
52
52
  var displayName: string;
53
53
  }
@@ -62,7 +62,7 @@ type AccordionArrowProps = HTMLAttributes<HTMLDivElement> & {
62
62
  className?: string;
63
63
  };
64
64
  };
65
- declare function AccordionArrow({ closeIcon, className, noStyle, openIcon, ...rest }: AccordionArrowProps): import("react/jsx-runtime").JSX.Element;
65
+ declare function AccordionArrow({ closeIcon, className, noStyle, openIcon, ...rest }: AccordionArrowProps): import("react").JSX.Element;
66
66
  declare namespace AccordionArrow {
67
67
  var displayName: string;
68
68
  }
@@ -21,7 +21,7 @@ type BrandingCompactLogoProps = SVGProps<SVGSVGElement> & {
21
21
  };
22
22
  export declare function resolveBranding(branding: Branding | string): ResolvedBranding;
23
23
  export declare function getBrandingHref(branding: Branding | string, refParam?: string): string;
24
- export declare function BrandingFullLogo({ branding, className, }: BrandingFullLogoProps): import("react/jsx-runtime").JSX.Element;
25
- export declare function BrandingCompactLogo({ branding, ...props }: BrandingCompactLogoProps): import("react/jsx-runtime").JSX.Element;
26
- export declare function BrandingLink({ hideBranding, variant, themeKey, className, style, 'data-testid': testId, }: BrandingProps): import("react/jsx-runtime").JSX.Element | null;
24
+ export declare function BrandingFullLogo({ branding, className, }: BrandingFullLogoProps): import("react").JSX.Element;
25
+ export declare function BrandingCompactLogo({ branding, ...props }: BrandingCompactLogoProps): import("react").JSX.Element;
26
+ export declare function BrandingLink({ hideBranding, variant, themeKey, className, style, 'data-testid': testId, }: BrandingProps): import("react").JSX.Element | null;
27
27
  export {};
@@ -64,7 +64,7 @@ declare const ButtonRoot: import("react").ForwardRefExoticComponent<ButtonVarian
64
64
  *
65
65
  * @public
66
66
  */
67
- declare function ButtonIcon<T extends ElementType>({ variant, mode, size, as, className, ...rest }: PolymorphicComponentProps<T, ButtonIconProps>): import("react/jsx-runtime").JSX.Element;
67
+ declare function ButtonIcon<T extends ElementType>({ variant, mode, size, as, className, ...rest }: PolymorphicComponentProps<T, ButtonIconProps>): import("react").JSX.Element;
68
68
  declare namespace ButtonIcon {
69
69
  var displayName: string;
70
70
  }