@c15t/react 2.0.0-rc.6 → 2.0.0-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/README.md +9 -0
  2. package/dist/components/consent-banner/atoms/root.cjs +1 -1
  3. package/dist/components/consent-banner/atoms/root.js +1 -1
  4. package/dist/components/consent-banner/consent-banner.cjs +1 -1
  5. package/dist/components/consent-banner/consent-banner.js +1 -1
  6. package/dist/components/consent-banner/index.cjs +1 -1
  7. package/dist/components/consent-banner/index.js +1 -1
  8. package/dist/components/consent-banner/policy-actions.cjs +1 -0
  9. package/dist/components/consent-banner/policy-actions.js +1 -0
  10. package/dist/components/consent-dialog/atoms/card.cjs +1 -1
  11. package/dist/components/consent-dialog/atoms/card.js +1 -1
  12. package/dist/components/consent-dialog/atoms/root.cjs +1 -1
  13. package/dist/components/consent-dialog/atoms/root.js +1 -1
  14. package/dist/components/consent-dialog-trigger/atoms/icon.cjs +1 -1
  15. package/dist/components/consent-dialog-trigger/atoms/icon.js +1 -1
  16. package/dist/components/consent-widget/atoms/accordion.cjs +1 -1
  17. package/dist/components/consent-widget/atoms/accordion.js +1 -1
  18. package/dist/components/consent-widget/atoms/footer.cjs +1 -1
  19. package/dist/components/consent-widget/atoms/footer.js +1 -1
  20. package/dist/components/consent-widget/consent-widget.cjs +1 -1
  21. package/dist/components/consent-widget/consent-widget.js +1 -1
  22. package/dist/components/consent-widget/index.cjs +1 -1
  23. package/dist/components/consent-widget/index.js +1 -1
  24. package/dist/components/consent-widget/policy-actions.cjs +1 -0
  25. package/dist/components/consent-widget/policy-actions.js +1 -0
  26. package/dist/components/iab-consent-banner/atoms/card.cjs +1 -1
  27. package/dist/components/iab-consent-banner/atoms/card.js +1 -1
  28. package/dist/components/iab-consent-banner/atoms/footer.cjs +1 -1
  29. package/dist/components/iab-consent-banner/atoms/footer.js +1 -1
  30. package/dist/components/iab-consent-banner/atoms/header.cjs +1 -1
  31. package/dist/components/iab-consent-banner/atoms/header.js +1 -1
  32. package/dist/components/iab-consent-banner/atoms/root.cjs +1 -1
  33. package/dist/components/iab-consent-banner/atoms/root.js +1 -1
  34. package/dist/components/iab-consent-banner/iab-consent-banner.cjs +1 -1
  35. package/dist/components/iab-consent-banner/iab-consent-banner.js +1 -1
  36. package/dist/components/iab-consent-dialog/atoms/card.cjs +1 -1
  37. package/dist/components/iab-consent-dialog/atoms/card.js +1 -1
  38. package/dist/components/iab-consent-dialog/atoms/footer.cjs +1 -1
  39. package/dist/components/iab-consent-dialog/atoms/footer.js +1 -1
  40. package/dist/components/iab-consent-dialog/atoms/header.cjs +1 -1
  41. package/dist/components/iab-consent-dialog/atoms/header.js +1 -1
  42. package/dist/components/iab-consent-dialog/atoms/root.cjs +1 -1
  43. package/dist/components/iab-consent-dialog/atoms/root.js +1 -1
  44. package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +1 -1
  45. package/dist/components/iab-consent-dialog/iab-consent-dialog.js +1 -1
  46. package/dist/components/shared/policy-actions.cjs +1 -0
  47. package/dist/components/shared/policy-actions.js +1 -0
  48. package/dist/components/shared/primitives/box.cjs +1 -1
  49. package/dist/components/shared/primitives/box.js +1 -1
  50. package/dist/components/shared/ui/branding.cjs +1 -0
  51. package/dist/components/shared/ui/branding.js +1 -0
  52. package/dist/components/shared/ui/logo.cjs +1 -1
  53. package/dist/components/shared/ui/logo.js +1 -1
  54. package/dist/components/shared/ui/switch/index.cjs +1 -1
  55. package/dist/components/shared/ui/switch/index.js +1 -1
  56. package/dist/hooks/index.cjs +1 -1
  57. package/dist/hooks/use-consent-manager.cjs +1 -1
  58. package/dist/hooks/use-consent-manager.js +1 -1
  59. package/dist/hooks/use-headless-consent-ui.cjs +1 -1
  60. package/dist/hooks/use-headless-consent-ui.js +1 -1
  61. package/dist/iab/styles.css +11 -1
  62. package/dist/iab/styles.tw3.css +14 -0
  63. package/dist/providers/consent-manager-provider.cjs +1 -1
  64. package/dist/providers/consent-manager-provider.js +1 -1
  65. package/dist/server/fetch-ssr-data.cjs +1 -1
  66. package/dist/server/fetch-ssr-data.js +1 -1
  67. package/dist/styles.css +10 -1
  68. package/dist/styles.tw3.css +13 -0
  69. package/dist/version.cjs +1 -1
  70. package/dist/version.js +1 -1
  71. package/dist-types/components/consent-banner/atoms/root.d.ts +44 -13
  72. package/dist-types/components/consent-banner/consent-banner.d.ts +7 -2
  73. package/dist-types/components/consent-banner/index.d.ts +47 -24
  74. package/dist-types/components/consent-banner/policy-actions.d.ts +11 -0
  75. package/dist-types/components/consent-dialog/atoms/card.d.ts +7 -2
  76. package/dist-types/components/consent-dialog/atoms/root.d.ts +1 -1
  77. package/dist-types/components/consent-dialog/consent-dialog.d.ts +1 -1
  78. package/dist-types/components/consent-dialog/index.d.ts +29 -8
  79. package/dist-types/components/consent-dialog-trigger/atoms/icon.d.ts +1 -1
  80. package/dist-types/components/consent-dialog-trigger/types.d.ts +1 -1
  81. package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +0 -1
  82. package/dist-types/components/consent-widget/atoms/accordion.d.ts +4 -3
  83. package/dist-types/components/consent-widget/index.d.ts +26 -6
  84. package/dist-types/components/consent-widget/policy-actions.d.ts +11 -0
  85. package/dist-types/components/frame/atoms.d.ts +1 -1
  86. package/dist-types/components/frame/types.d.ts +1 -1
  87. package/dist-types/components/iab-consent-banner/atoms/root.d.ts +1 -1
  88. package/dist-types/components/iab-consent-banner/iab-consent-banner.d.ts +1 -1
  89. package/dist-types/components/iab-consent-dialog/atoms/root.d.ts +1 -1
  90. package/dist-types/components/iab-consent-dialog/atoms/vendor-list.d.ts +1 -1
  91. package/dist-types/components/iab-consent-dialog/iab-consent-dialog.d.ts +1 -1
  92. package/dist-types/components/shared/policy-actions.d.ts +29 -0
  93. package/dist-types/components/shared/primitives/button.d.ts +1 -1
  94. package/dist-types/components/shared/primitives/button.types.d.ts +1 -1
  95. package/dist-types/components/shared/primitives/legal-links/index.d.ts +1 -1
  96. package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
  97. package/dist-types/components/shared/ui/accordion/accordion.types.d.ts +1 -1
  98. package/dist-types/components/shared/ui/branding.d.ts +23 -0
  99. package/dist-types/components/shared/ui/button/button.d.ts +1 -1
  100. package/dist-types/components/shared/ui/logo.d.ts +8 -0
  101. package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +1 -1
  102. package/dist-types/components/shared/ui/switch/index.d.ts +1 -1
  103. package/dist-types/components/shared/ui/switch/switch.d.ts +1 -1
  104. package/dist-types/components/shared/ui/switch/switch.types.d.ts +1 -1
  105. package/dist-types/components/shared/ui/tabs/tabs.d.ts +1 -1
  106. package/dist-types/context/consent-manager-context.d.ts +1 -1
  107. package/dist-types/headless.d.ts +1 -1
  108. package/dist-types/hooks/use-component-config.d.ts +1 -1
  109. package/dist-types/hooks/use-consent-manager.d.ts +1 -1
  110. package/dist-types/hooks/use-headless-consent-ui.d.ts +1 -1
  111. package/dist-types/hooks/use-ssr-status.d.ts +2 -1
  112. package/dist-types/hooks/use-translations.d.ts +1 -1
  113. package/dist-types/index.d.ts +2 -2
  114. package/dist-types/server/fetch-ssr-data.d.ts +1 -1
  115. package/dist-types/server/init-cache-key.d.ts +1 -1
  116. package/dist-types/server/types.d.ts +1 -1
  117. package/dist-types/types/consent-manager.d.ts +1 -1
  118. package/dist-types/types/theme/style-keys.d.ts +1 -1
  119. package/dist-types/types/theme/style-types.d.ts +2 -2
  120. package/dist-types/utils/cn.d.ts +1 -1
  121. package/dist-types/utils/theme-utils.d.ts +1 -1
  122. package/dist-types/version.d.ts +1 -1
  123. package/docs/building-headless-components.md +43 -22
  124. package/docs/callbacks.md +76 -9
  125. package/docs/components/consent-banner.md +148 -24
  126. package/docs/components/consent-dialog.md +42 -3
  127. package/docs/components/consent-manager-provider.md +3 -1
  128. package/docs/components/consent-widget.md +91 -9
  129. package/docs/concepts/client-modes.md +16 -4
  130. package/docs/concepts/initialization-flow.md +9 -2
  131. package/docs/concepts/policy-packs.md +2 -2
  132. package/docs/headless.md +13 -7
  133. package/docs/hooks/use-consent-manager/overview.md +17 -3
  134. package/docs/hooks/use-ssr-status.md +1 -1
  135. package/docs/hooks/use-translations.md +1 -0
  136. package/docs/iab/consent-banner.md +2 -5
  137. package/docs/iab/consent-dialog.md +3 -6
  138. package/docs/iab/overview.md +11 -5
  139. package/docs/integrations/building-integrations.md +405 -0
  140. package/docs/integrations/databuddy.md +22 -5
  141. package/docs/integrations/google-tag-manager.md +2 -2
  142. package/docs/integrations/google-tag.md +2 -29
  143. package/docs/integrations/linkedin-insights.md +1 -1
  144. package/docs/integrations/meta-pixel.md +1 -1
  145. package/docs/integrations/microsoft-uet.md +1 -1
  146. package/docs/integrations/overview.md +18 -2
  147. package/docs/integrations/posthog.md +39 -17
  148. package/docs/integrations/tiktok-pixel.md +1 -1
  149. package/docs/integrations/x-pixel.md +1 -1
  150. package/docs/optimization.md +2 -6
  151. package/docs/policy-packs.md +7 -7
  152. package/docs/quickstart.md +11 -5
  153. package/docs/script-loader.md +22 -1
  154. package/docs/styling/classnames.md +17 -9
  155. package/docs/styling/overview.md +166 -29
  156. package/docs/styling/slots.md +37 -7
  157. package/docs/styling/tailwind.md +25 -27
  158. package/iab/styles.css +1 -0
  159. package/package.json +15 -9
  160. package/readme.json +6 -0
  161. package/src/iab/styles.css +11 -0
  162. package/src/iab/styles.tw3.css +14 -0
  163. package/src/styles.css +10 -0
  164. package/src/styles.tw3.css +13 -0
  165. package/styles.css +1 -0
  166. package/dist/components/shared/libs/policy-actions.cjs +0 -1
  167. package/dist/components/shared/libs/policy-actions.js +0 -1
  168. package/dist-types/components/shared/libs/policy-actions.d.ts +0 -26
