@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
@@ -28,14 +28,18 @@ var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
28
28
  var euiTheme = euiThemeContext.euiTheme,
29
29
  colorMode = euiThemeContext.colorMode;
30
30
  return {
31
- euiBadge: /*#__PURE__*/(0, _react.css)("display:inline-block;vertical-align:middle;padding:0 ", euiTheme.size.s, ";", (0, _global_styling.logicalCSS)('max-width', '100%'), " font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs').fontSize, ";line-height:", euiTheme.base + 2, "px;font-weight:", euiTheme.font.weight.medium, ";white-space:nowrap;text-decoration:none;cursor:default;background-color:transparent;border:", euiTheme.border.width.thin, " solid transparent;border-radius:", parseFloat(String(euiTheme.border.radius.medium)) / 2, "px;", (0, _global_styling.logicalTextAlignCSS)('left'), " &:focus-within{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&+.euiBadge{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";};label:euiBadge;"),
31
+ euiBadge: /*#__PURE__*/(0, _react.css)("display:inline-block;vertical-align:middle;padding:0 ", euiTheme.size.s, ";", (0, _global_styling.logicalCSS)('max-width', '100%'), " font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs').fontSize, ";line-height:", euiTheme.base + 2, "px;font-weight:", euiTheme.font.weight.medium, ";white-space:nowrap;text-decoration:none;cursor:default;background-color:transparent;border:", euiTheme.border.width.thin, " solid transparent;border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.medium, function (x) {
32
+ return x / 2;
33
+ }), ";", (0, _global_styling.logicalTextAlignCSS)('left'), " &:focus-within{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&+.euiBadge{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";};label:euiBadge;"),
32
34
  clickable: /*#__PURE__*/(0, _react.css)("&:not(:disabled){&:hover,&:focus{text-decoration:underline;}}&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&:disabled{cursor:not-allowed;};label:clickable;"),
33
35
  disabled: /*#__PURE__*/(0, _react.css)("color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled').color, "!important;background-color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled').backgroundColor, "!important;;label:disabled;"),
34
36
  // Hollow has a border and is mostly used for autocompleters.
35
37
  hollow: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.emptyShade, ";border-color:", colorMode === 'DARK' ? (0, _services.tint)(euiTheme.border.color, 0.15) : euiTheme.border.color, ";color:", euiTheme.colors.text, ";;label:hollow;"),
36
38
  // Content wrapper
37
39
  euiBadge__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)( // Ensure proper height in case of just displaying an icon
38
- 'min-height', "".concat(euiTheme.base + parseFloat(String(euiTheme.border.width.thin)) * 2, "px")), " display:flex;align-items:center;overflow:hidden;;label:euiBadge__content;"),
40
+ 'min-height', "".concat((0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
41
+ return euiTheme.base + x * 2;
42
+ }))), " display:flex;align-items:center;overflow:hidden;;label:euiBadge__content;"),
39
43
  // Text
40
44
  text: {
41
45
  euiBadge__text: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)(), " cursor:inherit;;label:euiBadge__text;"),
@@ -49,7 +53,9 @@ var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
49
53
  },
50
54
  // Clickable icons (iconOnClick)
51
55
  iconButton: {
52
- euiBadge__iconButton: /*#__PURE__*/(0, _react.css)("font-size:0;&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.ghost, 0.8), ";color:", euiTheme.colors.ink, ";border-radius:", parseFloat(String(euiTheme.border.radius.small)) / 2, "px;}&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;"),
56
+ euiBadge__iconButton: /*#__PURE__*/(0, _react.css)("font-size:0;&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.ghost, 0.8), ";color:", euiTheme.colors.ink, ";border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
57
+ return x / 2;
58
+ }), ";}&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;"),
53
59
  right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";;label:right;"),
54
60
  left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), ";;label:left;")
55
61
  },
@@ -52,7 +52,9 @@ var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeCon
52
52
  var euiTheme = euiThemeContext.euiTheme;
53
53
  return {
54
54
  euiBreadcrumb__content: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.medium, ";text-align:center;vertical-align:baseline;;label:euiBreadcrumb__content;"),
