@elastic/eui 91.3.1 → 92.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 (160) hide show
  1. package/dist/eui_charts_theme.js.map +1 -1
  2. package/dist/eui_theme_dark.css +0 -513
  3. package/dist/eui_theme_dark.min.css +1 -1
  4. package/dist/eui_theme_light.css +0 -513
  5. package/dist/eui_theme_light.min.css +1 -1
  6. package/es/components/basic_table/basic_table.js +5 -5
  7. package/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  8. package/es/components/filter_group/filter_button.js +20 -13
  9. package/es/components/filter_group/filter_button.styles.js +11 -20
  10. package/es/components/flyout/flyout.js +4 -4
  11. package/es/components/flyout/flyout_resizable.js +127 -0
  12. package/es/components/flyout/flyout_resizable.styles.js +27 -0
  13. package/es/components/flyout/index.js +2 -1
  14. package/es/components/form/range/dual_range.js +15 -66
  15. package/es/components/form/range/range.js +6 -5
  16. package/es/components/form/range/range_slider.js +28 -22
  17. package/es/components/form/text_area/text_area.js +39 -3
  18. package/es/components/index.js +0 -2
  19. package/es/components/markdown_editor/markdown_editor.js +12 -13
  20. package/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  21. package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  22. package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +5 -0
  23. package/es/components/tree_view/tree_view.js +23 -25
  24. package/es/utils/prop_types/is.js +2 -2
  25. package/eui.d.ts +825 -1141
  26. package/i18ntokens.json +68 -338
  27. package/lib/components/basic_table/basic_table.js +5 -5
  28. package/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  29. package/lib/components/filter_group/filter_button.js +20 -13
  30. package/lib/components/filter_group/filter_button.styles.js +11 -20
  31. package/lib/components/flyout/flyout.js +4 -4
  32. package/lib/components/flyout/flyout_resizable.js +136 -0
  33. package/lib/components/flyout/flyout_resizable.styles.js +32 -0
  34. package/lib/components/flyout/index.js +8 -1
  35. package/lib/components/form/range/dual_range.js +15 -66
  36. package/lib/components/form/range/range.js +6 -5
  37. package/lib/components/form/range/range_slider.js +27 -21
  38. package/lib/components/form/text_area/text_area.js +42 -3
  39. package/lib/components/index.js +0 -22
  40. package/lib/components/markdown_editor/markdown_editor.js +12 -13
  41. package/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  42. package/lib/components/pagination/pagination_button.js +79 -2
  43. package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  44. package/lib/components/tree_view/tree_view.js +23 -25
  45. package/lib/utils/prop_types/is.js +2 -2
  46. package/optimize/es/components/basic_table/basic_table.js +5 -5
  47. package/optimize/es/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  48. package/optimize/es/components/filter_group/filter_button.js +20 -13
  49. package/optimize/es/components/filter_group/filter_button.styles.js +11 -20
  50. package/optimize/es/components/flyout/flyout.js +4 -4
  51. package/optimize/es/components/flyout/flyout_resizable.js +121 -0
  52. package/optimize/es/components/flyout/flyout_resizable.styles.js +27 -0
  53. package/optimize/es/components/flyout/index.js +2 -1
  54. package/optimize/es/components/form/range/dual_range.js +15 -66
  55. package/optimize/es/components/form/range/range.js +6 -5
  56. package/optimize/es/components/form/range/range_slider.js +26 -21
  57. package/optimize/es/components/form/text_area/text_area.js +29 -3
  58. package/optimize/es/components/index.js +0 -2
  59. package/optimize/es/components/markdown_editor/markdown_editor.js +12 -13
  60. package/optimize/es/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  61. package/optimize/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
  62. package/optimize/es/components/tree_view/tree_view.js +23 -25
  63. package/optimize/es/utils/prop_types/is.js +2 -2
  64. package/optimize/lib/components/basic_table/basic_table.js +5 -5
  65. package/optimize/lib/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  66. package/optimize/lib/components/filter_group/filter_button.js +20 -13
  67. package/optimize/lib/components/filter_group/filter_button.styles.js +11 -20
  68. package/optimize/lib/components/flyout/flyout.js +4 -4
  69. package/optimize/lib/components/flyout/flyout_resizable.js +131 -0
  70. package/optimize/lib/components/flyout/flyout_resizable.styles.js +32 -0
  71. package/optimize/lib/components/flyout/index.js +8 -1
  72. package/optimize/lib/components/form/range/dual_range.js +15 -66
  73. package/optimize/lib/components/form/range/range.js +6 -5
  74. package/optimize/lib/components/form/range/range_slider.js +26 -21
  75. package/optimize/lib/components/form/text_area/text_area.js +32 -3
  76. package/optimize/lib/components/index.js +0 -22
  77. package/optimize/lib/components/markdown_editor/markdown_editor.js +12 -13
  78. package/optimize/lib/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  79. package/optimize/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
  80. package/optimize/lib/components/tree_view/tree_view.js +23 -25
  81. package/optimize/lib/utils/prop_types/is.js +2 -2
  82. package/package.json +2 -2
  83. package/src/components/index.scss +0 -2
  84. package/test-env/components/basic_table/basic_table.js +5 -5
  85. package/test-env/components/drag_and_drop/drag_and_drop.a11y.js +1 -1
  86. package/test-env/components/filter_group/filter_button.js +20 -13
  87. package/test-env/components/filter_group/filter_button.styles.js +11 -20
  88. package/test-env/components/flyout/flyout_resizable.js +131 -0
  89. package/test-env/components/flyout/flyout_resizable.styles.js +32 -0
  90. package/test-env/components/flyout/index.js +8 -1
  91. package/test-env/components/form/range/dual_range.js +15 -66
  92. package/test-env/components/form/range/range.js +6 -5
  93. package/test-env/components/form/range/range_slider.js +27 -21
  94. package/test-env/components/form/text_area/text_area.js +42 -3
  95. package/test-env/components/index.js +0 -22
  96. package/test-env/components/markdown_editor/markdown_editor.js +12 -13
  97. package/test-env/components/page_template/bottom_bar/page_bottom_bar.js +1 -1
  98. package/test-env/components/pagination/pagination_button.js +79 -2
  99. package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
  100. package/test-env/components/tree_view/tree_view.js +23 -25
  101. package/test-env/utils/prop_types/is.js +2 -2
  102. package/es/components/control_bar/control_bar.a11y.js +0 -133
  103. package/es/components/control_bar/control_bar.js +0 -609
  104. package/es/components/control_bar/index.js +0 -9
  105. package/es/components/notification/index.js +0 -9
  106. package/es/components/notification/notification_event.a11y.js +0 -104
  107. package/es/components/notification/notification_event.js +0 -288
  108. package/es/components/notification/notification_event_messages.js +0 -79
  109. package/es/components/notification/notification_event_meta.js +0 -148
  110. package/es/components/notification/notification_event_read_button.js +0 -86
  111. package/es/components/notification/notification_event_read_icon.js +0 -77
  112. package/lib/components/control_bar/control_bar.a11y.js +0 -134
  113. package/lib/components/control_bar/control_bar.js +0 -441
  114. package/lib/components/control_bar/index.js +0 -12
  115. package/lib/components/notification/index.js +0 -12
  116. package/lib/components/notification/notification_event.a11y.js +0 -105
  117. package/lib/components/notification/notification_event.js +0 -297
  118. package/lib/components/notification/notification_event_messages.js +0 -88
  119. package/lib/components/notification/notification_event_meta.js +0 -157
  120. package/lib/components/notification/notification_event_read_button.js +0 -93
  121. package/lib/components/notification/notification_event_read_icon.js +0 -64
  122. package/optimize/es/components/control_bar/control_bar.a11y.js +0 -128
  123. package/optimize/es/components/control_bar/control_bar.js +0 -308
  124. package/optimize/es/components/control_bar/index.js +0 -9
  125. package/optimize/es/components/notification/index.js +0 -9
  126. package/optimize/es/components/notification/notification_event.a11y.js +0 -99
  127. package/optimize/es/components/notification/notification_event.js +0 -114
  128. package/optimize/es/components/notification/notification_event_messages.js +0 -63
  129. package/optimize/es/components/notification/notification_event_meta.js +0 -106
  130. package/optimize/es/components/notification/notification_event_read_button.js +0 -44
  131. package/optimize/es/components/notification/notification_event_read_icon.js +0 -44
  132. package/optimize/lib/components/control_bar/control_bar.a11y.js +0 -134
  133. package/optimize/lib/components/control_bar/control_bar.js +0 -301
  134. package/optimize/lib/components/control_bar/index.js +0 -12
  135. package/optimize/lib/components/notification/index.js +0 -12
  136. package/optimize/lib/components/notification/notification_event.a11y.js +0 -105
  137. package/optimize/lib/components/notification/notification_event.js +0 -123
  138. package/optimize/lib/components/notification/notification_event_messages.js +0 -74
  139. package/optimize/lib/components/notification/notification_event_meta.js +0 -117
  140. package/optimize/lib/components/notification/notification_event_read_button.js +0 -51
  141. package/optimize/lib/components/notification/notification_event_read_icon.js +0 -51
  142. package/src/components/control_bar/_control_bar.scss +0 -232
  143. package/src/components/control_bar/_index.scss +0 -2
  144. package/src/components/control_bar/_variables.scss +0 -12
  145. package/src/components/notification/_index.scss +0 -5
  146. package/src/components/notification/_notification_event.scss +0 -40
  147. package/src/components/notification/_notification_event_messages.scss +0 -17
  148. package/src/components/notification/_notification_event_meta.scss +0 -44
  149. package/src/components/notification/_notification_event_read_button.scss +0 -5
  150. package/src/components/notification/_notification_event_read_icon.scss +0 -12
  151. package/test-env/components/control_bar/control_bar.a11y.js +0 -134
  152. package/test-env/components/control_bar/control_bar.js +0 -436
  153. package/test-env/components/control_bar/index.js +0 -12
  154. package/test-env/components/notification/index.js +0 -12
  155. package/test-env/components/notification/notification_event.a11y.js +0 -105
  156. package/test-env/components/notification/notification_event.js +0 -296
  157. package/test-env/components/notification/notification_event_messages.js +0 -85
  158. package/test-env/components/notification/notification_event_meta.js +0 -154
  159. package/test-env/components/notification/notification_event_read_button.js +0 -92
  160. package/test-env/components/notification/notification_event_read_icon.js +0 -63
