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
Revert the changes made in the d05e385 commit, it was causing IDE
warnings in stories files about source files that cannot be resolved,
but in reality Storybook really base its config on the local tsconfig.json,
so excluding stories.tsx files was just a ugly temporary fix.
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
Major Changes
- The first bunch of components and features are ready,
the first milestone has been reached
Minor Changes
- 9edb976: Position Datepicker popover on top or bottom depending space
available
Patch Changes
- fd7ad8a: Do not apply font-family to all elements with `*` selector
The new version of `testing-library/jest-dom` now offers several modules
to extend vitest interface. We have to update the import path to extend
vitest dom interface.
Position the datepicker on top of the input when the input is
at the bottom of the screen and whenthere is enough space to display
the datepicker on the top.
Prettier had some missing extensions in the config, this commit
added them, we then prettified the whole project. We
ignore the `cunningham-tokens` files.
Eslint extension highlighted some issues with the way we were
importing the tsconfig.json file in the .eslintrc.json file.
By changing the extension to .cjs, we are now able to set
tsconfigRootDir to the root of the package thanks to `dirname`.
It helps eslint to find the correct tsconfig.json file.
If we work from an app perspective, it is nice to have a watch mode
on our packages to see the changes in real time. Better to use the
watch mode of vite (rollup) compare to nodemon because it is faster,
we re-transpile only the files that have changed.
Possility to use the wath mode by polling as well, on a remote machine
the HMR does not work well, the polling mode helps to solve this issue.
Currently tokens test are flaky. It appears `cleanup` function can raise
an Error. Locally, we use `runInBand` option to run our tests and all
is working fine. The mess up could appear when test are running in
parallel as cleanup can remove file used in other test at any moment.
Currently, `react` package use `*` selector to enforce the font family
to all elements. That is weird as all elements are not able anymore to
inherit their font-family from their parent. In order to enforce the use
of font-family base by default without breaking the parent inheritance,
we apply font-family to the body element instead.
Fix#137
Currently commands within build script are not chained so if one fail,
all other will run that could lead to mistunderstanding, that all is
working fine when no...
Add some docstring documentation to the newly updated utils
functions, to help understand what are their role and params.
User have a clear view of inputs and outputs timezone.
By default, component's timezone is the user locale timezone.
Component now offers a way to set its timezone to any supported
Intl timezone format. Please note that output values from the
component will always be converted to a UTC timezone.
Enforces a standardized approach for end consumers using the
component's API. Consumers are now required to provide a date as an
ISO string in either UTC or with a UTC offset. The support for native
Date objects has been removed to ensure consistent and reliable
behavior across all implementations. By adopting this uniform input
format, we can simplify usage and avoid potential inconsistencies in
date handling.
By introducing this utility function, we ensure that any output value
is converted back to an ISO 8601 date and time string in UTC timezone.
Overall, it harmonize and factorize the way we output
values from date picker components.
DateRangePicker aria-labels mention when a selected date range
contains today's date, which breaks the tests while ran on the
first day of the month. Avoid these tests to be flaky.
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.