55
- isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)("".concat(parseFloat(euiTheme.size.base) * 10, "px")), ";;label:isTruncated;"),
55
+ isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)((0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
56
+ return x * 10;
57
+ })), ";;label:isTruncated;"),
56
58
  isTruncatedLast: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)('none'), ";;label:isTruncatedLast;"),
57
59
  // Types
58
60
  page: /*#__PURE__*/(0, _react.css)("&:is(a):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:is(button):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'center'), ";};label:page;"),
@@ -82,9 +82,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
82
82
  }
83
83
 
84
84
  var isText = typeof children === 'string';
85
- return (0, _react2.jsx)("span", _extends({}, contentProps, {
85
+ return (0, _react2.jsx)("span", _extends({
86
86
  css: cssStyles
87
- }), icon, isText ? (0, _react2.jsx)("span", _extends({}, textProps, {
87
+ }, contentProps), icon, isText ? (0, _react2.jsx)("span", _extends({}, textProps, {
88
88
  className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
89
89
  }), children) : children);
90
90
  };
@@ -88,11 +88,15 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
88
88
 
89
89
 
90
90
  var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
91
- var buttonColorStyles = (0, _button.useEuiButtonColorCSS)({
92
- display: display
93
- })[color]; // Temporary extra style for empty `:hover` state until we decide how to handle universally
94
-
95
- var hoverStyles = display === 'empty' ? /*#__PURE__*/(0, _react2.css)("&:hover{background-color:", (0, _button.euiButtonEmptyColor)(euiThemeContext, color).backgroundColor, ";};label:hoverStyles;") : /*#__PURE__*/(0, _react2.css)(";label:hoverStyles;");
91
+ var styles = {
92
+ euiButtonIcon: /*#__PURE__*/(0, _react2.css)(";label:euiButtonIcon;"),
93
+ colors: (0, _button.useEuiButtonColorCSS)({
94
+ display: display
95
+ }),
96
+ // Temporary extra style for empty `:hover` state until we decide how to handle universally
97
+ hoverStyles: /*#__PURE__*/(0, _react2.css)("&:hover{background-color:", (0, _button.euiButtonEmptyColor)(euiThemeContext, color).backgroundColor, ";};label:hoverStyles;")
98
+ };
99
+ var cssStyles = [styles.euiButtonIcon, styles.colors[color], display === 'empty' && styles.hoverStyles];
96
100
  var classes = (0, _classnames.default)('euiButtonIcon', size && sizeToClassNameMap[size], className);
97
101
 
98
102
  if (_color === 'ghost') {
@@ -138,7 +142,7 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
138
142
  rel: rel
139
143
  });
140
144
  return (0, _react2.jsx)("a", _extends({
141
- css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
145
+ css: cssStyles,
142
146
  tabIndex: isAriaHidden ? -1 : undefined,
143
147
  className: classes,
144
148
  href: href,
@@ -150,7 +154,7 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
150
154
 
151
155
  var buttonType;
152
156
  return (0, _react2.jsx)("button", _extends({
153
- css: [buttonColorStyles, hoverStyles, ";label:EuiButtonIcon;"],
157
+ css: cssStyles,
154
158
  tabIndex: isAriaHidden ? -1 : undefined,
155
159
  disabled: isDisabled,
156
160
  className: classes,
@@ -151,6 +151,7 @@ EuiCollapsibleNav.propTypes = {
151
151
  /**
152
152
  * Defines the width of the panel.
153
153
  * Pass a predefined size of `s | m | l`, or pass any number/string compatible with the CSS `width` attribute
154
+ * @default m
154
155
  */
155
156
  size: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]),
156
157
 
@@ -160,21 +161,25 @@ EuiCollapsibleNav.propTypes = {
160
161
  * set to `false` to not restrict the width,
161
162
  * set to a number for a custom width in px,
162
163
  * set to a string for a custom width in custom measurement.
164
+ * @default false
163
165
  */
164
166
  maxWidth: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.number.isRequired, _propTypes.default.string.isRequired]),
165
167
 
166
168
  /**
167
169
  * Customize the padding around the content of the flyout header, body and footer
170
+ * @default l
168
171
  */
169
172
  paddingSize: _propTypes.default.any,
170
173
 
171
174
  /**
172
175
  * Adds an EuiOverlayMask and wraps in an EuiPortal
176
+ * @default true
173
177
  */
174
178
  ownFocus: _propTypes.default.bool,
175
179
 
176
180
  /**
177
181
  * Hides the default close button. You must provide another close button somewhere within the flyout.
182
+ * @default false
178
183
  */
179
184
  hideCloseButton: _propTypes.default.bool,
180
185
 
@@ -187,6 +192,7 @@ EuiCollapsibleNav.propTypes = {
187
192
  * Position of close button.
188
193
  * `inside`: Floating to just inside the flyout, always top right;
189
194
  * `outside`: Floating just outside the flyout near the top (side dependent on `side`). Helpful when the close button may cover other interactable content.
195
+ * @default inside
190
196
  */
191
197
  closeButtonPosition: _propTypes.default.oneOf(["inside", "outside"]),
192
198
 
@@ -224,12 +230,14 @@ EuiCollapsibleNav.propTypes = {
224
230
  /**
225
231
  * Which side of the window to attach to.
226
232
  * The `left` option should only be used for navigation.
233
+ * @default right
227
234
  */
228
235
  side: _propTypes.default.any,
229
236
 
230
237
  /**
231
238
  * Defaults to `dialog` which is best for most cases of the flyout.
232
239
  * Otherwise pass in your own, aria-role, or `null` to remove it and use the semantic `as` element instead
240
+ * @default dialog
233
241
  */
234
242
  role: _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.string.isRequired]),
235
243
 
@@ -22,7 +22,9 @@ var _colorCSS = function _colorCSS(color) {
22
22
  var euiExpressionStyles = function euiExpressionStyles(euiThemeContext) {
23
23
  var euiTheme = euiThemeContext.euiTheme;
24
24
  return {
25
- euiExpression: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", (0, _global_styling.logicalCSS)('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";", (0, _global_styling.logicalTextAlignCSS)('left'), " padding:", parseFloat(euiTheme.size.s) / 2, "px 0;color:", euiTheme.colors.text, ";&:focus{", (0, _global_styling.logicalCSS)('border-bottom-style', 'solid'), ";}&+.euiExpression{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.s), ";};label:euiExpression;"),
25
+ euiExpression: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", (0, _global_styling.logicalCSS)('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";", (0, _global_styling.logicalTextAlignCSS)('left'), " padding:", (0, _global_styling.mathWithUnits)(euiTheme.size.s, function (x) {
26
+ return x / 2;
27
+ }), " 0;color:", euiTheme.colors.text, ";&:focus{", (0, _global_styling.logicalCSS)('border-bottom-style', 'solid'), ";}&+.euiExpression{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.s), ";};label:euiExpression;"),
26
28
  // Variants
27
29
  columns: /*#__PURE__*/(0, _react.css)("border-color:transparent;", (0, _global_styling.logicalCSS)('border-bottom-style', 'solid'), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('width', '100%'), " display:flex;padding:", euiTheme.size.xs, ";border-radius:", euiTheme.size.xs, ";;label:columns;"),
28
30
  truncate: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), ";;label:truncate;"),
@@ -13,7 +13,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
14
  var _services = require("../../services");
15
15
 
16
- var _common = require("../common");
16
+ var _global_styling = require("../../global_styling");
17
17
 
18
18
  var _focus_trap = require("../focus_trap");
19
19
 
@@ -27,6 +27,8 @@ var _resize_observer = require("../observer/resize_observer");
27
27
 
28
28
  var _portal = require("../portal");
29
29
 
30
+ var _flyout = require("./flyout.styles");
31
+
30
32
  var _react2 = require("@emotion/react");
31
33
 
32
34
  var _excluded = ["className", "children", "as", "hideCloseButton", "closeButtonProps", "closeButtonAriaLabel", "closeButtonPosition", "onClose", "ownFocus", "side", "size", "paddingSize", "maxWidth", "style", "maskProps", "type", "outsideClickCloses", "role", "pushMinBreakpoint", "focusTrapProps"];
@@ -61,24 +63,11 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
61
63
 
62
64
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
63
65
 
64
- var typeToClassNameMap = {
65
- push: 'euiFlyout--push',
66
- overlay: null
67
- };
68
- var TYPES = (0, _common.keysOf)(typeToClassNameMap);
66
+ var TYPES = ['push', 'overlay'];
69
67
  exports.TYPES = TYPES;
70
- var sideToClassNameMap = {
71
- left: 'euiFlyout--left',
72
- right: null
73
- };
74
- var SIDES = (0, _common.keysOf)(sideToClassNameMap);
68
+ var SIDES = ['left', 'right'];
75
69
  exports.SIDES = SIDES;
76
- var sizeToClassNameMap = {
77
- s: 'euiFlyout--small',
78
- m: 'euiFlyout--medium',
79
- l: 'euiFlyout--large'
80
- };
81
- var SIZES = (0, _common.keysOf)(sizeToClassNameMap);
70
+ var SIZES = ['s', 'm', 'l'];
82
71
  exports.SIZES = SIZES;
83
72
 
84
73
  /**
@@ -89,13 +78,7 @@ function isEuiFlyoutSizeNamed(value) {
89
78
  return SIZES.includes(value);
90
79
  }
91
80
 
92
- var paddingSizeToClassNameMap = {
93
- none: 'euiFlyout--paddingNone',
94
- s: 'euiFlyout--paddingSmall',
95
- m: 'euiFlyout--paddingMedium',
96
- l: 'euiFlyout--paddingLarge'
97
- };
98
- var PADDING_SIZES = (0, _common.keysOf)(paddingSizeToClassNameMap);
81
+ var PADDING_SIZES = ['none', 's', 'm', 'l'];
99
82
  exports.PADDING_SIZES = PADDING_SIZES;
100
83
  var defaultElement = 'div';
101
84
  var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
@@ -187,41 +170,37 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
187
170
  onClose(event);
188
171
  }
189
172
  };
173
+ /**
174
+ * Set inline styles
175
+ */
190
176
 
191
- var newStyle;
192
- var widthClassName;
193
- var sizeClassName; // Setting max-width
194
177
 
195
- if (maxWidth === true) {
196
- widthClassName = 'euiFlyout--maxWidth-default';
197
- } else if (maxWidth !== false) {
198
- var value = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth;
199
- newStyle = _objectSpread(_objectSpread({}, style), {}, {
200
- maxWidth: value
201
- });
202
- } // Setting size
178
+ var newStyle = style;
203
179
 
180
+ if (typeof maxWidth !== 'boolean') {
181
+ newStyle = _objectSpread(_objectSpread({}, newStyle), (0, _global_styling.logicalStyle)('max-width', maxWidth));
182
+ }
204
183
 
205
- if (isEuiFlyoutSizeNamed(size)) {
206
- sizeClassName = sizeToClassNameMap[size];
207
- } else if (newStyle) {
208
- newStyle.width = size;
209
- } else {
210
- newStyle = _objectSpread(_objectSpread({}, style), {}, {
211
- width: size
212
- });
184
+ if (!isEuiFlyoutSizeNamed(size)) {
185
+ newStyle = _objectSpread(_objectSpread({}, newStyle), (0, _global_styling.logicalStyle)('width', size));
213
186
  }
214
187
 
215
- var classes = (0, _classnames.default)('euiFlyout', typeToClassNameMap[type], sideToClassNameMap[side], sizeClassName, paddingSizeToClassNameMap[paddingSize], widthClassName, className);
188
+ var euiTheme = (0, _services.useEuiTheme)();
189
+ var styles = (0, _flyout.euiFlyoutStyles)(euiTheme);
190
+ var cssStyles = [styles.euiFlyout, styles.paddingSizes[paddingSize], isEuiFlyoutSizeNamed(size) && styles[size], maxWidth === false && styles.noMaxWidth, styles[type], type === 'push' && styles.pushSide[side], styles[side]];
191
+ var classes = (0, _classnames.default)('euiFlyout', className);
216
192
  var closeButton;
217
193
 
218
194
  if (onClose && !hideCloseButton) {
219
- var closeButtonClasses = (0, _classnames.default)('euiFlyout__closeButton', "euiFlyout__closeButton--".concat(closeButtonPosition), closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.className);
195
+ var closeButtonClasses = (0, _classnames.default)('euiFlyout__closeButton', closeButtonProps === null || closeButtonProps === void 0 ? void 0 : closeButtonProps.className);
196
+ var closeButtonStyles = (0, _flyout.euiFlyoutCloseButtonStyles)(euiTheme);
197
+ var closeButtonCssStyles = [closeButtonStyles.euiFlyout__closeButton, closeButtonStyles[closeButtonPosition], closeButtonPosition === 'outside' && closeButtonStyles.outsideSide[side]];
220
198
  closeButton = (0, _react2.jsx)(_i18n.EuiI18n, {
221
199
  token: "euiFlyout.closeAriaLabel",
222
200
  default: "Close this dialog"
223
201
  }, function (closeAriaLabel) {
224
202
  return (0, _react2.jsx)(_button.EuiButtonIcon, _extends({
203
+ css: closeButtonCssStyles,
225
204
  display: closeButtonPosition === 'outside' ? 'fill' : 'empty',
226
205
  iconType: "cross",
227
206
  color: "text",
@@ -274,11 +253,13 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
274
253
  disabled: isPushed,
275
254
  clickOutsideDisables: !ownFocus,
276
255
  onClickOutside: onClickOutside
277
- }, focusTrapProps), (0, _react2.jsx)(Element, _extends({}, rest, {
256
+ }, focusTrapProps), (0, _react2.jsx)(Element, _extends({
257
+ css: cssStyles
258
+ }, rest, {
278
259
  role: role,
279
260
  className: classes,
280
261
  tabIndex: -1,
281
- style: newStyle || style,
262
+ style: newStyle,
282
263
  ref: setRef
283
264
  }), closeButton, children)); // If ownFocus is set, wrap with an overlay and allow the user to click it to close it.
284
265
 
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiFlyoutStyles = exports.euiFlyoutCloseButtonStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../global_styling");
11
+
12
+ var _mixins = require("../../themes/amsterdam/global_styling/mixins");
13
+
14
+ var _color = require("../../services/color");
15
+
16
+ var _form = require("../form/form.styles");
17
+
18
+ var _templateObject, _templateObject2;
19
+
20
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
21
+
22
+ var euiFlyoutSlideInRight = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
23
+ var euiFlyoutSlideInLeft = (0, _react.keyframes)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n}\n"])));
24
+
25
+ var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
26
+ var euiTheme = euiThemeContext.euiTheme;
27
+ return {
28
+ euiFlyout__closeButton: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('right', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('top', euiTheme.size.s), " z-index:3;;label:euiFlyout__closeButton;"),
29
+ inside: /*#__PURE__*/(0, _react.css)("background-color:", (0, _color.transparentize)(euiTheme.colors.emptyShade, 0.9), ";;label:inside;"),
30
+ outside: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), ";animation:none!important;;label:outside;"),
31
+ outsideSide: {
32
+ // `transforms` pull in close buttons a little
33
+ // `!important` is necessary here to override the hover/focus transitions of buttons
34
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(-100% - ", euiTheme.size.l, "))!important;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(-100% - ", euiTheme.size.xs, "))!important;};label:right;"),
35
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(100% + ", euiTheme.size.l, "))!important;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(100% + ", euiTheme.size.xs, "))!important;};label:left;")
36
+ }
37
+ };
38
+ };
39
+
40
+ exports.euiFlyoutCloseButtonStyles = euiFlyoutCloseButtonStyles;
41
+
42
+ var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
43
+ var euiTheme = euiThemeContext.euiTheme;
44
+ return {
45
+ euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('height', '100%'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _global_styling.logicalCSS)('max-width', '90vw !important'), ";};label:euiFlyout;"),
46
+ // Flyout sizes
47
+ s: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 's'), ";;label:s;"),
48
+ m: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 'm'), ";;label:m;"),
49
+ l: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 'l'), ";;label:l;"),
50
+ noMaxWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', 'none'), ";;label:noMaxWidth;"),
51
+ // Side
52
+ right: /*#__PURE__*/(0, _react.css)("clip-path:polygon(-50% 0, 100% 0, 100% 100%, -50% 100%);", (0, _global_styling.logicalCSS)('right', 0), " ", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInRight, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:right;"),
53
+ // Left-side flyouts should only be used for navigation
54
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, ";};label:left;"),
55
+ // Type
56
+ overlay: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), ";;label:overlay;"),
57
+ push: /*#__PURE__*/(0, _react.css)("clip-path:none;animation-duration:0s!important;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
58
+ pushSide: {
59
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-left', euiTheme.border.thick), ";;label:right;"),
60
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-right', euiTheme.border.thick), ";;label:left;")
61
+ },
62
+ // Padding
63
+ paddingSizes: {
64
+ none: /*#__PURE__*/(0, _react.css)(composeFlyoutPadding(euiThemeContext, 'none'), ";;label:none;"),
65
+ s: /*#__PURE__*/(0, _react.css)(composeFlyoutPadding(euiThemeContext, 's'), ";;label:s;"),
66
+ m: /*#__PURE__*/(0, _react.css)(composeFlyoutPadding(euiThemeContext, 'm'), ";;label:m;"),
67
+ l: /*#__PURE__*/(0, _react.css)(composeFlyoutPadding(euiThemeContext, 'l'), ";;label:l;")
68
+ }
69
+ };
70
+ };
71
+
72
+ exports.euiFlyoutStyles = euiFlyoutStyles;
73
+
74
+ var composeFlyoutSizing = function composeFlyoutSizing(euiThemeContext, size) {
75
+ var euiTheme = euiThemeContext.euiTheme; // 1. Calculating the minimum width based on the screen takeover breakpoint
76
+
77
+ var flyoutSizes = {
78
+ s: {
79
+ min: "".concat(Math.round(euiTheme.breakpoint.m * 0.5), "px"),
80
+ // 1.
81
+ width: '25vw',
82
+ max: "".concat(Math.round(euiTheme.breakpoint.s * 0.7), "px")
83
+ },
84
+ m: {
85
+ // Calculated for forms plus padding
86
+ min: "".concat((0, _global_styling.mathWithUnits)((0, _form.euiFormMaxWidth)(euiThemeContext), function (x) {
87
+ return x + 24;
88
+ })),
89
+ width: '50vw',
90
+ max: "".concat(euiTheme.breakpoint.m, "px")
91
+ },
92
+ l: {
93
+ min: "".concat(Math.round(euiTheme.breakpoint.m * 0.9), "px"),
94
+ // 1.
95
+ width: '75vw',
96
+ max: "".concat(euiTheme.breakpoint.l, "px")
97
+ }
98
+ };
99
+ return "\n ".concat((0, _global_styling.logicalCSS)('max-width', flyoutSizes[size].max), "\n\n ").concat((0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', flyoutSizes[size].min), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].width), "\n }\n ").concat((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', 0), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].min), "\n }\n ");
100
+ };
101
+
102
+ var composeFlyoutPadding = function composeFlyoutPadding(euiThemeContext, paddingSize) {
103
+ var euiTheme = euiThemeContext.euiTheme;
104
+ var paddingModifierMap = {
105
+ none: 0,
106
+ s: euiTheme.size.s,
107
+ m: euiTheme.size.base,
108
+ l: euiTheme.size.l
109
+ }; // Footer padding
110
+
111
+ var footerPaddingSizes = {
112
+ none: 0,
113
+ s: euiTheme.size.s,
114
+ m: "".concat((0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
115
+ return x * 0.75;
116
+ }), " ").concat(euiTheme.size.base, ";"),
117
+ l: "".concat((0, _global_styling.mathWithUnits)(euiTheme.size.l, function (x) {
118
+ return x / 1.5;
119
+ }), " ").concat(euiTheme.size.l, ";")
120
+ };
121
+ return "\n .euiFlyoutHeader {\n ".concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n ").concat((0, _global_styling.logicalCSS)('padding-top', paddingModifierMap[paddingSize]), "\n }\n\n [class*='euiFlyoutHeader-hasBorder'] {\n ").concat((0, _global_styling.logicalCSS)('padding-bottom', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutBody__overflowContent {\n padding: ").concat(paddingModifierMap[paddingSize], ";\n }\n\n .euiFlyoutBody__banner .euiCallOut {\n ").concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutFooter {\n padding: ").concat(footerPaddingSizes[paddingSize], ";\n }\n ");
122
+ };
@@ -11,6 +11,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
+ var _services = require("../../services");
15
+
16
+ var _flyout_body = require("./flyout_body.styles");
17
+
14
18
  var _react2 = require("@emotion/react");
