@elastic/eui 59.0.0 → 59.1.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 +2 -136
- package/dist/eui_theme_dark.json +0 -6
- package/dist/eui_theme_dark.json.d.ts +0 -6
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +2 -136
- package/dist/eui_theme_light.json +0 -6
- package/dist/eui_theme_light.json.d.ts +0 -6
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +39 -2
- package/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/es/components/button/{button_content.js → _button_content_deprecated.js} +4 -3
- package/es/components/button/button.js +16 -10
- package/es/components/button/button_display/_button_display.js +141 -0
- package/es/components/button/button_display/_button_display.styles.js +53 -0
- package/es/components/button/button_display/_button_display_content.js +100 -0
- package/es/components/button/button_display/_button_display_content.styles.js +61 -0
- package/es/components/button/button_empty/button_empty.js +3 -2
- package/es/components/button/button_group/button_group.js +2 -1
- package/es/components/button/button_group/button_group_button.js +3 -2
- package/es/components/call_out/call_out.js +2 -1
- package/es/components/card/card.js +2 -1
- package/es/components/card/card_select.js +2 -1
- package/es/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/es/components/facet/facet_button.js +31 -15
- package/es/components/facet/facet_button.styles.js +64 -0
- package/es/components/facet/facet_group.js +12 -23
- package/es/components/facet/facet_group.styles.js +79 -0
- package/es/components/header/header_links/header_link.js +2 -1
- package/es/components/loading/loading_spinner.js +14 -3
- package/es/components/loading/loading_spinner.styles.js +4 -4
- package/es/components/notification/notification_event.js +2 -1
- package/es/components/pagination/pagination_button.js +2 -1
- package/es/components/text/text.js +1 -3
- package/es/components/text/text_align.js +2 -2
- package/es/components/text/text_color.js +7 -3
- package/es/themes/amsterdam/index.js +9 -0
- package/es/themes/index.js +2 -1
- package/eui.d.ts +200 -17
- package/lib/components/accessibility/skip_link/skip_link.js +39 -2
- package/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/lib/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
- package/lib/components/button/button.js +19 -13
- package/lib/components/button/button_display/_button_display.js +146 -0
- package/lib/components/button/button_display/_button_display.styles.js +59 -0
- package/lib/components/button/button_display/_button_display_content.js +111 -0
- package/lib/components/button/button_display/_button_display_content.styles.js +64 -0
- package/lib/components/button/button_empty/button_empty.js +4 -3
- package/lib/components/button/button_group/button_group.js +2 -1
- package/lib/components/button/button_group/button_group_button.js +3 -2
- package/lib/components/call_out/call_out.js +2 -1
- package/lib/components/card/card.js +2 -1
- package/lib/components/card/card_select.js +2 -1
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/lib/components/facet/facet_button.js +35 -15
- package/lib/components/facet/facet_button.styles.js +79 -0
- package/lib/components/facet/facet_group.js +12 -23
- package/lib/components/facet/facet_group.styles.js +82 -0
- package/lib/components/header/header_links/header_link.js +2 -1
- package/lib/components/loading/loading_spinner.js +14 -3
- package/lib/components/loading/loading_spinner.styles.js +4 -4
- package/lib/components/notification/notification_event.js +2 -1
- package/lib/components/text/text.js +1 -3
- package/lib/components/text/text_align.js +8 -2
- package/lib/components/text/text_color.js +13 -3
- package/lib/themes/amsterdam/index.js +18 -0
- package/lib/themes/index.js +21 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.js +23 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/es/components/button/{button_content.js → _button_content_deprecated.js} +1 -1
- package/optimize/es/components/button/button.js +13 -8
- package/optimize/es/components/button/button_display/_button_display.js +73 -0
- package/optimize/es/components/button/button_display/_button_display.styles.js +53 -0
- package/optimize/es/components/button/button_display/_button_display_content.js +67 -0
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +61 -0
- package/optimize/es/components/button/button_empty/button_empty.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +1 -1
- package/optimize/es/components/call_out/call_out.js +2 -1
- package/optimize/es/components/facet/facet_button.js +31 -15
- package/optimize/es/components/facet/facet_button.styles.js +64 -0
- package/optimize/es/components/facet/facet_group.js +10 -21
- package/optimize/es/components/facet/facet_group.styles.js +79 -0
- package/optimize/es/components/loading/loading_spinner.js +3 -2
- package/optimize/es/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/es/components/text/text.js +1 -3
- package/optimize/es/components/text/text_align.js +2 -2
- package/optimize/es/components/text/text_color.js +7 -3
- package/optimize/es/themes/amsterdam/index.js +9 -0
- package/optimize/es/themes/index.js +2 -1
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +25 -1
- package/optimize/lib/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/optimize/lib/components/button/{button_content.js → _button_content_deprecated.js} +3 -3
- package/optimize/lib/components/button/button.js +16 -11
- package/optimize/lib/components/button/button_display/_button_display.js +79 -0
- package/optimize/lib/components/button/button_display/_button_display.styles.js +59 -0
- package/optimize/lib/components/button/button_display/_button_display_content.js +78 -0
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +64 -0
- package/optimize/lib/components/button/button_empty/button_empty.js +2 -2
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
- package/optimize/lib/components/call_out/call_out.js +2 -1
- package/optimize/lib/components/facet/facet_button.js +35 -15
- package/optimize/lib/components/facet/facet_button.styles.js +79 -0
- package/optimize/lib/components/facet/facet_group.js +10 -21
- package/optimize/lib/components/facet/facet_group.styles.js +82 -0
- package/optimize/lib/components/loading/loading_spinner.js +3 -2
- package/optimize/lib/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/lib/components/text/text.js +1 -3
- package/optimize/lib/components/text/text_align.js +8 -2
- package/optimize/lib/components/text/text_color.js +13 -3
- package/optimize/lib/themes/amsterdam/index.js +18 -0
- package/optimize/lib/themes/index.js +21 -1
- package/package.json +1 -1
- package/src/components/index.scss +0 -1
- package/src/components/selectable/selectable_message/_selectable_message.scss +1 -0
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +40 -2
- package/test-env/components/accessibility/skip_link/skip_link.styles.js +1 -1
- package/test-env/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
- package/test-env/components/button/button.js +19 -13
- package/test-env/components/button/button_display/_button_display.js +143 -0
- package/test-env/components/button/button_display/_button_display.styles.js +59 -0
- package/test-env/components/button/button_display/_button_display_content.js +108 -0
- package/test-env/components/button/button_display/_button_display_content.styles.js +64 -0
- package/test-env/components/button/button_empty/button_empty.js +4 -3
- package/test-env/components/button/button_group/button_group.js +2 -1
- package/test-env/components/button/button_group/button_group_button.js +3 -2
- package/test-env/components/call_out/call_out.js +2 -1
- package/test-env/components/card/card.js +2 -1
- package/test-env/components/card/card_select.js +2 -1
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/test-env/components/facet/facet_button.js +35 -15
- package/test-env/components/facet/facet_button.styles.js +79 -0
- package/test-env/components/facet/facet_group.js +12 -23
- package/test-env/components/facet/facet_group.styles.js +82 -0
- package/test-env/components/header/header_links/header_link.js +2 -1
- package/test-env/components/loading/loading_spinner.js +14 -3
- package/test-env/components/loading/loading_spinner.styles.js +4 -4
- package/test-env/components/notification/notification_event.js +2 -1
- package/test-env/components/text/text.js +1 -3
- package/test-env/components/text/text_align.js +8 -2
- package/test-env/components/text/text_color.js +13 -3
- package/test-env/themes/amsterdam/index.js +18 -0
- package/test-env/themes/index.js +21 -1
- package/src/components/facet/_facet_button.scss +0 -69
- package/src/components/facet/_facet_group.scss +0 -24
- package/src/components/facet/_index.scss +0 -4
- package/src/components/facet/_variables.scss +0 -6
- package/src/themes/amsterdam/overrides/_facet.scss +0 -10
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiFacetButtonTextStyles = exports.euiFacetButtonStyles = exports.euiFacetButtonQuantityStyles = exports.euiFacetButtonLoadingSpinnerStyles = exports.euiFacetButtonIconStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
var _link = require("../link/link.styles");
|
|
13
|
+
|
|
14
|
+
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)."; }
|
|
15
|
+
|
|
16
|
+
var euiFacetButtonStyles = function euiFacetButtonStyles(_ref3) {
|
|
17
|
+
var euiTheme = _ref3.euiTheme;
|
|
18
|
+
return {
|
|
19
|
+
// Base
|
|
20
|
+
euiFacetButton: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";&:hover,&:focus{&:not(:disabled) [class*='euiFacetButton__text']{text-decoration:underline;}}&:focus:not(:disabled) [class*='euiFacetButton__text']{", (0, _link.euiLinkFocusCSS)(euiTheme), ";}&:disabled{color:", euiTheme.colors.disabledText, ";pointer-events:none;&:hover,&:focus{text-decoration:none;}};label:euiFacetButton;")
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.euiFacetButtonStyles = euiFacetButtonStyles;
|
|
25
|
+
|
|
26
|
+
var euiFacetButtonTextStyles = function euiFacetButtonTextStyles(_ref4) {
|
|
27
|
+
var euiTheme = _ref4.euiTheme;
|
|
28
|
+
return {
|
|
29
|
+
euiFacetButton__text: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextShift)('bold', 'data-text', euiTheme), " ", (0, _global_styling.euiTextTruncate)(), " flex-grow:1;;label:euiFacetButton__text;"),
|
|
30
|
+
isSelected: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.bold, ";;label:isSelected;"),
|
|
31
|
+
unSelected: /*#__PURE__*/(0, _react.css)(";label:unSelected;")
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.euiFacetButtonTextStyles = euiFacetButtonTextStyles;
|
|
36
|
+
|
|
37
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
38
|
+
name: "mpq8zy-isDisabled",
|
|
39
|
+
styles: "opacity:0.5;label:isDisabled;"
|
|
40
|
+
} : {
|
|
41
|
+
name: "mpq8zy-isDisabled",
|
|
42
|
+
styles: "opacity:0.5;label:isDisabled;",
|
|
43
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var euiFacetButtonIconStyles = function euiFacetButtonIconStyles() {
|
|
47
|
+
return {
|
|
48
|
+
euiFacetButton__icon: /*#__PURE__*/(0, _react.css)(";label:euiFacetButton__icon;"),
|
|
49
|
+
isDisabled: _ref2
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
exports.euiFacetButtonIconStyles = euiFacetButtonIconStyles;
|
|
54
|
+
|
|
55
|
+
var euiFacetButtonLoadingSpinnerStyles = function euiFacetButtonLoadingSpinnerStyles() {
|
|
56
|
+
return {
|
|
57
|
+
euiFacetButton__loadingSpinner: /*#__PURE__*/(0, _react.css)(";label:euiFacetButton__loadingSpinner;")
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
exports.euiFacetButtonLoadingSpinnerStyles = euiFacetButtonLoadingSpinnerStyles;
|
|
62
|
+
|
|
63
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
64
|
+
name: "mpq8zy-isDisabled",
|
|
65
|
+
styles: "opacity:0.5;label:isDisabled;"
|
|
66
|
+
} : {
|
|
67
|
+
name: "mpq8zy-isDisabled",
|
|
68
|
+
styles: "opacity:0.5;label:isDisabled;",
|
|
69
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var euiFacetButtonQuantityStyles = function euiFacetButtonQuantityStyles() {
|
|
73
|
+
return {
|
|
74
|
+
euiFacetButton__quantity: /*#__PURE__*/(0, _react.css)(";label:euiFacetButton__quantity;"),
|
|
75
|
+
isDisabled: _ref
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
exports.euiFacetButtonQuantityStyles = euiFacetButtonQuantityStyles;
|
|
@@ -11,9 +11,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _services = require("../../services");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _facet_group = require("./facet_group.styles");
|
|
17
17
|
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
|
|
@@ -27,19 +27,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
27
27
|
|
|
28
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; }
|
|
29
29
|
|
|
30
|
-
var
|
|
31
|
-
vertical: 'euiFacetGroup--vertical',
|
|
32
|
-
horizontal: 'euiFacetGroup--horizontal'
|
|
33
|
-
};
|
|
34
|
-
var LAYOUTS = (0, _common.keysOf)(layoutToClassNameMap);
|
|
30
|
+
var LAYOUTS = ['vertical', 'horizontal'];
|
|
35
31
|
exports.LAYOUTS = LAYOUTS;
|
|
36
|
-
var
|
|
37
|
-
none: 'euiFacetGroup--gutterNone',
|
|
38
|
-
s: 'euiFacetGroup--gutterSmall',
|
|
39
|
-
m: 'euiFacetGroup--gutterMedium',
|
|
40
|
-
l: 'euiFacetGroup--gutterLarge'
|
|
41
|
-
};
|
|
42
|
-
var GUTTER_SIZES = (0, _common.keysOf)(gutterSizeToClassNameMap);
|
|
32
|
+
var GUTTER_SIZES = ['none', 's', 'm', 'l'];
|
|
43
33
|
exports.GUTTER_SIZES = GUTTER_SIZES;
|
|
44
34
|
|
|
45
35
|
var EuiFacetGroup = function EuiFacetGroup(_ref) {
|
|
@@ -51,14 +41,13 @@ var EuiFacetGroup = function EuiFacetGroup(_ref) {
|
|
|
51
41
|
gutterSize = _ref$gutterSize === void 0 ? 'm' : _ref$gutterSize,
|
|
52
42
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
53
43
|
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
|
|
44
|
+
var theme = (0, _services.useEuiTheme)();
|
|
45
|
+
var styles = (0, _facet_group.euiFacetGroupStyles)(theme, layout);
|
|
46
|
+
var cssStyles = [styles.euiFacetGroup, styles[gutterSize], styles[layout]];
|
|
47
|
+
var classes = (0, _classnames.default)('euiFacetGroup', className);
|
|
48
|
+
return (0, _react2.jsx)("div", _extends({
|
|
58
49
|
className: classes,
|
|
59
|
-
|
|
60
|
-
wrap: wrap,
|
|
61
|
-
gutterSize: "none"
|
|
50
|
+
css: cssStyles
|
|
62
51
|
}, rest), children);
|
|
63
52
|
};
|
|
64
53
|
|
|
@@ -71,11 +60,11 @@ EuiFacetGroup.propTypes = {
|
|
|
71
60
|
/**
|
|
72
61
|
* Vertically in a column, or horizontally in one wrapping line
|
|
73
62
|
*/
|
|
74
|
-
layout: _propTypes.default.
|
|
63
|
+
layout: _propTypes.default.any,
|
|
75
64
|
|
|
76
65
|
/**
|
|
77
66
|
* Distance between facet buttons.
|
|
78
67
|
* Horizontal layout always adds more distance horizontally between buttons.
|
|
79
68
|
*/
|
|
80
|
-
gutterSize: _propTypes.default.
|
|
69
|
+
gutterSize: _propTypes.default.any
|
|
81
70
|
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiFacetGroupStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _services = require("../../services");
|
|
11
|
+
|
|
12
|
+
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
|
+
|
|
14
|
+
var _facetGroupGutterSize = function _facetGroupGutterSize(_ref4) {
|
|
15
|
+
var gutterSize = _ref4.gutterSize,
|
|
16
|
+
layout = _ref4.layout;
|
|
17
|
+
|
|
18
|
+
var _useEuiTheme = (0, _services.useEuiTheme)(),
|
|
19
|
+
euiTheme = _useEuiTheme.euiTheme;
|
|
20
|
+
|
|
21
|
+
var isHorizontalLayout = layout === 'horizontal';
|
|
22
|
+
var gutterHorizontal = "calc(".concat(euiTheme.size.m, " + ").concat(gutterSize, ")");
|
|
23
|
+
var gutterVertical = gutterSize;
|
|
24
|
+
return isHorizontalLayout ? "gap: ".concat(gutterVertical, " ").concat(gutterHorizontal, ";") : "gap: ".concat(gutterVertical, " 0;");
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
28
|
+
name: "omnk2l-vertical",
|
|
29
|
+
styles: "flex-direction:column;label:vertical;"
|
|
30
|
+
} : {
|
|
31
|
+
name: "omnk2l-vertical",
|
|
32
|
+
styles: "flex-direction:column;label:vertical;",
|
|
33
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
37
|
+
name: "envaaw-horizontal",
|
|
38
|
+
styles: "flex-direction:row;flex-wrap:wrap;label:horizontal;"
|
|
39
|
+
} : {
|
|
40
|
+
name: "envaaw-horizontal",
|
|
41
|
+
styles: "flex-direction:row;flex-wrap:wrap;label:horizontal;",
|
|
42
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
46
|
+
name: "1g68sie-euiFacetGroup",
|
|
47
|
+
styles: "display:flex;flex-grow:1;label:euiFacetGroup;"
|
|
48
|
+
} : {
|
|
49
|
+
name: "1g68sie-euiFacetGroup",
|
|
50
|
+
styles: "display:flex;flex-grow:1;label:euiFacetGroup;",
|
|
51
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
var euiFacetGroupStyles = function euiFacetGroupStyles(_ref5, layout) {
|
|
55
|
+
var euiTheme = _ref5.euiTheme;
|
|
56
|
+
return {
|
|
57
|
+
// Base
|
|
58
|
+
euiFacetGroup: _ref3,
|
|
59
|
+
// Gutter sizes
|
|
60
|
+
none: /*#__PURE__*/(0, _react.css)(_facetGroupGutterSize({
|
|
61
|
+
gutterSize: '0',
|
|
62
|
+
layout: layout
|
|
63
|
+
}), ";label:none;"),
|
|
64
|
+
s: /*#__PURE__*/(0, _react.css)(_facetGroupGutterSize({
|
|
65
|
+
gutterSize: euiTheme.size.xs,
|
|
66
|
+
layout: layout
|
|
67
|
+
}), ";label:s;"),
|
|
68
|
+
m: /*#__PURE__*/(0, _react.css)(_facetGroupGutterSize({
|
|
69
|
+
gutterSize: euiTheme.size.s,
|
|
70
|
+
layout: layout
|
|
71
|
+
}), ";label:m;"),
|
|
72
|
+
l: /*#__PURE__*/(0, _react.css)(_facetGroupGutterSize({
|
|
73
|
+
gutterSize: euiTheme.size.m,
|
|
74
|
+
layout: layout
|
|
75
|
+
}), ";label:l;"),
|
|
76
|
+
// layouts
|
|
77
|
+
horizontal: _ref2,
|
|
78
|
+
vertical: _ref
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
exports.euiFacetGroupStyles = euiFacetGroupStyles;
|
|
@@ -120,7 +120,8 @@ EuiHeaderLink.propTypes = {
|
|
|
120
120
|
iconSide: _propTypes.default.oneOf(["left", "right"]),
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
123
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
124
|
+
* It doesn't apply to the icon.
|
|
124
125
|
*/
|
|
125
126
|
textProps: _propTypes.default.shape({
|
|
126
127
|
className: _propTypes.default.string,
|
|
@@ -19,7 +19,7 @@ var _loading_spinner = require("./loading_spinner.styles");
|
|
|
19
19
|
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["size", "className", "aria-label"];
|
|
22
|
+
var _excluded = ["size", "className", "aria-label", "color"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -37,10 +37,11 @@ var EuiLoadingSpinner = function EuiLoadingSpinner(_ref) {
|
|
|
37
37
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
38
38
|
className = _ref.className,
|
|
39
39
|
ariaLabel = _ref['aria-label'],
|
|
40
|
+
color = _ref.color,
|
|
40
41
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
42
|
|
|
42
43
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
43
|
-
var styles = (0, _loading_spinner.euiLoadingSpinnerStyles)(euiTheme);
|
|
44
|
+
var styles = (0, _loading_spinner.euiLoadingSpinnerStyles)(euiTheme, color);
|
|
44
45
|
var cssStyles = [styles.euiLoadingSpinner, styles[size]];
|
|
45
46
|
var classes = (0, _classnames.default)('euiLoadingSpinner', className);
|
|
46
47
|
var defaultLabel = (0, _loading_strings.useLoadingAriaLabel)();
|
|
@@ -57,5 +58,15 @@ EuiLoadingSpinner.propTypes = {
|
|
|
57
58
|
className: _propTypes.default.string,
|
|
58
59
|
"aria-label": _propTypes.default.string,
|
|
59
60
|
"data-test-subj": _propTypes.default.string,
|
|
60
|
-
size: _propTypes.default.any
|
|
61
|
+
size: _propTypes.default.any,
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Sets the color of the border and highlight.
|
|
65
|
+
* Each key accepts any valid CSS color value as a `string`
|
|
66
|
+
* See #EuiLoadingSpinnerColor
|
|
67
|
+
*/
|
|
68
|
+
color: _propTypes.default.shape({
|
|
69
|
+
border: _propTypes.default.any,
|
|
70
|
+
highlight: _propTypes.default.any
|
|
71
|
+
})
|
|
61
72
|
};
|
|
@@ -23,14 +23,14 @@ var spinnerSizes = {
|
|
|
23
23
|
xxl: 'xxl'
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
return "".concat(highlight, " ").concat(
|
|
26
|
+
var spinnerColorsCSS = function spinnerColorsCSS(border, highlight) {
|
|
27
|
+
return "\n border-color: ".concat(highlight, " ").concat(border, " ").concat(border, " ").concat(border, ";\n ");
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
var euiLoadingSpinnerStyles = function euiLoadingSpinnerStyles(_ref) {
|
|
30
|
+
var euiLoadingSpinnerStyles = function euiLoadingSpinnerStyles(_ref, color) {
|
|
31
31
|
var euiTheme = _ref.euiTheme;
|
|
32
32
|
return {
|
|
33
|
-
euiLoadingSpinner: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-block;border-radius:50%;border:", euiTheme.border.thick, ";
|
|
33
|
+
euiLoadingSpinner: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-block;border-radius:50%;border:", euiTheme.border.thick, ";", spinnerColorsCSS((color === null || color === void 0 ? void 0 : color.border) || euiTheme.colors.lightShade, (color === null || color === void 0 ? void 0 : color.highlight) || euiTheme.colors.primary), ";", _global_styling.euiCanAnimate, "{animation:", _loadingSpinner, " 0.6s infinite linear;};label:euiLoadingSpinner;"),
|
|
34
34
|
// Sizes
|
|
35
35
|
s: /*#__PURE__*/(0, _react.css)("width:", euiTheme.size[spinnerSizes.s], ";height:", euiTheme.size[spinnerSizes.s], ";border-width:calc(", euiTheme.border.width.thin, " * 1.5);;label:s;"),
|
|
36
36
|
m: /*#__PURE__*/(0, _react.css)("width:", euiTheme.size[spinnerSizes.m], ";height:", euiTheme.size[spinnerSizes.m], ";border-width:calc(", euiTheme.border.width.thin, " * 1.5);;label:m;"),
|
|
@@ -275,7 +275,8 @@ EuiNotificationEvent.propTypes = {
|
|
|
275
275
|
iconSide: _propTypes.default.oneOf(["left", "right"]),
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
278
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
279
|
+
* It doesn't apply to the icon.
|
|
279
280
|
*/
|
|
280
281
|
textProps: _propTypes.default.shape({
|
|
281
282
|
className: _propTypes.default.string,
|
|
@@ -21,7 +21,7 @@ var _text_align = require("./text_align");
|
|
|
21
21
|
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["size", "color", "grow", "textAlign", "children", "className"
|
|
24
|
+
var _excluded = ["size", "color", "grow", "textAlign", "children", "className"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
@@ -43,7 +43,6 @@ var EuiText = function EuiText(_ref) {
|
|
|
43
43
|
textAlign = _ref.textAlign,
|
|
44
44
|
children = _ref.children,
|
|
45
45
|
className = _ref.className,
|
|
46
|
-
style = _ref.style,
|
|
47
46
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
47
|
|
|
49
48
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
@@ -58,7 +57,6 @@ var EuiText = function EuiText(_ref) {
|
|
|
58
57
|
if (color) {
|
|
59
58
|
text = (0, _react2.jsx)(_text_color.EuiTextColor, {
|
|
60
59
|
color: color,
|
|
61
|
-
style: style,
|
|
62
60
|
cloneElement: true
|
|
63
61
|
}, text);
|
|
64
62
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.EuiTextAlign = exports.ALIGNMENTS = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
13
|
|
|
@@ -19,6 +21,10 @@ var _excluded = ["children", "textAlign", "cloneElement"];
|
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
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
|
+
|
|
26
|
+
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; }
|
|
27
|
+
|
|
22
28
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
23
29
|
|
|
24
30
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -47,7 +53,7 @@ var EuiTextAlign = function EuiTextAlign(_ref) {
|
|
|
47
53
|
css: cssStyles
|
|
48
54
|
}, rest);
|
|
49
55
|
|
|
50
|
-
if (cloneElement) {
|
|
56
|
+
if ( /*#__PURE__*/(0, _react.isValidElement)(children) && cloneElement) {
|
|
51
57
|
return (0, _clone_element.cloneElementWithCss)(children, props);
|
|
52
58
|
} else {
|
|
53
59
|
return (0, _react2.jsx)("div", props, children);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.EuiTextColor = exports.COLORS = void 0;
|
|
7
9
|
|
|
8
|
-
var _react =
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
11
|
|
|
10
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
13
|
|
|
@@ -21,6 +23,10 @@ var _excluded = ["children", "color", "component", "cloneElement", "style"];
|
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
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
|
+
|
|
28
|
+
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; }
|
|
29
|
+
|
|
24
30
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
25
31
|
|
|
26
32
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -61,8 +67,12 @@ var EuiTextColor = function EuiTextColor(_ref) {
|
|
|
61
67
|
style: euiTextStyle
|
|
62
68
|
}, rest);
|
|
63
69
|
|
|
64
|
-
if (cloneElement) {
|
|
65
|
-
|
|
70
|
+
if ( /*#__PURE__*/(0, _react.isValidElement)(children) && cloneElement) {
|
|
71
|
+
var childrenStyle = _objectSpread(_objectSpread({}, children.props.style), euiTextStyle);
|
|
72
|
+
|
|
73
|
+
return (0, _clone_element.cloneElementWithCss)(children, _objectSpread(_objectSpread({}, props), {}, {
|
|
74
|
+
style: childrenStyle
|
|
75
|
+
}));
|
|
66
76
|
} else {
|
|
67
77
|
var Component = component;
|
|
68
78
|
return (0, _react2.jsx)(Component, props, children);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _shadow = require("./global_styling/mixins/shadow");
|
|
8
|
+
|
|
9
|
+
Object.keys(_shadow).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _shadow[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _shadow[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
package/lib/themes/index.js
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
EUI_THEMES: true,
|
|
8
|
+
isDefaultTheme: true,
|
|
9
|
+
AMSTERDAM_NAME_KEY: true,
|
|
10
|
+
EuiThemeAmsterdam: true
|
|
11
|
+
};
|
|
6
12
|
Object.defineProperty(exports, "AMSTERDAM_NAME_KEY", {
|
|
7
13
|
enumerable: true,
|
|
8
14
|
get: function get() {
|
|
@@ -30,4 +36,18 @@ Object.defineProperty(exports, "isDefaultTheme", {
|
|
|
30
36
|
|
|
31
37
|
var _themes = require("./themes");
|
|
32
38
|
|
|
33
|
-
var _theme = require("./amsterdam/theme");
|
|
39
|
+
var _theme = require("./amsterdam/theme");
|
|
40
|
+
|
|
41
|
+
var _amsterdam = require("./amsterdam");
|
|
42
|
+
|
|
43
|
+
Object.keys(_amsterdam).forEach(function (key) {
|
|
44
|
+
if (key === "default" || key === "__esModule") return;
|
|
45
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
46
|
+
if (key in exports && exports[key] === _amsterdam[key]) return;
|
|
47
|
+
Object.defineProperty(exports, key, {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function get() {
|
|
50
|
+
return _amsterdam[key];
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
});
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["destinationId", "tabIndex", "position", "children", "className"];
|
|
4
|
+
var _excluded = ["destinationId", "overrideLinkBehavior", "tabIndex", "position", "children", "className"];
|
|
5
|
+
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
9
|
|
|
5
10
|
/*
|
|
6
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -19,6 +24,7 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
|
19
24
|
export var POSITIONS = ['static', 'fixed', 'absolute'];
|
|
20
25
|
export var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
21
26
|
var destinationId = _ref.destinationId,
|
|
27
|
+
overrideLinkBehavior = _ref.overrideLinkBehavior,
|
|
22
28
|
tabIndex = _ref.tabIndex,
|
|
23
29
|
_ref$position = _ref.position,
|
|
24
30
|
position = _ref$position === void 0 ? 'static' : _ref$position,
|
|
@@ -39,6 +45,22 @@ export var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
|
39
45
|
};
|
|
40
46
|
}
|
|
41
47
|
|
|
48
|
+
if (overrideLinkBehavior) {
|
|
49
|
+
optionalProps = _objectSpread(_objectSpread({}, optionalProps), {}, {
|
|
50
|
+
onClick: function onClick(e) {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
var destinationEl = document.getElementById(destinationId);
|
|
53
|
+
if (!destinationEl) return;
|
|
54
|
+
destinationEl.scrollIntoView();
|
|
55
|
+
destinationEl.tabIndex = -1; // Ensure the destination content is focusable
|
|
56
|
+
|
|
57
|
+
destinationEl.focus({
|
|
58
|
+
preventScroll: true
|
|
59
|
+
}); // Scrolling is already handled above, and focus's autoscroll behaves oddly around fixed headers
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
42
64
|
return ___EmotionJSX(EuiScreenReaderOnly, {
|
|
43
65
|
showOnFocus: true
|
|
44
66
|
}, ___EmotionJSX(EuiButton, _extends({
|
|
@@ -35,6 +35,6 @@ export var euiSkipLinkStyles = function euiSkipLinkStyles(_ref3) {
|
|
|
35
35
|
// Set positions on focus only as to not override screenReaderOnly position
|
|
36
36
|
// When positioned absolutely, consumers still need to tell it WHERE (top,left,etc...)
|
|
37
37
|
absolute: _ref,
|
|
38
|
-
fixed: /*#__PURE__*/css("
|
|
38
|
+
fixed: /*#__PURE__*/css("position:fixed!important;&:focus{inset-block-start:", euiTheme.size.xs, ";inset-inline-start:", euiTheme.size.xs, ";z-index:", Number(euiTheme.levels.header) + 1, ";};label:fixed;")
|
|
39
39
|
};
|
|
40
40
|
};
|
|
@@ -20,7 +20,7 @@ var iconSideToClassNameMap = {
|
|
|
20
20
|
right: 'euiButtonContent--iconRight'
|
|
21
21
|
};
|
|
22
22
|
export var ICON_SIDES = keysOf(iconSideToClassNameMap);
|
|
23
|
-
export var
|
|
23
|
+
export var EuiButtonContentDeprecated = function EuiButtonContentDeprecated(_ref) {
|
|
24
24
|
var children = _ref.children,
|
|
25
25
|
textProps = _ref.textProps,
|
|
26
26
|
_ref$isLoading = _ref.isLoading,
|
|
@@ -19,7 +19,7 @@ import React, { forwardRef } from 'react';
|
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import { keysOf } from '../common';
|
|
21
21
|
import { getSecureRelForTarget } from '../../services';
|
|
22
|
-
import { EuiButtonContent } from './
|
|
22
|
+
import { EuiButtonContentDeprecated as EuiButtonContent } from './_button_content_deprecated';
|
|
23
23
|
import { validateHref } from '../../services/security/href_validator';
|
|
24
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
25
25
|
export var colorToClassNameMap = {
|
|
@@ -88,22 +88,27 @@ export var EuiButton = function EuiButton(_ref) {
|
|
|
88
88
|
relObj.type = type;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
return
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
return (// eslint-disable-next-line react/jsx-pascal-case
|
|
92
|
+
___EmotionJSX(EuiButtonDisplayDeprecated, _extends({
|
|
93
|
+
element: element,
|
|
94
|
+
baseClassName: "euiButton",
|
|
95
|
+
ref: buttonRef
|
|
96
|
+
}, elementProps, relObj, rest))
|
|
97
|
+
);
|
|
96
98
|
};
|
|
97
99
|
EuiButton.displayName = 'EuiButton';
|
|
98
100
|
|
|
99
101
|
/**
|
|
102
|
+
* *DEPRECATED*
|
|
100
103
|
* EuiButtonDisplay is an internal-only component used for displaying
|
|
101
104
|
* any element as a button.
|
|
102
105
|
* NOTE: This component *must* be below EuiButton in the file and
|
|
103
106
|
* EuiButton must also set a displayName for react-docgen-typescript
|
|
104
107
|
* to correctly set EuiButton's docgenInfo and display a props table.
|
|
108
|
+
* This component has been deprecated in favor of the new EuiButtonDisplay
|
|
109
|
+
* that can be found in `src/components/button/button_display/_button_display.tsx`
|
|
105
110
|
*/
|
|
106
|
-
export var
|
|
111
|
+
export var EuiButtonDisplayDeprecated = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
107
112
|
var _ref2$element = _ref2.element,
|
|
108
113
|
element = _ref2$element === void 0 ? 'button' : _ref2$element,
|
|
109
114
|
baseClassName = _ref2.baseClassName,
|
|
@@ -166,4 +171,4 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
166
171
|
ref: ref
|
|
167
172
|
}, rest), innerNode);
|
|
168
173
|
});
|
|
169
|
-
|
|
174
|
+
EuiButtonDisplayDeprecated.displayName = 'EuiButtonDisplay';
|