Commit Graph

542 Commits

Author SHA1 Message Date
Nathan Panchout
367958ca17 (LabelledBox) add classic variant support
- Add variant prop to LabelledBox component
- Ignore labelAsPlaceholder in classic mode
- Add CSS styles for .labelled-box--classic
- Add unit tests for both variants

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:32:26 +01:00
Nathan Panchout
5b522e34f3 (forms) add FieldVariant enum and classic variant tokens
- Add FieldVariant enum with Floating and Classic values
- Add design tokens for classic variant (height, label styles)
- Regenerate cunningham-tokens files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:32:26 +01:00
jbpenrath
f3f59ce064 🔖(release) version packages
Bump tokens package to version 3.1.0
Bump react package to version 4.1.0
2025-12-15 12:58:38 +01:00
jbpenrath
db26e21b88 🧑‍💻(tokens) add getThemesFromGlobals utils
Export a new util method `getThemesFromGlobals` to easily generate theme with
its variant only by providing a partial globals object. By default it returns
both available theme variants (light & dark). Through options you can prefix
variant property keys, only generate theme with a subset of variant and also
overrides/extend theme.
2025-12-15 12:58:38 +01:00
jbpenrath
fe8eb4b802 ⬆️(react) update react peer deps
A high level CVE has been published about react. We enforce to use
a patched version of react 19.1
2025-12-15 12:58:38 +01:00
jbpenrath
4e91b0adc0 ️(react) add ariaLabel to modal
The accessibility plugin checks raise an error about modal component. Actually
we did not allow user to set an accessible name to the modal.
2025-12-15 12:58:38 +01:00
jbpenrath
67ba361370 💄(react) homegenize form inputs states
Currently between all components some states were not aligned (error, success,
hover, focus,...)
2025-12-15 12:58:38 +01:00
jbpenrath
992061fc8e 🐛(tokens) fix token issue
Fix differences between Figma variables and existing tokens. Warned by
color constrast a11y check that failed.
2025-12-15 12:58:38 +01:00
jbpenrath
a6681d19ed 📦(all) update packages namespace
Change packages namespace from `@openfun` to `@gouvfr-lasuite`.
2025-11-03 14:43:08 +01:00
jbpenrath
6097929593 🚚(global) update paths and urls after ownership transfer
This repository has been recently transfered from openfun to lasuitenumerique.
We need to fix some paths and urls especially to fix documentation and README
2025-11-03 14:43:08 +01:00
jbpenrath
4220061bc0 📌(react) update version strategy of peer deps
Currently peer deps are pinned. This is pretty annoying as all app consumers
must stick to the peer deps package version define in Cunningham and must
wait that cunningham upgrades them to upgrade on their side. Allow to
install minor and patch version of react & react-dom.
2025-11-03 14:14:26 +01:00
Nathan Vasse
a2aa9c2e14 🔖(release) version packages
Bump repo for new tokens architecture.
2025-09-23 17:13:00 +02:00
Nathan Vasse
187801e15d (react) fix flacky date picker test
This test was flacky, let's fix it.
2025-09-23 15:58:43 +02:00
Nathan Vasse
6b610714e2 (tokens) fix tests
The last inline snapshot was not correct, maybe due to recent changes
and fixes after.
2025-09-23 15:58:43 +02:00
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