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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +7 -0
  2. package/dist/iab/styles.css +12 -1
  3. package/dist/iab/styles.tw3.css +14 -0
  4. package/dist/index.cjs +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/styles.css +10 -1
  7. package/dist/styles.tw3.css +13 -0
  8. package/dist/version.cjs +1 -1
  9. package/dist/version.js +1 -1
  10. package/dist-types/headless.d.ts +1 -1
  11. package/dist-types/index.d.ts +2 -2
  12. package/dist-types/libs/browser-initial-data.d.ts +2 -2
  13. package/dist-types/libs/initial-data.d.ts +1 -1
  14. package/dist-types/types.d.ts +3 -3
  15. package/dist-types/version.d.ts +1 -1
  16. package/docs/building-headless-components.md +43 -22
  17. package/docs/callbacks.md +76 -9
  18. package/docs/components/consent-banner.md +148 -24
  19. package/docs/components/consent-dialog.md +42 -3
  20. package/docs/components/consent-manager-provider.md +3 -1
  21. package/docs/components/consent-widget.md +91 -9
  22. package/docs/concepts/client-modes.md +16 -4
  23. package/docs/concepts/initialization-flow.md +9 -2
  24. package/docs/concepts/policy-packs.md +2 -2
  25. package/docs/headless.md +13 -7
  26. package/docs/hooks/use-consent-manager/overview.md +17 -3
  27. package/docs/hooks/use-ssr-status.md +1 -1
  28. package/docs/hooks/use-translations.md +1 -0
  29. package/docs/iab/consent-banner.md +2 -5
  30. package/docs/iab/consent-dialog.md +3 -6
  31. package/docs/iab/overview.md +11 -5
  32. package/docs/integrations/building-integrations.md +405 -0
  33. package/docs/integrations/databuddy.md +22 -5
  34. package/docs/integrations/google-tag-manager.md +2 -2
  35. package/docs/integrations/google-tag.md +2 -29
  36. package/docs/integrations/linkedin-insights.md +1 -1
  37. package/docs/integrations/meta-pixel.md +1 -1
  38. package/docs/integrations/microsoft-uet.md +1 -1
  39. package/docs/integrations/overview.md +18 -2
  40. package/docs/integrations/posthog.md +39 -17
  41. package/docs/integrations/tiktok-pixel.md +1 -1
  42. package/docs/integrations/x-pixel.md +1 -1
  43. package/docs/optimization.md +68 -9
  44. package/docs/policy-packs.md +7 -7
  45. package/docs/quickstart.md +11 -5
  46. package/docs/script-loader.md +22 -1
  47. package/docs/server-side.md +1 -1
  48. package/docs/styling/classnames.md +17 -9
  49. package/docs/styling/overview.md +166 -29
  50. package/docs/styling/slots.md +37 -7
  51. package/docs/styling/tailwind.md +25 -27
  52. package/iab/styles.css +1 -0
  53. package/package.json +15 -7
  54. package/readme.json +4 -0
  55. package/src/iab/styles.css +12 -0
  56. package/src/iab/styles.tw3.css +14 -0
  57. package/src/styles.css +10 -0
  58. package/src/styles.tw3.css +13 -0
  59. package/styles.css +1 -0
@@ -2,24 +2,34 @@
2
2
  title: Styling Overview
3
3
  description: Five approaches for theming consent components — design tokens, component slots, CSS variables, className, and noStyle mode.
4
4
  ---
5
- c15t's theming system gives you multiple levels of control, from high-level design tokens to complete style removal.
5
+ c15t's theming system gives you multiple levels of control, but most customization should stay inside the pre-built components.
6
6
 
7
- The flow:
7
+ Start with the lowest-power tool that solves the problem:
8
8
 
