Commit Graph

120 Commits

Author SHA1 Message Date
renovate[bot]
ed2409e50c ⬆️(dependencies) update js dependencies 2023-05-15 11:04:06 +02:00
jbpenrath
3772b4a845 🔖(react) bump to 0.6.1
Patch Changes

- Fix "exports" attribute of package.json. Default condition must be
  last one.
2023-05-12 16:33:23 +02:00
Romain Le Cellier
4777a75631 🚨(react) fix package json
fix error: Module not found: Error: Default condition should be last one
2023-05-12 15:28:49 +02:00
Nathan Vasse
87b328292b 🔖(release) version packages
Bump @openfun/cunningham-react to 0.6.0
2023-05-12 11:57:05 +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
1d3b1456ca (react) add forwardRef to Button
This could be useful to everyone. But at the moment is was needed for the
Select field be able to use Downshift with Button.
2023-05-12 11:13:38 +02:00
Nathan Vasse
3545af85ae 📦️(react) pure ESM package
Previously we had some configuration in package.json that were falsely
indicating that the react package was supporting CJS, which wasn't the
case. So this commit makes it clear that the package is pure ESM.
2023-05-11 17:58:13 +02:00
jbpenrath
56227d206a 🔖(react) bump to 0.5.0
Minor Changes
- 7513b4d: fix type files imports and rollup them
- b53afcb: Add DataList component
2023-05-05 11:18:39 +02:00
jbpenrath
c9f8540dfb 🔖(tokens) bump to 0.4.0
Minor Changes
- 7eac0bf: Suffix all sass maps with the `!default` map
- fb2fb3e: Do not generate sass sub maps
2023-05-05 11:18:39 +02:00
Romain Le Cellier
b53afcb4af (react) add DataList
Implement DataList that is a wrapper of DataGrid without header, sorting
nor pagination.
2023-05-05 10:54:50 +02:00
Romain Le Cellier
0e6532f098 🎨(all) global lint
Executiing `yarn format` should not generate any changes in the
project.
Apply yarn format to all files.
2023-05-05 10:54:50 +02:00
Nathan Vasse
7513b4d217 🔧(react) rollup type files
Previously types file were splitted into their original folder
tree structure. By enabling this option we could just get one
global .d.ts file. To make this more handy I created a dedicated
build bash file, the package.json was starting to get messy.
2023-05-04 16:53:29 +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
jbpenrath
7eac0bfca1 (tokens) make sass maps overridable
We suffix all sass maps with `!default` flag. In this way, if a consumer
 needs to override cunningham tokens, it will be able to.
