@elastic/eui 95.1.0 → 95.3.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 (203) hide show
  1. package/dist/eui_theme_dark.css +8 -604
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +8 -604
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/color_picker/color_palette_display/color_palette_display.js +9 -9
  6. package/es/components/color_picker/color_palette_display/color_palette_display.styles.js +24 -0
  7. package/es/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -0
  8. package/es/components/color_picker/color_palette_display/color_palette_display_fixed.styles.js +14 -0
  9. package/es/components/color_picker/color_palette_picker/color_palette_picker.js +34 -26
  10. package/es/components/color_picker/color_picker.js +26 -39
  11. package/es/components/color_picker/color_picker.styles.js +15 -5
  12. package/es/components/color_picker/color_picker_swatch.js +5 -1
  13. package/es/components/color_picker/color_picker_swatch.styles.js +19 -0
  14. package/es/components/color_picker/hue.js +11 -6
  15. package/es/components/color_picker/hue.styles.js +29 -0
  16. package/es/components/color_picker/saturation.js +29 -16
  17. package/es/components/color_picker/saturation.styles.js +23 -0
  18. package/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  19. package/es/components/context_menu/context_menu_item.js +1 -1
  20. package/es/components/form/file_picker/file_picker.js +54 -40
  21. package/es/components/form/file_picker/file_picker.styles.js +98 -0
  22. package/es/components/form/range/range.styles.js +1 -1
  23. package/es/components/icon/assets/app_cases.js +9 -7
  24. package/es/components/icon/assets/logo_elastic_stack.js +6 -12
  25. package/es/components/modal/modal.styles.js +1 -1
  26. package/es/components/popover/popover.js +5 -3
  27. package/es/components/provider/provider.js +2 -2
  28. package/es/components/steps/step.js +5 -3
  29. package/es/components/steps/step.styles.js +13 -5
  30. package/es/components/steps/step_horizontal.js +8 -3
  31. package/es/components/steps/step_horizontal.styles.js +1 -0
  32. package/es/components/steps/step_number.js +48 -24
  33. package/es/components/steps/step_number.styles.js +4 -2
  34. package/es/components/steps/steps.js +3 -1
  35. package/es/components/steps/steps_horizontal.js +1 -1
  36. package/es/global_styling/mixins/_helpers.js +10 -2
  37. package/es/services/breakpoint/current_breakpoint.js +5 -3
  38. package/es/services/theme/provider.js +10 -2
  39. package/es/services/theme/warning.js +7 -2
  40. package/eui.d.ts +7610 -7492
  41. package/i18ntokens.json +66 -66
  42. package/lib/components/color_picker/color_palette_display/color_palette_display.js +9 -9
  43. package/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +30 -0
  44. package/lib/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -0
  45. package/lib/components/color_picker/color_palette_display/color_palette_display_fixed.styles.js +19 -0
  46. package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +37 -27
  47. package/lib/components/color_picker/color_picker.js +26 -39
  48. package/lib/components/color_picker/color_picker.styles.js +15 -5
  49. package/lib/components/color_picker/color_picker_swatch.js +5 -1
  50. package/lib/components/color_picker/color_picker_swatch.styles.js +25 -0
  51. package/lib/components/color_picker/hue.js +11 -6
  52. package/lib/components/color_picker/hue.styles.js +35 -0
  53. package/lib/components/color_picker/saturation.js +27 -14
  54. package/lib/components/color_picker/saturation.styles.js +29 -0
  55. package/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  56. package/lib/components/context_menu/context_menu_item.js +1 -1
  57. package/lib/components/form/file_picker/file_picker.js +56 -42
  58. package/lib/components/form/file_picker/file_picker.styles.js +102 -0
  59. package/lib/components/form/range/range.styles.js +1 -1
  60. package/lib/components/icon/assets/app_cases.js +9 -7
  61. package/lib/components/icon/assets/logo_elastic_stack.js +6 -12
  62. package/lib/components/icon/svgs/app_cases.svg +6 -5
  63. package/lib/components/icon/svgs/logo_elastic_stack.svg +4 -7
  64. package/lib/components/modal/modal.styles.js +1 -1
  65. package/lib/components/popover/popover.js +5 -3
  66. package/lib/components/provider/provider.js +1 -1
  67. package/lib/components/steps/step.js +5 -3
  68. package/lib/components/steps/step.styles.js +13 -5
  69. package/lib/components/steps/step_horizontal.js +8 -3
  70. package/lib/components/steps/step_horizontal.styles.js +1 -0
  71. package/lib/components/steps/step_number.js +48 -24
  72. package/lib/components/steps/step_number.styles.js +3 -1
  73. package/lib/components/steps/steps.js +3 -1
  74. package/lib/components/steps/steps_horizontal.js +1 -1
  75. package/lib/global_styling/mixins/_helpers.js +10 -2
  76. package/lib/services/breakpoint/current_breakpoint.js +6 -4
  77. package/lib/services/theme/provider.js +9 -1
  78. package/lib/services/theme/warning.js +7 -2
  79. package/optimize/es/components/color_picker/color_palette_display/color_palette_display.js +8 -8
  80. package/optimize/es/components/color_picker/color_palette_display/color_palette_display.styles.js +24 -0
  81. package/optimize/es/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -0
  82. package/optimize/es/components/color_picker/color_palette_display/color_palette_display_fixed.styles.js +14 -0
  83. package/optimize/es/components/color_picker/color_palette_picker/color_palette_picker.js +34 -26
  84. package/optimize/es/components/color_picker/color_picker.js +26 -39
  85. package/optimize/es/components/color_picker/color_picker.styles.js +15 -5
  86. package/optimize/es/components/color_picker/color_picker_swatch.js +5 -1
  87. package/optimize/es/components/color_picker/color_picker_swatch.styles.js +19 -0
  88. package/optimize/es/components/color_picker/hue.js +11 -6
  89. package/optimize/es/components/color_picker/hue.styles.js +29 -0
  90. package/optimize/es/components/color_picker/saturation.js +29 -16
  91. package/optimize/es/components/color_picker/saturation.styles.js +23 -0
  92. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  93. package/optimize/es/components/form/file_picker/file_picker.js +45 -39
  94. package/optimize/es/components/form/file_picker/file_picker.styles.js +98 -0
  95. package/optimize/es/components/form/range/range.styles.js +1 -1
  96. package/optimize/es/components/icon/assets/app_cases.js +9 -7
  97. package/optimize/es/components/icon/assets/logo_elastic_stack.js +6 -12
  98. package/optimize/es/components/modal/modal.styles.js +1 -1
  99. package/optimize/es/components/popover/popover.js +5 -3
  100. package/optimize/es/components/provider/provider.js +2 -2
  101. package/optimize/es/components/steps/step.js +2 -2
  102. package/optimize/es/components/steps/step.styles.js +13 -5
  103. package/optimize/es/components/steps/step_horizontal.js +8 -3
  104. package/optimize/es/components/steps/step_horizontal.styles.js +1 -0
  105. package/optimize/es/components/steps/step_number.js +44 -22
  106. package/optimize/es/components/steps/step_number.styles.js +4 -2
  107. package/optimize/es/components/steps/steps_horizontal.js +1 -1
  108. package/optimize/es/global_styling/mixins/_helpers.js +10 -2
  109. package/optimize/es/services/breakpoint/current_breakpoint.js +5 -3
  110. package/optimize/es/services/theme/provider.js +10 -2
  111. package/optimize/es/services/theme/warning.js +7 -2
  112. package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.js +8 -8
  113. package/optimize/lib/components/color_picker/color_palette_display/color_palette_display.styles.js +30 -0
  114. package/optimize/lib/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -0
  115. package/optimize/lib/components/color_picker/color_palette_display/color_palette_display_fixed.styles.js +19 -0
  116. package/optimize/lib/components/color_picker/color_palette_picker/color_palette_picker.js +38 -27
  117. package/optimize/lib/components/color_picker/color_picker.js +26 -39
  118. package/optimize/lib/components/color_picker/color_picker.styles.js +15 -5
  119. package/optimize/lib/components/color_picker/color_picker_swatch.js +5 -1
  120. package/optimize/lib/components/color_picker/color_picker_swatch.styles.js +25 -0
  121. package/optimize/lib/components/color_picker/hue.js +11 -6
  122. package/optimize/lib/components/color_picker/hue.styles.js +35 -0
  123. package/optimize/lib/components/color_picker/saturation.js +27 -14
  124. package/optimize/lib/components/color_picker/saturation.styles.js +29 -0
  125. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  126. package/optimize/lib/components/form/file_picker/file_picker.js +47 -41
  127. package/optimize/lib/components/form/file_picker/file_picker.styles.js +102 -0
  128. package/optimize/lib/components/form/range/range.styles.js +1 -1
  129. package/optimize/lib/components/icon/assets/app_cases.js +9 -7
  130. package/optimize/lib/components/icon/assets/logo_elastic_stack.js +6 -12
  131. package/optimize/lib/components/icon/svgs/app_cases.svg +6 -5
  132. package/optimize/lib/components/icon/svgs/logo_elastic_stack.svg +4 -7
  133. package/optimize/lib/components/modal/modal.styles.js +1 -1
  134. package/optimize/lib/components/popover/popover.js +5 -3
  135. package/optimize/lib/components/provider/provider.js +1 -1
  136. package/optimize/lib/components/steps/step.js +2 -2
  137. package/optimize/lib/components/steps/step.styles.js +13 -5
  138. package/optimize/lib/components/steps/step_horizontal.js +8 -3
  139. package/optimize/lib/components/steps/step_horizontal.styles.js +1 -0
  140. package/optimize/lib/components/steps/step_number.js +44 -22
  141. package/optimize/lib/components/steps/step_number.styles.js +3 -1
  142. package/optimize/lib/components/steps/steps_horizontal.js +1 -1
  143. package/optimize/lib/global_styling/mixins/_helpers.js +10 -2
  144. package/optimize/lib/services/breakpoint/current_breakpoint.js +6 -4
  145. package/optimize/lib/services/theme/provider.js +9 -1
  146. package/optimize/lib/services/theme/warning.js +7 -2
  147. package/package.json +10 -7
  148. package/src/components/form/_index.scss +0 -1
  149. package/src/components/index.scss +0 -1
  150. package/src/global_styling/mixins/_shadow.scss +5 -0
  151. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  152. package/test-env/components/color_picker/color_palette_display/color_palette_display.js +9 -9
  153. package/test-env/components/color_picker/color_palette_display/color_palette_display.styles.js +30 -0
  154. package/test-env/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -0
  155. package/test-env/components/color_picker/color_palette_display/color_palette_display_fixed.styles.js +19 -0
  156. package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +38 -27
  157. package/test-env/components/color_picker/color_picker.js +26 -39
  158. package/test-env/components/color_picker/color_picker.styles.js +15 -5
  159. package/test-env/components/color_picker/color_picker_swatch.js +5 -1
  160. package/test-env/components/color_picker/color_picker_swatch.styles.js +25 -0
  161. package/test-env/components/color_picker/hue.js +11 -6
  162. package/test-env/components/color_picker/hue.styles.js +35 -0
  163. package/test-env/components/color_picker/saturation.js +27 -14
  164. package/test-env/components/color_picker/saturation.styles.js +29 -0
  165. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  166. package/test-env/components/context_menu/context_menu_item.js +1 -1
  167. package/test-env/components/form/file_picker/file_picker.js +51 -42
  168. package/test-env/components/form/file_picker/file_picker.styles.js +102 -0
  169. package/test-env/components/form/range/range.styles.js +1 -1
  170. package/test-env/components/icon/assets/app_cases.js +9 -7
  171. package/test-env/components/icon/assets/logo_elastic_stack.js +6 -12
  172. package/test-env/components/modal/modal.styles.js +1 -1
  173. package/test-env/components/popover/popover.js +5 -3
  174. package/test-env/components/provider/provider.js +1 -1
  175. package/test-env/components/steps/step.js +5 -3
  176. package/test-env/components/steps/step.styles.js +13 -5
  177. package/test-env/components/steps/step_horizontal.js +8 -3
  178. package/test-env/components/steps/step_horizontal.styles.js +1 -0
  179. package/test-env/components/steps/step_number.js +48 -24
  180. package/test-env/components/steps/step_number.styles.js +3 -1
  181. package/test-env/components/steps/steps.js +3 -1
  182. package/test-env/components/steps/steps_horizontal.js +1 -1
  183. package/test-env/global_styling/mixins/_helpers.js +10 -2
  184. package/test-env/services/breakpoint/current_breakpoint.js +6 -4
  185. package/test-env/services/theme/provider.js +9 -1
  186. package/test-env/services/theme/warning.js +7 -2
  187. package/src/components/color_picker/_color_picker.scss +0 -37
  188. package/src/components/color_picker/_color_picker_swatch.scss +0 -18
  189. package/src/components/color_picker/_hue.scss +0 -88
  190. package/src/components/color_picker/_index.scss +0 -7
  191. package/src/components/color_picker/_saturation.scss +0 -57
  192. package/src/components/color_picker/_variables.scss +0 -6
  193. package/src/components/color_picker/color_palette_display/_color_palette_display.scss +0 -18
  194. package/src/components/color_picker/color_palette_display/_color_palette_display_fixed.scss +0 -12
  195. package/src/components/color_picker/color_palette_display/_index.scss +0 -4
  196. package/src/components/color_picker/color_palette_display/_mixins.scss +0 -22
  197. package/src/components/color_picker/color_palette_display/_variables.scss +0 -6
  198. package/src/components/color_picker/color_palette_picker/_color_palette_picker.scss +0 -9
  199. package/src/components/color_picker/color_palette_picker/_index.scss +0 -1
  200. package/src/components/form/file_picker/_file_picker.scss +0 -212
  201. package/src/components/form/file_picker/_index.scss +0 -2
  202. package/src/components/form/file_picker/_variables.scss +0 -1
  203. package/src/themes/amsterdam/overrides/_hue.scss +0 -44