15
19
 
16
20
  var _excluded = ["children", "className", "banner"];
@@ -30,16 +34,22 @@ var EuiFlyoutBody = function EuiFlyoutBody(_ref) {
30
34
  rest = _objectWithoutProperties(_ref, _excluded);
31
35
 
32
36
  var classes = (0, _classnames.default)('euiFlyoutBody', className);
33
- var overflowClasses = (0, _classnames.default)('euiFlyoutBody__overflow', {
34
- 'euiFlyoutBody__overflow--hasBanner': banner
35
- });
37
+ var euiTheme = (0, _services.useEuiTheme)();
38
+ var styles = (0, _flyout_body.euiFlyoutBodyStyles)(euiTheme);
39
+ var cssStyles = [styles.euiFlyoutBody];
40
+ var bannerCssStyles = [banner && styles.euiFlyoutBody__banner];
41
+ var overflowCssStyles = [banner ? styles.euiFlyoutBody__overflow.hasBanner : styles.euiFlyoutBody__overflow.noBanner];
36
42
  return (0, _react2.jsx)("div", _extends({
37
43
  className: classes
38
- }, rest), (0, _react2.jsx)("div", {
44
+ }, rest, {
45
+ css: cssStyles
46
+ }), (0, _react2.jsx)("div", {
39
47
  tabIndex: 0,
40
- className: overflowClasses
48
+ className: "euiFlyoutBody__overflow",
49
+ css: overflowCssStyles
41
50
  }, banner && (0, _react2.jsx)("div", {
42
- className: "euiFlyoutBody__banner"
51
+ className: "euiFlyoutBody__banner",
52
+ css: bannerCssStyles
43
53
  }, banner), (0, _react2.jsx)("div", {
44
54
  className: "euiFlyoutBody__overflowContent"
45
55
  }, children)));
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiFlyoutBodyStyles = 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 euiFlyoutBodyStyles = function euiFlyoutBodyStyles(euiThemeContext) {
20
+ return {
21
+ euiFlyoutBody: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSSWithFallback)('overflow-y', 'hidden'), " ", (0, _global_styling.logicalCSS)('height', '100%'), ";;label:euiFlyoutBody;"),
22
+ euiFlyoutBody__overflow: {
23
+ noBanner: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScrollWithShadows)(euiThemeContext), ";;label:noBanner;"),
24
+ hasBanner: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiYScrollWithShadows)(euiThemeContext, {
25
+ side: 'end'
26
+ }), ";;label:hasBanner;")
27
+ },
28
+ euiFlyoutBody__banner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSSWithFallback)('overflow-x', 'hidden'), ";;label:euiFlyoutBody__banner;")
29
+ };
30
+ };
31
+
32
+ exports.euiFlyoutBodyStyles = euiFlyoutBodyStyles;
@@ -11,6 +11,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
+ var _services = require("../../services");
15
+
16
+ var _flyout_footer = require("./flyout_footer.styles");
17
+
14
18
  var _react2 = require("@emotion/react");
