Commit Graph

528 Commits

Author SHA1 Message Date
Nathan Vasse
87dbf922df 🚨(react) fix lint issues
Fix the lint for the recent commits.
2025-09-23 15:58:43 +02:00
Nathan Vasse
33c5866c28 ♻️(docs) various update for storybook
Color fixes due to new tokens architecture and few rewords.
2025-09-23 15:58:43 +02:00
Nathan Vasse
759b1d5e53 ♻️(tokens) export appropriate types
The previous version was hard coding tokens.
2025-09-23 15:58:43 +02:00
Nathan Panchout
be3deea177 🎨(react) update documentation
This commit revises the color system to enhance modularity and
accessibility. It updates the color classes in the documentation and
stories to reflect the new semantic naming conventions. Additionally,
the structure of the theme configuration has been changed from `theme`
to `globals`, ensuring a more organized approach to color management.
New migration documentation has been added to guide users through the
transition to the updated system, including steps for updating CSS
variables and button props.
2025-09-23 15:58:43 +02:00
Nathan Panchout
748d070bd9 ♻️(react) update Button component props and refactor related components
This commit modifies the Button component to switch the `variant` and
`color` props, ensuring consistency across various components that
utilize the Button. The changes include updates in the Alert, Modal,
Tooltip, and other components to reflect this new prop structure.
Additionally, several test and story files have been adjusted to
accommodate these changes, enhancing the overall component architecture.
2025-09-23 15:58:43 +02:00
Nathan Panchout
f93a83655c (demo) update demo app
Update the demo app to make it work with new tokens.
2025-09-23 15:58:43 +02:00
Nathan Panchout
47e3e28090 🎨(react) update tokens generated files
Based on the last modification, let's update the tokens files.
2025-09-23 15:58:43 +02:00
Nathan Panchout
afeddd5850 ♻️(tokens) refactor tokens architectures
Rework the way the object is structured.
2025-09-23 15:58:43 +02:00
Nathan Panchout
e24845b427 ♻️(tokens) improve tokens generation algo
This way the code is more readable, it makes easier the future
maintenability.
2025-09-23 15:58:43 +02:00
Nathan Panchout
186f0b86b7 🎨(react) enhance Color and Spacing documentation
Update colors and spacings documentation to reflect new token
architecture. Introduced contextual backgrounds and updated color
classes for consistency.
2025-09-23 15:58:43 +02:00
Nathan Panchout
d79d58885a 🎨(react) enhance Pagination component styles
update Pagination token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
3e4da2f95a 🎨(react) enhance Tooltip component styles
update Tooltip token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
6105377811 🎨(react) enhance Toast component styles
update Toast token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
b04fdd32c7 🎨(react) enhance Modal component styles
update Modal token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
dcf1c8b8bb 🎨(react) enhance Loader component styles
update Loader token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
43337d4f7f 🎨(react) enhance FormExemples stories
update FormExemples stories with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
c9f6d2d41c 🎨(react) enhance TextArea component styles
update TextArea token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
d04b52eaf5 🎨(react) enhance Switch component styles
update Switch token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
2123aedb72 🎨(react) enhance Select component styles
update Select token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
2a65010ecd 🎨(react) enhance Radio component styles
update Radio token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
248ac05c81 🎨(react) enhance LabelledBox component styles
update LabelledBox token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
d7ae9fc9d1 🎨(react) enhance Input component styles
update Input token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
e002cfde0f 🎨(react) enhance FileUploader component styles
update FileUploader token and css files with new css variables
introduce with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
fe0c2b367f 🎨(react) enhance field component styles
update field token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
8f71cdb7f9 🎨(react) enhance DatePicker component styles
update DatePicker token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
91aead45d9 🎨(react) enhance checkbox component styles
update checkbox token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
c3e39a46ac 🎨(react) enhance datagrid component styles
update datagrid token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
59b362407d 🎨(react) enhance button component styles
update button token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
3e62cdb929 🎨(react) enhance alert component styles
update alert token and css files with new css variables introduce
with the new tokens architectures
2025-09-23 15:58:43 +02:00
Nathan Panchout
bccdebd770 🎨(react) update theme tokens and structure
This commit introduces a comprehensive update to the theme tokens in the
Cunningham package. The previous color definitions have been replaced
with a new structure that includes global color tokens for branding and
contextual elements. Additionally, the SCSS and JS files have been
refactored to align with this new token architecture, enhancing
maintainability and ensuring a cohesive design system across the
application. The TypeScript configuration has also been updated to
support JSX syntax.
2025-09-23 15:58:43 +02:00
Nathan Panchout
afb313fee0 🎨(react) update storybook theme colors and refactor theme structure
This commit updates the theme colors in the Storybook configuration to
use the new global color definitions. The changes include replacing
greyscale colors with their corresponding gray colors for consistency.
Additionally, the theme structure has been refactored to align with the
updated token architecture, enhancing maintainability and ensuring a
cohesive design system across the application.
2025-09-23 15:58:43 +02:00
Nathan Panchout
146a8a20b3 ♻️(tokens) refactor tokens architectures
This commit introduces a significant refactor of the color and
typography tokens in the Cunningham package. The previous structure has
been replaced with a more comprehensive and organized format, including
new color definitions for branding, contextual backgrounds, and content.
Additionally, the font sizes, weights, and families have been updated to
align with the new design system. This change enhances the overall
maintainability and scalability of the token system.
2025-09-23 15:58:43 +02:00
jbpenrath
2775d5956d 🔖(release) version packages
Bump to @openfun/cunningham-react 3.2.3
2025-08-18 17:42:57 +02:00
jbpenrath
fe8c464862 🌐(react) add missing french translations
Some french translations were missing.
2025-08-18 17:42:57 +02:00
jbpenrath
04ee50215a 🔖(release) version packages
Bump to @openfun/cunningham-react 3.2.2
2025-08-07 10:15:07 +02:00
jbpenrath
2ee7450915 (react) fix flaky test
On CI, a test times out frequently. We increase the timeout
threshold to prevent that..

