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
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.
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.
This type allows to make only specific attributes optionnal where
the existing Partial<T> makes all the attributes optionnal. Its
first use will be for Modals.
This new demo aims to take advantage of all the new Cunningham's
components. The old demo was kind of a draft, this new one gives
a better overview of what Cunningham is capable of.
We realized that even if the Figma sketches indicates that the icons
are 16px in reality the rendered DOM was not visualy matching the
sketches. We needs 19px to match the sketches.
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
Previously we were using a deprecated Storybook feature by using
canvas for multiple Stories and it was also rendering buttons not
aligned, so this new story is a better choice.
This hook is used to create a state that can be controlled by the parent.
If not the state is handled internally. We start to have this redundant
use case across Cunningham, so creating a dedicated hook reduces the
components verbosity and complexity.
Having private props was causing the following error: Default export
of the module has or is using private name 'Props'. So exporting those
fixes the issue. It also has a double benefit as we provide exported
Props to library consummers.
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()
This new Typescript version introduced a crash when executing ts-node
in order to run cunningham.ts file. We need to wait for ts-node
to update their package too. Please see the related issue:
https://github.com/microsoft/TypeScript/issues/56492