@elastic/eui 59.0.1 → 59.1.0-rc1
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_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- 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 +9 -7
- package/es/components/avatar/avatar.js +9 -7
- package/es/components/bottom_bar/bottom_bar.js +8 -9
- package/es/components/breadcrumbs/breadcrumbs.js +2 -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 +9 -8
- 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/expression/expression.js +11 -10
- package/es/components/facet/facet_button.js +36 -19
- package/es/components/facet/facet_button.styles.js +64 -0
- package/es/components/facet/facet_group.js +17 -27
- package/es/components/facet/facet_group.styles.js +79 -0
- package/es/components/header/header_links/header_link.js +2 -1
- package/es/components/health/health.js +7 -6
- package/es/components/horizontal_rule/horizontal_rule.js +7 -6
- package/es/components/link/link.js +8 -7
- package/es/components/loading/loading_chart.js +7 -6
- package/es/components/loading/loading_content.js +7 -6
- package/es/components/loading/loading_logo.js +7 -6
- package/es/components/loading/loading_spinner.js +20 -8
- package/es/components/loading/loading_spinner.styles.js +4 -4
- package/es/components/mark/mark.js +9 -8
- package/es/components/markdown_editor/markdown_format.js +7 -6
- package/es/components/notification/notification_event.js +2 -1
- package/es/components/pagination/pagination_button.js +2 -1
- package/es/components/panel/panel.js +8 -7
- package/es/components/provider/cache/cache_context.js +12 -0
- package/es/components/provider/cache/cache_provider.js +17 -0
- package/es/components/provider/cache/index.js +9 -0
- package/es/components/provider/index.js +1 -1
- package/es/components/provider/provider.js +39 -5
- package/es/components/provider/system/index.js +8 -0
- package/es/components/provider/system/system.js +33 -0
- package/es/components/spacer/spacer.js +7 -6
- package/es/components/text/text.js +7 -6
- package/es/components/text/text_color.js +7 -6
- package/es/components/timeline/timeline_item.js +7 -6
- package/es/components/timeline/timeline_item_icon.js +7 -6
- package/es/components/title/title.js +7 -6
- package/es/global_styling/utility/utility.js +27 -0
- package/es/services/theme/hooks.js +2 -2
- package/es/services/theme/provider.js +1 -5
- package/eui.d.ts +1030 -357
- package/i18ntokens.json +12 -12
- package/lib/components/accessibility/skip_link/skip_link.js +13 -10
- package/lib/components/avatar/avatar.js +12 -8
- package/lib/components/bottom_bar/bottom_bar.js +9 -6
- package/lib/components/breadcrumbs/breadcrumbs.js +2 -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 +14 -10
- 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/expression/expression.js +14 -12
- package/lib/components/facet/facet_button.js +43 -21
- package/lib/components/facet/facet_button.styles.js +79 -0
- package/lib/components/facet/facet_group.js +20 -29
- package/lib/components/facet/facet_group.styles.js +82 -0
- package/lib/components/header/header_links/header_link.js +2 -1
- package/lib/components/health/health.js +10 -8
- package/lib/components/horizontal_rule/horizontal_rule.js +10 -8
- package/lib/components/link/link.js +13 -7
- package/lib/components/loading/loading_chart.js +10 -8
- package/lib/components/loading/loading_content.js +10 -8
- package/lib/components/loading/loading_logo.js +10 -8
- package/lib/components/loading/loading_spinner.js +23 -10
- package/lib/components/loading/loading_spinner.styles.js +4 -4
- package/lib/components/mark/mark.js +12 -10
- package/lib/components/markdown_editor/markdown_format.js +10 -8
- package/lib/components/notification/notification_event.js +2 -1
- package/lib/components/panel/panel.js +11 -9
- package/lib/components/provider/cache/cache_context.js +24 -0
- package/lib/components/provider/cache/cache_provider.js +29 -0
- package/lib/components/provider/cache/index.js +31 -0
- package/lib/components/provider/index.js +12 -7
- package/lib/components/provider/provider.js +40 -5
- package/lib/components/provider/system/index.js +18 -0
- package/lib/components/provider/system/system.js +45 -0
- package/lib/components/spacer/spacer.js +10 -8
- package/lib/components/text/text.js +10 -8
- package/lib/components/text/text_color.js +10 -8
- package/lib/components/timeline/timeline_item.js +10 -8
- package/lib/components/timeline/timeline_item_icon.js +10 -8
- package/lib/components/title/title.js +11 -9
- package/lib/global_styling/utility/utility.js +31 -0
- package/lib/services/theme/hooks.js +2 -2
- package/lib/services/theme/provider.js +3 -6
- package/optimize/es/components/accessibility/skip_link/skip_link.js +6 -5
- package/optimize/es/components/avatar/avatar.js +7 -5
- package/optimize/es/components/bottom_bar/bottom_bar.js +8 -9
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +2 -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 +8 -7
- package/optimize/es/components/expression/expression.js +10 -9
- package/optimize/es/components/facet/facet_button.js +35 -18
- package/optimize/es/components/facet/facet_button.styles.js +64 -0
- package/optimize/es/components/facet/facet_group.js +14 -24
- package/optimize/es/components/facet/facet_group.styles.js +79 -0
- package/optimize/es/components/health/health.js +6 -5
- package/optimize/es/components/horizontal_rule/horizontal_rule.js +6 -5
- package/optimize/es/components/link/link.js +7 -6
- package/optimize/es/components/loading/loading_chart.js +6 -5
- package/optimize/es/components/loading/loading_content.js +6 -5
- package/optimize/es/components/loading/loading_logo.js +6 -5
- package/optimize/es/components/loading/loading_spinner.js +8 -6
- package/optimize/es/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/es/components/mark/mark.js +8 -7
- package/optimize/es/components/markdown_editor/markdown_format.js +6 -5
- package/optimize/es/components/panel/panel.js +7 -6
- package/optimize/es/components/provider/cache/cache_context.js +12 -0
- package/optimize/es/components/provider/cache/cache_provider.js +17 -0
- package/optimize/es/components/provider/cache/index.js +9 -0
- package/optimize/es/components/provider/index.js +1 -1
- package/optimize/es/components/provider/provider.js +39 -5
- package/optimize/es/components/provider/system/index.js +8 -0
- package/optimize/es/components/provider/system/system.js +33 -0
- package/optimize/es/components/spacer/spacer.js +6 -5
- package/optimize/es/components/text/text.js +6 -5
- package/optimize/es/components/text/text_color.js +6 -5
- package/optimize/es/components/timeline/timeline_item.js +6 -5
- package/optimize/es/components/timeline/timeline_item_icon.js +6 -5
- package/optimize/es/components/title/title.js +6 -5
- package/optimize/es/global_styling/utility/utility.js +27 -0
- package/optimize/es/services/theme/hooks.js +2 -2
- package/optimize/es/services/theme/provider.js +1 -5
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +8 -6
- package/optimize/lib/components/avatar/avatar.js +9 -5
- package/optimize/lib/components/bottom_bar/bottom_bar.js +9 -6
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +2 -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 +13 -9
- package/optimize/lib/components/expression/expression.js +11 -9
- package/optimize/lib/components/facet/facet_button.js +40 -18
- package/optimize/lib/components/facet/facet_button.styles.js +79 -0
- package/optimize/lib/components/facet/facet_group.js +15 -24
- package/optimize/lib/components/facet/facet_group.styles.js +82 -0
- package/optimize/lib/components/health/health.js +7 -5
- package/optimize/lib/components/horizontal_rule/horizontal_rule.js +7 -5
- package/optimize/lib/components/link/link.js +12 -6
- package/optimize/lib/components/loading/loading_chart.js +7 -5
- package/optimize/lib/components/loading/loading_content.js +7 -5
- package/optimize/lib/components/loading/loading_logo.js +7 -5
- package/optimize/lib/components/loading/loading_spinner.js +9 -6
- package/optimize/lib/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/lib/components/mark/mark.js +9 -7
- package/optimize/lib/components/markdown_editor/markdown_format.js +7 -5
- package/optimize/lib/components/panel/panel.js +8 -6
- package/optimize/lib/components/provider/cache/cache_context.js +24 -0
- package/optimize/lib/components/provider/cache/cache_provider.js +29 -0
- package/optimize/lib/components/provider/cache/index.js +31 -0
- package/optimize/lib/components/provider/index.js +12 -7
- package/optimize/lib/components/provider/provider.js +40 -5
- package/optimize/lib/components/provider/system/index.js +18 -0
- package/optimize/lib/components/provider/system/system.js +54 -0
- package/optimize/lib/components/spacer/spacer.js +7 -5
- package/optimize/lib/components/text/text.js +7 -5
- package/optimize/lib/components/text/text_color.js +7 -5
- package/optimize/lib/components/timeline/timeline_item.js +7 -5
- package/optimize/lib/components/timeline/timeline_item_icon.js +7 -5
- package/optimize/lib/components/title/title.js +8 -6
- package/optimize/lib/global_styling/utility/utility.js +31 -0
- package/optimize/lib/services/theme/hooks.js +2 -2
- package/optimize/lib/services/theme/provider.js +3 -6
- 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 +13 -10
- package/test-env/components/avatar/avatar.js +12 -8
- package/test-env/components/bottom_bar/bottom_bar.js +9 -6
- package/test-env/components/breadcrumbs/breadcrumbs.js +2 -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 +14 -10
- 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/expression/expression.js +14 -12
- package/test-env/components/facet/facet_button.js +43 -21
- package/test-env/components/facet/facet_button.styles.js +79 -0
- package/test-env/components/facet/facet_group.js +20 -29
- 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/health/health.js +10 -8
- package/test-env/components/horizontal_rule/horizontal_rule.js +10 -8
- package/test-env/components/link/link.js +13 -7
- package/test-env/components/loading/loading_chart.js +10 -8
- package/test-env/components/loading/loading_content.js +10 -8
- package/test-env/components/loading/loading_logo.js +10 -8
- package/test-env/components/loading/loading_spinner.js +23 -10
- package/test-env/components/loading/loading_spinner.styles.js +4 -4
- package/test-env/components/mark/mark.js +12 -10
- package/test-env/components/markdown_editor/markdown_format.js +10 -8
- package/test-env/components/notification/notification_event.js +2 -1
- package/test-env/components/panel/panel.js +11 -9
- package/test-env/components/provider/cache/cache_context.js +24 -0
- package/test-env/components/provider/cache/cache_provider.js +29 -0
- package/test-env/components/provider/cache/index.js +31 -0
- package/test-env/components/provider/index.js +12 -7
- package/test-env/components/provider/provider.js +40 -5
- package/test-env/components/provider/system/index.js +18 -0
- package/test-env/components/provider/system/system.js +54 -0
- package/test-env/components/spacer/spacer.js +10 -8
- package/test-env/components/text/text.js +10 -8
- package/test-env/components/text/text_color.js +10 -8
- package/test-env/components/timeline/timeline_item.js +10 -8
- package/test-env/components/timeline/timeline_item_icon.js +10 -8
- package/test-env/components/title/title.js +11 -9
- package/test-env/global_styling/utility/utility.js +31 -0
- package/test-env/services/theme/hooks.js +2 -2
- package/test-env/services/theme/provider.js +3 -6
- 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
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.EuiTextColor = exports.COLORS = void 0;
|
|
8
|
+
exports._EuiTextColor = exports.EuiTextColor = exports.COLORS = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -13,13 +13,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _clone_element = require("../../services/theme/clone_element");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _system = require("../provider/system");
|
|
17
17
|
|
|
18
18
|
var _text_color = require("./text_color.styles");
|
|
19
19
|
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["children", "color", "component", "cloneElement", "style"];
|
|
22
|
+
var _excluded = ["children", "color", "component", "cloneElement", "style", "euiTheme"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -40,7 +40,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
40
40
|
var COLORS = ['default', 'subdued', 'success', 'accent', 'danger', 'warning', 'ghost', 'inherit'];
|
|
41
41
|
exports.COLORS = COLORS;
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _EuiTextColor = function _EuiTextColor(_ref) {
|
|
44
44
|
var children = _ref.children,
|
|
45
45
|
_ref$color = _ref.color,
|
|
46
46
|
color = _ref$color === void 0 ? 'default' : _ref$color,
|
|
@@ -49,10 +49,10 @@ var EuiTextColor = function EuiTextColor(_ref) {
|
|
|
49
49
|
_ref$cloneElement = _ref.cloneElement,
|
|
50
50
|
cloneElement = _ref$cloneElement === void 0 ? false : _ref$cloneElement,
|
|
51
51
|
style = _ref.style,
|
|
52
|
+
euiTheme = _ref.euiTheme,
|
|
52
53
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
53
54
|
|
|
54
55
|
var isNamedColor = COLORS.includes(color);
|
|
55
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
56
56
|
var styles = (0, _text_color.euiTextColorStyles)(euiTheme);
|
|
57
57
|
var cssStyles = [styles.euiTextColor, isNamedColor ? styles[color] : styles.customColor]; // We're checking if is a custom color.
|
|
58
58
|
// If it is a custom color we set the `color` of the `.euiTextColor` div to that custom color.
|
|
@@ -79,8 +79,8 @@ var EuiTextColor = function EuiTextColor(_ref) {
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
|
|
82
|
-
exports.
|
|
83
|
-
|
|
82
|
+
exports._EuiTextColor = _EuiTextColor;
|
|
83
|
+
_EuiTextColor.propTypes = {
|
|
84
84
|
className: _propTypes.default.string,
|
|
85
85
|
"aria-label": _propTypes.default.string,
|
|
86
86
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -100,4 +100,6 @@ EuiTextColor.propTypes = {
|
|
|
100
100
|
* Can only be used when wrapping a *single* child element/tag, and not raw text.
|
|
101
101
|
*/
|
|
102
102
|
cloneElement: _propTypes.default.bool
|
|
103
|
-
};
|
|
103
|
+
};
|
|
104
|
+
var EuiTextColor = (0, _system.withEuiSystem)(_EuiTextColor);
|
|
105
|
+
exports.EuiTextColor = EuiTextColor;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.VERTICAL_ALIGN = exports.EuiTimelineItem = void 0;
|
|
6
|
+
exports._EuiTimelineItem = exports.VERTICAL_ALIGN = exports.EuiTimelineItem = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _system = require("../provider/system");
|
|
13
13
|
|
|
14
14
|
var _timeline_item_event = require("./timeline_item_event");
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ var _timeline_item = require("./timeline_item.styles");
|
|
|
19
19
|
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["children", "verticalAlign", "icon", "iconAriaLabel", "className", "component"];
|
|
22
|
+
var _excluded = ["children", "verticalAlign", "icon", "iconAriaLabel", "className", "component", "euiTheme"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -32,7 +32,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
32
32
|
var VERTICAL_ALIGN = ['top', 'center'];
|
|
33
33
|
exports.VERTICAL_ALIGN = VERTICAL_ALIGN;
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _EuiTimelineItem = function _EuiTimelineItem(_ref) {
|
|
36
36
|
var children = _ref.children,
|
|
37
37
|
_ref$verticalAlign = _ref.verticalAlign,
|
|
38
38
|
verticalAlign = _ref$verticalAlign === void 0 ? 'center' : _ref$verticalAlign,
|
|
@@ -41,9 +41,9 @@ var EuiTimelineItem = function EuiTimelineItem(_ref) {
|
|
|
41
41
|
className = _ref.className,
|
|
42
42
|
_ref$component = _ref.component,
|
|
43
43
|
component = _ref$component === void 0 ? 'li' : _ref$component,
|
|
44
|
+
euiTheme = _ref.euiTheme,
|
|
44
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
45
46
|
|
|
46
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
47
47
|
var styles = (0, _timeline_item.euiTimelineItemStyles)(euiTheme);
|
|
48
48
|
var cssStyles = [styles.euiTimelineItem];
|
|
49
49
|
var Element = component;
|
|
@@ -58,8 +58,8 @@ var EuiTimelineItem = function EuiTimelineItem(_ref) {
|
|
|
58
58
|
}, children));
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
exports.
|
|
62
|
-
|
|
61
|
+
exports._EuiTimelineItem = _EuiTimelineItem;
|
|
62
|
+
_EuiTimelineItem.propTypes = {
|
|
63
63
|
/**
|
|
64
64
|
* Vertical alignment of the event with the icon
|
|
65
65
|
*/
|
|
@@ -74,4 +74,6 @@ EuiTimelineItem.propTypes = {
|
|
|
74
74
|
className: _propTypes.default.string,
|
|
75
75
|
"aria-label": _propTypes.default.string,
|
|
76
76
|
"data-test-subj": _propTypes.default.string
|
|
77
|
-
};
|
|
77
|
+
};
|
|
78
|
+
var EuiTimelineItem = (0, _system.withEuiSystem)(_EuiTimelineItem);
|
|
79
|
+
exports.EuiTimelineItem = EuiTimelineItem;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.EuiTimelineItemIcon = void 0;
|
|
6
|
+
exports._EuiTimelineItemIcon = exports.EuiTimelineItemIcon = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _avatar = require("../avatar");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _system = require("../provider/system");
|
|
15
15
|
|
|
16
16
|
var _timeline_item_icon = require("./timeline_item_icon.styles");
|
|
17
17
|
|
|
@@ -26,12 +26,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
26
26
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
27
27
|
* Side Public License, v 1.
|
|
28
28
|
*/
|
|
29
|
-
var
|
|
29
|
+
var _EuiTimelineItemIcon = function _EuiTimelineItemIcon(_ref) {
|
|
30
30
|
var icon = _ref.icon,
|
|
31
31
|
_ref$verticalAlign = _ref.verticalAlign,
|
|
32
32
|
verticalAlign = _ref$verticalAlign === void 0 ? 'center' : _ref$verticalAlign,
|
|
33
|
-
iconAriaLabel = _ref.iconAriaLabel
|
|
34
|
-
|
|
33
|
+
iconAriaLabel = _ref.iconAriaLabel,
|
|
34
|
+
euiTheme = _ref.euiTheme;
|
|
35
35
|
var styles = (0, _timeline_item_icon.euiTimelineItemIconStyles)(euiTheme);
|
|
36
36
|
var cssStyles = [styles.euiTimelineItemIcon, styles[verticalAlign]];
|
|
37
37
|
var cssContentStyles = styles.euiTimelineItemIcon__content;
|
|
@@ -48,8 +48,8 @@ var EuiTimelineItemIcon = function EuiTimelineItemIcon(_ref) {
|
|
|
48
48
|
}, iconRender));
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
exports.
|
|
52
|
-
|
|
51
|
+
exports._EuiTimelineItemIcon = _EuiTimelineItemIcon;
|
|
52
|
+
_EuiTimelineItemIcon.propTypes = {
|
|
53
53
|
/**
|
|
54
54
|
* Any `ReactNode`, but preferably `EuiAvatar`, or a `string` as an `EuiIcon['type']`.
|
|
55
55
|
*/
|
|
@@ -61,4 +61,6 @@ EuiTimelineItemIcon.propTypes = {
|
|
|
61
61
|
* If no `aria-label` is passed we assume the icon is purely decorative.
|
|
62
62
|
*/
|
|
63
63
|
iconAriaLabel: _propTypes.default.string
|
|
64
|
-
};
|
|
64
|
+
};
|
|
65
|
+
var EuiTimelineItemIcon = (0, _system.withEuiSystem)(_EuiTimelineItemIcon);
|
|
66
|
+
exports.EuiTimelineItemIcon = EuiTimelineItemIcon;
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TITLE_SIZES = exports.TEXT_TRANSFORM = exports.EuiTitle = void 0;
|
|
6
|
+
exports._EuiTitle = exports.TITLE_SIZES = exports.TEXT_TRANSFORM = exports.EuiTitle = void 0;
|
|
7
7
|
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var _services = require("../../services");
|
|
13
|
-
|
|
14
12
|
var _clone_element = require("../../services/theme/clone_element");
|
|
15
13
|
|
|
16
14
|
var _title = require("./title.styles");
|
|
17
15
|
|
|
18
|
-
var
|
|
16
|
+
var _system = require("../provider/system");
|
|
17
|
+
|
|
18
|
+
var _excluded = ["size", "children", "className", "textTransform", "euiTheme"];
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
@@ -34,15 +34,15 @@ exports.TITLE_SIZES = TITLE_SIZES;
|
|
|
34
34
|
var TEXT_TRANSFORM = ['uppercase'];
|
|
35
35
|
exports.TEXT_TRANSFORM = TEXT_TRANSFORM;
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _EuiTitle = function _EuiTitle(_ref) {
|
|
38
38
|
var _ref$size = _ref.size,
|
|
39
39
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
40
40
|
children = _ref.children,
|
|
41
41
|
className = _ref.className,
|
|
42
42
|
textTransform = _ref.textTransform,
|
|
43
|
+
euiTheme = _ref.euiTheme,
|
|
43
44
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
44
45
|
|
|
45
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
46
46
|
var styles = (0, _title.euiTitleStyles)(euiTheme);
|
|
47
47
|
var cssStyles = [styles.euiTitle, textTransform ? styles[textTransform] : undefined, styles[size]];
|
|
48
48
|
var classes = (0, _classnames.default)('euiTitle', className, children.props.className);
|
|
@@ -55,8 +55,8 @@ var EuiTitle = function EuiTitle(_ref) {
|
|
|
55
55
|
return (0, _clone_element.cloneElementWithCss)(children, props);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
exports.
|
|
59
|
-
|
|
58
|
+
exports._EuiTitle = _EuiTitle;
|
|
59
|
+
_EuiTitle.propTypes = {
|
|
60
60
|
className: _propTypes.default.string,
|
|
61
61
|
"aria-label": _propTypes.default.string,
|
|
62
62
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -68,4 +68,6 @@ EuiTitle.propTypes = {
|
|
|
68
68
|
size: _propTypes.default.any,
|
|
69
69
|
textTransform: _propTypes.default.any,
|
|
70
70
|
id: _propTypes.default.string
|
|
71
|
-
};
|
|
71
|
+
};
|
|
72
|
+
var EuiTitle = (0, _system.withEuiSystem)(_EuiTitle);
|
|
73
|
+
exports.EuiTitle = EuiTitle;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EuiUtilityClasses = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _react2 = require("@emotion/react");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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 _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "bd8dxy-EuiUtilityClasses",
|
|
18
|
+
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;"
|
|
19
|
+
} : {
|
|
20
|
+
name: "bd8dxy-EuiUtilityClasses",
|
|
21
|
+
styles: ".euiYolo{color:coral;};label:EuiUtilityClasses;",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var EuiUtilityClasses = function EuiUtilityClasses() {
|
|
26
|
+
return (0, _react2.jsx)(_react2.Global, {
|
|
27
|
+
styles: _ref
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
exports.EuiUtilityClasses = EuiUtilityClasses;
|
|
@@ -33,7 +33,7 @@ var useEuiTheme = function useEuiTheme() {
|
|
|
33
33
|
exports.useEuiTheme = useEuiTheme;
|
|
34
34
|
|
|
35
35
|
var withEuiTheme = function withEuiTheme(Component) {
|
|
36
|
-
var componentName = Component.displayName || Component.name || '
|
|
36
|
+
var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
|
|
37
37
|
|
|
38
38
|
var Render = function Render(props, ref) {
|
|
39
39
|
var _useEuiTheme = useEuiTheme(),
|
|
@@ -52,7 +52,7 @@ var withEuiTheme = function withEuiTheme(Component) {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
var WithEuiTheme = /*#__PURE__*/(0, _react.forwardRef)(Render);
|
|
55
|
-
WithEuiTheme.displayName =
|
|
55
|
+
WithEuiTheme.displayName = componentName;
|
|
56
56
|
return WithEuiTheme;
|
|
57
57
|
};
|
|
58
58
|
|
|
@@ -9,14 +9,14 @@ exports.EuiThemeProvider = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _react2 = require("@emotion/react");
|
|
13
|
-
|
|
14
12
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
15
13
|
|
|
16
14
|
var _context = require("./context");
|
|
17
15
|
|
|
18
16
|
var _utils = require("./utils");
|
|
19
17
|
|
|
18
|
+
var _react2 = require("@emotion/react");
|
|
19
|
+
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
22
|
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); }
|
|
@@ -39,7 +39,6 @@ var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
|
39
39
|
var _system = _ref.theme,
|
|
40
40
|
_colorMode = _ref.colorMode,
|
|
41
41
|
_modifications = _ref.modify,
|
|
42
|
-
cache = _ref.cache,
|
|
43
42
|
children = _ref.children;
|
|
44
43
|
var parentSystem = (0, _react.useContext)(_context.EuiSystemContext);
|
|
45
44
|
var parentModifications = (0, _react.useContext)(_context.EuiModificationsContext);
|
|
@@ -113,9 +112,7 @@ var EuiThemeProvider = function EuiThemeProvider(_ref) {
|
|
|
113
112
|
value: modifications
|
|
114
113
|
}, (0, _react2.jsx)(_context.EuiThemeContext.Provider, {
|
|
115
114
|
value: theme
|
|
116
|
-
},
|
|
117
|
-
value: cache
|
|
118
|
-
}, children) : children))));
|
|
115
|
+
}, children))));
|
|
119
116
|
};
|
|
120
117
|
|
|
121
118
|
exports.EuiThemeProvider = EuiThemeProvider;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["destinationId", "tabIndex", "position", "children", "className"];
|
|
3
|
+
var _excluded = ["destinationId", "tabIndex", "position", "children", "className", "euiTheme"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -11,22 +11,22 @@ var _excluded = ["destinationId", "tabIndex", "position", "children", "className
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import { useEuiTheme } from '../../../services';
|
|
15
14
|
import { EuiButton } from '../../button/button';
|
|
15
|
+
import { withEuiSystem } from '../../provider/system';
|
|
16
16
|
import { EuiScreenReaderOnly } from '../screen_reader_only';
|
|
17
17
|
import { euiSkipLinkStyles } from './skip_link.styles';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
19
|
export var POSITIONS = ['static', 'fixed', 'absolute'];
|
|
20
|
-
export var
|
|
20
|
+
export var _EuiSkipLink = function _EuiSkipLink(_ref) {
|
|
21
21
|
var destinationId = _ref.destinationId,
|
|
22
22
|
tabIndex = _ref.tabIndex,
|
|
23
23
|
_ref$position = _ref.position,
|
|
24
24
|
position = _ref$position === void 0 ? 'static' : _ref$position,
|
|
25
25
|
children = _ref.children,
|
|
26
26
|
className = _ref.className,
|
|
27
|
+
euiTheme = _ref.euiTheme,
|
|
27
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
29
|
|
|
29
|
-
var euiTheme = useEuiTheme();
|
|
30
30
|
var styles = euiSkipLinkStyles(euiTheme);
|
|
31
31
|
var classes = classNames('euiSkipLink', className);
|
|
32
32
|
var cssStyles = [styles.euiSkipLink, position !== 'static' ? styles[position] : undefined]; // Create the `href` from `destinationId`
|
|
@@ -48,4 +48,5 @@ export var EuiSkipLink = function EuiSkipLink(_ref) {
|
|
|
48
48
|
size: "s",
|
|
49
49
|
fill: true
|
|
50
50
|
}, optionalProps, rest), children));
|
|
51
|
-
};
|
|
51
|
+
};
|
|
52
|
+
export var EuiSkipLink = withEuiSystem(_EuiSkipLink);
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
5
|
+
var _excluded = ["className", "color", "euiTheme", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -14,17 +14,19 @@ var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength",
|
|
|
14
14
|
import React from 'react';
|
|
15
15
|
import classNames from 'classnames';
|
|
16
16
|
import { isColorDark, hexToRgb, isValidHex } from '../../services/color';
|
|
17
|
-
import {
|
|
17
|
+
import { withEuiSystem } from '../provider/system';
|
|
18
|
+
import { euiPaletteColorBlindBehindText, toInitials } from '../../services';
|
|
18
19
|
import { EuiIcon } from '../icon';
|
|
19
20
|
import { euiAvatarStyles } from './avatar.styles';
|
|
20
21
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
22
|
export var SIZES = ['s', 'm', 'l', 'xl'];
|
|
22
23
|
export var TYPES = ['space', 'user'];
|
|
23
|
-
export var
|
|
24
|
+
export var _EuiAvatar = function _EuiAvatar(_ref) {
|
|
24
25
|
var _classNames;
|
|
25
26
|
|
|
26
27
|
var className = _ref.className,
|
|
27
28
|
color = _ref.color,
|
|
29
|
+
euiTheme = _ref.euiTheme,
|
|
28
30
|
imageUrl = _ref.imageUrl,
|
|
29
31
|
initials = _ref.initials,
|
|
30
32
|
initialsLength = _ref.initialsLength,
|
|
@@ -41,7 +43,6 @@ export var EuiAvatar = function EuiAvatar(_ref) {
|
|
|
41
43
|
style = _ref.style,
|
|
42
44
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
43
45
|
|
|
44
|
-
var euiTheme = useEuiTheme();
|
|
45
46
|
var styles = euiAvatarStyles(euiTheme);
|
|
46
47
|
var visColors = euiPaletteColorBlindBehindText();
|
|
47
48
|
var isPlain = color === 'plain';
|
|
@@ -94,7 +95,8 @@ export var EuiAvatar = function EuiAvatar(_ref) {
|
|
|
94
95
|
role: isDisabled ? 'presentation' : 'img',
|
|
95
96
|
title: name
|
|
96
97
|
}, rest), content);
|
|
97
|
-
};
|
|
98
|
+
};
|
|
99
|
+
export var EuiAvatar = withEuiSystem(_EuiAvatar); // TODO: Migrate to a service
|
|
98
100
|
|
|
99
101
|
export var checkValidColor = function checkValidColor(color) {
|
|
100
102
|
var validHex = color && isValidHex(color) || color === 'plain' || color === 'subdued';
|
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style"];
|
|
5
|
+
var _excluded = ["position", "paddingSize", "affordForDisplacement", "children", "className", "bodyClassName", "landmarkHeading", "usePortal", "left", "right", "bottom", "top", "style", "euiTheme"];
|
|
6
6
|
|
|
7
7
|
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; }
|
|
8
8
|
|
|
@@ -17,13 +17,14 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
17
17
|
*/
|
|
18
18
|
import classNames from 'classnames';
|
|
19
19
|
import React, { forwardRef, useEffect, useState } from 'react';
|
|
20
|
-
import { useCombinedRefs
|
|
20
|
+
import { useCombinedRefs } from '../../services';
|
|
21
21
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
22
22
|
import { EuiI18n } from '../i18n';
|
|
23
23
|
import { useResizeObserver } from '../observer/resize_observer';
|
|
24
24
|
import { EuiPortal } from '../portal';
|
|
25
|
-
import {
|
|
25
|
+
import { withEuiSystem } from '../provider/system';
|
|
26
26
|
import { EuiThemeProvider } from '../../services/theme/provider';
|
|
27
|
+
import { euiBottomBarStyles } from './bottom_bar.styles';
|
|
27
28
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
28
29
|
// Exported for testing
|
|
29
30
|
export var paddingSizeToClassNameMap = {
|
|
@@ -33,8 +34,7 @@ export var paddingSizeToClassNameMap = {
|
|
|
33
34
|
l: 'euiBottomBar--paddingLarge'
|
|
34
35
|
};
|
|
35
36
|
export var POSITIONS = ['static', 'fixed', 'sticky'];
|
|
36
|
-
|
|
37
|
-
var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
37
|
+
export var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
38
38
|
var _ref$position = _ref.position,
|
|
39
39
|
position = _ref$position === void 0 ? 'fixed' : _ref$position,
|
|
40
40
|
_ref$paddingSize = _ref.paddingSize,
|
|
@@ -55,9 +55,9 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
55
55
|
bottom = _ref$bottom === void 0 ? 0 : _ref$bottom,
|
|
56
56
|
top = _ref.top,
|
|
57
57
|
style = _ref.style,
|
|
58
|
+
euiTheme = _ref.euiTheme,
|
|
58
59
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
59
60
|
|
|
60
|
-
var euiTheme = useEuiTheme();
|
|
61
61
|
var styles = euiBottomBarStyles(euiTheme); // Force some props if `fixed` position, but not if the user has supplied these
|
|
62
62
|
|
|
63
63
|
affordForDisplacement = position !== 'fixed' ? false : affordForDisplacement;
|
|
@@ -131,11 +131,10 @@ var _EuiBottomBar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
131
131
|
|
|
132
132
|
return usePortal ? ___EmotionJSX(EuiPortal, null, bar) : bar;
|
|
133
133
|
});
|
|
134
|
-
|
|
135
134
|
export var EuiBottomBar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
136
|
-
var BottomBar = _EuiBottomBar;
|
|
135
|
+
var BottomBar = withEuiSystem(_EuiBottomBar);
|
|
137
136
|
return ___EmotionJSX(EuiThemeProvider, {
|
|
138
|
-
colorMode:
|
|
137
|
+
colorMode: "dark"
|
|
139
138
|
}, ___EmotionJSX(BottomBar, _extends({
|
|
140
139
|
ref: ref
|
|
141
140
|
}, props)));
|
|
@@ -166,7 +166,8 @@ export var EuiBreadcrumbs = function EuiBreadcrumbs(_ref) {
|
|
|
166
166
|
}, linkProps, breadcrumbRest), text);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
return ___EmotionJSX(EuiLink
|
|
169
|
+
return ___EmotionJSX(EuiLink // @ts-expect-error Ref forwarding type mismatch
|
|
170
|
+
, _extends({
|
|
170
171
|
ref: ref,
|
|
171
172
|
color: isLastBreadcrumb ? 'text' : 'subdued',
|
|
172
173
|
onClick: onClick,
|
|
@@ -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';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["element", "children", "iconType", "iconSide", "size", "isDisabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps"];
|
|
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; }
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
import React, { forwardRef } from 'react'; // @ts-ignore module doesn't export `createElement`
|
|
18
|
+
|
|
19
|
+
import { createElement } from '@emotion/react';
|
|
20
|
+
import { useEuiTheme } from '../../../services';
|
|
21
|
+
import { euiButtonDisplayStyles } from './_button_display.styles';
|
|
22
|
+
import { EuiButtonDisplayContent } from './_button_display_content';
|
|
23
|
+
/**
|
|
24
|
+
* Extends EuiButtonDisplayContentProps which provides
|
|
25
|
+
* `iconType`, `iconSide`, and `textProps`
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* EuiButtonDisplay is an internal-only component used for displaying
|
|
32
|
+
* any element as a button.
|
|
33
|
+
*/
|
|
34
|
+
export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
35
|
+
var _ref$element = _ref.element,
|
|
36
|
+
element = _ref$element === void 0 ? 'button' : _ref$element,
|
|
37
|
+
children = _ref.children,
|
|
38
|
+
iconType = _ref.iconType,
|
|
39
|
+
iconSide = _ref.iconSide,
|
|
40
|
+
_ref$size = _ref.size,
|
|
41
|
+
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
42
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
43
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
44
|
+
isLoading = _ref.isLoading,
|
|
45
|
+
isSelected = _ref.isSelected,
|
|
46
|
+
fullWidth = _ref.fullWidth,
|
|
47
|
+
minWidth = _ref.minWidth,
|
|
48
|
+
contentProps = _ref.contentProps,
|
|
49
|
+
textProps = _ref.textProps,
|
|
50
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
51
|
+
|
|
52
|
+
var buttonIsDisabled = isLoading || isDisabled;
|
|
53
|
+
var minWidthPx = minWidth === 'number' ? "".concat(minWidth, "px") : minWidth;
|
|
54
|
+
var theme = useEuiTheme();
|
|
55
|
+
var styles = euiButtonDisplayStyles(theme, minWidthPx);
|
|
56
|
+
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, isDisabled && styles.isDisabled];
|
|
57
|
+
|
|
58
|
+
var innerNode = ___EmotionJSX(EuiButtonDisplayContent, _extends({
|
|
59
|
+
isLoading: isLoading,
|
|
60
|
+
isDisabled: buttonIsDisabled,
|
|
61
|
+
iconType: iconType,
|
|
62
|
+
iconSide: iconSide,
|
|
63
|
+
textProps: _objectSpread({}, textProps)
|
|
64
|
+
}, contentProps), children);
|
|
65
|
+
|
|
66
|
+
return createElement(element, _objectSpread({
|
|
67
|
+
css: cssStyles,
|
|
68
|
+
disabled: element === 'button' && buttonIsDisabled,
|
|
69
|
+
'aria-pressed': element === 'button' ? isSelected : undefined,
|
|
70
|
+
ref: ref
|
|
71
|
+
}, rest), innerNode);
|
|
72
|
+
});
|
|
73
|
+
EuiButtonDisplay.displayName = 'EuiButtonDisplay';
|