-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Emotion] Convert EuiTextArea, EuiSelect, and EuiSuperSelect (#7812)
- Loading branch information
Showing
36 changed files
with
483 additions
and
315 deletions.
There are no files selected for viewing
Binary file modified
BIN
+10 Bytes
(100%)
packages/eui/.loki/reference/chrome_desktop_Forms_EuiSelect_Playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7 Bytes
(100%)
packages/eui/.loki/reference/chrome_desktop_Forms_EuiSuperSelect_Playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+3 Bytes
(100%)
packages/eui/.loki/reference/chrome_desktop_Forms_EuiTextArea_Icon_Shape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+8 Bytes
(100%)
packages/eui/.loki/reference/chrome_desktop_Forms_EuiTextArea_Playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+27 Bytes
(100%)
packages/eui/.loki/reference/chrome_mobile_Forms_EuiSelect_Playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+21 Bytes
(100%)
packages/eui/.loki/reference/chrome_mobile_Forms_EuiSuperSelect_Playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+25 Bytes
(100%)
packages/eui/.loki/reference/chrome_mobile_Forms_EuiTextArea_Icon_Shape.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+16 Bytes
(100%)
packages/eui/.loki/reference/chrome_mobile_Forms_EuiTextArea_Playground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**CSS-in-JS conversions** | ||
|
||
- Converted `EuiTextArea` to Emotion | ||
- Converted `EuiSelect` to Emotion | ||
- Converted `EuiSuperSelect` to Emotion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { css } from '@emotion/react'; | ||
|
||
import { UseEuiTheme } from '../../../services'; | ||
import { euiFormControlStyles, euiFormVariables } from '../form.styles'; | ||
|
||
export const euiSelectStyles = (euiThemeContext: UseEuiTheme) => { | ||
const formStyles = euiFormControlStyles(euiThemeContext); | ||
const formVariables = euiFormVariables(euiThemeContext); | ||
|
||
return { | ||
euiSelect: css` | ||
appearance: none; | ||
${formStyles.shared} | ||
&:invalid { | ||
${formStyles.invalid} | ||
} | ||
&:focus { | ||
${formStyles.focus} | ||
} | ||
&:disabled { | ||
${formStyles.disabled} | ||
} | ||
&[readOnly] { | ||
${formStyles.readOnly} | ||
} | ||
&:autofill { | ||
${formStyles.autoFill} | ||
} | ||
`, | ||
|
||
// Skip the css() on the default height to avoid generating a className | ||
uncompressed: formStyles.uncompressed, | ||
compressed: css(formStyles.compressed), | ||
|
||
// Skip the css() on the default width to avoid generating a className | ||
formWidth: formStyles.formWidth, | ||
fullWidth: css(formStyles.fullWidth), | ||
|
||
// Layout modifiers | ||
inGroup: css(formStyles.inGroup), | ||
|
||
// Ensure text descenders don't get cut off | ||
// by making line-height match the input height | ||
lineHeight: { | ||
removePadding: `padding-block: 0;`, | ||
uncompressed: `line-height: ${formVariables.controlHeight};`, | ||
compressed: `line-height: ${formVariables.controlCompressedHeight};`, | ||
inGroup: { | ||
uncompressed: `line-height: ${formVariables.controlLayoutGroupInputHeight}`, | ||
compressed: `line-height: ${formVariables.controlLayoutGroupInputCompressedHeight}`, | ||
}, | ||
}, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.