@elastic/eui 110.0.0 → 111.0.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 (237) hide show
  1. package/es/components/collapsible_nav/collapsible_nav.js +20 -101
  2. package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -0
  3. package/es/components/flyout/_flyout_overlay.js +52 -0
  4. package/es/components/flyout/_flyout_resize_button.js +32 -0
  5. package/es/components/flyout/{flyout_resizable.styles.js → _flyout_resize_button.styles.js} +11 -11
  6. package/es/components/flyout/const.js +42 -0
  7. package/es/components/flyout/flyout.component.js +481 -0
  8. package/es/components/flyout/flyout.js +77 -379
  9. package/es/components/flyout/flyout.styles.js +105 -7
  10. package/es/components/flyout/flyout_menu.js +241 -0
  11. package/es/components/flyout/flyout_menu.styles.js +19 -0
  12. package/{optimize/es/components/flyout/flyout_context.js → es/components/flyout/flyout_menu_context.js} +1 -7
  13. package/es/components/flyout/flyout_parent_context.js +36 -0
  14. package/es/components/flyout/flyout_resizable.js +33 -144
  15. package/es/components/flyout/hooks.js +25 -0
  16. package/es/components/flyout/index.js +5 -2
  17. package/es/components/flyout/manager/actions.js +153 -0
  18. package/es/components/flyout/manager/activity_stage.js +95 -0
  19. package/es/components/flyout/manager/const.js +56 -0
  20. package/es/components/flyout/manager/context.js +33 -0
  21. package/es/components/flyout/manager/flyout_child.js +75 -0
  22. package/es/components/flyout/manager/flyout_main.js +65 -0
  23. package/es/components/flyout/manager/flyout_main.styles.js +25 -0
  24. package/es/components/flyout/manager/flyout_managed.js +227 -0
  25. package/es/components/flyout/manager/flyout_managed.styles.js +69 -0
  26. package/es/components/flyout/manager/hooks.js +55 -0
  27. package/es/components/flyout/manager/index.js +31 -0
  28. package/es/components/flyout/manager/layout_mode.js +167 -0
  29. package/es/components/flyout/manager/provider.js +57 -0
  30. package/es/components/flyout/manager/reducer.js +320 -0
  31. package/es/components/flyout/manager/selectors.js +116 -0
  32. package/es/components/flyout/manager/store.js +113 -0
  33. package/es/components/flyout/manager/validation.js +85 -0
  34. package/es/components/flyout/use_flyout_resizable.js +149 -0
  35. package/es/components/flyout/use_flyout_z_index.js +46 -0
  36. package/es/components/overlay_mask/overlay_mask.js +13 -3
  37. package/es/components/overlay_mask/overlay_mask.styles.js +11 -2
  38. package/es/components/provider/provider.js +2 -1
  39. package/eui.d.ts +1484 -921
  40. package/i18ntokens.json +1207 -1153
  41. package/lib/components/collapsible_nav/collapsible_nav.js +20 -101
  42. package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -0
  43. package/lib/components/flyout/_flyout_overlay.js +59 -0
  44. package/lib/components/flyout/_flyout_resize_button.js +38 -0
  45. package/{test-env/components/flyout/flyout_resizable.styles.js → lib/components/flyout/_flyout_resize_button.styles.js} +12 -12
  46. package/lib/components/flyout/const.js +49 -0
  47. package/lib/components/flyout/flyout.component.js +488 -0
  48. package/lib/components/flyout/flyout.js +102 -379
  49. package/lib/components/flyout/flyout.styles.js +105 -7
  50. package/lib/components/flyout/flyout_menu.js +243 -0
  51. package/lib/components/flyout/flyout_menu.styles.js +25 -0
  52. package/{optimize/lib/components/flyout/flyout_context.js → lib/components/flyout/flyout_menu_context.js} +2 -7
  53. package/lib/components/flyout/flyout_parent_context.js +43 -0
  54. package/lib/components/flyout/flyout_resizable.js +36 -147
  55. package/lib/components/flyout/hooks.js +30 -0
  56. package/lib/components/flyout/index.js +21 -14
  57. package/lib/components/flyout/manager/actions.js +159 -0
  58. package/lib/components/flyout/manager/activity_stage.js +101 -0
  59. package/lib/components/flyout/manager/const.js +62 -0
  60. package/lib/components/flyout/manager/context.js +41 -0
  61. package/lib/components/flyout/manager/flyout_child.js +80 -0
  62. package/lib/components/flyout/manager/flyout_main.js +70 -0
  63. package/lib/components/flyout/manager/flyout_main.styles.js +31 -0
  64. package/lib/components/flyout/manager/flyout_managed.js +233 -0
  65. package/lib/components/flyout/manager/flyout_managed.styles.js +73 -0
  66. package/lib/components/flyout/manager/hooks.js +131 -0
  67. package/lib/components/flyout/manager/index.js +168 -0
  68. package/lib/components/flyout/manager/layout_mode.js +171 -0
  69. package/lib/components/flyout/manager/provider.js +63 -0
  70. package/lib/components/flyout/manager/reducer.js +325 -0
  71. package/lib/components/flyout/manager/selectors.js +122 -0
  72. package/lib/components/flyout/manager/store.js +120 -0
  73. package/lib/components/flyout/manager/validation.js +94 -0
  74. package/lib/components/flyout/use_flyout_resizable.js +153 -0
  75. package/lib/components/flyout/use_flyout_z_index.js +51 -0
  76. package/lib/components/overlay_mask/overlay_mask.js +12 -2
  77. package/lib/components/overlay_mask/overlay_mask.styles.js +11 -4
  78. package/lib/components/provider/provider.js +2 -1
  79. package/optimize/es/components/collapsible_nav/collapsible_nav.js +1 -0
  80. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -0
  81. package/optimize/es/components/flyout/_flyout_overlay.js +52 -0
  82. package/optimize/es/components/flyout/_flyout_resize_button.js +31 -0
  83. package/optimize/es/components/flyout/{flyout_resizable.styles.js → _flyout_resize_button.styles.js} +11 -11
  84. package/optimize/es/components/flyout/const.js +42 -0
  85. package/optimize/es/components/flyout/flyout.component.js +469 -0
  86. package/optimize/es/components/flyout/flyout.js +53 -349
  87. package/optimize/es/components/flyout/flyout.styles.js +102 -7
  88. package/optimize/es/components/flyout/flyout_menu.js +162 -0
  89. package/optimize/es/components/flyout/flyout_menu.styles.js +19 -0
  90. package/{es/components/flyout/flyout_context.js → optimize/es/components/flyout/flyout_menu_context.js} +1 -7
  91. package/optimize/es/components/flyout/flyout_parent_context.js +36 -0
  92. package/optimize/es/components/flyout/flyout_resizable.js +7 -138
  93. package/optimize/es/components/flyout/hooks.js +25 -0
  94. package/optimize/es/components/flyout/index.js +5 -2
  95. package/optimize/es/components/flyout/manager/actions.js +153 -0
  96. package/optimize/es/components/flyout/manager/activity_stage.js +95 -0
  97. package/optimize/es/components/flyout/manager/const.js +56 -0
  98. package/optimize/es/components/flyout/manager/context.js +33 -0
  99. package/optimize/es/components/flyout/manager/flyout_child.js +71 -0
  100. package/optimize/es/components/flyout/manager/flyout_main.js +61 -0
  101. package/optimize/es/components/flyout/manager/flyout_main.styles.js +25 -0
  102. package/optimize/es/components/flyout/manager/flyout_managed.js +223 -0
  103. package/optimize/es/components/flyout/manager/flyout_managed.styles.js +69 -0
  104. package/optimize/es/components/flyout/manager/hooks.js +55 -0
  105. package/optimize/es/components/flyout/manager/index.js +31 -0
  106. package/optimize/es/components/flyout/manager/layout_mode.js +162 -0
  107. package/optimize/es/components/flyout/manager/provider.js +53 -0
  108. package/optimize/es/components/flyout/manager/reducer.js +312 -0
  109. package/optimize/es/components/flyout/manager/selectors.js +116 -0
  110. package/optimize/es/components/flyout/manager/store.js +113 -0
  111. package/optimize/es/components/flyout/manager/types.js +1 -0
  112. package/optimize/es/components/flyout/manager/validation.js +85 -0
  113. package/optimize/es/components/flyout/types.js +1 -0
  114. package/optimize/es/components/flyout/use_flyout_resizable.js +144 -0
  115. package/optimize/es/components/flyout/use_flyout_z_index.js +46 -0
  116. package/optimize/es/components/overlay_mask/overlay_mask.js +13 -3
  117. package/optimize/es/components/overlay_mask/overlay_mask.styles.js +11 -2
  118. package/optimize/es/components/provider/provider.js +2 -1
  119. package/optimize/lib/components/collapsible_nav/collapsible_nav.js +1 -0
  120. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -0
  121. package/optimize/lib/components/flyout/_flyout_overlay.js +62 -0
  122. package/optimize/lib/components/flyout/_flyout_resize_button.js +37 -0
  123. package/{lib/components/flyout/flyout_resizable.styles.js → optimize/lib/components/flyout/_flyout_resize_button.styles.js} +12 -12
  124. package/optimize/lib/components/flyout/const.js +49 -0
  125. package/optimize/lib/components/flyout/flyout.component.js +477 -0
  126. package/optimize/lib/components/flyout/flyout.js +77 -349
  127. package/optimize/lib/components/flyout/flyout.styles.js +102 -7
  128. package/optimize/lib/components/flyout/flyout_menu.js +168 -0
  129. package/optimize/lib/components/flyout/flyout_menu.styles.js +25 -0
  130. package/{lib/components/flyout/flyout_context.js → optimize/lib/components/flyout/flyout_menu_context.js} +2 -7
  131. package/optimize/lib/components/flyout/flyout_parent_context.js +43 -0
  132. package/optimize/lib/components/flyout/flyout_resizable.js +9 -139
  133. package/optimize/lib/components/flyout/hooks.js +30 -0
  134. package/optimize/lib/components/flyout/index.js +21 -14
  135. package/optimize/lib/components/flyout/manager/actions.js +159 -0
  136. package/optimize/lib/components/flyout/manager/activity_stage.js +101 -0
  137. package/optimize/lib/components/flyout/manager/const.js +62 -0
  138. package/optimize/lib/components/flyout/manager/context.js +41 -0
  139. package/optimize/lib/components/flyout/manager/flyout_child.js +76 -0
  140. package/optimize/lib/components/flyout/manager/flyout_main.js +66 -0
  141. package/optimize/lib/components/flyout/manager/flyout_main.styles.js +31 -0
  142. package/optimize/lib/components/flyout/manager/flyout_managed.js +231 -0
  143. package/optimize/lib/components/flyout/manager/flyout_managed.styles.js +74 -0
  144. package/optimize/lib/components/flyout/manager/hooks.js +131 -0
  145. package/optimize/lib/components/flyout/manager/index.js +168 -0
  146. package/optimize/lib/components/flyout/manager/layout_mode.js +169 -0
  147. package/optimize/lib/components/flyout/manager/provider.js +61 -0
  148. package/optimize/lib/components/flyout/manager/reducer.js +318 -0
  149. package/optimize/lib/components/flyout/manager/selectors.js +122 -0
  150. package/optimize/lib/components/flyout/manager/store.js +120 -0
  151. package/optimize/lib/components/flyout/manager/validation.js +94 -0
  152. package/optimize/lib/components/flyout/types.js +5 -0
  153. package/optimize/lib/components/flyout/use_flyout_resizable.js +151 -0
  154. package/optimize/lib/components/flyout/use_flyout_z_index.js +51 -0
  155. package/optimize/lib/components/overlay_mask/overlay_mask.js +12 -2
  156. package/optimize/lib/components/overlay_mask/overlay_mask.styles.js +11 -4
  157. package/optimize/lib/components/provider/provider.js +2 -1
  158. package/package.json +5 -4
  159. package/test-env/components/collapsible_nav/collapsible_nav.js +20 -101
  160. package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +1 -0
  161. package/test-env/components/flyout/_flyout_overlay.js +62 -0
  162. package/test-env/components/flyout/_flyout_resize_button.js +37 -0
  163. package/{optimize/lib/components/flyout/flyout_resizable.styles.js → test-env/components/flyout/_flyout_resize_button.styles.js} +12 -12
  164. package/test-env/components/flyout/const.js +49 -0
  165. package/test-env/components/flyout/flyout.component.js +477 -0
  166. package/test-env/components/flyout/flyout.styles.js +102 -7
  167. package/test-env/components/flyout/flyout_menu.js +241 -0
  168. package/test-env/components/flyout/flyout_menu.styles.js +25 -0
  169. package/test-env/components/flyout/{flyout_context.js → flyout_menu_context.js} +2 -7
  170. package/test-env/components/flyout/flyout_parent_context.js +43 -0
  171. package/test-env/components/flyout/flyout_resizable.js +35 -139
  172. package/test-env/components/flyout/hooks.js +30 -0
  173. package/test-env/components/flyout/index.js +21 -14
  174. package/test-env/components/flyout/manager/actions.js +159 -0
  175. package/test-env/components/flyout/manager/activity_stage.js +101 -0
  176. package/test-env/components/flyout/manager/const.js +62 -0
  177. package/test-env/components/flyout/manager/context.js +41 -0
  178. package/test-env/components/flyout/manager/flyout_child.js +76 -0
  179. package/test-env/components/flyout/manager/flyout_main.js +66 -0
  180. package/test-env/components/flyout/manager/flyout_main.styles.js +31 -0
  181. package/test-env/components/flyout/manager/flyout_managed.js +231 -0
  182. package/test-env/components/flyout/manager/flyout_managed.styles.js +74 -0
  183. package/test-env/components/flyout/manager/hooks.js +131 -0
  184. package/test-env/components/flyout/manager/index.js +168 -0
  185. package/test-env/components/flyout/manager/layout_mode.js +169 -0
  186. package/test-env/components/flyout/manager/provider.js +61 -0
  187. package/test-env/components/flyout/manager/reducer.js +318 -0
  188. package/test-env/components/flyout/manager/selectors.js +122 -0
  189. package/test-env/components/flyout/manager/store.js +120 -0
  190. package/test-env/components/flyout/manager/types.js +5 -0
  191. package/test-env/components/flyout/manager/validation.js +94 -0
  192. package/test-env/components/flyout/types.js +5 -0
  193. package/test-env/components/flyout/use_flyout_resizable.js +151 -0
  194. package/test-env/components/flyout/use_flyout_z_index.js +51 -0
  195. package/test-env/components/overlay_mask/overlay_mask.js +12 -2
  196. package/test-env/components/overlay_mask/overlay_mask.styles.js +11 -4
  197. package/test-env/components/provider/provider.js +2 -1
  198. package/es/components/flyout/flyout_child.js +0 -223
  199. package/es/components/flyout/flyout_child.styles.js +0 -32
  200. package/es/components/flyout/flyout_child_manager.js +0 -114
  201. package/es/components/flyout/sessions/flyout_provider.js +0 -95
  202. package/es/components/flyout/sessions/flyout_reducer.js +0 -195
  203. package/es/components/flyout/sessions/index.js +0 -10
  204. package/es/components/flyout/sessions/use_eui_flyout.js +0 -82
  205. package/lib/components/flyout/flyout_child.js +0 -231
  206. package/lib/components/flyout/flyout_child.styles.js +0 -38
  207. package/lib/components/flyout/flyout_child_manager.js +0 -122
  208. package/lib/components/flyout/sessions/flyout_provider.js +0 -102
  209. package/lib/components/flyout/sessions/flyout_reducer.js +0 -202
  210. package/lib/components/flyout/sessions/index.js +0 -25
  211. package/lib/components/flyout/sessions/use_eui_flyout.js +0 -88
  212. package/optimize/es/components/flyout/flyout_child.js +0 -178
  213. package/optimize/es/components/flyout/flyout_child.styles.js +0 -32
  214. package/optimize/es/components/flyout/flyout_child_manager.js +0 -100
  215. package/optimize/es/components/flyout/sessions/flyout_provider.js +0 -90
  216. package/optimize/es/components/flyout/sessions/flyout_reducer.js +0 -187
  217. package/optimize/es/components/flyout/sessions/index.js +0 -10
  218. package/optimize/es/components/flyout/sessions/use_eui_flyout.js +0 -82
  219. package/optimize/lib/components/flyout/flyout_child.js +0 -186
  220. package/optimize/lib/components/flyout/flyout_child.styles.js +0 -38
  221. package/optimize/lib/components/flyout/flyout_child_manager.js +0 -110
  222. package/optimize/lib/components/flyout/sessions/flyout_provider.js +0 -100
  223. package/optimize/lib/components/flyout/sessions/flyout_reducer.js +0 -195
  224. package/optimize/lib/components/flyout/sessions/index.js +0 -25
  225. package/optimize/lib/components/flyout/sessions/use_eui_flyout.js +0 -88
  226. package/test-env/components/flyout/flyout_child.js +0 -230
  227. package/test-env/components/flyout/flyout_child.styles.js +0 -38
  228. package/test-env/components/flyout/flyout_child_manager.js +0 -119
  229. package/test-env/components/flyout/sessions/flyout_provider.js +0 -100
  230. package/test-env/components/flyout/sessions/flyout_reducer.js +0 -195
  231. package/test-env/components/flyout/sessions/index.js +0 -25
  232. package/test-env/components/flyout/sessions/use_eui_flyout.js +0 -88
  233. /package/es/components/flyout/{sessions → manager}/types.js +0 -0
  234. /package/{optimize/es/components/flyout/sessions → es/components/flyout}/types.js +0 -0
  235. /package/lib/components/flyout/{sessions → manager}/types.js +0 -0
  236. /package/{optimize/lib/components/flyout/sessions → lib/components/flyout}/types.js +0 -0
  237. /package/{test-env/components/flyout/sessions → optimize/lib/components/flyout/manager}/types.js +0 -0