@@ -3,26 +3,33 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.EuiFilePicker = exports.DISPLAYS = void 0;
6
+ exports.EuiFilePickerClass = exports.EuiFilePicker = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
- var _common = require("../../common");
11
- var _validatable_control = require("../validatable_control");
10
+ var _services = require("../../../services");
12
11
  var _button = require("../../button");
13
12
  var _progress = require("../../progress");
14
13
  var _icon = require("../../icon");
15
14
  var _i18n = require("../../i18n");
16
15
  var _loading = require("../../loading");
17
- var _accessibility = require("../../../services/accessibility");
18
16
  var _eui_form_context = require("../eui_form_context");
17
+ var _validatable_control = require("../validatable_control");
18
+ var _form_control_layout_clear_button = require("../form_control_layout/form_control_layout_clear_button");
19
+ var _file_picker = require("./file_picker.styles");
19
20
  var _react2 = require("@emotion/react");
20
- var _excluded = ["id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
21
+ var _excluded = ["stylesMemoizer", "id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
21
22
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
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); }
23
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; }
24
25
  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); }
25
26
  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); }
27
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
28
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
+ 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; } }
30
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
31
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
32
+ 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; }
26
33
  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
34
  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
35
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -44,25 +51,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
44
51
  * in compliance with, at your election, the Elastic License 2.0 or the Server
