@elastic/eui 70.0.0 → 70.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/dist/eui_theme_dark.css +11 -180
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +11 -180
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/accessibility/screen_reader_only/screen_reader_only.js +1 -1
  6. package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
  7. package/es/components/accordion/accordion.a11y.js +35 -0
  8. package/es/components/badge/beta_badge/beta_badge.js +6 -6
  9. package/es/components/basic_table/in_memory_table.js +8 -0
  10. package/es/components/button/button_display/_button_display.js +7 -6
  11. package/es/components/button/button_display/_button_display.styles.js +4 -4
  12. package/es/components/button/button_display/_button_display_content.js +6 -9
  13. package/es/components/button/button_display/_button_display_content.styles.js +3 -41
  14. package/es/components/card/card.js +13 -31
  15. package/es/components/card/card.styles.js +15 -3
  16. package/es/components/card/card_select/card_select.styles.js +4 -4
  17. package/es/components/card/checkable_card/checkable_card.js +3 -2
  18. package/es/components/context_menu/context_menu_panel.a11y.js +34 -0
  19. package/es/components/datagrid/controls/column_selector.js +1 -1
  20. package/es/components/datagrid/controls/column_sorting.js +1 -1
  21. package/es/components/datagrid/controls/data_grid_toolbar.js +6 -2
  22. package/es/components/datagrid/controls/index.js +1 -0
  23. package/es/components/datagrid/controls/keyboard_shortcuts.js +191 -0
  24. package/es/components/datagrid/data_grid.js +12 -2
  25. package/es/components/date_picker/super_date_picker/super_date_picker.js +22 -4
  26. package/es/components/header/header_links/header_links.js +6 -0
  27. package/es/components/loading/loading_spinner.js +14 -3
  28. package/es/components/loading/loading_spinner.styles.js +11 -7
  29. package/es/components/modal/modal.js +17 -2
  30. package/es/components/page_template/page_template.js +6 -9
  31. package/es/components/popover/popover.js +13 -3
  32. package/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
  33. package/es/components/popover/popover_panel/_popover_panel.js +8 -2
  34. package/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
  35. package/es/components/search_bar/search_bar.js +39 -5
  36. package/es/components/search_bar/search_box.js +37 -4
  37. package/es/components/selectable/selectable.a11y.js +118 -0
  38. package/es/components/selectable/selectable.js +9 -6
  39. package/es/components/tabs/tab.js +31 -7
  40. package/es/components/tabs/tab.styles.js +63 -0
  41. package/es/components/tabs/tabbed_content/tabbed_content.js +17 -1
  42. package/es/components/tabs/tabs.js +20 -14
  43. package/es/components/tabs/tabs.styles.js +21 -0
  44. package/es/components/tour/tour_step.js +6 -0
  45. package/es/services/string/to_initials.js +1 -1
  46. package/eui.d.ts +305 -198
  47. package/i18ntokens.json +442 -10
  48. package/lib/components/accessibility/screen_reader_only/screen_reader_only.js +1 -1
  49. package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
  50. package/lib/components/accordion/accordion.a11y.js +44 -0
  51. package/lib/components/badge/beta_badge/beta_badge.js +6 -10
  52. package/lib/components/basic_table/in_memory_table.js +8 -0
  53. package/lib/components/button/button_display/_button_display.js +7 -6
  54. package/lib/components/button/button_display/_button_display.styles.js +4 -4
  55. package/lib/components/button/button_display/_button_display_content.js +6 -9
  56. package/lib/components/button/button_display/_button_display_content.styles.js +10 -40
  57. package/lib/components/card/card.js +14 -33
  58. package/lib/components/card/card.styles.js +15 -3
  59. package/lib/components/card/card_select/card_select.styles.js +4 -4
  60. package/lib/components/card/checkable_card/checkable_card.js +3 -2
  61. package/lib/components/context_menu/context_menu_panel.a11y.js +42 -0
  62. package/lib/components/datagrid/controls/column_selector.js +1 -1
  63. package/lib/components/datagrid/controls/column_sorting.js +1 -1
  64. package/lib/components/datagrid/controls/data_grid_toolbar.js +7 -2
  65. package/lib/components/datagrid/controls/index.js +8 -0
  66. package/lib/components/datagrid/controls/keyboard_shortcuts.js +208 -0
  67. package/lib/components/datagrid/data_grid.js +11 -1
  68. package/lib/components/date_picker/super_date_picker/super_date_picker.js +22 -4
  69. package/lib/components/header/header_links/header_links.js +6 -0
  70. package/lib/components/loading/loading_spinner.js +13 -2
  71. package/lib/components/loading/loading_spinner.styles.js +14 -6
  72. package/lib/components/modal/modal.js +23 -2
  73. package/lib/components/page_template/page_template.js +6 -9
  74. package/lib/components/popover/popover.js +13 -3
  75. package/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
  76. package/lib/components/popover/popover_panel/_popover_panel.js +8 -2
  77. package/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
  78. package/lib/components/search_bar/search_bar.js +40 -5
  79. package/lib/components/search_bar/search_box.js +38 -4
  80. package/lib/components/selectable/selectable.a11y.js +122 -0
  81. package/lib/components/selectable/selectable.js +9 -6
  82. package/lib/components/tabs/tab.js +31 -6
  83. package/lib/components/tabs/tab.styles.js +69 -0
  84. package/lib/components/tabs/tabbed_content/tabbed_content.js +17 -1
  85. package/lib/components/tabs/tabs.js +24 -14
  86. package/lib/components/tabs/tabs.styles.js +32 -0
  87. package/lib/services/string/to_initials.js +1 -1
  88. package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
  89. package/optimize/es/components/accordion/accordion.a11y.js +35 -0
  90. package/optimize/es/components/badge/beta_badge/beta_badge.js +6 -6
  91. package/optimize/es/components/button/button_display/_button_display.js +6 -5
  92. package/optimize/es/components/button/button_display/_button_display.styles.js +4 -4
  93. package/optimize/es/components/button/button_display/_button_display_content.js +6 -9
  94. package/optimize/es/components/button/button_display/_button_display_content.styles.js +3 -41
  95. package/optimize/es/components/card/card.js +12 -30
  96. package/optimize/es/components/card/card.styles.js +15 -3
  97. package/optimize/es/components/card/card_select/card_select.styles.js +4 -4
  98. package/optimize/es/components/card/checkable_card/checkable_card.js +3 -2
  99. package/optimize/es/components/context_menu/context_menu_panel.a11y.js +34 -0
  100. package/optimize/es/components/datagrid/controls/column_selector.js +1 -1
  101. package/optimize/es/components/datagrid/controls/column_sorting.js +1 -1
  102. package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +6 -2
  103. package/optimize/es/components/datagrid/controls/index.js +1 -0
  104. package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +181 -0
  105. package/optimize/es/components/datagrid/data_grid.js +6 -2
  106. package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +12 -4
  107. package/optimize/es/components/loading/loading_spinner.js +13 -3
  108. package/optimize/es/components/loading/loading_spinner.styles.js +11 -7
  109. package/optimize/es/components/modal/modal.js +17 -2
  110. package/optimize/es/components/page_template/page_template.js +6 -9
  111. package/optimize/es/components/popover/popover.js +7 -3
  112. package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
  113. package/optimize/es/components/popover/popover_panel/_popover_panel.js +6 -1
  114. package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
  115. package/optimize/es/components/search_bar/search_bar.js +31 -5
  116. package/optimize/es/components/search_bar/search_box.js +29 -3
  117. package/optimize/es/components/selectable/selectable.a11y.js +107 -0
  118. package/optimize/es/components/selectable/selectable.js +9 -6
  119. package/optimize/es/components/tabs/tab.js +19 -7
  120. package/optimize/es/components/tabs/tab.styles.js +63 -0
  121. package/optimize/es/components/tabs/tabs.js +20 -14
  122. package/optimize/es/components/tabs/tabs.styles.js +21 -0
  123. package/optimize/es/services/string/to_initials.js +1 -1
  124. package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
  125. package/optimize/lib/components/accordion/accordion.a11y.js +44 -0
  126. package/optimize/lib/components/badge/beta_badge/beta_badge.js +6 -13
  127. package/optimize/lib/components/button/button_display/_button_display.js +7 -6
  128. package/optimize/lib/components/button/button_display/_button_display.styles.js +4 -4
  129. package/optimize/lib/components/button/button_display/_button_display_content.js +6 -9
  130. package/optimize/lib/components/button/button_display/_button_display_content.styles.js +10 -40
  131. package/optimize/lib/components/card/card.js +13 -32
  132. package/optimize/lib/components/card/card.styles.js +15 -3
  133. package/optimize/lib/components/card/card_select/card_select.styles.js +4 -4
  134. package/optimize/lib/components/card/checkable_card/checkable_card.js +3 -2
  135. package/optimize/lib/components/context_menu/context_menu_panel.a11y.js +42 -0
  136. package/optimize/lib/components/datagrid/controls/column_selector.js +1 -1
  137. package/optimize/lib/components/datagrid/controls/column_sorting.js +1 -1
  138. package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +7 -2
  139. package/optimize/lib/components/datagrid/controls/index.js +8 -0
  140. package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +207 -0
  141. package/optimize/lib/components/datagrid/data_grid.js +5 -1
  142. package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +12 -4
  143. package/optimize/lib/components/loading/loading_spinner.js +14 -2
  144. package/optimize/lib/components/loading/loading_spinner.styles.js +14 -6
  145. package/optimize/lib/components/modal/modal.js +22 -2
  146. package/optimize/lib/components/page_template/page_template.js +6 -9
  147. package/optimize/lib/components/popover/popover.js +7 -3
  148. package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
  149. package/optimize/lib/components/popover/popover_panel/_popover_panel.js +6 -1
  150. package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
  151. package/optimize/lib/components/search_bar/search_bar.js +31 -5
  152. package/optimize/lib/components/search_bar/search_box.js +30 -3
  153. package/optimize/lib/components/selectable/selectable.a11y.js +122 -0
  154. package/optimize/lib/components/selectable/selectable.js +9 -6
  155. package/optimize/lib/components/tabs/tab.js +19 -6
  156. package/optimize/lib/components/tabs/tab.styles.js +69 -0
  157. package/optimize/lib/components/tabs/tabs.js +24 -14
  158. package/optimize/lib/components/tabs/tabs.styles.js +32 -0
  159. package/optimize/lib/services/string/to_initials.js +1 -1
  160. package/package.json +5 -4
  161. package/src/components/datagrid/_index.scss +1 -0
  162. package/src/components/datagrid/controls/_data_grid_keyboard_shortcuts.scss +17 -0
  163. package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -8
  164. package/src/components/index.scss +0 -1
  165. package/src/components/modal/_modal.scss +3 -1
  166. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  167. package/test-env/components/accessibility/screen_reader_only/screen_reader_only.js +1 -1
  168. package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
  169. package/test-env/components/accordion/accordion.a11y.js +44 -0
  170. package/test-env/components/badge/beta_badge/beta_badge.js +6 -13
  171. package/test-env/components/basic_table/in_memory_table.js +8 -0
  172. package/test-env/components/button/button_display/_button_display.js +7 -6
  173. package/test-env/components/button/button_display/_button_display.styles.js +4 -4
  174. package/test-env/components/button/button_display/_button_display_content.js +6 -9
  175. package/test-env/components/button/button_display/_button_display_content.styles.js +10 -40
  176. package/test-env/components/card/card.js +14 -33
  177. package/test-env/components/card/card.styles.js +15 -3
  178. package/test-env/components/card/card_select/card_select.styles.js +4 -4
  179. package/test-env/components/card/checkable_card/checkable_card.js +3 -2
  180. package/test-env/components/context_menu/context_menu_panel.a11y.js +42 -0
  181. package/test-env/components/datagrid/controls/column_selector.js +1 -1
  182. package/test-env/components/datagrid/controls/column_sorting.js +1 -1
  183. package/test-env/components/datagrid/controls/data_grid_toolbar.js +7 -2
  184. package/test-env/components/datagrid/controls/index.js +8 -0
  185. package/test-env/components/datagrid/controls/keyboard_shortcuts.js +207 -0
  186. package/test-env/components/datagrid/data_grid.js +11 -1
  187. package/test-env/components/date_picker/super_date_picker/super_date_picker.js +22 -4
  188. package/test-env/components/header/header_links/header_links.js +6 -0
  189. package/test-env/components/loading/loading_spinner.js +14 -2
  190. package/test-env/components/loading/loading_spinner.styles.js +14 -6
  191. package/test-env/components/modal/modal.js +22 -2
  192. package/test-env/components/page_template/page_template.js +6 -9
  193. package/test-env/components/popover/popover.js +13 -3
  194. package/test-env/components/popover/popover_arrow/_popover_arrow.js +1 -0
  195. package/test-env/components/popover/popover_panel/_popover_panel.js +8 -2
  196. package/test-env/components/popover/popover_panel/_popover_panel.styles.js +16 -1
  197. package/test-env/components/search_bar/search_bar.js +39 -5
  198. package/test-env/components/search_bar/search_box.js +38 -4
  199. package/test-env/components/selectable/selectable.a11y.js +122 -0
  200. package/test-env/components/selectable/selectable.js +9 -6
  201. package/test-env/components/tabs/tab.js +31 -6
  202. package/test-env/components/tabs/tab.styles.js +69 -0
  203. package/test-env/components/tabs/tabbed_content/tabbed_content.js +17 -1
  204. package/test-env/components/tabs/tabs.js +24 -14
  205. package/test-env/components/tabs/tabs.styles.js +32 -0
  206. package/test-env/services/string/to_initials.js +1 -1
  207. package/src/components/tabs/_index.scss +0 -1
  208. package/src/components/tabs/_tabs.scss +0 -110
  209. package/src/themes/amsterdam/overrides/_tabs.scss +0 -80
