@elastic/eui 70.2.3 → 70.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/eui_theme_dark.css +0 -198
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -198
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/accessibility/skip_link/skip_link.js +6 -5
  6. package/es/components/badge/beta_badge/beta_badge.js +11 -3
  7. package/es/components/badge/beta_badge/beta_badge.styles.js +25 -4
  8. package/es/components/card/card.js +6 -1
  9. package/es/components/card/card.styles.js +4 -4
  10. package/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +109 -0
  11. package/es/components/flex/flex_group.styles.js +1 -1
  12. package/es/components/flyout/flyout.a11y.js +92 -0
  13. package/es/components/image/image_fullscreen_wrapper.styles.js +3 -11
  14. package/es/components/modal/confirm_modal.js +11 -0
  15. package/es/components/modal/modal.a11y.js +70 -0
  16. package/es/components/modal/modal.js +17 -27
  17. package/es/components/modal/modal.styles.js +23 -0
  18. package/es/components/modal/modal_body.js +8 -0
  19. package/es/components/modal/modal_body.styles.js +16 -0
  20. package/es/components/modal/modal_footer.js +6 -0
  21. package/es/components/modal/modal_footer.styles.js +15 -0
  22. package/es/components/modal/modal_header.js +6 -0
  23. package/es/components/modal/modal_header.styles.js +14 -0
  24. package/es/components/modal/modal_header_title.js +3 -1
  25. package/es/components/page_template/outer/page_outer.js +1 -1
  26. package/es/components/page_template/page_template.js +28 -6
  27. package/es/components/popover/popover.a11y.js +83 -0
  28. package/es/components/search_bar/query/default_syntax.js +2 -1
  29. package/es/components/tabs/tabs.a11y.js +97 -0
  30. package/es/components/tree_view/tree_view.a11y.js +74 -0
  31. package/es/global_styling/utility/animations.js +5 -2
  32. package/eui.d.ts +58 -7
  33. package/i18ntokens.json +2 -2
  34. package/lib/components/accessibility/skip_link/skip_link.js +6 -5
  35. package/lib/components/badge/beta_badge/beta_badge.js +13 -4
  36. package/lib/components/badge/beta_badge/beta_badge.styles.js +25 -4
  37. package/lib/components/card/card.js +6 -1
  38. package/lib/components/card/card.styles.js +4 -4
  39. package/lib/components/date_picker/super_date_picker/super_date_picker.a11y.js +111 -0
  40. package/lib/components/flex/flex_group.styles.js +1 -1
  41. package/lib/components/flyout/flyout.a11y.js +94 -0
  42. package/lib/components/image/image_fullscreen_wrapper.styles.js +9 -10
  43. package/lib/components/modal/confirm_modal.js +13 -0
  44. package/lib/components/modal/modal.a11y.js +73 -0
  45. package/lib/components/modal/modal.js +17 -32
  46. package/lib/components/modal/modal.styles.js +36 -0
  47. package/lib/components/modal/modal_body.js +10 -0
  48. package/lib/components/modal/modal_body.styles.js +27 -0
  49. package/lib/components/modal/modal_footer.js +8 -0
  50. package/lib/components/modal/modal_footer.styles.js +26 -0
  51. package/lib/components/modal/modal_header.js +8 -0
  52. package/lib/components/modal/modal_header.styles.js +24 -0
  53. package/lib/components/modal/modal_header_title.js +4 -1
  54. package/lib/components/page_template/outer/page_outer.js +1 -1
  55. package/lib/components/page_template/page_template.js +32 -10
  56. package/lib/components/popover/popover.a11y.js +86 -0
  57. package/lib/components/search_bar/query/default_syntax.js +2 -1
  58. package/lib/components/tabs/tabs.a11y.js +98 -0
  59. package/lib/components/tree_view/tree_view.a11y.js +80 -0
  60. package/lib/global_styling/utility/animations.js +9 -3
  61. package/optimize/es/components/accessibility/skip_link/skip_link.js +6 -5
  62. package/optimize/es/components/badge/beta_badge/beta_badge.js +5 -2
  63. package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +25 -4
  64. package/optimize/es/components/card/card.styles.js +4 -4
  65. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +98 -0
  66. package/optimize/es/components/flex/flex_group.styles.js +1 -1
  67. package/optimize/es/components/flyout/flyout.a11y.js +77 -0
  68. package/optimize/es/components/image/image_fullscreen_wrapper.styles.js +3 -11
  69. package/optimize/es/components/modal/confirm_modal.js +6 -0
  70. package/optimize/es/components/modal/modal.a11y.js +60 -0
  71. package/optimize/es/components/modal/modal.js +17 -27
  72. package/optimize/es/components/modal/modal.styles.js +23 -0
  73. package/optimize/es/components/modal/modal_body.js +8 -0
  74. package/optimize/es/components/modal/modal_body.styles.js +16 -0
  75. package/optimize/es/components/modal/modal_footer.js +6 -0
  76. package/optimize/es/components/modal/modal_footer.styles.js +15 -0
  77. package/optimize/es/components/modal/modal_header.js +6 -0
  78. package/optimize/es/components/modal/modal_header.styles.js +14 -0
  79. package/optimize/es/components/modal/modal_header_title.js +3 -1
  80. package/optimize/es/components/page_template/page_template.js +5 -3
  81. package/optimize/es/components/popover/popover.a11y.js +73 -0
  82. package/optimize/es/components/search_bar/query/default_syntax.js +2 -1
  83. package/optimize/es/components/tabs/tabs.a11y.js +97 -0
  84. package/optimize/es/components/tree_view/tree_view.a11y.js +74 -0
  85. package/optimize/es/global_styling/utility/animations.js +5 -2
  86. package/optimize/lib/components/accessibility/skip_link/skip_link.js +6 -5
  87. package/optimize/lib/components/badge/beta_badge/beta_badge.js +7 -3
  88. package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +25 -4
  89. package/optimize/lib/components/card/card.styles.js +4 -4
  90. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.a11y.js +111 -0
  91. package/optimize/lib/components/flex/flex_group.styles.js +1 -1
  92. package/optimize/lib/components/flyout/flyout.a11y.js +84 -0
  93. package/optimize/lib/components/image/image_fullscreen_wrapper.styles.js +9 -12
  94. package/optimize/lib/components/modal/confirm_modal.js +8 -0
  95. package/optimize/lib/components/modal/modal.a11y.js +73 -0
  96. package/optimize/lib/components/modal/modal.js +17 -31
  97. package/optimize/lib/components/modal/modal.styles.js +36 -0
  98. package/optimize/lib/components/modal/modal_body.js +10 -0
  99. package/optimize/lib/components/modal/modal_body.styles.js +27 -0
  100. package/optimize/lib/components/modal/modal_footer.js +8 -0
  101. package/optimize/lib/components/modal/modal_footer.styles.js +26 -0
  102. package/optimize/lib/components/modal/modal_header.js +8 -0
  103. package/optimize/lib/components/modal/modal_header.styles.js +24 -0
  104. package/optimize/lib/components/modal/modal_header_title.js +4 -1
  105. package/optimize/lib/components/page_template/page_template.js +5 -3
  106. package/optimize/lib/components/popover/popover.a11y.js +86 -0
  107. package/optimize/lib/components/search_bar/query/default_syntax.js +2 -1
  108. package/optimize/lib/components/tabs/tabs.a11y.js +98 -0
  109. package/optimize/lib/components/tree_view/tree_view.a11y.js +80 -0
  110. package/optimize/lib/global_styling/utility/animations.js +9 -3
  111. package/package.json +5 -4
  112. package/src/components/index.scss +0 -1
  113. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  114. package/test-env/components/accessibility/skip_link/skip_link.js +6 -5
  115. package/test-env/components/badge/beta_badge/beta_badge.js +13 -4
  116. package/test-env/components/badge/beta_badge/beta_badge.styles.js +25 -4
  117. package/test-env/components/card/card.js +6 -1
  118. package/test-env/components/card/card.styles.js +4 -4
  119. package/test-env/components/date_picker/super_date_picker/super_date_picker.a11y.js +111 -0
  120. package/test-env/components/flex/flex_group.styles.js +1 -1
  121. package/test-env/components/flyout/flyout.a11y.js +84 -0
  122. package/test-env/components/image/image_fullscreen_wrapper.styles.js +9 -12
  123. package/test-env/components/modal/confirm_modal.js +13 -0
  124. package/test-env/components/modal/modal.a11y.js +73 -0
  125. package/test-env/components/modal/modal.js +17 -31
  126. package/test-env/components/modal/modal.styles.js +36 -0
  127. package/test-env/components/modal/modal_body.js +10 -0
  128. package/test-env/components/modal/modal_body.styles.js +27 -0
  129. package/test-env/components/modal/modal_footer.js +8 -0
  130. package/test-env/components/modal/modal_footer.styles.js +26 -0
  131. package/test-env/components/modal/modal_header.js +8 -0
  132. package/test-env/components/modal/modal_header.styles.js +24 -0
  133. package/test-env/components/modal/modal_header_title.js +4 -1
  134. package/test-env/components/page_template/outer/page_outer.js +1 -1
  135. package/test-env/components/page_template/page_template.js +32 -10
  136. package/test-env/components/popover/popover.a11y.js +86 -0
  137. package/test-env/components/search_bar/query/default_syntax.js +2 -1
  138. package/test-env/components/tabs/tabs.a11y.js +98 -0
  139. package/test-env/components/tree_view/tree_view.a11y.js +80 -0
  140. package/test-env/global_styling/utility/animations.js +9 -3
  141. package/src/components/modal/_index.scss +0 -1
  142. package/src/components/modal/_modal.scss +0 -156
  143. package/src/themes/amsterdam/overrides/_modal.scss +0 -3