15
19
 
16
20
  var _excluded = ["children", "className"];
@@ -29,9 +33,14 @@ var EuiFlyoutFooter = function EuiFlyoutFooter(_ref) {
29
33
  rest = _objectWithoutProperties(_ref, _excluded);
30
34
 
31
35
  var classes = (0, _classnames.default)('euiFlyoutFooter', className);
36
+ var euiTheme = (0, _services.useEuiTheme)();
37
+ var styles = (0, _flyout_footer.euiFlyoutFooterStyles)(euiTheme);
38
+ var cssStyles = [styles.euiFlyoutFooter];
32
39
  return (0, _react2.jsx)("div", _extends({
33
40
  className: classes
34
- }, rest), children);
41
+ }, rest, {
42
+ css: cssStyles
43
+ }), children);
35
44
  };
36
45
 
37
46
  exports.EuiFlyoutFooter = EuiFlyoutFooter;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiFlyoutFooterStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ /*
11
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
+ * or more contributor license agreements. Licensed under the Elastic License
13
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
14
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
15
+ * Side Public License, v 1.
16
+ */
17
+ var euiFlyoutFooterStyles = function euiFlyoutFooterStyles(euiThemeContext) {
18
+ var euiTheme = euiThemeContext.euiTheme;
19
+ return {
20
+ euiFlyoutFooter: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.lightestShade, ";flex-grow:0;;label:euiFlyoutFooter;")
21
+ };
22
+ };
23
+
24
+ exports.euiFlyoutFooterStyles = euiFlyoutFooterStyles;
@@ -11,6 +11,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
11
11
 
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
 