Resolve #355
2025-08-07 10:15:07 +02:00
jbpenrath
8e049bc21e 🐛(react) disable button link
According to its prop, the Button component can be rendered as
a link but in this case, the prop `disabled` has no effect. So to fix
that if the Button receives a `href` prop and is disabled, we apply
a modifier class `.c__button--disabled`.
2025-08-07 10:15:07 +02:00
Nathan Panchout
d976c6f51c 🔖(release) version packages
Bump to @openfun/cunningham-react 3.2.1
2025-07-29 16:44:17 +02:00
Nathan Panchout
06926863c6 (react) fix translations and add missing translations
This commit improves the translations method to handle undefined values
gracefully and adds several missing translations for modals in the
French locale.
2025-07-29 16:44:17 +02:00
jbpenrath
7ef8930bc8 🐛(react) prevent input cursor to jump on searchable multi select
Fix an issue that cause the input cursor to jump when user
types in the search input of a multiple select.
2025-07-29 16:04:58 +02:00
jbpenrath
0b4913c5a3 🔖(release) version packages
Bump to @openfun/cunningham-react 3.2.0
2025-07-24 11:40:09 +02:00
jbpenrath
ef8a225406 🐛(react) use uniqueId for modal portals
When a ModalProvider is mounted, it renders a div with an id which is use as
container to render modals through portals. But currently, if developer use
several CunninghamProvider across its application, a container with the same
id will be rendered several times that is weird. To prevent this kind of id
collision, we decide to generate a unique Id for each ModalProvider.

Resolve #352
2025-07-24 11:40:09 +02:00
jbpenrath
5b0d794217 📦️(react) export LabelledBox component
Allow to import LabelledBox component by consumers
2025-07-24 11:40:09 +02:00
jbpenrath
337128d54f 🔖(release) version packages
Bump to @openfun/cunningham-react 3.1.0
2025-05-06 09:57:28 +02:00
jbpenrath
e9a85ee63f 🐛(react) prevent error on searchable select
When a select is searchable, when the user search term but this one return
no items, currently the component raise an error.
2025-05-06 09:57:28 +02:00
Nathan Vasse
a343db2b0e (react) export locale in package
We want to be able to import the locales from the consumer in order
to customize them.
2025-05-05 18:00:22 +02:00
jbpenrath
b1850c029a 🚨(react) fix type and sass warning after deps upgrade
- Do not use deprecated `map-get` Sass method
- Fix type issue in `DatePicker`
2025-05-05 17:56:15 +02:00
renovate[bot]
cf6cf55bae ⬆️(dependencies) update js dependencies 2025-05-05 17:56:15 +02:00
renovate[bot]
186d163050 ⬆️(dependencies) update js dependencies 2025-03-31 11:31:24 +02:00
Laurent Bossavit
d89fa9d449 ⬆️(peer) make React a peer dependency per normal practice
Making React a peer dependency reduces the risks of users ending up
with inconsistent versions of React…
2025-03-24 17:17:59 +01:00