@elastic/eui 95.1.0-backport.0 → 95.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/eui_theme_dark.css +0 -240
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -240
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  6. package/es/components/context_menu/context_menu_item.js +1 -1
  7. package/es/components/form/file_picker/file_picker.js +49 -35
  8. package/es/components/form/file_picker/file_picker.styles.js +98 -0
  9. package/es/components/icon/assets/app_cases.js +9 -7
  10. package/es/components/icon/assets/logo_elastic_stack.js +6 -12
  11. package/es/services/theme/warning.js +7 -2
  12. package/eui.d.ts +52 -13
  13. package/i18ntokens.json +16 -16
  14. package/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  15. package/lib/components/context_menu/context_menu_item.js +1 -1
  16. package/lib/components/form/file_picker/file_picker.js +51 -37
  17. package/lib/components/form/file_picker/file_picker.styles.js +102 -0
  18. package/lib/components/icon/assets/app_cases.js +9 -7
  19. package/lib/components/icon/assets/logo_elastic_stack.js +6 -12
  20. package/lib/components/icon/svgs/app_cases.svg +6 -5
  21. package/lib/components/icon/svgs/logo_elastic_stack.svg +4 -7
  22. package/lib/services/theme/warning.js +7 -2
  23. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  24. package/optimize/es/components/form/file_picker/file_picker.js +40 -34
  25. package/optimize/es/components/form/file_picker/file_picker.styles.js +98 -0
  26. package/optimize/es/components/icon/assets/app_cases.js +9 -7
  27. package/optimize/es/components/icon/assets/logo_elastic_stack.js +6 -12
  28. package/optimize/es/services/theme/warning.js +7 -2
  29. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  30. package/optimize/lib/components/form/file_picker/file_picker.js +42 -36
  31. package/optimize/lib/components/form/file_picker/file_picker.styles.js +102 -0
  32. package/optimize/lib/components/icon/assets/app_cases.js +9 -7
  33. package/optimize/lib/components/icon/assets/logo_elastic_stack.js +6 -12
  34. package/optimize/lib/components/icon/svgs/app_cases.svg +6 -5
  35. package/optimize/lib/components/icon/svgs/logo_elastic_stack.svg +4 -7
  36. package/optimize/lib/services/theme/warning.js +7 -2
  37. package/package.json +2 -3
  38. package/src/components/form/_index.scss +0 -1
  39. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  40. package/test-env/components/context_menu/context_menu_item.js +1 -1
  41. package/test-env/components/form/file_picker/file_picker.js +46 -37
  42. package/test-env/components/form/file_picker/file_picker.styles.js +102 -0
  43. package/test-env/components/icon/assets/app_cases.js +9 -7
  44. package/test-env/components/icon/assets/logo_elastic_stack.js +6 -12
  45. package/test-env/services/theme/warning.js +7 -2
  46. package/src/components/form/file_picker/_file_picker.scss +0 -212
  47. package/src/components/form/file_picker/_index.scss +0 -2
  48. package/src/components/form/file_picker/_variables.scss +0 -1
