@elastic/eui 88.5.4 → 89.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/dist/eui_theme_dark.css +26 -526
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +26 -526
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/basic_table.js +7 -2
  6. package/es/components/basic_table/in_memory_table.js +7 -2
  7. package/es/components/collapsible_nav/collapsible_nav.js +5 -0
  8. package/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  9. package/es/components/color_picker/index.js +0 -4
  10. package/es/components/combo_box/combo_box.js +142 -304
  11. package/es/components/combo_box/combo_box_input/combo_box_input.js +0 -13
  12. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +34 -118
  13. package/es/components/context_menu/context_menu_panel.js +6 -6
  14. package/es/components/flex/flex_grid.styles.js +1 -1
  15. package/es/components/flex/flex_group.styles.js +1 -1
  16. package/es/components/flyout/flyout.js +32 -33
  17. package/es/components/flyout/flyout.styles.js +13 -3
  18. package/es/components/form/range/dual_range.js +4 -0
  19. package/es/components/form/range/range.js +4 -0
  20. package/es/components/index.js +0 -1
  21. package/es/components/popover/input_popover.js +47 -3
  22. package/es/components/popover/popover.js +2 -2
  23. package/es/components/table/table_row_cell.js +27 -9
  24. package/es/components/text_truncate/index.js +1 -0
  25. package/es/components/text_truncate/text_block_truncate.js +78 -0
  26. package/es/global_styling/reset/global_styles.js +16 -2
  27. package/es/services/accessibility/index.js +0 -3
  28. package/es/services/index.js +1 -1
  29. package/es/test/rtl/component_helpers.d.ts +2 -0
  30. package/es/test/rtl/component_helpers.js +29 -1
  31. package/eui.d.ts +375 -667
  32. package/i18ntokens.json +52 -286
  33. package/lib/components/basic_table/basic_table.js +7 -2
  34. package/lib/components/basic_table/in_memory_table.js +7 -2
  35. package/lib/components/collapsible_nav/collapsible_nav.js +5 -0
  36. package/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  37. package/lib/components/color_picker/index.js +0 -7
  38. package/lib/components/combo_box/combo_box.js +141 -303
  39. package/lib/components/combo_box/combo_box_input/combo_box_input.js +0 -13
  40. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +34 -118
  41. package/lib/components/context_menu/context_menu_panel.js +5 -5
  42. package/lib/components/flex/flex_grid.styles.js +1 -1
  43. package/lib/components/flex/flex_group.styles.js +1 -1
  44. package/lib/components/flyout/flyout.js +31 -32
  45. package/lib/components/flyout/flyout.styles.js +19 -10
  46. package/lib/components/form/range/dual_range.js +4 -0
  47. package/lib/components/index.js +0 -11
  48. package/lib/components/popover/input_popover.js +48 -3
  49. package/lib/components/popover/popover.js +1 -1
  50. package/lib/components/table/table_row_cell.js +26 -8
  51. package/lib/components/text_truncate/index.js +7 -0
  52. package/lib/components/text_truncate/text_block_truncate.js +85 -0
  53. package/lib/global_styling/reset/global_styles.js +16 -2
  54. package/lib/services/accessibility/index.js +0 -21
  55. package/lib/services/index.js +0 -21
  56. package/lib/test/rtl/component_helpers.d.ts +2 -0
  57. package/lib/test/rtl/component_helpers.js +31 -2
  58. package/optimize/es/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  59. package/optimize/es/components/color_picker/index.js +0 -4
  60. package/optimize/es/components/combo_box/combo_box.js +137 -304
  61. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +0 -12
  62. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +28 -107
  63. package/optimize/es/components/context_menu/context_menu_panel.js +6 -6
  64. package/optimize/es/components/flex/flex_grid.styles.js +1 -1
  65. package/optimize/es/components/flex/flex_group.styles.js +1 -1
  66. package/optimize/es/components/flyout/flyout.js +32 -33
  67. package/optimize/es/components/flyout/flyout.styles.js +13 -3
  68. package/optimize/es/components/index.js +0 -1
  69. package/optimize/es/components/popover/input_popover.js +43 -3
  70. package/optimize/es/components/popover/popover.js +2 -2
  71. package/optimize/es/components/table/table_row_cell.js +13 -5
  72. package/optimize/es/components/text_truncate/index.js +1 -0
  73. package/optimize/es/components/text_truncate/text_block_truncate.js +58 -0
  74. package/optimize/es/global_styling/reset/global_styles.js +13 -2
  75. package/optimize/es/services/accessibility/index.js +0 -3
  76. package/optimize/es/services/index.js +1 -1
  77. package/optimize/es/test/rtl/component_helpers.d.ts +2 -0
  78. package/optimize/es/test/rtl/component_helpers.js +29 -1
  79. package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  80. package/optimize/lib/components/color_picker/index.js +0 -7
  81. package/optimize/lib/components/combo_box/combo_box.js +136 -303
  82. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +0 -12
  83. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +28 -107
  84. package/optimize/lib/components/context_menu/context_menu_panel.js +5 -5
  85. package/optimize/lib/components/flex/flex_grid.styles.js +1 -1
  86. package/optimize/lib/components/flex/flex_group.styles.js +1 -1
  87. package/optimize/lib/components/flyout/flyout.js +31 -32
  88. package/optimize/lib/components/flyout/flyout.styles.js +19 -10
  89. package/optimize/lib/components/index.js +0 -11
  90. package/optimize/lib/components/popover/input_popover.js +44 -3
  91. package/optimize/lib/components/popover/popover.js +1 -1
  92. package/optimize/lib/components/table/table_row_cell.js +12 -4
  93. package/optimize/lib/components/text_truncate/index.js +7 -0
  94. package/optimize/lib/components/text_truncate/text_block_truncate.js +66 -0
  95. package/optimize/lib/global_styling/reset/global_styles.js +19 -10
  96. package/optimize/lib/services/accessibility/index.js +0 -21
  97. package/optimize/lib/services/index.js +0 -21
  98. package/optimize/lib/test/rtl/component_helpers.d.ts +2 -0
  99. package/optimize/lib/test/rtl/component_helpers.js +31 -2
  100. package/package.json +1 -1
  101. package/src/components/combo_box/combo_box_options_list/_combo_box_options_list.scss +5 -15
  102. package/src/components/context_menu/_context_menu_panel.scss +4 -0
  103. package/src/components/index.scss +0 -1
  104. package/src/global_styling/mixins/_index.scss +0 -1
  105. package/src/global_styling/variables/_index.scss +0 -1
  106. package/src/test/README.md +0 -15
  107. package/src/themes/amsterdam/global_styling/mixins/_index.scss +0 -1
  108. package/test-env/components/basic_table/basic_table.js +7 -2
  109. package/test-env/components/basic_table/in_memory_table.js +7 -2
  110. package/test-env/components/collapsible_nav/collapsible_nav.js +5 -0
  111. package/test-env/components/collapsible_nav_beta/collapsible_nav_item/collapsible_nav_item.js +4 -2
  112. package/test-env/components/color_picker/index.js +0 -7
  113. package/test-env/components/combo_box/combo_box.js +141 -303
  114. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +0 -13
  115. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +33 -117
  116. package/test-env/components/context_menu/context_menu_panel.js +5 -5
  117. package/test-env/components/flex/flex_grid.styles.js +1 -1
  118. package/test-env/components/flex/flex_group.styles.js +1 -1
  119. package/test-env/components/flyout/flyout.styles.js +19 -10
  120. package/test-env/components/form/range/dual_range.js +4 -0
  121. package/test-env/components/index.js +0 -11
  122. package/test-env/components/popover/input_popover.js +48 -3
  123. package/test-env/components/popover/popover.js +1 -1
  124. package/test-env/components/table/table_row_cell.js +26 -8
  125. package/test-env/components/text_truncate/index.js +7 -0
  126. package/test-env/components/text_truncate/text_block_truncate.js +82 -0
  127. package/test-env/global_styling/reset/global_styles.js +19 -10
  128. package/test-env/services/accessibility/index.js +0 -21
  129. package/test-env/services/index.js +0 -21
  130. package/test-env/test/rtl/component_helpers.js +31 -2
  131. package/es/components/color_picker/color_stops/color_stop_thumb.js +0 -371
  132. package/es/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -55
  133. package/es/components/color_picker/color_stops/color_stops.js +0 -499
  134. package/es/components/color_picker/color_stops/color_stops.styles.js +0 -61
  135. package/es/components/color_picker/color_stops/index.js +0 -9
  136. package/es/components/color_picker/color_stops/utils.js +0 -95
  137. package/es/components/suggest/index.js +0 -10
  138. package/es/components/suggest/suggest.a11y.js +0 -70
  139. package/es/components/suggest/suggest.js +0 -347
  140. package/es/components/suggest/suggest_item.js +0 -123
  141. package/es/components/suggest/types.js +0 -9
  142. package/es/services/accessibility/accessible_click_keys.js +0 -17
  143. package/es/services/accessibility/cascading_menu_keys.js +0 -28
  144. package/es/services/accessibility/combo_box_keys.js +0 -25
  145. package/lib/components/color_picker/color_stops/color_stop_thumb.js +0 -380
  146. package/lib/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -62
  147. package/lib/components/color_picker/color_stops/color_stops.js +0 -505
  148. package/lib/components/color_picker/color_stops/color_stops.styles.js +0 -67
  149. package/lib/components/color_picker/color_stops/index.js +0 -12
  150. package/lib/components/color_picker/color_stops/utils.js +0 -108
  151. package/lib/components/suggest/index.js +0 -19
  152. package/lib/components/suggest/suggest.a11y.js +0 -73
  153. package/lib/components/suggest/suggest.js +0 -356
  154. package/lib/components/suggest/suggest_item.js +0 -130
  155. package/lib/components/suggest/types.js +0 -16
  156. package/lib/services/accessibility/accessible_click_keys.js +0 -21
  157. package/lib/services/accessibility/cascading_menu_keys.js +0 -35
  158. package/lib/services/accessibility/combo_box_keys.js +0 -32
  159. package/optimize/es/components/color_picker/color_stops/color_stop_thumb.js +0 -329
  160. package/optimize/es/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -55
  161. package/optimize/es/components/color_picker/color_stops/color_stops.js +0 -444
  162. package/optimize/es/components/color_picker/color_stops/color_stops.styles.js +0 -61
  163. package/optimize/es/components/color_picker/color_stops/index.js +0 -9
  164. package/optimize/es/components/color_picker/color_stops/utils.js +0 -90
  165. package/optimize/es/components/suggest/index.js +0 -10
  166. package/optimize/es/components/suggest/suggest.a11y.js +0 -70
  167. package/optimize/es/components/suggest/suggest.js +0 -256
  168. package/optimize/es/components/suggest/suggest_item.js +0 -89
  169. package/optimize/es/components/suggest/types.js +0 -9
  170. package/optimize/es/services/accessibility/accessible_click_keys.js +0 -14
  171. package/optimize/es/services/accessibility/cascading_menu_keys.js +0 -28
  172. package/optimize/es/services/accessibility/combo_box_keys.js +0 -25
  173. package/optimize/lib/components/color_picker/color_stops/color_stop_thumb.js +0 -339
  174. package/optimize/lib/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -62
  175. package/optimize/lib/components/color_picker/color_stops/color_stops.js +0 -451
  176. package/optimize/lib/components/color_picker/color_stops/color_stops.styles.js +0 -67
  177. package/optimize/lib/components/color_picker/color_stops/index.js +0 -12
  178. package/optimize/lib/components/color_picker/color_stops/utils.js +0 -106
  179. package/optimize/lib/components/suggest/index.js +0 -19
  180. package/optimize/lib/components/suggest/suggest.a11y.js +0 -73
  181. package/optimize/lib/components/suggest/suggest.js +0 -266
  182. package/optimize/lib/components/suggest/suggest_item.js +0 -96
  183. package/optimize/lib/components/suggest/types.js +0 -16
  184. package/optimize/lib/services/accessibility/accessible_click_keys.js +0 -20
  185. package/optimize/lib/services/accessibility/cascading_menu_keys.js +0 -35
  186. package/optimize/lib/services/accessibility/combo_box_keys.js +0 -32
  187. package/src/components/suggest/_index.scss +0 -5
  188. package/src/components/suggest/_suggest_input.scss +0 -4
  189. package/src/components/suggest/_suggest_item.scss +0 -103
  190. package/src/components/suggest/_variables.scss +0 -13
  191. package/src/global_styling/mixins/_header.scss +0 -29
  192. package/src/global_styling/variables/_header.scss +0 -3
  193. package/test-env/components/color_picker/color_stops/color_stop_thumb.js +0 -372
  194. package/test-env/components/color_picker/color_stops/color_stop_thumb.styles.js +0 -62
  195. package/test-env/components/color_picker/color_stops/color_stops.js +0 -494
  196. package/test-env/components/color_picker/color_stops/color_stops.styles.js +0 -67
  197. package/test-env/components/color_picker/color_stops/index.js +0 -12
  198. package/test-env/components/color_picker/color_stops/utils.js +0 -106
  199. package/test-env/components/suggest/index.js +0 -19
  200. package/test-env/components/suggest/suggest.a11y.js +0 -73
  201. package/test-env/components/suggest/suggest.js +0 -348
  202. package/test-env/components/suggest/suggest_item.js +0 -129
  203. package/test-env/components/suggest/types.js +0 -16
  204. package/test-env/services/accessibility/accessible_click_keys.js +0 -20
  205. package/test-env/services/accessibility/cascading_menu_keys.js +0 -35
  206. package/test-env/services/accessibility/combo_box_keys.js +0 -32