9
- 1. **Define** tokens (colors, spacing, radius, etc.) in JavaScript
10
- 2. Tokens are **injected** as CSS custom properties (`--c15t-*`) at runtime
11
- 3. Components **consume** these variables in their default styles
12
- 4. You **override** at any level: tokens, slots, CSS variables, or raw classNames
9
+ 1. **Pre-built component APIs** provider options and component props such as `layout`, `direction`, `primaryButton`, `legalLinks`, and `theme.consentActions`
10
+ 2. **Design tokens** global colors, typography, spacing, radius, shadows, and motion
11
+ 3. **Slots** targeted styling for specific parts such as the banner card, footer, or title
12
+ 4. **CSS variables or className-level overrides** when you need to integrate with external CSS systems
13
+ 5. **Compound components** — when you must rearrange markup while still using c15t primitives
14
+ 6. **`noStyle`** — when you want c15t structure but you need to own all visual styling
15
+ 7. **Headless** — when you want fully custom markup and behavior
16
+
17
+ Keep styling and escalation as separate decisions:
18
+
19
+ * If you are still using the stock banner, dialog, or widget, stay with props, tokens, and slots.
20
+ * Escalate to compound components, `noStyle`, or headless only when the structure or behavior itself must change.
13
21
 
14
22
  ## Styling Approaches
15
23
 
16
24
  |Approach|Control|Use When|
17
25
  |--|--|--|
26
+ |**Component and provider APIs**|High|Reordering actions, changing button emphasis, configuring links, hiding branding, changing copy via `i18n`|
18
27
  |**Tokens**|High|Changing global colors, typography, spacing, radius, shadows, or motion|
19
- |**Slots**|Medium|Targeting specific component parts (e.g., the banner title, dialog footer)|
20
- |**CSS Variables**|Medium|Overriding `--c15t-*` variables from external CSS|
21
- |**className**|Medium|Passing class names to components or slots|
22
- |**noStyle**|Full|Removing all default styles, building from scratch|
28
+ |**Slots**|Medium|Targeting specific component parts (for example `consentBannerFooter` or `consentDialogCard`)|
29
+ |**CSS variables / className**|Medium|Integrating with an existing stylesheet or utility classes after tokens and slots|
30
+ |**Compound components**|Structure|Rearranging existing c15t primitives without going fully custom|
31
+ |**noStyle**|Full visuals|Keeping c15t structure but replacing all visual defaults|
32
+ |**Headless**|Full|Replacing both markup and behavior|
23
33
 
24
34
  ## Quick Start
25
35
 
@@ -58,9 +68,25 @@ export function ConsentManager({ children }) {
58
68
  }
59
69
  ```
60
70
 
61
- ## Styling Paths
71
+ ## Styling Inside Pre-Built Components
72
+
73
+ Start here before you consider compound components or headless mode.
74
+
75
+ ### 1. Provider and component configuration
76
+
77
+ Use the stock APIs first:
78
+
79
+ * `layout`, `direction`, and `primaryButton` for banner action arrangement
80
+ * `legalLinks` for link visibility
81
+ * `hideBranding` and `showTrigger` for dialog and widget behavior
82
+ * `theme.consentActions` for stock banner and dialog button treatment
83
+ * `i18n` on `ConsentManagerProvider` for copy changes
84
+
85
+ ```tsx
86
+ <ConsentBanner layout={['customize', ['reject', 'accept']]} primaryButton="accept" />
87
+ ```
62
88
 
63
- ### 1. Design tokens
89
+ ### 2. Design tokens
64
90
 
65
91
  Set global values for colors, typography, spacing, radius, shadows, and motion:
66
92
 
@@ -68,55 +94,140 @@ Set global values for colors, typography, spacing, radius, shadows, and motion:
68
94
  options={{ theme: { colors: { primary: '#6366f1' } } }}
69
95
  ```
70
96
 
