@c15t/react 3.0.0-alpha.1 → 3.0.0-alpha.2
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 +3 -1
- package/dist/aggregate-components.js +1 -1
- package/dist/component-hooks/use-manager.js +1 -1
- package/dist/components/consent-gate/atoms.js +1 -0
- package/dist/components/consent-gate/consent-gate.js +2 -0
- package/dist/components/consent-gate/index.js +2 -0
- package/dist/components/preferences/atoms/accordion.js +1 -1
- package/dist/components/preferences/atoms/vendor-list.js +1 -0
- package/dist/components/preferences/index.js +1 -1
- package/dist/consent-gate.js +2 -0
- package/dist/draft.js +1 -1
- package/dist/external-iab-context.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/styles.tw3.css +6 -3
- package/dist/utils/deferred-module.js +2 -0
- package/dist/version.js +1 -1
- package/dist-types/aggregate-components.d.ts +2 -2
- package/dist-types/component-hooks/use-headless-iab-consent-ui.d.ts +1 -1
- package/dist-types/component-hooks/use-manager.d.ts +6 -1
- package/dist-types/components/consent-gate/atoms.d.ts +11 -0
- package/dist-types/components/consent-gate/consent-gate.d.ts +2 -0
- package/dist-types/components/consent-gate/index.d.ts +41 -0
- package/dist-types/components/{frame → consent-gate}/types.d.ts +7 -7
- package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +1 -1
- package/dist-types/components/consent-preferences-link/index.d.ts +1 -1
- package/dist-types/components/iab-panel/atoms/purpose-item.d.ts +1 -1
- package/dist-types/components/iab-panel/atoms/stack-item.d.ts +1 -1
- package/dist-types/components/iab-panel/atoms/vendor-list.d.ts +1 -1
- package/dist-types/components/iab-panel/iab-panel.d.ts +1 -1
- package/dist-types/components/iab-panel/index.d.ts +24 -24
- package/dist-types/components/iab-prompt/index.d.ts +17 -17
- package/dist-types/components/panel/atoms/card.d.ts +4 -4
- package/dist-types/components/panel/atoms/overlay.d.ts +1 -1
- package/dist-types/components/panel/index.d.ts +7 -7
- package/dist-types/components/panel/panel.d.ts +2 -2
- package/dist-types/components/panel-link/index.d.ts +1 -1
- package/dist-types/components/panel-trigger/atoms/button.d.ts +1 -1
- package/dist-types/components/panel-trigger/atoms/icon.d.ts +1 -1
- package/dist-types/components/panel-trigger/atoms/root.d.ts +2 -2
- package/dist-types/components/panel-trigger/atoms/toolbar.d.ts +2 -2
- package/dist-types/components/panel-trigger/index.d.ts +4 -4
- package/dist-types/components/panel-trigger/panel-trigger-toolbar.d.ts +1 -1
- package/dist-types/components/panel-trigger/panel-trigger.d.ts +9 -9
- package/dist-types/components/panel-trigger/types.d.ts +1 -1
- package/dist-types/components/preferences/atoms/accordion.d.ts +6 -4
- package/dist-types/components/preferences/atoms/button.d.ts +1 -1
- package/dist-types/components/preferences/atoms/footer.d.ts +1 -1
- package/dist-types/components/preferences/atoms/root.d.ts +1 -1
- package/dist-types/components/preferences/atoms/vendor-list.d.ts +23 -0
- package/dist-types/components/preferences/index.d.ts +13 -11
- package/dist-types/components/preferences/policy-actions.d.ts +2 -2
- package/dist-types/components/preferences/preferences.d.ts +1 -1
- package/dist-types/components/preferences/types.d.ts +1 -1
- package/dist-types/components/prompt/components.d.ts +3 -3
- package/dist-types/components/prompt/index.d.ts +11 -11
- package/dist-types/components/prompt/policy-actions.d.ts +2 -2
- package/dist-types/components/prompt/prompt.d.ts +1 -1
- package/dist-types/components/shared/policy-actions.d.ts +2 -2
- package/dist-types/components/shared/primitives/box.d.ts +1 -1
- package/dist-types/components/shared/primitives/button.d.ts +2 -2
- package/dist-types/components/shared/primitives/button.types.d.ts +1 -1
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
- package/dist-types/components/shared/ui/accordion/index.d.ts +2 -2
- package/dist-types/components/shared/ui/animated-collapse/index.d.ts +2 -2
- package/dist-types/components/shared/ui/branding.d.ts +1 -1
- package/dist-types/components/shared/ui/button/button.d.ts +1 -1
- package/dist-types/components/shared/ui/button/index.d.ts +2 -2
- package/dist-types/components/shared/ui/collapsible/index.d.ts +1 -1
- package/dist-types/components/shared/ui/dialog/index.d.ts +1 -1
- package/dist-types/components/shared/ui/preference-item/index.d.ts +1 -1
- package/dist-types/components/shared/ui/switch/index.d.ts +2 -2
- package/dist-types/components/shared/ui/switch/switch.d.ts +1 -1
- package/dist-types/components/shared/ui/tabs/index.d.ts +1 -1
- package/dist-types/consent-gate.d.ts +1 -0
- package/dist-types/context/index.d.ts +3 -3
- package/dist-types/context/theme-context.d.ts +1 -1
- package/dist-types/draft.d.ts +53 -1
- package/dist-types/headless.d.ts +7 -7
- package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +1 -1
- package/dist-types/hooks/use-iab-manager.d.ts +1 -1
- package/dist-types/hooks/use-theme.d.ts +1 -1
- package/dist-types/hooks.d.ts +28 -1
- package/dist-types/iab.d.ts +5 -5
- package/dist-types/index.d.ts +25 -25
- package/dist-types/module-hooks.d.ts +4 -4
- package/dist-types/panel-link.d.ts +1 -1
- package/dist-types/panel-trigger.d.ts +1 -1
- package/dist-types/panel.d.ts +1 -1
- package/dist-types/preferences.d.ts +1 -1
- package/dist-types/primitives/accordion.d.ts +1 -1
- package/dist-types/primitives/button.d.ts +1 -1
- package/dist-types/primitives/collapsible.d.ts +1 -1
- package/dist-types/primitives/dialog.d.ts +1 -1
- package/dist-types/primitives/preference-item.d.ts +1 -1
- package/dist-types/primitives/switch.d.ts +1 -1
- package/dist-types/primitives/tabs.d.ts +1 -1
- package/dist-types/primitives.d.ts +7 -7
- package/dist-types/prompt.d.ts +1 -1
- package/dist-types/provider.d.ts +22 -5
- package/dist-types/server/fetch-ssr-data.d.ts +1 -1
- package/dist-types/server/index.d.ts +5 -5
- package/dist-types/theme-provider.d.ts +2 -2
- package/dist-types/types/index.d.ts +3 -3
- package/dist-types/types/manager.d.ts +1 -1
- package/dist-types/types/theme/index.d.ts +1 -1
- package/dist-types/ui-config-context.d.ts +1 -1
- package/dist-types/utils/deferred-module.d.ts +11 -0
- package/dist-types/utils/index.d.ts +4 -4
- package/dist-types/utils/merge-slot-props.d.ts +2 -2
- package/dist-types/utils/merge-styles.d.ts +1 -1
- package/dist-types/utils/theme-utils.d.ts +1 -1
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +3 -1
- package/docs/frameworks/react/components/consent-dialog.md +1 -1
- package/docs/frameworks/react/components/{frame.md → consent-gate.md} +27 -27
- package/docs/frameworks/react/components/consent-manager-provider.md +5 -1
- package/docs/frameworks/react/components/consent-widget.md +39 -6
- package/docs/frameworks/react/concepts/consent-categories.md +31 -2
- package/docs/guides/deployment-modes.md +12 -0
- package/docs/integrations/building-integrations.md +5 -0
- package/docs/integrations/cloudflare-zaraz.md +399 -0
- package/docs/integrations/google-maps.md +20 -20
- package/docs/integrations/granular-consent.md +208 -0
- package/docs/integrations/overview.md +5 -4
- package/docs/integrations/youtube.md +26 -21
- package/docs/upgrade-v3.md +47 -0
- package/package.json +26 -16
- package/dist/components/frame/atoms.js +0 -1
- package/dist/components/frame/frame.js +0 -2
- package/dist/components/frame/index.js +0 -2
- package/dist/frame.js +0 -2
- package/dist-types/components/frame/atoms.d.ts +0 -11
- package/dist-types/components/frame/frame.d.ts +0 -2
- package/dist-types/components/frame/index.d.ts +0 -24
- package/dist-types/frame.d.ts +0 -1
- package/readme.json +0 -48
- package/src/iab/styles.css +0 -11
- package/src/styles.css +0 -10
- /package/dist/components/{frame → consent-gate}/types.js +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AllConsentNames } from '@c15t/core';
|
|
2
2
|
import type { ComponentPropsWithRef, FC, ReactNode } from 'react';
|
|
3
|
-
import type { Theme } from '../../types/theme';
|
|
4
|
-
import type * as Atom from './atoms';
|
|
5
|
-
export interface
|
|
3
|
+
import type { Theme } from '../../types/theme/index.js';
|
|
4
|
+
import type * as Atom from './atoms.js';
|
|
5
|
+
export interface ConsentGateProps extends ComponentPropsWithRef<'div'> {
|
|
6
6
|
/**
|
|
7
7
|
* Content rendered when consent is granted. Children are not mounted until
|
|
8
8
|
* consent is given, preventing unnecessary network requests.
|
|
@@ -30,8 +30,8 @@ export interface FrameProps extends ComponentPropsWithRef<'div'> {
|
|
|
30
30
|
*/
|
|
31
31
|
theme?: Theme;
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
34
|
-
Root: typeof Atom.
|
|
35
|
-
Title: typeof Atom.
|
|
36
|
-
Button: typeof Atom.
|
|
33
|
+
export interface ConsentGateCompoundComponent extends FC<ConsentGateProps> {
|
|
34
|
+
Root: typeof Atom.ConsentGateRoot;
|
|
35
|
+
Title: typeof Atom.ConsentGateTitle;
|
|
36
|
+
Button: typeof Atom.ConsentGateButton;
|
|
37
37
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ConsentButtonProps } from '../shared/primitives/button.types';
|
|
2
|
+
import type { ConsentButtonProps } from '../shared/primitives/button.types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Inline trigger for opening the consent dialog from places like site footers.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ConsentDialogLink, type ConsentDialogLinkProps, } from './consent-preferences-link';
|
|
1
|
+
export { ConsentDialogLink, type ConsentDialogLinkProps, } from './consent-preferences-link.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GlobalVendorList } from '@c15t/core';
|
|
2
2
|
import type { FC } from 'react';
|
|
3
|
-
import type { ProcessedPurpose, VendorId } from '../types';
|
|
3
|
+
import type { ProcessedPurpose, VendorId } from '../types.js';
|
|
4
4
|
interface CustomVendor {
|
|
5
5
|
id: string | number;
|
|
6
6
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as C15tCoreTypes from '@c15t/core';
|
|
2
2
|
import type { FC } from 'react';
|
|
3
|
-
import type { ConsentDialogTriggerProps } from '../panel-trigger';
|
|
3
|
+
import type { ConsentDialogTriggerProps } from '../panel-trigger/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the IABConsentDialog component.
|
|
6
6
|
* @public
|
|
@@ -7,17 +7,17 @@
|
|
|
7
7
|
* of the consent dialog's parts.
|
|
8
8
|
*/
|
|
9
9
|
import type { FC } from 'react';
|
|
10
|
-
import { IABConsentDialogCard } from './atoms/card';
|
|
11
|
-
import { IABConsentDialogContent } from './atoms/content';
|
|
12
|
-
import { IABConsentDialogFooter } from './atoms/footer';
|
|
13
|
-
import { IABConsentDialogHeader } from './atoms/header';
|
|
14
|
-
import { IABConsentDialogOverlay } from './atoms/overlay';
|
|
15
|
-
import { PurposeItem } from './atoms/purpose-item';
|
|
16
|
-
import { IABConsentDialogRoot } from './atoms/root';
|
|
17
|
-
import { StackItem } from './atoms/stack-item';
|
|
18
|
-
import { IABConsentDialogTabButton, IABConsentDialogTabs } from './atoms/tabs';
|
|
19
|
-
import { VendorList } from './atoms/vendor-list';
|
|
20
|
-
import type { IABConsentDialogProps } from './iab-panel';
|
|
10
|
+
import { IABConsentDialogCard } from './atoms/card.js';
|
|
11
|
+
import { IABConsentDialogContent } from './atoms/content.js';
|
|
12
|
+
import { IABConsentDialogFooter } from './atoms/footer.js';
|
|
13
|
+
import { IABConsentDialogHeader } from './atoms/header.js';
|
|
14
|
+
import { IABConsentDialogOverlay } from './atoms/overlay.js';
|
|
15
|
+
import { PurposeItem } from './atoms/purpose-item.js';
|
|
16
|
+
import { IABConsentDialogRoot } from './atoms/root.js';
|
|
17
|
+
import { StackItem } from './atoms/stack-item.js';
|
|
18
|
+
import { IABConsentDialogTabButton, IABConsentDialogTabs } from './atoms/tabs.js';
|
|
19
|
+
import { VendorList } from './atoms/vendor-list.js';
|
|
20
|
+
import type { IABConsentDialogProps } from './iab-panel.js';
|
|
21
21
|
/**
|
|
22
22
|
* This interface extends the base IABConsentDialog component with additional sub-components
|
|
23
23
|
* that can be used to compose the consent dialog's structure.
|
|
@@ -76,17 +76,17 @@ export interface IABConsentDialogCompoundComponent extends FC<IABConsentDialogPr
|
|
|
76
76
|
*/
|
|
77
77
|
declare const IABConsentDialog: IABConsentDialogCompoundComponent;
|
|
78
78
|
export default IABConsentDialog;
|
|
79
|
-
export { IABConsentDialogCard } from './atoms/card';
|
|
80
|
-
export { IABConsentDialogContent } from './atoms/content';
|
|
81
|
-
export { IABConsentDialogFooter } from './atoms/footer';
|
|
82
|
-
export { IABConsentDialogHeader } from './atoms/header';
|
|
83
|
-
export { IABConsentDialogOverlay } from './atoms/overlay';
|
|
84
|
-
export { PurposeItem } from './atoms/purpose-item';
|
|
85
|
-
export { IABConsentDialogRoot } from './atoms/root';
|
|
86
|
-
export { StackItem } from './atoms/stack-item';
|
|
87
|
-
export { IABConsentDialogTabButton, IABConsentDialogTabs } from './atoms/tabs';
|
|
88
|
-
export { VendorList } from './atoms/vendor-list';
|
|
89
|
-
export { type IABDisplayModel, useIABDisplayModel, } from './hooks/use-display-model';
|
|
90
|
-
export { type GVLData, useGVLData } from './hooks/use-gvl-data';
|
|
91
|
-
export type { ProcessedPurpose, ProcessedSpecialFeature, ProcessedStack, ProcessedVendor, } from './types';
|
|
79
|
+
export { IABConsentDialogCard } from './atoms/card.js';
|
|
80
|
+
export { IABConsentDialogContent } from './atoms/content.js';
|
|
81
|
+
export { IABConsentDialogFooter } from './atoms/footer.js';
|
|
82
|
+
export { IABConsentDialogHeader } from './atoms/header.js';
|
|
83
|
+
export { IABConsentDialogOverlay } from './atoms/overlay.js';
|
|
84
|
+
export { PurposeItem } from './atoms/purpose-item.js';
|
|
85
|
+
export { IABConsentDialogRoot } from './atoms/root.js';
|
|
86
|
+
export { StackItem } from './atoms/stack-item.js';
|
|
87
|
+
export { IABConsentDialogTabButton, IABConsentDialogTabs } from './atoms/tabs.js';
|
|
88
|
+
export { VendorList } from './atoms/vendor-list.js';
|
|
89
|
+
export { type IABDisplayModel, useIABDisplayModel, } from './hooks/use-display-model.js';
|
|
90
|
+
export { type GVLData, useGVLData } from './hooks/use-gvl-data.js';
|
|
91
|
+
export type { ProcessedPurpose, ProcessedSpecialFeature, ProcessedStack, ProcessedVendor, } from './types.js';
|
|
92
92
|
export { IABConsentDialog, type IABConsentDialogProps };
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
* of the banner's parts.
|
|
8
8
|
*/
|
|
9
9
|
import type { FC } from 'react';
|
|
10
|
-
import { IABConsentBannerButtonGroup, IABConsentBannerFooterSpacer } from './atoms/button-group';
|
|
11
|
-
import { IABConsentBannerCard } from './atoms/card';
|
|
12
|
-
import { IABConsentBannerDescription } from './atoms/description';
|
|
13
|
-
import { IABConsentBannerFooter } from './atoms/footer';
|
|
14
|
-
import { IABConsentBannerHeader } from './atoms/header';
|
|
15
|
-
import { IABConsentBannerOverlay } from './atoms/overlay';
|
|
16
|
-
import { IABConsentBannerRoot } from './atoms/root';
|
|
17
|
-
import { IABConsentBannerTitle } from './atoms/title';
|
|
18
|
-
import type { IABConsentBannerProps } from './iab-prompt';
|
|
10
|
+
import { IABConsentBannerButtonGroup, IABConsentBannerFooterSpacer } from './atoms/button-group.js';
|
|
11
|
+
import { IABConsentBannerCard } from './atoms/card.js';
|
|
12
|
+
import { IABConsentBannerDescription } from './atoms/description.js';
|
|
13
|
+
import { IABConsentBannerFooter } from './atoms/footer.js';
|
|
14
|
+
import { IABConsentBannerHeader } from './atoms/header.js';
|
|
15
|
+
import { IABConsentBannerOverlay } from './atoms/overlay.js';
|
|
16
|
+
import { IABConsentBannerRoot } from './atoms/root.js';
|
|
17
|
+
import { IABConsentBannerTitle } from './atoms/title.js';
|
|
18
|
+
import type { IABConsentBannerProps } from './iab-prompt.js';
|
|
19
19
|
/**
|
|
20
20
|
* This interface extends the base IABConsentBanner component with additional sub-components
|
|
21
21
|
* that can be used to compose the banner's structure.
|
|
@@ -76,12 +76,12 @@ export interface IABConsentBannerCompoundComponent extends FC<IABConsentBannerPr
|
|
|
76
76
|
*/
|
|
77
77
|
declare const IABConsentBanner: IABConsentBannerCompoundComponent;
|
|
78
78
|
export default IABConsentBanner;
|
|
79
|
-
export { IABConsentBannerButtonGroup, IABConsentBannerFooterSpacer, } from './atoms/button-group';
|
|
80
|
-
export { IABConsentBannerCard } from './atoms/card';
|
|
81
|
-
export { IABConsentBannerDescription } from './atoms/description';
|
|
82
|
-
export { IABConsentBannerFooter } from './atoms/footer';
|
|
83
|
-
export { IABConsentBannerHeader } from './atoms/header';
|
|
84
|
-
export { IABConsentBannerOverlay } from './atoms/overlay';
|
|
85
|
-
export { IABConsentBannerRoot } from './atoms/root';
|
|
86
|
-
export { IABConsentBannerTitle } from './atoms/title';
|
|
79
|
+
export { IABConsentBannerButtonGroup, IABConsentBannerFooterSpacer, } from './atoms/button-group.js';
|
|
80
|
+
export { IABConsentBannerCard } from './atoms/card.js';
|
|
81
|
+
export { IABConsentBannerDescription } from './atoms/description.js';
|
|
82
|
+
export { IABConsentBannerFooter } from './atoms/footer.js';
|
|
83
|
+
export { IABConsentBannerHeader } from './atoms/header.js';
|
|
84
|
+
export { IABConsentBannerOverlay } from './atoms/overlay.js';
|
|
85
|
+
export { IABConsentBannerRoot } from './atoms/root.js';
|
|
86
|
+
export { IABConsentBannerTitle } from './atoms/title.js';
|
|
87
87
|
export { IABConsentBanner, type IABConsentBannerProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { BoxProps } from '../../shared/primitives/box';
|
|
3
|
-
import type { InlineLegalLinksProps } from '../../shared/primitives/legal-links';
|
|
4
|
-
import type { BrandingSlotContext, BrandingVariant } from '../../shared/ui/branding';
|
|
5
|
-
import type { ClassNameStyle } from '../../../types/theme';
|
|
2
|
+
import type { BoxProps } from '../../shared/primitives/box.js';
|
|
3
|
+
import type { InlineLegalLinksProps } from '../../shared/primitives/legal-links/index.js';
|
|
4
|
+
import type { BrandingSlotContext, BrandingVariant } from '../../shared/ui/branding.js';
|
|
5
|
+
import type { ClassNameStyle } from '../../../types/theme/index.js';
|
|
6
6
|
declare const ConsentDialogCard: import("react").ForwardRefExoticComponent<{
|
|
7
7
|
/** The content to be rendered inside the consent dialog card */
|
|
8
8
|
children?: ReactNode;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements accessible modal behavior with animation support.
|
|
5
5
|
*/
|
|
6
6
|
import type { FC, PropsWithChildren } from 'react';
|
|
7
|
-
import type { ThemeValue } from '../../../types/theme';
|
|
7
|
+
import type { ThemeValue } from '../../../types/theme/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Props for the Overlay component.
|
|
10
10
|
*
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* of the dialog's parts.
|
|
8
8
|
*/
|
|
9
9
|
import type { FC } from 'react';
|
|
10
|
-
import { Card, ConsentCustomizationCard, ConsentDialogContent, ConsentDialogFooter, ConsentDialogHeader, ConsentDialogHeaderDescription, ConsentDialogHeaderTitle, Content, Footer, Header, HeaderDescription, HeaderTitle } from './atoms/card';
|
|
11
|
-
import { Overlay } from './atoms/overlay';
|
|
12
|
-
import { Root } from './atoms/root';
|
|
13
|
-
import type { ConsentDialogProps } from './panel';
|
|
10
|
+
import { Card, ConsentCustomizationCard, ConsentDialogContent, ConsentDialogFooter, ConsentDialogHeader, ConsentDialogHeaderDescription, ConsentDialogHeaderTitle, Content, Footer, Header, HeaderDescription, HeaderTitle } from './atoms/card.js';
|
|
11
|
+
import { Overlay } from './atoms/overlay.js';
|
|
12
|
+
import { Root } from './atoms/root.js';
|
|
13
|
+
import type { ConsentDialogProps } from './panel.js';
|
|
14
14
|
export type { ConsentDialogProps };
|
|
15
15
|
/**
|
|
16
16
|
* This interface extends the base ConsentDialog component with additional sub-components
|
|
@@ -98,7 +98,7 @@ export interface ConsentDialogCompoundComponent extends FC<ConsentDialogProps> {
|
|
|
98
98
|
*/
|
|
99
99
|
declare const ConsentDialog: ConsentDialogCompoundComponent;
|
|
100
100
|
export default ConsentDialog;
|
|
101
|
-
export { Card, ConsentCustomizationCard, ConsentDialogContent, ConsentDialogFooter, ConsentDialogHeader, ConsentDialogHeaderDescription, ConsentDialogHeaderTitle, Content, Footer, Header, HeaderDescription, HeaderTitle, } from './atoms/card';
|
|
102
|
-
export { ConsentDialogOverlay, Overlay } from './atoms/overlay';
|
|
103
|
-
export { ConsentDialogRoot, Root } from './atoms/root';
|
|
101
|
+
export { Card, ConsentCustomizationCard, ConsentDialogContent, ConsentDialogFooter, ConsentDialogHeader, ConsentDialogHeaderDescription, ConsentDialogHeaderTitle, Content, Footer, Header, HeaderDescription, HeaderTitle, } from './atoms/card.js';
|
|
102
|
+
export { ConsentDialogOverlay, Overlay } from './atoms/overlay.js';
|
|
103
|
+
export { ConsentDialogRoot, Root } from './atoms/root.js';
|
|
104
104
|
export { ConsentDialog };
|
|
@@ -8,8 +8,8 @@ import type * as C15tCoreTypes from '@c15t/core';
|
|
|
8
8
|
* prefer a one-line `<ConsentDialog />` usage still have it.
|
|
9
9
|
*/
|
|
10
10
|
import type { FC } from 'react';
|
|
11
|
-
import type { ConsentDialogTriggerProps } from '../panel-trigger';
|
|
12
|
-
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links';
|
|
11
|
+
import type { ConsentDialogTriggerProps } from '../panel-trigger/index.js';
|
|
12
|
+
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links/index.js';
|
|
13
13
|
/**
|
|
14
14
|
* Props for the `<ConsentDialog />` convenience component.
|
|
15
15
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ConsentDialogLink, type ConsentDialogLinkProps, } from '../consent-preferences-link/consent-preferences-link';
|
|
1
|
+
export { ConsentDialogLink, type ConsentDialogLinkProps, } from '../consent-preferences-link/consent-preferences-link.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { CornerPosition, TriggerVisibility } from '../types';
|
|
3
|
-
import type { UseDraggableReturn } from '../use-draggable';
|
|
2
|
+
import type { CornerPosition, TriggerVisibility } from '../types.js';
|
|
3
|
+
import type { UseDraggableReturn } from '../use-draggable.js';
|
|
4
4
|
/**
|
|
5
5
|
* Context value for the ConsentDialogTrigger compound component.
|
|
6
6
|
*/
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { PolicyRight } from '@c15t/schema/types';
|
|
7
7
|
import type { ReactNode } from 'react';
|
|
8
|
-
import type { ClassNameStyle } from '../../../types/theme';
|
|
9
|
-
import type { ConsentDialogTriggerToolbarAction, ConsentDialogTriggerToolbarPreferences, TriggerOrientation, TriggerSize } from '../types';
|
|
8
|
+
import type { ClassNameStyle } from '../../../types/theme/index.js';
|
|
9
|
+
import type { ConsentDialogTriggerToolbarAction, ConsentDialogTriggerToolbarPreferences, TriggerOrientation, TriggerSize } from '../types.js';
|
|
10
10
|
/** Right the built-in action stands for; opt-out wins when the rule carries it. */
|
|
11
11
|
export type ToolbarPreferencesRight = Extract<PolicyRight, 'opt-out' | 'preferences'>;
|
|
12
12
|
export interface TriggerToolbarProps extends Omit<ClassNameStyle, 'baseClassName'> {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
export { ConsentDialogTrigger, type ConsentDialogTriggerCompound, TriggerButton, type TriggerButtonProps, TriggerIcon, type TriggerIconProps, TriggerRoot, type TriggerRootProps, TriggerText, type TriggerTextProps, useTriggerContext, } from './panel-trigger';
|
|
7
|
-
export { ConsentDialogTriggerToolbar } from './panel-trigger-toolbar';
|
|
8
|
-
export type { ConsentDialogTriggerProps, ConsentDialogTriggerToolbarAction, ConsentDialogTriggerToolbarPreferences, ConsentDialogTriggerToolbarProps, CornerPosition, TriggerIcon as TriggerIconType, TriggerOrientation, TriggerSize, TriggerVisibility, } from './types';
|
|
9
|
-
export { type UseDraggableOptions, type UseDraggableReturn, useDraggable, } from './use-draggable';
|
|
6
|
+
export { ConsentDialogTrigger, type ConsentDialogTriggerCompound, TriggerButton, type TriggerButtonProps, TriggerIcon, type TriggerIconProps, TriggerRoot, type TriggerRootProps, TriggerText, type TriggerTextProps, useTriggerContext, } from './panel-trigger.js';
|
|
7
|
+
export { ConsentDialogTriggerToolbar } from './panel-trigger-toolbar.js';
|
|
8
|
+
export type { ConsentDialogTriggerProps, ConsentDialogTriggerToolbarAction, ConsentDialogTriggerToolbarPreferences, ConsentDialogTriggerToolbarProps, CornerPosition, TriggerIcon as TriggerIconType, TriggerOrientation, TriggerSize, TriggerVisibility, } from './types.js';
|
|
9
|
+
export { type UseDraggableOptions, type UseDraggableReturn, useDraggable, } from './use-draggable.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @packageDocumentation
|
|
6
6
|
*/
|
|
7
7
|
import type { ReactNode } from 'react';
|
|
8
|
-
import type { ConsentDialogTriggerToolbarProps } from './types';
|
|
8
|
+
import type { ConsentDialogTriggerToolbarProps } from './types.js';
|
|
9
9
|
export declare function ConsentDialogTriggerToolbar({ actions, preferences, orientation, defaultPosition, persistPosition, ariaLabel, showWhen, size, className, style, noStyle, onPositionChange, }: ConsentDialogTriggerToolbarProps): ReactNode;
|
|
10
10
|
export declare namespace ConsentDialogTriggerToolbar {
|
|
11
11
|
var displayName: string;
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
9
|
import type { FC } from 'react';
|
|
10
|
-
import { TriggerButton } from './atoms/button';
|
|
11
|
-
import type { TriggerButtonProps } from './atoms/button';
|
|
12
|
-
import { TriggerIcon } from './atoms/icon';
|
|
13
|
-
import type { TriggerIconProps } from './atoms/icon';
|
|
14
|
-
import { TriggerRoot, useTriggerContext } from './atoms/root';
|
|
15
|
-
import type { TriggerRootProps } from './atoms/root';
|
|
16
|
-
import { TriggerText } from './atoms/text';
|
|
17
|
-
import type { TriggerTextProps } from './atoms/text';
|
|
18
|
-
import type { ConsentDialogTriggerProps } from './types';
|
|
10
|
+
import { TriggerButton } from './atoms/button.js';
|
|
11
|
+
import type { TriggerButtonProps } from './atoms/button.js';
|
|
12
|
+
import { TriggerIcon } from './atoms/icon.js';
|
|
13
|
+
import type { TriggerIconProps } from './atoms/icon.js';
|
|
14
|
+
import { TriggerRoot, useTriggerContext } from './atoms/root.js';
|
|
15
|
+
import type { TriggerRootProps } from './atoms/root.js';
|
|
16
|
+
import { TriggerText } from './atoms/text.js';
|
|
17
|
+
import type { TriggerTextProps } from './atoms/text.js';
|
|
18
|
+
import type { ConsentDialogTriggerProps } from './types.js';
|
|
19
19
|
/**
|
|
20
20
|
* Compound component interface for ConsentDialogTrigger.
|
|
21
21
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { CornerPosition } from '@c15t/ui/utils/trigger-utils';
|
|
7
7
|
import type { ReactNode } from 'react';
|
|
8
|
-
import type { ClassNameStyle } from '../../types/theme';
|
|
8
|
+
import type { ClassNameStyle } from '../../types/theme/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* Icon rendered by a consent dialog trigger control.
|
|
11
11
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { BoxProps } from '../../shared/primitives/box';
|
|
3
|
-
import * as PreferenceItem from '../../shared/ui/preference-item';
|
|
4
|
-
import * as RadixSwitch from '../../shared/ui/switch';
|
|
2
|
+
import type { BoxProps } from '../../shared/primitives/box.js';
|
|
3
|
+
import * as PreferenceItem from '../../shared/ui/preference-item/index.js';
|
|
4
|
+
import * as RadixSwitch from '../../shared/ui/switch/index.js';
|
|
5
|
+
import { ConsentWidgetVendorList } from './vendor-list.js';
|
|
5
6
|
declare const ConsentWidgetAccordionTrigger: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
7
|
declare const ConsentWidgetAccordionTriggerInner: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
8
|
declare const ConsentWidgetAccordionContent: import("react").ForwardRefExoticComponent<PreferenceItem.PreferenceItemContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -25,4 +26,5 @@ declare const Accordion: typeof ConsentWidgetAccordion;
|
|
|
25
26
|
declare const Switch: import("react").ForwardRefExoticComponent<RadixSwitch.SwitchProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
26
27
|
declare const AccordionItems: typeof ConsentWidgetAccordionItems;
|
|
27
28
|
declare const AccordionItem: import("react").ForwardRefExoticComponent<Omit<PreferenceItem.PreferenceItemRootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
-
|
|
29
|
+
declare const VendorList: typeof ConsentWidgetVendorList;
|
|
30
|
+
export { ConsentWidgetVendorList, VendorList, Accordion, AccordionArrow, AccordionContent, AccordionItem, AccordionItems, AccordionTrigger, AccordionTriggerInner, ConsentWidgetAccordion, ConsentWidgetAccordionArrow, ConsentWidgetAccordionContent, ConsentWidgetAccordionItem, ConsentWidgetAccordionItems, ConsentWidgetAccordionTrigger, ConsentWidgetAccordionTriggerInner, ConsentWidgetSwitch, Switch, };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AllConsentNames } from '@c15t/core';
|
|
2
|
+
import type { BoxProps } from '../../shared/primitives/box.js';
|
|
3
|
+
export interface ConsentWidgetVendorListProps extends Omit<BoxProps, 'children' | 'slotKey'> {
|
|
4
|
+
/** Category whose vendors to list. */
|
|
5
|
+
category: AllConsentNames;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Vendor rows nested inside one category's accordion content, each a
|
|
9
|
+
* collapsed card of its own that opens for its description and privacy
|
|
10
|
+
* policy link. A long list stays one line per vendor.
|
|
11
|
+
*
|
|
12
|
+
* Renders nothing when the category has no presentable vendor or the model
|
|
13
|
+
* is `iab`. Each row's switch stages a per-vendor grant on the same draft
|
|
14
|
+
* the category switches use; nothing is recorded until Save. While the
|
|
15
|
+
* parent category is off in the draft, the vendor switches are disabled: a
|
|
16
|
+
* vendor toggle never grants a category on its own. A `disabled` vendor is
|
|
17
|
+
* listed without a switch.
|
|
18
|
+
*
|
|
19
|
+
* @param props - The category whose vendors to list, plus `Box` attributes.
|
|
20
|
+
* @returns The vendor list, or `null` when there is nothing to list.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
export declare const ConsentWidgetVendorList: ({ category, className, noStyle, ...props }: ConsentWidgetVendorListProps) => import("react").JSX.Element | null;
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import type { FC } from 'react';
|
|
11
|
-
import { Accordion, AccordionArrow, AccordionContent, AccordionItem, AccordionItems, AccordionTrigger, AccordionTriggerInner, Switch } from './atoms/accordion';
|
|
12
|
-
import { AcceptAllButton, CustomizeButton, RejectButton, SaveButton } from './atoms/button';
|
|
13
|
-
import { Footer, FooterSubGroup } from './atoms/footer';
|
|
14
|
-
import { Root } from './atoms/root';
|
|
15
|
-
import { PolicyActions } from './policy-actions';
|
|
16
|
-
import type { ConsentWidgetProps } from './types';
|
|
11
|
+
import { Accordion, AccordionArrow, AccordionContent, AccordionItem, AccordionItems, AccordionTrigger, AccordionTriggerInner, Switch, VendorList } from './atoms/accordion.js';
|
|
12
|
+
import { AcceptAllButton, CustomizeButton, RejectButton, SaveButton } from './atoms/button.js';
|
|
13
|
+
import { Footer, FooterSubGroup } from './atoms/footer.js';
|
|
14
|
+
import { Root } from './atoms/root.js';
|
|
15
|
+
import { PolicyActions } from './policy-actions.js';
|
|
16
|
+
import type { ConsentWidgetProps } from './types.js';
|
|
17
17
|
export type { ConsentWidgetProps };
|
|
18
18
|
/**
|
|
19
19
|
* This interface extends the base ConsentWidget component with additional sub-components
|
|
@@ -31,6 +31,8 @@ export interface ConsentWidgetCompoundComponent extends FC<ConsentWidgetProps> {
|
|
|
31
31
|
Switch: typeof Switch;
|
|
32
32
|
AccordionItems: typeof AccordionItems;
|
|
33
33
|
AccordionItem: typeof AccordionItem;
|
|
34
|
+
/** Vendor rows for one category, nested by `AccordionItems`. */
|
|
35
|
+
VendorList: typeof VendorList;
|
|
34
36
|
Root: typeof Root;
|
|
35
37
|
AcceptAllButton: typeof AcceptAllButton;
|
|
36
38
|
CustomizeButton: typeof CustomizeButton;
|
|
@@ -94,9 +96,9 @@ export interface ConsentWidgetCompoundComponent extends FC<ConsentWidgetProps> {
|
|
|
94
96
|
*/
|
|
95
97
|
declare const ConsentWidget: ConsentWidgetCompoundComponent;
|
|
96
98
|
export default ConsentWidget;
|
|
97
|
-
export { Accordion, AccordionArrow, AccordionContent, AccordionItem, AccordionItems, AccordionTrigger, AccordionTriggerInner, ConsentWidgetAccordion, ConsentWidgetAccordionArrow, ConsentWidgetAccordionContent, ConsentWidgetAccordionItem, ConsentWidgetAccordionItems, ConsentWidgetAccordionTrigger, ConsentWidgetAccordionTriggerInner, ConsentWidgetSwitch, Switch, } from './atoms/accordion';
|
|
98
|
-
export { AcceptAllButton, ConsentWidgetAcceptAllButton, ConsentWidgetCustomizeButton, ConsentWidgetRejectButton, ConsentWidgetSaveButton, CustomizeButton, RejectButton, SaveButton, } from './atoms/button';
|
|
99
|
-
export { ConsentWidgetFooter, ConsentWidgetFooterSubGroup, Footer, FooterSubGroup, } from './atoms/footer';
|
|
100
|
-
export { ConsentWidgetRoot, Root } from './atoms/root';
|
|
101
|
-
export { type ConsentWidgetPolicyActionRenderProps, ConsentWidgetPolicyActions, type ConsentWidgetPolicyActionsProps, PolicyActions, } from './policy-actions';
|
|
99
|
+
export { Accordion, AccordionArrow, AccordionContent, AccordionItem, AccordionItems, AccordionTrigger, AccordionTriggerInner, ConsentWidgetAccordion, ConsentWidgetAccordionArrow, ConsentWidgetAccordionContent, ConsentWidgetAccordionItem, ConsentWidgetAccordionItems, ConsentWidgetAccordionTrigger, ConsentWidgetAccordionTriggerInner, ConsentWidgetSwitch, ConsentWidgetVendorList, Switch, VendorList, } from './atoms/accordion.js';
|
|
100
|
+
export { AcceptAllButton, ConsentWidgetAcceptAllButton, ConsentWidgetCustomizeButton, ConsentWidgetRejectButton, ConsentWidgetSaveButton, CustomizeButton, RejectButton, SaveButton, } from './atoms/button.js';
|
|
101
|
+
export { ConsentWidgetFooter, ConsentWidgetFooterSubGroup, Footer, FooterSubGroup, } from './atoms/footer.js';
|
|
102
|
+
export { ConsentWidgetRoot, Root } from './atoms/root.js';
|
|
103
|
+
export { type ConsentWidgetPolicyActionRenderProps, ConsentWidgetPolicyActions, type ConsentWidgetPolicyActionsProps, PolicyActions, } from './policy-actions.js';
|
|
102
104
|
export { ConsentWidget };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { HeadlessConsentDialogAction } from '../../component-hooks/use-headless-consent-ui';
|
|
3
|
-
import type { PolicyActionRenderProps } from '../shared/policy-actions';
|
|
2
|
+
import type { HeadlessConsentDialogAction } from '../../component-hooks/use-headless-consent-ui.js';
|
|
3
|
+
import type { PolicyActionRenderProps } from '../shared/policy-actions.js';
|
|
4
4
|
export type ConsentWidgetPolicyActionRenderProps = PolicyActionRenderProps<HeadlessConsentDialogAction>;
|
|
5
5
|
export interface ConsentWidgetPolicyActionsProps {
|
|
6
6
|
renderAction?: (action: HeadlessConsentDialogAction, props: ConsentWidgetPolicyActionRenderProps) => ReactNode;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ConsentWidgetProps } from './types';
|
|
1
|
+
import type { ConsentWidgetProps } from './types.js';
|
|
2
2
|
export declare const ConsentWidget: ({ hideBranding, noStyle: localNoStyle, disableAnimation: localDisableAnimation, scrollLock: localScrollLock, trapFocus: localTrapFocus, ...props }: ConsentWidgetProps) => import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links';
|
|
2
|
+
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links/index.js';
|
|
3
3
|
export interface ConsentWidgetRootProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
useProvider?: boolean;
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { PolicyRight } from '@c15t/schema/types';
|
|
7
7
|
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
8
|
-
import type { BoxProps } from '../shared/primitives/box';
|
|
9
|
-
import type { ConsentButtonProps } from '../shared/primitives/button.types';
|
|
10
|
-
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links';
|
|
8
|
+
import type { BoxProps } from '../shared/primitives/box.js';
|
|
9
|
+
import type { ConsentButtonProps } from '../shared/primitives/button.types.js';
|
|
10
|
+
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links/index.js';
|
|
11
11
|
/** Rights the banner can expose as links. `disclosure` is carried by legal links. */
|
|
12
12
|
export type ConsentBannerRight = Exclude<PolicyRight, 'disclosure'>;
|
|
13
13
|
/**
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
import type { FC } from 'react';
|
|
11
|
-
import { Overlay } from './atoms/overlay';
|
|
12
|
-
import { Root } from './atoms/root';
|
|
13
|
-
import { AcceptButton, Card, CustomizeButton, Description, DismissButton, Footer, FooterSubGroup, Header, RejectButton, RightLink, Rights, Title } from './components';
|
|
14
|
-
import { PolicyActions } from './policy-actions';
|
|
15
|
-
import type { ConsentBannerButton, ConsentBannerLayout, ConsentBannerProps } from './prompt';
|
|
11
|
+
import { Overlay } from './atoms/overlay.js';
|
|
12
|
+
import { Root } from './atoms/root.js';
|
|
13
|
+
import { AcceptButton, Card, CustomizeButton, Description, DismissButton, Footer, FooterSubGroup, Header, RejectButton, RightLink, Rights, Title } from './components.js';
|
|
14
|
+
import { PolicyActions } from './policy-actions.js';
|
|
15
|
+
import type { ConsentBannerButton, ConsentBannerLayout, ConsentBannerProps } from './prompt.js';
|
|
16
16
|
/**
|
|
17
17
|
* This interface extends the base ConsentBanner component with additional sub-components
|
|
18
18
|
* that can be used to compose the banner's structure.
|
|
@@ -114,10 +114,10 @@ export interface ConsentBannerCompoundComponent extends FC<ConsentBannerProps> {
|
|
|
114
114
|
*/
|
|
115
115
|
declare const ConsentBanner: ConsentBannerCompoundComponent;
|
|
116
116
|
export default ConsentBanner;
|
|
117
|
-
export { ConsentBannerOverlay, Overlay } from './atoms/overlay';
|
|
118
|
-
export { ConsentBannerRoot, Root } from './atoms/root';
|
|
119
|
-
export { AcceptButton, Card, ConsentBannerAcceptButton, ConsentBannerCard, ConsentBannerCustomizeButton, ConsentBannerDescription, ConsentBannerDismissButton, ConsentBannerFooter, ConsentBannerFooterSubGroup, ConsentBannerHeader, ConsentBannerRejectButton, type ConsentBannerRight, ConsentBannerRightLink, type ConsentBannerRightLinkProps, ConsentBannerRights, type ConsentBannerRightsProps, ConsentBannerTitle, CustomizeButton, Description, DismissButton, Footer, FooterSubGroup, Header, RejectButton, RightLink, Rights, Title, } from './components';
|
|
120
|
-
export { type ConsentBannerSurface, useConsentBannerSurface, } from './surface-context';
|
|
121
|
-
export { useBannerCopy } from './use-banner-copy';
|
|
122
|
-
export { type ConsentBannerPolicyActionRenderProps, ConsentBannerPolicyActions, type ConsentBannerPolicyActionsProps, PolicyActions, } from './policy-actions';
|
|
117
|
+
export { ConsentBannerOverlay, Overlay } from './atoms/overlay.js';
|
|
118
|
+
export { ConsentBannerRoot, Root } from './atoms/root.js';
|
|
119
|
+
export { AcceptButton, Card, ConsentBannerAcceptButton, ConsentBannerCard, ConsentBannerCustomizeButton, ConsentBannerDescription, ConsentBannerDismissButton, ConsentBannerFooter, ConsentBannerFooterSubGroup, ConsentBannerHeader, ConsentBannerRejectButton, type ConsentBannerRight, ConsentBannerRightLink, type ConsentBannerRightLinkProps, ConsentBannerRights, type ConsentBannerRightsProps, ConsentBannerTitle, CustomizeButton, Description, DismissButton, Footer, FooterSubGroup, Header, RejectButton, RightLink, Rights, Title, } from './components.js';
|
|
120
|
+
export { type ConsentBannerSurface, useConsentBannerSurface, } from './surface-context.js';
|
|
121
|
+
export { useBannerCopy } from './use-banner-copy.js';
|
|
122
|
+
export { type ConsentBannerPolicyActionRenderProps, ConsentBannerPolicyActions, type ConsentBannerPolicyActionsProps, PolicyActions, } from './policy-actions.js';
|
|
123
123
|
export { ConsentBanner, type ConsentBannerButton, type ConsentBannerLayout, type ConsentBannerProps, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { HeadlessConsentBannerAction } from '../../component-hooks/use-headless-consent-ui';
|
|
3
|
-
import type { PolicyActionRenderProps } from '../shared/policy-actions';
|
|
2
|
+
import type { HeadlessConsentBannerAction } from '../../component-hooks/use-headless-consent-ui.js';
|
|
3
|
+
import type { PolicyActionRenderProps } from '../shared/policy-actions.js';
|
|
4
4
|
export type ConsentBannerPolicyActionRenderProps = PolicyActionRenderProps<HeadlessConsentBannerAction>;
|
|
5
5
|
export interface ConsentBannerPolicyActionsProps {
|
|
6
6
|
/** Replaces the default preferences buttons before the policy actions. */
|
|
@@ -2,7 +2,7 @@ import type * as C15tCoreTypes from '@c15t/core';
|
|
|
2
2
|
import type { PromptPosition, PromptVariant } from '@c15t/core';
|
|
3
3
|
import type { SurfacePresentation } from '@c15t/ui/utils';
|
|
4
4
|
import type { FC, ReactNode } from 'react';
|
|
5
|
-
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links';
|
|
5
|
+
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Identifiers for the available buttons in the consent banner.
|
|
8
8
|
* @public
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType, ReactNode } from 'react';
|
|
2
|
-
import type { HeadlessConsentSurfaceState } from '../../component-hooks/use-headless-consent-ui';
|
|
3
|
-
import type { CSSPropertiesWithVars, CSSVariables } from '../../types/theme';
|
|
2
|
+
import type { HeadlessConsentSurfaceState } from '../../component-hooks/use-headless-consent-ui.js';
|
|
3
|
+
import type { CSSPropertiesWithVars, CSSVariables } from '../../types/theme/index.js';
|
|
4
4
|
export interface PolicyActionRenderProps<TAction extends string> {
|
|
5
5
|
key: string;
|
|
6
6
|
consentAction: TAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ConsentComponentSlotKey } from '@c15t/schema/config';
|
|
2
2
|
import type { HTMLAttributes } from 'react';
|
|
3
|
-
import type { ExtendThemeKeys } from '../../../types/theme';
|
|
3
|
+
import type { ExtendThemeKeys } from '../../../types/theme/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the description text component of the CookieBanner.
|
|
6
6
|
* Extends standard HTML div attributes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AllConsentNames } from '@c15t/core';
|
|
2
|
-
import type { ButtonVariantsProps } from '../ui/button/button';
|
|
3
|
-
import type { ConsentButtonProps } from './button.types';
|
|
2
|
+
import type { ButtonVariantsProps } from '../ui/button/button.js';
|
|
3
|
+
import type { ConsentButtonProps } from './button.types.js';
|
|
4
4
|
type ConsentActionThemeKey = 'accept' | 'reject' | 'customize' | 'dismiss' | 'save';
|
|
5
5
|
/**
|
|
6
6
|
* Button component that allows users to reject non-essential cookies.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ConsentComponentSlotKey } from '@c15t/schema/config';
|
|
2
2
|
import type { ButtonMode } from '@c15t/ui/styles/primitives';
|
|
3
3
|
import type { ComponentRef, HTMLAttributes, MouseEvent } from 'react';
|
|
4
|
-
import type { CSSVariables, ExtendThemeKeys } from '../../../types/theme';
|
|
4
|
+
import type { CSSVariables, ExtendThemeKeys } from '../../../types/theme/index.js';
|
|
5
5
|
export type ConsentButtonElement = ComponentRef<'button'>;
|
|
6
6
|
/**
|
|
7
7
|
* Props for CookieBanner button components.
|