/** * Enhanced ConsentBanner component with compound components attached. * * @remarks * This is the main export that provides access to all ConsentBanner components. * It follows the compound components pattern, allowing for flexible composition * of the banner's parts. * */ import type { FC } from 'react'; import { Overlay } from './atoms/overlay'; import { Root } from './atoms/root'; import { AcceptButton, Card, CustomizeButton, Description, Footer, FooterSubGroup, Header, RejectButton, Title } from './components'; import { type ConsentBannerButton, type ConsentBannerLayout, type ConsentBannerProps } from './consent-banner'; import { PolicyActions } from './policy-actions'; /** * This interface extends the base ConsentBanner component with additional sub-components * that can be used to compose the banner's structure. */ export interface ConsentBannerCompoundComponent extends FC { Root: typeof Root; Card: typeof Card; Header: typeof Header; Title: typeof Title; Description: typeof Description; PolicyActions: typeof PolicyActions; Footer: typeof Footer; FooterSubGroup: typeof FooterSubGroup; RejectButton: typeof RejectButton; CustomizeButton: typeof CustomizeButton; AcceptButton: typeof AcceptButton; Overlay: typeof Overlay; } /** * A customizable consent banner component. * * @remarks * This component serves as the main entry point for rendering a consent banner. * Start with the pre-built component and its existing configuration surface. * For most customization, use `ConsentManagerProvider` options, theme tokens, * slots, and `theme.consentActions` before reaching for compound composition. * * Key features: * - Fully accessible by default * - GDPR Compliant * - Customizable appearance * - Responsive design * - Error boundary protection * - Advanced compound component support when markup must change * * @example * Simple usage with default settings: * ```tsx * * ``` * * @example * Preferred customization via provider `i18n`, theme tokens, and slots: * ```tsx * * * * ``` * * @example * Advanced custom markup with compound components: * ```tsx * * * * * * * * * * * * * * * * ``` * Note: Next.js Server Components do not support compound components. Ensure you add `'use client'` to the file. * * @public */ declare const ConsentBanner: ConsentBannerCompoundComponent; export default ConsentBanner; export { ConsentBannerOverlay, Overlay } from './atoms/overlay'; export { ConsentBannerRoot, Root } from './atoms/root'; export { AcceptButton, Card, ConsentBannerAcceptButton, ConsentBannerCard, ConsentBannerCustomizeButton, ConsentBannerDescription, ConsentBannerFooter, ConsentBannerFooterSubGroup, ConsentBannerHeader, ConsentBannerRejectButton, ConsentBannerTitle, CustomizeButton, Description, Footer, FooterSubGroup, Header, RejectButton, Title, } from './components'; export { type ConsentBannerPolicyActionRenderProps, ConsentBannerPolicyActions, type ConsentBannerPolicyActionsProps, PolicyActions, } from './policy-actions'; export { ConsentBanner, type ConsentBannerButton, type ConsentBannerLayout, type ConsentBannerProps, };