71
- ### 2. Component slots
97
+ Use tokens first when the change is semantic:
98
+
99
+ * Banner card background -> `theme.colors.surface`
100
+ * Banner footer background -> `theme.colors.surfaceHover`
101
+ * Shared copy color -> `theme.colors.text` and `theme.colors.textMuted`
102
+
103
+ ```tsx
104
+ options={{
105
+ theme: {
106
+ colors: {
107
+ surface: '#ffffff',
108
+ surfaceHover: '#f6f3ee',
109
+ },
110
+ },
111
+ }}
112
+ ```
113
+
114
+ ### 3. Component slots
72
115
 
73
116
  Target specific component parts via the `slots` object:
74
117
 
75
118
  ```tsx
76
- options={{ theme: { slots: { consentBannerTitle: 'text-2xl font-bold' } } }}
119
+ options={{
120
+ theme: {
121
+ slots: {
122
+ consentBannerCard: 'rounded-[28px] shadow-xl',
123
+ consentBannerFooter: 'border-t border-black/10',
124
+ consentBannerTitle: 'tracking-tight',
125
+ },
126
+ },
127
+ }}
77
128
  ```
78
129
 
79
- ### 3. CSS variables
130
+ Use slots when the component part is right but the local styling needs adjustment.
80
131
 
81
- Override `--c15t-*` custom properties in your stylesheet.
132
+ ### 4. CSS variables and className-level overrides
82
133
 
83
- ### 4. className prop
134
+ Override `--c15t-*` custom properties in your stylesheet or attach classes through slots when your app styling is driven externally.
84
135
 
85
- Pass className directly to components:
136
+ Reach for this after tokens and slots, not before.
86
137
 
87
138
  ```tsx
88
- <ConsentBanner className="my-custom-banner" />
139
+ options={{
140
+ theme: {
141
+ slots: {
142
+ consentBannerFooter: 'bg-[var(--banner-footer)]',
143
+ },
144
+ },
145
+ }}
89
146
  ```
90
147
 
91
- ### 5. noStyle prop
148
+ ## Escalating Beyond Pre-Built Components
149
+
150
+ Only move up this ladder when the lower rung cannot satisfy the request.
92
151
 
93
- Strip all default styles and build from scratch (best paired with [Headless Mode](../headless)):
152
+ ### 5. Compound components
153
+
154
+ Use compound components when you need to rearrange existing c15t primitives:
155
+
156
+ ```tsx
157
+ <ConsentBanner.Root>
158
+ <ConsentBanner.Card>
159
+ <ConsentBanner.Header>
160
+ <ConsentBanner.Title />
161
+ <ConsentBanner.Description />
162
+ </ConsentBanner.Header>
163
+ <ConsentBanner.Footer>
164
+ <ConsentBanner.CustomizeButton />
165
+ <ConsentBanner.FooterSubGroup>
166
+ <ConsentBanner.RejectButton />
167
+ <ConsentBanner.AcceptButton />
168
+ </ConsentBanner.FooterSubGroup>
169
+ </ConsentBanner.Footer>
170
+ </ConsentBanner.Card>
171
+ </ConsentBanner.Root>
172
+ ```
173
+
174
+ ### 6. `noStyle`
175
+
176
+ Use `noStyle` only when the c15t structure is still correct but you want to replace all visual defaults:
94
177
 
95
178
  ```tsx
96
179
  <ConsentBanner noStyle />
97
180
  ```
98
181
 
182
+ ### 7. Headless
183
+
184
+ Go headless only when you are replacing both markup and behavior. For that path, continue to [Headless Mode](../headless).
185
+
99
186
  ## Common Styling Tasks
100
187
 
101
- ### Change brand color globally
188
+ ### Change the banner footer background
102
189
 
103
190
  ```tsx
104
- options={{ theme: { colors: { primary: '#0ea5e9', primaryHover: '#0284c7' } } }}
191
+ options={{
192
+ theme: {
193
+ colors: {
194
+ surfaceHover: '#f6f3ee',
195
+ },
196
+ },
197
+ }}
105
198
  ```
106
199
 
107
- ### Make the banner card more compact
200
+ Use `theme.colors.surfaceHover` before trying raw CSS.
201
+
202
+ ### Change the banner card background
108
203
 
