-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Input): migrate to new design #1248
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
f200dff
to
c5f23ff
Compare
Please add comment to the PR about breaking changes. Those then should be copied to the commit message when the branch is merged, so that semver correctly tags the next release and change logs are updates as needed. See CONTRIBUTING.md for details |
@eszthoff I've added breaking changes, please, have a look and let me know if you have any questions. Thank you! |
6aced3a
to
d037908
Compare
d037908
to
ad800ec
Compare
* feat: migrate input component to new design * chore: make error message obligatory when context is critical * fix: remove optional sign from context prop * refactor: change the naming * chore: add extra check for error message * fix: make label optional * fix: address review comments * chore: add possibility to unselect the context in storybook * style: remove focus state from critical context * refactor: change type for the context * chore: add possibility to use custom id * fix: remove unnesasary comment * refactor: remove isActive state * chore: add space to the error message * style: put old naming back * refactor: make naming more understandable * refactor: avoid nested tenantry * refactor: better solution for nested tenantry * fix avoid jumping width/content on focus and critical --------- Co-authored-by: Anastasiia Mishchenko <[email protected]>
BREAKING CHANGE: `size` prop is limited to `small` or `medium`, with `medium` as the default, replace size="large" or omitting size (previously defaulting to `normal`) with size="medium", or use size="small" as needed BREAKING CHANGE: `context` prop only accepts `critical`. Remove any usage of `brand` or `success` context. Provide `errorMessage` if critical context is expected BREAKING CHANGE: replace any custom methods for setting inputs as non-editable with new prop `readOnly` BREAKING CHANGE: replace existing approaches for displaying helper text with the new `helperText` prop BREAKING CHANGE: use the `label` prop for input labels, replacing any previous label handling BREAKING CHANGE: use the `reserveErrorMessageSpace` prop to determine whether space should be reserved for error message under the input field when validation is expected, especially if no helper text is present
ONEUI-455
BREAKING CHANGE: Input component props size, context, and additional states are updated
small
ormedium
, withmedium
as the default. The optionslarge
andnormal
have been removed. Replace size="large" or omitting size (previously defaulting tonormal
) with size="medium", or use size="small" as needed.critical
. Other contexts likebrand
orsuccess
are removed. For critical contexts, use context="critical" and provide an errorMessage.readOnly
prop added to specify if the input field should be non-editable. Replace any custom methods for setting inputs as non-editable with readOnly={true}.reserveErrorMessageSpace
prop added determine whether space should be reserved for error messages under the input field when validation is expected to avoid "jumping" UI. Default tofalse
.Checklist