@@ -0,0 +1,63 @@
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, mathWithUnits } from '../../global_styling';
12
+ import { euiTitle } from '../title/title.styles';
13
+
14
+ var _ref2 = process.env.NODE_ENV === "production" ? {
15
+ name: "10tso78-expanded",
16
+ styles: "flex-basis:0%;flex-grow:1;justify-content:center;label:expanded;"
17
+ } : {
18
+ name: "10tso78-expanded",
19
+ styles: "flex-basis:0%;flex-grow:1;justify-content:center;label:expanded;",
20
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
+ };
22
+
23
+ export var euiTabStyles = function euiTabStyles(_ref3) {
24
+ var euiTheme = _ref3.euiTheme;
25
+ return {
26
+ euiTab: /*#__PURE__*/css("display:flex;cursor:pointer;flex-direction:row;align-items:center;font-weight:", euiTheme.font.weight.semiBold, ";gap:", euiTheme.size.s, ";", logicalCSS('padding-vertical', 0), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " &:focus{background-color:transparent;outline-offset:-", euiTheme.focus.width, ";};label:euiTab;"),
27
+ // variations
28
+ expanded: _ref2,
29
+ selected: /*#__PURE__*/css("box-shadow:inset 0 -", euiTheme.border.width.thick, " 0 ", euiTheme.colors.primary, ";;label:selected;"),
30
+ disabled: {
31
+ disabled: /*#__PURE__*/css("cursor:not-allowed;color:", euiTheme.colors.disabledText, ";;label:disabled;"),
32
+ selected: /*#__PURE__*/css("box-shadow:inset 0 -", euiTheme.border.width.thick, " 0 ", euiTheme.colors.disabledText, ";;label:selected;")
33
+ }
34
+ };
35
+ };
36
+
37
+ var _ref = process.env.NODE_ENV === "production" ? {
38
+ name: "1yhgei9-euiTab__content",
39
+ styles: "&:hover{text-decoration:none;};label:euiTab__content;"
40
+ } : {
41
+ name: "1yhgei9-euiTab__content",
42
+ styles: "&:hover{text-decoration:none;};label:euiTab__content;",
43
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
44
+ };
45
+
46
+ export var euiTabContentStyles = function euiTabContentStyles(euiThemeContext) {
47
+ var euiTheme = euiThemeContext.euiTheme;
48
+ return {
49
+ euiTab__content: _ref,
50
+ // sizes
51
+ s: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xxxs'), ";line-height:", euiTheme.size.xl, ";;label:s;"),
52
+ m: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xxs'), ";line-height:", euiTheme.size.xxl, ";;label:m;"),
53
+ l: /*#__PURE__*/css(euiTitle(euiThemeContext, 'xs'), ";line-height:", mathWithUnits([euiTheme.size.xl, euiTheme.size.s], function (x, y) {
54
+ return x + y;
55
+ }), ";;label:l;"),
56
+ xl: /*#__PURE__*/css(euiTitle(euiThemeContext, 's'), ";line-height:", mathWithUnits([euiTheme.size.xxxl, euiTheme.size.s], function (x, y) {
57
+ return x + y;
58
+ }), ";;label:xl;"),
59
+ // variations
60
+ selected: /*#__PURE__*/css("color:", euiTheme.colors.primaryText, ";;label:selected;"),
61
+ disabled: /*#__PURE__*/css("color:", euiTheme.colors.disabledText, ";;label:disabled;")
62
+ };
63
+ };
@@ -11,15 +11,11 @@ var _excluded = ["children", "className", "bottomBorder", "expand", "size"];
11
11
  */