45
52
  * Side Public License, v 1.
46
53
  */
47
- var displayToClassNameMap = {
48
- default: null,
49
- large: 'euiFilePicker--large'
50
- };
51
- var DISPLAYS = exports.DISPLAYS = (0, _common.keysOf)(displayToClassNameMap);
52
- var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
53
- function EuiFilePicker() {
54
+ var EuiFilePickerClass = exports.EuiFilePickerClass = /*#__PURE__*/function (_Component) {
55
+ function EuiFilePickerClass() {
54
56
  var _this;
55
- _classCallCheck(this, EuiFilePicker);
57
+ _classCallCheck(this, EuiFilePickerClass);
56
58
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
57
59
  args[_key] = arguments[_key];
58
60
  }
59
- _this = _callSuper(this, EuiFilePicker, [].concat(args));
61
+ _this = _callSuper(this, EuiFilePickerClass, [].concat(args));
60
62
  _defineProperty(_this, "state", {
61
63
  promptText: null,
62
64
  isHoveringDrop: false
63
65
  });
64
66
  _defineProperty(_this, "fileInput", null);
65
- _defineProperty(_this, "generatedId", (0, _accessibility.htmlIdGenerator)()());
67
+ _defineProperty(_this, "generatedId", (0, _services.htmlIdGenerator)()());
66
68
  _defineProperty(_this, "handleChange", function () {
67
69
  if (!_this.fileInput) return;
68
70
  if (_this.fileInput.files && _this.fileInput.files.length > 1) {
@@ -112,18 +114,19 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
112
114
  });
113
115
  return _this;
114
116
  }
115
- _inherits(EuiFilePicker, _Component);
116
- return _createClass(EuiFilePicker, [{
117
+ _inherits(EuiFilePickerClass, _Component);
118
+ return _createClass(EuiFilePickerClass, [{
117
119
  key: "render",
118
120
  value: function render() {
119
121
  var _this2 = this;
120
122
  var _ref = this.context,
121
123
  defaultFullWidth = _ref.defaultFullWidth;
122
124
  return (0, _react2.jsx)(_i18n.EuiI18n, {
123
- token: "euiFilePicker.clearSelectedFiles",
124
- default: "Clear selected files"
125
- }, function (clearSelectedFiles) {
125
+ token: "euiFilePicker.removeSelectedAriaLabel",
126
+ default: "Remove selected files"
127
+ }, function (removeSelectedAriaLabel) {
126
128
  var _this2$props = _this2.props,
129
+ stylesMemoizer = _this2$props.stylesMemoizer,
127
130
  id = _this2$props.id,
128
131
  name = _this2$props.name,
129
132
  initialPromptText = _this2$props.initialPromptText,
@@ -140,34 +143,39 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
140
143
  var promptId = "".concat(id || _this2.generatedId, "-filePicker__prompt");
141
144
  var isOverridingInitialPrompt = _this2.state.promptText != null;
142
145
  var normalFormControl = display === 'default';
143
- var classes = (0, _classnames.default)('euiFilePicker', displayToClassNameMap[display], {
144
- euiFilePicker__showDrop: _this2.state.isHoveringDrop,
145
- 'euiFilePicker--compressed': compressed,
146
- 'euiFilePicker--fullWidth': fullWidth,
146
+ var classes = (0, _classnames.default)('euiFilePicker', {
147
+ 'euiFilePicker-isDroppingFile': _this2.state.isHoveringDrop,
147
148
  'euiFilePicker-isInvalid': isInvalid,
148
149
  'euiFilePicker-isLoading': isLoading,
149
150
  'euiFilePicker-hasFiles': isOverridingInitialPrompt
150
151
  }, className);
152
+ var styles = stylesMemoizer(_file_picker.euiFilePickerStyles);
153
+ var cssStyles = [styles.euiFilePicker, fullWidth ? styles.fullWidth : styles.formWidth, _this2.state.isHoveringDrop && styles.isDroppingFile, isInvalid && !disabled && styles.invalid, isOverridingInitialPrompt && !disabled && styles.hasFiles, isLoading && styles.loading];
154
+ var inputStyles = [styles.input.euiFilePicker__input, !normalFormControl && !disabled && styles.input.largeInteractive];
155
+ var promptStyles = [styles.euiFilePicker__prompt, disabled && styles.disabled].concat(_toConsumableArray(normalFormControl ? [compressed ? styles.compressed : styles.uncompressed] : [styles.large.large, compressed ? styles.large.compressed : styles.large.uncompressed]));
156
+ var iconStyles = [styles.icon.euiFilePicker__icon].concat(_toConsumableArray(normalFormControl ? [styles.icon.normal, compressed ? styles.icon.compresssed : styles.icon.uncompressed] : [styles.icon.large]));
157
+ var rightIconStyles = normalFormControl ? [styles.rightIcon.euiFilePicker__rightIcon, compressed ? styles.rightIcon.compressed : styles.rightIcon.uncompressed] : undefined;
151
158
  var clearButton;
152
159
  if (isLoading && normalFormControl) {
153
160
  // Override clear button with loading spinner if it is in loading state
154
161
  clearButton = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
155
- className: "euiFilePicker__loadingSpinner"
162
+ css: rightIconStyles,
163
+ className: "euiFilePicker__loadingSpinner",
164
+ size: compressed ? 's' : 'm'
156
165
  });
157
166
  } else if (isOverridingInitialPrompt && !disabled) {
158
167
  if (normalFormControl) {
159
- clearButton = (0, _react2.jsx)("button", {
160
- type: "button",
161
- "aria-label": clearSelectedFiles,
168
+ clearButton = (0, _react2.jsx)(_form_control_layout_clear_button.EuiFormControlLayoutClearButton, {
169
+ "aria-label": removeSelectedAriaLabel,
170
+ css: [styles.euiFilePicker__clearButton, rightIconStyles, ";label:clearButton;"],
162
171
  className: "euiFilePicker__clearButton",
163
- onClick: _this2.removeFiles
164
- }, (0, _react2.jsx)(_icon.EuiIcon, {
165
- className: "euiFilePicker__clearIcon",
166
- type: "cross"
167
- }));
172
+ onClick: _this2.removeFiles,
173
+ size: compressed ? 's' : 'm'
174
+ });
168
175
  } else {
169
176
  clearButton = (0, _react2.jsx)(_button.EuiButtonEmpty, {
170
- "aria-label": clearSelectedFiles,
177
+ "aria-label": removeSelectedAriaLabel,
178
+ css: styles.euiFilePicker__clearButton,
171
179
  className: "euiFilePicker__clearButton",
172
180
  size: "xs",
173
181
  onClick: _this2.removeFiles
@@ -185,15 +193,15 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
185
193
  position: "absolute"
186
194
  });
187
195
  return (0, _react2.jsx)("div", {
196
+ css: cssStyles,
188
197
  className: classes
189
- }, (0, _react2.jsx)("div", {
190
- className: "euiFilePicker__wrap"
191
198
  }, (0, _react2.jsx)(_validatable_control.EuiValidatableControl, {
192
199
  isInvalid: isInvalid
193
200
  }, (0, _react2.jsx)("input", _extends({
194
201
  type: "file",
195
202
  id: id,
196
203
  name: name,
204
+ css: inputStyles,
197
205
  className: "euiFilePicker__input",
198
206
  onChange: _this2.handleChange,
199
207
  ref: function ref(input) {
@@ -205,23 +213,25 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
205
213
  disabled: disabled,
206
214
  "aria-describedby": promptId
207
215
  }, rest))), (0, _react2.jsx)("div", {
216
+ css: promptStyles,
208
217
  className: "euiFilePicker__prompt",
209
218
  id: promptId
210
219
  }, (0, _react2.jsx)(_icon.EuiIcon, {
220
+ css: iconStyles,
211
221
  className: "euiFilePicker__icon",
212
222
  color: isInvalid ? 'danger' : disabled ? 'subdued' : 'primary',
213
223
  type: isInvalid ? 'alert' : 'importAction',
214
224
  size: normalFormControl ? 'm' : 'l',
215
225
  "aria-hidden": "true"
216
- }), (0, _react2.jsx)("div", {
226
+ }), (0, _react2.jsx)("span", {
217
227
  className: "euiFilePicker__promptText"
218
- }, _this2.state.promptText || initialPromptText), clearButton, loader)));
228
+ }, _this2.state.promptText || initialPromptText), clearButton, loader));
219
229
  });
220
230
  }
221
231
  }]);
222
232
  }(_react.Component);
223
- _defineProperty(EuiFilePicker, "contextType", _eui_form_context.FormContext);
224
- _defineProperty(EuiFilePicker, "defaultProps", {
233
+ _defineProperty(EuiFilePickerClass, "contextType", _eui_form_context.FormContext);
234
+ _defineProperty(EuiFilePickerClass, "defaultProps", {
225
235
  initialPromptText: (0, _react2.jsx)(_i18n.EuiI18n, {
226
236
  token: "euiFilePicker.promptText",
227
237
  default: "Select or drag and drop a file"
@@ -229,12 +239,13 @@ _defineProperty(EuiFilePicker, "defaultProps", {
229
239
  compressed: false,
230
240
  display: 'large'
231
241
  });
232
- EuiFilePicker.propTypes = {
242
+ EuiFilePickerClass.propTypes = {
233
243
  id: _propTypes.default.string,
234
244
  name: _propTypes.default.string,
235
245
  className: _propTypes.default.string,
236
246
  /**
237
247
  * The content that appears in the dropzone if no file is attached
248
+ * @default 'Select or drag and drop a file'
238
249
  */
239
250
  initialPromptText: _propTypes.default.node,
240
251
  /**
@@ -243,12 +254,14 @@ EuiFilePicker.propTypes = {
243
254
  onChange: _propTypes.default.func,
244
255
  /**
245
256
  * Reduces the size to a typical (compressed) input
257
+ * @default false
246
258
  */
247
259
  compressed: _propTypes.default.bool,
248
260
  /**
249
261
  * Size or type of display;
250
262
  * `default` for normal height, similar to other controls;
251
263
  * `large` for taller size
264
+ * @default large
252
265
  */
253
266
  display: _propTypes.default.oneOf(["default", "large"]),
254
267
  /**
@@ -263,4 +276,5 @@ EuiFilePicker.propTypes = {
263
276
  "aria-label": _propTypes.default.string,
264
277
  "data-test-subj": _propTypes.default.string,
265
278
  css: _propTypes.default.any
266
- };
279
+ };
280
+ var EuiFilePicker = exports.EuiFilePicker = (0, _services.withEuiStylesMemoizer)(EuiFilePickerClass);
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.euiFilePickerStyles = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _global_styling = require("../../../global_styling");
9
+ var _form = require("../form.styles");
10
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; } /*
11
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
12
+ * or more contributor license agreements. Licensed under the Elastic License
13
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
14
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
15
+ * Side Public License, v 1.
16
+ */
17
+ var _ref = process.env.NODE_ENV === "production" ? {
18
+ name: "6h1iuq-euiFilePicker__clearButton",
19
+ styles: "pointer-events:auto;position:relative;label:euiFilePicker__clearButton;"
20
+ } : {
21
+ name: "6h1iuq-euiFilePicker__clearButton",
22
+ styles: "pointer-events:auto;position:relative;label:euiFilePicker__clearButton;",
23
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
24
+ };
25
+ var _ref2 = process.env.NODE_ENV === "production" ? {
26
+ name: "d8me89-euiFilePicker__rightIcon",
27
+ styles: "position:absolute;label:euiFilePicker__rightIcon;"
28
+ } : {
29
+ name: "d8me89-euiFilePicker__rightIcon",
30
+ styles: "position:absolute;label:euiFilePicker__rightIcon;",
31
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
32
+ };
33
+ var _ref3 = process.env.NODE_ENV === "production" ? {
34
+ name: "19x04ih-largeInteractive",
35
+ styles: "&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{text-decoration:underline;}.euiFilePicker__icon{transform:scale(1.1);}}};label:largeInteractive;"
36
+ } : {
37
+ name: "19x04ih-largeInteractive",
38
+ styles: "&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{text-decoration:underline;}.euiFilePicker__icon{transform:scale(1.1);}}};label:largeInteractive;",
39
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
40
+ };
41
+ var _ref4 = process.env.NODE_ENV === "production" ? {
42
+ name: "1j9s7hu-euiFilePicker__input",
43
+ styles: "position:absolute;inset:0;opacity:0;&:hover{cursor:pointer;}&:hover:disabled{cursor:not-allowed;}&:disabled{opacity:0;};label:euiFilePicker__input;"
44
+ } : {
45
+ name: "1j9s7hu-euiFilePicker__input",
46
+ styles: "position:absolute;inset:0;opacity:0;&:hover{cursor:pointer;}&:hover:disabled{cursor:not-allowed;}&:disabled{opacity:0;};label:euiFilePicker__input;",
47
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
48
+ };
49
+ var euiFilePickerStyles = exports.euiFilePickerStyles = function euiFilePickerStyles(euiThemeContext) {
50
+ var euiTheme = euiThemeContext.euiTheme;
51
+ var formStyles = (0, _form.euiFormControlStyles)(euiThemeContext);
52
+ var formVariables = (0, _form.euiFormVariables)(euiThemeContext);
53
+ var _euiFontSize = (0, _global_styling.euiFontSize)(euiThemeContext, 's'),
54
+ fontSize = _euiFontSize.fontSize,
55
+ lineHeight = _euiFontSize.lineHeight;
56
+ return {
57
+ euiFilePicker: /*#__PURE__*/(0, _react.css)("--euiFormControlLeftIconsCount:1;position:relative;&:has(input:focus){--euiFormControlStateColor:", euiTheme.colors.primary, ";};label:euiFilePicker;"),
58
+ isDroppingFile: /*#__PURE__*/(0, _react.css)("--euiFormControlStateColor:", euiTheme.colors.primary, ";;label:isDroppingFile;"),
59
+ invalid: /*#__PURE__*/(0, _react.css)("--euiFormControlStateColor:", euiTheme.colors.danger, ";;label:invalid;"),
60
+ hasFiles: /*#__PURE__*/(0, _react.css)("--euiFormControlRightIconsCount:1;font-weight:", euiTheme.font.weight.bold, ";;label:hasFiles;"),
61
+ loading: /*#__PURE__*/(0, _react.css)("--euiFormControlRightIconsCount:1;border-radius:", formVariables.controlCompressedBorderRadius, ";overflow:hidden;;label:loading;"),
62
+ // Skip the css() on the default width to avoid generating a className
63
+ formWidth: formStyles.formWidth,
64
+ fullWidth: /*#__PURE__*/(0, _react.css)(formStyles.fullWidth, ";label:fullWidth;"),
65
+ // The input is an invisible dropzone / button
66
+ input: {
67
+ euiFilePicker__input: _ref4,
68
+ largeInteractive: _ref3
69
+ },
70
+ euiFilePicker__prompt: /*#__PURE__*/(0, _react.css)("pointer-events:none;font-size:", fontSize, ";line-height:1;", (0, _global_styling.euiTextTruncate)(), " color:", euiTheme.colors.text, ";border:", euiTheme.border.width.thick, " dashed var(--euiFormControlStateColor, ", euiTheme.colors.lightShade, ");", _global_styling.euiCanAnimate, "{transition:border-color ", euiTheme.animation.fast, " ease-in,background-color ", euiTheme.animation.fast, " ease-in;};label:euiFilePicker__prompt;"),
71
+ disabled: /*#__PURE__*/(0, _react.css)(formStyles.disabled, ";label:disabled;"),
72
+ // Skip the css() on the default height to avoid generating a className
73
+ uncompressed: formStyles.uncompressed,
74
+ compressed: /*#__PURE__*/(0, _react.css)(formStyles.compressed, ";label:compressed;"),
75
+ // Completely different rendering style from the normal form controls
76
+ large: {
77
+ large: /*#__PURE__*/(0, _react.css)("padding-inline:", euiTheme.size.l, ";display:flex;flex-direction:column;align-items:center;justify-content:center;.euiFilePicker__promptText{", (0, _global_styling.euiTextTruncate)(), " line-height:", lineHeight, ";};label:large;"),
78
+ // Static heights so that surrounding contents don't shift around
79
+ uncompressed: "\n ".concat((0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
80
+ return x * 8;
81
+ })), "\n border-radius: ").concat(formVariables.controlBorderRadius, ";\n "),
82
+ compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
83
+ return x * 6.5;
84
+ })), " border-radius:", formVariables.controlCompressedBorderRadius, ";;label:compressed;")
85
+ },
86
+ icon: {
87
+ euiFilePicker__icon: /*#__PURE__*/(0, _react.css)(";label:euiFilePicker__icon;"),
88
+ normal: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('height', '100%'), ";;label:normal;"),
89
+ uncompressed: "\n ".concat((0, _global_styling.logicalCSS)('left', euiTheme.size.m), "\n "),
90
+ compresssed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('width', euiTheme.size.m), ";;label:compresssed;"),
91
+ large: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.base), " ", _global_styling.euiCanAnimate, "{transition:transform ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";};label:large;")
92
+ },
93
+ rightIcon: {
94
+ euiFilePicker__rightIcon: _ref2,
95
+ uncompressed: "\n ".concat((0, _global_styling.logicalCSS)('top', euiTheme.size.m), "\n ").concat((0, _global_styling.logicalCSS)('right', euiTheme.size.m), "\n "),
96
+ compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('top', '50%'), " ", (0, _global_styling.logicalCSS)('margin-top', (0, _global_styling.mathWithUnits)(euiTheme.size.m, function (x) {
97
+ return x / -2;
98
+ })), ";;label:compressed;")
99
+ },
100
+ euiFilePicker__clearButton: _ref
101
+ };
102
+ };
@@ -88,7 +88,7 @@ var euiRangeThumbStyle = exports.euiRangeThumbStyle = function euiRangeThumbStyl
88
88
  return "\n ".concat(euiRangeThumbBoxShadow(euiThemeContext), ";\n ").concat(euiRangeThumbBorder(euiThemeContext), ";\n cursor: pointer;\n background-color: ").concat(range.thumbBackgroundColor, ";\n padding: 0;\n block-size: ").concat(range.thumbHeight, ";\n inline-size: ").concat(range.thumbWidth, ";\n box-sizing: border-box; // required for firefox or the border makes the width and height to increase\n ");
