@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.
- package/README.md +12 -3
- package/client/components/consent-banner.js +4 -0
- package/client/components/consent-dialog-link.js +3 -0
- package/client/components/consent-dialog-trigger.js +3 -0
- package/client/components/consent-dialog.js +4 -0
- package/client/components/consent-widget.js +4 -0
- package/client/components/frame.js +3 -0
- package/dist/components/consent-banner/atoms/overlay.cjs +1 -1
- package/dist/components/consent-banner/atoms/overlay.js +1 -1
- package/dist/components/consent-banner/atoms/root.cjs +1 -1
- package/dist/components/consent-banner/atoms/root.js +1 -1
- package/dist/components/consent-banner/components.cjs +1 -1
- package/dist/components/consent-banner/components.js +1 -1
- package/dist/components/consent-banner/consent-banner.cjs +1 -1
- package/dist/components/consent-banner/consent-banner.js +1 -1
- package/dist/components/consent-banner/error-boundary.cjs +1 -1
- package/dist/components/consent-banner/index.cjs +1 -1
- package/dist/components/consent-banner/index.js +1 -1
- package/dist/components/consent-banner/policy-actions.cjs +1 -0
- package/dist/components/consent-banner/policy-actions.js +1 -0
- package/dist/components/consent-dialog/atoms/card.cjs +1 -1
- package/dist/components/consent-dialog/atoms/card.js +1 -1
- package/dist/components/consent-dialog/atoms/overlay.cjs +1 -1
- package/dist/components/consent-dialog/atoms/overlay.js +1 -1
- package/dist/components/consent-dialog/atoms/root.cjs +1 -1
- package/dist/components/consent-dialog/atoms/root.js +1 -1
- package/dist/components/consent-dialog/consent-dialog.cjs +1 -1
- package/dist/components/consent-dialog/consent-dialog.js +1 -1
- package/dist/components/consent-dialog/index.cjs +1 -1
- package/dist/components/consent-dialog/index.js +1 -1
- package/dist/components/consent-dialog-link/index.cjs +1 -0
- package/dist/components/consent-dialog-link/index.js +1 -0
- package/dist/components/consent-dialog-trigger/atoms/button.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/button.js +1 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.js +1 -1
- package/dist/components/consent-dialog-trigger/atoms/root.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/root.js +1 -1
- package/dist/components/consent-dialog-trigger/atoms/text.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/text.js +1 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +1 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.js +1 -1
- package/dist/components/consent-dialog-trigger/index.cjs +1 -1
- package/dist/components/consent-dialog-trigger/index.js +1 -1
- package/dist/components/consent-dialog-trigger/types.cjs +1 -1
- package/dist/components/consent-dialog-trigger/use-draggable.cjs +1 -1
- package/dist/components/consent-dialog-trigger/use-draggable.js +1 -1
- package/dist/components/consent-preferences-link/consent-preferences-link.cjs +1 -0
- package/dist/components/consent-preferences-link/consent-preferences-link.js +1 -0
- package/dist/components/consent-preferences-link/index.cjs +1 -0
- package/dist/components/consent-preferences-link/index.js +1 -0
- package/dist/components/consent-widget/atoms/accordion.cjs +1 -1
- package/dist/components/consent-widget/atoms/accordion.js +1 -1
- package/dist/components/consent-widget/atoms/button.cjs +1 -1
- package/dist/components/consent-widget/atoms/button.js +1 -1
- package/dist/components/consent-widget/atoms/footer.cjs +1 -1
- package/dist/components/consent-widget/atoms/footer.js +1 -1
- package/dist/components/consent-widget/atoms/root.cjs +1 -1
- package/dist/components/consent-widget/atoms/root.js +1 -1
- package/dist/components/consent-widget/consent-widget.cjs +1 -1
- package/dist/components/consent-widget/consent-widget.js +1 -1
- package/dist/components/consent-widget/index.cjs +1 -1
- package/dist/components/consent-widget/index.js +1 -1
- package/dist/components/consent-widget/policy-actions.cjs +1 -0
- package/dist/components/consent-widget/policy-actions.js +1 -0
- package/dist/components/consent-widget/types.cjs +1 -1
- package/dist/components/frame/atoms.cjs +1 -1
- package/dist/components/frame/atoms.js +1 -1
- package/dist/components/frame/frame.cjs +1 -1
- package/dist/components/frame/frame.js +1 -1
- package/dist/components/frame/index.cjs +1 -1
- package/dist/components/frame/index.js +1 -1
- package/dist/components/frame/types.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/button-group.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/button-group.js +1 -1
- package/dist/components/iab-consent-banner/atoms/card.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/card.js +1 -1
- package/dist/components/iab-consent-banner/atoms/description.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/description.js +1 -1
- package/dist/components/iab-consent-banner/atoms/footer.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/footer.js +1 -1
- package/dist/components/iab-consent-banner/atoms/header.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/header.js +1 -1
- package/dist/components/iab-consent-banner/atoms/overlay.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/overlay.js +1 -1
- package/dist/components/iab-consent-banner/atoms/root.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/root.js +1 -1
- package/dist/components/iab-consent-banner/atoms/title.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/title.js +1 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.cjs +1 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.js +1 -1
- package/dist/components/iab-consent-banner/index.cjs +1 -1
- package/dist/components/iab-consent-banner/index.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/card.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/card.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/content.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/content.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/footer.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/footer.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/header.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/header.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/root.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/root.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.js +1 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.js +1 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +1 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +1 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.js +1 -1
- package/dist/components/iab-consent-dialog/index.cjs +1 -1
- package/dist/components/iab-consent-dialog/index.js +1 -1
- package/dist/components/iab-consent-dialog/types.cjs +1 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.cjs +1 -1
- package/dist/components/shared/libs/polymorphic.cjs +1 -1
- package/dist/components/shared/libs/recursive-clone-children.cjs +1 -1
- package/dist/components/shared/libs/slot.cjs +1 -0
- package/dist/components/shared/libs/slot.js +1 -0
- package/dist/components/shared/libs/use-controllable-state.cjs +1 -0
- package/dist/components/shared/libs/use-controllable-state.js +1 -0
- package/dist/components/shared/policy-actions.cjs +1 -0
- package/dist/components/shared/policy-actions.js +1 -0
- package/dist/components/shared/primitives/box.cjs +1 -1
- package/dist/components/shared/primitives/box.js +1 -1
- package/dist/components/shared/primitives/button.cjs +1 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/components/shared/primitives/button.types.cjs +1 -1
- package/dist/components/shared/primitives/legal-links/index.cjs +1 -1
- package/dist/components/shared/primitives/legal-links/index.js +1 -1
- package/dist/components/shared/ui/accordion/accordion.cjs +1 -1
- package/dist/components/shared/ui/accordion/accordion.js +1 -1
- package/dist/components/shared/ui/accordion/accordion.types.cjs +1 -1
- package/dist/components/shared/ui/accordion/index.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/index.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/index.js +1 -1
- package/dist/components/shared/ui/branding.cjs +1 -0
- package/dist/components/shared/ui/branding.js +1 -0
- package/dist/components/shared/ui/button/button.cjs +1 -1
- package/dist/components/shared/ui/button/button.js +1 -1
- package/dist/components/shared/ui/button/button.types.cjs +1 -1
- package/dist/components/shared/ui/button/index.cjs +1 -1
- package/dist/components/shared/ui/collapsible/collapsible.cjs +1 -0
- package/dist/components/shared/ui/collapsible/collapsible.js +1 -0
- package/dist/components/shared/ui/collapsible/index.cjs +1 -0
- package/dist/components/shared/ui/collapsible/index.js +1 -0
- package/dist/components/shared/ui/dialog/dialog.cjs +1 -0
- package/dist/components/shared/ui/dialog/dialog.js +1 -0
- package/dist/components/shared/ui/dialog/index.cjs +1 -0
- package/dist/components/shared/ui/dialog/index.js +1 -0
- package/dist/components/shared/ui/icon.cjs +1 -1
- package/dist/components/shared/ui/logo.cjs +1 -1
- package/dist/components/shared/ui/logo.js +1 -1
- package/dist/components/shared/ui/preference-item/index.cjs +1 -0
- package/dist/components/shared/ui/preference-item/index.js +1 -0
- package/dist/components/shared/ui/preference-item/preference-item.cjs +1 -0
- package/dist/components/shared/ui/preference-item/preference-item.js +1 -0
- package/dist/components/shared/ui/switch/index.cjs +1 -1
- package/dist/components/shared/ui/switch/index.js +1 -1
- package/dist/components/shared/ui/switch/switch.cjs +1 -1
- package/dist/components/shared/ui/switch/switch.js +1 -1
- package/dist/components/shared/ui/switch/switch.types.cjs +1 -1
- package/dist/components/shared/ui/tabs/index.cjs +1 -0
- package/dist/components/shared/ui/tabs/index.js +1 -0
- package/dist/components/shared/ui/tabs/tabs.cjs +1 -0
- package/dist/components/shared/ui/tabs/tabs.js +1 -0
- package/dist/context/consent-manager-context.cjs +1 -1
- package/dist/context/consent-tracking-context.cjs +1 -1
- package/dist/context/theme-context.cjs +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-color-scheme.cjs +1 -1
- package/dist/hooks/use-component-config.cjs +1 -1
- package/dist/hooks/use-consent-dialog-trigger.cjs +1 -0
- package/dist/hooks/use-consent-dialog-trigger.js +1 -0
- package/dist/hooks/use-consent-manager.cjs +1 -1
- package/dist/hooks/use-consent-manager.js +1 -1
- package/dist/hooks/use-focus-trap.cjs +1 -1
- package/dist/hooks/use-focus-trap.js +1 -1
- package/dist/hooks/use-headless-consent-ui.cjs +1 -0
- package/dist/hooks/use-headless-consent-ui.js +1 -0
- package/dist/hooks/use-headless-iab-consent-ui.cjs +1 -0
- package/dist/hooks/use-headless-iab-consent-ui.js +1 -0
- package/dist/hooks/use-reduced-motion.cjs +1 -1
- package/dist/hooks/use-reduced-motion.js +1 -1
- package/dist/hooks/use-scroll-lock.cjs +1 -1
- package/dist/hooks/use-scroll-lock.js +1 -1
- package/dist/hooks/use-ssr-status.cjs +1 -1
- package/dist/hooks/use-styles.cjs +1 -1
- package/dist/hooks/use-text-direction.cjs +1 -1
- package/dist/hooks/use-theme.cjs +1 -1
- package/dist/hooks/use-theme.js +1 -1
- package/dist/hooks/use-translations.cjs +1 -1
- package/dist/iab/styles.css +11 -0
- package/dist/iab/styles.tw3.css +14 -0
- package/dist/iab.cjs +1 -0
- package/dist/iab.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/primitives/accordion.cjs +1 -0
- package/dist/primitives/accordion.js +1 -0
- package/dist/primitives/button.cjs +1 -0
- package/dist/primitives/button.js +1 -0
- package/dist/primitives/collapsible.cjs +1 -0
- package/dist/primitives/collapsible.js +1 -0
- package/dist/primitives/dialog.cjs +1 -0
- package/dist/primitives/dialog.js +1 -0
- package/dist/primitives/preference-item.cjs +1 -0
- package/dist/primitives/preference-item.js +1 -0
- package/dist/primitives/switch.cjs +1 -0
- package/dist/primitives/switch.js +1 -0
- package/dist/primitives/tabs.cjs +1 -0
- package/dist/primitives/tabs.js +1 -0
- package/dist/primitives.cjs +1 -0
- package/dist/primitives.js +1 -0
- package/dist/providers/consent-manager-provider.cjs +1 -1
- package/dist/providers/consent-manager-provider.js +1 -1
- package/dist/server/fetch-ssr-data.cjs +1 -1
- package/dist/server/fetch-ssr-data.js +1 -1
- package/dist/server/headers.cjs +1 -1
- package/dist/server/headers.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/init-cache-key.cjs +1 -0
- package/dist/server/init-cache-key.js +1 -0
- package/dist/server/normalize-url.cjs +1 -1
- package/dist/server/types.cjs +1 -1
- package/dist/styles.css +10 -0
- package/dist/styles.tw3.css +13 -0
- package/dist/types/consent-manager.cjs +1 -1
- package/dist/types/theme/index.cjs +1 -1
- package/dist/types/theme/style-keys.cjs +1 -1
- package/dist/types/theme/style-types.cjs +1 -1
- package/dist/utils/cn.cjs +1 -1
- package/dist/utils/merge-styles.cjs +1 -1
- package/dist/utils/test-helpers.cjs +1 -1
- package/dist/utils/test-helpers.js +1 -1
- package/dist/utils/theme-utils.cjs +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/{dist → dist-types}/components/consent-banner/atoms/overlay.d.ts +1 -2
- package/{dist → dist-types}/components/consent-banner/atoms/root.d.ts +44 -14
- package/{dist → dist-types}/components/consent-banner/components.d.ts +4 -5
- package/{dist → dist-types}/components/consent-banner/consent-banner.d.ts +14 -8
- package/{dist → dist-types}/components/consent-banner/error-boundary.d.ts +0 -1
- package/{dist → dist-types}/components/consent-banner/index.d.ts +48 -26
- package/dist-types/components/consent-banner/policy-actions.d.ts +11 -0
- package/{dist → dist-types}/components/consent-dialog/atoms/card.d.ts +14 -8
- package/{dist → dist-types}/components/consent-dialog/atoms/overlay.d.ts +1 -2
- package/{dist → dist-types}/components/consent-dialog/atoms/root.d.ts +1 -2
- package/{dist → dist-types}/components/consent-dialog/consent-dialog.d.ts +2 -3
- package/{dist → dist-types}/components/consent-dialog/index.d.ts +31 -10
- package/dist-types/components/consent-dialog-link/index.d.ts +1 -0
- package/{dist → dist-types}/components/consent-dialog-trigger/atoms/button.d.ts +0 -1
- package/{dist → dist-types}/components/consent-dialog-trigger/atoms/icon.d.ts +1 -2
- package/{dist → dist-types}/components/consent-dialog-trigger/atoms/root.d.ts +0 -1
- package/{dist → dist-types}/components/consent-dialog-trigger/atoms/text.d.ts +0 -1
- package/{dist → dist-types}/components/consent-dialog-trigger/consent-dialog-trigger.d.ts +2 -3
- package/{dist → dist-types}/components/consent-dialog-trigger/index.d.ts +0 -1
- package/{dist → dist-types}/components/consent-dialog-trigger/types.d.ts +2 -3
- package/{dist → dist-types}/components/consent-dialog-trigger/use-draggable.d.ts +1 -2
- package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +15 -0
- package/dist-types/components/consent-preferences-link/index.d.ts +1 -0
- package/dist-types/components/consent-widget/atoms/accordion.d.ts +28 -0
- package/{dist → dist-types}/components/consent-widget/atoms/button.d.ts +1 -2
- package/{dist → dist-types}/components/consent-widget/atoms/footer.d.ts +0 -1
- package/{dist → dist-types}/components/consent-widget/atoms/root.d.ts +1 -7
- package/{dist → dist-types}/components/consent-widget/consent-widget.d.ts +0 -1
- package/{dist → dist-types}/components/consent-widget/index.d.ts +27 -8
- package/dist-types/components/consent-widget/policy-actions.d.ts +11 -0
- package/{dist → dist-types}/components/consent-widget/types.d.ts +2 -3
- package/{dist → dist-types}/components/frame/atoms.d.ts +1 -2
- package/{dist → dist-types}/components/frame/frame.d.ts +0 -1
- package/{dist → dist-types}/components/frame/index.d.ts +1 -2
- package/{dist → dist-types}/components/frame/types.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/atoms/button-group.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/atoms/card.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/atoms/description.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/atoms/footer.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/atoms/header.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/atoms/overlay.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/atoms/root.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/atoms/title.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/iab-consent-banner.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-banner/index.d.ts +1 -2
- package/{dist → dist-types}/components/iab-consent-dialog/atoms/card.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/atoms/content.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/atoms/footer.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/atoms/header.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/atoms/overlay.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/atoms/purpose-item.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/atoms/root.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/atoms/stack-item.d.ts +0 -1
- package/dist-types/components/iab-consent-dialog/atoms/tabs.d.ts +12 -0
- package/{dist → dist-types}/components/iab-consent-dialog/atoms/vendor-list.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/hooks/use-gvl-data.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/iab-consent-dialog.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/index.d.ts +1 -2
- package/{dist → dist-types}/components/iab-consent-dialog/types.d.ts +0 -1
- package/{dist → dist-types}/components/iab-consent-dialog/use-iab-translations.d.ts +0 -1
- package/{dist → dist-types}/components/shared/libs/polymorphic.d.ts +0 -1
- package/{dist → dist-types}/components/shared/libs/recursive-clone-children.d.ts +0 -1
- package/dist-types/components/shared/libs/slot.d.ts +6 -0
- package/dist-types/components/shared/libs/use-controllable-state.d.ts +7 -0
- package/dist-types/components/shared/policy-actions.d.ts +29 -0
- package/{dist → dist-types}/components/shared/primitives/box.d.ts +0 -1
- package/{dist → dist-types}/components/shared/primitives/button.d.ts +4 -1
- package/{dist → dist-types}/components/shared/primitives/button.types.d.ts +17 -1
- package/{dist → dist-types}/components/shared/primitives/legal-links/index.d.ts +0 -45
- package/{dist → dist-types}/components/shared/ui/accordion/accordion.d.ts +32 -68
- package/{dist → dist-types}/components/shared/ui/accordion/accordion.types.d.ts +0 -1
- package/{dist → dist-types}/components/shared/ui/accordion/index.d.ts +0 -1
- package/{dist → dist-types}/components/shared/ui/animated-collapse/animated-collapse.d.ts +0 -1
- package/{dist → dist-types}/components/shared/ui/animated-collapse/index.d.ts +0 -1
- package/dist-types/components/shared/ui/branding.d.ts +27 -0
- package/{dist → dist-types}/components/shared/ui/button/button.d.ts +2 -3
- package/{dist → dist-types}/components/shared/ui/button/button.types.d.ts +0 -1
- package/{dist → dist-types}/components/shared/ui/button/index.d.ts +0 -1
- package/dist-types/components/shared/ui/collapsible/collapsible.d.ts +20 -0
- package/dist-types/components/shared/ui/collapsible/index.d.ts +1 -0
- package/dist-types/components/shared/ui/dialog/dialog.d.ts +29 -0
- package/dist-types/components/shared/ui/dialog/index.d.ts +1 -0
- package/{dist → dist-types}/components/shared/ui/icon.d.ts +0 -1
- package/{dist → dist-types}/components/shared/ui/logo.d.ts +8 -1
- package/dist-types/components/shared/ui/preference-item/index.d.ts +1 -0
- package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +33 -0
- package/dist-types/components/shared/ui/switch/index.d.ts +2 -0
- package/dist-types/components/shared/ui/switch/switch.d.ts +20 -0
- package/{dist → dist-types}/components/shared/ui/switch/switch.types.d.ts +0 -1
- package/dist-types/components/shared/ui/tabs/index.d.ts +1 -0
- package/dist-types/components/shared/ui/tabs/tabs.d.ts +28 -0
- package/{dist → dist-types}/context/consent-manager-context.d.ts +0 -1
- package/{dist → dist-types}/context/consent-tracking-context.d.ts +0 -1
- package/{dist → dist-types}/context/theme-context.d.ts +0 -1
- package/dist-types/headless.d.ts +9 -0
- package/{dist → dist-types}/hooks/index.d.ts +3 -1
- package/{dist → dist-types}/hooks/use-color-scheme.d.ts +0 -1
- package/{dist → dist-types}/hooks/use-component-config.d.ts +0 -1
- package/dist-types/hooks/use-consent-dialog-trigger.d.ts +10 -0
- package/{dist → dist-types}/hooks/use-consent-manager.d.ts +0 -1
- package/{dist → dist-types}/hooks/use-focus-trap.d.ts +0 -1
- package/dist-types/hooks/use-headless-consent-ui.d.ts +46 -0
- package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +41 -0
- package/{dist → dist-types}/hooks/use-reduced-motion.d.ts +0 -1
- package/{dist → dist-types}/hooks/use-scroll-lock.d.ts +0 -1
- package/{dist → dist-types}/hooks/use-ssr-status.d.ts +2 -2
- package/{dist → dist-types}/hooks/use-styles.d.ts +0 -1
- package/{dist → dist-types}/hooks/use-text-direction.d.ts +0 -1
- package/{dist → dist-types}/hooks/use-theme.d.ts +0 -1
- package/{dist → dist-types}/hooks/use-translations.d.ts +0 -1
- package/dist-types/iab.d.ts +24 -0
- package/{dist → dist-types}/index.d.ts +5 -6
- package/dist-types/primitives/accordion.d.ts +1 -0
- package/dist-types/primitives/button.d.ts +1 -0
- package/dist-types/primitives/collapsible.d.ts +1 -0
- package/dist-types/primitives/dialog.d.ts +1 -0
- package/dist-types/primitives/preference-item.d.ts +1 -0
- package/dist-types/primitives/switch.d.ts +1 -0
- package/dist-types/primitives/tabs.d.ts +1 -0
- package/dist-types/primitives.d.ts +7 -0
- package/{dist → dist-types}/providers/consent-manager-provider.d.ts +0 -1
- package/{dist → dist-types}/server/fetch-ssr-data.d.ts +0 -1
- package/{dist → dist-types}/server/headers.d.ts +2 -2
- package/{dist → dist-types}/server/index.d.ts +1 -1
- package/dist-types/server/init-cache-key.d.ts +21 -0
- package/{dist → dist-types}/server/normalize-url.d.ts +0 -1
- package/{dist → dist-types}/server/types.d.ts +0 -1
- package/{dist → dist-types}/types/consent-manager.d.ts +7 -1
- package/{dist → dist-types}/types/theme/index.d.ts +0 -1
- package/{dist → dist-types}/types/theme/style-keys.d.ts +0 -1
- package/{dist → dist-types}/types/theme/style-types.d.ts +2 -1
- package/{dist → dist-types}/utils/cn.d.ts +0 -1
- package/{dist → dist-types}/utils/merge-styles.d.ts +0 -1
- package/{dist → dist-types}/utils/test-helpers.d.ts +0 -1
- package/{dist → dist-types}/utils/theme-utils.d.ts +1 -2
- package/dist-types/version.d.ts +1 -0
- package/docs/README.md +76 -0
- package/docs/building-headless-components.md +266 -0
- package/docs/callbacks.md +184 -0
- package/docs/components/consent-banner.md +298 -0
- package/docs/components/consent-dialog-link.md +59 -0
- package/docs/components/consent-dialog-trigger.md +103 -0
- package/docs/components/consent-dialog.md +177 -0
- package/docs/components/consent-manager-provider.md +425 -0
- package/docs/components/consent-widget.md +160 -0
- package/docs/components/dev-tools.md +63 -0
- package/docs/components/frame.md +73 -0
- package/docs/concepts/client-modes.md +175 -0
- package/docs/concepts/consent-categories.md +97 -0
- package/docs/concepts/consent-models.md +112 -0
- package/docs/concepts/cookie-management.md +122 -0
- package/docs/concepts/glossary.md +23 -0
- package/docs/concepts/initialization-flow.md +148 -0
- package/docs/concepts/policy-packs.md +227 -0
- package/docs/headless.md +190 -0
- package/docs/hooks/use-color-scheme.md +40 -0
- package/docs/hooks/use-consent-manager/checking-consent.md +94 -0
- package/docs/hooks/use-consent-manager/location-info.md +95 -0
- package/docs/hooks/use-consent-manager/overview.md +420 -0
- package/docs/hooks/use-consent-manager/setting-consent.md +92 -0
- package/docs/hooks/use-draggable.md +57 -0
- package/docs/hooks/use-focus-trap.md +41 -0
- package/docs/hooks/use-reduced-motion.md +35 -0
- package/docs/hooks/use-ssr-status.md +31 -0
- package/docs/hooks/use-text-direction.md +49 -0
- package/docs/hooks/use-translations.md +118 -0
- package/docs/iab/consent-banner.md +92 -0
- package/docs/iab/consent-dialog.md +132 -0
- package/docs/iab/overview.md +125 -0
- package/docs/iab/use-gvl-data.md +208 -0
- package/docs/iframe-blocking.md +107 -0
- package/docs/integrations/building-integrations.md +405 -0
- package/docs/integrations/databuddy.md +203 -0
- package/docs/integrations/google-tag-manager.md +153 -0
- package/docs/integrations/google-tag.md +122 -0
- package/docs/integrations/linkedin-insights.md +109 -0
- package/docs/integrations/meta-pixel.md +342 -0
- package/docs/integrations/microsoft-uet.md +112 -0
- package/docs/integrations/overview.md +105 -0
- package/docs/integrations/posthog.md +199 -0
- package/docs/integrations/tiktok-pixel.md +113 -0
- package/docs/integrations/x-pixel.md +143 -0
- package/docs/internationalization.md +197 -0
- package/docs/network-blocker.md +178 -0
- package/docs/optimization.md +113 -0
- package/docs/policy-packs.md +240 -0
- package/docs/quickstart.md +152 -0
- package/docs/script-loader.md +321 -0
- package/docs/server-side.md +153 -0
- package/docs/styling/classnames.md +92 -0
- package/docs/styling/color-scheme.md +82 -0
- package/docs/styling/css-variables.md +92 -0
- package/docs/styling/overview.md +459 -0
- package/docs/styling/slots.md +127 -0
- package/docs/styling/tailwind.md +113 -0
- package/docs/styling/tokens.md +216 -0
- package/docs/troubleshooting.md +137 -0
- package/iab/styles.css +1 -0
- package/package.json +87 -27
- package/readme.json +6 -0
- package/src/iab/styles.css +11 -0
- package/src/iab/styles.tw3.css +14 -0
- package/src/styles.css +10 -0
- package/src/styles.tw3.css +13 -0
- package/styles.css +1 -0
- package/dist/components/__tests__/active-ui-transitions.e2e.test.cjs +0 -1
- package/dist/components/__tests__/active-ui-transitions.e2e.test.js +0 -1
- package/dist/components/__tests__/consent-flow.e2e.test.cjs +0 -1
- package/dist/components/__tests__/consent-flow.e2e.test.js +0 -1
- package/dist/components/__tests__/models-prop.e2e.test.cjs +0 -1
- package/dist/components/__tests__/models-prop.e2e.test.js +0 -1
- package/dist/components/__tests__/ui-source-tracking.e2e.test.cjs +0 -1
- package/dist/components/__tests__/ui-source-tracking.e2e.test.js +0 -1
- package/dist/components/consent-banner/atoms/overlay.d.ts.map +0 -1
- package/dist/components/consent-banner/atoms/root.d.ts.map +0 -1
- package/dist/components/consent-banner/components.d.ts.map +0 -1
- package/dist/components/consent-banner/consent-banner.d.ts.map +0 -1
- package/dist/components/consent-banner/error-boundary.d.ts.map +0 -1
- package/dist/components/consent-banner/index.d.ts.map +0 -1
- package/dist/components/consent-dialog/atoms/card.d.ts.map +0 -1
- package/dist/components/consent-dialog/atoms/overlay.d.ts.map +0 -1
- package/dist/components/consent-dialog/atoms/root.d.ts.map +0 -1
- package/dist/components/consent-dialog/consent-dialog.d.ts.map +0 -1
- package/dist/components/consent-dialog/index.d.ts.map +0 -1
- package/dist/components/consent-dialog-trigger/atoms/button.d.ts.map +0 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.d.ts.map +0 -1
- package/dist/components/consent-dialog-trigger/atoms/root.d.ts.map +0 -1
- package/dist/components/consent-dialog-trigger/atoms/text.d.ts.map +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.d.ts.map +0 -1
- package/dist/components/consent-dialog-trigger/index.d.ts.map +0 -1
- package/dist/components/consent-dialog-trigger/types.d.ts.map +0 -1
- package/dist/components/consent-dialog-trigger/use-draggable.d.ts.map +0 -1
- package/dist/components/consent-widget/atoms/accordion.d.ts +0 -46
- package/dist/components/consent-widget/atoms/accordion.d.ts.map +0 -1
- package/dist/components/consent-widget/atoms/button.d.ts.map +0 -1
- package/dist/components/consent-widget/atoms/footer.d.ts.map +0 -1
- package/dist/components/consent-widget/atoms/root.d.ts.map +0 -1
- package/dist/components/consent-widget/consent-widget.d.ts.map +0 -1
- package/dist/components/consent-widget/index.d.ts.map +0 -1
- package/dist/components/consent-widget/types.d.ts.map +0 -1
- package/dist/components/frame/atoms.d.ts.map +0 -1
- package/dist/components/frame/frame.d.ts.map +0 -1
- package/dist/components/frame/index.d.ts.map +0 -1
- package/dist/components/frame/types.d.ts.map +0 -1
- package/dist/components/iab/__tests__/e2e-setup.cjs +0 -1
- package/dist/components/iab/__tests__/e2e-setup.js +0 -1
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.cjs +0 -1
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.d.ts +0 -212
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.d.ts.map +0 -1
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.js +0 -1
- package/dist/components/iab/__tests__/iab-banner.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-banner.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-consent-flow.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-consent-flow.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-events.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-events.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-gvl.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-gvl.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-preference-center.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-preference-center.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-storage.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-storage.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-stub.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-stub.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/iab-tcfapi.e2e.test.cjs +0 -1
- package/dist/components/iab/__tests__/iab-tcfapi.e2e.test.js +0 -1
- package/dist/components/iab/__tests__/msw-handlers.cjs +0 -1
- package/dist/components/iab/__tests__/msw-handlers.js +0 -1
- package/dist/components/iab-consent-banner/__tests__/iab-consent-banner.test.cjs +0 -1
- package/dist/components/iab-consent-banner/__tests__/iab-consent-banner.test.js +0 -1
- package/dist/components/iab-consent-banner/atoms/button-group.d.ts.map +0 -1
- package/dist/components/iab-consent-banner/atoms/card.d.ts.map +0 -1
- package/dist/components/iab-consent-banner/atoms/description.d.ts.map +0 -1
- package/dist/components/iab-consent-banner/atoms/footer.d.ts.map +0 -1
- package/dist/components/iab-consent-banner/atoms/header.d.ts.map +0 -1
- package/dist/components/iab-consent-banner/atoms/overlay.d.ts.map +0 -1
- package/dist/components/iab-consent-banner/atoms/root.d.ts.map +0 -1
- package/dist/components/iab-consent-banner/atoms/title.d.ts.map +0 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.d.ts.map +0 -1
- package/dist/components/iab-consent-banner/index.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/__tests__/legitimate-interest-ui.test.cjs +0 -1
- package/dist/components/iab-consent-dialog/__tests__/legitimate-interest-ui.test.js +0 -1
- package/dist/components/iab-consent-dialog/__tests__/preference-center.test.cjs +0 -1
- package/dist/components/iab-consent-dialog/__tests__/preference-center.test.js +0 -1
- package/dist/components/iab-consent-dialog/__tests__/purposes-tab.test.cjs +0 -1
- package/dist/components/iab-consent-dialog/__tests__/purposes-tab.test.js +0 -1
- package/dist/components/iab-consent-dialog/__tests__/vendors-tab.test.cjs +0 -1
- package/dist/components/iab-consent-dialog/__tests__/vendors-tab.test.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/card.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/atoms/content.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/atoms/footer.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/atoms/header.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/atoms/root.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.d.ts +0 -40
- package/dist/components/iab-consent-dialog/atoms/tabs.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/index.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/types.d.ts.map +0 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.d.ts.map +0 -1
- package/dist/components/shared/libs/polymorphic.d.ts.map +0 -1
- package/dist/components/shared/libs/recursive-clone-children.d.ts.map +0 -1
- package/dist/components/shared/primitives/box.d.ts.map +0 -1
- package/dist/components/shared/primitives/button.d.ts.map +0 -1
- package/dist/components/shared/primitives/button.types.d.ts.map +0 -1
- package/dist/components/shared/primitives/legal-links/index.d.ts.map +0 -1
- package/dist/components/shared/ui/__tests__/primitives.test.cjs +0 -1
- package/dist/components/shared/ui/__tests__/primitives.test.js +0 -1
- package/dist/components/shared/ui/accordion/accordion.d.ts.map +0 -1
- package/dist/components/shared/ui/accordion/accordion.types.d.ts.map +0 -1
- package/dist/components/shared/ui/accordion/index.d.ts.map +0 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.d.ts.map +0 -1
- package/dist/components/shared/ui/animated-collapse/index.d.ts.map +0 -1
- package/dist/components/shared/ui/button/button.d.ts.map +0 -1
- package/dist/components/shared/ui/button/button.types.d.ts.map +0 -1
- package/dist/components/shared/ui/button/index.d.ts.map +0 -1
- package/dist/components/shared/ui/icon.d.ts.map +0 -1
- package/dist/components/shared/ui/logo.d.ts.map +0 -1
- package/dist/components/shared/ui/switch/index.d.ts +0 -3
- package/dist/components/shared/ui/switch/index.d.ts.map +0 -1
- package/dist/components/shared/ui/switch/switch.d.ts +0 -45
- package/dist/components/shared/ui/switch/switch.d.ts.map +0 -1
- package/dist/components/shared/ui/switch/switch.types.d.ts.map +0 -1
- package/dist/context/consent-manager-context.d.ts.map +0 -1
- package/dist/context/consent-tracking-context.d.ts.map +0 -1
- package/dist/context/theme-context.d.ts.map +0 -1
- package/dist/headless.d.ts +0 -8
- package/dist/headless.d.ts.map +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.js +0 -1
- 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
- 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
- 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
- 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
- package/dist/hooks/__tests__/__screenshots__/use-theme.test.tsx/useTheme-local-theme-takes-precedence-over-global-theme-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-theme.test.tsx/useTheme-local-theme-takes-precedence-over-global-theme-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-merges-custom-translations-with-defaults-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-merges-custom-translations-with-defaults-1.js +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-returns-English-translations-by-default-1.cjs +0 -1
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-returns-English-translations-by-default-1.js +0 -1
- package/dist/hooks/__tests__/use-color-scheme.test.cjs +0 -1
- package/dist/hooks/__tests__/use-color-scheme.test.js +0 -1
- package/dist/hooks/__tests__/use-consent-manager.test.cjs +0 -1
- package/dist/hooks/__tests__/use-consent-manager.test.js +0 -1
- package/dist/hooks/__tests__/use-focus-trap.test.cjs +0 -1
- package/dist/hooks/__tests__/use-focus-trap.test.js +0 -1
- package/dist/hooks/__tests__/use-scroll-lock.test.cjs +0 -1
- package/dist/hooks/__tests__/use-scroll-lock.test.js +0 -1
- package/dist/hooks/__tests__/use-styles.test.cjs +0 -1
- package/dist/hooks/__tests__/use-styles.test.js +0 -1
- package/dist/hooks/__tests__/use-theme.test.cjs +0 -1
- package/dist/hooks/__tests__/use-theme.test.js +0 -1
- package/dist/hooks/__tests__/use-translations.test.cjs +0 -1
- package/dist/hooks/__tests__/use-translations.test.js +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/use-color-scheme.d.ts.map +0 -1
- package/dist/hooks/use-component-config.d.ts.map +0 -1
- package/dist/hooks/use-consent-manager.d.ts.map +0 -1
- package/dist/hooks/use-focus-trap.d.ts.map +0 -1
- package/dist/hooks/use-reduced-motion.d.ts.map +0 -1
- package/dist/hooks/use-scroll-lock.d.ts.map +0 -1
- package/dist/hooks/use-ssr-status.d.ts.map +0 -1
- package/dist/hooks/use-styles.d.ts.map +0 -1
- package/dist/hooks/use-text-direction.d.ts.map +0 -1
- package/dist/hooks/use-theme.d.ts.map +0 -1
- package/dist/hooks/use-translations.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/mockServiceWorker.js +0 -349
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.cjs +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.js +0 -1
- 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
- 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
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.cjs +0 -1
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.js +0 -1
- 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
- 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
- package/dist/providers/__tests__/provider-basic.test.cjs +0 -1
- package/dist/providers/__tests__/provider-basic.test.js +0 -1
- package/dist/providers/__tests__/provider-context.test.cjs +0 -1
- package/dist/providers/__tests__/provider-context.test.js +0 -1
- package/dist/providers/__tests__/provider-errors.test.cjs +0 -1
- package/dist/providers/__tests__/provider-errors.test.js +0 -1
- package/dist/providers/__tests__/provider-hydration.test.cjs +0 -1
- package/dist/providers/__tests__/provider-hydration.test.js +0 -1
- package/dist/providers/__tests__/test-helpers.cjs +0 -1
- package/dist/providers/__tests__/test-helpers.js +0 -1
- package/dist/providers/consent-manager-provider.d.ts.map +0 -1
- package/dist/server/fetch-ssr-data.d.ts.map +0 -1
- package/dist/server/headers.d.ts.map +0 -1
- package/dist/server/headers.test.cjs +0 -1
- package/dist/server/headers.test.d.ts +0 -2
- package/dist/server/headers.test.d.ts.map +0 -1
- package/dist/server/headers.test.js +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/normalize-url.d.ts.map +0 -1
- package/dist/server/normalize-url.test.cjs +0 -1
- package/dist/server/normalize-url.test.d.ts +0 -2
- package/dist/server/normalize-url.test.d.ts.map +0 -1
- package/dist/server/normalize-url.test.js +0 -1
- package/dist/server/types.d.ts.map +0 -1
- package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.png +0 -0
- 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
- package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.png +0 -0
- package/dist/static/image/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.png +0 -0
- package/dist/static/image/useColorScheme-handles-default-theme-based-on-document-class-1.png +0 -0
- package/dist/static/image/useColorScheme-responds-to-system-preference-1.png +0 -0
- package/dist/static/image/useColorScheme-sets-dark-theme-correctly-1.png +0 -0
- package/dist/static/image/useColorScheme-updates-theme-when-default-theme-changes-1.png +0 -0
- package/dist/static/image/useColorScheme-updates-theme-when-system-preference-changes-1.png +0 -0
- package/dist/static/image/useConsentManager-provides-manager-object-when-configured-1.png +0 -0
- package/dist/static/image/useStyles-handles-string-className-correctly-1.png +0 -0
- package/dist/static/image/useStyles-merges-theme-and-component-styles-correctly-1.png +0 -0
- package/dist/static/image/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.png +0 -0
- package/dist/static/image/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.png +0 -0
- package/dist/static/image/useTheme-local-theme-takes-precedence-over-global-theme-1.png +0 -0
- package/dist/static/image/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.png +0 -0
- package/dist/static/image/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.png +0 -0
- package/dist/static/image/useTranslations-merges-custom-translations-with-defaults-1.png +0 -0
- package/dist/static/image/useTranslations-returns-English-translations-by-default-1.png +0 -0
- package/dist/test-setup.browser.cjs +0 -1
- package/dist/test-setup.browser.d.ts +0 -8
- package/dist/test-setup.browser.d.ts.map +0 -1
- package/dist/test-setup.browser.js +0 -1
- package/dist/types/consent-manager.d.ts.map +0 -1
- package/dist/types/theme/index.d.ts.map +0 -1
- package/dist/types/theme/style-keys.d.ts.map +0 -1
- package/dist/types/theme/style-types.d.ts.map +0 -1
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/merge-styles.d.ts.map +0 -1
- package/dist/utils/test-helpers.d.ts.map +0 -1
- package/dist/utils/theme-utils.d.ts.map +0 -1
- package/dist/version.d.ts +0 -2
- 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.
|