12
12
  import React, { forwardRef } from 'react';
13
13
  import classNames from 'classnames';
14
- import { keysOf } from '../common';
14
+ import { useEuiTheme } from '../../services';
15
+ import { cloneElementWithCss } from '../../services/theme/clone_element';
16
+ import { euiTabsStyles } from './tabs.styles';
15
17
  import { jsx as ___EmotionJSX } from "@emotion/react";
16
- var sizeToClassNameMap = {
17
- s: 'euiTabs--small',
18
- m: null,
19
- l: 'euiTabs--large',
20
- xl: 'euiTabs--xlarge'
21
- };
22
- export var SIZES = keysOf(sizeToClassNameMap);
18
+ export var SIZES = ['s', 'm', 'l', 'xl'];
23
19
  export var EuiTabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
24
20
  var children = _ref.children,
25
21
  className = _ref.className,
@@ -31,15 +27,25 @@ export var EuiTabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
31
27
  size = _ref$size === void 0 ? 'm' : _ref$size,
32
28
  rest = _objectWithoutProperties(_ref, _excluded);
33
29
 
34
- var classes = classNames('euiTabs', sizeToClassNameMap[size], {
35
- 'euiTabs--expand': expand,
36
- 'euiTabs--bottomBorder': bottomBorder
37
- }, className);
30
+ var euiTheme = useEuiTheme();
31
+ var classes = classNames('euiTabs', className);
32
+ var styles = euiTabsStyles(euiTheme);
33
+ var cssStyles = [styles.euiTabs, styles[size], bottomBorder && styles.bottomBorder];
34
+ var tabItems = React.Children.map(children, function (child) {
35
+ if ( /*#__PURE__*/React.isValidElement(child)) {
36
+ return cloneElementWithCss(child, {
37
+ // we're passing the parent `size` and `expand` down to the children
38
+ size: size,
39
+ expand: expand
40
+ });
41
+ }
42
+ });
38
43
  return ___EmotionJSX("div", _extends({
39
44
  ref: ref,
40
- className: classes
45
+ className: classes,
46
+ css: cssStyles
41
47
  }, children && {
42
48
  role: 'tablist'
43
- }, rest), children);
49
+ }, rest), tabItems);
44
50
  });
