Commit Graph

31 Commits

Author SHA1 Message Date
Nathan Vasse
9de9a9735d 💄(react) improve Select actions ui
The button were too big compared to the sketches. So we re-adjust their
sizes and positions.
2023-09-11 12:07:49 +02:00
Nathan Vasse
cf542e4fa9 💄(react) fix DatePicker, Select, Input success colors
This is based on recent QA report.
2023-09-11 12:07:49 +02:00
Nathan Vasse
9a349c1556 💄(react) fix Select and Input error colors
This was a feedback from the QA.
2023-09-11 12:07:49 +02:00
Nathan Vasse
1c45b93a85 💄(react) homogenize form fields colors
Based on the QA feedbacks we figured out that form fields were not all
using the exact same greyscale colors.
2023-09-11 12:07:49 +02:00
Nathan Vasse
051c79fd6f ♻️(react) improve props propagation
Before we had to edit input components using Field when adding new props
to the latter.
2023-09-05 11:48:04 +02:00
Nathan Vasse
b530e966ae (react) add textItems to Field
This allow to add bullet points lists below inputs, the best example
is when we want to list multiple errors from form validation.

Fixes #147
2023-09-05 11:48:04 +02:00
Nathan Vasse
468c8161eb 📝(react) add RHF examples
Rework a bit the recent work made on RHF example to make some component
more generic, such as RhfSelect and RhfDatepicker, which is based on a
design using RHF context hooks to provide a seamless integration.

Fixes #144
2023-09-05 11:15:51 +02:00
Nathan Vasse
a88aa1a23d 🐛(react) fix isActive console warning
Previously when interacting with a select, the list items
were triggering a warning.
2023-09-05 11:15:51 +02:00
Nathan Vasse
66c25bcdbd 🏷️(react) export more types
Based on recent developers feedbacks that needed to use props types
in order to wrap the lib's component they were stuck because we were
not exporting all of them.

Fixes #143
2023-08-29 16:26:40 +02:00
Romain Le Cellier
e3563f85d1 (react) react-hook-form Select example
Our form elements needs to be usable with react-hook-form
2023-08-07 16:25:00 +02:00
Nathan Vasse
40f2eb2b06 ♻️(react) upgrade code for Downshift 8
This new major version broke our components, including the way the menu
gets opened, how to determine the disabled options and some other semantic
types changes.
2023-07-18 16:59:39 +02:00
Nathan Vasse
d85f9edac8 🚨(lint) update file for prettier 3.0.0
Prettier 3.0.0 comes with new standards so we need to upgrade our files
to comply with it.
2023-07-18 16:59:39 +02:00
Nathan Vasse
34d2fe0af3 (react) max width for multi select pills
In order to prevent a pill with a long text to stack below the actions
div we decided to introduce the concept of max-width for pills.
2023-06-19 15:04:05 +02:00
Nathan Vasse
29b58ed1a6 (react) use css float for multi select
Previously the pills were not stacking under the actions div, now we can
do it using the forgotten CSS float feature.
2023-06-19 15:04:05 +02:00
Nathan Vasse
3ff2ac4a64 📝(react) add multi select doc
Also rename existing doc for the mono select to mono.mdx for homogeneity
purposes.
2023-06-19 15:04:05 +02:00
Nathan Vasse
c8afa105dd (react) add multi select
Adding this new variant makes necessary to reorganize the files to keep
a clear separations of concerns. As of now Select/index.tsx is just an
entrypoint to render either the mono or multi variant of the select.
2023-06-19 15:04:05 +02:00
Lebaud Antoine
10fa71e2a7 (react) add DatePicker component
Based on the Figma DS design by Alex, a mono date-picker
component has been added. It uses react-aria headless ui
component capabilities, with downshift headless ui component.
React-aria was not supporting by default dropdown menus to
select months and years. We could not reuse Popover component
from react-aria because we are not using their headless ui
component for the button one. Clicking on the toggle calendar
button triggers both the button and the popover click outside
events. React-aria button uses a custom onPress props that is
disabled by their popover. Instead, I have implemented a simple
custom hook. This is the first acceptable version of the component.
Some minor user interaction are missing. This first component
doesn't support time selection.
2023-06-12 18:57:20 +02:00
Lebaud Antoine
6f05995f24 🎨(react) make eof stylesheets consistent
Some older tools misbehave if the last line of data
in a text file is not terminated with a newline.
It makes sure the last line was properly terminated.
2023-06-12 17:08:01 +02:00
Lebaud Antoine
59cf5de66d 📝(react) add missing design tokens on Select's documentation
Design tokens documented in the Select docs should match the available tokens.
This modification offer an exhaustive and complete list of the design
tokens available to customize the select component.
2023-06-12 16:29:26 +02:00
Lebaud Antoine
fe91471127 💄(react) improve DX when converting px to rem values
It can be tricky, while integrating the figma design file,
to map some small px values to their rem equivalent. Thus,
this PR proposes a new util function converting pixel to rem.
It would ensure that all size values can scale base on the
font-size base, while keeping a good developer experience.
2023-06-01 19:20:05 +02:00
Nathan Vasse
a869fe51dc 💄(react) reduce inputs borders
We do this in order to have homogenous border accross the entire
library, before we had DataGrid with 1px border and inputs with 2px
borders, which was not really nice to the eye.
2023-06-01 12:05:32 +02:00
Nathan Vasse
ef4ece39b4 🐛(react) fix label color on state disabled ( select, input )
When creating LabelledBox we introduced a bug than overrides the label
colors when inputs are disabled.
2023-05-24 16:49:49 +02:00
Nathan Vasse
75c6e2e482 💄(react) change label color when focused ( select, input )
We forgot to implement this behavior when coding these inputs.
2023-05-24 16:49:49 +02:00
Nathan Vasse
d79f01fd93 (react) add the possibility to hide select label
Based on recent feedbacks this feature was needed. It is important for
the label to still be accessible to screen readers, that's why we
introduced the offscreen class.