@@ -1,14 +1,21 @@
1
1
  "use strict";
2
2
 
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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.maxedFlyoutWidth = exports.euiFlyoutStyles = exports.euiFlyoutSlideInRight = exports.euiFlyoutSlideInLeft = exports.composeFlyoutSizing = exports.FLYOUT_BREAKPOINT = void 0;
7
+ exports.maxedFlyoutWidth = exports.euiFlyoutStyles = exports.euiFlyoutSlideOutRight = exports.euiFlyoutSlideOutLeft = exports.euiFlyoutSlideInRight = exports.euiFlyoutSlideInLeft = exports.composeFlyoutSizing = exports.composeFlyoutInlineStyles = exports.FLYOUT_BREAKPOINT = void 0;
7
8
  var _react = require("@emotion/react");
8
9
  var _euiThemeCommon = require("@elastic/eui-theme-common");
10
+ var _const = require("./const");
9
11
  var _global_styling = require("../../global_styling");
10
12
  var _form = require("../form/form.styles");
11
- var _templateObject, _templateObject2;
13
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
14
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
12
19
  function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
13
20
  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)."; } /*
14
21
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -18,8 +25,10 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
18
25
  * Side Public License, v 1.
19
26
  */
20
27
  var FLYOUT_BREAKPOINT = exports.FLYOUT_BREAKPOINT = 'm';
