@c15t/react 1.8.3 → 2.0.0-rc.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/README.md +2 -2
- package/dist/components/__tests__/active-ui-transitions.e2e.test.cjs +1 -0
- package/dist/components/__tests__/active-ui-transitions.e2e.test.js +1 -0
- package/dist/components/__tests__/consent-flow.e2e.test.cjs +1 -0
- package/dist/components/__tests__/consent-flow.e2e.test.js +1 -0
- package/dist/components/__tests__/models-prop.e2e.test.cjs +1 -0
- package/dist/components/__tests__/models-prop.e2e.test.js +1 -0
- package/dist/components/__tests__/ui-source-tracking.e2e.test.cjs +1 -0
- package/dist/components/__tests__/ui-source-tracking.e2e.test.js +1 -0
- package/dist/components/consent-banner/atoms/overlay.cjs +1 -0
- package/dist/components/{cookie-banner → consent-banner}/atoms/overlay.d.ts +7 -7
- package/dist/components/consent-banner/atoms/overlay.d.ts.map +1 -0
- package/dist/components/consent-banner/atoms/overlay.js +1 -0
- package/dist/components/consent-banner/atoms/root.cjs +1 -0
- package/dist/components/{cookie-banner → consent-banner}/atoms/root.d.ts +29 -26
- package/dist/components/consent-banner/atoms/root.d.ts.map +1 -0
- package/dist/components/consent-banner/atoms/root.js +1 -0
- package/dist/components/consent-banner/components.cjs +1 -0
- package/dist/components/{cookie-banner → consent-banner}/components.d.ts +38 -38
- package/dist/components/consent-banner/components.d.ts.map +1 -0
- package/dist/components/consent-banner/components.js +1 -0
- package/dist/components/consent-banner/consent-banner.cjs +1 -0
- package/dist/components/{cookie-banner/cookie-banner.d.ts → consent-banner/consent-banner.d.ts} +51 -24
- package/dist/components/consent-banner/consent-banner.d.ts.map +1 -0
- package/dist/components/consent-banner/consent-banner.js +1 -0
- package/dist/components/consent-banner/error-boundary.cjs +1 -0
- package/dist/components/consent-banner/error-boundary.d.ts.map +1 -0
- package/dist/components/{cookie-banner → consent-banner}/error-boundary.js +0 -1
- package/dist/components/consent-banner/index.cjs +1 -0
- package/dist/components/consent-banner/index.d.ts +93 -0
- package/dist/components/consent-banner/index.d.ts.map +1 -0
- package/dist/components/consent-banner/index.js +1 -0
- package/dist/components/consent-dialog/atoms/card.cjs +1 -0
- package/dist/components/{consent-manager-dialog/atoms/dialog-card.d.ts → consent-dialog/atoms/card.d.ts} +40 -38
- package/dist/components/consent-dialog/atoms/card.d.ts.map +1 -0
- package/dist/components/consent-dialog/atoms/card.js +1 -0
- package/dist/components/consent-dialog/atoms/overlay.cjs +1 -0
- package/dist/components/{consent-manager-dialog → consent-dialog}/atoms/overlay.d.ts +4 -4
- package/dist/components/consent-dialog/atoms/overlay.d.ts.map +1 -0
- package/dist/components/consent-dialog/atoms/overlay.js +1 -0
- package/dist/components/consent-dialog/atoms/root.cjs +1 -0
- package/dist/components/{consent-manager-dialog → consent-dialog}/atoms/root.d.ts +23 -15
- package/dist/components/consent-dialog/atoms/root.d.ts.map +1 -0
- package/dist/components/consent-dialog/atoms/root.js +1 -0
- package/dist/components/consent-dialog/consent-dialog.cjs +1 -0
- package/dist/components/consent-dialog/consent-dialog.d.ts +96 -0
- package/dist/components/consent-dialog/consent-dialog.d.ts.map +1 -0
- package/dist/components/consent-dialog/consent-dialog.js +1 -0
- package/dist/components/consent-dialog/index.cjs +1 -0
- package/dist/components/consent-dialog/index.d.ts +78 -0
- package/dist/components/consent-dialog/index.d.ts.map +1 -0
- package/dist/components/consent-dialog/index.js +1 -0
- package/dist/components/consent-dialog-trigger/atoms/button.cjs +1 -0
- package/dist/components/consent-dialog-trigger/atoms/button.d.ts +40 -0
- package/dist/components/consent-dialog-trigger/atoms/button.d.ts.map +1 -0
- package/dist/components/consent-dialog-trigger/atoms/button.js +1 -0
- package/dist/components/consent-dialog-trigger/atoms/icon.cjs +1 -0
- package/dist/components/consent-dialog-trigger/atoms/icon.d.ts +46 -0
- package/dist/components/consent-dialog-trigger/atoms/icon.d.ts.map +1 -0
- package/dist/components/consent-dialog-trigger/atoms/icon.js +1 -0
- package/dist/components/consent-dialog-trigger/atoms/root.cjs +1 -0
- package/dist/components/consent-dialog-trigger/atoms/root.d.ts +85 -0
- package/dist/components/consent-dialog-trigger/atoms/root.d.ts.map +1 -0
- package/dist/components/consent-dialog-trigger/atoms/root.js +1 -0
- package/dist/components/consent-dialog-trigger/atoms/text.cjs +1 -0
- package/dist/components/consent-dialog-trigger/atoms/text.d.ts +32 -0
- package/dist/components/consent-dialog-trigger/atoms/text.d.ts.map +1 -0
- package/dist/components/consent-dialog-trigger/atoms/text.js +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.d.ts +53 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.d.ts.map +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.js +1 -0
- package/dist/components/consent-dialog-trigger/index.cjs +1 -0
- package/dist/components/consent-dialog-trigger/index.d.ts +9 -0
- package/dist/components/consent-dialog-trigger/index.d.ts.map +1 -0
- package/dist/components/consent-dialog-trigger/index.js +1 -0
- package/dist/components/{consent-manager-widget → consent-dialog-trigger}/types.cjs +1 -1
- package/dist/components/consent-dialog-trigger/types.d.ts +93 -0
- package/dist/components/consent-dialog-trigger/types.d.ts.map +1 -0
- package/dist/components/consent-dialog-trigger/use-draggable.cjs +1 -0
- package/dist/components/consent-dialog-trigger/use-draggable.d.ts +77 -0
- package/dist/components/consent-dialog-trigger/use-draggable.d.ts.map +1 -0
- package/dist/components/consent-dialog-trigger/use-draggable.js +1 -0
- package/dist/components/consent-widget/atoms/accordion.cjs +1 -0
- package/dist/components/consent-widget/atoms/accordion.d.ts +46 -0
- package/dist/components/consent-widget/atoms/accordion.d.ts.map +1 -0
- package/dist/components/consent-widget/atoms/accordion.js +1 -0
- package/dist/components/consent-widget/atoms/button.cjs +1 -0
- package/dist/components/{consent-manager-widget → consent-widget}/atoms/button.d.ts +5 -5
- package/dist/components/consent-widget/atoms/button.d.ts.map +1 -0
- package/dist/components/consent-widget/atoms/button.js +1 -0
- package/dist/components/consent-widget/atoms/footer.cjs +1 -0
- package/dist/components/{consent-manager-widget → consent-widget}/atoms/footer.d.ts +2 -2
- package/dist/components/consent-widget/atoms/footer.d.ts.map +1 -0
- package/dist/components/consent-widget/atoms/footer.js +1 -0
- package/dist/components/consent-widget/atoms/root.cjs +1 -0
- package/dist/components/{consent-manager-widget → consent-widget}/atoms/root.d.ts +19 -15
- package/dist/components/consent-widget/atoms/root.d.ts.map +1 -0
- package/dist/components/consent-widget/atoms/root.js +1 -0
- package/dist/components/consent-widget/consent-widget.cjs +1 -0
- package/dist/components/consent-widget/consent-widget.d.ts +3 -0
- package/dist/components/consent-widget/consent-widget.d.ts.map +1 -0
- package/dist/components/consent-widget/consent-widget.js +1 -0
- package/dist/components/consent-widget/index.cjs +1 -0
- package/dist/components/{consent-manager-widget → consent-widget}/index.d.ts +20 -26
- package/dist/components/consent-widget/index.d.ts.map +1 -0
- package/dist/components/consent-widget/index.js +1 -0
- package/dist/components/{consent-manager-dialog/theme.cjs → consent-widget/types.cjs} +1 -1
- package/dist/components/{consent-manager-widget → consent-widget}/types.d.ts +28 -9
- package/dist/components/consent-widget/types.d.ts.map +1 -0
- package/dist/components/frame/atoms.cjs +1 -1
- package/dist/components/frame/atoms.d.ts +3 -1
- package/dist/components/frame/atoms.d.ts.map +1 -1
- package/dist/components/frame/atoms.js +1 -1
- package/dist/components/frame/frame.cjs +1 -2
- package/dist/components/frame/frame.d.ts.map +1 -1
- package/dist/components/frame/frame.js +1 -2
- package/dist/components/frame/index.cjs +1 -2
- package/dist/components/frame/index.d.ts.map +1 -1
- package/dist/components/frame/index.js +0 -1
- package/dist/components/frame/types.cjs +1 -1
- package/dist/components/frame/types.d.ts +1 -3
- package/dist/components/frame/types.d.ts.map +1 -1
- package/dist/components/iab/__tests__/e2e-setup.cjs +1 -0
- package/dist/components/iab/__tests__/e2e-setup.js +1 -0
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.cjs +1 -0
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.d.ts +212 -0
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.d.ts.map +1 -0
- package/dist/components/iab/__tests__/fixtures/mock-consent-state.js +1 -0
- package/dist/components/iab/__tests__/iab-banner.e2e.test.cjs +1 -0
- package/dist/components/iab/__tests__/iab-banner.e2e.test.js +1 -0
- package/dist/components/iab/__tests__/iab-consent-flow.e2e.test.cjs +1 -0
- package/dist/components/iab/__tests__/iab-consent-flow.e2e.test.js +1 -0
- package/dist/components/iab/__tests__/iab-events.e2e.test.cjs +1 -0
- package/dist/components/iab/__tests__/iab-events.e2e.test.js +1 -0
- package/dist/components/iab/__tests__/iab-gvl.e2e.test.cjs +1 -0
- package/dist/components/iab/__tests__/iab-gvl.e2e.test.js +1 -0
- package/dist/components/iab/__tests__/iab-preference-center.e2e.test.cjs +1 -0
- package/dist/components/iab/__tests__/iab-preference-center.e2e.test.js +1 -0
- package/dist/components/iab/__tests__/iab-storage.e2e.test.cjs +1 -0
- package/dist/components/iab/__tests__/iab-storage.e2e.test.js +1 -0
- package/dist/components/iab/__tests__/iab-stub.e2e.test.cjs +1 -0
- package/dist/components/iab/__tests__/iab-stub.e2e.test.js +1 -0
- package/dist/components/iab/__tests__/iab-tcfapi.e2e.test.cjs +1 -0
- package/dist/components/iab/__tests__/iab-tcfapi.e2e.test.js +1 -0
- package/dist/components/iab/__tests__/msw-handlers.cjs +1 -0
- package/dist/components/iab/__tests__/msw-handlers.js +1 -0
- package/dist/components/iab-consent-banner/__tests__/iab-consent-banner.test.cjs +1 -0
- package/dist/components/iab-consent-banner/__tests__/iab-consent-banner.test.js +1 -0
- package/dist/components/iab-consent-banner/atoms/button-group.cjs +1 -0
- package/dist/components/iab-consent-banner/atoms/button-group.d.ts +21 -0
- package/dist/components/iab-consent-banner/atoms/button-group.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/atoms/button-group.js +1 -0
- package/dist/components/iab-consent-banner/atoms/card.cjs +1 -0
- package/dist/components/iab-consent-banner/atoms/card.d.ts +15 -0
- package/dist/components/iab-consent-banner/atoms/card.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/atoms/card.js +1 -0
- package/dist/components/iab-consent-banner/atoms/description.cjs +1 -0
- package/dist/components/iab-consent-banner/atoms/description.d.ts +12 -0
- package/dist/components/iab-consent-banner/atoms/description.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/atoms/description.js +1 -0
- package/dist/components/iab-consent-banner/atoms/footer.cjs +1 -0
- package/dist/components/iab-consent-banner/atoms/footer.d.ts +15 -0
- package/dist/components/iab-consent-banner/atoms/footer.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/atoms/footer.js +1 -0
- package/dist/components/iab-consent-banner/atoms/header.cjs +1 -0
- package/dist/components/iab-consent-banner/atoms/header.d.ts +15 -0
- package/dist/components/iab-consent-banner/atoms/header.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/atoms/header.js +1 -0
- package/dist/components/iab-consent-banner/atoms/overlay.cjs +1 -0
- package/dist/components/iab-consent-banner/atoms/overlay.d.ts +7 -0
- package/dist/components/iab-consent-banner/atoms/overlay.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/atoms/overlay.js +1 -0
- package/dist/components/iab-consent-banner/atoms/root.cjs +1 -0
- package/dist/components/iab-consent-banner/atoms/root.d.ts +21 -0
- package/dist/components/iab-consent-banner/atoms/root.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/atoms/root.js +1 -0
- package/dist/components/iab-consent-banner/atoms/title.cjs +1 -0
- package/dist/components/iab-consent-banner/atoms/title.d.ts +12 -0
- package/dist/components/iab-consent-banner/atoms/title.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/atoms/title.js +1 -0
- package/dist/components/iab-consent-banner/iab-consent-banner.cjs +1 -0
- package/dist/components/iab-consent-banner/iab-consent-banner.d.ts +65 -0
- package/dist/components/iab-consent-banner/iab-consent-banner.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/iab-consent-banner.js +1 -0
- package/dist/components/iab-consent-banner/index.cjs +1 -0
- package/dist/components/iab-consent-banner/index.d.ts +88 -0
- package/dist/components/iab-consent-banner/index.d.ts.map +1 -0
- package/dist/components/iab-consent-banner/index.js +1 -0
- package/dist/components/iab-consent-dialog/__tests__/legitimate-interest-ui.test.cjs +1 -0
- package/dist/components/iab-consent-dialog/__tests__/legitimate-interest-ui.test.js +1 -0
- package/dist/components/iab-consent-dialog/__tests__/preference-center.test.cjs +1 -0
- package/dist/components/iab-consent-dialog/__tests__/preference-center.test.js +1 -0
- package/dist/components/iab-consent-dialog/__tests__/purposes-tab.test.cjs +1 -0
- package/dist/components/iab-consent-dialog/__tests__/purposes-tab.test.js +1 -0
- package/dist/components/iab-consent-dialog/__tests__/vendors-tab.test.cjs +1 -0
- package/dist/components/iab-consent-dialog/__tests__/vendors-tab.test.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/card.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/card.d.ts +15 -0
- package/dist/components/iab-consent-dialog/atoms/card.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/card.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/content.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/content.d.ts +15 -0
- package/dist/components/iab-consent-dialog/atoms/content.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/content.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/footer.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/footer.d.ts +15 -0
- package/dist/components/iab-consent-dialog/atoms/footer.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/footer.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/header.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/header.d.ts +32 -0
- package/dist/components/iab-consent-dialog/atoms/header.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/header.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/overlay.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/overlay.d.ts +8 -0
- package/dist/components/iab-consent-dialog/atoms/overlay.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/overlay.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/purpose-item.d.ts +22 -0
- package/dist/components/iab-consent-dialog/atoms/purpose-item.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/purpose-item.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/root.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/root.d.ts +33 -0
- package/dist/components/iab-consent-dialog/atoms/root.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/root.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/stack-item.d.ts +21 -0
- package/dist/components/iab-consent-dialog/atoms/stack-item.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/stack-item.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/tabs.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/tabs.d.ts +40 -0
- package/dist/components/iab-consent-dialog/atoms/tabs.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/tabs.js +1 -0
- package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +1 -0
- package/dist/components/iab-consent-dialog/atoms/vendor-list.d.ts +33 -0
- package/dist/components/iab-consent-dialog/atoms/vendor-list.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/atoms/vendor-list.js +1 -0
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +1 -0
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.d.ts +28 -0
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.js +1 -0
- package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +1 -0
- package/dist/components/iab-consent-dialog/iab-consent-dialog.d.ts +73 -0
- package/dist/components/iab-consent-dialog/iab-consent-dialog.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/iab-consent-dialog.js +1 -0
- package/dist/components/iab-consent-dialog/index.cjs +1 -0
- package/dist/components/iab-consent-dialog/index.d.ts +92 -0
- package/dist/components/iab-consent-dialog/index.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/index.js +1 -0
- package/dist/components/{consent-manager-widget/theme.cjs → iab-consent-dialog/types.cjs} +1 -1
- package/dist/components/iab-consent-dialog/types.d.ts +73 -0
- package/dist/components/iab-consent-dialog/types.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/use-iab-translations.cjs +1 -0
- package/dist/components/iab-consent-dialog/use-iab-translations.d.ts +84 -0
- package/dist/components/iab-consent-dialog/use-iab-translations.d.ts.map +1 -0
- package/dist/components/iab-consent-dialog/use-iab-translations.js +1 -0
- package/dist/components/shared/libs/polymorphic.cjs +1 -1
- package/dist/components/shared/libs/recursive-clone-children.cjs +1 -1
- package/dist/components/shared/primitives/box.cjs +1 -2
- package/dist/components/shared/primitives/box.d.ts.map +1 -1
- package/dist/components/shared/primitives/box.js +1 -2
- package/dist/components/shared/primitives/button.cjs +1 -1
- package/dist/components/shared/primitives/button.d.ts +2 -2
- package/dist/components/shared/primitives/button.d.ts.map +1 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/components/shared/primitives/button.types.cjs +1 -1
- package/dist/components/shared/primitives/button.types.d.ts +6 -0
- package/dist/components/shared/primitives/button.types.d.ts.map +1 -1
- package/dist/components/shared/primitives/legal-links/index.cjs +1 -1
- package/dist/components/shared/primitives/legal-links/index.d.ts +2 -2
- package/dist/components/shared/primitives/legal-links/index.d.ts.map +1 -1
- package/dist/components/shared/primitives/legal-links/index.js +1 -1
- package/dist/components/shared/ui/__tests__/primitives.test.cjs +1 -0
- package/dist/components/shared/ui/__tests__/primitives.test.js +1 -0
- package/dist/components/shared/ui/accordion/accordion.cjs +1 -2
- package/dist/components/shared/ui/accordion/accordion.d.ts +82 -16
- package/dist/components/shared/ui/accordion/accordion.d.ts.map +1 -1
- package/dist/components/shared/ui/accordion/accordion.js +1 -2
- package/dist/components/shared/ui/accordion/accordion.types.cjs +1 -1
- package/dist/components/shared/ui/accordion/accordion.types.d.ts +3 -61
- package/dist/components/shared/ui/accordion/accordion.types.d.ts.map +1 -1
- package/dist/components/shared/ui/accordion/index.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +1 -0
- package/dist/components/shared/ui/animated-collapse/animated-collapse.d.ts +54 -0
- package/dist/components/shared/ui/animated-collapse/animated-collapse.d.ts.map +1 -0
- package/dist/components/shared/ui/animated-collapse/animated-collapse.js +1 -0
- package/dist/components/shared/ui/animated-collapse/index.cjs +1 -0
- package/dist/components/shared/ui/animated-collapse/index.d.ts +3 -0
- package/dist/components/shared/ui/animated-collapse/index.d.ts.map +1 -0
- package/dist/components/shared/ui/animated-collapse/index.js +1 -0
- package/dist/components/shared/ui/button/button.cjs +1 -1
- package/dist/components/shared/ui/button/button.d.ts +3 -25
- package/dist/components/shared/ui/button/button.d.ts.map +1 -1
- package/dist/components/shared/ui/button/button.js +1 -1
- package/dist/components/shared/ui/button/button.types.cjs +1 -1
- package/dist/components/shared/ui/button/index.cjs +1 -1
- package/dist/components/shared/ui/icon.cjs +1 -1
- package/dist/components/shared/ui/logo.cjs +1 -1
- package/dist/components/shared/ui/logo.d.ts +27 -3
- package/dist/components/shared/ui/logo.d.ts.map +1 -1
- package/dist/components/shared/ui/logo.js +1 -1
- package/dist/components/shared/ui/switch/index.cjs +1 -1
- package/dist/components/shared/ui/switch/switch.cjs +1 -1
- package/dist/components/shared/ui/switch/switch.d.ts +30 -9
- package/dist/components/shared/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/shared/ui/switch/switch.js +1 -1
- package/dist/components/shared/ui/switch/switch.types.cjs +1 -1
- package/dist/components/shared/ui/switch/switch.types.d.ts +3 -31
- package/dist/components/shared/ui/switch/switch.types.d.ts.map +1 -1
- package/dist/context/consent-manager-context.cjs +1 -2
- package/dist/context/consent-manager-context.d.ts +5 -5
- package/dist/context/consent-manager-context.d.ts.map +1 -1
- package/dist/context/consent-manager-context.js +0 -1
- package/dist/context/consent-tracking-context.cjs +1 -0
- package/dist/context/consent-tracking-context.d.ts +33 -0
- package/dist/context/consent-tracking-context.d.ts.map +1 -0
- package/dist/context/consent-tracking-context.js +1 -0
- package/dist/context/theme-context.cjs +1 -2
- package/dist/context/theme-context.d.ts +14 -47
- package/dist/context/theme-context.d.ts.map +1 -1
- package/dist/context/theme-context.js +1 -2
- package/dist/headless.cjs +1 -1
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-handles-default-theme-based-on-document-class-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-responds-to-system-preference-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-sets-dark-theme-correctly-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-default-theme-changes-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-color-scheme.test.tsx/useColorScheme-updates-theme-when-system-preference-changes-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-consent-manager.test.tsx/useConsentManager-provides-manager-object-when-configured-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-handles-string-className-correctly-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-merges-theme-and-component-styles-correctly-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-styles.test.tsx/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-theme.test.tsx/useTheme-local-theme-takes-precedence-over-global-theme-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-theme.test.tsx/useTheme-local-theme-takes-precedence-over-global-theme-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-merges-custom-translations-with-defaults-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-merges-custom-translations-with-defaults-1.js +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-returns-English-translations-by-default-1.cjs +1 -0
- package/dist/hooks/__tests__/__screenshots__/use-translations.test.tsx/useTranslations-returns-English-translations-by-default-1.js +1 -0
- package/dist/hooks/__tests__/use-color-scheme.test.cjs +1 -1
- package/dist/hooks/__tests__/use-color-scheme.test.js +1 -1
- package/dist/hooks/__tests__/use-consent-manager.test.cjs +1 -1
- package/dist/hooks/__tests__/use-consent-manager.test.js +1 -1
- package/dist/hooks/__tests__/use-focus-trap.test.cjs +1 -0
- package/dist/hooks/__tests__/use-focus-trap.test.js +1 -0
- package/dist/hooks/__tests__/use-scroll-lock.test.cjs +1 -0
- package/dist/hooks/__tests__/use-scroll-lock.test.js +1 -0
- package/dist/hooks/__tests__/use-styles.test.cjs +1 -1
- package/dist/hooks/__tests__/use-styles.test.js +1 -1
- package/dist/hooks/__tests__/use-theme.test.cjs +1 -1
- package/dist/hooks/__tests__/use-theme.test.js +1 -1
- package/dist/hooks/__tests__/use-translations.test.cjs +1 -1
- package/dist/hooks/__tests__/use-translations.test.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-color-scheme.cjs +1 -2
- package/dist/hooks/use-color-scheme.d.ts +2 -11
- package/dist/hooks/use-color-scheme.d.ts.map +1 -1
- package/dist/hooks/use-color-scheme.js +1 -2
- package/dist/hooks/use-component-config.cjs +1 -0
- package/dist/hooks/use-component-config.d.ts +55 -0
- package/dist/hooks/use-component-config.d.ts.map +1 -0
- package/dist/hooks/use-component-config.js +1 -0
- package/dist/hooks/use-consent-manager.cjs +1 -1
- package/dist/hooks/use-consent-manager.d.ts +3 -79
- package/dist/hooks/use-consent-manager.d.ts.map +1 -1
- package/dist/hooks/use-consent-manager.js +1 -1
- package/dist/hooks/use-focus-trap.cjs +1 -2
- package/dist/hooks/use-focus-trap.d.ts +1 -1
- package/dist/hooks/use-focus-trap.d.ts.map +1 -1
- package/dist/hooks/use-focus-trap.js +1 -2
- package/dist/hooks/use-reduced-motion.cjs +1 -0
- package/dist/hooks/use-reduced-motion.d.ts +31 -0
- package/dist/hooks/use-reduced-motion.d.ts.map +1 -0
- package/dist/hooks/use-reduced-motion.js +1 -0
- package/dist/hooks/use-scroll-lock.cjs +1 -2
- package/dist/hooks/use-scroll-lock.d.ts +1 -17
- package/dist/hooks/use-scroll-lock.d.ts.map +1 -1
- package/dist/hooks/use-scroll-lock.js +1 -2
- package/dist/hooks/use-ssr-status.cjs +1 -0
- package/dist/hooks/use-ssr-status.d.ts +57 -0
- package/dist/hooks/use-ssr-status.d.ts.map +1 -0
- package/dist/hooks/use-ssr-status.js +1 -0
- package/dist/hooks/use-styles.cjs +1 -2
- package/dist/hooks/use-styles.d.ts +10 -19
- package/dist/hooks/use-styles.d.ts.map +1 -1
- package/dist/hooks/use-styles.js +1 -2
- package/dist/hooks/use-text-direction.cjs +1 -2
- package/dist/hooks/use-text-direction.d.ts +2 -2
- package/dist/hooks/use-text-direction.d.ts.map +1 -1
- package/dist/hooks/use-text-direction.js +1 -2
- package/dist/hooks/use-theme.cjs +1 -2
- package/dist/hooks/use-theme.d.ts +1 -1
- package/dist/hooks/use-theme.d.ts.map +1 -1
- package/dist/hooks/use-theme.js +0 -1
- package/dist/hooks/use-translations.cjs +1 -2
- package/dist/hooks/use-translations.d.ts.map +1 -1
- package/dist/hooks/use-translations.js +1 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/mockServiceWorker.js +349 -0
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.cjs +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.js +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-not-make-additional-requests-when-props-change-but-core-options-remain-same-1.cjs +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-not-make-additional-requests-when-props-change-but-core-options-remain-same-1.js +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.cjs +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-basic.test.tsx/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.js +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.cjs +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.js +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.cjs +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.js +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.cjs +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.js +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.cjs +1 -0
- package/dist/providers/__tests__/__screenshots__/provider-hydration.test.tsx/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.js +1 -0
- package/dist/providers/__tests__/provider-basic.test.cjs +1 -1
- package/dist/providers/__tests__/provider-basic.test.js +1 -1
- package/dist/providers/__tests__/provider-context.test.cjs +1 -1
- package/dist/providers/__tests__/provider-context.test.js +1 -1
- package/dist/providers/__tests__/provider-errors.test.cjs +1 -1
- package/dist/providers/__tests__/provider-errors.test.js +1 -1
- package/dist/providers/__tests__/provider-hydration.test.cjs +1 -1
- package/dist/providers/__tests__/provider-hydration.test.js +1 -1
- package/dist/providers/__tests__/test-helpers.cjs +1 -1
- package/dist/providers/__tests__/test-helpers.js +1 -1
- package/dist/providers/consent-manager-provider.cjs +1 -2
- package/dist/providers/consent-manager-provider.d.ts +1 -1
- package/dist/providers/consent-manager-provider.d.ts.map +1 -1
- package/dist/providers/consent-manager-provider.js +1 -2
- package/dist/server/fetch-ssr-data.cjs +1 -0
- package/dist/server/fetch-ssr-data.d.ts +43 -0
- package/dist/server/fetch-ssr-data.d.ts.map +1 -0
- package/dist/server/fetch-ssr-data.js +1 -0
- package/dist/server/headers.cjs +1 -0
- package/dist/server/headers.d.ts +32 -0
- package/dist/server/headers.d.ts.map +1 -0
- package/dist/server/headers.js +1 -0
- package/dist/server/headers.test.cjs +1 -0
- package/dist/server/headers.test.d.ts +2 -0
- package/dist/server/headers.test.d.ts.map +1 -0
- package/dist/server/headers.test.js +1 -0
- package/dist/server/index.cjs +1 -0
- package/dist/server/index.d.ts +31 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +1 -0
- package/dist/server/normalize-url.cjs +1 -0
- package/dist/server/normalize-url.d.ts +52 -0
- package/dist/server/normalize-url.d.ts.map +1 -0
- package/dist/server/normalize-url.js +1 -0
- package/dist/server/normalize-url.test.cjs +1 -0
- package/dist/server/normalize-url.test.d.ts +2 -0
- package/dist/server/normalize-url.test.d.ts.map +1 -0
- package/dist/server/normalize-url.test.js +1 -0
- package/dist/{components/cookie-banner/theme.cjs → server/types.cjs} +1 -1
- package/dist/server/types.d.ts +51 -0
- package/dist/server/types.d.ts.map +1 -0
- package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-make-a-new-request-when-core-options-change-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-not-make-additional-requests-when-props-change-but-core-options-remain-same-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Basic-Request-Behavior-should-only-make-one-initial-request-for-consent-banner-status-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-handle-rapid-re-renders-without-blocking-children-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-not-block-SSR-provider-content-when-SSR-provider-wraps-ConsentManager-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-render-children-immediately-without-blocking-during-hydration-1.png +0 -0
- package/dist/static/image/ConsentManagerProvider-Hydration-Behavior-should-use-startTransition-for-non-blocking-state-updates-during-hydration-1.png +0 -0
- package/dist/static/image/useColorScheme-cleans-up-system-preference-listener-on-unmount-1.png +0 -0
- package/dist/static/image/useColorScheme-handles-default-theme-based-on-document-class-1.png +0 -0
- package/dist/static/image/useColorScheme-responds-to-system-preference-1.png +0 -0
- package/dist/static/image/useColorScheme-sets-dark-theme-correctly-1.png +0 -0
- package/dist/static/image/useColorScheme-updates-theme-when-default-theme-changes-1.png +0 -0
- package/dist/static/image/useColorScheme-updates-theme-when-system-preference-changes-1.png +0 -0
- package/dist/static/image/useConsentManager-provides-manager-object-when-configured-1.png +0 -0
- package/dist/static/image/useStyles-handles-string-className-correctly-1.png +0 -0
- package/dist/static/image/useStyles-merges-theme-and-component-styles-correctly-1.png +0 -0
- package/dist/static/image/useStyles-should-remove-base-default-styles-but-keep-theme-and-component-classNames-when-noStyle--true-1.png +0 -0
- package/dist/static/image/useStyles-should-remove-default-styles-but-keep-custom-classNames-when-theme-object-provides-noStyle--true-1.png +0 -0
- package/dist/static/image/useTheme-local-theme-takes-precedence-over-global-theme-1.png +0 -0
- package/dist/static/image/useTranslations-Custom-English-instead-of-English-when-German-is-selected-1.png +0 -0
- package/dist/static/image/useTranslations-falls-back-to-English-when-selected-language-is-not-available-1.png +0 -0
- package/dist/static/image/useTranslations-merges-custom-translations-with-defaults-1.png +0 -0
- package/dist/static/image/useTranslations-returns-English-translations-by-default-1.png +0 -0
- package/dist/test-setup.browser.cjs +1 -0
- package/dist/test-setup.browser.d.ts +8 -0
- package/dist/test-setup.browser.d.ts.map +1 -0
- package/dist/test-setup.browser.js +1 -0
- package/dist/types/consent-manager.cjs +1 -1
- package/dist/types/consent-manager.d.ts +9 -136
- package/dist/types/consent-manager.d.ts.map +1 -1
- package/dist/types/theme/index.cjs +1 -1
- package/dist/types/theme/style-keys.cjs +1 -1
- package/dist/types/theme/style-keys.d.ts +1 -14
- package/dist/types/theme/style-keys.d.ts.map +1 -1
- package/dist/types/theme/style-types.cjs +1 -1
- package/dist/types/theme/style-types.d.ts +29 -19
- package/dist/types/theme/style-types.d.ts.map +1 -1
- package/dist/types/theme/style-types.js +1 -0
- package/dist/utils/cn.cjs +1 -1
- package/dist/utils/cn.d.ts +3 -3
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +1 -1
- package/dist/utils/merge-styles.cjs +1 -1
- package/dist/utils/merge-styles.d.ts +2 -1
- package/dist/utils/merge-styles.d.ts.map +1 -1
- package/dist/utils/merge-styles.js +1 -1
- package/dist/utils/test-helpers.cjs +1 -1
- package/dist/utils/test-helpers.d.ts +4 -2
- package/dist/utils/test-helpers.d.ts.map +1 -1
- package/dist/utils/test-helpers.js +1 -1
- package/dist/utils/theme-utils.cjs +1 -0
- package/dist/utils/theme-utils.d.ts +19 -0
- package/dist/utils/theme-utils.d.ts.map +1 -0
- package/dist/utils/theme-utils.js +1 -0
- package/dist/version.cjs +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +130 -119
- package/readme.json +2 -2
- package/LICENSE.md +0 -595
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.cjs +0 -1
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.d.ts +0 -2
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.d.ts.map +0 -1
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.js +0 -1
- package/dist/components/consent-manager-dialog/atoms/dialog-card.cjs +0 -2
- package/dist/components/consent-manager-dialog/atoms/dialog-card.d.ts.map +0 -1
- package/dist/components/consent-manager-dialog/atoms/dialog-card.js +0 -2
- package/dist/components/consent-manager-dialog/atoms/overlay.cjs +0 -1
- package/dist/components/consent-manager-dialog/atoms/overlay.d.ts.map +0 -1
- package/dist/components/consent-manager-dialog/atoms/overlay.js +0 -1
- package/dist/components/consent-manager-dialog/atoms/root.cjs +0 -2
- package/dist/components/consent-manager-dialog/atoms/root.d.ts.map +0 -1
- package/dist/components/consent-manager-dialog/atoms/root.js +0 -2
- package/dist/components/consent-manager-dialog/consent-manager-dialog.cjs +0 -2
- package/dist/components/consent-manager-dialog/consent-manager-dialog.d.ts +0 -52
- package/dist/components/consent-manager-dialog/consent-manager-dialog.d.ts.map +0 -1
- package/dist/components/consent-manager-dialog/consent-manager-dialog.js +0 -2
- package/dist/components/consent-manager-dialog/consent-manager-dialog.module.cjs +0 -1
- package/dist/components/consent-manager-dialog/consent-manager-dialog.module.js +0 -1
- package/dist/components/consent-manager-dialog/index.cjs +0 -2
- package/dist/components/consent-manager-dialog/index.d.ts +0 -79
- package/dist/components/consent-manager-dialog/index.d.ts.map +0 -1
- package/dist/components/consent-manager-dialog/index.js +0 -2
- package/dist/components/consent-manager-dialog/theme.d.ts +0 -20
- package/dist/components/consent-manager-dialog/theme.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/__tests__/styles.spec.cjs +0 -15
- package/dist/components/consent-manager-widget/__tests__/styles.spec.d.ts +0 -2
- package/dist/components/consent-manager-widget/__tests__/styles.spec.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/__tests__/styles.spec.js +0 -15
- package/dist/components/consent-manager-widget/atoms/accordion.cjs +0 -1
- package/dist/components/consent-manager-widget/atoms/accordion.d.ts +0 -57
- package/dist/components/consent-manager-widget/atoms/accordion.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/atoms/accordion.js +0 -1
- package/dist/components/consent-manager-widget/atoms/button.cjs +0 -1
- package/dist/components/consent-manager-widget/atoms/button.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/atoms/button.js +0 -1
- package/dist/components/consent-manager-widget/atoms/footer.cjs +0 -1
- package/dist/components/consent-manager-widget/atoms/footer.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/atoms/footer.js +0 -1
- package/dist/components/consent-manager-widget/atoms/root.cjs +0 -2
- package/dist/components/consent-manager-widget/atoms/root.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/atoms/root.js +0 -2
- package/dist/components/consent-manager-widget/consent-manager-widget.cjs +0 -2
- package/dist/components/consent-manager-widget/consent-manager-widget.d.ts +0 -3
- package/dist/components/consent-manager-widget/consent-manager-widget.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/consent-manager-widget.js +0 -2
- package/dist/components/consent-manager-widget/consent-manager-widget.module.cjs +0 -1
- package/dist/components/consent-manager-widget/consent-manager-widget.module.js +0 -1
- package/dist/components/consent-manager-widget/index.cjs +0 -2
- package/dist/components/consent-manager-widget/index.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/index.js +0 -2
- package/dist/components/consent-manager-widget/theme.d.ts +0 -62
- package/dist/components/consent-manager-widget/theme.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/types.d.ts.map +0 -1
- package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.cjs +0 -1
- package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.d.ts +0 -2
- package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.d.ts.map +0 -1
- package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.js +0 -1
- package/dist/components/cookie-banner/__tests__/styles.spec.cjs +0 -15
- package/dist/components/cookie-banner/__tests__/styles.spec.d.ts +0 -2
- package/dist/components/cookie-banner/__tests__/styles.spec.d.ts.map +0 -1
- package/dist/components/cookie-banner/__tests__/styles.spec.js +0 -15
- package/dist/components/cookie-banner/atoms/overlay.cjs +0 -1
- package/dist/components/cookie-banner/atoms/overlay.d.ts.map +0 -1
- package/dist/components/cookie-banner/atoms/overlay.js +0 -1
- package/dist/components/cookie-banner/atoms/root.cjs +0 -2
- package/dist/components/cookie-banner/atoms/root.d.ts.map +0 -1
- package/dist/components/cookie-banner/atoms/root.js +0 -2
- package/dist/components/cookie-banner/components.cjs +0 -1
- package/dist/components/cookie-banner/components.d.ts.map +0 -1
- package/dist/components/cookie-banner/components.js +0 -1
- package/dist/components/cookie-banner/cookie-banner.cjs +0 -2
- package/dist/components/cookie-banner/cookie-banner.d.ts.map +0 -1
- package/dist/components/cookie-banner/cookie-banner.js +0 -2
- package/dist/components/cookie-banner/cookie-banner.module.cjs +0 -1
- package/dist/components/cookie-banner/cookie-banner.module.js +0 -1
- package/dist/components/cookie-banner/error-boundary.cjs +0 -2
- package/dist/components/cookie-banner/error-boundary.d.ts.map +0 -1
- package/dist/components/cookie-banner/index.cjs +0 -2
- package/dist/components/cookie-banner/index.d.ts +0 -100
- package/dist/components/cookie-banner/index.d.ts.map +0 -1
- package/dist/components/cookie-banner/index.js +0 -2
- package/dist/components/cookie-banner/theme.d.ts +0 -92
- package/dist/components/cookie-banner/theme.d.ts.map +0 -1
- package/dist/components/frame/frame.module.cjs +0 -1
- package/dist/components/frame/frame.module.js +0 -1
- package/dist/components/frame/theme.cjs +0 -1
- package/dist/components/frame/theme.d.ts +0 -41
- package/dist/components/frame/theme.d.ts.map +0 -1
- package/dist/components/frame/theme.js +0 -0
- package/dist/components/shared/primitives/legal-links/legal-links.module.cjs +0 -1
- package/dist/components/shared/primitives/legal-links/legal-links.module.js +0 -1
- package/dist/components/shared/primitives/legal-links/theme.cjs +0 -1
- package/dist/components/shared/primitives/legal-links/theme.d.ts +0 -17
- package/dist/components/shared/primitives/legal-links/theme.d.ts.map +0 -1
- package/dist/components/shared/primitives/legal-links/theme.js +0 -0
- package/dist/components/shared/ui/accordion/accordion.module.cjs +0 -1
- package/dist/components/shared/ui/accordion/accordion.module.js +0 -1
- package/dist/components/shared/ui/button/button.module.cjs +0 -1
- package/dist/components/shared/ui/button/button.module.js +0 -1
- package/dist/components/shared/ui/switch/switch.module.cjs +0 -1
- package/dist/components/shared/ui/switch/switch.module.js +0 -1
- package/dist/hooks/__tests__/use-color-scheme.test.d.ts +0 -2
- package/dist/hooks/__tests__/use-color-scheme.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/use-consent-manager.test.d.ts +0 -2
- package/dist/hooks/__tests__/use-consent-manager.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/use-styles.test.d.ts +0 -2
- package/dist/hooks/__tests__/use-styles.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/use-theme.test.d.ts +0 -2
- package/dist/hooks/__tests__/use-theme.test.d.ts.map +0 -1
- package/dist/hooks/__tests__/use-translations.test.d.ts +0 -2
- package/dist/hooks/__tests__/use-translations.test.d.ts.map +0 -1
- package/dist/providers/__tests__/provider-basic.test.d.ts +0 -2
- package/dist/providers/__tests__/provider-basic.test.d.ts.map +0 -1
- package/dist/providers/__tests__/provider-context.test.d.ts +0 -2
- package/dist/providers/__tests__/provider-context.test.d.ts.map +0 -1
- package/dist/providers/__tests__/provider-errors.test.d.ts +0 -2
- package/dist/providers/__tests__/provider-errors.test.d.ts.map +0 -1
- package/dist/providers/__tests__/provider-hydration.test.d.ts +0 -2
- package/dist/providers/__tests__/provider-hydration.test.d.ts.map +0 -1
- package/dist/providers/__tests__/test-helpers.d.ts +0 -13
- package/dist/providers/__tests__/test-helpers.d.ts.map +0 -1
- /package/dist/components/{cookie-banner → consent-banner}/error-boundary.d.ts +0 -0
- /package/dist/components/{consent-manager-widget → consent-dialog-trigger}/types.js +0 -0
- /package/dist/components/{consent-manager-dialog/theme.js → consent-widget/types.js} +0 -0
- /package/dist/components/{consent-manager-widget/theme.js → iab-consent-dialog/types.js} +0 -0
- /package/dist/{components/cookie-banner/theme.js → server/types.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,n)=>{for(var t in n)__webpack_require__.o(n,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ConsentBanner:()=>ConsentBanner});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_react_namespaceObject=require("react"),use_component_config_cjs_namespaceObject=require("../../hooks/use-component-config.cjs"),use_translations_cjs_namespaceObject=require("../../hooks/use-translations.cjs"),root_cjs_namespaceObject=require("./atoms/root.cjs"),external_components_cjs_namespaceObject=require("./components.cjs"),external_error_boundary_cjs_namespaceObject=require("./error-boundary.cjs"),DEFAULT_LAYOUT=[["reject","accept"],"customize"],ConsentBanner=({noStyle:e,disableAnimation:n,scrollLock:t,trapFocus:r=!0,title:a,description:c,rejectButtonText:s,customizeButtonText:_,acceptButtonText:o,legalLinks:i,layout:p=DEFAULT_LAYOUT,primaryButton:j="customize",models:m,uiSource:u})=>{let{cookieBanner:b}=(0,use_translations_cjs_namespaceObject.useTranslations)(),l=(0,use_component_config_cjs_namespaceObject.useComponentConfig)({noStyle:e,disableAnimation:n,scrollLock:t,trapFocus:r}),x=e=>{let n=Array.isArray(j)?j.includes(e):e===j;switch(e){case"reject":return(0,jsx_runtime_namespaceObject.jsx)(external_components_cjs_namespaceObject.ConsentBannerRejectButton,{variant:n?"primary":"neutral","data-testid":"consent-banner-reject-button",children:s});case"accept":return(0,jsx_runtime_namespaceObject.jsx)(external_components_cjs_namespaceObject.ConsentBannerAcceptButton,{variant:n?"primary":"neutral","data-testid":"consent-banner-accept-button",children:o});case"customize":return(0,jsx_runtime_namespaceObject.jsx)(external_components_cjs_namespaceObject.ConsentBannerCustomizeButton,{variant:n?"primary":"neutral","data-testid":"consent-banner-customize-button",children:_})}};return(0,jsx_runtime_namespaceObject.jsx)(external_error_boundary_cjs_namespaceObject.ErrorBoundary,{fallback:(0,jsx_runtime_namespaceObject.jsx)("div",{children:"Something went wrong with the Consent Banner."}),children:(0,jsx_runtime_namespaceObject.jsx)(root_cjs_namespaceObject.ConsentBannerRoot,{...l,models:m,uiSource:u,children:(0,jsx_runtime_namespaceObject.jsxs)(external_components_cjs_namespaceObject.ConsentBannerCard,{"aria-label":b.title,children:[(0,jsx_runtime_namespaceObject.jsxs)(external_components_cjs_namespaceObject.ConsentBannerHeader,{children:[(0,jsx_runtime_namespaceObject.jsx)(external_components_cjs_namespaceObject.ConsentBannerTitle,{children:a}),(0,jsx_runtime_namespaceObject.jsx)(external_components_cjs_namespaceObject.ConsentBannerDescription,{legalLinks:i,children:c})]}),(0,jsx_runtime_namespaceObject.jsx)(external_components_cjs_namespaceObject.ConsentBannerFooter,{children:p.map((e,n)=>{if(Array.isArray(e)){let t=e.join("-");return(0,jsx_runtime_namespaceObject.jsx)(external_components_cjs_namespaceObject.ConsentBannerFooterSubGroup,{children:e.map(e=>(0,jsx_runtime_namespaceObject.jsx)(external_react_namespaceObject.Fragment,{children:x(e)},e))},t?`group-${t}`:`group-${n}`)}return(0,jsx_runtime_namespaceObject.jsx)(external_react_namespaceObject.Fragment,{children:x(e)},e)})})]})})})};for(var __rspack_i in exports.ConsentBanner=__webpack_exports__.ConsentBanner,__webpack_exports__)-1===["ConsentBanner"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
package/dist/components/{cookie-banner/cookie-banner.d.ts → consent-banner/consent-banner.d.ts}
RENAMED
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @packageDocumentation
|
|
3
|
-
* Provides the main
|
|
3
|
+
* Provides the main consent banner component for privacy consent management.
|
|
4
4
|
* Implements an accessible, customizable banner following GDPR requirements.
|
|
5
5
|
*/
|
|
6
|
-
import type
|
|
6
|
+
import { type FC, type ReactNode } from 'react';
|
|
7
7
|
import type { LegalLinksProps } from '../shared/primitives/legal-links';
|
|
8
|
-
import type { CookieBannerTheme } from './theme';
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
9
|
+
* Identifiers for the available buttons in the consent banner.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export type ConsentBannerButton = 'reject' | 'accept' | 'customize';
|
|
13
|
+
/**
|
|
14
|
+
* Structure for defining the layout of buttons in the consent banner.
|
|
15
|
+
* Supports nesting for grouping buttons.
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export type ConsentBannerLayout = (ConsentBannerButton | ConsentBannerButton[])[];
|
|
19
|
+
/**
|
|
20
|
+
* Props for configuring and customizing the ConsentBanner component.
|
|
11
21
|
*
|
|
12
22
|
* @remarks
|
|
13
|
-
* Provides comprehensive customization options for the
|
|
23
|
+
* Provides comprehensive customization options for the consent banner's appearance
|
|
14
24
|
* and behavior while maintaining compliance with privacy regulations.
|
|
15
25
|
*
|
|
16
26
|
* @public
|
|
17
27
|
*/
|
|
18
|
-
export interface
|
|
19
|
-
/**
|
|
20
|
-
* Custom styles to apply to the banner and its child components
|
|
21
|
-
* @remarks Allows for deep customization of the banner's appearance while maintaining accessibility
|
|
22
|
-
* @default undefined
|
|
23
|
-
*/
|
|
24
|
-
theme?: CookieBannerTheme;
|
|
28
|
+
export interface ConsentBannerProps {
|
|
25
29
|
/**
|
|
26
30
|
* When true, removes all default styling from the component
|
|
27
31
|
* @remarks Useful for implementing completely custom designs
|
|
@@ -54,19 +58,19 @@ export interface CookieBannerProps {
|
|
|
54
58
|
customizeButtonText?: ReactNode;
|
|
55
59
|
/**
|
|
56
60
|
* Content to display on the accept button
|
|
57
|
-
* @remarks Primary action for accepting
|
|
61
|
+
* @remarks Primary action for accepting consent preferences
|
|
58
62
|
* @default undefined
|
|
59
63
|
*/
|
|
60
64
|
acceptButtonText?: ReactNode;
|
|
61
65
|
/**
|
|
62
|
-
* When true, the
|
|
63
|
-
* @remarks Useful for implementing a
|
|
66
|
+
* When true, the consent banner will lock the scroll of the page
|
|
67
|
+
* @remarks Useful for implementing a consent banner that locks the scroll of the page
|
|
64
68
|
* @default false
|
|
65
69
|
*/
|
|
66
70
|
scrollLock?: boolean;
|
|
67
71
|
/**
|
|
68
|
-
* When true, the
|
|
69
|
-
* @remarks Useful for implementing a
|
|
72
|
+
* When true, the consent banner will trap focus
|
|
73
|
+
* @remarks Useful for implementing a consent banner that traps focus
|
|
70
74
|
* @default true
|
|
71
75
|
*/
|
|
72
76
|
trapFocus?: boolean;
|
|
@@ -88,29 +92,52 @@ export interface CookieBannerProps {
|
|
|
88
92
|
* @example
|
|
89
93
|
* ```tsx
|
|
90
94
|
* // Show all links
|
|
91
|
-
* <
|
|
95
|
+
* <ConsentBanner legalLinks={undefined} />
|
|
92
96
|
*
|
|
93
97
|
* // Show no links
|
|
94
|
-
* <
|
|
98
|
+
* <ConsentBanner legalLinks={null} />
|
|
95
99
|
*
|
|
96
100
|
* // Show only privacy policy
|
|
97
|
-
* <
|
|
101
|
+
* <ConsentBanner legalLinks={['privacyPolicy']} />
|
|
98
102
|
* ```
|
|
99
103
|
*
|
|
100
104
|
* @remarks
|
|
101
105
|
* You must set the legal links in the ConsentManagerProvider options.
|
|
102
106
|
*/
|
|
103
107
|
legalLinks?: LegalLinksProps['links'];
|
|
108
|
+
/**
|
|
109
|
+
* Defines the layout of buttons in the footer.
|
|
110
|
+
* Allows reordering and grouping of buttons.
|
|
111
|
+
*
|
|
112
|
+
* @defaultValue [['reject', 'accept'], 'customize']
|
|
113
|
+
*/
|
|
114
|
+
layout?: ConsentBannerLayout;
|
|
115
|
+
/**
|
|
116
|
+
* Specifies which button(s) should be highlighted as the primary action.
|
|
117
|
+
*
|
|
118
|
+
* @defaultValue 'customize'
|
|
119
|
+
*/
|
|
120
|
+
primaryButton?: ConsentBannerButton | ConsentBannerButton[];
|
|
121
|
+
/**
|
|
122
|
+
* Which consent models this banner responds to.
|
|
123
|
+
* @default ['opt-in']
|
|
124
|
+
*/
|
|
125
|
+
models?: import('c15t').Model[];
|
|
126
|
+
/**
|
|
127
|
+
* Override the UI source identifier sent with consent API calls.
|
|
128
|
+
* @default 'banner'
|
|
129
|
+
*/
|
|
130
|
+
uiSource?: string;
|
|
104
131
|
}
|
|
105
|
-
export declare const
|
|
132
|
+
export declare const ConsentBanner: FC<ConsentBannerProps>;
|
|
106
133
|
/**
|
|
107
|
-
* Component type definition for the
|
|
134
|
+
* Component type definition for the ConsentBanner with its compound components.
|
|
108
135
|
*
|
|
109
136
|
* @remarks
|
|
110
|
-
* This interface extends the base
|
|
137
|
+
* This interface extends the base ConsentBanner component with additional sub-components
|
|
111
138
|
* that can be used to compose the banner's structure. Each component is designed to be
|
|
112
139
|
* fully accessible and customizable while maintaining compliance with privacy regulations.
|
|
113
140
|
*
|
|
114
141
|
* @public
|
|
115
142
|
*/
|
|
116
|
-
//# sourceMappingURL=
|
|
143
|
+
//# sourceMappingURL=consent-banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent-banner.d.ts","sourceRoot":"","sources":["../../../src/components/consent-banner/consent-banner.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAiBlF;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAC/B,mBAAmB,GACnB,mBAAmB,EAAE,CACvB,EAAE,CAAC;AAIJ;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAE7B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAEhC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAE7B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAEtC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAE7B;;;;OAIG;IACH,aAAa,CAAC,EAAE,mBAAmB,GAAG,mBAAmB,EAAE,CAAC;IAE5D;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,MAAM,EAAE,KAAK,EAAE,CAAC;IAEhC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CA+FhD,CAAC;AAEF;;;;;;;;;GASG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as r,jsxs as e}from"react/jsx-runtime";import{Fragment as t}from"react";import{useComponentConfig as n}from"../../hooks/use-component-config.js";import{useTranslations as o}from"../../hooks/use-translations.js";import{ConsentBannerRoot as i}from"./atoms/root.js";import{ConsentBannerAcceptButton as a,ConsentBannerCard as c,ConsentBannerCustomizeButton as s,ConsentBannerDescription as l,ConsentBannerFooter as m,ConsentBannerFooterSubGroup as u,ConsentBannerHeader as d,ConsentBannerRejectButton as p,ConsentBannerTitle as h}from"./components.js";import{ErrorBoundary as b}from"./error-boundary.js";let f=[["reject","accept"],"customize"],j=({noStyle:j,disableAnimation:y,scrollLock:k,trapFocus:g=!0,title:A,description:v,rejectButtonText:w,customizeButtonText:z,acceptButtonText:S,legalLinks:B,layout:L=f,primaryButton:x="customize",models:C,uiSource:F})=>{let{cookieBanner:$}=o(),q=n({noStyle:j,disableAnimation:y,scrollLock:k,trapFocus:g}),D=e=>{let t=Array.isArray(x)?x.includes(e):e===x;switch(e){case"reject":return r(p,{variant:t?"primary":"neutral","data-testid":"consent-banner-reject-button",children:w});case"accept":return r(a,{variant:t?"primary":"neutral","data-testid":"consent-banner-accept-button",children:S});case"customize":return r(s,{variant:t?"primary":"neutral","data-testid":"consent-banner-customize-button",children:z})}};return r(b,{fallback:r("div",{children:"Something went wrong with the Consent Banner."}),children:r(i,{...q,models:C,uiSource:F,children:e(c,{"aria-label":$.title,children:[e(d,{children:[r(h,{children:A}),r(l,{legalLinks:B,children:v})]}),r(m,{children:L.map((e,n)=>{if(Array.isArray(e)){let o=e.join("-");return r(u,{children:e.map(e=>r(t,{children:D(e)},e))},o?`group-${o}`:`group-${n}`)}return r(t,{children:D(e)},e)})})]})})})};export{j as ConsentBanner};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(r,e)=>{for(var _ in e)__webpack_require__.o(e,_)&&!__webpack_require__.o(r,_)&&Object.defineProperty(r,_,{enumerable:!0,get:e[_]})},__webpack_require__.o=(r,e)=>Object.prototype.hasOwnProperty.call(r,e),__webpack_require__.r=r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ErrorBoundary:()=>ErrorBoundary});const external_react_namespaceObject=require("react");class ErrorBoundary extends external_react_namespaceObject.Component{constructor(r){super(r),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r,errorInfo:null}}componentDidCatch(r,e){this.setState({error:r,errorInfo:e})}render(){return this.state.hasError?"function"==typeof this.props.fallback?this.props.fallback(this.state.error,this.state.errorInfo):this.props.fallback:this.props.children}}for(var __rspack_i in exports.ErrorBoundary=__webpack_exports__.ErrorBoundary,__webpack_exports__)-1===["ErrorBoundary"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../../src/components/consent-banner/error-boundary.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAElE;;;;GAIG;AACH,UAAU,kBAAkB;IAC3B,iEAAiE;IACjE,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;OAMG;IACH,QAAQ,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC;CAC1E;AAED;;;;GAIG;AACH,UAAU,kBAAkB;IAC3B,2DAA2D;IAC3D,QAAQ,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,0DAA0D;IAC1D,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,aAAc,SAAQ,SAAS,CAC3C,kBAAkB,EAClB,kBAAkB,CAClB;gBACY,KAAK,EAAE,kBAAkB;IAKrC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB;IAIjE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS;IAOpD,MAAM;CAWN"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import{Component as r}from"react";class t extends r{constructor(r){super(r),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r,errorInfo:null}}componentDidCatch(r,t){this.setState({error:r,errorInfo:t})}render(){return this.state.hasError?"function"==typeof this.props.fallback?this.props.fallback(this.state.error,this.state.errorInfo):this.props.fallback:this.props.children}}export{t as ErrorBoundary};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,n)=>{for(var t in n)__webpack_require__.o(n,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ConsentBannerCard:()=>external_components_cjs_namespaceObject.ConsentBannerCard,Header:()=>external_components_cjs_namespaceObject.Header,FooterSubGroup:()=>external_components_cjs_namespaceObject.FooterSubGroup,ConsentBannerFooterSubGroup:()=>external_components_cjs_namespaceObject.ConsentBannerFooterSubGroup,ConsentBannerTitle:()=>external_components_cjs_namespaceObject.ConsentBannerTitle,Overlay:()=>overlay_cjs_namespaceObject.Overlay,AcceptButton:()=>external_components_cjs_namespaceObject.AcceptButton,ConsentBannerOverlay:()=>overlay_cjs_namespaceObject.ConsentBannerOverlay,Root:()=>root_cjs_namespaceObject.Root,ConsentBannerFooter:()=>external_components_cjs_namespaceObject.ConsentBannerFooter,ConsentBannerCustomizeButton:()=>external_components_cjs_namespaceObject.ConsentBannerCustomizeButton,Card:()=>external_components_cjs_namespaceObject.Card,ConsentBannerRejectButton:()=>external_components_cjs_namespaceObject.ConsentBannerRejectButton,CustomizeButton:()=>external_components_cjs_namespaceObject.CustomizeButton,ConsentBannerRoot:()=>root_cjs_namespaceObject.ConsentBannerRoot,default:()=>consent_banner,ConsentBanner:()=>ConsentBanner,RejectButton:()=>external_components_cjs_namespaceObject.RejectButton,ConsentBannerDescription:()=>external_components_cjs_namespaceObject.ConsentBannerDescription,Footer:()=>external_components_cjs_namespaceObject.Footer,Title:()=>external_components_cjs_namespaceObject.Title,ConsentBannerHeader:()=>external_components_cjs_namespaceObject.ConsentBannerHeader,ConsentBannerAcceptButton:()=>external_components_cjs_namespaceObject.ConsentBannerAcceptButton,Description:()=>external_components_cjs_namespaceObject.Description});const overlay_cjs_namespaceObject=require("./atoms/overlay.cjs"),root_cjs_namespaceObject=require("./atoms/root.cjs"),external_components_cjs_namespaceObject=require("./components.cjs"),external_consent_banner_cjs_namespaceObject=require("./consent-banner.cjs"),ConsentBanner=Object.assign(external_consent_banner_cjs_namespaceObject.ConsentBanner,{Root:root_cjs_namespaceObject.Root,Card:external_components_cjs_namespaceObject.Card,Header:external_components_cjs_namespaceObject.Header,Title:external_components_cjs_namespaceObject.Title,Description:external_components_cjs_namespaceObject.Description,Footer:external_components_cjs_namespaceObject.Footer,FooterSubGroup:external_components_cjs_namespaceObject.FooterSubGroup,RejectButton:external_components_cjs_namespaceObject.RejectButton,CustomizeButton:external_components_cjs_namespaceObject.CustomizeButton,AcceptButton:external_components_cjs_namespaceObject.AcceptButton,Overlay:overlay_cjs_namespaceObject.Overlay,Content:external_components_cjs_namespaceObject.Card,Actions:external_components_cjs_namespaceObject.FooterSubGroup}),consent_banner=ConsentBanner;for(var __rspack_i in exports.AcceptButton=__webpack_exports__.AcceptButton,exports.Card=__webpack_exports__.Card,exports.ConsentBanner=__webpack_exports__.ConsentBanner,exports.ConsentBannerAcceptButton=__webpack_exports__.ConsentBannerAcceptButton,exports.ConsentBannerCard=__webpack_exports__.ConsentBannerCard,exports.ConsentBannerCustomizeButton=__webpack_exports__.ConsentBannerCustomizeButton,exports.ConsentBannerDescription=__webpack_exports__.ConsentBannerDescription,exports.ConsentBannerFooter=__webpack_exports__.ConsentBannerFooter,exports.ConsentBannerFooterSubGroup=__webpack_exports__.ConsentBannerFooterSubGroup,exports.ConsentBannerHeader=__webpack_exports__.ConsentBannerHeader,exports.ConsentBannerOverlay=__webpack_exports__.ConsentBannerOverlay,exports.ConsentBannerRejectButton=__webpack_exports__.ConsentBannerRejectButton,exports.ConsentBannerRoot=__webpack_exports__.ConsentBannerRoot,exports.ConsentBannerTitle=__webpack_exports__.ConsentBannerTitle,exports.CustomizeButton=__webpack_exports__.CustomizeButton,exports.Description=__webpack_exports__.Description,exports.Footer=__webpack_exports__.Footer,exports.FooterSubGroup=__webpack_exports__.FooterSubGroup,exports.Header=__webpack_exports__.Header,exports.Overlay=__webpack_exports__.Overlay,exports.RejectButton=__webpack_exports__.RejectButton,exports.Root=__webpack_exports__.Root,exports.Title=__webpack_exports__.Title,exports.default=__webpack_exports__.default,__webpack_exports__)-1===["AcceptButton","Card","ConsentBanner","ConsentBannerAcceptButton","ConsentBannerCard","ConsentBannerCustomizeButton","ConsentBannerDescription","ConsentBannerFooter","ConsentBannerFooterSubGroup","ConsentBannerHeader","ConsentBannerOverlay","ConsentBannerRejectButton","ConsentBannerRoot","ConsentBannerTitle","CustomizeButton","Description","Footer","FooterSubGroup","Header","Overlay","RejectButton","Root","Title","default"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enhanced ConsentBanner component with compound components attached.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* This is the main export that provides access to all ConsentBanner components.
|
|
6
|
+
* It follows the compound components pattern, allowing for flexible composition
|
|
7
|
+
* of the banner's parts.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import type { FC } from 'react';
|
|
11
|
+
import { Overlay } from './atoms/overlay';
|
|
12
|
+
import { Root } from './atoms/root';
|
|
13
|
+
import { AcceptButton, Card, CustomizeButton, Description, Footer, FooterSubGroup, Header, RejectButton, Title } from './components';
|
|
14
|
+
import { type ConsentBannerButton, type ConsentBannerLayout, type ConsentBannerProps } from './consent-banner';
|
|
15
|
+
/**
|
|
16
|
+
* This interface extends the base ConsentBanner component with additional sub-components
|
|
17
|
+
* that can be used to compose the banner's structure.
|
|
18
|
+
*/
|
|
19
|
+
export interface ConsentBannerCompoundComponent extends FC<ConsentBannerProps> {
|
|
20
|
+
Root: typeof Root;
|
|
21
|
+
Card: typeof Card;
|
|
22
|
+
Header: typeof Header;
|
|
23
|
+
Title: typeof Title;
|
|
24
|
+
Description: typeof Description;
|
|
25
|
+
Footer: typeof Footer;
|
|
26
|
+
FooterSubGroup: typeof FooterSubGroup;
|
|
27
|
+
RejectButton: typeof RejectButton;
|
|
28
|
+
CustomizeButton: typeof CustomizeButton;
|
|
29
|
+
AcceptButton: typeof AcceptButton;
|
|
30
|
+
Overlay: typeof Overlay;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A customizable consent banner component.
|
|
34
|
+
*
|
|
35
|
+
* @remarks
|
|
36
|
+
* 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
|
+
*
|
|
40
|
+
* Key features:
|
|
41
|
+
* - Fully accessible by default
|
|
42
|
+
* - GDPR Compliant
|
|
43
|
+
* - Customizable appearance
|
|
44
|
+
* - Responsive design
|
|
45
|
+
* - Error boundary protection
|
|
46
|
+
* - Compound component pattern support
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* Simple usage with default settings:
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <ConsentBanner />
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* Customized usage with all props:
|
|
56
|
+
* ```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
|
+
* />
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* <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>
|
|
80
|
+
* </ConsentBanner.Root>
|
|
81
|
+
* ```
|
|
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:
|
|
84
|
+
*
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
declare const ConsentBanner: ConsentBannerCompoundComponent;
|
|
88
|
+
export default ConsentBanner;
|
|
89
|
+
export { ConsentBanner, type ConsentBannerButton, type ConsentBannerLayout, type ConsentBannerProps, };
|
|
90
|
+
export { ConsentBannerOverlay, Overlay } from './atoms/overlay';
|
|
91
|
+
export { ConsentBannerRoot, Root } from './atoms/root';
|
|
92
|
+
export { AcceptButton, Card, ConsentBannerAcceptButton, ConsentBannerCard, ConsentBannerCustomizeButton, ConsentBannerDescription, ConsentBannerFooter, ConsentBannerFooterSubGroup, ConsentBannerHeader, ConsentBannerRejectButton, ConsentBannerTitle, CustomizeButton, Description, Footer, FooterSubGroup, Header, RejectButton, Title, } from './components';
|
|
93
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/consent-banner/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EACN,YAAY,EACZ,IAAI,EACJ,eAAe,EACf,WAAW,EACX,MAAM,EACN,cAAc,EACd,MAAM,EACN,YAAY,EACZ,KAAK,EACL,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,KAAK,mBAAmB,EAExB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,MAAM,kBAAkB,CAAC;AAE1B;;;GAGG;AACH,MAAM,WAAW,8BAA+B,SAAQ,EAAE,CAAC,kBAAkB,CAAC;IAC7E,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,MAAM,EAAE,OAAO,MAAM,CAAC;IACtB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,WAAW,EAAE,OAAO,WAAW,CAAC;IAChC,MAAM,EAAE,OAAO,MAAM,CAAC;IACtB,cAAc,EAAE,OAAO,cAAc,CAAC;IACtC,YAAY,EAAE,OAAO,YAAY,CAAC;IAClC,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,YAAY,EAAE,OAAO,YAAY,CAAC;IAClC,OAAO,EAAE,OAAO,OAAO,CAAC;CACxB;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,QAAA,MAAM,aAAa,EAeb,8BAA8B,CAAC;AAGrC,eAAe,aAAa,CAAC;AAC7B,OAAO,EACN,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACvB,CAAC;AAGF,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EACN,YAAY,EACZ,IAAI,EACJ,yBAAyB,EACzB,iBAAiB,EACjB,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,WAAW,EACX,MAAM,EACN,cAAc,EACd,MAAM,EACN,YAAY,EACZ,KAAK,GACL,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ConsentBannerOverlay as n,Overlay as t}from"./atoms/overlay.js";import{ConsentBannerRoot as e,Root as o}from"./atoms/root.js";import{AcceptButton as r,Card as s,ConsentBannerAcceptButton as a,ConsentBannerCard as B,ConsentBannerCustomizeButton as C,ConsentBannerDescription as u,ConsentBannerFooter as c,ConsentBannerFooterSubGroup as i,ConsentBannerHeader as p,ConsentBannerRejectButton as m,ConsentBannerTitle as l,CustomizeButton as j,Description as b,Footer as d,FooterSubGroup as F,Header as R,RejectButton as f,Title as v}from"./components.js";import{ConsentBanner as y}from"./consent-banner.js";let A=Object.assign(y,{Root:o,Card:s,Header:R,Title:v,Description:b,Footer:d,FooterSubGroup:F,RejectButton:f,CustomizeButton:j,AcceptButton:r,Overlay:t,Content:s,Actions:F}),O=A;export{r as AcceptButton,s as Card,A as ConsentBanner,a as ConsentBannerAcceptButton,B as ConsentBannerCard,C as ConsentBannerCustomizeButton,u as ConsentBannerDescription,c as ConsentBannerFooter,i as ConsentBannerFooterSubGroup,p as ConsentBannerHeader,n as ConsentBannerOverlay,m as ConsentBannerRejectButton,e as ConsentBannerRoot,l as ConsentBannerTitle,j as CustomizeButton,b as Description,d as Footer,F as FooterSubGroup,R as Header,t as Overlay,f as RejectButton,o as Root,v as Title,O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=(e,n)=>{for(var t in n)__webpack_require__.o(n,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Card:()=>Card,ConsentDialogHeaderDescription:()=>ConsentDialogHeaderDescription,ConsentDialogHeaderTitle:()=>ConsentDialogHeaderTitle,Content:()=>Content,Header:()=>Header,ConsentDialogHeader:()=>ConsentDialogHeader,ConsentDialogCard:()=>ConsentDialogCard,ConsentDialogFooter:()=>ConsentDialogFooter,Footer:()=>Footer,HeaderTitle:()=>HeaderTitle,HeaderDescription:()=>HeaderDescription,ConsentDialogContent:()=>ConsentDialogContent,ConsentCustomizationCard:()=>ConsentCustomizationCard,Branding:()=>Branding});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),consent_dialog_module_css_namespaceObject=require("@c15t/ui/styles/components/consent-dialog.module.css");var consent_dialog_module_css_default=__webpack_require__.n(consent_dialog_module_css_namespaceObject);const external_react_namespaceObject=require("react"),consent_widget_cjs_namespaceObject=require("../../consent-widget/consent-widget.cjs"),box_cjs_namespaceObject=require("../../shared/primitives/box.cjs"),index_cjs_namespaceObject=require("../../shared/primitives/legal-links/index.cjs"),logo_cjs_namespaceObject=require("../../shared/ui/logo.cjs"),external_hooks_index_cjs_namespaceObject=require("../../../hooks/index.cjs"),use_translations_cjs_namespaceObject=require("../../../hooks/use-translations.cjs"),ConsentDialogCard=(0,external_react_namespaceObject.forwardRef)(({children:e,...n},t)=>(0,jsx_runtime_namespaceObject.jsx)(box_cjs_namespaceObject.Box,{ref:t,baseClassName:consent_dialog_module_css_default().card,...n,themeKey:"consentDialogCard","data-testid":"consent-dialog-card",children:e})),ConsentDialogHeader=(0,external_react_namespaceObject.forwardRef)(({children:e,...n},t)=>(0,jsx_runtime_namespaceObject.jsx)(box_cjs_namespaceObject.Box,{ref:t,baseClassName:consent_dialog_module_css_default().header,...n,themeKey:"consentDialogHeader","data-testid":"consent-dialog-header",children:e})),ConsentDialogHeaderTitle=(0,external_react_namespaceObject.forwardRef)(({children:e,...n},t)=>{let{consentManagerDialog:a}=(0,use_translations_cjs_namespaceObject.useTranslations)();return(0,jsx_runtime_namespaceObject.jsx)(box_cjs_namespaceObject.Box,{ref:t,baseClassName:consent_dialog_module_css_default().title,themeKey:"consentDialogTitle",...n,"data-testid":"consent-dialog-title",children:e??a.title})}),ConsentDialogHeaderDescription=(0,external_react_namespaceObject.forwardRef)(({children:e,legalLinks:n,asChild:t,...a},o)=>{let{consentManagerDialog:s}=(0,use_translations_cjs_namespaceObject.useTranslations)();return t?(0,jsx_runtime_namespaceObject.jsx)(box_cjs_namespaceObject.Box,{ref:o,baseClassName:consent_dialog_module_css_default().description,themeKey:"consentDialogDescription",asChild:t,...a,children:e??s.description}):(0,jsx_runtime_namespaceObject.jsxs)(box_cjs_namespaceObject.Box,{ref:o,baseClassName:consent_dialog_module_css_default().description,themeKey:"consentDialogDescription",asChild:t,...a,"data-testid":"consent-dialog-description",children:[e??s.description,(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.InlineLegalLinks,{links:n,themeKey:"consentDialogContent",testIdPrefix:"consent-dialog-legal-link"})]})}),ConsentDialogContent=(0,external_react_namespaceObject.forwardRef)(({children:e,...n},t)=>(0,jsx_runtime_namespaceObject.jsx)(box_cjs_namespaceObject.Box,{ref:t,baseClassName:consent_dialog_module_css_default().content,themeKey:"consentDialogContent","data-testid":"consent-dialog-content",...n,children:e})),ConsentDialogFooter=(0,external_react_namespaceObject.forwardRef)(({children:e,themeKey:n,hideBranding:t,"data-testid":a,...o},s)=>(0,jsx_runtime_namespaceObject.jsx)(box_cjs_namespaceObject.Box,{ref:s,baseClassName:consent_dialog_module_css_default().footer,"data-testid":a??"consent-dialog-footer",...o,themeKey:n??"consentDialogFooter",children:e??(0,jsx_runtime_namespaceObject.jsx)(Branding,{hideBranding:t??!1})}));function Branding({hideBranding:e}){let{branding:n}=(0,external_hooks_index_cjs_namespaceObject.useConsentManager)();if("none"===n||e)return null;let t="undefined"!=typeof window?`?ref=${window.location.hostname}`:"";return(0,jsx_runtime_namespaceObject.jsxs)("a",{dir:"ltr",className:consent_dialog_module_css_default().branding,href:"consent"===n?`https://consent.io${t}`:`https://c15t.com${t}`,children:["Secured by"," ","consent"===n?(0,jsx_runtime_namespaceObject.jsx)(logo_cjs_namespaceObject.ConsentIconOnly,{className:consent_dialog_module_css_default().brandingConsent}):(0,jsx_runtime_namespaceObject.jsx)(logo_cjs_namespaceObject.C15TIcon,{className:consent_dialog_module_css_default().brandingC15T})]})}const ConsentCustomizationCard=({noStyle:e,legalLinks:n,hideBranding:t})=>(0,jsx_runtime_namespaceObject.jsxs)(ConsentDialogCard,{children:[(0,jsx_runtime_namespaceObject.jsxs)(ConsentDialogHeader,{children:[(0,jsx_runtime_namespaceObject.jsx)(ConsentDialogHeaderTitle,{}),(0,jsx_runtime_namespaceObject.jsx)(ConsentDialogHeaderDescription,{legalLinks:n})]}),(0,jsx_runtime_namespaceObject.jsx)(ConsentDialogContent,{children:(0,jsx_runtime_namespaceObject.jsx)(consent_widget_cjs_namespaceObject.ConsentWidget,{hideBranding:!0,noStyle:e,useProvider:!0})}),(0,jsx_runtime_namespaceObject.jsx)(ConsentDialogFooter,{hideBranding:t})]}),Card=ConsentDialogCard,Header=ConsentDialogHeader,HeaderTitle=ConsentDialogHeaderTitle,HeaderDescription=ConsentDialogHeaderDescription,Content=ConsentDialogContent,Footer=ConsentDialogFooter;for(var __rspack_i in exports.Branding=__webpack_exports__.Branding,exports.Card=__webpack_exports__.Card,exports.ConsentCustomizationCard=__webpack_exports__.ConsentCustomizationCard,exports.ConsentDialogCard=__webpack_exports__.ConsentDialogCard,exports.ConsentDialogContent=__webpack_exports__.ConsentDialogContent,exports.ConsentDialogFooter=__webpack_exports__.ConsentDialogFooter,exports.ConsentDialogHeader=__webpack_exports__.ConsentDialogHeader,exports.ConsentDialogHeaderDescription=__webpack_exports__.ConsentDialogHeaderDescription,exports.ConsentDialogHeaderTitle=__webpack_exports__.ConsentDialogHeaderTitle,exports.Content=__webpack_exports__.Content,exports.Footer=__webpack_exports__.Footer,exports.Header=__webpack_exports__.Header,exports.HeaderDescription=__webpack_exports__.HeaderDescription,exports.HeaderTitle=__webpack_exports__.HeaderTitle,__webpack_exports__)-1===["Branding","Card","ConsentCustomizationCard","ConsentDialogCard","ConsentDialogContent","ConsentDialogFooter","ConsentDialogHeader","ConsentDialogHeaderDescription","ConsentDialogHeaderTitle","Content","Footer","Header","HeaderDescription","HeaderTitle"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1,82 +1,80 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation
|
|
3
|
-
* A collection of components for building privacy consent management dialogs.
|
|
4
|
-
* Built with accessibility and customization in mind, following GDPR and other privacy regulation requirements.
|
|
5
|
-
*/
|
|
6
1
|
import { type ReactNode } from 'react';
|
|
7
2
|
import { type BoxProps } from '../../shared/primitives/box';
|
|
8
3
|
import type { LegalLinksProps } from '../../shared/primitives/legal-links';
|
|
9
4
|
import type { ClassNameStyle } from '../../../types/theme';
|
|
5
|
+
declare const ConsentDialogCard: import("react").ForwardRefExoticComponent<{
|
|
6
|
+
/** The content to be rendered inside the consent dialog card */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
} & ClassNameStyle<Record<string, string | number>> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
9
|
/**
|
|
11
|
-
* The header section of the
|
|
12
|
-
* Should contain the
|
|
10
|
+
* The header section of the consent dialog.
|
|
11
|
+
* Should contain the ConsentDialogHeaderTitle and optionally ConsentDialogHeaderDescription.
|
|
13
12
|
*
|
|
14
13
|
* @remarks
|
|
15
14
|
* - Provides semantic structure for accessibility
|
|
16
|
-
* - Should be the first child of
|
|
15
|
+
* - Should be the first child of ConsentDialogCard
|
|
17
16
|
* - Styled according to the theme configuration
|
|
18
17
|
*/
|
|
19
|
-
declare const
|
|
18
|
+
declare const ConsentDialogHeader: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
19
|
/**
|
|
21
|
-
* The title component for the
|
|
20
|
+
* The title component for the consent dialog header.
|
|
22
21
|
* Displays the main heading of the consent management interface.
|
|
23
22
|
*
|
|
24
23
|
* @remarks
|
|
25
24
|
* - Uses proper heading semantics for accessibility
|
|
26
|
-
* - Should be used within
|
|
25
|
+
* - Should be used within ConsentDialogHeader
|
|
27
26
|
* - Supports theme customization
|
|
28
27
|
*/
|
|
29
|
-
declare const
|
|
28
|
+
declare const ConsentDialogHeaderTitle: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
29
|
/**
|
|
31
|
-
* The description component for the
|
|
30
|
+
* The description component for the consent dialog header.
|
|
32
31
|
* Provides additional context about privacy settings and consent choices.
|
|
33
32
|
*
|
|
34
33
|
* @remarks
|
|
35
|
-
* - Should be used after
|
|
34
|
+
* - Should be used after ConsentDialogHeaderTitle
|
|
36
35
|
* - Supports theme customization
|
|
37
36
|
* - Important for explaining privacy choices to users
|
|
38
37
|
* - Can include legal links inline with the description
|
|
39
38
|
*/
|
|
40
|
-
declare const
|
|
39
|
+
declare const ConsentDialogHeaderDescription: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & {
|
|
41
40
|
legalLinks?: LegalLinksProps["links"];
|
|
42
41
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
42
|
/**
|
|
44
|
-
* The main content area of the
|
|
43
|
+
* The main content area of the consent dialog.
|
|
45
44
|
* Contains the consent management interface and privacy controls.
|
|
46
45
|
*
|
|
47
46
|
* @remarks
|
|
48
|
-
* - Typically contains
|
|
47
|
+
* - Typically contains ConsentWidget
|
|
49
48
|
* - Supports custom content and styling
|
|
50
49
|
* - Handles user interactions with privacy settings
|
|
51
50
|
*/
|
|
52
|
-
declare const
|
|
51
|
+
declare const ConsentDialogContent: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
53
52
|
/**
|
|
54
|
-
* The footer section of the
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* @remarks
|
|
58
|
-
* - Should be the last child of DialogCard
|
|
59
|
-
* - Includes c15t.com branding by default
|
|
60
|
-
* - Can be customized through theme configuration
|
|
53
|
+
* The footer section of the consent dialog.
|
|
54
|
+
* This contains the branding but can be overidden with a custom footer.
|
|
61
55
|
*/
|
|
62
|
-
declare const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export declare
|
|
56
|
+
declare const ConsentDialogFooter: import("react").ForwardRefExoticComponent<BoxProps & {
|
|
57
|
+
hideBranding?: boolean;
|
|
58
|
+
'data-testid'?: string;
|
|
59
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
60
|
+
export declare function Branding({ hideBranding }: {
|
|
61
|
+
hideBranding: boolean;
|
|
62
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
67
63
|
/**
|
|
68
|
-
* A pre-configured privacy settings
|
|
69
|
-
* Combines all dialog components with default content for privacy customization.
|
|
64
|
+
* A pre-configured privacy settings card.
|
|
65
|
+
* Combines all consent dialog components with default content for privacy customization.
|
|
70
66
|
*
|
|
71
67
|
* @param {Object} props - Component props
|
|
72
68
|
* @param {boolean} [props.noStyle] - When true, removes default styling
|
|
73
69
|
* @param {LegalLink[]} [props.legalLinks] - Legal document links to display in footer
|
|
70
|
+
* @param {boolean} [props.hideBranding] - Whether to hide the branding in the footer
|
|
74
71
|
*
|
|
75
72
|
* @example
|
|
76
73
|
* ```tsx
|
|
77
74
|
* <ConsentCustomizationCard
|
|
78
75
|
* noStyle={false}
|
|
79
76
|
* legalLinks={[{label: "Privacy Policy", href: "/privacy"}]}
|
|
77
|
+
* hideBranding={false}
|
|
80
78
|
* />
|
|
81
79
|
* ```
|
|
82
80
|
*
|
|
@@ -85,20 +83,24 @@ export declare const BrandingFooter: () => import("react/jsx-runtime").JSX.Eleme
|
|
|
85
83
|
* - Includes consent type management
|
|
86
84
|
* - Built-in accessibility features
|
|
87
85
|
*/
|
|
88
|
-
declare const ConsentCustomizationCard: ({ noStyle, legalLinks, }: {
|
|
86
|
+
declare const ConsentCustomizationCard: ({ noStyle, legalLinks, hideBranding, }: {
|
|
89
87
|
noStyle?: boolean;
|
|
90
88
|
legalLinks?: LegalLinksProps["links"];
|
|
89
|
+
hideBranding?: boolean;
|
|
91
90
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
92
91
|
declare const Card: import("react").ForwardRefExoticComponent<{
|
|
93
|
-
/** The content to be rendered inside the dialog card */
|
|
92
|
+
/** The content to be rendered inside the consent dialog card */
|
|
94
93
|
children?: ReactNode;
|
|
95
|
-
} & ClassNameStyle & import("react").RefAttributes<HTMLDivElement>>;
|
|
94
|
+
} & ClassNameStyle<Record<string, string | number>> & import("react").RefAttributes<HTMLDivElement>>;
|
|
96
95
|
declare const Header: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
97
96
|
declare const HeaderTitle: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
98
97
|
declare const HeaderDescription: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & {
|
|
99
98
|
legalLinks?: LegalLinksProps["links"];
|
|
100
99
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
101
100
|
declare const Content: import("react").ForwardRefExoticComponent<Omit<BoxProps, "themeKey"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
102
|
-
declare const Footer: import("react").ForwardRefExoticComponent<BoxProps &
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
declare const Footer: import("react").ForwardRefExoticComponent<BoxProps & {
|
|
102
|
+
hideBranding?: boolean;
|
|
103
|
+
'data-testid'?: string;
|
|
104
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
105
|
+
export { Card, Header, HeaderTitle, HeaderDescription, Content, Footer, ConsentCustomizationCard, ConsentDialogFooter, ConsentDialogHeader, ConsentDialogHeaderTitle, ConsentDialogHeaderDescription, ConsentDialogContent, ConsentDialogCard, };
|
|
106
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/consent-dialog/atoms/card.tsx"],"names":[],"mappings":"AASA,OAAO,EAAc,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4CAA4C,CAAC;AAKlF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAWpD,QAAA,MAAM,iBAAiB;IAJtB,gEAAgE;eACrD,SAAS;oGAiBpB,CAAC;AAEF;;;;;;;;GAQG;AACH,QAAA,MAAM,mBAAmB,uHAevB,CAAC;AAEH;;;;;;;;GAQG;AACH,QAAA,MAAM,wBAAwB,uHAgB5B,CAAC;AAEH;;;;;;;;;GASG;AACH,QAAA,MAAM,8BAA8B;iBAGrB,eAAe,CAAC,OAAO,CAAC;kDAkCrC,CAAC;AAEH;;;;;;;;GAQG;AACH,QAAA,MAAM,oBAAoB,uHAexB,CAAC;AAEH;;;GAGG;AACH,QAAA,MAAM,mBAAmB;mBAEI,OAAO;oBAAkB,MAAM;kDAkB3D,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EAAE,YAAY,EAAE,EAAE;IAAE,YAAY,EAAE,OAAO,CAAA;CAAE,kDA4BnE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAA,MAAM,wBAAwB,GAAI,wCAI/B;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,4CAaA,CAAC;AAEF,QAAA,MAAM,IAAI;IA1PT,gEAAgE;eACrD,SAAS;oGAyPS,CAAC;AAC/B,QAAA,MAAM,MAAM,uHAAsB,CAAC;AACnC,QAAA,MAAM,WAAW,uHAA2B,CAAC;AAC7C,QAAA,MAAM,iBAAiB;iBAvKR,eAAe,CAAC,OAAO,CAAC;kDAuKiB,CAAC;AACzD,QAAA,MAAM,OAAO,uHAAuB,CAAC;AACrC,QAAA,MAAM,MAAM;mBArGiB,OAAO;oBAAkB,MAAM;kDAqG1B,CAAC;AAEnC,OAAO,EACN,IAAI,EACJ,MAAM,EACN,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,MAAM,EACN,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,8BAA8B,EAC9B,oBAAoB,EACpB,iBAAiB,GACjB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import n from"@c15t/ui/styles/components/consent-dialog.module.css";import{forwardRef as o}from"react";import{ConsentWidget as i}from"../../consent-widget/consent-widget.js";import{Box as a}from"../../shared/primitives/box.js";import{InlineLegalLinks as s}from"../../shared/primitives/legal-links/index.js";import{C15TIcon as r,ConsentIconOnly as d}from"../../shared/ui/logo.js";import{useConsentManager as l}from"../../../hooks/index.js";import{useTranslations as c}from"../../../hooks/use-translations.js";let m=o(({children:t,...o},i)=>e(a,{ref:i,baseClassName:n.card,...o,themeKey:"consentDialogCard","data-testid":"consent-dialog-card",children:t})),g=o(({children:t,...o},i)=>e(a,{ref:i,baseClassName:n.header,...o,themeKey:"consentDialogHeader","data-testid":"consent-dialog-header",children:t})),h=o(({children:t,...o},i)=>{let{consentManagerDialog:s}=c();return e(a,{ref:i,baseClassName:n.title,themeKey:"consentDialogTitle",...o,"data-testid":"consent-dialog-title",children:t??s.title})}),C=o(({children:o,legalLinks:i,asChild:r,...d},l)=>{let{consentManagerDialog:m}=c();return r?e(a,{ref:l,baseClassName:n.description,themeKey:"consentDialogDescription",asChild:r,...d,children:o??m.description}):t(a,{ref:l,baseClassName:n.description,themeKey:"consentDialogDescription",asChild:r,...d,"data-testid":"consent-dialog-description",children:[o??m.description,e(s,{links:i,themeKey:"consentDialogContent",testIdPrefix:"consent-dialog-legal-link"})]})}),f=o(({children:t,...o},i)=>e(a,{ref:i,baseClassName:n.content,themeKey:"consentDialogContent","data-testid":"consent-dialog-content",...o,children:t})),p=o(({children:t,themeKey:o,hideBranding:i,"data-testid":s,...r},d)=>e(a,{ref:d,baseClassName:n.footer,"data-testid":s??"consent-dialog-footer",...r,themeKey:o??"consentDialogFooter",children:t??e(D,{hideBranding:i??!1})}));function D({hideBranding:o}){let{branding:i}=l();if("none"===i||o)return null;let a="undefined"!=typeof window?`?ref=${window.location.hostname}`:"";return t("a",{dir:"ltr",className:n.branding,href:"consent"===i?`https://consent.io${a}`:`https://c15t.com${a}`,children:["Secured by"," ","consent"===i?e(d,{className:n.brandingConsent}):e(r,{className:n.brandingC15T})]})}let u=({noStyle:n,legalLinks:o,hideBranding:a})=>t(m,{children:[t(g,{children:[e(h,{}),e(C,{legalLinks:o})]}),e(f,{children:e(i,{hideBranding:!0,noStyle:n,useProvider:!0})}),e(p,{hideBranding:a})]}),b=m,y=g,N=h,K=C,j=f,H=p;export{D as Branding,b as Card,u as ConsentCustomizationCard,m as ConsentDialogCard,f as ConsentDialogContent,p as ConsentDialogFooter,g as ConsentDialogHeader,C as ConsentDialogHeaderDescription,h as ConsentDialogHeaderTitle,j as Content,H as Footer,y as Header,K as HeaderDescription,N as HeaderTitle};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.n=e=>{var _=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(_,{a:_}),_},__webpack_require__.d=(e,_)=>{for(var a in _)__webpack_require__.o(_,a)&&!__webpack_require__.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:_[a]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ConsentDialogOverlay:()=>ConsentDialogOverlay,Overlay:()=>Overlay});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),consent_dialog_module_css_namespaceObject=require("@c15t/ui/styles/components/consent-dialog.module.css");var consent_dialog_module_css_default=__webpack_require__.n(consent_dialog_module_css_namespaceObject);const external_react_namespaceObject=require("react"),use_consent_manager_cjs_namespaceObject=require("../../../hooks/use-consent-manager.cjs"),use_styles_cjs_namespaceObject=require("../../../hooks/use-styles.cjs"),use_theme_cjs_namespaceObject=require("../../../hooks/use-theme.cjs"),cn_cjs_namespaceObject=require("../../../utils/cn.cjs"),ConsentDialogOverlay=({noStyle:e,style:_})=>{let a,{activeUI:t}=(0,use_consent_manager_cjs_namespaceObject.useConsentManager)(),{disableAnimation:s,noStyle:r,scrollLock:c=!0}=(0,use_theme_cjs_namespaceObject.useTheme)(),n="dialog"===t,[o,l]=(0,external_react_namespaceObject.useState)(!1);(0,external_react_namespaceObject.useEffect)(()=>{if(n)l(!0);else if(s)l(!1);else{let e=setTimeout(()=>{l(!1)},Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue("--consent-dialog-animation-duration")||"200",10));return()=>clearTimeout(e)}},[n,s]);let i="string"==typeof _?_:_?.className,u=(0,use_styles_cjs_namespaceObject.useStyles)("consentDialogOverlay",{baseClassName:!(r||e)&&consent_dialog_module_css_default().overlay,className:i,noStyle:r||e});a=r||e||s?void 0:o?consent_dialog_module_css_default().overlayVisible:consent_dialog_module_css_default().overlayHidden;let p=(0,cn_cjs_namespaceObject.cnExt)(u.className,a);return(0,jsx_runtime_namespaceObject.jsx)("div",{style:"object"==typeof _&&"style"in _?{...u.style,..._.style}:u.style,className:p,"data-testid":"consent-dialog-overlay"})},Overlay=ConsentDialogOverlay;for(var __rspack_i in exports.ConsentDialogOverlay=__webpack_exports__.ConsentDialogOverlay,exports.Overlay=__webpack_exports__.Overlay,__webpack_exports__)-1===["ConsentDialogOverlay","Overlay"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -20,9 +20,9 @@ import type { ThemeValue } from '../../../types/theme';
|
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
22
|
* Extends {@link PropsWithChildren} so that the overlay can optionally wrap
|
|
23
|
-
* its compound components (e.g. `
|
|
23
|
+
* its compound components (e.g. `ConsentDialog.Card`). This resolves
|
|
24
24
|
* TypeScript errors when consumers nest elements inside
|
|
25
|
-
* `<
|
|
25
|
+
* `<ConsentDialog.Root>`.
|
|
26
26
|
*/
|
|
27
27
|
export type OverlayProps = PropsWithChildren<{
|
|
28
28
|
/**
|
|
@@ -44,7 +44,7 @@ export type OverlayProps = PropsWithChildren<{
|
|
|
44
44
|
*/
|
|
45
45
|
noStyle?: boolean;
|
|
46
46
|
}>;
|
|
47
|
-
declare const
|
|
47
|
+
declare const ConsentDialogOverlay: FC<OverlayProps>;
|
|
48
48
|
declare const Overlay: FC<OverlayProps>;
|
|
49
|
-
export { Overlay,
|
|
49
|
+
export { Overlay, ConsentDialogOverlay };
|
|
50
50
|
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../src/components/consent-dialog/atoms/overlay.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAI7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD;;;;;;;;;GASG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;IAC5C;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,YAAY,CAmE1C,CAAC;AAEF,QAAA,MAAM,OAAO,kBAAuB,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import t from"@c15t/ui/styles/components/consent-dialog.module.css";import{useEffect as o,useState as s}from"react";import{useConsentManager as l}from"../../../hooks/use-consent-manager.js";import{useStyles as r}from"../../../hooks/use-styles.js";import{useTheme as a}from"../../../hooks/use-theme.js";import{cnExt as m}from"../../../utils/cn.js";let i=({noStyle:i,style:n})=>{let y,{activeUI:c}=l(),{disableAnimation:u,noStyle:d,scrollLock:p=!0}=a(),f="dialog"===c,[g,v]=s(!1);o(()=>{if(f)v(!0);else if(u)v(!1);else{let e=setTimeout(()=>{v(!1)},Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue("--consent-dialog-animation-duration")||"200",10));return()=>clearTimeout(e)}},[f,u]);let j="string"==typeof n?n:n?.className,N=r("consentDialogOverlay",{baseClassName:!(d||i)&&t.overlay,className:j,noStyle:d||i});y=d||i||u?void 0:g?t.overlayVisible:t.overlayHidden;let b=m(N.className,y);return e("div",{style:"object"==typeof n&&"style"in n?{...N.style,...n.style}:N.style,className:b,"data-testid":"consent-dialog-overlay"})},n=i;export{i as ConsentDialogOverlay,n as Overlay};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var _ in t)__webpack_require__.o(t,_)&&!__webpack_require__.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:t[_]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ConsentDialogRoot:()=>ConsentDialogRoot,Root:()=>Root});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),consent_dialog_module_css_namespaceObject=require("@c15t/ui/styles/components/consent-dialog.module.css");var consent_dialog_module_css_default=__webpack_require__.n(consent_dialog_module_css_namespaceObject);const external_react_namespaceObject=require("react"),external_react_dom_namespaceObject=require("react-dom"),consent_tracking_context_cjs_namespaceObject=require("../../../context/consent-tracking-context.cjs"),theme_context_cjs_namespaceObject=require("../../../context/theme-context.cjs"),index_cjs_namespaceObject=require("../../../hooks/index.cjs"),use_consent_manager_cjs_namespaceObject=require("../../../hooks/use-consent-manager.cjs"),use_focus_trap_cjs_namespaceObject=require("../../../hooks/use-focus-trap.cjs"),use_scroll_lock_cjs_namespaceObject=require("../../../hooks/use-scroll-lock.cjs"),use_styles_cjs_namespaceObject=require("../../../hooks/use-styles.cjs"),use_theme_cjs_namespaceObject=require("../../../hooks/use-theme.cjs"),cn_cjs_namespaceObject=require("../../../utils/cn.cjs"),external_overlay_cjs_namespaceObject=require("./overlay.cjs"),ConsentDialogRoot=({children:e,open:t,models:_=["opt-in","opt-out"],noStyle:c,disableAnimation:s,scrollLock:a=!0,trapFocus:n=!0,overlay:o,uiSource:r,className:l,style:i,...u})=>{let m=(0,use_theme_cjs_namespaceObject.useTheme)(),p=s??m.disableAnimation??!1,j=c??m.noStyle??!1,d=a??m.scrollLock??!0,b=n??m.trapFocus??!0,{activeUI:x,translationConfig:O,model:g}=(0,use_consent_manager_cjs_namespaceObject.useConsentManager)(),k=(0,index_cjs_namespaceObject.useTextDirection)(O.defaultLanguage),f=_.includes(g)&&(t??"dialog"===x),[q,y]=(0,external_react_namespaceObject.useState)(!1),h=(0,external_react_namespaceObject.useRef)(null),v=(0,external_react_namespaceObject.useRef)(null),[w,R]=(0,external_react_namespaceObject.useState)(!1);(0,external_react_namespaceObject.useEffect)(()=>{R(!0)},[]);let S=m.theme?.motion?.duration?.normal;(0,external_react_namespaceObject.useEffect)(()=>{if(f)y(!0);else if(p)y(!1);else{let e=setTimeout(()=>y(!1),Number.parseInt((S||"200ms").replace("ms",""),10));return()=>clearTimeout(e)}},[f,p,S]),(0,use_focus_trap_cjs_namespaceObject.useFocusTrap)(f&&b,h),(0,use_scroll_lock_cjs_namespaceObject.useScrollLock)(f&&d);let C=(0,cn_cjs_namespaceObject.cnExt)(consent_dialog_module_css_default().root,!p&&(q?consent_dialog_module_css_default().dialogVisible:consent_dialog_module_css_default().dialogHidden),l),D=(0,use_styles_cjs_namespaceObject.useStyles)("consentDialog",{baseClassName:void 0,className:C,style:i,noStyle:j}),T={disableAnimation:p,noStyle:j,scrollLock:d,trapFocus:b,theme:m.theme},P=(0,jsx_runtime_namespaceObject.jsx)(consent_tracking_context_cjs_namespaceObject.ConsentTrackingContext.Provider,{value:{uiSource:r??"dialog"},children:(0,jsx_runtime_namespaceObject.jsx)(theme_context_cjs_namespaceObject.LocalThemeContext.Provider,{value:T,children:f&&(0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment,{children:[!1===o?null:o??(0,jsx_runtime_namespaceObject.jsx)(external_overlay_cjs_namespaceObject.Overlay,{}),(0,jsx_runtime_namespaceObject.jsx)("dialog",{ref:h,...u,...D,className:D.className,"aria-labelledby":"privacy-settings-title",tabIndex:-1,dir:k,"data-testid":"consent-dialog-root",open:!0,children:(0,jsx_runtime_namespaceObject.jsx)("div",{ref:v,className:j?void 0:(0,cn_cjs_namespaceObject.cnExt)(consent_dialog_module_css_default().container,!p&&q?consent_dialog_module_css_default().contentVisible:consent_dialog_module_css_default().contentHidden),children:e})})]})})});return w?(0,external_react_dom_namespaceObject.createPortal)(P,document.body):null},Root=ConsentDialogRoot;for(var __rspack_i in exports.ConsentDialogRoot=__webpack_exports__.ConsentDialogRoot,exports.Root=__webpack_exports__.Root,__webpack_exports__)-1===["ConsentDialogRoot","Root"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import type { FC, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { type ThemeContextValue } from '../../../context/theme-context';
|
|
3
|
-
import type { ConsentManagerDialogTheme } from '../theme';
|
|
4
2
|
/**
|
|
5
|
-
* Props for the root component of the
|
|
3
|
+
* Props for the root component of the ConsentDialog.
|
|
6
4
|
*
|
|
7
5
|
* @public
|
|
8
6
|
*/
|
|
9
|
-
export interface
|
|
7
|
+
export interface ConsentDialogRootProps extends HTMLAttributes<HTMLDialogElement> {
|
|
10
8
|
/**
|
|
11
9
|
* React children that will be rendered inside the dialog container.
|
|
12
|
-
* Typically this includes `
|
|
10
|
+
* Typically this includes `ConsentDialog.Card` and its sub-components.
|
|
13
11
|
*/
|
|
14
12
|
children: ReactNode;
|
|
15
13
|
/**
|
|
16
14
|
* Explicitly control the open state of the dialog. If omitted, the dialog
|
|
17
|
-
* relies on the consent manager (`
|
|
15
|
+
* relies on the consent manager (`activeUI === 'dialog'`) value.
|
|
18
16
|
*/
|
|
19
17
|
open?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Which consent models this dialog responds to.
|
|
20
|
+
* @default ['opt-in', 'opt-out']
|
|
21
|
+
*/
|
|
22
|
+
models?: import('c15t').Model[];
|
|
20
23
|
/**
|
|
21
24
|
* When true, the component will not apply any internal styles.
|
|
22
25
|
*/
|
|
@@ -40,21 +43,26 @@ export interface ConsentManagerDialogRootProps extends ThemeContextValue<Consent
|
|
|
40
43
|
* @default undefined (builtin overlay)
|
|
41
44
|
*/
|
|
42
45
|
overlay?: ReactNode | false;
|
|
46
|
+
/**
|
|
47
|
+
* Override the UI source identifier sent with consent API calls.
|
|
48
|
+
* @default 'dialog'
|
|
49
|
+
*/
|
|
50
|
+
uiSource?: string;
|
|
43
51
|
}
|
|
44
52
|
/**
|
|
45
53
|
* Provides theming context, focus-management and portal rendering for the
|
|
46
|
-
* Consent
|
|
47
|
-
* `
|
|
54
|
+
* Consent Dialog. This component is also exposed as
|
|
55
|
+
* `ConsentDialog.Root` to enable the compound-component usage:
|
|
48
56
|
*
|
|
49
57
|
* ```tsx
|
|
50
|
-
* <
|
|
51
|
-
* <
|
|
58
|
+
* <ConsentDialog.Root>
|
|
59
|
+
* <ConsentDialog.Card>
|
|
52
60
|
* …
|
|
53
|
-
* </
|
|
54
|
-
* </
|
|
61
|
+
* </ConsentDialog.Card>
|
|
62
|
+
* </ConsentDialog.Root>
|
|
55
63
|
* ```
|
|
56
64
|
*/
|
|
57
|
-
declare const
|
|
58
|
-
declare const Root: FC<
|
|
59
|
-
export { Root,
|
|
65
|
+
declare const ConsentDialogRoot: FC<ConsentDialogRootProps>;
|
|
66
|
+
declare const Root: FC<ConsentDialogRootProps>;
|
|
67
|
+
export { Root, ConsentDialogRoot };
|
|
60
68
|
//# sourceMappingURL=root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../src/components/consent-dialog/atoms/root.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAkBtE;;;;GAIG;AACH,MAAM,WAAW,sBAChB,SAAQ,cAAc,CAAC,iBAAiB,CAAC;IACzC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,MAAM,EAAE,KAAK,EAAE,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,KAAK,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CA0IjD,CAAC;AAEF,QAAA,MAAM,IAAI,4BAAoB,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Fragment as o,jsx as e,jsxs as t}from"react/jsx-runtime";import r from"@c15t/ui/styles/components/consent-dialog.module.css";import{useEffect as s,useRef as i,useState as l}from"react";import{createPortal as n}from"react-dom";import{ConsentTrackingContext as m}from"../../../context/consent-tracking-context.js";import{LocalThemeContext as a}from"../../../context/theme-context.js";import{useTextDirection as c}from"../../../hooks/index.js";import{useConsentManager as d}from"../../../hooks/use-consent-manager.js";import{useFocusTrap as u}from"../../../hooks/use-focus-trap.js";import{useScrollLock as p}from"../../../hooks/use-scroll-lock.js";import{useStyles as f}from"../../../hooks/use-styles.js";import{useTheme as h}from"../../../hooks/use-theme.js";import{cnExt as g}from"../../../utils/cn.js";import{Overlay as j}from"./overlay.js";let b=({children:b,open:k,models:v=["opt-in","opt-out"],noStyle:y,disableAnimation:x,scrollLock:N=!0,trapFocus:L=!0,overlay:S,uiSource:A,className:C,style:D,...F})=>{let H=h(),I=x??H.disableAnimation??!1,P=y??H.noStyle??!1,R=N??H.scrollLock??!0,T=L??H.trapFocus??!0,{activeUI:V,translationConfig:q,model:w}=d(),z=c(q.defaultLanguage),B=v.includes(w)&&(k??"dialog"===V),[E,G]=l(!1),J=i(null),K=i(null),[M,O]=l(!1);s(()=>{O(!0)},[]);let Q=H.theme?.motion?.duration?.normal;s(()=>{if(B)G(!0);else if(I)G(!1);else{let o=setTimeout(()=>G(!1),Number.parseInt((Q||"200ms").replace("ms",""),10));return()=>clearTimeout(o)}},[B,I,Q]),u(B&&T,J),p(B&&R);let U=f("consentDialog",{baseClassName:void 0,className:g(r.root,!I&&(E?r.dialogVisible:r.dialogHidden),C),style:D,noStyle:P}),W={disableAnimation:I,noStyle:P,scrollLock:R,trapFocus:T,theme:H.theme},X=e(m.Provider,{value:{uiSource:A??"dialog"},children:e(a.Provider,{value:W,children:B&&t(o,{children:[!1===S?null:S??e(j,{}),e("dialog",{ref:J,...F,...U,className:U.className,"aria-labelledby":"privacy-settings-title",tabIndex:-1,dir:z,"data-testid":"consent-dialog-root",open:!0,children:e("div",{ref:K,className:P?void 0:g(r.container,!I&&E?r.contentVisible:r.contentHidden),children:b})})]})})});return M?n(X,document.body):null},k=b;export{b as ConsentDialogRoot,k as Root};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var n in _)__webpack_require__.o(_,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:_[n]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{ConsentDialog:()=>ConsentDialog});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),index_cjs_namespaceObject=require("../consent-dialog-trigger/index.cjs"),use_component_config_cjs_namespaceObject=require("../../hooks/use-component-config.cjs"),use_consent_manager_cjs_namespaceObject=require("../../hooks/use-consent-manager.cjs"),card_cjs_namespaceObject=require("./atoms/card.cjs"),root_cjs_namespaceObject=require("./atoms/root.cjs"),ConsentDialog=({open:e,noStyle:_,disableAnimation:n,scrollLock:r=!0,trapFocus:c=!0,hideBranding:t,legalLinks:a,showTrigger:o=!1,models:s,uiSource:i})=>{let p=(0,use_component_config_cjs_namespaceObject.useComponentConfig)({noStyle:_,disableAnimation:n,scrollLock:r,trapFocus:c}),{activeUI:u}=(0,use_consent_manager_cjs_namespaceObject.useConsentManager)(),j={open:e??"dialog"===u,...p,models:s,uiSource:i},m=!0===o?{}:!1===o?null:o;return(0,jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment,{children:[m&&(0,jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.ConsentDialogTrigger,{...m}),(0,jsx_runtime_namespaceObject.jsx)(root_cjs_namespaceObject.Root,{...j,children:(0,jsx_runtime_namespaceObject.jsx)(card_cjs_namespaceObject.ConsentCustomizationCard,{noStyle:j.noStyle,legalLinks:a,hideBranding:t})})]})};for(var __rspack_i in exports.ConsentDialog=__webpack_exports__.ConsentDialog,__webpack_exports__)-1===["ConsentDialog"].indexOf(__rspack_i)&&(exports[__rspack_i]=__webpack_exports__[__rspack_i]);Object.defineProperty(exports,"__esModule",{value:!0});
|