Resolve #60
2023-05-24 15:58:07 +02:00
Nathan Vasse
c93c8d2a2f (react) add disable property to select option
Based on recent feedbacks, this feature was needed for consumer apps.

Resolve #60
2023-05-24 15:58:07 +02:00
Nathan Vasse
c11727976c (react) add clearable option to Select
Based on a feedback given from another project, we want to be able
to disable the clear feature on the select.

Resolve #60
2023-05-24 15:58:07 +02:00
Nathan Vasse
ce6eb50a98 ♻️(react) migrate ArgsTable to ArgTypes and rework imports
Storybook was emitting warnings errors about the fact that ArgsTable
is deprecated, and also I rewrote imports as those are not the one
used in the doc anymore, this will prevent breaking changes in the
upcoming upgrades.
2023-05-23 10:10:40 +02:00
Nathan Vasse
8cda41772d ♻️(react) fix Storybook source blocks
Due to the recent upgrade to Storybook 7, the source blocks of Canvases
were broken, they were only showing args. This was mainly due to the fact
that as of Storybook 7 the meta tags of the MDX files have changed, thus
causing the issue. These are now based on imports. We also needed to rename
index.stories.mdx files to index.mdx because Storybook was throwing errors,
maybe due to a conflicts with index.stories.tsx files and new imports.
Anyway this way of naming MDX files seems to be the recommend one based on
the official documentation.
2023-05-23 10:10:40 +02:00
Nathan Vasse
77721c3b6d ♻️(react) migrate to Storybook 7
This new release comes with breaking changes for stories and mdx docs.
2023-05-15 11:04:06 +02:00
Nathan Vasse
e7fc782b1c ♻️(react) migrate faker api
faker-js introduced breaking changes in their APIs, so we needed to migrate
our usages.
2023-05-15 11:04:06 +02:00
Nathan Vasse
2ff5fc5d29 (react) add Select component
Finally our powerful Select component is available to make great forms!
2023-05-12 11:13:38 +02:00