@@ -18,6 +18,24 @@ var _services = require("../../../services");
18
18
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
19
19
 
20
20
  var _ref = process.env.NODE_ENV === "production" ? {
21
+ name: "l1nme7-middle",
22
+ styles: "vertical-align:middle;label:middle;"
23
+ } : {
24
+ name: "l1nme7-middle",
25
+ styles: "vertical-align:middle;label:middle;",
26
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
27
+ };
28
+
29
+ var _ref2 = process.env.NODE_ENV === "production" ? {
30
+ name: "19hexhy-baseline",
31
+ styles: "vertical-align:baseline;label:baseline;"
32
+ } : {
33
+ name: "19hexhy-baseline",
34
+ styles: "vertical-align:baseline;label:baseline;",
35
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
36
+ };
37
+
38
+ var _ref3 = process.env.NODE_ENV === "production" ? {
21
39
  name: "pzpqqg-euiBetaBadge__icon",
22
40
  styles: "position:relative;transform:translate(0, -1px);label:euiBetaBadge__icon;"
23
41
  } : {
@@ -30,7 +48,7 @@ var euiBetaBadgeStyles = function euiBetaBadgeStyles(euiThemeContext) {
30
48
  var euiTheme = euiThemeContext.euiTheme,
31
49
  colorMode = euiThemeContext.colorMode;
32
50
  return {
33
- euiBetaBadge: /*#__PURE__*/(0, _react.css)("display:inline-block;vertical-align:super;border-radius:", euiTheme.size.l, ";cursor:default;font-weight:", euiTheme.font.weight.bold, ";text-transform:uppercase;letter-spacing:0.05em;text-align:center;", (0, _global_styling.euiTextTruncate)(), " &:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'outset', {
51
+ euiBetaBadge: /*#__PURE__*/(0, _react.css)("display:inline-block;border-radius:", euiTheme.size.l, ";cursor:default;font-weight:", euiTheme.font.weight.bold, ";text-transform:uppercase;letter-spacing:0.05em;text-align:center;", (0, _global_styling.euiTextTruncate)(), " &:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'outset', {
34
52
  color: colorMode === 'DARK' ? euiTheme.colors.ghost : euiTheme.colors.ink
35
53
  }), ";};label:euiBetaBadge;"),
36
54
  // Colors
@@ -56,15 +74,18 @@ var euiBetaBadgeStyles = function euiBetaBadgeStyles(euiThemeContext) {
56
74
  })), "\n ")