@@ -12,6 +12,7 @@ import { Overlay } from './atoms/overlay';
12
12
  import { Root } from './atoms/root';
13
13
  import { AcceptButton, Card, CustomizeButton, Description, Footer, FooterSubGroup, Header, RejectButton, Title } from './components';
14
14
  import { type ConsentBannerButton, type ConsentBannerLayout, type ConsentBannerProps } from './consent-banner';
15
+ import { PolicyActions } from './policy-actions';
15
16
  /**
16
17
  * This interface extends the base ConsentBanner component with additional sub-components
17
18
  * that can be used to compose the banner's structure.
@@ -22,6 +23,7 @@ export interface ConsentBannerCompoundComponent extends FC<ConsentBannerProps> {
22
23
  Header: typeof Header;
23
24
  Title: typeof Title;
24
25
  Description: typeof Description;
26
+ PolicyActions: typeof PolicyActions;
25
27
  Footer: typeof Footer;
26
28
  FooterSubGroup: typeof FooterSubGroup;
27
29
  RejectButton: typeof RejectButton;
@@ -34,8 +36,9 @@ export interface ConsentBannerCompoundComponent extends FC<ConsentBannerProps> {
34
36
  *
35
37
  * @remarks
36
38
  * This component serves as the main entry point for rendering a consent banner.
37
- * It provides a structured layout with customizable title, description, and action buttons
38
- * for accepting, rejecting, or customizing consent preferences.
39
+ * Start with the pre-built component and its existing configuration surface.
40
+ * For most customization, use `ConsentManagerProvider` options, theme tokens,
41
+ * slots, and `theme.consentActions` before reaching for compound composition.
39
42
  *
40
43
  * Key features:
41
44
  * - Fully accessible by default
@@ -43,7 +46,7 @@ export interface ConsentBannerCompoundComponent extends FC<ConsentBannerProps> {
43
46
  * - Customizable appearance
44
47
  * - Responsive design
45
48
  * - Error boundary protection
46
- * - Compound component pattern support
49
+ * - Advanced compound component support when markup must change
47
50
  *
48
51
  * @example
49
52
  * Simple usage with default settings:
@@ -52,35 +55,54 @@ export interface ConsentBannerCompoundComponent extends FC<ConsentBannerProps> {
52
55
  * ```
53
56
  *
54
57
  * @example
55
- * Customized usage with all props:
58
+ * Preferred customization via provider `i18n`, theme tokens, and slots:
56
59
  * ```tsx
57
- * <ConsentBanner
58
- * title="Cookie Settings"
59
- * description="We use cookies to enhance your browsing experience"
60
- * rejectButtonText="Decline"
61
- * customizeButtonText="Preferences"
62
- * acceptButtonText="Allow All"
63
- * />
60
+ * <ConsentManagerProvider
61
+ * options={{
62
+ * i18n: {
63
+ * locale: 'en',
64
+ * messages: {
65
+ * en: {
66
+ * cookieBanner: { title: 'Privacy choices' },
67
+ * },
68
+ * },
69
+ * },
70
+ * theme: {
71
+ * colors: {
72
+ * surface: '#fffdf8',
73
+ * surfaceHover: '#f6f3ee',
74
+ * },
75
+ * slots: {
76
+ * consentBannerCard: 'rounded-3xl',
77
+ * consentBannerFooter: 'border-t border-black/10',
78
+ * },
79
+ * },
80
+ * }}
81
+ * >
82
+ * <ConsentBanner primaryButton="accept" />
83
+ * </ConsentManagerProvider>
64
84
  * ```
65
85
  *
66
86
  * @example
87
+ * Advanced custom markup with compound components:
67
88
  * ```tsx
68
89
  * <ConsentBanner.Root>
69
- * <ConsentBanner.Content>
70
- * <ConsentBanner.Title>Cookie Settings</ConsentBanner.Title>
71
- * <ConsentBanner.Description>
72
- * Choose your cookie preferences
73
- * </ConsentBanner.Description>
74
- * <ConsentBanner.Actions>
75
- * <ConsentBanner.RejectButton>Decline</ConsentBanner.RejectButton>
76
- * <ConsentBanner.CustomizeButton>Customize</ConsentBanner.CustomizeButton>
77
- * <ConsentBanner.AcceptButton>Accept</ConsentBanner.AcceptButton>
78
- * </ConsentBanner.Actions>
79
- * </ConsentBanner.Content>
90
+ * <ConsentBanner.Card>
91
+ * <ConsentBanner.Header>
92
+ * <ConsentBanner.Title />
93
+ * <ConsentBanner.Description />
94
+ * </ConsentBanner.Header>
95
+ * <ConsentBanner.Footer>
96
+ * <ConsentBanner.CustomizeButton />
97
+ * <ConsentBanner.FooterSubGroup>
98
+ * <ConsentBanner.RejectButton />
99
+ * <ConsentBanner.AcceptButton />
100
+ * </ConsentBanner.FooterSubGroup>
101
+ * </ConsentBanner.Footer>
102
+ * </ConsentBanner.Card>
80
103
  * </ConsentBanner.Root>
81
104
  * ```
82
- * Note: Next.js Server Components do not support compound components. Ensure you add 'use client' to the file.
83
- * Using compound components for custom layout:
105
+ * Note: Next.js Server Components do not support compound components. Ensure you add `'use client'` to the file.
84
106
  *
85
107
  * @public
86
108
  */
