All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[10.0.1]
- fixes #207
- Vite's jsx-runtime is now set to "classic"
Major infrastructure modernization and migration to Vite:
- BREAKING: Updated minimum Node.js requirement from >=10 to >=20.16
- BREAKING: Updated React peer dependencies from >=16 to >=18
- BREAKING: Migrated build system from TSDX to Vite
- BREAKING: Changed output bundle names from
cjs.production.min.js/esm.jstoumd.js/es.js - BREAKING: Updated
cookieValueanddeclineCookieValueprops to only accept string values (removed object support)
- Added accessibility improvements: keyboard navigation, ARIA labels, and proper focus management for overlay
- Improved browser compatibility by replacing
windowreferences withglobalThis - Enhanced TypeScript support with updated type definitions
- Major: Upgraded React from 18.x to 19.x
- Major: Upgraded js-cookie from 2.2.1 to 3.0.5
- Major: Upgraded Storybook from 6.x to 8.6.15 with new story format (CSF 3.0)
- Major: Upgraded TypeScript from 3.9.10 to 5.9.3
- Updated @mui/material from 5.9.2 to 7.3.6 (dev dependency only)
- Updated numerous dev dependencies to latest versions
- Migration: Complete migration from TSDX to Vite for faster builds and modern tooling
- CI/CD: Updated GitHub Actions workflows to use Node.js 20/22 instead of 10/12/14
- CI/CD: Improved workflow efficiency with proper npm caching and
npm ci - Security: Fixed GitHub Actions to use full commit SHA hashes instead of tag references
- Build: Added proper Vite configuration for library builds with TypeScript declarations
- Storybook: Migrated to modern Storybook 8.x with Vite integration and updated story format
- Modernized all Storybook stories to use CSF 3.0 format with proper TypeScript types
- Improved code consistency with readonly static props and better formatting
- Enhanced accessibility with proper event handling and ARIA attributes
Made all props optional and fixed documentation. Fixes #191 and #193
Second try of np...
Removed postinstall
np is not my thing.. reverted to old release strategy
- Switched to tsdx and Typescript
- Added storybook with examples from readme
- Added
customButtonWrapperAttributesprop which allows to add custom attributes to the button wrapper div
- Added
customDeclineButtonPropsto add custom properties to the decline button
- Small version error in package.json that actually didn't make it work with React 18
- Added support for React 18
- Updated example and codebase to use React 18
- Added type annotations on public functions
- added
customButtonPropsthat allows to use custom props with the button component. Specifically useful for library buttons components, for e.g. MUI Button.
- hideOnDecline added to typescript files
- Added .prettieringore
- Added
onOverlayClickwhich allows you to react to a click on the overlay - Added
acceptOnOverlayClickwhich accepts the cookies when the overlay is clicked and runsonOverlayClick
customContentAttributesandcustomContainerAttributesare now optional in the typing file as they should be
[7.1.0]
- Added custom attribute props for content and container
[7.0.1]
- Configured webpack to remove self from build artefact. Should now work in Nextjs and Gatsby (only tested those..)
[7.0.0]
- Switched from CommonJS to UMD module
[6.4.1)]
- Added missing typing
[6.4.0)]
- Added visible prop
[6.3.0)]
- Added the (optional) scrolling effect back in as it is declared legal in some countries now.
- version bumps :)
[6.2.3]
- Added support for IE11, the webpack generated runtime-code should not use arrow functions
[6.2.2]
- Fixed the return type of getCookieConsentValue in the dts file.
[6.2.1]
Added the getCookieConsentValue to the dts file.
[6.2.0]
Added the exported function getCookieConsentValue to get the cookie value from custom code
[6.1.0]
Added support for React 17
[6.0.0]
Accepting by scrolling is no longer allowed and has thus been removed from the package. For details see issue 88
[5.2.0]
Added aria labels for both the decline and accept button
[5.1.4]
- set default SameSite attribute to "lax" because browsers are already implementing the cookie policy changes.
[5.1.3]
- Fix missing buttonWrapperClasses prop in type definition
- Set cookie value before handling side-effects.
- The overlay is now conditional. Meaning that the component behaves exactly as it did prior to 5.1.0 when you do not use the overlay
A new feature! This time it's an "overlay" on the entire website to block access whilst the cookiebar is displayed. This is all opt-in of course and the README covers it nicely (just add overlay to the props and see what happens).
We got an update picture, with a cute cat... unfortunately the cat won't be included by default:
- Fixed Issue 69 by removing location from the proptypes to avoid build-time issues
- CookieSecurity prop - allows securing the cookie
- sameSite prop - allows you to set sameSite properties so browser won't warn about non-secure cookies :)
- Added CookieConsent back in as the default for the containerClasses property.
I decided to update react-cookie-consent to version 4 because this version has a buttonWrapper which will break appearance. I consider appearance a major feature.
- Changelog :D
- A wrapper around the buttons so they always stay together. (still possible to change with css using buttonWrapperClasses)
- Default ids for the buttons (rcc stands for react-cookie-consent, cookie-consent is blocked by some adblockers nowadays so I abbreviated it)
- js-cookie updated from
2.2.0to2.2.1
- react updated from
16.4.0to16.13.1
- @types/js-cookie updated from
2.2.2to2.2.6 - babel-cli updated from
6.24.1to6.26.0 - babel-preset-env updated from
1.5.1to1.7.0 - react updated from
16.8.6to16.13.1