@@ -0,0 +1,98 @@
1
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
2
+ /*
3
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
4
+ * or more contributor license agreements. Licensed under the Elastic License
5
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
6
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
7
+ * Side Public License, v 1.
8
+ */
9
+
10
+ import { css } from '@emotion/react';
11
+ import { euiCanAnimate, euiFontSize, euiTextTruncate, logicalCSS, mathWithUnits } from '../../../global_styling';
12
+ import { euiFormControlStyles, euiFormVariables } from '../form.styles';
13
+ var _ref = process.env.NODE_ENV === "production" ? {
14
+ name: "6h1iuq-euiFilePicker__clearButton",
15
+ styles: "pointer-events:auto;position:relative;label:euiFilePicker__clearButton;"
16
+ } : {
17
+ name: "6h1iuq-euiFilePicker__clearButton",
18
+ styles: "pointer-events:auto;position:relative;label:euiFilePicker__clearButton;",
19
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
20
+ };
21
+ var _ref2 = process.env.NODE_ENV === "production" ? {
22
+ name: "d8me89-euiFilePicker__rightIcon",
23
+ styles: "position:absolute;label:euiFilePicker__rightIcon;"
24
+ } : {
25
+ name: "d8me89-euiFilePicker__rightIcon",
26
+ styles: "position:absolute;label:euiFilePicker__rightIcon;",
27
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
28
+ };
29
+ var _ref3 = process.env.NODE_ENV === "production" ? {
30
+ name: "19x04ih-largeInteractive",
31
+ styles: "&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{text-decoration:underline;}.euiFilePicker__icon{transform:scale(1.1);}}};label:largeInteractive;"
32
+ } : {
33
+ name: "19x04ih-largeInteractive",
34
+ styles: "&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{text-decoration:underline;}.euiFilePicker__icon{transform:scale(1.1);}}};label:largeInteractive;",
35
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
36
+ };
37
+ var _ref4 = process.env.NODE_ENV === "production" ? {
38
+ name: "1j9s7hu-euiFilePicker__input",
39
+ styles: "position:absolute;inset:0;opacity:0;&:hover{cursor:pointer;}&:hover:disabled{cursor:not-allowed;}&:disabled{opacity:0;};label:euiFilePicker__input;"
40
+ } : {
41
+ name: "1j9s7hu-euiFilePicker__input",
42
+ styles: "position:absolute;inset:0;opacity:0;&:hover{cursor:pointer;}&:hover:disabled{cursor:not-allowed;}&:disabled{opacity:0;};label:euiFilePicker__input;",
43
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
44
+ };
45
+ export var euiFilePickerStyles = function euiFilePickerStyles(euiThemeContext) {
46
+ var euiTheme = euiThemeContext.euiTheme;
47
+ var formStyles = euiFormControlStyles(euiThemeContext);
48
+ var formVariables = euiFormVariables(euiThemeContext);
49
+ var _euiFontSize = euiFontSize(euiThemeContext, 's'),
50
+ fontSize = _euiFontSize.fontSize,
51
+ lineHeight = _euiFontSize.lineHeight;
52
+ return {
53
+ euiFilePicker: /*#__PURE__*/css("--euiFormControlLeftIconsCount:1;position:relative;&:has(input:focus){--euiFormControlStateColor:", euiTheme.colors.primary, ";};label:euiFilePicker;"),
54
+ isDroppingFile: /*#__PURE__*/css("--euiFormControlStateColor:", euiTheme.colors.primary, ";;label:isDroppingFile;"),
55
+ invalid: /*#__PURE__*/css("--euiFormControlStateColor:", euiTheme.colors.danger, ";;label:invalid;"),
56
+ hasFiles: /*#__PURE__*/css("--euiFormControlRightIconsCount:1;font-weight:", euiTheme.font.weight.bold, ";;label:hasFiles;"),
57
+ loading: /*#__PURE__*/css("--euiFormControlRightIconsCount:1;border-radius:", formVariables.controlCompressedBorderRadius, ";overflow:hidden;;label:loading;"),
58
+ // Skip the css() on the default width to avoid generating a className
59
+ formWidth: formStyles.formWidth,
60
+ fullWidth: /*#__PURE__*/css(formStyles.fullWidth, ";label:fullWidth;"),
61
+ // The input is an invisible dropzone / button
62
+ input: {
63
+ euiFilePicker__input: _ref4,
64
+ largeInteractive: _ref3
65
+ },
66
+ euiFilePicker__prompt: /*#__PURE__*/css("pointer-events:none;font-size:", fontSize, ";line-height:1;", euiTextTruncate(), " color:", euiTheme.colors.text, ";border:", euiTheme.border.width.thick, " dashed var(--euiFormControlStateColor, ", euiTheme.colors.lightShade, ");", euiCanAnimate, "{transition:border-color ", euiTheme.animation.fast, " ease-in,background-color ", euiTheme.animation.fast, " ease-in;};label:euiFilePicker__prompt;"),
67
+ disabled: /*#__PURE__*/css(formStyles.disabled, ";label:disabled;"),
68
+ // Skip the css() on the default height to avoid generating a className
69
+ uncompressed: formStyles.uncompressed,
70
+ compressed: /*#__PURE__*/css(formStyles.compressed, ";label:compressed;"),
71
+ // Completely different rendering style from the normal form controls
72
+ large: {
73
+ large: /*#__PURE__*/css("padding-inline:", euiTheme.size.l, ";display:flex;flex-direction:column;align-items:center;justify-content:center;.euiFilePicker__promptText{", euiTextTruncate(), " line-height:", lineHeight, ";};label:large;"),
74
+ // Static heights so that surrounding contents don't shift around
75
+ uncompressed: "\n ".concat(logicalCSS('height', mathWithUnits(euiTheme.size.base, function (x) {
76
+ return x * 8;
77
+ })), "\n border-radius: ").concat(formVariables.controlBorderRadius, ";\n "),
78
+ compressed: /*#__PURE__*/css(logicalCSS('height', mathWithUnits(euiTheme.size.base, function (x) {
79
+ return x * 6.5;
80
+ })), " border-radius:", formVariables.controlCompressedBorderRadius, ";;label:compressed;")
81
+ },
82
+ icon: {
83
+ euiFilePicker__icon: /*#__PURE__*/css(";label:euiFilePicker__icon;"),
84
+ normal: /*#__PURE__*/css("position:absolute;", logicalCSS('top', 0), " ", logicalCSS('height', '100%'), ";;label:normal;"),
85
+ uncompressed: "\n ".concat(logicalCSS('left', euiTheme.size.m), "\n "),
86
+ compresssed: /*#__PURE__*/css(logicalCSS('left', euiTheme.size.s), " ", logicalCSS('width', euiTheme.size.m), ";;label:compresssed;"),
87
+ large: /*#__PURE__*/css(logicalCSS('margin-bottom', euiTheme.size.base), " ", euiCanAnimate, "{transition:transform ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";};label:large;")
88
+ },
89
+ rightIcon: {
90
+ euiFilePicker__rightIcon: _ref2,
91
+ uncompressed: "\n ".concat(logicalCSS('top', euiTheme.size.m), "\n ").concat(logicalCSS('right', euiTheme.size.m), "\n "),
92
+ compressed: /*#__PURE__*/css(logicalCSS('right', euiTheme.size.s), " ", logicalCSS('top', '50%'), " ", logicalCSS('margin-top', mathWithUnits(euiTheme.size.m, function (x) {
93
+ return x / -2;
94
+ })), ";;label:compressed;")
95
+ },
96
+ euiFilePicker__clearButton: _ref
97
+ };
98
+ };
@@ -21,21 +21,23 @@ var EuiIconAppCases = function EuiIconAppCases(_ref) {
21
21
  xmlns: "http://www.w3.org/2000/svg",
22
22
  width: 32,
23
23
  height: 32,
24
- fill: "none",
25
24
  viewBox: "0 0 32 32",
26
25
  "aria-labelledby": titleId
27
26
  }, props), title ? ___EmotionJSX("title", {
28
27
  id: titleId
29
28
  }, title) : null, ___EmotionJSX("path", {
30
- fillRule: "evenodd",
31
- 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"
29
+ d: "M4 6h22v7h-2V8H6v19H4V6Z",
30
+ className: "euiIcon__fillSecondary"
31
+ }), ___EmotionJSX("path", {
32
+ d: "M10 12H7v-2h3v2Zm1 0h12v-2H11v2Z",
33
+ className: "euiIcon__fillSecondary"
34
+ }), ___EmotionJSX("path", {
35
+ 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"
32
36
  }), ___EmotionJSX("path", {
33
- d: "m30.293 27.707-4-4 1.414-1.414 4 4-1.414 1.414ZM6 4H2v27h25v-3h-2v1H4V6h2V4Zm19 6h2V4h-4v2h2v4Z"
37
+ d: "M23 21v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2Z"
34
38
  }), ___EmotionJSX("path", {
35
39
  fillRule: "evenodd",
36
- 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",
37
- className: "euiIcon__fillSecondary",
38
- clipRule: "evenodd"
40
+ 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"
39
41
  }));