45
51
  EuiTabs.displayName = 'EuiTabs';
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+ import { css } from '@emotion/react';
9
+ import { logicalCSS, logicalCSSWithFallback } from '../../global_styling';
10
+ export var euiTabsStyles = function euiTabsStyles(euiThemeContext) {
11
+ var euiTheme = euiThemeContext.euiTheme;
12
+ return {
13
+ euiTabs: /*#__PURE__*/css("display:flex;", logicalCSS('max-width', '100%'), ";", logicalCSSWithFallback('overflow-x', 'auto'), ";", logicalCSSWithFallback('overflow-y', 'hidden'), ";position:relative;flex-shrink:0;;label:euiTabs;"),
14
+ bottomBorder: /*#__PURE__*/css("box-shadow:inset 0 -", euiTheme.border.width.thin, " 0 ", euiTheme.border.color, ";;label:bottomBorder;"),
15
+ // sizes
16
+ s: /*#__PURE__*/css("gap:", euiTheme.size.m, ";;label:s;"),
17
+ m: /*#__PURE__*/css("gap:", euiTheme.size.base, ";;label:m;"),
18
+ l: /*#__PURE__*/css("gap:", euiTheme.size.l, ";;label:l;"),
19
+ xl: /*#__PURE__*/css("gap:", euiTheme.size.xl, ";;label:xl;")
20
+ };
21
+ };
@@ -22,7 +22,7 @@
22
22
  export var MAX_INITIALS = 2;