21
- var euiFlyoutSlideInRight = exports.euiFlyoutSlideInRight = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
22
- var euiFlyoutSlideInLeft = exports.euiFlyoutSlideInLeft = (0, _react.keyframes)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
28
+ var euiFlyoutSlideInRight = exports.euiFlyoutSlideInRight = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from {\n opacity: 0;\n transform: translateX(100%);\n }\n to {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
29
+ var euiFlyoutSlideOutRight = exports.euiFlyoutSlideOutRight = (0, _react.keyframes)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n from {\n opacity: 1;\n transform: translateX(0%);\n }\n to {\n opacity: 0;\n transform: translateX(100%);\n }\n"])));
30
+ var euiFlyoutSlideInLeft = exports.euiFlyoutSlideInLeft = (0, _react.keyframes)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n from {\n opacity: 0;\n transform: translateX(-100%);\n }\n to {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
31
+ var euiFlyoutSlideOutLeft = exports.euiFlyoutSlideOutLeft = (0, _react.keyframes)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n from {\n opacity: 1;\n transform: translateX(0);\n }\n to {\n opacity: 0;\n transform: translateX(-100%);\n }\n"])));
23
32
  var _ref = process.env.NODE_ENV === "production" ? {
24
33
  name: "yokctr-noAnimation",
25
34
  styles: "animation-duration:0s!important;label:noAnimation;"
@@ -39,17 +48,18 @@ var _ref2 = process.env.NODE_ENV === "production" ? {
39
48
  var euiFlyoutStyles = exports.euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
40
49
  var euiTheme = euiThemeContext.euiTheme;
41
50
  return {
42
- euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('top', 'var(--euiFixedHeadersOffset, 0)'), " ", (0, _global_styling.logicalCSS)('height', 'inherit'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", maxedFlyoutWidth(euiThemeContext), ";;label:euiFlyout;"),
51
+ euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('top', 'var(--euiFixedHeadersOffset, 0)'), " ", (0, _global_styling.logicalCSS)('height', 'inherit'), " background:", euiTheme.colors.backgroundBasePlain, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}&.euiFlyout--hasChildBackground{background:", euiTheme.colors.backgroundBaseSubdued, ";}", maxedFlyoutWidth(euiThemeContext), ";;label:euiFlyout;"),
43
52
  // Flyout sizes
44
53
  // When a child flyout is stacked on top of the parent, the parent flyout size will match the child flyout size
45
54
  s: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 's'), " &.euiFlyout--hasChild--stacked.euiFlyout--hasChild--m{", composeFlyoutSizing(euiThemeContext, 'm'), ";};label:s;"),
46
55
  m: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 'm'), " &.euiFlyout--hasChild--stacked.euiFlyout--hasChild--s{", composeFlyoutSizing(euiThemeContext, 's'), ";};label:m;"),
47
56
  l: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 'l'), ";;label:l;"),