14
+ var _services = require("../../services");
15
+
16
+ var _flyout_header = require("./flyout_header.styles");
17
+
14
18
  var _react2 = require("@emotion/react");
15
19
 
16
20
  var _excluded = ["children", "className", "hasBorder"];
@@ -30,12 +34,15 @@ var EuiFlyoutHeader = function EuiFlyoutHeader(_ref) {
30
34
  hasBorder = _ref$hasBorder === void 0 ? false : _ref$hasBorder,
31
35
  rest = _objectWithoutProperties(_ref, _excluded);
32
36
 
33
- var classes = (0, _classnames.default)('euiFlyoutHeader', {
34
- 'euiFlyoutHeader--hasBorder': hasBorder
35
- }, className);
37
+ var classes = (0, _classnames.default)('euiFlyoutHeader', className);
38
+ var euiTheme = (0, _services.useEuiTheme)();
39
+ var styles = (0, _flyout_header.euiFlyoutHeaderStyles)(euiTheme);
40
+ var cssStyles = [styles.euiFlyoutHeader, hasBorder && styles.hasBorder];
36
41
  return (0, _react2.jsx)("div", _extends({
37
42
  className: classes
38
- }, rest), children);
43
+ }, rest, {
44
+ css: cssStyles
45
+ }), children);
39
46
  };