23
23
  export function toInitials(name, initialsLength, initials) {
24
24
  // Calculate the number of initials to show, maxing out at MAX_INITIALS
25
- var calculatedInitialsLength = initials ? initials.split(' ').length : name.split(' ').length;
25
+ var calculatedInitialsLength = initials ? initials.split('').length : name.split(' ').length;
26
26
  calculatedInitialsLength = calculatedInitialsLength > MAX_INITIALS ? MAX_INITIALS : calculatedInitialsLength; // Check if initialsLength was passed and set to calculated, unless greater than MAX_INITIALS
27
27
 
28
28
  if (initialsLength) {
@@ -33,7 +33,7 @@ exports.euiScreenReaderOnly = euiScreenReaderOnly;
33
33
 
34
34
  var euiScreenReaderOnlyStyles = function euiScreenReaderOnlyStyles(showOnFocus) {
35
35
  return {
36
- euiScreenReaderOnly: showOnFocus ? /*#__PURE__*/(0, _react.css)("&:not(:focus):not(:active){", euiScreenReaderOnly(), ";};label:euiScreenReaderOnly;") : /*#__PURE__*/(0, _react.css)(euiScreenReaderOnly(), ";label:euiScreenReaderOnly;")
36
+ euiScreenReaderOnly: showOnFocus ? /*#__PURE__*/(0, _react.css)("&:not(:focus):not(:active):not(:focus-within){", euiScreenReaderOnly(), ";};label:euiScreenReaderOnly;") : /*#__PURE__*/(0, _react.css)(euiScreenReaderOnly(), ";label:euiScreenReaderOnly;")
37
37
  };
38
38
  };
39
39
 
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ var _react = _interopRequireDefault(require("react"));
6
+
7
+ var _index = require("./index");
8
+
9
+ var _panel = require("../../components/panel");
10
+
11
+ var _services = require("../../services");
12
+
13
+ var _react2 = require("@emotion/react");
14
+
15
+ /*
16
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
17
+ * or more contributor license agreements. Licensed under the Elastic License
18
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
19
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
20
+ * Side Public License, v 1.
21
+ */
22
+ /// <reference types="../../../cypress/support"/>
23
+ var baseProps = {
24
+ buttonContent: 'Click me to toggle',
25
+ id: (0, _services.htmlIdGenerator)()(),
26
+ initialIsOpen: false
27
+ };
28
+ var noArrow = {
29
+ arrowDisplay: 'none'
30
+ };
31
+ var noArrowProps = Object.assign(baseProps, noArrow);
32
+ describe('EuiAccordion', function () {
33
+ describe('Automated accessibility check', function () {
34
+ it('has zero violations when expanded', function () {
35
+ cy.mount((0, _react2.jsx)(_index.EuiAccordion, noArrowProps, (0, _react2.jsx)(_panel.EuiPanel, {
36
+ color: "subdued"
37
+ }, "Any content inside of ", (0, _react2.jsx)("strong", null, "EuiAccordion"), " will appear here. We will include ", (0, _react2.jsx)("a", {
38
+ href: "#"
39
+ }, "a link"), " to confirm focus.")));
40
+ cy.get('button.euiAccordion__button').click();
41
+ cy.checkAxe();
42
+ });
43
+ });
44
+ });
@@ -2,8 +2,6 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
- var _typeof3 = require("@babel/runtime/helpers/typeof");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
@@ -15,7 +13,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
15
13
 
16
14
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
15
 
18
- var _react = _interopRequireWildcard(require("react"));
16
+ var _react = _interopRequireDefault(require("react"));
19
17
 
20
18
  var _classnames = _interopRequireDefault(require("classnames"));
21
19
 
@@ -30,11 +28,6 @@ var _beta_badge = require("./beta_badge.styles");
30
28
  var _react2 = require("@emotion/react");
31
29
 
32
30
  var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "anchorProps", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
33
-
34
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
35
-
36
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
37
-
38
31
  var COLORS = ['accent', 'subdued', 'hollow'];
39
32
  exports.COLORS = COLORS;
40
33
  var SIZES = ['s', 'm'];
@@ -114,7 +107,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
114
107
  anchorProps: anchorProps
115
108
  }, content);
116
109
  } else {
117
- return (0, _react2.jsx)(_react.Fragment, null, content);
110
+ return (0, _react2.jsx)("span", anchorProps, content);
118
111
  }
119
112
  } else {
120
113
  if (tooltipContent) {
@@ -136,11 +129,11 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
136
129
  console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat((0, _typeof2.default)(spanTitle)));
137
130
  }
138
131
 
139
- return (0, _react2.jsx)("span", (0, _extends2.default)({
140
- css: cssStyles,
132
+ return (0, _react2.jsx)("span", anchorProps, (0, _react2.jsx)("span", (0, _extends2.default)({
141
133
  className: classes,
142
- title: spanTitle
143
- }, rest), icon || label);
134
+ title: spanTitle,
135
+ css: cssStyles
136
+ }, rest), icon || label));
144
137
  }
145
138
  }
146
139
  };
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", {
10
10
  exports.EuiButtonDisplay = void 0;
11
11
  exports.isButtonDisabled = isButtonDisabled;
12
12
 
13
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
14
-
15
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
14
 
15
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
16
+
17
17
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
18
18
 
19
19
  var _react = _interopRequireWildcard(require("react"));