57
+ fill: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 'fill'), ";;label:fill;"),
48
58
  noMaxWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', 'none'), ";;label:noMaxWidth;"),
49
59
  // Side
50
- right: /*#__PURE__*/(0, _react.css)("clip-path:polygon(-50% 0, 100% 0, 100% 100%, -50% 100%);", (0, _global_styling.logicalCSS)('right', 0), " ", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInRight, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";}&.euiFlyout--hasChild{clip-path:none;};label:right;"),
60
+ right: /*#__PURE__*/(0, _react.css)("clip-path:polygon(-50% 0, 100% 0, 100% 100%, -50% 100%);", (0, _global_styling.logicalCSS)('right', 0), "animation:", euiFlyoutSlideInRight, " 0s ", euiTheme.animation.resistance, " forwards;", _global_styling.euiCanAnimate, "{animation-duration:", euiTheme.animation.normal, ";}&.euiFlyout--hasChild{clip-path:none;};label:right;"),
51
61
  // Left-side flyouts should only be used for navigation
52
- left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:left;"),
62
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);animation:", euiFlyoutSlideInLeft, " 0s ", euiTheme.animation.resistance, " forwards;", _global_styling.euiCanAnimate, "{animation-duration:", euiTheme.animation.normal, ";};label:left;"),
53
63
  // Type
