@elastic/eui 67.1.0 → 67.1.2

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 (168) hide show
  1. package/dist/eui_theme_dark.css +0 -292
  2. package/dist/eui_theme_dark.json +0 -24
  3. package/dist/eui_theme_dark.json.d.ts +0 -24
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +0 -292
  6. package/dist/eui_theme_light.json +0 -24
  7. package/dist/eui_theme_light.json.d.ts +0 -24
  8. package/dist/eui_theme_light.min.css +1 -1
  9. package/es/components/accordion/accordion.js +5 -4
  10. package/es/components/accordion/accordion.styles.js +1 -1
  11. package/es/components/avatar/avatar.js +7 -1
  12. package/es/components/badge/badge.styles.js +10 -4
  13. package/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
  14. package/es/components/button/button_display/_button_display_content.js +2 -2
  15. package/es/components/button/button_icon/button_icon.js +11 -7
  16. package/es/components/collapsible_nav/collapsible_nav.js +8 -0
  17. package/es/components/expression/expression.styles.js +4 -2
  18. package/es/components/flyout/flyout.js +28 -48
  19. package/es/components/flyout/flyout.styles.js +111 -0
  20. package/es/components/flyout/flyout_body.js +14 -6
  21. package/es/components/flyout/flyout_body.styles.js +21 -0
  22. package/es/components/flyout/flyout_footer.js +8 -1
  23. package/es/components/flyout/flyout_footer.styles.js +14 -0
  24. package/es/components/flyout/flyout_header.js +9 -4
  25. package/es/components/flyout/flyout_header.styles.js +28 -0
  26. package/es/components/image/image_wrapper.js +3 -3
  27. package/es/components/markdown_editor/markdown_format.styles.js +11 -6
  28. package/es/components/notification/notification_event.js +2 -3
  29. package/es/components/page/page_header/page_header_content.js +1 -1
  30. package/es/components/page/page_section/page_section.js +3 -4
  31. package/es/components/pagination/pagination_button.styles.js +5 -3
  32. package/es/components/progress/progress.js +2 -2
  33. package/es/components/text/text.styles.js +6 -3
  34. package/es/components/tool_tip/tool_tip.styles.js +7 -6
  35. package/es/components/tour/tour.styles.js +11 -6
  36. package/es/global_styling/functions/index.js +1 -0
  37. package/es/global_styling/functions/math.js +46 -0
  38. package/es/global_styling/mixins/_helpers.js +5 -2
  39. package/eui.d.ts +95 -7
  40. package/i18ntokens.json +2 -2
  41. package/lib/components/accordion/accordion.js +5 -4
  42. package/lib/components/accordion/accordion.styles.js +1 -1
  43. package/lib/components/avatar/avatar.js +7 -1
  44. package/lib/components/badge/badge.styles.js +9 -3
  45. package/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
  46. package/lib/components/button/button_display/_button_display_content.js +2 -2
  47. package/lib/components/button/button_icon/button_icon.js +11 -7
  48. package/lib/components/collapsible_nav/collapsible_nav.js +8 -0
  49. package/lib/components/expression/expression.styles.js +3 -1
  50. package/lib/components/flyout/flyout.js +28 -47
  51. package/lib/components/flyout/flyout.styles.js +122 -0
  52. package/lib/components/flyout/flyout_body.js +16 -6
  53. package/lib/components/flyout/flyout_body.styles.js +32 -0
  54. package/lib/components/flyout/flyout_footer.js +10 -1
  55. package/lib/components/flyout/flyout_footer.styles.js +24 -0
  56. package/lib/components/flyout/flyout_header.js +11 -4
  57. package/lib/components/flyout/flyout_header.styles.js +31 -0
  58. package/lib/components/image/image_wrapper.js +3 -3
  59. package/lib/components/markdown_editor/markdown_format.styles.js +10 -5
  60. package/lib/components/notification/notification_event.js +2 -3
  61. package/lib/components/page/page_header/page_header_content.js +1 -1
  62. package/lib/components/page/page_section/page_section.js +3 -4
  63. package/lib/components/pagination/pagination_button.styles.js +4 -2
  64. package/lib/components/progress/progress.js +2 -2
  65. package/lib/components/text/text.styles.js +5 -2
  66. package/lib/components/tool_tip/tool_tip.styles.js +6 -5
  67. package/lib/components/tour/tour.styles.js +10 -5
  68. package/lib/global_styling/functions/index.js +13 -0
  69. package/lib/global_styling/functions/math.js +55 -0
  70. package/lib/global_styling/mixins/_helpers.js +5 -2
  71. package/optimize/es/components/accordion/accordion.js +5 -4
  72. package/optimize/es/components/accordion/accordion.styles.js +1 -1
  73. package/optimize/es/components/avatar/avatar.js +7 -1
  74. package/optimize/es/components/badge/badge.styles.js +10 -4
  75. package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
  76. package/optimize/es/components/button/button_display/_button_display_content.js +2 -2
  77. package/optimize/es/components/button/button_icon/button_icon.js +11 -7
  78. package/optimize/es/components/expression/expression.styles.js +4 -2
  79. package/optimize/es/components/flyout/flyout.js +28 -48
  80. package/optimize/es/components/flyout/flyout.styles.js +111 -0
  81. package/optimize/es/components/flyout/flyout_body.js +14 -6
  82. package/optimize/es/components/flyout/flyout_body.styles.js +21 -0
  83. package/optimize/es/components/flyout/flyout_footer.js +8 -1
  84. package/optimize/es/components/flyout/flyout_footer.styles.js +14 -0
  85. package/optimize/es/components/flyout/flyout_header.js +9 -4
  86. package/optimize/es/components/flyout/flyout_header.styles.js +28 -0
  87. package/optimize/es/components/image/image_wrapper.js +3 -3
  88. package/optimize/es/components/markdown_editor/markdown_format.styles.js +11 -6
  89. package/optimize/es/components/notification/notification_event.js +2 -3
  90. package/optimize/es/components/page/page_header/page_header_content.js +1 -1
  91. package/optimize/es/components/page/page_section/page_section.js +3 -4
  92. package/optimize/es/components/pagination/pagination_button.styles.js +5 -3
  93. package/optimize/es/components/progress/progress.js +2 -2
  94. package/optimize/es/components/text/text.styles.js +6 -3
  95. package/optimize/es/components/tool_tip/tool_tip.styles.js +7 -6
  96. package/optimize/es/components/tour/tour.styles.js +11 -6
  97. package/optimize/es/global_styling/functions/index.js +1 -0
  98. package/optimize/es/global_styling/functions/math.js +44 -0
  99. package/optimize/es/global_styling/mixins/_helpers.js +5 -2
  100. package/optimize/lib/components/accordion/accordion.js +5 -4
  101. package/optimize/lib/components/accordion/accordion.styles.js +1 -1
  102. package/optimize/lib/components/avatar/avatar.js +8 -1
  103. package/optimize/lib/components/badge/badge.styles.js +9 -3
  104. package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
  105. package/optimize/lib/components/button/button_display/_button_display_content.js +2 -2
  106. package/optimize/lib/components/button/button_icon/button_icon.js +11 -7
  107. package/optimize/lib/components/expression/expression.styles.js +3 -1
  108. package/optimize/lib/components/flyout/flyout.js +28 -47
  109. package/optimize/lib/components/flyout/flyout.styles.js +124 -0
  110. package/optimize/lib/components/flyout/flyout_body.js +16 -6
  111. package/optimize/lib/components/flyout/flyout_body.styles.js +32 -0
  112. package/optimize/lib/components/flyout/flyout_footer.js +10 -1
  113. package/optimize/lib/components/flyout/flyout_footer.styles.js +24 -0
  114. package/optimize/lib/components/flyout/flyout_header.js +11 -4
  115. package/optimize/lib/components/flyout/flyout_header.styles.js +31 -0
  116. package/optimize/lib/components/image/image_wrapper.js +3 -3
  117. package/optimize/lib/components/markdown_editor/markdown_format.styles.js +10 -5
  118. package/optimize/lib/components/notification/notification_event.js +2 -3
  119. package/optimize/lib/components/page/page_header/page_header_content.js +1 -1
  120. package/optimize/lib/components/page/page_section/page_section.js +3 -4
  121. package/optimize/lib/components/pagination/pagination_button.styles.js +4 -2
  122. package/optimize/lib/components/progress/progress.js +2 -2
  123. package/optimize/lib/components/text/text.styles.js +5 -2
  124. package/optimize/lib/components/tool_tip/tool_tip.styles.js +6 -5
  125. package/optimize/lib/components/tour/tour.styles.js +10 -5
  126. package/optimize/lib/global_styling/functions/index.js +13 -0
  127. package/optimize/lib/global_styling/functions/math.js +57 -0
  128. package/optimize/lib/global_styling/mixins/_helpers.js +5 -2
  129. package/package.json +1 -1
  130. package/src/components/index.scss +0 -1
  131. package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -1
  132. package/test-env/components/accordion/accordion.js +5 -4
  133. package/test-env/components/accordion/accordion.styles.js +1 -1
  134. package/test-env/components/avatar/avatar.js +8 -1
  135. package/test-env/components/badge/badge.styles.js +9 -3
  136. package/test-env/components/breadcrumbs/breadcrumb.styles.js +3 -1
  137. package/test-env/components/button/button_display/_button_display_content.js +2 -2
  138. package/test-env/components/button/button_icon/button_icon.js +11 -7
  139. package/test-env/components/collapsible_nav/collapsible_nav.js +8 -0
  140. package/test-env/components/expression/expression.styles.js +3 -1
  141. package/test-env/components/flyout/flyout.styles.js +124 -0
  142. package/test-env/components/flyout/flyout_body.js +16 -6
  143. package/test-env/components/flyout/flyout_body.styles.js +32 -0
  144. package/test-env/components/flyout/flyout_footer.js +10 -1
  145. package/test-env/components/flyout/flyout_footer.styles.js +24 -0
  146. package/test-env/components/flyout/flyout_header.js +11 -4
  147. package/test-env/components/flyout/flyout_header.styles.js +31 -0
  148. package/test-env/components/image/image_wrapper.js +3 -3
  149. package/test-env/components/markdown_editor/markdown_format.styles.js +10 -5
  150. package/test-env/components/notification/notification_event.js +2 -3
  151. package/test-env/components/page/page_header/page_header_content.js +1 -1
  152. package/test-env/components/page/page_section/page_section.js +3 -4
  153. package/test-env/components/pagination/pagination_button.styles.js +4 -2
  154. package/test-env/components/progress/progress.js +2 -2
  155. package/test-env/components/text/text.styles.js +5 -2
  156. package/test-env/components/tool_tip/tool_tip.styles.js +6 -5
  157. package/test-env/components/tour/tour.styles.js +10 -5
  158. package/test-env/global_styling/functions/index.js +13 -0
  159. package/test-env/global_styling/functions/math.js +57 -0
  160. package/test-env/global_styling/mixins/_helpers.js +5 -2
  161. package/src/components/flyout/_flyout.scss +0 -196
  162. package/src/components/flyout/_flyout_body.scss +0 -18
  163. package/src/components/flyout/_flyout_footer.scss +0 -4
  164. package/src/components/flyout/_flyout_header.scss +0 -7
  165. package/src/components/flyout/_index.scss +0 -7
  166. package/src/components/flyout/_mixins.scss +0 -18
  167. package/src/components/flyout/_variables.scss +0 -8
  168. package/src/themes/amsterdam/global_styling/variables/_flyout.scss +0 -1
