@elastic/eui 70.2.4 → 70.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_dark.css +0 -198
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -198
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +6 -5
- package/es/components/badge/beta_badge/beta_badge.js +11 -3
- package/es/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/es/components/card/card.js +6 -1
- package/es/components/card/card.styles.js +4 -4
- package/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +109 -0
- package/es/components/flyout/flyout.a11y.js +92 -0
- package/es/components/image/image_fullscreen_wrapper.styles.js +3 -11
- package/es/components/modal/confirm_modal.js +11 -0
- package/es/components/modal/modal.a11y.js +70 -0
- package/es/components/modal/modal.js +17 -27
- package/es/components/modal/modal.styles.js +23 -0
- package/es/components/modal/modal_body.js +8 -0
- package/es/components/modal/modal_body.styles.js +16 -0
- package/es/components/modal/modal_footer.js +6 -0
- package/es/components/modal/modal_footer.styles.js +15 -0
- package/es/components/modal/modal_header.js +6 -0
- package/es/components/modal/modal_header.styles.js +14 -0
- package/es/components/modal/modal_header_title.js +3 -1
- package/es/components/page_template/outer/page_outer.js +1 -1
- package/es/components/page_template/page_template.js +28 -6
- package/es/components/popover/popover.a11y.js +83 -0
- package/es/components/search_bar/query/default_syntax.js +2 -1
- package/es/components/tabs/tabs.a11y.js +97 -0
- package/es/components/tree_view/tree_view.a11y.js +74 -0
- package/es/global_styling/utility/animations.js +5 -2
- package/eui.d.ts +58 -7
- package/i18ntokens.json +2 -2
- package/lib/components/accessibility/skip_link/skip_link.js +6 -5
- package/lib/components/badge/beta_badge/beta_badge.js +13 -4
- package/lib/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/lib/components/card/card.js +6 -1
- package/lib/components/card/card.styles.js +4 -4
- package/lib/components/date_picker/super_date_picker/super_date_picker.a11y.js +111 -0
- package/lib/components/flyout/flyout.a11y.js +94 -0
- package/lib/components/image/image_fullscreen_wrapper.styles.js +9 -10
- package/lib/components/modal/confirm_modal.js +13 -0
- package/lib/components/modal/modal.a11y.js +73 -0
- package/lib/components/modal/modal.js +17 -32
- package/lib/components/modal/modal.styles.js +36 -0
- package/lib/components/modal/modal_body.js +10 -0
- package/lib/components/modal/modal_body.styles.js +27 -0
- package/lib/components/modal/modal_footer.js +8 -0
- package/lib/components/modal/modal_footer.styles.js +26 -0
- package/lib/components/modal/modal_header.js +8 -0
- package/lib/components/modal/modal_header.styles.js +24 -0
- package/lib/components/modal/modal_header_title.js +4 -1
- package/lib/components/page_template/outer/page_outer.js +1 -1
- package/lib/components/page_template/page_template.js +32 -10
- package/lib/components/popover/popover.a11y.js +86 -0
- package/lib/components/search_bar/query/default_syntax.js +2 -1
- package/lib/components/tabs/tabs.a11y.js +98 -0
- package/lib/components/tree_view/tree_view.a11y.js +80 -0
- package/lib/global_styling/utility/animations.js +9 -3
- package/optimize/es/components/accessibility/skip_link/skip_link.js +6 -5
- package/optimize/es/components/badge/beta_badge/beta_badge.js +5 -2
- package/optimize/es/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/optimize/es/components/card/card.styles.js +4 -4
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.a11y.js +98 -0
- package/optimize/es/components/flyout/flyout.a11y.js +77 -0
- package/optimize/es/components/image/image_fullscreen_wrapper.styles.js +3 -11
- package/optimize/es/components/modal/confirm_modal.js +6 -0
- package/optimize/es/components/modal/modal.a11y.js +60 -0
- package/optimize/es/components/modal/modal.js +17 -27
- package/optimize/es/components/modal/modal.styles.js +23 -0
- package/optimize/es/components/modal/modal_body.js +8 -0
- package/optimize/es/components/modal/modal_body.styles.js +16 -0
- package/optimize/es/components/modal/modal_footer.js +6 -0
- package/optimize/es/components/modal/modal_footer.styles.js +15 -0
- package/optimize/es/components/modal/modal_header.js +6 -0
- package/optimize/es/components/modal/modal_header.styles.js +14 -0
- package/optimize/es/components/modal/modal_header_title.js +3 -1
- package/optimize/es/components/page_template/page_template.js +5 -3
- package/optimize/es/components/popover/popover.a11y.js +73 -0
- package/optimize/es/components/search_bar/query/default_syntax.js +2 -1
- package/optimize/es/components/tabs/tabs.a11y.js +97 -0
- package/optimize/es/components/tree_view/tree_view.a11y.js +74 -0
- package/optimize/es/global_styling/utility/animations.js +5 -2
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +6 -5
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +7 -3
- package/optimize/lib/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/optimize/lib/components/card/card.styles.js +4 -4
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.a11y.js +111 -0
- package/optimize/lib/components/flyout/flyout.a11y.js +84 -0
- package/optimize/lib/components/image/image_fullscreen_wrapper.styles.js +9 -12
- package/optimize/lib/components/modal/confirm_modal.js +8 -0
- package/optimize/lib/components/modal/modal.a11y.js +73 -0
- package/optimize/lib/components/modal/modal.js +17 -31
- package/optimize/lib/components/modal/modal.styles.js +36 -0
- package/optimize/lib/components/modal/modal_body.js +10 -0
- package/optimize/lib/components/modal/modal_body.styles.js +27 -0
- package/optimize/lib/components/modal/modal_footer.js +8 -0
- package/optimize/lib/components/modal/modal_footer.styles.js +26 -0
- package/optimize/lib/components/modal/modal_header.js +8 -0
- package/optimize/lib/components/modal/modal_header.styles.js +24 -0
- package/optimize/lib/components/modal/modal_header_title.js +4 -1
- package/optimize/lib/components/page_template/page_template.js +5 -3
- package/optimize/lib/components/popover/popover.a11y.js +86 -0
- package/optimize/lib/components/search_bar/query/default_syntax.js +2 -1
- package/optimize/lib/components/tabs/tabs.a11y.js +98 -0
- package/optimize/lib/components/tree_view/tree_view.a11y.js +80 -0
- package/optimize/lib/global_styling/utility/animations.js +9 -3
- package/package.json +5 -4
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +6 -5
- package/test-env/components/badge/beta_badge/beta_badge.js +13 -4
- package/test-env/components/badge/beta_badge/beta_badge.styles.js +25 -4
- package/test-env/components/card/card.js +6 -1
- package/test-env/components/card/card.styles.js +4 -4
- package/test-env/components/date_picker/super_date_picker/super_date_picker.a11y.js +111 -0
- package/test-env/components/flyout/flyout.a11y.js +84 -0
- package/test-env/components/image/image_fullscreen_wrapper.styles.js +9 -12
- package/test-env/components/modal/confirm_modal.js +13 -0
- package/test-env/components/modal/modal.a11y.js +73 -0
- package/test-env/components/modal/modal.js +17 -31
- package/test-env/components/modal/modal.styles.js +36 -0
- package/test-env/components/modal/modal_body.js +10 -0
- package/test-env/components/modal/modal_body.styles.js +27 -0
- package/test-env/components/modal/modal_footer.js +8 -0
- package/test-env/components/modal/modal_footer.styles.js +26 -0
- package/test-env/components/modal/modal_header.js +8 -0
- package/test-env/components/modal/modal_header.styles.js +24 -0
- package/test-env/components/modal/modal_header_title.js +4 -1
- package/test-env/components/page_template/outer/page_outer.js +1 -1
- package/test-env/components/page_template/page_template.js +32 -10
- package/test-env/components/popover/popover.a11y.js +86 -0
- package/test-env/components/search_bar/query/default_syntax.js +2 -1
- package/test-env/components/tabs/tabs.a11y.js +98 -0
- package/test-env/components/tree_view/tree_view.a11y.js +80 -0
- package/test-env/global_styling/utility/animations.js +9 -3
- package/src/components/modal/_index.scss +0 -1
- package/src/components/modal/_modal.scss +0 -156
- package/src/themes/amsterdam/overrides/_modal.scss +0 -3
|
@@ -16,6 +16,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import PropTypes from "prop-types";
|
|
18
18
|
import classnames from 'classnames';
|
|
19
|
+
import { useEuiTheme } from '../../services';
|
|
20
|
+
import { euiModalFooterStyles } from './modal_footer.styles';
|
|
19
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
22
|
export var EuiModalFooter = function EuiModalFooter(_ref) {
|
|
21
23
|
var className = _ref.className,
|
|
@@ -23,7 +25,11 @@ export var EuiModalFooter = function EuiModalFooter(_ref) {
|
|
|
23
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
26
|
|
|
25
27
|
var classes = classnames('euiModalFooter', className);
|
|
28
|
+
var euiTheme = useEuiTheme();
|
|
29
|
+
var styles = euiModalFooterStyles(euiTheme);
|
|
30
|
+
var cssStyles = [styles.euiModalFooter];
|
|
26
31
|
return ___EmotionJSX("div", _extends({
|
|
32
|
+
css: cssStyles,
|
|
27
33
|
className: classes
|
|
28
34
|
}, rest), children);
|
|
29
35
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
import { euiBreakpoint } from '../../global_styling';
|
|
10
|
+
export var euiModalFooterStyles = function euiModalFooterStyles(euiThemeContext) {
|
|
11
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
12
|
+
return {
|
|
13
|
+
euiModalFooter: /*#__PURE__*/css("display:flex;justify-content:flex-end;padding-block:", euiTheme.size.base, " ", euiTheme.size.l, ";padding-inline:", euiTheme.size.l, ";flex-grow:0;flex-shrink:0;gap:", euiTheme.size.base, ";", euiBreakpoint(euiThemeContext, ['xs', 's']), "{background:", euiTheme.colors.lightestShade, ";padding-block:", euiTheme.size.m, ";padding-inline:", euiTheme.size.l, ";justify-content:stretch;gap:", euiTheme.size.s, ";>*{flex:1;}};label:euiModalFooter;")
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -16,6 +16,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import PropTypes from "prop-types";
|
|
18
18
|
import classnames from 'classnames';
|
|
19
|
+
import { useEuiTheme } from '../../services';
|
|
20
|
+
import { euiModalHeaderStyles } from './modal_header.styles';
|
|
19
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
22
|
export var EuiModalHeader = function EuiModalHeader(_ref) {
|
|
21
23
|
var className = _ref.className,
|
|
@@ -23,7 +25,11 @@ export var EuiModalHeader = function EuiModalHeader(_ref) {
|
|
|
23
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
26
|
|
|
25
27
|
var classes = classnames('euiModalHeader', className);
|
|
28
|
+
var euiTheme = useEuiTheme();
|
|
29
|
+
var styles = euiModalHeaderStyles(euiTheme);
|
|
30
|
+
var cssStyles = [styles.euiModalHeader];
|
|
26
31
|
return ___EmotionJSX("div", _extends({
|
|
32
|
+
css: cssStyles,
|
|
27
33
|
className: classes
|
|
28
34
|
}, rest), children);
|
|
29
35
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
import { css } from '@emotion/react';
|
|
9
|
+
export var euiModalHeaderStyles = function euiModalHeaderStyles(euiThemeContext) {
|
|
10
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
11
|
+
return {
|
|
12
|
+
euiModalHeader: /*#__PURE__*/css("display:flex;justify-content:space-between;align-items:center;padding-inline:", euiTheme.size.l, " ", euiTheme.size.xxl, ";padding-block:", euiTheme.size.l, " ", euiTheme.size.base, ";flex-grow:0;flex-shrink:0;&+.euiModalFooter{padding-block-start:", euiTheme.size.s, ";};label:euiModalHeader;")
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -16,6 +16,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import PropTypes from "prop-types";
|
|
18
18
|
import classnames from 'classnames';
|
|
19
|
+
import { EuiTitle } from '../title';
|
|
19
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
21
|
export var EuiModalHeaderTitle = function EuiModalHeaderTitle(_ref) {
|
|
21
22
|
var className = _ref.className,
|
|
@@ -23,7 +24,8 @@ export var EuiModalHeaderTitle = function EuiModalHeaderTitle(_ref) {
|
|
|
23
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
25
|
|
|
25
26
|
var classes = classnames('euiModalHeader__title', className);
|
|
26
|
-
return ___EmotionJSX(
|
|
27
|
+
return ___EmotionJSX(EuiTitle, _extends({
|
|
28
|
+
size: "m",
|
|
27
29
|
className: classes
|
|
28
30
|
}, rest), /*#__PURE__*/React.isValidElement(children) ? children : ___EmotionJSX("h1", null, children));
|
|
29
31
|
};
|
|
@@ -50,7 +50,7 @@ _EuiPageOuter.propTypes = {
|
|
|
50
50
|
direction: PropTypes.oneOf(["row", "column"]),
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* When direction is `row`, it will flip to `column` when within these breakpoints
|
|
53
|
+
* When direction is `row`, it will flip to `column` when within these breakpoints.
|
|
54
54
|
*/
|
|
55
55
|
responsive: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
56
56
|
className: PropTypes.string,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["children", "restrictWidth", "paddingSize", "grow", "bottomBorder", "offset", "panelled", "contentBorder", "
|
|
1
|
+
var _excluded = ["children", "responsive", "restrictWidth", "paddingSize", "grow", "bottomBorder", "offset", "panelled", "contentBorder", "component", "mainProps", "className", "minHeight"];
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign || 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
|
|
|
@@ -55,6 +55,8 @@ export var TemplateContext = /*#__PURE__*/createContext({
|
|
|
55
55
|
*/
|
|
56
56
|
export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
57
57
|
var children = _ref.children,
|
|
58
|
+
_ref$responsive = _ref.responsive,
|
|
59
|
+
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
58
60
|
_ref$restrictWidth = _ref.restrictWidth,
|
|
59
61
|
restrictWidth = _ref$restrictWidth === void 0 ? true : _ref$restrictWidth,
|
|
60
62
|
_ref$paddingSize = _ref.paddingSize,
|
|
@@ -65,12 +67,11 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
65
67
|
_offset = _ref.offset,
|
|
66
68
|
panelled = _ref.panelled,
|
|
67
69
|
contentBorder = _ref.contentBorder,
|
|
70
|
+
component = _ref.component,
|
|
68
71
|
mainProps = _ref.mainProps,
|
|
69
72
|
className = _ref.className,
|
|
70
73
|
_ref$minHeight = _ref.minHeight,
|
|
71
74
|
minHeight = _ref$minHeight === void 0 ? '460px' : _ref$minHeight,
|
|
72
|
-
_ref$responsive = _ref.responsive,
|
|
73
|
-
responsive = _ref$responsive === void 0 ? ['xs', 's'] : _ref$responsive,
|
|
74
75
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
75
76
|
|
|
76
77
|
var _useEuiTheme = useEuiTheme(),
|
|
@@ -178,6 +179,7 @@ export var _EuiPageTemplate = function _EuiPageTemplate(_ref) {
|
|
|
178
179
|
style: pageStyle,
|
|
179
180
|
className: classes
|
|
180
181
|
}), sidebar, ___EmotionJSX(EuiPageInner, _extends({}, mainProps, {
|
|
182
|
+
component: component,
|
|
181
183
|
id: pageInnerId,
|
|
182
184
|
border: innerBordered(),
|
|
183
185
|
panelled: innerPanelled(),
|
|
@@ -198,7 +200,11 @@ _EuiPageTemplate.propTypes = {
|
|
|
198
200
|
direction: PropTypes.oneOf(["row", "column"]),
|
|
199
201
|
|
|
200
202
|
/**
|
|
201
|
-
|
|
203
|
+
* Decides at which point the main content wrapper will be 100vw.
|
|
204
|
+
*/
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* When direction is `row`, it will flip to `column` when within these breakpoints.
|
|
202
208
|
*/
|
|
203
209
|
responsive: PropTypes.arrayOf(PropTypes.any.isRequired),
|
|
204
210
|
className: PropTypes.string,
|
|
@@ -206,6 +212,16 @@ _EuiPageTemplate.propTypes = {
|
|
|
206
212
|
"data-test-subj": PropTypes.string,
|
|
207
213
|
css: PropTypes.any,
|
|
208
214
|
|
|
215
|
+
/**
|
|
216
|
+
* Adds a white background and shadow to define the area.
|
|
217
|
+
*/
|
|
218
|
+
panelled: PropTypes.bool,
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Adjust the overall padding.
|
|
222
|
+
*/
|
|
223
|
+
paddingSize: PropTypes.any,
|
|
224
|
+
|
|
209
225
|
/**
|
|
210
226
|
* Sets the max-width of the page,
|
|
211
227
|
* set to `true` to use the default size of `1200px`,
|
|
@@ -225,7 +241,7 @@ _EuiPageTemplate.propTypes = {
|
|
|
225
241
|
* Applies a top or left border to the inner contents
|
|
226
242
|
* to add separation between content and sidebar when a sidebar exists.
|
|
227
243
|
*/
|
|
228
|
-
contentBorder: PropTypes.
|
|
244
|
+
contentBorder: PropTypes.any,
|
|
229
245
|
|
|
230
246
|
/**
|
|
231
247
|
* Minimum height in which to enforce scrolling
|
|
@@ -247,7 +263,13 @@ _EuiPageTemplate.propTypes = {
|
|
|
247
263
|
"aria-label": PropTypes.string,
|
|
248
264
|
"data-test-subj": PropTypes.string,
|
|
249
265
|
css: PropTypes.any
|
|
250
|
-
})
|
|
266
|
+
}),
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Sets which HTML element to render for the `main` content wrapper
|
|
270
|
+
* @default main
|
|
271
|
+
*/
|
|
272
|
+
component: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.elementType.isRequired])
|
|
251
273
|
};
|
|
252
274
|
|
|
253
275
|
var _EuiPageSection = function _EuiPageSection(props) {
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
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
|
+
|
|
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
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
15
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
16
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
17
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
18
|
+
* Side Public License, v 1.
|
|
19
|
+
*/
|
|
20
|
+
/// <reference types="../../../cypress/support"/>
|
|
21
|
+
import React, { useState } from 'react';
|
|
22
|
+
import { EuiPopover } from './popover';
|
|
23
|
+
import { EuiButtonEmpty } from '../button';
|
|
24
|
+
import { EuiText } from '../text';
|
|
25
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
|
+
|
|
27
|
+
var Popover = function Popover() {
|
|
28
|
+
var _useState = useState(false),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
isPopoverOpen = _useState2[0],
|
|
31
|
+
setIsPopoverOpen = _useState2[1];
|
|
32
|
+
|
|
33
|
+
var onButtonClick = function onButtonClick() {
|
|
34
|
+
return setIsPopoverOpen(function (isPopoverOpen) {
|
|
35
|
+
return !isPopoverOpen;
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var closePopover = function closePopover() {
|
|
40
|
+
return setIsPopoverOpen(false);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
var button = ___EmotionJSX(EuiButtonEmpty, {
|
|
44
|
+
iconType: "documentation",
|
|
45
|
+
iconSide: "right",
|
|
46
|
+
onClick: onButtonClick
|
|
47
|
+
}, "How it works");
|
|
48
|
+
|
|
49
|
+
var popoverProps = {
|
|
50
|
+
button: button,
|
|
51
|
+
isOpen: isPopoverOpen,
|
|
52
|
+
closePopover: closePopover
|
|
53
|
+
};
|
|
54
|
+
return ___EmotionJSX(EuiPopover, popoverProps, ___EmotionJSX(EuiText, {
|
|
55
|
+
style: {
|
|
56
|
+
width: 300
|
|
57
|
+
}
|
|
58
|
+
}, ___EmotionJSX("p", null, "Popover content that\u2019s wider than the default width")));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
beforeEach(function () {
|
|
62
|
+
cy.mount(___EmotionJSX(Popover, null));
|
|
63
|
+
cy.get('div.euiPopover__panel').should('not.exist');
|
|
64
|
+
});
|
|
65
|
+
describe('EuiPopover', function () {
|
|
66
|
+
describe('Automated accessibility check', function () {
|
|
67
|
+
it('has zero violations on render', function () {
|
|
68
|
+
cy.checkAxe();
|
|
69
|
+
});
|
|
70
|
+
it('has zero violations when popover is opened', function () {
|
|
71
|
+
cy.get('button.euiButtonEmpty').click();
|
|
72
|
+
cy.get('div.euiPopover__panel').should('exist');
|
|
73
|
+
cy.checkAxe();
|
|
74
|
+
});
|
|
75
|
+
it('has zero violations when popover is closed', function () {
|
|
76
|
+
cy.get('button.euiButtonEmpty').click();
|
|
77
|
+
cy.get('div.euiPopover__panel').should('exist');
|
|
78
|
+
cy.get('button.euiButtonEmpty').click();
|
|
79
|
+
cy.get('div.euiPopover__panel').should('not.exist');
|
|
80
|
+
cy.checkAxe();
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
});
|
|
@@ -3511,7 +3511,8 @@ var printValue = function printValue(value, options) {
|
|
|
3511
3511
|
return value.toString();
|
|
3512
3512
|
}
|
|
3513
3513
|
|
|
3514
|
-
if (value.length === 0 || value.match(
|
|
3514
|
+
if (value.length === 0 || value.match(/[^\w\-_*:()"/\\]/) || // Escape spaces and special characters not used as syntax identifiers
|
|
3515
|
+
value.toLowerCase() === 'or') {
|
|
3515
3516
|
return "\"".concat(escapePhraseValue(value), "\"");
|
|
3516
3517
|
}
|
|
3517
3518
|
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
10
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
11
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
12
|
+
* Side Public License, v 1.
|
|
13
|
+
*/
|
|
14
|
+
/// <reference types="../../../cypress/support"/>
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { EuiTabbedContent } from './tabbed_content';
|
|
17
|
+
import { EuiSpacer } from '../spacer';
|
|
18
|
+
import { EuiText } from '../text';
|
|
19
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
20
|
+
var tabs = [{
|
|
21
|
+
id: 'cobalt--id',
|
|
22
|
+
name: 'Cobalt',
|
|
23
|
+
content: ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiSpacer, null), ___EmotionJSX(EuiText, null, ___EmotionJSX("p", null, "Cobalt is a chemical element with symbol Co and atomic number 27. Like nickel, cobalt is found in the Earth\u2019s crust only in chemically combined form, save for small deposits found in alloys of natural meteoric iron. The free element, produced by reductive smelting, is a hard, lustrous, silver-gray metal.")))
|
|
24
|
+
}, {
|
|
25
|
+
id: 'dextrose--id',
|
|
26
|
+
name: 'Dextrose',
|
|
27
|
+
content: ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiSpacer, null), ___EmotionJSX(EuiText, null, ___EmotionJSX("p", null, "Intravenous sugar solution, also known as dextrose solution, is a mixture of dextrose (glucose) and water. It is used to treat low blood sugar or water loss without electrolyte loss.")))
|
|
28
|
+
}, {
|
|
29
|
+
id: 'hydrogen--id',
|
|
30
|
+
name: 'Hydrogen',
|
|
31
|
+
content: ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiSpacer, null), ___EmotionJSX(EuiText, null, ___EmotionJSX("p", null, "Hydrogen is a chemical element with symbol H and atomic number 1. With a standard atomic weight of 1.008, hydrogen is the lightest element on the periodic table")))
|
|
32
|
+
}, {
|
|
33
|
+
id: 'monosodium_glutammate--id',
|
|
34
|
+
name: 'Monosodium Glutamate',
|
|
35
|
+
content: ___EmotionJSX(React.Fragment, null, ___EmotionJSX(EuiSpacer, null), ___EmotionJSX(EuiText, null, ___EmotionJSX("p", null, "Monosodium glutamate (MSG, also known as sodium glutamate) is the sodium salt of glutamic acid, one of the most abundant naturally occurring non-essential amino acids. Monosodium glutamate is found naturally in tomatoes, cheese and other foods.")))
|
|
36
|
+
}];
|
|
37
|
+
var defaultTabProps = {
|
|
38
|
+
tabs: tabs,
|
|
39
|
+
initialSelectedTab: tabs[0],
|
|
40
|
+
autoFocus: 'selected',
|
|
41
|
+
onTabClick: function onTabClick() {}
|
|
42
|
+
};
|
|
43
|
+
describe('EuiTabs', function () {
|
|
44
|
+
describe('Automated accessibility check', function () {
|
|
45
|
+
it('has zero violations with default props', function () {
|
|
46
|
+
cy.mount(___EmotionJSX(EuiTabbedContent, defaultTabProps));
|
|
47
|
+
cy.get('div.euiTabs').should('exist');
|
|
48
|
+
cy.checkAxe();
|
|
49
|
+
});
|
|
50
|
+
it('has zero violations with second tab open on render', function () {
|
|
51
|
+
var secondSelectedTab = _objectSpread(_objectSpread({}, defaultTabProps), {}, {
|
|
52
|
+
initialSelectedTab: tabs[1]
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
cy.mount(___EmotionJSX(EuiTabbedContent, secondSelectedTab));
|
|
56
|
+
cy.get('div.euiTabs').should('exist');
|
|
57
|
+
cy.checkAxe();
|
|
58
|
+
});
|
|
59
|
+
it('has zero violations with third tab open on render', function () {
|
|
60
|
+
var thirdSelectedTab = _objectSpread(_objectSpread({}, defaultTabProps), {}, {
|
|
61
|
+
initialSelectedTab: tabs[2]
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
cy.mount(___EmotionJSX(EuiTabbedContent, thirdSelectedTab));
|
|
65
|
+
cy.get('div.euiTabs').should('exist');
|
|
66
|
+
cy.checkAxe();
|
|
67
|
+
});
|
|
68
|
+
it('has zero violations with last tab open on render', function () {
|
|
69
|
+
var lastSelectedTab = _objectSpread(_objectSpread({}, defaultTabProps), {}, {
|
|
70
|
+
initialSelectedTab: tabs[3]
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
cy.mount(___EmotionJSX(EuiTabbedContent, lastSelectedTab));
|
|
74
|
+
cy.get('div.euiTabs').should('exist');
|
|
75
|
+
cy.checkAxe();
|
|
76
|
+
});
|
|
77
|
+
it('has zero violations with all tabs disabled except first', function () {
|
|
78
|
+
var disabledTabs = tabs.map(function (tab, i) {
|
|
79
|
+
if (i === 0) {
|
|
80
|
+
return tab;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return _objectSpread(_objectSpread({}, tab), {}, {
|
|
84
|
+
disabled: true
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
var disabledTabProps = _objectSpread(_objectSpread({}, defaultTabProps), {}, {
|
|
89
|
+
tabs: disabledTabs
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
cy.mount(___EmotionJSX(EuiTabbedContent, disabledTabProps));
|
|
93
|
+
cy.get('div.euiTabs').should('exist');
|
|
94
|
+
cy.checkAxe();
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
/// <reference types="../../../cypress/support"/>
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { EuiTreeView } from './tree_view';
|
|
11
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
12
|
+
|
|
13
|
+
var TreeView = function TreeView() {
|
|
14
|
+
var items = [{
|
|
15
|
+
label: 'Item One',
|
|
16
|
+
id: 'item_one',
|
|
17
|
+
isExpanded: true,
|
|
18
|
+
children: [{
|
|
19
|
+
label: 'Item A',
|
|
20
|
+
id: 'item_a'
|
|
21
|
+
}, {
|
|
22
|
+
label: 'Item B',
|
|
23
|
+
id: 'item_b',
|
|
24
|
+
children: [{
|
|
25
|
+
label: 'A Cloud',
|
|
26
|
+
id: 'item_cloud'
|
|
27
|
+
}, {
|
|
28
|
+
label: "I'm a Bug",
|
|
29
|
+
id: 'item_bug',
|
|
30
|
+
className: 'classForBug'
|
|
31
|
+
}]
|
|
32
|
+
}, {
|
|
33
|
+
label: 'Item C',
|
|
34
|
+
id: 'item_c',
|
|
35
|
+
children: [{
|
|
36
|
+
label: 'Another Cloud',
|
|
37
|
+
id: 'item_cloud2'
|
|
38
|
+
}, {
|
|
39
|
+
label: 'Another Bug',
|
|
40
|
+
id: 'item_bug2'
|
|
41
|
+
}]
|
|
42
|
+
}]
|
|
43
|
+
}, {
|
|
44
|
+
label: 'Item Two',
|
|
45
|
+
id: 'item_two'
|
|
46
|
+
}];
|
|
47
|
+
var defaultTreeViewProps = {
|
|
48
|
+
items: items,
|
|
49
|
+
'aria-label': 'Sample folder tree'
|
|
50
|
+
};
|
|
51
|
+
return ___EmotionJSX("div", {
|
|
52
|
+
style: {
|
|
53
|
+
width: '20rem'
|
|
54
|
+
}
|
|
55
|
+
}, ___EmotionJSX(EuiTreeView, defaultTreeViewProps));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
describe('EuiTreeView', function () {
|
|
59
|
+
describe('Automated accessibility check', function () {
|
|
60
|
+
it('has zero violations on first render', function () {
|
|
61
|
+
cy.mount(___EmotionJSX(TreeView, null));
|
|
62
|
+
cy.get('div.euiTreeView__wrapper').should('exist');
|
|
63
|
+
cy.checkAxe();
|
|
64
|
+
});
|
|
65
|
+
it('has zero violations with a nested child expanded', function () {
|
|
66
|
+
cy.mount(___EmotionJSX(TreeView, null));
|
|
67
|
+
cy.get('div.euiTreeView__wrapper').should('exist');
|
|
68
|
+
cy.get('button#item_b').realClick();
|
|
69
|
+
cy.get('button#item_b').should('have.attr', 'aria-expanded', 'true');
|
|
70
|
+
cy.get('li.euiTreeView__node').contains('A Cloud').should('exist');
|
|
71
|
+
cy.checkAxe();
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _templateObject;
|
|
1
|
+
var _templateObject, _templateObject2;
|
|
2
2
|
|
|
3
3
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
4
|
|
|
@@ -10,4 +10,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
10
10
|
* Side Public License, v 1.
|
|
11
11
|
*/
|
|
12
12
|
import { keyframes } from '@emotion/react';
|
|
13
|
-
export var euiAnimFadeIn = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n"])));
|
|
13
|
+
export var euiAnimFadeIn = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n"])));
|
|
14
|
+
export var euiAnimSlideInUp = function euiAnimSlideInUp(size) {
|
|
15
|
+
return keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n opacity: 0;\n transform: translateY(", ");\n }\n\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n"])), size);
|
|
16
|
+
};
|
package/eui.d.ts
CHANGED
|
@@ -7567,6 +7567,7 @@ declare module '@elastic/eui/src/global_styling/reset/global_styles' {
|
|
|
7567
7567
|
}
|
|
7568
7568
|
declare module '@elastic/eui/src/global_styling/utility/animations' {
|
|
7569
7569
|
export const euiAnimFadeIn: import("@emotion/serialize").Keyframes;
|
|
7570
|
+
export const euiAnimSlideInUp: (size: string) => import("@emotion/serialize").Keyframes;
|
|
7570
7571
|
|
|
7571
7572
|
}
|
|
7572
7573
|
declare module '@elastic/eui/src/global_styling' {
|
|
@@ -8086,6 +8087,8 @@ declare module '@elastic/eui/src/components/badge/beta_badge/beta_badge.styles'
|
|
|
8086
8087
|
};
|
|
8087
8088
|
};
|
|
8088
8089
|
euiBetaBadge__icon: import("@emotion/utils").SerializedStyles;
|
|
8090
|
+
baseline: import("@emotion/utils").SerializedStyles;
|
|
8091
|
+
middle: import("@emotion/utils").SerializedStyles;
|
|
8089
8092
|
};
|
|
8090
8093
|
export const getBadgeColors: (backgroundColor: string, { euiTheme }: UseEuiTheme) => string;
|
|
8091
8094
|
|
|
@@ -8098,7 +8101,9 @@ declare module '@elastic/eui/src/components/badge/beta_badge/beta_badge' {
|
|
|
8098
8101
|
export const COLORS: readonly ["accent", "subdued", "hollow"];
|
|
8099
8102
|
export type BetaBadgeColor = typeof COLORS[number];
|
|
8100
8103
|
export const SIZES: readonly ["s", "m"];
|
|
8101
|
-
export type BetaBadgeSize = typeof SIZES[number];
|
|
8104
|
+
export type BetaBadgeSize = typeof SIZES[number];
|
|
8105
|
+
export const ALIGNMENTS: readonly ["baseline", "middle"];
|
|
8106
|
+
export type BetaBadgeAlignment = typeof ALIGNMENTS[number]; type WithButtonProps = {
|
|
8102
8107
|
/**
|
|
8103
8108
|
* Will apply an onclick to the badge itself
|
|
8104
8109
|
*/
|
|
@@ -8155,6 +8160,10 @@ declare module '@elastic/eui/src/components/badge/beta_badge/beta_badge' {
|
|
|
8155
8160
|
*/
|
|
8156
8161
|
color?: BetaBadgeColor;
|
|
8157
8162
|
size?: BetaBadgeSize;
|
|
8163
|
+
/**
|
|
8164
|
+
* Sets the `vertical-align` CSS property
|
|
8165
|
+
*/
|
|
8166
|
+
alignment?: BetaBadgeAlignment;
|
|
8158
8167
|
} & ExclusiveUnion<LabelAsNode, LabelAsString>;
|
|
8159
8168
|
export type EuiBetaBadgeProps = CommonProps & ExclusiveUnion<ExclusiveUnion<WithButtonProps, WithAnchorProps>, WithSpanProps> & BadgeProps;
|
|
8160
8169
|
export const EuiBetaBadge: FunctionComponent<EuiBetaBadgeProps>;
|
|
@@ -15487,6 +15496,16 @@ declare module '@elastic/eui/src/components/markdown_editor/markdown_format' {
|
|
|
15487
15496
|
};
|
|
15488
15497
|
export const EuiMarkdownFormat: FunctionComponent<EuiMarkdownFormatProps>;
|
|
15489
15498
|
|
|
15499
|
+
}
|
|
15500
|
+
declare module '@elastic/eui/src/components/modal/modal.styles' {
|
|
15501
|
+
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
15502
|
+
export const euiModalStyles: (euiThemeContext: UseEuiTheme) => {
|
|
15503
|
+
euiModal: import("@emotion/utils").SerializedStyles;
|
|
15504
|
+
defaultMaxWidth: import("@emotion/utils").SerializedStyles;
|
|
15505
|
+
confirmation: import("@emotion/utils").SerializedStyles;
|
|
15506
|
+
euiModal__closeIcon: import("@emotion/utils").SerializedStyles;
|
|
15507
|
+
};
|
|
15508
|
+
|
|
15490
15509
|
}
|
|
15491
15510
|
declare module '@elastic/eui/src/components/modal/modal' {
|
|
15492
15511
|
import React, { FunctionComponent, ReactNode, HTMLAttributes } from 'react';
|
|
@@ -15513,6 +15532,13 @@ declare module '@elastic/eui/src/components/modal/modal' {
|
|
|
15513
15532
|
}
|
|
15514
15533
|
export const EuiModal: FunctionComponent<EuiModalProps>;
|
|
15515
15534
|
|
|
15535
|
+
}
|
|
15536
|
+
declare module '@elastic/eui/src/components/modal/modal_footer.styles' {
|
|
15537
|
+
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
15538
|
+
export const euiModalFooterStyles: (euiThemeContext: UseEuiTheme) => {
|
|
15539
|
+
euiModalFooter: import("@emotion/utils").SerializedStyles;
|
|
15540
|
+
};
|
|
15541
|
+
|
|
15516
15542
|
}
|
|
15517
15543
|
declare module '@elastic/eui/src/components/modal/modal_footer' {
|
|
15518
15544
|
import { FunctionComponent, HTMLAttributes } from 'react';
|
|
@@ -15520,6 +15546,13 @@ declare module '@elastic/eui/src/components/modal/modal_footer' {
|
|
|
15520
15546
|
export type EuiModalFooterProps = FunctionComponent<HTMLAttributes<HTMLDivElement> & CommonProps>;
|
|
15521
15547
|
export const EuiModalFooter: EuiModalFooterProps;
|
|
15522
15548
|
|
|
15549
|
+
}
|
|
15550
|
+
declare module '@elastic/eui/src/components/modal/modal_header.styles' {
|
|
15551
|
+
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
15552
|
+
export const euiModalHeaderStyles: (euiThemeContext: UseEuiTheme) => {
|
|
15553
|
+
euiModalHeader: import("@emotion/utils").SerializedStyles;
|
|
15554
|
+
};
|
|
15555
|
+
|
|
15523
15556
|
}
|
|
15524
15557
|
declare module '@elastic/eui/src/components/modal/modal_header' {
|
|
15525
15558
|
import { FunctionComponent, HTMLAttributes } from 'react';
|
|
@@ -15534,6 +15567,14 @@ declare module '@elastic/eui/src/components/modal/modal_header_title' {
|
|
|
15534
15567
|
export type EuiModalHeaderTitleProps = FunctionComponent<HTMLAttributes<HTMLDivElement> & CommonProps>;
|
|
15535
15568
|
export const EuiModalHeaderTitle: EuiModalHeaderTitleProps;
|
|
15536
15569
|
|
|
15570
|
+
}
|
|
15571
|
+
declare module '@elastic/eui/src/components/modal/modal_body.styles' {
|
|
15572
|
+
import { UseEuiTheme } from '@elastic/eui/src/services';
|
|
15573
|
+
export const euiModalBodyStyles: (euiThemeContext: UseEuiTheme) => {
|
|
15574
|
+
euiModalBody: import("@emotion/utils").SerializedStyles;
|
|
15575
|
+
euiModalBody__overflow: import("@emotion/utils").SerializedStyles;
|
|
15576
|
+
};
|
|
15577
|
+
|
|
15537
15578
|
}
|
|
15538
15579
|
declare module '@elastic/eui/src/components/modal/modal_body' {
|
|
15539
15580
|
import { FunctionComponent, HTMLAttributes } from 'react';
|
|
@@ -15546,7 +15587,7 @@ declare module '@elastic/eui/src/components/modal/confirm_modal' {
|
|
|
15546
15587
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
15547
15588
|
import { EuiModalProps } from '@elastic/eui/src/components/modal/modal';
|
|
15548
15589
|
import { EuiButtonColor } from '@elastic/eui/src/components/button';
|
|
15549
|
-
export interface EuiConfirmModalProps extends Omit<EuiModalProps, 'children' | '
|
|
15590
|
+
export interface EuiConfirmModalProps extends Omit<EuiModalProps, 'children' | 'onClose' | 'title'> {
|
|
15550
15591
|
/**
|
|
15551
15592
|
* ReactNode to render as this component's content
|
|
15552
15593
|
*/
|
|
@@ -15558,6 +15599,10 @@ declare module '@elastic/eui/src/components/modal/confirm_modal' {
|
|
|
15558
15599
|
onConfirm?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
15559
15600
|
confirmButtonDisabled?: boolean;
|
|
15560
15601
|
className?: string;
|
|
15602
|
+
/**
|
|
15603
|
+
* Allows focusing either the confirm or cancel button on modal initialization.
|
|
15604
|
+
* Will take precedence over `initialFocus`, if `initialFocus` is passed.
|
|
15605
|
+
*/
|
|
15561
15606
|
defaultFocusedButton?: typeof CONFIRM_BUTTON | typeof CANCEL_BUTTON;
|
|
15562
15607
|
buttonColor?: EuiButtonColor;
|
|
15563
15608
|
/**
|
|
@@ -16506,7 +16551,7 @@ declare module '@elastic/eui/src/components/page_template/outer/page_outer' {
|
|
|
16506
16551
|
*/
|
|
16507
16552
|
direction?: 'row' | 'column';
|
|
16508
16553
|
/**
|
|
16509
|
-
* When direction is `row`, it will flip to `column` when within these breakpoints
|
|
16554
|
+
* When direction is `row`, it will flip to `column` when within these breakpoints.
|
|
16510
16555
|
*/
|
|
16511
16556
|
responsive?: _EuiThemeBreakpoint[];
|
|
16512
16557
|
}
|
|
@@ -16533,7 +16578,8 @@ declare module '@elastic/eui/src/components/page_template/inner/page_inner.style
|
|
|
16533
16578
|
declare module '@elastic/eui/src/components/page_template/inner/page_inner' {
|
|
16534
16579
|
import React, { PropsWithChildren, ComponentType, ComponentProps } from 'react';
|
|
16535
16580
|
import { CommonProps } from '@elastic/eui/src/components/common';
|
|
16536
|
-
import { EuiPaddingSize, _EuiThemeBreakpoint } from '@elastic/eui/src/global_styling';
|
|
16581
|
+
import { EuiPaddingSize, _EuiThemeBreakpoint } from '@elastic/eui/src/global_styling';
|
|
16582
|
+
export type ComponentTypes = keyof JSX.IntrinsicElements | ComponentType;
|
|
16537
16583
|
export type _EuiPageInnerProps<T extends ComponentTypes = 'main'> = CommonProps & ComponentProps<T> & {
|
|
16538
16584
|
/**
|
|
16539
16585
|
* Sets which HTML element to render.
|
|
@@ -16553,12 +16599,11 @@ declare module '@elastic/eui/src/components/page_template/inner/page_inner' {
|
|
|
16553
16599
|
*/
|
|
16554
16600
|
paddingSize?: EuiPaddingSize;
|
|
16555
16601
|
/**
|
|
16556
|
-
* Decides at which point the
|
|
16602
|
+
* Decides at which point the main content wrapper will be 100vw.
|
|
16557
16603
|
*/
|
|
16558
16604
|
responsive?: _EuiThemeBreakpoint[];
|
|
16559
16605
|
};
|
|
16560
16606
|
export const _EuiPageInner: <T extends ComponentTypes>({ children, component: Component, panelled, border, paddingSize, responsive, ...rest }: React.PropsWithChildren<_EuiPageInnerProps<T>>) => JSX.Element;
|
|
16561
|
-
export {};
|
|
16562
16607
|
|
|
16563
16608
|
}
|
|
16564
16609
|
declare module '@elastic/eui/src/components/page_template/inner' {
|
|
@@ -16594,6 +16639,7 @@ declare module '@elastic/eui/src/components/page_template/page_template' {
|
|
|
16594
16639
|
import React, { CSSProperties, FunctionComponent, HTMLAttributes } from 'react';
|
|
16595
16640
|
import { _EuiPageOuterProps } from '@elastic/eui/src/components/page_template/outer';
|
|
16596
16641
|
import { _EuiPageInnerProps } from '@elastic/eui/src/components/page_template/inner';
|
|
16642
|
+
import { ComponentTypes } from '@elastic/eui/src/components/page_template/inner/page_inner';
|
|
16597
16643
|
import { _EuiPageBottomBarProps } from '@elastic/eui/src/components/page_template/bottom_bar/page_bottom_bar';
|
|
16598
16644
|
import { _EuiPageEmptyPromptProps } from '@elastic/eui/src/components/page_template/empty_prompt/page_empty_prompt';
|
|
16599
16645
|
import { EuiPageHeaderProps, EuiPageSectionProps } from '@elastic/eui/src/components/page';
|
|
@@ -16606,7 +16652,7 @@ declare module '@elastic/eui/src/components/page_template/page_template' {
|
|
|
16606
16652
|
emptyPrompt: {};
|
|
16607
16653
|
bottomBar: {};
|
|
16608
16654
|
}>;
|
|
16609
|
-
export type EuiPageTemplateProps = _EuiPageOuterProps & Omit<_EuiPageInnerProps, 'border'> & _EuiPageRestrictWidth & _EuiPageBottomBorder & {
|
|
16655
|
+
export type EuiPageTemplateProps = _EuiPageOuterProps & Omit<_EuiPageInnerProps, 'border' | 'component'> & _EuiPageRestrictWidth & _EuiPageBottomBorder & {
|
|
16610
16656
|
/**
|
|
16611
16657
|
* Applies a top or left border to the inner contents
|
|
16612
16658
|
* to add separation between content and sidebar when a sidebar exists.
|
|
@@ -16626,6 +16672,11 @@ declare module '@elastic/eui/src/components/page_template/page_template' {
|
|
|
16626
16672
|
* Passes through some common HTML attributes to the `main` content wrapper
|
|
16627
16673
|
*/
|
|
16628
16674
|
mainProps?: CommonProps & HTMLAttributes<HTMLElement>;
|
|
16675
|
+
/**
|
|
16676
|
+
* Sets which HTML element to render for the `main` content wrapper
|
|
16677
|
+
* @default main
|
|
16678
|
+
*/
|
|
16679
|
+
component?: ComponentTypes;
|
|
16629
16680
|
};
|
|
16630
16681
|
/**
|
|
16631
16682
|
* Consumed via `EuiPageTemplate`,
|