@@ -89,4 +111,5 @@ export default ConsentBanner;
89
111
  export { ConsentBannerOverlay, Overlay } from './atoms/overlay';
90
112
  export { ConsentBannerRoot, Root } from './atoms/root';
91
113
  export { AcceptButton, Card, ConsentBannerAcceptButton, ConsentBannerCard, ConsentBannerCustomizeButton, ConsentBannerDescription, ConsentBannerFooter, ConsentBannerFooterSubGroup, ConsentBannerHeader, ConsentBannerRejectButton, ConsentBannerTitle, CustomizeButton, Description, Footer, FooterSubGroup, Header, RejectButton, Title, } from './components';
114
+ export { type ConsentBannerPolicyActionRenderProps, ConsentBannerPolicyActions, type ConsentBannerPolicyActionsProps, PolicyActions, } from './policy-actions';
92
115
  export { ConsentBanner, type ConsentBannerButton, type ConsentBannerLayout, type ConsentBannerProps, };
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type HeadlessConsentBannerAction } from '../../hooks/use-headless-consent-ui';
3
+ import { type PolicyActionRenderProps } from '../shared/policy-actions';
4
+ export interface ConsentBannerPolicyActionRenderProps extends PolicyActionRenderProps<HeadlessConsentBannerAction> {
5
+ }
6
+ export interface ConsentBannerPolicyActionsProps {
7
+ renderAction?: (action: HeadlessConsentBannerAction, props: ConsentBannerPolicyActionRenderProps) => ReactNode;
8
+ }
9
+ export declare function ConsentBannerPolicyActions({ renderAction, }: ConsentBannerPolicyActionsProps): import("react/jsx-runtime").JSX.Element;
10
+ declare const PolicyActions: typeof ConsentBannerPolicyActions;
11
+ export { PolicyActions };
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { type BoxProps } from '../../shared/primitives/box';
3
3
  import type { InlineLegalLinksProps } from '../../shared/primitives/legal-links';