@@ -0,0 +1,28 @@
1
+ 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)."; }
2
+
3
+ /*
4
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
5
+ * or more contributor license agreements. Licensed under the Elastic License
6
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
7
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
8
+ * Side Public License, v 1.
9
+ */
10
+ import { css } from '@emotion/react';
11
+ import { logicalCSS } from '../../global_styling';
12
+
13
+ var _ref = process.env.NODE_ENV === "production" ? {
14
+ name: "1hivny1-euiFlyoutHeader",
15
+ styles: "flex-grow:0;label:euiFlyoutHeader;"
16
+ } : {
17
+ name: "1hivny1-euiFlyoutHeader",
18
+ styles: "flex-grow:0;label:euiFlyoutHeader;",
19
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
+ };
21
+
22
+ export var euiFlyoutHeaderStyles = function euiFlyoutHeaderStyles(euiThemeContext) {
23
+ var euiTheme = euiThemeContext.euiTheme;
24
+ return {
25
+ euiFlyoutHeader: _ref,
26
+ hasBorder: /*#__PURE__*/css(logicalCSS('border-bottom', euiTheme.border.thin), ";;label:hasBorder;")
27
+ };
28
+ };
@@ -56,10 +56,10 @@ export var EuiImageWrapper = function EuiImageWrapper(_ref) {
56
56
  optionalCaptionText = _useInnerText2[1];
57
57
 
58
58
  return ___EmotionJSX("figure", _extends({
59
- "aria-label": optionalCaptionText
60
- }, wrapperProps, {
61
- className: classes,
59
+ "aria-label": optionalCaptionText,
62
60
  css: cssFigureStyles
61
+ }, wrapperProps, {
62
+ className: classes
63
63
  }), allowFullScreen ? ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiImageButton, {
64
64
  hasAlt: !!alt,
65
65
  hasShadow: hasShadow,
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, euiFontSize } from '../../global_styling';
9
+ import { logicalCSS, euiFontSize, mathWithUnits } from '../../global_styling';
10
10
  /**
11
11
  * Mixins
12
12
  */
@@ -20,11 +20,16 @@ var euiScaleMarkdownFormatText = function euiScaleMarkdownFormatText(euiTheme, o
20
20
  var measurement = options.measurement;
21
21
  var lineHeightSize = measurement === 'em' ? "".concat(lineHeight, "em") : lineHeight; // Custom scales
22
22
 
23
- var fontSizeNumeric = parseFloat(String(fontSize));
24
- var blockQuoteBorderWidth = fontSizeNumeric / 4;
25
- var tablePaddingVertical = fontSizeNumeric / 4;
26
- var tablePaddingHorizontal = fontSizeNumeric / 2;
27
- return "\n .euiMarkdownFormat__blockquote {\n padding: 0 ".concat(fontSize, ";\n ").concat(logicalCSS('border-left-width', "".concat(blockQuoteBorderWidth).concat(measurement)), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiCheckbox .euiCheckbox__input ~ .euiCheckbox__label { // Extra specificity necessary to override default checkbox CSS\n font-size: ").concat(fontSize, ";\n ").concat(logicalCSS('padding-left', lineHeightSize), "\n line-height: ").concat(lineHeight, ";\n }\n\n .euiCheckbox + *:not(.euiCheckbox) {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n .euiMarkdownFormat__codeblockWrapper {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('padding-vertical', "".concat(tablePaddingVertical).concat(measurement)), "\n ").concat(logicalCSS('padding-horizontal', "".concat(tablePaddingHorizontal).concat(measurement)), "\n }\n ");
23
+ var blockQuoteBorderWidth = mathWithUnits(fontSize, function (x) {
24
+ return x / 4;
25
+ });
26
+ var tablePaddingVertical = mathWithUnits(fontSize, function (x) {
27
+ return x / 4;
28
+ });
29
+ var tablePaddingHorizontal = mathWithUnits(fontSize, function (x) {
30
+ return x / 2;
31
+ });
32
+ return "\n .euiMarkdownFormat__blockquote {\n padding: 0 ".concat(fontSize, ";\n ").concat(logicalCSS('border-left-width', blockQuoteBorderWidth), "\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiCheckbox .euiCheckbox__input ~ .euiCheckbox__label { // Extra specificity necessary to override default checkbox CSS\n font-size: ").concat(fontSize, ";\n ").concat(logicalCSS('padding-left', lineHeightSize), "\n line-height: ").concat(lineHeight, ";\n }\n\n .euiCheckbox + *:not(.euiCheckbox) {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n .euiMarkdownFormat__codeblockWrapper {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table {\n ").concat(logicalCSS('margin-bottom', fontSize), "\n }\n\n .euiMarkdownFormat__table th,\n .euiMarkdownFormat__table td {\n ").concat(logicalCSS('padding-vertical', tablePaddingVertical), "\n ").concat(logicalCSS('padding-horizontal', tablePaddingHorizontal), "\n }\n ");
28
33
  };
29
34
  /**
30
35
  * Styles
@@ -47,9 +47,8 @@ export var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
47
47
  rest = _objectWithoutProperties(_ref, _excluded);
48
48
 
49
49
  var classes = classNames('euiNotificationEvent', {
50
- 'euiNotificationEvent--withReadState': typeof isRead === 'boolean',
51
- className: className
52
- });
50
+ 'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
51
+ }, className);
53
52
  var classesTitle = classNames('euiNotificationEvent__title', {
54
53
  'euiNotificationEvent__title--isRead': isRead
55
54
  });
@@ -59,7 +59,7 @@ export var EuiPageHeaderContent = function EuiPageHeaderContent(_ref) {
59
59
 
60
60
  var isResponsiveBreakpoint = useIsWithinBreakpoints(['xs', 's'], !!responsive);
61
61
  var useTheme = useEuiTheme();
62
- var classes = classNames('euiPageHeaderContent');
62
+ var classes = classNames('euiPageHeaderContent', className);
63
63
  var pageHeaderStyles = euiPageHeaderStyles(useTheme);
64
64
  var contentStyles = euiPageHeaderContentStyles(useTheme);
65
65
  var styles = setStyleForRestrictedPageWidth(restrictWidth, style);
@@ -47,12 +47,11 @@ export var EuiPageSection = function EuiPageSection(_ref) {
47
47
  var colors = useEuiBackgroundColorCSS();
48
48
  var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
49
49
  var contentStyles = euiPageSectionContentStyles();
50
- var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
50
+ var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth, (contentProps === null || contentProps === void 0 ? void 0 : contentProps.css) && contentProps.css];
51
51
  return ___EmotionJSX(Component, _extends({
52
52
  css: cssStyles
53
- }, rest), ___EmotionJSX("div", _extends({
54
- css: cssContentStyles
55
- }, contentProps, {
53
+ }, rest), ___EmotionJSX("div", _extends({}, contentProps, {
54
+ css: cssContentStyles,
56
55
  style: widthStyles
57
56
  }), children));
58
57
  };
@@ -6,12 +6,14 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, logicalTextAlignCSS, euiFontSize } from '../../global_styling';
9
+ import { logicalCSS, logicalTextAlignCSS, mathWithUnits, euiFontSize } from '../../global_styling';
10
10
  import { euiButtonEmptyColor } from '../../themes/amsterdam/global_styling/mixins';
11
11
  export var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThemeContext) {
12
12
  var euiTheme = euiThemeContext.euiTheme;
13
13
  var fontSizeS = euiFontSize(euiThemeContext, 's');
14
- var halfSizeM = parseInt(euiTheme.size.m.replace('px', '')) / 2;
14
+ var halfSizeM = mathWithUnits(euiTheme.size.m, function (x) {
15
+ return x / 2;
16
+ });
15
17
  var disabled = euiButtonEmptyColor(euiThemeContext, 'disabled'); // && to increase specificity. Can likely be removed once EuiButtonEmpty has been converted.
16
18
 
17
19
  return {
@@ -19,7 +21,7 @@ export var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThe
19
21
  euiPaginationButton: /*#__PURE__*/css("&&{", fontSizeS, ";padding:0;", logicalTextAlignCSS('center'), " border-radius:", euiTheme.border.radius.medium, ";outline-offset:-", euiTheme.focus.width, ";};label:euiPaginationButton;"),
20
22
  // States
21
23
  isActive: /*#__PURE__*/css("&&{font-weight:", euiTheme.font.weight.bold, ";color:", euiTheme.colors.primary, ";.euiButtonEmpty__content{cursor:default;}&&,&&:hover{text-decoration:underline;}};label:isActive;"),
22
- isPlaceholder: /*#__PURE__*/css("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", logicalCSS('padding-top', "".concat(halfSizeM, "px")), ";", logicalCSS('padding-bottom', 0), ";", logicalCSS('padding-horizontal', euiTheme.size.s), ";", logicalCSS('height', euiTheme.size.l), ";};label:isPlaceholder;")
24
+ isPlaceholder: /*#__PURE__*/css("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", logicalCSS('padding-top', halfSizeM), ";", logicalCSS('padding-bottom', 0), ";", logicalCSS('padding-horizontal', euiTheme.size.s), ";", logicalCSS('height', euiTheme.size.l), ";};label:isPlaceholder;")
23
25
  };
24
26
  };
25
27
  export var euiPaginationButtonArrowStyles = function euiPaginationButtonArrowStyles(_ref) {
@@ -84,9 +84,9 @@ export var EuiProgress = function EuiProgress(_ref) {
84
84
  }, label && ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
85
85
  return ___EmotionJSX("span", _extends({
86
86
  title: innerText,
87
- ref: ref
87
+ ref: ref,
88
+ css: labelCssStyles
88
89
  }, labelProps, {
89
- css: labelCssStyles,
90
90
  className: labelClasses
91
91
  }), label);
92
92
  }), valueRender && ___EmotionJSX(EuiInnerText, null, function (ref, innerText) {
@@ -6,7 +6,7 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  import { css } from '@emotion/react';
9
- import { logicalCSS, logicalTextAlignCSS, euiFontSize, euiBackgroundColor } from '../../global_styling';
9
+ import { logicalCSS, logicalTextAlignCSS, euiFontSize, euiBackgroundColor, mathWithUnits } from '../../global_styling';
10
10
  import { euiLinkCSS } from '../link/link.styles';
11
11
  import { euiTitle } from '../title/title.styles';
12
12
  /**
@@ -45,8 +45,11 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
45
45
  }; // Generate margins for headings based on customScale (not on heading level)
46
46
 
47
47
  var customScale = _customScale === 'xxxs' ? 'xxs' : _customScale || 'm';
48
- var headingMarginTop = "".concat(parseFloat(euiTheme.size[customScale]) * 2, "px");
49
- var headingMarginBottom = euiTheme.size[customScale];
48
+ var marginSize = euiTheme.size[customScale];
49
+ var headingMarginTop = mathWithUnits(marginSize, function (x) {
50
+ return x * 2;
51
+ });
52
+ var headingMarginBottom = marginSize;
50
53
  return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat(logicalCSS('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat(logicalCSS('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n ul,\n ol,\n dl,\n blockquote,\n img,\n pre {\n ").concat(logicalCSS('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat(logicalCSS('margin-left', lineHeightSize), "\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n padding: ").concat(lineHeightSize, ";\n }\n\n dd + dt {\n ").concat(logicalCSS('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat(euiFontSize(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat(euiFontSize(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; // 90% of parent font size\n }\n ").concat( // when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
51
54
  _customScale === 'm' ? "\n kbd {\n ".concat(logicalCSS('padding-bottom', euiTheme.size.xs), "\n // ensures when only one character the shape looks like a square\n ").concat(logicalCSS('min-width', euiTheme.size.l), "\n ").concat(logicalTextAlignCSS('center'), "\n }\n \n kbd::after {\n content: '';\n ").concat(logicalCSS('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.text)), "\n position: absolute;\n ").concat(logicalCSS('bottom', euiTheme.size.xxs), "\n ").concat(logicalCSS('left', 0), "\n ").concat(logicalCSS('width', '100%'), "\n }") : '', "\n ");
52
55
  };
@@ -12,7 +12,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
12
12
  * Side Public License, v 1.
13
13
  */
14
14
  import { css, keyframes } from '@emotion/react';
15
- import { logicalCSS, logicalSizeCSS, euiFontSize } from '../../global_styling';
15
+ import { logicalCSS, logicalSizeCSS, euiFontSize, mathWithUnits } from '../../global_styling';
16
16
  import { COLOR_MODES_STANDARD, tint, shade } from '../../services';
17
17
  import { euiShadow } from '../../themes/amsterdam';
18
18
  export var euiToolTipBackgroundColor = function euiToolTipBackgroundColor(euiTheme, colorMode) {
@@ -39,12 +39,13 @@ export var euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
39
39
  */
40
40
 
41
41
  var arrowSize = euiTheme.size.m;
42
- var arrowSizeInt = parseInt(arrowSize, 10);
43
- var arrowPlusSize = "".concat((arrowSizeInt / 2 + 1) * -1, "px");
44
- /* 1 */
42
+ var arrowPlusSize = mathWithUnits(arrowSize, function (x) {
43
+ return (x / 2 + 1) * -1;
44
+ }); // 1.
45
45
 
46
- var arrowMinusSize = "".concat((arrowSizeInt / 2 - 1) * -1, "px");
47
- /* 1 */
46
+ var arrowMinusSize = mathWithUnits(arrowSize, function (x) {
47
+ return (x / 2 - 1) * -1;
48
+ }); // 1.
48
49
 
49
50
  return {
50
51
  // Base
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { css } from '@emotion/react';
9
9
  import { shade, tint, COLOR_MODES_STANDARD } from '../../services';
10
- import { logicalCSS } from '../../global_styling';
10
+ import { logicalCSS, mathWithUnits } from '../../global_styling';
11
11
  import { openAnimationTiming } from '../popover/popover_panel/_popover_panel.styles';
12
12
  import { popoverArrowSize } from '../popover/popover_arrow/_popover_arrow.styles';
13
13
 
@@ -26,15 +26,20 @@ export var euiTourStyles = function euiTourStyles(_ref) {
26
26
  export var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
27
27
  var euiTheme = _ref2.euiTheme;
28
28
  var arrowSize = euiTheme.size[popoverArrowSize];
29
- var arrowSizeInt = parseInt(arrowSize, 10);
29
+ var arrowHalfSize = mathWithUnits(arrowSize, function (x) {
30
+ return x / 2;
31
+ });
32
+ var arrowOffset = mathWithUnits(arrowSize, function (x) {
33
+ return x * -2;
34
+ });
30
35
  return {
31
36
  // Base
32
37
  euiTourBeacon: /*#__PURE__*/css("pointer-events:none;position:absolute;opacity:0;transition:opacity 0s ", euiTheme.animation[openAnimationTiming], ";;label:euiTourBeacon;"),
33
38
  // Positions
34
- right: /*#__PURE__*/css(logicalCSS('top', "".concat(arrowSizeInt / 2, "px")), ";", logicalCSS('left', "".concat(arrowSizeInt * -2, "px")), ";;label:right;"),
35
- left: /*#__PURE__*/css(logicalCSS('top', "".concat(arrowSizeInt / 2, "px")), ";", logicalCSS('left', arrowSize), ";;label:left;"),
36
- top: /*#__PURE__*/css(logicalCSS('top', arrowSize), ";", logicalCSS('left', "".concat(arrowSizeInt / 2, "px")), ";;label:top;"),
37
- bottom: /*#__PURE__*/css(logicalCSS('top', "".concat(arrowSizeInt * -2, "px")), ";", logicalCSS('left', "".concat(arrowSizeInt / 2, "px")), ";;label:bottom;")
39
+ right: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowOffset), ";;label:right;"),
40
+ left: /*#__PURE__*/css(logicalCSS('top', arrowHalfSize), ";", logicalCSS('left', arrowSize), ";;label:left;"),
41
+ top: /*#__PURE__*/css(logicalCSS('top', arrowSize), ";", logicalCSS('left', arrowHalfSize), ";;label:top;"),
42
+ bottom: /*#__PURE__*/css(logicalCSS('top', arrowOffset), ";", logicalCSS('left', arrowHalfSize), ";;label:bottom;")
38
43
  };
39
44
  };
40
45
  export var euiTourHeaderStyles = function euiTourHeaderStyles(_ref3) {
@@ -6,5 +6,6 @@
6
6
  * Side Public License, v 1.
7
7
  */
8
8
  export * from './logicals';
9
+ export * from './math';
9
10
  export * from './size';
10
11
  export * from './typography';
@@ -0,0 +1,46 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2
+
3
+ function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); _groups.set(_this, groups || _groups.get(re)); return _setPrototypeOf(_this, BabelRegExp.prototype); } _inherits(BabelRegExp, RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; if (_typeof(args[args.length - 1]) !== "object") { args = [].slice.call(args); args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }
4
+
5
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
6
+
7
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
8
+
9
+ /*
10
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
+ * or more contributor license agreements. Licensed under the Elastic License
12
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
14
+ * Side Public License, v 1.
15
+ */
16
+
17
+ /**
18
+ * Utility for performing math callbacks on a string with CSS units
19
+ * and returning a string with its unit preserved.
20
+ *
21
+ * Example usage:
22
+ * mathWithUnits('4px', (x) => x / 2) = '2px';
23
+ * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
24
+ */
25
+ export var mathWithUnits = function mathWithUnits(value, callback) {
26
+ var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
27
+
28
+ if (typeof value === 'string') {
29
+ var _matches$groups;
30
+
31
+ var regex = /*#__PURE__*/_wrapRegExp(/(\x2D?[\.0-9]+)(%|[A-Za-z]*)/, {
32
+ value: 1,
33
+ unit: 2
34
+ });
35
+
36
+ var matches = regex.exec(value);
37
+ if (!(matches !== null && matches !== void 0 && (_matches$groups = matches.groups) !== null && _matches$groups !== void 0 && _matches$groups.value)) return value;
38
+ var numericValue = Number(matches.groups.value);
39
+ var passedUnit = matches.groups.unit || unit;
40
+ return "".concat(callback(numericValue)).concat(passedUnit);
41
+ } else if (typeof value === 'number') {
42
+ return "".concat(callback(value)).concat(unit);
43
+ } else {
44
+ return value;
45
+ }
46
+ };
@@ -100,12 +100,15 @@ export var useEuiYScroll = function useEuiYScroll() {
100
100
  };
101
101
  export var euiYScrollWithShadows = function euiYScrollWithShadows(euiTheme) {
102
102
  var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
103
- height = _ref7.height;
103
+ height = _ref7.height,
104
+ _ref7$side = _ref7.side,
105
+ side = _ref7$side === void 0 ? 'both' : _ref7$side;
104
106
 
105
107
  return "\n ".concat(euiYScroll(euiTheme, {
106
108
  height: height
107
109
  }), "\n ").concat(euiOverflowShadowStyles(euiTheme, {
108
- direction: 'y'
110
+ direction: 'y',
111
+ side: side
109
112
  }), "\n");
110
113
  };
111
114
  export var useEuiYScrollWithShadows = function useEuiYScrollWithShadows() {
package/eui.d.ts CHANGED
@@ -6420,6 +6420,18 @@ declare module '@elastic/eui/src/global_styling/functions/logicals' {
6420
6420
  textAlign: string;
6421
6421
  };
6422
6422
 
6423
+ }
6424
+ declare module '@elastic/eui/src/global_styling/functions/math' {
6425
+ /**
6426
+ * Utility for performing math callbacks on a string with CSS units
6427
+ * and returning a string with its unit preserved.
6428
+ *
6429
+ * Example usage:
6430
+ * mathWithUnits('4px', (x) => x / 2) = '2px';
6431
+ * mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
6432
+ */
6433
+ export const mathWithUnits: (value: string | number | undefined, callback: (x: number) => number, unit?: string) => string | undefined;
6434
+
6423
6435
  }
6424
6436
  declare module '@elastic/eui/src/global_styling/functions/size' {
6425
6437
  /**
@@ -6513,6 +6525,7 @@ declare module '@elastic/eui/src/global_styling/functions/typography' {
6513
6525
  }
6514
6526
  declare module '@elastic/eui/src/global_styling/functions' {
6515
6527
  export * from '@elastic/eui/src/global_styling/functions/logicals';
6528
+ export * from '@elastic/eui/src/global_styling/functions/math';
6516
6529
  export * from '@elastic/eui/src/global_styling/functions/size';
6517
6530
  export * from '@elastic/eui/src/global_styling/functions/typography';
6518
6531
 
@@ -7173,7 +7186,10 @@ declare module '@elastic/eui/src/global_styling/mixins/_helpers' {
7173
7186
  }
7174
7187
  export const euiYScroll: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
7175
7188
  export const useEuiYScroll: ({ height }?: _EuiYScroll) => string;
7176
- export const euiYScrollWithShadows: (euiTheme: UseEuiTheme, { height }?: _EuiYScroll) => string;
7189
+ interface _EuiYScrollWithShadows extends _EuiYScroll {
7190
+ side?: 'both' | 'start' | 'end';
7191
+ }
7192
+ export const euiYScrollWithShadows: (euiTheme: UseEuiTheme, { height, side }?: _EuiYScrollWithShadows) => string;
7177
7193
  export const useEuiYScrollWithShadows: ({ height }?: _EuiYScroll) => string;
7178
7194
  export const euiXScroll: (euiTheme: UseEuiTheme) => string;
7179
7195
  export const useEuiXScroll: () => string;
@@ -8714,6 +8730,40 @@ declare module '@elastic/eui/src/components/collapsible_nav/collapsible_nav_grou
8714
8730
  export type { EuiCollapsibleNavGroupProps } from '@elastic/eui/src/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group';
8715
8731
  export { EuiCollapsibleNavGroup } from '@elastic/eui/src/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group';
8716
8732
 
8733
+ }
8734
+ declare module '@elastic/eui/src/components/flyout/flyout.styles' {
8735
+ import { UseEuiTheme } from '@elastic/eui/src/services';
8736
+ export const euiFlyoutCloseButtonStyles: (euiThemeContext: UseEuiTheme) => {
8737
+ euiFlyout__closeButton: import("@emotion/utils").SerializedStyles;
8738
+ inside: import("@emotion/utils").SerializedStyles;
8739
+ outside: import("@emotion/utils").SerializedStyles;
8740
+ outsideSide: {
8741
+ right: import("@emotion/utils").SerializedStyles;
8742
+ left: import("@emotion/utils").SerializedStyles;
8743
+ };
8744
+ };
8745
+ export const euiFlyoutStyles: (euiThemeContext: UseEuiTheme) => {
8746
+ euiFlyout: import("@emotion/utils").SerializedStyles;
8747
+ s: import("@emotion/utils").SerializedStyles;
8748
+ m: import("@emotion/utils").SerializedStyles;
8749
+ l: import("@emotion/utils").SerializedStyles;
8750
+ noMaxWidth: import("@emotion/utils").SerializedStyles;
8751
+ right: import("@emotion/utils").SerializedStyles;
8752
+ left: import("@emotion/utils").SerializedStyles;
8753
+ overlay: import("@emotion/utils").SerializedStyles;
8754
+ push: import("@emotion/utils").SerializedStyles;
8755
+ pushSide: {
8756
+ right: import("@emotion/utils").SerializedStyles;
8757
+ left: import("@emotion/utils").SerializedStyles;
8758
+ };
8759
+ paddingSizes: {
8760
+ none: import("@emotion/utils").SerializedStyles;
8761
+ s: import("@emotion/utils").SerializedStyles;
8762
+ m: import("@emotion/utils").SerializedStyles;
8763
+ l: import("@emotion/utils").SerializedStyles;
8764
+ };
8765
+ };
8766
+
8717
8767
  }
8718
8768
  declare module '@elastic/eui/src/components/flyout/flyout' {
8719
8769
  import React, { ComponentPropsWithRef, CSSProperties, ElementType } from 'react';
@@ -8722,16 +8772,18 @@ declare module '@elastic/eui/src/components/flyout/flyout' {
8722
8772
  import { EuiFocusTrapProps } from '@elastic/eui/src/components/focus_trap';
8723
8773
  import { EuiOverlayMaskProps } from '@elastic/eui/src/components/overlay_mask';
8724
8774
  import { EuiButtonIconPropsForButton } from '@elastic/eui/src/components/button';
8725
- export const TYPES: ("push" | "overlay")[]; type _EuiFlyoutType = typeof TYPES[number];
8726
- export const SIDES: ("left" | "right")[]; type _EuiFlyoutSide = typeof SIDES[number];
8727
- export const SIZES: ("s" | "m" | "l")[];
8775
+ export const TYPES: readonly ["push", "overlay"]; type _EuiFlyoutType = typeof TYPES[number];
8776
+ export const SIDES: readonly ["left", "right"]; type _EuiFlyoutSide = typeof SIDES[number];
8777
+ export const SIZES: readonly ["s", "m", "l"];
8728
8778
  export type EuiFlyoutSize = typeof SIZES[number];
8729
- export const PADDING_SIZES: ("s" | "m" | "l" | "none")[]; type _EuiFlyoutPaddingSize = typeof PADDING_SIZES[number];
8779
+ export const PADDING_SIZES: readonly ["none", "s", "m", "l"];
8780
+ export type _EuiFlyoutPaddingSize = typeof PADDING_SIZES[number];
8730
8781
  interface _EuiFlyoutProps {
8731
8782
  onClose: (event: MouseEvent | TouchEvent | KeyboardEvent) => void;
8732
8783
  /**
8733
8784
  * Defines the width of the panel.
8734
8785
  * Pass a predefined size of `s | m | l`, or pass any number/string compatible with the CSS `width` attribute
8786
+ * @default m
8735
8787
  */
8736
8788
  size?: EuiFlyoutSize | CSSProperties['width'];
8737
8789
  /**
@@ -8740,23 +8792,27 @@ declare module '@elastic/eui/src/components/flyout/flyout' {
8740
8792
  * set to `false` to not restrict the width,
8741
8793
  * set to a number for a custom width in px,
8742
8794
  * set to a string for a custom width in custom measurement.
8795
+ * @default false
8743
8796
  */
8744
8797
  maxWidth?: boolean | number | string;
8745
8798
  /**
8746
8799
  * Customize the padding around the content of the flyout header, body and footer
8800
+ * @default l
8747
8801
  */
8748
8802
  paddingSize?: _EuiFlyoutPaddingSize;
8749
8803
  /**
8750
8804
  * Adds an EuiOverlayMask and wraps in an EuiPortal
8805
+ * @default true
8751
8806
  */
8752
8807
  ownFocus?: boolean;
8753
8808
  /**
8754
8809
  * Hides the default close button. You must provide another close button somewhere within the flyout.
8810
+ * @default false
8755
8811
  */
8756
8812
  hideCloseButton?: boolean;
8757
8813
  /**
8758
- * Specify an aria-label for the close button of the flyout.
8759
- * Default is `'Close this dialog'`.
8814
+ * Specify a custom aria-label for the close button of the flyout.
8815
+ * @default "Close this dialog"
8760
8816
  */
8761
8817
  closeButtonAriaLabel?: string;
8762
8818
  /**
@@ -8767,6 +8823,7 @@ declare module '@elastic/eui/src/components/flyout/flyout' {
8767
8823
  * Position of close button.
8768
8824
  * `inside`: Floating to just inside the flyout, always top right;
8769
8825
  * `outside`: Floating just outside the flyout near the top (side dependent on `side`). Helpful when the close button may cover other interactable content.
8826
+ * @default inside
8770
8827
  */
8771
8828
  closeButtonPosition?: 'inside' | 'outside';
8772
8829
  /**
@@ -8776,6 +8833,7 @@ declare module '@elastic/eui/src/components/flyout/flyout' {
8776
8833
  /**
8777
8834
  * How to display the the flyout in relation to the body content;
8778
8835
  * `push` keeps it visible, pushing the `<body>` content via padding
8836
+ * @default overlay
8779
8837
  */
8780
8838
  type?: _EuiFlyoutType;
8781
8839
  /**
@@ -8786,15 +8844,18 @@ declare module '@elastic/eui/src/components/flyout/flyout' {
8786
8844
  /**
8787
8845
  * Which side of the window to attach to.
8788
8846
  * The `left` option should only be used for navigation.
8847
+ * @default right
8789
8848
  */
8790
8849
  side?: _EuiFlyoutSide;
8791
8850
  /**
8792
8851
  * Defaults to `dialog` which is best for most cases of the flyout.
8793
8852
  * Otherwise pass in your own, aria-role, or `null` to remove it and use the semantic `as` element instead
8853
+ * @default dialog
8794
8854
  */
8795
8855
  role?: null | string;
8796
8856
  /**
8797
8857
  * Named breakpoint (`xs` through `xl`) for customizing the minimum window width to enable the `push` type
8858
+ * @default l
8798
8859
  */
8799
8860
  pushMinBreakpoint?: EuiBreakpointSize;
8800
8861
  style?: CSSProperties;
@@ -8814,6 +8875,18 @@ declare module '@elastic/eui/src/components/flyout/flyout' {
8814
8875
  export const EuiFlyout: <T extends React.ElementType<any> = "div">(props: EuiFlyoutProps<T>) => JSX.Element;
8815
8876
  export {};
8816
8877
 
8878
+ }
8879
+ declare module '@elastic/eui/src/components/flyout/flyout_body.styles' {
8880
+ import { UseEuiTheme } from '@elastic/eui/src/services';
8881
+ export const euiFlyoutBodyStyles: (euiThemeContext: UseEuiTheme) => {
8882
+ euiFlyoutBody: import("@emotion/utils").SerializedStyles;
8883
+ euiFlyoutBody__overflow: {
8884
+ noBanner: import("@emotion/utils").SerializedStyles;
8885
+ hasBanner: import("@emotion/utils").SerializedStyles;
8886
+ };
8887
+ euiFlyoutBody__banner: import("@emotion/utils").SerializedStyles;
8888
+ };
8889
+
8817
8890
  }
8818
8891
  declare module '@elastic/eui/src/components/flyout/flyout_body' {
8819
8892
  import { FunctionComponent, HTMLAttributes, ReactNode } from 'react';
@@ -8826,6 +8899,13 @@ declare module '@elastic/eui/src/components/flyout/flyout_body' {
8826
8899
  }>;
8827
8900
  export const EuiFlyoutBody: EuiFlyoutBodyProps;
8828
8901
 
8902
+ }
8903
+ declare module '@elastic/eui/src/components/flyout/flyout_footer.styles' {
8904
+ import { UseEuiTheme } from '@elastic/eui/src/services';
8905
+ export const euiFlyoutFooterStyles: (euiThemeContext: UseEuiTheme) => {
8906
+ euiFlyoutFooter: import("@emotion/utils").SerializedStyles;
8907
+ };
8908
+
8829
8909
  }
8830
8910
  declare module '@elastic/eui/src/components/flyout/flyout_footer' {
8831
8911
  import { FunctionComponent, HTMLAttributes } from 'react';
@@ -8833,6 +8913,14 @@ declare module '@elastic/eui/src/components/flyout/flyout_footer' {
8833
8913
  export type EuiFlyoutFooterProps = FunctionComponent<HTMLAttributes<HTMLDivElement> & CommonProps>;
8834
8914
  export const EuiFlyoutFooter: EuiFlyoutFooterProps;
8835
8915
 
8916
+ }
8917
+ declare module '@elastic/eui/src/components/flyout/flyout_header.styles' {
8918
+ import { UseEuiTheme } from '@elastic/eui/src/services';
8919
+ export const euiFlyoutHeaderStyles: (euiThemeContext: UseEuiTheme) => {
8920
+ euiFlyoutHeader: import("@emotion/utils").SerializedStyles;
8921
+ hasBorder: import("@emotion/utils").SerializedStyles;
8922
+ };
8923
+
8836
8924
  }
8837
8925
  declare module '@elastic/eui/src/components/flyout/flyout_header' {
8838
8926
  import { FunctionComponent, HTMLAttributes } from 'react';
package/i18ntokens.json CHANGED
@@ -3621,11 +3621,11 @@
3621
3621
  "highlighting": "string",
3622
3622
  "loc": {
3623
3623
  "start": {
3624
- "line": 305,
3624
+ "line": 299,
3625
3625
  "column": 8
3626
3626
  },
3627
3627
  "end": {
3628
- "line": 305,
3628
+ "line": 299,
3629
3629
  "column": 78
3630
3630
  }
3631
3631
  },
@@ -229,10 +229,10 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
229
229
 
230
230
  if (_arrowDisplay !== 'none') {
231
231
  iconButton = (0, _react2.jsx)(_button.EuiButtonIcon, _extends({
232
- color: "text"
232
+ color: "text",
233
+ css: cssIconButtonStyles
233
234
  }, arrowProps, {
234
235
  className: iconButtonClasses,
235
- css: cssIconButtonStyles,
236
236
  iconType: "arrowRight",
237
237
  onClick: this.onToggle,
238
238
  "aria-controls": id,
@@ -268,10 +268,11 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
268
268
  childrenContent = children;
269
269
  }
270
270
 
271
- var button = (0, _react2.jsx)(ButtonElement, _extends({}, buttonProps, {
271
+ var button = (0, _react2.jsx)(ButtonElement, _extends({
272
+ css: cssButtonStyles
273
+ }, buttonProps, {
272
274
  id: buttonId,
273
275
  className: buttonClasses,
274
- css: cssButtonStyles,
275
276
  "aria-controls": id,
276
277
  "aria-expanded": isOpen,
277
278
  onClick: isDisabled ? undefined : this.onToggle,
@@ -50,7 +50,7 @@ exports.euiAccordionChildrenStyles = euiAccordionChildrenStyles;
50
50
  var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref6) {
51
51
  var euiTheme = _ref6.euiTheme;
52
52
  return {
53
- euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 0), " opacity:0;overflow:hidden;transition:", _global_styling.logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;will-change:opacity,visibility,", _global_styling.logicals.height, ";&:focus{outline:none;};label:euiAccordion__childWrapper;"),
53
+ euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 0), " opacity:0;overflow:hidden;transition:", _global_styling.logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;&:focus{outline:none;};label:euiAccordion__childWrapper;"),
54
54
  isOpen: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 'auto'), " opacity:1;visibility:visible;;label:isOpen;")
55
55
  };
56
56
  };
@@ -39,6 +39,10 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
39
39
 
40
40
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
41
41
 
42
+ 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; }
43
+
44
+ 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) { _defineProperty(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; }
45
+
42
46
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
43
47
 
44
48
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
@@ -79,7 +83,9 @@ var EuiAvatar = function EuiAvatar(_ref) {
79
83
  var classes = (0, _classnames.default)('euiAvatar', (_classNames = {}, _defineProperty(_classNames, "euiAvatar--".concat(size), size), _defineProperty(_classNames, "euiAvatar--".concat(type), type), _defineProperty(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
80
84
  var cssStyles = [styles.euiAvatar, styles[size], styles[type], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
81
85
  checkValidInitials(initials);
82
- var avatarStyle = style || {};
86
+
87
+ var avatarStyle = _objectSpread({}, style);
88
+
83
89
  var iconCustomColor = iconColor;
84
90
  var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
85
91