@c15t/react 2.2.1 → 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +88 -141
- package/README.md +2 -2
- package/dist/aggregate-components.js +2 -0
- package/dist/chunk-warming.js +1 -0
- package/dist/component-hooks/use-headless-consent-ui.js +2 -0
- package/dist/component-hooks/use-headless-iab-consent-ui.js +2 -0
- package/dist/component-hooks/use-manager.js +2 -0
- package/dist/component-hooks/use-panel-trigger.js +2 -0
- package/dist/component-hooks/use-translations.js +2 -0
- package/dist/components/consent-preferences-link/consent-preferences-link.js +2 -1
- package/dist/components/consent-preferences-link/index.js +1 -0
- package/dist/components/frame/atoms.js +1 -1
- package/dist/components/frame/frame.js +2 -1
- package/dist/components/frame/index.js +2 -1
- package/dist/components/iab-panel/atoms/card.js +2 -0
- package/dist/components/iab-panel/atoms/content.js +2 -0
- package/dist/components/iab-panel/atoms/footer.js +2 -0
- package/dist/components/iab-panel/atoms/header.js +2 -0
- package/dist/components/iab-panel/atoms/overlay.js +2 -0
- package/dist/components/iab-panel/atoms/purpose-item.js +2 -0
- package/dist/components/iab-panel/atoms/root.js +2 -0
- package/dist/components/iab-panel/atoms/stack-item.js +2 -0
- package/dist/components/iab-panel/atoms/tabs.js +2 -0
- package/dist/components/iab-panel/atoms/vendor-list.js +2 -0
- package/dist/components/iab-panel/hooks/use-display-model.js +2 -0
- package/dist/components/iab-panel/hooks/use-gvl-data.js +2 -0
- package/dist/components/iab-panel/iab-panel.js +2 -0
- package/dist/components/iab-panel/index.js +2 -0
- package/dist/components/iab-panel/use-iab-translations.js +1 -0
- package/dist/components/iab-prompt/atoms/button-group.js +2 -0
- package/dist/components/iab-prompt/atoms/card.js +2 -0
- package/dist/components/iab-prompt/atoms/description.js +2 -0
- package/dist/components/iab-prompt/atoms/footer.js +2 -0
- package/dist/components/iab-prompt/atoms/header.js +2 -0
- package/dist/components/iab-prompt/atoms/overlay.js +2 -0
- package/dist/components/iab-prompt/atoms/root.js +2 -0
- package/dist/components/iab-prompt/atoms/title.js +2 -0
- package/dist/components/iab-prompt/iab-prompt.js +2 -0
- package/dist/components/iab-prompt/index.js +2 -0
- package/dist/components/panel/atoms/card.js +2 -0
- package/dist/components/panel/atoms/overlay.js +1 -0
- package/dist/components/panel/atoms/root.js +2 -0
- package/dist/components/panel/index.js +2 -0
- package/dist/components/panel/panel.js +2 -0
- package/dist/components/{consent-dialog-link → panel-link}/index.js +1 -0
- package/dist/components/panel-trigger/atoms/button.js +2 -0
- package/dist/components/panel-trigger/atoms/icon.js +2 -0
- package/dist/components/panel-trigger/atoms/root.js +2 -0
- package/dist/components/panel-trigger/atoms/text.js +2 -0
- package/dist/components/panel-trigger/atoms/toolbar.js +2 -0
- package/dist/components/panel-trigger/index.js +2 -0
- package/dist/components/panel-trigger/panel-trigger-toolbar.js +2 -0
- package/dist/components/panel-trigger/panel-trigger.js +2 -0
- package/dist/components/panel-trigger/use-draggable.js +2 -0
- package/dist/components/preferences/atoms/accordion.js +1 -0
- package/dist/components/preferences/atoms/button.js +1 -0
- package/dist/components/preferences/atoms/footer.js +1 -0
- package/dist/components/preferences/atoms/root.js +2 -0
- package/dist/components/preferences/index.js +2 -0
- package/dist/components/preferences/policy-actions.js +2 -0
- package/dist/components/preferences/preferences.js +2 -0
- package/dist/components/prompt/atoms/overlay.js +1 -0
- package/dist/components/prompt/atoms/root.js +2 -0
- package/dist/components/prompt/components.js +1 -0
- package/dist/components/prompt/error-boundary.js +2 -0
- package/dist/components/prompt/index.js +2 -0
- package/dist/components/prompt/policy-actions.js +2 -0
- package/dist/components/prompt/prompt.js +2 -0
- package/dist/components/prompt/resolve-banner-primary-actions.js +1 -0
- package/dist/components/prompt/surface-context.js +2 -0
- package/dist/components/prompt/use-banner-copy.js +2 -0
- package/dist/components/shared/libs/recursive-clone-children.js +1 -1
- package/dist/components/shared/libs/slot.js +1 -1
- package/dist/components/shared/libs/use-controllable-state.js +1 -1
- package/dist/components/shared/policy-actions.js +2 -1
- package/dist/components/shared/primitives/box.js +2 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/components/shared/primitives/legal-links/index.js +1 -1
- package/dist/components/shared/ui/accordion/accordion.js +2 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.js +2 -1
- package/dist/components/shared/ui/branding.js +1 -1
- package/dist/components/shared/ui/button/button.js +1 -1
- package/dist/components/shared/ui/collapsible/collapsible.js +2 -1
- package/dist/components/shared/ui/dialog/dialog.js +2 -1
- package/dist/components/shared/ui/icon.js +1 -1
- package/dist/components/shared/ui/logo.js +1 -1
- package/dist/components/shared/ui/preference-item/preference-item.js +2 -1
- package/dist/components/shared/ui/switch/switch.js +1 -1
- package/dist/components/shared/ui/tabs/tabs.js +2 -1
- package/dist/context/consent-tracking-context.js +1 -0
- package/dist/context/iab-context-value.js +1 -0
- package/dist/context/index.js +1 -0
- package/dist/context/theme-context.js +2 -1
- package/dist/context.js +1 -0
- package/dist/devtools.js +2 -0
- package/dist/draft.js +2 -0
- package/dist/external-iab-context.js +2 -0
- package/dist/frame.js +2 -0
- package/dist/headless.js +1 -1
- package/dist/hooks/use-color-scheme.js +2 -1
- package/dist/hooks/use-component-config.js +2 -1
- package/dist/hooks/use-focus-trap.js +2 -1
- package/dist/hooks/use-headless-iab-consent-ui.js +2 -1
- package/dist/hooks/use-iab-manager.js +2 -0
- package/dist/hooks/use-is-hydrated.js +2 -0
- package/dist/hooks/use-reduced-motion.js +2 -1
- package/dist/hooks/use-scroll-lock.js +2 -1
- package/dist/hooks/use-text-direction.js +2 -1
- package/dist/hooks/use-theme.js +2 -1
- package/dist/hooks.js +1 -0
- package/dist/iab/styles.css +1 -1
- package/dist/iab/styles.tw3.css +133 -19
- package/dist/iab-context.js +2 -0
- package/dist/iab.js +1 -1
- package/dist/index.js +1 -1
- package/dist/module-hooks/iframe-blocker.js +2 -0
- package/dist/module-hooks/network-blocker.js +2 -0
- package/dist/module-hooks/persistence.js +2 -0
- package/dist/module-hooks/script-loader.js +2 -0
- package/dist/module-hooks/shared.js +2 -0
- package/dist/module-hooks.js +2 -0
- package/dist/panel-link.js +2 -0
- package/dist/panel-trigger.js +2 -0
- package/dist/panel.js +2 -0
- package/dist/preferences.js +2 -0
- package/dist/primitives.js +1 -1
- package/dist/prompt.js +2 -0
- package/dist/provider.js +2 -0
- package/dist/server/fetch-ssr-data.js +1 -1
- package/dist/server/headers.js +1 -1
- package/dist/server/init-cache-key.js +1 -1
- package/dist/server/normalize-url.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.tw3.css +173 -29
- package/dist/theme-provider.js +2 -0
- package/dist/transports/offline.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/theme/index.js +1 -1
- package/dist/types/theme/style-types.js +1 -1
- package/dist/ui-config-context.js +2 -0
- package/dist/ui-save.js +1 -0
- package/dist/utils/cn.js +1 -1
- package/dist/utils/default-translation-config.js +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/merge-slot-props.js +1 -0
- package/dist/utils/merge-styles.js +1 -1
- package/dist/utils/theme-utils.js +1 -1
- package/dist/version.js +1 -1
- package/dist-types/aggregate-components.d.ts +4 -0
- package/dist-types/chunk-warming.d.ts +19 -0
- package/dist-types/component-hooks/use-headless-consent-ui.d.ts +68 -0
- package/dist-types/component-hooks/use-headless-iab-consent-ui.d.ts +22 -0
- package/dist-types/component-hooks/use-manager.d.ts +40 -0
- package/dist-types/component-hooks/use-panel-trigger.d.ts +20 -0
- package/dist-types/component-hooks/use-translations.d.ts +2 -0
- package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +1 -1
- package/dist-types/components/frame/atoms.d.ts +5 -5
- package/dist-types/components/frame/types.d.ts +3 -2
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/card.d.ts +2 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/content.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/footer.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/header.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/overlay.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/purpose-item.d.ts +7 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/root.d.ts +3 -2
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/stack-item.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/tabs.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/vendor-list.d.ts +2 -3
- package/dist-types/components/iab-panel/hooks/use-display-model.d.ts +18 -0
- package/dist-types/components/iab-panel/hooks/use-gvl-data.d.ts +17 -0
- package/dist-types/components/{iab-consent-dialog/iab-consent-dialog.d.ts → iab-panel/iab-panel.d.ts} +10 -3
- package/dist-types/components/{iab-consent-dialog → iab-panel}/index.d.ts +3 -2
- package/dist-types/components/iab-panel/types.d.ts +1 -0
- package/dist-types/components/{iab-consent-dialog → iab-panel}/use-iab-translations.d.ts +3 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/button-group.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/card.d.ts +2 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/description.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/footer.d.ts +2 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/header.d.ts +2 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/overlay.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/root.d.ts +3 -2
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/title.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner/iab-consent-banner.d.ts → iab-prompt/iab-prompt.d.ts} +10 -4
- package/dist-types/components/{iab-consent-banner → iab-prompt}/index.d.ts +1 -1
- package/dist-types/components/{consent-dialog → panel}/atoms/card.d.ts +15 -15
- package/dist-types/components/{consent-dialog → panel}/atoms/overlay.d.ts +24 -8
- package/dist-types/components/{consent-dialog → panel}/atoms/root.d.ts +4 -3
- package/dist-types/components/{consent-dialog → panel}/index.d.ts +13 -8
- package/dist-types/components/{consent-dialog/consent-dialog.d.ts → panel/panel.d.ts} +6 -5
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/button.d.ts +2 -1
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/icon.d.ts +1 -16
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/root.d.ts +11 -23
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/text.d.ts +0 -11
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/toolbar.d.ts +15 -4
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/index.d.ts +2 -2
- package/dist-types/components/{consent-dialog-trigger/consent-dialog-trigger-toolbar.d.ts → panel-trigger/panel-trigger-toolbar.d.ts} +0 -23
- package/dist-types/components/{consent-dialog-trigger/consent-dialog-trigger.d.ts → panel-trigger/panel-trigger.d.ts} +8 -4
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/types.d.ts +16 -7
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/use-draggable.d.ts +2 -9
- package/dist-types/components/{consent-widget → preferences}/atoms/accordion.d.ts +5 -5
- package/dist-types/components/{consent-widget → preferences}/atoms/footer.d.ts +3 -3
- package/dist-types/components/{consent-widget → preferences}/atoms/root.d.ts +1 -1
- package/dist-types/components/{consent-widget → preferences}/index.d.ts +11 -9
- package/dist-types/components/preferences/policy-actions.d.ts +10 -0
- package/dist-types/components/{consent-banner → prompt}/atoms/overlay.d.ts +1 -1
- package/dist-types/components/prompt/atoms/root.d.ts +78 -0
- package/dist-types/components/{consent-banner → prompt}/components.d.ts +99 -14
- package/dist-types/components/{consent-banner → prompt}/error-boundary.d.ts +3 -1
- package/dist-types/components/{consent-banner → prompt}/index.d.ts +18 -10
- package/dist-types/components/prompt/policy-actions.d.ts +12 -0
- package/dist-types/components/{consent-banner/consent-banner.d.ts → prompt/prompt.d.ts} +36 -10
- package/dist-types/components/prompt/resolve-banner-primary-actions.d.ts +14 -0
- package/dist-types/components/prompt/surface-context.d.ts +45 -0
- package/dist-types/components/prompt/use-banner-copy.d.ts +16 -0
- package/dist-types/components/shared/libs/polymorphic.d.ts +2 -2
- package/dist-types/components/shared/libs/recursive-clone-children.d.ts +2 -2
- package/dist-types/components/shared/libs/slot.d.ts +1 -1
- package/dist-types/components/shared/libs/use-controllable-state.d.ts +1 -1
- package/dist-types/components/shared/policy-actions.d.ts +8 -3
- package/dist-types/components/shared/primitives/box.d.ts +3 -1
- package/dist-types/components/shared/primitives/button.d.ts +4 -37
- package/dist-types/components/shared/primitives/button.types.d.ts +3 -1
- package/dist-types/components/shared/primitives/legal-links/index.d.ts +7 -11
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +45 -12
- package/dist-types/components/shared/ui/accordion/accordion.types.d.ts +1 -1
- package/dist-types/components/shared/ui/animated-collapse/animated-collapse.d.ts +1 -1
- package/dist-types/components/shared/ui/branding.d.ts +12 -12
- package/dist-types/components/shared/ui/button/button.d.ts +19 -25
- package/dist-types/components/shared/ui/button/button.types.d.ts +2 -2
- package/dist-types/components/shared/ui/collapsible/collapsible.d.ts +18 -1
- package/dist-types/components/shared/ui/dialog/dialog.d.ts +6 -6
- package/dist-types/components/shared/ui/icon.d.ts +1 -1
- package/dist-types/components/shared/ui/logo.d.ts +0 -21
- package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +46 -2
- package/dist-types/components/shared/ui/switch/switch.d.ts +19 -8
- package/dist-types/components/shared/ui/tabs/tabs.d.ts +19 -2
- package/dist-types/context/iab-context-value.d.ts +37 -0
- package/dist-types/context/index.d.ts +3 -0
- package/dist-types/context/theme-context.d.ts +2 -2
- package/dist-types/context.d.ts +17 -0
- package/dist-types/devtools.d.ts +54 -0
- package/dist-types/draft.d.ts +31 -0
- package/dist-types/external-iab-context.d.ts +29 -0
- package/dist-types/frame.d.ts +1 -0
- package/dist-types/headless.d.ts +12 -8
- package/dist-types/hooks/use-color-scheme.d.ts +1 -1
- package/dist-types/hooks/use-component-config.d.ts +2 -2
- package/dist-types/hooks/use-focus-trap.d.ts +2 -2
- package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +7 -8
- package/dist-types/hooks/use-iab-manager.d.ts +52 -0
- package/dist-types/hooks/use-is-hydrated.d.ts +8 -0
- package/dist-types/hooks/use-reduced-motion.d.ts +1 -1
- package/dist-types/hooks/use-scroll-lock.d.ts +1 -1
- package/dist-types/hooks/use-text-direction.d.ts +1 -1
- package/dist-types/hooks/use-theme.d.ts +2 -1
- package/dist-types/hooks.d.ts +148 -0
- package/dist-types/iab-context.d.ts +28 -0
- package/dist-types/iab.d.ts +14 -8
- package/dist-types/index.d.ts +61 -22
- package/dist-types/module-hooks/iframe-blocker.d.ts +6 -0
- package/dist-types/module-hooks/network-blocker.d.ts +9 -0
- package/dist-types/module-hooks/persistence.d.ts +4 -0
- package/dist-types/module-hooks/script-loader.d.ts +6 -0
- package/dist-types/module-hooks/shared.d.ts +2 -0
- package/dist-types/module-hooks.d.ts +4 -0
- package/dist-types/panel-link.d.ts +1 -0
- package/dist-types/panel-trigger.d.ts +1 -0
- package/dist-types/panel.d.ts +1 -0
- package/dist-types/preferences.d.ts +1 -0
- package/dist-types/prompt.d.ts +1 -0
- package/dist-types/provider.d.ts +144 -0
- package/dist-types/server/fetch-ssr-data.d.ts +2 -2
- package/dist-types/server/headers.d.ts +3 -3
- package/dist-types/server/init-cache-key.d.ts +3 -3
- package/dist-types/server/normalize-url.d.ts +2 -2
- package/dist-types/server/types.d.ts +1 -1
- package/dist-types/theme-provider.d.ts +10 -0
- package/dist-types/transports/offline.d.ts +18 -0
- package/dist-types/types/index.d.ts +3 -0
- package/dist-types/types/manager.d.ts +15 -0
- package/dist-types/types/slots.d.ts +5 -0
- package/dist-types/types/theme/index.d.ts +0 -1
- package/dist-types/types/theme/style-types.d.ts +3 -9
- package/dist-types/ui-config-context.d.ts +9 -0
- package/dist-types/ui-save.d.ts +5 -0
- package/dist-types/utils/cn.d.ts +1 -1
- package/dist-types/utils/default-translation-config.d.ts +6 -0
- package/dist-types/utils/index.d.ts +4 -0
- package/dist-types/utils/merge-slot-props.d.ts +14 -0
- package/dist-types/utils/merge-styles.d.ts +1 -1
- package/dist-types/utils/theme-utils.d.ts +2 -2
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +88 -141
- package/docs/assets/v3/brand-bar.png +0 -0
- package/docs/assets/v3/brand-card.png +0 -0
- package/docs/assets/v3/choice-wall.png +0 -0
- package/docs/assets/v3/mobile-card.png +0 -0
- package/docs/assets/v3/preferences.png +0 -0
- package/docs/customization/overview.md +45 -0
- package/docs/customization/recipes.md +79 -0
- package/docs/customization/slots.md +55 -0
- package/docs/customization/tokens.md +76 -0
- package/docs/customization/translations.md +49 -0
- package/docs/frameworks/react/components/consent-banner.md +219 -202
- package/docs/frameworks/react/components/consent-dialog-link.md +88 -35
- package/docs/frameworks/react/components/consent-dialog-trigger.md +74 -134
- package/docs/frameworks/react/components/consent-dialog.md +170 -135
- package/docs/frameworks/react/components/consent-manager-provider.md +41 -249
- package/docs/frameworks/react/components/consent-widget.md +154 -118
- package/docs/frameworks/react/components/dev-tools.md +198 -33
- package/docs/frameworks/react/components/frame.md +120 -42
- package/docs/frameworks/react/concepts/consent-categories.md +24 -89
- package/docs/frameworks/react/concepts/policy-presets.md +123 -0
- package/docs/frameworks/react/headless.md +91 -185
- package/docs/frameworks/react/hooks/use-consent-manager/overview.md +39 -153
- package/docs/frameworks/react/iab/overview.md +33 -108
- package/docs/frameworks/react/quickstart.md +116 -112
- package/docs/frameworks/react/script-loader.md +35 -535
- package/docs/frameworks/react/styling/overview.md +160 -255
- package/docs/frameworks/react/troubleshooting.md +47 -119
- package/docs/guides/consent-state.md +60 -0
- package/docs/guides/data-fetching.md +163 -0
- package/docs/guides/deployment-modes.md +63 -0
- package/docs/guides/troubleshooting.md +68 -0
- package/docs/guides/verify-consent.md +62 -0
- package/docs/integrations/adobe-analytics.md +239 -105
- package/docs/integrations/ahrefs-analytics.md +238 -104
- package/docs/integrations/amplitude.md +219 -157
- package/docs/integrations/building-integrations.md +32 -224
- package/docs/integrations/clearbit.md +247 -86
- package/docs/integrations/cloudflare-web-analytics.md +250 -84
- package/docs/integrations/crisp.md +251 -97
- package/docs/integrations/databuddy.md +259 -153
- package/docs/integrations/fathom-analytics.md +239 -96
- package/docs/integrations/google-maps.md +328 -207
- package/docs/integrations/google-tag-manager.md +248 -96
- package/docs/integrations/google-tag.md +261 -90
- package/docs/integrations/heap.md +222 -149
- package/docs/integrations/hightouch.md +225 -131
- package/docs/integrations/hotjar.md +239 -90
- package/docs/integrations/intercom.md +239 -98
- package/docs/integrations/linkedin-insights.md +243 -113
- package/docs/integrations/logrocket.md +241 -123
- package/docs/integrations/matomo-analytics.md +256 -111
- package/docs/integrations/meta-pixel.md +197 -324
- package/docs/integrations/microsoft-clarity.md +233 -114
- package/docs/integrations/microsoft-uet.md +245 -110
- package/docs/integrations/mixpanel-analytics.md +252 -87
- package/docs/integrations/openai-pixel.md +441 -0
- package/docs/integrations/overview.md +95 -133
- package/docs/integrations/pirsch.md +249 -96
- package/docs/integrations/plausible-analytics.md +241 -100
- package/docs/integrations/posthog.md +353 -214
- package/docs/integrations/promptwatch.md +251 -81
- package/docs/integrations/reddit-pixel.md +226 -173
- package/docs/integrations/rudderstack.md +244 -187
- package/docs/integrations/rybbit-analytics.md +244 -91
- package/docs/integrations/segment.md +238 -92
- package/docs/integrations/snapchat-pixel.md +240 -110
- package/docs/integrations/tiktok-pixel.md +249 -81
- package/docs/integrations/umami-analytics.md +242 -95
- package/docs/integrations/vercel-analytics.md +242 -90
- package/docs/integrations/x-pixel.md +238 -104
- package/docs/integrations/youtube.md +354 -142
- package/docs/upgrade-v3.md +334 -0
- package/iab/styles.css +1 -1
- package/iab/styles.tw3.css +1 -1
- package/package.json +187 -102
- package/readme.json +1 -1
- package/src/iab/styles.css +1 -1
- package/src/iab/styles.tw3.css +1 -1
- package/src/styles.css +1 -1
- package/src/styles.tw3.css +1 -1
- package/styles.css +1 -1
- package/styles.tw3.css +1 -1
- package/client/components/consent-banner.js +0 -4
- package/client/components/consent-dialog-link.js +0 -3
- package/client/components/consent-dialog-trigger.js +0 -3
- package/client/components/consent-dialog.js +0 -4
- package/client/components/consent-widget.js +0 -4
- package/client/components/frame.js +0 -3
- package/client/components/integrations.js +0 -3
- package/dist/components/consent-banner/atoms/overlay.cjs +0 -1
- package/dist/components/consent-banner/atoms/overlay.js +0 -1
- package/dist/components/consent-banner/atoms/root.cjs +0 -1
- package/dist/components/consent-banner/atoms/root.js +0 -1
- package/dist/components/consent-banner/components.cjs +0 -1
- package/dist/components/consent-banner/components.js +0 -1
- package/dist/components/consent-banner/consent-banner.cjs +0 -1
- package/dist/components/consent-banner/consent-banner.js +0 -1
- package/dist/components/consent-banner/error-boundary.cjs +0 -1
- package/dist/components/consent-banner/error-boundary.js +0 -1
- package/dist/components/consent-banner/index.cjs +0 -1
- package/dist/components/consent-banner/index.js +0 -1
- package/dist/components/consent-banner/policy-actions.cjs +0 -1
- package/dist/components/consent-banner/policy-actions.js +0 -1
- package/dist/components/consent-dialog/atoms/card.cjs +0 -1
- package/dist/components/consent-dialog/atoms/card.js +0 -1
- package/dist/components/consent-dialog/atoms/overlay.cjs +0 -1
- package/dist/components/consent-dialog/atoms/overlay.js +0 -1
- package/dist/components/consent-dialog/atoms/root.cjs +0 -1
- package/dist/components/consent-dialog/atoms/root.js +0 -1
- package/dist/components/consent-dialog/consent-dialog.cjs +0 -1
- package/dist/components/consent-dialog/consent-dialog.js +0 -1
- package/dist/components/consent-dialog/index.cjs +0 -1
- package/dist/components/consent-dialog/index.js +0 -1
- package/dist/components/consent-dialog-link/index.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/button.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/button.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/root.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/root.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/text.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/text.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/toolbar.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/toolbar.js +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.cjs +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.js +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.js +0 -1
- package/dist/components/consent-dialog-trigger/index.cjs +0 -1
- package/dist/components/consent-dialog-trigger/index.js +0 -1
- package/dist/components/consent-dialog-trigger/types.cjs +0 -1
- package/dist/components/consent-dialog-trigger/use-draggable.cjs +0 -1
- package/dist/components/consent-dialog-trigger/use-draggable.js +0 -1
- package/dist/components/consent-preferences-link/consent-preferences-link.cjs +0 -1
- package/dist/components/consent-preferences-link/index.cjs +0 -1
- package/dist/components/consent-widget/atoms/accordion.cjs +0 -1
- package/dist/components/consent-widget/atoms/accordion.js +0 -1
- package/dist/components/consent-widget/atoms/button.cjs +0 -1
- package/dist/components/consent-widget/atoms/button.js +0 -1
- package/dist/components/consent-widget/atoms/footer.cjs +0 -1
- package/dist/components/consent-widget/atoms/footer.js +0 -1
- package/dist/components/consent-widget/atoms/root.cjs +0 -1
- package/dist/components/consent-widget/atoms/root.js +0 -1
- package/dist/components/consent-widget/consent-widget.cjs +0 -1
- package/dist/components/consent-widget/consent-widget.js +0 -1
- package/dist/components/consent-widget/index.cjs +0 -1
- package/dist/components/consent-widget/index.js +0 -1
- package/dist/components/consent-widget/policy-actions.cjs +0 -1
- package/dist/components/consent-widget/policy-actions.js +0 -1
- package/dist/components/consent-widget/types.cjs +0 -1
- package/dist/components/frame/atoms.cjs +0 -1
- package/dist/components/frame/frame.cjs +0 -1
- package/dist/components/frame/index.cjs +0 -1
- package/dist/components/frame/types.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/button-group.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/button-group.js +0 -1
- package/dist/components/iab-consent-banner/atoms/card.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/card.js +0 -1
- package/dist/components/iab-consent-banner/atoms/description.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/description.js +0 -1
- package/dist/components/iab-consent-banner/atoms/footer.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/footer.js +0 -1
- package/dist/components/iab-consent-banner/atoms/header.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/header.js +0 -1
- package/dist/components/iab-consent-banner/atoms/overlay.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/overlay.js +0 -1
- package/dist/components/iab-consent-banner/atoms/root.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/root.js +0 -1
- package/dist/components/iab-consent-banner/atoms/title.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/title.js +0 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.cjs +0 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.js +0 -1
- package/dist/components/iab-consent-banner/index.cjs +0 -1
- package/dist/components/iab-consent-banner/index.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/card.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/card.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/content.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/content.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/footer.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/footer.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/header.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/header.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/root.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/root.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.js +0 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +0 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.js +0 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +0 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.js +0 -1
- package/dist/components/iab-consent-dialog/index.cjs +0 -1
- package/dist/components/iab-consent-dialog/index.js +0 -1
- package/dist/components/iab-consent-dialog/types.cjs +0 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.cjs +0 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.js +0 -1
- package/dist/components/integrations/google-map.cjs +0 -1
- package/dist/components/integrations/google-map.js +0 -1
- package/dist/components/integrations/index.cjs +0 -1
- package/dist/components/integrations/index.js +0 -1
- package/dist/components/integrations/shared.cjs +0 -1
- package/dist/components/integrations/shared.js +0 -1
- package/dist/components/integrations/youtube-embed.cjs +0 -1
- package/dist/components/integrations/youtube-embed.js +0 -1
- package/dist/components/shared/libs/polymorphic.cjs +0 -1
- package/dist/components/shared/libs/recursive-clone-children.cjs +0 -1
- package/dist/components/shared/libs/slot.cjs +0 -1
- package/dist/components/shared/libs/use-controllable-state.cjs +0 -1
- package/dist/components/shared/policy-actions.cjs +0 -1
- package/dist/components/shared/primitives/box.cjs +0 -1
- package/dist/components/shared/primitives/button.cjs +0 -1
- package/dist/components/shared/primitives/button.types.cjs +0 -1
- package/dist/components/shared/primitives/legal-links/index.cjs +0 -1
- package/dist/components/shared/ui/accordion/accordion.cjs +0 -1
- package/dist/components/shared/ui/accordion/accordion.types.cjs +0 -1
- package/dist/components/shared/ui/accordion/index.cjs +0 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +0 -1
- package/dist/components/shared/ui/animated-collapse/index.cjs +0 -1
- package/dist/components/shared/ui/branding.cjs +0 -1
- package/dist/components/shared/ui/button/button.cjs +0 -1
- package/dist/components/shared/ui/button/button.types.cjs +0 -1
- package/dist/components/shared/ui/button/index.cjs +0 -1
- package/dist/components/shared/ui/collapsible/collapsible.cjs +0 -1
- package/dist/components/shared/ui/collapsible/index.cjs +0 -1
- package/dist/components/shared/ui/dialog/dialog.cjs +0 -1
- package/dist/components/shared/ui/dialog/index.cjs +0 -1
- package/dist/components/shared/ui/icon.cjs +0 -1
- package/dist/components/shared/ui/logo.cjs +0 -1
- package/dist/components/shared/ui/preference-item/index.cjs +0 -1
- package/dist/components/shared/ui/preference-item/preference-item.cjs +0 -1
- package/dist/components/shared/ui/switch/index.cjs +0 -1
- package/dist/components/shared/ui/switch/switch.cjs +0 -1
- package/dist/components/shared/ui/switch/switch.types.cjs +0 -1
- package/dist/components/shared/ui/tabs/index.cjs +0 -1
- package/dist/components/shared/ui/tabs/tabs.cjs +0 -1
- package/dist/context/consent-manager-context.cjs +0 -1
- package/dist/context/consent-manager-context.js +0 -1
- package/dist/context/consent-tracking-context.cjs +0 -1
- package/dist/context/theme-context.cjs +0 -1
- package/dist/headless.cjs +0 -1
- package/dist/hooks/index.cjs +0 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/use-color-scheme.cjs +0 -1
- package/dist/hooks/use-component-config.cjs +0 -1
- package/dist/hooks/use-consent-dialog-trigger.cjs +0 -1
- package/dist/hooks/use-consent-dialog-trigger.js +0 -1
- package/dist/hooks/use-consent-manager.cjs +0 -1
- package/dist/hooks/use-consent-manager.js +0 -1
- package/dist/hooks/use-consent-script.cjs +0 -1
- package/dist/hooks/use-consent-script.js +0 -1
- package/dist/hooks/use-focus-trap.cjs +0 -1
- package/dist/hooks/use-headless-consent-ui.cjs +0 -1
- package/dist/hooks/use-headless-consent-ui.js +0 -1
- package/dist/hooks/use-headless-iab-consent-ui.cjs +0 -1
- package/dist/hooks/use-reduced-motion.cjs +0 -1
- package/dist/hooks/use-scroll-lock.cjs +0 -1
- package/dist/hooks/use-ssr-status.cjs +0 -1
- package/dist/hooks/use-ssr-status.js +0 -1
- package/dist/hooks/use-styles.cjs +0 -1
- package/dist/hooks/use-styles.js +0 -1
- package/dist/hooks/use-text-direction.cjs +0 -1
- package/dist/hooks/use-theme.cjs +0 -1
- package/dist/hooks/use-translations.cjs +0 -1
- package/dist/hooks/use-translations.js +0 -1
- package/dist/iab.cjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/primitives/accordion.cjs +0 -1
- package/dist/primitives/button.cjs +0 -1
- package/dist/primitives/collapsible.cjs +0 -1
- package/dist/primitives/dialog.cjs +0 -1
- package/dist/primitives/preference-item.cjs +0 -1
- package/dist/primitives/switch.cjs +0 -1
- package/dist/primitives/tabs.cjs +0 -1
- package/dist/primitives.cjs +0 -1
- package/dist/providers/consent-manager-provider.cjs +0 -1
- package/dist/providers/consent-manager-provider.js +0 -1
- package/dist/server/fetch-ssr-data.cjs +0 -1
- package/dist/server/headers.cjs +0 -1
- package/dist/server/index.cjs +0 -1
- package/dist/server/init-cache-key.cjs +0 -1
- package/dist/server/normalize-url.cjs +0 -1
- package/dist/server/types.cjs +0 -1
- package/dist/types/consent-manager.cjs +0 -1
- package/dist/types/theme/index.cjs +0 -1
- package/dist/types/theme/style-keys.cjs +0 -1
- package/dist/types/theme/style-types.cjs +0 -1
- package/dist/utils/cn.cjs +0 -1
- package/dist/utils/merge-styles.cjs +0 -1
- package/dist/utils/test-helpers.cjs +0 -1
- package/dist/utils/test-helpers.js +0 -1
- package/dist/utils/theme-utils.cjs +0 -1
- package/dist/version.cjs +0 -1
- package/dist-types/components/consent-banner/atoms/root.d.ts +0 -126
- package/dist-types/components/consent-banner/policy-actions.d.ts +0 -11
- package/dist-types/components/consent-widget/policy-actions.d.ts +0 -11
- package/dist-types/components/iab-consent-dialog/hooks/use-gvl-data.d.ts +0 -27
- package/dist-types/components/iab-consent-dialog/types.d.ts +0 -72
- package/dist-types/components/integrations/google-map.d.ts +0 -82
- package/dist-types/components/integrations/index.d.ts +0 -2
- package/dist-types/components/integrations/shared.d.ts +0 -12
- package/dist-types/components/integrations/youtube-embed.d.ts +0 -95
- package/dist-types/context/consent-manager-context.d.ts +0 -31
- package/dist-types/hooks/index.d.ts +0 -12
- package/dist-types/hooks/use-consent-dialog-trigger.d.ts +0 -10
- package/dist-types/hooks/use-consent-manager.d.ts +0 -27
- package/dist-types/hooks/use-consent-script.d.ts +0 -80
- package/dist-types/hooks/use-headless-consent-ui.d.ts +0 -46
- package/dist-types/hooks/use-ssr-status.d.ts +0 -57
- package/dist-types/hooks/use-styles.d.ts +0 -21
- package/dist-types/hooks/use-translations.d.ts +0 -28
- package/dist-types/providers/consent-manager-provider.d.ts +0 -40
- package/dist-types/types/consent-manager.d.ts +0 -39
- package/dist-types/types/theme/style-keys.d.ts +0 -1
- package/dist-types/utils/test-helpers.d.ts +0 -31
- package/docs/frameworks/react/building-headless-components.md +0 -370
- package/docs/frameworks/react/callbacks.md +0 -186
- package/docs/frameworks/react/concepts/client-modes.md +0 -177
- package/docs/frameworks/react/concepts/consent-models.md +0 -113
- package/docs/frameworks/react/concepts/cookie-management.md +0 -122
- package/docs/frameworks/react/concepts/glossary.md +0 -24
- package/docs/frameworks/react/concepts/initialization-flow.md +0 -149
- package/docs/frameworks/react/concepts/policy-packs.md +0 -228
- package/docs/frameworks/react/hooks/use-color-scheme.md +0 -41
- package/docs/frameworks/react/hooks/use-consent-manager/checking-consent.md +0 -96
- package/docs/frameworks/react/hooks/use-consent-manager/location-info.md +0 -97
- package/docs/frameworks/react/hooks/use-consent-manager/setting-consent.md +0 -94
- package/docs/frameworks/react/hooks/use-draggable.md +0 -59
- package/docs/frameworks/react/hooks/use-focus-trap.md +0 -42
- package/docs/frameworks/react/hooks/use-reduced-motion.md +0 -37
- package/docs/frameworks/react/hooks/use-ssr-status.md +0 -32
- package/docs/frameworks/react/hooks/use-text-direction.md +0 -50
- package/docs/frameworks/react/hooks/use-translations.md +0 -55
- package/docs/frameworks/react/iab/consent-banner.md +0 -91
- package/docs/frameworks/react/iab/consent-dialog.md +0 -129
- package/docs/frameworks/react/iab/use-gvl-data.md +0 -21
- package/docs/frameworks/react/iframe-blocking.md +0 -106
- package/docs/frameworks/react/internationalization.md +0 -207
- package/docs/frameworks/react/network-blocker.md +0 -140
- package/docs/frameworks/react/optimization.md +0 -148
- package/docs/frameworks/react/policy-packs.md +0 -242
- package/docs/frameworks/react/server-side.md +0 -158
- package/docs/frameworks/react/styling/classnames.md +0 -94
- package/docs/frameworks/react/styling/color-scheme.md +0 -84
- package/docs/frameworks/react/styling/css-variables.md +0 -53
- package/docs/frameworks/react/styling/slots.md +0 -94
- package/docs/frameworks/react/styling/tailwind.md +0 -119
- package/docs/frameworks/react/styling/tokens.md +0 -156
- package/docs/shared/concepts/client-modes.md +0 -103
- package/docs/shared/concepts/consent-categories.md +0 -41
- package/docs/shared/concepts/consent-models.md +0 -72
- package/docs/shared/concepts/cookie-management.md +0 -88
- package/docs/shared/concepts/glossary.md +0 -24
- package/docs/shared/concepts/initialization-flow.md +0 -105
- package/docs/shared/concepts/policy-packs.md +0 -225
- package/docs/shared/react/components/consent-banner.md +0 -242
- package/docs/shared/react/components/consent-dialog-link.md +0 -45
- package/docs/shared/react/components/consent-dialog-trigger.md +0 -185
- package/docs/shared/react/components/consent-dialog.md +0 -119
- package/docs/shared/react/components/consent-manager-provider.md +0 -225
- package/docs/shared/react/components/consent-widget.md +0 -121
- package/docs/shared/react/components/dev-tools.md +0 -81
- package/docs/shared/react/components/frame.md +0 -52
- package/docs/shared/react/guides/building-headless-components.md +0 -110
- package/docs/shared/react/guides/callbacks.md +0 -89
- package/docs/shared/react/guides/headless.md +0 -31
- package/docs/shared/react/guides/iframe-blocking.md +0 -65
- package/docs/shared/react/guides/internationalization.md +0 -123
- package/docs/shared/react/guides/network-blocker.md +0 -72
- package/docs/shared/react/guides/optimization.md +0 -44
- package/docs/shared/react/guides/policy-packs.md +0 -173
- package/docs/shared/react/guides/script-loader.md +0 -311
- package/docs/shared/react/hooks/use-color-scheme.md +0 -31
- package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +0 -95
- package/docs/shared/react/hooks/use-consent-manager/location-info.md +0 -96
- package/docs/shared/react/hooks/use-consent-manager/overview.md +0 -74
- package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +0 -93
- package/docs/shared/react/hooks/use-draggable.md +0 -30
- package/docs/shared/react/hooks/use-focus-trap.md +0 -20
- package/docs/shared/react/hooks/use-reduced-motion.md +0 -33
- package/docs/shared/react/hooks/use-ssr-status.md +0 -16
- package/docs/shared/react/hooks/use-text-direction.md +0 -38
- package/docs/shared/react/hooks/use-translations.md +0 -15
- package/docs/shared/react/iab/consent-banner.md +0 -60
- package/docs/shared/react/iab/consent-dialog.md +0 -76
- package/docs/shared/react/iab/overview.md +0 -80
- package/docs/shared/react/iab/use-gvl-data.md +0 -21
- package/docs/shared/react/styling/classnames.md +0 -93
- package/docs/shared/react/styling/color-scheme.md +0 -35
- package/docs/shared/react/styling/css-variables.md +0 -53
- package/docs/shared/react/styling/overview.md +0 -261
- package/docs/shared/react/styling/slots.md +0 -93
- package/docs/shared/react/styling/stylesheet-entrypoint.md +0 -8
- package/docs/shared/react/styling/tailwind.md +0 -88
- package/docs/shared/react/styling/tokens.md +0 -155
- package/docs/shared/troubleshooting.md +0 -82
- /package/dist/components/{consent-dialog-trigger → iab-panel}/types.js +0 -0
- /package/dist/components/{consent-widget → panel-trigger}/types.js +0 -0
- /package/dist/components/{iab-consent-dialog → preferences}/types.js +0 -0
- /package/dist/types/{consent-manager.js → manager.js} +0 -0
- /package/dist/types/{theme/style-keys.js → slots.js} +0 -0
- /package/dist-types/components/{consent-dialog-link → panel-link}/index.d.ts +0 -0
- /package/dist-types/components/{consent-widget → preferences}/atoms/button.d.ts +0 -0
- /package/dist-types/components/{consent-widget/consent-widget.d.ts → preferences/preferences.d.ts} +0 -0
- /package/dist-types/components/{consent-widget → preferences}/types.d.ts +0 -0
|
@@ -1,41 +1,7 @@
|
|
|
1
|
-
import type { AllConsentNames } from 'c15t';
|
|
2
|
-
import { useTheme } from '../../../hooks/use-theme';
|
|
3
|
-
import * as Button from '../ui/button';
|
|
1
|
+
import type { AllConsentNames } from '@c15t/core';
|
|
4
2
|
import type { ButtonVariantsProps } from '../ui/button/button';
|
|
5
3
|
import type { ConsentButtonProps } from './button.types';
|
|
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
|
-
};
|
|
4
|
+
type ConsentActionThemeKey = 'accept' | 'reject' | 'customize' | 'dismiss' | 'save';
|
|
39
5
|
/**
|
|
40
6
|
* Button component that allows users to reject non-essential cookies.
|
|
41
7
|
*
|
|
@@ -54,9 +20,10 @@ export declare function resolveConsentButtonStyle(params: {
|
|
|
54
20
|
export declare const ConsentButton: import("react").ForwardRefExoticComponent<ConsentButtonProps & ButtonVariantsProps & {
|
|
55
21
|
consentAction?: ConsentActionThemeKey;
|
|
56
22
|
isPrimary?: boolean;
|
|
57
|
-
action: 'accept-consent' | 'reject-consent' | 'custom-consent' | 'open-consent-dialog' | 'set-consent';
|
|
23
|
+
action: 'accept-consent' | 'reject-consent' | 'custom-consent' | 'open-consent-dialog' | 'set-consent' | 'dismiss-notice';
|
|
58
24
|
category?: AllConsentNames;
|
|
59
25
|
closeConsentDialog?: boolean;
|
|
60
26
|
closeConsentBanner?: boolean;
|
|
27
|
+
performDefaultAction?: boolean;
|
|
61
28
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
62
29
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ConsentComponentSlotKey } from '@c15t/schema/config';
|
|
1
2
|
import type { ButtonMode } from '@c15t/ui/styles/primitives';
|
|
2
3
|
import type { ComponentRef, HTMLAttributes, MouseEvent } from 'react';
|
|
3
4
|
import type { CSSVariables, ExtendThemeKeys } from '../../../types/theme';
|
|
@@ -8,6 +9,7 @@ export type ConsentButtonElement = ComponentRef<'button'>;
|
|
|
8
9
|
* @public
|
|
9
10
|
*/
|
|
10
11
|
export interface ConsentButtonProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'style'>, ExtendThemeKeys<CSSVariables> {
|
|
12
|
+
slotKey?: ConsentComponentSlotKey;
|
|
11
13
|
/**
|
|
12
14
|
* @remarks
|
|
13
15
|
* When true, the button will not apply any styles.
|
|
@@ -40,7 +42,7 @@ export interface ConsentButtonProps extends Omit<HTMLAttributes<HTMLButtonElemen
|
|
|
40
42
|
* @remarks
|
|
41
43
|
* Semantic consent action type for theme-based button styling.
|
|
42
44
|
*/
|
|
43
|
-
consentAction?: 'accept' | 'reject' | 'customize';
|
|
45
|
+
consentAction?: 'accept' | 'reject' | 'customize' | 'dismiss' | 'save';
|
|
44
46
|
/**
|
|
45
47
|
* @remarks
|
|
46
48
|
* Whether this button is the primary action for the current surface.
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type { LegalLinks as LegalLinksType } from 'c15t';
|
|
2
|
-
import type { AllThemeKeys } from '../../../../types/theme/style-keys';
|
|
1
|
+
import type { LegalLinks as LegalLinksType } from '@c15t/core';
|
|
3
2
|
/**
|
|
4
3
|
* Hook to filter legal links based on the provided links prop.
|
|
5
4
|
*
|
|
6
5
|
* @param links - Controls which legal links to display
|
|
7
6
|
* @returns Filtered legal links object or null
|
|
8
7
|
*/
|
|
9
|
-
export declare
|
|
8
|
+
export declare const useFilteredLegalLinks: (links?: (keyof LegalLinksType)[] | null) => LegalLinksType | null;
|
|
10
9
|
/**
|
|
11
10
|
* Props for the InlineLegalLinks component.
|
|
12
11
|
*/
|
|
@@ -19,10 +18,7 @@ export interface InlineLegalLinksProps {
|
|
|
19
18
|
* - Array of keys: Shows only the specified legal links
|
|
20
19
|
*/
|
|
21
20
|
links?: (keyof LegalLinksType)[] | null;
|
|
22
|
-
|
|
23
|
-
* Theme key for styling the links. Must be one of the valid legal-links parent keys.
|
|
24
|
-
*/
|
|
25
|
-
themeKey: LegalLinksThemeKey;
|
|
21
|
+
context: LegalLinksContext;
|
|
26
22
|
/**
|
|
27
23
|
* Optional test ID prefix for the links.
|
|
28
24
|
* Links will have test IDs like `${testIdPrefix}-${type}`
|
|
@@ -37,14 +33,14 @@ export interface InlineLegalLinksProps {
|
|
|
37
33
|
* ```tsx
|
|
38
34
|
* <InlineLegalLinks
|
|
39
35
|
* links={['privacyPolicy', 'cookiePolicy']}
|
|
40
|
-
*
|
|
36
|
+
* context="dialog"
|
|
41
37
|
* testIdPrefix="consent-manager-dialog-legal-link"
|
|
42
38
|
* />
|
|
43
39
|
* ```
|
|
44
40
|
*/
|
|
45
|
-
export declare
|
|
41
|
+
export declare const InlineLegalLinks: ({ links, context, testIdPrefix, }: InlineLegalLinksProps) => import("react").JSX.Element | null;
|
|
46
42
|
/**
|
|
47
|
-
* Valid
|
|
43
|
+
* Valid link slot contexts for inline legal links.
|
|
48
44
|
*/
|
|
49
|
-
type
|
|
45
|
+
type LegalLinksContext = 'banner' | 'dialog' | 'manager';
|
|
50
46
|
export {};
|
|
@@ -1,11 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { type ButtonHTMLAttributes, type ElementType, type HTMLAttributes } from 'react';
|
|
1
|
+
import type { AccordionType } from '@c15t/ui/primitives/accordion';
|
|
2
|
+
import type { ButtonHTMLAttributes, ElementType, HTMLAttributes } from 'react';
|
|
4
3
|
import type { PolymorphicComponentProps } from '../../libs/polymorphic';
|
|
5
4
|
import type { ThemeValue } from '../../../../types/theme';
|
|
6
|
-
export type
|
|
7
|
-
export
|
|
8
|
-
export
|
|
5
|
+
export type AccordionVariant = 'default' | 'bordered';
|
|
6
|
+
export type AccordionSize = 'medium' | 'small';
|
|
7
|
+
export interface AccordionVariantsProps {
|
|
8
|
+
variant?: AccordionVariant;
|
|
9
|
+
size?: AccordionSize;
|
|
10
|
+
}
|
|
11
|
+
export declare const accordionVariants: () => {
|
|
12
|
+
arrowClose: (options?: {
|
|
13
|
+
class?: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
arrowOpen: (options?: {
|
|
16
|
+
class?: string;
|
|
17
|
+
}) => string;
|
|
18
|
+
content: (options?: {
|
|
19
|
+
class?: string;
|
|
20
|
+
}) => string;
|
|
21
|
+
contentInner: (options?: {
|
|
22
|
+
class?: string;
|
|
23
|
+
}) => string;
|
|
24
|
+
contentViewport: (options?: {
|
|
25
|
+
class?: string;
|
|
26
|
+
}) => string;
|
|
27
|
+
icon: (options?: {
|
|
28
|
+
class?: string;
|
|
29
|
+
}) => string;
|
|
30
|
+
item: (options?: {
|
|
31
|
+
class?: string;
|
|
32
|
+
}) => string;
|
|
33
|
+
root: (options?: {
|
|
34
|
+
class?: string;
|
|
35
|
+
}) => string;
|
|
36
|
+
trigger: (options?: {
|
|
37
|
+
class?: string;
|
|
38
|
+
}) => string;
|
|
39
|
+
};
|
|
40
|
+
declare const ACCORDION_ICON_NAME = "AccordionIcon";
|
|
41
|
+
declare const ACCORDION_ARROW_NAME = "AccordionArrow";
|
|
42
|
+
export interface AccordionStylesKeys {
|
|
9
43
|
'accordion.root'?: ThemeValue;
|
|
10
44
|
'accordion.item': ThemeValue;
|
|
11
45
|
'accordion.trigger': ThemeValue;
|
|
@@ -14,7 +48,7 @@ export type AccordionStylesKeys = {
|
|
|
14
48
|
'accordion.arrow.close': ThemeValue;
|
|
15
49
|
'accordion.content': ThemeValue;
|
|
16
50
|
'accordion.content-inner': ThemeValue;
|
|
17
|
-
}
|
|
51
|
+
}
|
|
18
52
|
export type AccordionRootProps = HTMLAttributes<HTMLDivElement> & AccordionVariantsProps & {
|
|
19
53
|
collapsible?: boolean;
|
|
20
54
|
defaultValue?: string | string[];
|
|
@@ -37,8 +71,7 @@ export interface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
37
71
|
value: string;
|
|
38
72
|
}
|
|
39
73
|
declare const AccordionItem: import("react").ForwardRefExoticComponent<AccordionItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
40
|
-
export
|
|
41
|
-
}
|
|
74
|
+
export type AccordionHeaderProps = HTMLAttributes<HTMLDivElement>;
|
|
42
75
|
declare const AccordionHeader: import("react").ForwardRefExoticComponent<AccordionHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
76
|
export interface AccordionTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
44
77
|
noStyle?: boolean;
|
|
@@ -49,7 +82,7 @@ export interface AccordionIconBaseProps extends Record<string, unknown> {
|
|
|
49
82
|
}
|
|
50
83
|
declare function AccordionIcon<T extends ElementType>({ className, noStyle, as, ...rest }: PolymorphicComponentProps<T, AccordionIconBaseProps>): import("react").JSX.Element;
|
|
51
84
|
declare namespace AccordionIcon {
|
|
52
|
-
|
|
85
|
+
export { ACCORDION_ICON_NAME as displayName };
|
|
53
86
|
}
|
|
54
87
|
type AccordionArrowProps = HTMLAttributes<HTMLDivElement> & {
|
|
55
88
|
closeIcon?: {
|
|
@@ -62,9 +95,9 @@ type AccordionArrowProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
62
95
|
className?: string;
|
|
63
96
|
};
|
|
64
97
|
};
|
|
65
|
-
declare function AccordionArrow({ closeIcon, className, noStyle, openIcon, ...rest }: AccordionArrowProps): import("react").JSX.Element;
|
|
98
|
+
declare function AccordionArrow({ children, closeIcon, className, noStyle, openIcon, ...rest }: AccordionArrowProps): import("react").JSX.Element;
|
|
66
99
|
declare namespace AccordionArrow {
|
|
67
|
-
|
|
100
|
+
export { ACCORDION_ARROW_NAME as displayName };
|
|
68
101
|
}
|
|
69
102
|
export interface AccordionContentProps extends HTMLAttributes<HTMLElement> {
|
|
70
103
|
innerClassName?: string;
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Re-export accordion variant types from @c15t/ui for convenience.
|
|
3
3
|
* The canonical definitions are in @c15t/ui/styles/primitives.
|
|
4
4
|
*/
|
|
5
|
-
export type { AccordionColorCSSVariables, AccordionContentCSSVariables, AccordionCSSVariables, AccordionIconCSSVariables, AccordionItemCSSVariables, AccordionLayoutCSSVariables, AccordionRootCSSVariables,
|
|
5
|
+
export type { AccordionColorCSSVariables, AccordionContentCSSVariables, AccordionCSSVariables, AccordionIconCSSVariables, AccordionItemCSSVariables, AccordionLayoutCSSVariables, AccordionRootCSSVariables, AccordionTriggerCSSVariables, } from '@c15t/ui/styles/primitives';
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { Branding } from 'c15t';
|
|
1
|
+
import type { Branding } from '@c15t/core';
|
|
2
2
|
import type { SVGProps } from 'react';
|
|
3
3
|
import type { CSSPropertiesWithVars } from '../../../types/theme';
|
|
4
4
|
export type ResolvedBranding = 'c15t' | 'inth' | 'none';
|
|
5
5
|
export type BrandingVariant = 'footer' | 'dialog-tag' | 'banner-tag';
|
|
6
|
-
export type
|
|
7
|
-
|
|
6
|
+
export type BrandingSlotContext = 'banner' | 'dialog' | 'manager' | 'iab-banner' | 'iab-dialog';
|
|
7
|
+
interface BrandingProps {
|
|
8
8
|
hideBranding: boolean;
|
|
9
9
|
variant?: BrandingVariant;
|
|
10
|
-
|
|
10
|
+
slotContext?: BrandingSlotContext;
|
|
11
11
|
className?: string;
|
|
12
12
|
style?: CSSPropertiesWithVars;
|
|
13
13
|
'data-testid'?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
14
|
+
}
|
|
15
|
+
interface BrandingFullLogoProps {
|
|
16
16
|
branding: Branding | string;
|
|
17
17
|
className?: string;
|
|
18
|
-
}
|
|
18
|
+
}
|
|
19
19
|
type BrandingCompactLogoProps = SVGProps<SVGSVGElement> & {
|
|
20
20
|
branding: Branding | string;
|
|
21
21
|
};
|
|
22
|
-
export declare
|
|
23
|
-
export declare
|
|
24
|
-
export declare
|
|
25
|
-
export declare
|
|
26
|
-
export declare
|
|
22
|
+
export declare const resolveBranding: (branding: Branding | string) => ResolvedBranding;
|
|
23
|
+
export declare const getBrandingHref: (branding: Branding | string, refParam?: string) => string;
|
|
24
|
+
export declare const BrandingFullLogo: ({ branding, className, }: BrandingFullLogoProps) => import("react").JSX.Element;
|
|
25
|
+
export declare const BrandingCompactLogo: ({ branding, ...props }: BrandingCompactLogoProps) => import("react").JSX.Element;
|
|
26
|
+
export declare const BrandingLink: ({ hideBranding, variant, slotContext, className, style, 'data-testid': testId, }: BrandingProps) => import("react").JSX.Element | null;
|
|
27
27
|
export {};
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { type ButtonHTMLAttributes, type ElementType } from 'react';
|
|
1
|
+
import type { ButtonHTMLAttributes, ElementType } from 'react';
|
|
3
2
|
import type { PolymorphicComponentProps } from '../../libs/polymorphic';
|
|
4
|
-
export type
|
|
5
|
-
export
|
|
3
|
+
export type ButtonVariant = 'primary' | 'neutral' | 'secondary';
|
|
4
|
+
export type ButtonMode = 'filled' | 'stroke' | 'lighter' | 'ghost';
|
|
5
|
+
export type ButtonSize = 'medium' | 'small' | 'xsmall' | 'xxsmall';
|
|
6
|
+
export interface ButtonVariantsProps {
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
mode?: ButtonMode;
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
}
|
|
11
|
+
export declare const buttonVariants: (_props?: ButtonVariantsProps) => {
|
|
12
|
+
icon: (options?: {
|
|
13
|
+
class?: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
root: (options?: {
|
|
16
|
+
class?: string;
|
|
17
|
+
}) => string;
|
|
18
|
+
};
|
|
19
|
+
declare const BUTTON_ICON_NAME = "ButtonIcon";
|
|
6
20
|
export interface ButtonIconProps extends Record<string, unknown> {
|
|
7
21
|
variant?: ButtonVariant;
|
|
8
22
|
mode?: ButtonMode;
|
|
@@ -44,29 +58,9 @@ declare const ButtonRoot: import("react").ForwardRefExoticComponent<ButtonVarian
|
|
|
44
58
|
*/
|
|
45
59
|
noStyle?: boolean;
|
|
46
60
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
47
|
-
/**
|
|
48
|
-
* The icon component for the Button compound component
|
|
49
|
-
*
|
|
50
|
-
* @remarks
|
|
51
|
-
* ButtonIcon is a polymorphic component that can render any icon component while maintaining
|
|
52
|
-
* consistent styling with the parent button. It inherits variant properties from ButtonRoot.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```tsx
|
|
56
|
-
* <ButtonRoot>
|
|
57
|
-
* <ButtonIcon as={MyIcon} />
|
|
58
|
-
* Button with Icon
|
|
59
|
-
* </ButtonRoot>
|
|
60
|
-
* ```
|
|
61
|
-
*
|
|
62
|
-
* @typeParam T - The element type to render the icon as
|
|
63
|
-
* @param props - Component props including the polymorphic 'as' prop and shared button variant props
|
|
64
|
-
*
|
|
65
|
-
* @public
|
|
66
|
-
*/
|
|
67
61
|
declare function ButtonIcon<T extends ElementType>({ variant, mode, size, as, className, ...rest }: PolymorphicComponentProps<T, ButtonIconProps>): import("react").JSX.Element;
|
|
68
62
|
declare namespace ButtonIcon {
|
|
69
|
-
|
|
63
|
+
export { BUTTON_ICON_NAME as displayName };
|
|
70
64
|
}
|
|
71
65
|
/**
|
|
72
66
|
* Export the compound components
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export interface ButtonCSSVariables {
|
|
2
2
|
'--button-primary': string;
|
|
3
3
|
'--button-primary-dark': string;
|
|
4
4
|
'--button-primary-hover': string;
|
|
@@ -45,4 +45,4 @@ export type ButtonCSSVariables = {
|
|
|
45
45
|
'--button-shadow-neutral-dark': string;
|
|
46
46
|
'--button-shadow-neutral-hover': string;
|
|
47
47
|
'--button-shadow-neutral-hover-dark': string;
|
|
48
|
-
}
|
|
48
|
+
}
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export declare const collapsibleVariants: () => {
|
|
3
|
+
content: (options?: {
|
|
4
|
+
class?: string;
|
|
5
|
+
}) => string;
|
|
6
|
+
contentInner: (options?: {
|
|
7
|
+
class?: string;
|
|
8
|
+
}) => string;
|
|
9
|
+
contentViewport: (options?: {
|
|
10
|
+
class?: string;
|
|
11
|
+
}) => string;
|
|
12
|
+
root: (options?: {
|
|
13
|
+
class?: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
trigger: (options?: {
|
|
16
|
+
class?: string;
|
|
17
|
+
}) => string;
|
|
18
|
+
};
|
|
2
19
|
export interface CollapsibleRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
20
|
children: ReactNode;
|
|
4
21
|
defaultOpen?: boolean;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ButtonHTMLAttributes, HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
2
|
export interface DialogRootProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
defaultOpen?: boolean;
|
|
5
5
|
onOpenChange?: (open: boolean) => void;
|
|
6
6
|
open?: boolean;
|
|
7
7
|
}
|
|
8
|
-
declare
|
|
8
|
+
declare const DialogRoot: ({ children, defaultOpen, onOpenChange, open, }: DialogRootProps) => import("react").JSX.Element;
|
|
9
9
|
export interface DialogTriggerProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
}
|
|
12
12
|
declare const DialogTrigger: import("react").ForwardRefExoticComponent<DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
-
declare
|
|
13
|
+
declare const DialogPortal: ({ children }: {
|
|
14
14
|
children: ReactNode;
|
|
15
|
-
})
|
|
15
|
+
}) => import("react").ReactPortal | null;
|
|
16
16
|
declare const DialogOverlay: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
17
|
-
export interface DialogContentProps extends HTMLAttributes<
|
|
17
|
+
export interface DialogContentProps extends HTMLAttributes<HTMLDialogElement> {
|
|
18
18
|
closeOnOutsideClick?: boolean;
|
|
19
19
|
initialFocusRef?: RefObject<HTMLElement | null>;
|
|
20
20
|
}
|
|
21
|
-
declare const DialogContent: import("react").ForwardRefExoticComponent<DialogContentProps & import("react").RefAttributes<
|
|
21
|
+
declare const DialogContent: import("react").ForwardRefExoticComponent<DialogContentProps & import("react").RefAttributes<HTMLDialogElement>>;
|
|
22
22
|
declare const DialogTitle: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
23
23
|
declare const DialogDescription: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
24
24
|
export interface DialogCloseProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
@@ -8,11 +8,6 @@ interface IconProps {
|
|
|
8
8
|
* Use this for compact displays like the floating trigger.
|
|
9
9
|
*/
|
|
10
10
|
export declare const C15TIconOnly: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & IconProps) => import("react").JSX.Element;
|
|
11
|
-
/**
|
|
12
|
-
* c15t full logo with text.
|
|
13
|
-
* Use this for branding displays.
|
|
14
|
-
*/
|
|
15
|
-
export declare const C15TIcon: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & IconProps) => import("react").JSX.Element;
|
|
16
11
|
/**
|
|
17
12
|
* INTH logo for partner branding displays.
|
|
18
13
|
*/
|
|
@@ -21,22 +16,6 @@ export declare const InthLogo: (props: SVGProps<SVGSVGElement> & IconProps) => i
|
|
|
21
16
|
* INTH icon-only mark for compact placements like floating triggers.
|
|
22
17
|
*/
|
|
23
18
|
export declare const InthIconOnly: (props: SVGProps<SVGSVGElement> & IconProps) => import("react").JSX.Element;
|
|
24
|
-
/**
|
|
25
|
-
* Wordmark logo for the hosted consent product (inth.com).
|
|
26
|
-
*
|
|
27
|
-
* Used in marketing surfaces such as the optional banner attribution and
|
|
28
|
-
* the consent dialog footer. Render inside a flow where its native
|
|
29
|
-
* 595x97 viewBox can scale freely (e.g. an `inline-block` parent).
|
|
30
|
-
*
|
|
31
|
-
* @param title - Accessible title announced to screen readers. Defaults to "Consent".
|
|
32
|
-
* @param titleId - DOM id for the SVG `<title>` element. Must be unique on the page when rendered more than once.
|
|
33
|
-
*/
|
|
34
|
-
export declare const ConsentLogo: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & IconProps) => import("react").JSX.Element;
|
|
35
|
-
/**
|
|
36
|
-
* Consent icon only (without text).
|
|
37
|
-
* Use this for compact displays like the preference center footer.
|
|
38
|
-
*/
|
|
39
|
-
export declare const ConsentIconOnly: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & IconProps) => import("react").JSX.Element;
|
|
40
19
|
/**
|
|
41
20
|
* Fingerprint icon for privacy/consent contexts.
|
|
42
21
|
* A generic icon representing user identity and privacy.
|
|
@@ -1,5 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ConsentComponentSlotKey } from '@c15t/schema/config';
|
|
2
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
export type PreferenceItemVariantsProps = Record<never, never>;
|
|
4
|
+
export declare const preferenceItemVariants: () => {
|
|
5
|
+
auxiliary: (options?: {
|
|
6
|
+
class?: string;
|
|
7
|
+
}) => string;
|
|
8
|
+
content: (options?: {
|
|
9
|
+
class?: string;
|
|
10
|
+
}) => string;
|
|
11
|
+
contentInner: (options?: {
|
|
12
|
+
class?: string;
|
|
13
|
+
}) => string;
|
|
14
|
+
contentViewport: (options?: {
|
|
15
|
+
class?: string;
|
|
16
|
+
}) => string;
|
|
17
|
+
control: (options?: {
|
|
18
|
+
class?: string;
|
|
19
|
+
}) => string;
|
|
20
|
+
header: (options?: {
|
|
21
|
+
class?: string;
|
|
22
|
+
}) => string;
|
|
23
|
+
leading: (options?: {
|
|
24
|
+
class?: string;
|
|
25
|
+
}) => string;
|
|
26
|
+
meta: (options?: {
|
|
27
|
+
class?: string;
|
|
28
|
+
}) => string;
|
|
29
|
+
root: (options?: {
|
|
30
|
+
class?: string;
|
|
31
|
+
}) => string;
|
|
32
|
+
title: (options?: {
|
|
33
|
+
class?: string;
|
|
34
|
+
}) => string;
|
|
35
|
+
trigger: (options?: {
|
|
36
|
+
class?: string;
|
|
37
|
+
}) => string;
|
|
38
|
+
};
|
|
3
39
|
export interface PreferenceItemRootProps extends HTMLAttributes<HTMLDivElement>, PreferenceItemVariantsProps {
|
|
4
40
|
children: ReactNode;
|
|
5
41
|
defaultOpen?: boolean;
|
|
@@ -7,14 +43,17 @@ export interface PreferenceItemRootProps extends HTMLAttributes<HTMLDivElement>,
|
|
|
7
43
|
noStyle?: boolean;
|
|
8
44
|
onOpenChange?: (open: boolean) => void;
|
|
9
45
|
open?: boolean;
|
|
46
|
+
slotKey?: ConsentComponentSlotKey;
|
|
10
47
|
}
|
|
11
48
|
declare const PreferenceItemRoot: import("react").ForwardRefExoticComponent<PreferenceItemRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
49
|
export interface PreferenceItemTriggerProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
|
|
13
50
|
noStyle?: boolean;
|
|
51
|
+
slotKey?: ConsentComponentSlotKey;
|
|
14
52
|
}
|
|
15
53
|
declare const PreferenceItemTrigger: import("react").ForwardRefExoticComponent<PreferenceItemTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
54
|
export interface PreferenceItemSlotProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
55
|
noStyle?: boolean;
|
|
56
|
+
slotKey?: ConsentComponentSlotKey;
|
|
18
57
|
}
|
|
19
58
|
declare const PreferenceItemLeading: import("react").ForwardRefExoticComponent<PreferenceItemSlotProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
59
|
declare const PreferenceItemHeader: import("react").ForwardRefExoticComponent<PreferenceItemSlotProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -23,11 +62,16 @@ declare const PreferenceItemAuxiliary: import("react").ForwardRefExoticComponent
|
|
|
23
62
|
declare const PreferenceItemControl: import("react").ForwardRefExoticComponent<PreferenceItemSlotProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
63
|
export interface PreferenceItemTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
25
64
|
noStyle?: boolean;
|
|
65
|
+
slotKey?: ConsentComponentSlotKey;
|
|
26
66
|
}
|
|
27
67
|
declare const PreferenceItemTitle: import("react").ForwardRefExoticComponent<PreferenceItemTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
28
68
|
export interface PreferenceItemContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
29
69
|
innerClassName?: string;
|
|
70
|
+
innerSlotKey?: ConsentComponentSlotKey;
|
|
30
71
|
noStyle?: boolean;
|
|
72
|
+
slotKey?: ConsentComponentSlotKey;
|
|
73
|
+
viewportClassName?: string;
|
|
74
|
+
viewportSlotKey?: ConsentComponentSlotKey;
|
|
31
75
|
}
|
|
32
76
|
declare const PreferenceItemContent: import("react").ForwardRefExoticComponent<PreferenceItemContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
33
77
|
export { PreferenceItemAuxiliary as Auxiliary, PreferenceItemContent as Content, PreferenceItemControl as Control, PreferenceItemHeader as Header, PreferenceItemLeading as Leading, PreferenceItemMeta as Meta, PreferenceItemRoot as Root, PreferenceItemTitle as Title, PreferenceItemTrigger as Trigger, };
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
import type { ThemeValue } from '../../../../types/theme';
|
|
3
|
+
export type SwitchSize = 'medium' | 'small';
|
|
4
|
+
export interface SwitchVariantsProps {
|
|
5
|
+
size?: SwitchSize;
|
|
6
|
+
}
|
|
7
|
+
export declare const switchVariants: () => {
|
|
8
|
+
root: (options?: {
|
|
9
|
+
class?: string;
|
|
10
|
+
}) => string;
|
|
11
|
+
thumb: (options?: {
|
|
12
|
+
class?: string;
|
|
13
|
+
}) => string;
|
|
14
|
+
track: (options?: {
|
|
15
|
+
class?: string;
|
|
16
|
+
}) => string;
|
|
17
|
+
};
|
|
18
|
+
export interface SwitchStylesKeys {
|
|
7
19
|
'switch.root': ThemeValue;
|
|
8
20
|
'switch.thumb': ThemeValue;
|
|
9
21
|
'switch.track': ThemeValue;
|
|
10
|
-
}
|
|
22
|
+
}
|
|
11
23
|
export interface SwitchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'size'>, SwitchVariantsProps {
|
|
12
24
|
checked?: boolean;
|
|
13
25
|
defaultChecked?: boolean;
|
|
14
26
|
noStyle?: boolean;
|
|
15
27
|
onCheckedChange?: (checked: boolean) => void;
|
|
16
28
|
size?: SwitchSize;
|
|
17
|
-
themeKey?: AllThemeKeys;
|
|
18
29
|
}
|
|
19
30
|
declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
20
31
|
export { Switch as Root };
|
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { TabsOrientation } from '@c15t/ui/primitives/tabs';
|
|
2
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
|
+
export interface TabsVariantsProps {
|
|
4
|
+
orientation?: TabsOrientation;
|
|
5
|
+
}
|
|
6
|
+
export declare const tabsVariants: () => {
|
|
7
|
+
content: (options?: {
|
|
8
|
+
class?: string;
|
|
9
|
+
}) => string;
|
|
10
|
+
list: (options?: {
|
|
11
|
+
class?: string;
|
|
12
|
+
}) => string;
|
|
13
|
+
root: (options?: {
|
|
14
|
+
class?: string;
|
|
15
|
+
}) => string;
|
|
16
|
+
trigger: (options?: {
|
|
17
|
+
class?: string;
|
|
18
|
+
}) => string;
|
|
19
|
+
};
|
|
3
20
|
export interface TabsRootProps extends Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'>, TabsVariantsProps {
|
|
4
21
|
children: ReactNode;
|
|
5
22
|
defaultValue?: string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IABHandle, CreateIABOptions } from '@c15t/iab';
|
|
2
|
+
/**
|
|
3
|
+
* The IAB slice hooks read: the live CMP handle plus the preference-centre
|
|
4
|
+
* tab, which is UI state rather than consent state.
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface IABContextValue {
|
|
9
|
+
/** The mounted CMP, or `null` until one is ready. */
|
|
10
|
+
handle: IABHandle | null;
|
|
11
|
+
/** A client allowlist requires loaded vendor data before displaying summary copy. */
|
|
12
|
+
filtered?: boolean;
|
|
13
|
+
/** Publisher vendors used by the summary before the CMP mounts. */
|
|
14
|
+
customVendors?: CreateIABOptions['customVendors'];
|
|
15
|
+
/**
|
|
16
|
+
* Run an action against the CMP: at once when the handle exists,
|
|
17
|
+
* otherwise once it mounts. A server-rendered banner is clickable before
|
|
18
|
+
* the provider's effect has created the handle, and those clicks must
|
|
19
|
+
* record consent rather than vanish.
|
|
20
|
+
*/
|
|
21
|
+
run?: (action: (handle: IABHandle) => void | Promise<void>) => Promise<void>;
|
|
22
|
+
/** Which preference-centre tab is showing. */
|
|
23
|
+
tab: 'purposes' | 'vendors';
|
|
24
|
+
/** Switch preference-centre tabs. */
|
|
25
|
+
setTab: (tab: 'purposes' | 'vendors') => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Context carrying the IAB CMP handle.
|
|
29
|
+
*
|
|
30
|
+
* It lives in its own module, away from `iab-context.tsx`, because that
|
|
31
|
+
* file statically imports `createIAB` from `@c15t/iab`. A provider handed
|
|
32
|
+
* an externally owned runtime already has a CMP and must be able to publish
|
|
33
|
+
* it here without pulling the TCF encoder into its chunk.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare const IABContext: import("react").Context<IABContextValue | null>;
|
|
@@ -10,7 +10,7 @@ import type { Theme } from '../types/theme';
|
|
|
10
10
|
*
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export interface ThemeContextValue {
|
|
14
14
|
/**
|
|
15
15
|
* Theme configuration object for styling components
|
|
16
16
|
* @default undefined
|
|
@@ -45,7 +45,7 @@ export type ThemeContextValue = {
|
|
|
45
45
|
* @default 'system'
|
|
46
46
|
*/
|
|
47
47
|
colorScheme?: 'light' | 'dark' | 'system';
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
49
|
/**
|
|
50
50
|
* Context for providing theme values to components.
|
|
51
51
|
*
|