54
64
  overlay: {
55
65
  overlay: _ref2,
@@ -105,6 +115,13 @@ var composeFlyoutSizing = exports.composeFlyoutSizing = function composeFlyoutSi
105
115
  // 1.
106
116
  width: '75vw',
107
117
  max: "".concat(euiTheme.breakpoint.l, "px")
118
+ },
119
+ // NOTE: These styles are for the flyout system in `stacked` layout mode.
120
+ // In `side-by-side` mode, @flyout.component.tsx uses inline styles.
121
+ fill: {
122
+ min: '90vw',
123
+ width: '90vw',
124
+ max: '90vw'
108
125
  }
109
126
  };
110
127
  return "\n ".concat((0, _global_styling.logicalCSS)('max-width', flyoutSizes[size].max), "\n\n ").concat((0, _global_styling.euiMaxBreakpoint)(euiThemeContext, FLYOUT_BREAKPOINT), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', 0), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].min), "\n }\n ").concat((0, _global_styling.euiMinBreakpoint)(euiThemeContext, FLYOUT_BREAKPOINT), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', flyoutSizes[size].min), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].width), "\n }\n ");
@@ -130,4 +147,85 @@ var composeFlyoutPadding = function composeFlyoutPadding(euiThemeContext, paddin
130
147
  }), " ").concat(euiTheme.size.l, ";")
131
148
  };
132
149
  return "\n .euiFlyoutHeader {\n ".concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n ").concat((0, _global_styling.logicalCSS)('padding-top', paddingModifierMap[paddingSize]), "\n }\n\n [class*='euiFlyoutHeader-hasBorder'] {\n ").concat((0, _global_styling.logicalCSS)('padding-bottom', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutBody__overflowContent {\n padding: ").concat(paddingModifierMap[paddingSize], ";\n }\n\n .euiFlyoutBody__banner .euiCallOut {\n ").concat((0, _global_styling.logicalCSS)('padding-horizontal', paddingModifierMap[paddingSize]), "\n }\n\n .euiFlyoutFooter {\n padding: ").concat(footerPaddingSizes[paddingSize], ";\n }\n ");
