Commit Graph

388 Commits

Author SHA1 Message Date
Nathan Vasse
5446d70bca 📝(react) fix RHF login example
This story was broken due to incorrect usage of FormProvider.
2024-03-18 16:48:35 +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
renovate[bot]
91a7b2369f ⬆️(dependencies) update js dependencies 2024-03-11 16:29:45 +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
Nathan Vasse
d63c203b21 🚨(react) fix CSS end warning usage
Next.js is warning about the usage of end instead of flex-end during
compilation.

Fixes #291
2024-03-08 15:06:25 +01:00
Nathan Vasse
31fa91e92f (react) add empty placeholder customization props
We want to be able to customize the empty placeholder label, add a
call to action and choose whether we want to display the image as well.

Closes #27
2024-03-06 17:43:29 +01:00
Nathan Vasse
c667d51a11 🔖(release) version packages
Bump @openfun/cunningham-tokens to 2.1.1
Bump @openfun/cunningham-react to 2.6.0
2024-03-04 15:50:15 +01:00
Nathan Vasse
04ab3306e2 (react) add onSearchInputChange callback to searchable select
We want to be able to notify an event when the search term of the
searchable select gets updated.
2024-03-04 14:40:40 +01:00
Nathan Vasse
680365a117 💄(react) make Modal close button sticky
We want to make sure this button is always visible inside scrollable
modals.

Fixes #278
2024-02-28 17:36:32 +01:00
Nathan Vasse
c5e5d9fa85 📝(react) make color prop of Button appear in the doc
This prop color was not appearing in the ArgTypes because it was an override
attribute.

Fixes #235
2024-02-28 17:31:02 +01:00
Nathan Vasse
ce7a3d7c5b 📱(react) improve Modal responsive
The footer of the Modal component was not perfect on mobile, the sided
footer must be on two lines on mobile.
2024-02-28 17:19:32 +01:00
Nathan Vasse
4fbd75cdcf 🐛(tokens) fix invalid sass with comma
The generated sass from tokens containing commas, like font families was
not valid due to the way maps are made in sass. So we wrap those value
in quotes.
2024-02-28 17:19:32 +01:00
Nathan Vasse
7461626822 📱(react) improve DateRangerPicker responsive
The component was not able to resize properly on narrow screens.
2024-02-28 17:19:32 +01:00
Nathan Vasse
54df5d6c71 💄(react) remove modal content outline on focus
This was giving a strange look n feel, neither improving a11y.
2024-02-28 17:19:32 +01:00
Nathan Vasse
6d1da169e7 ♻️(react) prevent animate usage on some envs
This animate function is not supported by some testing environments,
to prevent any crashes on consumers side we need to first make sure
this function is defined.

Fixes #281
2024-02-28 10:51:47 +01:00
Nathan Vasse
ea39ea09fd 🔖(release) version packages
Bump @openfun/cunningham-react to 2.5.0
Bump cunningham-demo to 2.0.0
2024-02-21 16:43:45 +01:00
Nathan Vasse
a17c805f50 🐛(react) fix closeOnClickOutside not working
Our recent changes to enable the customization of the modal backdrop
caused this prop to not work anymore.
2024-02-21 16:08:23 +01:00
Nathan Vasse
7f12f4d9b0 🐛(fix) fix body scroll when a modal is opened
It was possible to scroll the body when a modal is opened, it was
cutting the visibility of the modal, and was simply weird.

Fixes #263
2024-02-21 14:54:52 +01:00
Nathan Vasse
266701a733 🐛(react) fix default opened modal
Modal with isOpen=true on first render were causing a crash. With
this approach we make sure the portal node is already rendered.

Fixes #259
2024-02-20 17:21:32 +01:00
renovate[bot]
95a6d6dec7 ⬆️(dependencies) update js dependencies 2024-02-19 17:24:21 +01:00
Nathan Vasse
10c9abf1d2 (demo) add delete confirmation modal
We want to showcase pre built modals in the demo.
2024-02-19 16:48:39 +01:00
Nathan Vasse
f81005f66c 🏷️(react) export ModalProvider to package
We were not able to import useModals from consumer code. It was
preventing us to use pre built modals.

Fixes #262
2024-02-19 16:48:39 +01:00
Nathan Vasse
c3416f3113 🏷️(react) modal title type
We need to be able to use any ReactNode a modal title.

Fixes #260
2024-02-19 15:39:03 +01:00
Nathan Vasse
670eb8ce57 🏷️(react) remove ModalFooter export
This component was not supposed to be exported, it could be misleading
for consumers.

Fixes #258
2024-02-19 15:30:39 +01:00
jbpenrath
be1e2e2614 💄(react) make modal backdrop color customisable
As we cannot user CSS vars into backdrop pseudo element, we decide to
create a dom element to simulate the modal backdrop.

