Commit Graph

175 Commits

Author SHA1 Message Date
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
86815cf95b 🔧(react) migrate to vite 6
With the new major version of vite, some path resolution did not work so
we update our vite config to resolve properly paths starting by 'src'.
Furthermore there were some deprecation warning about the use of cjs
files as vite configuration so we use 'mts' extension for all vite
config files in react package to allow vite to detect them as
ES Modules.
2025-01-08 11:02:50 +01:00
jbpenrath
b0b7061b7a ⬆️(deps) migrate to typescript-eslint 8
A major version of typescript-eslint has been released. This version contains
some breaking change and rules change so we have to tweak our eslint
configuration.

https://main--typescript-eslint.netlify.app/blog/announcing-typescript-eslint-v8
2024-08-20 13:51:29 +02:00
jbpenrath
dbd5f05652 🏷️(react) fix types issue
Since upgrade of @react-stately/calendar, a type issue was emit and
broke the build.
2024-07-29 14:46:52 +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
a70f8129eb (react) remove warnings during tests
Numerous warnings was raised during tests. We remove most of them. Some
needs to be discussed before fix.
2024-04-29 15:38:22 +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
9c614953b8 ♻️(react) remove faker usage from stories
Random data in stories was causing Chromatic to detect changes during
each build.
2024-03-25 15:40:27 +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
c63aff4861 📝(react) upgrade stories for Storybook 8
The old way of using Canvas is deprecated, we need to migrate all the
stories to the new standard.
2024-03-21 17:00:04 +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
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
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
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
7461626822 📱(react) improve DateRangerPicker responsive
The component was not able to resize properly on narrow screens.
2024-02-28 17:19:32 +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
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
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
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
5c5964cf9d 🐛(react) change most tertiary buttons to tertiary-text
Since the addition of tertiary-text variant, the original tertiary
variant has seen its background color changing from transparent to
greyscale-100, the change has impacted lots of components making
them look odd. So that's why I updated most of old tertiary to
tertiary-text.

Fixes #223
2024-01-08 15:26:37 +01:00
Nathan Vasse
7ddcfeb4bc 🐛(react) fix closing of menu via toggle button
Previously it was not possible to close the menu when clicking on
the toggle button on search select. It was caused by a conflicting
state update.
1. Downshift triggers closing the menu from getToggleButtonProps
2. wrapperProps was calling downshiftReturn.openMenu()
2023-11-30 10:40:13 +01:00
Nathan Vasse
e3882eb308 🏷️(react) support ReactNode as input label
There are use cases that required to put links inside Checkboxes or
Radio inputs.
2023-11-27 10:02:28 +01:00
Nathan Vasse
94b32be5d3 (react) add monoline props to multi select
We want to enable a mode that prevent the pills the wrap on multiple
lines in order to control any height overflowing. In monoline mode the
selected items are displayed as text to allow text ellipsis, and the
menu renders the list items with checkboxes.
2023-11-24 11:01:41 +01:00
Nathan Vasse
7c13badeb2 ♻️(react) delete duplicated SelectMultiProps
During dev I realized that we had a duplicated SelectMultiProps which
was really misleanding.
2023-11-24 11:01:41 +01:00
Lebaud Antoine
d5fcf500b7 ♻️(react) merge duplicated scss classes related to accessibility
'offscreen' and 'c__offscreen' were duplicated, merge these two classes
in a dedicated utils file.
2023-10-24 20:32:42 +02:00
Lebaud Antoine
430f893645 🩹(react) update stylesheet to use modern SASS
Replaced deprecated '@import' with '@use' to align with best practices.
Refactored stylesheet to behave as a partial, enhancing SASS compilation
efficiency.
2023-10-24 20:32:42 +02:00
Nathan Vasse
41a0b6f636 🐛(react) fix Input value font family
The font family of the design system was not applied to input value.
2023-10-24 11:56:47 +02:00
Nathan Vasse
067f80c562 📝(react) fix Input doc
This typo was probably due to a bad copy pasta.
2023-10-24 11:56:47 +02:00
Nathan Vasse
65850dc72f 📝(react) add TextArea to form examples
This is made to showcase the TextArea in real world use cases.
2023-10-24 11:56:47 +02:00
Nathan Vasse
bbf3df852f (react) add TextArea component
How could we ship a design system library without a textarea?
2023-10-24 11:56:47 +02:00
Nathan Vasse
01528b9377 (react) render Button as link
For a variety of reasons, such as accessibility or integration with
external react-router deps style we needed to be able to provide the
ability to render the Button component as link in order to be able
to provide link-specific attribute for rendering such as href.
2023-10-23 15:27:47 +02:00
Nathan Vasse
b86ba5cc8e (react) add select multi options custom render
We want to be able to render the options in a customized manner.
2023-10-19 11:35:19 +02:00
Nathan Vasse
48e4e56a44 (react) add select mono option custom render
We want to be able to render the options in a customized manner.
2023-10-19 11:35:19 +02:00
Nathan Vasse
d39d33d02c 🐛(react) fix inputs overflowing placeholder
The oveflowing labels were spreading on two lines. I had to wrap a
span inside a label in order to be able to deal with the text-oveflow
plus the absolute positionning.
2023-10-16 12:01:35 +02:00
Nathan Vasse
b5c91d429d 🏷️(react) move SelectProps to index.tsx
It makes more sense for this type to be next to the Select component.
2023-10-04 16:02:06 +02:00
Nathan Vasse
1c7a114b6e (react) add ref to Select
We encountered a use-case where we needed to blur the select programatically
but the component wasn't offering any way to do that.
2023-10-04 16:02:06 +02:00
Nathan Vasse
d647a77c58 🐛(react) fix multi select focus
The multi select non searchable was not displaying its blue accent
color when opening the menu by not clicking on the toggle button.
2023-10-04 16:02:06 +02:00
Nathan Vasse
b0d68becfe ♻️(react) update stories for themes
The stories do not need CunninghamProvider anymore since it is
handled by the configuration for the themes support. Some stories
were also using wrong colors that didn't handle multiple themes.
2023-10-04 15:18:00 +02:00
Nathan Vasse
e2c0d3259b ♻️(react) update token.ts to handles themes
Some components were using wrong design tokens and this was noticed
only when changing themes, like using hard-coded "white" instead of
"greyscale-000".
2023-10-04 15:18:00 +02:00
Lebaud Antoine
539f03eee1 🩹(react) handle possible null date range
Exercise caution when dealing with date range values that may be null.
2023-10-03 11:52:23 +02:00
Nathan Vasse
a46d28f00a 💄(react) make multi select height homogeneous
Some discussion appeared about the fact the multi select was changing
height when pill were selected, making this input having a bigger
height than others making it looks weird in a form comparing to the
others. Modifying the padding and font size make the input keep the
same height.

See #114
2023-10-03 11:18:56 +02:00
Nathan Vasse
a1e8f46368 🐛(react) fix checkbox double onChange
When clicking on the checkmark it was trigerring two onChange on parent
elements, thus causing double toggling ( which means revert to the initial
value ) in some controlled way approaches ( see the added test ).

Fixes #175
2023-10-02 11:53:04 +02:00
Nathan Vasse
e15586da9b 🐛(react) fix missing mono-simple useEffect dep
A recent rebased cause one the dep to be removed.
2023-09-28 15:43:24 +02:00