@elastic/eui 116.3.0 → 116.3.1-snapshot.1782218964187

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 (218) 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/flyout/flyout.component.js +10 -6
  15. package/es/components/flyout/flyout_menu.js +122 -19
  16. package/es/components/flyout/flyout_menu.styles.js +2 -1
  17. package/es/components/flyout/manager/actions.js +20 -0
  18. package/es/components/flyout/manager/flyout_child.js +23 -1
  19. package/es/components/flyout/manager/flyout_managed.js +65 -19
  20. package/es/components/flyout/manager/hooks.js +1 -1
  21. package/es/components/flyout/manager/index.js +2 -2
  22. package/es/components/flyout/manager/reducer.js +32 -8
  23. package/es/components/flyout/manager/selectors.js +8 -2
  24. package/es/components/flyout/manager/store.js +35 -2
  25. package/es/components/flyout/use_flyout_menu.js +2 -2
  26. package/es/components/form/form_control_layout/form_control_layout_icons.js +95 -143
  27. package/es/components/notification_icon/assets/info_fill.js +34 -0
  28. package/es/components/notification_icon/assets/warning_static.js +40 -0
  29. package/es/components/notification_icon/notification_icon.js +87 -0
  30. package/es/components/notification_icon/notification_icon.styles.js +22 -0
  31. package/es/components/table/mobile/table_sort_mobile.js +64 -103
  32. package/es/components/table/store/use_unique_column_id.js +25 -0
  33. package/es/components/table/table_header_cell.js +7 -8
  34. package/es/components/table/table_header_cell_checkbox.js +5 -6
  35. package/es/components/toast/global_toast_list.js +132 -6
  36. package/es/components/toast/global_toast_list.styles.js +31 -7
  37. package/es/components/toast/toast.js +242 -47
  38. package/es/components/toast/toast.styles.js +35 -47
  39. package/es/components/toast/toast_action.js +34 -0
  40. package/es/components/toast/types.js +9 -0
  41. package/es/components/tool_tip/tool_tip.js +61 -30
  42. package/es/components/tool_tip/tool_tip_anchor.js +5 -5
  43. package/es/components/tool_tip/tool_tip_manager.js +27 -2
  44. package/eui.d.ts +811 -552
  45. package/i18ntokens.json +981 -927
  46. package/lib/components/avatar/avatar.js +4 -0
  47. package/lib/components/avatar/avatar.styles.js +16 -16
  48. package/lib/components/banner/banner.js +1 -2
  49. package/lib/components/banner/banner.styles.js +1 -1
  50. package/lib/components/basic_table/basic_table.js +34 -4
  51. package/lib/components/basic_table/basic_table.styles.js +19 -1
  52. package/lib/components/basic_table/in_memory_table.js +17 -0
  53. package/lib/components/basic_table/index.js +8 -1
  54. package/lib/components/basic_table/pagination_bar.js +19 -4
  55. package/lib/components/basic_table/pagination_bar.styles.js +26 -0
  56. package/lib/components/basic_table/panel.styles.js +20 -0
  57. package/lib/components/basic_table/use_panel_props.js +33 -0
  58. package/lib/components/date_picker/auto_refresh/refresh_interval.js +175 -229
  59. package/lib/components/flyout/flyout.component.js +10 -6
  60. package/lib/components/flyout/flyout_menu.js +120 -19
  61. package/lib/components/flyout/flyout_menu.styles.js +2 -1
  62. package/lib/components/flyout/manager/actions.js +21 -1
  63. package/lib/components/flyout/manager/flyout_child.js +23 -1
  64. package/lib/components/flyout/manager/flyout_managed.js +41 -17
  65. package/lib/components/flyout/manager/hooks.js +6 -0
  66. package/lib/components/flyout/manager/index.js +12 -0
  67. package/lib/components/flyout/manager/reducer.js +31 -7
  68. package/lib/components/flyout/manager/selectors.js +9 -3
  69. package/lib/components/flyout/manager/store.js +34 -1
  70. package/lib/components/flyout/use_flyout_menu.js +2 -2
  71. package/lib/components/form/form_control_layout/form_control_layout_icons.js +95 -145
  72. package/lib/components/notification_icon/assets/info_fill.js +41 -0
  73. package/lib/components/notification_icon/assets/warning_static.js +47 -0
  74. package/lib/components/notification_icon/notification_icon.js +93 -0
  75. package/lib/components/notification_icon/notification_icon.styles.js +28 -0
  76. package/lib/components/notification_icon/svgs/info_fill.svg +3 -0
  77. package/lib/components/notification_icon/svgs/warning_static.svg +5 -0
  78. package/lib/components/table/mobile/table_sort_mobile.js +71 -108
  79. package/lib/components/table/store/use_unique_column_id.js +34 -0
  80. package/lib/components/table/table_header_cell.js +7 -8
  81. package/lib/components/table/table_header_cell_checkbox.js +5 -6
  82. package/lib/components/toast/global_toast_list.js +132 -6
  83. package/lib/components/toast/global_toast_list.styles.js +31 -8
  84. package/lib/components/toast/toast.js +244 -47
  85. package/lib/components/toast/toast.styles.js +32 -45
  86. package/lib/components/toast/toast_action.js +40 -0
  87. package/lib/components/toast/types.js +15 -0
  88. package/lib/components/tool_tip/tool_tip.js +59 -29
  89. package/lib/components/tool_tip/tool_tip_anchor.js +5 -5
  90. package/lib/components/tool_tip/tool_tip_manager.js +27 -2
  91. package/optimize/es/components/avatar/avatar.js +4 -0
  92. package/optimize/es/components/avatar/avatar.styles.js +16 -16
  93. package/optimize/es/components/banner/banner.js +1 -2
  94. package/optimize/es/components/banner/banner.styles.js +1 -1
  95. package/optimize/es/components/basic_table/basic_table.js +18 -5
  96. package/optimize/es/components/basic_table/basic_table.styles.js +19 -1
  97. package/optimize/es/components/basic_table/index.js +2 -1
  98. package/optimize/es/components/basic_table/pagination_bar.js +19 -4
  99. package/optimize/es/components/basic_table/pagination_bar.styles.js +21 -0
  100. package/optimize/es/components/basic_table/panel.styles.js +14 -0
  101. package/optimize/es/components/basic_table/use_panel_props.js +28 -0
  102. package/optimize/es/components/date_picker/auto_refresh/refresh_interval.js +172 -196
  103. package/optimize/es/components/flyout/flyout.component.js +10 -6
  104. package/optimize/es/components/flyout/flyout_menu.js +99 -18
  105. package/optimize/es/components/flyout/flyout_menu.styles.js +2 -1
  106. package/optimize/es/components/flyout/manager/actions.js +20 -0
  107. package/optimize/es/components/flyout/manager/flyout_managed.js +42 -18
  108. package/optimize/es/components/flyout/manager/hooks.js +1 -1
  109. package/optimize/es/components/flyout/manager/index.js +2 -2
  110. package/optimize/es/components/flyout/manager/reducer.js +32 -8
  111. package/optimize/es/components/flyout/manager/selectors.js +8 -2
  112. package/optimize/es/components/flyout/manager/store.js +35 -2
  113. package/optimize/es/components/flyout/use_flyout_menu.js +2 -2
  114. package/optimize/es/components/form/form_control_layout/form_control_layout_icons.js +96 -115
  115. package/optimize/es/components/notification_icon/assets/info_fill.js +33 -0
  116. package/optimize/es/components/notification_icon/assets/warning_static.js +39 -0
  117. package/optimize/es/components/notification_icon/notification_icon.js +77 -0
  118. package/optimize/es/components/notification_icon/notification_icon.styles.js +22 -0
  119. package/optimize/es/components/table/mobile/table_sort_mobile.js +59 -82
  120. package/optimize/es/components/table/store/use_unique_column_id.js +25 -0
  121. package/optimize/es/components/table/table_header_cell.js +7 -8
  122. package/optimize/es/components/table/table_header_cell_checkbox.js +5 -6
  123. package/optimize/es/components/toast/global_toast_list.js +31 -6
  124. package/optimize/es/components/toast/global_toast_list.styles.js +31 -7
  125. package/optimize/es/components/toast/toast.js +143 -47
  126. package/optimize/es/components/toast/toast.styles.js +35 -47
  127. package/optimize/es/components/toast/toast_action.js +33 -0
  128. package/optimize/es/components/toast/types.js +9 -0
  129. package/optimize/es/components/tool_tip/tool_tip.js +58 -30
  130. package/optimize/es/components/tool_tip/tool_tip_anchor.js +5 -5
  131. package/optimize/es/components/tool_tip/tool_tip_manager.js +27 -2
  132. package/optimize/lib/components/avatar/avatar.js +4 -0
  133. package/optimize/lib/components/avatar/avatar.styles.js +16 -16
  134. package/optimize/lib/components/banner/banner.js +1 -2
  135. package/optimize/lib/components/banner/banner.styles.js +1 -1
  136. package/optimize/lib/components/basic_table/basic_table.js +17 -4
  137. package/optimize/lib/components/basic_table/basic_table.styles.js +19 -1
  138. package/optimize/lib/components/basic_table/index.js +8 -1
  139. package/optimize/lib/components/basic_table/pagination_bar.js +19 -4
  140. package/optimize/lib/components/basic_table/pagination_bar.styles.js +26 -0
  141. package/optimize/lib/components/basic_table/panel.styles.js +20 -0
  142. package/optimize/lib/components/basic_table/use_panel_props.js +33 -0
  143. package/optimize/lib/components/date_picker/auto_refresh/refresh_interval.js +170 -194
  144. package/optimize/lib/components/flyout/flyout.component.js +10 -6
  145. package/optimize/lib/components/flyout/flyout_menu.js +98 -18
  146. package/optimize/lib/components/flyout/flyout_menu.styles.js +2 -1
  147. package/optimize/lib/components/flyout/manager/actions.js +21 -1
  148. package/optimize/lib/components/flyout/manager/flyout_managed.js +41 -17
  149. package/optimize/lib/components/flyout/manager/hooks.js +6 -0
  150. package/optimize/lib/components/flyout/manager/index.js +12 -0
  151. package/optimize/lib/components/flyout/manager/reducer.js +31 -7
  152. package/optimize/lib/components/flyout/manager/selectors.js +9 -3
  153. package/optimize/lib/components/flyout/manager/store.js +34 -1
  154. package/optimize/lib/components/flyout/use_flyout_menu.js +2 -2
  155. package/optimize/lib/components/form/form_control_layout/form_control_layout_icons.js +96 -117
  156. package/optimize/lib/components/notification_icon/assets/info_fill.js +41 -0
  157. package/optimize/lib/components/notification_icon/assets/warning_static.js +47 -0
  158. package/optimize/lib/components/notification_icon/notification_icon.js +83 -0
  159. package/optimize/lib/components/notification_icon/notification_icon.styles.js +28 -0
  160. package/optimize/lib/components/notification_icon/svgs/info_fill.svg +3 -0
  161. package/optimize/lib/components/notification_icon/svgs/warning_static.svg +5 -0
  162. package/optimize/lib/components/table/mobile/table_sort_mobile.js +61 -83
  163. package/optimize/lib/components/table/store/use_unique_column_id.js +34 -0
  164. package/optimize/lib/components/table/table_header_cell.js +7 -8
  165. package/optimize/lib/components/table/table_header_cell_checkbox.js +5 -6
  166. package/optimize/lib/components/toast/global_toast_list.js +31 -6
  167. package/optimize/lib/components/toast/global_toast_list.styles.js +30 -7
  168. package/optimize/lib/components/toast/toast.js +146 -47
  169. package/optimize/lib/components/toast/toast.styles.js +33 -45
  170. package/optimize/lib/components/toast/toast_action.js +39 -0
  171. package/optimize/lib/components/toast/types.js +15 -0
  172. package/optimize/lib/components/tool_tip/tool_tip.js +57 -29
  173. package/optimize/lib/components/tool_tip/tool_tip_anchor.js +5 -5
  174. package/optimize/lib/components/tool_tip/tool_tip_manager.js +27 -2
  175. package/package.json +9 -6
  176. package/test-env/components/avatar/avatar.js +4 -0
  177. package/test-env/components/avatar/avatar.styles.js +16 -16
  178. package/test-env/components/banner/banner.js +1 -2
  179. package/test-env/components/banner/banner.styles.js +1 -1
  180. package/test-env/components/basic_table/basic_table.js +34 -4
  181. package/test-env/components/basic_table/basic_table.styles.js +19 -1
  182. package/test-env/components/basic_table/in_memory_table.js +17 -0
  183. package/test-env/components/basic_table/index.js +8 -1
  184. package/test-env/components/basic_table/pagination_bar.js +19 -4
  185. package/test-env/components/basic_table/pagination_bar.styles.js +26 -0
  186. package/test-env/components/basic_table/panel.styles.js +20 -0
  187. package/test-env/components/basic_table/use_panel_props.js +33 -0
  188. package/test-env/components/date_picker/auto_refresh/refresh_interval.js +170 -220
  189. package/test-env/components/flyout/flyout.component.js +10 -6
  190. package/test-env/components/flyout/flyout_menu.js +121 -19
  191. package/test-env/components/flyout/flyout_menu.styles.js +2 -1
  192. package/test-env/components/flyout/manager/actions.js +21 -1
  193. package/test-env/components/flyout/manager/flyout_child.js +23 -1
  194. package/test-env/components/flyout/manager/flyout_managed.js +41 -17
  195. package/test-env/components/flyout/manager/hooks.js +6 -0
  196. package/test-env/components/flyout/manager/index.js +12 -0
  197. package/test-env/components/flyout/manager/reducer.js +31 -7
  198. package/test-env/components/flyout/manager/selectors.js +9 -3
  199. package/test-env/components/flyout/manager/store.js +34 -1
  200. package/test-env/components/flyout/use_flyout_menu.js +2 -2
  201. package/test-env/components/form/form_control_layout/form_control_layout_icons.js +95 -139
  202. package/test-env/components/notification_icon/assets/info_fill.js +41 -0
  203. package/test-env/components/notification_icon/assets/warning_static.js +47 -0
  204. package/test-env/components/notification_icon/notification_icon.js +46 -0
  205. package/test-env/components/notification_icon/notification_icon.styles.js +28 -0
  206. package/test-env/components/table/mobile/table_sort_mobile.js +61 -98
  207. package/test-env/components/table/store/use_unique_column_id.js +34 -0
  208. package/test-env/components/table/table_header_cell.js +7 -8
  209. package/test-env/components/table/table_header_cell_checkbox.js +5 -6
  210. package/test-env/components/toast/global_toast_list.js +132 -6
  211. package/test-env/components/toast/global_toast_list.styles.js +30 -7
  212. package/test-env/components/toast/toast.js +242 -47
  213. package/test-env/components/toast/toast.styles.js +33 -45
  214. package/test-env/components/toast/toast_action.js +39 -0
  215. package/test-env/components/toast/types.js +15 -0
  216. package/test-env/components/tool_tip/tool_tip.js +57 -29
  217. package/test-env/components/tool_tip/tool_tip_anchor.js +5 -5
  218. package/test-env/components/tool_tip/tool_tip_manager.js +27 -2