@@ -58,7 +58,8 @@ function isButtonDisabled(_ref) {
58
58
  var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
59
59
  var children = _ref2.children,
60
60
  iconType = _ref2.iconType,
61
- iconSide = _ref2.iconSide,
61
+ _ref2$iconSide = _ref2.iconSide,
62
+ iconSide = _ref2$iconSide === void 0 ? 'left' : _ref2$iconSide,
62
63
  iconSize = _ref2.iconSize,
63
64
  _ref2$size = _ref2.size,
64
65
  size = _ref2$size === void 0 ? 'm' : _ref2$size,
@@ -92,7 +93,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
92
93
  iconType: iconType,
93
94
  iconSide: iconSide,
94
95
  iconSize: iconSize,
95
- textProps: _objectSpread({}, textProps)
96
+ textProps: textProps
96
97
  }, contentProps), children);
97
98
  var element = href && !buttonIsDisabled ? 'a' : 'button';
98
99
  var elementProps = {}; // Element-specific attributes
@@ -120,8 +121,8 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
120
121
 
121
122
  return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
122
123
  css: cssStyles,
123
- style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
124
- minWidth: minWidth
124
+ style: minWidth != null ? _objectSpread(_objectSpread({}, style), {}, {
125
+ minInlineSize: minWidth
125
126
  }) : style,
126
127
  ref: ref
127
128
  }, elementProps), relObj), rest), innerNode);
@@ -24,11 +24,11 @@ var _buttonSize = function _buttonSize(size) {
24
24
  };
25
25
 
26
26
  var _ref = process.env.NODE_ENV === "production" ? {
27
- name: "vifhyf-isDisabled",
28
- styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;"
27
+ name: "8595p9-isDisabled",
28
+ styles: "cursor:not-allowed;label:isDisabled;"
29
29
  } : {
30
- name: "vifhyf-isDisabled",
31
- styles: "pointer-events:none;cursor:not-allowed;label:isDisabled;",
30
+ name: "8595p9-isDisabled",
31
+ styles: "cursor:not-allowed;label:isDisabled;",
32
32
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
33
33
  };
34
34
 
@@ -41,13 +41,12 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
41
41
  iconType = _ref.iconType,
42
42
  _ref$iconSize = _ref.iconSize,
43
43
  iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
44
- iconSide = _ref.iconSide,
44
+ _ref$iconSide = _ref.iconSide,
45
+ iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
45
46
  contentProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
46
47
  var theme = (0, _services.useEuiTheme)();
47
48
  var styles = (0, _button_display_content.euiButtonDisplayContentStyles)(theme);
48
- var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide]];
49
- var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
50
- var cssIconStyles = [styles.euiButtonDisplayContent__icon, iconSize && styles[iconSize]]; // Add an icon to the button if one exists.
49
+ var cssStyles = [styles.euiButtonDisplayContent]; // Add an icon to the button if one exists.
51
50
 
52
51
  var icon; // When the button is disabled the text gets gray
53
52
  // and in some buttons the background gets a light gray
@@ -56,18 +55,16 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
56
55
  // are always visible. The default spinner color could be very light.
57
56
 
58
57
  var loadingSpinnerColor = isDisabled ? {
59
- border: 'currentColor'
58
+ border: 'currentcolor'
60
59
  } : undefined;
61
60
 
62
61
  if (isLoading) {
63
62
  icon = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
64
- css: cssSpinnerStyles,
65
63
  size: iconSize,
66
64
  color: loadingSpinnerColor
67
65
  });
68
66
  } else if (iconType) {
69
67
  icon = (0, _react2.jsx)(_icon.EuiIcon, {
70
- css: cssIconStyles,
71
68
  type: iconType,
72
69
  size: iconSize,
73
70
  color: "inherit" // forces the icon to inherit its parent color
@@ -78,9 +75,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
78
75
  var isText = typeof children === 'string';
79
76
  return (0, _react2.jsx)("span", (0, _extends2.default)({
80
77
  css: cssStyles
81
- }, contentProps), icon, isText ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
78
+ }, contentProps), iconSide === 'left' && icon, isText || textProps ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
82
79
  className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
83
- }), children) : children);
80
+ }), children) : children, iconSide === 'right' && icon);
84
81
  };
85
82
 
86
83
  exports.EuiButtonDisplayContent = EuiButtonDisplayContent;
@@ -9,48 +9,18 @@ var _react = require("@emotion/react");
9
9
 
10
10
  var _global_styling = require("../../../global_styling");
11
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: "gtg6j-euiButtonDisplayContent__icon",
16
- styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;"
17
- } : {
18
- name: "gtg6j-euiButtonDisplayContent__icon",
19
- styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;",
20
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
- };
22
-
23
- var _ref2 = process.env.NODE_ENV === "production" ? {
24
- name: "10wlo76-euiButtonDisplayContent__spinner",
25
- styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
26
- } : {
27
- name: "10wlo76-euiButtonDisplayContent__spinner",
28
- styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;",
29
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
30
- };
31
-
32
- var _ref3 = process.env.NODE_ENV === "production" ? {
33
- name: "qfl6yj-right",
34
- styles: "flex-direction:row-reverse;label:right;"
35
- } : {
36
- name: "qfl6yj-right",
37
- styles: "flex-direction:row-reverse;label:right;",
38
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
39
- };
40
-
41
- var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref4) {
42
- var euiTheme = _ref4.euiTheme;
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 euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref) {
20
+ var euiTheme = _ref.euiTheme;
43
21
  return {
44
22
  // Base
45
- euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;"),
46
- // Icon side
47
- left: /*#__PURE__*/(0, _react.css)(";label:left;"),
48
- right: _ref3,
49
- euiButtonDisplayContent__spinner: _ref2,
50
- euiButtonDisplayContent__icon: _ref,
51
- // Icon size
52
- s: /*#__PURE__*/(0, _react.css)(";label:s;"),
53
- m: /*#__PURE__*/(0, _react.css)(";label:m;")
23
+ euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
54
24
  };
55
25
  };