4
+ import { type BrandingVariant } from '../../shared/ui/branding';
4
5
  import type { ClassNameStyle } from '../../../types/theme';
5
6
  declare const ConsentDialogCard: import("react").ForwardRefExoticComponent<{
6
7
  /** The content to be rendered inside the consent dialog card */
@@ -57,9 +58,13 @@ declare const ConsentDialogFooter: import("react").ForwardRefExoticComponent<Box
57
58
  hideBranding?: boolean;
58
59
  'data-testid'?: string;
59
60
  } & import("react").RefAttributes<HTMLDivElement>>;
60
- export declare function Branding({ hideBranding }: {
61
+ type BrandingProps = {
61
62
  hideBranding: boolean;
62
- }): import("react/jsx-runtime").JSX.Element | null;
63
+ variant?: BrandingVariant;
64
+ className?: string;
65
+ 'data-testid'?: string;
66
+ };
67
+ export declare function Branding(props: BrandingProps): import("react/jsx-runtime").JSX.Element;
63
68
  /**
64
69
  * A pre-configured privacy settings card.
65
70
  * Combines all consent dialog components with default content for privacy customization.
@@ -19,7 +19,7 @@ export interface ConsentDialogRootProps extends HTMLAttributes<HTMLDialogElement
19
19
  * Which consent models this dialog responds to.
20
20
  * @default ['opt-in', 'opt-out']
21
21
  */
22
- models?: import('../../../../../core/dist-types/index.d.ts').Model[];
22
+ models?: import('c15t').Model[];
23
23
  /**
24
24
  * When true, the component will not apply any internal styles.
25
25
  */
