-
Notifications
You must be signed in to change notification settings - Fork 75
fix!: convert Input and TextField BEM classes to flat class names #5127
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
base: main
Are you sure you want to change the base?
Changes from all commits
a15b4e5
46cbcc9
fd92e4c
d23bf8d
7bba776
f36df65
9602e8e
dd0567e
95d2d5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ export const Input: OverridableComponent<InputProps, HTMLInputElement> = | |
| const hasStartAdornment = startText || startAdornment | ||
| const hasEndAdornment = endText || endAdornment | ||
|
|
||
| const containerClasses = ['eds-input-container', containerClassName] | ||
| const containerClasses = ['eds-input', containerClassName] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since |
||
| .filter(Boolean) | ||
| .join(' ') | ||
|
|
||
|
|
@@ -46,7 +46,7 @@ export const Input: OverridableComponent<InputProps, HTMLInputElement> = | |
| > | ||
| {displayErrorIcon && ( | ||
| <span | ||
| className="eds-error-icon" | ||
| className="error-icon" | ||
| data-font-size="xs" | ||
| data-font-family="ui" | ||
| data-baseline="center" | ||
|
|
@@ -55,10 +55,10 @@ export const Input: OverridableComponent<InputProps, HTMLInputElement> = | |
| </span> | ||
| )} | ||
| {hasStartAdornment && ( | ||
| <div className="eds-adornment" data-color-appearance="neutral"> | ||
| <div className="adornment" data-color-appearance="neutral"> | ||
| {startText && ( | ||
| <span | ||
| className="eds-adornment__text" | ||
| className="text" | ||
| data-font-family="ui" | ||
| data-font-size="xs" | ||
| data-baseline="center" | ||
|
|
@@ -67,7 +67,7 @@ export const Input: OverridableComponent<InputProps, HTMLInputElement> = | |
| </span> | ||
| )} | ||
| {startAdornment && ( | ||
| <span className="eds-adornment__adornment" data-font-size="xs"> | ||
| <span className="item" data-font-size="xs"> | ||
| {startAdornment} | ||
| </span> | ||
| )} | ||
|
|
@@ -78,7 +78,7 @@ export const Input: OverridableComponent<InputProps, HTMLInputElement> = | |
| type={Component === 'textarea' ? undefined : type} | ||
| disabled={disabled} | ||
| readOnly={readOnly} | ||
| className={['eds-input', className].filter(Boolean).join(' ')} | ||
| className={['control', className].filter(Boolean).join(' ')} | ||
| data-color-appearance="neutral" | ||
| data-font-family="ui" | ||
| data-font-size="md" | ||
|
|
@@ -89,10 +89,10 @@ export const Input: OverridableComponent<InputProps, HTMLInputElement> = | |
| aria-invalid={invalid || undefined} | ||
| /> | ||
| {hasEndAdornment && ( | ||
| <div className="eds-adornment" data-color-appearance="neutral"> | ||
| <div className="adornment" data-color-appearance="neutral"> | ||
| {endText && ( | ||
| <span | ||
| className="eds-adornment__text" | ||
| className="text" | ||
| data-font-family="ui" | ||
| data-font-size="xs" | ||
| data-baseline="center" | ||
|
|
@@ -101,7 +101,7 @@ export const Input: OverridableComponent<InputProps, HTMLInputElement> = | |
| </span> | ||
| )} | ||
| {endAdornment && ( | ||
| <span className="eds-adornment__adornment" data-font-size="xs"> | ||
| <span className="item" data-font-size="xs"> | ||
| {endAdornment} | ||
| </span> | ||
| )} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.controlis a really common class name, so this can now accidentally exclude a consumer's own<input class="control">from the foundation styles. What we actually want to exclude is "an input inside our Input", so maybe: