Skip to content
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

EuiFilePicker dropzone style updates #6479

Merged
merged 21 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
42ab204
WIP dropzone styles
daveyholler Dec 12, 2022
a4e1cc1
WIP dropzone styles
daveyholler Dec 12, 2022
b9a69dd
Variable for border width
daveyholler Dec 13, 2022
ea072f6
Changelog entry.
daveyholler Dec 13, 2022
19e4eab
Update src/components/form/file_picker/_file_picker.scss
daveyholler Dec 13, 2022
5e92c1d
Update upcoming_changelogs/6479.md
daveyholler Dec 13, 2022
962fc8b
WIP dropzone styles
daveyholler Dec 12, 2022
17ae5ce
WIP dropzone styles
daveyholler Dec 12, 2022
e3ee79e
Variable for border width
daveyholler Dec 13, 2022
2afec45
Changelog entry.
daveyholler Dec 13, 2022
ea0b40d
Update src/components/form/file_picker/_file_picker.scss
daveyholler Dec 13, 2022
749f5d3
Merge branch 'dropzone' of ssh://github.com/daveyholler/eui into drop…
daveyholler Dec 13, 2022
6ec33c9
Margin instead of positioning
daveyholler Dec 13, 2022
7187457
Don't need no calc
daveyholler Dec 13, 2022
8996e7b
Fixing compressed and invalid styles
daveyholler Dec 13, 2022
e4f1e54
Update src/components/form/file_picker/_file_picker.scss
daveyholler Dec 13, 2022
ce400de
Sets a proper-looking focus state.
daveyholler Dec 14, 2022
41ec84f
Merge branch 'dropzone' of ssh://github.com/daveyholler/eui into drop…
daveyholler Dec 14, 2022
34d4fc8
Requested changes from code review
daveyholler Dec 14, 2022
a4efba7
Update src/components/form/file_picker/_file_picker.scss
daveyholler Dec 14, 2022
5d99aac
Update src/components/form/file_picker/_file_picker.scss
daveyholler Dec 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ exports[`EuiFilePicker is rendered 1`] = `
<span
aria-hidden="true"
class="euiFilePicker__icon"
color="primary"
data-euiicon-type="importAction"
/>
<div
Expand Down
13 changes: 8 additions & 5 deletions src/components/form/file_picker/_file_picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@
* 4. Static height so that it doesn't shift its surrounding contents around
*/
.euiFilePicker__prompt {
@include euiFormControlDefaultShadow;
@include euiFormControlWithIcon; /* 2 */
height: $euiFormControlHeight;
padding-top: $euiFormControlPadding;
padding-right: $euiFormControlPadding;
padding-bottom: $euiFormControlPadding;
pointer-events: none; /* 1 */
border: $euiBorderWidthThick dashed $euiColorLightShade;
border-radius: $euiFormControlBorderRadius;

transition:
Expand All @@ -88,6 +88,7 @@
@include euiFormControlWithIcon($compressed: true); /* 2 */
height: $euiFormControlCompressedHeight;
border-radius: $euiFormControlCompressedBorderRadius;
box-shadow: none;
}

.euiFilePicker--large & {
Expand All @@ -104,7 +105,7 @@
}

.euiFilePicker-isInvalid & {
@include euiFormControlInvalidStyle;
border: $euiBorderWidthThick dashed $euiColorDanger;
}
}

Expand All @@ -115,7 +116,8 @@

// make normal sized prompt look like placeholder
.euiFilePicker:not(.euiFilePicker--large):not(.euiFilePicker-hasFiles) & {
color: $euiColorMediumShade;
color: $euiColorPrimaryText;
margin-top: $euiSizeXS / -2;
}
}

Expand Down Expand Up @@ -150,16 +152,17 @@
// Focus
.euiFilePicker__showDrop .euiFilePicker__prompt,
.euiFilePicker__input:focus + .euiFilePicker__prompt {
@include euiFormControlFocusStyle;
border-color: $euiColorPrimary;

.euiFilePicker--compressed & {
@include euiFormControlFocusStyle($borderOnly: true);
border-color: $euiColorPrimary;
}
}

// Disabled
.euiFilePicker__input:disabled + .euiFilePicker__prompt {
@include euiFormControlDisabledStyle;
box-shadow: none;
}

// Make space for the icons on the right
Expand Down
1 change: 1 addition & 0 deletions src/components/form/file_picker/file_picker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ export class EuiFilePicker extends Component<EuiFilePickerProps> {
<div className="euiFilePicker__prompt" id={promptId}>
<EuiIcon
className="euiFilePicker__icon"
color={disabled ? 'subdued' : 'primary'}
type="importAction"
size={normalFormControl ? 'm' : 'l'}
aria-hidden="true"
Expand Down
1 change: 1 addition & 0 deletions upcoming_changelogs/6479.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- `EuiFilePicker` styles have been updated to look more like an interactive element.