150
+ };
151
+
152
+ /**
153
+ * Helper for `composeFlyoutInlineStyles`
154
+ * Handles maxWidth prop overrides to ensure they take precedence over base CSS
155
+ */
156
+ var composeMaxWidthOverrides = function composeMaxWidthOverrides(maxWidth, isFill) {
157
+ if (typeof maxWidth === 'boolean') {
158
+ return {};
159
+ }
160
+ var overrides = {
161
+ maxWidth: maxWidth
162
+ };
163
+
164
+ // For fill size flyouts, we need to override min-width to allow dynamic sizing
165
+ if (isFill) {
166
+ overrides.minWidth = '0';
167
+
168
+ // When maxWidth is provided for fill flyouts, we need to override the CSS rule
169
+ // that sets min-inline-size: 90vw. We calculate min(maxWidth, 90vw) to ensure
170
+ // the flyout respects both constraints and doesn't get stuck at 90vw minimum.
171
+ if (maxWidth) {
172
+ var maxWidthWithUnits = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth;
173
+ overrides.minWidth = "min(".concat(maxWidthWithUnits, ", 90vw)");
174
+ }
175
+ }
176
+ return (0, _global_styling.logicalStyles)(overrides);
177
+ };
178
+
179
+ /**
180
+ * Composes all inline styles for a flyout based on its configuration
181
+ */
182
+ var composeFlyoutInlineStyles = exports.composeFlyoutInlineStyles = function composeFlyoutInlineStyles(size, layoutMode, siblingFlyoutId, siblingFlyoutWidth, maxWidth, zIndex) {
183
+ // Handle custom width values (non-named sizes)
184
+ var customWidthStyles = !(0, _const.isEuiFlyoutSizeNamed)(size) ? (0, _global_styling.logicalStyles)({
185
+ width: size
186
+ }) : {};
187
+ var isFill = size === 'fill';
188
+
189
+ // Handle dynamic width calculation for fill size in side-by-side mode
190
+ var dynamicStyles = isFill && layoutMode === 'side-by-side' && siblingFlyoutId && siblingFlyoutWidth ? (0, _global_styling.logicalStyles)({
191
+ width: "calc(90vw - ".concat(siblingFlyoutWidth, "px)"),
192
+ minWidth: '0'
193
+ }) : {};
194
+
195
+ // For fill flyouts with maxWidth, we need to ensure the minWidth override is applied
196
+ // to override the CSS rule that sets min-inline-size: 90vw
197
+ var minWidthOverride = {};
198
+ if (isFill && maxWidth) {
199
+ if (layoutMode === 'side-by-side' && siblingFlyoutId && siblingFlyoutWidth && dynamicStyles.inlineSize) {
200
+ // For fill flyouts with maxWidth and a sibling: min(maxWidth, calc(90vw - siblingWidth))
201
+ var dynamicWidth = dynamicStyles.inlineSize;
202
+ var maxWidthWithUnits = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth;
203
+ minWidthOverride = {
204
+ minWidth: "min(".concat(maxWidthWithUnits, ", ").concat(dynamicWidth, ")")
205
+ };
206
+ } else {
207
+ // For fill flyouts with maxWidth but no sibling: min(maxWidth, 90vw)
208
+ var maxWidthOverrides = composeMaxWidthOverrides(maxWidth, isFill);
209
+ minWidthOverride = {
210
+ minWidth: maxWidthOverrides.minInlineSize
211
+ };
212
+ }
213
+ }
214
+
215
+ // Calculate the final maxWidth based on conditions
216
+ var finalMaxWidth;
217
+ if (maxWidth && isFill && layoutMode === 'side-by-side' && siblingFlyoutId && siblingFlyoutWidth && dynamicStyles.inlineSize) {
218
+ // For fill flyouts with maxWidth and a sibling: min(maxWidth, calc(90vw - siblingWidth))
219
+ var _dynamicWidth = dynamicStyles.inlineSize;
220
+ var _maxWidthWithUnits = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth;
221
+ finalMaxWidth = "min(".concat(_maxWidthWithUnits, ", ").concat(_dynamicWidth, ")");
222
+ } else if (maxWidth) {
223
+ // For all other cases with maxWidth: use the original maxWidth value
224
+ finalMaxWidth = typeof maxWidth === 'number' ? "".concat(maxWidth, "px") : maxWidth;
225
+ }
226
+ return (0, _global_styling.logicalStyles)(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, customWidthStyles), dynamicStyles), minWidthOverride), finalMaxWidth ? {
227
+ maxWidth: finalMaxWidth
228
+ } : {}), {}, {
229
+ zIndex: zIndex
230
+ }));
133
231
  };