@@ -1,130 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.EuiSuggestItem = exports.COLORS = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _common = require("../common");
10
- var _classnames = _interopRequireDefault(require("classnames"));
11
- var _icon = require("../icon");
12
- var _react2 = require("@emotion/react");
13
- var _excluded = ["className", "label", "type", "labelWidth", "description", "truncate", "onClick"];
14
- /*
15
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
16
- * or more contributor license agreements. Licensed under the Elastic License
17
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
18
- * in compliance with, at your election, the Elastic License 2.0 or the Server
19
- * Side Public License, v 1.
20
- */
21
- /**
22
- * @deprecated
23
- */
24
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
26
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
27
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
28
- var colorToClassNameMap = {
29
- tint0: 'euiSuggestItem__type--tint0',
30
- tint1: 'euiSuggestItem__type--tint1',
31
- tint2: 'euiSuggestItem__type--tint2',
32
- tint3: 'euiSuggestItem__type--tint3',
33
- tint4: 'euiSuggestItem__type--tint4',
34
- tint5: 'euiSuggestItem__type--tint5',
35
- tint6: 'euiSuggestItem__type--tint6',
36
- tint7: 'euiSuggestItem__type--tint7',
37
- tint8: 'euiSuggestItem__type--tint8',
38
- tint9: 'euiSuggestItem__type--tint9',
39
- tint10: 'euiSuggestItem__type--tint10'
40
- };
41
- var COLORS = (0, _common.keysOf)(colorToClassNameMap);
42
-
43
- /**
44
- * @deprecated - EuiSuggest is scheduled for deprecation due to low internal usage and high
45
- * overlap with other existing EUI components. We recommend using EuiSelectable instead,
46
- * or copying this component into your own application for usage if necessary.
47
- *
48
- * The component will be permanently removed in October 2023.
49
- */
50
- exports.COLORS = COLORS;
51
- var EuiSuggestItem = function EuiSuggestItem(_ref) {
52
- var className = _ref.className,
53
- label = _ref.label,
54
- type = _ref.type,
55
- _ref$labelWidth = _ref.labelWidth,
56
- labelWidth = _ref$labelWidth === void 0 ? '50' : _ref$labelWidth,
57
- description = _ref.description,
58
- _ref$truncate = _ref.truncate,
59
- truncate = _ref$truncate === void 0 ? true : _ref$truncate,
60
- onClick = _ref.onClick,
61
- rest = _objectWithoutProperties(_ref, _excluded);
62
- var classes = (0, _classnames.default)('euiSuggestItem', {
63
- 'euiSuggestItem--truncate': truncate
64
- }, className);
65
- var labelClassNames = (0, _classnames.default)('euiSuggestItem__label', "euiSuggestItem__label--width".concat(labelWidth));
66
- var descriptionClassNames = (0, _classnames.default)('euiSuggestItem__description', {
67
- 'euiSuggestItem__description--wrap': !truncate
68
- });
69
- var typeColorClass = '';
70
- if (type && type.color) {
71
- if (COLORS.indexOf(type.color) > -1) {
72
- typeColorClass = colorToClassNameMap[type.color];
73
- }
74
- }
75
- var innerContent = (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("span", {
76
- className: "euiSuggestItem__type ".concat(typeColorClass)
77
- }, (0, _react2.jsx)(_icon.EuiIcon, {
78
- type: type.iconType,
79
- color: "inherit" // forces the icon to inherit its parent color
80
- })), (0, _react2.jsx)("span", {
81
- className: labelClassNames,
82
- title: label
83
- }, label), description && (0, _react2.jsx)("span", {
84
- className: descriptionClassNames,
85
- title: description
86
- }, description));
87
- if (onClick) {
88
- return (0, _react2.jsx)("button", _extends({
89
- onClick: onClick,
90
- className: classes
91
- }, rest), innerContent);
92
- } else {
93
- return (0, _react2.jsx)("span", _extends({
94
- className: classes
95
- }, rest), innerContent);
96
- }
97
- };
98
- exports.EuiSuggestItem = EuiSuggestItem;
99
- EuiSuggestItem.propTypes = {
100
- className: _propTypes.default.string,
101
- "aria-label": _propTypes.default.string,
102
- "data-test-subj": _propTypes.default.string,
103
- css: _propTypes.default.any,
104
- /**
105
- * Takes `iconType` for EuiIcon and 'color'. 'color' can be tint1 through tint9.
106
- */
107
- type: _propTypes.default.shape({
108
- iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "article", "asterisk", "at", "auditbeatApp", "beaker", "bell", "bellSlash", "beta", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "discuss", "document", "documentEdit", "documentation", "documents", "dot", "dotInCircle", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "error", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "filterExclude", "filterIgnore", "filterInclude", "filterInCircle", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "grabOmnidirectional", "gradient", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "indexTemporary", "infinity", "inputOutput", "inspect", "invert", "ip", "key", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "launch", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoVulnerabilityManagement", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "palette", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "pivot", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortAscending", "sortDescending", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spaces", "spacesApp", "sparkles", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelineWithArrow", "timelionApp", "timeRefresh", "timeslider", "training", "transitionLeftIn", "transitionLeftOut", "transitionTopIn", "transitionTopOut", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "vulnerabilityManagementApp", "warning", "alert", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]).isRequired,
109
- color: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.oneOf(["tint0", "tint1", "tint2", "tint3", "tint4", "tint5", "tint6", "tint7", "tint8", "tint9", "tint10"]).isRequired]).isRequired
110
- }).isRequired,
111
- /**
112
- * Label or primary text.
113
- */
114
- label: _propTypes.default.string.isRequired,
115
- /**
116
- * Description or secondary text (optional).
117
- */
118
- description: _propTypes.default.string,
119
- /**
120
- * Percentage width of `label`.
121
- * Accepts multiples of `10`, from `20` to `90`.
122
- * Label will expand to 100% if `description` is not provided.
123
- */
124
- labelWidth: _propTypes.default.oneOf(["20", "30", "40", "50", "60", "70", "80", "90", 20, 30, 40, 50, 60, 70, 80, 90]),
125
- /**
126
- * Truncates both label and description.
127
- */
128
- truncate: _propTypes.default.bool,
129
- onClick: _propTypes.default.func
130
- };
@@ -1,16 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ALL_STATUSES = void 0;
7
- /*
8
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
9
- * or more contributor license agreements. Licensed under the Elastic License
10
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
11
- * in compliance with, at your election, the Elastic License 2.0 or the Server
12
- * Side Public License, v 1.
13
- */
14
-
15
- var ALL_STATUSES = ['unsaved', 'saved', 'unchanged', 'loading'];
16
- exports.ALL_STATUSES = ALL_STATUSES;
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.accessibleClickKeys = void 0;
7
- var _keys = require("../keys");
8
- var _accessibleClickKeys;
9
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
10
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
12
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /*
13
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
14
- * or more contributor license agreements. Licensed under the Elastic License
15
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
16
- * in compliance with, at your election, the Elastic License 2.0 or the Server
17
- * Side Public License, v 1.
18
- */
19
- // These keys are used to execute click actions on interactive elements like buttons and links.
20
- var accessibleClickKeys = (_accessibleClickKeys = {}, _defineProperty(_accessibleClickKeys, _keys.ENTER, 'enter'), _defineProperty(_accessibleClickKeys, _keys.SPACE, 'space'), _accessibleClickKeys);
21
- exports.accessibleClickKeys = accessibleClickKeys;
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.cascadingMenuKeys = void 0;
7
- var _keys = require("../keys");
8
- /*
9
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
- * or more contributor license agreements. Licensed under the Elastic License
11
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
- * in compliance with, at your election, the Elastic License 2.0 or the Server
13
- * Side Public License, v 1.
14
- */
15
-
16
- /**
17
- * These keys are used for navigating cascading menu UI components.
18
- *
19
- * ARROW_DOWN: Select the next item in the list.
20
- * ARROW_LEFT: Show the previous menu.
21
- * ARROW_RIGHT: Show the next menu for the selected item.
22
- * ARROW_UP: Select the previous item in the list.
23
- * ESC: Deselect the current selection and hide the list.
24
- * TAB: Normal tabbing navigation is still supported.
25
- */
26
-
27
- var cascadingMenuKeys = {
28
- ARROW_DOWN: _keys.ARROW_DOWN,
29
- ARROW_LEFT: _keys.ARROW_LEFT,
30
- ARROW_RIGHT: _keys.ARROW_RIGHT,
31
- ARROW_UP: _keys.ARROW_UP,
32
- ESCAPE: _keys.ESCAPE,
33
- TAB: _keys.TAB
34
- };
35
- exports.cascadingMenuKeys = cascadingMenuKeys;
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.comboBoxKeys = void 0;
7
- var _keys = require("../keys");
8
- /*
9
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
- * or more contributor license agreements. Licensed under the Elastic License
11
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
- * in compliance with, at your election, the Elastic License 2.0 or the Server
13
- * Side Public License, v 1.
14
- */
15
-
16
- /**
17
- * These keys are used for navigating combobox UI components.
18
- *
19
- * ARROW_UP: Select the previous item in the list.
20
- * ARROW_DOWN: Select the next item in the list.
21
- * ENTER / TAB: Complete input with the current selection.
22
- * ESC: Deselect the current selection and hide the list.
23
- */
24
-
25
- var comboBoxKeys = {
26
- ARROW_DOWN: _keys.ARROW_DOWN,
27
- ARROW_UP: _keys.ARROW_UP,
28
- ENTER: _keys.ENTER,
29
- ESCAPE: _keys.ESCAPE,
30
- TAB: _keys.TAB
31
- };
32
- exports.comboBoxKeys = comboBoxKeys;
@@ -1,329 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
- var _excluded = ["className", "stop", "color", "onChange", "onFocus", "onRemove", "globalMin", "globalMax", "localMin", "localMax", "min", "max", "isRangeMin", "isRangeMax", "parentRef", "colorPickerMode", "colorPickerShowAlpha", "colorPickerSwatches", "disabled", "readOnly", "isPopoverOpen", "openPopover", "closePopover", "data-index", "aria-valuetext", "style", "valueInputProps"];
6
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
7
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
- /*
9
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
10
- * or more contributor license agreements. Licensed under the Elastic License
11
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
12
- * in compliance with, at your election, the Elastic License 2.0 or the Server
13
- * Side Public License, v 1.
14
- */
15
-
16
- import React, { useEffect, useMemo, useRef, useState } from 'react';
17
- import classNames from 'classnames';
18
- import { getPositionFromStop, getStopFromMouseLocation, isColorInvalid, isStopInvalid } from './utils';
19
- import { getChromaColor } from '../utils';
20
- import { keys, useMouseMove, useEuiTheme } from '../../../services';
21
- import { EuiButtonIcon } from '../../button';
22
- import { EuiColorPicker } from '../color_picker';
23
- import { EuiFlexGroup, EuiFlexItem } from '../../flex';
24
- import { EuiFieldNumber, EuiFormRow } from '../../form';
25
- import { EuiI18n } from '../../i18n';
26
- import { EuiPopover } from '../../popover';
27
- import { EuiScreenReaderOnly } from '../../accessibility';
28
- import { EuiSpacer } from '../../spacer';
29
- import { EuiRangeThumb } from '../../form/range/range_thumb';
30
- import { euiColorStopThumbStyles, euiColorStopThumbPopoverStyles, euiColorStopStyles } from './color_stop_thumb.styles';
31
- import { jsx as ___EmotionJSX } from "@emotion/react";
32
- export var EuiColorStopThumb = function EuiColorStopThumb(_ref) {
33
- var className = _ref.className,
34
- stop = _ref.stop,
35
- color = _ref.color,
36
- onChange = _ref.onChange,
37
- onFocus = _ref.onFocus,
38
- onRemove = _ref.onRemove,
39
- globalMin = _ref.globalMin,
40
- globalMax = _ref.globalMax,
41
- localMin = _ref.localMin,
42
- localMax = _ref.localMax,
43
- min = _ref.min,
44
- max = _ref.max,
45
- _ref$isRangeMin = _ref.isRangeMin,
46
- isRangeMin = _ref$isRangeMin === void 0 ? false : _ref$isRangeMin,
47
- _ref$isRangeMax = _ref.isRangeMax,
48
- isRangeMax = _ref$isRangeMax === void 0 ? false : _ref$isRangeMax,
49
- parentRef = _ref.parentRef,
50
- colorPickerMode = _ref.colorPickerMode,
51
- colorPickerShowAlpha = _ref.colorPickerShowAlpha,
52
- colorPickerSwatches = _ref.colorPickerSwatches,
53
- disabled = _ref.disabled,
54
- readOnly = _ref.readOnly,
55
- isPopoverOpen = _ref.isPopoverOpen,
56
- openPopover = _ref.openPopover,
57
- closePopover = _ref.closePopover,
58
- dataIndex = _ref['data-index'],
59
- ariaValueText = _ref['aria-valuetext'],
60
- style = _ref.style,
61
- _ref$valueInputProps = _ref.valueInputProps,
62
- valueInputProps = _ref$valueInputProps === void 0 ? {} : _ref$valueInputProps,
63
- rest = _objectWithoutProperties(_ref, _excluded);
64
- var background = useMemo(function () {
65
- var chromaColor = getChromaColor(color, colorPickerShowAlpha);
66
- return chromaColor ? chromaColor.css() : undefined;
67
- }, [color, colorPickerShowAlpha]);
68
- var _useState = useState(isPopoverOpen),
69
- _useState2 = _slicedToArray(_useState, 2),
70
- hasFocus = _useState2[0],
71
- setHasFocus = _useState2[1];
72
- var _useState3 = useState(isColorInvalid(color, colorPickerShowAlpha)),
73
- _useState4 = _slicedToArray(_useState3, 2),
74
- colorIsInvalid = _useState4[0],
75
- setColorIsInvalid = _useState4[1];
76
- var _useState5 = useState(isStopInvalid(stop)),
77
- _useState6 = _slicedToArray(_useState5, 2),
78
- stopIsInvalid = _useState6[0],
79
- setStopIsInvalid = _useState6[1];
80
- var _useState7 = useState(null),
81
- _useState8 = _slicedToArray(_useState7, 2),
82
- numberInputRef = _useState8[0],
83
- setNumberInputRef = _useState8[1];
84
- var popoverRef = useRef(null);
85
- useEffect(function () {
86
- if (isPopoverOpen && popoverRef && popoverRef.current) {
87
- popoverRef.current.positionPopoverFixed();
88
- }
89
- }, [isPopoverOpen, stop]);
90
- var getStopFromMouseLocationFn = function getStopFromMouseLocationFn(location) {
91
- // Guard against `null` ref in usage
92
- return getStopFromMouseLocation(location, parentRef, globalMin, globalMax);
93
- };
94
- var getPositionFromStopFn = function getPositionFromStopFn(stop) {
95
- // Guard against `null` ref in usage
96
- return getPositionFromStop(stop, parentRef, globalMin, globalMax);
97
- };
98
- var handleOnRemove = function handleOnRemove() {
99
- if (onRemove) {
100
- closePopover();
101
- onRemove();
102
- }
103
- };
104
- var handleFocus = function handleFocus() {
105
- setHasFocus(true);
106
- if (onFocus) {
107
- onFocus();
108
- }
109
- };
110
- var setHasFocusTrue = function setHasFocusTrue() {
111
- return setHasFocus(true);
112
- };
113
- var setHasFocusFalse = function setHasFocusFalse() {
114
- return setHasFocus(false);
115
- };
116
- var handleColorChange = function handleColorChange(value) {
117
- setColorIsInvalid(isColorInvalid(value, colorPickerShowAlpha));
118
- onChange({
119
- stop: stop,
120
- color: value
121
- });
122
- };
123
- var handleStopChange = function handleStopChange(value) {
124
- var willBeInvalid = value > localMax || value < localMin;
125
- if (willBeInvalid) {
126
- if (value > localMax) {
127
- value = localMax;
128
- }
129
- if (value < localMin) {
130
- value = localMin;
131
- }
132
- }
133
- setStopIsInvalid(isStopInvalid(value));
134
- onChange({
135
- stop: value,
136
- color: color
137
- });
138
- };
139
- var handleStopInputChange = function handleStopInputChange(e) {
140
- var value = parseFloat(e.target.value);
141
- var willBeInvalid = value > globalMax || value < globalMin;
142
- if (willBeInvalid) {
143
- if (value > globalMax && max != null) {
144
- value = globalMax;
145
- }
146
- if (value < globalMin && min != null) {
147
- value = globalMin;
148
- }
149
- }
150
- setStopIsInvalid(isStopInvalid(value));
151
- onChange({
152
- stop: value,
153
- color: color
154
- });
155
- };
156
- var handlePointerChange = function handlePointerChange(location, isFirstInteraction) {
157
- if (isFirstInteraction) return; // Prevents change on the initial MouseDown event
158
- if (parentRef == null) {
159
- return;
160
- }
161
- var newStop = getStopFromMouseLocationFn(location);
162
- handleStopChange(newStop);
163
- };
164
- var handleKeyDown = function handleKeyDown(event) {
165
- switch (event.key) {
166
- case keys.ENTER:
167
- event.preventDefault();
168
- openPopover();
169
- break;
170
- case keys.ARROW_LEFT:
171
- event.preventDefault();
172
- if (readOnly) return;
173
- handleStopChange(stop - 1);
174
- break;
175
- case keys.ARROW_RIGHT:
176
- event.preventDefault();
177
- if (readOnly) return;
178
- handleStopChange(stop + 1);
179
- break;
180
- }
181
- };
182
- var _useMouseMove = useMouseMove(handlePointerChange),
183
- _useMouseMove2 = _slicedToArray(_useMouseMove, 2),
184
- handleMouseDown = _useMouseMove2[0],
185
- handleInteraction = _useMouseMove2[1];
186
- var handleOnMouseDown = function handleOnMouseDown(e) {
187
- if (!readOnly) {
188
- handleMouseDown(e);
189
- }
190
- openPopover();
191
- };
192
- var handleTouchInteraction = function handleTouchInteraction(e) {
193
- if (!readOnly) {
194
- handleInteraction(e);
195
- }
196
- };
197
- var handleTouchStart = function handleTouchStart(e) {
198
- handleTouchInteraction(e);
199
- if (!isPopoverOpen) {
200
- openPopover();
201
- }
202
- };
203
- var euiTheme = useEuiTheme();
204
- var popoverStyles = euiColorStopThumbPopoverStyles(euiTheme);
205
- var cssPopoverStyles = [popoverStyles.euiColorStopThumbPopover, (hasFocus || isPopoverOpen) && popoverStyles.hasFocus];
206
- var thumbStyles = euiColorStopThumbStyles(euiTheme);
207
- var cssThumbStyles = [thumbStyles.euiColorStopThumb, isPopoverOpen && thumbStyles.isPopoverOpen];
208
- var colorStopStyles = euiColorStopStyles(euiTheme);
209
- var cssColorStopStyles = colorStopStyles.euiColorStop;
210
- var classes = classNames('euiColorStopPopover', className);
211
- return ___EmotionJSX(EuiPopover, _extends({
212
- css: cssPopoverStyles
213
- }, rest, {
214
- ref: popoverRef,
215
- className: classes,
216
- anchorClassName: "euiColorStopThumbPopover__anchor",
217
- panelPaddingSize: "s",
218
- isOpen: isPopoverOpen,
219
- closePopover: closePopover,
220
- initialFocus: numberInputRef || undefined,
221
- focusTrapProps: {
222
- clickOutsideDisables: false
223
- },
224
- panelProps: {
225
- css: numberInputRef ? undefined : popoverStyles.isLoadingPanel
226
- },
227
- style: _objectSpread(_objectSpread({}, style), {}, {
228
- left: "".concat(getPositionFromStopFn(stop), "%")
229
- }),
230
- button: ___EmotionJSX(EuiI18n, {
231
- tokens: ['euiColorStopThumb.buttonAriaLabel', 'euiColorStopThumb.buttonTitle'],
232
- defaults: ['Press the Enter key to modify this stop. Press Escape to focus the group', 'Click to edit, drag to reposition']
233
- }, function (_ref2) {
234
- var _ref3 = _slicedToArray(_ref2, 2),
235
- buttonAriaLabel = _ref3[0],
236
- buttonTitle = _ref3[1];
237
- var ariaLabel = buttonAriaLabel;
238
- var title = buttonTitle;
239
- return ___EmotionJSX(EuiRangeThumb, {
240
- "data-test-subj": "euiColorStopThumb",
241
- "data-index": dataIndex,
242
- min: localMin,
243
- max: localMax,
244
- value: stop,
245
- onFocus: handleFocus,
246
- onBlur: setHasFocusFalse,
247
- onMouseOver: setHasFocusTrue,
248
- onMouseOut: setHasFocusFalse,
249
- onKeyDown: handleKeyDown,
250
- onMouseDown: handleOnMouseDown,
251
- onTouchStart: handleTouchStart,
252
- onTouchMove: handleTouchInteraction,
253
- "aria-valuetext": ariaValueText,
254
- "aria-label": ariaLabel,
255
- title: title,
256
- className: "euiColorStopThumb",
257
- css: cssThumbStyles,
258
- tabIndex: -1,
259
- style: {
260
- background: background
261
- },
262
- disabled: disabled
263
- });
264
- })
265
- }), ___EmotionJSX("div", {
266
- className: "euiColorStop",
267
- css: cssColorStopStyles,
268
- "data-test-subj": "euiColorStopPopover"
269
- }, ___EmotionJSX(EuiScreenReaderOnly, null, ___EmotionJSX("p", {
270
- "aria-live": "polite"
271
- }, ___EmotionJSX(EuiI18n, {
272
- token: "euiColorStopThumb.screenReaderAnnouncement",
273
- default: "A popup with a color stop edit form opened. Tab forward to cycle through form controls or press escape to close this popup."
274
- }))), ___EmotionJSX(EuiFlexGroup, {
275
- gutterSize: "s",
276
- responsive: false
277
- }, ___EmotionJSX(EuiFlexItem, null, ___EmotionJSX(EuiI18n, {
278
- tokens: ['euiColorStopThumb.stopLabel', 'euiColorStopThumb.stopErrorMessage'],
279
- defaults: ['Stop value', 'Value is out of range']
280
- }, function (_ref4) {
281
- var _ref5 = _slicedToArray(_ref4, 2),
282
- stopLabel = _ref5[0],
283
- stopErrorMessage = _ref5[1];
284
- return ___EmotionJSX(EuiFormRow, {
285
- label: stopLabel,
286
- display: "rowCompressed",
287
- isInvalid: stopIsInvalid,
288
- error: stopIsInvalid ? stopErrorMessage : null
289
- }, ___EmotionJSX(EuiFieldNumber, _extends({}, valueInputProps, {
290
- inputRef: setNumberInputRef,
291
- compressed: true,
292
- readOnly: readOnly,
293
- min: isRangeMin || min == null ? undefined : localMin,
294
- max: isRangeMax || max == null ? undefined : localMax,
295
- value: isStopInvalid(stop) ? '' : stop,
296
- isInvalid: stopIsInvalid,
297
- onChange: handleStopInputChange
298
- })));
299
- })), !readOnly && ___EmotionJSX(EuiFlexItem, {
300
- grow: false
301
- }, ___EmotionJSX(EuiFormRow, {
302
- display: "rowCompressed",
303
- hasEmptyLabelSpace: true
304
- }, ___EmotionJSX(EuiI18n, {
305
- token: "euiColorStopThumb.removeLabel",
306
- default: "Remove this stop"
307
- }, function (removeLabel) {
308
- return ___EmotionJSX(EuiButtonIcon, {
309
- iconType: "trash",
310
- color: "danger",
311
- "aria-label": removeLabel,
312
- title: removeLabel,
313
- disabled: !onRemove,
314
- onClick: handleOnRemove
315
- });
316
- })))), !readOnly && ___EmotionJSX(EuiSpacer, {
317
- size: "s"
318
- }), ___EmotionJSX(EuiColorPicker, {
319
- readOnly: readOnly,
320
- onChange: handleColorChange,
321
- color: color,
322
- mode: readOnly ? 'secondaryInput' : colorPickerMode,
323
- swatches: colorPickerSwatches,
324
- display: "inline",
325
- showAlpha: colorPickerShowAlpha,
326
- isInvalid: colorIsInvalid,
327
- secondaryInputDisplay: colorPickerMode === 'swatch' ? 'none' : 'bottom'
328
- })));
329
- };
@@ -1,55 +0,0 @@
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 { mathWithUnits } from '../../../global_styling';
12
- import { euiRangeVariables, euiRangeThumbFocus } from '../../form/range/range.styles';
13
- import { euiColorPickerVariables } from '../color_picker.styles';
14
- var _ref2 = process.env.NODE_ENV === "production" ? {
15
- name: "zrzkfg-euiColorStopThumb",
16
- styles: "&:not(:disabled){inset-block-start:0;margin-block-start:0;pointer-events:auto;cursor:grab;&:active{cursor:grabbing;}};label:euiColorStopThumb;"
17
- } : {
18
- name: "zrzkfg-euiColorStopThumb",
19
- styles: "&:not(:disabled){inset-block-start:0;margin-block-start:0;pointer-events:auto;cursor:grab;&:active{cursor:grabbing;}};label:euiColorStopThumb;",
20
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
21
- };
22
- export var euiColorStopThumbStyles = function euiColorStopThumbStyles(euiThemeContext) {
23
- return {
24
- // Base
25
- euiColorStopThumb: _ref2,
26
- isPopoverOpen: /*#__PURE__*/css(euiRangeThumbFocus(euiThemeContext), ";;label:isPopoverOpen;")
27
- };
28
- };
29
- var _ref = process.env.NODE_ENV === "production" ? {
30
- name: "1wndm4s-isLoadingPanel",
31
- styles: "visibility:hidden!important;label:isLoadingPanel;"
32
- } : {
33
- name: "1wndm4s-isLoadingPanel",
34
- styles: "visibility:hidden!important;label:isLoadingPanel;",
35
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
36
- };
37
- export var euiColorStopThumbPopoverStyles = function euiColorStopThumbPopoverStyles(euiThemeContext) {
38
- var range = euiRangeVariables(euiThemeContext);
39
- var euiTheme = euiThemeContext.euiTheme;
40
- return {
41
- // Base
42
- euiColorStopThumbPopover: /*#__PURE__*/css("position:absolute;inset-block-start:50%;inline-size:", range.thumbWidth, ";block-size:", range.thumbHeight, ";margin-block-start:", mathWithUnits(range.thumbHeight, function (x) {
43
- return x * -0.5;
44
- }), ";.euiColorStopThumbPopover__anchor{position:absolute;inline-size:100%;block-size:100%;&::before{content:'';display:block;position:absolute;inset-inline-start:0;inset-block-start:0;block-size:", range.thumbHeight, ";inline-size:", range.thumbWidth, ";border-radius:", range.thumbHeight, ";background:", euiTheme.colors.emptyShade, ";}};label:euiColorStopThumbPopover;"),
45
- isLoadingPanel: _ref,
46
- hasFocus: /*#__PURE__*/css("z-index:", range.thumbZIndex, ";;label:hasFocus;")
47
- };
48
- };
49
- export var euiColorStopStyles = function euiColorStopStyles(euiThemeContext) {
50
- var colorPicker = euiColorPickerVariables(euiThemeContext);
51
- return {
52
- // Base
53
- euiColorStop: /*#__PURE__*/css("inline-size:", colorPicker.width, ";;label:euiColorStop;")
54
- };
55
- };