-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mappings editor] Add UI/UX to mappings core (#48876)
- Loading branch information
Showing
39 changed files
with
1,495 additions
and
494 deletions.
There are no files selected for viewing
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
205 changes: 205 additions & 0 deletions
205
x-pack/legacy/plugins/index_management/public/components/mappings_editor/_index.scss
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,205 @@ | ||
|
||
/* | ||
[1] When the <CreateField /> component is embedded inside the tree, we need | ||
to add some extra indent to make room for the child "L" bullet on the left. | ||
[2] By default all content have a padding left to leave some room for the "L" bullet | ||
unless "--toggle" is added. In that case we don't need padding as the toggle will add it. | ||
[3] We need to compensate from the -4px margin added by the euiFlexGroup to make sure that the | ||
border-bottom is always visible, even when mouseovering and changing the background color. | ||
*/ | ||
|
||
.mappings-editor { | ||
&__fields-list-item { | ||
&--dotted-line { | ||
> .mappings-editor__fields-list-item__field { | ||
border-bottom-style: dashed; | ||
} | ||
} | ||
|
||
&__field { | ||
border-bottom: $euiBorderThin; | ||
margin-top: 4px; // [3] | ||
|
||
&:hover { | ||
background-color: $euiColorLightestShade; | ||
.mappings-editor__fields-list-item__actions, | ||
.mappings-editor__fields-list-item__multi-field-button { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
&--selected { | ||
background-color: $euiColorLightestShade; | ||
&:hover { | ||
background-color: $euiColorLightestShade; | ||
} | ||
} | ||
|
||
&--dim { | ||
opacity: 0.3; | ||
|
||
&:hover { | ||
background-color: initial; | ||
} | ||
} | ||
} | ||
|
||
&__wrapper { | ||
padding-left: $euiSizeXS; | ||
|
||
&--indent { | ||
padding-left: $euiSize; | ||
} | ||
} | ||
|
||
&__content { | ||
height: $euiSizeXL * 2; | ||
position: relative; | ||
|
||
&--indent { | ||
padding-left: $euiSizeXL; | ||
} | ||
} | ||
|
||
&__toggle { | ||
padding-left: $euiSizeXS; | ||
width: $euiSizeL; | ||
} | ||
|
||
&__actions, | ||
&__multi-field-button { | ||
opacity: 0; | ||
padding-right: $euiSizeS; | ||
transition: opacity $euiAnimSpeedNormal $euiAnimSlightResistance; | ||
} | ||
} | ||
|
||
&__create-field-wrapper { | ||
background-color: $euiColorLightestShade; | ||
border-right: $euiBorderThin; | ||
border-bottom: $euiBorderThin; | ||
border-left: $euiBorderThin; | ||
padding: $euiSize; | ||
} | ||
|
||
&__create-field-content { | ||
position: relative; | ||
} | ||
|
||
&__edit-field { | ||
&__section { | ||
border-bottom: $euiBorderThin; | ||
padding: $euiSizeXL 0; | ||
|
||
&:first-child { | ||
padding-top: 0; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.mappings-editor__fields-list { | ||
.mappings-editor__fields-list .mappings-editor__fields-list-item__content, | ||
.mappings-editor__create-field-content { | ||
&::before { | ||
border-bottom: 1px solid $euiColorMediumShade; | ||
content: ''; | ||
left: $euiSize; | ||
position: absolute; | ||
top: 50%; | ||
width: $euiSizeS; | ||
} | ||
&::after { | ||
border-left: 1px solid $euiColorMediumShade; | ||
content: ''; | ||
left: $euiSize; | ||
position: absolute; | ||
top: calc(50% - #{$euiSizeS}); | ||
height: $euiSizeS; | ||
} | ||
} | ||
|
||
.mappings-editor__create-field-content { | ||
padding-left: $euiSizeXXL - $euiSizeXS; // [1] | ||
} | ||
|
||
.mappings-editor__create-field-wrapper { | ||
&--multi-field { | ||
.mappings-editor__create-field-content { | ||
padding-left: $euiSize; | ||
} | ||
|
||
.mappings-editor__create-field-content { | ||
&::before, &::after { | ||
content: none; | ||
} | ||
} | ||
} | ||
|
||
&--toggle { | ||
.mappings-editor__create-field-content { | ||
padding-left: $euiSizeXXL - $euiSizeXS; // [1] | ||
} | ||
} | ||
} | ||
|
||
.mappings-editor__fields-list .mappings-editor__fields-list-item__content { | ||
padding-left: $euiSizeXL; // [2] | ||
|
||
&--toggle, &--multi-field { | ||
&::before, &::after { | ||
content: none; | ||
} | ||
} | ||
|
||
&--toggle { | ||
padding-left: 0; | ||
} | ||
|
||
&--multi-field { | ||
padding-left: $euiSizeS; | ||
} | ||
} | ||
} | ||
|
||
ul.tree { | ||
padding: 0; | ||
margin: 0; | ||
list-style-type: none; | ||
position: relative; | ||
padding-top: $euiSizeXS; | ||
|
||
li.tree-item { | ||
list-style-type: none; | ||
border-left: $euiBorderThin; | ||
margin-left: $euiSizeL; | ||
padding-bottom: $euiSizeS; | ||
|
||
div { | ||
padding-left: $euiSizeL; | ||
position: relative; | ||
|
||
&::before { | ||
content:''; | ||
position: absolute; | ||
top: 0; | ||
left: -1px; | ||
bottom: 50%; | ||
width: $euiSize; | ||
border: $euiBorderThin; | ||
border-top: none; | ||
border-right: none; | ||
} | ||
} | ||
} | ||
|
||
> li.tree-item:first-child { | ||
padding-top: $euiSizeS; | ||
} | ||
> li.tree-item:last-child { | ||
border-left-color: transparent; | ||
padding-bottom: 0; | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...nt/public/components/mappings_editor/components/document_fields/field_parameters/index.ts
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,7 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
export * from './name_parameter'; |
Oops, something went wrong.