56
26
 
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.LAYOUT_ALIGNMENTS = exports.EuiCard = exports.ALIGNMENTS = void 0;
10
+ exports.EuiCard = exports.ALIGNMENTS = void 0;
11
11
 
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
 
@@ -19,10 +19,10 @@ var _react = _interopRequireWildcard(require("react"));
19
19
 
20
20
  var _classnames = _interopRequireDefault(require("classnames"));
21
21
 
22
- var _common = require("../common");
23
-
24
22
  var _services = require("../../services");
25
23
 
24
+ var _clone_element = require("../../services/theme/clone_element");
25
+
26
26
  var _text = require("../text");
27
27
 
28
28
  var _title = require("../title");
@@ -54,23 +54,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
54
54
 
55
55
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
56
56
 
57
- var textAlignToClassNameMap = {
58
- left: 'euiCard--leftAligned',
59
- center: 'euiCard--centerAligned',
60
- right: 'euiCard--rightAligned'
61
- };
62
- var ALIGNMENTS = (0, _common.keysOf)(textAlignToClassNameMap);
57
+ var ALIGNMENTS = ['left', 'center', 'right'];
63
58
  exports.ALIGNMENTS = ALIGNMENTS;
64
- var layoutToClassNameMap = {
65
- vertical: '',
66
- horizontal: 'euiCard--horizontal'
67
- };
68
- var LAYOUT_ALIGNMENTS = (0, _common.keysOf)(layoutToClassNameMap);
69
- /**
70
- * Certain props are only allowed when the layout is vertical
71
- */
72
-
73
- exports.LAYOUT_ALIGNMENTS = LAYOUT_ALIGNMENTS;
74
59
 
75
60
  var EuiCard = function EuiCard(_ref) {
76
61
  var className = _ref.className,
@@ -105,8 +90,9 @@ var EuiCard = function EuiCard(_ref) {
105
90
  var euiThemeContext = (0, _services.useEuiTheme)();
106
91
  var styles = (0, _card.euiCardStyles)(euiThemeContext, paddingSize);
107
92
  var cardStyles = [styles.card.euiCard, // Text alignment should always be left when horizontal
108
- styles.card.aligned[layout === 'horizontal' ? 'left' : textAlign], styles.card.layout[layout], isDisabled && styles.card.disabled];
93
+ styles.card.aligned[layout === 'horizontal' ? 'left' : textAlign], isDisabled && styles.card.disabled];
109
94
  var contentStyles = [styles.content.euiCard__content, styles.content.layout[layout]];
95
+ var mainStyles = [styles.main.euiCard__main, styles.main.layout[layout]];
110
96
  var textStyles = (0, _card.euiCardTextStyles)(euiThemeContext);
111
97
  var textCSS = [textStyles.euiCard__text, // Text alignment should always be left when horizontal
112
98
  textStyles.aligned[layout === 'horizontal' ? 'left' : textAlign], isClickable && textStyles.interactive, isDisabled && textStyles.disabled];
@@ -130,15 +116,7 @@ var EuiCard = function EuiCard(_ref) {
130
116
  }
131
117
  }
132
118
 
133
- var selectableColorClass = selectable ? "euiCard--isSelectable--".concat((0, _card_select.euiCardSelectableColor)(selectable.color, selectable.isSelected)) : undefined;
134
- var classes = (0, _classnames.default)('euiCard', textAlignToClassNameMap[textAlign], layoutToClassNameMap[layout], {
135
- 'euiCard--isClickable': isClickable,
136
- 'euiCard--hasBetaBadge': betaBadgeProps === null || betaBadgeProps === void 0 ? void 0 : betaBadgeProps.label,
137
- 'euiCard--hasIcon': icon,
138
- 'euiCard--isSelectable': selectable,
139
- 'euiCard-isSelected': selectable === null || selectable === void 0 ? void 0 : selectable.isSelected,
140
- 'euiCard-isDisabled': isDisabled
141
- }, selectableColorClass, className);
119
+ var classes = (0, _classnames.default)('euiCard', className);
142
120
  var ariaId = (0, _accessibility.useGeneratedHtmlId)();
143
121
  var ariaDesc = description ? "".concat(ariaId, "Description") : '';
144
122
  /**
@@ -166,7 +144,7 @@ var EuiCard = function EuiCard(_ref) {
166
144
 
167
145
  if (icon) {
168
146
  var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
169
- iconNode = /*#__PURE__*/_react.default.cloneElement(icon, {
147
+ iconNode = (0, _clone_element.cloneElementWithCss)(icon, {
170
148
  className: (0, _classnames.default)(icon.props.className, 'euiCard__icon'),
171
149
  css: iconStyles
172
150
  });
@@ -320,14 +298,17 @@ var EuiCard = function EuiCard(_ref) {
320
298
  hasShadow: isDisabled || display ? false : true,
321
299
  hasBorder: display ? false : undefined,
322
300
  paddingSize: paddingSize
323
- }, rest), optionalCardTop, (0, _react2.jsx)("div", {
301
+ }, rest), (0, _react2.jsx)("div", {
302
+ className: "euiCard__main",
303
+ css: mainStyles
304
+ }, optionalCardTop, (0, _react2.jsx)("div", {
324
305
  className: "euiCard__content",
325
306
  css: contentStyles
326
307
  }, (0, _react2.jsx)(_title.EuiTitle, {
327
308
  id: "".concat(ariaId, "Title"),
328
309
  className: "euiCard__title",
329
310
  size: titleSize
330
- }, (0, _react2.jsx)(TitleElement, null, theTitle)), optionalDescription, optionalChildren), optionalBetaBadge, optionalFooter, optionalSelectButton);
311
+ }, (0, _react2.jsx)(TitleElement, null, theTitle)), optionalDescription, optionalChildren), optionalBetaBadge, optionalFooter), optionalSelectButton);
331
312
  };