Resolve #257
2024-02-15 14:54:17 +01:00
Nathan Vasse
def859ee0b 👷(ci) put storybook build in a gh-pages sub folder
Our main goal doing this is to allow us to have multiple static build
standing next to each other on our gh-pages.
2024-02-14 15:47:44 +01:00
Lebaud Antoine
9795b7184b 🩹(react) fix DateRangePicker layout overflow
Resolved a width conflict in the date range picker where the field width
conflicted with the component's min-width. This caused content
overflow in the field container, resulting in layout issues.
2024-02-14 10:39:34 +01:00
Nathan Vasse
f685abb36c ♻️(react) use info design tokens
Some info variant of components were using primary design token instead
of info.
2024-02-13 15:14:05 +01:00
Nathan Vasse
162809dd9c ♻️(react) remove disabled from getItemProps
This way triggering thousands of warnings in the console and during tests.
Removing it works because it seems that having item.disabled set allows
to not having to use isItemDisabled.
2024-02-13 10:36:14 +01:00
Nathan Vasse
ebfccc1f99 🐛(react) fix DatePicker dropdowns
When having a start date, using the year or month dropdown was
causing the calendar to abruptly close.

Fixes #244
2024-02-13 10:36:14 +01:00
Nathan Vasse
b0eff283a1 📝(react) enhance Application demo form
This form was not using multi select, adding it provides a way to
easily interact with all the form component in a single form making
sure they all work.
2024-02-12 11:46:09 +01:00
Nathan Vasse
f16eed9a6d 🐛(react) fix Select submit button
As the default type of button is "submit", when including a Select
inside a form, clicking on any of its button was triggering form
submission.
2024-02-12 11:46:09 +01:00
Nathan Vasse
e79768c7ce 🐛(react) fix DatePicker submit button
As the default type of button is "submit", when including a DatePicker
inside a form, clicking on any of its button was triggering form
submission.

Fixes #245
2024-02-12 11:46:09 +01:00
renovate[bot]
364a15596a ⬆️(dependencies) update js dependencies 2024-02-12 11:37:18 +01:00
Nathan Vasse
a32bac75db 🐛(react) fix missing selected option of Select
In some cases, when the options were newly built object, due to the
fact that we were using object equality to check for the current selected
item, it was not working in those cases.
2024-02-06 11:24:12 +01:00
Nathan Vasse
7649366006 💄(react) update select pills remove button
The button was still using the old tertiary buttons which resulted
in a odd background color, we want this button to have a transparent
background.
2024-02-05 17:54:29 +01:00
Nathan Vasse
d61ab65d82 🐛(react) fix multi select menu opening
At first we had a simple bug were it was not possible to open the
menu by clicking on the label. This fix is a rework to consider
the select wrapper as the toggle button itself, which is what we
do on the mono version. This change caused various tests to fail.
2024-02-05 17:54:29 +01:00
Nathan Vasse
1445f4a222 (react) add Modal
Here it is! Our really wanted Modal component, based on Figma sketches.
2024-02-05 15:23:03 +01:00
Nathan Vasse
81e4da1d36 ♻️(react) add colorFromType
This utils allows to give the appropriate color palette for each
AlertType | ToastType value.
2024-02-05 15:23:03 +01:00
Nathan Vasse
3d4236c7bd 🏷️(react) add WithOptional type
This type allows to make only specific attributes optionnal where
the existing Partial<T> makes all the attributes optionnal. Its
first use will be for Modals.
2024-02-05 15:23:03 +01:00
Nathan Vasse
7dcf08d308 🤡(react) add HTMLDialog mock
As JestDOM does not mock this element, we need to do it in order to
make Modal work in test environement.
2024-02-05 15:23:03 +01:00
renovate[bot]
a92ef3244b ⬆️(dependencies) update js dependencies 2024-01-29 16:34:31 +01:00
renovate[bot]
b870fbb760 ⬆️(dependencies) update js dependencies 2024-01-22 17:29:30 +01:00
renovate[bot]
894bf5c155 ⬆️(dependencies) update js dependencies 2024-01-18 17:47:47 +01:00
Nathan Vasse
baba9ab00a 💄(react) change DatePicker clear icon
The close icon was not homogeneous with the other form inputs.

Fixes #229
2024-01-17 10:14:24 +01:00
Nathan Vasse
97a54ee6ae 🐛(react) fix TextArea value color
The dedicated token was not used, so here it is.

Fixes #230
2024-01-16 17:44:00 +01:00
Nathan Vasse
1b049f5b03 🧪(react) fix Toast flacky test
This tests was sometimes failing due to this really low duration of
the Toast.
2024-01-08 16:34:43 +01:00