@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
|
@@ -20,7 +20,7 @@ var _data_grid_cell_actions = require("./data_grid_cell_actions");
|
|
|
20
20
|
var _data_grid_cell_popover = require("./data_grid_cell_popover");
|
|
21
21
|
var _focus_utils = require("./focus_utils");
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
|
-
var _excluded = ["renderCellValue", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "cellActions"],
|
|
23
|
+
var _excluded = ["renderCellValue", "cellContext", "column", "setCellContentsRef", "rowIndex", "colIndex", "ariaRowIndex", "rowHeight", "rowHeightUtils", "isControlColumn", "isFocused", "cellActions"],
|
|
24
24
|
_excluded2 = ["width", "popoverContext", "interactiveCellId", "columnType", "className", "column", "style", "rowHeightUtils", "rowHeightsOptions", "rowManager", "pagination"],
|
|
25
25
|
_excluded3 = ["isExpandable", "style", "className", "data-test-subj"];
|
|
26
26
|
/*
|
|
@@ -53,6 +53,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
53
53
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
54
54
|
var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
55
55
|
var renderCellValue = _ref.renderCellValue,
|
|
56
|
+
cellContext = _ref.cellContext,
|
|
56
57
|
column = _ref.column,
|
|
57
58
|
setCellContentsRef = _ref.setCellContentsRef,
|
|
58
59
|
rowIndex = _ref.rowIndex,
|
|
@@ -81,7 +82,7 @@ var EuiDataGridCellContent = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
|
81
82
|
rowIndex: rowIndex,
|
|
82
83
|
colIndex: colIndex,
|
|
83
84
|
schema: (column === null || column === void 0 ? void 0 : column.schema) || rest.columnType
|
|
84
|
-
}, rest)));
|
|
85
|
+
}, cellContext, rest)));
|
|
85
86
|
if (cellHeightType === 'lineCount' && !isControlColumn) {
|
|
86
87
|
var lines = rowHeightUtils.getLineCount(rowHeight);
|
|
87
88
|
cellContent = (0, _react2.jsx)(_text_truncate.EuiTextBlockTruncate, {
|
|
@@ -537,6 +538,7 @@ EuiDataGridCellContent.propTypes = {
|
|
|
537
538
|
isExpandable: _propTypes.default.bool.isRequired,
|
|
538
539
|
className: _propTypes.default.string,
|
|
539
540
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
541
|
+
cellContext: _propTypes.default.any,
|
|
540
542
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
541
543
|
setRowHeight: _propTypes.default.func,
|
|
542
544
|
getRowHeight: _propTypes.default.func,
|
|
@@ -746,6 +748,7 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
746
748
|
var _this$props5 = _this.props,
|
|
747
749
|
renderCellPopover = _this$props5.renderCellPopover,
|
|
748
750
|
renderCellValue = _this$props5.renderCellValue,
|
|
751
|
+
cellContext = _this$props5.cellContext,
|
|
749
752
|
rowIndex = _this$props5.rowIndex,
|
|
750
753
|
colIndex = _this$props5.colIndex,
|
|
751
754
|
column = _this$props5.column,
|
|
@@ -766,7 +769,7 @@ var EuiDataGridCell = /*#__PURE__*/function (_Component) {
|
|
|
766
769
|
})),
|
|
767
770
|
DefaultCellPopover: _data_grid_cell_popover.DefaultCellPopover,
|
|
768
771
|
setCellPopoverProps: setCellPopoverProps
|
|
769
|
-
}), (0, _react2.jsx)(CellElement, _extends({}, sharedProps, {
|
|
772
|
+
}), (0, _react2.jsx)(CellElement, _extends({}, cellContext, sharedProps, {
|
|
770
773
|
setCellProps: _this.setCellProps,
|
|
771
774
|
isExpandable: true,
|
|
772
775
|
isExpanded: true,
|
|
@@ -1385,6 +1388,7 @@ EuiDataGridCell.propTypes = {
|
|
|
1385
1388
|
setCellPopoverProps: _propTypes.default.func.isRequired
|
|
1386
1389
|
}).isRequired,
|
|
1387
1390
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
1391
|
+
cellContext: _propTypes.default.any,
|
|
1388
1392
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
1389
1393
|
setRowHeight: _propTypes.default.func,
|
|
1390
1394
|
getRowHeight: _propTypes.default.func,
|
|
@@ -11,7 +11,7 @@ var _sorting = require("../../utils/sorting");
|
|
|
11
11
|
var _data_grid_cell_popover = require("./data_grid_cell_popover");
|
|
12
12
|
var _data_grid_cell = require("./data_grid_cell");
|
|
13
13
|
var _react2 = require("@emotion/react");
|
|
14
|
-
var _excluded = ["colIndex", "visibleRowIndex", "style", "schema", "schemaDetectors", "pagination", "columns", "leadingControlColumns", "trailingControlColumns", "visibleColCount", "columnWidths", "defaultColumnWidth", "renderCellValue", "renderCellPopover", "interactiveCellId", "setRowHeight", "rowHeightsOptions", "rowHeightUtils", "rowManager"];
|
|
14
|
+
var _excluded = ["colIndex", "visibleRowIndex", "style", "schema", "schemaDetectors", "pagination", "columns", "leadingControlColumns", "trailingControlColumns", "visibleColCount", "columnWidths", "defaultColumnWidth", "renderCellValue", "cellContext", "renderCellPopover", "interactiveCellId", "setRowHeight", "rowHeightsOptions", "rowHeightUtils", "rowManager"];
|
|
15
15
|
/*
|
|
16
16
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
17
17
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -47,6 +47,7 @@ var Cell = function Cell(_ref) {
|
|
|
47
47
|
columnWidths = _ref.columnWidths,
|
|
48
48
|
defaultColumnWidth = _ref.defaultColumnWidth,
|
|
49
49
|
renderCellValue = _ref.renderCellValue,
|
|
50
|
+
cellContext = _ref.cellContext,
|
|
50
51
|
renderCellPopover = _ref.renderCellPopover,
|
|
51
52
|
interactiveCellId = _ref.interactiveCellId,
|
|
52
53
|
setRowHeight = _ref.setRowHeight,
|
|
@@ -88,7 +89,8 @@ var Cell = function Cell(_ref) {
|
|
|
88
89
|
setRowHeight: isFirstColumn ? setRowHeight : undefined,
|
|
89
90
|
rowManager: rowManager,
|
|
90
91
|
popoverContext: popoverContext,
|
|
91
|
-
pagination: pagination
|
|
92
|
+
pagination: pagination,
|
|
93
|
+
cellContext: cellContext
|
|
92
94
|
};
|
|
93
95
|
if (isLeadingControlColumn) {
|
|
94
96
|
var leadingColumn = leadingControlColumns[colIndex];
|
|
@@ -569,6 +569,7 @@ EuiDataGridBody.propTypes = {
|
|
|
569
569
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
570
570
|
}).isRequired,
|
|
571
571
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
572
|
+
cellContext: _propTypes.default.any,
|
|
572
573
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
573
574
|
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
574
575
|
renderCustomGridBody: _propTypes.default.func,
|
|
@@ -52,6 +52,7 @@ var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_ref) {
|
|
|
52
52
|
schemaDetectors = _ref.schemaDetectors,
|
|
53
53
|
visibleRows = _ref.visibleRows,
|
|
54
54
|
renderCellValue = _ref.renderCellValue,
|
|
55
|
+
cellContext = _ref.cellContext,
|
|
55
56
|
renderCellPopover = _ref.renderCellPopover,
|
|
56
57
|
renderFooterCellValue = _ref.renderFooterCellValue,
|
|
57
58
|
interactiveCellId = _ref.interactiveCellId,
|
|
@@ -141,6 +142,7 @@ var EuiDataGridBodyCustomRender = function EuiDataGridBodyCustomRender(_ref) {
|
|
|
141
142
|
columnWidths: columnWidths,
|
|
142
143
|
defaultColumnWidth: defaultColumnWidth,
|
|
143
144
|
renderCellValue: renderCellValue,
|
|
145
|
+
cellContext: cellContext,
|
|
144
146
|
renderCellPopover: renderCellPopover,
|
|
145
147
|
interactiveCellId: interactiveCellId,
|
|
146
148
|
setRowHeight: setRowHeight,
|
|
@@ -713,6 +715,7 @@ EuiDataGridBodyCustomRender.propTypes = {
|
|
|
713
715
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
714
716
|
}).isRequired,
|
|
715
717
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
718
|
+
cellContext: _propTypes.default.any,
|
|
716
719
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
717
720
|
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
718
721
|
renderCustomGridBody: _propTypes.default.func,
|
|
@@ -97,6 +97,7 @@ var EuiDataGridBodyVirtualized = function EuiDataGridBodyVirtualized(_ref3) {
|
|
|
97
97
|
endRow = _ref3$visibleRows.endRow,
|
|
98
98
|
visibleRowCount = _ref3$visibleRows.visibleRowCount,
|
|
99
99
|
renderCellValue = _ref3.renderCellValue,
|
|
100
|
+
cellContext = _ref3.cellContext,
|
|
100
101
|
renderCellPopover = _ref3.renderCellPopover,
|
|
101
102
|
renderFooterCellValue = _ref3.renderFooterCellValue,
|
|
102
103
|
interactiveCellId = _ref3.interactiveCellId,
|
|
@@ -298,6 +299,7 @@ var EuiDataGridBodyVirtualized = function EuiDataGridBodyVirtualized(_ref3) {
|
|
|
298
299
|
columnWidths: columnWidths,
|
|
299
300
|
defaultColumnWidth: defaultColumnWidth,
|
|
300
301
|
renderCellValue: renderCellValue,
|
|
302
|
+
cellContext: cellContext,
|
|
301
303
|
renderCellPopover: renderCellPopover,
|
|
302
304
|
interactiveCellId: interactiveCellId,
|
|
303
305
|
rowHeightsOptions: rowHeightsOptions,
|
|
@@ -844,6 +846,7 @@ EuiDataGridBodyVirtualized.propTypes = {
|
|
|
844
846
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
845
847
|
}).isRequired,
|
|
846
848
|
renderCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]).isRequired,
|
|
849
|
+
cellContext: _propTypes.default.any,
|
|
847
850
|
renderCellPopover: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.func.isRequired]),
|
|
848
851
|
renderFooterCellValue: _propTypes.default.oneOfType([_propTypes.default.func.isRequired, _propTypes.default.element.isRequired]),
|
|
849
852
|
renderCustomGridBody: _propTypes.default.func,
|
|
@@ -87,7 +87,7 @@ var useRowManager = function useRowManager(_ref) {
|
|
|
87
87
|
if (rowClasses) {
|
|
88
88
|
rowIdToElements.current.forEach(function (rowElement, rowIndex) {
|
|
89
89
|
var euiClasses = Array.from(rowElement.classList).filter(function (className) {
|
|
90
|
-
return
|
|
90
|
+
return ['euiDataGridRow', 'euiDataGridRow--striped'].includes(className);
|
|
91
91
|
}).join(' ');
|
|
92
92
|
if (rowClasses[rowIndex]) {
|
|
93
93
|
rowElement.classList.value = "".concat(euiClasses, " ").concat(rowClasses[rowIndex]);
|
|
@@ -25,7 +25,7 @@ var _data_grid_schema = require("./utils/data_grid_schema");
|
|
|
25
25
|
var _ref = require("./utils/ref");
|
|
26
26
|
var _data_grid_types = require("./data_grid_types");
|
|
27
27
|
var _react2 = require("@emotion/react");
|
|
28
|
-
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"],
|
|
28
|
+
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"],
|
|
29
29
|
_excluded2 = ["focusProps"];
|
|
30
30
|
/*
|
|
31
31
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -95,6 +95,7 @@ var EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forward
|
|
|
95
95
|
schemaDetectors = props.schemaDetectors,
|
|
96
96
|
rowCount = props.rowCount,
|
|
97
97
|
renderCellValue = props.renderCellValue,
|
|
98
|
+
cellContext = props.cellContext,
|
|
98
99
|
renderCellPopover = props.renderCellPopover,
|
|
99
100
|
renderFooterCellValue = props.renderFooterCellValue,
|
|
100
101
|
className = props.className,
|
|
@@ -364,6 +365,7 @@ var EuiDataGrid = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forward
|
|
|
364
365
|
schemaDetectors: allSchemaDetectors,
|
|
365
366
|
pagination: pagination,
|
|
366
367
|
renderCellValue: renderCellValue,
|
|
368
|
+
cellContext: cellContext,
|
|
367
369
|
renderCellPopover: renderCellPopover,
|
|
368
370
|
renderFooterCellValue: renderFooterCellValue,
|
|
369
371
|
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;
|
|
@@ -95,12 +95,14 @@ EuiHeaderBreadcrumbs.propTypes = {
|
|
|
95
95
|
*/
|
|
96
96
|
"aria-current": _propTypes.default.any,
|
|
97
97
|
/**
|
|
98
|
-
* Creates a breadcrumb that toggles a popover dialog
|
|
98
|
+
* Creates a breadcrumb that toggles a popover dialog. Takes any rendered node(s),
|
|
99
|
+
* or a render function that will pass callback allowing you to close the
|
|
100
|
+
* breadcrumb popover from within your popover content.
|
|
99
101
|
*
|
|
100
102
|
* If passed, both `href` and `onClick` will be ignored - the breadcrumb's
|
|
101
103
|
* click behavior should only trigger a popover.
|
|
102
104
|
*/
|
|
103
|
-
popoverContent: _propTypes.default.node,
|
|
105
|
+
popoverContent: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.func.isRequired]),
|
|
104
106
|
/**
|
|
105
107
|
* Allows customizing the popover if necessary. Accepts any props that
|
|
106
108
|
* [EuiPopover](/#/layout/popover) accepts, except for props that control state.
|
|
@@ -21,7 +21,7 @@ var _services = require("../../services");
|
|
|
21
21
|
var _named_colors = require("./named_colors");
|
|
22
22
|
var _icon = require("./icon.styles");
|
|
23
23
|
var _react3 = require("@emotion/react");
|
|
24
|
-
var _excluded = ["type", "size", "color", "className", "tabIndex", "title", "onIconLoad", "
|
|
24
|
+
var _excluded = ["type", "size", "color", "className", "tabIndex", "title", "onIconLoad", "style", "stylesMemoizer"];
|
|
25
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
26
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
27
27
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -206,8 +206,8 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
|
|
|
206
206
|
tabIndex = _this$props.tabIndex,
|
|
207
207
|
title = _this$props.title,
|
|
208
208
|
onIconLoad = _this$props.onIconLoad,
|
|
209
|
-
theme = _this$props.theme,
|
|
210
209
|
style = _this$props.style,
|
|
210
|
+
stylesMemoizer = _this$props.stylesMemoizer,
|
|
211
211
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
212
212
|
var _this$state = this.state,
|
|
213
213
|
isLoading = _this$state.isLoading,
|
|
@@ -229,7 +229,7 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
|
|
|
229
229
|
var classes = (0, _classnames.default)('euiIcon', className);
|
|
230
230
|
|
|
231
231
|
// Emotion styles
|
|
232
|
-
var styles = (
|
|
232
|
+
var styles = stylesMemoizer(_icon.euiIconStyles);
|
|
233
233
|
var cssStyles = [styles.euiIcon, styles[size], color && (0, _named_colors.isNamedColor)(color) && styles[color], isCustomColor && styles.customColor, isElasticLogoOutline && styles.logoElasticOutline, isAppIcon && !appIconHasColor && styles.app, isLoading && styles.isLoading, !isLoading && neededLoading && styles.isLoaded];
|
|
234
234
|
var icon = this.state.icon || _empty.icon;
|
|
235
235
|
if (typeof icon === 'string') {
|
|
@@ -246,30 +246,27 @@ var EuiIconClass = /*#__PURE__*/function (_PureComponent) {
|
|
|
246
246
|
|
|
247
247
|
// If it's an empty icon, or if there is no aria-label, aria-labelledby, or title it gets aria-hidden true
|
|
248
248
|
var isAriaHidden = icon === _empty.icon || !(this.props['aria-label'] || this.props['aria-labelledby'] || this.props.title);
|
|
249
|
-
var hideIconEmpty = isAriaHidden && {
|
|
250
|
-
'aria-hidden': true
|
|
251
|
-
};
|
|
252
|
-
var titleId;
|
|
253
249
|
|
|
254
250
|
// If no aria-label or aria-labelledby is provided but there's a title, a titleId is generated
|
|
255
251
|
// The svg aria-labelledby attribute gets this titleId
|
|
256
252
|
// The svg title element gets this titleId as an id
|
|
257
|
-
|
|
258
|
-
titleId
|
|
259
|
-
|
|
260
|
-
};
|
|
261
|
-
}
|
|
253
|
+
var titleId = !this.props['aria-label'] && !this.props['aria-labelledby'] && title ? {
|
|
254
|
+
titleId: generateId()
|
|
255
|
+
} : undefined;
|
|
262
256
|
return (0, _react3.jsx)(Svg, _extends({
|
|
263
257
|
className: classes,
|
|
264
258
|
style: optionalCustomStyles,
|
|
265
259
|
css: cssStyles,
|
|
266
260
|
tabIndex: tabIndex,
|
|
267
261
|
role: "img",
|
|
268
|
-
title: title
|
|
262
|
+
title: title
|
|
263
|
+
}, titleId, {
|
|
269
264
|
"data-icon-type": iconTitle,
|
|
270
265
|
"data-is-loaded": isLoaded || undefined,
|
|
271
266
|
"data-is-loading": isLoading || undefined
|
|
272
|
-
},
|
|
267
|
+
}, rest, {
|
|
268
|
+
"aria-hidden": isAriaHidden || undefined
|
|
269
|
+
}));
|
|
273
270
|
}
|
|
274
271
|
}
|
|
275
272
|
}]);
|
|
@@ -311,5 +308,5 @@ EuiIconClass.propTypes = {
|
|
|
311
308
|
*/
|
|
312
309
|
onIconLoad: _propTypes.default.func
|
|
313
310
|
};
|
|
314
|
-
var EuiIcon = (0, _services.
|
|
311
|
+
var EuiIcon = (0, _services.withEuiStylesMemoizer)(EuiIconClass);
|
|
315
312
|
exports.EuiIcon = EuiIcon;
|
|
@@ -15,9 +15,6 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
15
15
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
16
16
|
* Side Public License, v 1.
|
|
17
17
|
*/
|
|
18
|
-
var iconSize = function iconSize(size) {
|
|
19
|
-
return "\n ".concat((0, _global_styling.logicalCSS)('width', size), ";\n ").concat((0, _global_styling.logicalCSS)('height', size), ";\n ");
|
|
20
|
-
};
|
|
21
18
|
var iconLoadingOpacity = 0.05;
|
|
22
19
|
exports.iconLoadingOpacity = iconLoadingOpacity;
|
|
23
20
|
var iconLoading = (0, _react.keyframes)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 0% {\n opacity: ", ";\n }\n\n 100% {\n opacity: 1;\n }\n"])), iconLoadingOpacity);
|
|
@@ -57,11 +54,11 @@ var euiIconStyles = function euiIconStyles(_ref3) {
|
|
|
57
54
|
logoElasticOutline: _ref,
|
|
58
55
|
// Sizes
|
|
59
56
|
original: /*#__PURE__*/(0, _react.css)(";label:original;"),
|
|
60
|
-
s: /*#__PURE__*/(0, _react.css)(
|
|
61
|
-
m: /*#__PURE__*/(0, _react.css)(
|
|
62
|
-
l: /*#__PURE__*/(0, _react.css)(
|
|
63
|
-
xl: /*#__PURE__*/(0, _react.css)(
|
|
64
|
-
xxl: /*#__PURE__*/(0, _react.css)(
|
|
57
|
+
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.m), ";label:s;"),
|
|
58
|
+
m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.base), ";label:m;"),
|
|
59
|
+
l: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.l), ";label:l;"),
|
|
60
|
+
xl: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.xl), ";label:xl;"),
|
|
61
|
+
xxl: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.xxl), ";label:xxl;"),
|
|
65
62
|
// Variants
|
|
66
63
|
// App icons are two-toned. This provides the base color.
|
|
67
64
|
app: /*#__PURE__*/(0, _react.css)("fill:", euiTheme.colors.text, ";.euiIcon__fillSecondary{fill:", euiTheme.colors.successText, ";};label:app;"),
|
|
@@ -28,16 +28,19 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
28
28
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
29
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
30
30
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
var iconStyle = function iconStyle(_ref) {
|
|
32
|
+
var euiTheme = _ref.euiTheme;
|
|
33
|
+
return (0, _global_styling.logicalStyle)('margin-left', euiTheme.size.xs);
|
|
34
|
+
};
|
|
35
|
+
var EuiExternalLinkIcon = function EuiExternalLinkIcon(_ref2) {
|
|
36
|
+
var target = _ref2.target,
|
|
37
|
+
external = _ref2.external,
|
|
38
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
39
|
+
var iconCssStyle = (0, _services.useEuiMemoizedStyles)(iconStyle);
|
|
37
40
|
var showExternalLinkIcon = target === '_blank' && external !== false || external === true;
|
|
38
41
|
var iconAriaLabel = (0, _i18n.useEuiI18n)('euiExternalLinkIcon.ariaLabel', 'External link');
|
|
39
42
|
return (0, _react2.jsx)(_react.default.Fragment, null, showExternalLinkIcon && (0, _react2.jsx)(_icon.EuiIcon, _extends({
|
|
40
|
-
css:
|
|
43
|
+
css: iconCssStyle,
|
|
41
44
|
"aria-label": iconAriaLabel,
|
|
42
45
|
size: "s",
|
|
43
46
|
type: "popout"
|
|
@@ -48,8 +48,7 @@ var EuiLink = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
48
48
|
onClick = _ref.onClick,
|
|
49
49
|
_disabled = _ref.disabled,
|
|
50
50
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
51
|
-
var
|
|
52
|
-
var styles = (0, _link.euiLinkStyles)(euiTheme);
|
|
51
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_link.euiLinkStyles);
|
|
53
52
|
var cssStyles = [styles.euiLink];
|
|
54
53
|
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
55
54
|
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
|
+
};
|
|
@@ -307,12 +307,14 @@ EuiPageHeaderContent.propTypes = {
|
|
|
307
307
|
*/
|
|
308
308
|
"aria-current": _propTypes.default.any,
|
|
309
309
|
/**
|
|
310
|
-
* Creates a breadcrumb that toggles a popover dialog
|
|
310
|
+
* Creates a breadcrumb that toggles a popover dialog. Takes any rendered node(s),
|
|
311
|
+
* or a render function that will pass callback allowing you to close the
|
|
312
|
+
* breadcrumb popover from within your popover content.
|
|
311
313
|
*
|
|
312
314
|
* If passed, both `href` and `onClick` will be ignored - the breadcrumb's
|
|
313
315
|
* click behavior should only trigger a popover.
|
|
314
316
|
*/
|
|
315
|
-
popoverContent: _propTypes.default.node,
|
|
317
|
+
popoverContent: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.func.isRequired]),
|
|
316
318
|
/**
|
|
317
319
|
* Allows customizing the popover if necessary. Accepts any props that
|
|
318
320
|
* [EuiPopover](/#/layout/popover) accepts, except for props that control state.
|
|
@@ -66,7 +66,7 @@ var euiProgressStyles = function euiProgressStyles(_ref3, isNative) {
|
|
|
66
66
|
// https://css-tricks.com/html5-progress-element/
|
|
67
67
|
// Good resource if you need to work in here. There's some gotchas with
|
|
68
68
|
// dealing with cross-browser progress bars.
|
|
69
|
-
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(
|
|
69
|
+
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;"),
|
|
70
70
|
// An indeterminate bar has an unreliable end time. Because of a Firefox animation issue,
|
|
71
71
|
// we apply this style to a <div> instead of a <progress> element.
|
|
72
72
|
// See https://css-tricks.com/html5-progress-element/ for more info.
|
|
@@ -38,8 +38,7 @@ var EuiSkeletonCircle = function EuiSkeletonCircle(_ref) {
|
|
|
38
38
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
39
39
|
children = _ref.children,
|
|
40
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
-
var
|
|
42
|
-
var styles = (0, _skeleton_circle.euiSkeletonCircleStyles)(euiTheme);
|
|
41
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_circle.euiSkeletonCircleStyles);
|
|
43
42
|
var cssStyles = [styles.euiSkeletonCircle, styles[size]];
|
|
44
43
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, _extends({
|
|
45
44
|
isLoading: isLoading,
|
|
@@ -50,8 +50,7 @@ var EuiSkeletonRectangle = function EuiSkeletonRectangle(_ref) {
|
|
|
50
50
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
51
51
|
children = _ref.children,
|
|
52
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
53
|
-
var
|
|
54
|
-
var styles = (0, _skeleton_rectangle.euiSkeletonRectangleStyles)(euiTheme);
|
|
53
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_rectangle.euiSkeletonRectangleStyles);
|
|
55
54
|
var cssStyles = [styles.euiSkeletonRectangle, styles[borderRadius]];
|
|
56
55
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, _extends({
|
|
57
56
|
isLoading: isLoading,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.LINES = exports.EuiSkeletonText = void 0;
|
|
7
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
11
|
var _services = require("../../services");
|
|
@@ -20,6 +21,8 @@ var _excluded = ["isLoading", "lines", "size", "className", "contentAriaLabel",
|
|
|
20
21
|
* Side Public License, v 1.
|
|
21
22
|
*/
|
|
22
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
+
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); }
|
|
25
|
+
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; }
|
|
23
26
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
24
27
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
25
28
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -40,16 +43,20 @@ var EuiSkeletonText = function EuiSkeletonText(_ref) {
|
|
|
40
43
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
41
44
|
children = _ref.children,
|
|
42
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
lineElements
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_text.euiSkeletonTextStyles);
|
|
47
|
+
var cssStyles = (0, _react.useMemo)(function () {
|
|
48
|
+
return [styles.euiSkeletonText, styles[size]];
|
|
49
|
+
}, [styles, size]);
|
|
50
|
+
var lineElements = (0, _react.useMemo)(function () {
|
|
51
|
+
var lineElements = [];
|
|
52
|
+
for (var i = 0; i < lines; i++) {
|
|
53
|
+
lineElements.push((0, _react2.jsx)("span", {
|
|
54
|
+
key: i,
|
|
55
|
+
css: cssStyles
|
|
56
|
+
}));
|
|
57
|
+
}
|
|
58
|
+
return lineElements;
|
|
59
|
+
}, [lines, cssStyles]);
|
|
53
60
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, _extends({
|
|
54
61
|
isLoading: isLoading,
|
|
55
62
|
loadingContent: (0, _react2.jsx)("span", _extends({
|
|
@@ -36,8 +36,7 @@ var EuiSkeletonTitle = function EuiSkeletonTitle(_ref) {
|
|
|
36
36
|
ariaWrapperProps = _ref.ariaWrapperProps,
|
|
37
37
|
children = _ref.children,
|
|
38
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
-
var
|
|
40
|
-
var styles = (0, _skeleton_title.euiSkeletonTitleStyles)(euiTheme);
|
|
39
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_skeleton_title.euiSkeletonTitleStyles);
|
|
41
40
|
var cssStyles = [styles.euiSkeletonTitle, styles[size]];
|
|
42
41
|
return (0, _react2.jsx)(_skeleton_loading.EuiSkeletonLoading, _extends({
|
|
43
42
|
isLoading: isLoading,
|
|
@@ -36,8 +36,7 @@ var EuiText = function EuiText(_ref) {
|
|
|
36
36
|
children = _ref.children,
|
|
37
37
|
className = _ref.className,
|
|
38
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
-
var
|
|
40
|
-
var styles = (0, _text.euiTextStyles)(euiTheme);
|
|
39
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_text.euiTextStyles);
|
|
41
40
|
var cssStyles = [styles.euiText, !grow ? styles.constrainedWidth : undefined, styles[size]];
|
|
42
41
|
var classes = (0, _classnames.default)('euiText', className);
|
|
43
42
|
var text = (0, _react2.jsx)("div", _extends({
|
|
@@ -37,8 +37,7 @@ var EuiTextAlign = function EuiTextAlign(_ref) {
|
|
|
37
37
|
_ref$cloneElement = _ref.cloneElement,
|
|
38
38
|
cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
|
|
39
39
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
|
-
var
|
|
41
|
-
var cssStyles = [styles.euiTextAlign, styles[textAlign]];
|
|
40
|
+
var cssStyles = [_text_align.euiTextAlignStyles.euiTextAlign, _text_align.euiTextAlignStyles[textAlign]];
|
|
42
41
|
var props = _objectSpread({
|
|
43
42
|
css: cssStyles
|
|
44
43
|
}, 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;
|
|
@@ -41,8 +41,7 @@ var EuiTextColor = function EuiTextColor(_ref) {
|
|
|
41
41
|
style = _ref.style,
|
|
42
42
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
43
43
|
var isNamedColor = COLORS.includes(color);
|
|
44
|
-
var
|
|
45
|
-
var styles = (0, _text_color.euiTextColorStyles)(euiTheme);
|
|
44
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_text_color.euiTextColorStyles);
|
|
46
45
|
var cssStyles = [styles.euiTextColor, isNamedColor ? styles[color] : styles.customColor];
|
|
47
46
|
|
|
48
47
|
// We're checking if is a custom color.
|
|
@@ -36,8 +36,7 @@ var EuiTitle = function EuiTitle(_ref) {
|
|
|
36
36
|
className = _ref.className,
|
|
37
37
|
textTransform = _ref.textTransform,
|
|
38
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
|
-
var
|
|
40
|
-
var styles = (0, _title.euiTitleStyles)(euiTheme);
|
|
39
|
+
var styles = (0, _services.useEuiMemoizedStyles)(_title.euiTitleStyles);
|
|
41
40
|
var cssStyles = [styles.euiTitle, textTransform ? styles[textTransform] : undefined, styles[size]];
|
|
42
41
|
var classes = (0, _classnames.default)('euiTitle', className, children.props.className);
|
|
43
42
|
var props = _objectSpread({
|