332
313
 
333
314
  exports.EuiCard = EuiCard;
@@ -57,6 +57,15 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
57
57
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
58
58
  };
59
59
 
60
+ var _ref6 = process.env.NODE_ENV === "production" ? {
61
+ name: "z24364-euiCard__main",
62
+ styles: "display:flex;label:euiCard__main;"
63
+ } : {
64
+ name: "z24364-euiCard__main",
65
+ styles: "display:flex;label:euiCard__main;",
66
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
67
+ };
68
+
60
69
  var euiCardStyles = function euiCardStyles(euiThemeContext, paddingSize) {
61
70
  var euiTheme = euiThemeContext.euiTheme;
62
71
  var paddingAmount = (0, _global_styling.euiPaddingSize)(euiThemeContext, paddingSize);
@@ -64,17 +73,20 @@ var euiCardStyles = function euiCardStyles(euiThemeContext, paddingSize) {
64
73
  var halfSpacing = (0, _global_styling.euiPaddingSize)(euiThemeContext, halfPaddingKey);
65
74
  return {
66
75
  card: {
67
- euiCard: /*#__PURE__*/(0, _react.css)("display:flex;&:has([class*='euiCard__text'][class*='-interactive']:focus:focus-visible){outline:", euiTheme.focus.width, " solid currentColor;};label:euiCard;"),
76
+ euiCard: /*#__PURE__*/(0, _react.css)("display:flex;align-items:flex-start;justify-content:space-between;flex-direction:column;&:has([class*='euiCard__text'][class*='-interactive']:focus:focus-visible){outline:", euiTheme.focus.width, " solid currentColor;};label:euiCard;"),
68
77
  aligned: {
69
78
  center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";align-items:center;;label:center;"),
70
79
  left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";align-items:flex-start;;label:left;"),
71
80
  right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";align-items:flex-end;;label:right;")
72
81
  },
82
+ disabled: /*#__PURE__*/(0, _react.css)("cursor:not-allowed;background-color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled'), ";color:", euiTheme.colors.disabledText, ";;label:disabled;")
83
+ },
84
+ main: {
85
+ euiCard__main: _ref6,
73
86
  layout: {
74
87
  vertical: _ref5,
75
88
  horizontal: _ref4
76
- },
77
- disabled: /*#__PURE__*/(0, _react.css)("cursor:not-allowed;background-color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled'), ";color:", euiTheme.colors.disabledText, ";;label:disabled;")
89
+ }
78
90
  },
79
91
  content: {
80
92
  euiCard__content: _ref3,
@@ -10,11 +10,11 @@ var _react = require("@emotion/react");
10
10
  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)."; }
11
11
 
12
12
  var _ref = process.env.NODE_ENV === "production" ? {
13
- name: "g3lgnd-euiCardSelect",
14
- styles: "transform:none!important;label:euiCardSelect;"
13
+ name: "aogl4-euiCardSelect",
14
+ styles: "transform:none!important;align-self:flex-end;label:euiCardSelect;"
15
15
  } : {
16
- name: "g3lgnd-euiCardSelect",
17
- styles: "transform:none!important;label:euiCardSelect;",
16
+ name: "aogl4-euiCardSelect",
17
+ styles: "transform:none!important;align-self:flex-end;label:euiCardSelect;",
18
18
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
19
  };
20
20
 
@@ -27,7 +27,7 @@ var _checkable_card = require("./checkable_card.styles");
27
27
 
28
28
  var _react2 = require("@emotion/react");
29
29
 
30
- var _excluded = ["children", "className", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
30
+ var _excluded = ["children", "className", "css", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
31
31
 
32
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
33
 
@@ -36,6 +36,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
36
36
  var EuiCheckableCard = function EuiCheckableCard(_ref) {
37
37
  var children = _ref.children,
38
38
  className = _ref.className,
39
+ css = _ref.css,
39
40
  _ref$checkableType = _ref.checkableType,
40
41
  checkableType = _ref$checkableType === void 0 ? 'radio' : _ref$checkableType,
41
42
  label = _ref.label,
@@ -47,7 +48,7 @@ var EuiCheckableCard = function EuiCheckableCard(_ref) {
47
48
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
48
49
  var euiThemeContext = (0, _services.useEuiTheme)();
49
50
  var styles = (0, _checkable_card.euiCheckableCardStyles)(euiThemeContext);
50
- var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked];
51
+ var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked, css];
51
52
  var labelStyles = [styles.label.euiCheckableCard__label, disabled && styles.label.isDisabled];
52
53
  var childStyles = [styles.euiCheckableCard__children];
53
54
  var id = rest.id;