89
89
  };
90
90
  var euiRangeThumbPerBrowser = exports.euiRangeThumbPerBrowser = function euiRangeThumbPerBrowser(content) {
91
- return "\n &::-webkit-slider-thumb { ".concat(content, "; }\n &::-moz-range-thumb { ").concat(content, "; }\n &::-ms-thumb {").concat(content, "; }\n ");
91
+ return "\n &::-webkit-slider-thumb { ".concat(content, "; }\n &::-moz-range-thumb { ").concat(content, "; }\n &::-ms-thumb {").concat(content, "; }\n ");
92
92
  };
93
93
  var euiRangeThumbFocus = exports.euiRangeThumbFocus = function euiRangeThumbFocus(euiThemeContext, color) {
94
94
  var range = euiRangeVariables(euiThemeContext);
@@ -29,21 +29,23 @@ var EuiIconAppCases = function EuiIconAppCases(_ref) {
29
29
  xmlns: "http://www.w3.org/2000/svg",
30
30
  width: 32,
31
31
  height: 32,
32
- fill: "none",
33
32
  viewBox: "0 0 32 32",
34
33
  "aria-labelledby": titleId
35
34
  }, props), title ? (0, _react2.jsx)("title", {
36
35
  id: titleId
37
36
  }, title) : null, (0, _react2.jsx)("path", {
38
- fillRule: "evenodd",
39
- d: "M22.5 24a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11Zm0 2a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15Z"
37
+ d: "M4 6h22v7h-2V8H6v19H4V6Z",
38
+ className: "euiIcon__fillSecondary"
39
+ }), (0, _react2.jsx)("path", {
40
+ d: "M10 12H7v-2h3v2Zm1 0h12v-2H11v2Z",
41
+ className: "euiIcon__fillSecondary"
42
+ }), (0, _react2.jsx)("path", {
43
+ d: "M24 1H0v26h1l-1 .001v.026a2.256 2.256 0 0 0 .01.185 4.318 4.318 0 0 0 .563 1.792C1.194 30.064 2.399 31 4.5 31H17v-2H8.429a4.32 4.32 0 0 0 .57-1.927v-.062L9 27.005v-.003S9 27 8 27h1V16h21v3h2v-5H7v12.995l-.003.05a2.32 2.32 0 0 1-.298.95C6.442 28.436 5.898 29 4.5 29c-1.398 0-1.942-.564-2.199-1.004a2.32 2.32 0 0 1-.3-1.001L2 26.992V3h20v3h2V1Z"
40
44
  }), (0, _react2.jsx)("path", {
41
- d: "m30.293 27.707-4-4 1.414-1.414 4 4-1.414 1.414ZM6 4H2v27h25v-3h-2v1H4V6h2V4Zm19 6h2V4h-4v2h2v4Z"
45
+ d: "M23 21v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2Z"
42
46
  }), (0, _react2.jsx)("path", {
43
47
  fillRule: "evenodd",
44
- d: "m16.381 3.024.538 1.158h2.274l.636 2.545H9.68l.637-2.545h2.558l.538-1.158c.292-.63.955-1.024 1.484-1.024.53 0 1.193.394 1.485 1.024Zm6.01 5.703-1.636-6.545h-2.56C17.6.898 16.262 0 14.897 0c-1.364 0-2.703.898-3.299 2.182H8.755L7.118 8.727h15.273ZM7 15h6v-2H7v2Zm6 5H7v-2h6v2Zm-6 5h6v-2H7v2Z",
45
- className: "euiIcon__fillSecondary",
46
- clipRule: "evenodd"
48
+ d: "M24 32a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm0-2a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z"
47
49
  }));