@@ -0,0 +1,243 @@
1
+ "use strict";
2
+
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
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.EuiFlyoutMenu = void 0;
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _classnames = _interopRequireDefault(require("classnames"));
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _services = require("../../services");
12
+ var _button = require("../button");
13
+ var _flex = require("../flex");
14
+ var _list_group = require("../list_group");
15
+ var _popover = require("../popover");
16
+ var _title = require("../title");
17
+ var _flyout_close_button = require("./_flyout_close_button");
18
+ var _flyout_menu = require("./flyout_menu.styles");
19
+ var _flyout_menu_context = require("./flyout_menu_context");
20
+ var _i18n = require("../i18n");
21
+ var _react2 = require("@emotion/react");
22
+ var _excluded = ["className", "title", "titleId", "hideTitle", "hideCloseButton", "historyItems", "showBackButton", "backButtonProps", "customActions"];
23
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
24
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
26
+ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
27
+ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
28
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
29
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
30
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
31
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
32
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
33
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
34
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } /*
35
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
36
+ * or more contributor license agreements. Licensed under the Elastic License
37
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
38
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
39
+ * Side Public License, v 1.
40
+ */ /**
41
+ * History item for the flyout menu history popover
42
+ */ /**
43
+ * Custom action item for the flyout menu component
44
+ */ /**
45
+ * Props for EuiFlyoutMenu
46
+ */
47
+ var BackButton = function BackButton(props) {
48
+ return (0, _react2.jsx)(_button.EuiButtonEmpty, _extends({
49
+ size: "xs",
50
+ color: "text",
51
+ iconType: "editorUndo"
52
+ }, props), (0, _react2.jsx)(_i18n.EuiI18n, {
53
+ token: "euiFlyoutMenu.back",
54
+ default: "Back"
55
+ }));
56
+ };
57
+ var HistoryPopover = function HistoryPopover(_ref) {
58
+ var items = _ref.items;
59
+ var _useState = (0, _react.useState)(false),
60
+ _useState2 = _slicedToArray(_useState, 2),
61
+ isPopoverOpen = _useState2[0],
62
+ setIsPopoverOpen = _useState2[1];
63
+ var handlePopoverButtonClick = function handlePopoverButtonClick() {
64
+ setIsPopoverOpen(!isPopoverOpen);
65
+ };
66
+ return (0, _react2.jsx)(_popover.EuiPopover, {
67
+ button: (0, _react2.jsx)(_button.EuiButtonIcon, {
68
+ iconType: "arrowDown",
69
+ color: "text",
70
+ "aria-label": (0, _i18n.useEuiI18n)('euiFlyoutMenu.history', 'History')
71
+ }),
72
+ isOpen: isPopoverOpen,
73
+ onClick: handlePopoverButtonClick,
74
+ closePopover: function closePopover() {
75
+ return setIsPopoverOpen(false);
76
+ },
77
+ panelPaddingSize: "xs",
78
+ anchorPosition: "downLeft"
79
+ }, (0, _react2.jsx)(_list_group.EuiListGroup, {
80
+ gutterSize: "none"
81
+ }, items.map(function (item, index) {
82
+ return (0, _react2.jsx)(_list_group.EuiListGroupItem, {
83
+ key: "history-item-".concat(index),
84
+ label: item.title,
85
+ size: "s",
86
+ onClick: function onClick() {
87
+ item.onClick();
88
+ setIsPopoverOpen(false);
89
+ }
90
+ }, item.title);
91
+ })));
92
+ };
93
+
94
+ /**
95
+ * The component for the top menu bar inside a flyout. Since this is a private
96
+ * component, rendering is controlled using the `flyoutMenuProps` prop on
97
+ * `EuiFlyout`. In managed session flyouts, the Flyout Manager controls a back
98
+ * button and history popover for navigating to different flyout sessions
99
+ * within the managed context.
100
+ *
101
+ * @private
102
+ */
103
+ var EuiFlyoutMenu = exports.EuiFlyoutMenu = function EuiFlyoutMenu(_ref2) {
104
+ var className = _ref2.className,
105
+ title = _ref2.title,
106
+ titleId = _ref2.titleId,
107
+ hideTitle = _ref2.hideTitle,
108
+ hideCloseButton = _ref2.hideCloseButton,
109
+ _ref2$historyItems = _ref2.historyItems,
110
+ historyItems = _ref2$historyItems === void 0 ? [] : _ref2$historyItems,
111
+ showBackButton = _ref2.showBackButton,
112
+ backButtonProps = _ref2.backButtonProps,
113
+ customActions = _ref2.customActions,
114
+ rest = _objectWithoutProperties(_ref2, _excluded);
115
+ var _useContext = (0, _react.useContext)(_flyout_menu_context.EuiFlyoutMenuContext),
116
+ onClose = _useContext.onClose;
117
+ var styles = (0, _services.useEuiMemoizedStyles)(_flyout_menu.euiFlyoutMenuStyles);
118
+ var classes = (0, _classnames.default)('euiFlyoutMenu', className);
119
+ var titleNode;
120
+ if (title) {
121
+ titleNode = (0, _react2.jsx)(_title.EuiTitle, {
122
+ size: "xxs",
123
+ id: titleId
124
+ }, (0, _react2.jsx)("h3", {
125
+ css: hideTitle && styles.euiFlyoutMenu__hiddenTitle
126
+ }, title));
127
+ }
128
+ var handleClose = function handleClose(event) {
129
+ onClose === null || onClose === void 0 || onClose(event);
130
+ };
131
+ var closeButton = (0, _react2.jsx)(_flyout_close_button.EuiFlyoutCloseButton, {
132
+ onClose: handleClose,
133
+ side: "right",
134
+ closeButtonPosition: "inside"
135
+ });
136
+ return (0, _react2.jsx)("div", _extends({
137
+ className: classes,
138
+ css: styles.euiFlyoutMenu__container
139
+ }, rest), (0, _react2.jsx)(_flex.EuiFlexGroup, {
140
+ alignItems: "center",
141
+ justifyContent: "spaceBetween",
142
+ gutterSize: "none",
143
+ responsive: false
144
+ }, showBackButton && (0, _react2.jsx)(_flex.EuiFlexItem, {
145
+ grow: false
146
+ }, (0, _react2.jsx)(BackButton, backButtonProps)), historyItems.length > 0 && (0, _react2.jsx)(_flex.EuiFlexItem, {
147
+ grow: false
148
+ }, (0, _react2.jsx)(HistoryPopover, {
149
+ items: historyItems
150
+ })), titleNode && (0, _react2.jsx)(_flex.EuiFlexItem, {
151
+ grow: false
152
+ }, titleNode), (0, _react2.jsx)(_flex.EuiFlexItem, {
153
+ grow: true
154
+ }), customActions && customActions.map(function (action, actionIndex) {
155
+ return (0, _react2.jsx)(_flex.EuiFlexItem, {
156
+ grow: false,
157
+ key: "action-index-flex-item-".concat(actionIndex),
158
+ css: styles.euiFlyoutMenu__actions
159
+ }, (0, _react2.jsx)(_button.EuiButtonIcon, {
160
+ key: "action-index-icon-".concat(actionIndex),
161
+ "aria-label": action['aria-label'],
162
+ iconType: action.iconType,
163
+ onClick: action.onClick,
164
+ color: "text",
165
+ size: "s"
166
+ }));
167
+ }), !hideCloseButton && (0, _react2.jsx)(_flex.EuiFlexItem, {
168
+ grow: false,
169
+ css: styles.euiFlyoutMenu__spacer
170
+ })), !hideCloseButton && closeButton);
171
+ };
172
+ EuiFlyoutMenu.propTypes = {
173
+ className: _propTypes.default.string,
174
+ "aria-label": _propTypes.default.string,
175
+ "data-test-subj": _propTypes.default.string,
176
+ css: _propTypes.default.any,
177
+ /**
178
+ * An id to use for the title element. Useful for setting aria-labelledby on the flyout.
179
+ * Example:
180
+ * ```jsx
181
+ * <EuiFlyout
182
+ * aria-labelledby="myMenuTitleId"
183
+ * flyoutMenuProps={{ title: 'Menu title', titleId: 'myMenuTitleId' }
184
+ * >
185
+ * ...
186
+ * </EuiFlyout>
187
+ * ```
188
+ */
189
+ titleId: _propTypes.default.string,
190
+ /**
191
+ * Title for the menu component. In a managed flyout context, the title is used to indicate the flyout session for history navigation.
192
+ */
193
+ title: _propTypes.default.node,
194
+ /**
195
+ * Hides the title in the `EuiFlyoutMenu`. This is useful when the title is already shown in an `EuiFlyoutHeader`.
196
+ * @default true for main flyout in a managed flyout session; false otherwise
197
+ */
198
+ hideTitle: _propTypes.default.bool,
199
+ /**
200
+ * Hides the close button in the menu component
201
+ * @default false
202
+ */
203
+ hideCloseButton: _propTypes.default.bool,
204
+ /**
205
+ * Shows a back button in the menu component
206
+ * @default false
207
+ */
208
+ showBackButton: _propTypes.default.bool,
209
+ /**
210
+ * Props to pass to the back button, such as `onClick` handler
211
+ */
212
+ backButtonProps: _propTypes.default.any,
213
+ /**
214
+ * List of history items for the history popover
215
+ */
216
+ historyItems: _propTypes.default.arrayOf(_propTypes.default.shape({
217
+ /**
218
+ * Title for the history item
219
+ */
220
+ title: _propTypes.default.string.isRequired,
221
+ /**
222
+ * onClick handler for the history item
223
+ */
224
+ onClick: _propTypes.default.func.isRequired
225
+ }).isRequired),
226
+ /**
227
+ * List of custom action items for the menu component
228
+ */
229
+ customActions: _propTypes.default.arrayOf(_propTypes.default.shape({
230
+ /**
231
+ * Icon type for the action button
232
+ */
233
+ iconType: _propTypes.default.string.isRequired,
234
+ /**
235
+ * onClick handler for the action button
236
+ */
237
+ onClick: _propTypes.default.func.isRequired,
238
+ /**
239
+ * Aria label for the action button
240
+ */
241
+ "aria-label": _propTypes.default.string.isRequired
242
+ }).isRequired)
243
+ };
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiFlyoutMenuStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _accessibility = require("../accessibility");
9
+ /*
10
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
11
+ * or more contributor license agreements. Licensed under the Elastic License
12
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
13
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
14
+ * Side Public License, v 1.
15
+ */
16
+
17
+ var euiFlyoutMenuStyles = exports.euiFlyoutMenuStyles = function euiFlyoutMenuStyles(euiThemeContext) {
18
+ var euiTheme = euiThemeContext.euiTheme;
19
+ return {
20
+ euiFlyoutMenu__container: /*#__PURE__*/(0, _react.css)("block-size:calc(", euiTheme.size.m, " * 3.5);flex-shrink:0;padding-block:", euiTheme.size.s, ";padding-inline:", euiTheme.size.s, ";border-block-end:", euiTheme.border.width.thin, " solid ", euiTheme.border.color, ";padding-block-start:calc(", euiTheme.size.m, " * 0.8);.euiTitle{padding-inline:", euiTheme.size.s, ";};label:euiFlyoutMenu__container;"),
21
+ euiFlyoutMenu__spacer: /*#__PURE__*/(0, _react.css)("padding-inline:", euiTheme.size.m, ";;label:euiFlyoutMenu__spacer;"),
22
+ euiFlyoutMenu__actions: /*#__PURE__*/(0, _react.css)("block-size:calc(", euiTheme.size.m, " * 1.8);;label:euiFlyoutMenu__actions;"),
23
+ euiFlyoutMenu__hiddenTitle: /*#__PURE__*/(0, _react.css)((0, _accessibility.euiScreenReaderOnly)(), ";;label:euiFlyoutMenu__hiddenTitle;")
24
+ };
25
+ };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.EuiFlyoutContext = void 0;
6
+ exports.EuiFlyoutMenuContext = void 0;
7
7
  var _react = require("react");