57
75
  }
58
76
  },
59
- euiBetaBadge__icon: _ref
77
+ euiBetaBadge__icon: _ref3,
78
+ // Alignments
79
+ baseline: _ref2,
80
+ middle: _ref
60
81
  };
61
82
  }; // Util for detecting text color based on badge bg color
62
83
 
63
84
 
64
85
  exports.euiBetaBadgeStyles = euiBetaBadgeStyles;
65
86
 
66
- var getBadgeColors = function getBadgeColors(backgroundColor, _ref2) {
67
- var euiTheme = _ref2.euiTheme;
87
+ var getBadgeColors = function getBadgeColors(backgroundColor, _ref4) {
88
+ var euiTheme = _ref4.euiTheme;
68
89
  var textColor = _services.isColorDark.apply(void 0, (0, _toConsumableArray2.default)((0, _services.hexToRgb)(backgroundColor))) ? euiTheme.colors.ghost : euiTheme.colors.ink;
69
90
  return "\n background-color: ".concat(backgroundColor, ";\n color: ").concat(textColor, ";\n ");
70
91
  };
@@ -58,11 +58,11 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
58
58
  };
59
59
 
60
60
  var _ref6 = process.env.NODE_ENV === "production" ? {
61
- name: "z24364-euiCard__main",
62
- styles: "display:flex;label:euiCard__main;"
61
+ name: "31kq8f-euiCard__main",
62
+ styles: "display:flex;inline-size:100%;label:euiCard__main;"
63
63
  } : {
64
- name: "z24364-euiCard__main",
65
- styles: "display:flex;label:euiCard__main;",
64
+ name: "31kq8f-euiCard__main",
65
+ styles: "display:flex;inline-size:100%;label:euiCard__main;",
66
66
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
67
67
  };
