@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
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.sizeToClassNameMap = exports.colorToClassNameMap = exports.SIZES = exports.
|
|
10
|
+
exports.sizeToClassNameMap = exports.colorToClassNameMap = exports.SIZES = exports.EuiButtonDisplayDeprecated = exports.EuiButton = exports.COLORS = void 0;
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
@@ -25,7 +25,7 @@ var _common = require("../common");
|
|
|
25
25
|
|
|
26
26
|
var _services = require("../../services");
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _button_content_deprecated = require("./_button_content_deprecated");
|
|
29
29
|
|
|
30
30
|
var _href_validator = require("../../services/security/href_validator");
|
|
31
31
|
|
|
@@ -112,11 +112,13 @@ var EuiButton = function EuiButton(_ref) {
|
|
|
112
112
|
relObj.type = type;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
return (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
return (// eslint-disable-next-line react/jsx-pascal-case
|
|
116
|
+
(0, _react2.jsx)(EuiButtonDisplayDeprecated, (0, _extends2.default)({
|
|
117
|
+
element: element,
|
|
118
|
+
baseClassName: "euiButton",
|
|
119
|
+
ref: buttonRef
|
|
120
|
+
}, elementProps, relObj, rest))
|
|
121
|
+
);
|
|
120
122
|
};
|
|
121
123
|
|
|
122
124
|
exports.EuiButton = EuiButton;
|
|
@@ -216,7 +218,8 @@ EuiButton.propTypes = {
|
|
|
216
218
|
iconSide: _propTypes.default.oneOf(["left", "right"]),
|
|
217
219
|
|
|
218
220
|
/**
|
|
219
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
221
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
222
|
+
* It doesn't apply to the icon.
|
|
220
223
|
*/
|
|
221
224
|
textProps: _propTypes.default.shape({
|
|
222
225
|
className: _propTypes.default.string,
|
|
@@ -234,13 +237,16 @@ EuiButton.propTypes = {
|
|
|
234
237
|
EuiButton.displayName = 'EuiButton';
|
|
235
238
|
|
|
236
239
|
/**
|
|
240
|
+
* *DEPRECATED*
|
|
237
241
|
* EuiButtonDisplay is an internal-only component used for displaying
|
|
238
242
|
* any element as a button.
|
|
239
243
|
* NOTE: This component *must* be below EuiButton in the file and
|
|
240
244
|
* EuiButton must also set a displayName for react-docgen-typescript
|
|
241
245
|
* to correctly set EuiButton's docgenInfo and display a props table.
|
|
246
|
+
* This component has been deprecated in favor of the new EuiButtonDisplay
|
|
247
|
+
* that can be found in `src/components/button/button_display/_button_display.tsx`
|
|
242
248
|
*/
|
|
243
|
-
var
|
|
249
|
+
var EuiButtonDisplayDeprecated = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
244
250
|
var _ref2$element = _ref2.element,
|
|
245
251
|
element = _ref2$element === void 0 ? 'button' : _ref2$element,
|
|
246
252
|
baseClassName = _ref2.baseClassName,
|
|
@@ -273,7 +279,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
273
279
|
|
|
274
280
|
var contentClassNames = (0, _classnames.default)('euiButton__content', contentProps && contentProps.className);
|
|
275
281
|
var textClassNames = (0, _classnames.default)('euiButton__text', textProps && textProps.className);
|
|
276
|
-
var innerNode = (0, _react2.jsx)(
|
|
282
|
+
var innerNode = (0, _react2.jsx)(_button_content_deprecated.EuiButtonContentDeprecated, (0, _extends2.default)({
|
|
277
283
|
isLoading: isLoading,
|
|
278
284
|
iconType: iconType,
|
|
279
285
|
iconSide: iconSide,
|
|
@@ -300,8 +306,8 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
300
306
|
ref: ref
|
|
301
307
|
}, rest), innerNode);
|
|
302
308
|
});
|
|
303
|
-
exports.
|
|
304
|
-
|
|
309
|
+
exports.EuiButtonDisplayDeprecated = EuiButtonDisplayDeprecated;
|
|
310
|
+
EuiButtonDisplayDeprecated.propTypes = {
|
|
305
311
|
children: _propTypes.default.node,
|
|
306
312
|
|
|
307
313
|
/**
|
|
@@ -374,4 +380,4 @@ EuiButtonDisplay.propTypes = {
|
|
|
374
380
|
*/
|
|
375
381
|
baseClassName: _propTypes.default.string.isRequired
|
|
376
382
|
};
|
|
377
|
-
|
|
383
|
+
EuiButtonDisplayDeprecated.displayName = 'EuiButtonDisplay';
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.EuiButtonDisplay = void 0;
|
|
11
|
+
|
|
12
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
+
|
|
14
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
+
|
|
16
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
17
|
+
|
|
18
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
19
|
+
|
|
20
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
21
|
+
|
|
22
|
+
var _react2 = require("@emotion/react");
|
|
23
|
+
|
|
24
|
+
var _services = require("../../../services");
|
|
25
|
+
|
|
26
|
+
var _button_display = require("./_button_display.styles");
|
|
27
|
+
|
|
28
|
+
var _button_display_content = require("./_button_display_content");
|
|
29
|
+
|
|
30
|
+
var _excluded = ["element", "children", "iconType", "iconSide", "size", "isDisabled", "isLoading", "isSelected", "fullWidth", "minWidth", "contentProps", "textProps"];
|
|
31
|
+
|
|
32
|
+
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); }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
38
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* EuiButtonDisplay is an internal-only component used for displaying
|
|
42
|
+
* any element as a button.
|
|
43
|
+
*/
|
|
44
|
+
var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
45
|
+
var _ref$element = _ref.element,
|
|
46
|
+
element = _ref$element === void 0 ? 'button' : _ref$element,
|
|
47
|
+
children = _ref.children,
|
|
48
|
+
iconType = _ref.iconType,
|
|
49
|
+
iconSide = _ref.iconSide,
|
|
50
|
+
_ref$size = _ref.size,
|
|
51
|
+
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
52
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
53
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
54
|
+
isLoading = _ref.isLoading,
|
|
55
|
+
isSelected = _ref.isSelected,
|
|
56
|
+
fullWidth = _ref.fullWidth,
|
|
57
|
+
minWidth = _ref.minWidth,
|
|
58
|
+
contentProps = _ref.contentProps,
|
|
59
|
+
textProps = _ref.textProps,
|
|
60
|
+
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
61
|
+
var buttonIsDisabled = isLoading || isDisabled;
|
|
62
|
+
var minWidthPx = minWidth === 'number' ? "".concat(minWidth, "px") : minWidth;
|
|
63
|
+
var theme = (0, _services.useEuiTheme)();
|
|
64
|
+
var styles = (0, _button_display.euiButtonDisplayStyles)(theme, minWidthPx);
|
|
65
|
+
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, isDisabled && styles.isDisabled];
|
|
66
|
+
var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, (0, _extends2.default)({
|
|
67
|
+
isLoading: isLoading,
|
|
68
|
+
isDisabled: buttonIsDisabled,
|
|
69
|
+
iconType: iconType,
|
|
70
|
+
iconSide: iconSide,
|
|
71
|
+
textProps: _objectSpread({}, textProps)
|
|
72
|
+
}, contentProps), children);
|
|
73
|
+
return (0, _react2.createElement)(element, _objectSpread({
|
|
74
|
+
css: cssStyles,
|
|
75
|
+
disabled: element === 'button' && buttonIsDisabled,
|
|
76
|
+
'aria-pressed': element === 'button' ? isSelected : undefined,
|
|
77
|
+
ref: ref
|
|
78
|
+
}, rest), innerNode);
|
|
79
|
+
});
|
|
80
|
+
exports.EuiButtonDisplay = EuiButtonDisplay;
|
|
81
|
+
EuiButtonDisplay.propTypes = {
|
|
82
|
+
children: _propTypes.default.node,
|
|
83
|
+
size: _propTypes.default.oneOf(["xs", "s", "m"]),
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
87
|
+
* *Only use when the readable text does not change between states.*
|
|
88
|
+
*/
|
|
89
|
+
isSelected: _propTypes.default.bool,
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Extends the button to 100% width
|
|
93
|
+
*/
|
|
94
|
+
fullWidth: _propTypes.default.bool,
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Override the default minimum width
|
|
98
|
+
*/
|
|
99
|
+
minWidth: _propTypes.default.any,
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Force disables the button and changes the icon to a loading spinner
|
|
103
|
+
*/
|
|
104
|
+
isLoading: _propTypes.default.bool,
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
108
|
+
*/
|
|
109
|
+
contentProps: _propTypes.default.any,
|
|
110
|
+
style: _propTypes.default.any,
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Any `type` accepted by EuiIcon
|
|
114
|
+
*/
|
|
115
|
+
iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "codeApp", "color", "compute", "console", "consoleApp", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboardShortcut", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenClass", "tokenProperty", "tokenEnum", "tokenVariable", "tokenMethod", "tokenAnnotation", "tokenException", "tokenInterface", "tokenParameter", "tokenField", "tokenElement", "tokenFunction", "tokenBoolean", "tokenString", "tokenArray", "tokenNumber", "tokenConstant", "tokenObject", "tokenEvent", "tokenKey", "tokenNull", "tokenStruct", "tokenPackage", "tokenOperator", "tokenEnumMember", "tokenRepo", "tokenSymbol", "tokenFile", "tokenModule", "tokenNamespace", "tokenDate", "tokenIP", "tokenNested", "tokenAlias", "tokenShape", "tokenGeo", "tokenRange", "tokenBinary", "tokenJoin", "tokenPercolator", "tokenFlattened", "tokenRankFeature", "tokenRankFeatures", "tokenKeyword", "tokenTag", "tokenCompletionSuggester", "tokenDenseVector", "tokenText", "tokenTokenCount", "tokenSearchType", "tokenHistogram"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Can only be one side `left` or `right`
|
|
119
|
+
*/
|
|
120
|
+
iconSide: _propTypes.default.oneOf(["left", "right", undefined]),
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Object of props passed to the <span/> wrapping the content's text/children only (not icon)
|
|
124
|
+
*/
|
|
125
|
+
textProps: _propTypes.default.shape({
|
|
126
|
+
className: _propTypes.default.string,
|
|
127
|
+
"aria-label": _propTypes.default.string,
|
|
128
|
+
"data-test-subj": _propTypes.default.string,
|
|
129
|
+
ref: _propTypes.default.any,
|
|
130
|
+
"data-text": _propTypes.default.string
|
|
131
|
+
}),
|
|
132
|
+
iconSize: _propTypes.default.oneOf(["s", "m"]),
|
|
133
|
+
isDisabled: _propTypes.default.bool.isRequired,
|
|
134
|
+
className: _propTypes.default.string,
|
|
135
|
+
"aria-label": _propTypes.default.string,
|
|
136
|
+
"data-test-subj": _propTypes.default.string,
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Provide a valid element to render the element as
|
|
140
|
+
*/
|
|
141
|
+
element: _propTypes.default.oneOf(["a", "button", "span", "label"])
|
|
142
|
+
};
|
|
143
|
+
EuiButtonDisplay.displayName = 'EuiButtonDisplay';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiButtonDisplayStyles = exports.euiButtonBaseCSS = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../../global_styling");
|
|
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
|
+
// Provides a solid reset and base for handling sizing layout
|
|
15
|
+
// Does not include any visual styles
|
|
16
|
+
var euiButtonBaseCSS = function euiButtonBaseCSS() {
|
|
17
|
+
return "\n display: inline-block;\n appearance: none;\n cursor: pointer;\n ".concat((0, _global_styling.logicalTextAlignStyle)('center'), ";\n white-space: nowrap;\n ").concat((0, _global_styling.logicalCSS)('max-width', '100%'), ";\n vertical-align: middle;\n ");
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.euiButtonBaseCSS = euiButtonBaseCSS;
|
|
21
|
+
|
|
22
|
+
var _buttonSize = function _buttonSize(size) {
|
|
23
|
+
return "\n ".concat((0, _global_styling.logicalCSS)('height', size), ";\n // prevents descenders from getting cut off\n line-height: ").concat(size, ";\n ");
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
27
|
+
name: "15xpz7k-fullWidth",
|
|
28
|
+
styles: "display:block;width:100%;label:fullWidth;"
|
|
29
|
+
} : {
|
|
30
|
+
name: "15xpz7k-fullWidth",
|
|
31
|
+
styles: "display:block;width:100%;label:fullWidth;",
|
|
32
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
36
|
+
name: "8595p9-isDisabled",
|
|
37
|
+
styles: "cursor:not-allowed;label:isDisabled;"
|
|
38
|
+
} : {
|
|
39
|
+
name: "8595p9-isDisabled",
|
|
40
|
+
styles: "cursor:not-allowed;label:isDisabled;",
|
|
41
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext, minWidth) {
|
|
45
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
46
|
+
return {
|
|
47
|
+
// Base
|
|
48
|
+
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";", minWidth && (0, _global_styling.logicalCSS)('min-width', minWidth), ";;label:euiButtonDisplay;"),
|
|
49
|
+
// States
|
|
50
|
+
isDisabled: _ref2,
|
|
51
|
+
fullWidth: _ref,
|
|
52
|
+
// Sizes
|
|
53
|
+
xs: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.l), (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";label:xs;"),
|
|
54
|
+
s: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:s;"),
|
|
55
|
+
m: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xxl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:m;")
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
exports.euiButtonDisplayStyles = euiButtonDisplayStyles;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.EuiButtonDisplayContent = void 0;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
|
+
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
15
|
+
|
|
16
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
17
|
+
|
|
18
|
+
var _services = require("../../../services");
|
|
19
|
+
|
|
20
|
+
var _loading = require("../../loading");
|
|
21
|
+
|
|
22
|
+
var _icon = require("../../icon");
|
|
23
|
+
|
|
24
|
+
var _button_display_content = require("./_button_display_content.styles");
|
|
25
|
+
|
|
26
|
+
var _react2 = require("@emotion/react");
|
|
27
|
+
|
|
28
|
+
var _excluded = ["children", "textProps", "isLoading", "isDisabled", "iconType", "iconSize", "iconSide"];
|
|
29
|
+
|
|
30
|
+
var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
31
|
+
var children = _ref.children,
|
|
32
|
+
textProps = _ref.textProps,
|
|
33
|
+
_ref$isLoading = _ref.isLoading,
|
|
34
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
35
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
36
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
37
|
+
iconType = _ref.iconType,
|
|
38
|
+
_ref$iconSize = _ref.iconSize,
|
|
39
|
+
iconSize = _ref$iconSize === void 0 ? 'm' : _ref$iconSize,
|
|
40
|
+
iconSide = _ref.iconSide,
|
|
41
|
+
contentProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
42
|
+
var theme = (0, _services.useEuiTheme)();
|
|
43
|
+
var styles = (0, _button_display_content.euiButtonDisplayContentStyles)(theme);
|
|
44
|
+
var cssStyles = [styles.euiButtonDisplayContent, iconSide && styles[iconSide], isDisabled && styles.isDisabled];
|
|
45
|
+
var cssSpinnerStyles = [styles.euiButtonDisplayContent__spinner];
|
|
46
|
+
var cssIconStyles = [styles.euiButtonDisplayContent__icon]; // Add an icon to the button if one exists.
|
|
47
|
+
|
|
48
|
+
var icon; // When the button is disabled the text gets gray
|
|
49
|
+
// and in some buttons the background gets a light gray
|
|
50
|
+
// for better contrast we want to change the border of the spinner
|
|
51
|
+
// to have the same color of the text. This way we ensure the borders
|
|
52
|
+
// are always visible. The default spinner color could be very light.
|
|
53
|
+
|
|
54
|
+
var loadingSpinnerColor = isDisabled ? {
|
|
55
|
+
border: 'currentColor'
|
|
56
|
+
} : undefined;
|
|
57
|
+
|
|
58
|
+
if (isLoading) {
|
|
59
|
+
icon = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
60
|
+
css: cssSpinnerStyles,
|
|
61
|
+
size: iconSize,
|
|
62
|
+
color: loadingSpinnerColor
|
|
63
|
+
});
|
|
64
|
+
} else if (iconType) {
|
|
65
|
+
icon = (0, _react2.jsx)(_icon.EuiIcon, {
|
|
66
|
+
css: cssIconStyles,
|
|
67
|
+
type: iconType,
|
|
68
|
+
size: iconSize,
|
|
69
|
+
color: "inherit" // forces the icon to inherit its parent color
|
|
70
|
+
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
var isText = typeof children === 'string';
|
|
75
|
+
return (0, _react2.jsx)("span", (0, _extends2.default)({}, contentProps, {
|
|
76
|
+
css: cssStyles
|
|
77
|
+
}), icon, isText ? (0, _react2.jsx)("span", textProps, children) : children);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
exports.EuiButtonDisplayContent = EuiButtonDisplayContent;
|
|
81
|
+
EuiButtonDisplayContent.propTypes = {
|
|
82
|
+
/**
|
|
83
|
+
* Any `type` accepted by EuiIcon
|
|
84
|
+
*/
|
|
85
|
+
iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "codeApp", "color", "compute", "console", "consoleApp", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboardShortcut", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenClass", "tokenProperty", "tokenEnum", "tokenVariable", "tokenMethod", "tokenAnnotation", "tokenException", "tokenInterface", "tokenParameter", "tokenField", "tokenElement", "tokenFunction", "tokenBoolean", "tokenString", "tokenArray", "tokenNumber", "tokenConstant", "tokenObject", "tokenEvent", "tokenKey", "tokenNull", "tokenStruct", "tokenPackage", "tokenOperator", "tokenEnumMember", "tokenRepo", "tokenSymbol", "tokenFile", "tokenModule", "tokenNamespace", "tokenDate", "tokenIP", "tokenNested", "tokenAlias", "tokenShape", "tokenGeo", "tokenRange", "tokenBinary", "tokenJoin", "tokenPercolator", "tokenFlattened", "tokenRankFeature", "tokenRankFeatures", "tokenKeyword", "tokenTag", "tokenCompletionSuggester", "tokenDenseVector", "tokenText", "tokenTokenCount", "tokenSearchType", "tokenHistogram"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Can only be one side `left` or `right`
|
|
89
|
+
*/
|
|
90
|
+
iconSide: _propTypes.default.oneOf(["left", "right", undefined]),
|
|
91
|
+
isLoading: _propTypes.default.bool,
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Object of props passed to the <span/> wrapping the content's text/children only (not icon)
|
|
95
|
+
*/
|
|
96
|
+
textProps: _propTypes.default.shape({
|
|
97
|
+
className: _propTypes.default.string,
|
|
98
|
+
"aria-label": _propTypes.default.string,
|
|
99
|
+
"data-test-subj": _propTypes.default.string,
|
|
100
|
+
ref: _propTypes.default.any,
|
|
101
|
+
"data-text": _propTypes.default.string
|
|
102
|
+
}),
|
|
103
|
+
iconSize: _propTypes.default.oneOf(["s", "m"]),
|
|
104
|
+
isDisabled: _propTypes.default.bool.isRequired,
|
|
105
|
+
className: _propTypes.default.string,
|
|
106
|
+
"aria-label": _propTypes.default.string,
|
|
107
|
+
"data-test-subj": _propTypes.default.string
|
|
108
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiButtonDisplayContentStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../../global_styling");
|
|
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 _ref = process.env.NODE_ENV === "production" ? {
|
|
15
|
+
name: "ske5nx-isDisabled",
|
|
16
|
+
styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;"
|
|
17
|
+
} : {
|
|
18
|
+
name: "ske5nx-isDisabled",
|
|
19
|
+
styles: "pointer-events:auto;cursor:not-allowed;label:isDisabled;",
|
|
20
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
24
|
+
name: "gtg6j-euiButtonDisplayContent__icon",
|
|
25
|
+
styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;"
|
|
26
|
+
} : {
|
|
27
|
+
name: "gtg6j-euiButtonDisplayContent__icon",
|
|
28
|
+
styles: "flex-shrink:0;label:euiButtonDisplayContent__icon;",
|
|
29
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
33
|
+
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
34
|
+
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;"
|
|
35
|
+
} : {
|
|
36
|
+
name: "10wlo76-euiButtonDisplayContent__spinner",
|
|
37
|
+
styles: "flex-shrink:0;label:euiButtonDisplayContent__spinner;",
|
|
38
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
42
|
+
name: "qfl6yj-right",
|
|
43
|
+
styles: "flex-direction:row-reverse;label:right;"
|
|
44
|
+
} : {
|
|
45
|
+
name: "qfl6yj-right",
|
|
46
|
+
styles: "flex-direction:row-reverse;label:right;",
|
|
47
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
var euiButtonDisplayContentStyles = function euiButtonDisplayContentStyles(_ref5) {
|
|
51
|
+
var euiTheme = _ref5.euiTheme;
|
|
52
|
+
return {
|
|
53
|
+
// Base
|
|
54
|
+
euiButtonDisplayContent: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', '100%'), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";display:flex;justify-content:center;align-items:center;vertical-align:middle;gap:", euiTheme.size.s, ";;label:euiButtonDisplayContent;"),
|
|
55
|
+
// Icon side
|
|
56
|
+
left: /*#__PURE__*/(0, _react.css)(";label:left;"),
|
|
57
|
+
right: _ref4,
|
|
58
|
+
euiButtonDisplayContent__spinner: _ref3,
|
|
59
|
+
euiButtonDisplayContent__icon: _ref2,
|
|
60
|
+
isDisabled: _ref
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.euiButtonDisplayContentStyles = euiButtonDisplayContentStyles;
|
|
@@ -23,7 +23,7 @@ var _common = require("../../common");
|
|
|
23
23
|
|
|
24
24
|
var _services = require("../../../services");
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _button_content_deprecated = require("../_button_content_deprecated");
|
|
27
27
|
|
|
28
28
|
var _href_validator = require("../../../services/security/href_validator");
|
|
29
29
|
|
|
@@ -101,7 +101,7 @@ var EuiButtonEmpty = function EuiButtonEmpty(_ref) {
|
|
|
101
101
|
}, className);
|
|
102
102
|
var contentClassNames = (0, _classnames.default)('euiButtonEmpty__content', contentProps && contentProps.className);
|
|
103
103
|
var textClassNames = (0, _classnames.default)('euiButtonEmpty__text', textProps && textProps.className);
|
|
104
|
-
var innerNode = (0, _react2.jsx)(
|
|
104
|
+
var innerNode = (0, _react2.jsx)(_button_content_deprecated.EuiButtonContentDeprecated, (0, _extends2.default)({
|
|
105
105
|
isLoading: isLoading,
|
|
106
106
|
iconType: iconType,
|
|
107
107
|
iconSide: iconSide,
|
|
@@ -212,7 +212,8 @@ EuiButtonEmpty.propTypes = {
|
|
|
212
212
|
iconSide: _propTypes.default.oneOf(["left", "right"]),
|
|
213
213
|
|
|
214
214
|
/**
|
|
215
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
215
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
216
|
+
* It doesn't apply to the icon.
|
|
216
217
|
*/
|
|
217
218
|
textProps: _propTypes.default.shape({
|
|
218
219
|
className: _propTypes.default.string,
|
|
@@ -179,7 +179,8 @@ EuiButtonGroup.propTypes = {
|
|
|
179
179
|
isLoading: _propTypes.default.bool,
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
182
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
183
|
+
* It doesn't apply to the icon.
|
|
183
184
|
*/
|
|
184
185
|
textProps: _propTypes.default.shape({
|
|
185
186
|
className: _propTypes.default.string,
|
|
@@ -102,7 +102,7 @@ var EuiButtonGroupButton = function EuiButtonGroupButton(_ref) {
|
|
|
102
102
|
buttonTextRef = _useInnerText2[0],
|
|
103
103
|
innerText = _useInnerText2[1];
|
|
104
104
|
|
|
105
|
-
return (0, _react2.jsx)(_button.
|
|
105
|
+
return (0, _react2.jsx)(_button.EuiButtonDisplayDeprecated, (0, _extends2.default)({
|
|
106
106
|
baseClassName: "euiButtonGroupButton",
|
|
107
107
|
className: buttonClasses,
|
|
108
108
|
element: el,
|
|
@@ -157,7 +157,8 @@ EuiButtonGroupButton.propTypes = {
|
|
|
157
157
|
isLoading: _propTypes.default.bool,
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
160
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
161
|
+
* It doesn't apply to the icon.
|
|
161
162
|
*/
|
|
162
163
|
textProps: _propTypes.default.shape({
|
|
163
164
|
className: _propTypes.default.string,
|
|
@@ -106,7 +106,8 @@ var EuiCallOut = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
106
106
|
css: cssStyles,
|
|
107
107
|
paddingSize: size === 's' ? 's' : 'm',
|
|
108
108
|
className: classes,
|
|
109
|
-
panelRef: ref
|
|
109
|
+
panelRef: ref,
|
|
110
|
+
grow: false
|
|
110
111
|
}, rest), header, optionalChildren);
|
|
111
112
|
});
|
|
112
113
|
exports.EuiCallOut = EuiCallOut;
|
|
@@ -427,7 +427,8 @@ EuiCard.propTypes = {
|
|
|
427
427
|
iconSide: _propTypes.default.oneOf(["left", "right"]),
|
|
428
428
|
|
|
429
429
|
/**
|
|
430
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
430
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
431
|
+
* It doesn't apply to the icon.
|
|
431
432
|
*/
|
|
432
433
|
textProps: _propTypes.default.shape({
|
|
433
434
|
className: _propTypes.default.string,
|
|
@@ -124,7 +124,8 @@ EuiCardSelect.propTypes = {
|
|
|
124
124
|
iconSide: _propTypes.default.oneOf(["left", "right"]),
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
127
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
128
|
+
* It doesn't apply to the icon.
|
|
128
129
|
*/
|
|
129
130
|
textProps: _propTypes.default.shape({
|
|
130
131
|
className: _propTypes.default.string,
|
|
@@ -215,7 +215,8 @@ EuiAutoRefreshButton.propTypes = {
|
|
|
215
215
|
contentProps: _propTypes.default.any,
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
218
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
219
|
+
* It doesn't apply to the icon.
|
|
219
220
|
*/
|
|
220
221
|
textProps: _propTypes.default.shape({
|
|
221
222
|
className: _propTypes.default.string,
|