8
8
  /*
9
9
  * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
@@ -13,9 +13,4 @@ var _react = require("react");
13
13
  * Side Public License, v 1.
14
14
  */
15
15
 
16
- /**
17
- * Context shared between the main and child flyouts
18
- * @internal
19
- */
20
-
21
- var EuiFlyoutContext = exports.EuiFlyoutContext = /*#__PURE__*/(0, _react.createContext)(null);
16
+ var EuiFlyoutMenuContext = exports.EuiFlyoutMenuContext = /*#__PURE__*/(0, _react.createContext)({});
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+
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
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useIsInsideParentFlyout = exports.EuiFlyoutParentProvider = void 0;
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _react2 = require("@emotion/react");
10
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
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
+
20
+ /**
21
+ * Context to track if we're inside a parent flyout's children.
22
+ * This allows nested flyouts to automatically inherit the session
23
+ * without requiring explicit `session="inherit"` prop.
24
+ */var EuiFlyoutParentContext = /*#__PURE__*/(0, _react.createContext)(false);
25
+
26
+ /**
27
+ * Provider that wraps a flyout's children to indicate they're inside a parent flyout.
28
+ * Nested flyouts can use this to automatically default to session inheritance.
29
+ */
30
+ var EuiFlyoutParentProvider = exports.EuiFlyoutParentProvider = function EuiFlyoutParentProvider(_ref) {
31
+ var children = _ref.children;
32
+ return (0, _react2.jsx)(EuiFlyoutParentContext.Provider, {
33
+ value: true
34
+ }, children);
35
+ };
36
+
37
+ /**
38
+ * Hook that returns `true` when called within a parent flyout's children.
39
+ * Used to automatically determine if a nested flyout should inherit the session.
40
+ */
41
+ var useIsInsideParentFlyout = exports.useIsInsideParentFlyout = function useIsInsideParentFlyout() {
42
+ return (0, _react.useContext)(EuiFlyoutParentContext);
43
+ };