Skip to content

Commit

Permalink
[Emotion] Convert EuiFormControlLayoutDelimited (2/3) (#7957)
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Aug 14, 2024
1 parent d4dc2f6 commit bf9eb33
Show file tree
Hide file tree
Showing 37 changed files with 547 additions and 323 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions packages/eui/changelogs/upcoming/7957.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**Bug fixes**

- Fixed a visual bug with `<EuiDualRange showInput="inputWithPopover" />` form controls

**CSS-in-JS conversions**

- Converted `EuiFormLayoutDelimited` to Emotion
- Fixed `cloneElementWithCss` throwing an error when used multiple times without a `key` prop
- Updated `cloneElementWithCss` utility to support a third argument that allows prepending vs. appending the cloned Emotion css className
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ export default () => (
fullWidth
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
Expand All @@ -36,15 +36,15 @@ export default () => (
<EuiFormControlLayoutDelimited
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
Expand All @@ -54,15 +54,15 @@ export default () => (
append={<EuiFormLabel>px</EuiFormLabel>}
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
Expand All @@ -73,14 +73,14 @@ export default () => (
startControl={
<EuiFieldNumber
placeholder="0"
className="euiFieldNumber"
controlOnly
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
Expand All @@ -91,15 +91,15 @@ export default () => (
isLoading
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
Expand All @@ -109,15 +109,15 @@ export default () => (
isLoading
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
Expand All @@ -127,15 +127,15 @@ export default () => (
compressed
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
Expand All @@ -145,16 +145,16 @@ export default () => (
prepend={<EuiFormLabel>Add</EuiFormLabel>}
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
delimiter="+"
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
Expand All @@ -164,16 +164,16 @@ export default () => (
prepend={<EuiFormLabel>Merge</EuiFormLabel>}
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
delimiter={<EuiIcon type="merge" />}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
aria-label="Use aria labels when no actual label is in use"
/>
}
Expand All @@ -184,16 +184,16 @@ export default () => (
prepend={<EuiFormLabel>Read only</EuiFormLabel>}
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
readOnly
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
readOnly
aria-label="Use aria labels when no actual label is in use"
/>
Expand All @@ -205,16 +205,16 @@ export default () => (
prepend={<EuiFormLabel>Disabled</EuiFormLabel>}
startControl={
<EuiFieldNumber
controlOnly
placeholder="0"
className="euiFieldNumber"
disabled
aria-label="Use aria labels when no actual label is in use"
/>
}
endControl={
<EuiFieldNumber
controlOnly
placeholder="100"
className="euiFieldNumber"
disabled
aria-label="Use aria labels when no actual label is in use"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ exports[`EuiDatePicker localization accepts the locale prop 1`] = `
class="euiDatePicker testClass1 testClass2 emotion-euiDatePicker-inline-shadow-euiTestCss"
>
<div
class="euiFormControlLayout euiFormControlLayoutDelimited emotion-euiFormControlLayout"
class="euiFormControlLayout emotion-euiFormControlLayout-group"
>
<div
class="euiFormControlLayout__childrenWrapper emotion-euiFormControlLayout__childrenWrapper"
class="euiFormControlLayout__childrenWrapper emotion-euiFormControlLayout__childrenWrapper-inGroup-prependOnly-appendOnly"
>
<div
class="react-datepicker emotion-euiReactDatePicker"
Expand Down Expand Up @@ -484,10 +484,10 @@ exports[`EuiDatePicker localization inherits locale from context 1`] = `
class="euiDatePicker testClass1 testClass2 emotion-euiDatePicker-inline-shadow-euiTestCss"
>
<div
class="euiFormControlLayout euiFormControlLayoutDelimited emotion-euiFormControlLayout"
class="euiFormControlLayout emotion-euiFormControlLayout-group"
>
<div
class="euiFormControlLayout__childrenWrapper emotion-euiFormControlLayout__childrenWrapper"
class="euiFormControlLayout__childrenWrapper emotion-euiFormControlLayout__childrenWrapper-inGroup-prependOnly-appendOnly"
>
<div
class="react-datepicker emotion-euiReactDatePicker"
Expand Down
Loading

0 comments on commit bf9eb33

Please sign in to comment.