48
50
  };
49
51
  var icon = exports.icon = EuiIconAppCases;
@@ -33,21 +33,15 @@ var EuiIconLogoElasticStack = function EuiIconLogoElasticStack(_ref) {
33
33
  "aria-labelledby": titleId
34
34
  }, props), title ? (0, _react2.jsx)("title", {
35
35
  id: titleId
36
- }, title) : null, (0, _react2.jsx)("g", {
37
- fill: "none",
38
- fillRule: "evenodd"
39
- }, (0, _react2.jsx)("path", {
36
+ }, title) : null, (0, _react2.jsx)("path", {
40
37
  fill: "#F04E98",
41
- d: "M32 9V2.5A2.5 2.5 0 0 0 29.5 0h-27A2.5 2.5 0 0 0 0 2.5V9h32Z"
38
+ d: "M0 2.37A2.37 2.37 0 0 1 2.37 0h27.26A2.37 2.37 0 0 1 32 2.37v6.52H0V2.37Z"
42
39
  }), (0, _react2.jsx)("path", {
43
40
  fill: "#00BFB3",
44
- d: "M0 20h32v-8H0z"
41
+ d: "M0 20.148h32v-8.296H0v8.296Z"
45
42
  }), (0, _react2.jsx)("path", {
46
- fill: "#0080D5",
47
- d: "M14.5 23H0v6.5A2.5 2.5 0 0 0 2.5 32h12v-9Z"
48
- }), (0, _react2.jsx)("path", {
49
- fill: "#FEC514",
50
- d: "M17.5 23v9h12a2.5 2.5 0 0 0 2.5-2.5V23H17.5Z"
51
- })));
43
+ fill: "#07C",
44
+ d: "M0 23.111h32v6.519A2.37 2.37 0 0 1 29.63 32H2.37A2.37 2.37 0 0 1 0 29.63v-6.52Z"
45
+ }));
52
46
  };