68
68
 
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
+
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
+
11
+ var _react = _interopRequireWildcard(require("react"));
12
+
13
+ var _super_date_picker = require("./super_date_picker");
14
+
15
+ var _react2 = require("@emotion/react");
16
+
17
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
+
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+
21
+ /*
22
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
23
+ * or more contributor license agreements. Licensed under the Elastic License
24
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
25
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
26
+ * Side Public License, v 1.
27
+ */
28
+ /// <reference types="../../../../cypress/support"/>
29
+ var SuperDatePicker = function SuperDatePicker() {
30
+ var _useState = (0, _react.useState)(false),
31
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
32
+ isLoading = _useState2[0],
33
+ setIsLoading = _useState2[1];
34
+
35
+ var _useState3 = (0, _react.useState)(true),
36
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 1),
37
+ showUpdateButton = _useState4[0];
38
+
39
+ var _useState5 = (0, _react.useState)('now-30m'),
40
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
41
+ start = _useState6[0],
42
+ setStart = _useState6[1];
43
+
44
+ var _useState7 = (0, _react.useState)('now'),
45
+ _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
46
+ end = _useState8[0],
47
+ setEnd = _useState8[1];
48
+
49
+ var _useState9 = (0, _react.useState)(true),
50
+ _useState10 = (0, _slicedToArray2.default)(_useState9, 1),
51
+ showFill = _useState10[0];
52
+
53
+ var onTimeChange = function onTimeChange(_ref) {
54
+ var start = _ref.start,
55
+ end = _ref.end;
56
+ setStart(start);
57
+ setEnd(end);
58
+ setIsLoading(true);
59
+ startLoading();
60
+ };
61
+
62
+ var startLoading = function startLoading() {
63
+ setTimeout(stopLoading, 1000);
64
+ };
65
+
66
+ var stopLoading = function stopLoading() {
67
+ setIsLoading(false);
68
+ };
69
+
70
+ var datepickerProps = {
71
+ isLoading: isLoading,
72
+ start: start,
73
+ end: end,
74
+ onTimeChange: onTimeChange,
75
+ showUpdateButton: showUpdateButton
76
+ };
77
+ return (0, _react2.jsx)(_super_date_picker.EuiSuperDatePicker, (0, _extends2.default)({}, datepickerProps, {
78
+ updateButtonProps: {
79
+ fill: showFill
80
+ }
81
+ }));
82
+ };
83
+
84
+ beforeEach(function () {
85
+ cy.mount((0, _react2.jsx)(SuperDatePicker, null));
86
+ cy.get('div.euiSuperDatePicker__flexWrapper').should('exist');
87
+ });
88
+ describe('EuiSuperDatePicker', function () {
89
+ describe('Automated accessibility check', function () {
90
+ it('has zero violations on render', function () {
91
+ cy.checkAxe();
92
+ });
93
+ it('has zero violations when quick select menu is open', function () {
94
+ cy.get('button.euiFormControlLayout__prepend').click();
95
+ cy.get('div.euiPanel').contains('Quick select').should('exist');
96
+ cy.checkAxe();
97
+ });
98
+ it('has zero violations when start / end date menus are open', function () {
99
+ cy.get('button.euiSuperDatePicker__prettyFormat').click();
100
+ cy.get('div.euiDatePopoverContent').should('exist');
101
+ cy.checkAxe();
102
+ cy.get('button.euiDatePopoverButton--start').click();
103
+ cy.get('button.euiDatePopoverButton--end').click();
104
+ cy.get('div.euiDatePopoverContent').should('exist');
105
+ cy.checkAxe();
106
+ cy.get('button.euiDatePopoverButton--end').click();
107
+ cy.get('div.euiDatePopoverContent').should('not.exist');
108
+ cy.checkAxe();
109
+ });
110
+ });
111
+ });
@@ -168,7 +168,7 @@ var euiFlexGroupStyles = function euiFlexGroupStyles(euiThemeContext) {
168
168
  var euiTheme = euiThemeContext.euiTheme;
169
169
  return {
170
170
  euiFlexGroup: _ref17,
171
- responsive: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{flex-wrap:wrap;.euiFlexItem{", (0, _global_styling.logicalCSS)('width', '100%'), " flex-basis:100%;}};label:responsive;"),
171
+ responsive: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{flex-wrap:wrap;&>.euiFlexItem{", (0, _global_styling.logicalCSS)('width', '100%'), " flex-basis:100%;}};label:responsive;"),
172
172
  wrap: _ref16,
173
173
  gutterSizes: {
174
174
  none: /*#__PURE__*/(0, _react.css)(";label:none;"),
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
8
+
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
+
11
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
+
13
+ var _react = _interopRequireWildcard(require("react"));
14
+
15
+ var _flyout = require("./flyout");
16
+
17
+ var _button = require("../button");
18
+
19
+ var _react2 = require("@emotion/react");
20
+
21
+ var _excluded = ["children"];
22
+
23
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
24
+
25
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
26
+
27
+ var childrenDefault = (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("button", {
28
+ "data-test-subj": "itemA"
29
+ }, "Item A"), (0, _react2.jsx)("button", {
30
+ "data-test-subj": "itemB"
31
+ }, "Item B"), (0, _react2.jsx)("button", {
32
+ "data-test-subj": "itemC"
33
+ }, "Item C"), (0, _react2.jsx)("input", {
34
+ "data-test-subj": "itemD"
35
+ }));
36
+
37
+ var Flyout = function Flyout(_ref) {
38
+ var _ref$children = _ref.children,
39
+ children = _ref$children === void 0 ? childrenDefault : _ref$children,
40
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
41
+
42
+ var _useState = (0, _react.useState)(false),
43
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
44
+ isOpen = _useState2[0],
45
+ setIsOpen = _useState2[1];
46
+
47
+ var onButtonClick = function onButtonClick() {
48
+ return setIsOpen(!isOpen);
49
+ };
50
+
51
+ var button = (0, _react2.jsx)(_button.EuiButtonEmpty, {
52
+ onClick: onButtonClick
53
+ }, "Toggle flyout");
54
+ return (0, _react2.jsx)("div", null, button, isOpen ? (0, _react2.jsx)(_flyout.EuiFlyout, (0, _extends2.default)({
55
+ "data-test-subj": "flyoutSpec",
56
+ onClose: function onClose() {
57
+ return setIsOpen(false);
58
+ }
59
+ }, rest), children) : null);
60
+ };
61
+
62
+ beforeEach(function () {
63
+ cy.mount((0, _react2.jsx)(Flyout, null));
64
+ cy.get('div.euiFlyout').should('not.exist');
65
+ });
66
+ describe('EuiFlyout', function () {
67
+ describe('Automated accessibility check', function () {
68
+ it('has zero violations on render', function () {
69
+ cy.checkAxe();
70
+ });
71
+ it('has zero violations when flyout is opened', function () {
72
+ cy.get('button.euiButtonEmpty').click();
73
+ cy.get('div.euiFlyout').should('exist');
74
+ cy.checkAxe();
75
+ });
76
+ it('has zero violations when flyout is closed', function () {
77
+ cy.get('button.euiButtonEmpty').click();
78
+ cy.get('div.euiFlyout').should('exist');
79
+ cy.get('button.euiFlyout__closeButton').click();
80
+ cy.get('div.euiFlyout').should('not.exist');
81
+ cy.checkAxe();
82
+ });
83
+ });
84
+ });
@@ -1,32 +1,29 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.euiImageFullscreenWrapperStyles = void 0;
9
7
 
10
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
-
12
8
  var _react = require("@emotion/react");
13
9
 
14
10
  var _global_styling = require("../../global_styling");
15
11
 
16
- var _templateObject;
17
-
12
+ /*
13
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
+ * or more contributor license agreements. Licensed under the Elastic License
15
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
16
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
17
+ * Side Public License, v 1.
18
+ */
18
19
  var euiImageFullscreenWrapperStyles = function euiImageFullscreenWrapperStyles(euiThemeContext) {
19
20
  var euiTheme = euiThemeContext.euiTheme;
20
21
  return {
21
22
  // Base
22
- euiImageFullscreenWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '80vh'), ";", (0, _global_styling.logicalCSS)('max-width', '80vw'), ";", (0, _global_styling.logicalTextAlignCSS)('center'), ";line-height:0;", _global_styling.euiCanAnimate, "{animation:", euiImageFullScreen(euiTheme.size.xxxxl), " ", euiTheme.animation.extraSlow, " ", euiTheme.animation.bounce, ";}&:hover [class*='euiImageCaption']{text-decoration:underline;};label:euiImageFullscreenWrapper;"),
23
+ euiImageFullscreenWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-height', '80vh'), ";", (0, _global_styling.logicalCSS)('max-width', '80vw'), ";", (0, _global_styling.logicalTextAlignCSS)('center'), ";line-height:0;", _global_styling.euiCanAnimate, "{animation:", (0, _global_styling.euiAnimSlideInUp)(euiTheme.size.xxxxl), " ", euiTheme.animation.extraSlow, " ", euiTheme.animation.bounce, ";}&:hover [class*='euiImageCaption']{text-decoration:underline;};label:euiImageFullscreenWrapper;"),
23
24
  // Sizes
24
25
  fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;")
25
26
  };
26
27
  };
27
28
 
28
- exports.euiImageFullscreenWrapperStyles = euiImageFullscreenWrapperStyles;
29
-
30
- var euiImageFullScreen = function euiImageFullScreen(size) {
31
- return (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: 0;\n transform: translateY(", ");\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n"])), size);
32
- };
29
+ exports.euiImageFullscreenWrapperStyles = euiImageFullscreenWrapperStyles;
@@ -29,6 +29,10 @@ var _modal_header_title = require("./modal_header_title");
29
29
 
30
30
  var _modal_body = require("./modal_body");
31
31
 
32
+ var _services = require("../../services");
33
+
34
+ var _modal2 = require("./modal.styles");
35
+
32
36
  var _button = require("../button");
33
37
 
34
38
  var _text = require("../text");
@@ -94,6 +98,9 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
94
98
  };
95
99
 
96
100
  var classes = (0, _classnames.default)('euiModal--confirmation', className);
101
+ var euiTheme = (0, _services.useEuiTheme)();
102
+ var styles = (0, _modal2.euiModalStyles)(euiTheme);
103
+ var cssStyles = [styles.confirmation];
97
104
  var modalTitle;
98
105
 
99
106
  if (title) {
@@ -112,6 +119,7 @@ var EuiConfirmModal = function EuiConfirmModal(_ref) {
112
119
 
113
120
  return (0, _react2.jsx)(_modal.EuiModal, (0, _extends2.default)({
114
121
  className: classes,
122
+ css: cssStyles,
115
123
  onClose: onCancel
116
124
  }, rest), modalTitle, message && (0, _react2.jsx)(_modal_body.EuiModalBody, null, (0, _react2.jsx)(_text.EuiText, {
117
125
  "data-test-subj": "confirmModalBodyText"
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
8
+
9
+ var _react = _interopRequireWildcard(require("react"));
10
+
11
+ var _index = require("./index");
12
+
13
+ var _button = require("../button");
14
+
15
+ var _react2 = require("@emotion/react");
16
+
17
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
+
19
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
20
+
21
+ /*
22
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
23
+ * or more contributor license agreements. Licensed under the Elastic License
24
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
25
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
26
+ * Side Public License, v 1.
27
+ */
28
+ /// <reference types="../../../cypress/support"/>
29
+ var Modal = function Modal() {
30
+ var _useState = (0, _react.useState)(false),
31
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
32
+ isModalVisible = _useState2[0],
33
+ setIsModalVisible = _useState2[1];
34
+
35
+ var closeModal = function closeModal() {
36
+ return setIsModalVisible(false);
37
+ };
38
+
39
+ var showModal = function showModal() {
40
+ return setIsModalVisible(true);
41
+ };
42
+
43
+ var modalProps = {
44
+ title: 'Do this thing',
45
+ onClose: closeModal,
46
+ children: _react.default
47
+ };
48
+ return (0, _react2.jsx)("div", null, (0, _react2.jsx)(_button.EuiButton, {
49
+ onClick: showModal
50
+ }, "Show confirm modal"), isModalVisible && (0, _react2.jsx)(_index.EuiModal, modalProps, (0, _react2.jsx)(_index.EuiModalHeader, null, (0, _react2.jsx)(_index.EuiModalHeaderTitle, null, (0, _react2.jsx)("h1", null, "Title of modal"))), (0, _react2.jsx)(_index.EuiModalBody, null, (0, _react2.jsx)("p", null, "This is a simple modal body")), (0, _react2.jsx)(_index.EuiModalFooter, null, (0, _react2.jsx)(_button.EuiButton, {
51
+ onClick: closeModal,
52
+ fill: true
53
+ }, "Close"))));
54
+ };
55
+
56
+ beforeEach(function () {
57
+ cy.mount((0, _react2.jsx)(Modal, null));
58
+ cy.get('div.euiModal').should('not.exist');
59
+ cy.get('button.euiButton').click();
60
+ cy.get('div.euiModal').should('exist');
61
+ });
62
+ describe('EuiModal', function () {
63
+ describe('Automated accessibility check', function () {
64
+ it('has zero violations when modal is open', function () {
65
+ cy.checkAxe();
66
+ });
67
+ it('has zero violations when modal is closed', function () {
68
+ cy.get('div.euiModalFooter button.euiButton').click();
69
+ cy.get('div.euiModal').should('not.exist');
70
+ cy.checkAxe();
71
+ });
72
+ });
73
+ });
@@ -2,8 +2,6 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
@@ -15,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
13
 
16
14
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
15
 
18
- var _react = _interopRequireWildcard(require("react"));
16
+ var _react = _interopRequireDefault(require("react"));
19
17
 
20
18
  var _classnames = _interopRequireDefault(require("classnames"));
21
19
 
@@ -29,14 +27,12 @@ var _overlay_mask = require("../overlay_mask");
29
27
 
30
28
  var _i18n = require("../i18n");
31
29
 
30
+ var _modal = require("./modal.styles");
31
+
32
32
  var _react2 = require("@emotion/react");
33
33
 
34
34
  var _excluded = ["className", "children", "initialFocus", "onClose", "maxWidth", "style"];
35
35
 
36
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
-
38
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
-
40
36
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
41
37
 
42
38
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -50,18 +46,6 @@ var EuiModal = function EuiModal(_ref) {
50
46
  maxWidth = _ref$maxWidth === void 0 ? true : _ref$maxWidth,
51
47
  style = _ref.style,
52
48
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
53
- // TODO: Remove this onFocus scroll workaround after react-focus-on supports focusOptions
54
- // @see https://github.com/elastic/eui/issues/6304
55
- var bodyScrollTop = (0, _react.useRef)(typeof window === 'undefined' ? undefined : window.scrollY // Account for SSR
56
- );
57
- var onFocus = (0, _react.useCallback)(function () {
58
- if (bodyScrollTop.current != null) {
59
- window.scrollTo({
60
- top: bodyScrollTop.current
61
- });
62
- bodyScrollTop.current = undefined; // Unset after first auto focus
63
- }
64
- }, []);
65
49
 
66
50
  var onKeyDown = function onKeyDown(event) {
67
51
  if (event.key === _services.keys.ESCAPE) {
@@ -71,28 +55,29 @@ var EuiModal = function EuiModal(_ref) {
71
55
  }
72
56
  };
73
57
 
74
- var newStyle;
75
- var widthClassName;
58
+ var newStyle = style;
76
59
 
77
- if (maxWidth === true) {
78
- widthClassName = 'euiModal--maxWidth-default';
79
- } else if (maxWidth !== false) {
80
- var value = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth;
81
- newStyle = _objectSpread(_objectSpread({}, style), {}, {
82
- maxWidth: value
60
+ if (typeof maxWidth !== 'boolean') {
61
+ newStyle = _objectSpread(_objectSpread({}, newStyle), {}, {
62
+ maxInlineSize: maxWidth
83
63
  });
84
64
  }
85
65
 
86
- var classes = (0, _classnames.default)('euiModal', widthClassName, className);
66
+ var classes = (0, _classnames.default)('euiModal', className);
67
+ var euiTheme = (0, _services.useEuiTheme)();
68
+ var styles = (0, _modal.euiModalStyles)(euiTheme);
69
+ var cssStyles = [styles.euiModal, maxWidth === true && styles.defaultMaxWidth];
70
+ var cssCloseIconStyles = [styles.euiModal__closeIcon];
87
71
  return (0, _react2.jsx)(_overlay_mask.EuiOverlayMask, null, (0, _react2.jsx)(_focus_trap.EuiFocusTrap, {
88
72
  initialFocus: initialFocus,
89
- scrollLock: true
73
+ scrollLock: true,
74
+ preventScrollOnFocus: true
90
75
  }, (0, _react2.jsx)("div", (0, _extends2.default)({
76
+ css: cssStyles,
91
77
  className: classes,
92
78
  onKeyDown: onKeyDown,
93
79
  tabIndex: 0,
94
- onFocus: onFocus,
95
- style: newStyle || style
80
+ style: newStyle
96
81
  }, rest), (0, _react2.jsx)(_i18n.EuiI18n, {
97
82
  token: "euiModal.closeModal",
98
83
  default: "Closes this modal window"
@@ -100,6 +85,7 @@ var EuiModal = function EuiModal(_ref) {
100
85
  return (0, _react2.jsx)(_button.EuiButtonIcon, {
101
86
  iconType: "cross",
102
87
  onClick: onClose,
88
+ css: cssCloseIconStyles,
103
89
  className: "euiModal__closeIcon",
104
90
  color: "text",
105
91
  "aria-label": closeModal
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiModalStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _mixins = require("../../themes/amsterdam/global_styling/mixins");
11
+
12
+ var _global_styling = require("../../global_styling");
13
+
14
+ var _form = require("../form/form.styles");
15
+
16
+ /*
17
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
18
+ * or more contributor license agreements. Licensed under the Elastic License
19
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
20
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
21
+ * Side Public License, v 1.
22
+ */
23
+ var euiModalStyles = function euiModalStyles(euiThemeContext) {
24
+ var euiTheme = euiThemeContext.euiTheme;
25
+ return {
26
+ euiModal: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), " display:flex;flex-direction:column;max-block-size:75vh;position:relative;background-color:", euiTheme.colors.emptyShade, ";border-radius:", euiTheme.border.radius.medium, ";z-index:", euiTheme.levels.modal, ";min-inline-size:", (0, _form.euiFormVariables)(euiThemeContext).maxWidth, ";max-inline-size:calc(100vw - ", euiTheme.size.base, ");", _global_styling.euiCanAnimate, "{animation:", (0, _global_styling.euiAnimSlideInUp)(euiTheme.size.xxl), " ", euiTheme.animation.slow, " ", euiTheme.animation.bounce, ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{position:fixed;inset:0;border-radius:0;inline-size:100vw!important;min-inline-size:0!important;max-inline-size:none!important;max-block-size:100vh!important;}&:focus{outline:none;};label:euiModal;"),
27
+ // Variants
28
+ defaultMaxWidth: /*#__PURE__*/(0, _react.css)("max-inline-size:min(\n ", euiTheme.breakpoint.m, "px,\n calc(100vw - ", euiTheme.size.base, ")\n );;label:defaultMaxWidth;"),
29
+ confirmation: /*#__PURE__*/(0, _react.css)("min-inline-size:", (0, _form.euiFormVariables)(euiThemeContext).maxWidth, ";", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _mixins.euiShadowXLarge)(euiThemeContext, {
30
+ reverse: true
31
+ }), " inset-block-start:auto;};label:confirmation;"),
32
+ euiModal__closeIcon: /*#__PURE__*/(0, _react.css)("position:absolute;inset-inline-end:", euiTheme.size.xs, ";inset-block-start:", euiTheme.size.xs, ";z-index:3;;label:euiModal__closeIcon;")
33
+ };
34
+ };
35
+
36
+ exports.euiModalStyles = euiModalStyles;
@@ -15,6 +15,10 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  var _classnames = _interopRequireDefault(require("classnames"));
17
17
 
18
+ var _services = require("../../services");
19
+
20
+ var _modal_body = require("./modal_body.styles");
21
+
18
22
  var _react2 = require("@emotion/react");
19
23
 
20
24
  var _excluded = ["className", "children"];
@@ -24,9 +28,15 @@ var EuiModalBody = function EuiModalBody(_ref) {
24
28
  children = _ref.children,
25
29
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
26
30
  var classes = (0, _classnames.default)('euiModalBody', className);
31
+ var euiTheme = (0, _services.useEuiTheme)();
32
+ var styles = (0, _modal_body.euiModalBodyStyles)(euiTheme);
33
+ var cssStyles = [styles.euiModalBody];
34
+ var cssOverflowStyles = [styles.euiModalBody__overflow];
27
35
  return (0, _react2.jsx)("div", (0, _extends2.default)({
36
+ css: cssStyles,
28
37
  className: classes
29
38
  }, rest), (0, _react2.jsx)("div", {
39
+ css: cssOverflowStyles,
30
40
  className: "euiModalBody__overflow"
31
41
  }, children));
32
42
  };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiModalBodyStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../global_styling");
11
+
12
+ /*
13
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
+ * or more contributor license agreements. Licensed under the Elastic License
15
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
16
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
17
+ * Side Public License, v 1.
18
+ */
19
+ var euiModalBodyStyles = function euiModalBodyStyles(euiThemeContext) {
20
+ var euiTheme = euiThemeContext.euiTheme;
21
+ return {
22
+ euiModalBody: /*#__PURE__*/(0, _react.css)("flex-grow:1;overflow:hidden;display:flex;flex-direction:column;&:last-of-type .euiModalBody__overflow{padding-block-end:", euiTheme.size.l, ";};label:euiModalBody;"),
23
+ euiModalBody__overflow: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScrollWithShadows)(euiThemeContext), ";padding-inline:", euiTheme.size.l, ";padding-block:", euiTheme.size.s, ";", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{padding-block-end:", euiTheme.size.l, ";};label:euiModalBody__overflow;")
24
+ };
25
+ };
26
+
27
+ exports.euiModalBodyStyles = euiModalBodyStyles;
@@ -15,6 +15,10 @@ var _react = _interopRequireDefault(require("react"));
15
15
 
16
16
  var _classnames = _interopRequireDefault(require("classnames"));
17
17
 
18
+ var _services = require("../../services");
19
+
20
+ var _modal_footer = require("./modal_footer.styles");
21
+
18
22
  var _react2 = require("@emotion/react");
19
23
 
20
24
  var _excluded = ["className", "children"];
@@ -24,7 +28,11 @@ var EuiModalFooter = function EuiModalFooter(_ref) {
24
28
  children = _ref.children,
25
29
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
26
30
  var classes = (0, _classnames.default)('euiModalFooter', className);
31
+ var euiTheme = (0, _services.useEuiTheme)();
32
+ var styles = (0, _modal_footer.euiModalFooterStyles)(euiTheme);
33
+ var cssStyles = [styles.euiModalFooter];
27
34
  return (0, _react2.jsx)("div", (0, _extends2.default)({
35
+ css: cssStyles,
28
36
  className: classes
29
37
  }, rest), children);
30
38
  };