40
47
 
41
48
  exports.EuiFlyoutHeader = EuiFlyoutHeader;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiFlyoutHeaderStyles = void 0;
7
+
8
+ var _react = require("@emotion/react");
9
+
10
+ var _global_styling = require("../../global_styling");
11
+
12
+ 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)."; }
13
+
14
+ var _ref = process.env.NODE_ENV === "production" ? {
15
+ name: "1hivny1-euiFlyoutHeader",
16
+ styles: "flex-grow:0;label:euiFlyoutHeader;"
17
+ } : {
18
+ name: "1hivny1-euiFlyoutHeader",
19
+ styles: "flex-grow:0;label:euiFlyoutHeader;",
20
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
+ };
22
+
23
+ var euiFlyoutHeaderStyles = function euiFlyoutHeaderStyles(euiThemeContext) {
24
+ var euiTheme = euiThemeContext.euiTheme;
25
+ return {
26
+ euiFlyoutHeader: _ref,
27
+ hasBorder: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('border-bottom', euiTheme.border.thin), ";;label:hasBorder;")
28
+ };
29
+ };
30
+
31
+ exports.euiFlyoutHeaderStyles = euiFlyoutHeaderStyles;
@@ -67,10 +67,10 @@ var EuiImageWrapper = function EuiImageWrapper(_ref) {
67
67
  optionalCaptionText = _useInnerText2[1];
68
68
 
69
69
  return (0, _react2.jsx)("figure", _extends({
70
- "aria-label": optionalCaptionText
71
- }, wrapperProps, {
72
- className: classes,
70
+ "aria-label": optionalCaptionText,
73
71
  css: cssFigureStyles
72
+ }, wrapperProps, {
73
+ className: classes
74
74
  }), allowFullScreen ? (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_image_button.EuiImageButton, {
75
75
  hasAlt: !!alt,
76
76
  hasShadow: hasShadow,