@@ -209,11 +209,11 @@ exports[`EuiPopover props panelPaddingSize is rendered 1`] = `
diff --git a/src/components/popover/_popover.scss b/src/components/popover/_popover.scss
index d67ea552fe8..33004c41a3f 100644
--- a/src/components/popover/_popover.scss
+++ b/src/components/popover/_popover.scss
@@ -42,7 +42,7 @@
pointer-events: auto;
}
- .euiPopover__panel__arrow {
+ .euiPopover__panelArrow {
position: absolute;
width: 0;
height: 0;
@@ -63,7 +63,7 @@
width: 0;
}
- &.euiPopover__panel__arrow-top {
+ &.euiPopover__panelArrow--top {
&:before {
bottom: -$euiPopoverArrowSize + 1;
border-left: $euiPopoverArrowSize solid transparent;
@@ -79,7 +79,7 @@
}
}
- &.euiPopover__panel__arrow-right {
+ &.euiPopover__panelArrow--right {
&:before {
left: -$euiPopoverArrowSize;
top: 50%;
@@ -97,7 +97,7 @@
}
}
- &.euiPopover__panel__arrow-bottom {
+ &.euiPopover__panelArrow--bottom {
&:before {
top: -$euiPopoverArrowSize;
border-left: $euiPopoverArrowSize solid transparent;
@@ -113,7 +113,7 @@
}
}
- &.euiPopover__panel__arrow-left {
+ &.euiPopover__panelArrow--left {
&:before {
right: -$euiPopoverArrowSize + 1;
top: 50%;
@@ -131,36 +131,41 @@
}
}
}
+
+
+ &.euiPopover__panel-noArrow .euiPopover__panelArrow {
+ display: none;
+ }
}
.euiPopover__panel.euiPopover__panel-withTitle {
- .euiPopover__panel__arrow {
- &.euiPopover__panel__arrow-bottom:after {
+ .euiPopover__panelArrow {
+ &.euiPopover__panelArrow--bottom:after {
border-bottom-color: $euiColorLightestShade;
}
- &.euiPopover__panel__arrow-right:after {
+ &.euiPopover__panelArrow--right:after {
border-right-color: $euiColorLightestShade;
}
- &.euiPopover__panel__arrow-left:after {
+ &.euiPopover__panelArrow--left:after {
border-left-color: $euiColorLightestShade;
}
}
}
-.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel-top {
+.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--top {
transform: translateY($euiPopoverTranslateDistance) translateZ(0);
}
-.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel-bottom {
+.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--bottom {
transform: translateY(-$euiPopoverTranslateDistance) translateZ(0);
}
-.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel-left {
+.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--left {
transform: translateX($euiPopoverTranslateDistance) translateZ(0);
}
-.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel-right {
+.euiPopover__panel.euiPopover__panel-isOpen.euiPopover__panel--right {
transform: translateX(-$euiPopoverTranslateDistance) translateZ(0);
}
diff --git a/src/components/popover/index.d.ts b/src/components/popover/index.d.ts
index 687308e6d0e..51622c122e0 100644
--- a/src/components/popover/index.d.ts
+++ b/src/components/popover/index.d.ts
@@ -31,6 +31,7 @@ declare module '@elastic/eui' {
withTitle?: boolean;
isOpen?: boolean;
ownFocus?: boolean;
+ hasArrow?: boolean;
anchorPosition?: PopoverAnchorPosition;
panelClassName?: string;
panelPaddingSize?: PanelPaddingSize;
diff --git a/src/components/popover/popover.js b/src/components/popover/popover.js
index d5c8b391cfc..12dd244dc43 100644
--- a/src/components/popover/popover.js
+++ b/src/components/popover/popover.js
@@ -250,7 +250,7 @@ export class EuiPopover extends Component {
align: getPopoverAlignFromAnchorPosition(this.props.anchorPosition),
anchor: this.button,
popover: this.panel,
- offset: 16,
+ offset: this.props.hasArrow ? 16 : 8,
arrowConfig: {
arrowWidth: 24,
arrowBuffer: 10,
@@ -269,7 +269,7 @@ export class EuiPopover extends Component {
zIndex,
};
- const arrowStyles = arrow;
+ const arrowStyles = this.props.hasArrow ? arrow : null;
const arrowPosition = position;
this.setState({ popoverStyles, arrowStyles, arrowPosition });
@@ -308,6 +308,7 @@ export class EuiPopover extends Component {
panelClassName,
panelPaddingSize,
popoverRef,
+ hasArrow,
repositionOnScroll, // eslint-disable-line no-unused-vars
zIndex, // eslint-disable-line no-unused-vars
...rest
@@ -325,9 +326,10 @@ export class EuiPopover extends Component {
const panelClasses = classNames(
'euiPopover__panel',
- `euiPopover__panel-${this.state.arrowPosition}`,
+ `euiPopover__panel--${this.state.arrowPosition}`,
{ 'euiPopover__panel-isOpen': this.state.isOpening },
{ 'euiPopover__panel-withTitle': withTitle },
+ { 'euiPopover__panel-noArrow': !hasArrow },
panelClassName
);
@@ -357,8 +359,8 @@ export class EuiPopover extends Component {
}
const arrowClassNames = classNames(
- 'euiPopover__panel__arrow',
- `euiPopover__panel__arrow-${this.state.arrowPosition}`
+ 'euiPopover__panelArrow',
+ `euiPopover__panelArrow--${this.state.arrowPosition}`
);
panel = (
@@ -433,6 +435,7 @@ EuiPopover.propTypes = {
panelClassName: PropTypes.string,
panelPaddingSize: PropTypes.oneOf(SIZES),
popoverRef: PropTypes.func,
+ hasArrow: PropTypes.bool,
container: PropTypes.oneOfType([
PropTypes.node,
PropTypes.instanceOf(HTMLElement)
@@ -448,4 +451,5 @@ EuiPopover.defaultProps = {
ownFocus: false,
anchorPosition: 'downCenter',
panelPaddingSize: 'm',
+ hasArrow: true,
};
diff --git a/src/components/search_bar/filters/__snapshots__/field_value_selection_filter.test.js.snap b/src/components/search_bar/filters/__snapshots__/field_value_selection_filter.test.js.snap
index dbadf457d73..43889704dc8 100644
--- a/src/components/search_bar/filters/__snapshots__/field_value_selection_filter.test.js.snap
+++ b/src/components/search_bar/filters/__snapshots__/field_value_selection_filter.test.js.snap
@@ -17,6 +17,7 @@ exports[`FieldValueSelectionFilter render - all configurations 1`] = `
}
closePopover={[Function]}
+ hasArrow={true}
id="field_value_selection_0"
isOpen={false}
ownFocus={true}
@@ -62,6 +63,7 @@ exports[`FieldValueSelectionFilter render - multi-select OR 1`] = `
}
closePopover={[Function]}
+ hasArrow={true}
id="field_value_selection_0"
isOpen={false}
ownFocus={true}
@@ -107,6 +109,7 @@ exports[`FieldValueSelectionFilter render - options as a function 1`] = `
}
closePopover={[Function]}
+ hasArrow={true}
id="field_value_selection_0"
isOpen={false}
ownFocus={true}
@@ -152,6 +155,7 @@ exports[`FieldValueSelectionFilter render - options as an array 1`] = `
}
closePopover={[Function]}
+ hasArrow={true}
id="field_value_selection_0"
isOpen={false}
ownFocus={true}
diff --git a/src/components/text/_text.scss b/src/components/text/_text.scss
index 6488daf7587..b579cd125f6 100644
--- a/src/components/text/_text.scss
+++ b/src/components/text/_text.scss
@@ -224,7 +224,8 @@
@include euiScaleText($euiFontSizeXS);
}
- > :last-child {
+ > :last-child,
+ .euiTextColor > :last-child {
margin-bottom: 0 !important;
}
}