@@ -18,6 +18,8 @@ export var ACTION_CLOSE_ALL = "".concat(PREFIX, "/closeAll");
18
18
  export var ACTION_SET_ACTIVE = "".concat(PREFIX, "/setActive");
19
19
  /** Dispatched when an active flyout's pixel width changes (for responsive layout). */
20
20
  export var ACTION_SET_WIDTH = "".concat(PREFIX, "/setWidth");
21
+ /** Dispatched to set a flyout's menu pagination. */
22
+ export var ACTION_SET_PAGINATION = "".concat(PREFIX, "/setPagination");
21
23
  /** Dispatched to switch layout mode between `side-by-side` and `stacked`. */
22
24
  export var ACTION_SET_LAYOUT_MODE = "".concat(PREFIX, "/setLayoutMode");
23
25
  /** Dispatched to update a flyout's activity stage (e.g., opening -> active). */
@@ -48,6 +50,8 @@ export var ACTION_CLOSE_UNMANAGED_FLYOUT = "".concat(PREFIX, "/closeUnmanagedFly
48
50
 
49
51
  /** Update a flyout's measured width in pixels. */
50
52
 
53
+ /** Set the manager pagination value for a flyout. */
54
+
51
55
  /** Change how flyouts are arranged: `side-by-side` or `stacked`. */
52
56
 
53
57
  /** Set a specific flyout's activity stage. */
@@ -122,6 +126,22 @@ export var setFlyoutWidth = function setFlyoutWidth(flyoutId, width) {
122
126
  };
123
127
  };
