@elastic/eui 85.1.0 → 86.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.
- package/dist/eui_charts_theme.js +26 -2
- package/dist/eui_charts_theme.js.map +1 -1
- package/es/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/es/components/datagrid/body/data_grid_body.js +7 -7
- package/es/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/es/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/es/components/datagrid/body/data_grid_cell.js +14 -13
- package/es/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/es/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/es/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
- package/es/components/datagrid/controls/display_selector.js +1 -1
- package/es/components/datagrid/data_grid.js +7 -7
- package/es/components/datagrid/utils/in_memory.js +4 -4
- package/es/components/datagrid/utils/row_heights.js +4 -4
- package/es/components/date_picker/date_picker.js +1 -1
- package/es/components/drag_and_drop/drag_drop_context.js +1 -1
- package/es/components/drag_and_drop/draggable.js +2 -2
- package/es/components/drag_and_drop/droppable.js +1 -1
- package/es/components/drag_and_drop/index.js +3 -2
- package/es/components/header/header_section/header_section_item_button.js +94 -0
- package/es/components/highlight/highlight.js +2 -2
- package/es/components/inline_edit/inline_edit_text.js +2 -3
- package/es/components/inline_edit/inline_edit_title.js +2 -3
- package/es/components/inner_text/index.js +1 -2
- package/es/components/markdown_editor/markdown_actions.js +1 -1
- package/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/es/components/modal/confirm_modal.js +11 -29
- package/es/components/outside_click_detector/outside_click_detector.js +10 -11
- package/es/components/page/page_template.js +8 -8
- package/es/components/popover/wrapping_popover.js +1 -9
- package/es/components/portal/portal.js +34 -24
- package/es/components/tabs/tabs.js +25 -0
- package/es/components/timeline/timeline_item_icon.js +3 -3
- package/es/components/tour/tour_step.js +16 -12
- package/es/services/color/eui_palettes.js +7 -1
- package/es/services/color/index.js +1 -1
- package/es/services/index.js +1 -1
- package/es/services/time/timer.js +3 -5
- package/es/test/rtl/component_helpers.js +1 -1
- package/es/test/rtl/index.js +2 -1
- package/es/test/rtl/render_hook.js +23 -0
- package/eui.d.ts +1234 -748
- package/i18ntokens.json +144 -144
- package/lib/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/lib/components/datagrid/body/data_grid_body.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/lib/components/datagrid/body/data_grid_cell.js +14 -13
- package/lib/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/lib/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/lib/components/datagrid/controls/data_grid_toolbar.js +41 -38
- package/lib/components/datagrid/controls/display_selector.js +1 -1
- package/lib/components/datagrid/data_grid.js +7 -7
- package/lib/components/datagrid/utils/in_memory.js +4 -4
- package/lib/components/datagrid/utils/row_heights.js +4 -4
- package/lib/components/date_picker/date_picker.js +1 -1
- package/lib/components/drag_and_drop/drag_drop_context.js +2 -2
- package/lib/components/drag_and_drop/draggable.js +3 -3
- package/lib/components/drag_and_drop/droppable.js +2 -2
- package/lib/components/header/header_section/header_section_item_button.js +94 -0
- package/lib/components/highlight/highlight.js +2 -2
- package/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/lib/components/inner_text/index.js +1 -8
- package/lib/components/markdown_editor/markdown_actions.js +1 -1
- package/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/lib/components/modal/confirm_modal.js +10 -28
- package/lib/components/outside_click_detector/outside_click_detector.js +10 -11
- package/lib/components/page/page_template.js +8 -8
- package/lib/components/popover/wrapping_popover.js +1 -9
- package/lib/components/portal/portal.js +34 -24
- package/lib/components/tabs/tabs.js +25 -0
- package/lib/components/timeline/timeline_item_icon.js +6 -3
- package/lib/components/tour/tour_step.js +15 -11
- package/lib/services/color/eui_palettes.js +9 -2
- package/lib/services/color/index.js +7 -0
- package/lib/services/index.js +7 -0
- package/lib/services/time/timer.js +3 -5
- package/lib/test/rtl/component_helpers.js +1 -1
- package/lib/test/rtl/index.js +13 -1
- package/lib/test/rtl/render_hook.js +29 -0
- package/optimize/es/components/datagrid/body/data_grid_cell.js +10 -9
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +31 -26
- package/optimize/es/components/datagrid/controls/display_selector.js +1 -1
- package/optimize/es/components/datagrid/utils/in_memory.js +2 -2
- package/optimize/es/components/datagrid/utils/row_heights.js +4 -4
- package/optimize/es/components/date_picker/date_picker.js +1 -1
- package/optimize/es/components/drag_and_drop/drag_drop_context.js +1 -1
- package/optimize/es/components/drag_and_drop/draggable.js +2 -2
- package/optimize/es/components/drag_and_drop/droppable.js +1 -1
- package/optimize/es/components/drag_and_drop/index.js +3 -2
- package/optimize/es/components/highlight/highlight.js +2 -2
- package/optimize/es/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/es/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/es/components/inner_text/index.js +1 -2
- package/optimize/es/components/markdown_editor/markdown_actions.js +1 -1
- package/optimize/es/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/optimize/es/components/modal/confirm_modal.js +11 -24
- package/optimize/es/components/outside_click_detector/outside_click_detector.js +10 -11
- package/optimize/es/components/popover/wrapping_popover.js +1 -9
- package/optimize/es/components/portal/portal.js +34 -25
- package/optimize/es/components/timeline/timeline_item_icon.js +3 -3
- package/optimize/es/components/tour/tour_step.js +16 -12
- package/optimize/es/services/color/eui_palettes.js +7 -1
- package/optimize/es/services/color/index.js +1 -1
- package/optimize/es/services/index.js +1 -1
- package/optimize/es/services/time/timer.js +3 -5
- package/optimize/es/test/rtl/component_helpers.js +1 -1
- package/optimize/es/test/rtl/index.js +2 -1
- package/optimize/es/test/rtl/render_hook.js +23 -0
- package/optimize/lib/components/datagrid/body/data_grid_cell.js +10 -9
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +36 -28
- package/optimize/lib/components/datagrid/controls/display_selector.js +1 -1
- package/optimize/lib/components/datagrid/utils/in_memory.js +2 -2
- package/optimize/lib/components/datagrid/utils/row_heights.js +4 -4
- package/optimize/lib/components/date_picker/date_picker.js +1 -1
- package/optimize/lib/components/drag_and_drop/drag_drop_context.js +2 -2
- package/optimize/lib/components/drag_and_drop/draggable.js +3 -3
- package/optimize/lib/components/drag_and_drop/droppable.js +2 -2
- package/optimize/lib/components/highlight/highlight.js +2 -2
- package/optimize/lib/components/inline_edit/inline_edit_text.js +2 -3
- package/optimize/lib/components/inline_edit/inline_edit_title.js +2 -3
- package/optimize/lib/components/inner_text/index.js +1 -8
- package/optimize/lib/components/markdown_editor/markdown_actions.js +1 -1
- package/optimize/lib/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/optimize/lib/components/modal/confirm_modal.js +10 -23
- package/optimize/lib/components/outside_click_detector/outside_click_detector.js +10 -11
- package/optimize/lib/components/popover/wrapping_popover.js +1 -9
- package/optimize/lib/components/portal/portal.js +34 -25
- package/optimize/lib/components/timeline/timeline_item_icon.js +6 -4
- package/optimize/lib/components/tour/tour_step.js +15 -11
- package/optimize/lib/services/color/eui_palettes.js +9 -2
- package/optimize/lib/services/color/index.js +7 -0
- package/optimize/lib/services/index.js +7 -0
- package/optimize/lib/services/time/timer.js +3 -5
- package/optimize/lib/test/rtl/component_helpers.js +1 -1
- package/optimize/lib/test/rtl/index.js +13 -1
- package/optimize/lib/test/rtl/render_hook.js +29 -0
- package/package.json +23 -16
- package/test-env/components/combo_box/combo_box_options_list/combo_box_title.js +1 -3
- package/test-env/components/datagrid/body/data_grid_body.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_custom.js +7 -7
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +7 -7
- package/test-env/components/datagrid/body/data_grid_cell.js +14 -13
- package/test-env/components/datagrid/body/header/data_grid_control_header_cell.js +2 -2
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +1 -1
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +5 -5
- package/test-env/components/datagrid/controls/data_grid_toolbar.js +36 -28
- package/test-env/components/datagrid/controls/display_selector.js +1 -1
- package/test-env/components/datagrid/data_grid.js +7 -7
- package/test-env/components/datagrid/utils/in_memory.js +4 -4
- package/test-env/components/datagrid/utils/row_heights.js +4 -4
- package/test-env/components/date_picker/date_picker.js +1 -1
- package/test-env/components/drag_and_drop/drag_drop_context.js +2 -2
- package/test-env/components/drag_and_drop/draggable.js +3 -3
- package/test-env/components/drag_and_drop/droppable.js +2 -2
- package/test-env/components/header/header_section/header_section_item_button.js +94 -0
- package/test-env/components/highlight/highlight.js +2 -2
- package/test-env/components/inline_edit/inline_edit_text.js +2 -3
- package/test-env/components/inline_edit/inline_edit_title.js +2 -3
- package/test-env/components/inner_text/index.js +1 -8
- package/test-env/components/markdown_editor/markdown_actions.js +1 -1
- package/test-env/components/markdown_editor/markdown_editor_text_area.js +10 -4
- package/test-env/components/modal/confirm_modal.js +10 -23
- package/test-env/components/outside_click_detector/outside_click_detector.js +10 -11
- package/test-env/components/page/page_template.js +8 -8
- package/test-env/components/popover/wrapping_popover.js +1 -9
- package/test-env/components/portal/portal.js +34 -25
- package/test-env/components/tabs/tabs.js +25 -0
- package/test-env/components/timeline/timeline_item_icon.js +6 -3
- package/test-env/components/tour/tour_step.js +15 -11
- package/test-env/services/color/eui_palettes.js +9 -2
- package/test-env/services/color/index.js +7 -0
- package/test-env/services/index.js +7 -0
- package/test-env/services/time/timer.js +3 -5
- package/test-env/test/rtl/component_helpers.js +1 -1
- package/test-env/test/rtl/index.js +13 -1
- package/test-env/test/rtl/render_hook.js +29 -0
- package/es/components/inner_text/render_to_text.js +0 -47
- package/lib/components/inner_text/render_to_text.js +0 -54
- package/optimize/es/components/inner_text/render_to_text.js +0 -42
- package/optimize/lib/components/inner_text/render_to_text.js +0 -52
- package/test-env/components/inner_text/render_to_text.js +0 -52
|
@@ -11,6 +11,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import React, { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
14
|
+
import PropTypes from "prop-types";
|
|
14
15
|
import classNames from 'classnames';
|
|
15
16
|
import { EuiNotificationBadge } from '../../badge/notification_badge/badge_notification';
|
|
16
17
|
import { EuiIcon } from '../../icon';
|
|
@@ -166,4 +167,97 @@ ref) {
|
|
|
166
167
|
className: animationClasses
|
|
167
168
|
}, children), buttonNotification);
|
|
168
169
|
});
|
|
170
|
+
EuiHeaderSectionItemButton.propTypes = {
|
|
171
|
+
href: PropTypes.string,
|
|
172
|
+
onClick: PropTypes.func,
|
|
173
|
+
/**
|
|
174
|
+
* Any of the named color palette options.
|
|
175
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
176
|
+
*/
|
|
177
|
+
/**
|
|
178
|
+
* Any of the named color palette options.
|
|
179
|
+
* **`'ghost'` is set for deprecation. Use EuiThemeProvide.colorMode = 'dark' instead.**
|
|
180
|
+
*/
|
|
181
|
+
color: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf(["ghost"])]),
|
|
182
|
+
size: PropTypes.any,
|
|
183
|
+
/**
|
|
184
|
+
* Ensure the text of the button sits flush to the left, right, or both sides of its container
|
|
185
|
+
*/
|
|
186
|
+
/**
|
|
187
|
+
* Ensure the text of the button sits flush to the left, right, or both sides of its container
|
|
188
|
+
*/
|
|
189
|
+
flush: PropTypes.any,
|
|
190
|
+
/**
|
|
191
|
+
* `disabled` is also allowed
|
|
192
|
+
*/
|
|
193
|
+
/**
|
|
194
|
+
* `disabled` is also allowed
|
|
195
|
+
*/
|
|
196
|
+
isDisabled: PropTypes.bool,
|
|
197
|
+
/**
|
|
198
|
+
* Force disables the button and changes the icon to a loading spinner
|
|
199
|
+
*/
|
|
200
|
+
/**
|
|
201
|
+
* Force disables the button and changes the icon to a loading spinner
|
|
202
|
+
*/
|
|
203
|
+
isLoading: PropTypes.bool,
|
|
204
|
+
/**
|
|
205
|
+
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
206
|
+
* *Only use when the readable text does not change between states.*
|
|
207
|
+
*/
|
|
208
|
+
/**
|
|
209
|
+
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
210
|
+
* *Only use when the readable text does not change between states.*
|
|
211
|
+
*/
|
|
212
|
+
isSelected: PropTypes.bool,
|
|
213
|
+
target: PropTypes.string,
|
|
214
|
+
rel: PropTypes.string,
|
|
215
|
+
type: PropTypes.oneOf(["button", "submit"]),
|
|
216
|
+
buttonRef: PropTypes.any,
|
|
217
|
+
/**
|
|
218
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
219
|
+
*/
|
|
220
|
+
/**
|
|
221
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
222
|
+
*/
|
|
223
|
+
contentProps: PropTypes.shape({
|
|
224
|
+
className: PropTypes.string,
|
|
225
|
+
"aria-label": PropTypes.string,
|
|
226
|
+
"data-test-subj": PropTypes.string,
|
|
227
|
+
css: PropTypes.any
|
|
228
|
+
}),
|
|
229
|
+
/**
|
|
230
|
+
* Any `type` accepted by EuiIcon
|
|
231
|
+
*/
|
|
232
|
+
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", "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", "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", "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", "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.string.isRequired, PropTypes.elementType.isRequired]),
|
|
233
|
+
/**
|
|
234
|
+
* Can only be one side `left` or `right`
|
|
235
|
+
*/
|
|
236
|
+
iconSide: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf([undefined])]),
|
|
237
|
+
/**
|
|
238
|
+
* Object of props passed to the <span/> wrapping the content's text/children only (not icon)
|
|
239
|
+
*/
|
|
240
|
+
textProps: PropTypes.shape({
|
|
241
|
+
className: PropTypes.string,
|
|
242
|
+
"aria-label": PropTypes.string,
|
|
243
|
+
"data-test-subj": PropTypes.string,
|
|
244
|
+
css: PropTypes.any,
|
|
245
|
+
ref: PropTypes.any,
|
|
246
|
+
"data-text": PropTypes.string
|
|
247
|
+
}),
|
|
248
|
+
iconSize: PropTypes.any,
|
|
249
|
+
className: PropTypes.string,
|
|
250
|
+
"aria-label": PropTypes.string,
|
|
251
|
+
"data-test-subj": PropTypes.string,
|
|
252
|
+
css: PropTypes.any,
|
|
253
|
+
/**
|
|
254
|
+
* Inserts the node into a EuiBadgeNotification and places it appropriately against the button.
|
|
255
|
+
* Or pass `true` to render a simple dot
|
|
256
|
+
*/
|
|
257
|
+
notification: PropTypes.oneOfType([PropTypes.node.isRequired, PropTypes.bool.isRequired]),
|
|
258
|
+
/**
|
|
259
|
+
* Changes the color of the notification background
|
|
260
|
+
*/
|
|
261
|
+
notificationColor: PropTypes.any
|
|
262
|
+
};
|
|
169
263
|
EuiHeaderSectionItemButton.displayName = 'EuiHeaderSectionItemButton';
|
|
@@ -46,9 +46,9 @@ var highlight = function highlight(searchSubject, searchValue, isStrict, highlig
|
|
|
46
46
|
var preMatch = searchSubject.substring(0, indexOfMatch);
|
|
47
47
|
var match = searchSubject.substring(indexOfMatch, indexOfMatch + searchValue.length);
|
|
48
48
|
var postMatch = searchSubject.substring(indexOfMatch + searchValue.length);
|
|
49
|
-
return ___EmotionJSX(Fragment, null, preMatch, ___EmotionJSX(EuiMark, {
|
|
49
|
+
return ___EmotionJSX(Fragment, null, preMatch || undefined, ___EmotionJSX(EuiMark, {
|
|
50
50
|
hasScreenReaderHelpText: hasScreenReaderHelpText
|
|
51
|
-
}, match), postMatch);
|
|
51
|
+
}, match), postMatch || undefined);
|
|
52
52
|
};
|
|
53
53
|
var getHightlightWords = function getHightlightWords(searchSubject, searchValue, isStrict) {
|
|
54
54
|
var regex = new RegExp(searchValue, isStrict ? 'g' : 'gi');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
var _excluded = ["
|
|
2
|
+
var _excluded = ["className", "size", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -25,8 +25,7 @@ import { useEuiTheme } from '../../services';
|
|
|
25
25
|
import { euiInlineEditTextStyles } from './inline_edit_text.styles';
|
|
26
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
27
27
|
export var EuiInlineEditText = function EuiInlineEditText(_ref) {
|
|
28
|
-
var
|
|
29
|
-
className = _ref.className,
|
|
28
|
+
var className = _ref.className,
|
|
30
29
|
_ref$size = _ref.size,
|
|
31
30
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
32
31
|
defaultValue = _ref.defaultValue,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
var _excluded = ["
|
|
2
|
+
var _excluded = ["className", "size", "heading", "defaultValue", "placeholder", "inputAriaLabel", "startWithEditOpen", "readModeProps", "editModeProps", "isLoading", "isInvalid", "isReadOnly"];
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
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; }
|
|
@@ -26,8 +26,7 @@ import { euiInlineEditTitleStyles } from './inline_edit_title.styles';
|
|
|
26
26
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
27
27
|
export var HEADINGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span'];
|
|
28
28
|
export var EuiInlineEditTitle = function EuiInlineEditTitle(_ref) {
|
|
29
|
-
var
|
|
30
|
-
className = _ref.className,
|
|
29
|
+
var className = _ref.className,
|
|
31
30
|
_ref$size = _ref.size,
|
|
32
31
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
33
32
|
heading = _ref.heading,
|
|
@@ -52,8 +52,8 @@ import { isPluginWithImmediateFormatting } from './markdown_types';
|
|
|
52
52
|
var MarkdownActions = /*#__PURE__*/function () {
|
|
53
53
|
function MarkdownActions(editorID, uiPlugins) {
|
|
54
54
|
_classCallCheck(this, MarkdownActions);
|
|
55
|
-
this.editorID = editorID;
|
|
56
55
|
_defineProperty(this, "styles", void 0);
|
|
56
|
+
this.editorID = editorID;
|
|
57
57
|
/**
|
|
58
58
|
* This object is in the format:
|
|
59
59
|
* [nameOfAction]: {[styles to apply]}
|
|
@@ -31,13 +31,19 @@ export var EuiMarkdownEditorTextArea = /*#__PURE__*/forwardRef(function (_ref, r
|
|
|
31
31
|
var classes = classNames('euiMarkdownEditorTextArea', {
|
|
32
32
|
'euiMarkdownEditorTextArea-isReadOnly': readOnly
|
|
33
33
|
});
|
|
34
|
+
|
|
35
|
+
// Ignore invalid empty string style values
|
|
36
|
+
var style = {};
|
|
37
|
+
if (height !== '') {
|
|
38
|
+
style.height = height;
|
|
39
|
+
}
|
|
40
|
+
if (maxHeight !== '') {
|
|
41
|
+
style.maxHeight = maxHeight;
|
|
42
|
+
}
|
|
34
43
|
return ___EmotionJSX("textarea", _extends({
|
|
35
44
|
ref: ref,
|
|
36
45
|
"data-test-subj": "euiMarkdownEditorTextArea",
|
|
37
|
-
style:
|
|
38
|
-
height: height,
|
|
39
|
-
maxHeight: maxHeight
|
|
40
|
-
},
|
|
46
|
+
style: style,
|
|
41
47
|
className: classes
|
|
42
48
|
}, rest, {
|
|
43
49
|
rows: 6,
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
var _excluded = ["children", "title", "titleProps", "onCancel", "onConfirm", "cancelButtonText", "confirmButtonText", "confirmButtonDisabled", "className", "buttonColor", "defaultFocusedButton", "isLoading"];
|
|
2
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
-
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."); }
|
|
5
|
-
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); }
|
|
6
|
-
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; }
|
|
7
|
-
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; } }
|
|
8
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
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; }
|
|
10
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; }
|
|
11
5
|
/*
|
|
@@ -16,7 +10,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
10
|
* Side Public License, v 1.
|
|
17
11
|
*/
|
|
18
12
|
|
|
19
|
-
import React, { useEffect,
|
|
13
|
+
import React, { useEffect, useRef } from 'react';
|
|
20
14
|
import PropTypes from "prop-types";
|
|
21
15
|
import classnames from 'classnames';
|
|
22
16
|
import { EuiModal } from './modal';
|
|
@@ -46,33 +40,21 @@ export var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
46
40
|
defaultFocusedButton = _ref.defaultFocusedButton,
|
|
47
41
|
isLoading = _ref.isLoading,
|
|
48
42
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
cancelButton = _useState2[0],
|
|
52
|
-
setCancelButton = _useState2[1];
|
|
53
|
-
var _useState3 = useState(null),
|
|
54
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
55
|
-
confirmButton = _useState4[0],
|
|
56
|
-
setConfirmButton = _useState4[1];
|
|
43
|
+
var cancelButtonRef = useRef(null);
|
|
44
|
+
var confirmButtonRef = useRef(null);
|
|
57
45
|
useEffect(function () {
|
|
58
46
|
// We have to do this instead of using `autoFocus` because React's polyfill for auto-focusing
|
|
59
47
|
// elements conflicts with the focus-trap logic we have on EuiModal.
|
|
60
48
|
// Wait a beat for the focus-trap to complete, and then set focus to the right button. Check that
|
|
61
49
|
// the buttons exist first, because it's possible the modal has been closed already.
|
|
62
|
-
|
|
63
|
-
if (defaultFocusedButton === CANCEL_BUTTON &&
|
|
64
|
-
|
|
65
|
-
} else if (defaultFocusedButton === CONFIRM_BUTTON &&
|
|
66
|
-
|
|
50
|
+
setTimeout(function () {
|
|
51
|
+
if (defaultFocusedButton === CANCEL_BUTTON && cancelButtonRef.current) {
|
|
52
|
+
cancelButtonRef.current.focus();
|
|
53
|
+
} else if (defaultFocusedButton === CONFIRM_BUTTON && confirmButtonRef.current) {
|
|
54
|
+
confirmButtonRef.current.focus();
|
|
67
55
|
}
|
|
68
56
|
});
|
|
69
|
-
});
|
|
70
|
-
var confirmRef = function confirmRef(node) {
|
|
71
|
-
return setConfirmButton(node);
|
|
72
|
-
};
|
|
73
|
-
var cancelRef = function cancelRef(node) {
|
|
74
|
-
return setCancelButton(node);
|
|
75
|
-
};
|
|
57
|
+
}, [defaultFocusedButton, cancelButtonRef, confirmButtonRef]);
|
|
76
58
|
var classes = classnames('euiModal--confirmation', className);
|
|
77
59
|
var euiTheme = useEuiTheme();
|
|
78
60
|
var styles = euiModalStyles(euiTheme);
|
|
@@ -98,13 +80,13 @@ export var EuiConfirmModal = function EuiConfirmModal(_ref) {
|
|
|
98
80
|
}, message)), ___EmotionJSX(EuiModalFooter, null, ___EmotionJSX(EuiButtonEmpty, {
|
|
99
81
|
"data-test-subj": "confirmModalCancelButton",
|
|
100
82
|
onClick: onCancel,
|
|
101
|
-
buttonRef:
|
|
83
|
+
buttonRef: cancelButtonRef
|
|
102
84
|
}, cancelButtonText), ___EmotionJSX(EuiButton, {
|
|
103
85
|
"data-test-subj": "confirmModalConfirmButton",
|
|
104
86
|
onClick: onConfirm,
|
|
105
87
|
isLoading: isLoading,
|
|
106
88
|
fill: true,
|
|
107
|
-
buttonRef:
|
|
89
|
+
buttonRef: confirmButtonRef,
|
|
108
90
|
color: buttonColor,
|
|
109
91
|
isDisabled: confirmButtonDisabled
|
|
110
92
|
}, confirmButtonText)));
|
|
@@ -28,17 +28,6 @@ import { htmlIdGenerator } from '../../services/accessibility';
|
|
|
28
28
|
export var EuiOutsideClickDetector = /*#__PURE__*/function (_Component) {
|
|
29
29
|
_inherits(EuiOutsideClickDetector, _Component);
|
|
30
30
|
var _super = _createSuper(EuiOutsideClickDetector);
|
|
31
|
-
// We are working with the assumption that a click event is
|
|
32
|
-
// equivalent to a sequential, compound press and release of
|
|
33
|
-
// the pointing device (mouse, finger, stylus, etc.).
|
|
34
|
-
// A click event's target can be imprecise, as the value will be
|
|
35
|
-
// the closest common ancestor of the press (mousedown, touchstart)
|
|
36
|
-
// and release (mouseup, touchend) events (often <body />) if
|
|
37
|
-
// the the target of each event differs.
|
|
38
|
-
// We need the actual event targets to make the correct decisions
|
|
39
|
-
// about user intention. So, consider the down/start and up/end
|
|
40
|
-
// items below as the deconstruction of a click event.
|
|
41
|
-
|
|
42
31
|
function EuiOutsideClickDetector(props) {
|
|
43
32
|
var _this;
|
|
44
33
|
_classCallCheck(this, EuiOutsideClickDetector);
|
|
@@ -60,6 +49,16 @@ export var EuiOutsideClickDetector = /*#__PURE__*/function (_Component) {
|
|
|
60
49
|
// virtual DOM and executes EuiClickDetector's onClick handler,
|
|
61
50
|
// stamping the id even though the event originates outside
|
|
62
51
|
// this component's reified DOM tree.
|
|
52
|
+
// We are working with the assumption that a click event is
|
|
53
|
+
// equivalent to a sequential, compound press and release of
|
|
54
|
+
// the pointing device (mouse, finger, stylus, etc.).
|
|
55
|
+
// A click event's target can be imprecise, as the value will be
|
|
56
|
+
// the closest common ancestor of the press (mousedown, touchstart)
|
|
57
|
+
// and release (mouseup, touchend) events (often <body />) if
|
|
58
|
+
// the the target of each event differs.
|
|
59
|
+
// We need the actual event targets to make the correct decisions
|
|
60
|
+
// about user intention. So, consider the down/start and up/end
|
|
61
|
+
// items below as the deconstruction of a click event.
|
|
63
62
|
_defineProperty(_assertThisInitialized(_this), "id", void 0);
|
|
64
63
|
_defineProperty(_assertThisInitialized(_this), "capturedDownIds", void 0);
|
|
65
64
|
_defineProperty(_assertThisInitialized(_this), "onClickOutside", function (e) {
|
|
@@ -394,20 +394,20 @@ EuiPageTemplate_Deprecated.propTypes = {
|
|
|
394
394
|
*/
|
|
395
395
|
restrictWidth: PropTypes.oneOfType([PropTypes.bool.isRequired, PropTypes.number.isRequired, PropTypes.string.isRequired]),
|
|
396
396
|
/**
|
|
397
|
-
|
|
398
|
-
|
|
397
|
+
* Sets the HTML element for `EuiPageBody`.
|
|
398
|
+
*/
|
|
399
399
|
component: PropTypes.any,
|
|
400
400
|
/**
|
|
401
|
-
|
|
402
|
-
|
|
401
|
+
* Uses an EuiPanel as the main component instead of a plain div
|
|
402
|
+
*/
|
|
403
403
|
panelled: PropTypes.bool,
|
|
404
404
|
/**
|
|
405
|
-
|
|
406
|
-
|
|
405
|
+
* Extends any extra EuiPanel props if `panelled=true`
|
|
406
|
+
*/
|
|
407
407
|
panelProps: PropTypes.any,
|
|
408
408
|
/**
|
|
409
|
-
|
|
410
|
-
|
|
409
|
+
* Adjusts the padding
|
|
410
|
+
*/
|
|
411
411
|
paddingSize: PropTypes.any
|
|
412
412
|
}),
|
|
413
413
|
/**
|
|
@@ -45,23 +45,15 @@ export var EuiWrappingPopover = /*#__PURE__*/function (_Component) {
|
|
|
45
45
|
}
|
|
46
46
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
47
47
|
_defineProperty(_assertThisInitialized(_this), "portal", null);
|
|
48
|
-
_defineProperty(_assertThisInitialized(_this), "anchor", null);
|
|
49
48
|
_defineProperty(_assertThisInitialized(_this), "setPortalRef", function (node) {
|
|
50
49
|
_this.portal = node;
|
|
51
50
|
});
|
|
52
51
|
_defineProperty(_assertThisInitialized(_this), "setAnchorRef", function (node) {
|
|
53
|
-
|
|
52
|
+
node === null || node === void 0 ? void 0 : node.insertAdjacentElement('beforebegin', _this.props.button);
|
|
54
53
|
});
|
|
55
54
|
return _this;
|
|
56
55
|
}
|
|
57
56
|
_createClass(EuiWrappingPopover, [{
|
|
58
|
-
key: "componentDidMount",
|
|
59
|
-
value: function componentDidMount() {
|
|
60
|
-
if (this.anchor) {
|
|
61
|
-
this.anchor.insertAdjacentElement('beforebegin', this.props.button);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}, {
|
|
65
57
|
key: "componentWillUnmount",
|
|
66
58
|
value: function componentWillUnmount() {
|
|
67
59
|
if (this.props.button.parentNode) {
|
|
@@ -42,35 +42,41 @@ export var EuiPortal = /*#__PURE__*/function (_Component) {
|
|
|
42
42
|
var _this;
|
|
43
43
|
_classCallCheck(this, EuiPortal);
|
|
44
44
|
_this = _super.call(this, props);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
var insert = _this.props.insert;
|
|
49
|
-
_this.portalNode = document.createElement('div');
|
|
50
|
-
_this.portalNode.dataset.euiportal = 'true';
|
|
51
|
-
if (insert == null) {
|
|
52
|
-
// no insertion defined, append to body
|
|
53
|
-
document.body.appendChild(_this.portalNode);
|
|
54
|
-
} else {
|
|
55
|
-
// inserting before or after an element
|
|
56
|
-
var sibling = insert.sibling,
|
|
57
|
-
position = insert.position;
|
|
58
|
-
sibling.insertAdjacentElement(insertPositions[position], _this.portalNode);
|
|
59
|
-
}
|
|
45
|
+
_this.state = {
|
|
46
|
+
portalNode: null
|
|
47
|
+
};
|
|
60
48
|
return _this;
|
|
61
49
|
}
|
|
62
50
|
_createClass(EuiPortal, [{
|
|
63
51
|
key: "componentDidMount",
|
|
64
52
|
value: function componentDidMount() {
|
|
65
|
-
this.
|
|
66
|
-
|
|
53
|
+
var insert = this.props.insert;
|
|
54
|
+
var portalNode = document.createElement('div');
|
|
55
|
+
portalNode.dataset.euiportal = 'true';
|
|
56
|
+
if (insert == null) {
|
|
57
|
+
// no insertion defined, append to body
|
|
58
|
+
document.body.appendChild(portalNode);
|
|
59
|
+
} else {
|
|
60
|
+
// inserting before or after an element
|
|
61
|
+
var sibling = insert.sibling,
|
|
62
|
+
position = insert.position;
|
|
63
|
+
sibling.insertAdjacentElement(insertPositions[position], portalNode);
|
|
64
|
+
}
|
|
65
|
+
this.setThemeColor(portalNode);
|
|
66
|
+
this.updatePortalRef(portalNode);
|
|
67
|
+
|
|
68
|
+
// Update state with portalNode to intentionally trigger component rerender
|
|
69
|
+
// and call createPortal with correct root element in render()
|
|
70
|
+
this.setState({
|
|
71
|
+
portalNode: portalNode
|
|
72
|
+
});
|
|
67
73
|
}
|
|
68
74
|
}, {
|
|
69
75
|
key: "componentWillUnmount",
|
|
70
76
|
value: function componentWillUnmount() {
|
|
71
|
-
var
|
|
72
|
-
if (
|
|
73
|
-
|
|
77
|
+
var portalNode = this.state.portalNode;
|
|
78
|
+
if (portalNode !== null && portalNode !== void 0 && portalNode.parentNode) {
|
|
79
|
+
portalNode.parentNode.removeChild(portalNode);
|
|
74
80
|
}
|
|
75
81
|
this.updatePortalRef(null);
|
|
76
82
|
}
|
|
@@ -78,13 +84,13 @@ export var EuiPortal = /*#__PURE__*/function (_Component) {
|
|
|
78
84
|
// Set the inherited color of the portal based on the wrapping EuiThemeProvider
|
|
79
85
|
}, {
|
|
80
86
|
key: "setThemeColor",
|
|
81
|
-
value: function setThemeColor() {
|
|
82
|
-
if (this.
|
|
87
|
+
value: function setThemeColor(portalNode) {
|
|
88
|
+
if (this.context) {
|
|
83
89
|
var _this$context = this.context,
|
|
84
90
|
hasDifferentColorFromGlobalTheme = _this$context.hasDifferentColorFromGlobalTheme,
|
|
85
91
|
colorClassName = _this$context.colorClassName;
|
|
86
92
|
if (hasDifferentColorFromGlobalTheme && this.props.insert == null) {
|
|
87
|
-
|
|
93
|
+
portalNode.classList.add(colorClassName);
|
|
88
94
|
}
|
|
89
95
|
}
|
|
90
96
|
}
|
|
@@ -98,7 +104,11 @@ export var EuiPortal = /*#__PURE__*/function (_Component) {
|
|
|
98
104
|
}, {
|
|
99
105
|
key: "render",
|
|
100
106
|
value: function render() {
|
|
101
|
-
|
|
107
|
+
var portalNode = this.state.portalNode;
|
|
108
|
+
if (!portalNode) {
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
return /*#__PURE__*/createPortal(this.props.children, portalNode);
|
|
102
112
|
}
|
|
103
113
|
}]);
|
|
104
114
|
return EuiPortal;
|
|
@@ -11,6 +11,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import React, { forwardRef } from 'react';
|
|
14
|
+
import PropTypes from "prop-types";
|
|
14
15
|
import classNames from 'classnames';
|
|
15
16
|
import { useEuiTheme } from '../../services';
|
|
16
17
|
import { euiTabsStyles } from './tabs.styles';
|
|
@@ -44,4 +45,28 @@ export var EuiTabs = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
44
45
|
}
|
|
45
46
|
}, children));
|
|
46
47
|
});
|
|
48
|
+
EuiTabs.propTypes = {
|
|
49
|
+
className: PropTypes.string,
|
|
50
|
+
"aria-label": PropTypes.string,
|
|
51
|
+
"data-test-subj": PropTypes.string,
|
|
52
|
+
css: PropTypes.any,
|
|
53
|
+
/**
|
|
54
|
+
* ReactNode to render as this component's content
|
|
55
|
+
*/
|
|
56
|
+
children: PropTypes.node,
|
|
57
|
+
/**
|
|
58
|
+
* Evenly stretches each tab to fill the
|
|
59
|
+
* horizontal space
|
|
60
|
+
*/
|
|
61
|
+
expand: PropTypes.bool,
|
|
62
|
+
/**
|
|
63
|
+
* Adds a bottom border to separate it from the content after
|
|
64
|
+
*/
|
|
65
|
+
bottomBorder: PropTypes.bool,
|
|
66
|
+
/**
|
|
67
|
+
* Sizes affect both font size and overall size.
|
|
68
|
+
* Only use the `xl` size when displayed as page titles.
|
|
69
|
+
*/
|
|
70
|
+
size: PropTypes.any
|
|
71
|
+
};
|
|
47
72
|
EuiTabs.displayName = 'EuiTabs';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React from 'react';
|
|
9
|
+
import React, { isValidElement } from 'react';
|
|
10
10
|
import PropTypes from "prop-types";
|
|
11
11
|
import { EuiAvatar } from '../avatar';
|
|
12
12
|
import { useEuiTheme } from '../../services';
|
|
@@ -22,11 +22,11 @@ export var EuiTimelineItemIcon = function EuiTimelineItemIcon(_ref) {
|
|
|
22
22
|
var cssStyles = [styles.euiTimelineItemIcon, styles[verticalAlign]];
|
|
23
23
|
var cssContentStyles = styles.euiTimelineItemIcon__content;
|
|
24
24
|
var ariaLabel = iconAriaLabel ? iconAriaLabel : '';
|
|
25
|
-
var iconRender =
|
|
25
|
+
var iconRender = /*#__PURE__*/isValidElement(icon) ? icon : ___EmotionJSX(EuiAvatar, {
|
|
26
26
|
color: "subdued",
|
|
27
27
|
name: ariaLabel,
|
|
28
28
|
iconType: icon
|
|
29
|
-
})
|
|
29
|
+
});
|
|
30
30
|
return ___EmotionJSX("div", {
|
|
31
31
|
css: cssStyles
|
|
32
32
|
}, ___EmotionJSX("div", {
|
|
@@ -26,7 +26,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
26
26
|
* Side Public License, v 1.
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
import React, { useEffect,
|
|
29
|
+
import React, { useEffect, useState } from 'react';
|
|
30
30
|
import PropTypes from "prop-types";
|
|
31
31
|
import classNames from 'classnames';
|
|
32
32
|
import { EuiBeacon } from '../beacon';
|
|
@@ -71,12 +71,10 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
71
71
|
if (step === 0) {
|
|
72
72
|
console.warn('EuiTourStep `step` should 1-based indexing. Please update to eliminate 0 indexes.');
|
|
73
73
|
}
|
|
74
|
-
var _useState = useState(
|
|
74
|
+
var _useState = useState(null),
|
|
75
75
|
_useState2 = _slicedToArray(_useState, 2),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var animationFrameId = useRef();
|
|
79
|
-
var anchorNode = useRef(null);
|
|
76
|
+
anchorNode = _useState2[0],
|
|
77
|
+
setAnchorNode = _useState2[1];
|
|
80
78
|
var _useState3 = useState(),
|
|
81
79
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
82
80
|
popoverPosition = _useState4[0],
|
|
@@ -85,14 +83,20 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
85
83
|
setPopoverPosition(position);
|
|
86
84
|
};
|
|
87
85
|
useEffect(function () {
|
|
86
|
+
var timeout;
|
|
88
87
|
if (anchor) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
// Wait until next tick to find anchor node in case it's not already
|
|
89
|
+
// in DOM requestAnimationFrame isn't used here because we don't need to
|
|
90
|
+
// synchronize with repainting ticks and the updated value still
|
|
91
|
+
// needs to go through a react DOM rerender which may take more than
|
|
92
|
+
// 1 frame (16ms) of time.
|
|
93
|
+
// TODO: It would be ideal to have some kind of intersection observer here instead
|
|
94
|
+
timeout = window.setTimeout(function () {
|
|
95
|
+
setAnchorNode(findElementBySelectorOrRef(anchor));
|
|
92
96
|
});
|
|
93
97
|
}
|
|
94
98
|
return function () {
|
|
95
|
-
|
|
99
|
+
timeout && window.clearTimeout(timeout);
|
|
96
100
|
};
|
|
97
101
|
}, [anchor]);
|
|
98
102
|
var classes = classNames('euiTour', className);
|
|
@@ -204,8 +208,8 @@ export var EuiTourStep = function EuiTourStep(_ref) {
|
|
|
204
208
|
button: children
|
|
205
209
|
}, popoverProps), layout);
|
|
206
210
|
}
|
|
207
|
-
return
|
|
208
|
-
button: anchorNode
|
|
211
|
+
return anchorNode ? ___EmotionJSX(EuiWrappingPopover, _extends({
|
|
212
|
+
button: anchorNode
|
|
209
213
|
}, popoverProps), layout) : null;
|
|
210
214
|
};
|
|
211
215
|
EuiTourStep.propTypes = {
|
|
@@ -147,12 +147,18 @@ export var euiPaletteForTemperature = function euiPaletteForTemperature(steps) {
|
|
|
147
147
|
}
|
|
148
148
|
return euiPalette([].concat(_toConsumableArray(cools), _toConsumableArray(warms)), steps, true);
|
|
149
149
|
};
|
|
150
|
-
export var
|
|
150
|
+
export var euiPaletteComplementary = function euiPaletteComplementary(steps) {
|
|
151
151
|
if (steps === 1) {
|
|
152
152
|
return [euiPaletteColorBlind()[1]];
|
|
153
153
|
}
|
|
154
154
|
return euiPalette([euiPaletteColorBlind()[1], euiPaletteColorBlind()[7]], steps, true);
|
|
155
155
|
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The old typo'd name for this palette remains exported until the end of its deprecation period
|
|
159
|
+
* @deprecated Use euiPaletteComplementary instead
|
|
160
|
+
*/
|
|
161
|
+
export var euiPaletteComplimentary = euiPaletteComplementary;
|
|
156
162
|
export var euiPaletteNegative = function euiPaletteNegative(steps) {
|
|
157
163
|
if (steps === 1) {
|
|
158
164
|
return [lightNegativeColor];
|
|
@@ -17,7 +17,7 @@ export { rgbToHsv } from './rgb_to_hsv';
|
|
|
17
17
|
export { calculateContrast, calculateLuminance } from './luminance_and_contrast';
|
|
18
18
|
export { VISUALIZATION_COLORS, DEFAULT_VISUALIZATION_COLOR } from './visualization_colors';
|
|
19
19
|
export { colorPalette } from './color_palette';
|
|
20
|
-
export { euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray } from './eui_palettes';
|
|
20
|
+
export { euiPaletteForLightBackground, euiPaletteForDarkBackground, euiPaletteColorBlind, euiPaletteColorBlindBehindText, euiPaletteForStatus, euiPaletteForTemperature, euiPaletteComplimentary, euiPaletteComplementary, euiPaletteNegative, euiPalettePositive, euiPaletteCool, euiPaletteWarm, euiPaletteGray } from './eui_palettes';
|
|
21
21
|
export { getSteppedGradient } from './stepped_gradient';
|
|
22
22
|
export * from './manipulation';
|
|
23
23
|
export * from './contrast';
|