@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
@@ -14,8 +14,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
14
14
 
15
15
  import React, { forwardRef, useMemo } from 'react';
16
16
  import classNames from 'classnames';
17
- import { getChromaColor } from './utils';
17
+ import { useEuiMemoizedStyles } from '../../services';
18
18
  import { useEuiI18n } from '../i18n';
19
+ import { getChromaColor } from './utils';
20
+ import { euiColorPickerSwatchStyles } from './color_picker_swatch.styles';
19
21
  import { jsx as ___EmotionJSX } from "@emotion/react";
20
22
  export var EuiColorPickerSwatch = /*#__PURE__*/forwardRef(function (_ref, ref) {
21
23
  var className = _ref.className,
@@ -23,6 +25,7 @@ export var EuiColorPickerSwatch = /*#__PURE__*/forwardRef(function (_ref, ref) {
23
25
  style = _ref.style,
24
26
  rest = _objectWithoutProperties(_ref, _excluded);
25
27
  var classes = classNames('euiColorPickerSwatch', className);
28
+ var styles = useEuiMemoizedStyles(euiColorPickerSwatchStyles);
26
29
  var chromaColor = useMemo(function () {
27
30
  return getChromaColor(color, true);
28
31
  }, [color]);
@@ -34,6 +37,7 @@ export var EuiColorPickerSwatch = /*#__PURE__*/forwardRef(function (_ref, ref) {
34
37
  });
35
38
  return ___EmotionJSX("button", _extends({
36
39
  type: "button",
40
+ css: styles.euiColorPickerSwatch,
37
41
  className: classes,
38
42
  "aria-label": ariaLabel,
39
43
  ref: ref,
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+
9
+ import { css } from '@emotion/react';
10
+ import { transparentize } from '../../services';
11
+ import { logicalSizeCSS, mathWithUnits, euiOutline } from '../../global_styling';
12
+ export var euiColorPickerSwatchStyles = function euiColorPickerSwatchStyles(euiThemeContext) {
13
+ var euiTheme = euiThemeContext.euiTheme;
14
+ return {
15
+ euiColorPickerSwatch: /*#__PURE__*/css("display:inline-block;", logicalSizeCSS(euiTheme.size.l), " border-radius:", mathWithUnits(euiTheme.border.radius.medium, function (x) {
16
+ return x / 2;
17
+ }), ";border:", euiTheme.border.width.thin, " solid ", transparentize(euiTheme.colors.fullShade, 0.1), ";box-shadow:inset 0 0 0 ", euiTheme.border.width.thin, " ", transparentize(euiTheme.colors.emptyShade, 0.05), ";cursor:pointer;&:disabled{cursor:default;}&:focus{", euiOutline(euiThemeContext, 'center'), ";};label:euiColorPickerSwatch;")
18
+ };
19
+ };
@@ -11,8 +11,10 @@ var _excluded = ["className", "hex", "hue", "id", "onChange"];
11
11
 
12
12
  import React from 'react';
13
13
  import classNames from 'classnames';
14
+ import { useEuiMemoizedStyles } from '../../services';
14
15
  import { EuiScreenReaderOnly } from '../accessibility';
15
16
  import { EuiI18n } from '../i18n';
17
+ import { euiHueStyles } from './hue.styles';
16
18
  import { jsx as ___EmotionJSX } from "@emotion/react";
17
19
  var HUE_RANGE = 359;
18
20
  export var EuiHue = function EuiHue(_ref) {
@@ -23,27 +25,30 @@ export var EuiHue = function EuiHue(_ref) {
23
25
  id = _ref.id,
24
26
  onChange = _ref.onChange,
25
27
  rest = _objectWithoutProperties(_ref, _excluded);
28
+ var classes = classNames('euiHue', className);
29
+ var styles = useEuiMemoizedStyles(euiHueStyles);
26
30
  var handleChange = function handleChange(e) {
27
31
  onChange(Number(e.target.value));
28
32
  };
29
- var classes = classNames('euiHue', className);
30
- return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("label", {
33
+ return ___EmotionJSX("div", {
34
+ css: styles.euiHue,
35
+ className: classes
36
+ }, ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("label", {
31
37
  htmlFor: "".concat(id, "-hue")
32
38
  }, ___EmotionJSX(EuiI18n, {
33
39
  token: "euiHue.label",
34
40
  default: "Select the HSV color mode 'hue' value"
35
41
  }))), ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
36
42
  "aria-live": "polite"
37
- }, hex)), ___EmotionJSX("div", {
38
- className: classes
39
- }, ___EmotionJSX("input", _extends({
43
+ }, hex)), ___EmotionJSX("input", _extends({
40
44
  id: "".concat(id, "-hue"),
41
45
  min: 0,
42
46
  max: HUE_RANGE,
43
47
  step: 1,
44
48
  type: "range",
49
+ css: styles.euiHue__range,
45
50
  className: "euiHue__range",
46
51
  value: hue,
47
52
  onChange: handleChange
48
- }, rest))));
53
+ }, rest)));
49
54
  };
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+
9
+ import { css } from '@emotion/react';
10
+ import { transparentize } from '../../services';
11
+ import { logicalCSS, mathWithUnits } from '../../global_styling';
12
+ import { euiRangeThumbPerBrowser, euiRangeThumbStyle, euiRangeThumbFocusBoxShadow } from '../form/range/range.styles';
13
+ export var euiHueStyles = function euiHueStyles(euiThemeContext) {
14
+ var euiTheme = euiThemeContext.euiTheme;
15
+ var height = euiTheme.size.m;
16
+ var thumbSize = euiTheme.size.l;
17
+ var thumbBorder = mathWithUnits(euiTheme.border.width.thick, function (x) {
18
+ return x * 1.5;
19
+ });
20
+ var thumbBoxShadow = "\n 0 2px 2px -1px ".concat(transparentize(euiTheme.colors.shadow, 0.2), ",\n 0 1px 5px -2px ").concat(transparentize(euiTheme.colors.shadow, 0.2));
21
+ return {
22
+ // This wraps the range and sets a rainbow gradient,
23
+ // which allows the range thumb to be larger than the visible track
24
+ euiHue: /*#__PURE__*/css(logicalCSS('height', height), " border-radius:", height, ";background:linear-gradient(\n to right,\n #ff3232 0%,\n #fff130 20%,\n #45ff30 35%,\n #28fff0 52%,\n #282cff 71%,\n #ff28fb 88%,\n #ff0094 100%\n );;label:euiHue;"),
25
+ euiHue__range: /*#__PURE__*/css(logicalCSS('height', thumbSize), logicalCSS('width', "calc(100% + 2px)"), logicalCSS('margin-horizontal', '-1px'), " ", logicalCSS('margin-top', mathWithUnits(height, function (x) {
26
+ return x / -2;
27
+ })), "appearance:none;background:transparent;&::-webkit-slider-thumb{-webkit-appearance:none;}", euiRangeThumbPerBrowser([euiRangeThumbStyle(euiThemeContext), 'background-color: inherit', "border-width: ".concat(thumbBorder), 'border-radius: 100%', "box-shadow: ".concat(thumbBoxShadow)].join(';\n')), "&:focus{outline:none;}&:focus-visible{", euiRangeThumbPerBrowser(euiRangeThumbFocusBoxShadow(euiThemeContext)), ";};label:euiHue__range;")
28
+ };
29
+ };
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["className", "color", "data-test-subj", "hex", "id", "onChange"];
5
+ var _excluded = ["className", "color", "data-test-subj", "hex", "id", "onChange", "onKeyDown"];
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  /*
@@ -13,12 +13,14 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
13
13
  * Side Public License, v 1.
14
14
  */
15
15
 
16
- import React, { forwardRef, useEffect, useRef, useState } from 'react';
16
+ import React, { forwardRef, useEffect, useRef, useState, useCallback } from 'react';
17
17
  import classNames from 'classnames';
18
- import { keys, useMouseMove } from '../../services';
18
+ import { keys, useMouseMove, useEuiMemoizedStyles, useGeneratedHtmlId } from '../../services';
19
19
  import { isNil } from '../../services/predicate';
20
+ import { logicalStyles } from '../../global_styling';
20
21
  import { useEuiI18n } from '../i18n';
21
22
  import { getEventPosition } from './utils';
23
+ import { euiSaturationStyles } from './saturation.styles';
22
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
23
25
  var colorDefaultValue = [1, 0, 0];
24
26
  export var EuiSaturation = /*#__PURE__*/forwardRef(function (_ref, ref) {
@@ -28,9 +30,17 @@ export var EuiSaturation = /*#__PURE__*/forwardRef(function (_ref, ref) {
28
30
  _ref$dataTestSubj = _ref['data-test-subj'],
29
31
  dataTestSubj = _ref$dataTestSubj === void 0 ? 'euiSaturation' : _ref$dataTestSubj,
30
32
  hex = _ref.hex,
31
- id = _ref.id,
33
+ _id = _ref.id,
32
34
  onChange = _ref.onChange,
35
+ onKeyDown = _ref.onKeyDown,
33
36
  rest = _objectWithoutProperties(_ref, _excluded);
37
+ var classes = classNames('euiSaturation', className);
38
+ var styles = useEuiMemoizedStyles(euiSaturationStyles);
39
+ var id = useGeneratedHtmlId({
40
+ conditionalId: _id
41
+ });
42
+ var instructionsId = "".concat(id, "-instructions");
43
+ var indicatorId = "".concat(id, "-saturationIndicator");
34
44
  var _useEuiI18n = useEuiI18n(['euiSaturation.ariaLabel', 'euiSaturation.screenReaderInstructions'], ['HSV color mode saturation and value 2-axis slider', "Arrow keys to navigate the square color gradient. Coordinates will be used to calculate HSV color mode 'saturation' and 'value' numbers, in the range of 0 to 1. Left and right to change the saturation. Up and down change the value."]),
35
45
  _useEuiI18n2 = _slicedToArray(_useEuiI18n, 2),
36
46
  roleDescString = _useEuiI18n2[0],
@@ -62,7 +72,7 @@ export var EuiSaturation = /*#__PURE__*/forwardRef(function (_ref, ref) {
62
72
  });
63
73
  }
64
74
  }, [color, lastColor]);
65
- var calculateColor = function calculateColor(_ref2) {
75
+ var calculateColor = useCallback(function (_ref2) {
66
76
  var top = _ref2.top,
67
77
  height = _ref2.height,
68
78
  left = _ref2.left,
@@ -72,8 +82,8 @@ export var EuiSaturation = /*#__PURE__*/forwardRef(function (_ref, ref) {
72
82
  var s = left / width;
73
83
  var v = 1 - top / height;
74
84
  return [h, s, v];
75
- };
76
- var handleUpdate = function handleUpdate(box) {
85
+ }, [color]);
86
+ var handleUpdate = useCallback(function (box) {
77
87
  var left = box.left,
78
88
  top = box.top;
79
89
  setIndicator({
@@ -83,17 +93,18 @@ export var EuiSaturation = /*#__PURE__*/forwardRef(function (_ref, ref) {
83
93
  var newColor = calculateColor(box);
84
94
  setLastColor(newColor);
85
95
  onChange(newColor);
86
- };
87
- var handleChange = function handleChange(location) {
96
+ }, [calculateColor, onChange]);
97
+ var handleChange = useCallback(function (location) {
88
98
  if (isNil(boxRef === null || boxRef === void 0 ? void 0 : boxRef.current)) return;
89
99
  var box = getEventPosition(location, boxRef.current);
90
100
  handleUpdate(box);
91
- };
101
+ }, [handleUpdate]);
92
102
  var _useMouseMove = useMouseMove(handleChange, boxRef.current),
93
103
  _useMouseMove2 = _slicedToArray(_useMouseMove, 2),
94
104
  handleMouseDown = _useMouseMove2[0],
95
105
  handleInteraction = _useMouseMove2[1];
96
- var handleKeyDown = function handleKeyDown(event) {
106
+ var handleKeyDown = useCallback(function (event) {
107
+ onKeyDown === null || onKeyDown === void 0 || onKeyDown(event);
97
108
  if (isNil(boxRef === null || boxRef === void 0 ? void 0 : boxRef.current)) return;
98
109
  var _boxRef$current$getBo2 = boxRef.current.getBoundingClientRect(),
99
110
  height = _boxRef$current$getBo2.height,
@@ -134,15 +145,14 @@ export var EuiSaturation = /*#__PURE__*/forwardRef(function (_ref, ref) {
134
145
  height: height
135
146
  }, newPosition));
136
147
  onChange(newColor);
137
- };
138
- var classes = classNames('euiSaturation', className);
139
- var instructionsId = "".concat(id, "-instructions");
148
+ }, [calculateColor, indicator, onChange, onKeyDown]);
140
149
  return ___EmotionJSX("div", _extends({
141
150
  onMouseDown: handleMouseDown,
142
151
  onTouchStart: handleInteraction,
143
152
  onTouchMove: handleInteraction,
144
153
  onKeyDown: handleKeyDown,
145
154
  ref: ref,
155
+ css: styles.euiSaturation,
146
156
  className: classes,
147
157
  "data-test-subj": dataTestSubj,
148
158
  style: {
@@ -150,14 +160,17 @@ export var EuiSaturation = /*#__PURE__*/forwardRef(function (_ref, ref) {
150
160
  },
151
161
  tabIndex: -1
152
162
  }, rest), ___EmotionJSX("div", {
163
+ css: styles.euiSaturation__lightness,
153
164
  className: "euiSaturation__lightness",
154
165
  ref: boxRef
155
166
  }, ___EmotionJSX("div", {
167
+ css: styles.euiSaturation__saturation,
156
168
  className: "euiSaturation__saturation"
157
169
  })), ___EmotionJSX("button", {
158
- id: "".concat(id, "-saturationIndicator"),
170
+ id: indicatorId,
171
+ css: styles.euiSaturation__indicator,
159
172
  className: "euiSaturation__indicator",
160
- style: _objectSpread({}, indicator),
173
+ style: logicalStyles(indicator),
161
174
  "aria-roledescription": roleDescString,
162
175
  "aria-label": hex,
163
176
  "aria-describedby": instructionsId
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3
+ * or more contributor license agreements. Licensed under the Elastic License
4
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
5
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
6
+ * Side Public License, v 1.
7
+ */
8
+
9
+ import { css } from '@emotion/react';
10
+ import { logicalCSS, logicalSizeCSS, mathWithUnits } from '../../global_styling';
11
+ export var euiSaturationStyles = function euiSaturationStyles(euiThemeContext) {
12
+ var euiTheme = euiThemeContext.euiTheme;
13
+ var indicatorSize = euiTheme.size.m;
14
+ var borderRadius = mathWithUnits(euiTheme.border.radius.medium, function (x) {
15
+ return x / 2;
16
+ });
17
+ return {
18
+ euiSaturation: /*#__PURE__*/css("z-index:3;position:relative;", logicalCSS('width', '100%'), " ", logicalCSS('padding-bottom', '100%'), " border-radius:", borderRadius, ";touch-action:none;&:focus,&:focus-within{outline:none;.euiSaturation__indicator{outline:none;box-shadow:0 0 0 ", euiTheme.focus.width, " ", euiTheme.colors.primary, ";border-color:", euiTheme.colors.primary, ";}};label:euiSaturation;"),
19
+ euiSaturation__lightness: /*#__PURE__*/css("position:absolute;inset:0;", logicalCSS('top', '-1px'), "border-radius:", borderRadius, ";background:linear-gradient(\n to right,\n rgba(255, 255, 255, 1),\n rgba(255, 255, 255, 0)\n );;label:euiSaturation__lightness;"),
20
+ euiSaturation__saturation: /*#__PURE__*/css("position:absolute;inset:0;", logicalCSS('top', '-1px'), "border-radius:", borderRadius, ";background:linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));;label:euiSaturation__saturation;"),
21
+ euiSaturation__indicator: /*#__PURE__*/css("position:absolute;", logicalSizeCSS(indicatorSize), " transform:translateX(-50%) translateY(-50%);border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.darkestShade, ";border-radius:100%;&::before{content:'';position:absolute;inset:0;border-radius:100%;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.lightestShade, ";};label:euiSaturation__indicator;")
22
+ };
23
+ };
@@ -285,7 +285,8 @@ export var EuiComboBoxInput = /*#__PURE__*/function (_Component) {
285
285
  },
286
286
  placeholder: showPlaceholder ? placeholder : undefined,
287
287
  value: this.searchValue,
288
- autoFocus: autoFocus
288
+ autoFocus: autoFocus,
289
+ autoComplete: "off"
289
290
  // Force the menu to re-open on every input click - only necessary when plain text
290
291
  ,
291
292
  onClick: this.asPlainText ? onFocus : undefined // Type shenanigans - event should be mostly the same
@@ -1,4 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
3
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
4
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
5
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -6,7 +7,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
6
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
8
  import _inherits from "@babel/runtime/helpers/inherits";
8
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- var _excluded = ["id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
10
+ var _excluded = ["stylesMemoizer", "id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
10
11
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
12
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
13
  /*
@@ -19,29 +20,25 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
19
20
 
20
21
  import React, { Component } from 'react';
21
22
  import classNames from 'classnames';
22
- import { keysOf } from '../../common';
23
- import { EuiValidatableControl } from '../validatable_control';
23
+ import { withEuiStylesMemoizer, htmlIdGenerator } from '../../../services';
24
24
  import { EuiButtonEmpty } from '../../button';
25
25
  import { EuiProgress } from '../../progress';
26
26
  import { EuiIcon } from '../../icon';
27
27
  import { EuiI18n } from '../../i18n';
28
28
  import { EuiLoadingSpinner } from '../../loading';
29
- import { htmlIdGenerator } from '../../../services/accessibility';
30
29
  import { FormContext } from '../eui_form_context';
30
+ import { EuiValidatableControl } from '../validatable_control';
31
+ import { EuiFormControlLayoutClearButton } from '../form_control_layout/form_control_layout_clear_button';
32
+ import { euiFilePickerStyles } from './file_picker.styles';
31
33
  import { jsx as ___EmotionJSX } from "@emotion/react";
32
- var displayToClassNameMap = {
33
- default: null,
34
- large: 'euiFilePicker--large'
35
- };
36
- export var DISPLAYS = keysOf(displayToClassNameMap);
37
- export var EuiFilePicker = /*#__PURE__*/function (_Component) {
38
- function EuiFilePicker() {
34
+ export var EuiFilePickerClass = /*#__PURE__*/function (_Component) {
35
+ function EuiFilePickerClass() {
39
36
  var _this;
40
- _classCallCheck(this, EuiFilePicker);
37
+ _classCallCheck(this, EuiFilePickerClass);
41
38
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
42
39
  args[_key] = arguments[_key];
43
40
  }
44
- _this = _callSuper(this, EuiFilePicker, [].concat(args));
41
+ _this = _callSuper(this, EuiFilePickerClass, [].concat(args));
45
42
  _defineProperty(_this, "state", {
46
43
  promptText: null,
47
44
  isHoveringDrop: false
@@ -97,18 +94,19 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
97
94
  });
98
95
  return _this;
99
96
  }
100
- _inherits(EuiFilePicker, _Component);
101
- return _createClass(EuiFilePicker, [{
97
+ _inherits(EuiFilePickerClass, _Component);
98
+ return _createClass(EuiFilePickerClass, [{
102
99
  key: "render",
103
100
  value: function render() {
104
101
  var _this2 = this;
105
102
  var _ref = this.context,
106
103
  defaultFullWidth = _ref.defaultFullWidth;
107
104
  return ___EmotionJSX(EuiI18n, {
108
- token: "euiFilePicker.clearSelectedFiles",
109
- default: "Clear selected files"
110
- }, function (clearSelectedFiles) {
105
+ token: "euiFilePicker.removeSelectedAriaLabel",
106
+ default: "Remove selected files"
107
+ }, function (removeSelectedAriaLabel) {
111
108
  var _this2$props = _this2.props,
109
+ stylesMemoizer = _this2$props.stylesMemoizer,
112
110
  id = _this2$props.id,
113
111
  name = _this2$props.name,
114
112
  initialPromptText = _this2$props.initialPromptText,
@@ -125,34 +123,39 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
125
123
  var promptId = "".concat(id || _this2.generatedId, "-filePicker__prompt");
126
124
  var isOverridingInitialPrompt = _this2.state.promptText != null;
127
125
  var normalFormControl = display === 'default';
128
- var classes = classNames('euiFilePicker', displayToClassNameMap[display], {
129
- euiFilePicker__showDrop: _this2.state.isHoveringDrop,
130
- 'euiFilePicker--compressed': compressed,
131
- 'euiFilePicker--fullWidth': fullWidth,
126
+ var classes = classNames('euiFilePicker', {
127
+ 'euiFilePicker-isDroppingFile': _this2.state.isHoveringDrop,
132
128
  'euiFilePicker-isInvalid': isInvalid,
133
129
  'euiFilePicker-isLoading': isLoading,
134
130
  'euiFilePicker-hasFiles': isOverridingInitialPrompt
135
131
  }, className);
132
+ var styles = stylesMemoizer(euiFilePickerStyles);
133
+ 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];
134
+ var inputStyles = [styles.input.euiFilePicker__input, !normalFormControl && !disabled && styles.input.largeInteractive];
135
+ 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]));
136
+ var iconStyles = [styles.icon.euiFilePicker__icon].concat(_toConsumableArray(normalFormControl ? [styles.icon.normal, compressed ? styles.icon.compresssed : styles.icon.uncompressed] : [styles.icon.large]));
137
+ var rightIconStyles = normalFormControl ? [styles.rightIcon.euiFilePicker__rightIcon, compressed ? styles.rightIcon.compressed : styles.rightIcon.uncompressed] : undefined;
136
138
  var clearButton;
137
139
  if (isLoading && normalFormControl) {
138
140
  // Override clear button with loading spinner if it is in loading state
139
141
  clearButton = ___EmotionJSX(EuiLoadingSpinner, {
140
- className: "euiFilePicker__loadingSpinner"
142
+ css: rightIconStyles,
143
+ className: "euiFilePicker__loadingSpinner",
144
+ size: compressed ? 's' : 'm'
141
145
  });
142
146
  } else if (isOverridingInitialPrompt && !disabled) {
143
147
  if (normalFormControl) {
144
- clearButton = ___EmotionJSX("button", {
145
- type: "button",
146
- "aria-label": clearSelectedFiles,
148
+ clearButton = ___EmotionJSX(EuiFormControlLayoutClearButton, {
149
+ "aria-label": removeSelectedAriaLabel,
150
+ css: [styles.euiFilePicker__clearButton, rightIconStyles, ";label:clearButton;"],
147
151
  className: "euiFilePicker__clearButton",
148
- onClick: _this2.removeFiles
149
- }, ___EmotionJSX(EuiIcon, {
150
- className: "euiFilePicker__clearIcon",
151
- type: "cross"
152
- }));
152
+ onClick: _this2.removeFiles,
153
+ size: compressed ? 's' : 'm'
154
+ });
153
155
  } else {
154
156
  clearButton = ___EmotionJSX(EuiButtonEmpty, {
155
- "aria-label": clearSelectedFiles,
157
+ "aria-label": removeSelectedAriaLabel,
158
+ css: styles.euiFilePicker__clearButton,
156
159
  className: "euiFilePicker__clearButton",
157
160
  size: "xs",
158
161
  onClick: _this2.removeFiles
@@ -170,15 +173,15 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
170
173
  position: "absolute"
171
174
  });
172
175
  return ___EmotionJSX("div", {
176
+ css: cssStyles,
173
177
  className: classes
174
- }, ___EmotionJSX("div", {
175
- className: "euiFilePicker__wrap"
176
178
  }, ___EmotionJSX(EuiValidatableControl, {
177
179
  isInvalid: isInvalid
178
180
  }, ___EmotionJSX("input", _extends({
179
181
  type: "file",
180
182
  id: id,
181
183
  name: name,
184
+ css: inputStyles,
182
185
  className: "euiFilePicker__input",
183
186
  onChange: _this2.handleChange,
184
187
  ref: function ref(input) {
@@ -190,27 +193,30 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
190
193
  disabled: disabled,
191
194
  "aria-describedby": promptId
192
195
  }, rest))), ___EmotionJSX("div", {
196
+ css: promptStyles,
193
197
  className: "euiFilePicker__prompt",
194
198
  id: promptId
195
199
  }, ___EmotionJSX(EuiIcon, {
200
+ css: iconStyles,
196
201
  className: "euiFilePicker__icon",
197
202
  color: isInvalid ? 'danger' : disabled ? 'subdued' : 'primary',
198
203
  type: isInvalid ? 'alert' : 'importAction',
199
204
  size: normalFormControl ? 'm' : 'l',
200
205
  "aria-hidden": "true"
201
- }), ___EmotionJSX("div", {
206
+ }), ___EmotionJSX("span", {
202
207
  className: "euiFilePicker__promptText"
203
- }, _this2.state.promptText || initialPromptText), clearButton, loader)));
208
+ }, _this2.state.promptText || initialPromptText), clearButton, loader));
204
209
  });
205
210
  }
206
211
  }]);
207
212
  }(Component);
208
- _defineProperty(EuiFilePicker, "contextType", FormContext);
209
- _defineProperty(EuiFilePicker, "defaultProps", {
213
+ _defineProperty(EuiFilePickerClass, "contextType", FormContext);
214
+ _defineProperty(EuiFilePickerClass, "defaultProps", {
210
215
  initialPromptText: ___EmotionJSX(EuiI18n, {
211
216
  token: "euiFilePicker.promptText",
212
217
  default: "Select or drag and drop a file"
213
218
  }),
214
219
  compressed: false,
215
220
  display: 'large'
216
- });
221
+ });
222
+ export var EuiFilePicker = withEuiStylesMemoizer(EuiFilePickerClass);
@@ -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
+ };
@@ -82,7 +82,7 @@ export var euiRangeThumbStyle = function euiRangeThumbStyle(euiThemeContext) {
82
82
  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 ");
83
83
  };
84
84
  export var euiRangeThumbPerBrowser = function euiRangeThumbPerBrowser(content) {
85
- return "\n &::-webkit-slider-thumb { ".concat(content, "; }\n &::-moz-range-thumb { ").concat(content, "; }\n &::-ms-thumb {").concat(content, "; }\n ");
85
+ return "\n &::-webkit-slider-thumb { ".concat(content, "; }\n &::-moz-range-thumb { ").concat(content, "; }\n &::-ms-thumb {").concat(content, "; }\n ");
86
86
  };
87
87
  export var euiRangeThumbFocus = function euiRangeThumbFocus(euiThemeContext, color) {
88
88
  var range = euiRangeVariables(euiThemeContext);
@@ -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;