109
204
  ```tsx
110
- options={{ theme: { spacing: { md: '0.75rem', lg: '1rem' } } }}
205
+ options={{
206
+ theme: {
207
+ colors: {
208
+ surface: '#fffdf8',
209
+ },
210
+ },
211
+ }}
111
212
  ```
112
213
 
113
- ### Round primary/secondary buttons
214
+ Use `theme.colors.surface` before overriding banner CSS variables directly.
215
+
216
+ ### Tweak the banner card, footer, or title styling without changing markup
114
217
 
115
218
  ```tsx
116
- options={{ theme: { slots: { buttonPrimary: 'rounded-full', buttonSecondary: 'rounded-full' } } }}
219
+ options={{
220
+ theme: {
221
+ slots: {
222
+ consentBannerCard: 'rounded-[28px] shadow-xl',
223
+ consentBannerFooter: 'border-t border-black/10 px-6',
224
+ consentBannerTitle: 'text-xl tracking-tight',
225
+ },
226
+ },
227
+ }}
117
228
  ```
118
229
 
119
- ### Change consent action button styles semantically
230
+ ### Change stock consent action button styles semantically
120
231
 
121
232
  ```tsx
122
233
  options={{
@@ -132,6 +243,29 @@ options={{
132
243
 
133
244
  Use `theme.consentActions` when you want to change the stock banner/dialog button treatment without rewriting the component layout. Policy packs still control action arrangement and primary-action hints. The theme controls whether those actions render as `stroke`, `filled`, `ghost`, or `lighter`.
134
245
 
246
+ ### Change banner copy without replacing the component
247
+
248
+ ```tsx
249
+ options={{
250
+ i18n: {
251
+ locale: 'en',
252
+ messages: {
253
+ en: {
254
+ cookieBanner: {
255
+ title: 'We value your privacy',
256
+ description: 'We use cookies to improve the site and measure performance.',
257
+ },
258
+ common: {
259
+ acceptAll: 'Accept all',
260
+ rejectAll: 'Reject all',
261
+ customize: 'Manage preferences',
262
+ },
263
+ },
264
+ },
265
+ },
266
+ }}
267
+ ```
268
+
135
269
  ### Enable dark mode safely
136
270
 
137
271
  ```tsx
@@ -144,8 +278,11 @@ options={{
144
278
  }}
145
279
  ```
146
280
 
281
+ > ℹ️ **Info:**
282
+ > If a token change does not show up where you expect, check how that component maps tokens to CSS variables before escalating. For example, the stock banner footer background comes from colors.surfaceHover, not a separate footer token.
283
+ >
147
284
  > ⚠️ **Warning:**
148
- > noStyle: true removes layout and visual defaults. Use it only when you want full control.Use either tokens/slots or raw CSS variable overrides intentionally to avoid conflicting style sources.For dark mode, c15t supports .dark and .c15t-dark.
285
+ > Do not jump to CSS overrides or !important because a token did not appear to work at first glance.noStyle: true removes layout and visual defaults. Treat it as an advanced opt-out, not a normal theming step.Headless mode is for replacing markup and behavior, not for styling-only requests.Use either tokens/slots or raw CSS variable overrides intentionally to avoid conflicting style sources.For dark mode, c15t supports .dark and .c15t-dark.
149
286
 
150
287
  ## API Reference
151
288
 
@@ -4,7 +4,19 @@ description: Target individual component parts with styles using the slot system
4
4
  ---
5
5
  ## What are Slots?
6
6
 
7
- Slots let you target specific parts of consent components with styles. Each component is built from named "slots" (e.g., `consentBannerTitle`, `consentDialogFooter`) that you can style individually.
7
+ Slots let you target specific parts of consent components with styles. Each component is built from named slots such as `consentBannerTitle` and `consentDialogFooter`.
8
+
9
+ Use slots after the stock component APIs and design tokens:
10
+
11
+ * If the change is semantic, prefer tokens first. For example, the stock banner footer background comes from `theme.colors.surfaceHover`.
12
+ * If the component part is correct but you need a local tweak, use a slot.
13
+
14
+ Common banner slot choices:
15
+
16
+ * `consentBannerCard` for card radius, shadow, width, and local background treatment
17
+ * `consentBannerFooter` for spacing, borders, and local footer styling
18
+ * `consentBannerTitle` for title typography
19
+ * `buttonPrimary` and `buttonSecondary` for shared button classes
8
20
 
9
21
  ## Using Slots
10
22
 
@@ -13,8 +25,8 @@ Pass slot styles in the theme's `slots` object:
13
25
  ```tsx
