@elastic/eui 70.0.0 → 70.2.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 +11 -180
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +11 -180
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/screen_reader_only/screen_reader_only.js +1 -1
- package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
- package/es/components/accordion/accordion.a11y.js +35 -0
- package/es/components/badge/beta_badge/beta_badge.js +6 -6
- package/es/components/basic_table/in_memory_table.js +8 -0
- package/es/components/button/button_display/_button_display.js +7 -6
- package/es/components/button/button_display/_button_display.styles.js +4 -4
- package/es/components/button/button_display/_button_display_content.js +6 -9
- package/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/es/components/card/card.js +13 -31
- package/es/components/card/card.styles.js +15 -3
- package/es/components/card/card_select/card_select.styles.js +4 -4
- package/es/components/card/checkable_card/checkable_card.js +3 -2
- package/es/components/context_menu/context_menu_panel.a11y.js +34 -0
- package/es/components/datagrid/controls/column_selector.js +1 -1
- package/es/components/datagrid/controls/column_sorting.js +1 -1
- package/es/components/datagrid/controls/data_grid_toolbar.js +6 -2
- package/es/components/datagrid/controls/index.js +1 -0
- package/es/components/datagrid/controls/keyboard_shortcuts.js +191 -0
- package/es/components/datagrid/data_grid.js +12 -2
- package/es/components/date_picker/super_date_picker/super_date_picker.js +22 -4
- package/es/components/header/header_links/header_links.js +6 -0
- package/es/components/loading/loading_spinner.js +14 -3
- package/es/components/loading/loading_spinner.styles.js +11 -7
- package/es/components/modal/modal.js +17 -2
- package/es/components/page_template/page_template.js +6 -9
- package/es/components/popover/popover.js +13 -3
- package/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/es/components/popover/popover_panel/_popover_panel.js +8 -2
- package/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/es/components/search_bar/search_bar.js +39 -5
- package/es/components/search_bar/search_box.js +37 -4
- package/es/components/selectable/selectable.a11y.js +118 -0
- package/es/components/selectable/selectable.js +9 -6
- package/es/components/tabs/tab.js +31 -7
- package/es/components/tabs/tab.styles.js +63 -0
- package/es/components/tabs/tabbed_content/tabbed_content.js +17 -1
- package/es/components/tabs/tabs.js +20 -14
- package/es/components/tabs/tabs.styles.js +21 -0
- package/es/components/tour/tour_step.js +6 -0
- package/es/services/string/to_initials.js +1 -1
- package/eui.d.ts +305 -198
- package/i18ntokens.json +442 -10
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.js +1 -1
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
- package/lib/components/accordion/accordion.a11y.js +44 -0
- package/lib/components/badge/beta_badge/beta_badge.js +6 -10
- package/lib/components/basic_table/in_memory_table.js +8 -0
- package/lib/components/button/button_display/_button_display.js +7 -6
- package/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/lib/components/button/button_display/_button_display_content.js +6 -9
- package/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/lib/components/card/card.js +14 -33
- package/lib/components/card/card.styles.js +15 -3
- package/lib/components/card/card_select/card_select.styles.js +4 -4
- package/lib/components/card/checkable_card/checkable_card.js +3 -2
- package/lib/components/context_menu/context_menu_panel.a11y.js +42 -0
- package/lib/components/datagrid/controls/column_selector.js +1 -1
- package/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/lib/components/datagrid/controls/data_grid_toolbar.js +7 -2
- package/lib/components/datagrid/controls/index.js +8 -0
- package/lib/components/datagrid/controls/keyboard_shortcuts.js +208 -0
- package/lib/components/datagrid/data_grid.js +11 -1
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +22 -4
- package/lib/components/header/header_links/header_links.js +6 -0
- package/lib/components/loading/loading_spinner.js +13 -2
- package/lib/components/loading/loading_spinner.styles.js +14 -6
- package/lib/components/modal/modal.js +23 -2
- package/lib/components/page_template/page_template.js +6 -9
- package/lib/components/popover/popover.js +13 -3
- package/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/lib/components/popover/popover_panel/_popover_panel.js +8 -2
- package/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/lib/components/search_bar/search_bar.js +40 -5
- package/lib/components/search_bar/search_box.js +38 -4
- package/lib/components/selectable/selectable.a11y.js +122 -0
- package/lib/components/selectable/selectable.js +9 -6
- package/lib/components/tabs/tab.js +31 -6
- package/lib/components/tabs/tab.styles.js +69 -0
- package/lib/components/tabs/tabbed_content/tabbed_content.js +17 -1
- package/lib/components/tabs/tabs.js +24 -14
- package/lib/components/tabs/tabs.styles.js +32 -0
- package/lib/services/string/to_initials.js +1 -1
- package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
- package/optimize/es/components/accordion/accordion.a11y.js +35 -0
- package/optimize/es/components/badge/beta_badge/beta_badge.js +6 -6
- package/optimize/es/components/button/button_display/_button_display.js +6 -5
- package/optimize/es/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/es/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +3 -41
- package/optimize/es/components/card/card.js +12 -30
- package/optimize/es/components/card/card.styles.js +15 -3
- package/optimize/es/components/card/card_select/card_select.styles.js +4 -4
- package/optimize/es/components/card/checkable_card/checkable_card.js +3 -2
- package/optimize/es/components/context_menu/context_menu_panel.a11y.js +34 -0
- package/optimize/es/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/es/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/es/components/datagrid/controls/data_grid_toolbar.js +6 -2
- package/optimize/es/components/datagrid/controls/index.js +1 -0
- package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +181 -0
- package/optimize/es/components/datagrid/data_grid.js +6 -2
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +12 -4
- package/optimize/es/components/loading/loading_spinner.js +13 -3
- package/optimize/es/components/loading/loading_spinner.styles.js +11 -7
- package/optimize/es/components/modal/modal.js +17 -2
- package/optimize/es/components/page_template/page_template.js +6 -9
- package/optimize/es/components/popover/popover.js +7 -3
- package/optimize/es/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/es/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/es/components/popover/popover_panel/_popover_panel.styles.js +15 -1
- package/optimize/es/components/search_bar/search_bar.js +31 -5
- package/optimize/es/components/search_bar/search_box.js +29 -3
- package/optimize/es/components/selectable/selectable.a11y.js +107 -0
- package/optimize/es/components/selectable/selectable.js +9 -6
- package/optimize/es/components/tabs/tab.js +19 -7
- package/optimize/es/components/tabs/tab.styles.js +63 -0
- package/optimize/es/components/tabs/tabs.js +20 -14
- package/optimize/es/components/tabs/tabs.styles.js +21 -0
- package/optimize/es/services/string/to_initials.js +1 -1
- package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
- package/optimize/lib/components/accordion/accordion.a11y.js +44 -0
- package/optimize/lib/components/badge/beta_badge/beta_badge.js +6 -13
- package/optimize/lib/components/button/button_display/_button_display.js +7 -6
- package/optimize/lib/components/button/button_display/_button_display.styles.js +4 -4
- package/optimize/lib/components/button/button_display/_button_display_content.js +6 -9
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +10 -40
- package/optimize/lib/components/card/card.js +13 -32
- package/optimize/lib/components/card/card.styles.js +15 -3
- package/optimize/lib/components/card/card_select/card_select.styles.js +4 -4
- package/optimize/lib/components/card/checkable_card/checkable_card.js +3 -2
- package/optimize/lib/components/context_menu/context_menu_panel.a11y.js +42 -0
- package/optimize/lib/components/datagrid/controls/column_selector.js +1 -1
- package/optimize/lib/components/datagrid/controls/column_sorting.js +1 -1
- package/optimize/lib/components/datagrid/controls/data_grid_toolbar.js +7 -2
- package/optimize/lib/components/datagrid/controls/index.js +8 -0
- package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +207 -0
- package/optimize/lib/components/datagrid/data_grid.js +5 -1
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +12 -4
- package/optimize/lib/components/loading/loading_spinner.js +14 -2
- package/optimize/lib/components/loading/loading_spinner.styles.js +14 -6
- package/optimize/lib/components/modal/modal.js +22 -2
- package/optimize/lib/components/page_template/page_template.js +6 -9
- package/optimize/lib/components/popover/popover.js +7 -3
- package/optimize/lib/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/optimize/lib/components/popover/popover_panel/_popover_panel.js +6 -1
- package/optimize/lib/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/optimize/lib/components/search_bar/search_bar.js +31 -5
- package/optimize/lib/components/search_bar/search_box.js +30 -3
- package/optimize/lib/components/selectable/selectable.a11y.js +122 -0
- package/optimize/lib/components/selectable/selectable.js +9 -6
- package/optimize/lib/components/tabs/tab.js +19 -6
- package/optimize/lib/components/tabs/tab.styles.js +69 -0
- package/optimize/lib/components/tabs/tabs.js +24 -14
- package/optimize/lib/components/tabs/tabs.styles.js +32 -0
- package/optimize/lib/services/string/to_initials.js +1 -1
- package/package.json +5 -4
- package/src/components/datagrid/_index.scss +1 -0
- package/src/components/datagrid/controls/_data_grid_keyboard_shortcuts.scss +17 -0
- package/src/components/datagrid/controls/_data_grid_toolbar.scss +0 -8
- package/src/components/index.scss +0 -1
- package/src/components/modal/_modal.scss +3 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.js +1 -1
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +1 -1
- package/test-env/components/accordion/accordion.a11y.js +44 -0
- package/test-env/components/badge/beta_badge/beta_badge.js +6 -13
- package/test-env/components/basic_table/in_memory_table.js +8 -0
- package/test-env/components/button/button_display/_button_display.js +7 -6
- package/test-env/components/button/button_display/_button_display.styles.js +4 -4
- package/test-env/components/button/button_display/_button_display_content.js +6 -9
- package/test-env/components/button/button_display/_button_display_content.styles.js +10 -40
- package/test-env/components/card/card.js +14 -33
- package/test-env/components/card/card.styles.js +15 -3
- package/test-env/components/card/card_select/card_select.styles.js +4 -4
- package/test-env/components/card/checkable_card/checkable_card.js +3 -2
- package/test-env/components/context_menu/context_menu_panel.a11y.js +42 -0
- package/test-env/components/datagrid/controls/column_selector.js +1 -1
- package/test-env/components/datagrid/controls/column_sorting.js +1 -1
- package/test-env/components/datagrid/controls/data_grid_toolbar.js +7 -2
- package/test-env/components/datagrid/controls/index.js +8 -0
- package/test-env/components/datagrid/controls/keyboard_shortcuts.js +207 -0
- package/test-env/components/datagrid/data_grid.js +11 -1
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +22 -4
- package/test-env/components/header/header_links/header_links.js +6 -0
- package/test-env/components/loading/loading_spinner.js +14 -2
- package/test-env/components/loading/loading_spinner.styles.js +14 -6
- package/test-env/components/modal/modal.js +22 -2
- package/test-env/components/page_template/page_template.js +6 -9
- package/test-env/components/popover/popover.js +13 -3
- package/test-env/components/popover/popover_arrow/_popover_arrow.js +1 -0
- package/test-env/components/popover/popover_panel/_popover_panel.js +8 -2
- package/test-env/components/popover/popover_panel/_popover_panel.styles.js +16 -1
- package/test-env/components/search_bar/search_bar.js +39 -5
- package/test-env/components/search_bar/search_box.js +38 -4
- package/test-env/components/selectable/selectable.a11y.js +122 -0
- package/test-env/components/selectable/selectable.js +9 -6
- package/test-env/components/tabs/tab.js +31 -6
- package/test-env/components/tabs/tab.styles.js +69 -0
- package/test-env/components/tabs/tabbed_content/tabbed_content.js +17 -1
- package/test-env/components/tabs/tabs.js +24 -14
- package/test-env/components/tabs/tabs.styles.js +32 -0
- package/test-env/services/string/to_initials.js +1 -1
- package/src/components/tabs/_index.scss +0 -1
- package/src/components/tabs/_tabs.scss +0 -110
- package/src/themes/amsterdam/overrides/_tabs.scss +0 -80
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.euiDataGrid__keyboardShortcuts {
|
|
2
|
+
display: block;
|
|
3
|
+
max-inline-size: $euiSizeXXL * 10;
|
|
4
|
+
max-block-size: 80vh;
|
|
5
|
+
overflow-y: auto;
|
|
6
|
+
overflow-block: auto;
|
|
7
|
+
|
|
8
|
+
.euiDescriptionList {
|
|
9
|
+
.euiDescriptionList__title {
|
|
10
|
+
width: 25%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.euiDescriptionList__description {
|
|
14
|
+
width: 75%;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -52,14 +52,6 @@
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
.euiDataGrid__controlPopoverWithDragDrop {
|
|
56
|
-
// Hack because the fixed positions of drag and drop don't work inside of transformed elements
|
|
57
|
-
// sass-lint:disable-block no-important
|
|
58
|
-
transform: none !important;
|
|
59
|
-
transition: none !important;
|
|
60
|
-
margin-top: -$euiSizeS;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
55
|
.euiDataGrid__controlScroll {
|
|
64
56
|
@include euiYScrollWithShadows;
|
|
65
57
|
max-height: $euiDataGridPopoverMaxHeight;
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
max-height: 75vh; // We overflow the modal body based off this
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
// TODO: Consider restoring this once https://bugs.chromium.org/p/chromium/issues/detail?id=1229700 is resolved
|
|
10
|
+
// overflow: hidden; Ensure long, non-breaking text doesn't expand beyond the modal bounds
|
|
9
11
|
|
|
10
12
|
position: relative;
|
|
11
13
|
background-color: $euiColorEmptyShade;
|
|
@@ -44,7 +44,7 @@ EuiScreenReaderOnly.propTypes = {
|
|
|
44
44
|
children: _propTypes.default.element.isRequired,
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* For keyboard navigation, force content to display visually upon focus.
|
|
47
|
+
* For keyboard navigation, force content to display visually upon focus/focus-within.
|
|
48
48
|
*/
|
|
49
49
|
showOnFocus: _propTypes.default.bool,
|
|
50
50
|
className: _propTypes.default.string
|
|
@@ -33,7 +33,7 @@ exports.euiScreenReaderOnly = euiScreenReaderOnly;
|
|
|
33
33
|
|
|
34
34
|
var euiScreenReaderOnlyStyles = function euiScreenReaderOnlyStyles(showOnFocus) {
|
|
35
35
|
return {
|
|
36
|
-
euiScreenReaderOnly: showOnFocus ? /*#__PURE__*/(0, _react.css)("&:not(:focus):not(:active){", euiScreenReaderOnly(), ";};label:euiScreenReaderOnly;") : /*#__PURE__*/(0, _react.css)(euiScreenReaderOnly(), ";label:euiScreenReaderOnly;")
|
|
36
|
+
euiScreenReaderOnly: showOnFocus ? /*#__PURE__*/(0, _react.css)("&:not(:focus):not(:active):not(:focus-within){", euiScreenReaderOnly(), ";};label:euiScreenReaderOnly;") : /*#__PURE__*/(0, _react.css)(euiScreenReaderOnly(), ";label:euiScreenReaderOnly;")
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _index = require("./index");
|
|
8
|
+
|
|
9
|
+
var _panel = require("../../components/panel");
|
|
10
|
+
|
|
11
|
+
var _services = require("../../services");
|
|
12
|
+
|
|
13
|
+
var _react2 = require("@emotion/react");
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
17
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
18
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
19
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
20
|
+
* Side Public License, v 1.
|
|
21
|
+
*/
|
|
22
|
+
/// <reference types="../../../cypress/support"/>
|
|
23
|
+
var baseProps = {
|
|
24
|
+
buttonContent: 'Click me to toggle',
|
|
25
|
+
id: (0, _services.htmlIdGenerator)()(),
|
|
26
|
+
initialIsOpen: false
|
|
27
|
+
};
|
|
28
|
+
var noArrow = {
|
|
29
|
+
arrowDisplay: 'none'
|
|
30
|
+
};
|
|
31
|
+
var noArrowProps = Object.assign(baseProps, noArrow);
|
|
32
|
+
describe('EuiAccordion', function () {
|
|
33
|
+
describe('Automated accessibility check', function () {
|
|
34
|
+
it('has zero violations when expanded', function () {
|
|
35
|
+
cy.mount((0, _react2.jsx)(_index.EuiAccordion, noArrowProps, (0, _react2.jsx)(_panel.EuiPanel, {
|
|
36
|
+
color: "subdued"
|
|
37
|
+
}, "Any content inside of ", (0, _react2.jsx)("strong", null, "EuiAccordion"), " will appear here. We will include ", (0, _react2.jsx)("a", {
|
|
38
|
+
href: "#"
|
|
39
|
+
}, "a link"), " to confirm focus.")));
|
|
40
|
+
cy.get('button.euiAccordion__button').click();
|
|
41
|
+
cy.checkAxe();
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -15,7 +13,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
13
|
|
|
16
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
15
|
|
|
18
|
-
var _react =
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
19
17
|
|
|
20
18
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
19
|
|
|
@@ -32,11 +30,6 @@ var _beta_badge = require("./beta_badge.styles");
|
|
|
32
30
|
var _react2 = require("@emotion/react");
|
|
33
31
|
|
|
34
32
|
var _excluded = ["className", "label", "color", "tooltipContent", "tooltipPosition", "anchorProps", "title", "iconType", "onClick", "onClickAriaLabel", "href", "rel", "target", "size"];
|
|
35
|
-
|
|
36
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
|
-
|
|
38
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
|
-
|
|
40
33
|
var COLORS = ['accent', 'subdued', 'hollow'];
|
|
41
34
|
exports.COLORS = COLORS;
|
|
42
35
|
var SIZES = ['s', 'm'];
|
|
@@ -116,7 +109,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
116
109
|
anchorProps: anchorProps
|
|
117
110
|
}, content);
|
|
118
111
|
} else {
|
|
119
|
-
return (0, _react2.jsx)(
|
|
112
|
+
return (0, _react2.jsx)("span", anchorProps, content);
|
|
120
113
|
}
|
|
121
114
|
} else {
|
|
122
115
|
if (tooltipContent) {
|
|
@@ -138,11 +131,11 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
|
|
|
138
131
|
console.warn("Only string titles are permitted on badges that do not use tooltips. Found: ".concat((0, _typeof2.default)(spanTitle)));
|
|
139
132
|
}
|
|
140
133
|
|
|
141
|
-
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
142
|
-
css: cssStyles,
|
|
134
|
+
return (0, _react2.jsx)("span", anchorProps, (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
143
135
|
className: classes,
|
|
144
|
-
title: spanTitle
|
|
145
|
-
|
|
136
|
+
title: spanTitle,
|
|
137
|
+
css: cssStyles
|
|
138
|
+
}, rest), icon || label));
|
|
146
139
|
}
|
|
147
140
|
}
|
|
148
141
|
};
|
|
@@ -1140,6 +1140,14 @@ EuiInMemoryTable.propTypes = {
|
|
|
1140
1140
|
* Date formatter to use when parsing date values
|
|
1141
1141
|
*/
|
|
1142
1142
|
dateFormat: _propTypes.default.any,
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* Hint to render below the search bar
|
|
1146
|
+
*/
|
|
1147
|
+
hint: _propTypes.default.shape({
|
|
1148
|
+
content: _propTypes.default.node.isRequired,
|
|
1149
|
+
popoverProps: _propTypes.default.any
|
|
1150
|
+
}),
|
|
1143
1151
|
className: _propTypes.default.string,
|
|
1144
1152
|
"aria-label": _propTypes.default.string,
|
|
1145
1153
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -10,10 +10,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
10
10
|
exports.EuiButtonDisplay = void 0;
|
|
11
11
|
exports.isButtonDisabled = isButtonDisabled;
|
|
12
12
|
|
|
13
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
-
|
|
15
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
14
|
|
|
15
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
16
|
+
|
|
17
17
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
18
18
|
|
|
19
19
|
var _react = _interopRequireWildcard(require("react"));
|
|
@@ -60,7 +60,8 @@ function isButtonDisabled(_ref) {
|
|
|
60
60
|
var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
61
61
|
var children = _ref2.children,
|
|
62
62
|
iconType = _ref2.iconType,
|
|
63
|
-
iconSide = _ref2.iconSide,
|
|
63
|
+
_ref2$iconSide = _ref2.iconSide,
|
|
64
|
+
iconSide = _ref2$iconSide === void 0 ? 'left' : _ref2$iconSide,
|
|
64
65
|
iconSize = _ref2.iconSize,
|
|
65
66
|
_ref2$size = _ref2.size,
|
|
66
67
|
size = _ref2$size === void 0 ? 'm' : _ref2$size,
|
|
@@ -94,7 +95,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
94
95
|
iconType: iconType,
|
|
95
96
|
iconSide: iconSide,
|
|
96
97
|
iconSize: iconSize,
|
|
97
|
-
textProps:
|
|
98
|
+
textProps: textProps
|
|
98
99
|
}, contentProps), children);
|
|
99
100
|
var element = href && !buttonIsDisabled ? 'a' : 'button';
|
|
100
101
|
var elementProps = {}; // Element-specific attributes
|
|
@@ -122,8 +123,8 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
122
123
|
|
|
123
124
|
return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
|
|
124
125
|
css: cssStyles,
|
|
125
|
-
style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
|
|
126
|
-
|
|
126
|
+
style: minWidth != null ? _objectSpread(_objectSpread({}, style), {}, {
|
|
127
|
+
minInlineSize: minWidth
|
|
127
128
|
}) : style,
|
|
128
129
|
ref: ref
|
|
129
130
|
}, elementProps), relObj), rest), innerNode);
|
|
@@ -24,11 +24,11 @@ var _buttonSize = function _buttonSize(size) {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
27
|
-
name: "
|
|
28
|
-
styles: "
|
|
27
|
+
name: "8595p9-isDisabled",
|
|
28
|
+
styles: "cursor:not-allowed;label:isDisabled;"
|
|
29
29
|
} : {
|
|
30
|
-
name: "
|
|
31
|
-
styles: "
|
|
30
|
+
name: "8595p9-isDisabled",
|
|
31
|
+
styles: "cursor:not-allowed;label:isDisabled;",
|
|
32
32
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -43,13 +43,12 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
43
43
|
iconType = _ref.iconType,
|
|
44
44
|
_ref$iconSize = _ref.iconSize,
|
|
45
45
|
iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
|
|
46
|
-
iconSide = _ref.iconSide,
|
|
46
|
+
_ref$iconSide = _ref.iconSide,
|
|
47
|
+
iconSide = _ref$iconSide === void 0 ? 'left' : _ref$iconSide,
|
|
47
48
|
contentProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
49
|
var theme = (0, _services.useEuiTheme)();
|
|
49
50
|
var styles = (0, _button_display_content.euiButtonDisplayContentStyles)(theme);
|
|
50
|
-
var cssStyles = [styles.euiButtonDisplayContent
|
|
51
|
-
var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
|
|
52
|
-
var cssIconStyles = [styles.euiButtonDisplayContent__icon, iconSize && styles[iconSize]]; // Add an icon to the button if one exists.
|
|
51
|
+
var cssStyles = [styles.euiButtonDisplayContent]; // Add an icon to the button if one exists.
|
|
53
52
|
|
|
54
53
|
var icon; // When the button is disabled the text gets gray
|
|
55
54
|
// and in some buttons the background gets a light gray
|
|
@@ -58,18 +57,16 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
58
57
|
// are always visible. The default spinner color could be very light.
|
|
59
58
|
|
|
60
59
|
var loadingSpinnerColor = isDisabled ? {
|
|
61
|
-
border: '
|
|
60
|
+
border: 'currentcolor'
|
|
62
61
|
} : undefined;
|
|
63
62
|
|
|
64
63
|
if (isLoading) {
|
|
65
64
|
icon = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
66
|
-
css: cssSpinnerStyles,
|
|
67
65
|
size: iconSize,
|
|
68
66
|
color: loadingSpinnerColor
|
|
69
67
|
});
|
|
70
68
|
} else if (iconType) {
|
|
71
69
|
icon = (0, _react2.jsx)(_icon.EuiIcon, {
|
|
72
|
-
css: cssIconStyles,
|
|
73
70
|
type: iconType,
|
|
74
71
|
size: iconSize,
|
|
75
72
|
color: "inherit" // forces the icon to inherit its parent color
|
|
@@ -80,9 +77,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
80
77
|
var isText = typeof children === 'string';
|
|
81
78
|
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
82
79
|
css: cssStyles
|
|
83
|
-
}, contentProps), icon, isText ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
80
|
+
}, contentProps), iconSide === 'left' && icon, isText || textProps ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
84
81
|
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
85
|
-
}), children) : children);
|
|
82
|
+
}), children) : children, iconSide === 'right' && icon);
|
|
86
83
|
};
|
|
87
84
|
|
|
88
85
|
exports.EuiButtonDisplayContent = EuiButtonDisplayContent;
|
|
@@ -9,48 +9,18 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
|
|
10
10
|
var _global_styling = require("../../../global_styling");
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
24
|
-
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
25
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
|
|
26
|
-
} : {
|
|
27
|
-
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
28
|
-
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;",
|
|
29
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
33
|
-
name: "qfl6yj-right",
|
|
34
|
-
styles: "flex-direction:row-reverse;label:right;"
|
|
35
|
-
} : {
|
|
36
|
-
name: "qfl6yj-right",
|
|
37
|
-
styles: "flex-direction:row-reverse;label:right;",
|
|
38
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref4) {
|
|
42
|
-
var euiTheme = _ref4.euiTheme;
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref) {
|
|
20
|
+
var euiTheme = _ref.euiTheme;
|
|
43
21
|
return {
|
|
44
22
|
// Base
|
|
45
|
-
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
|
|
46
|
-
// Icon side
|
|
47
|
-
left: /*#__PURE__*/(0, _react.css)(";label:left;"),
|
|
48
|
-
right: _ref3,
|
|
49
|
-
euiButtonDisplayContent__spinner: _ref2,
|
|
50
|
-
euiButtonDisplayContent__icon: _ref,
|
|
51
|
-
// Icon size
|
|
52
|
-
s: /*#__PURE__*/(0, _react.css)(";label:s;"),
|
|
53
|
-
m: /*#__PURE__*/(0, _react.css)(";label:m;")
|
|
23
|
+
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;")
|
|
54
24
|
};
|
|
55
25
|
};
|
|
56
26
|
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.EuiCard = exports.ALIGNMENTS = void 0;
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
@@ -21,10 +21,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
21
21
|
|
|
22
22
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
23
23
|
|
|
24
|
-
var _common = require("../common");
|
|
25
|
-
|
|
26
24
|
var _services = require("../../services");
|
|
27
25
|
|
|
26
|
+
var _clone_element = require("../../services/theme/clone_element");
|
|
27
|
+
|
|
28
28
|
var _text = require("../text");
|
|
29
29
|
|
|
30
30
|
var _title = require("../title");
|
|
@@ -56,23 +56,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
56
56
|
|
|
57
57
|
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) { (0, _defineProperty2.default)(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; }
|
|
58
58
|
|
|
59
|
-
var
|
|
60
|
-
left: 'euiCard--leftAligned',
|
|
61
|
-
center: 'euiCard--centerAligned',
|
|
62
|
-
right: 'euiCard--rightAligned'
|
|
63
|
-
};
|
|
64
|
-
var ALIGNMENTS = (0, _common.keysOf)(textAlignToClassNameMap);
|
|
59
|
+
var ALIGNMENTS = ['left', 'center', 'right'];
|
|
65
60
|
exports.ALIGNMENTS = ALIGNMENTS;
|
|
66
|
-
var layoutToClassNameMap = {
|
|
67
|
-
vertical: '',
|
|
68
|
-
horizontal: 'euiCard--horizontal'
|
|
69
|
-
};
|
|
70
|
-
var LAYOUT_ALIGNMENTS = (0, _common.keysOf)(layoutToClassNameMap);
|
|
71
|
-
/**
|
|
72
|
-
* Certain props are only allowed when the layout is vertical
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
exports.LAYOUT_ALIGNMENTS = LAYOUT_ALIGNMENTS;
|
|
76
61
|
|
|
77
62
|
var EuiCard = function EuiCard(_ref) {
|
|
78
63
|
var className = _ref.className,
|
|
@@ -107,8 +92,9 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
107
92
|
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
108
93
|
var styles = (0, _card.euiCardStyles)(euiThemeContext, paddingSize);
|
|
109
94
|
var cardStyles = [styles.card.euiCard, // Text alignment should always be left when horizontal
|
|
110
|
-
styles.card.aligned[layout === 'horizontal' ? 'left' : textAlign],
|
|
95
|
+
styles.card.aligned[layout === 'horizontal' ? 'left' : textAlign], isDisabled && styles.card.disabled];
|
|
111
96
|
var contentStyles = [styles.content.euiCard__content, styles.content.layout[layout]];
|
|
97
|
+
var mainStyles = [styles.main.euiCard__main, styles.main.layout[layout]];
|
|
112
98
|
var textStyles = (0, _card.euiCardTextStyles)(euiThemeContext);
|
|
113
99
|
var textCSS = [textStyles.euiCard__text, // Text alignment should always be left when horizontal
|
|
114
100
|
textStyles.aligned[layout === 'horizontal' ? 'left' : textAlign], isClickable && textStyles.interactive, isDisabled && textStyles.disabled];
|
|
@@ -132,15 +118,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
132
118
|
}
|
|
133
119
|
}
|
|
134
120
|
|
|
135
|
-
var
|
|
136
|
-
var classes = (0, _classnames.default)('euiCard', textAlignToClassNameMap[textAlign], layoutToClassNameMap[layout], {
|
|
137
|
-
'euiCard--isClickable': isClickable,
|
|
138
|
-
'euiCard--hasBetaBadge': betaBadgeProps === null || betaBadgeProps === void 0 ? void 0 : betaBadgeProps.label,
|
|
139
|
-
'euiCard--hasIcon': icon,
|
|
140
|
-
'euiCard--isSelectable': selectable,
|
|
141
|
-
'euiCard-isSelected': selectable === null || selectable === void 0 ? void 0 : selectable.isSelected,
|
|
142
|
-
'euiCard-isDisabled': isDisabled
|
|
143
|
-
}, selectableColorClass, className);
|
|
121
|
+
var classes = (0, _classnames.default)('euiCard', className);
|
|
144
122
|
var ariaId = (0, _accessibility.useGeneratedHtmlId)();
|
|
145
123
|
var ariaDesc = description ? "".concat(ariaId, "Description") : '';
|
|
146
124
|
/**
|
|
@@ -168,7 +146,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
168
146
|
|
|
169
147
|
if (icon) {
|
|
170
148
|
var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
|
|
171
|
-
iconNode =
|
|
149
|
+
iconNode = (0, _clone_element.cloneElementWithCss)(icon, {
|
|
172
150
|
className: (0, _classnames.default)(icon.props.className, 'euiCard__icon'),
|
|
173
151
|
css: iconStyles
|
|
174
152
|
});
|
|
@@ -322,14 +300,17 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
322
300
|
hasShadow: isDisabled || display ? false : true,
|
|
323
301
|
hasBorder: display ? false : undefined,
|
|
324
302
|
paddingSize: paddingSize
|
|
325
|
-
}, rest),
|
|
303
|
+
}, rest), (0, _react2.jsx)("div", {
|
|
304
|
+
className: "euiCard__main",
|
|
305
|
+
css: mainStyles
|
|
306
|
+
}, optionalCardTop, (0, _react2.jsx)("div", {
|
|
326
307
|
className: "euiCard__content",
|
|
327
308
|
css: contentStyles
|
|
328
309
|
}, (0, _react2.jsx)(_title.EuiTitle, {
|
|
329
310
|
id: "".concat(ariaId, "Title"),
|
|
330
311
|
className: "euiCard__title",
|
|
331
312
|
size: titleSize
|
|
332
|
-
}, (0, _react2.jsx)(TitleElement, null, theTitle)), optionalDescription, optionalChildren), optionalBetaBadge, optionalFooter, optionalSelectButton);
|
|
313
|
+
}, (0, _react2.jsx)(TitleElement, null, theTitle)), optionalDescription, optionalChildren), optionalBetaBadge, optionalFooter), optionalSelectButton);
|
|
333
314
|
};
|
|
334
315
|
|
|
335
316
|
exports.EuiCard = EuiCard;
|
|
@@ -343,7 +324,7 @@ EuiCard.propTypes = {
|
|
|
343
324
|
/**
|
|
344
325
|
* Changes alignment of the title and description
|
|
345
326
|
*/
|
|
346
|
-
textAlign: _propTypes.default.
|
|
327
|
+
textAlign: _propTypes.default.any,
|
|
347
328
|
|
|
348
329
|
/**
|
|
349
330
|
* Accepts any combination of elements
|
|
@@ -57,6 +57,15 @@ var _ref5 = process.env.NODE_ENV === "production" ? {
|
|
|
57
57
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
+
var _ref6 = process.env.NODE_ENV === "production" ? {
|
|
61
|
+
name: "z24364-euiCard__main",
|
|
62
|
+
styles: "display:flex;label:euiCard__main;"
|
|
63
|
+
} : {
|
|
64
|
+
name: "z24364-euiCard__main",
|
|
65
|
+
styles: "display:flex;label:euiCard__main;",
|
|
66
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
67
|
+
};
|
|
68
|
+
|
|
60
69
|
var euiCardStyles = function euiCardStyles(euiThemeContext, paddingSize) {
|
|
61
70
|
var euiTheme = euiThemeContext.euiTheme;
|
|
62
71
|
var paddingAmount = (0, _global_styling.euiPaddingSize)(euiThemeContext, paddingSize);
|
|
@@ -64,17 +73,20 @@ var euiCardStyles = function euiCardStyles(euiThemeContext, paddingSize) {
|
|
|
64
73
|
var halfSpacing = (0, _global_styling.euiPaddingSize)(euiThemeContext, halfPaddingKey);
|
|
65
74
|
return {
|
|
66
75
|
card: {
|
|
67
|
-
euiCard: /*#__PURE__*/(0, _react.css)("display:flex;&:has([class*='euiCard__text'][class*='-interactive']:focus:focus-visible){outline:", euiTheme.focus.width, " solid currentColor;};label:euiCard;"),
|
|
76
|
+
euiCard: /*#__PURE__*/(0, _react.css)("display:flex;align-items:flex-start;justify-content:space-between;flex-direction:column;&:has([class*='euiCard__text'][class*='-interactive']:focus:focus-visible){outline:", euiTheme.focus.width, " solid currentColor;};label:euiCard;"),
|
|
68
77
|
aligned: {
|
|
69
78
|
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";align-items:center;;label:center;"),
|
|
70
79
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";align-items:flex-start;;label:left;"),
|
|
71
80
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";align-items:flex-end;;label:right;")
|
|
72
81
|
},
|
|
82
|
+
disabled: /*#__PURE__*/(0, _react.css)("cursor:not-allowed;background-color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled'), ";color:", euiTheme.colors.disabledText, ";;label:disabled;")
|
|
83
|
+
},
|
|
84
|
+
main: {
|
|
85
|
+
euiCard__main: _ref6,
|
|
73
86
|
layout: {
|
|
74
87
|
vertical: _ref5,
|
|
75
88
|
horizontal: _ref4
|
|
76
|
-
}
|
|
77
|
-
disabled: /*#__PURE__*/(0, _react.css)("cursor:not-allowed;background-color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled'), ";color:", euiTheme.colors.disabledText, ";;label:disabled;")
|
|
89
|
+
}
|
|
78
90
|
},
|
|
79
91
|
content: {
|
|
80
92
|
euiCard__content: _ref3,
|
|
@@ -10,11 +10,11 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
11
11
|
|
|
12
12
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
13
|
-
name: "
|
|
14
|
-
styles: "transform:none!important;label:euiCardSelect;"
|
|
13
|
+
name: "aogl4-euiCardSelect",
|
|
14
|
+
styles: "transform:none!important;align-self:flex-end;label:euiCardSelect;"
|
|
15
15
|
} : {
|
|
16
|
-
name: "
|
|
17
|
-
styles: "transform:none!important;label:euiCardSelect;",
|
|
16
|
+
name: "aogl4-euiCardSelect",
|
|
17
|
+
styles: "transform:none!important;align-self:flex-end;label:euiCardSelect;",
|
|
18
18
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -29,7 +29,7 @@ var _checkable_card = require("./checkable_card.styles");
|
|
|
29
29
|
|
|
30
30
|
var _react2 = require("@emotion/react");
|
|
31
31
|
|
|
32
|
-
var _excluded = ["children", "className", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
|
|
32
|
+
var _excluded = ["children", "className", "css", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
|
|
33
33
|
|
|
34
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
35
|
|
|
@@ -38,6 +38,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
38
38
|
var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
39
39
|
var children = _ref.children,
|
|
40
40
|
className = _ref.className,
|
|
41
|
+
css = _ref.css,
|
|
41
42
|
_ref$checkableType = _ref.checkableType,
|
|
42
43
|
checkableType = _ref$checkableType === void 0 ? 'radio' : _ref$checkableType,
|
|
43
44
|
label = _ref.label,
|
|
@@ -49,7 +50,7 @@ var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
49
50
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
50
51
|
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
51
52
|
var styles = (0, _checkable_card.euiCheckableCardStyles)(euiThemeContext);
|
|
52
|
-
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked];
|
|
53
|
+
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked, css];
|
|
53
54
|
var labelStyles = [styles.label.euiCheckableCard__label, disabled && styles.label.isDisabled];
|
|
54
55
|
var childStyles = [styles.euiCheckableCard__children];
|
|
55
56
|
var id = rest.id;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _context_menu_item = require("./context_menu_item");
|
|
8
|
+
|
|
9
|
+
var _context_menu_panel = require("./context_menu_panel");
|
|
10
|
+
|
|
11
|
+
var _react2 = require("@emotion/react");
|
|
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
|
+
var items = [(0, _react2.jsx)(_context_menu_item.EuiContextMenuItem, {
|
|
22
|
+
key: "A",
|
|
23
|
+
"data-test-subj": "itemA"
|
|
24
|
+
}, "Option A"), (0, _react2.jsx)(_context_menu_item.EuiContextMenuItem, {
|
|
25
|
+
key: "B",
|
|
26
|
+
"data-test-subj": "itemB"
|
|
27
|
+
}, "Option B"), (0, _react2.jsx)(_context_menu_item.EuiContextMenuItem, {
|
|
28
|
+
key: "C",
|
|
29
|
+
"data-test-subj": "itemC"
|
|
30
|
+
}, "Option C")];
|
|
31
|
+
describe('EuiContextMenuPanel', function () {
|
|
32
|
+
describe('Automated accessibility check', function () {
|
|
33
|
+
it('has zero violations', function () {
|
|
34
|
+
var showNextPanelHandler = cy.stub();
|
|
35
|
+
cy.mount((0, _react2.jsx)(_context_menu_panel.EuiContextMenuPanel, {
|
|
36
|
+
items: items,
|
|
37
|
+
showNextPanel: showNextPanelHandler
|
|
38
|
+
}));
|
|
39
|
+
cy.checkAxe();
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -138,7 +138,7 @@ var useDataGridColumnSelector = function useDataGridColumnSelector(availableColu
|
|
|
138
138
|
},
|
|
139
139
|
anchorPosition: "downLeft",
|
|
140
140
|
panelPaddingSize: "s",
|
|
141
|
-
|
|
141
|
+
hasDragDrop: true,
|
|
142
142
|
button: (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
143
143
|
size: "xs",
|
|
144
144
|
iconType: allowColumnHiding ? 'listAdd' : 'list',
|
|
@@ -150,7 +150,7 @@ var useDataGridColumnSorting = function useDataGridColumnSorting(columns, sortin
|
|
|
150
150
|
},
|
|
151
151
|
anchorPosition: "downLeft",
|
|
152
152
|
panelPaddingSize: "s",
|
|
153
|
-
|
|
153
|
+
hasDragDrop: true,
|
|
154
154
|
button: (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
155
155
|
size: "xs",
|
|
156
156
|
iconType: "sortable",
|