Save
diff --git a/src/components/button/button_empty/_button_empty.scss b/src/components/button/button_empty/_button_empty.scss
index 5e06f644b81..c1b0a00a6c0 100644
--- a/src/components/button/button_empty/_button_empty.scss
+++ b/src/components/button/button_empty/_button_empty.scss
@@ -85,15 +85,21 @@ $buttonTypes: (
}
.euiButtonEmpty--flushLeft {
+ margin-right: $euiSizeS;
+
.euiButtonEmpty__content {
border-left: none;
padding-left: 0;
+ padding-right: 0;
}
}
.euiButtonEmpty--flushRight {
+ margin-left: $euiSizeS;
+
.euiButtonEmpty__content {
border-right: none;
+ padding-left: 0;
padding-right: 0;
}
}
diff --git a/src/components/flex/__snapshots__/flex_group.test.js.snap b/src/components/flex/__snapshots__/flex_group.test.js.snap
index 7ab68d891c0..0e7dc37b817 100644
--- a/src/components/flex/__snapshots__/flex_group.test.js.snap
+++ b/src/components/flex/__snapshots__/flex_group.test.js.snap
@@ -12,6 +12,12 @@ exports[`EuiFlexGroup is rendered 1`] = `
`;
+exports[`EuiFlexGroup props alignItems baseline is rendered 1`] = `
+
+`;
+
exports[`EuiFlexGroup props alignItems center is rendered 1`] = `
+ Content
+
+`;
diff --git a/src/components/header/_header_notification.scss b/src/components/header/_header_notification.scss
new file mode 100644
index 00000000000..26ddc2601f0
--- /dev/null
+++ b/src/components/header/_header_notification.scss
@@ -0,0 +1,12 @@
+
+.euiHeaderNotification {
+ display: inline-block;
+ border-radius: $euiBorderRadius;
+ background: $euiHeaderNotificationBackgroundColor;
+ color: $euiColorEmptyShade;
+ font-size: $euiFontSizeXS;
+ line-height: $euiSize;
+ height: $euiSize;
+ min-width: $euiSize;
+ vertical-align: middle;
+}
diff --git a/src/components/header/_index.scss b/src/components/header/_index.scss
index e7c153c054c..e2e258df940 100644
--- a/src/components/header/_index.scss
+++ b/src/components/header/_index.scss
@@ -11,6 +11,7 @@ $euiHeaderChildSize: $euiSizeXXL + $euiSizeL;
@import 'header_popover';
@import 'header_profile';
@import 'header_logo';
+@import 'header_notification';
@import 'header_alert/index';
@import 'header_breadcrumbs/index';
@import 'header_section/index';
diff --git a/src/components/header/header_notification.js b/src/components/header/header_notification.js
new file mode 100644
index 00000000000..a9fe22e87a7
--- /dev/null
+++ b/src/components/header/header_notification.js
@@ -0,0 +1,15 @@
+import React from 'react';
+import classNames from 'classnames';
+
+export const EuiHeaderNotification = ({ children, className, ...rest }) => {
+ const classes = classNames('euiHeaderNotification', className);
+
+ return (
+
+ {children}
+
+ );
+};
diff --git a/src/components/header/header_notification.test.js b/src/components/header/header_notification.test.js
new file mode 100644
index 00000000000..df6377c23c1
--- /dev/null
+++ b/src/components/header/header_notification.test.js
@@ -0,0 +1,18 @@
+import React from 'react';
+import { render } from 'enzyme';
+import { requiredProps } from '../../test/required_props';
+
+import { EuiHeaderNotification } from './header_notification';
+
+describe('EuiHeaderNotification', () => {
+ test('is rendered', () => {
+ const component = render(
+
+ Content
+
+ );
+
+ expect(component)
+ .toMatchSnapshot();
+ });
+});
diff --git a/src/components/header/index.js b/src/components/header/index.js
index 2d956a0154d..cc3d92c3869 100644
--- a/src/components/header/index.js
+++ b/src/components/header/index.js
@@ -16,6 +16,10 @@ export {
EuiHeaderLogo,
} from './header_logo';
+export {
+ EuiHeaderNotification,
+} from './header_notification';
+
export {
EuiHeaderSection,
EuiHeaderSectionItem,
diff --git a/src/components/index.js b/src/components/index.js
index 5581642a633..bfb1de5524d 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -121,6 +121,7 @@ export {
EuiHeaderBreadcrumbCollapsed,
EuiHeaderBreadcrumbs,
EuiHeaderLogo,
+ EuiHeaderNotification,
EuiHeaderSection,
EuiHeaderSectionItem,
EuiHeaderSectionItemButton,
diff --git a/src/components/modal/__snapshots__/confirm_modal.test.js.snap b/src/components/modal/__snapshots__/confirm_modal.test.js.snap
index 9dce52f93a1..cf7035a7635 100644
--- a/src/components/modal/__snapshots__/confirm_modal.test.js.snap
+++ b/src/components/modal/__snapshots__/confirm_modal.test.js.snap
@@ -60,7 +60,7 @@ exports[`renders EuiConfirmModal 1`] = `
class="euiModalFooter"
>
@@ -73,7 +73,7 @@ exports[`renders EuiConfirmModal 1`] = `
diff --git a/src/components/modal/_modal.scss b/src/components/modal/_modal.scss
index 814c56dac11..e91c71410c2 100644
--- a/src/components/modal/_modal.scss
+++ b/src/components/modal/_modal.scss
@@ -22,10 +22,10 @@
display: flex;
justify-content: space-between;
align-items: center;
- padding: $euiSizeL;
- padding-bottom: 0;
+ padding: $euiSizeL $euiSizeXXL $euiSizeM $euiSizeL;
flex-grow: 0;
- padding-bottom: $euiSizeL;
+ flex-shrink: 0;
+ @include euiOverflowShadowBottom;
}
.euiModalHeader__title {
@@ -43,8 +43,10 @@
.euiModalFooter {
display: flex;
justify-content: flex-end;
- padding: $euiSizeL;
+ padding: $euiSizeM $euiSizeL;
flex-grow: 0;
+ flex-shrink: 0; // ensure the height of the footer is based off it's contents and doesn't squish
+ @include euiOverflowShadowTop;
> * + * {
margin-left: $euiSize;
@@ -54,13 +56,15 @@
// When both a header and body exist, drop the top padding so the overflow on
// the body is spaced correctly.
.euiModalHeader + .euiModalBody {
- padding-top: 0;
+ padding-top: $euiSizeM;
}
.euiModal__closeIcon {
+ background-color: transparentize($euiColorEmptyShade, .1);
position: absolute;
- right: $euiSizeL;
- top: $euiSizeL;
+ right: $euiSizeM;
+ top: $euiSizeL + 4px;
+ z-index: 3;
}
@keyframes euiModal {
@@ -78,13 +82,14 @@
@include screenXSmall {
.euiModal {
position: fixed;
- width: 100vw;
+ width: calc(100vw + 2px);
max-height: 100vh;
left: 0;
right: 0;
- top: 0;
bottom: 0;
- box-shadow: none;
+ top: 0;
+ border-radius: 0;
+ box-shadow: 0 -8px 16px -8px rgba(0, 0, 0, 0.1);
border: none;
}
@@ -95,6 +100,15 @@
.euiModalFooter {
background: $euiColorLightestShade;
width: 100vw;
+ justify-content: stretch;
+
+ > * {
+ flex: 1;
+
+ + * {
+ margin-left: 0;
+ }
+ }
}
.euiModal__closeIcon {
diff --git a/src/components/modal/confirm_modal.js b/src/components/modal/confirm_modal.js
index d39fc7a6787..78a406fcde1 100644
--- a/src/components/modal/confirm_modal.js
+++ b/src/components/modal/confirm_modal.js
@@ -54,6 +54,7 @@ export class EuiConfirmModal extends Component {
cancelButtonText,
confirmButtonText,
className,
+ buttonColor,
defaultFocusedButton, // eslint-disable-line no-unused-vars
...rest
} = this.props;
@@ -98,7 +99,6 @@ export class EuiConfirmModal extends Component {
{cancelButtonText}
@@ -107,9 +107,9 @@ export class EuiConfirmModal extends Component {
{confirmButtonText}
@@ -127,5 +127,10 @@ EuiConfirmModal.propTypes = {
onCancel: PropTypes.func,
onConfirm: PropTypes.func,
className: PropTypes.string,
- defaultFocusedButton: PropTypes.oneOf(CONFIRM_MODAL_BUTTONS)
+ defaultFocusedButton: PropTypes.oneOf(CONFIRM_MODAL_BUTTONS),
+ buttonColor: PropTypes.string,
+};
+
+EuiConfirmModal.defaultProps = {
+ buttonColor: 'primary',
};
diff --git a/src/components/overlay_mask/_overlay_mask.scss b/src/components/overlay_mask/_overlay_mask.scss
index f69ffa22d18..d17517fc44b 100644
--- a/src/components/overlay_mask/_overlay_mask.scss
+++ b/src/components/overlay_mask/_overlay_mask.scss
@@ -6,11 +6,18 @@
right: 0;
bottom: 0;
display: flex;
- background: transparentize($euiColorEmptyShade, .2);
align-items: center;
justify-content: center;
padding-bottom: 10vh;
animation: euiAnimFadeIn $euiAnimSpeedFast ease-in;
+
+ $backgroundColor: $euiColorEmptyShade;
+
+ @if (lightness($euiTextColor) > 50) {
+ $backgroundColor: $euiColorLightShade;
+ }
+
+ background: transparentize($backgroundColor, .2);
}
.euiBody-hasOverlayMask {
diff --git a/src/components/pagination/_pagination_button.scss b/src/components/pagination/_pagination_button.scss
index 2801794cc87..f3ffdd1457c 100644
--- a/src/components/pagination/_pagination_button.scss
+++ b/src/components/pagination/_pagination_button.scss
@@ -12,9 +12,9 @@
font-weight: $euiFontWeightBold;
}
-.euiPaginationButton-isPlaceholder {
- pointer-events: none;
- color: $euiColorMediumShade;
+.euiPaginationButton-isPlaceholder:disabled .euiButtonEmpty__content {
+ // needs specifity to override regular disabled button
+ cursor: default;
}
@include screenXSmall {
diff --git a/src/components/pagination/pagination_button.js b/src/components/pagination/pagination_button.js
index 87237dd287e..abc680ca375 100644
--- a/src/components/pagination/pagination_button.js
+++ b/src/components/pagination/pagination_button.js
@@ -25,6 +25,7 @@ export const EuiPaginationButton = ({
className={classes}
size="xs"
color="text"
+ disabled={isPlaceholder}
{...rest}
>
{children}
diff --git a/src/components/tabs/_tabs.scss b/src/components/tabs/_tabs.scss
index 6c96bc838ef..abf47c25e4f 100644
--- a/src/components/tabs/_tabs.scss
+++ b/src/components/tabs/_tabs.scss
@@ -1,6 +1,15 @@
.euiTabs {
display: flex;
border-bottom: $euiBorderThin;
+ max-width: 100%;
+ overflow-x: auto;
+ overflow-y: hidden; // don't scroll vertically when scrolling horizontally
+ @include euiScrollBar;
+
+ // Changing height of scrollbar so it sits flush with border
+ &::-webkit-scrollbar {
+ height: 3px;
+ }
&.euiTabs--small {
.euiTab {
@@ -62,6 +71,9 @@
.euiTab__content {
display: block;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
transition: transform $euiAnimSpeedFast $euiAnimSlightBounce;
transform: translateY(0);
}
diff --git a/src/global_styling/mixins/_shadow.scss b/src/global_styling/mixins/_shadow.scss
index 8d6ae261c10..b9be73ae7b2 100644
--- a/src/global_styling/mixins/_shadow.scss
+++ b/src/global_styling/mixins/_shadow.scss
@@ -24,3 +24,13 @@
box-shadow:
0 1px 1px 0px rgba(0, 0, 0, 0.2),
}
+
+@mixin euiOverflowShadowTop {
+ box-shadow: 0 ($euiSize *-1) $euiSize (-$euiSize / 2) $euiColorEmptyShade;
+ z-index: 2;
+}
+
+@mixin euiOverflowShadowBottom {
+ box-shadow: 0 $euiSize $euiSize (-$euiSize / 2) $euiColorEmptyShade;
+ z-index: 2;
+}