@@ -1,148 +0,0 @@
1
- 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); }
2
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
7
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
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, { useState } from 'react';
17
- import PropTypes from "prop-types";
18
- import classNames from 'classnames';
19
- import { EuiIcon } from '../icon';
20
- import { EuiBadge } from '../badge';
21
- import { EuiPopover } from '../popover';
22
- import { EuiButtonIcon } from '../button';
23
- import { EuiContextMenuPanel } from '../context_menu';
24
- import { EuiI18n } from '../i18n';
25
- import { useGeneratedHtmlId } from '../../services';
26
- import { jsx as ___EmotionJSX } from "@emotion/react";
27
- export var EuiNotificationEventMeta = function EuiNotificationEventMeta(_ref) {
28
- var id = _ref.id,
29
- iconType = _ref.iconType,
30
- type = _ref.type,
31
- time = _ref.time,
32
- _ref$badgeColor = _ref.badgeColor,
33
- badgeColor = _ref$badgeColor === void 0 ? 'hollow' : _ref$badgeColor,
34
- severity = _ref.severity,
35
- eventName = _ref.eventName,
36
- iconAriaLabel = _ref.iconAriaLabel,
37
- onOpenContextMenu = _ref.onOpenContextMenu;
38
- var _useState = useState(false),
39
- _useState2 = _slicedToArray(_useState, 2),
40
- isPopoverOpen = _useState2[0],
41
- setIsPopoverOpen = _useState2[1];
42
- var classes = classNames('euiNotificationEventMeta', {
43
- 'euiNotificationEventMeta--hasContextMenu': onOpenContextMenu
44
- });
45
- var _useState3 = useState([]),
46
- _useState4 = _slicedToArray(_useState3, 2),
47
- contextMenuItems = _useState4[0],
48
- setContextMenuItems = _useState4[1];
49
- var randomPopoverId = useGeneratedHtmlId();
50
- var ariaAttribute = iconAriaLabel ? {
51
- 'aria-label': iconAriaLabel
52
- } : {
53
- 'aria-hidden': true
54
- };
55
- var onOpenPopover = function onOpenPopover() {
56
- setIsPopoverOpen(!isPopoverOpen);
57
- if (onOpenContextMenu) {
58
- setContextMenuItems(onOpenContextMenu());
59
- }
60
- };
61
- return ___EmotionJSX("div", {
62
- className: classes
63
- }, ___EmotionJSX("div", {
64
- className: "euiNotificationEventMeta__section"
65
- }, iconType && ___EmotionJSX(EuiIcon, _extends({
66
- className: "euiNotificationEventMeta__icon",
67
- type: iconType
68
- }, ariaAttribute)), type && ___EmotionJSX(EuiBadge, {
69
- className: "euiNotificationEventMeta__badge",
70
- color: badgeColor
71
- }, severity ? "".concat(type, ": ").concat(severity) : type)), ___EmotionJSX("div", {
72
- className: "euiNotificationEventMeta__section"
73
- }, ___EmotionJSX("span", {
74
- className: "euiNotificationEventMeta__time"
75
- }, time)), onOpenContextMenu && ___EmotionJSX("div", {
76
- className: "euiNotificationEventMeta__contextMenuWrapper"
77
- }, ___EmotionJSX(EuiPopover, {
78
- id: randomPopoverId,
79
- ownFocus: true,
80
- repositionOnScroll: true,
81
- isOpen: isPopoverOpen,
82
- panelPaddingSize: "none",
83
- anchorPosition: "leftUp",
84
- button: ___EmotionJSX(EuiI18n, {
85
- token: "euiNotificationEventMeta.contextMenuButton",
86
- default: "Menu for {eventName}",
87
- values: {
88
- eventName: eventName
89
- }
90
- }, function (contextMenuButton) {
91
- return ___EmotionJSX(EuiButtonIcon, {
92
- "aria-label": contextMenuButton,
93
- "aria-controls": randomPopoverId,
94
- "aria-expanded": isPopoverOpen,
95
- "aria-haspopup": "true",
96
- iconType: "boxesVertical",
97
- color: "text",
98
- onClick: onOpenPopover,
99
- "data-test-subj": "".concat(id, "-notificationEventMetaButton")
100
- });
101
- }),
102
- closePopover: function closePopover() {
103
- return setIsPopoverOpen(false);
104
- }
105
- }, ___EmotionJSX("div", {
106
- onClick: function onClick() {
107
- return setIsPopoverOpen(false);
108
- }
109
- }, ___EmotionJSX(EuiContextMenuPanel, {
110
- items: contextMenuItems
111
- })))));
112
- };
113
- EuiNotificationEventMeta.propTypes = {
114
- id: PropTypes.string.isRequired,
115
- /**
116
- * Type of event (e.g. "Alert", "Cloud", etc..). Shows inside a badge.
117
- */
118
- type: PropTypes.string.isRequired,
119
- /**
120
- * A unique, human-friendly name for the event to be used in aria attributes (e.g. "alert-critical-01", "cloud-no-severity-12", etc..).
121
- */
122
- eventName: PropTypes.string.isRequired,
123
- /**
124
- * Type of severity (e.g. "Critical", "Warning", etc..). Shows as a text after the `type` following the format "Alert: Critical".
125
- */
126
- severity: PropTypes.string,
127
- /**
128
- * Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
129
- */
130
- badgeColor: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.string.isRequired]),
131
- /**
132
- * The icon used to visually represent this data type. Accepts any `EuiIcon IconType`.
133
- */
134
- iconType: PropTypes.oneOfType([PropTypes.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", "endpoint", "eql", "eraser", "error", "esqlVis", "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", "pipeBreaks", "pipelineApp", "pipeNoBreaks", "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", "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", "tokenVectorDense", "tokenDenseVector", "tokenVectorSparse"]).isRequired, PropTypes.string.isRequired, PropTypes.elementType.isRequired]),
135
- /**
136
- * Specify an `aria-label` for the icon.
137
- * If no `aria-label` is passed we assume the icon is purely decorative.
138
- */
139
- iconAriaLabel: PropTypes.string,
140
- /**
141
- * Indicates when the event was received.
142
- */
143
- time: PropTypes.node.isRequired,
144
- /**
145
- * Necessary to trigger `onOpenContextMenu` from #EuiNotificationEvent
146
- */
147
- onOpenContextMenu: PropTypes.func
148
- };
@@ -1,86 +0,0 @@
1
- var _excluded = ["id", "isRead", "onClick", "eventName"];
2
- 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); }
3
- 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; }
4
- 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; }
5
- /*
6
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
- * or more contributor license agreements. Licensed under the Elastic License
8
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
- * in compliance with, at your election, the Elastic License 2.0 or the Server
10
- * Side Public License, v 1.
11
- */
12
-
13
- import React from 'react';
14
- import PropTypes from "prop-types";
15
- import { EuiButtonIcon } from '../button';
16
- import { useEuiI18n } from '../i18n';
17
- import classNames from 'classnames';
18
- import { jsx as ___EmotionJSX } from "@emotion/react";
19
- export var EuiNotificationEventReadButton = function EuiNotificationEventReadButton(_ref) {
20
- var id = _ref.id,
21
- isRead = _ref.isRead,
22
- onClick = _ref.onClick,
23
- eventName = _ref.eventName,
24
- rest = _objectWithoutProperties(_ref, _excluded);
25
- var classesReadState = classNames('euiNotificationEventReadButton', {
26
- 'euiNotificationEventReadButton--isRead': isRead
27
- });
28
- var markAsReadAria = useEuiI18n('euiNotificationEventReadButton.markAsReadAria', 'Mark {eventName} as read', {
29
- eventName: eventName
30
- });
31
- var markAsUnreadAria = useEuiI18n('euiNotificationEventReadButton.markAsUnreadAria', 'Mark {eventName} as unread', {
32
- eventName: eventName
33
- });
34
- var markAsRead = useEuiI18n('euiNotificationEventReadButton.markAsRead', 'Mark as read');
35
- var markAsUnread = useEuiI18n('euiNotificationEventReadButton.markAsUnread', 'Mark as unread');
36
- var buttonAriaLabel = isRead ? markAsUnreadAria : markAsReadAria;
37
- var buttonTitle = isRead ? markAsUnread : markAsRead;
38
- return ___EmotionJSX(EuiButtonIcon, _extends({
39
- iconType: "dot",
40
- "aria-label": buttonAriaLabel,
41
- title: buttonTitle,
42
- className: classesReadState,
43
- onClick: onClick,
44
- "data-test-subj": "".concat(id, "-notificationEventReadButton")
45
- }, rest));
46
- };
47
- EuiNotificationEventReadButton.propTypes = {
48
- /**
49
- * Any of the named color palette options.
50
- */
51
- color: PropTypes.any,
52
- "aria-label": PropTypes.string,
53
- "aria-labelledby": PropTypes.string,
54
- /**
55
- * Size of the icon only.
56
- * This will not affect the overall size of the button
57
- */
58
- iconSize: PropTypes.any,
59
- /**
60
- * Sets the display style for matching other EuiButton types.
61
- * `base` is equivalent to a typical EuiButton
62
- * `fill` is equivalent to a filled EuiButton
63
- * `empty` (default) is equivalent to an EuiButtonEmpty
64
- */
65
- display: PropTypes.any,
66
- /**
67
- * Disables the button and changes the icon to a loading spinner
68
- */
69
- isLoading: PropTypes.bool,
70
- className: PropTypes.string,
71
- "data-test-subj": PropTypes.string,
72
- css: PropTypes.any,
73
- id: PropTypes.string.isRequired,
74
- /**
75
- * Shows an indicator of the read state of the event
76
- */
77
- isRead: PropTypes.bool.isRequired,
78
- /**
79
- * Applies an `onClick` handler to the `read` indicator.
80
- */
81
- onClick: PropTypes.func.isRequired,
82
- /**
83
- * A unique, human-friendly name for the event to be used in aria attributes (e.g. "alert-critical-01", "cloud-no-severity-12", etc..).
84
- */
85
- eventName: PropTypes.string.isRequired
86
- };
@@ -1,77 +0,0 @@
1
- var _excluded = ["id", "isRead", "eventName"];
2
- 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); }
3
- 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; }
4
- 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; }
5
- /*
6
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
7
- * or more contributor license agreements. Licensed under the Elastic License
8
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
9
- * in compliance with, at your election, the Elastic License 2.0 or the Server
10
- * Side Public License, v 1.
11
- */
12
-
13
- import React from 'react';
14
- import PropTypes from "prop-types";
15
- import { useEuiI18n } from '../i18n';
16
- import classNames from 'classnames';
17
- import { EuiIcon } from '../icon';
18
- import { jsx as ___EmotionJSX } from "@emotion/react";
19
- export var EuiNotificationEventReadIcon = function EuiNotificationEventReadIcon(_ref) {
20
- var id = _ref.id,
21
- isRead = _ref.isRead,
22
- eventName = _ref.eventName,
23
- rest = _objectWithoutProperties(_ref, _excluded);
24
- var classesReadState = classNames('euiNotificationEventReadIcon', {
25
- 'euiNotificationEventReadIcon--isRead': isRead
26
- });
27
- var readAria = useEuiI18n('euiNotificationEventReadIcon.readAria', '{eventName} is read', {
28
- eventName: eventName
29
- });
30
- var unreadAria = useEuiI18n('euiNotificationEventReadIcon.unreadAria', '{eventName} is unread', {
31
- eventName: eventName
32
- });
33
- var readTitle = useEuiI18n('euiNotificationEventReadIcon.read', 'Read');
34
- var unreadTitle = useEuiI18n('euiNotificationEventReadIcon.unread', 'Unread');
35
- var iconAriaLabel = isRead ? readAria : unreadAria;
36
- var iconTitle = isRead ? readTitle : unreadTitle;
37
- return ___EmotionJSX("div", {
38
- className: classesReadState
39
- }, ___EmotionJSX(EuiIcon, _extends({
40
- type: "dot",
41
- "aria-label": iconAriaLabel,
42
- title: iconTitle,
43
- color: "primary",
44
- "data-test-subj": "".concat(id, "-notificationEventReadIcon")
45
- }, rest)));
46
- };
47
- EuiNotificationEventReadIcon.propTypes = {
48
- className: PropTypes.string,
49
- "aria-label": PropTypes.string,
50
- "data-test-subj": PropTypes.string,
51
- css: PropTypes.any,
52
- /**
53
- * Descriptive title for naming the icon based on its use
54
- */
55
- title: PropTypes.string,
56
- /**
57
- * A unique identifier for the title element
58
- */
59
- titleId: PropTypes.string,
60
- /**
61
- * Its value should be one or more element IDs
62
- */
63
- "aria-labelledby": PropTypes.string,
64
- /**
65
- * Callback when the icon has been loaded & rendered
66
- */
67
- onIconLoad: PropTypes.func,
68
- id: PropTypes.string.isRequired,
69
- /**
70
- * Shows an indicator of the read state of the event
71
- */
72
- isRead: PropTypes.bool.isRequired,
73
- /**
74
- * A unique, human-friendly name for the event to be used in aria attributes (e.g. "alert-critical-01", "cloud-no-severity-12", etc..).
75
- */
76
- eventName: PropTypes.string.isRequired
77
- };
@@ -1,134 +0,0 @@
1
- "use strict";
2
-
3
- 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); }
4
- var _react = _interopRequireWildcard(require("react"));
5
- var _button = require("../button");
6
- var _control_bar = require("./control_bar");
7
- var _panel = require("../panel");
8
- var _text = require("../text");
9
- var _react2 = require("@emotion/react");
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
14
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
17
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /*
18
- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
19
- * or more contributor license agreements. Licensed under the Elastic License
20
- * 2.0 and the Server Side Public License, v 1; you may not use this file except
21
- * in compliance with, at your election, the Elastic License 2.0 or the Server
22
- * Side Public License, v 1.
23
- */ /// <reference types="cypress" />
24
- /// <reference types="cypress-real-events" />
25
- /// <reference types="../../../cypress/support" />
26
- var ControlBar = function ControlBar() {
27
- var _useState = (0, _react.useState)(false),
28
- _useState2 = _slicedToArray(_useState, 2),
29
- contentIsVisible = _useState2[0],
30
- setVisibility = _useState2[1];
31
- var _useState3 = (0, _react.useState)(false),
32
- _useState4 = _slicedToArray(_useState3, 2),
33
- isDisplaying = _useState4[0],
34
- setDisplay = _useState4[1];
35
- var toggleContent = function toggleContent() {
36
- setVisibility(!contentIsVisible);
37
- };
38
- var toggleDisplay = function toggleDisplay() {
39
- setDisplay(!isDisplaying);
40
- setVisibility(false);
41
- };
42
- var codeControls = [{
43
- controlType: 'icon',
44
- id: 'root_icon',
45
- iconType: 'submodule',
46
- 'aria-label': 'Project Root'
47
- }, {
48
- controlType: 'breadcrumbs',
49
- id: 'current_file_path',
50
- breadcrumbs: [{
51
- text: 'src'
52
- }, {
53
- text: 'components'
54
- }]
55
- }, {
56
- controlType: 'spacer'
57
- }, {
58
- controlType: 'icon',
59
- id: 'status_icon',
60
- iconType: 'warning',
61
- color: 'warning',
62
- 'aria-label': 'Repo Status'
63
- }, {
64
- controlType: 'divider'
65
- }, {
66
- controlType: 'icon',
67
- id: 'branch_icon',
68
- iconType: 'branch',
69
- 'aria-label': 'Branch Icon'
70
- }, {
71
- controlType: 'text',
72
- id: 'branch_name',
73
- text: 'some_long_branch'
74
- }, {
75
- controlType: 'divider'
76
- }, {
77
- controlType: 'icon',
78
- id: 'github_icon',
79
- iconType: 'logoGithub',
80
- onClick: function onClick() {},
81
- title: 'Open in Github',
82
- 'aria-label': 'Open in Github'
83
- }, {
84
- controlType: 'divider'
85
- }, {
86
- controlType: 'button',
87
- id: 'open_history_view',
88
- label: contentIsVisible ? 'Hide history' : 'Show history',
89
- color: 'primary',
90
- onClick: toggleContent
91
- }];
92
- var display;
93
- if (isDisplaying) {
94
- display = (0, _react2.jsx)(_control_bar.EuiControlBar, {
95
- controls: codeControls,
96
- showContent: contentIsVisible
97
- }, (0, _react2.jsx)("div", {
98
- style: {
99
- padding: '2rem',
100
- maxWidth: '60rem',
101
- margin: '0 auto'
102
- }
103
- }, (0, _react2.jsx)(_panel.EuiPanel, null, (0, _react2.jsx)(_text.EuiText, null, (0, _react2.jsx)("h1", null, "1984"), (0, _react2.jsx)("h3", null, "By: George Orwell"), (0, _react2.jsx)("p", null, "It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his breast in an effort to escape the vile wind, slipped quickly through the glass doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him."), (0, _react2.jsx)("p", null, "The hallway smelt of boiled cabbage and old rag mats. At one end of it a coloured poster, too large for indoor display, had been tacked to the wall. It depicted simply an enormous face, more than a metre wide: the face of a man of about forty-five, with a heavy black moustache and ruggedly handsome features. Winston made for the stairs. It was no use trying the lift. Even at the best of times it was seldom working, and at present the electric current was cut off during daylight hours. It was part of the economy drive in preparation for Hate Week. The flat was seven flights up, and Winston, who was thirty-nine and had a varicose ulcer above his right ankle, went slowly, resting several times on the way. On each landing, opposite the lift-shaft, the poster with the enormous face gazed from the wall. It was one of those pictures which are so contrived that the eyes follow you about when you move. BIG BROTHER IS WATCHING YOU, the caption beneath it ran."), (0, _react2.jsx)("p", null, "Inside the flat a fruity voice was reading out a list of figures which had something to do with the production of pig-iron. The voice came from an oblong metal plaque like a dulled mirror which formed part of the surface of the right-hand wall. Winston turned a switch and the voice sank somewhat, though the words were still distinguishable. The instrument (the telescreen, it was called) could be dimmed, but there was no way of shutting it off completely. He moved over to the window: a smallish, frail figure, the meagreness of his body merely emphasized by the blue overalls which were the uniform of the party. His hair was very fair, his face naturally sanguine, his skin roughened by coarse soap and blunt razor blades and the cold of the winter that had just ended.")))));
104
- }
105
- return (0, _react2.jsx)("div", null, (0, _react2.jsx)(_button.EuiButton, {
106
- onClick: toggleDisplay
107
- }, "Toggle example"), display);
108
- };
109
- beforeEach(function () {
110
- cy.viewport(1024, 768);
111
- cy.mount((0, _react2.jsx)(ControlBar, null));
112
- cy.get('section[aria-label="Page level controls"]').should('not.exist');
113
- });
114
- describe('EuiControlBar', function () {
115
- describe('Automated accessibility check', function () {
116
- it('has zero violations on render', function () {
117
- cy.checkAxe();
118
- });
119
- it('has zero violations when control bar is shown', function () {
120
- cy.get('button.euiButton').contains('Toggle example').realClick();
121
- cy.get('section[aria-label="Page level controls"]').should('exist');
122
- cy.checkAxe({
123
- context: 'section[aria-label="Page level controls"]'
124
- });
125
- });
126
- it('has zero violations when control bar is hidden', function () {
127
- cy.get('button.euiButton').contains('Toggle example').realClick();
128
- cy.get('section[aria-label="Page level controls"]').should('exist');
129
- cy.get('button.euiButton').contains('Toggle example').realClick();
130
- cy.get('section[aria-label="Page level controls"]').should('not.exist');
131
- cy.checkAxe();
132
- });
133
- });
134
- });