53
47
  var icon = exports.icon = EuiIconLogoElasticStack;
@@ -1,6 +1,7 @@
1
- <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" d="M22.5 24a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11Zm0 2a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15Z" />
3
- <path d="m30.293 27.707-4-4 1.414-1.414 4 4-1.414 1.414Z" />
4
- <path d="M6 4H2v27h25v-3h-2v1H4V6h2V4Zm19 6h2V4h-4v2h2v4Z" />
5
- <path class="euiIcon__fillSecondary" fill-rule="evenodd" clip-rule="evenodd" d="m16.381 3.024.538 1.158h2.274l.636 2.545H9.68l.637-2.545h2.558l.538-1.158c.292-.63.955-1.024 1.484-1.024.53 0 1.193.394 1.485 1.024Zm6.01 5.703-1.636-6.545h-2.56C17.6.898 16.262 0 14.897 0c-1.364 0-2.703.898-3.299 2.182H8.755L7.118 8.727h15.273ZM7 15h6v-2H7v2Zm6 5H7v-2h6v2Zm-6 5h6v-2H7v2Z" />
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
+ <path class="euiIcon__fillSecondary" d="M4 6h22v7h-2V8H6v19H4V6Z"/>
3
+ <path class="euiIcon__fillSecondary" d="M10 12H7v-2h3v2Zm1 0h12v-2H11v2Z"/>
4
+ <path d="M24 1H0v26h1l-1 .001v.026a2.256 2.256 0 0 0 .01.185 4.318 4.318 0 0 0 .563 1.792C1.194 30.064 2.399 31 4.5 31H17v-2H8.429a4.32 4.32 0 0 0 .57-1.927v-.062L9 27.005v-.003S9 27 8 27h1V16h21v3h2v-5H7v12.995l-.003.05a2.32 2.32 0 0 1-.298.95C6.442 28.436 5.898 29 4.5 29c-1.398 0-1.942-.564-2.199-1.004a2.32 2.32 0 0 1-.3-1.001L2 26.992V3h20v3h2V1Z"/>
5
+ <path d="M23 21v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2Z"/>
6
+ <path fill-rule="evenodd" d="M24 32a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm0-2a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z"/>
6
7
  </svg>
