feat(core-ui): add CookieConsentBanner headless component

Implements the EU-compliant cookie consent banner with:
- modal + banner variants, CNIL equal-prominence Reject/Accept buttons
- granular category toggles (essential non-toggleable)
- __consent_state cookie management (SameSite=Lax, Secure, 1-yr, _v:1)
- render-prop overrides: renderHeader, renderCategoryRow, renderActions
- useConsent() integration when ConsentProvider is present
- CookieConsentBannerLoader SSR-safe wrapper
- RTL behavioral tests: Reject All, Save Selected, ESC=Reject, focus-trap
- Storybook stories for modal, banner, render-prop, and a11y tab demo
- jsdom configured with HTTPS origin for Secure cookie testing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-19 21:21:05 +00:00
parent de178035bd
commit 1b6f2d1e36
14 changed files with 1128 additions and 13 deletions

View File

@@ -1,18 +1,18 @@
{
"generatedAt": "2026-05-19T20:49:04.345Z",
"commit": "b2bfb5b",
"generatedAt": "2026-05-19T21:20:25.856Z",
"commit": "de17803",
"repo": {
"statements": 97.18,
"branches": 92.15,
"functions": 96.93,
"lines": 97.18,
"statements": 97.34,
"branches": 91.98,
"functions": 97.09,
"lines": 97.34,
"counts": {
"lf": 5346,
"lh": 5195,
"brf": 1045,
"brh": 963,
"fnf": 326,
"fnh": 316
"lf": 5742,
"lh": 5589,
"brf": 1147,
"brh": 1055,
"fnf": 344,
"fnh": 334
}
},
"byPackage": {
@@ -114,6 +114,20 @@
"fnh": 93
}
},
"@repo/core-ui": {
"statements": 99.49,
"branches": 90.2,
"functions": 100,
"lines": 99.49,
"counts": {
"lf": 396,
"lh": 394,
"brf": 102,
"brh": 92,
"fnf": 18,
"fnh": 18
}
},
"@repo/marketing-pages": {
"statements": 95.93,
"branches": 83.93,