@@ -85,7 +85,7 @@ export interface ConsentDialogProps {
85
85
  * Which consent models this dialog responds to.
86
86
  * @default ['opt-in', 'opt-out']
87
87
  */
88
- models?: import('../../../../core/dist-types/index.d.ts').Model[];
88
+ models?: import('c15t').Model[];
89
89
  /**
90
90
  * Override the UI source identifier sent with consent API calls.
91
91
  * @default 'dialog'
@@ -42,30 +42,51 @@ export interface ConsentDialogCompoundComponent extends FC<ConsentDialogProps> {
42
42
  * - Provides an accessible modal interface for consent customization
43
43
  * - Implements smooth enter/exit animations
44
44
  * - Manages proper focus handling
45
- * - Supports theme customization
45
+ * - Supports theme customization through provider tokens and slots
46
46
  * - Handles client-side portal rendering
47
+ * - Exposes compound primitives for advanced markup changes
47
48
  *
48
49
  * @example
50
+ * Basic usage:
49
51
  * ```tsx
50
- * <ConsentDialog
51
- * theme={customTheme}
52
- * disableAnimation={false}
53
- * noStyle={false}
54
- * />
52
+ * <ConsentDialog />
55
53
  * ```
56
54
  *
57
55
  * @example
56
+ * Preferred customization with stock structure:
57
+ * ```tsx
58
+ * <ConsentManagerProvider
59
+ * options={{
60
+ * theme: {
61
+ * slots: {
62
+ * consentDialogCard: 'rounded-3xl shadow-xl',
63
+ * consentDialogFooter: 'border-t border-black/10',
64
+ * },
65
+ * },
66
+ * }}
67
+ * >
68
+ * <ConsentDialog hideBranding showTrigger />
69
+ * </ConsentManagerProvider>
70
+ * ```
71
+ *
72
+ * @example
73
+ * Advanced custom markup with compound components:
58
74
  * ```tsx
59
75
  * <ConsentDialog.Root>
60
76
  * <ConsentDialog.Card>
61
77
  * <ConsentDialog.Header>
62
- * <ConsentDialog.HeaderTitle>Consent Manager</ConsentDialog.HeaderTitle>
78
+ * <ConsentDialog.HeaderTitle />
79
+ * <ConsentDialog.HeaderDescription />
63
80
  * </ConsentDialog.Header>
81
+ * <ConsentDialog.Content>
82
+ * <ConsentWidget />
83
+ * </ConsentDialog.Content>
84
+ * <ConsentDialog.Footer />
64
85
  * </ConsentDialog.Card>
65
86
  * </ConsentDialog.Root>
66
87
  * ```
67
88
  *
68
- * Note: Next.js Server Components do not support compound components. Ensure you add 'use client' to the file.
89
+ * Note: Next.js Server Components do not support compound components. Ensure you add `'use client'` to the file.
69
90
  *
70
91
  * @public
71
92
  */
@@ -6,7 +6,7 @@ import type { TriggerIcon as TriggerIconType } from '../types';
6
6
  export interface TriggerIconProps {
7
7
  /**
8
8
  * Icon to display.
9
- * - 'branding' - c15t or consent.io logo based on branding setting
9
+ * - 'branding' - c15t or INTH logo based on branding setting
10
10
  * - 'fingerprint' - Generic fingerprint icon
11
11
  * - 'settings' - Generic settings/gear icon
12
12
  * - ReactNode - Custom icon element
@@ -8,7 +8,7 @@ import type { ReactNode } from 'react';
8
8
  /**
9
9
  * Icon options for the trigger button.
10
10
  *
11
- * - `'branding'` - Shows c15t or consent.io logo based on branding setting
11
+ * - `'branding'` - Shows c15t or INTH logo based on branding setting
12
12
  * - `'fingerprint'` - Generic fingerprint/privacy icon
13
13
  * - `'settings'` - Generic settings/gear icon
14
14
  * - `ReactNode` - Custom icon element
@@ -13,4 +13,3 @@ export interface ConsentDialogLinkProps extends Omit<ConsentButtonProps, 'childr
13
13
  children: ReactNode;
14
14
  }
15
15
  export declare const ConsentDialogLink: import("react").ForwardRefExoticComponent<ConsentDialogLinkProps & import("react").RefAttributes<HTMLButtonElement>>;
16
- lement>>;
@@ -7,20 +7,21 @@ declare const ConsentWidgetAccordionTriggerInner: import("react").ForwardRefExot
7
7
  declare const ConsentWidgetAccordionContent: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemContentProps & import("react").RefAttributes<HTMLDivElement>>;
8
8
  declare const ConsentWidgetAccordionArrow: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemSlotProps & import("react").RefAttributes<HTMLDivElement>>;
9
9
  declare const ConsentWidgetSwitch: import("react").ForwardRefExoticComponent<RadixSwitch.SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
10
- type ConsentWidgetAccordionProps = {
10
+ type ConsentWidgetAccordionProps = Omit<BoxProps, 'themeKey'> & {
11
+ 'data-testid'?: string;
11
12
  children: ReactNode;
12
13
  onValueChange?: (value: string | string[]) => void;
13
14
  type?: 'multiple' | 'single';
14
15
  value?: string | string[];
15
16
  };
16
- declare const ConsentWidgetAccordion: ({ children, onValueChange, type, value, }: ConsentWidgetAccordionProps) => import("react/jsx-runtime").JSX.Element;
17
+ declare const ConsentWidgetAccordion: ({ "data-testid": dataTestId, children, className, noStyle, onValueChange, style, type, value, ...props }: ConsentWidgetAccordionProps) => import("react/jsx-runtime").JSX.Element;
17
18
  declare const ConsentWidgetAccordionItems: () => import("react/jsx-runtime").JSX.Element[];
18
19
  declare const ConsentWidgetAccordionItem: import("react").ForwardRefExoticComponent<Omit<PreferenceItem.PreferenceItemRootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
19
20
  declare const AccordionTriggerInner: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
20
21
  declare const AccordionTrigger: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<HTMLDivElement>>;
21
22
  declare const AccordionContent: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemContentProps & import("react").RefAttributes<HTMLDivElement>>;
22
23
  declare const AccordionArrow: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemSlotProps & import("react").RefAttributes<HTMLDivElement>>;
23
- declare const Accordion: ({ children, onValueChange, type, value, }: ConsentWidgetAccordionProps) => import("react/jsx-runtime").JSX.Element;
24
+ declare const Accordion: ({ "data-testid": dataTestId, children, className, noStyle, onValueChange, style, type, value, ...props }: ConsentWidgetAccordionProps) => import("react/jsx-runtime").JSX.Element;
24
25
  declare const Switch: import("react").ForwardRefExoticComponent<RadixSwitch.SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
25
26
  declare const AccordionItems: () => import("react/jsx-runtime").JSX.Element[];
26
27
  declare const AccordionItem: import("react").ForwardRefExoticComponent<Omit<PreferenceItem.PreferenceItemRootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -12,6 +12,7 @@ import { Accordion, AccordionArrow, AccordionContent, AccordionItem, AccordionIt
12
12
  import { AcceptAllButton, CustomizeButton, RejectButton, SaveButton } from './atoms/button';
13
13
  import { Footer, FooterSubGroup } from './atoms/footer';
14
14
  import { Root } from './atoms/root';
15
+ import { PolicyActions } from './policy-actions';
15
16
  import type { ConsentWidgetProps } from './types';
16
17
  export type { ConsentWidgetProps };
17
18
  /**
@@ -35,6 +36,7 @@ export interface ConsentWidgetCompoundComponent extends FC<ConsentWidgetProps> {
35
36
  CustomizeButton: typeof CustomizeButton;
36
37
  SaveButton: typeof SaveButton;
37
38
  RejectButton: typeof RejectButton;
39
+ PolicyActions: typeof PolicyActions;
38
40
  Footer: typeof Footer;
39
41
  FooterSubGroup: typeof FooterSubGroup;
40
42
  }
@@ -44,11 +46,11 @@ export interface ConsentWidgetCompoundComponent extends FC<ConsentWidgetProps> {
44
46
  *
45
47
  * @remarks
46
48
  * Key features:
47
- * - Implements compound component pattern for flexible composition
48
49
  * - Manages consent state and user interactions
49
50
  * - Provides accessible controls for consent management
50
- * - Supports comprehensive theming
51
+ * - Supports comprehensive theming with tokens and slots
51
52
  * - Handles accordion state management
53
+ * - Exposes compound primitives for advanced layout changes
52
54
  *
53
55
  * @example
54
56
  * Basic usage:
@@ -59,15 +61,32 @@ export interface ConsentWidgetCompoundComponent extends FC<ConsentWidgetProps> {
59
61
  * ```
60
62
  *
61
63
  * @example
62
- * Compound components:
64
+ * Preferred stock customization with theme slots:
65
+ * ```tsx
66
+ * <ConsentManagerProvider
67
+ * options={{
68
+ * theme: {
69
+ * slots: {
70
+ * consentWidgetAccordion: 'rounded-3xl border border-black/10',
71
+ * consentWidgetFooter: 'border-t border-black/10',
72
+ * },
73
+ * },
74
+ * }}
75
+ * >
76
+ * <ConsentWidget hideBranding />
77
+ * </ConsentManagerProvider>
78
+ * ```
79
+ *
80
+ * @example
81
+ * Advanced compound components:
63
82
  * ```tsx
64
83
  * <ConsentWidget.Root>
65
84
  * <ConsentWidget.Accordion>
66
85
  * <ConsentWidget.AccordionItems />
67
- * </ConsentWidget.Accordion>
68
- * </ConsentWidget.Root>
86
+ * </ConsentWidget.Accordion>
87
+ * </ConsentWidget.Root>
69
88
  * ```
70
- * Note: Next.js Server Components do not support compound components. Ensure you add 'use client' to the file.
89
+ * Note: Next.js Server Components do not support compound components. Ensure you add `'use client'` to the file.
71
90
  *
72
91
  */
73
92
  declare const ConsentWidget: ConsentWidgetCompoundComponent;
@@ -76,4 +95,5 @@ export { Accordion, AccordionArrow, AccordionContent, AccordionItem, AccordionIt
76
95
  export { AcceptAllButton, ConsentWidgetAcceptAllButton, ConsentWidgetCustomizeButton, ConsentWidgetRejectButton, ConsentWidgetSaveButton, CustomizeButton, RejectButton, SaveButton, } from './atoms/button';
77
96
  export { ConsentWidgetFooter, ConsentWidgetFooterSubGroup, Footer, FooterSubGroup, } from './atoms/footer';
78
97
  export { ConsentWidgetRoot, Root, } from './atoms/root';
98
+ export { type ConsentWidgetPolicyActionRenderProps, ConsentWidgetPolicyActions, type ConsentWidgetPolicyActionsProps, PolicyActions, } from './policy-actions';
79
99
  export { ConsentWidget };
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type HeadlessConsentDialogAction } from '../../hooks/use-headless-consent-ui';
3
+ import { type PolicyActionRenderProps } from '../shared/policy-actions';
4
+ export interface ConsentWidgetPolicyActionRenderProps extends PolicyActionRenderProps<HeadlessConsentDialogAction> {
5
+ }
6
+ export interface ConsentWidgetPolicyActionsProps {
7
+ renderAction?: (action: HeadlessConsentDialogAction, props: ConsentWidgetPolicyActionRenderProps) => ReactNode;
8
+ }
9
+ export declare function ConsentWidgetPolicyActions({ renderAction, }: ConsentWidgetPolicyActionsProps): import("react/jsx-runtime").JSX.Element;
10
+ declare const PolicyActions: typeof ConsentWidgetPolicyActions;
11
+ export { PolicyActions };
@@ -1,4 +1,4 @@
1
- import type { AllConsentNames } from '../../../../core/dist-types/index.d.ts';
1
+ import type { AllConsentNames } from 'c15t';
2
2
  import { type BoxProps } from '../shared/primitives/box';
3
3
  import type { ConsentButtonProps } from '../shared/primitives/button.types';
4
4
  declare const FrameRoot: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import type { AllConsentNames } from '../../../../core/dist-types/index.d.ts';
1
+ import type { AllConsentNames } from 'c15t';
2
2
  import type { ComponentPropsWithRef, FC, ReactNode } from 'react';
3
3
  import type * as Atom from './atoms';
4
4
  export interface FrameProps extends ComponentPropsWithRef<'div'> {
@@ -9,7 +9,7 @@ interface IABConsentBannerRootProps extends HTMLAttributes<HTMLDivElement> {
9
9
  * Which consent models this banner responds to.
10
10
  * @default ['iab']
11
11
  */
12
- models?: import('../../../../../core/dist-types/index.d.ts').Model[];
12
+ models?: import('c15t').Model[];
13
13
  /**
14
14
  * Override the UI source identifier sent with consent API calls.
15
15
  * @default 'iab_banner'
@@ -33,7 +33,7 @@ export interface IABConsentBannerProps {
33
33
  * Which consent models this banner responds to.
34
34
  * @default ['iab']
35
35
  */
36
- models?: import('../../../../core/dist-types/index.d.ts').Model[];
36
+ models?: import('c15t').Model[];
37
37
  /**
38
38
  * Override the UI source identifier sent with consent API calls.
39
39
  * @default 'iab_banner'
@@ -13,7 +13,7 @@ interface IABConsentDialogRootProps {
13
13
  * Which consent models this dialog responds to.
14
14
  * @default ['iab']
15
15
  */
16
- models?: import('../../../../../core/dist-types/index.d.ts').Model[];
16
+ models?: import('c15t').Model[];
17
17
  /**
18
18
  * Override the UI source identifier sent with consent API calls.
19
19
  * @default 'iab_dialog'
@@ -1,4 +1,4 @@
1
- import type { GlobalVendorList } from '../../../../../core/dist-types/index.d.ts';
1
+ import type { GlobalVendorList } from 'c15t';
2
2
  import { type FC } from 'react';
3
3
  import type { ProcessedPurpose, VendorId } from '../types';
4
4
  /** Custom vendor not registered with IAB */
@@ -49,7 +49,7 @@ export interface IABConsentDialogProps {
49
49
  * Which consent models this dialog responds to.
50
50
  * @default ['iab']
51
51
  */
52
- models?: import('../../../../core/dist-types/index.d.ts').Model[];
52
+ models?: import('c15t').Model[];
53
53
  /**
54
54
  * Override the UI source identifier sent with consent API calls.
55
55
  * @default 'iab_dialog'
@@ -0,0 +1,29 @@
1
+ import { type ComponentType, type ReactNode } from 'react';
2
+ import type { HeadlessConsentSurfaceState } from '../../hooks/use-headless-consent-ui';
3
+ import type { CSSPropertiesWithVars, CSSVariables } from '../../types/theme';
4
+ export interface PolicyActionRenderProps<TAction extends string> {
5
+ key: string;
6
+ consentAction: TAction;
7
+ isPrimary: boolean;
8
+ style?: CSSPropertiesWithVars<CSSVariables>;
9
+ }
10
+ interface PolicyActionsLayoutProps {
11
+ children?: ReactNode;
12
+ className?: string;
13
+ }
14
+ interface PolicyActionsClassNames {
15
+ footerFill?: string;
16
+ footerColumn?: string;
17
+ footerSubGroupFill?: string;
18
+ footerSubGroupColumn?: string;
19
+ }
20
+ interface PolicyActionsRendererProps<TAction extends string> {
21
+ state: Pick<HeadlessConsentSurfaceState<TAction>, 'actionGroups' | 'primaryActions' | 'shouldFillActions' | 'direction'>;
22
+ Footer: ComponentType<PolicyActionsLayoutProps>;
23
+ FooterSubGroup: ComponentType<PolicyActionsLayoutProps>;
24
+ classNames: PolicyActionsClassNames;
25
+ renderDefaultAction: (action: TAction, props: PolicyActionRenderProps<TAction>) => ReactNode;
26
+ renderAction?: (action: TAction, props: PolicyActionRenderProps<TAction>) => ReactNode;
27
+ }
28
+ export declare function PolicyActionsRenderer<TAction extends string>({ state, Footer, FooterSubGroup, classNames, renderDefaultAction, renderAction, }: PolicyActionsRendererProps<TAction>): import("react/jsx-runtime").JSX.Element;
29
+ export {};
@@ -1,4 +1,4 @@
1
- import type { AllConsentNames } from '../../../../../core/dist-types/index.d.ts';
1
+ import type { AllConsentNames } from 'c15t';
2
2
  import * as Button from '../ui/button';
3
3
  import type { ConsentButtonProps } from './button.types';
4
4
  type ConsentActionThemeKey = 'accept' | 'reject' | 'customize';
@@ -1,4 +1,4 @@
1
- import type { ButtonMode } from '../../../../../ui/dist-types/styles/primitives/index.d.ts';
1
+ import type { ButtonMode } from '@c15t/ui/styles/primitives';
2
2
  import type { ComponentRef, HTMLAttributes, MouseEvent } from 'react';
3
3
  import type { CSSVariables, ExtendThemeKeys } from '../../../types/theme';
4
4
  export type ConsentButtonElement = ComponentRef<'button'>;
@@ -1,4 +1,4 @@
1
- import type { LegalLinks as LegalLinksType } from '../../../../../../core/dist-types/index.d.ts';
1
+ import type { LegalLinks as LegalLinksType } from 'c15t';
2
2
  import type { AllThemeKeys } from '../../../../types/theme/style-keys';
3
3
  /**
4
4
  * Hook to filter legal links based on the provided links prop.
@@ -1,5 +1,5 @@
1
- import { type AccordionType } from '../../../../../../ui/dist-types/primitives/accordion/index.d.ts';
2
- import { type AccordionSize, type AccordionVariant, type AccordionVariantsProps, accordionVariants } from '../../../../../../ui/dist-types/styles/primitives/accordion.d.ts';
1
+ import { type AccordionType } from '@c15t/ui/primitives/accordion';
2
+ import { type AccordionSize, type AccordionVariant, type AccordionVariantsProps, accordionVariants } from '@c15t/ui/styles/primitives/accordion';
3
3
  import { type ButtonHTMLAttributes, type ElementType, type HTMLAttributes } from 'react';
4
4
  import type { PolymorphicComponentProps } from '../../libs/polymorphic';
5
5
  import type { ThemeValue } from '../../../../types/theme';
@@ -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, AccordionSize, AccordionTriggerCSSVariables, AccordionVariant, AccordionVariantsProps, } from '../../../../../../ui/dist-types/styles/primitives/index.d.ts';
5
+ export type { AccordionColorCSSVariables, AccordionContentCSSVariables, AccordionCSSVariables, AccordionIconCSSVariables, AccordionItemCSSVariables, AccordionLayoutCSSVariables, AccordionRootCSSVariables, AccordionSize, AccordionTriggerCSSVariables, AccordionVariant, AccordionVariantsProps, } from '@c15t/ui/styles/primitives';
@@ -0,0 +1,23 @@
1
+ import type { Branding } from 'c15t';
2
+ import type { SVGProps } from 'react';
3
+ export type ResolvedBranding = 'c15t' | 'inth' | 'none';
4
+ export type BrandingVariant = 'footer' | 'dialog-tag' | 'banner-tag';
5
+ type BrandingProps = {
6
+ hideBranding: boolean;
7
+ variant?: BrandingVariant;
8
+ className?: string;
9
+ 'data-testid'?: string;
10
+ };
11
+ type BrandingFullLogoProps = {
12
+ branding: Branding | string;
13
+ className?: string;
14
+ };
15
+ type BrandingCompactLogoProps = SVGProps<SVGSVGElement> & {
16
+ branding: Branding | string;
17
+ };
18
+ export declare function resolveBranding(branding: Branding | string): ResolvedBranding;
19
+ export declare function getBrandingHref(branding: Branding | string, refParam?: string): string;
20
+ export declare function BrandingFullLogo({ branding, className, }: BrandingFullLogoProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function BrandingCompactLogo({ branding, ...props }: BrandingCompactLogoProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function BrandingLink({ hideBranding, variant, className, 'data-testid': testId, }: BrandingProps): import("react/jsx-runtime").JSX.Element | null;
23
+ export {};
@@ -1,4 +1,4 @@
1
- import { type ButtonMode, type ButtonSize, type ButtonVariant, type ButtonVariantsProps, buttonVariants } from '../../../../../../ui/dist-types/styles/primitives/button.d.ts';
1
+ import { type ButtonMode, type ButtonSize, type ButtonVariant, type ButtonVariantsProps, buttonVariants } from '@c15t/ui/styles/primitives/button';
2
2
  import { type ButtonHTMLAttributes, type ElementType } from 'react';
3
3
  import type { PolymorphicComponentProps } from '../../libs/polymorphic';
4
4
  export type { ButtonMode, ButtonSize, ButtonVariant, ButtonVariantsProps };
@@ -13,6 +13,14 @@ export declare const C15TIconOnly: ({ title, titleId, ...props }: SVGProps<SVGSV
13
13
  * Use this for branding displays.
14
14
  */
15
15
  export declare const C15TIcon: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & IconProps) => import("react/jsx-runtime").JSX.Element;
16
+ /**
17
+ * INTH logo for partner branding displays.
18
+ */
19
+ export declare const InthLogo: (props: SVGProps<SVGSVGElement> & IconProps) => import("react/jsx-runtime").JSX.Element;
20
+ /**
21
+ * INTH icon-only mark for compact placements like floating triggers.
22
+ */
23
+ export declare const InthIconOnly: (props: SVGProps<SVGSVGElement> & IconProps) => import("react/jsx-runtime").JSX.Element;
16
24
  export declare const ConsentLogo: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & IconProps) => import("react/jsx-runtime").JSX.Element;
17
25
  /**
18
26
  * Consent icon only (without text).
@@ -1,4 +1,4 @@
1
- import { type PreferenceItemVariantsProps } from '../../../../../../ui/dist-types/styles/primitives/preference-item.d.ts';
1
+ import { type PreferenceItemVariantsProps } from '@c15t/ui/styles/primitives/preference-item';
2
2
  import { type HTMLAttributes, type ReactNode } from 'react';
3
3
  export interface PreferenceItemRootProps extends HTMLAttributes<HTMLDivElement>, PreferenceItemVariantsProps {
4
4
  children: ReactNode;
@@ -1,2 +1,2 @@
1
1
  export * from './switch';
2
- export * from './switch.types';
2
+ export type { SwitchCSSVariables, SwitchRootCSSVariables, SwitchThumbCSSVariables, SwitchTrackCSSVariables, } from './switch.types';
@@ -1,4 +1,4 @@
1
- import { type SwitchSize, type SwitchVariantsProps, switchVariants } from '../../../../../../ui/dist-types/styles/primitives/switch.d.ts';
1
+ import { type SwitchSize, type SwitchVariantsProps, switchVariants } from '@c15t/ui/styles/primitives/switch';
2
2
  import { type ButtonHTMLAttributes } from 'react';
3
3
  import type { AllThemeKeys, ThemeValue } from '../../../../types/theme';
4
4
  export type { SwitchSize, SwitchVariantsProps };
@@ -2,4 +2,4 @@
2
2
  * Re-export switch variant types from @c15t/ui for convenience.
3
3
  * The canonical definitions are in @c15t/ui/styles/primitives.
4
4
  */
5
- export type { SwitchCSSVariables, SwitchRootCSSVariables, SwitchSize, SwitchThumbCSSVariables, SwitchTrackCSSVariables, SwitchVariantsProps, } from '../../../../../../ui/dist-types/styles/primitives/index.d.ts';
5
+ export type { SwitchCSSVariables, SwitchRootCSSVariables, SwitchSize, SwitchThumbCSSVariables, SwitchTrackCSSVariables, SwitchVariantsProps, } from '@c15t/ui/styles/primitives';
@@ -1,4 +1,4 @@
1
- import { type TabsVariantsProps } from '../../../../../../ui/dist-types/styles/primitives/tabs.d.ts';
1
+ import { type TabsVariantsProps } from '@c15t/ui/styles/primitives/tabs';
2
2
  import { type HTMLAttributes, type ReactNode } from 'react';
3
3
  export interface TabsRootProps extends Omit<HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'>, TabsVariantsProps {
4
4
  children: ReactNode;
@@ -2,7 +2,7 @@
2
2
  * @packageDocumentation
3
3
  * Provides the context for sharing consent management state across components.
4
4
  */
5
- import type { ConsentManagerInterface, ConsentStoreState } from '../../../core/dist-types/index.d.ts';
5
+ import type { ConsentManagerInterface, ConsentStoreState } from 'c15t';
6
6
  /**
7
7
  * The context value provided by ConsentManagerProvider.
8
8
  */
@@ -1,4 +1,4 @@
1
- export { type ConsentManagerInterface, configureConsentManager, defaultTranslationConfig, detectBrowserLanguage, type EuropePolicyMode, mergeTranslationConfigs, type PolicyPackPresets, policyPackPresets, prepareTranslationConfig, } from '../../core/dist-types/index.d.ts';
1
+ export { type ConsentManagerInterface, configureConsentManager, defaultTranslationConfig, detectBrowserLanguage, type EuropePolicyMode, mergeTranslationConfigs, type PolicyPackPresets, policyPackPresets, prepareTranslationConfig, } from 'c15t';
2
2
  export { useColorScheme } from './hooks/use-color-scheme';
3
3
  export { type ConsentDialogTriggerVisibility, type UseConsentDialogTriggerOptions, type UseConsentDialogTriggerResult, useConsentDialogTrigger, } from './hooks/use-consent-dialog-trigger';
4
4
  export { useConsentManager } from './hooks/use-consent-manager';
@@ -1,4 +1,4 @@
1
- import type { UIOptions } from '../../../ui/dist-types/theme/index.d.ts';
1
+ import type { UIOptions } from '@c15t/ui/theme';
2
2
  /**
3
3
  * Subset of UIOptions that can be overridden at the component level.
4
4
  *