40
42
  };
41
43
  export var icon = EuiIconAppCases;
@@ -25,21 +25,15 @@ var EuiIconLogoElasticStack = function EuiIconLogoElasticStack(_ref) {
25
25
  "aria-labelledby": titleId
26
26
  }, props), title ? ___EmotionJSX("title", {
27
27
  id: titleId
28
- }, title) : null, ___EmotionJSX("g", {
29
- fill: "none",
30
- fillRule: "evenodd"
31
- }, ___EmotionJSX("path", {
28
+ }, title) : null, ___EmotionJSX("path", {
32
29
  fill: "#F04E98",
33
- d: "M32 9V2.5A2.5 2.5 0 0 0 29.5 0h-27A2.5 2.5 0 0 0 0 2.5V9h32Z"
30
+ 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"
34
31
  }), ___EmotionJSX("path", {
35
32
  fill: "#00BFB3",
36
- d: "M0 20h32v-8H0z"
33
+ d: "M0 20.148h32v-8.296H0v8.296Z"
37
34
  }), ___EmotionJSX("path", {
38
- fill: "#0080D5",
39
- d: "M14.5 23H0v6.5A2.5 2.5 0 0 0 2.5 32h12v-9Z"
40
- }), ___EmotionJSX("path", {
41
- fill: "#FEC514",
42
- d: "M17.5 23v9h12a2.5 2.5 0 0 0 2.5-2.5V23H17.5Z"
43
- })));
35
+ fill: "#07C",
36
+ 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"
37
+ }));
44
38
  };