124
128
 
129
+ /**
130
+ * Set (or clear) the menu pagination config for a flyout. When set, this
131
+ * overrides any pagination passed via `flyoutMenuProps.pagination` on the
132
+ * flyout itself, allowing reactive updates from a different React root.
133
+ *
134
+ * Only works for managed flyouts. Unmanaged flyouts (session={false}) must use
135
+ * the `flyoutMenuProps.pagination` prop instead.
136
+ */
137
+ export var setPagination = function setPagination(flyoutId, pagination) {
138
+ return {
139
+ type: ACTION_SET_PAGINATION,
140
+ flyoutId: flyoutId,
141
+ pagination: pagination
142
+ };
143
+ };
144
+
125
145
  /** Switch layout mode between `side-by-side` and `stacked`. */
126
146
  export var setLayoutMode = function setLayoutMode(layoutMode) {
127
147
  return {
@@ -26,7 +26,7 @@ import { useFlyoutActivityStage } from './activity_stage';
26
26
  import { LAYOUT_MODE_SIDE_BY_SIDE, LEVEL_CHILD, LEVEL_MAIN, PROPERTY_FLYOUT, PROPERTY_LAYOUT_MODE, PROPERTY_LEVEL } from './const';
27
27
  import { EuiFlyoutIsManagedProvider } from './context';
28
28
  import { euiManagedFlyoutStyles } from './flyout_managed.styles';
29
- import { useFlyoutManager as _useFlyoutManager, useFlyoutId } from './hooks';
29
+ import { useFlyoutManager as _useFlyoutManager, useFlyoutId, useFlyoutPagination } from './hooks';
30
30
  import { useIsFlyoutRegistered } from './selectors';
31
31
  import { getFlyoutManagerStore } from './store';
32
32
  import { createValidationErrorMessage, isNamedSize, validateManagedFlyoutSize, validateSizeCombination } from './validation';
@@ -144,10 +144,10 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref2, ref) {
144
144
 
145
145
  // Stabilize the onClose callback
146
146
  var onCloseCallbackRef = useRef();
147
- onCloseCallbackRef.current = function (e) {
147
+ onCloseCallbackRef.current = function (e, meta) {
148
148
  if (onCloseProp) {
149
149
  var event = e || new MouseEvent('click');
150
- onCloseProp(event);
150
+ onCloseProp(event, meta);
151
151
  }
152
152
  };
153
153
 
@@ -172,17 +172,20 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref2, ref) {
172
172
  useLayoutEffect(function () {
173
173
  addFlyout(flyoutId, title, level, size, level === LEVEL_MAIN ? historyKey : undefined, _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.iconType, typeof minWidth === 'number' ? minWidth : undefined);
174
174
  return function () {
175
- var currentStoreState = getFlyoutManagerStore().getState();
176
- var stillInStore = currentStoreState.flyouts.some(function (f) {
175
+ var store = getFlyoutManagerStore();
176
+ var stillInStore = store.getState().flyouts.some(function (f) {
177
177
  return f.flyoutId === flyoutId;
178
178
  });
179
179
  if (stillInStore) {
180
180
  // Normal cleanup (deps changed or explicit close via isOpen=false)
181
181
  level === LEVEL_MAIN ? closeAllFlyouts() : closeFlyout(flyoutId);
182
182
  } else if (wasRegisteredRef.current) {
183
- var _onCloseCallbackRef$c;
184
- // Cascade close: was registered but removed externally (e.g. main closed)
185
- (_onCloseCallbackRef$c = onCloseCallbackRef.current) === null || _onCloseCallbackRef$c === void 0 || _onCloseCallbackRef$c.call(onCloseCallbackRef, new MouseEvent('navigation'));
183
+ var _onCloseCallbackRef$c, _store$consumeCloseMe;
184
+ // Removed externally while mounted: forward the store-stamped reason
185
+ // (e.g. `navigation-back` from goBack), defaulting to cascade.
186
+ (_onCloseCallbackRef$c = onCloseCallbackRef.current) === null || _onCloseCallbackRef$c === void 0 || _onCloseCallbackRef$c.call(onCloseCallbackRef, new MouseEvent('navigation'), (_store$consumeCloseMe = store.consumeCloseMeta(flyoutId)) !== null && _store$consumeCloseMe !== void 0 ? _store$consumeCloseMe : {
187
+ reason: 'navigation-cascade'
188
+ });
186
189
  }
187
190
  wasRegisteredRef.current = false;
188
191
  };
@@ -195,11 +198,16 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref2, ref) {
195
198
  wasRegisteredRef.current = true;
196
199
  }
197
200
 
198
- // If flyout was previously registered, is marked as open, but no longer exists in manager state,
199
- // it was removed via navigation (Back button) - trigger close callback
201
+ // If flyout was previously registered, is marked as open, but no longer
202
+ // exists in manager state, it was removed externally while still mounted.
203
+ // Forward the store-stamped reason (e.g. `navigation-back` from goBack);
204
+ // any other removal (e.g. a closeAllFlyouts cascade reaching a backgrounded
205
+ // flyout) defaults to `navigation-cascade`.
200
206
  if (wasRegisteredRef.current && !flyoutExistsInManager) {
201
- var _onCloseCallbackRef$c2;
202
- (_onCloseCallbackRef$c2 = onCloseCallbackRef.current) === null || _onCloseCallbackRef$c2 === void 0 || _onCloseCallbackRef$c2.call(onCloseCallbackRef, new MouseEvent('navigation'));
207
+ var _onCloseCallbackRef$c2, _getFlyoutManagerStor;
208
+ (_onCloseCallbackRef$c2 = onCloseCallbackRef.current) === null || _onCloseCallbackRef$c2 === void 0 || _onCloseCallbackRef$c2.call(onCloseCallbackRef, new MouseEvent('navigation'), (_getFlyoutManagerStor = getFlyoutManagerStore().consumeCloseMeta(flyoutId)) !== null && _getFlyoutManagerStor !== void 0 ? _getFlyoutManagerStor : {
209
+ reason: 'navigation-cascade'
210
+ });
203
211
  wasRegisteredRef.current = false; // Reset to avoid repeated calls
204
212
  }
205
213
  }, [flyoutExistsInManager, flyoutId]);
@@ -223,7 +231,12 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref2, ref) {
223
231
  width = _useResizeObserver.width;
224
232
 
225
233
  // Pass the stabilized onClose callback to the flyout menu context
226
- var onClose = function onClose(e) {
234
+ var onClose = function onClose(e, meta) {
235
+ // Clear before flushSync so that effects flushed synchronously inside it
236
+ // (the navigation-back detector) see wasRegisteredRef = false and do not
237
+ // misidentify this user-initiated close as a Back-button navigation.
238
+ wasRegisteredRef.current = false;
239
+
227
240
  // CRITICAL: Update manager state FIRST before allowing React to unmount
228
241
  // This prevents race conditions during portal → inline DOM transitions
229
242
  // and ensures cascade close logic runs before DOM cleanup begins
@@ -231,10 +244,9 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref2, ref) {
231
244
  flushSync(function () {
232
245
  level === LEVEL_MAIN ? closeAllFlyouts() : closeFlyout(flyoutId);
233
246
  });
234
- wasRegisteredRef.current = false; // Prevent cleanup from double-firing onClose
235
247
  if (onCloseCallbackRef.current) {
236
248
  var event = e || new MouseEvent('click');
237
- onCloseCallbackRef.current(event);
249
+ onCloseCallbackRef.current(event, meta);
238
250
  }
239
251
  };
240
252
 
@@ -263,11 +275,23 @@ export var EuiManagedFlyout = /*#__PURE__*/forwardRef(function (_ref2, ref) {
263
275
  } : undefined;
264
276
  }, [level, goBack]);
265
277
  var showBackButton = historyItems ? historyItems.length > 0 : false;
278
+
279
+ // When the store has a defined pagination value it takes precedence; the
280
+ // prop acts as a fallback for callers that don't use the cross-root store.
281
+ // Using both simultaneously is not supported and will log a warning in dev.
282
+ var storePagination = useFlyoutPagination(flyoutId);
283
+ var propPagination = _flyoutMenuProps === null || _flyoutMenuProps === void 0 ? void 0 : _flyoutMenuProps.pagination;
284
+ if (process.env.NODE_ENV === 'development' && storePagination != null && propPagination != null) {
285
+ console.warn("flyout-pagination-dual-source-".concat(flyoutId), "[EuiFlyoutManager] flyout \"".concat(flyoutId, "\" has pagination set both via the store (setPagination) ") + 'and via flyoutMenuProps.pagination. The store value will be used. Remove one source to avoid confusion.');
286
+ }
287
+ var pagination = storePagination !== null && storePagination !== void 0 ? storePagination : propPagination;
288
+ var showPaginationControls = pagination != null && pagination.total > 1;
266
289
  var flyoutMenuProps = _objectSpread(_objectSpread({}, _flyoutMenuProps), {}, {
267
- historyItems: historyItems,
268
- showBackButton: showBackButton,
290
+ historyItems: showPaginationControls ? [] : historyItems,
291
+ showBackButton: showPaginationControls ? false : showBackButton,
269
292
  backButtonProps: backButtonProps,
270
- title: title
293
+ title: title,
294
+ pagination: pagination
271
295
  });
272
296
  return ___EmotionJSX(EuiFlyoutIsManagedProvider, {
273
297
  isManaged: true
@@ -13,7 +13,7 @@ import { useIsFlyoutRegistered } from './selectors';
13
13
 
14
14
  // Ensure uniqueness across multiple hook instances, including in test envs
15
15
  var autoGeneratedFlyoutIdCounter = 0;
16
- export { useIsFlyoutActive, useHasActiveSession, useCurrentSession, useCurrentMainFlyout, useCurrentChildFlyout, useFlyoutWidth, useParentFlyoutSize, useHasChildFlyout, usePushPaddingOffsets, useHasPushPadding } from './selectors';
16
+ export { useIsFlyoutActive, useHasActiveSession, useCurrentSession, useCurrentMainFlyout, useCurrentChildFlyout, useFlyoutWidth, useFlyoutPagination, useParentFlyoutSize, useHasChildFlyout, usePushPaddingOffsets, useHasPushPadding } from './selectors';
17
17
  export { useFlyoutLayoutMode } from './layout_mode';
18
18
  export { useIsInManagedFlyout } from './context';
19
19
 
@@ -9,7 +9,7 @@
9
9
  /**
10
10
  * Convenience re-exports of bound action creators for external usage.
11
11
  */
12
- export { addFlyout as addFlyoutAction, closeFlyout as closeFlyoutAction, closeAllFlyouts as closeAllFlyoutsAction, setActiveFlyout as setActiveFlyoutAction, setFlyoutWidth as setFlyoutWidthAction, setPushPadding as setPushPaddingAction, setActivityStage as setActivityStageAction } from './actions';
12
+ export { addFlyout as addFlyoutAction, closeFlyout as closeFlyoutAction, closeAllFlyouts as closeAllFlyoutsAction, setActiveFlyout as setActiveFlyoutAction, setFlyoutWidth as setFlyoutWidthAction, setPagination as setPaginationAction, setPushPadding as setPushPaddingAction, setActivityStage as setActivityStageAction } from './actions';
13
13
 
14
14
  /** Reducer and default state for the flyout manager. */
15
15
  export { flyoutManagerReducer, initialState } from './reducer';
@@ -25,7 +25,7 @@ export { EuiFlyoutManager } from './provider';
25
25
  /**
26
26
  * Selectors and derived state hooks for managed flyouts.
27
27
  */
28
- export { useCurrentChildFlyout, useCurrentMainFlyout, useCurrentSession, useFlyoutId, useFlyoutLayoutMode, useFlyoutManager, useFlyoutWidth, useHasChildFlyout, useIsFlyoutActive, useIsInManagedFlyout, useHasActiveSession, useParentFlyoutSize, usePushPaddingOffsets, useHasPushPadding } from './hooks';
28
+ export { useCurrentChildFlyout, useCurrentMainFlyout, useCurrentSession, useFlyoutId, useFlyoutLayoutMode, useFlyoutManager, useFlyoutPagination, useFlyoutWidth, useHasChildFlyout, useIsFlyoutActive, useIsInManagedFlyout, useHasActiveSession, useParentFlyoutSize, usePushPaddingOffsets, useHasPushPadding } from './hooks';
29
29
  export { EuiFlyoutChild } from './flyout_child';
30
30
  export { EuiFlyoutMain } from './flyout_main';
31
31
 
@@ -10,7 +10,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  * Side Public License, v 1.
11
11
  */
12
12
 
13
- import { ACTION_ADD, ACTION_CLOSE, ACTION_CLOSE_ALL, ACTION_SET_ACTIVE, ACTION_SET_LAYOUT_MODE, ACTION_SET_WIDTH, ACTION_SET_ACTIVITY_STAGE, ACTION_GO_BACK, ACTION_GO_TO_FLYOUT, ACTION_SET_PUSH_PADDING, ACTION_ADD_UNMANAGED_FLYOUT, ACTION_CLOSE_UNMANAGED_FLYOUT, ACTION_SET_CONTAINER_ELEMENT, ACTION_SET_REFERENCE_WIDTH } from './actions';
13
+ import { ACTION_ADD, ACTION_CLOSE, ACTION_CLOSE_ALL, ACTION_SET_ACTIVE, ACTION_SET_LAYOUT_MODE, ACTION_SET_WIDTH, ACTION_SET_PAGINATION, ACTION_SET_ACTIVITY_STAGE, ACTION_GO_BACK, ACTION_GO_TO_FLYOUT, ACTION_SET_PUSH_PADDING, ACTION_ADD_UNMANAGED_FLYOUT, ACTION_CLOSE_UNMANAGED_FLYOUT, ACTION_SET_CONTAINER_ELEMENT, ACTION_SET_REFERENCE_WIDTH } from './actions';
14
14
  import { LAYOUT_MODE_SIDE_BY_SIDE, LEVEL_MAIN, LEVEL_CHILD, STAGE_OPENING } from './const';
15
15
  /**
16
16
  * Default flyout manager state used to initialize the reducer.
@@ -351,6 +351,30 @@ export function flyoutManagerReducer() {
351
351
  });
352
352
  }
353
353
 
354
+ // Update a flyout's menu pagination. No-op if unchanged or missing.
355
+ case ACTION_SET_PAGINATION:
356
+ {
357
+ var _flyoutId2 = action.flyoutId,
358
+ pagination = action.pagination;
359
+ var target = state.flyouts.find(function (f) {
360
+ return f.flyoutId === _flyoutId2;
361
+ });
362
+ if (!target) {
363
+ return state;
364
+ }
365
+ if (target.pagination === pagination) {
366
+ return state;
367
+ }
368
+ var _updatedFlyouts = state.flyouts.map(function (flyout) {
369
+ return flyout.flyoutId === _flyoutId2 ? _objectSpread(_objectSpread({}, flyout), {}, {
370
+ pagination: pagination
371
+ }) : flyout;
372
+ });
373
+ return _objectSpread(_objectSpread({}, state), {}, {
374
+ flyouts: _updatedFlyouts
375
+ });
376
+ }
377
+
354
378
  // Switch global layout mode for managed flyouts.
355
379
  case ACTION_SET_LAYOUT_MODE:
356
380
  {
@@ -362,14 +386,14 @@ export function flyoutManagerReducer() {
362
386
  // Update a flyout's activity stage in state
363
387
  case ACTION_SET_ACTIVITY_STAGE:
364
388
  {
365
- var _flyoutId2 = action.flyoutId;
366
- var _updatedFlyouts = state.flyouts.map(function (flyout) {
367
- return flyout.flyoutId === _flyoutId2 ? _objectSpread(_objectSpread({}, flyout), {}, {
389
+ var _flyoutId3 = action.flyoutId;
390
+ var _updatedFlyouts2 = state.flyouts.map(function (flyout) {
391
+ return flyout.flyoutId === _flyoutId3 ? _objectSpread(_objectSpread({}, flyout), {}, {
368
392
  activityStage: action.activityStage
369
393
  }) : flyout;
370
394
  });
371
395
  return _objectSpread(_objectSpread({}, state), {}, {
372
- flyouts: _updatedFlyouts
396
+ flyouts: _updatedFlyouts2
373
397
  });
374
398
  }
375
399
 
@@ -423,7 +447,7 @@ export function flyoutManagerReducer() {
423
447
  // Navigate to a specific flyout (by main session or by child in current session's history)
424
448
  case ACTION_GO_TO_FLYOUT:
425
449
  {
426
- var _flyoutId3 = action.flyoutId,
450
+ var _flyoutId4 = action.flyoutId,
427
451
  _level = action.level;
428
452
  var _currentSessionIndex4 = state.sessions.length - 1;
429
453
  if (_level === LEVEL_CHILD && state.sessions.length > 0) {
@@ -431,7 +455,7 @@ export function flyoutManagerReducer() {
431
455
  var _currentSession3 = state.sessions[_currentSessionIndex4];
432
456
  var _childHistory2 = (_currentSession3$chil = _currentSession3.childHistory) !== null && _currentSession3$chil !== void 0 ? _currentSession3$chil : [];
433
457
  var targetIndex = _childHistory2.findIndex(function (entry) {
434
- return entry.flyoutId === _flyoutId3;
458
+ return entry.flyoutId === _flyoutId4;
435
459
  });
436
460
  if (targetIndex === -1) {
437
461
  return state; // Target child not in history
@@ -463,7 +487,7 @@ export function flyoutManagerReducer() {
463
487
 
464
488
  // Navigate by main flyout: remove all sessions after the target
465
489
  var targetSessionIndex = state.sessions.findIndex(function (session) {
466
- return session.mainFlyoutId === _flyoutId3;
490
+ return session.mainFlyoutId === _flyoutId4;
467
491
  });
468
492
  if (targetSessionIndex === -1) {
469
493
  return state; // Target flyout not found
@@ -74,10 +74,16 @@ export var useFlyoutWidth = function useFlyoutWidth(flyoutId) {
74
74
  return (_useFlyout = useFlyout(flyoutId)) === null || _useFlyout === void 0 ? void 0 : _useFlyout.width;
75
75
  };
76
76
 
77
+ /** Returns the store pagination override for a flyout, if set. */
78
+ export var useFlyoutPagination = function useFlyoutPagination(flyoutId) {
79
+ var _useFlyout2;
80
+ return (_useFlyout2 = useFlyout(flyoutId)) === null || _useFlyout2 === void 0 ? void 0 : _useFlyout2.pagination;
81
+ };
82
+
77
83
  /** The configured minWidth (px) of the specified flyout, or `undefined` if not set. */
78
84
  export var useFlyoutMinWidth = function useFlyoutMinWidth(flyoutId) {
79
- var _useFlyout2;
80
- return (_useFlyout2 = useFlyout(flyoutId)) === null || _useFlyout2 === void 0 ? void 0 : _useFlyout2.minWidth;
85
+ var _useFlyout3;
86
+ return (_useFlyout3 = useFlyout(flyoutId)) === null || _useFlyout3 === void 0 ? void 0 : _useFlyout3.minWidth;
81
87
  };
82
88
 
83
89
  /** The configured size of the parent (main) flyout for a given child flyout ID. */
@@ -7,7 +7,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
7
7
  * Side Public License, v 1.
8
8
  */
9
9
 
10
- import { addFlyout as addFlyoutAction, closeFlyout as closeFlyoutAction, closeAllFlyouts as closeAllFlyoutsAction, setActiveFlyout as setActiveFlyoutAction, setFlyoutWidth as setFlyoutWidthAction, setPushPadding as setPushPaddingAction, goBack as goBackAction, goToFlyout as goToFlyoutAction, addUnmanagedFlyout as addUnmanagedFlyoutAction, closeUnmanagedFlyout as closeUnmanagedFlyoutAction, setContainerElement as setContainerElementAction } from './actions';
10
+ import { addFlyout as addFlyoutAction, closeFlyout as closeFlyoutAction, closeAllFlyouts as closeAllFlyoutsAction, setActiveFlyout as setActiveFlyoutAction, setFlyoutWidth as setFlyoutWidthAction, setPagination as setPaginationAction, setPushPadding as setPushPaddingAction, goBack as goBackAction, goToFlyout as goToFlyoutAction, addUnmanagedFlyout as addUnmanagedFlyoutAction, closeUnmanagedFlyout as closeUnmanagedFlyoutAction, setContainerElement as setContainerElementAction } from './actions';
11
11
  import { flyoutManagerReducer, initialState } from './reducer';
12
12
 
13
13
  /**
@@ -19,6 +19,13 @@ function createStore() {
19
19
  var currentState = initial;
20
20
  var listeners = new Set();
21
21
  var eventListeners = new Set();
22
+
23
+ // Transient, one-shot close annotations keyed by flyoutId. `goBack` stamps the
24
+ // flyouts it removes so the managed flyout can report `navigation-back`; any
25
+ // other removal (e.g. closeAllFlyouts cascade) leaves no stamp and defaults to
26
+ // `navigation-cascade`. Kept off reducer state because it is a per-close
27
+ // annotation, not persistent state.
28
+ var pendingCloseMeta = new Map();
22
29
  var getState = function getState() {
23
30
  return currentState;
24
31
  };
@@ -162,6 +169,9 @@ function createStore() {
162
169
  setFlyoutWidth: function setFlyoutWidth(flyoutId, width) {
163
170
  return dispatch(setFlyoutWidthAction(flyoutId, width));
164
171
  },
172
+ setPagination: function setPagination(flyoutId, pagination) {
173
+ return dispatch(setPaginationAction(flyoutId, pagination));
174
+ },
165
175
  setPushPadding: function setPushPadding(side, width) {
166
176
  return dispatch(setPushPaddingAction(side, width));
167
177
  },
@@ -169,7 +179,23 @@ function createStore() {
169
179
  return dispatch(setContainerElementAction(element));
170
180
  },
171
181
  goBack: function goBack() {
172
- return dispatch(goBackAction());
182
+ // Stamp the flyouts goBack removes as `navigation-back` (vs. the default
183
+ // `navigation-cascade`) BEFORE dispatching. dispatch synchronously flushes
184
+ // subscribers, which can consume the meta during unmount, so peek the pure
185
+ // reducer to learn which flyouts go away and stamp them first.
186
+ var action = goBackAction();
187
+ var nextState = flyoutManagerReducer(currentState, action);
188
+ var remaining = new Set(nextState.flyouts.map(function (f) {
189
+ return f.flyoutId;
190
+ }));
191
+ currentState.flyouts.forEach(function (f) {
192
+ if (!remaining.has(f.flyoutId)) {
193
+ pendingCloseMeta.set(f.flyoutId, {
194
+ reason: 'navigation-back'
195
+ });
196
+ }
197
+ });
198
+ dispatch(action);
173
199
  },
174
200
  goToFlyout: function goToFlyout(flyoutId, level) {
175
201
  return dispatch(goToFlyoutAction(flyoutId, level));
@@ -180,6 +206,13 @@ function createStore() {
180
206
  closeUnmanagedFlyout: function closeUnmanagedFlyout(flyoutId) {
181
207
  return dispatch(closeUnmanagedFlyoutAction(flyoutId));
182
208
  },
209
+ consumeCloseMeta: function consumeCloseMeta(flyoutId) {
210
+ var meta = pendingCloseMeta.get(flyoutId);
211
+ if (meta) {
212
+ pendingCloseMeta.delete(flyoutId);
213
+ }
214
+ return meta;
215
+ },
183
216
  historyItems: computeHistoryItems(dispatch) // Initialize with current state
184
217
  };
185
218
  return store;
@@ -40,10 +40,10 @@ export var useEuiFlyoutMenu = function useEuiFlyoutMenu(_ref) {
40
40
  }, [hasMenu, _titleId, generatedMenuId]);
41
41
 
42
42
  // Determine if the menu has any content
43
- // hasBackButton or hasHistory or hasCustomActions or hasVisibleTitle
43
+ // hasBackButton or hasHistory or hasCustomActions or hasVisibleTitle or hasPagination
44
44
  var menuHasContent = hasMenu && (!!flyoutMenuProps.showBackButton || ((_flyoutMenuProps$hist = (_flyoutMenuProps$hist2 = flyoutMenuProps.historyItems) === null || _flyoutMenuProps$hist2 === void 0 ? void 0 : _flyoutMenuProps$hist2.length) !== null && _flyoutMenuProps$hist !== void 0 ? _flyoutMenuProps$hist : 0) > 0 || ((_flyoutMenuProps$cust = (_flyoutMenuProps$cust2 = flyoutMenuProps.customActions) === null || _flyoutMenuProps$cust2 === void 0 ? void 0 : _flyoutMenuProps$cust2.length) !== null && _flyoutMenuProps$cust !== void 0 ? _flyoutMenuProps$cust : 0) > 0 ||
45
45
  // Component defaults to hiding the title, so only explicit false means the title will be visible
46
- !!(flyoutMenuProps.title && flyoutMenuProps.hideTitle === false));
46
+ !!(flyoutMenuProps.title && flyoutMenuProps.hideTitle === false) || !!(flyoutMenuProps.pagination && flyoutMenuProps.pagination.total > 1));
47
47
 
48
48
  // Determine if the menu should be rendered based on the display mode and menu content
49
49
  var shouldRenderMenu = useMemo(function () {
@@ -1,14 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
4
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
- import _createClass from "@babel/runtime/helpers/createClass";
6
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
- import _inherits from "@babel/runtime/helpers/inherits";
9
4
  var _excluded = ["ref", "side"];
10
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
5
  /*
13
6
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
7
  * or more contributor license agreements. Licensed under the Elastic License
@@ -17,8 +10,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
17
10
  * Side Public License, v 1.
18
11
  */
19
12
 
20
- import React, { Component } from 'react';
21
- import { RenderWithEuiStylesMemoizer } from '../../../services';
13
+ import React from 'react';
14
+ import { useEuiTheme } from '../../../services';
22
15
  import { EuiIcon } from '../../icon';
23
16
  import { EuiLoadingSpinner } from '../../loading';
24
17
  import { EuiFormControlLayoutClearButton } from './form_control_layout_clear_button';
@@ -29,111 +22,99 @@ export var ICON_SIDES = ['left', 'right'];
29
22
  export var isIconShape = function isIconShape(icon) {
30
23
  return !!icon && icon.hasOwnProperty('type');
31
24
  };
32
- export var EuiFormControlLayoutIcons = /*#__PURE__*/function (_Component) {
33
- function EuiFormControlLayoutIcons() {
34
- _classCallCheck(this, EuiFormControlLayoutIcons);
35
- return _callSuper(this, EuiFormControlLayoutIcons, arguments);
25
+ export var EuiFormControlLayoutIcons = function EuiFormControlLayoutIcons(_ref) {
26
+ var _ref$side = _ref.side,
27
+ side = _ref$side === void 0 ? 'left' : _ref$side,
28
+ _ref$iconsPosition = _ref.iconsPosition,
29
+ iconsPosition = _ref$iconsPosition === void 0 ? 'absolute' : _ref$iconsPosition,
30
+ compressed = _ref.compressed,
31
+ isDisabled = _ref.isDisabled,
32
+ icon = _ref.icon,
33
+ clear = _ref.clear,
34
+ isLoading = _ref.isLoading,
35
+ isInvalid = _ref.isInvalid,
36
+ isDropdown = _ref.isDropdown;
37
+ var euiThemeContext = useEuiTheme();
38
+ var styles = euiFormControlLayoutIconsStyles(euiThemeContext);
39
+ var cssStyles = [styles.euiFormControlLayoutIcons, compressed ? styles.compressed : styles.uncompressed].concat(_toConsumableArray(iconsPosition === 'absolute' ? [styles.position.absolute.absolute, compressed ? styles.position.absolute.compressed[side] : styles.position.absolute.uncompressed[side]] : [styles.position.static.static, compressed ? styles.position.static.compressed : styles.position.static.uncompressed]), [isDisabled && styles.disabled]);
40
+ return ___EmotionJSX("div", {
41
+ css: cssStyles,
42
+ className: "euiFormControlLayoutIcons"
43
+ }, ___EmotionJSX(ClearButton, {
44
+ clear: clear,
45
+ isDisabled: isDisabled
46
+ }), ___EmotionJSX(LoadingSpinner, {
47
+ isLoading: isLoading
48
+ }), ___EmotionJSX(InvalidIcon, {
49
+ isInvalid: isInvalid
50
+ }), ___EmotionJSX(CustomIcon, {
51
+ icon: icon,
52
+ isDisabled: isDisabled
53
+ }), ___EmotionJSX(DropdownIcon, {
54
+ isDropdown: isDropdown,
55
+ isDisabled: isDisabled
56
+ }));
57
+ };
58
+ var CustomIcon = function CustomIcon(_ref2) {
59
+ var icon = _ref2.icon,
60
+ isDisabled = _ref2.isDisabled;
61
+ if (!icon) {
62
+ return null;
36
63
  }
37
- _inherits(EuiFormControlLayoutIcons, _Component);
38
- return _createClass(EuiFormControlLayoutIcons, [{
39
- key: "render",
40
- value: function render() {
41
- var _this$props = this.props,
42
- _this$props$side = _this$props.side,
43
- side = _this$props$side === void 0 ? 'left' : _this$props$side,
44
- _this$props$iconsPosi = _this$props.iconsPosition,
45
- iconsPosition = _this$props$iconsPosi === void 0 ? 'absolute' : _this$props$iconsPosi,
46
- compressed = _this$props.compressed,
47
- isDisabled = _this$props.isDisabled;
48
- var customIcon = this.renderCustomIcon();
49
- var loadingSpinner = this.renderLoadingSpinner();
50
- var clearButton = this.renderClearButton();
51
- var invalidIcon = this.renderInvalidIcon();
52
- var dropdownIcon = this.renderDropdownIcon();
53
- return ___EmotionJSX(RenderWithEuiStylesMemoizer, null, function (stylesMemoizer) {
54
- var styles = stylesMemoizer(euiFormControlLayoutIconsStyles);
55
- var cssStyles = [styles.euiFormControlLayoutIcons, compressed ? styles.compressed : styles.uncompressed].concat(_toConsumableArray(iconsPosition === 'absolute' ? [styles.position.absolute.absolute, compressed ? styles.position.absolute.compressed[side] : styles.position.absolute.uncompressed[side]] : [styles.position.static.static, compressed ? styles.position.static.compressed : styles.position.static.uncompressed]), [isDisabled && styles.disabled]);
56
- return ___EmotionJSX("div", {
57
- css: cssStyles,
58
- className: "euiFormControlLayoutIcons"
59
- }, clearButton, loadingSpinner, invalidIcon, customIcon, dropdownIcon);
60
- });
61
- }
62
- }, {
63
- key: "renderCustomIcon",
64
- value: function renderCustomIcon() {
65
- var _this$props2 = this.props,
66
- icon = _this$props2.icon,
67
- isDisabled = _this$props2.isDisabled;
68
- if (!icon) {
69
- return null;
70
- }
71
64
 
72
- // Normalize the icon to an object if it's a string.
73
- var iconProps = isIconShape(icon) ? icon : {
74
- type: icon
75
- };
76
- var iconRef = iconProps.ref,
77
- side = iconProps.side,
78
- iconRest = _objectWithoutProperties(iconProps, _excluded);
79
- return ___EmotionJSX(EuiFormControlLayoutCustomIcon, _extends({
80
- size: "m",
81
- disabled: isDisabled,
82
- iconRef: iconRef
83
- }, iconRest));
84
- }
85
- }, {
86
- key: "renderDropdownIcon",
87
- value: function renderDropdownIcon() {
88
- var _this$props3 = this.props,
89
- isDropdown = _this$props3.isDropdown,
90
- isDisabled = _this$props3.isDisabled;
91
- if (!isDropdown) {
92
- return null;
93
- }
94
- return ___EmotionJSX(EuiFormControlLayoutCustomIcon, {
95
- size: "m",
96
- disabled: isDisabled,
97
- type: "chevronSingleDown"
98
- });
99
- }
100
- }, {
101
- key: "renderLoadingSpinner",
102
- value: function renderLoadingSpinner() {
103
- var isLoading = this.props.isLoading;
104
- if (!isLoading) {
105
- return null;
106
- }
107
- return ___EmotionJSX(EuiLoadingSpinner, {
108
- size: "m"
109
- });
110
- }
111
- }, {
112
- key: "renderClearButton",
113
- value: function renderClearButton() {
114
- var _this$props4 = this.props,
115
- clear = _this$props4.clear,
116
- isDisabled = _this$props4.isDisabled;
117
- if (!clear) {
118
- return null;
119
- }
120
- return ___EmotionJSX(EuiFormControlLayoutClearButton, _extends({
121
- size: "m",
122
- disabled: isDisabled
123
- }, clear));
124
- }
125
- }, {
126
- key: "renderInvalidIcon",
127
- value: function renderInvalidIcon() {
128
- var isInvalid = this.props.isInvalid;
129
- if (!isInvalid) {
130
- return null;
131
- }
132
- return ___EmotionJSX(EuiIcon, {
133
- size: "m",
134
- color: "danger",
135
- type: "warning"
136
- });
137
- }
138
- }]);
139
- }(Component);
65
+ // Normalize the icon to an object if it's a string.
66
+ var iconProps = isIconShape(icon) ? icon : {
67
+ type: icon
68
+ };
69
+ var iconRef = iconProps.ref,
70
+ side = iconProps.side,
71
+ iconRest = _objectWithoutProperties(iconProps, _excluded);
72
+ return ___EmotionJSX(EuiFormControlLayoutCustomIcon, _extends({
73
+ size: "m",
74
+ disabled: isDisabled,
75
+ iconRef: iconRef
76
+ }, iconRest));
77
+ };
78
+ var DropdownIcon = function DropdownIcon(_ref3) {
79
+ var isDropdown = _ref3.isDropdown,
80
+ isDisabled = _ref3.isDisabled;
81
+ if (!isDropdown) {
82
+ return null;
83
+ }
84
+ return ___EmotionJSX(EuiFormControlLayoutCustomIcon, {
85
+ size: "m",
86
+ disabled: isDisabled,
87
+ type: "chevronSingleDown"
88
+ });
89
+ };
90
+ var LoadingSpinner = function LoadingSpinner(_ref4) {
91
+ var isLoading = _ref4.isLoading;
92
+ if (!isLoading) {
93
+ return null;
94
+ }
95
+ return ___EmotionJSX(EuiLoadingSpinner, {
96
+ size: "m"
97
+ });
98
+ };
99
+ var ClearButton = function ClearButton(_ref5) {
100
+ var clear = _ref5.clear,
101
+ isDisabled = _ref5.isDisabled;
102
+ if (!clear) {
103
+ return null;
104
+ }
105
+ return ___EmotionJSX(EuiFormControlLayoutClearButton, _extends({
106
+ size: "m",
107
+ disabled: isDisabled
108
+ }, clear));
109
+ };
110
+ var InvalidIcon = function InvalidIcon(_ref6) {
111
+ var isInvalid = _ref6.isInvalid;
112
+ if (!isInvalid) {
113
+ return null;
114
+ }
115
+ return ___EmotionJSX(EuiIcon, {
116
+ size: "m",
117
+ color: "danger",
118
+ type: "warning"
119
+ });
120
+ };
@@ -0,0 +1,33 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["title", "titleId"];
4
+ /*
5
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
6
+ * or more contributor license agreements. Licensed under the Elastic License
7
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
8
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
9
+ * Side Public License, v 1.
10
+ */
11
+
12
+ // THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js
13
+
14
+ import * as React from 'react';
15
+ import { jsx as ___EmotionJSX } from "@emotion/react";
16
+ var EuiIconInfoFill = function EuiIconInfoFill(_ref) {
17
+ var title = _ref.title,
18
+ titleId = _ref.titleId,
19
+ props = _objectWithoutProperties(_ref, _excluded);
20
+ return ___EmotionJSX("svg", _extends({
21
+ xmlns: "http://www.w3.org/2000/svg",
22
+ width: 16,
23
+ height: 16,
24
+ fill: "none",
25
+ viewBox: "0 0 16 16",
26
+ "aria-labelledby": titleId
27
+ }, props), title ? ___EmotionJSX("title", {
28
+ id: titleId
29
+ }, title) : null, ___EmotionJSX("path", {
30
+ d: "M8 1a7 7 0 1 1 0 14A7 7 0 0 1 8 1ZM6.5 7v1h1v3H6v1h4v-1H8.5V7h-2ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
31
+ }));
32
+ };
33
+ export var icon = EuiIconInfoFill;