@@ -1,8 +1,5 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
2
- <g fill="none" fill-rule="evenodd">
3
- <path fill="#F04E98" d="M32,9 L32,2.5 C32,1.119 30.881,0 29.5,0 L2.5,0 C1.119,0 0,1.119 0,2.5 L0,9 L32,9 Z"/>
4
- <polygon fill="#00BFB3" points="0 20 32 20 32 12 0 12"/>
5
- <path fill="#0080D5" d="M14.5,23 L0,23 L0,29.5 C0,30.881 1.119,32 2.5,32 L14.5,32 L14.5,23 Z"/>
6
- <path fill="#FEC514" d="M17.5,23 L17.5,32 L29.5,32 C30.881,32 32,30.881 32,29.5 L32,23 L17.5,23 Z"/>
7
- </g>
8
- </svg>
2
+ <path fill="#F04E98" d="M0 2.37A2.37 2.37 0 0 1 2.37 0h27.26A2.37 2.37 0 0 1 32 2.37v6.52H0V2.37Z"/>
3
+ <path fill="#00BFB3" d="M0 20.148h32v-8.296H0v8.296Z"/>
4
+ <path fill="#07C" d="M0 23.111h32v6.519A2.37 2.37 0 0 1 29.63 32H2.37A2.37 2.37 0 0 1 0 29.63v-6.52Z"/>
5
+ </svg>
@@ -19,7 +19,7 @@ var _form = require("../form/form.styles");
19
19
  var euiModalStyles = exports.euiModalStyles = function euiModalStyles(euiThemeContext) {
20
20
  var euiTheme = euiThemeContext.euiTheme;
21
21
  return {
22
- euiModal: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), " display:flex;flex-direction:column;max-block-size:75vh;position:relative;background-color:", euiTheme.colors.emptyShade, ";border-radius:", euiTheme.border.radius.medium, ";z-index:", euiTheme.levels.modal, ";min-inline-size:", (0, _form.euiFormVariables)(euiThemeContext).maxWidth, ";max-inline-size:calc(100vw - ", euiTheme.size.base, ");", _global_styling.euiCanAnimate, "{animation:", (0, _global_styling.euiAnimSlideInUp)(euiTheme.size.xxl), " ", euiTheme.animation.slow, " ", euiTheme.animation.bounce, ";}", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{position:fixed;inset:0;border-radius:0;inline-size:100vw!important;min-inline-size:0!important;max-inline-size:none!important;max-block-size:100vh!important;}&:focus{outline:none;};label:euiModal;"),
22
+ euiModal: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), " display:flex;flex-direction:column;max-block-size:75vh;position:relative;background-color:", euiTheme.colors.emptyShade, ";border-radius:", euiTheme.border.radius.medium, ";z-index:", euiTheme.levels.modal, ";min-inline-size:", (0, _form.euiFormVariables)(euiThemeContext).maxWidth, ";max-inline-size:calc(100vw - ", euiTheme.size.base, ");overflow:hidden;", _global_styling.euiCanAnimate, "{animation:", (0, _global_styling.euiAnimSlideInUp)(euiTheme.size.xxl), " ", euiTheme.animation.slow, " ", euiTheme.animation.bounce, ";}", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{position:fixed;inset:0;border-radius:0;inline-size:100vw!important;min-inline-size:0!important;max-inline-size:none!important;max-block-size:100vh!important;}&:focus{outline:none;};label:euiModal;"),
23
23
  // Variants
24
24
  defaultMaxWidth: /*#__PURE__*/(0, _react.css)("max-inline-size:min(\n ", euiTheme.breakpoint.m, "px,\n calc(100vw - ", euiTheme.size.base, ")\n );;label:defaultMaxWidth;"),
25
25
  confirmation: /*#__PURE__*/(0, _react.css)("min-inline-size:", (0, _form.euiFormVariables)(euiThemeContext).maxWidth, ";", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _mixins.euiShadowXLarge)(euiThemeContext, {
@@ -134,9 +134,11 @@ var EuiPopover = exports.EuiPopover = /*#__PURE__*/function (_Component) {
134
134
  });
135
135
  _defineProperty(_this, "handleStrandedFocus", function () {
136
136
  _this.strandedFocusTimeout = window.setTimeout(function () {
137
- // If `returnFocus` failed and focus was stranded on the body,
138
- // attempt to manually restore focus to the toggle button
139
- if (document.activeElement === document.body) {
137
+ // If `returnFocus` failed and focus was stranded,
138
+ // attempt to manually restore focus to the toggle button.
139
+ // The stranded focus is either in most cases on body but
140
+ // it will be on the panel instead on mount when isOpen=true
141
+ if (document.activeElement === document.body || document.activeElement === _this.panel) {
140
142
  if (!_this.button) return;
141
143
  var focusableItems = (0, _tabbable.focusable)(_this.button);
142
144
  if (!focusableItems.length) return;
@@ -83,5 +83,5 @@ var EuiProvider = exports.EuiProvider = function EuiProvider(_ref) {
83
83
  children: Utilities && (0, _react2.jsx)(Utilities, null)
84
84
  })), (0, _react2.jsx)(_component_defaults.EuiComponentDefaultsProvider, {
85
85
  componentDefaults: componentDefaults
86
- }, (0, _react2.jsx)(_services.CurrentEuiBreakpointProvider, null, children)))));
86
+ }, children))));
87
87
  };