45
39
  export var icon = EuiIconLogoElasticStack;
@@ -7,8 +7,8 @@
7
7
  */
8
8
 
9
9
  var providerWarning = undefined;
10
- export var setEuiDevProviderWarning = function setEuiDevProviderWarning(level) {
11
- return providerWarning = level;
10
+ export var setEuiDevProviderWarning = function setEuiDevProviderWarning(warningType) {
11
+ return providerWarning = warningType;
12
12
  };
13
13
  export var getEuiDevProviderWarning = function getEuiDevProviderWarning() {
14
14
  return providerWarning;
@@ -16,6 +16,11 @@ export var getEuiDevProviderWarning = function getEuiDevProviderWarning() {
16
16
 
17
17
  // Not a public top-level EUI export, currently for internal use
18
18
  export var emitEuiProviderWarning = function emitEuiProviderWarning(providerMessage) {
19
+ // Handle callback types
20
+ if (typeof providerWarning === 'function') {
21
+ return providerWarning(providerMessage);
22
+ }
23
+ // Handle level types
19
24
  switch (providerWarning) {
20
25
  case 'log':
21
26
  console.log(providerMessage);
@@ -293,7 +293,8 @@ var EuiComboBoxInput = exports.EuiComboBoxInput = /*#__PURE__*/function (_Compon
293
293
  },
294
294
  placeholder: showPlaceholder ? placeholder : undefined,
295
295
  value: this.searchValue,
296
- autoFocus: autoFocus
296
+ autoFocus: autoFocus,
297
+ autoComplete: "off"
297
298
  // Force the menu to re-open on every input click - only necessary when plain text
298
299
  ,
299
300
  onClick: this.asPlainText ? onFocus : undefined // Type shenanigans - event should be mostly the same
@@ -5,8 +5,9 @@ var _typeof = require("@babel/runtime/helpers/typeof");
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.EuiFilePicker = exports.DISPLAYS = void 0;
8
+ exports.EuiFilePickerClass = exports.EuiFilePicker = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
12
13
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -16,17 +17,18 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
16
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
17
18
  var _react = _interopRequireWildcard(require("react"));
18
19
  var _classnames = _interopRequireDefault(require("classnames"));
19
- var _common = require("../../common");
20
- var _validatable_control = require("../validatable_control");
20
+ var _services = require("../../../services");
21
21
  var _button = require("../../button");
22
22
  var _progress = require("../../progress");
23
23
  var _icon = require("../../icon");
24
24
  var _i18n = require("../../i18n");
25
25
  var _loading = require("../../loading");
26
- var _accessibility = require("../../../services/accessibility");
27
26
  var _eui_form_context = require("../eui_form_context");
27
+ var _validatable_control = require("../validatable_control");
28
+ var _form_control_layout_clear_button = require("../form_control_layout/form_control_layout_clear_button");
29
+ var _file_picker = require("./file_picker.styles");
28
30
  var _react2 = require("@emotion/react");
29
- var _excluded = ["id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
31
+ var _excluded = ["stylesMemoizer", "id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
30
32
  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); }
31
33
  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; }
32
34
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
@@ -37,25 +39,20 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
37
39
  * in compliance with, at your election, the Elastic License 2.0 or the Server
38
40
  * Side Public License, v 1.
39
41
  */
40
- var displayToClassNameMap = {
41
- default: null,
42
- large: 'euiFilePicker--large'
43
- };
44
- var DISPLAYS = exports.DISPLAYS = (0, _common.keysOf)(displayToClassNameMap);
45
- var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
46
- function EuiFilePicker() {
42
+ var EuiFilePickerClass = exports.EuiFilePickerClass = /*#__PURE__*/function (_Component) {
43
+ function EuiFilePickerClass() {
47
44
  var _this;
48
- (0, _classCallCheck2.default)(this, EuiFilePicker);
45
+ (0, _classCallCheck2.default)(this, EuiFilePickerClass);
49
46
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
50
47
  args[_key] = arguments[_key];
51
48
  }
52
- _this = _callSuper(this, EuiFilePicker, [].concat(args));
49
+ _this = _callSuper(this, EuiFilePickerClass, [].concat(args));
53
50
  (0, _defineProperty2.default)(_this, "state", {
54
51
  promptText: null,
55
52
  isHoveringDrop: false
56
53
  });
57
54
  (0, _defineProperty2.default)(_this, "fileInput", null);
58
- (0, _defineProperty2.default)(_this, "generatedId", (0, _accessibility.htmlIdGenerator)()());
55
+ (0, _defineProperty2.default)(_this, "generatedId", (0, _services.htmlIdGenerator)()());
59
56
  (0, _defineProperty2.default)(_this, "handleChange", function () {
60
57
  if (!_this.fileInput) return;
61
58
  if (_this.fileInput.files && _this.fileInput.files.length > 1) {
@@ -105,8 +102,8 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
105
102
  });
106
103
  return _this;
107
104
  }
108
- (0, _inherits2.default)(EuiFilePicker, _Component);
109
- return (0, _createClass2.default)(EuiFilePicker, [{
105
+ (0, _inherits2.default)(EuiFilePickerClass, _Component);
106
+ return (0, _createClass2.default)(EuiFilePickerClass, [{
110
107
  key: "render",
111
108
  value: function render() {
112
109
  var _this2 = this;
@@ -117,6 +114,7 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
117
114
  default: "Clear selected files"
118
115
  }, function (clearSelectedFiles) {
119
116
  var _this2$props = _this2.props,
117
+ stylesMemoizer = _this2$props.stylesMemoizer,
120
118
  id = _this2$props.id,
121
119
  name = _this2$props.name,
122
120
  initialPromptText = _this2$props.initialPromptText,
@@ -133,34 +131,39 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
133
131
  var promptId = "".concat(id || _this2.generatedId, "-filePicker__prompt");
134
132
  var isOverridingInitialPrompt = _this2.state.promptText != null;
135
133
  var normalFormControl = display === 'default';
136
- var classes = (0, _classnames.default)('euiFilePicker', displayToClassNameMap[display], {
137
- euiFilePicker__showDrop: _this2.state.isHoveringDrop,
138
- 'euiFilePicker--compressed': compressed,
139
- 'euiFilePicker--fullWidth': fullWidth,
134
+ var classes = (0, _classnames.default)('euiFilePicker', {
135
+ 'euiFilePicker-isDroppingFile': _this2.state.isHoveringDrop,
140
136
  'euiFilePicker-isInvalid': isInvalid,
141
137
  'euiFilePicker-isLoading': isLoading,
142
138
  'euiFilePicker-hasFiles': isOverridingInitialPrompt
143
139
  }, className);
140
+ var styles = stylesMemoizer(_file_picker.euiFilePickerStyles);
141
+ 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];
142
+ var inputStyles = [styles.input.euiFilePicker__input, !normalFormControl && !disabled && styles.input.largeInteractive];
143
+ var promptStyles = [styles.euiFilePicker__prompt, disabled && styles.disabled].concat((0, _toConsumableArray2.default)(normalFormControl ? [compressed ? styles.compressed : styles.uncompressed] : [styles.large.large, compressed ? styles.large.compressed : styles.large.uncompressed]));
144
+ var iconStyles = [styles.icon.euiFilePicker__icon].concat((0, _toConsumableArray2.default)(normalFormControl ? [styles.icon.normal, compressed ? styles.icon.compresssed : styles.icon.uncompressed] : [styles.icon.large]));
145
+ var rightIconStyles = normalFormControl ? [styles.rightIcon.euiFilePicker__rightIcon, compressed ? styles.rightIcon.compressed : styles.rightIcon.uncompressed] : undefined;
144
146
  var clearButton;
145
147
  if (isLoading && normalFormControl) {
146
148
  // Override clear button with loading spinner if it is in loading state
147
149
  clearButton = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
148
- className: "euiFilePicker__loadingSpinner"
150
+ css: rightIconStyles,
151
+ className: "euiFilePicker__loadingSpinner",
152
+ size: compressed ? 's' : 'm'
149
153
  });
150
154
  } else if (isOverridingInitialPrompt && !disabled) {
151
155
  if (normalFormControl) {
152
- clearButton = (0, _react2.jsx)("button", {
153
- type: "button",
156
+ clearButton = (0, _react2.jsx)(_form_control_layout_clear_button.EuiFormControlLayoutClearButton, {
154
157
  "aria-label": clearSelectedFiles,
158
+ css: [styles.euiFilePicker__clearButton, rightIconStyles, ";label:clearButton;"],
155
159
  className: "euiFilePicker__clearButton",
156
- onClick: _this2.removeFiles
157
- }, (0, _react2.jsx)(_icon.EuiIcon, {
158
- className: "euiFilePicker__clearIcon",
159
- type: "cross"
160
- }));
160
+ onClick: _this2.removeFiles,
161
+ size: compressed ? 's' : 'm'
162
+ });
161
163
  } else {
162
164
  clearButton = (0, _react2.jsx)(_button.EuiButtonEmpty, {
163
165
  "aria-label": clearSelectedFiles,
166
+ css: styles.euiFilePicker__clearButton,
164
167
  className: "euiFilePicker__clearButton",
165
168
  size: "xs",
166
169
  onClick: _this2.removeFiles
@@ -178,15 +181,15 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
178
181
  position: "absolute"
179
182
  });
180
183
  return (0, _react2.jsx)("div", {
184
+ css: cssStyles,
181
185
  className: classes
182
- }, (0, _react2.jsx)("div", {
183
- className: "euiFilePicker__wrap"
184
186
  }, (0, _react2.jsx)(_validatable_control.EuiValidatableControl, {
185
187
  isInvalid: isInvalid
186
188
  }, (0, _react2.jsx)("input", (0, _extends2.default)({
187
189
  type: "file",
188
190
  id: id,
189
191
  name: name,
192
+ css: inputStyles,
190
193
  className: "euiFilePicker__input",
191
194
  onChange: _this2.handleChange,
192
195
  ref: function ref(input) {
@@ -198,27 +201,30 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
198
201
  disabled: disabled,
199
202
  "aria-describedby": promptId
200
203
  }, rest))), (0, _react2.jsx)("div", {
204
+ css: promptStyles,
201
205
  className: "euiFilePicker__prompt",
202
206
  id: promptId
203
207
  }, (0, _react2.jsx)(_icon.EuiIcon, {
208
+ css: iconStyles,
204
209
  className: "euiFilePicker__icon",
205
210
  color: isInvalid ? 'danger' : disabled ? 'subdued' : 'primary',
206
211
  type: isInvalid ? 'alert' : 'importAction',
207
212
  size: normalFormControl ? 'm' : 'l',
208
213
  "aria-hidden": "true"
209
- }), (0, _react2.jsx)("div", {
214
+ }), (0, _react2.jsx)("span", {
210
215
  className: "euiFilePicker__promptText"
211
- }, _this2.state.promptText || initialPromptText), clearButton, loader)));
216
+ }, _this2.state.promptText || initialPromptText), clearButton, loader));
212
217
  });
213
218
  }
214
219
  }]);
215
220
  }(_react.Component);
216
- (0, _defineProperty2.default)(EuiFilePicker, "contextType", _eui_form_context.FormContext);
217
- (0, _defineProperty2.default)(EuiFilePicker, "defaultProps", {
221
+ (0, _defineProperty2.default)(EuiFilePickerClass, "contextType", _eui_form_context.FormContext);
222
+ (0, _defineProperty2.default)(EuiFilePickerClass, "defaultProps", {
218
223
  initialPromptText: (0, _react2.jsx)(_i18n.EuiI18n, {
219
224
  token: "euiFilePicker.promptText",
220
225
  default: "Select or drag and drop a file"
221
226
  }),
222
227
  compressed: false,
223
228
  display: 'large'
224
- });
229
+ });
230
+ 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
+ };
@@ -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>
@@ -13,8 +13,8 @@ exports.setEuiDevProviderWarning = exports.getEuiDevProviderWarning = exports.em
13
13
  */
14
14
 
15
15
  var providerWarning = undefined;
16
- var setEuiDevProviderWarning = exports.setEuiDevProviderWarning = function setEuiDevProviderWarning(level) {
17
- return providerWarning = level;
16
+ var setEuiDevProviderWarning = exports.setEuiDevProviderWarning = function setEuiDevProviderWarning(warningType) {
17
+ return providerWarning = warningType;
18
18
  };
19
19
  var getEuiDevProviderWarning = exports.getEuiDevProviderWarning = function getEuiDevProviderWarning() {
20
20
  return providerWarning;
@@ -22,6 +22,11 @@ var getEuiDevProviderWarning = exports.getEuiDevProviderWarning = function getEu
22
22
 
23
23
  // Not a public top-level EUI export, currently for internal use
24
24
  var emitEuiProviderWarning = exports.emitEuiProviderWarning = function emitEuiProviderWarning(providerMessage) {
25
+ // Handle callback types
26
+ if (typeof providerWarning === 'function') {
27
+ return providerWarning(providerMessage);
28
+ }
29
+ // Handle level types
25
30
  switch (providerWarning) {
26
31
  case 'log':
27
32
  console.log(providerMessage);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "95.1.0-backport.0",
4
+ "version": "95.2.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -269,6 +269,5 @@
269
269
  "eui.d.ts",
270
270
  "i18ntokens.json",
271
271
  "NOTICE.txt"
272
- ],
273
- "stableVersion": "95.1.0"
272
+ ]
274
273
  }