@elastic/eui 116.3.0 → 116.3.1-snapshot.1782148316870

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 (199) hide show
  1. package/es/components/avatar/avatar.js +4 -0
  2. package/es/components/avatar/avatar.styles.js +16 -16
  3. package/es/components/banner/banner.js +1 -2
  4. package/es/components/banner/banner.styles.js +1 -1
  5. package/es/components/basic_table/basic_table.js +35 -5
  6. package/es/components/basic_table/basic_table.styles.js +19 -1
  7. package/es/components/basic_table/in_memory_table.js +17 -0
  8. package/es/components/basic_table/index.js +2 -1
  9. package/es/components/basic_table/pagination_bar.js +19 -4
  10. package/es/components/basic_table/pagination_bar.styles.js +21 -0
  11. package/es/components/basic_table/panel.styles.js +14 -0
  12. package/es/components/basic_table/use_panel_props.js +28 -0
  13. package/es/components/date_picker/auto_refresh/refresh_interval.js +176 -229
  14. package/es/components/date_picker/date_picker.js +1 -1
  15. package/es/components/flyout/flyout.component.js +10 -6
  16. package/es/components/flyout/flyout_menu.js +122 -19
  17. package/es/components/flyout/flyout_menu.styles.js +2 -1
  18. package/es/components/flyout/manager/actions.js +20 -0
  19. package/es/components/flyout/manager/flyout_child.js +23 -1
  20. package/es/components/flyout/manager/flyout_managed.js +65 -19
  21. package/es/components/flyout/manager/hooks.js +1 -1
  22. package/es/components/flyout/manager/index.js +2 -2
  23. package/es/components/flyout/manager/reducer.js +32 -8
  24. package/es/components/flyout/manager/selectors.js +8 -2
  25. package/es/components/flyout/manager/store.js +35 -2
  26. package/es/components/flyout/use_flyout_menu.js +2 -2
  27. package/es/components/form/field_password/field_password.styles.js +1 -1
  28. package/es/components/form/field_search/field_search.styles.js +1 -1
  29. package/es/components/form/form.styles.js +1 -1
  30. package/es/components/form/form_control_layout/form_control_layout_icons.js +95 -143
  31. package/es/components/form/select/select.styles.js +1 -1
  32. package/es/components/form/text_area/text_area.styles.js +1 -1
  33. package/es/components/form/validatable_control/validatable_control.js +8 -55
  34. package/es/components/table/mobile/table_sort_mobile.js +64 -103
  35. package/es/components/table/store/use_unique_column_id.js +25 -0
  36. package/es/components/table/table_header_cell.js +7 -8
  37. package/es/components/table/table_header_cell_checkbox.js +5 -6
  38. package/es/components/tool_tip/tool_tip.js +61 -30
  39. package/es/components/tool_tip/tool_tip_anchor.js +5 -5
  40. package/es/components/tool_tip/tool_tip_manager.js +27 -2
  41. package/eui.d.ts +679 -530
  42. package/i18ntokens.json +810 -738
  43. package/lib/components/avatar/avatar.js +4 -0
  44. package/lib/components/avatar/avatar.styles.js +16 -16
  45. package/lib/components/banner/banner.js +1 -2
  46. package/lib/components/banner/banner.styles.js +1 -1
  47. package/lib/components/basic_table/basic_table.js +34 -4
  48. package/lib/components/basic_table/basic_table.styles.js +19 -1
  49. package/lib/components/basic_table/in_memory_table.js +17 -0
  50. package/lib/components/basic_table/index.js +8 -1
  51. package/lib/components/basic_table/pagination_bar.js +19 -4
  52. package/lib/components/basic_table/pagination_bar.styles.js +26 -0
  53. package/lib/components/basic_table/panel.styles.js +20 -0
  54. package/lib/components/basic_table/use_panel_props.js +33 -0
  55. package/lib/components/date_picker/auto_refresh/refresh_interval.js +175 -229
  56. package/lib/components/date_picker/date_picker.js +1 -1
  57. package/lib/components/flyout/flyout.component.js +10 -6
  58. package/lib/components/flyout/flyout_menu.js +120 -19
  59. package/lib/components/flyout/flyout_menu.styles.js +2 -1
  60. package/lib/components/flyout/manager/actions.js +21 -1
  61. package/lib/components/flyout/manager/flyout_child.js +23 -1
  62. package/lib/components/flyout/manager/flyout_managed.js +41 -17
  63. package/lib/components/flyout/manager/hooks.js +6 -0
  64. package/lib/components/flyout/manager/index.js +12 -0
  65. package/lib/components/flyout/manager/reducer.js +31 -7
  66. package/lib/components/flyout/manager/selectors.js +9 -3
  67. package/lib/components/flyout/manager/store.js +34 -1
  68. package/lib/components/flyout/use_flyout_menu.js +2 -2
  69. package/lib/components/form/field_password/field_password.styles.js +1 -1
  70. package/lib/components/form/field_search/field_search.styles.js +1 -1
  71. package/lib/components/form/form.styles.js +1 -1
  72. package/lib/components/form/form_control_layout/form_control_layout_icons.js +95 -145
  73. package/lib/components/form/select/select.styles.js +1 -1
  74. package/lib/components/form/text_area/text_area.styles.js +1 -1
  75. package/lib/components/form/validatable_control/validatable_control.js +7 -52
  76. package/lib/components/table/mobile/table_sort_mobile.js +71 -108
  77. package/lib/components/table/store/use_unique_column_id.js +34 -0
  78. package/lib/components/table/table_header_cell.js +7 -8
  79. package/lib/components/table/table_header_cell_checkbox.js +5 -6
  80. package/lib/components/tool_tip/tool_tip.js +59 -29
  81. package/lib/components/tool_tip/tool_tip_anchor.js +5 -5
  82. package/lib/components/tool_tip/tool_tip_manager.js +27 -2
  83. package/optimize/es/components/avatar/avatar.js +4 -0
  84. package/optimize/es/components/avatar/avatar.styles.js +16 -16
  85. package/optimize/es/components/banner/banner.js +1 -2
  86. package/optimize/es/components/banner/banner.styles.js +1 -1
  87. package/optimize/es/components/basic_table/basic_table.js +18 -5
  88. package/optimize/es/components/basic_table/basic_table.styles.js +19 -1
  89. package/optimize/es/components/basic_table/index.js +2 -1
  90. package/optimize/es/components/basic_table/pagination_bar.js +19 -4
  91. package/optimize/es/components/basic_table/pagination_bar.styles.js +21 -0
  92. package/optimize/es/components/basic_table/panel.styles.js +14 -0
  93. package/optimize/es/components/basic_table/use_panel_props.js +28 -0
  94. package/optimize/es/components/date_picker/auto_refresh/refresh_interval.js +172 -196
  95. package/optimize/es/components/date_picker/date_picker.js +1 -1
  96. package/optimize/es/components/flyout/flyout.component.js +10 -6
  97. package/optimize/es/components/flyout/flyout_menu.js +99 -18
  98. package/optimize/es/components/flyout/flyout_menu.styles.js +2 -1
  99. package/optimize/es/components/flyout/manager/actions.js +20 -0
  100. package/optimize/es/components/flyout/manager/flyout_managed.js +42 -18
  101. package/optimize/es/components/flyout/manager/hooks.js +1 -1
  102. package/optimize/es/components/flyout/manager/index.js +2 -2
  103. package/optimize/es/components/flyout/manager/reducer.js +32 -8
  104. package/optimize/es/components/flyout/manager/selectors.js +8 -2
  105. package/optimize/es/components/flyout/manager/store.js +35 -2
  106. package/optimize/es/components/flyout/use_flyout_menu.js +2 -2
  107. package/optimize/es/components/form/field_password/field_password.styles.js +1 -1
  108. package/optimize/es/components/form/field_search/field_search.styles.js +1 -1
  109. package/optimize/es/components/form/form.styles.js +1 -1
  110. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +96 -115
  111. package/optimize/es/components/form/select/select.styles.js +1 -1
  112. package/optimize/es/components/form/text_area/text_area.styles.js +1 -1
  113. package/optimize/es/components/form/validatable_control/validatable_control.js +7 -48
  114. package/optimize/es/components/table/mobile/table_sort_mobile.js +59 -82
  115. package/optimize/es/components/table/store/use_unique_column_id.js +25 -0
  116. package/optimize/es/components/table/table_header_cell.js +7 -8
  117. package/optimize/es/components/table/table_header_cell_checkbox.js +5 -6
  118. package/optimize/es/components/tool_tip/tool_tip.js +58 -30
  119. package/optimize/es/components/tool_tip/tool_tip_anchor.js +5 -5
  120. package/optimize/es/components/tool_tip/tool_tip_manager.js +27 -2
  121. package/optimize/lib/components/avatar/avatar.js +4 -0
  122. package/optimize/lib/components/avatar/avatar.styles.js +16 -16
  123. package/optimize/lib/components/banner/banner.js +1 -2
  124. package/optimize/lib/components/banner/banner.styles.js +1 -1
  125. package/optimize/lib/components/basic_table/basic_table.js +17 -4
  126. package/optimize/lib/components/basic_table/basic_table.styles.js +19 -1
  127. package/optimize/lib/components/basic_table/index.js +8 -1
  128. package/optimize/lib/components/basic_table/pagination_bar.js +19 -4
  129. package/optimize/lib/components/basic_table/pagination_bar.styles.js +26 -0
  130. package/optimize/lib/components/basic_table/panel.styles.js +20 -0
  131. package/optimize/lib/components/basic_table/use_panel_props.js +33 -0
  132. package/optimize/lib/components/date_picker/auto_refresh/refresh_interval.js +170 -194
  133. package/optimize/lib/components/date_picker/date_picker.js +1 -1
  134. package/optimize/lib/components/flyout/flyout.component.js +10 -6
  135. package/optimize/lib/components/flyout/flyout_menu.js +98 -18
  136. package/optimize/lib/components/flyout/flyout_menu.styles.js +2 -1
  137. package/optimize/lib/components/flyout/manager/actions.js +21 -1
  138. package/optimize/lib/components/flyout/manager/flyout_managed.js +41 -17
  139. package/optimize/lib/components/flyout/manager/hooks.js +6 -0
  140. package/optimize/lib/components/flyout/manager/index.js +12 -0
  141. package/optimize/lib/components/flyout/manager/reducer.js +31 -7
  142. package/optimize/lib/components/flyout/manager/selectors.js +9 -3
  143. package/optimize/lib/components/flyout/manager/store.js +34 -1
  144. package/optimize/lib/components/flyout/use_flyout_menu.js +2 -2
  145. package/optimize/lib/components/form/field_password/field_password.styles.js +1 -1
  146. package/optimize/lib/components/form/field_search/field_search.styles.js +1 -1
  147. package/optimize/lib/components/form/form.styles.js +1 -1
  148. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +96 -117
  149. package/optimize/lib/components/form/select/select.styles.js +1 -1
  150. package/optimize/lib/components/form/text_area/text_area.styles.js +1 -1
  151. package/optimize/lib/components/form/validatable_control/validatable_control.js +6 -49
  152. package/optimize/lib/components/table/mobile/table_sort_mobile.js +61 -83
  153. package/optimize/lib/components/table/store/use_unique_column_id.js +34 -0
  154. package/optimize/lib/components/table/table_header_cell.js +7 -8
  155. package/optimize/lib/components/table/table_header_cell_checkbox.js +5 -6
  156. package/optimize/lib/components/tool_tip/tool_tip.js +57 -29
  157. package/optimize/lib/components/tool_tip/tool_tip_anchor.js +5 -5
  158. package/optimize/lib/components/tool_tip/tool_tip_manager.js +27 -2
  159. package/package.json +8 -5
  160. package/test-env/components/avatar/avatar.js +4 -0
  161. package/test-env/components/avatar/avatar.styles.js +16 -16
  162. package/test-env/components/banner/banner.js +1 -2
  163. package/test-env/components/banner/banner.styles.js +1 -1
  164. package/test-env/components/basic_table/basic_table.js +34 -4
  165. package/test-env/components/basic_table/basic_table.styles.js +19 -1
  166. package/test-env/components/basic_table/in_memory_table.js +17 -0
  167. package/test-env/components/basic_table/index.js +8 -1
  168. package/test-env/components/basic_table/pagination_bar.js +19 -4
  169. package/test-env/components/basic_table/pagination_bar.styles.js +26 -0
  170. package/test-env/components/basic_table/panel.styles.js +20 -0
  171. package/test-env/components/basic_table/use_panel_props.js +33 -0
  172. package/test-env/components/date_picker/auto_refresh/refresh_interval.js +170 -220
  173. package/test-env/components/date_picker/date_picker.js +1 -1
  174. package/test-env/components/flyout/flyout.component.js +10 -6
  175. package/test-env/components/flyout/flyout_menu.js +121 -19
  176. package/test-env/components/flyout/flyout_menu.styles.js +2 -1
  177. package/test-env/components/flyout/manager/actions.js +21 -1
  178. package/test-env/components/flyout/manager/flyout_child.js +23 -1
  179. package/test-env/components/flyout/manager/flyout_managed.js +41 -17
  180. package/test-env/components/flyout/manager/hooks.js +6 -0
  181. package/test-env/components/flyout/manager/index.js +12 -0
  182. package/test-env/components/flyout/manager/reducer.js +31 -7
  183. package/test-env/components/flyout/manager/selectors.js +9 -3
  184. package/test-env/components/flyout/manager/store.js +34 -1
  185. package/test-env/components/flyout/use_flyout_menu.js +2 -2
  186. package/test-env/components/form/field_password/field_password.styles.js +1 -1
  187. package/test-env/components/form/field_search/field_search.styles.js +1 -1
  188. package/test-env/components/form/form.styles.js +1 -1
  189. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +95 -139
  190. package/test-env/components/form/select/select.styles.js +1 -1
  191. package/test-env/components/form/text_area/text_area.styles.js +1 -1
  192. package/test-env/components/form/validatable_control/validatable_control.js +6 -48
  193. package/test-env/components/table/mobile/table_sort_mobile.js +61 -98
  194. package/test-env/components/table/store/use_unique_column_id.js +34 -0
  195. package/test-env/components/table/table_header_cell.js +7 -8
  196. package/test-env/components/table/table_header_cell_checkbox.js +5 -6
  197. package/test-env/components/tool_tip/tool_tip.js +57 -29
  198. package/test-env/components/tool_tip/tool_tip_anchor.js +5 -5
  199. package/test-env/components/tool_tip/tool_tip_manager.js +27 -2
