@c15t/react 2.2.1 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +89 -141
- package/README.md +2 -2
- package/dist/aggregate-components.js +2 -0
- package/dist/chunk-warming.js +1 -0
- package/dist/component-hooks/use-headless-consent-ui.js +2 -0
- package/dist/component-hooks/use-headless-iab-consent-ui.js +2 -0
- package/dist/component-hooks/use-manager.js +2 -0
- package/dist/component-hooks/use-panel-trigger.js +2 -0
- package/dist/component-hooks/use-translations.js +2 -0
- package/dist/components/consent-preferences-link/consent-preferences-link.js +2 -1
- package/dist/components/consent-preferences-link/index.js +1 -0
- package/dist/components/frame/atoms.js +1 -1
- package/dist/components/frame/frame.js +2 -1
- package/dist/components/frame/index.js +2 -1
- package/dist/components/iab-panel/atoms/card.js +2 -0
- package/dist/components/iab-panel/atoms/content.js +2 -0
- package/dist/components/iab-panel/atoms/footer.js +2 -0
- package/dist/components/iab-panel/atoms/header.js +2 -0
- package/dist/components/iab-panel/atoms/overlay.js +2 -0
- package/dist/components/iab-panel/atoms/purpose-item.js +2 -0
- package/dist/components/iab-panel/atoms/root.js +2 -0
- package/dist/components/iab-panel/atoms/stack-item.js +2 -0
- package/dist/components/iab-panel/atoms/tabs.js +2 -0
- package/dist/components/iab-panel/atoms/vendor-list.js +2 -0
- package/dist/components/iab-panel/hooks/use-display-model.js +2 -0
- package/dist/components/iab-panel/hooks/use-gvl-data.js +2 -0
- package/dist/components/iab-panel/iab-panel.js +2 -0
- package/dist/components/iab-panel/index.js +2 -0
- package/dist/components/iab-panel/use-iab-translations.js +1 -0
- package/dist/components/iab-prompt/atoms/button-group.js +2 -0
- package/dist/components/iab-prompt/atoms/card.js +2 -0
- package/dist/components/iab-prompt/atoms/description.js +2 -0
- package/dist/components/iab-prompt/atoms/footer.js +2 -0
- package/dist/components/iab-prompt/atoms/header.js +2 -0
- package/dist/components/iab-prompt/atoms/overlay.js +2 -0
- package/dist/components/iab-prompt/atoms/root.js +2 -0
- package/dist/components/iab-prompt/atoms/title.js +2 -0
- package/dist/components/iab-prompt/iab-prompt.js +2 -0
- package/dist/components/iab-prompt/index.js +2 -0
- package/dist/components/panel/atoms/card.js +2 -0
- package/dist/components/panel/atoms/overlay.js +1 -0
- package/dist/components/panel/atoms/root.js +2 -0
- package/dist/components/panel/index.js +2 -0
- package/dist/components/panel/panel.js +2 -0
- package/dist/components/{consent-dialog-link → panel-link}/index.js +1 -0
- package/dist/components/panel-trigger/atoms/button.js +2 -0
- package/dist/components/panel-trigger/atoms/icon.js +2 -0
- package/dist/components/panel-trigger/atoms/root.js +2 -0
- package/dist/components/panel-trigger/atoms/text.js +2 -0
- package/dist/components/panel-trigger/atoms/toolbar.js +2 -0
- package/dist/components/panel-trigger/index.js +2 -0
- package/dist/components/panel-trigger/panel-trigger-toolbar.js +2 -0
- package/dist/components/panel-trigger/panel-trigger.js +2 -0
- package/dist/components/panel-trigger/use-draggable.js +2 -0
- package/dist/components/preferences/atoms/accordion.js +1 -0
- package/dist/components/preferences/atoms/button.js +1 -0
- package/dist/components/preferences/atoms/footer.js +1 -0
- package/dist/components/preferences/atoms/root.js +2 -0
- package/dist/components/preferences/index.js +2 -0
- package/dist/components/preferences/policy-actions.js +2 -0
- package/dist/components/preferences/preferences.js +2 -0
- package/dist/components/prompt/atoms/overlay.js +1 -0
- package/dist/components/prompt/atoms/root.js +2 -0
- package/dist/components/prompt/components.js +1 -0
- package/dist/components/prompt/error-boundary.js +2 -0
- package/dist/components/prompt/index.js +2 -0
- package/dist/components/prompt/policy-actions.js +2 -0
- package/dist/components/prompt/prompt.js +2 -0
- package/dist/components/prompt/resolve-banner-primary-actions.js +1 -0
- package/dist/components/prompt/surface-context.js +2 -0
- package/dist/components/prompt/use-banner-copy.js +2 -0
- package/dist/components/shared/libs/recursive-clone-children.js +1 -1
- package/dist/components/shared/libs/slot.js +1 -1
- package/dist/components/shared/libs/use-controllable-state.js +1 -1
- package/dist/components/shared/policy-actions.js +2 -1
- package/dist/components/shared/primitives/box.js +2 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/components/shared/primitives/legal-links/index.js +1 -1
- package/dist/components/shared/ui/accordion/accordion.js +2 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.js +2 -1
- package/dist/components/shared/ui/branding.js +1 -1
- package/dist/components/shared/ui/button/button.js +1 -1
- package/dist/components/shared/ui/collapsible/collapsible.js +2 -1
- package/dist/components/shared/ui/dialog/dialog.js +2 -1
- package/dist/components/shared/ui/icon.js +1 -1
- package/dist/components/shared/ui/logo.js +1 -1
- package/dist/components/shared/ui/preference-item/preference-item.js +2 -1
- package/dist/components/shared/ui/switch/switch.js +1 -1
- package/dist/components/shared/ui/tabs/tabs.js +2 -1
- package/dist/context/consent-tracking-context.js +1 -0
- package/dist/context/iab-context-value.js +1 -0
- package/dist/context/index.js +1 -0
- package/dist/context/theme-context.js +2 -1
- package/dist/context.js +1 -0
- package/dist/devtools.js +2 -0
- package/dist/draft.js +2 -0
- package/dist/external-iab-context.js +2 -0
- package/dist/frame.js +2 -0
- package/dist/headless.js +1 -1
- package/dist/hooks/use-color-scheme.js +2 -1
- package/dist/hooks/use-component-config.js +2 -1
- package/dist/hooks/use-focus-trap.js +2 -1
- package/dist/hooks/use-headless-iab-consent-ui.js +2 -1
- package/dist/hooks/use-iab-manager.js +2 -0
- package/dist/hooks/use-is-hydrated.js +2 -0
- package/dist/hooks/use-reduced-motion.js +2 -1
- package/dist/hooks/use-scroll-lock.js +2 -1
- package/dist/hooks/use-text-direction.js +2 -1
- package/dist/hooks/use-theme.js +2 -1
- package/dist/hooks.js +1 -0
- package/dist/iab/styles.css +1 -1
- package/dist/iab/styles.tw3.css +27 -19
- package/dist/iab-context.js +2 -0
- package/dist/iab.js +1 -1
- package/dist/index.js +1 -1
- package/dist/module-hooks/iframe-blocker.js +2 -0
- package/dist/module-hooks/network-blocker.js +2 -0
- package/dist/module-hooks/persistence.js +2 -0
- package/dist/module-hooks/script-loader.js +2 -0
- package/dist/module-hooks/shared.js +2 -0
- package/dist/module-hooks.js +2 -0
- package/dist/panel-link.js +2 -0
- package/dist/panel-trigger.js +2 -0
- package/dist/panel.js +2 -0
- package/dist/preferences.js +2 -0
- package/dist/primitives.js +1 -1
- package/dist/prompt.js +2 -0
- package/dist/provider.js +2 -0
- package/dist/server/fetch-ssr-data.js +1 -1
- package/dist/server/headers.js +1 -1
- package/dist/server/init-cache-key.js +1 -1
- package/dist/server/normalize-url.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.tw3.css +67 -29
- package/dist/theme-provider.js +2 -0
- package/dist/transports/offline.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/theme/index.js +1 -1
- package/dist/types/theme/style-types.js +1 -1
- package/dist/ui-config-context.js +2 -0
- package/dist/ui-save.js +1 -0
- package/dist/utils/cn.js +1 -1
- package/dist/utils/default-translation-config.js +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/merge-slot-props.js +1 -0
- package/dist/utils/merge-styles.js +1 -1
- package/dist/utils/theme-utils.js +1 -1
- package/dist/version.js +1 -1
- package/dist-types/aggregate-components.d.ts +4 -0
- package/dist-types/chunk-warming.d.ts +19 -0
- package/dist-types/component-hooks/use-headless-consent-ui.d.ts +68 -0
- package/dist-types/component-hooks/use-headless-iab-consent-ui.d.ts +22 -0
- package/dist-types/component-hooks/use-manager.d.ts +40 -0
- package/dist-types/component-hooks/use-panel-trigger.d.ts +20 -0
- package/dist-types/component-hooks/use-translations.d.ts +2 -0
- package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +1 -1
- package/dist-types/components/frame/atoms.d.ts +5 -5
- package/dist-types/components/frame/types.d.ts +3 -2
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/card.d.ts +2 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/content.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/footer.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/header.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/overlay.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/purpose-item.d.ts +7 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/root.d.ts +3 -2
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/stack-item.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/tabs.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/vendor-list.d.ts +2 -3
- package/dist-types/components/iab-panel/hooks/use-display-model.d.ts +18 -0
- package/dist-types/components/iab-panel/hooks/use-gvl-data.d.ts +17 -0
- package/dist-types/components/{iab-consent-dialog/iab-consent-dialog.d.ts → iab-panel/iab-panel.d.ts} +10 -3
- package/dist-types/components/{iab-consent-dialog → iab-panel}/index.d.ts +3 -2
- package/dist-types/components/iab-panel/types.d.ts +1 -0
- package/dist-types/components/{iab-consent-dialog → iab-panel}/use-iab-translations.d.ts +3 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/button-group.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/card.d.ts +2 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/description.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/footer.d.ts +2 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/header.d.ts +2 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/overlay.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/root.d.ts +3 -2
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/title.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner/iab-consent-banner.d.ts → iab-prompt/iab-prompt.d.ts} +10 -4
- package/dist-types/components/{iab-consent-banner → iab-prompt}/index.d.ts +1 -1
- package/dist-types/components/{consent-dialog → panel}/atoms/card.d.ts +15 -15
- package/dist-types/components/{consent-dialog → panel}/atoms/overlay.d.ts +24 -8
- package/dist-types/components/{consent-dialog → panel}/atoms/root.d.ts +4 -3
- package/dist-types/components/{consent-dialog → panel}/index.d.ts +13 -8
- package/dist-types/components/{consent-dialog/consent-dialog.d.ts → panel/panel.d.ts} +6 -5
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/button.d.ts +2 -1
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/icon.d.ts +1 -16
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/root.d.ts +11 -23
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/text.d.ts +0 -11
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/toolbar.d.ts +15 -4
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/index.d.ts +2 -2
- package/dist-types/components/{consent-dialog-trigger/consent-dialog-trigger-toolbar.d.ts → panel-trigger/panel-trigger-toolbar.d.ts} +0 -23
- package/dist-types/components/{consent-dialog-trigger/consent-dialog-trigger.d.ts → panel-trigger/panel-trigger.d.ts} +8 -4
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/types.d.ts +16 -7
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/use-draggable.d.ts +2 -9
- package/dist-types/components/{consent-widget → preferences}/atoms/accordion.d.ts +5 -5
- package/dist-types/components/{consent-widget → preferences}/atoms/footer.d.ts +3 -3
- package/dist-types/components/{consent-widget → preferences}/atoms/root.d.ts +1 -1
- package/dist-types/components/{consent-widget → preferences}/index.d.ts +11 -9
- package/dist-types/components/preferences/policy-actions.d.ts +10 -0
- package/dist-types/components/{consent-banner → prompt}/atoms/overlay.d.ts +1 -1
- package/dist-types/components/prompt/atoms/root.d.ts +78 -0
- package/dist-types/components/{consent-banner → prompt}/components.d.ts +99 -14
- package/dist-types/components/{consent-banner → prompt}/error-boundary.d.ts +3 -1
- package/dist-types/components/{consent-banner → prompt}/index.d.ts +18 -10
- package/dist-types/components/prompt/policy-actions.d.ts +12 -0
- package/dist-types/components/{consent-banner/consent-banner.d.ts → prompt/prompt.d.ts} +36 -10
- package/dist-types/components/prompt/resolve-banner-primary-actions.d.ts +14 -0
- package/dist-types/components/prompt/surface-context.d.ts +45 -0
- package/dist-types/components/prompt/use-banner-copy.d.ts +16 -0
- package/dist-types/components/shared/libs/polymorphic.d.ts +2 -2
- package/dist-types/components/shared/libs/recursive-clone-children.d.ts +2 -2
- package/dist-types/components/shared/libs/slot.d.ts +1 -1
- package/dist-types/components/shared/libs/use-controllable-state.d.ts +1 -1
- package/dist-types/components/shared/policy-actions.d.ts +8 -3
- package/dist-types/components/shared/primitives/box.d.ts +3 -1
- package/dist-types/components/shared/primitives/button.d.ts +4 -37
- package/dist-types/components/shared/primitives/button.types.d.ts +3 -1
- package/dist-types/components/shared/primitives/legal-links/index.d.ts +7 -11
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +45 -12
- package/dist-types/components/shared/ui/accordion/accordion.types.d.ts +1 -1
- package/dist-types/components/shared/ui/animated-collapse/animated-collapse.d.ts +1 -1
- package/dist-types/components/shared/ui/branding.d.ts +12 -12
- package/dist-types/components/shared/ui/button/button.d.ts +19 -25
- package/dist-types/components/shared/ui/button/button.types.d.ts +2 -2
- package/dist-types/components/shared/ui/collapsible/collapsible.d.ts +18 -1
- package/dist-types/components/shared/ui/dialog/dialog.d.ts +6 -6
- package/dist-types/components/shared/ui/icon.d.ts +1 -1
- package/dist-types/components/shared/ui/logo.d.ts +0 -21
- package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +46 -2
- package/dist-types/components/shared/ui/switch/switch.d.ts +19 -8
- package/dist-types/components/shared/ui/tabs/tabs.d.ts +19 -2
- package/dist-types/context/iab-context-value.d.ts +37 -0
- package/dist-types/context/index.d.ts +3 -0
- package/dist-types/context/theme-context.d.ts +2 -2
- package/dist-types/context.d.ts +17 -0
- package/dist-types/devtools.d.ts +54 -0
- package/dist-types/draft.d.ts +31 -0
- package/dist-types/external-iab-context.d.ts +29 -0
- package/dist-types/frame.d.ts +1 -0
- package/dist-types/headless.d.ts +12 -8
- package/dist-types/hooks/use-color-scheme.d.ts +1 -1
- package/dist-types/hooks/use-component-config.d.ts +2 -2
- package/dist-types/hooks/use-focus-trap.d.ts +2 -2
- package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +7 -8
- package/dist-types/hooks/use-iab-manager.d.ts +52 -0
- package/dist-types/hooks/use-is-hydrated.d.ts +8 -0
- package/dist-types/hooks/use-reduced-motion.d.ts +1 -1
- package/dist-types/hooks/use-scroll-lock.d.ts +1 -1
- package/dist-types/hooks/use-text-direction.d.ts +1 -1
- package/dist-types/hooks/use-theme.d.ts +2 -1
- package/dist-types/hooks.d.ts +148 -0
- package/dist-types/iab-context.d.ts +28 -0
- package/dist-types/iab.d.ts +14 -8
- package/dist-types/index.d.ts +61 -22
- package/dist-types/module-hooks/iframe-blocker.d.ts +6 -0
- package/dist-types/module-hooks/network-blocker.d.ts +9 -0
- package/dist-types/module-hooks/persistence.d.ts +4 -0
- package/dist-types/module-hooks/script-loader.d.ts +6 -0
- package/dist-types/module-hooks/shared.d.ts +2 -0
- package/dist-types/module-hooks.d.ts +4 -0
- package/dist-types/panel-link.d.ts +1 -0
- package/dist-types/panel-trigger.d.ts +1 -0
- package/dist-types/panel.d.ts +1 -0
- package/dist-types/preferences.d.ts +1 -0
- package/dist-types/prompt.d.ts +1 -0
- package/dist-types/provider.d.ts +149 -0
- package/dist-types/server/fetch-ssr-data.d.ts +2 -2
- package/dist-types/server/headers.d.ts +3 -3
- package/dist-types/server/init-cache-key.d.ts +3 -3
- package/dist-types/server/normalize-url.d.ts +2 -2
- package/dist-types/server/types.d.ts +1 -1
- package/dist-types/theme-provider.d.ts +10 -0
- package/dist-types/transports/offline.d.ts +18 -0
- package/dist-types/types/index.d.ts +3 -0
- package/dist-types/types/manager.d.ts +15 -0
- package/dist-types/types/slots.d.ts +5 -0
- package/dist-types/types/theme/index.d.ts +0 -1
- package/dist-types/types/theme/style-types.d.ts +3 -9
- package/dist-types/ui-config-context.d.ts +9 -0
- package/dist-types/ui-save.d.ts +5 -0
- package/dist-types/utils/cn.d.ts +1 -1
- package/dist-types/utils/default-translation-config.d.ts +6 -0
- package/dist-types/utils/index.d.ts +4 -0
- package/dist-types/utils/merge-slot-props.d.ts +14 -0
- package/dist-types/utils/merge-styles.d.ts +1 -1
- package/dist-types/utils/theme-utils.d.ts +2 -2
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +89 -141
- package/docs/assets/v3/brand-bar.png +0 -0
- package/docs/assets/v3/brand-card.png +0 -0
- package/docs/assets/v3/choice-wall.png +0 -0
- package/docs/assets/v3/mobile-card.png +0 -0
- package/docs/assets/v3/preferences.png +0 -0
- package/docs/customization/overview.md +45 -0
- package/docs/customization/recipes.md +79 -0
- package/docs/customization/slots.md +55 -0
- package/docs/customization/tokens.md +76 -0
- package/docs/customization/translations.md +49 -0
- package/docs/frameworks/react/components/consent-banner.md +219 -202
- package/docs/frameworks/react/components/consent-dialog-link.md +88 -35
- package/docs/frameworks/react/components/consent-dialog-trigger.md +74 -134
- package/docs/frameworks/react/components/consent-dialog.md +170 -135
- package/docs/frameworks/react/components/consent-manager-provider.md +57 -256
- package/docs/frameworks/react/components/consent-widget.md +154 -118
- package/docs/frameworks/react/components/dev-tools.md +198 -33
- package/docs/frameworks/react/components/frame.md +120 -42
- package/docs/frameworks/react/concepts/consent-categories.md +24 -89
- package/docs/frameworks/react/concepts/policy-presets.md +123 -0
- package/docs/frameworks/react/headless.md +91 -185
- package/docs/frameworks/react/hooks/use-consent-manager/overview.md +39 -153
- package/docs/frameworks/react/iab/overview.md +33 -108
- package/docs/frameworks/react/quickstart.md +116 -112
- package/docs/frameworks/react/script-loader.md +41 -533
- package/docs/frameworks/react/styling/overview.md +168 -253
- package/docs/frameworks/react/troubleshooting.md +47 -119
- package/docs/guides/consent-state.md +60 -0
- package/docs/guides/data-fetching.md +163 -0
- package/docs/guides/deployment-modes.md +63 -0
- package/docs/guides/troubleshooting.md +68 -0
- package/docs/guides/verify-consent.md +62 -0
- package/docs/integrations/adobe-analytics.md +239 -105
- package/docs/integrations/ahrefs-analytics.md +238 -104
- package/docs/integrations/amplitude.md +219 -157
- package/docs/integrations/building-integrations.md +32 -224
- package/docs/integrations/clear-on-revocation.md +167 -0
- package/docs/integrations/clearbit.md +247 -86
- package/docs/integrations/cloudflare-web-analytics.md +250 -84
- package/docs/integrations/crisp.md +251 -97
- package/docs/integrations/databuddy.md +259 -153
- package/docs/integrations/fathom-analytics.md +239 -96
- package/docs/integrations/google-maps.md +328 -207
- package/docs/integrations/google-tag-manager.md +248 -96
- package/docs/integrations/google-tag.md +261 -90
- package/docs/integrations/heap.md +222 -149
- package/docs/integrations/hightouch.md +225 -131
- package/docs/integrations/hotjar.md +239 -90
- package/docs/integrations/intercom.md +239 -98
- package/docs/integrations/linkedin-insights.md +243 -113
- package/docs/integrations/logrocket.md +241 -123
- package/docs/integrations/matomo-analytics.md +256 -111
- package/docs/integrations/meta-pixel.md +197 -324
- package/docs/integrations/microsoft-clarity.md +233 -114
- package/docs/integrations/microsoft-uet.md +245 -110
- package/docs/integrations/mixpanel-analytics.md +252 -87
- package/docs/integrations/openai-pixel.md +441 -0
- package/docs/integrations/overview.md +95 -133
- package/docs/integrations/pirsch.md +249 -96
- package/docs/integrations/plausible-analytics.md +241 -100
- package/docs/integrations/posthog.md +353 -214
- package/docs/integrations/promptwatch.md +251 -81
- package/docs/integrations/reddit-pixel.md +226 -173
- package/docs/integrations/rudderstack.md +244 -187
- package/docs/integrations/rybbit-analytics.md +244 -91
- package/docs/integrations/segment.md +238 -92
- package/docs/integrations/snapchat-pixel.md +240 -110
- package/docs/integrations/tiktok-pixel.md +249 -81
- package/docs/integrations/umami-analytics.md +242 -95
- package/docs/integrations/vercel-analytics.md +242 -90
- package/docs/integrations/x-pixel.md +238 -104
- package/docs/integrations/youtube.md +354 -142
- package/docs/upgrade-v3.md +334 -0
- package/iab/styles.css +1 -1
- package/iab/styles.tw3.css +1 -1
- package/package.json +187 -102
- package/readme.json +1 -1
- package/src/iab/styles.css +1 -1
- package/src/iab/styles.tw3.css +1 -1
- package/src/styles.css +1 -1
- package/src/styles.tw3.css +1 -1
- package/styles.css +1 -1
- package/styles.tw3.css +1 -1
- package/client/components/consent-banner.js +0 -4
- package/client/components/consent-dialog-link.js +0 -3
- package/client/components/consent-dialog-trigger.js +0 -3
- package/client/components/consent-dialog.js +0 -4
- package/client/components/consent-widget.js +0 -4
- package/client/components/frame.js +0 -3
- package/client/components/integrations.js +0 -3
- package/dist/components/consent-banner/atoms/overlay.cjs +0 -1
- package/dist/components/consent-banner/atoms/overlay.js +0 -1
- package/dist/components/consent-banner/atoms/root.cjs +0 -1
- package/dist/components/consent-banner/atoms/root.js +0 -1
- package/dist/components/consent-banner/components.cjs +0 -1
- package/dist/components/consent-banner/components.js +0 -1
- package/dist/components/consent-banner/consent-banner.cjs +0 -1
- package/dist/components/consent-banner/consent-banner.js +0 -1
- package/dist/components/consent-banner/error-boundary.cjs +0 -1
- package/dist/components/consent-banner/error-boundary.js +0 -1
- package/dist/components/consent-banner/index.cjs +0 -1
- package/dist/components/consent-banner/index.js +0 -1
- package/dist/components/consent-banner/policy-actions.cjs +0 -1
- package/dist/components/consent-banner/policy-actions.js +0 -1
- package/dist/components/consent-dialog/atoms/card.cjs +0 -1
- package/dist/components/consent-dialog/atoms/card.js +0 -1
- package/dist/components/consent-dialog/atoms/overlay.cjs +0 -1
- package/dist/components/consent-dialog/atoms/overlay.js +0 -1
- package/dist/components/consent-dialog/atoms/root.cjs +0 -1
- package/dist/components/consent-dialog/atoms/root.js +0 -1
- package/dist/components/consent-dialog/consent-dialog.cjs +0 -1
- package/dist/components/consent-dialog/consent-dialog.js +0 -1
- package/dist/components/consent-dialog/index.cjs +0 -1
- package/dist/components/consent-dialog/index.js +0 -1
- package/dist/components/consent-dialog-link/index.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/button.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/button.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/root.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/root.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/text.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/text.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/toolbar.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/toolbar.js +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.cjs +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.js +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.js +0 -1
- package/dist/components/consent-dialog-trigger/index.cjs +0 -1
- package/dist/components/consent-dialog-trigger/index.js +0 -1
- package/dist/components/consent-dialog-trigger/types.cjs +0 -1
- package/dist/components/consent-dialog-trigger/use-draggable.cjs +0 -1
- package/dist/components/consent-dialog-trigger/use-draggable.js +0 -1
- package/dist/components/consent-preferences-link/consent-preferences-link.cjs +0 -1
- package/dist/components/consent-preferences-link/index.cjs +0 -1
- package/dist/components/consent-widget/atoms/accordion.cjs +0 -1
- package/dist/components/consent-widget/atoms/accordion.js +0 -1
- package/dist/components/consent-widget/atoms/button.cjs +0 -1
- package/dist/components/consent-widget/atoms/button.js +0 -1
- package/dist/components/consent-widget/atoms/footer.cjs +0 -1
- package/dist/components/consent-widget/atoms/footer.js +0 -1
- package/dist/components/consent-widget/atoms/root.cjs +0 -1
- package/dist/components/consent-widget/atoms/root.js +0 -1
- package/dist/components/consent-widget/consent-widget.cjs +0 -1
- package/dist/components/consent-widget/consent-widget.js +0 -1
- package/dist/components/consent-widget/index.cjs +0 -1
- package/dist/components/consent-widget/index.js +0 -1
- package/dist/components/consent-widget/policy-actions.cjs +0 -1
- package/dist/components/consent-widget/policy-actions.js +0 -1
- package/dist/components/consent-widget/types.cjs +0 -1
- package/dist/components/frame/atoms.cjs +0 -1
- package/dist/components/frame/frame.cjs +0 -1
- package/dist/components/frame/index.cjs +0 -1
- package/dist/components/frame/types.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/button-group.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/button-group.js +0 -1
- package/dist/components/iab-consent-banner/atoms/card.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/card.js +0 -1
- package/dist/components/iab-consent-banner/atoms/description.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/description.js +0 -1
- package/dist/components/iab-consent-banner/atoms/footer.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/footer.js +0 -1
- package/dist/components/iab-consent-banner/atoms/header.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/header.js +0 -1
- package/dist/components/iab-consent-banner/atoms/overlay.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/overlay.js +0 -1
- package/dist/components/iab-consent-banner/atoms/root.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/root.js +0 -1
- package/dist/components/iab-consent-banner/atoms/title.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/title.js +0 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.cjs +0 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.js +0 -1
- package/dist/components/iab-consent-banner/index.cjs +0 -1
- package/dist/components/iab-consent-banner/index.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/card.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/card.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/content.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/content.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/footer.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/footer.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/header.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/header.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/root.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/root.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.js +0 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +0 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.js +0 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +0 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.js +0 -1
- package/dist/components/iab-consent-dialog/index.cjs +0 -1
- package/dist/components/iab-consent-dialog/index.js +0 -1
- package/dist/components/iab-consent-dialog/types.cjs +0 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.cjs +0 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.js +0 -1
- package/dist/components/integrations/google-map.cjs +0 -1
- package/dist/components/integrations/google-map.js +0 -1
- package/dist/components/integrations/index.cjs +0 -1
- package/dist/components/integrations/index.js +0 -1
- package/dist/components/integrations/shared.cjs +0 -1
- package/dist/components/integrations/shared.js +0 -1
- package/dist/components/integrations/youtube-embed.cjs +0 -1
- package/dist/components/integrations/youtube-embed.js +0 -1
- package/dist/components/shared/libs/polymorphic.cjs +0 -1
- package/dist/components/shared/libs/recursive-clone-children.cjs +0 -1
- package/dist/components/shared/libs/slot.cjs +0 -1
- package/dist/components/shared/libs/use-controllable-state.cjs +0 -1
- package/dist/components/shared/policy-actions.cjs +0 -1
- package/dist/components/shared/primitives/box.cjs +0 -1
- package/dist/components/shared/primitives/button.cjs +0 -1
- package/dist/components/shared/primitives/button.types.cjs +0 -1
- package/dist/components/shared/primitives/legal-links/index.cjs +0 -1
- package/dist/components/shared/ui/accordion/accordion.cjs +0 -1
- package/dist/components/shared/ui/accordion/accordion.types.cjs +0 -1
- package/dist/components/shared/ui/accordion/index.cjs +0 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +0 -1
- package/dist/components/shared/ui/animated-collapse/index.cjs +0 -1
- package/dist/components/shared/ui/branding.cjs +0 -1
- package/dist/components/shared/ui/button/button.cjs +0 -1
- package/dist/components/shared/ui/button/button.types.cjs +0 -1
- package/dist/components/shared/ui/button/index.cjs +0 -1
- package/dist/components/shared/ui/collapsible/collapsible.cjs +0 -1
- package/dist/components/shared/ui/collapsible/index.cjs +0 -1
- package/dist/components/shared/ui/dialog/dialog.cjs +0 -1
- package/dist/components/shared/ui/dialog/index.cjs +0 -1
- package/dist/components/shared/ui/icon.cjs +0 -1
- package/dist/components/shared/ui/logo.cjs +0 -1
- package/dist/components/shared/ui/preference-item/index.cjs +0 -1
- package/dist/components/shared/ui/preference-item/preference-item.cjs +0 -1
- package/dist/components/shared/ui/switch/index.cjs +0 -1
- package/dist/components/shared/ui/switch/switch.cjs +0 -1
- package/dist/components/shared/ui/switch/switch.types.cjs +0 -1
- package/dist/components/shared/ui/tabs/index.cjs +0 -1
- package/dist/components/shared/ui/tabs/tabs.cjs +0 -1
- package/dist/context/consent-manager-context.cjs +0 -1
- package/dist/context/consent-manager-context.js +0 -1
- package/dist/context/consent-tracking-context.cjs +0 -1
- package/dist/context/theme-context.cjs +0 -1
- package/dist/headless.cjs +0 -1
- package/dist/hooks/index.cjs +0 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/use-color-scheme.cjs +0 -1
- package/dist/hooks/use-component-config.cjs +0 -1
- package/dist/hooks/use-consent-dialog-trigger.cjs +0 -1
- package/dist/hooks/use-consent-dialog-trigger.js +0 -1
- package/dist/hooks/use-consent-manager.cjs +0 -1
- package/dist/hooks/use-consent-manager.js +0 -1
- package/dist/hooks/use-consent-script.cjs +0 -1
- package/dist/hooks/use-consent-script.js +0 -1
- package/dist/hooks/use-focus-trap.cjs +0 -1
- package/dist/hooks/use-headless-consent-ui.cjs +0 -1
- package/dist/hooks/use-headless-consent-ui.js +0 -1
- package/dist/hooks/use-headless-iab-consent-ui.cjs +0 -1
- package/dist/hooks/use-reduced-motion.cjs +0 -1
- package/dist/hooks/use-scroll-lock.cjs +0 -1
- package/dist/hooks/use-ssr-status.cjs +0 -1
- package/dist/hooks/use-ssr-status.js +0 -1
- package/dist/hooks/use-styles.cjs +0 -1
- package/dist/hooks/use-styles.js +0 -1
- package/dist/hooks/use-text-direction.cjs +0 -1
- package/dist/hooks/use-theme.cjs +0 -1
- package/dist/hooks/use-translations.cjs +0 -1
- package/dist/hooks/use-translations.js +0 -1
- package/dist/iab.cjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/primitives/accordion.cjs +0 -1
- package/dist/primitives/button.cjs +0 -1
- package/dist/primitives/collapsible.cjs +0 -1
- package/dist/primitives/dialog.cjs +0 -1
- package/dist/primitives/preference-item.cjs +0 -1
- package/dist/primitives/switch.cjs +0 -1
- package/dist/primitives/tabs.cjs +0 -1
- package/dist/primitives.cjs +0 -1
- package/dist/providers/consent-manager-provider.cjs +0 -1
- package/dist/providers/consent-manager-provider.js +0 -1
- package/dist/server/fetch-ssr-data.cjs +0 -1
- package/dist/server/headers.cjs +0 -1
- package/dist/server/index.cjs +0 -1
- package/dist/server/init-cache-key.cjs +0 -1
- package/dist/server/normalize-url.cjs +0 -1
- package/dist/server/types.cjs +0 -1
- package/dist/types/consent-manager.cjs +0 -1
- package/dist/types/theme/index.cjs +0 -1
- package/dist/types/theme/style-keys.cjs +0 -1
- package/dist/types/theme/style-types.cjs +0 -1
- package/dist/utils/cn.cjs +0 -1
- package/dist/utils/merge-styles.cjs +0 -1
- package/dist/utils/test-helpers.cjs +0 -1
- package/dist/utils/test-helpers.js +0 -1
- package/dist/utils/theme-utils.cjs +0 -1
- package/dist/version.cjs +0 -1
- package/dist-types/components/consent-banner/atoms/root.d.ts +0 -126
- package/dist-types/components/consent-banner/policy-actions.d.ts +0 -11
- package/dist-types/components/consent-widget/policy-actions.d.ts +0 -11
- package/dist-types/components/iab-consent-dialog/hooks/use-gvl-data.d.ts +0 -27
- package/dist-types/components/iab-consent-dialog/types.d.ts +0 -72
- package/dist-types/components/integrations/google-map.d.ts +0 -82
- package/dist-types/components/integrations/index.d.ts +0 -2
- package/dist-types/components/integrations/shared.d.ts +0 -12
- package/dist-types/components/integrations/youtube-embed.d.ts +0 -95
- package/dist-types/context/consent-manager-context.d.ts +0 -31
- package/dist-types/hooks/index.d.ts +0 -12
- package/dist-types/hooks/use-consent-dialog-trigger.d.ts +0 -10
- package/dist-types/hooks/use-consent-manager.d.ts +0 -27
- package/dist-types/hooks/use-consent-script.d.ts +0 -80
- package/dist-types/hooks/use-headless-consent-ui.d.ts +0 -46
- package/dist-types/hooks/use-ssr-status.d.ts +0 -57
- package/dist-types/hooks/use-styles.d.ts +0 -21
- package/dist-types/hooks/use-translations.d.ts +0 -28
- package/dist-types/providers/consent-manager-provider.d.ts +0 -40
- package/dist-types/types/consent-manager.d.ts +0 -39
- package/dist-types/types/theme/style-keys.d.ts +0 -1
- package/dist-types/utils/test-helpers.d.ts +0 -31
- package/docs/frameworks/react/building-headless-components.md +0 -370
- package/docs/frameworks/react/callbacks.md +0 -186
- package/docs/frameworks/react/concepts/client-modes.md +0 -177
- package/docs/frameworks/react/concepts/consent-models.md +0 -113
- package/docs/frameworks/react/concepts/cookie-management.md +0 -122
- package/docs/frameworks/react/concepts/glossary.md +0 -24
- package/docs/frameworks/react/concepts/initialization-flow.md +0 -149
- package/docs/frameworks/react/concepts/policy-packs.md +0 -228
- package/docs/frameworks/react/hooks/use-color-scheme.md +0 -41
- package/docs/frameworks/react/hooks/use-consent-manager/checking-consent.md +0 -96
- package/docs/frameworks/react/hooks/use-consent-manager/location-info.md +0 -97
- package/docs/frameworks/react/hooks/use-consent-manager/setting-consent.md +0 -94
- package/docs/frameworks/react/hooks/use-draggable.md +0 -59
- package/docs/frameworks/react/hooks/use-focus-trap.md +0 -42
- package/docs/frameworks/react/hooks/use-reduced-motion.md +0 -37
- package/docs/frameworks/react/hooks/use-ssr-status.md +0 -32
- package/docs/frameworks/react/hooks/use-text-direction.md +0 -50
- package/docs/frameworks/react/hooks/use-translations.md +0 -55
- package/docs/frameworks/react/iab/consent-banner.md +0 -91
- package/docs/frameworks/react/iab/consent-dialog.md +0 -129
- package/docs/frameworks/react/iab/use-gvl-data.md +0 -21
- package/docs/frameworks/react/iframe-blocking.md +0 -106
- package/docs/frameworks/react/internationalization.md +0 -207
- package/docs/frameworks/react/network-blocker.md +0 -140
- package/docs/frameworks/react/optimization.md +0 -148
- package/docs/frameworks/react/policy-packs.md +0 -242
- package/docs/frameworks/react/server-side.md +0 -158
- package/docs/frameworks/react/styling/classnames.md +0 -94
- package/docs/frameworks/react/styling/color-scheme.md +0 -84
- package/docs/frameworks/react/styling/css-variables.md +0 -53
- package/docs/frameworks/react/styling/slots.md +0 -94
- package/docs/frameworks/react/styling/tailwind.md +0 -119
- package/docs/frameworks/react/styling/tokens.md +0 -156
- package/docs/shared/concepts/client-modes.md +0 -103
- package/docs/shared/concepts/consent-categories.md +0 -41
- package/docs/shared/concepts/consent-models.md +0 -72
- package/docs/shared/concepts/cookie-management.md +0 -88
- package/docs/shared/concepts/glossary.md +0 -24
- package/docs/shared/concepts/initialization-flow.md +0 -105
- package/docs/shared/concepts/policy-packs.md +0 -225
- package/docs/shared/react/components/consent-banner.md +0 -242
- package/docs/shared/react/components/consent-dialog-link.md +0 -45
- package/docs/shared/react/components/consent-dialog-trigger.md +0 -185
- package/docs/shared/react/components/consent-dialog.md +0 -119
- package/docs/shared/react/components/consent-manager-provider.md +0 -225
- package/docs/shared/react/components/consent-widget.md +0 -121
- package/docs/shared/react/components/dev-tools.md +0 -81
- package/docs/shared/react/components/frame.md +0 -52
- package/docs/shared/react/guides/building-headless-components.md +0 -110
- package/docs/shared/react/guides/callbacks.md +0 -89
- package/docs/shared/react/guides/headless.md +0 -31
- package/docs/shared/react/guides/iframe-blocking.md +0 -65
- package/docs/shared/react/guides/internationalization.md +0 -123
- package/docs/shared/react/guides/network-blocker.md +0 -72
- package/docs/shared/react/guides/optimization.md +0 -44
- package/docs/shared/react/guides/policy-packs.md +0 -173
- package/docs/shared/react/guides/script-loader.md +0 -311
- package/docs/shared/react/hooks/use-color-scheme.md +0 -31
- package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +0 -95
- package/docs/shared/react/hooks/use-consent-manager/location-info.md +0 -96
- package/docs/shared/react/hooks/use-consent-manager/overview.md +0 -74
- package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +0 -93
- package/docs/shared/react/hooks/use-draggable.md +0 -30
- package/docs/shared/react/hooks/use-focus-trap.md +0 -20
- package/docs/shared/react/hooks/use-reduced-motion.md +0 -33
- package/docs/shared/react/hooks/use-ssr-status.md +0 -16
- package/docs/shared/react/hooks/use-text-direction.md +0 -38
- package/docs/shared/react/hooks/use-translations.md +0 -15
- package/docs/shared/react/iab/consent-banner.md +0 -60
- package/docs/shared/react/iab/consent-dialog.md +0 -76
- package/docs/shared/react/iab/overview.md +0 -80
- package/docs/shared/react/iab/use-gvl-data.md +0 -21
- package/docs/shared/react/styling/classnames.md +0 -93
- package/docs/shared/react/styling/color-scheme.md +0 -35
- package/docs/shared/react/styling/css-variables.md +0 -53
- package/docs/shared/react/styling/overview.md +0 -261
- package/docs/shared/react/styling/slots.md +0 -93
- package/docs/shared/react/styling/stylesheet-entrypoint.md +0 -8
- package/docs/shared/react/styling/tailwind.md +0 -88
- package/docs/shared/react/styling/tokens.md +0 -155
- package/docs/shared/troubleshooting.md +0 -82
- /package/dist/components/{consent-dialog-trigger → iab-panel}/types.js +0 -0
- /package/dist/components/{consent-widget → panel-trigger}/types.js +0 -0
- /package/dist/components/{iab-consent-dialog → preferences}/types.js +0 -0
- /package/dist/types/{consent-manager.js → manager.js} +0 -0
- /package/dist/types/{theme/style-keys.js → slots.js} +0 -0
- /package/dist-types/components/{consent-dialog-link → panel-link}/index.d.ts +0 -0
- /package/dist-types/components/{consent-widget → preferences}/atoms/button.d.ts +0 -0
- /package/dist-types/components/{consent-widget/consent-widget.d.ts → preferences/preferences.d.ts} +0 -0
- /package/dist-types/components/{consent-widget → preferences}/types.d.ts +0 -0
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Class Names
|
|
3
|
-
description: Style consent components using className props and per-slot
|
|
4
|
-
className targeting via the theme.
|
|
5
|
-
group: frameworks
|
|
6
|
-
---
|
|
7
|
-
## Prefer Slots for Stock Components
|
|
8
|
-
|
|
9
|
-
There is no single top-level `className` contract across every pre-built consent component.
|
|
10
|
-
|
|
11
|
-
For the stock `ConsentBanner`, `ConsentDialog`, and `ConsentWidget`, prefer `theme.slots` first. That keeps the markup intact and lets you target the exact part you need.
|
|
12
|
-
|
|
13
|
-
## Per-Slot className
|
|
14
|
-
|
|
15
|
-
Target individual component parts via the theme's `slots` object. Each slot accepts a string (className) or an object with `className` and `style`:
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
const theme = {
|
|
19
|
-
slots: {
|
|
20
|
-
consentBannerTitle: 'text-xl font-semibold',
|
|
21
|
-
consentBannerDescription: 'text-sm text-gray-600',
|
|
22
|
-
consentBannerFooter: 'flex gap-3',
|
|
23
|
-
buttonPrimary: 'rounded-full px-6',
|
|
24
|
-
},
|
|
25
|
-
} satisfies Theme;
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## Combining with CSS Modules
|
|
29
|
-
|
|
30
|
-
```tsx
|
|
31
|
-
import styles from './consent.module.css';
|
|
32
|
-
|
|
33
|
-
const theme = {
|
|
34
|
-
slots: {
|
|
35
|
-
consentBannerCard: styles.bannerCard,
|
|
36
|
-
consentBannerTitle: styles.bannerTitle,
|
|
37
|
-
buttonPrimary: styles.primaryButton,
|
|
38
|
-
},
|
|
39
|
-
} satisfies Theme;
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
```css title="consent.module.css"
|
|
43
|
-
.bannerCard {
|
|
44
|
-
backdrop-filter: blur(12px);
|
|
45
|
-
background: rgba(255, 255, 255, 0.9);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.bannerTitle {
|
|
49
|
-
font-size: 1.25rem;
|
|
50
|
-
font-weight: 700;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.primaryButton {
|
|
54
|
-
border-radius: 9999px;
|
|
55
|
-
text-transform: uppercase;
|
|
56
|
-
letter-spacing: 0.05em;
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## When to Use Raw className
|
|
61
|
-
|
|
62
|
-
Use raw className-level styling when:
|
|
63
|
-
|
|
64
|
-
* your styling system is already class-driven
|
|
65
|
-
* tokens are too broad for the change
|
|
66
|
-
* slots already identify the correct element
|
|
67
|
-
|
|
68
|
-
If the request is "make the banner footer darker", prefer `theme.colors.surfaceHover` first. If the request is "add a border and spacing only to the footer", prefer `theme.slots.consentBannerFooter`.
|
|
69
|
-
|
|
70
|
-
## Advanced: `noStyle`
|
|
71
|
-
|
|
72
|
-
Use `noStyle` only when you want to remove defaults and style from scratch while still keeping c15t's component structure:
|
|
73
|
-
|
|
74
|
-
```tsx
|
|
75
|
-
{/* Remove all styles from a specific component */}
|
|
76
|
-
<ConsentBanner noStyle />
|
|
77
|
-
|
|
78
|
-
{/* Remove all styles globally */}
|
|
79
|
-
<ConsentManagerProvider options={{ noStyle: true, ... }}>
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
You can also set `noStyle` per-slot:
|
|
83
|
-
|
|
84
|
-
```tsx
|
|
85
|
-
const theme = {
|
|
86
|
-
slots: {
|
|
87
|
-
consentBannerCard: { noStyle: true, className: 'my-custom-card' },
|
|
88
|
-
},
|
|
89
|
-
} satisfies Theme;
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Treat `noStyle` as an advanced escape hatch. Do not jump to it just because a token or slot needs debugging.
|
|
93
|
-
|
|
94
|
-
For full custom markup and behavior, continue to [Headless Mode](../headless).
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Color Scheme
|
|
3
|
-
description: Support light mode, dark mode, and system preference detection in
|
|
4
|
-
consent components.
|
|
5
|
-
group: frameworks
|
|
6
|
-
---
|
|
7
|
-
c15t supports light and dark mode through the theme's `colors` and `dark` token groups. The active color scheme is determined by one of three methods:
|
|
8
|
-
|
|
9
|
-
1. **Explicit setting** via the `colorScheme` option
|
|
10
|
-
2. **CSS class detection** - c15t checks for `.dark` on the document element
|
|
11
|
-
3. **System preference** - matches `prefers-color-scheme` media query
|
|
12
|
-
|
|
13
|
-
## Configuration
|
|
14
|
-
|
|
15
|
-
Set the color scheme on the provider:
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
import { type ReactNode } from 'react';
|
|
19
|
-
import { ConsentManagerProvider } from '@c15t/react';
|
|
20
|
-
|
|
21
|
-
function ConsentManager({ children }: { children: ReactNode }) {
|
|
22
|
-
return (
|
|
23
|
-
<ConsentManagerProvider
|
|
24
|
-
options={{
|
|
25
|
-
mode: 'hosted',
|
|
26
|
-
backendURL: 'https://your-instance.c15t.dev',
|
|
27
|
-
colorScheme: 'system', // 'light' | 'dark' | 'system'
|
|
28
|
-
theme: {
|
|
29
|
-
colors: {
|
|
30
|
-
primary: '#6366f1',
|
|
31
|
-
surface: '#ffffff',
|
|
32
|
-
text: '#1f2937',
|
|
33
|
-
},
|
|
34
|
-
dark: {
|
|
35
|
-
primary: '#818cf8',
|
|
36
|
-
surface: '#1f2937',
|
|
37
|
-
text: '#f9fafb',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
}}
|
|
41
|
-
>
|
|
42
|
-
{children}
|
|
43
|
-
</ConsentManagerProvider>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## useColorScheme Hook
|
|
49
|
-
|
|
50
|
-
For programmatic control over the color scheme:
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
import { useColorScheme } from '@c15t/react';
|
|
54
|
-
|
|
55
|
-
function ThemeToggle() {
|
|
56
|
-
// Pass the desired scheme - 'light', 'dark', 'system', or null (disable)
|
|
57
|
-
useColorScheme('system');
|
|
58
|
-
}
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
|Value|Behavior|
|
|
62
|
-
|--|--|
|
|
63
|
-
|`'light'`|Force light mode|
|
|
64
|
-
|`'dark'`|Force dark mode|
|
|
65
|
-
|`'system'`|Follow `prefers-color-scheme` media query|
|
|
66
|
-
|`null`|Disable - c15t won't manage color scheme|
|
|
67
|
-
|
|
68
|
-
## How Dark Mode Works
|
|
69
|
-
|
|
70
|
-
When dark mode is active, c15t applies the `dark` token values as CSS variable overrides. Only tokens specified in `dark` are overridden - unset tokens fall back to the `colors` values. This also applies to `textOnPrimary`: if you omit it, c15t derives a readable foreground from the active `primary` color in that scheme.
|
|
71
|
-
|
|
72
|
-
```tsx
|
|
73
|
-
const theme = {
|
|
74
|
-
colors: {
|
|
75
|
-
surface: '#ffffff', // Light mode
|
|
76
|
-
text: '#1f2937', // Light mode
|
|
77
|
-
},
|
|
78
|
-
dark: {
|
|
79
|
-
surface: '#1f2937', // Dark mode override
|
|
80
|
-
text: '#f9fafb', // Dark mode override
|
|
81
|
-
// primary is NOT set - inherits from colors.primary
|
|
82
|
-
},
|
|
83
|
-
} satisfies Theme;
|
|
84
|
-
```
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: CSS Variables
|
|
3
|
-
description: Reference for all --c15t-* CSS custom properties generated by the theme system.
|
|
4
|
-
group: frameworks
|
|
5
|
-
---
|
|
6
|
-
Every theme token is converted to a `--c15t-*` CSS custom property at runtime. You can override these variables in your stylesheet without using the JavaScript theme API.
|
|
7
|
-
|
|
8
|
-
## Variable Reference
|
|
9
|
-
|
|
10
|
-
|Property|Value|
|
|
11
|
-
|:--|:--|
|
|
12
|
-
|Type Name|\`ThemeCSSVariables\`|
|
|
13
|
-
|Source Path|\`./packages/ui/src/theme/types.ts\`|
|
|
14
|
-
|
|
15
|
-
\*ExtractedTypeTable: Could not extract "ThemeCSSVariables" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
16
|
-
|
|
17
|
-
## Overriding Variables
|
|
18
|
-
|
|
19
|
-
Override in your stylesheet:
|
|
20
|
-
|
|
21
|
-
```css
|
|
22
|
-
:root {
|
|
23
|
-
--c15t-primary: #8b5cf6;
|
|
24
|
-
--c15t-surface: #fafafa;
|
|
25
|
-
--c15t-radius-md: 1rem;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/* Dark mode overrides */
|
|
29
|
-
.dark,
|
|
30
|
-
.c15t-dark {
|
|
31
|
-
--c15t-primary: #a78bfa;
|
|
32
|
-
--c15t-surface: #18181b;
|
|
33
|
-
--c15t-text: #fafafa;
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Scoped Overrides
|
|
38
|
-
|
|
39
|
-
Target specific components by scoping variables:
|
|
40
|
-
|
|
41
|
-
```tsx
|
|
42
|
-
<div className="checkout-consent">
|
|
43
|
-
<ConsentBanner />
|
|
44
|
-
</div>
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
```css
|
|
48
|
-
/* Only affect c15t components inside .checkout-consent */
|
|
49
|
-
.checkout-consent {
|
|
50
|
-
--c15t-surface: #f0f9ff;
|
|
51
|
-
--c15t-radius-lg: 1.5rem;
|
|
52
|
-
}
|
|
53
|
-
```
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Component Slots
|
|
3
|
-
description: Target individual component parts with styles using the slot system
|
|
4
|
-
- className strings or inline style objects.
|
|
5
|
-
group: frameworks
|
|
6
|
-
---
|
|
7
|
-
## What are Slots?
|
|
8
|
-
|
|
9
|
-
Slots let you target specific parts of consent components with styles. Each component is built from named slots such as `consentBannerTitle` and `consentDialogTag`.
|
|
10
|
-
|
|
11
|
-
Use slots after the stock component APIs and design tokens:
|
|
12
|
-
|
|
13
|
-
* If the change is semantic, prefer tokens first. For example, the stock banner footer background comes from `theme.colors.surfaceHover`.
|
|
14
|
-
* If the component part is correct but you need a local tweak, use a slot.
|
|
15
|
-
|
|
16
|
-
Common banner slot choices:
|
|
17
|
-
|
|
18
|
-
* `consentBannerCard` for card radius, shadow, width, and local background treatment
|
|
19
|
-
* `consentBannerFooter` for spacing, borders, and local footer styling
|
|
20
|
-
* `consentBannerTitle` for title typography
|
|
21
|
-
* `buttonPrimary` and `buttonSecondary` for shared button classes
|
|
22
|
-
|
|
23
|
-
## Using Slots
|
|
24
|
-
|
|
25
|
-
Pass slot styles in the theme's `slots` object:
|
|
26
|
-
|
|
27
|
-
```tsx
|
|
28
|
-
const theme = {
|
|
29
|
-
slots: {
|
|
30
|
-
consentBannerFooter: 'border-t border-black/10 px-6',
|
|
31
|
-
consentBannerTitle: 'text-xl font-bold tracking-tight',
|
|
32
|
-
|
|
33
|
-
// Object value = className + inline styles
|
|
34
|
-
consentBannerCard: {
|
|
35
|
-
className: 'rounded-xl shadow-lg',
|
|
36
|
-
style: { maxWidth: '600px' },
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
} satisfies Theme;
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Slot Style Types
|
|
43
|
-
|
|
44
|
-
Each slot accepts either a `string` (treated as className) or a `SlotStyle` object:
|
|
45
|
-
|
|
46
|
-
```tsx
|
|
47
|
-
// String: treated as className
|
|
48
|
-
consentBannerTitle: 'my-custom-class'
|
|
49
|
-
|
|
50
|
-
// Object: className + style + noStyle
|
|
51
|
-
consentBannerFooter: {
|
|
52
|
-
className: 'border-t border-black/10',
|
|
53
|
-
style: { paddingBlock: '1rem' },
|
|
54
|
-
noStyle: false, // Set true only when you want to remove this slot's default styling
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
`noStyle` on a slot is an advanced escape hatch. Start with className and style overrides first.
|
|
59
|
-
|
|
60
|
-
## Example: Style the stock banner without changing markup
|
|
61
|
-
|
|
62
|
-
```tsx
|
|
63
|
-
const theme = {
|
|
64
|
-
colors: {
|
|
65
|
-
surface: '#fffdf8',
|
|
66
|
-
surfaceHover: '#f6f3ee',
|
|
67
|
-
},
|
|
68
|
-
slots: {
|
|
69
|
-
consentBannerCard: 'rounded-[28px] shadow-xl',
|
|
70
|
-
consentBannerFooter: 'border-t border-black/10 px-6',
|
|
71
|
-
consentBannerTitle: 'tracking-tight',
|
|
72
|
-
},
|
|
73
|
-
} satisfies Theme;
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Available Slots
|
|
77
|
-
|
|
78
|
-
Use the typed API reference below for the full slot list and descriptions. It stays in sync with the actual component slot surface.
|
|
79
|
-
|
|
80
|
-
## API Reference
|
|
81
|
-
|
|
82
|
-
|Property|Value|
|
|
83
|
-
|:--|:--|
|
|
84
|
-
|Type Name|\`ComponentSlots\`|
|
|
85
|
-
|Source Path|\`./packages/ui/src/theme/types.ts\`|
|
|
86
|
-
|
|
87
|
-
\*ExtractedTypeTable: Could not extract "ComponentSlots" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
88
|
-
|
|
89
|
-
|Property|Value|
|
|
90
|
-
|:--|:--|
|
|
91
|
-
|Type Name|\`SlotStyle\`|
|
|
92
|
-
|Source Path|\`./packages/ui/src/theme/types.ts\`|
|
|
93
|
-
|
|
94
|
-
\*ExtractedTypeTable: Could not extract "SlotStyle" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Tailwind CSS
|
|
3
|
-
description: Use Tailwind CSS utility classes to style consent components via
|
|
4
|
-
the slot system.
|
|
5
|
-
group: frameworks
|
|
6
|
-
---
|
|
7
|
-
c15t works with Tailwind CSS out of the box. Use the `slots` theme option to apply Tailwind utility classes to any component part.
|
|
8
|
-
|
|
9
|
-
## Setup
|
|
10
|
-
|
|
11
|
-
Import the standard c15t stylesheet once in your app-level CSS entrypoint:
|
|
12
|
-
|
|
13
|
-
```css
|
|
14
|
-
/* React: src/index.css */
|
|
15
|
-
@import "@c15t/react/styles.css";
|
|
16
|
-
|
|
17
|
-
/* Next.js: app/globals.css */
|
|
18
|
-
@import "@c15t/nextjs/styles.css";
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
Keeping the c15t stylesheet in your global CSS entrypoint makes layer and cascade order explicit. JS/TSX side-effect imports can load in a different order across framework and Tailwind tooling, which makes style regressions harder to debug.
|
|
22
|
-
|
|
23
|
-
With Tailwind v4, keep c15t at the end of the top-level `@import` block so Fumadocs, `tw-animate-css`, and other preset imports do not override c15t theme tokens.
|
|
24
|
-
|
|
25
|
-
### Tailwind v4
|
|
26
|
-
|
|
27
|
-
Tailwind v4 automatically scans your source files. Import Tailwind normally, then keep the c15t stylesheet last in the top-level `@import` block so Fumadocs, `tw-animate-css`, or other preset styles load first. c15t component styles join Tailwind's `components` layer automatically, so no extra c15t-specific layer declaration is needed:
|
|
28
|
-
|
|
29
|
-
```css title="src/index.css"
|
|
30
|
-
@import "tailwindcss";
|
|
31
|
-
@import "tw-animate-css";
|
|
32
|
-
@import "@c15t/react/styles.css";
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
```css title="app/globals.css"
|
|
36
|
-
@import "tailwindcss";
|
|
37
|
-
@import "tw-animate-css";
|
|
38
|
-
@import "@c15t/nextjs/styles.css";
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Tailwind v3
|
|
42
|
-
|
|
43
|
-
Import the Tailwind 3-compatible c15t stylesheet after `@tailwind components;` and before `@tailwind utilities;`:
|
|
44
|
-
|
|
45
|
-
```css title="src/index.css"
|
|
46
|
-
@tailwind base;
|
|
47
|
-
@tailwind components;
|
|
48
|
-
@import "@c15t/react/styles.tw3.css";
|
|
49
|
-
@tailwind utilities;
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
```css title="app/globals.css"
|
|
53
|
-
@tailwind base;
|
|
54
|
-
@tailwind components;
|
|
55
|
-
@import "@c15t/nextjs/styles.tw3.css";
|
|
56
|
-
@tailwind utilities;
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Using Tailwind with Slots
|
|
60
|
-
|
|
61
|
-
Apply Tailwind classes via the theme's `slots` object:
|
|
62
|
-
|
|
63
|
-
```tsx
|
|
64
|
-
import { type ReactNode } from 'react';
|
|
65
|
-
import { type Theme, ConsentManagerProvider } from '@c15t/react';
|
|
66
|
-
|
|
67
|
-
const theme = {
|
|
68
|
-
slots: {
|
|
69
|
-
consentBanner: 'fixed bottom-0 inset-x-0 z-50',
|
|
70
|
-
consentBannerCard: 'mx-auto max-w-2xl rounded-t-2xl bg-white p-6 shadow-2xl',
|
|
71
|
-
consentBannerTitle: 'text-lg font-semibold text-gray-900',
|
|
72
|
-
consentBannerDescription: 'mt-2 text-sm text-gray-600',
|
|
73
|
-
consentBannerFooter: 'mt-4 flex flex-wrap gap-3',
|
|
74
|
-
buttonPrimary: 'rounded-full bg-indigo-600 px-6 py-2.5 text-sm font-medium text-white hover:bg-indigo-700',
|
|
75
|
-
buttonSecondary: 'rounded-full border border-gray-300 px-6 py-2.5 text-sm font-medium text-gray-700 hover:bg-gray-50',
|
|
76
|
-
toggle: 'data-[state=checked]:bg-indigo-600',
|
|
77
|
-
},
|
|
78
|
-
} satisfies Theme;
|
|
79
|
-
|
|
80
|
-
export function ConsentManager({ children }: { children: ReactNode }) {
|
|
81
|
-
return (
|
|
82
|
-
<ConsentManagerProvider options={{ theme, mode: 'hosted', backendURL: 'https://your-instance.c15t.dev' }}>
|
|
83
|
-
{children}
|
|
84
|
-
</ConsentManagerProvider>
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
## Dark Mode with Tailwind
|
|
90
|
-
|
|
91
|
-
Combine Tailwind's dark mode with c15t's `dark` tokens:
|
|
92
|
-
|
|
93
|
-
```tsx
|
|
94
|
-
const theme = {
|
|
95
|
-
colors: {
|
|
96
|
-
primary: '#6366f1',
|
|
97
|
-
surface: '#ffffff',
|
|
98
|
-
text: '#1f2937',
|
|
99
|
-
},
|
|
100
|
-
dark: {
|
|
101
|
-
primary: '#818cf8',
|
|
102
|
-
surface: '#1f2937',
|
|
103
|
-
text: '#f9fafb',
|
|
104
|
-
},
|
|
105
|
-
slots: {
|
|
106
|
-
consentBannerCard: 'bg-white dark:bg-gray-900 shadow-lg dark:shadow-gray-900/30',
|
|
107
|
-
consentBannerTitle: 'text-gray-900 dark:text-gray-100',
|
|
108
|
-
},
|
|
109
|
-
} satisfies Theme;
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
## Optional: noStyle Mode
|
|
113
|
-
|
|
114
|
-
If you want Tailwind to own all layout and visual styling, use `noStyle: true`.
|
|
115
|
-
|
|
116
|
-
> ℹ️ **Info:**
|
|
117
|
-
> When using noStyle: true with Tailwind, you're responsible for all layout and visual styling. Start with slots first, then switch to noStyle only when you need full control.
|
|
118
|
-
|
|
119
|
-
For full custom markup (not just styles), see [Headless Mode](../headless).
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Design Tokens
|
|
3
|
-
description: The six base token categories that control colors, typography,
|
|
4
|
-
spacing, radius, shadows, and motion, plus optional dark-mode overrides.
|
|
5
|
-
group: frameworks
|
|
6
|
-
---
|
|
7
|
-
## Color Tokens
|
|
8
|
-
|
|
9
|
-
Color tokens define the palette for all consent components. Set `colors` for light mode and `dark` for dark mode overrides.
|
|
10
|
-
|
|
11
|
-
When `textOnPrimary` is omitted, c15t derives it automatically from `primary` to keep text readable on primary-filled surfaces such as stock branding tags and buttons. Set `textOnPrimary` explicitly when you need a specific foreground color.
|
|
12
|
-
|
|
13
|
-
```tsx
|
|
14
|
-
const theme = {
|
|
15
|
-
colors: {
|
|
16
|
-
primary: '#6366f1',
|
|
17
|
-
primaryHover: '#4f46e5',
|
|
18
|
-
surface: '#ffffff',
|
|
19
|
-
surfaceHover: '#f9fafb',
|
|
20
|
-
border: '#e5e7eb',
|
|
21
|
-
borderHover: '#d1d5db',
|
|
22
|
-
text: '#1f2937',
|
|
23
|
-
textMuted: '#6b7280',
|
|
24
|
-
textOnPrimary: '#ffffff',
|
|
25
|
-
overlay: 'rgba(0, 0, 0, 0.5)',
|
|
26
|
-
switchTrack: '#d1d5db',
|
|
27
|
-
switchTrackActive: '#6366f1',
|
|
28
|
-
switchThumb: '#ffffff',
|
|
29
|
-
},
|
|
30
|
-
dark: {
|
|
31
|
-
primary: '#818cf8',
|
|
32
|
-
surface: '#1f2937',
|
|
33
|
-
text: '#f9fafb',
|
|
34
|
-
textMuted: '#9ca3af',
|
|
35
|
-
border: '#374151',
|
|
36
|
-
},
|
|
37
|
-
} satisfies Theme;
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
|Property|Value|
|
|
41
|
-
|:--|:--|
|
|
42
|
-
|Type Name|\`ColorTokens\`|
|
|
43
|
-
|Source Path|\`./packages/ui/src/theme/types.ts\`|
|
|
44
|
-
|
|
45
|
-
\*ExtractedTypeTable: Could not extract "ColorTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
46
|
-
|
|
47
|
-
## Typography Tokens
|
|
48
|
-
|
|
49
|
-
Control font family, sizes, weights, and line heights.
|
|
50
|
-
|
|
51
|
-
```tsx
|
|
52
|
-
const theme = {
|
|
53
|
-
typography: {
|
|
54
|
-
fontFamily: 'Inter, system-ui, sans-serif',
|
|
55
|
-
fontSize: { sm: '0.875rem', base: '1rem', lg: '1.125rem' },
|
|
56
|
-
fontWeight: { normal: 400, medium: 500, semibold: 600 },
|
|
57
|
-
lineHeight: { tight: '1.25', normal: '1.5', relaxed: '1.75' },
|
|
58
|
-
},
|
|
59
|
-
} satisfies Theme;
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
|Property|Value|
|
|
63
|
-
|:--|:--|
|
|
64
|
-
|Type Name|\`TypographyTokens\`|
|
|
65
|
-
|Source Path|\`./packages/ui/src/theme/types.ts\`|
|
|
66
|
-
|
|
67
|
-
\*ExtractedTypeTable: Could not extract "TypographyTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
68
|
-
|
|
69
|
-
## Spacing Tokens
|
|
70
|
-
|
|
71
|
-
Five-step scale for internal padding, margins, and gaps.
|
|
72
|
-
|
|
73
|
-
```tsx
|
|
74
|
-
const theme = {
|
|
75
|
-
spacing: {
|
|
76
|
-
xs: '0.25rem', // 4px
|
|
77
|
-
sm: '0.5rem', // 8px
|
|
78
|
-
md: '1rem', // 16px
|
|
79
|
-
lg: '1.5rem', // 24px
|
|
80
|
-
xl: '2rem', // 32px
|
|
81
|
-
},
|
|
82
|
-
} satisfies Theme;
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
|Property|Value|
|
|
86
|
-
|:--|:--|
|
|
87
|
-
|Type Name|\`SpacingTokens\`|
|
|
88
|
-
|Source Path|\`./packages/ui/src/theme/types.ts\`|
|
|
89
|
-
|
|
90
|
-
\*ExtractedTypeTable: Could not extract "SpacingTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
91
|
-
|
|
92
|
-
## Radius Tokens
|
|
93
|
-
|
|
94
|
-
Border radius scale for rounded corners.
|
|
95
|
-
|
|
96
|
-
```tsx
|
|
97
|
-
const theme = {
|
|
98
|
-
radius: {
|
|
99
|
-
sm: '0.25rem', // 4px
|
|
100
|
-
md: '0.5rem', // 8px
|
|
101
|
-
lg: '0.75rem', // 12px
|
|
102
|
-
full: '9999px', // Pill shape
|
|
103
|
-
},
|
|
104
|
-
} satisfies Theme;
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
|Property|Value|
|
|
108
|
-
|:--|:--|
|
|
109
|
-
|Type Name|\`RadiusTokens\`|
|
|
110
|
-
|Source Path|\`./packages/ui/src/theme/types.ts\`|
|
|
111
|
-
|
|
112
|
-
\*ExtractedTypeTable: Could not extract "RadiusTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
113
|
-
|
|
114
|
-
## Shadow Tokens
|
|
115
|
-
|
|
116
|
-
Box shadow scale for depth and elevation.
|
|
117
|
-
|
|
118
|
-
```tsx
|
|
119
|
-
const theme = {
|
|
120
|
-
shadows: {
|
|
121
|
-
sm: '0 1px 2px hsla(0, 0%, 0%, 0.05)',
|
|
122
|
-
md: '0 4px 12px hsla(0, 0%, 0%, 0.08)',
|
|
123
|
-
lg: '0 8px 24px hsla(0, 0%, 0%, 0.12)',
|
|
124
|
-
},
|
|
125
|
-
} satisfies Theme;
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
|Property|Value|
|
|
129
|
-
|:--|:--|
|
|
130
|
-
|Type Name|\`ShadowTokens\`|
|
|
131
|
-
|Source Path|\`./packages/ui/src/theme/types.ts\`|
|
|
132
|
-
|
|
133
|
-
\*ExtractedTypeTable: Could not extract "ShadowTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|
|
134
|
-
|
|
135
|
-
## Motion Tokens
|
|
136
|
-
|
|
137
|
-
Animation duration and easing presets.
|
|
138
|
-
|
|
139
|
-
```tsx
|
|
140
|
-
const theme = {
|
|
141
|
-
motion: {
|
|
142
|
-
duration: { fast: '100ms', normal: '200ms', slow: '300ms' },
|
|
143
|
-
easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
144
|
-
easingOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
|
|
145
|
-
easingInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
|
|
146
|
-
easingSpring: 'cubic-bezier(0.34, 1.56, 0.64, 1)',
|
|
147
|
-
},
|
|
148
|
-
} satisfies Theme;
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
|Property|Value|
|
|
152
|
-
|:--|:--|
|
|
153
|
-
|Type Name|\`MotionTokens\`|
|
|
154
|
-
|Source Path|\`./packages/ui/src/theme/types.ts\`|
|
|
155
|
-
|
|
156
|
-
\*ExtractedTypeTable: Could not extract "MotionTokens" from "./packages/ui/src/theme/types.ts" using base path "/home/runner/work/c15t/c15t". Verify the path/name and that the file is included by your tsconfig.\*
|