232 Commits

Author SHA1 Message Date
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
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
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
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
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
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
79c59acd0d 🐛(react) fix DateRangePicker issue
We encountered a bug with the date range picker due to an internal
logic of `@react-aria/calendar`. This bug silently came back recently but
our test suite does not trigger that but since the update of
`@testing-library/user-event` a test starts to fail and highlight this issue so
we fix again this bug.

https://github.com/adobe/react-spectrum/commit/12f2f4e
2025-03-18 10:44:16 +01:00
jbpenrath
0852403442 🔖(release) version packages
Bump to @openfun/cunningham-tokens 2.2.0
Bump to @openfun/cunningham-react 3.0.0
2025-01-08 11:21:35 +01:00
jbpenrath
56d9ed88f0 💥(react) upgrade to React 19
https://react.dev/blog/2024/04/25/react-19-upgrade-guide
https://react.dev/blog/2024/12/05/react-19
2025-01-08 11:02:50 +01:00
jbpenrath
1c1300b9ef ⬆️(tokens) migrate commander.js to 13.x from 12.x
Shortcut argument with several chars are no more accepted so we have to
rename `-cwd` option to `-w`.
2025-01-08 11:02:50 +01:00
jbpenrath
418fac1b21 🔖(release) version packages
Bump to @openfun/cunningham-react 2.9.4
2024-08-20 14:47:48 +02:00
jbpenrath
dc8015f080 💄(react) use overflow auto instead of scroll
Currently, Tooltip and Datagrid components are set to always scroll bar.
This is weird, as the scrollbar is always shown even if this is not
needed. Instead, we use `auto` value to display it only when
it is needed
2024-08-20 14:47:48 +02:00
Nathan Vasse
1514e4f0b3 🐛(react) make datagrid select column visible
Due to a previous commit f398e51db3 the selection
column was invisible, this way caused by having table-layout: fixed and
width: 0 on the select column at the same time.
2024-08-20 11:36:46 +02:00
jbpenrath
441793855d 🔖(release) version packages
Bump to @openfun/cunningham-react 2.9.3
2024-05-28 11:03:14 +02:00
jbpenrath
b6c0565958 🐛(react) allow to set column size for data grid without header
Currently, to set the width of column we define a width to the
corresponding header cell. But DataGrid components allows to not render
header rows so in this case, the size is not set. In order to fix that,
if header is not rendered, we set width of cell to the corresponding
column.
2024-05-28 11:03:14 +02:00
jbpenrath
a9d7babfdc 🔖(release) version packages
Bump to @openfun/cunningham-react 2.9.2
2024-05-24 16:29:09 +02:00
jbpenrath
6bae4ad89a 🐛(modal) make modal scrollable when height exceeds the viewport height
Currently, if the content of a modal exceeds the viewport height, it is
not scrollable.
2024-05-24 16:29:09 +02:00
Nathan Vasse
add825c812 🔖(release) version packages
Bump to @openfun/cunningham-react 2.9.1
2024-05-17 09:55:27 +02:00
Nathan Vasse
e53cc730fc 💄(react) disable default Modal text align center
This default behavior was causing lots of troubles when using modals.
For instance the Select value were centered, it was also the case for
most of consumer's component inside modals, forcing the users to
set text-align:left on their side, resulting in additionnal work.
Now we use another approach by using a specific div for the content
we want centered.
2024-05-16 14:43:17 +02:00
Nathan Vasse
582027f22a ♻️(react) add a scroller div inside modal
Having the position fixed and at the same time overflow auto on the same
element was causing absolute children to be cropped. We need to set those
two attribute on two different parent for these children to not be cropped.
Yes this is weird, this is CSS.
2024-05-16 14:43:17 +02:00
Nathan Vasse
06c5c9dff3 ♻️(react) use react aria for select menu
The way the menu of the select was made was causing it to be cropped
inside modals, it was due to the fact the menu was nested inside a
position relative parent. Now we use react aria to position in full
absolute the menu, making it to be correctly displayed inside modals.
2024-05-16 14:43:17 +02:00
jbpenrath
3374093225 🔖(release) version packages
Bump @openfun/cunningham-react to 2.9.0
2024-04-29 16:04:22 +02:00
renovate[bot]
737c8f4b4d ⬆️(dependencies) update js dependencies 2024-04-29 15:38:22 +02:00
Nathan Vasse
416d5c1d7e 🔖(release) version packages
Bump @openfun/cunningham-react to 2.8.0
2024-04-24 17:34:12 +02:00
Nathan Vasse
91c8935a8a 🐛(react) fix Select mono selected item update label
When we were updating the label from the options array of the selected
item, the field was still showing this old value.

