@elastic/eui 109.1.0 → 109.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/es/components/basic_table/basic_table.js +4 -1
- package/es/components/breadcrumbs/_breadcrumb_content.js +3 -0
- package/es/components/breadcrumbs/breadcrumbs.js +3 -0
- package/es/components/button/button_group/button_group.styles.js +2 -2
- package/es/components/button/button_group/button_group_button.styles.js +1 -1
- package/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
- package/es/components/date_picker/super_date_picker/super_date_picker.js +35 -17
- package/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- package/es/components/flex/flex_item.js +6 -4
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +3 -0
- package/es/components/header/header_links/header_links.js +3 -0
- package/es/components/page/page_header/page_header_content.js +3 -0
- package/es/components/popover/input_popover.js +4 -1
- package/es/components/popover/popover.js +7 -4
- package/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/es/components/table/_table_cell_content.styles.js +4 -4
- package/es/components/table/table.js +16 -3
- package/es/components/table/table.styles.js +2 -1
- package/es/components/table/table_cells_shared.styles.js +4 -1
- package/es/components/table/table_context.js +12 -0
- package/es/components/table/table_footer_cell.js +6 -2
- package/es/components/table/table_row.js +5 -2
- package/es/components/table/table_row.styles.js +22 -6
- package/es/components/table/table_row_cell.styles.js +3 -3
- package/es/components/tool_tip/tool_tip_anchor.js +8 -0
- package/es/components/tour/tour_step.js +9 -3
- package/es/global_styling/mixins/_button.js +4 -3
- package/es/global_styling/mixins/_typography.js +9 -0
- package/eui.d.ts +37 -8
- package/lib/components/basic_table/basic_table.js +4 -1
- package/lib/components/breadcrumbs/_breadcrumb_content.js +3 -0
- package/lib/components/button/button_group/button_group.styles.js +1 -1
- package/lib/components/button/button_group/button_group_button.styles.js +1 -1
- package/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
- package/lib/components/date_picker/super_date_picker/super_date_picker.js +34 -16
- package/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- package/lib/components/flex/flex_item.js +6 -4
- package/lib/components/popover/input_popover.js +4 -1
- package/lib/components/popover/popover.js +7 -4
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/lib/components/table/_table_cell_content.styles.js +4 -4
- package/lib/components/table/table.js +16 -3
- package/lib/components/table/table.styles.js +2 -1
- package/lib/components/table/table_cells_shared.styles.js +4 -1
- package/lib/components/table/table_context.js +18 -0
- package/lib/components/table/table_footer_cell.js +9 -2
- package/lib/components/table/table_row.js +8 -2
- package/lib/components/table/table_row.styles.js +20 -4
- package/lib/components/table/table_row_cell.styles.js +3 -3
- package/lib/components/tool_tip/tool_tip_anchor.js +8 -0
- package/lib/components/tour/tour_step.js +6 -3
- package/lib/global_styling/mixins/_button.js +4 -3
- package/lib/global_styling/mixins/_typography.js +10 -1
- package/optimize/es/components/basic_table/basic_table.js +4 -1
- package/optimize/es/components/button/button_group/button_group.styles.js +2 -2
- package/optimize/es/components/button/button_group/button_group_button.styles.js +1 -1
- package/optimize/es/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.js +35 -17
- package/optimize/es/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- package/optimize/es/components/flex/flex_item.js +6 -4
- package/optimize/es/components/popover/input_popover.js +4 -1
- package/optimize/es/components/popover/popover.js +4 -4
- package/optimize/es/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/optimize/es/components/table/_table_cell_content.styles.js +4 -4
- package/optimize/es/components/table/table.js +10 -3
- package/optimize/es/components/table/table.styles.js +2 -1
- package/optimize/es/components/table/table_cells_shared.styles.js +4 -1
- package/optimize/es/components/table/table_context.js +12 -0
- package/optimize/es/components/table/table_footer_cell.js +6 -2
- package/optimize/es/components/table/table_row.js +5 -2
- package/optimize/es/components/table/table_row.styles.js +22 -6
- package/optimize/es/components/table/table_row_cell.styles.js +3 -3
- package/optimize/es/components/tool_tip/tool_tip_anchor.js +8 -0
- package/optimize/es/components/tour/tour_step.js +4 -2
- package/optimize/es/global_styling/mixins/_button.js +4 -3
- package/optimize/es/global_styling/mixins/_typography.js +9 -0
- package/optimize/lib/components/basic_table/basic_table.js +4 -1
- package/optimize/lib/components/button/button_group/button_group.styles.js +1 -1
- package/optimize/lib/components/button/button_group/button_group_button.styles.js +1 -1
- package/optimize/lib/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.js +34 -16
- package/optimize/lib/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- package/optimize/lib/components/flex/flex_item.js +6 -4
- package/optimize/lib/components/popover/input_popover.js +4 -1
- package/optimize/lib/components/popover/popover.js +4 -4
- package/optimize/lib/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/optimize/lib/components/table/_table_cell_content.styles.js +4 -4
- package/optimize/lib/components/table/table.js +10 -3
- package/optimize/lib/components/table/table.styles.js +2 -1
- package/optimize/lib/components/table/table_cells_shared.styles.js +4 -1
- package/optimize/lib/components/table/table_context.js +18 -0
- package/optimize/lib/components/table/table_footer_cell.js +9 -2
- package/optimize/lib/components/table/table_row.js +8 -2
- package/optimize/lib/components/table/table_row.styles.js +20 -4
- package/optimize/lib/components/table/table_row_cell.styles.js +3 -3
- package/optimize/lib/components/tool_tip/tool_tip_anchor.js +8 -0
- package/optimize/lib/components/tour/tour_step.js +4 -2
- package/optimize/lib/global_styling/mixins/_button.js +4 -3
- package/optimize/lib/global_styling/mixins/_typography.js +10 -1
- package/package.json +4 -4
- package/test-env/components/basic_table/basic_table.js +4 -1
- package/test-env/components/breadcrumbs/_breadcrumb_content.js +3 -0
- package/test-env/components/button/button_group/button_group.styles.js +1 -1
- package/test-env/components/button/button_group/button_group_button.styles.js +1 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/absolute_tab.js +7 -1
- package/test-env/components/date_picker/super_date_picker/super_date_picker.js +34 -16
- package/test-env/components/date_picker/super_date_picker/super_date_picker.styles.js +1 -3
- package/test-env/components/flex/flex_item.js +6 -4
- package/test-env/components/popover/input_popover.js +4 -1
- package/test-env/components/popover/popover.js +7 -4
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide_popover.js +1 -0
- package/test-env/components/table/_table_cell_content.styles.js +4 -4
- package/test-env/components/table/table.js +16 -3
- package/test-env/components/table/table.styles.js +2 -1
- package/test-env/components/table/table_cells_shared.styles.js +4 -1
- package/test-env/components/table/table_context.js +18 -0
- package/test-env/components/table/table_footer_cell.js +9 -2
- package/test-env/components/table/table_row.js +8 -2
- package/test-env/components/table/table_row.styles.js +20 -4
- package/test-env/components/table/table_row_cell.styles.js +3 -3
- package/test-env/components/tool_tip/tool_tip_anchor.js +8 -0
- package/test-env/components/tour/tour_step.js +6 -3
- package/test-env/global_styling/mixins/_button.js +4 -3
- package/test-env/global_styling/mixins/_typography.js +10 -1
|
@@ -20,7 +20,7 @@ var _resize_observer = require("../observer/resize_observer");
|
|
|
20
20
|
var _focus_trap = require("../focus_trap");
|
|
21
21
|
var _form = require("../form/form.styles");
|
|
22
22
|
var _popover = require("./popover");
|
|
23
|
-
var _excluded = ["children", "className", "closePopover", "anchorPosition", "attachToAnchor", "repositionToCrossAxis", "display", "panelPaddingSize", "closeOnScroll", "ownFocus", "disableFocusTrap", "focusTrapProps", "input", "fullWidth", "panelMinWidth", "onPanelResize", "inputRef", "panelRef"];
|
|
23
|
+
var _excluded = ["children", "className", "closePopover", "anchorPosition", "attachToAnchor", "repositionToCrossAxis", "display", "panelPaddingSize", "closeOnScroll", "ownFocus", "disableFocusTrap", "focusTrapProps", "input", "fullWidth", "panelMinWidth", "onPanelResize", "inputRef", "panelRef", "offset"];
|
|
24
24
|
/*
|
|
25
25
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
26
26
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -64,6 +64,8 @@ var EuiInputPopover = exports.EuiInputPopover = function EuiInputPopover(_ref) {
|
|
|
64
64
|
onPanelResize = _ref.onPanelResize,
|
|
65
65
|
_inputRef = _ref.inputRef,
|
|
66
66
|
_panelRef = _ref.panelRef,
|
|
67
|
+
_ref$offset = _ref.offset,
|
|
68
|
+
offset = _ref$offset === void 0 ? 2 : _ref$offset,
|
|
67
69
|
props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
68
70
|
var classes = (0, _classnames.default)('euiInputPopover', className);
|
|
69
71
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
@@ -202,6 +204,7 @@ var EuiInputPopover = exports.EuiInputPopover = function EuiInputPopover(_ref) {
|
|
|
202
204
|
closePopover: closePopover,
|
|
203
205
|
anchorPosition: anchorPosition,
|
|
204
206
|
attachToAnchor: attachToAnchor,
|
|
207
|
+
offset: offset,
|
|
205
208
|
repositionToCrossAxis: repositionToCrossAxis,
|
|
206
209
|
panelPaddingSize: panelPaddingSize,
|
|
207
210
|
ownFocus: ownFocus
|
|
@@ -198,8 +198,8 @@ var EuiPopover = exports.EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
198
198
|
if (_this.button == null || _this.panel == null) return;
|
|
199
199
|
var _ref6 = _this.props,
|
|
200
200
|
anchorPosition = _ref6.anchorPosition,
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
_offset = _ref6.offset;
|
|
202
|
+
var offset = _offset != null ? _offset : _this.props.hasArrow ? 0 : 4;
|
|
203
203
|
var position = getPopoverPositionFromAnchorPosition(anchorPosition);
|
|
204
204
|
var forcePosition = undefined;
|
|
205
205
|
if (allowEnforcePosition && _this.state.isOpenStable && _this.state.openPosition != null) {
|
|
@@ -536,8 +536,8 @@ var EuiPopover = exports.EuiPopover = /*#__PURE__*/function (_Component) {
|
|
|
536
536
|
isOpen: false,
|
|
537
537
|
ownFocus: true,
|
|
538
538
|
repositionToCrossAxis: true,
|
|
539
|
-
anchorPosition: '
|
|
539
|
+
anchorPosition: 'downLeft',
|
|
540
540
|
panelPaddingSize: 'm',
|
|
541
|
-
hasArrow:
|
|
541
|
+
hasArrow: false,
|
|
542
542
|
display: 'inline-block'
|
|
543
543
|
});
|
|
@@ -35,6 +35,7 @@ var EuiSelectableTemplateSitewidePopover = exports.EuiSelectableTemplateSitewide
|
|
|
35
35
|
var styles = (0, _services.useEuiMemoizedStyles)(_selectable_template_sitewide.euiSelectableTemplateSitewidePopoverStyles);
|
|
36
36
|
return (0, _react2.jsx)(_popover.EuiPopover, (0, _extends2.default)({
|
|
37
37
|
panelPaddingSize: "none",
|
|
38
|
+
anchorPosition: "downCenter",
|
|
38
39
|
isOpen: isOpen,
|
|
39
40
|
ownFocus: !!trigger,
|
|
40
41
|
display: trigger ? 'inline-block' : 'block'
|
|
@@ -14,11 +14,11 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
-
name: "
|
|
18
|
-
styles: "flex-direction:column;
|
|
17
|
+
name: "7d9p9x-mobile",
|
|
18
|
+
styles: "flex-direction:column;label:mobile;"
|
|
19
19
|
} : {
|
|
20
|
-
name: "
|
|
21
|
-
styles: "flex-direction:column;
|
|
20
|
+
name: "7d9p9x-mobile",
|
|
21
|
+
styles: "flex-direction:column;label:mobile;",
|
|
22
22
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
23
|
};
|
|
24
24
|
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
@@ -11,9 +11,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
12
|
var _services = require("../../services");
|
|
13
13
|
var _responsive_context = require("./mobile/responsive_context");
|
|
14
|
+
var _table_context = require("./table_context");
|
|
14
15
|
var _table = require("./table.styles");
|
|
15
16
|
var _react2 = require("@emotion/react");
|
|
16
|
-
var _excluded = ["children", "className", "compressed", "tableLayout", "responsiveBreakpoint"];
|
|
17
|
+
var _excluded = ["children", "className", "compressed", "tableLayout", "hasBackground", "responsiveBreakpoint"];
|
|
17
18
|
/*
|
|
18
19
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
19
20
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -27,17 +28,23 @@ var EuiTable = exports.EuiTable = function EuiTable(_ref) {
|
|
|
27
28
|
compressed = _ref.compressed,
|
|
28
29
|
_ref$tableLayout = _ref.tableLayout,
|
|
29
30
|
tableLayout = _ref$tableLayout === void 0 ? 'fixed' : _ref$tableLayout,
|
|
31
|
+
_ref$hasBackground = _ref.hasBackground,
|
|
32
|
+
hasBackground = _ref$hasBackground === void 0 ? true : _ref$hasBackground,
|
|
30
33
|
responsiveBreakpoint = _ref.responsiveBreakpoint,
|
|
31
34
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
32
35
|
var isResponsive = (0, _responsive_context.useIsEuiTableResponsive)(responsiveBreakpoint);
|
|
33
36
|
var classes = (0, _classnames.default)('euiTable', className);
|
|
34
37
|
var styles = (0, _services.useEuiMemoizedStyles)(_table.euiTableStyles);
|
|
35
|
-
var cssStyles = [styles.euiTable, styles.layout[tableLayout], (!compressed || isResponsive) && styles.uncompressed, compressed && !isResponsive && styles.compressed, isResponsive ? styles.mobile : styles.desktop];
|
|
38
|
+
var cssStyles = [styles.euiTable, styles.layout[tableLayout], (!compressed || isResponsive) && styles.uncompressed, compressed && !isResponsive && styles.compressed, hasBackground && styles.hasBackground, isResponsive ? styles.mobile : styles.desktop];
|
|
36
39
|
return (0, _react2.jsx)("table", (0, _extends2.default)({
|
|
37
40
|
tabIndex: -1,
|
|
38
41
|
css: cssStyles,
|
|
39
42
|
className: classes
|
|
40
43
|
}, rest), (0, _react2.jsx)(_responsive_context.EuiTableIsResponsiveContext.Provider, {
|
|
41
44
|
value: isResponsive
|
|
42
|
-
},
|
|
45
|
+
}, (0, _react2.jsx)(_table_context.EuiTableVariantContext.Provider, {
|
|
46
|
+
value: {
|
|
47
|
+
hasBackground: hasBackground
|
|
48
|
+
}
|
|
49
|
+
}, children)));
|
|
43
50
|
};
|
|
@@ -71,11 +71,12 @@ var euiTableStyles = exports.euiTableStyles = function euiTableStyles(euiThemeCo
|
|
|
71
71
|
cellContentPadding = _euiTableVariables.cellContentPadding,
|
|
72
72
|
compressedCellContentPadding = _euiTableVariables.compressedCellContentPadding;
|
|
73
73
|
return {
|
|
74
|
-
euiTable: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiNumberFormat)(euiThemeContext), " ", (0, _global_styling.logicalCSS)('width', '100%'), " border:none;border-collapse:collapse
|
|
74
|
+
euiTable: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiNumberFormat)(euiThemeContext), " ", (0, _global_styling.logicalCSS)('width', '100%'), " border:none;border-collapse:collapse;;label:euiTable;"),
|
|
75
75
|
layout: {
|
|
76
76
|
fixed: _ref3,
|
|
77
77
|
auto: _ref2
|
|
78
78
|
},
|
|
79
|
+
hasBackground: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.backgroundBasePlain, ";;label:hasBackground;"),
|
|
79
80
|
/**
|
|
80
81
|
* 1. The padding on the `.euiTableCellContent` div allows the ellipsis to show if the
|
|
81
82
|
* content is truncated. If the padding was on the cell, the ellipsis would be cropped.
|
|
@@ -30,7 +30,10 @@ var euiTableHeaderFooterCellStyles = exports.euiTableHeaderFooterCellStyles = fu
|
|
|
30
30
|
euiTableHeaderCell: /*#__PURE__*/(0, _react.css)(sharedStyles, ";;label:euiTableHeaderCell;"),
|
|
31
31
|
euiTableHeaderCell__content: /*#__PURE__*/(0, _react.css)("gap:", euiTheme.size.xs, ";;label:euiTableHeaderCell__content;"),
|
|
32
32
|
euiTableHeaderCell__button: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), " font-weight:inherit;line-height:inherit;.euiTableSortIcon--sortable{color:", euiTheme.components.tableCellSortableIconColor, ";}&:hover,&:focus{color:", euiTheme.colors.textPrimary, ";text-decoration:underline;.euiTableSortIcon--sortable{color:", euiTheme.colors.textPrimary, ";}};label:euiTableHeaderCell__button;"),
|
|
33
|
-
euiTableFooterCell:
|
|
33
|
+
euiTableFooterCell: {
|
|
34
|
+
euiTableFooterCell: /*#__PURE__*/(0, _react.css)(sharedStyles, ";;label:euiTableFooterCell;"),
|
|
35
|
+
hasBackground: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.components.tableFooterBackground, ";;label:hasBackground;")
|
|
36
|
+
}
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
39
|
var euiTableCellCheckboxStyles = exports.euiTableCellCheckboxStyles = function euiTableCellCheckboxStyles(euiThemeContext) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EuiTableVariantContext = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
/*
|
|
9
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
10
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
11
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
12
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
13
|
+
* Side Public License, v 1.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
var EuiTableVariantContext = exports.EuiTableVariantContext = /*#__PURE__*/(0, _react.createContext)({
|
|
17
|
+
hasBackground: true
|
|
18
|
+
});
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.EuiTableFooterCell = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react =
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
13
|
var _services = require("../../services");
|
|
13
14
|
var _utils = require("./utils");
|
|
14
15
|
var _table_cell_content = require("./_table_cell_content");
|
|
15
16
|
var _table_cells_shared = require("./table_cells_shared.styles");
|
|
17
|
+
var _table_context = require("./table_context");
|
|
16
18
|
var _react2 = require("@emotion/react");
|
|
17
19
|
var _excluded = ["children", "align", "className", "width", "style"];
|
|
18
20
|
/*
|
|
@@ -22,6 +24,8 @@ var _excluded = ["children", "align", "className", "width", "style"];
|
|
|
22
24
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
23
25
|
* Side Public License, v 1.
|
|
24
26
|
*/
|
|
27
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
28
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
25
29
|
var EuiTableFooterCell = exports.EuiTableFooterCell = function EuiTableFooterCell(_ref) {
|
|
26
30
|
var children = _ref.children,
|
|
27
31
|
_ref$align = _ref.align,
|
|
@@ -30,11 +34,14 @@ var EuiTableFooterCell = exports.EuiTableFooterCell = function EuiTableFooterCel
|
|
|
30
34
|
width = _ref.width,
|
|
31
35
|
style = _ref.style,
|
|
32
36
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
37
|
+
var _useContext = (0, _react.useContext)(_table_context.EuiTableVariantContext),
|
|
38
|
+
hasBackground = _useContext.hasBackground;
|
|
33
39
|
var classes = (0, _classnames.default)('euiTableFooterCell', className);
|
|
34
40
|
var inlineStyles = (0, _utils.resolveWidthAsStyle)(style, width);
|
|
35
41
|
var styles = (0, _services.useEuiMemoizedStyles)(_table_cells_shared.euiTableHeaderFooterCellStyles);
|
|
42
|
+
var cssStyles = [styles.euiTableFooterCell.euiTableFooterCell, hasBackground && styles.euiTableFooterCell.hasBackground];
|
|
36
43
|
return (0, _react2.jsx)("td", (0, _extends2.default)({
|
|
37
|
-
css:
|
|
44
|
+
css: cssStyles,
|
|
38
45
|
className: classes,
|
|
39
46
|
style: inlineStyles
|
|
40
47
|
}, rest), (0, _react2.jsx)(_table_cell_content.EuiTableCellContent, {
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.EuiTableRow = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react =
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
13
|
var _services = require("../../services");
|
|
13
14
|
var _responsive_context = require("./mobile/responsive_context");
|
|
15
|
+
var _table_context = require("./table_context");
|
|
14
16
|
var _table_row = require("./table_row.styles");
|
|
15
17
|
var _react2 = require("@emotion/react");
|
|
16
18
|
var _excluded = ["children", "className", "hasSelection", "isSelected", "isSelectable", "hasActions", "isExpandedRow", "isExpandable", "onClick"];
|
|
@@ -21,6 +23,8 @@ var _excluded = ["children", "className", "hasSelection", "isSelected", "isSelec
|
|
|
21
23
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
22
24
|
* Side Public License, v 1.
|
|
23
25
|
*/
|
|
26
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
27
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
28
|
var EuiTableRow = exports.EuiTableRow = function EuiTableRow(_ref) {
|
|
25
29
|
var children = _ref.children,
|
|
26
30
|
className = _ref.className,
|
|
@@ -33,8 +37,10 @@ var EuiTableRow = exports.EuiTableRow = function EuiTableRow(_ref) {
|
|
|
33
37
|
onClick = _ref.onClick,
|
|
34
38
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
35
39
|
var isResponsive = (0, _responsive_context.useEuiTableIsResponsive)();
|
|
40
|
+
var _useContext = (0, _react.useContext)(_table_context.EuiTableVariantContext),
|
|
41
|
+
hasBackground = _useContext.hasBackground;
|
|
36
42
|
var styles = (0, _services.useEuiMemoizedStyles)(_table_row.euiTableRowStyles);
|
|
37
|
-
var cssStyles = isResponsive ? [styles.euiTableRow, styles.mobile.mobile, isSelected && styles.mobile.selected, isExpandedRow && styles.mobile.expanded, (hasActions === true || isExpandable || isExpandedRow) && styles.mobile.hasRightColumn, hasSelection && styles.mobile.hasLeftColumn] : [styles.euiTableRow, styles.desktop.desktop, onClick && styles.desktop.clickable, isSelected && styles.desktop.selected, isExpandedRow && styles.desktop.expanded, isExpandedRow && hasSelection && styles.desktop.checkboxOffset];
|
|
43
|
+
var cssStyles = isResponsive ? [styles.euiTableRow, styles.mobile.mobile, !hasBackground && styles.mobile.hasBorder, hasBackground && styles.mobile.hasBackground, isSelected && styles.mobile.selected, isExpandedRow && styles.mobile.expanded, (hasActions === true || isExpandable || isExpandedRow) && styles.mobile.hasRightColumn, hasSelection && styles.mobile.hasLeftColumn] : [styles.euiTableRow, styles.desktop.desktop, onClick && styles.desktop.clickable, isSelected && styles.desktop.selected, isExpandedRow && styles.desktop.expanded.expanded, isExpandedRow && hasBackground && styles.desktop.expanded.hasBackground, isExpandedRow && hasSelection && styles.desktop.checkboxOffset];
|
|
38
44
|
var classes = (0, _classnames.default)('euiTableRow', className, {
|
|
39
45
|
'euiTableRow-isSelectable': isSelectable,
|
|
40
46
|
'euiTableRow-isSelected': isSelected,
|
|
@@ -32,7 +32,11 @@ var euiTableRowStyles = exports.euiTableRowStyles = function euiTableRowStyles(e
|
|
|
32
32
|
euiTableRow: /*#__PURE__*/(0, _react.css)(":where(&.euiTableRow--marked){background-color:", rowColors.marked.background, ";};label:euiTableRow;"),
|
|
33
33
|
desktop: {
|
|
34
34
|
desktop: /*#__PURE__*/(0, _react.css)("&:hover{background-color:", rowColors.hover, ";}", markedStyles, ";;label:desktop;"),
|
|
35
|
-
expanded:
|
|
35
|
+
expanded: {
|
|
36
|
+
expanded: /*#__PURE__*/(0, _react.css)(expandedAnimationCss, ";;label:expanded;"),
|
|
37
|
+
// skipping adding a css class as it's a default style when expanded
|
|
38
|
+
hasBackground: "\n background-color: ".concat(rowColors.hover, ";\n ")
|
|
39
|
+
},
|
|
36
40
|
clickable: /*#__PURE__*/(0, _react.css)("&:hover{background-color:", rowColors.clickable.hover, ";cursor:pointer;}", markedStyles, " &:focus{background-color:", rowColors.clickable.focus, ";};label:clickable;"),
|
|
37
41
|
selected: /*#__PURE__*/(0, _react.css)("&,&+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.background, ";}&:hover,&:hover+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.hover, ";};label:selected;"),
|
|
38
42
|
// Offset expanded & selectable rows by the checkbox width to line up content with the 2nd column
|
|
@@ -40,9 +44,21 @@ var euiTableRowStyles = exports.euiTableRowStyles = function euiTableRowStyles(e
|
|
|
40
44
|
checkboxOffset: /*#__PURE__*/(0, _react.css)("&>.euiTableRowCell:first-child{", (0, _global_styling.logicalCSS)('padding-left', checkboxSize), ";};label:checkboxOffset;")
|
|
41
45
|
},
|
|
42
46
|
mobile: {
|
|
43
|
-
mobile: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;flex-wrap:wrap;padding:", cellContentPadding, ";", (0, _global_styling.logicalCSS)('margin-bottom', cellContentPadding), (0,
|
|
47
|
+
mobile: /*#__PURE__*/(0, _react.css)("position:relative;display:flex;flex-wrap:wrap;padding:", cellContentPadding, ";", (0, _global_styling.logicalCSS)('margin-bottom', cellContentPadding), " border-radius:", euiTheme.border.radius.medium, ";", (0, _supports.cssSupportsHasWithNextSibling)("\n &:has(+ .euiTableRow-isExpandedRow) {\n ".concat((0, _global_styling.logicalCSS)('border-bottom-left-radius', 0), "\n ").concat((0, _global_styling.logicalCSS)('border-bottom-right-radius', 0), "\n }\n ")), ";;label:mobile;"),
|
|
48
|
+
/* Omitting adding a class via css here as it's a default style on mobile, not a standalone prop-related style.
|
|
49
|
+
Adding it separate allows better appliance control via props without the need to override the styles. */
|
|
50
|
+
hasBorder: "\n ".concat((0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
51
|
+
// uses pseudo-border to align dimensions with shadows applied by `hasBackground`
|
|
52
|
+
none: "\n ".concat((0, _euiThemeCommon.euiBorderStyles)(euiThemeContext, {
|
|
53
|
+
side: 'all'
|
|
54
|
+
}), "\n transform: translateZ(0);\n "),
|
|
55
|
+
preferred: "\n border: ".concat(euiTheme.border.thin, "\n ")
|
|
56
|
+
}), "\n "),
|
|
57
|
+
hasBackground: /*#__PURE__*/(0, _react.css)((0, _euiThemeCommon.euiShadow)(euiThemeContext, 's', {
|
|
44
58
|
borderAllInHighContrastMode: true
|
|
45
|
-
}), " background-color:", euiTheme.colors.backgroundBasePlain, ";
|
|
59
|
+
}), " background-color:", euiTheme.colors.backgroundBasePlain, ";", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
60
|
+
none: "\n border: none;\n "
|
|
61
|
+
}), ";;label:hasBackground;"),
|
|
46
62
|
selected: /*#__PURE__*/(0, _react.css)("&,&+.euiTableRow-isExpandedRow{background-color:", rowColors.selected.background, ";};label:selected;"),
|
|
47
63
|
/**
|
|
48
64
|
* Left column offset (no border)
|
|
@@ -61,7 +77,7 @@ var euiTableRowStyles = exports.euiTableRowStyles = function euiTableRowStyles(e
|
|
|
61
77
|
// On mobile, visually move the expanded row to join up with the
|
|
62
78
|
// preceding table row via negative margins
|
|
63
79
|
'margin-top', (0, _global_styling.mathWithUnits)([cellContentPadding, euiTheme.border.width.thin], function (x, y) {
|
|
64
|
-
return (x + y
|
|
80
|
+
return (x + y) * -1;
|
|
65
81
|
})), (0, _global_styling.logicalCSS)('padding-left', cellContentPadding), " ", (0, _global_styling.logicalCSS)('border-top', euiTheme.border.thin), " ", (0, _global_styling.logicalCSS)('border-top-left-radius', 0), " ", (0, _global_styling.logicalCSS)('border-top-right-radius', 0), " &:after{", (0, _global_styling.logicalCSS)('border-top', 'none'), ";}clip-path:polygon(-50% 0, 150% 0, 150% 150%, -50% 150%);>.euiTableRowCell{", (0, _global_styling.logicalCSS)('width', '100%'), ";}", expandedAnimationCss, ";;label:expanded;")
|
|
66
82
|
}
|
|
67
83
|
};
|
|
@@ -74,10 +74,10 @@ var euiTableRowCellStyles = exports.euiTableRowCellStyles = function euiTableRow
|
|
|
74
74
|
rightColumnContent: "\n position: absolute;\n ".concat((0, _global_styling.logicalCSS)('right', 0), "\n ").concat((0, _global_styling.logicalCSS)('min-width', '0'), "\n ").concat((0, _global_styling.logicalCSS)('width', mobileSizes.actions.width), "\n "),
|
|
75
75
|
get actions() {
|
|
76
76
|
// Note: Visible-on-hover actions on desktop always show on mobile
|
|
77
|
-
return /*#__PURE__*/(0, _react.css)(this.rightColumnContent, " ", (0, _global_styling.logicalCSS)('top', mobileSizes.actions.offset), "
|
|
77
|
+
return /*#__PURE__*/(0, _react.css)(this.rightColumnContent, " ", (0, _global_styling.logicalCSS)('top', mobileSizes.actions.offset), ".euiTableCellContent{padding:0;};label:actions;");
|
|
78
78
|
},
|
|
79
79
|
get expander() {
|
|
80
|
-
return /*#__PURE__*/(0, _react.css)(this.rightColumnContent, "
|
|
80
|
+
return /*#__PURE__*/(0, _react.css)(this.rightColumnContent, ";;label:expander;");
|
|
81
81
|
},
|
|
82
82
|
/**
|
|
83
83
|
* Custom actions may not be icons and therefore may not fit in a column
|
|
@@ -88,6 +88,6 @@ var euiTableRowCellStyles = exports.euiTableRowCellStyles = function euiTableRow
|
|
|
88
88
|
},
|
|
89
89
|
euiTableRowCell__mobileHeader: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)(), " font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 's', {
|
|
90
90
|
customScale: 'xxs'
|
|
91
|
-
}).fontSize, ";display:block;color:", euiTheme.colors.
|
|
91
|
+
}).fontSize, ";display:block;color:", euiTheme.colors.textSubdued, ";padding:", euiTheme.size.s, ";padding-block-end:0;margin-block-end:-", euiTheme.size.s, ";.euiTableRowCell:not(:only-child) &{", (0, _global_styling.logicalCSS)('min-height', euiTheme.size.l), ";};label:euiTableRowCell__mobileHeader;")
|
|
92
92
|
};
|
|
93
93
|
};
|
|
@@ -10,6 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
var _services = require("../../services");
|
|
13
14
|
var _tool_tip = require("./tool_tip.styles");
|
|
14
15
|
var _react2 = require("@emotion/react");
|
|
15
16
|
var _excluded = ["onBlur", "onFocus", "onMouseOver", "onMouseOut", "id", "className", "children", "display", "isVisible"];
|
|
@@ -36,11 +37,18 @@ var EuiToolTipAnchor = exports.EuiToolTipAnchor = /*#__PURE__*/(0, _react.forwar
|
|
|
36
37
|
var anchorCss = (0, _tool_tip.euiToolTipAnchorStyles)();
|
|
37
38
|
var cssStyles = [anchorCss.euiToolTipAnchor, anchorCss[display]];
|
|
38
39
|
var classes = (0, _classnames.default)('euiToolTipAnchor', className);
|
|
40
|
+
var anchorId = (0, _services.useGeneratedHtmlId)({
|
|
41
|
+
suffix: 'euiToolTipAnchor',
|
|
42
|
+
conditionalId: id ? "".concat(id, "-wrapper") : undefined
|
|
43
|
+
});
|
|
39
44
|
return (
|
|
40
45
|
// eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
|
|
41
46
|
(0, _react2.jsx)("span", (0, _extends2.default)({
|
|
42
47
|
ref: ref,
|
|
43
48
|
css: cssStyles
|
|
49
|
+
/* A11y: NVDA combines elements with identical markup into a single navigational stop. ¯\_(ツ)_/¯
|
|
50
|
+
The `id` ensures the wrappers are unique and navigated as standalone elements. (data- attributes don't work) */,
|
|
51
|
+
id: anchorId
|
|
44
52
|
}, rest, {
|
|
45
53
|
className: classes,
|
|
46
54
|
onMouseOver: onMouseOver,
|
|
@@ -20,7 +20,7 @@ var _tour_header = require("./_tour_header");
|
|
|
20
20
|
var _tour_footer = require("./_tour_footer");
|
|
21
21
|
var _tour = require("./tour.styles");
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
|
-
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "subtitle", "title", "decoration", "footerAction", "panelProps", "panelClassName"];
|
|
23
|
+
var _excluded = ["anchorPosition", "anchor", "children", "className", "css", "closePopover", "content", "isStepOpen", "minWidth", "maxWidth", "onFinish", "step", "stepsTotal", "subtitle", "title", "decoration", "hasArrow", "footerAction", "panelProps", "panelClassName"];
|
|
24
24
|
/*
|
|
25
25
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
26
26
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -56,6 +56,7 @@ var EuiTourStep = exports.EuiTourStep = function EuiTourStep(_ref) {
|
|
|
56
56
|
title = _ref.title,
|
|
57
57
|
_ref$decoration = _ref.decoration,
|
|
58
58
|
decoration = _ref$decoration === void 0 ? 'beacon' : _ref$decoration,
|
|
59
|
+
hasArrow = _ref.hasArrow,
|
|
59
60
|
footerAction = _ref.footerAction,
|
|
60
61
|
panelProps = _ref.panelProps,
|
|
61
62
|
panelClassName = _ref.panelClassName,
|
|
@@ -117,8 +118,9 @@ var EuiTourStep = exports.EuiTourStep = function EuiTourStep(_ref) {
|
|
|
117
118
|
panelProps: _objectSpread(_objectSpread({}, panelProps), {}, {
|
|
118
119
|
css: [tourStyles.euiTour, css, panelProps === null || panelProps === void 0 ? void 0 : panelProps.css]
|
|
119
120
|
}),
|
|
120
|
-
offset: hasBeacon ? 10 :
|
|
121
|
+
offset: hasBeacon && hasArrow !== false ? 10 : undefined,
|
|
121
122
|
"aria-labelledby": titleId,
|
|
123
|
+
hasArrow: hasArrow !== null && hasArrow !== void 0 ? hasArrow : hasBeacon,
|
|
122
124
|
arrowChildren: hasBeacon && (0, _react2.jsx)(_beacon.EuiBeacon, {
|
|
123
125
|
css: beaconCss,
|
|
124
126
|
className: "euiTour__beacon"
|
|
@@ -11,6 +11,7 @@ var _react = require("@emotion/react");
|
|
|
11
11
|
var _euiThemeCommon = require("@elastic/eui-theme-common");
|
|
12
12
|
var _services = require("../../services");
|
|
13
13
|
var _functions = require("../functions");
|
|
14
|
+
var _selectors = require("../utility/selectors");
|
|
14
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /*
|
|
16
17
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -208,11 +209,11 @@ var _interactionStyles = function _interactionStyles(euiThemeContext, buttonColo
|
|
|
208
209
|
var baseStyles = function baseStyles() {
|
|
209
210
|
// button hover is applied as pseudo element with a transparent background-color
|
|
210
211
|
if (type === 'overlay') {
|
|
211
|
-
return "\n position: relative;\n overflow: hidden;\n\n &:hover:not(
|
|
212
|
+
return "\n position: relative;\n overflow: hidden;\n\n &:hover:not(".concat(_selectors.euiDisabledSelector, ") {\n &::before {\n content: '';\n position: absolute;\n /* should stay under the content */\n z-index: 0;\n inset: 0;\n background-color: ").concat(buttonColors.backgroundHover, ";\n pointer-events: none;\n }\n }\n\n &:active:not(").concat(_selectors.euiDisabledSelector, ") {\n &::before {\n ").concat((0, _functions.logicalCSS)('width', '100%'), "\n ").concat((0, _functions.logicalCSS)('height', '100%'), "\n\n content: '';\n position: absolute;\n inset: 0;\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n }\n ");
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
// button hover is applied as opaque color
|
|
215
|
-
return "\n &:hover:not(
|
|
216
|
+
return "\n &:hover:not(".concat(_selectors.euiDisabledSelector, ") {\n background-color: ").concat(buttonColors.backgroundHover, ";\n }\n\n &:active:not(").concat(_selectors.euiDisabledSelector, ") {\n background-color: ").concat(buttonColors.backgroundActive, ";\n }\n ");
|
|
216
217
|
};
|
|
217
218
|
return " \n ".concat((0, _functions.highContrastModeStyles)(euiThemeContext, {
|
|
218
219
|
none: baseStyles(),
|
|
@@ -225,7 +226,7 @@ var _interactionStyles = function _interactionStyles(euiThemeContext, buttonColo
|
|
|
225
226
|
*/
|
|
226
227
|
var highContrastHoverIndicatorStyles = exports.highContrastHoverIndicatorStyles = function highContrastHoverIndicatorStyles(_ref2) {
|
|
227
228
|
var euiTheme = _ref2.euiTheme;
|
|
228
|
-
return "\n &:hover:not(
|
|
229
|
+
return "\n &:hover:not(".concat(_selectors.euiDisabledSelector, ") {\n transition: none;\n\n /* using pseudo border to be able to control the color */\n &::after {\n content: '';\n position: absolute;\n inset: ").concat(euiTheme.border.width.thin, ";\n border: ").concat(euiTheme.border.width.thick, " solid var(--highContrastHoverIndicatorColor, ").concat(euiTheme.border.color, ");\n border-radius: ").concat((0, _euiThemeCommon.mathWithUnits)(euiTheme.border.radius.small, function (x) {
|
|
229
230
|
return x / 2;
|
|
230
231
|
}), ";\n background-color: transparent;\n pointer-events: none;\n }\n }\n");
|
|
231
232
|
};
|
|
@@ -4,8 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.useEuiFontSize = exports.euiTextTruncate = exports.euiTextBreakWord = exports.euiNumberFormat = exports.euiFontSize = void 0;
|
|
7
|
+
exports.useEuiFontSize = exports.euiTextTruncateCSS = exports.euiTextTruncate = exports.euiTextBreakWord = exports.euiNumberFormat = exports.euiFontSize = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
9
10
|
var _typography = require("../functions/typography");
|
|
10
11
|
var _theme = require("../../services/theme");
|
|
11
12
|
var _typography2 = require("../variables/typography");
|
|
@@ -58,6 +59,14 @@ var euiTextTruncate = exports.euiTextTruncate = function euiTextTruncate() {
|
|
|
58
59
|
, "\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
|
|
59
60
|
};
|
|
60
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Emotion CSS wrapper around `euiTextTruncate` style.
|
|
64
|
+
*/
|
|
65
|
+
var euiTextTruncateCSS = exports.euiTextTruncateCSS = function euiTextTruncateCSS() {
|
|
66
|
+
var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
|
|
67
|
+
return /*#__PURE__*/(0, _react.css)(euiTextTruncate(maxWidth), ";;label:euiTextTruncateCSS;");
|
|
68
|
+
};
|
|
69
|
+
|
|
61
70
|
/**
|
|
62
71
|
* Fixed-width numbers for tabular data
|
|
63
72
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/eui",
|
|
3
3
|
"description": "Elastic UI Component Library",
|
|
4
|
-
"version": "109.
|
|
4
|
+
"version": "109.2.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "lib",
|
|
7
7
|
"module": "es",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"directory": "packages/eui"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@elastic/eui-theme-common": "7.
|
|
55
|
+
"@elastic/eui-theme-common": "7.1.0",
|
|
56
56
|
"@elastic/prismjs-esql": "^1.1.2",
|
|
57
57
|
"@hello-pangea/dnd": "^16.6.0",
|
|
58
58
|
"@types/lodash": "^4.14.202",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"@cypress/webpack-dev-server": "^1.7.0",
|
|
107
107
|
"@elastic/charts": "^64.1.0",
|
|
108
108
|
"@elastic/datemath": "^5.0.3",
|
|
109
|
-
"@elastic/eui-theme-borealis": "5.
|
|
109
|
+
"@elastic/eui-theme-borealis": "5.1.0",
|
|
110
110
|
"@emotion/babel-preset-css-prop": "^11.11.0",
|
|
111
111
|
"@emotion/cache": "^11.11.0",
|
|
112
112
|
"@emotion/css": "^11.11.0",
|
|
@@ -256,7 +256,7 @@
|
|
|
256
256
|
},
|
|
257
257
|
"peerDependencies": {
|
|
258
258
|
"@elastic/datemath": "^5.0.2",
|
|
259
|
-
"@elastic/eui-theme-borealis": "5.
|
|
259
|
+
"@elastic/eui-theme-borealis": "5.1.0",
|
|
260
260
|
"@emotion/css": "11.x",
|
|
261
261
|
"@emotion/react": "11.x",
|
|
262
262
|
"@types/react": "^17.0 || ^18.0",
|
|
@@ -38,7 +38,7 @@ var _delay_render = require("../delay_render");
|
|
|
38
38
|
var _accessibility2 = require("../../services/accessibility");
|
|
39
39
|
var _basic_table = require("./basic_table.styles");
|
|
40
40
|
var _react2 = require("@emotion/react");
|
|
41
|
-
var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout"],
|
|
41
|
+
var _excluded = ["className", "loading", "items", "itemId", "columns", "pagination", "sorting", "selection", "onChange", "error", "noItemsMessage", "compressed", "itemIdToExpandedRowMap", "responsiveBreakpoint", "rowProps", "cellProps", "tableCaption", "rowHeader", "tableLayout", "hasBackground"],
|
|
42
42
|
_excluded2 = ["align", "render", "dataType", "isExpander", "textOnly", "name", "field", "description", "sortable", "footer", "mobileOptions", "nameTooltip"];
|
|
43
43
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
44
44
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -362,6 +362,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
362
362
|
tableCaption = _this$props2.tableCaption,
|
|
363
363
|
rowHeader = _this$props2.rowHeader,
|
|
364
364
|
tableLayout = _this$props2.tableLayout,
|
|
365
|
+
hasBackground = _this$props2.hasBackground,
|
|
365
366
|
rest = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
366
367
|
var classes = (0, _classnames.default)('euiBasicTable', {
|
|
367
368
|
'euiBasicTable-loading': loading
|
|
@@ -379,6 +380,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
379
380
|
compressed = _this$props3.compressed,
|
|
380
381
|
responsiveBreakpoint = _this$props3.responsiveBreakpoint,
|
|
381
382
|
tableLayout = _this$props3.tableLayout,
|
|
383
|
+
hasBackground = _this$props3.hasBackground,
|
|
382
384
|
loading = _this$props3.loading;
|
|
383
385
|
return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_table.EuiTableHeaderMobile, {
|
|
384
386
|
responsiveBreakpoint: responsiveBreakpoint
|
|
@@ -387,6 +389,7 @@ var EuiBasicTable = exports.EuiBasicTable = /*#__PURE__*/function (_Component) {
|
|
|
387
389
|
tableLayout: tableLayout,
|
|
388
390
|
responsiveBreakpoint: responsiveBreakpoint,
|
|
389
391
|
compressed: compressed,
|
|
392
|
+
hasBackground: hasBackground,
|
|
390
393
|
css: loading && _basic_table.safariLoadingWorkaround
|
|
391
394
|
}, this.renderTableCaption(), this.renderTableHead(), this.renderTableBody(), this.renderTableFooter())));
|
|
392
395
|
}
|
|
@@ -144,6 +144,7 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
144
144
|
popoverProps: _propTypes.default.shape({
|
|
145
145
|
/**
|
|
146
146
|
* Alignment of the popover and arrow relative to the button
|
|
147
|
+
* @default downLeft
|
|
147
148
|
*/
|
|
148
149
|
anchorPosition: _propTypes.default.any,
|
|
149
150
|
/**
|
|
@@ -165,6 +166,7 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
165
166
|
focusTrapProps: _propTypes.default.any,
|
|
166
167
|
/**
|
|
167
168
|
* Show arrow indicating to originating button
|
|
169
|
+
* @default false
|
|
168
170
|
*/
|
|
169
171
|
hasArrow: _propTypes.default.bool,
|
|
170
172
|
/**
|
|
@@ -257,6 +259,7 @@ EuiBreadcrumbContent.propTypes = {
|
|
|
257
259
|
zIndex: _propTypes.default.number,
|
|
258
260
|
/**
|
|
259
261
|
* Distance away from the anchor that the popover will render
|
|
262
|
+
* @default 4 (0 when `hasArrow=true`)
|
|
260
263
|
*/
|
|
261
264
|
offset: _propTypes.default.number,
|
|
262
265
|
/**
|
|
@@ -47,6 +47,6 @@ var _highContrastStyles = function _highContrastStyles(euiThemeContext, compress
|
|
|
47
47
|
var euiTheme = euiThemeContext.euiTheme;
|
|
48
48
|
return (0, _high_contrast.highContrastModeStyles)(euiThemeContext, {
|
|
49
49
|
preferred: compressed ? "\n .euiButtonGroupButton {\n border: none;\n }\n " : '',
|
|
50
|
-
forced: "\n .euiButtonGroupButton-isSelected {\n ".concat((0, _high_contrast.preventForcedColors)(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n\n &:is(:hover, :focus):not(
|
|
50
|
+
forced: "\n .euiButtonGroupButton-isSelected {\n ".concat((0, _high_contrast.preventForcedColors)(euiThemeContext), "\n color: ").concat(euiTheme.colors.emptyShade, ";\n background-color: ").concat(euiTheme.colors.fullShade, ";\n\n &:is(:hover, :focus):not(").concat(_global_styling.euiDisabledSelector, ") {\n &::before {\n border-color: ").concat(euiTheme.colors.textInverse, ";\n }\n }\n }\n\n .euiButtonGroupButton:is(").concat(_global_styling.euiDisabledSelector, ") {\n opacity: 0.5;\n }\n ")
|
|
51
51
|
});
|
|
52
52
|
};
|
|
@@ -89,7 +89,7 @@ var euiButtonGroupButtonStyles = exports.euiButtonGroupButtonStyles = function e
|
|
|
89
89
|
},
|
|
90
90
|
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', compressedButtonHeight), " line-height:", compressedButtonHeight, ";font-weight:", euiTheme.font.weight.medium, ";padding:0;margin:", euiTheme.size.xxs, ";border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
|
|
91
91
|
return x / 2;
|
|
92
|
-
}), ";&+.euiButtonGroupButton{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";}&:is(", selectedSelectors, "):not(
|
|
92
|
+
}), ";&+.euiButtonGroupButton{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";}&:is(", selectedSelectors, "):not(", _global_styling.euiDisabledSelector, "){border:none;", (0, _global_styling.highContrastModeStyles)(euiThemeContext, {
|
|
93
93
|
forced: "\n /* use inset focus outline to ensure visibility, same as custom hover.\n NOTE: temp solution - this will be revisited once we handle global focus styles */\n &:focus-visible {\n outline-color: ".concat(euiTheme.colors.textInverse, ";\n /* has to be inset due to overflow: hidden */\n outline-offset: -").concat((0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
|
|
94
94
|
return x * 3;
|
|
95
95
|
}), ";\n }\n ")
|
|
@@ -105,10 +105,16 @@ var EuiAbsoluteTab = exports.EuiAbsoluteTab = function EuiAbsoluteTab(_ref) {
|
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
// We can be forgiving for `dateFormat` if we are certain
|
|
109
|
+
// we're not expecting any of the other formats allowed;
|
|
110
|
+
// otherwise we can get valid but inaccurate results e.g.
|
|
111
|
+
// `1970-01-01` -> `Jan 19, 1970 @ 01:01:00.000`
|
|
112
|
+
var strictModeForPassedFormat = (0, _moment.default)(textInputValue, ALLOWED_USER_DATE_FORMATS, true).isValid();
|
|
113
|
+
|
|
108
114
|
// Attempt to parse with passed `dateFormat` and `locale`
|
|
109
115
|
var _valueAsMoment = (0, _moment.default)(textInputValue, dateFormat, typeof locale === 'string' ? locale : 'en',
|
|
110
116
|
// Narrow the union type to string
|
|
111
|
-
|
|
117
|
+
strictModeForPassedFormat);
|
|
112
118
|
var dateIsValid = _valueAsMoment.isValid();
|
|
113
119
|
|
|
114
120
|
// If not valid, try a few other standardized formats
|