14
26
  const theme = {
15
27
  slots: {
16
- // String value = className
17
- consentBannerTitle: 'text-xl font-bold text-gray-900',
28
+ consentBannerFooter: 'border-t border-black/10 px-6',
29
+ consentBannerTitle: 'text-xl font-bold tracking-tight',
18
30
 
19
31
  // Object value = className + inline styles
20
32
  consentBannerCard: {
@@ -34,13 +46,31 @@ Each slot accepts either a `string` (treated as className) or a `SlotStyle` obje
34
46
  consentBannerTitle: 'my-custom-class'
35
47
 
36
48
  // Object: className + style + noStyle
37
- consentBannerTitle: {
38
- className: 'my-custom-class',
39
- style: { color: 'red', fontSize: '1.5rem' },
40
- noStyle: false, // Set true to remove default styles for this slot
49
+ consentBannerFooter: {
50
+ className: 'border-t border-black/10',
51
+ style: { paddingBlock: '1rem' },
52
+ noStyle: false, // Set true only when you want to remove this slot's default styling
41
53
  }
42
54
  ```
43
55
 
56
+ `noStyle` on a slot is an advanced escape hatch. Start with className and style overrides first.
57
+
58
+ ## Example: Style the stock banner without changing markup
59
+
60
+ ```tsx
61
+ const theme = {
62
+ colors: {
63
+ surface: '#fffdf8',
64
+ surfaceHover: '#f6f3ee',
65
+ },
66
+ slots: {
67
+ consentBannerCard: 'rounded-[28px] shadow-xl',
68
+ consentBannerFooter: 'border-t border-black/10 px-6',
69
+ consentBannerTitle: 'tracking-tight',
70
+ },
71
+ } satisfies Theme;
72
+ ```
73
+
44
74
  ## Available Slots
45
75
 
46
76
  Use the typed API reference below for the full slot list and descriptions. It stays in sync with the actual component slot surface.
@@ -6,50 +6,48 @@ c15t works with Tailwind CSS out of the box. Use the `slots` theme option to app
6
6
 
7
7
  ## Setup
8
8
 
9
- Import the standard c15t stylesheet once at the root of your app:
9
+ Import the standard c15t stylesheet once in your app-level CSS entrypoint:
10
10
 
11
- ```tsx
12
- // React
13
- import '@c15t/react/styles.css';
11
+ ```css
12
+ /* React: src/index.css */
13
+ @import "@c15t/react/styles.css";
14
14
 
15
- // Next.js
16
- import '@c15t/nextjs/styles.css';
15
+ /* Next.js: app/globals.css */
16
+ @import "@c15t/nextjs/styles.css";
17
17
  ```
18
18
 
19
+ 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.
20
+
19
21
  ### Tailwind v4
20
22
 
21
- Tailwind v4 automatically scans your source files. Declare c15t's layer order once in your global CSS so utilities stay last:
23
+ Tailwind v4 automatically scans your source files. Import Tailwind normally, then place the c15t stylesheet immediately after it. c15t component styles join Tailwind's `components` layer automatically, so no extra c15t-specific layer declaration is needed:
22
24
 
23
- ```css
24
- @layer theme, base, components, c15t, utilities;
25
+ ```css title="src/index.css"
25
26
  @import "tailwindcss";
27
+ @import "@c15t/react/styles.css";
26
28
  ```
27
29
 
28
- ### Tailwind v3
29
-
30
- Keep Tailwind's directives in your app stylesheet, but wrap `@tailwind base` in a native `base` layer so c15t's `@layer c15t` rules can sit above Preflight:
31
-
32
30
  ```css title="app/globals.css"
33
- @layer base, components, c15t;
31
+ @import "tailwindcss";
32
+ @import "@c15t/nextjs/styles.css";
33
+ ```
34
34
 
35
- @layer base {
36
- @tailwind base;
37
- }
35
+ ### Tailwind v3
36
+
37
+ Import the Tailwind 3-compatible c15t stylesheet after `@tailwind components;` and before `@tailwind utilities;`:
38
38
 
39
+ ```css title="src/index.css"
40
+ @tailwind base;
39
41
  @tailwind components;
42
+ @import "@c15t/react/styles.tw3.css";
40
43
  @tailwind utilities;
41
44
  ```
42
45
 
43
- Then add c15t's component paths to your `content` array:
44
-
45
- ```js title="tailwind.config.js"
46
- module.exports = {
47
- content: [
48
- './src/**/*.{js,ts,jsx,tsx}',
49
- './node_modules/@c15t/react/**/*.{js,mjs}',
50
- './node_modules/@c15t/nextjs/**/*.{js,mjs}',
51
- ],
52
- };
46
+ ```css title="app/globals.css"
47
+ @tailwind base;
48
+ @tailwind components;
49
+ @import "@c15t/nextjs/styles.tw3.css";
50
+ @tailwind utilities;
53
51
  ```
54
52
 
55
53
  ## Using Tailwind with Slots
package/iab/styles.css ADDED
@@ -0,0 +1 @@
1
+ @import "../dist/iab/styles.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c15t/nextjs",
3
- "version": "2.0.0-rc.6",
3
+ "version": "2.0.0-rc.8",
4
4
  "description": "Developer-first CMP for Next.js: cookie banner, consent manager, preferences centre. GDPR ready with minimal setup and rich customization.",
5
5
  "keywords": [
6
6
  "nextjs",
@@ -33,7 +33,9 @@
33
33
  "type": "module",
34
34
  "exports": {
35
35
  "./styles.css": "./dist/styles.css",
36
+ "./styles.tw3.css": "./dist/styles.tw3.css",
36
37
  "./iab/styles.css": "./dist/iab/styles.css",
38
+ "./iab/styles.tw3.css": "./dist/iab/styles.tw3.css",
37
39
  "./headless": {
38
40
  "types": "./dist-types/headless.d.ts",
39
41
  "import": "./dist/headless.js",
@@ -57,14 +59,20 @@
57
59
  "dist",
58
60
  "docs",
59
61
  "dist-types",
60
- "client"
62
+ "client",
63
+ "styles.css",
64
+ "iab",
65
+ "src/styles.css",
66
+ "src/styles.tw3.css",
67
+ "src/iab/styles.css",
68
+ "src/iab/styles.tw3.css"
61
69
  ],
62
70
  "scripts": {
63
71
  "prebuild": "genversion --esm --semi src/version.ts",
64
- "build": "bun prebuild && rslib build && bun ../../scripts/agent-docs/generate-package-docs.ts @c15t/nextjs",
72
+ "build": "bun prebuild && rslib build && bun ../../scripts/normalize-dist-types.mjs && bun scripts/generate-distribution-css.ts && bun ../../scripts/agent-docs/generate-package-docs.ts @c15t/nextjs",
65
73
  "build:agent-docs": "bun ../../scripts/agent-docs/generate-package-docs.ts @c15t/nextjs",
66
74
  "check-types": "bun prebuild && tsc --noEmit",
67
- "dev": "bun prebuild && rslib build",
75
+ "dev": "bun prebuild && rslib build && bun ../../scripts/normalize-dist-types.mjs && bun scripts/generate-distribution-css.ts",
68
76
  "fmt": "bun biome format --write . && bun biome check --formatter-enabled=false --linter-enabled=false --write",
69
77
  "lint": "bun biome lint ./src",
70
78
  "prepack": "cd ../.. && bunx turbo run build --filter=@c15t/nextjs",
@@ -72,9 +80,9 @@
72
80
  "test:watch": "bun prebuild && vitest --passWithNoTests"
73
81
  },
74
82
  "dependencies": {
75
- "@c15t/react": "2.0.0-rc.6",
76
- "@c15t/translations": "2.0.0-rc.5",
77
- "c15t": "2.0.0-rc.6"
83
+ "@c15t/react": "2.0.0-rc.8",
84
+ "@c15t/translations": "2.0.0-rc.8",
85
+ "c15t": "2.0.0-rc.8"
78
86
  },
79
87
  "devDependencies": {
80
88
  "@c15t/typescript-config": "0.0.1-beta.1",
package/readme.json CHANGED
@@ -21,6 +21,10 @@
21
21
  "",
22
22
  "```bash\npnpm add @c15t/nextjs\n```",
23
23
  "",
24
+ "Then add the prebuilt stylesheet to your app-level CSS entrypoint:",
25
+ "",
26
+ "```css\n/* app/globals.css */\n@import \"@c15t/nextjs/styles.css\";\n```",
27
+ "",
24
28
  "To manually install, follow the guide in our [docs – manual setup](https://c15t.com/docs/frameworks/nextjs/quickstart#manual-setup)."
25
29
  ],
26
30
  "usage": [
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @c15t/nextjs — IAB TCF component styles.
3
+ *
4
+ * Add this stylesheet to the same global CSS entrypoint as your base c15t styles
5
+ * when using IAB consent components in Next.js. Do not import either stylesheet
6
+ * from JS/TSX.
7
+ *
8
+ * Usage (app/globals.css):
9
+ * @import "@c15t/nextjs/styles.css";
10
+ * @import "@c15t/nextjs/iab/styles.css";
11
+ */
12
+ @import "@c15t/react/iab/styles.css";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @c15t/nextjs/iab — Tailwind 3-compatible IAB component styles.
3
+ *
4
+ * Add this stylesheet to the same global CSS entrypoint as your base c15t styles.
5
+ * Do not import either stylesheet from JS/TSX files.
6
+ *
7
+ * Usage (app/globals.css):
8
+ * @tailwind base;
9
+ * @tailwind components;
10
+ * @import "@c15t/nextjs/styles.tw3.css";
11
+ * @import "@c15t/nextjs/iab/styles.tw3.css";
12
+ * @tailwind utilities;
13
+ */
14
+ @import "@c15t/react/iab/styles.tw3.css";
package/src/styles.css ADDED
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @c15t/nextjs — Non-IAB prebuilt component styles.
3
+ *
4
+ * Import this stylesheet once from your app-level CSS entrypoint when using
5
+ * prebuilt (styled) consent components.
6
+ *
7
+ * Usage (app/globals.css):
8
+ * @import "@c15t/nextjs/styles.css";
9
+ */
10
+ @import "@c15t/react/styles.css";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @c15t/nextjs — Tailwind 3-compatible prebuilt component styles.
3
+ *
4
+ * Import this stylesheet in the same global CSS entrypoint as Tailwind 3,
5
+ * after `@tailwind components;` and before `@tailwind utilities;`.
6
+ *
7
+ * Usage (app/globals.css):
8
+ * @tailwind base;
9
+ * @tailwind components;
10
+ * @import "@c15t/nextjs/styles.tw3.css";
11
+ * @tailwind utilities;
12
+ */
13
+ @import "@c15t/react/styles.tw3.css";
package/styles.css ADDED
@@ -0,0 +1 @@
1
+ @import "./dist/styles.css";