Fixes #316
2024-04-24 17:23:26 +02:00
Nathan Vasse
6ebeb116d3 ♻️(react) migrate Modals to react modal
We encoutered an issue where stacked modal backdrop were not rendered
above the modal below. It was caused by the dialog element that is
natively rendered on the top layer regardless where it is create in
the DOM. So we decided to use react modal that provides hand crafted
dialog, and implementing a11y features.

Closes #314
2024-04-23 14:38:44 +02:00
Nathan Vasse
c61b2ac43d (react) introduce large and extra-large new modal sizes
We realized it was missing an in between medium and large existing
modal sizes. The old large now become extra-large.

Closes #313
2024-04-23 14:38:44 +02:00
Nathan Vasse
c81c0eaf43 🔖(release) version packages
Bump @openfun/cunningham-react to 2.7.0
2024-03-28 17:36:03 +01:00
Nathan Vasse
dd1f2be22c 📦️(react) remove public files from build
Those unwanted files were included in the build, thus in the package.

Fixes #308
2024-03-28 11:31:36 +01:00
Nathan Vasse
a8ec9fb757 (react) add InputPassword
We had the need to have a built-in password input able to show or
hide the password.

Closes #301
2024-03-21 17:16:39 +01:00
Nathan Vasse
0ef7684b12 (react) add Tooltip component
This component will allow to provide contextual information on any
DOM node.

Closes #239
2024-03-21 16:14:55 +01:00
Nathan Vasse
b4a6367bce 🐛(react) fix DataGrid selection checkbox rerendering
Each time a row was select or unselect the checkbox was re-triggering
its animation, which looked buggy.

Fixes #37
2024-03-19 14:34:14 +01:00
Nathan Vasse
20f5bb703b ♻️(react) make className standard across components
The className prop was sometimes set onto the nested element and
sometimes on the container element, which was not consistent. Now
we always set the className onto the upmost element.
2024-03-19 14:15:35 +01:00
Nathan Vasse
f398e51db3 (react) add width property to DataGrid columns
Without this feature we needed to override CSS directly in order to
make columns a specific width.

Closes #240
2024-03-18 17:01:01 +01:00
Nathan Vasse
25e61c2b4a (react) add enableSorting support on DataGrid
Previously it was only available at column level. This way we will
be able to disable sorting on all columns at once.

Closes #298
2024-03-15 15:47:43 +01:00
Nathan Vasse
8e7300b92c 💄(react) add border-radius transition
This transition was not working, now this provides are smoother effect.

Closes #112
2024-03-13 15:53:59 +01:00
Nathan Vasse
974f139f14 🐛(react) add warning when onSortModelChange is missing
We encountered the case were a user reported that the column were
making cursor pointer but clicking on it was doing nothing. It was
caused by the fact that onSortModelChange was not provided. So in
this case we trigger a warning only if enableSorting is true on one
column at least.
2024-03-12 11:34:20 +01:00
Nathan Vasse
317cab4bad (react) add sorting on custom cells
Previously sorting on custom cells was not possible because they were
considered as "display cells" by React-Table, which is made for actions
columns, which aren't sortable.

Closes #296 #100
2024-03-12 11:34:20 +01:00
Nathan Vasse
30ec253ab0 (react) make Pagination goto input optionnal
Based on a recent request we needed to make it optionnal in order to
have simpler pagination in some cases.

Closes #183
2024-03-08 16:33:54 +01:00