@@ -57,9 +57,9 @@ var EuiStep = exports.EuiStep = function EuiStep(_ref) {
57
57
  }, (0, _react2.jsx)(_step_number.EuiStepNumber, {
58
58
  number: step,
59
59
  status: status,
60
- titleSize: titleSize
60
+ titleSize: titleSize === 'xxs' ? 'none' : titleSize
61
61
  }), (0, _react2.jsx)(_title.EuiTitle, {
62
- size: titleSize,
62
+ size: titleSize === 'xxs' ? 'xs' : titleSize,
63
63
  className: "euiStep__title",
64
64
  css: cssStepTitleStyles
65
65
  }, /*#__PURE__*/(0, _react.createElement)(headingElement, null, title))), (0, _react2.jsx)("div", {
@@ -90,7 +90,9 @@ EuiStep.propTypes = {
90
90
  */
91
91
  status: _propTypes.default.any,
92
92
  /**
93
- * Title sizing equivalent to EuiTitle, but only `m`, `s` and `xs`. Defaults to `s`
93
+ * Title sizing equivalent to **EuiTitle**, but only `m`, `s`, `xs` font sizes.
94
+ * The `xxs` size reduces the size of the accompanying step indicator, but not the title itself.
95
+ * @default s
94
96
  */
95
97
  titleSize: _propTypes.default.any
96
98
  };
@@ -19,6 +19,7 @@ var euiStepVariables = exports.euiStepVariables = function euiStepVariables(euiT
19
19
  return {
20
20
  numberSize: euiTheme.size.xl,
21
21
  numberXSSize: euiTheme.size.l,
22
+ numberXXSSize: euiTheme.size.base,
22
23
  numberMargin: euiTheme.size.base
23
24
  };
24
25
  };
@@ -38,9 +39,10 @@ var euiStepStyles = exports.euiStepStyles = function euiStepStyles(euiThemeConte
38
39
  return {
39
40
  euiStep: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-image:", lineGradient, ";background-repeat:no-repeat;};label:euiStep;"),
40
41
  // Sizes
41
- m: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ", euiTheme.size.xl, ";};label:m;"),
42
- s: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ", euiTheme.size.xl, ";};label:s;"),
43
- xs: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:-", euiTheme.size.xs, " ", euiTheme.size.l, ";};label:xs;")
42
+ m: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ", euiStep.numberSize, ";};label:m;"),
43
+ s: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ", euiStep.numberSize, ";};label:s;"),
44
+ xs: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:-", euiTheme.size.xs, " ", euiStep.numberXSSize, ";};label:xs;"),
45
+ xxs: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:-", euiTheme.size.s, " ", euiStep.numberXXSSize, ";};label:xxs;")
44
46
  };
45
47
  };
46
48
  var euiStepContentStyles = exports.euiStepContentStyles = function euiStepContentStyles(euiThemeContext) {
@@ -64,7 +66,12 @@ var euiStepContentStyles = exports.euiStepContentStyles = function euiStepConten
64
66
  return x / 2 + y;
65
67
  })), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberXSSize, function (x) {
66
68
  return x / 2;
67
- })), ";;label:xs;")
69
+ })), ";;label:xs;"),
70
+ xxs: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-left', (0, _global_styling.mathWithUnits)([euiStep.numberXXSSize, euiStep.numberMargin], function (x, y) {
71
+ return x / 2 + y;
72
+ })), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberXXSSize, function (x) {
73
+ return x / 2;
74
+ })), ";;label:xxs;")
68
75
  };
69
76
  };
70
77
  var euiStepTitleStyles = exports.euiStepTitleStyles = function euiStepTitleStyles(euiThemeContext) {
@@ -77,6 +84,7 @@ var euiStepTitleStyles = exports.euiStepTitleStyles = function euiStepTitleStyle
77
84
  // Sizes
78
85
  m: /*#__PURE__*/(0, _react.css)(";label:m;"),
79
86
  s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-top', euiTheme.size.xs), ";;label:s;"),
80
- xs: /*#__PURE__*/(0, _react.css)(";label:xs;")
87
+ xs: /*#__PURE__*/(0, _react.css)(";label:xs;"),
88
+ xxs: /*#__PURE__*/(0, _react.css)("line-height:", euiStep.numberXXSSize, ";;label:xxs;")
81
89
  };
82
90
  };
@@ -7,9 +7,9 @@ exports.EuiStepHorizontal = void 0;
7
7
  var _classnames = _interopRequireDefault(require("classnames"));
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
+ var _services = require("../../services");
10
11
  var _step_number = require("./step_number");
11
12
  var _step_strings = require("./step_strings");
12
- var _services = require("../../services");
13
13
  var _step_horizontal = require("./step_horizontal.styles");
14
14
  var _react2 = require("@emotion/react");
15
15
  var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size"];
@@ -24,6 +24,12 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
24
24
  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); }
25
25
  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; }
26
26
  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; }
27
+ // The titleSize map is not 1 to 1; small == xs on the titleSize map
28
+ var stepNumberSizeMap = {
29
+ xs: 'none',
30
+ s: 'xs',
31
+ m: 'm'
32
+ };
27
33
  var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_ref) {
28
34
  var className = _ref.className,
29
35
  _ref$step = _ref.step,
@@ -95,8 +101,7 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
95
101
  className: "euiStepHorizontal__number",
96
102
  status: status,
97
103
  number: step,
98
- titleSize: size === 's' ? 'xs' : 'm' // The titleSize map is not 1 to 1; small == xs on the titleSize map
99
- ,
104
+ titleSize: stepNumberSizeMap[size],
100
105
  css: cssNumberStyles
101
106
  }), (0, _react2.jsx)("span", {
102
107
  className: "euiStepHorizontal__title",
@@ -44,6 +44,7 @@ var euiStepHorizontalStyles = exports.euiStepHorizontalStyles = function euiStep
44
44
  // Adjust the size of the step number and connecting lines based on size
45
45
  m: _generateStepSizeAndInset(euiStep.numberSize),
46
46
  s: _generateStepSizeAndInset(euiStep.numberXSSize),
47
+ xs: _generateStepSizeAndInset(euiStep.numberXXSSize),
47
48
  // Note: these selectors must be nested because focus/hover state
48
49
  // is on the parent container, but affects specific children
49
50
  enabled: /*#__PURE__*/(0, _react.css)("&:focus,&:hover{.euiStepHorizontal__title{text-decoration:underline;}}&:focus{outline:none;.euiStepHorizontal__number{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}.euiStepHorizontal__number:not(:focus-visible){outline:", euiTheme.focus.width, " solid ", euiTheme.colors.darkestShade, ";}};label:enabled;"),