@c15t/react 2.0.4 → 2.2.0-canary-20260727202135
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 +155 -0
- package/README.md +29 -14
- package/client/components/integrations.js +3 -0
- package/dist/components/consent-banner/atoms/overlay.cjs +1 -1
- package/dist/components/consent-banner/atoms/root.cjs +1 -1
- package/dist/components/consent-banner/components.cjs +1 -1
- package/dist/components/consent-banner/consent-banner.cjs +1 -1
- package/dist/components/consent-banner/error-boundary.cjs +1 -1
- package/dist/components/consent-banner/index.cjs +1 -1
- package/dist/components/consent-banner/policy-actions.cjs +1 -1
- package/dist/components/consent-dialog/atoms/card.cjs +1 -1
- package/dist/components/consent-dialog/atoms/overlay.cjs +1 -1
- package/dist/components/consent-dialog/atoms/root.cjs +1 -1
- package/dist/components/consent-dialog/consent-dialog.cjs +1 -1
- package/dist/components/consent-dialog/index.cjs +1 -1
- package/dist/components/consent-dialog-link/index.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/button.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/button.js +1 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/root.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/text.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/toolbar.cjs +1 -0
- package/dist/components/consent-dialog-trigger/atoms/toolbar.js +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.cjs +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.js +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +1 -1
- package/dist/components/consent-dialog-trigger/index.cjs +1 -1
- package/dist/components/consent-dialog-trigger/index.js +1 -1
- package/dist/components/consent-dialog-trigger/use-draggable.cjs +1 -1
- package/dist/components/consent-preferences-link/consent-preferences-link.cjs +1 -1
- package/dist/components/consent-preferences-link/index.cjs +1 -1
- package/dist/components/consent-widget/atoms/accordion.cjs +1 -1
- package/dist/components/consent-widget/atoms/button.cjs +1 -1
- package/dist/components/consent-widget/atoms/footer.cjs +1 -1
- package/dist/components/consent-widget/atoms/root.cjs +1 -1
- package/dist/components/consent-widget/consent-widget.cjs +1 -1
- package/dist/components/consent-widget/index.cjs +1 -1
- package/dist/components/consent-widget/policy-actions.cjs +1 -1
- package/dist/components/frame/atoms.cjs +1 -1
- package/dist/components/frame/atoms.js +1 -1
- package/dist/components/frame/frame.cjs +1 -1
- package/dist/components/frame/index.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/button-group.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/card.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/description.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/footer.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/header.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/overlay.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/root.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/title.cjs +1 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.cjs +1 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.js +1 -1
- package/dist/components/iab-consent-banner/index.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/card.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/content.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/footer.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/header.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/root.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +1 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +1 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +1 -1
- package/dist/components/iab-consent-dialog/index.cjs +1 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.cjs +1 -1
- package/dist/components/integrations/google-map.cjs +1 -0
- package/dist/components/integrations/google-map.js +1 -0
- package/dist/components/integrations/index.cjs +1 -0
- package/dist/components/integrations/index.js +1 -0
- package/dist/components/integrations/shared.cjs +1 -0
- package/dist/components/integrations/shared.js +1 -0
- package/dist/components/integrations/youtube-embed.cjs +1 -0
- package/dist/components/integrations/youtube-embed.js +1 -0
- package/dist/components/shared/libs/recursive-clone-children.cjs +1 -1
- package/dist/components/shared/libs/slot.cjs +1 -1
- package/dist/components/shared/libs/use-controllable-state.cjs +1 -1
- package/dist/components/shared/policy-actions.cjs +1 -1
- package/dist/components/shared/primitives/box.cjs +1 -1
- package/dist/components/shared/primitives/button.cjs +1 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/components/shared/primitives/legal-links/index.cjs +1 -1
- package/dist/components/shared/primitives/legal-links/index.js +1 -1
- package/dist/components/shared/ui/accordion/accordion.cjs +1 -1
- package/dist/components/shared/ui/accordion/index.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/index.cjs +1 -1
- package/dist/components/shared/ui/branding.cjs +1 -1
- package/dist/components/shared/ui/button/button.cjs +1 -1
- package/dist/components/shared/ui/button/index.cjs +1 -1
- package/dist/components/shared/ui/collapsible/collapsible.cjs +1 -1
- package/dist/components/shared/ui/collapsible/index.cjs +1 -1
- package/dist/components/shared/ui/dialog/dialog.cjs +1 -1
- package/dist/components/shared/ui/dialog/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/preference-item/index.cjs +1 -1
- package/dist/components/shared/ui/preference-item/preference-item.cjs +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/tabs/index.cjs +1 -1
- package/dist/components/shared/ui/tabs/tabs.cjs +1 -1
- package/dist/context/consent-manager-context.cjs +1 -1
- package/dist/context/consent-tracking-context.cjs +1 -1
- package/dist/context/theme-context.cjs +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-color-scheme.cjs +1 -1
- package/dist/hooks/use-component-config.cjs +1 -1
- package/dist/hooks/use-consent-dialog-trigger.cjs +1 -1
- package/dist/hooks/use-consent-manager.cjs +1 -1
- package/dist/hooks/use-consent-script.cjs +1 -0
- package/dist/hooks/use-consent-script.js +1 -0
- package/dist/hooks/use-focus-trap.cjs +1 -1
- package/dist/hooks/use-headless-consent-ui.cjs +1 -1
- package/dist/hooks/use-headless-iab-consent-ui.cjs +1 -1
- package/dist/hooks/use-reduced-motion.cjs +1 -1
- package/dist/hooks/use-scroll-lock.cjs +1 -1
- package/dist/hooks/use-ssr-status.cjs +1 -1
- package/dist/hooks/use-styles.cjs +1 -1
- package/dist/hooks/use-text-direction.cjs +1 -1
- package/dist/hooks/use-theme.cjs +1 -1
- package/dist/hooks/use-translations.cjs +1 -1
- package/dist/iab.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/primitives/accordion.cjs +1 -1
- package/dist/primitives/button.cjs +1 -1
- package/dist/primitives/collapsible.cjs +1 -1
- package/dist/primitives/dialog.cjs +1 -1
- package/dist/primitives/preference-item.cjs +1 -1
- package/dist/primitives/switch.cjs +1 -1
- package/dist/primitives/tabs.cjs +1 -1
- package/dist/primitives.cjs +1 -1
- package/dist/providers/consent-manager-provider.cjs +1 -1
- package/dist/server/fetch-ssr-data.cjs +1 -1
- package/dist/server/fetch-ssr-data.js +1 -1
- package/dist/server/headers.cjs +1 -1
- package/dist/server/headers.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/init-cache-key.cjs +1 -1
- package/dist/server/normalize-url.cjs +1 -1
- package/dist/styles.tw3.css +1 -1
- package/dist/types/theme/index.cjs +1 -1
- package/dist/types/theme/style-types.cjs +1 -1
- package/dist/utils/cn.cjs +1 -1
- package/dist/utils/merge-styles.cjs +1 -1
- package/dist/utils/test-helpers.cjs +1 -1
- package/dist/utils/theme-utils.cjs +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist-types/components/consent-banner/components.d.ts +2 -2
- package/dist-types/components/consent-banner/policy-actions.d.ts +1 -1
- package/dist-types/components/consent-dialog/atoms/card.d.ts +5 -5
- package/dist-types/components/consent-dialog-trigger/atoms/toolbar.d.ts +22 -0
- package/dist-types/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.d.ts +35 -0
- package/dist-types/components/consent-dialog-trigger/index.d.ts +2 -1
- package/dist-types/components/consent-dialog-trigger/types.d.ts +111 -6
- package/dist-types/components/consent-widget/atoms/accordion.d.ts +4 -4
- package/dist-types/components/consent-widget/consent-widget.d.ts +1 -1
- package/dist-types/components/consent-widget/policy-actions.d.ts +1 -1
- package/dist-types/components/integrations/google-map.d.ts +82 -0
- package/dist-types/components/integrations/index.d.ts +2 -0
- package/dist-types/components/integrations/shared.d.ts +12 -0
- package/dist-types/components/integrations/youtube-embed.d.ts +95 -0
- package/dist-types/components/shared/policy-actions.d.ts +1 -1
- package/dist-types/components/shared/primitives/button.d.ts +36 -2
- package/dist-types/components/shared/primitives/legal-links/index.d.ts +1 -1
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
- package/dist-types/components/shared/ui/branding.d.ts +3 -3
- package/dist-types/components/shared/ui/button/button.d.ts +1 -1
- package/dist-types/components/shared/ui/dialog/dialog.d.ts +1 -1
- package/dist-types/components/shared/ui/logo.d.ts +8 -8
- package/dist-types/headless.d.ts +1 -0
- package/dist-types/hooks/index.d.ts +1 -0
- package/dist-types/hooks/use-consent-script.d.ts +80 -0
- package/dist-types/index.d.ts +3 -1
- package/dist-types/providers/consent-manager-provider.d.ts +1 -1
- package/dist-types/server/headers.d.ts +1 -1
- package/dist-types/utils/theme-utils.d.ts +1 -1
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +155 -76
- package/docs/{building-headless-components.md → frameworks/react/building-headless-components.md} +3 -1
- package/docs/{callbacks.md → frameworks/react/callbacks.md} +3 -1
- package/docs/{components → frameworks/react/components}/consent-banner.md +10 -21
- package/docs/{components → frameworks/react/components}/consent-dialog-link.md +8 -5
- package/docs/frameworks/react/components/consent-dialog-trigger.md +202 -0
- package/docs/{components → frameworks/react/components}/consent-dialog.md +7 -15
- package/docs/frameworks/react/components/consent-manager-provider.md +228 -0
- package/docs/{components → frameworks/react/components}/consent-widget.md +8 -6
- package/docs/{components → frameworks/react/components}/dev-tools.md +9 -6
- package/docs/{components → frameworks/react/components}/frame.md +8 -9
- package/docs/{concepts → frameworks/react/concepts}/client-modes.md +4 -2
- package/docs/{concepts → frameworks/react/concepts}/consent-categories.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/consent-models.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/cookie-management.md +3 -3
- package/docs/{concepts → frameworks/react/concepts}/glossary.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/initialization-flow.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/policy-packs.md +1 -0
- package/docs/{headless.md → frameworks/react/headless.md} +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-color-scheme.md +1 -0
- package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/checking-consent.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/location-info.md +3 -1
- package/docs/frameworks/react/hooks/use-consent-manager/overview.md +172 -0
- package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/setting-consent.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-draggable.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-focus-trap.md +1 -0
- package/docs/{hooks → frameworks/react/hooks}/use-reduced-motion.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-ssr-status.md +6 -5
- package/docs/{hooks → frameworks/react/hooks}/use-text-direction.md +1 -0
- package/docs/frameworks/react/hooks/use-translations.md +55 -0
- package/docs/{iab → frameworks/react/iab}/consent-banner.md +9 -12
- package/docs/{iab → frameworks/react/iab}/consent-dialog.md +9 -14
- package/docs/{iab → frameworks/react/iab}/overview.md +4 -2
- package/docs/{iab → frameworks/react/iab}/use-gvl-data.md +3 -2
- package/docs/{iframe-blocking.md → frameworks/react/iframe-blocking.md} +8 -9
- package/docs/{internationalization.md → frameworks/react/internationalization.md} +13 -3
- package/docs/{network-blocker.md → frameworks/react/network-blocker.md} +13 -51
- package/docs/{optimization.md → frameworks/react/optimization.md} +3 -2
- package/docs/{policy-packs.md → frameworks/react/policy-packs.md} +3 -1
- package/docs/{quickstart.md → frameworks/react/quickstart.md} +26 -42
- package/docs/frameworks/react/script-loader.md +553 -0
- package/docs/{server-side.md → frameworks/react/server-side.md} +9 -4
- package/docs/{styling → frameworks/react/styling}/classnames.md +3 -1
- package/docs/{styling → frameworks/react/styling}/color-scheme.md +3 -1
- package/docs/frameworks/react/styling/css-variables.md +53 -0
- package/docs/frameworks/react/styling/overview.md +302 -0
- package/docs/frameworks/react/styling/slots.md +94 -0
- package/docs/{styling → frameworks/react/styling}/tailwind.md +3 -1
- package/docs/frameworks/react/styling/tokens.md +156 -0
- package/docs/{troubleshooting.md → frameworks/react/troubleshooting.md} +3 -1
- package/docs/integrations/adobe-analytics.md +160 -0
- package/docs/integrations/ahrefs-analytics.md +157 -0
- package/docs/integrations/amplitude.md +230 -0
- package/docs/integrations/building-integrations.md +15 -181
- package/docs/integrations/clearbit.md +130 -0
- package/docs/integrations/cloudflare-web-analytics.md +126 -0
- package/docs/integrations/crisp.md +140 -0
- package/docs/integrations/databuddy.md +152 -150
- package/docs/integrations/fathom-analytics.md +150 -0
- package/docs/integrations/google-maps.md +263 -0
- package/docs/integrations/google-tag-manager.md +102 -101
- package/docs/integrations/google-tag.md +104 -92
- package/docs/integrations/heap.md +219 -0
- package/docs/integrations/hightouch.md +199 -0
- package/docs/integrations/hotjar.md +143 -0
- package/docs/integrations/intercom.md +144 -0
- package/docs/integrations/linkedin-insights.md +142 -90
- package/docs/integrations/logrocket.md +175 -0
- package/docs/integrations/matomo-analytics.md +171 -0
- package/docs/integrations/meta-pixel.md +379 -309
- package/docs/integrations/microsoft-clarity.md +173 -0
- package/docs/integrations/microsoft-uet.md +135 -91
- package/docs/integrations/mixpanel-analytics.md +130 -0
- package/docs/integrations/overview.md +119 -75
- package/docs/integrations/pirsch.md +142 -0
- package/docs/integrations/plausible-analytics.md +154 -0
- package/docs/integrations/posthog.md +186 -127
- package/docs/integrations/promptwatch.md +121 -0
- package/docs/integrations/reddit-pixel.md +241 -0
- package/docs/integrations/rudderstack.md +271 -0
- package/docs/integrations/rybbit-analytics.md +143 -0
- package/docs/integrations/segment.md +146 -0
- package/docs/integrations/snapchat-pixel.md +163 -0
- package/docs/integrations/tiktok-pixel.md +101 -91
- package/docs/integrations/umami-analytics.md +148 -0
- package/docs/integrations/vercel-analytics.md +141 -0
- package/docs/integrations/x-pixel.md +123 -109
- package/docs/integrations/youtube.md +193 -0
- package/docs/shared/concepts/client-modes.md +103 -0
- package/docs/shared/concepts/consent-categories.md +41 -0
- package/docs/shared/concepts/consent-models.md +72 -0
- package/docs/shared/concepts/cookie-management.md +88 -0
- package/docs/shared/concepts/glossary.md +24 -0
- package/docs/shared/concepts/initialization-flow.md +105 -0
- package/docs/shared/concepts/policy-packs.md +225 -0
- package/docs/shared/react/components/consent-banner.md +242 -0
- package/docs/shared/react/components/consent-dialog-link.md +45 -0
- package/docs/shared/react/components/consent-dialog-trigger.md +185 -0
- package/docs/shared/react/components/consent-dialog.md +119 -0
- package/docs/shared/react/components/consent-manager-provider.md +183 -0
- package/docs/shared/react/components/consent-widget.md +121 -0
- package/docs/shared/react/components/dev-tools.md +81 -0
- package/docs/shared/react/components/frame.md +52 -0
- package/docs/shared/react/guides/building-headless-components.md +110 -0
- package/docs/shared/react/guides/callbacks.md +89 -0
- package/docs/shared/react/guides/headless.md +31 -0
- package/docs/shared/react/guides/iframe-blocking.md +65 -0
- package/docs/shared/react/guides/internationalization.md +123 -0
- package/docs/shared/react/guides/network-blocker.md +72 -0
- package/docs/shared/react/guides/optimization.md +44 -0
- package/docs/shared/react/guides/policy-packs.md +173 -0
- package/docs/shared/react/guides/script-loader.md +309 -0
- package/docs/shared/react/hooks/use-color-scheme.md +31 -0
- package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +95 -0
- package/docs/shared/react/hooks/use-consent-manager/location-info.md +96 -0
- package/docs/shared/react/hooks/use-consent-manager/overview.md +74 -0
- package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +93 -0
- package/docs/shared/react/hooks/use-draggable.md +30 -0
- package/docs/shared/react/hooks/use-focus-trap.md +20 -0
- package/docs/shared/react/hooks/use-reduced-motion.md +33 -0
- package/docs/shared/react/hooks/use-ssr-status.md +16 -0
- package/docs/shared/react/hooks/use-text-direction.md +38 -0
- package/docs/shared/react/hooks/use-translations.md +15 -0
- package/docs/shared/react/iab/consent-banner.md +60 -0
- package/docs/shared/react/iab/consent-dialog.md +76 -0
- package/docs/shared/react/iab/overview.md +80 -0
- package/docs/shared/react/iab/use-gvl-data.md +21 -0
- package/docs/shared/react/styling/classnames.md +93 -0
- package/docs/shared/react/styling/color-scheme.md +35 -0
- package/docs/shared/react/styling/css-variables.md +53 -0
- package/docs/shared/react/styling/overview.md +261 -0
- package/docs/shared/react/styling/slots.md +93 -0
- package/docs/shared/react/styling/stylesheet-entrypoint.md +8 -0
- package/docs/shared/react/styling/tailwind.md +88 -0
- package/docs/shared/react/styling/tokens.md +155 -0
- package/docs/shared/troubleshooting.md +82 -0
- package/package.json +23 -12
- package/readme.json +12 -7
- package/docs/ai-agents.md +0 -111
- package/docs/components/consent-dialog-trigger.md +0 -103
- package/docs/components/consent-manager-provider.md +0 -425
- package/docs/hooks/use-consent-manager/overview.md +0 -420
- package/docs/hooks/use-translations.md +0 -118
- package/docs/script-loader.md +0 -321
- package/docs/styling/css-variables.md +0 -92
- package/docs/styling/overview.md +0 -460
- package/docs/styling/slots.md +0 -128
- package/docs/styling/tokens.md +0 -216
package/docs/styling/tokens.md
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Design Tokens
|
|
3
|
-
description: The six base token categories that control colors, typography, spacing, radius, shadows, and motion, plus optional dark-mode overrides.
|
|
4
|
-
---
|
|
5
|
-
## Color Tokens
|
|
6
|
-
|
|
7
|
-
Color tokens define the palette for all consent components. Set `colors` for light mode and `dark` for dark mode overrides.
|
|
8
|
-
|
|
9
|
-
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.
|
|
10
|
-
|
|
11
|
-
```tsx
|
|
12
|
-
const theme = {
|
|
13
|
-
colors: {
|
|
14
|
-
primary: '#6366f1',
|
|
15
|
-
primaryHover: '#4f46e5',
|
|
16
|
-
surface: '#ffffff',
|
|
17
|
-
surfaceHover: '#f9fafb',
|
|
18
|
-
border: '#e5e7eb',
|
|
19
|
-
borderHover: '#d1d5db',
|
|
20
|
-
text: '#1f2937',
|
|
21
|
-
textMuted: '#6b7280',
|
|
22
|
-
textOnPrimary: '#ffffff',
|
|
23
|
-
overlay: 'rgba(0, 0, 0, 0.5)',
|
|
24
|
-
switchTrack: '#d1d5db',
|
|
25
|
-
switchTrackActive: '#6366f1',
|
|
26
|
-
switchThumb: '#ffffff',
|
|
27
|
-
},
|
|
28
|
-
dark: {
|
|
29
|
-
primary: '#818cf8',
|
|
30
|
-
surface: '#1f2937',
|
|
31
|
-
text: '#f9fafb',
|
|
32
|
-
textMuted: '#9ca3af',
|
|
33
|
-
border: '#374151',
|
|
34
|
-
},
|
|
35
|
-
} satisfies Theme;
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### ColorTokens
|
|
39
|
-
|
|
40
|
-
|Property|Type|Description|Default|Required|
|
|
41
|
-
|:--|:--|:--|:--|:--:|
|
|
42
|
-
|primary|string \|undefined|Primary brand/accent color for interactive elements.|-|Optional|
|
|
43
|
-
|primaryHover|string \|undefined|Hover/active state for primary elements.|-|Optional|
|
|
44
|
-
|surface|string \|undefined|Main background color for panels and containers.|-|Optional|
|
|
45
|
-
|surfaceHover|string \|undefined|Hover state for surface elements.|-|Optional|
|
|
46
|
-
|border|string \|undefined|Border color for containers and inputs.|-|Optional|
|
|
47
|
-
|borderHover|string \|undefined|Hover state for bordered elements.|-|Optional|
|
|
48
|
-
|text|string \|undefined|Primary text color for headings and body.|-|Optional|
|
|
49
|
-
|textMuted|string \|undefined|Muted text color for secondary content.|-|Optional|
|
|
50
|
-
|textOnPrimary|string \|undefined|Text color for content on primary background. Auto-derived from \`primary\` when omitted.|-|Optional|
|
|
51
|
-
|overlay|string \|undefined|Overlay color for modal backdrops.|-|Optional|
|
|
52
|
-
|switchTrack|string \|undefined|Toggle track color (off state).|-|Optional|
|
|
53
|
-
|switchTrackActive|string \|undefined|Toggle track color (on state).|-|Optional|
|
|
54
|
-
|switchThumb|string \|undefined|Toggle thumb color.|-|Optional|
|
|
55
|
-
|
|
56
|
-
## Typography Tokens
|
|
57
|
-
|
|
58
|
-
Control font family, sizes, weights, and line heights.
|
|
59
|
-
|
|
60
|
-
```tsx
|
|
61
|
-
const theme = {
|
|
62
|
-
typography: {
|
|
63
|
-
fontFamily: 'Inter, system-ui, sans-serif',
|
|
64
|
-
fontSize: { sm: '0.875rem', base: '1rem', lg: '1.125rem' },
|
|
65
|
-
fontWeight: { normal: 400, medium: 500, semibold: 600 },
|
|
66
|
-
lineHeight: { tight: '1.25', normal: '1.5', relaxed: '1.75' },
|
|
67
|
-
},
|
|
68
|
-
} satisfies Theme;
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### TypographyTokens
|
|
72
|
-
|
|
73
|
-
|Property|Type|Description|Default|Required|
|
|
74
|
-
|:--|:--|:--|:--|:--:|
|
|
75
|
-
|fontFamily|string \|undefined|Font family for all components.|-|Optional|
|
|
76
|
-
|fontSize|Object \|undefined|Font sizes for text hierarchy.|-|Optional|
|
|
77
|
-
|fontWeight|Object \|undefined|Font weights for emphasis.|-|Optional|
|
|
78
|
-
|lineHeight|Object \|undefined|Line heights for readability.|-|Optional|
|
|
79
|
-
|
|
80
|
-
#### `fontSize`
|
|
81
|
-
|
|
82
|
-
Font sizes for text hierarchy.
|
|
83
|
-
|
|
84
|
-
|Property|Type|Description|Default|Required|
|
|
85
|
-
|:--|:--|:--|:--|:--:|
|
|
86
|
-
|sm|string \|undefined|@default '0.875rem'|-|Optional|
|
|
87
|
-
|base|string \|undefined|@default '1rem'|-|Optional|
|
|
88
|
-
|lg|string \|undefined|@default '1.125rem'|-|Optional|
|
|
89
|
-
|
|
90
|
-
#### `fontWeight`
|
|
91
|
-
|
|
92
|
-
Font weights for emphasis.
|
|
93
|
-
|
|
94
|
-
|Property|Type|Description|Default|Required|
|
|
95
|
-
|:--|:--|:--|:--|:--:|
|
|
96
|
-
|normal|number \|undefined|@default 400|-|Optional|
|
|
97
|
-
|medium|number \|undefined|@default 500|-|Optional|
|
|
98
|
-
|semibold|number \|undefined|@default 600|-|Optional|
|
|
99
|
-
|
|
100
|
-
#### `lineHeight`
|
|
101
|
-
|
|
102
|
-
Line heights for readability.
|
|
103
|
-
|
|
104
|
-
|Property|Type|Description|Default|Required|
|
|
105
|
-
|:--|:--|:--|:--|:--:|
|
|
106
|
-
|tight|string \|undefined|@default '1.25'|-|Optional|
|
|
107
|
-
|normal|string \|undefined|@default '1.5'|-|Optional|
|
|
108
|
-
|relaxed|string \|undefined|@default '1.75'|-|Optional|
|
|
109
|
-
|
|
110
|
-
## Spacing Tokens
|
|
111
|
-
|
|
112
|
-
Five-step scale for internal padding, margins, and gaps.
|
|
113
|
-
|
|
114
|
-
```tsx
|
|
115
|
-
const theme = {
|
|
116
|
-
spacing: {
|
|
117
|
-
xs: '0.25rem', // 4px
|
|
118
|
-
sm: '0.5rem', // 8px
|
|
119
|
-
md: '1rem', // 16px
|
|
120
|
-
lg: '1.5rem', // 24px
|
|
121
|
-
xl: '2rem', // 32px
|
|
122
|
-
},
|
|
123
|
-
} satisfies Theme;
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### SpacingTokens
|
|
127
|
-
|
|
128
|
-
|Property|Type|Description|Default|Required|
|
|
129
|
-
|:--|:--|:--|:--|:--:|
|
|
130
|
-
|xs|string \|undefined|@default '0.25rem' (4px)|'0.25rem' (4px)|Optional|
|
|
131
|
-
|sm|string \|undefined|@default '0.5rem' (8px)|'0.5rem' (8px)|Optional|
|
|
132
|
-
|md|string \|undefined|@default '1rem' (16px)|'1rem' (16px)|Optional|
|
|
133
|
-
|lg|string \|undefined|@default '1.5rem' (24px)|'1.5rem' (24px)|Optional|
|
|
134
|
-
|xl|string \|undefined|@default '2rem' (32px)|'2rem' (32px)|Optional|
|
|
135
|
-
|
|
136
|
-
## Radius Tokens
|
|
137
|
-
|
|
138
|
-
Border radius scale for rounded corners.
|
|
139
|
-
|
|
140
|
-
```tsx
|
|
141
|
-
const theme = {
|
|
142
|
-
radius: {
|
|
143
|
-
sm: '0.25rem', // 4px
|
|
144
|
-
md: '0.5rem', // 8px
|
|
145
|
-
lg: '0.75rem', // 12px
|
|
146
|
-
full: '9999px', // Pill shape
|
|
147
|
-
},
|
|
148
|
-
} satisfies Theme;
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### RadiusTokens
|
|
152
|
-
|
|
153
|
-
|Property|Type|Description|Default|Required|
|
|
154
|
-
|:--|:--|:--|:--|:--:|
|
|
155
|
-
|sm|string \|undefined|@default '0.25rem' (4px)|'0.25rem' (4px)|Optional|
|
|
156
|
-
|md|string \|undefined|@default '0.5rem' (8px)|'0.5rem' (8px)|Optional|
|
|
157
|
-
|lg|string \|undefined|@default '0.75rem' (12px)|'0.75rem' (12px)|Optional|
|
|
158
|
-
|full|string \|undefined|@default '9999px'|'9999px'|Optional|
|
|
159
|
-
|
|
160
|
-
## Shadow Tokens
|
|
161
|
-
|
|
162
|
-
Box shadow scale for depth and elevation.
|
|
163
|
-
|
|
164
|
-
```tsx
|
|
165
|
-
const theme = {
|
|
166
|
-
shadows: {
|
|
167
|
-
sm: '0 1px 2px hsla(0, 0%, 0%, 0.05)',
|
|
168
|
-
md: '0 4px 12px hsla(0, 0%, 0%, 0.08)',
|
|
169
|
-
lg: '0 8px 24px hsla(0, 0%, 0%, 0.12)',
|
|
170
|
-
},
|
|
171
|
-
} satisfies Theme;
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### ShadowTokens
|
|
175
|
-
|
|
176
|
-
|Property|Type|Description|Default|Required|
|
|
177
|
-
|:--|:--|:--|:--|:--:|
|
|
178
|
-
|sm|string \|undefined|@default '0 1px 2px hsla(0, 0%, 0%, 0.05)'|'0 1px 2px hsla(0, 0%, 0%, 0.05)'|Optional|
|
|
179
|
-
|md|string \|undefined|@default '0 4px 12px hsla(0, 0%, 0%, 0.08)'|'0 4px 12px hsla(0, 0%, 0%, 0.08)'|Optional|
|
|
180
|
-
|lg|string \|undefined|@default '0 8px 24px hsla(0, 0%, 0%, 0.12)'|'0 8px 24px hsla(0, 0%, 0%, 0.12)'|Optional|
|
|
181
|
-
|
|
182
|
-
## Motion Tokens
|
|
183
|
-
|
|
184
|
-
Animation duration and easing presets.
|
|
185
|
-
|
|
186
|
-
```tsx
|
|
187
|
-
const theme = {
|
|
188
|
-
motion: {
|
|
189
|
-
duration: { fast: '100ms', normal: '200ms', slow: '300ms' },
|
|
190
|
-
easing: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
191
|
-
easingOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
|
|
192
|
-
easingInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
|
|
193
|
-
easingSpring: 'cubic-bezier(0.34, 1.56, 0.64, 1)',
|
|
194
|
-
},
|
|
195
|
-
} satisfies Theme;
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### MotionTokens
|
|
199
|
-
|
|
200
|
-
|Property|Type|Description|Default|Required|
|
|
201
|
-
|:--|:--|:--|:--|:--:|
|
|
202
|
-
|duration|Object \|undefined|Duration presets for transitions.|-|Optional|
|
|
203
|
-
|easing|string \|undefined|Default CSS easing function for general animation curves.|'cubic-bezier(0.4, 0, 0.2, 1)'|Optional|
|
|
204
|
-
|easingOut|string \|undefined|CSS easing function for enter/exit animations. Use for modals, tooltips, dropdowns, and any element entering or exiting.|'cubic-bezier(0.215, 0.61, 0.355, 1)'|Optional|
|
|
205
|
-
|easingInOut|string \|undefined|CSS easing function for on-screen movement. Use when elements already on screen need to move or morph.|'cubic-bezier(0.645, 0.045, 0.355, 1)'|Optional|
|
|
206
|
-
|easingSpring|string \|undefined|CSS easing function with spring-like overshoot. Use for playful, bouncy animations.|'cubic-bezier(0.34, 1.56, 0.64, 1)'|Optional|
|
|
207
|
-
|
|
208
|
-
#### `duration`
|
|
209
|
-
|
|
210
|
-
Duration presets for transitions.
|
|
211
|
-
|
|
212
|
-
|Property|Type|Description|Default|Required|
|
|
213
|
-
|:--|:--|:--|:--|:--:|
|
|
214
|
-
|fast|string \|undefined|@default '100ms'|-|Optional|
|
|
215
|
-
|normal|string \|undefined|@default '200ms'|-|Optional|
|
|
216
|
-
|slow|string \|undefined|@default '300ms'|-|Optional|
|