2023-05-03 15:56:40 +02:00
jbpenrath
fb2fb3e107 🔥(tokens) remove colors sub maps
Create color sub maps seems to be a good idea but in fact was not. In
fact if with need to create token sub map this structure should appear
within the tokens module.
2023-05-03 15:56:40 +02:00
Nathan Vasse
a9625eb1c2 🔖(release) version packages
Bump @openfun/cunningham-react to 0.4.0
Bump @openfun/cunningham-tokens to 0.3.0
2023-04-28 16:06:23 +02:00
Romain Le Cellier
b9d2f2955f 🐛(tokens) fix scss generator
scss maps expect keys between quotes like:
$map = (
  'key': value,
)
2023-04-28 09:44:54 +02:00
Romain Le Cellier
1b9fb93bda (tokens) add a test token with a hyphen
tokens that includes hyphen are allowed but the feature wasn't been
tested
2023-04-28 09:44:54 +02:00
Nathan Vasse
edf4563e3e 🔧(demo) update tokens file
The existing file was a bit outdated, we regenerate them in order to
keep things as fresh as possible.
2023-04-27 15:34:15 +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
26be159c91 ♻️(react) make Pagination to use new Input
The Pagination component was not using the label of new Input.
2023-04-25 11:28:32 +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
6d195f6dad 📌(react) pin @storybook/builder-vite to 0.3.0
This dependency was breaking the docs CSS.
2023-04-25 11:28:32 +02:00
Nathan Vasse
559c1e2cb7 (react) add jest-dom dependency
We want to be able to use convenience methods like "toBeInTheDocument".
2023-04-25 11:28:32 +02:00
Nathan Vasse
74abf9b8a7 🔧(react) format correctly sub folders components
Without this commit, the design tokens would contain the folders
"/" in their names, which is not compliant with most of generators
output we implement.
2023-04-25 11:28:32 +02:00
jbpenrath
f0a1dd2f5b 🔖(release) version packages
Bump @openfun/cunningham-react to 0.3.0
Bump @openfun/cunningham-tokens to 0.2.0
2023-04-21 11:48:23 +02:00
jbpenrath
1be02f5a85 💄(react) remove button box shadow effect
On hover and active, buttons have a box shadow effect that is too heavy
visually so we remove this effect for now.
2023-04-21 11:33:46 +02:00
jbpenrath
1667d9b501 (tokens) add scss generator
Add a Sass generator which generate a scss file declaring colors, font
families, weights, sizes and spacings as maps.
2023-04-18 14:59:16 +02:00
jbpenrath
72091eecbc 🩹(tokens) add blank line at end of token files
Cunningham CLI did not add a blank line at the end of generated
token files.
2023-04-18 14:59:16 +02:00
jbpenrath
cf325719d5 🩹(tokens) fix typo within cunningham.ts file
The fontSizes.h3 contained an extra ";" chars.
2023-04-18 14:59:16 +02:00
jbpenrath
b1925959fe ️(react) improve button accessibility
Rework buttons in order to improve accessibility by increasing color
contrast and shape change across states.
2023-04-12 17:21:19 +02:00
jbpenrath
b79c23da30 💫(tokens) change transitions timing functions
Increase duration by 50ms then switch to ease cubic timing function in
order to get smoother but enough speed transitions.
2023-04-12 17:21:19 +02:00
jbpenrath
e90563aee2 (react) add missing dependencies to run storybook
Since last dependencies storybook, it appears there are missing babel
dependencies to be able to run storybook properly. So we install
missings deps in order to fix that.
2023-04-12 17:21:19 +02:00
jbpenrath
c3934ce7f2 🔧(all) pin node to 16.15 for volta user
Volta.js is a tool to manage easily several versions of Node locally.
This tool is able to switch automatically to the right Node version by
parsing package.json of the project. So we run volta pin node@16.15 for
each of cunningham package.
2023-04-12 17:21:19 +02:00
Nathan Vasse
b0c6b88141 🔖(release) version packages
Bump @openfun/cunningham-react to 0.2.0
2023-03-30 14:20:38 +02:00
Nathan Vasse
de6acbe7fe 📝(doc) add release documentation
As I forgot each time at least one task when doing a release, I will no
longer have any excuse. And this could be useful to everyone.
2023-03-30 14:20:38 +02:00
Nathan Vasse
6661c47fc4 🔖(changeset) adding missing changesets
I forgot to add changeset when merging the PR#20, so I add a
dedicated commit to keep an history before bumping versions.
2023-03-30 14:20:38 +02:00
Nathan Vasse
db982cf265 ⬆️(frontend) migrate to glob 9.3.2
Glob release a new major version introducing breaking changes, so
I update the way we use it to match the new API.
2023-03-29 17:40:25 +02:00
renovate[bot]
39352ed9f2 ⬆️(dependencies) update js dependencies 2023-03-29 17:40:25 +02:00
Nathan Vasse
1f0d890cb3 (fonts) allow async font loading
Vite automatically inline assets in CSS in lib mode and this is
hardcoded in it. After multiple approaches it seems that this one
is the most trivial and easy-to-maintain one.
2023-03-28 12:00:27 +02:00
Nathan Vasse
b2fd517bde 🔧(eslint) update eslint config to make import/order work
The autofix of import/order was not taken into account due to
a misconfiguration.
2023-03-28 12:00:27 +02:00
Nathan Vasse
2d80722a18 (demo) upgrade demo app
Add the locale switching feature.
2023-03-28 12:00:27 +02:00
Nathan Vasse
994d42578e (react) add DataGrid, SimpleDataGrid components
The DataGrid component can be considered as the core one, which provides
a full controlled component, but more complicated than SimpleDataGrid
which is based on DataGrid. SimpleDataGrid is intended to give a simple
ready-to-use data grid for client side data for example.
2023-03-28 12:00:27 +02:00
Nathan Vasse
8e078c87c2 (react) add Loader component
The first use of this loader will be inside the DataGrid for its
loading state. Its colors are based on the existing primary
colors tokens.
2023-03-28 12:00:27 +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