@elastic/eui 67.1.1 → 67.1.2
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/es/components/avatar/avatar.js +7 -1
- package/es/components/button/button_display/_button_display_content.js +2 -2
- package/es/components/flyout/flyout.js +4 -3
- package/es/components/notification/notification_event.js +2 -3
- package/lib/components/avatar/avatar.js +7 -1
- package/lib/components/button/button_display/_button_display_content.js +2 -2
- package/lib/components/flyout/flyout.js +4 -3
- package/lib/components/notification/notification_event.js +2 -3
- package/optimize/es/components/avatar/avatar.js +7 -1
- package/optimize/es/components/button/button_display/_button_display_content.js +2 -2
- package/optimize/es/components/flyout/flyout.js +4 -3
- package/optimize/es/components/notification/notification_event.js +2 -3
- package/optimize/lib/components/avatar/avatar.js +8 -1
- package/optimize/lib/components/button/button_display/_button_display_content.js +2 -2
- package/optimize/lib/components/flyout/flyout.js +4 -3
- package/optimize/lib/components/notification/notification_event.js +2 -3
- package/package.json +1 -1
- package/test-env/components/avatar/avatar.js +8 -1
- package/test-env/components/button/button_display/_button_display_content.js +2 -2
- package/test-env/components/notification/notification_event.js +2 -3
|
@@ -14,6 +14,10 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
14
14
|
|
|
15
15
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
16
16
|
|
|
17
|
+
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; }
|
|
18
|
+
|
|
19
|
+
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; }
|
|
20
|
+
|
|
17
21
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
22
|
|
|
19
23
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -66,7 +70,9 @@ export var EuiAvatar = function EuiAvatar(_ref) {
|
|
|
66
70
|
var classes = classNames('euiAvatar', (_classNames = {}, _defineProperty(_classNames, "euiAvatar--".concat(size), size), _defineProperty(_classNames, "euiAvatar--".concat(type), type), _defineProperty(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
|
|
67
71
|
var cssStyles = [styles.euiAvatar, styles[size], styles[type], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
|
|
68
72
|
checkValidInitials(initials);
|
|
69
|
-
|
|
73
|
+
|
|
74
|
+
var avatarStyle = _objectSpread({}, style);
|
|
75
|
+
|
|
70
76
|
var iconCustomColor = iconColor;
|
|
71
77
|
var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
|
|
72
78
|
|
|
@@ -69,9 +69,9 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
var isText = typeof children === 'string';
|
|
72
|
-
return ___EmotionJSX("span", _extends({
|
|
72
|
+
return ___EmotionJSX("span", _extends({
|
|
73
73
|
css: cssStyles
|
|
74
|
-
}), icon, isText ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
74
|
+
}, contentProps), icon, isText ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
75
75
|
className: classNames('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
76
76
|
}), children) : children);
|
|
77
77
|
};
|
|
@@ -229,13 +229,14 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
229
229
|
disabled: isPushed,
|
|
230
230
|
clickOutsideDisables: !ownFocus,
|
|
231
231
|
onClickOutside: onClickOutside
|
|
232
|
-
}, focusTrapProps), ___EmotionJSX(Element, _extends({
|
|
232
|
+
}, focusTrapProps), ___EmotionJSX(Element, _extends({
|
|
233
|
+
css: cssStyles
|
|
234
|
+
}, rest, {
|
|
233
235
|
role: role,
|
|
234
236
|
className: classes,
|
|
235
237
|
tabIndex: -1,
|
|
236
238
|
style: newStyle,
|
|
237
|
-
ref: setRef
|
|
238
|
-
css: cssStyles
|
|
239
|
+
ref: setRef
|
|
239
240
|
}), closeButton, children)); // If ownFocus is set, wrap with an overlay and allow the user to click it to close it.
|
|
240
241
|
|
|
241
242
|
|
|
@@ -47,9 +47,8 @@ export var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
|
47
47
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
48
|
|
|
49
49
|
var classes = classNames('euiNotificationEvent', {
|
|
50
|
-
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
51
|
-
|
|
52
|
-
});
|
|
50
|
+
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
51
|
+
}, className);
|
|
53
52
|
var classesTitle = classNames('euiNotificationEvent__title', {
|
|
54
53
|
'euiNotificationEvent__title--isRead': isRead
|
|
55
54
|
});
|
|
@@ -39,6 +39,10 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
39
39
|
|
|
40
40
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
41
41
|
|
|
42
|
+
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; }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
45
|
+
|
|
42
46
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
43
47
|
|
|
44
48
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -79,7 +83,9 @@ var EuiAvatar = function EuiAvatar(_ref) {
|
|
|
79
83
|
var classes = (0, _classnames.default)('euiAvatar', (_classNames = {}, _defineProperty(_classNames, "euiAvatar--".concat(size), size), _defineProperty(_classNames, "euiAvatar--".concat(type), type), _defineProperty(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
|
|
80
84
|
var cssStyles = [styles.euiAvatar, styles[size], styles[type], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
|
|
81
85
|
checkValidInitials(initials);
|
|
82
|
-
|
|
86
|
+
|
|
87
|
+
var avatarStyle = _objectSpread({}, style);
|
|
88
|
+
|
|
83
89
|
var iconCustomColor = iconColor;
|
|
84
90
|
var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
|
|
85
91
|
|
|
@@ -82,9 +82,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
var isText = typeof children === 'string';
|
|
85
|
-
return (0, _react2.jsx)("span", _extends({
|
|
85
|
+
return (0, _react2.jsx)("span", _extends({
|
|
86
86
|
css: cssStyles
|
|
87
|
-
}), icon, isText ? (0, _react2.jsx)("span", _extends({}, textProps, {
|
|
87
|
+
}, contentProps), icon, isText ? (0, _react2.jsx)("span", _extends({}, textProps, {
|
|
88
88
|
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
89
89
|
}), children) : children);
|
|
90
90
|
};
|
|
@@ -253,13 +253,14 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
253
253
|
disabled: isPushed,
|
|
254
254
|
clickOutsideDisables: !ownFocus,
|
|
255
255
|
onClickOutside: onClickOutside
|
|
256
|
-
}, focusTrapProps), (0, _react2.jsx)(Element, _extends({
|
|
256
|
+
}, focusTrapProps), (0, _react2.jsx)(Element, _extends({
|
|
257
|
+
css: cssStyles
|
|
258
|
+
}, rest, {
|
|
257
259
|
role: role,
|
|
258
260
|
className: classes,
|
|
259
261
|
tabIndex: -1,
|
|
260
262
|
style: newStyle,
|
|
261
|
-
ref: setRef
|
|
262
|
-
css: cssStyles
|
|
263
|
+
ref: setRef
|
|
263
264
|
}), closeButton, children)); // If ownFocus is set, wrap with an overlay and allow the user to click it to close it.
|
|
264
265
|
|
|
265
266
|
var mergedMaskProps = _objectSpread(_objectSpread({}, maskProps), {}, {
|
|
@@ -66,9 +66,8 @@ var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
|
66
66
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
67
67
|
|
|
68
68
|
var classes = (0, _classnames.default)('euiNotificationEvent', {
|
|
69
|
-
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
70
|
-
|
|
71
|
-
});
|
|
69
|
+
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
70
|
+
}, className);
|
|
72
71
|
var classesTitle = (0, _classnames.default)('euiNotificationEvent__title', {
|
|
73
72
|
'euiNotificationEvent__title--isRead': isRead
|
|
74
73
|
});
|
|
@@ -4,6 +4,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
5
|
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
6
6
|
|
|
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
|
+
|
|
9
|
+
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; }
|
|
10
|
+
|
|
7
11
|
/*
|
|
8
12
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
13
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -49,7 +53,9 @@ export var EuiAvatar = function EuiAvatar(_ref) {
|
|
|
49
53
|
var classes = classNames('euiAvatar', (_classNames = {}, _defineProperty(_classNames, "euiAvatar--".concat(size), size), _defineProperty(_classNames, "euiAvatar--".concat(type), type), _defineProperty(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
|
|
50
54
|
var cssStyles = [styles.euiAvatar, styles[size], styles[type], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
|
|
51
55
|
checkValidInitials(initials);
|
|
52
|
-
|
|
56
|
+
|
|
57
|
+
var avatarStyle = _objectSpread({}, style);
|
|
58
|
+
|
|
53
59
|
var iconCustomColor = iconColor;
|
|
54
60
|
var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
|
|
55
61
|
|
|
@@ -64,9 +64,9 @@ export var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
var isText = typeof children === 'string';
|
|
67
|
-
return ___EmotionJSX("span", _extends({
|
|
67
|
+
return ___EmotionJSX("span", _extends({
|
|
68
68
|
css: cssStyles
|
|
69
|
-
}), icon, isText ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
69
|
+
}, contentProps), icon, isText ? ___EmotionJSX("span", _extends({}, textProps, {
|
|
70
70
|
className: classNames('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
71
71
|
}), children) : children);
|
|
72
72
|
};
|
|
@@ -213,13 +213,14 @@ export var EuiFlyout = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
213
213
|
disabled: isPushed,
|
|
214
214
|
clickOutsideDisables: !ownFocus,
|
|
215
215
|
onClickOutside: onClickOutside
|
|
216
|
-
}, focusTrapProps), ___EmotionJSX(Element, _extends({
|
|
216
|
+
}, focusTrapProps), ___EmotionJSX(Element, _extends({
|
|
217
|
+
css: cssStyles
|
|
218
|
+
}, rest, {
|
|
217
219
|
role: role,
|
|
218
220
|
className: classes,
|
|
219
221
|
tabIndex: -1,
|
|
220
222
|
style: newStyle,
|
|
221
|
-
ref: setRef
|
|
222
|
-
css: cssStyles
|
|
223
|
+
ref: setRef
|
|
223
224
|
}), closeButton, children)); // If ownFocus is set, wrap with an overlay and allow the user to click it to close it.
|
|
224
225
|
|
|
225
226
|
|
|
@@ -42,9 +42,8 @@ export var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
|
42
42
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
43
43
|
|
|
44
44
|
var classes = classNames('euiNotificationEvent', {
|
|
45
|
-
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
46
|
-
|
|
47
|
-
});
|
|
45
|
+
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
46
|
+
}, className);
|
|
48
47
|
var classesTitle = classNames('euiNotificationEvent__title', {
|
|
49
48
|
'euiNotificationEvent__title--isRead': isRead
|
|
50
49
|
});
|
|
@@ -30,6 +30,11 @@ var _avatar = require("./avatar.styles");
|
|
|
30
30
|
var _react2 = require("@emotion/react");
|
|
31
31
|
|
|
32
32
|
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
33
|
+
|
|
34
|
+
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; }
|
|
35
|
+
|
|
36
|
+
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; }
|
|
37
|
+
|
|
33
38
|
var SIZES = ['s', 'm', 'l', 'xl'];
|
|
34
39
|
exports.SIZES = SIZES;
|
|
35
40
|
var TYPES = ['space', 'user'];
|
|
@@ -63,7 +68,9 @@ var EuiAvatar = function EuiAvatar(_ref) {
|
|
|
63
68
|
var classes = (0, _classnames.default)('euiAvatar', (_classNames = {}, (0, _defineProperty2.default)(_classNames, "euiAvatar--".concat(size), size), (0, _defineProperty2.default)(_classNames, "euiAvatar--".concat(type), type), (0, _defineProperty2.default)(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
|
|
64
69
|
var cssStyles = [styles.euiAvatar, styles[size], styles[type], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
|
|
65
70
|
checkValidInitials(initials);
|
|
66
|
-
|
|
71
|
+
|
|
72
|
+
var avatarStyle = _objectSpread({}, style);
|
|
73
|
+
|
|
67
74
|
var iconCustomColor = iconColor;
|
|
68
75
|
var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
|
|
69
76
|
|
|
@@ -76,9 +76,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
var isText = typeof children === 'string';
|
|
79
|
-
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
79
|
+
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
80
80
|
css: cssStyles
|
|
81
|
-
}), icon, isText ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
81
|
+
}, contentProps), icon, isText ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
82
82
|
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
83
83
|
}), children) : children);
|
|
84
84
|
};
|
|
@@ -240,13 +240,14 @@ var EuiFlyout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
240
240
|
disabled: isPushed,
|
|
241
241
|
clickOutsideDisables: !ownFocus,
|
|
242
242
|
onClickOutside: onClickOutside
|
|
243
|
-
}, focusTrapProps), (0, _react2.jsx)(Element, (0, _extends2.default)({
|
|
243
|
+
}, focusTrapProps), (0, _react2.jsx)(Element, (0, _extends2.default)({
|
|
244
|
+
css: cssStyles
|
|
245
|
+
}, rest, {
|
|
244
246
|
role: role,
|
|
245
247
|
className: classes,
|
|
246
248
|
tabIndex: -1,
|
|
247
249
|
style: newStyle,
|
|
248
|
-
ref: setRef
|
|
249
|
-
css: cssStyles
|
|
250
|
+
ref: setRef
|
|
250
251
|
}), closeButton, children)); // If ownFocus is set, wrap with an overlay and allow the user to click it to close it.
|
|
251
252
|
|
|
252
253
|
var mergedMaskProps = _objectSpread(_objectSpread({}, maskProps), {}, {
|
|
@@ -61,9 +61,8 @@ var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
|
61
61
|
className = _ref.className,
|
|
62
62
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
63
63
|
var classes = (0, _classnames.default)('euiNotificationEvent', {
|
|
64
|
-
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
65
|
-
|
|
66
|
-
});
|
|
64
|
+
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
65
|
+
}, className);
|
|
67
66
|
var classesTitle = (0, _classnames.default)('euiNotificationEvent__title', {
|
|
68
67
|
'euiNotificationEvent__title--isRead': isRead
|
|
69
68
|
});
|
package/package.json
CHANGED
|
@@ -32,6 +32,11 @@ var _avatar = require("./avatar.styles");
|
|
|
32
32
|
var _react2 = require("@emotion/react");
|
|
33
33
|
|
|
34
34
|
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
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
|
+
|
|
35
40
|
var SIZES = ['s', 'm', 'l', 'xl'];
|
|
36
41
|
exports.SIZES = SIZES;
|
|
37
42
|
var TYPES = ['space', 'user'];
|
|
@@ -65,7 +70,9 @@ var EuiAvatar = function EuiAvatar(_ref) {
|
|
|
65
70
|
var classes = (0, _classnames.default)('euiAvatar', (_classNames = {}, (0, _defineProperty2.default)(_classNames, "euiAvatar--".concat(size), size), (0, _defineProperty2.default)(_classNames, "euiAvatar--".concat(type), type), (0, _defineProperty2.default)(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
|
|
66
71
|
var cssStyles = [styles.euiAvatar, styles[size], styles[type], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
|
|
67
72
|
checkValidInitials(initials);
|
|
68
|
-
|
|
73
|
+
|
|
74
|
+
var avatarStyle = _objectSpread({}, style);
|
|
75
|
+
|
|
69
76
|
var iconCustomColor = iconColor;
|
|
70
77
|
var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
|
|
71
78
|
|
|
@@ -78,9 +78,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
var isText = typeof children === 'string';
|
|
81
|
-
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
81
|
+
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
82
82
|
css: cssStyles
|
|
83
|
-
}), icon, isText ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
83
|
+
}, contentProps), icon, isText ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
84
84
|
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
85
85
|
}), children) : children);
|
|
86
86
|
};
|
|
@@ -63,9 +63,8 @@ var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
|
63
63
|
className = _ref.className,
|
|
64
64
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
65
65
|
var classes = (0, _classnames.default)('euiNotificationEvent', {
|
|
66
|
-
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
67
|
-
|
|
68
|
-
});
|
|
66
|
+
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
67
|
+
}, className);
|
|
69
68
|
var classesTitle = (0, _classnames.default)('euiNotificationEvent__title', {
|
|
70
69
|
'euiNotificationEvent__title--isRead': isRead
|
|
71
70
|
});
|