@elastic/eui 93.2.0 → 93.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_dark.css +3 -0
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +3 -0
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/breadcrumbs/breadcrumb.js +9 -6
- package/es/components/breadcrumbs/breadcrumbs.js +4 -2
- package/es/components/button/button_display/_button_display.js +2 -3
- package/es/components/button/button_empty/button_empty.js +2 -3
- package/es/components/button/button_group/button_group.js +3 -5
- package/es/components/button/button_group/button_group.styles.js +10 -13
- package/es/components/button/button_icon/button_icon.js +4 -5
- package/es/components/button/button_icon/button_icon.styles.js +11 -3
- package/es/components/datagrid/body/cell/data_grid_cell.js +7 -3
- package/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +4 -2
- package/es/components/datagrid/body/data_grid_body.js +1 -0
- package/es/components/datagrid/body/data_grid_body_custom.js +3 -0
- package/es/components/datagrid/body/data_grid_body_virtualized.js +3 -0
- package/es/components/datagrid/body/data_grid_row_manager.js +1 -1
- package/es/components/datagrid/data_grid.js +3 -1
- package/es/components/facet/facet_button.styles.js +1 -2
- package/es/components/header/header_breadcrumbs/header_breadcrumbs.js +4 -2
- package/es/components/icon/icon.js +13 -16
- package/es/components/icon/icon.styles.js +6 -9
- package/es/components/link/external_link_icon.js +11 -8
- package/es/components/link/link.js +2 -3
- package/es/components/link/link.styles.js +4 -10
- package/es/components/page/page_header/page_header_content.js +4 -2
- package/es/components/progress/progress.styles.js +2 -2
- package/es/components/skeleton/skeleton_circle.js +2 -3
- package/es/components/skeleton/skeleton_rectangle.js +2 -3
- package/es/components/skeleton/skeleton_text.js +16 -12
- package/es/components/skeleton/skeleton_title.js +2 -3
- package/es/components/text/text.js +2 -3
- package/es/components/text/text_align.js +1 -2
- package/es/components/text/text_align.styles.js +5 -7
- package/es/components/text/text_color.js +2 -3
- package/es/components/title/title.js +2 -3
- package/es/components/title/title.styles.js +0 -7
- package/es/global_styling/mixins/_typography.js +17 -6
- package/es/services/theme/index.js +1 -1
- package/es/services/theme/style_memoization.js +47 -14
- package/es/themes/amsterdam/global_styling/mixins/button.js +47 -24
- package/eui.d.ts +46 -37
- package/i18ntokens.json +36 -36
- package/lib/components/breadcrumbs/breadcrumb.js +9 -6
- package/lib/components/breadcrumbs/breadcrumbs.js +4 -2
- package/lib/components/button/button_display/_button_display.js +1 -2
- package/lib/components/button/button_empty/button_empty.js +1 -2
- package/lib/components/button/button_group/button_group.js +2 -4
- package/lib/components/button/button_group/button_group.styles.js +10 -13
- package/lib/components/button/button_icon/button_icon.js +3 -4
- package/lib/components/button/button_icon/button_icon.styles.js +10 -2
- package/lib/components/datagrid/body/cell/data_grid_cell.js +7 -3
- package/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +4 -2
- package/lib/components/datagrid/body/data_grid_body.js +1 -0
- package/lib/components/datagrid/body/data_grid_body_custom.js +3 -0
- package/lib/components/datagrid/body/data_grid_body_virtualized.js +3 -0
- package/lib/components/datagrid/body/data_grid_row_manager.js +1 -1
- package/lib/components/datagrid/data_grid.js +3 -1
- package/lib/components/facet/facet_button.styles.js +1 -2
- package/lib/components/header/header_breadcrumbs/header_breadcrumbs.js +4 -2
- package/lib/components/icon/icon.js +12 -15
- package/lib/components/icon/icon.styles.js +5 -8
- package/lib/components/link/external_link_icon.js +10 -7
- package/lib/components/link/link.js +1 -2
- package/lib/components/link/link.styles.js +6 -14
- package/lib/components/page/page_header/page_header_content.js +4 -2
- package/lib/components/progress/progress.styles.js +1 -1
- package/lib/components/skeleton/skeleton_circle.js +1 -2
- package/lib/components/skeleton/skeleton_rectangle.js +1 -2
- package/lib/components/skeleton/skeleton_text.js +18 -11
- package/lib/components/skeleton/skeleton_title.js +1 -2
- package/lib/components/text/text.js +1 -2
- package/lib/components/text/text_align.js +1 -2
- package/lib/components/text/text_align.styles.js +5 -7
- package/lib/components/text/text_color.js +1 -2
- package/lib/components/title/title.js +1 -2
- package/lib/components/title/title.styles.js +2 -10
- package/lib/global_styling/mixins/_typography.js +27 -19
- package/lib/services/theme/index.js +6 -0
- package/lib/services/theme/style_memoization.js +49 -16
- package/lib/themes/amsterdam/global_styling/mixins/button.js +49 -25
- package/optimize/es/components/breadcrumbs/breadcrumb.js +5 -4
- package/optimize/es/components/button/button_display/_button_display.js +2 -3
- package/optimize/es/components/button/button_empty/button_empty.js +2 -3
- package/optimize/es/components/button/button_group/button_group.js +3 -5
- package/optimize/es/components/button/button_group/button_group.styles.js +10 -13
- package/optimize/es/components/button/button_icon/button_icon.js +4 -5
- package/optimize/es/components/button/button_icon/button_icon.styles.js +8 -3
- package/optimize/es/components/datagrid/body/cell/data_grid_cell.js +5 -3
- package/optimize/es/components/datagrid/body/cell/data_grid_cell_wrapper.js +4 -2
- package/optimize/es/components/datagrid/body/data_grid_body_custom.js +2 -0
- package/optimize/es/components/datagrid/body/data_grid_body_virtualized.js +2 -0
- package/optimize/es/components/datagrid/body/data_grid_row_manager.js +1 -1
- package/optimize/es/components/datagrid/data_grid.js +3 -1
- package/optimize/es/components/facet/facet_button.styles.js +1 -2
- package/optimize/es/components/icon/icon.js +13 -16
- package/optimize/es/components/icon/icon.styles.js +6 -9
- package/optimize/es/components/link/external_link_icon.js +11 -8
- package/optimize/es/components/link/link.js +2 -3
- package/optimize/es/components/link/link.styles.js +4 -10
- package/optimize/es/components/progress/progress.styles.js +2 -2
- package/optimize/es/components/skeleton/skeleton_circle.js +2 -3
- package/optimize/es/components/skeleton/skeleton_rectangle.js +2 -3
- package/optimize/es/components/skeleton/skeleton_text.js +16 -12
- package/optimize/es/components/skeleton/skeleton_title.js +2 -3
- package/optimize/es/components/text/text.js +2 -3
- package/optimize/es/components/text/text_align.js +1 -2
- package/optimize/es/components/text/text_align.styles.js +5 -7
- package/optimize/es/components/text/text_color.js +2 -3
- package/optimize/es/components/title/title.js +2 -3
- package/optimize/es/components/title/title.styles.js +0 -7
- package/optimize/es/global_styling/mixins/_typography.js +14 -6
- package/optimize/es/services/theme/index.js +1 -1
- package/optimize/es/services/theme/style_memoization.js +47 -14
- package/optimize/es/themes/amsterdam/global_styling/mixins/button.js +47 -24
- package/optimize/lib/components/breadcrumbs/breadcrumb.js +5 -4
- package/optimize/lib/components/button/button_display/_button_display.js +1 -2
- package/optimize/lib/components/button/button_empty/button_empty.js +1 -2
- package/optimize/lib/components/button/button_group/button_group.js +2 -4
- package/optimize/lib/components/button/button_group/button_group.styles.js +10 -13
- package/optimize/lib/components/button/button_icon/button_icon.js +3 -4
- package/optimize/lib/components/button/button_icon/button_icon.styles.js +8 -2
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell.js +5 -3
- package/optimize/lib/components/datagrid/body/cell/data_grid_cell_wrapper.js +4 -2
- package/optimize/lib/components/datagrid/body/data_grid_body_custom.js +2 -0
- package/optimize/lib/components/datagrid/body/data_grid_body_virtualized.js +2 -0
- package/optimize/lib/components/datagrid/body/data_grid_row_manager.js +1 -1
- package/optimize/lib/components/datagrid/data_grid.js +3 -1
- package/optimize/lib/components/facet/facet_button.styles.js +1 -2
- package/optimize/lib/components/icon/icon.js +12 -15
- package/optimize/lib/components/icon/icon.styles.js +5 -8
- package/optimize/lib/components/link/external_link_icon.js +10 -7
- package/optimize/lib/components/link/link.js +1 -2
- package/optimize/lib/components/link/link.styles.js +6 -14
- package/optimize/lib/components/progress/progress.styles.js +1 -1
- package/optimize/lib/components/skeleton/skeleton_circle.js +1 -2
- package/optimize/lib/components/skeleton/skeleton_rectangle.js +1 -2
- package/optimize/lib/components/skeleton/skeleton_text.js +18 -11
- package/optimize/lib/components/skeleton/skeleton_title.js +1 -2
- package/optimize/lib/components/text/text.js +1 -2
- package/optimize/lib/components/text/text_align.js +1 -2
- package/optimize/lib/components/text/text_align.styles.js +5 -7
- package/optimize/lib/components/text/text_color.js +1 -2
- package/optimize/lib/components/title/title.js +1 -2
- package/optimize/lib/components/title/title.styles.js +2 -10
- package/optimize/lib/global_styling/mixins/_typography.js +25 -19
- package/optimize/lib/services/theme/index.js +6 -0
- package/optimize/lib/services/theme/style_memoization.js +49 -16
- package/optimize/lib/themes/amsterdam/global_styling/mixins/button.js +49 -26
- package/package.json +3 -3
- package/src/components/datagrid/_data_grid_data_row.scss +4 -0
- package/test-env/components/breadcrumbs/breadcrumb.js +9 -6
- package/test-env/components/breadcrumbs/breadcrumbs.js +4 -2
- package/test-env/components/button/button_display/_button_display.js +1 -2
- package/test-env/components/button/button_empty/button_empty.js +1 -2
- package/test-env/components/button/button_group/button_group.js +2 -4
- package/test-env/components/button/button_group/button_group.styles.js +10 -13
- package/test-env/components/button/button_icon/button_icon.js +3 -4
- package/test-env/components/button/button_icon/button_icon.styles.js +8 -2
- package/test-env/components/datagrid/body/cell/data_grid_cell.js +7 -3
- package/test-env/components/datagrid/body/cell/data_grid_cell_wrapper.js +4 -2
- package/test-env/components/datagrid/body/data_grid_body.js +1 -0
- package/test-env/components/datagrid/body/data_grid_body_custom.js +3 -0
- package/test-env/components/datagrid/body/data_grid_body_virtualized.js +3 -0
- package/test-env/components/datagrid/body/data_grid_row_manager.js +1 -1
- package/test-env/components/datagrid/data_grid.js +3 -1
- package/test-env/components/facet/facet_button.styles.js +1 -2
- package/test-env/components/header/header_breadcrumbs/header_breadcrumbs.js +4 -2
- package/test-env/components/icon/icon.styles.js +5 -8
- package/test-env/components/link/external_link_icon.js +10 -7
- package/test-env/components/link/link.js +1 -2
- package/test-env/components/link/link.styles.js +6 -14
- package/test-env/components/page/page_header/page_header_content.js +4 -2
- package/test-env/components/progress/progress.styles.js +1 -1
- package/test-env/components/skeleton/skeleton_circle.js +1 -2
- package/test-env/components/skeleton/skeleton_rectangle.js +1 -2
- package/test-env/components/skeleton/skeleton_text.js +18 -11
- package/test-env/components/skeleton/skeleton_title.js +1 -2
- package/test-env/components/text/text.js +1 -2
- package/test-env/components/text/text_align.js +1 -2
- package/test-env/components/text/text_align.styles.js +5 -7
- package/test-env/components/text/text_color.js +1 -2
- package/test-env/components/title/title.js +1 -2
- package/test-env/components/title/title.styles.js +2 -10
- package/test-env/global_styling/mixins/_typography.js +25 -19
- package/test-env/services/theme/index.js +6 -0
- package/test-env/services/theme/style_memoization.js +49 -16
- package/test-env/themes/amsterdam/global_styling/mixins/button.js +49 -26
|
@@ -47,10 +47,8 @@ var EuiButtonGroup = function EuiButtonGroup(_ref) {
|
|
|
47
47
|
_ref$type = _ref.type,
|
|
48
48
|
type = _ref$type === void 0 ? 'single' : _ref$type,
|
|
49
49
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var wrapperCssStyles = [wrapperStyles.euiButtonGroup, isFullWidth && wrapperStyles.fullWidth];
|
|
53
|
-
var styles = (0, _button_group.euiButtonGroupButtonsStyles)(euiTheme);
|
|
50
|
+
var wrapperCssStyles = [_button_group.euiButtonGroupStyles.euiButtonGroup, isFullWidth && _button_group.euiButtonGroupStyles.fullWidth];
|
|
51
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_button_group.euiButtonGroupButtonsStyles);
|
|
54
52
|
var cssStyles = [styles.euiButtonGroup__buttons, isFullWidth && styles.fullWidth, styles[buttonSize]];
|
|
55
53
|
var classes = (0, _classnames.default)('euiButtonGroup', {
|
|
56
54
|
'euiButtonGroup-isDisabled': isDisabled
|
|
@@ -14,19 +14,16 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
14
14
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
15
|
* Side Public License, v 1.
|
|
16
16
|
*/
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
euiButtonGroup: /*#__PURE__*/(0, _react.css)("display:inline-block;", (0, _global_styling.logicalCSS)('max-width', '100%'), " position:relative;;label:euiButtonGroup;"),
|
|
28
|
-
fullWidth: _ref
|
|
29
|
-
};
|
|
17
|
+
var euiButtonGroupStyles = {
|
|
18
|
+
euiButtonGroup: /*#__PURE__*/(0, _react.css)("display:inline-block;", (0, _global_styling.logicalCSS)('max-width', '100%'), " position:relative;;label:euiButtonGroup;"),
|
|
19
|
+
fullWidth: process.env.NODE_ENV === "production" ? {
|
|
20
|
+
name: "jl0hie-fullWidth",
|
|
21
|
+
styles: "display:block;label:fullWidth;"
|
|
22
|
+
} : {
|
|
23
|
+
name: "jl0hie-fullWidth",
|
|
24
|
+
styles: "display:block;label:fullWidth;",
|
|
25
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
26
|
+
}
|
|
30
27
|
};
|
|
31
28
|
exports.euiButtonGroupStyles = euiButtonGroupStyles;
|
|
32
29
|
var euiButtonGroupButtonsStyles = function euiButtonGroupButtonsStyles(euiThemeContext) {
|
|
@@ -51,7 +51,6 @@ var EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
51
51
|
isSelected = _ref.isSelected,
|
|
52
52
|
isLoading = _ref.isLoading,
|
|
53
53
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
54
|
-
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
55
54
|
var isDisabled = (0, _button_display.isButtonDisabled)({
|
|
56
55
|
isDisabled: _isDisabled || disabled,
|
|
57
56
|
href: href,
|
|
@@ -66,9 +65,9 @@ var EuiButtonIcon = function EuiButtonIcon(_ref) {
|
|
|
66
65
|
display: display
|
|
67
66
|
});
|
|
68
67
|
var buttonFocusStyle = (0, _button.useEuiButtonFocusCSS)();
|
|
69
|
-
var emptyHoverStyles =
|
|
70
|
-
var styles = (0, _button_icon.euiButtonIconStyles)
|
|
71
|
-
var cssStyles = [styles.euiButtonIcon, styles[size], buttonColorStyles[isDisabled ? 'disabled' : color], buttonFocusStyle, emptyHoverStyles, isDisabled && styles.isDisabled];
|
|
68
|
+
var emptyHoverStyles = (0, _services.useEuiMemoizedStyles)(_button_icon._emptyHoverStyles);
|
|
69
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_button_icon.euiButtonIconStyles);
|
|
70
|
+
var cssStyles = [styles.euiButtonIcon, styles[size], buttonColorStyles[isDisabled ? 'disabled' : color], buttonFocusStyle, display === 'empty' && !isDisabled && emptyHoverStyles[color], isDisabled && styles.isDisabled];
|
|
72
71
|
var classes = (0, _classnames.default)('euiButtonIcon', className);
|
|
73
72
|
|
|
74
73
|
// Add an icon to the button if one exists.
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.euiButtonIconStyles = exports._emptyHoverStyles = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
9
|
var _react = require("@emotion/react");
|
|
8
10
|
var _global_styling = require("../../../global_styling");
|
|
9
11
|
var _button = require("../../../themes/amsterdam/global_styling/mixins/button");
|
|
10
12
|
var _button_display = require("../button_display/_button_display.styles");
|
|
13
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
15
|
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)."; } /*
|
|
12
16
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
13
17
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -35,7 +39,9 @@ var euiButtonIconStyles = function euiButtonIconStyles(euiThemeContext) {
|
|
|
35
39
|
};
|
|
36
40
|
};
|
|
37
41
|
exports.euiButtonIconStyles = euiButtonIconStyles;
|
|
38
|
-
var _emptyHoverStyles = function _emptyHoverStyles(euiThemeContext
|
|
39
|
-
return
|
|
42
|
+
var _emptyHoverStyles = function _emptyHoverStyles(euiThemeContext) {
|
|
43
|
+
return _button.BUTTON_COLORS.reduce(function (styles, color) {
|
|
44
|
+
return _objectSpread(_objectSpread({}, styles), {}, (0, _defineProperty2.default)({}, color, /*#__PURE__*/(0, _react.css)("&:hover{background-color:", (0, _button.euiButtonEmptyColor)(euiThemeContext, color).backgroundColor, ";}")));
|
|
45
|
+
}, {});
|
|
40
46
|
};
|
|
41
47
|
exports._emptyHoverStyles = _emptyHoverStyles;
|
|
@@ -30,7 +30,7 @@ var _data_grid_cell_actions = require("./data_grid_cell_actions");
|
|
|
30
30
|
var _data_grid_cell_popover = require("./data_grid_cell_popover");
|
|
31
31
|
var _focus_utils = require("./focus_utils");
|
|
32
32
|
var _react2 = require("@emotion/react");
|
|
33
|
-
var _excluded = ["renderCellValue", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "cellActions"],
|
|
33
|
+
var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "cellActions"],
|
|
34
34
|
_excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager", "pagination"],
|
|
35
35
|
_excluded3 = ["isExpandable", "style", "className", "data-test-subj"];
|
|
36
36
|
/*
|
|
@@ -48,6 +48,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
48
48
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
49
49
|
var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
50
50
|
var renderCellValue = _ref.renderCellValue,
|
|
51
|
+
cellContext = _ref.cellContext,
|
|
51
52
|
column = _ref.column,
|
|
52
53
|
setCellContentsRef = _ref.setCellContentsRef,
|
|
53
54
|
rowIndex = _ref.rowIndex,
|
|
@@ -76,7 +77,7 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
76
77
|
rowIndex: rowIndex,
|
|
77
78
|
colIndex: colIndex,
|
|
78
79
|
schema: (column === null || column === void 0 ? void 0 : column.schema) || rest.columnType
|
|
79
|
-
}, rest)));
|
|
80
|
+
}, cellContext, rest)));
|
|
80
81
|
if (cellHeightType === 'lineCount' && !isControlColumn) {
|
|
81
82
|
var lines = rowHeightUtils.getLineCount(rowHeight);
|
|
82
83
|
cellContent = (0, _react2.jsx)(_text_truncate.EuiTextBlockTruncate, {
|
|
@@ -532,6 +533,7 @@ EuiDataGridCellContent.propTypes = {
|
|
|
532
533
|
isExpandable: _propTypes.default.bool.isRequired,
|
|
533
534
|
className: _propTypes.default.string,
|
|
534
535
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
536
|
+
cellContext: _propTypes.default.any,
|
|
535
537
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
536
538
|
setRowHeight: _propTypes.default.func,
|
|
537
539
|
getRowHeight: _propTypes.default.func,
|
|
@@ -741,6 +743,7 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
741
743
|
var _this$props5 = _this.props,
|
|
742
744
|
renderCellPopover = _this$props5.renderCellPopover,
|
|
743
745
|
renderCellValue = _this$props5.renderCellValue,
|
|
746
|
+
cellContext = _this$props5.cellContext,
|
|
744
747
|
rowIndex = _this$props5.rowIndex,
|
|
745
748
|
colIndex = _this$props5.colIndex,
|
|
746
749
|
column = _this$props5.column,
|
|
@@ -761,7 +764,7 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
761
764
|
})),
|
|
762
765
|
DefaultCellPopover: _data_grid_cell_popover.DefaultCellPopover,
|
|
763
766
|
setCellPopoverProps: setCellPopoverProps
|
|
764
|
-
}), (0, _react2.jsx)(CellElement, (0, _extends2.default)({}, sharedProps, {
|
|
767
|
+
}), (0, _react2.jsx)(CellElement, (0, _extends2.default)({}, cellContext, sharedProps, {
|
|
765
768
|
setCellProps: _this.setCellProps,
|
|
766
769
|
isExpandable: true,
|
|
767
770
|
isExpanded: true,
|
|
@@ -1380,6 +1383,7 @@ EuiDataGridCell.propTypes = {
|
|
|
1380
1383
|
setCellPopoverProps: _propTypes.default.func.isRequired
|
|
1381
1384
|
}).isRequired,
|
|
1382
1385
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
1386
|
+
cellContext: _propTypes.default.any,
|
|
1383
1387
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
1384
1388
|
setRowHeight: _propTypes.default.func,
|
|
1385
1389
|
getRowHeight: _propTypes.default.func,
|
|
@@ -15,7 +15,7 @@ var _sorting = require("../../utils/sorting");
|
|
|
15
15
|
var _data_grid_cell_popover = require("./data_grid_cell_popover");
|
|
16
16
|
var _data_grid_cell = require("./data_grid_cell");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
|
-
var _excluded = ["colIndex", "visibleRowIndex", "style", "schema", "schemaDetectors", "pagination", "columns", "leadingControlColumns", "trailingControlColumns", "visibleColCount", "columnWidths", "defaultColumnWidth", "renderCellValue", "renderCellPopover", "interactiveCellId", "setRowHeight", "rowHeightsOptions", "rowHeightUtils", "rowManager"];
|
|
18
|
+
var _excluded = ["colIndex", "visibleRowIndex", "style", "schema", "schemaDetectors", "pagination", "columns", "leadingControlColumns", "trailingControlColumns", "visibleColCount", "columnWidths", "defaultColumnWidth", "renderCellValue", "cellContext", "renderCellPopover", "interactiveCellId", "setRowHeight", "rowHeightsOptions", "rowHeightUtils", "rowManager"];
|
|
19
19
|
/*
|
|
20
20
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
21
21
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -44,6 +44,7 @@ var Cell = function Cell(_ref) {
|
|
|
44
44
|
columnWidths = _ref.columnWidths,
|
|
45
45
|
defaultColumnWidth = _ref.defaultColumnWidth,
|
|
46
46
|
renderCellValue = _ref.renderCellValue,
|
|
47
|
+
cellContext = _ref.cellContext,
|
|
47
48
|
renderCellPopover = _ref.renderCellPopover,
|
|
48
49
|
interactiveCellId = _ref.interactiveCellId,
|
|
49
50
|
setRowHeight = _ref.setRowHeight,
|
|
@@ -85,7 +86,8 @@ var Cell = function Cell(_ref) {
|
|
|
85
86
|
setRowHeight: isFirstColumn ? setRowHeight : undefined,
|
|
86
87
|
rowManager: rowManager,
|
|
87
88
|
popoverContext: popoverContext,
|
|
88
|
-
pagination: pagination
|
|
89
|
+
pagination: pagination,
|
|
90
|
+
cellContext: cellContext
|
|
89
91
|
};
|
|
90
92
|
if (isLeadingControlColumn) {
|
|
91
93
|
var leadingColumn = leadingControlColumns[colIndex];
|
|
@@ -568,6 +568,7 @@ EuiDataGridBody.propTypes = {
|
|
|
568
568
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
569
569
|
}).isRequired,
|
|
570
570
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
571
|
+
cellContext: _propTypes.default.any,
|
|
571
572
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
572
573
|
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
573
574
|
renderCustomGridBody: _propTypes.default.func,
|
|
@@ -42,6 +42,7 @@ var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_ref) {
|
|
|
42
42
|
schemaDetectors = _ref.schemaDetectors,
|
|
43
43
|
visibleRows = _ref.visibleRows,
|
|
44
44
|
renderCellValue = _ref.renderCellValue,
|
|
45
|
+
cellContext = _ref.cellContext,
|
|
45
46
|
renderCellPopover = _ref.renderCellPopover,
|
|
46
47
|
renderFooterCellValue = _ref.renderFooterCellValue,
|
|
47
48
|
interactiveCellId = _ref.interactiveCellId,
|
|
@@ -131,6 +132,7 @@ var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_ref) {
|
|
|
131
132
|
columnWidths: columnWidths,
|
|
132
133
|
defaultColumnWidth: defaultColumnWidth,
|
|
133
134
|
renderCellValue: renderCellValue,
|
|
135
|
+
cellContext: cellContext,
|
|
134
136
|
renderCellPopover: renderCellPopover,
|
|
135
137
|
interactiveCellId: interactiveCellId,
|
|
136
138
|
setRowHeight: setRowHeight,
|
|
@@ -703,6 +705,7 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
703
705
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
704
706
|
}).isRequired,
|
|
705
707
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
708
|
+
cellContext: _propTypes.default.any,
|
|
706
709
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
707
710
|
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
708
711
|
renderCustomGridBody: _propTypes.default.func,
|
|
@@ -94,6 +94,7 @@ var EuiDataGridBodyVirtualized = function EuiDataGridBodyVirtualized(_ref3) {
|
|
|
94
94
|
endRow = _ref3$visibleRows.endRow,
|
|
95
95
|
visibleRowCount = _ref3$visibleRows.visibleRowCount,
|
|
96
96
|
renderCellValue = _ref3.renderCellValue,
|
|
97
|
+
cellContext = _ref3.cellContext,
|
|
97
98
|
renderCellPopover = _ref3.renderCellPopover,
|
|
98
99
|
renderFooterCellValue = _ref3.renderFooterCellValue,
|
|
99
100
|
interactiveCellId = _ref3.interactiveCellId,
|
|
@@ -295,6 +296,7 @@ var EuiDataGridBodyVirtualized = function EuiDataGridBodyVirtualized(_ref3) {
|
|
|
295
296
|
columnWidths: columnWidths,
|
|
296
297
|
defaultColumnWidth: defaultColumnWidth,
|
|
297
298
|
renderCellValue: renderCellValue,
|
|
299
|
+
cellContext: cellContext,
|
|
298
300
|
renderCellPopover: renderCellPopover,
|
|
299
301
|
interactiveCellId: interactiveCellId,
|
|
300
302
|
rowHeightsOptions: rowHeightsOptions,
|
|
@@ -841,6 +843,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
841
843
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
842
844
|
}).isRequired,
|
|
843
845
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
846
|
+
cellContext: _propTypes.default.any,
|
|
844
847
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
845
848
|
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
846
849
|
renderCustomGridBody: _propTypes.default.func,
|
|
@@ -85,7 +85,7 @@ var useRowManager = function useRowManager(_ref) {
|
|
|
85
85
|
if (rowClasses) {
|
|
86
86
|
rowIdToElements.current.forEach(function (rowElement, rowIndex) {
|
|
87
87
|
var euiClasses = Array.from(rowElement.classList).filter(function (className) {
|
|
88
|
-
return
|
|
88
|
+
return ['euiDataGridRow', 'euiDataGridRow--striped'].includes(className);
|
|
89
89
|
}).join(' ');
|
|
90
90
|
if (rowClasses[rowIndex]) {
|
|
91
91
|
rowElement.classList.value = "".concat(euiClasses, " ").concat(rowClasses[rowIndex]);
|
|
@@ -31,7 +31,7 @@ var _data_grid_schema = require("./utils/data_grid_schema");
|
|
|
31
31
|
var _ref = require("./utils/ref");
|
|
32
32
|
var _data_grid_types = require("./data_grid_types");
|
|
33
33
|
var _react2 = require("@emotion/react");
|
|
34
|
-
var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "columnVisibility", "schemaDetectors", "rowCount", "renderCellValue", "renderCellPopover", "renderFooterCellValue", "className", "gridStyle", "toolbarVisibility", "pagination", "sorting", "inMemory", "onColumnResize", "minSizeForControls", "height", "width", "rowHeightsOptions", "virtualizationOptions", "renderCustomGridBody", "renderCustomToolbar"],
|
|
34
|
+
var _excluded = ["leadingControlColumns", "trailingControlColumns", "columns", "columnVisibility", "schemaDetectors", "rowCount", "renderCellValue", "cellContext", "renderCellPopover", "renderFooterCellValue", "className", "gridStyle", "toolbarVisibility", "pagination", "sorting", "inMemory", "onColumnResize", "minSizeForControls", "height", "width", "rowHeightsOptions", "virtualizationOptions", "renderCustomGridBody", "renderCustomToolbar"],
|
|
35
35
|
_excluded2 = ["focusProps"];
|
|
36
36
|
/*
|
|
37
37
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -84,6 +84,7 @@ var EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forward
|
|
|
84
84
|
schemaDetectors = props.schemaDetectors,
|
|
85
85
|
rowCount = props.rowCount,
|
|
86
86
|
renderCellValue = props.renderCellValue,
|
|
87
|
+
cellContext = props.cellContext,
|
|
87
88
|
renderCellPopover = props.renderCellPopover,
|
|
88
89
|
renderFooterCellValue = props.renderFooterCellValue,
|
|
89
90
|
className = props.className,
|
|
@@ -353,6 +354,7 @@ var EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forward
|
|
|
353
354
|
schemaDetectors: allSchemaDetectors,
|
|
354
355
|
pagination: pagination,
|
|
355
356
|
renderCellValue: renderCellValue,
|
|
357
|
+
cellContext: cellContext,
|
|
356
358
|
renderCellPopover: renderCellPopover,
|
|
357
359
|
renderFooterCellValue: renderFooterCellValue,
|
|
358
360
|
rowCount: rowCount,
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiFacetButtonTextStyles = exports.euiFacetButtonStyles = exports.euiFacetButtonQuantityStyles = exports.euiFacetButtonLoadingSpinnerStyles = exports.euiFacetButtonIconStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
|
-
var _link = require("../link/link.styles");
|
|
10
9
|
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
10
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
11
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -18,7 +17,7 @@ var euiFacetButtonStyles = function euiFacetButtonStyles(_ref3) {
|
|
|
18
17
|
var euiTheme = _ref3.euiTheme;
|
|
19
18
|
return {
|
|
20
19
|
// Base
|
|
21
|
-
euiFacetButton: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), " &:hover,&:focus{
|
|
20
|
+
euiFacetButton: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), " &:not(:disabled){&:hover,&:focus{text-decoration:none;.euiFacetButton__text{text-decoration:underline;}}&:focus .euiFacetButton__text{text-decoration-thickness:", euiTheme.border.width.thick, ";}}&:disabled{color:", euiTheme.colors.disabledText, ";pointer-events:none;};label:euiFacetButton;")
|
|
22
21
|
};
|
|
23
22
|
};
|
|
24
23
|
exports.euiFacetButtonStyles = euiFacetButtonStyles;
|
|
@@ -94,12 +94,14 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
94
94
|
*/
|
|
95
95
|
"aria-current": _propTypes.default.any,
|
|
96
96
|
/**
|
|
97
|
-
* Creates a breadcrumb that toggles a popover dialog
|
|
97
|
+
* Creates a breadcrumb that toggles a popover dialog. Takes any rendered node(s),
|
|
98
|
+
* or a render function that will pass callback allowing you to close the
|
|
99
|
+
* breadcrumb popover from within your popover content.
|
|
98
100
|
*
|
|
99
101
|
* If passed, both `href` and `onClick` will be ignored - the breadcrumb's
|
|
100
102
|
* click behavior should only trigger a popover.
|
|
101
103
|
*/
|
|
102
|
-
popoverContent: _propTypes.default.node,
|
|
104
|
+
popoverContent: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.func.isRequired]),
|
|
103
105
|
/**
|
|
104
106
|
* Allows customizing the popover if necessary. Accepts any props that
|
|
105
107
|
* [EuiPopover](/#/layout/popover) accepts, except for props that control state.
|
|
@@ -16,9 +16,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
16
16
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
17
|
* Side Public License, v 1.
|
|
18
18
|
*/
|
|
19
|
-
var iconSize = function iconSize(size) {
|
|
20
|
-
return "\n ".concat((0, _global_styling.logicalCSS)('width', size), ";\n ").concat((0, _global_styling.logicalCSS)('height', size), ";\n ");
|
|
21
|
-
};
|
|
22
19
|
var iconLoadingOpacity = 0.05;
|
|
23
20
|
exports.iconLoadingOpacity = iconLoadingOpacity;
|
|
24
21
|
var iconLoading = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: ", ";\n }\n\n 100% {\n opacity: 1;\n }\n"])), iconLoadingOpacity);
|
|
@@ -58,11 +55,11 @@ var euiIconStyles = function euiIconStyles(_ref3) {
|
|
|
58
55
|
logoElasticOutline: _ref,
|
|
59
56
|
// Sizes
|
|
60
57
|
original: /*#__PURE__*/(0, _react.css)(";label:original;"),
|
|
61
|
-
s: /*#__PURE__*/(0, _react.css)(
|
|
62
|
-
m: /*#__PURE__*/(0, _react.css)(
|
|
63
|
-
l: /*#__PURE__*/(0, _react.css)(
|
|
64
|
-
xl: /*#__PURE__*/(0, _react.css)(
|
|
65
|
-
xxl: /*#__PURE__*/(0, _react.css)(
|
|
58
|
+
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.m), ";label:s;"),
|
|
59
|
+
m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.base), ";label:m;"),
|
|
60
|
+
l: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.l), ";label:l;"),
|
|
61
|
+
xl: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.xl), ";label:xl;"),
|
|
62
|
+
xxl: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.xxl), ";label:xxl;"),
|
|
66
63
|
// Variants
|
|
67
64
|
// App icons are two-toned. This provides the base color.
|
|
68
65
|
app: /*#__PURE__*/(0, _react.css)("fill:", euiTheme.colors.text, ";.euiIcon__fillSecondary{fill:", euiTheme.colors.successText, ";};label:app;"),
|
|
@@ -27,16 +27,19 @@ var _excluded = ["target", "external"];
|
|
|
27
27
|
* DRY util for indicating external links both via icon and to
|
|
28
28
|
* screen readers. Used internally by at EuiLink and EuiListGroupItem
|
|
29
29
|
*/
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
var iconStyle = function iconStyle(_ref) {
|
|
31
|
+
var euiTheme = _ref.euiTheme;
|
|
32
|
+
return (0, _global_styling.logicalStyle)('margin-left', euiTheme.size.xs);
|
|
33
|
+
};
|
|
34
|
+
var EuiExternalLinkIcon = function EuiExternalLinkIcon(_ref2) {
|
|
35
|
+
var target = _ref2.target,
|
|
36
|
+
external = _ref2.external,
|
|
37
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
38
|
+
var iconCssStyle = (0, _services.useEuiMemoizedStyles)(iconStyle);
|
|
36
39
|
var showExternalLinkIcon = target === '_blank' && external !== false || external === true;
|
|
37
40
|
var iconAriaLabel = (0, _i18n.useEuiI18n)('euiExternalLinkIcon.ariaLabel', 'External link');
|
|
38
41
|
return (0, _react2.jsx)(_react.default.Fragment, null, showExternalLinkIcon && (0, _react2.jsx)(_icon.EuiIcon, (0, _extends2.default)({
|
|
39
|
-
css:
|
|
42
|
+
css: iconCssStyle,
|
|
40
43
|
"aria-label": iconAriaLabel,
|
|
41
44
|
size: "s",
|
|
42
45
|
type: "popout"
|
|
@@ -45,8 +45,7 @@ var EuiLink = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
45
45
|
onClick = _ref.onClick,
|
|
46
46
|
_disabled = _ref.disabled,
|
|
47
47
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
|
-
var
|
|
49
|
-
var styles = (0, _link.euiLinkStyles)(euiTheme);
|
|
48
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_link.euiLinkStyles);
|
|
50
49
|
var cssStyles = [styles.euiLink];
|
|
51
50
|
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
52
51
|
var disabled = _disabled || !isHrefValid;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.euiLinkStyles = exports.
|
|
6
|
+
exports.euiLinkStyles = exports.euiLinkCSS = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
9
|
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)."; } /*
|
|
@@ -13,20 +13,9 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
13
13
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
|
-
var _colorCSS = function _colorCSS(color) {
|
|
17
|
-
return "\n color: ".concat(color, ";\n\n &:target {\n color: darken(").concat(color, ", 10%);\n }\n ");
|
|
18
|
-
};
|
|
19
|
-
var euiLinkHoverCSS = function euiLinkHoverCSS() {
|
|
20
|
-
return "\n text-decoration: underline;\n ";
|
|
21
|
-
};
|
|
22
|
-
exports.euiLinkHoverCSS = euiLinkHoverCSS;
|
|
23
|
-
var euiLinkFocusCSS = function euiLinkFocusCSS(euiTheme) {
|
|
24
|
-
return "\n text-decoration: underline;\n text-decoration-thickness: ".concat(euiTheme.border.width.thick, ";\n ");
|
|
25
|
-
};
|
|
26
|
-
exports.euiLinkFocusCSS = euiLinkFocusCSS;
|
|
27
16
|
var euiLinkCSS = function euiLinkCSS(euiThemeContext) {
|
|
28
17
|
var euiTheme = euiThemeContext.euiTheme;
|
|
29
|
-
return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n ").concat((0, _global_styling.logicalTextAlignCSS)('left'), "\n\n &:hover {\n
|
|
18
|
+
return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n ").concat((0, _global_styling.logicalTextAlignCSS)('left'), "\n\n &:hover {\n text-decoration: underline;\n }\n\n &:focus {\n ").concat((0, _global_styling.euiFocusRing)(euiThemeContext, 'outset'), "\n text-decoration: underline;\n text-decoration-thickness: ").concat(euiTheme.border.width.thick, ";\n }\n ");
|
|
30
19
|
};
|
|
31
20
|
exports.euiLinkCSS = euiLinkCSS;
|
|
32
21
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -53,4 +42,7 @@ var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
|
|
|
53
42
|
text: /*#__PURE__*/(0, _react.css)(_colorCSS(euiTheme.colors.text), ";label:text;")
|
|
54
43
|
};
|
|
55
44
|
};
|
|
56
|
-
exports.euiLinkStyles = euiLinkStyles;
|
|
45
|
+
exports.euiLinkStyles = euiLinkStyles;
|
|
46
|
+
var _colorCSS = function _colorCSS(color) {
|
|
47
|
+
return "\n color: ".concat(color, ";\n\n &:target {\n color: darken(").concat(color, ", 10%);\n }\n ");
|
|
48
|
+
};
|
|
@@ -301,12 +301,14 @@ EuiPageHeaderContent.propTypes = {
|
|
|
301
301
|
*/
|
|
302
302
|
"aria-current": _propTypes.default.any,
|
|
303
303
|
/**
|
|
304
|
-
* Creates a breadcrumb that toggles a popover dialog
|
|
304
|
+
* Creates a breadcrumb that toggles a popover dialog. Takes any rendered node(s),
|
|
305
|
+
* or a render function that will pass callback allowing you to close the
|
|
306
|
+
* breadcrumb popover from within your popover content.
|
|
305
307
|
*
|
|
306
308
|
* If passed, both `href` and `onClick` will be ignored - the breadcrumb's
|
|
307
309
|
* click behavior should only trigger a popover.
|
|
308
310
|
*/
|
|
309
|
-
popoverContent: _propTypes.default.node,
|
|
311
|
+
popoverContent: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.func.isRequired]),
|
|
310
312
|
/**
|
|
311
313
|
* Allows customizing the popover if necessary. Accepts any props that
|
|
312
314
|
* [EuiPopover](/#/layout/popover) accepts, except for props that control state.
|
|
@@ -67,7 +67,7 @@ var euiProgressStyles = function euiProgressStyles(_ref3, isNative) {
|
|
|
67
67
|
// https://css-tricks.com/html5-progress-element/
|
|
68
68
|
// Good resource if you need to work in here. There's some gotchas with
|
|
69
69
|
// dealing with cross-browser progress bars.
|
|
70
|
-
native: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), " appearance:none;border:none;border-radius:", euiTheme.size.s, ";&::-webkit-progress-bar{background-color:", euiTheme.colors.lightShade, ";}", crossBrowserProgressValue(
|
|
70
|
+
native: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), " appearance:none;border:none;border-radius:", euiTheme.size.s, ";&::-webkit-progress-bar{background-color:", euiTheme.colors.lightShade, ";}", _global_styling.euiCanAnimate, "{/* Note: FF/Mozilla doesn't actually support animating the native progress bar\n @see https://bugzilla.mozilla.org/show_bug.cgi?id=662351 */", crossBrowserProgressValue("transition: width ".concat(euiTheme.animation.normal, " linear")), ";};label:native;"),
|
|
71
71
|
// An indeterminate bar has an unreliable end time. Because of a Firefox animation issue,
|
|
72
72
|
// we apply this style to a <div> instead of a <progress> element.
|
|
73
73
|
// See https://css-tricks.com/html5-progress-element/ for more info.
|
|
@@ -37,8 +37,7 @@ var EuiSkeletonCircle = function EuiSkeletonCircle(_ref) {
|
|
|
37
37
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
38
38
|
children = _ref.children,
|
|
39
39
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
|
-
var
|
|
41
|
-
var styles = (0, _skeleton_circle.euiSkeletonCircleStyles)(euiTheme);
|
|
40
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_circle.euiSkeletonCircleStyles);
|
|
42
41
|
var cssStyles = [styles.euiSkeletonCircle, styles[size]];
|
|
43
42
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, (0, _extends2.default)({
|
|
44
43
|
isLoading: isLoading,
|
|
@@ -46,8 +46,7 @@ var EuiSkeletonRectangle = function EuiSkeletonRectangle(_ref) {
|
|
|
46
46
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
47
47
|
children = _ref.children,
|
|
48
48
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
49
|
-
var
|
|
50
|
-
var styles = (0, _skeleton_rectangle.euiSkeletonRectangleStyles)(euiTheme);
|
|
49
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_rectangle.euiSkeletonRectangleStyles);
|
|
51
50
|
var cssStyles = [styles.euiSkeletonRectangle, styles[borderRadius]];
|
|
52
51
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, (0, _extends2.default)({
|
|
53
52
|
isLoading: isLoading,
|
|
@@ -1,13 +1,14 @@
|
|
|
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.LINES = exports.EuiSkeletonText = 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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
14
|
var _services = require("../../services");
|
|
@@ -22,6 +23,8 @@ var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel",
|
|
|
22
23
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
23
24
|
* Side Public License, v 1.
|
|
24
25
|
*/
|
|
26
|
+
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); }
|
|
27
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
28
|
var LINES = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
26
29
|
exports.LINES = LINES;
|
|
27
30
|
var EuiSkeletonText = function EuiSkeletonText(_ref) {
|
|
@@ -39,16 +42,20 @@ var EuiSkeletonText = function EuiSkeletonText(_ref) {
|
|
|
39
42
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
40
43
|
children = _ref.children,
|
|
41
44
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
lineElements
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_text.euiSkeletonTextStyles);
|
|
46
|
+
var cssStyles = (0, _react.useMemo)(function () {
|
|
47
|
+
return [styles.euiSkeletonText, styles[size]];
|
|
48
|
+
}, [styles, size]);
|
|
49
|
+
var lineElements = (0, _react.useMemo)(function () {
|
|
50
|
+
var lineElements = [];
|
|
51
|
+
for (var i = 0; i < lines; i++) {
|
|
52
|
+
lineElements.push((0, _react2.jsx)("span", {
|
|
53
|
+
key: i,
|
|
54
|
+
css: cssStyles
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
return lineElements;
|
|
58
|
+
}, [lines, cssStyles]);
|
|
52
59
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, (0, _extends2.default)({
|
|
53
60
|
isLoading: isLoading,
|
|
54
61
|
loadingContent: (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
@@ -35,8 +35,7 @@ var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
|
|
|
35
35
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
36
36
|
children = _ref.children,
|
|
37
37
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
38
|
-
var
|
|
39
|
-
var styles = (0, _skeleton_title.euiSkeletonTitleStyles)(euiTheme);
|
|
38
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_title.euiSkeletonTitleStyles);
|
|
40
39
|
var cssStyles = [styles.euiSkeletonTitle, styles[size]];
|
|
41
40
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, (0, _extends2.default)({
|
|
42
41
|
isLoading: isLoading,
|
|
@@ -35,8 +35,7 @@ var EuiText = function EuiText(_ref) {
|
|
|
35
35
|
children = _ref.children,
|
|
36
36
|
className = _ref.className,
|
|
37
37
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
38
|
-
var
|
|
39
|
-
var styles = (0, _text.euiTextStyles)(euiTheme);
|
|
38
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_text.euiTextStyles);
|
|
40
39
|
var cssStyles = [styles.euiText, !grow ? styles.constrainedWidth : undefined, styles[size]];
|
|
41
40
|
var classes = (0, _classnames.default)('euiText', className);
|
|
42
41
|
var text = (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
@@ -34,8 +34,7 @@ var EuiTextAlign = function EuiTextAlign(_ref) {
|
|
|
34
34
|
_ref$cloneElement = _ref.cloneElement,
|
|
35
35
|
cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
|
|
36
36
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
37
|
-
var
|
|
38
|
-
var cssStyles = [styles.euiTextAlign, styles[textAlign]];
|
|
37
|
+
var cssStyles = [_text_align.euiTextAlignStyles.euiTextAlign, _text_align.euiTextAlignStyles[textAlign]];
|
|
39
38
|
var props = _objectSpread({
|
|
40
39
|
css: cssStyles
|
|
41
40
|
}, rest);
|
|
@@ -14,12 +14,10 @@ var _global_styling = require("../../global_styling");
|
|
|
14
14
|
* Side Public License, v 1.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
var euiTextAlignStyles =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;")
|
|
23
|
-
};
|
|
17
|
+
var euiTextAlignStyles = {
|
|
18
|
+
euiTextAlign: /*#__PURE__*/(0, _react.css)(";label:euiTextAlign;"),
|
|
19
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;"),
|
|
20
|
+
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('right'), ";;label:right;"),
|
|
21
|
+
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;")
|
|
24
22
|
};
|
|
25
23
|
exports.euiTextAlignStyles = euiTextAlignStyles;
|
|
@@ -38,8 +38,7 @@ var EuiTextColor = function EuiTextColor(_ref) {
|
|
|
38
38
|
style = _ref.style,
|
|
39
39
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
40
|
var isNamedColor = COLORS.includes(color);
|
|
41
|
-
var
|
|
42
|
-
var styles = (0, _text_color.euiTextColorStyles)(euiTheme);
|
|
41
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_text_color.euiTextColorStyles);
|
|
43
42
|
var cssStyles = [styles.euiTextColor, isNamedColor ? styles[color] : styles.customColor];
|
|
44
43
|
|
|
45
44
|
// We're checking if is a custom color.
|