@@ -75,6 +75,7 @@ export var EuiAvatar = function EuiAvatar(_ref) {
75
75
  var classes = classNames('euiAvatar', _defineProperty(_defineProperty(_defineProperty({}, "euiAvatar--".concat(size), size), "euiAvatar--".concat(type), type), 'euiAvatar-isDisabled', isDisabled), className);
76
76
  var styles = useEuiMemoizedStyles(euiAvatarStyles);
77
77
  var cssStyles = [styles.euiAvatar, styles[type], styles[size], styles[casing], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
78
+ var tooltipCssStyles = [styles.tooltip[type]];
78
79
  var avatarStyle = useMemo(function () {
79
80
  if (imageUrl) {
80
81
  return {
@@ -129,6 +130,9 @@ export var EuiAvatar = function EuiAvatar(_ref) {
129
130
  // It already has `aria-label`, the tooltip is only visual.
130
131
  return name ? ___EmotionJSX(EuiToolTip, {
131
132
  content: name,
133
+ anchorProps: {
134
+ css: tooltipCssStyles
135
+ },
132
136
  disableScreenReaderOutput: true
133
137
  }, avatarNode) : avatarNode;
134
138
  };
@@ -9,9 +9,9 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
9
9
 
10
10
  import { css } from '@emotion/react';
11
11
  import { logicalSizeCSS, mathWithUnits } from '../../global_styling';
12
- var _avatarSize = function _avatarSize(_ref7) {
13
- var size = _ref7.size,
14
- fontSize = _ref7.fontSize;
12
+ var _avatarSize = function _avatarSize(_ref6) {
13
+ var size = _ref6.size,
14
+ fontSize = _ref6.fontSize;
15
15
  return "\n ".concat(logicalSizeCSS(size), ";\n font-size: ").concat(fontSize, ";\n ");
16
16
  };
17
17
  var _ref = process.env.NODE_ENV === "production" ? {
@@ -54,24 +54,20 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
54
54
  styles: "cursor:not-allowed;filter:grayscale(100%);label:isDisabled;",
55
55
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
56
56
  };
57
- var _ref6 = process.env.NODE_ENV === "production" ? {
58
- name: "ont6vs-user",
59
- styles: "border-radius:50%;label:user;"
60
- } : {
61
- name: "ont6vs-user",
62
- styles: "border-radius:50%;label:user;",
63
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
64
- };
65
- export var euiAvatarStyles = function euiAvatarStyles(_ref8) {
66
- var euiTheme = _ref8.euiTheme;
57
+ export var euiAvatarStyles = function euiAvatarStyles(_ref7) {
58
+ var euiTheme = _ref7.euiTheme;
59
+ var borderRadius = {
60
+ user: '50%',
61
+ space: euiTheme.border.radius.medium
62
+ };
67
63
  return {
68
64
  // Base
69
65
  euiAvatar: /*#__PURE__*/css("flex-shrink:0;display:inline-flex;justify-content:center;align-items:center;vertical-align:middle;background-size:cover;background-color:", euiTheme.colors.lightShade, ";overflow:hidden;font-weight:", euiTheme.font.weight.medium, ";;label:euiAvatar;"),
70
66
  // Variants
71
67
  plain: /*#__PURE__*/css("background-color:", euiTheme.colors.emptyShade, ";;label:plain;"),
72
68
  subdued: /*#__PURE__*/css("background-color:", euiTheme.colors.lightestShade, ";;label:subdued;"),
73
- user: _ref6,
74
- space: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";;label:space;"),
69
+ user: /*#__PURE__*/css("border-radius:", borderRadius.user, ";;label:user;"),
70
+ space: /*#__PURE__*/css("border-radius:", borderRadius.space, ";;label:space;"),
75
71
  // States
76
72
  isDisabled: _ref5,
77
73
  // Sizes
@@ -101,6 +97,10 @@ export var euiAvatarStyles = function euiAvatarStyles(_ref8) {
101
97
  capitalize: _ref4,
102
98
  uppercase: _ref3,
103
99
  lowercase: _ref2,
104
- none: _ref
100
+ none: _ref,
101
+ tooltip: {
102
+ user: /*#__PURE__*/css("border-radius:", borderRadius.user, ";;label:user;"),
103
+ space: /*#__PURE__*/css("border-radius:", borderRadius.space, ";;label:space;")
104
+ }
105
105
  };
106
106
  };
@@ -50,8 +50,7 @@ export var EuiBanner = /*#__PURE__*/forwardRef(function (_ref, ref) {
50
50
  var headingSize = size === 's' ? 'xxs' : 'xs';
51
51
  var primaryActionProps = actionProps === null || actionProps === void 0 ? void 0 : actionProps.primary;
52
52
  var secondaryActionProps = actionProps === null || actionProps === void 0 ? void 0 : actionProps.secondary;
53
- // a standalone secondary action is not supported
54
- var hasActions = Boolean(primaryActionProps);
53
+ var hasActions = Boolean(primaryActionProps) || Boolean(secondaryActionProps);
55
54
  var componentClass = 'euiBanner';
56
55
  var classes = classNames(componentClass, className);
57
56
  var backgroundColorStyles = useEuiBackgroundColorCSS()[color];
@@ -60,7 +60,7 @@ export var euiBannerStyles = function euiBannerStyles(_ref3) {
60
60
  }), ";;label:body;"),
61
61
  // At size `s` the content slot becomes a block container so the title and
62
62
  // text flow inline. Other sizes keep the flex column with a fixed gap.
63
- content: /*#__PURE__*/css("flex:1 1 auto;min-inline-size:0;max-inline-size:", TEXT_MAX_WIDTH, "px;display:flex;flex-direction:column;gap:", euiTheme.size.xs, ";[data-size='s'] &{display:block;>*+*:not(.euiButtonIcon){margin-block-start:", euiTheme.size.s, ";}};label:content;"),
63
+ content: /*#__PURE__*/css("flex:1 1 auto;min-inline-size:0;max-inline-size:", TEXT_MAX_WIDTH, "px;display:flex;flex-direction:column;gap:", euiTheme.size.xs, ";[data-size='s'] &{display:block;>*+*:not(.euiButtonIcon){margin-block-start:", euiTheme.size.s, ";}}[data-size='m'] &{>.euiText+*{margin-block-start:", euiTheme.size.s, ";}};label:content;"),
64
64
  title: _ref,
65
65
  text: /*#__PURE__*/css("[data-size='s'] &{display:inline;&::before{content:'\xB7';display:inline-block;inline-size:calc(", euiTheme.size.s, " + ", euiTheme.size.xxs, ");text-align:center;color:", euiTheme.colors.textHeading, ";}};label:text;"),
66
66
  actions: /*#__PURE__*/css("display:flex;flex-direction:row;align-items:center;flex-wrap:nowrap;gap:", euiTheme.size.s, ";@container ", CONTAINER_NAME, " ", CQC_BREAKPOINT_NARROWEST, "{flex-wrap:wrap;>*{inline-size:100%;}}", withContainerQuery({
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout", "hasBackground", "scrollableInline", "stickyScrollbar", "stickyHeader"],
1
+ var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout", "hasBackground", "scrollableInline", "stickyScrollbar", "stickyHeader", "panelled"],
2
2
  _excluded2 = ["align", "render", "dataType", "isExpander", "textOnly", "name", "field", "description", "sortable", "footer", "mobileOptions", "nameTooltip"];
3
3
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
4
  function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
@@ -56,7 +56,7 @@ import { EuiScreenReaderOnly } from '../accessibility';
56
56
  import { EuiI18n } from '../i18n';
57
57
  import { EuiDelayRender } from '../delay_render';
58
58
  import { htmlIdGenerator } from '../../services/accessibility';
59
- import { euiBasicTableBodyLoading, safariLoadingWorkaround } from './basic_table.styles';
59
+ import { euiBasicTableBodyLoading, euiBasicTableWrapperPanelledStyles, safariLoadingWorkaround } from './basic_table.styles';
60
60
  import { EuiToolTip } from '../tool_tip';
61
61
  import { jsx as ___EmotionJSX } from "@emotion/react";
62
62
  var dataTypesProfiles = {
@@ -376,6 +376,7 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
376
376
  scrollableInline = _this$props2.scrollableInline,
377
377
  stickyScrollbar = _this$props2.stickyScrollbar,
378
378
  stickyHeader = _this$props2.stickyHeader,
379
+ panelled = _this$props2.panelled,
379
380
  rest = _objectWithoutProperties(_this$props2, _excluded);
380
381
  var classes = classNames('euiBasicTable', {
381
382
  'euiBasicTable-loading': loading
@@ -397,8 +398,9 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
397
398
  loading = _this$props3.loading,
398
399
  scrollableInline = _this$props3.scrollableInline,
399
400
  stickyScrollbar = _this$props3.stickyScrollbar,
400
- stickyHeader = _this$props3.stickyHeader;
401
- return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiTableHeaderMobile, {
401
+ stickyHeader = _this$props3.stickyHeader,
402
+ panelled = _this$props3.panelled;
403
+ var content = ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiTableHeaderMobile, {
402
404
  responsiveBreakpoint: responsiveBreakpoint
403
405
  }, this.renderSelectAll(true), this.renderTableMobileSort()), ___EmotionJSX(OverrideCopiedTabularContent, null, ___EmotionJSX(EuiTable, {
404
406
  id: this.tableId,
@@ -411,6 +413,13 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
411
413
  stickyHeader: stickyHeader,
412
414
  css: loading && safariLoadingWorkaround
413
415
  }, this.renderTableCaption(), this.renderTableHead(), this.renderTableBody(), this.renderTableFooter())));
416
+ if (panelled) {
417
+ return ___EmotionJSX("div", {
418
+ css: panelled && euiBasicTableWrapperPanelledStyles(responsiveBreakpoint),
419
+ "data-test-subj": "euiBasicTablePanelledWrapper"
420
+ }, content);
421
+ }
422
+ return content;
414
423
  }
415
424
  }, {
416
425
  key: "renderTableMobileSort",
@@ -967,7 +976,9 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
967
976
  error = _this$props11.error,
968
977
  pagination = _this$props11.pagination,
969
978
  tableCaption = _this$props11.tableCaption,
970
- onChange = _this$props11.onChange;
979
+ onChange = _this$props11.onChange,
980
+ panelled = _this$props11.panelled,
981
+ responsiveBreakpoint = _this$props11.responsiveBreakpoint;
971
982
  if (!error && pagination && pagination.totalItemCount > 0) {
972
983
  if (!onChange) {
973
984
  throw new Error("The Basic Table is configured with pagination but [onChange] is\n not configured. This callback must be implemented to handle pagination changes");
@@ -981,6 +992,8 @@ export var EuiBasicTable = /*#__PURE__*/function (_Component) {
981
992
  }, function (tablePagination) {
982
993
  return ___EmotionJSX(PaginationBar, {
983
994
  pagination: pagination,
995
+ panelled: panelled,
996
+ responsiveBreakpoint: responsiveBreakpoint,
984
997
  onPageSizeChange: _this7.onPageSizeChange.bind(_this7),
985
998
  onPageChange: _this7.onPageChange.bind(_this7),
986
999
  "aria-controls": _this7.tableId,
@@ -1501,6 +1514,23 @@ EuiBasicTable.propTypes = {
1501
1514
  * Provides an infinite loading indicator
1502
1515
  */
1503
1516
  loading: PropTypes.bool,
1517
+ /**
1518
+ * Enable the panelled style of the table.
1519
+ *
1520
+ * Panelled style adds contrast between the table navigation controls
1521
+ * and table content itself. It should be used in tables rendered outside
1522
+ * EUI containers like `<EuiPanel>` or `<EuiFlyout>`.
1523
+ * @default false
1524
+ */
1525
+ /**
1526
+ * Enable the panelled style of the table.
1527
+ *
1528
+ * Panelled style adds contrast between the table navigation controls
1529
+ * and table content itself. It should be used in tables rendered outside
1530
+ * EUI containers like `<EuiPanel>` or `<EuiFlyout>`.
1531
+ * @default false
1532
+ */
1533
+ panelled: PropTypes.bool,
1504
1534
  /**
1505
1535
  * Message to display if table is empty
1506
1536
  */
@@ -10,7 +10,8 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
10
10
  */
11
11
 
12
12
  import { css, keyframes } from '@emotion/react';
13
- import { logicalCSS, euiCantAnimate, highContrastModeStyles, preventForcedColors } from '../../global_styling';
13
+ import { logicalCSS, euiCantAnimate, highContrastModeStyles, preventForcedColors, euiMinBreakpoint } from '../../global_styling';
14
+ import { EUI_BASIC_TABLE_PANEL_CLASS_NAME } from './use_panel_props';
14
15
  var tableLoadingLine = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n ", "\n ", "\n }\n\n 20% {\n ", "\n ", "\n }\n\n 80% {\n ", "\n ", "\n }\n\n 100% {\n ", "\n ", "\n }\n"])), logicalCSS('left', 0), logicalCSS('width', 0), logicalCSS('left', 0), logicalCSS('width', '40%'), logicalCSS('left', '60%'), logicalCSS('width', '40%'), logicalCSS('left', '100%'), logicalCSS('width', 0));
15
16
  export var euiBasicTableBodyLoading = function euiBasicTableBodyLoading(euiThemeContext) {
16
17
  var euiTheme = euiThemeContext.euiTheme;
@@ -19,6 +20,23 @@ export var euiBasicTableBodyLoading = function euiBasicTableBodyLoading(euiTheme
19
20
  }), ";}};label:euiBasicTableBodyLoading;");
20
21
  };
21
22
 
23
+ /**
24
+ * @internal
25
+ */
26
+ export var euiBasicTableWrapperPanelledStyles = function euiBasicTableWrapperPanelledStyles(responsiveBreakpoint) {
27
+ return function (theme) {
28
+ var euiTheme = theme.euiTheme;
29
+ var styles = /*#__PURE__*/css("border:", euiTheme.border.thin, ";border-block-end-width:0;padding-block-start:", euiTheme.border.width.thin, ";border-radius:", euiTheme.border.radius.medium, ";.euiTable{border-radius:", euiTheme.border.radius.medium, ";}.", EUI_BASIC_TABLE_PANEL_CLASS_NAME, "+.euiBasicTable &{border-start-start-radius:0;border-start-end-radius:0;.euiTable{border-start-start-radius:0;border-start-end-radius:0;}}&:not(:last-child),&:has(+ .", EUI_BASIC_TABLE_PANEL_CLASS_NAME, "){border-end-start-radius:0;border-end-end-radius:0;.euiTable{border-end-start-radius:0;border-end-end-radius:0;}};label:styles;");
30
+ if (responsiveBreakpoint === true) {
31
+ return null;
32
+ }
33
+ if (!responsiveBreakpoint) {
34
+ return styles;
35
+ }
36
+ return /*#__PURE__*/css(euiMinBreakpoint(theme, responsiveBreakpoint), "{", styles, ";};label:euiBasicTableWrapperPanelledStyles;");
37
+ };
38
+ };
39
+
22
40
  // Fix to make the loading indicator position correctly in Safari
23
41
  // For whatever annoying reason, Safari doesn't respect `position: relative;`
24
42
  // on `tbody` without `position: relative` on the parent `table`
@@ -1014,6 +1014,23 @@ EuiInMemoryTable.propTypes = {
1014
1014
  * Provides an infinite loading indicator
1015
1015
  */
1016
1016
  loading: PropTypes.bool,
1017
+ /**
1018
+ * Enable the panelled style of the table.
1019
+ *
1020
+ * Panelled style adds contrast between the table navigation controls
1021
+ * and table content itself. It should be used in tables rendered outside
1022
+ * EUI containers like `<EuiPanel>` or `<EuiFlyout>`.
1023
+ * @default false
1024
+ */
1025
+ /**
1026
+ * Enable the panelled style of the table.
1027
+ *
1028
+ * Panelled style adds contrast between the table navigation controls
1029
+ * and table content itself. It should be used in tables rendered outside
1030
+ * EUI containers like `<EuiPanel>` or `<EuiFlyout>`.
1031
+ * @default false
1032
+ */
1033
+ panelled: PropTypes.bool,
1017
1034
  /**
1018
1035
  * Applied to `EuiTableRow`
1019
1036
  */
@@ -7,4 +7,5 @@
7
7
  */
8
8
 
9
9
  export { EuiBasicTable } from './basic_table';
10
- export { EuiInMemoryTable } from './in_memory_table';
10
+ export { EuiInMemoryTable } from './in_memory_table';
11
+ export { useEuiBasicTablePanelProps } from './use_panel_props';
@@ -7,11 +7,24 @@
7
7
  */
8
8
 
9
9
  import React, { useEffect } from 'react';
10
- import { EuiSpacer } from '../spacer';
10
+ import { useEuiMemoizedStyles } from '../../services';
11
11
  import { EuiTablePagination, useEuiTablePaginationDefaults } from '../table/table_pagination';
12
+ import { useIsEuiTableResponsive } from '../table/mobile/responsive_context';
13
+ import { euiBasicTablePaginationBarStyles } from './pagination_bar.styles';
14
+
15
+ /**
16
+ * @internal
17
+ */
12
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
+ /**
20
+ * An internal utility component that renders EuiTablePagination with
21
+ * proper configuration and handles the `panelled` styles.
22
+ * @internal
23
+ */
13
24
  export var PaginationBar = function PaginationBar(_ref) {
14
25
  var pagination = _ref.pagination,
26
+ panelled = _ref.panelled,
27
+ responsiveBreakpoint = _ref.responsiveBreakpoint,
15
28
  onPageSizeChange = _ref.onPageSizeChange,
16
29
  onPageChange = _ref.onPageChange,
17
30
  ariaControls = _ref['aria-controls'],
@@ -26,14 +39,16 @@ export var PaginationBar = function PaginationBar(_ref) {
26
39
  _pagination$showPerPa = pagination.showPerPageOptions,
27
40
  showPerPageOptions = _pagination$showPerPa === void 0 ? defaults.showPerPageOptions : _pagination$showPerPa;
28
41
  var pageCount = pageSize ? Math.ceil(totalItemCount / pageSize) : 1;
42
+ var styles = useEuiMemoizedStyles(euiBasicTablePaginationBarStyles);
43
+ var isResponsive = useIsEuiTableResponsive(responsiveBreakpoint);
29
44
  useEffect(function () {
30
45
  if (pageCount < pageIndex + 1) {
31
46
  onPageChange === null || onPageChange === void 0 || onPageChange(pageCount - 1);
32
47
  }
33
48
  }, [pageCount, onPageChange, pageIndex]);
34
- return ___EmotionJSX("div", null, ___EmotionJSX(EuiSpacer, {
35
- size: "m"
36
- }), ___EmotionJSX(EuiTablePagination, {
49
+ return ___EmotionJSX("div", {
50
+ css: [styles.root, !isResponsive && panelled && styles.panelled, ";label:PaginationBar;"]
51
+ }, ___EmotionJSX(EuiTablePagination, {
37
52
  activePage: pageIndex,
38
53
  showPerPageOptions: showPerPageOptions,
39
54
  itemsPerPage: pageSize,
@@ -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
+
9
+ import { css } from '@emotion/react';
10
+ import { logicalShorthandCSS } from '../../global_styling';
11
+
12
+ /**
13
+ * @internal
14
+ */
15
+ export var euiBasicTablePaginationBarStyles = function euiBasicTablePaginationBarStyles(theme) {
16
+ var euiTheme = theme.euiTheme;
17
+ return {
18
+ root: /*#__PURE__*/css(logicalShorthandCSS('padding', "".concat(euiTheme.size.xs, " ").concat(euiTheme.size.s)), ";;label:root;"),
19
+ panelled: /*#__PURE__*/css("background:", euiTheme.colors.backgroundBaseSubdued, ";border:", euiTheme.border.thin, ";border-block-start-width:0;", logicalShorthandCSS('border-radius', "0 0 ".concat(euiTheme.border.radius.medium, " ").concat(euiTheme.border.radius.medium)), ";;label:panelled;")
20
+ };
21
+ };
@@ -0,0 +1,14 @@
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
+
9
+ import { css } from '@emotion/react';
10
+ import { logicalShorthandCSS } from '../../global_styling';
11
+ export var euiBasicTablePanelStyles = function euiBasicTablePanelStyles(_ref) {
12
+ var euiTheme = _ref.euiTheme;
13
+ return /*#__PURE__*/css("background-color:", euiTheme.colors.backgroundBaseSubdued, ";border:", euiTheme.border.thin, ";border-block-end-width:0;", logicalShorthandCSS('border-radius', "".concat(euiTheme.border.radius.medium, " ").concat(euiTheme.border.radius.medium, " 0 0")), "&+&{border-start-start-radius:0;border-start-end-radius:0;};label:euiBasicTablePanelStyles;");
14
+ };
@@ -0,0 +1,28 @@
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
+
9
+ import { useEuiMemoizedStyles } from '../../services';
10
+ import { euiBasicTablePanelStyles } from './panel.styles';
11
+
12
+ /**
13
+ * @internal
14
+ */
15
+ export var EUI_BASIC_TABLE_PANEL_CLASS_NAME = 'euiBasicTablePanel';
16
+
17
+ /**
18
+ * A utility hook that returns props needed to be passed to element(s) being
19
+ * a part of the paneled table look and feel (e.g., a toolbar above the table).
20
+ * @beta
21
+ */
22
+ export var useEuiBasicTablePanelProps = function useEuiBasicTablePanelProps() {
23
+ var css = useEuiMemoizedStyles(euiBasicTablePanelStyles);
24
+ return {
25
+ css: css,
26
+ className: EUI_BASIC_TABLE_PANEL_CLASS_NAME
27
+ };
28
+ };