Commit Graph

26 Commits

Author SHA1 Message Date
Nathan Vasse
bc6d085868 💄(react) change label color on state error ( select, input )
We forgot to implement this during the first PRs.
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
9065d6c87b 💄(react) change success text color to comply with RGAA
Previsouly we were not matching the 4.5:1 contrast.
2023-05-24 15:37:50 +02:00
Nathan Vasse
9d7ad489ba (react) add Switch component
Implement a shiny new component that can be used as an alternative to
the regular checkbox.
2023-05-24 15:37:50 +02:00
Nathan Vasse
ec8def0cb1 🐛(react) fix Field that can be compact and fullWidth
Being able to define the Field to be compact and fullWidth at the
same time was misleading. We need to be able to set the Switch
component fullWidth if needed, while by default it is compact. This
change makes possible the fullWidth props to override compact mode.
2023-05-24 15:37:50 +02:00
Nathan Vasse
e72606cfcd 💄(react) make inputs labels bolder
The current labels of radio, checkbox and switches were not bold enough
to match the figma sketches.
2023-05-24 15:37:50 +02:00
Nathan Vasse
eb6692bf5e (react) add a design token for checkbox hover background
This was based on recent feedbacks to provide more granularity for
customization.

Resolve #59
2023-05-24 12:00:42 +02:00
Nathan Vasse
527c3fc0c9 (react) set specific cursor on checkbox related components
Even if this is not the default behavior of the native checkbox, based on
recent feedbacks and by comparing what other components libraries do, it
appears that setting a custom cursor on checkbox hover is the most
intuitive thing to do.

Resolve #59
2023-05-24 12:00:42 +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
Nathan Vasse
270484c0e7 ♻️(react) make Input use LabelledBox
Let's use the power of reusability!
2023-05-12 11:13:38 +02:00
Nathan Vasse
df57fb8a57 ♻️(react) create a generic LabelledBox
This component is responsible to display the label as placeholder for forms
input. It was tied inside Input but now we will need to have the same ui
for Select field, by extracting it in a dedicated component we make it
reusable quickly.
2023-05-12 11:13:38 +02:00
Nathan Vasse
d4a574c30f 🔧(react) fix types file broken imports
Generated types for the react package were broken because they were
still using absolute imports which cannot work in standalone .d.ts
files because they cannot rely on the local baseUrl compiler option.
Thus, we introduced an alias that we are able to reliably replace
during type generation.
2023-05-04 16:53:29 +02:00
Nathan Vasse
f5cb2e791e (react) add Radio component
Implement Radio input based on designed sketches.
2023-04-27 15:34:15 +02:00
Nathan Vasse
43096e2bab (react) add Checkbox component
Implement Checkbox input based on designed sketches.
2023-04-27 15:34:15 +02:00
Nathan Vasse
a462bb5a61 (react) add compact mode to Field
The Field component was only able to display for large fields like
text input, but for small component like Checkbox or Radio we need
to set specific generic padding that are suitable to those.
2023-04-27 15:34:15 +02:00
Nathan Vasse
feea284ec8 (react) add Input component
Finally the first form component of the design system. It wraps and enhance
the native input element.
2023-04-25 11:28:32 +02:00
Nathan Vasse
4f1168463f (react) add generic Field component
This component will wrap most of form components in order to provide
them a generic state attribute along with texts below them.
2023-04-25 11:28:32 +02:00
Nathan Vasse
b84af99c36 (react) add a temporary Checkbox
We need a temporary Checkbox in order to implement the row
selection feature of the future DataGrid. This do not come
from designer sketches for now.
2023-03-28 12:00:27 +02:00
Nathan Vasse
1df3b82571 (react) add a temporary TextInput
Even if we haven't started to work on a complete set of inputs
we need a generic Input to implement the "goto" feature on the
Pagination component. This component is not intended to be used
in by the librarie's dependent, so we mark it as "WIP" for the
moment.
2023-03-28 12:00:27 +02:00