@elastic/eui 60.0.0 → 60.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/README.md +7 -0
- package/dist/eui_charts_theme.js +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +0 -445
- package/dist/eui_theme_dark.json +7 -44
- package/dist/eui_theme_dark.json.d.ts +7 -44
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -445
- package/dist/eui_theme_light.json +7 -44
- package/dist/eui_theme_light.json.d.ts +7 -44
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/screen_reader_live/screen_reader_live.js +30 -7
- package/es/components/accessibility/screen_reader_only/screen_reader_only.js +14 -19
- package/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +11 -1
- package/es/components/accessibility/skip_link/skip_link.js +20 -4
- package/es/components/avatar/avatar.js +2 -2
- package/es/components/badge/badge.js +1 -1
- package/es/components/button/button_icon/button_icon.js +1 -1
- package/es/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -2
- package/es/components/datagrid/body/data_grid_body.js +6 -6
- package/es/components/datagrid/body/data_grid_cell.js +12 -12
- package/es/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/es/components/datagrid/body/header/data_grid_header_row.js +6 -6
- package/es/components/datagrid/data_grid.js +6 -6
- package/es/components/datagrid/utils/in_memory.js +6 -6
- package/es/components/date_picker/date_picker.js +1 -1
- package/es/components/empty_prompt/empty_prompt.js +1 -1
- package/es/components/form/field_text/field_text.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout.js +1 -1
- package/es/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/es/components/health/health.js +1 -1
- package/es/components/icon/icon.js +43 -495
- package/es/components/icon/icon.styles.js +75 -0
- package/es/components/icon/icon_map.js +455 -0
- package/es/components/icon/named_colors.js +2 -13
- package/es/components/list_group/list_group.js +1 -1
- package/es/components/list_group/list_group_item.js +1 -1
- package/es/components/list_group/pinnable_list_group/pinnable_list_group.js +2 -2
- package/es/components/notification/notification_event.js +2 -2
- package/es/components/notification/notification_event_meta.js +1 -1
- package/es/components/notification/notification_event_read_button.js +1 -1
- package/es/components/panel/panel.js +2 -1
- package/es/components/progress/progress.js +34 -87
- package/es/components/progress/progress.styles.js +155 -0
- package/es/components/selectable/selectable_list/selectable_list.js +3 -1
- package/es/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/es/components/selectable/selectable_templates/selectable_template_sitewide.js +2 -2
- package/es/components/text/text.js +2 -0
- package/es/components/tool_tip/icon_tip.js +1 -1
- package/es/global_styling/utility/utility.js +3 -1
- package/es/services/theme/hooks.js +2 -0
- package/eui.d.ts +393 -453
- package/i18ntokens.json +2 -2
- package/lib/components/accessibility/screen_reader_live/screen_reader_live.js +29 -6
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.js +22 -19
- package/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +16 -2
- package/lib/components/accessibility/skip_link/skip_link.js +21 -4
- package/lib/components/avatar/avatar.js +2 -2
- package/lib/components/badge/badge.js +1 -1
- package/lib/components/button/button_icon/button_icon.js +1 -1
- package/lib/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -2
- package/lib/components/datagrid/body/data_grid_body.js +6 -6
- package/lib/components/datagrid/body/data_grid_cell.js +12 -12
- package/lib/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/lib/components/datagrid/body/header/data_grid_header_row.js +6 -6
- package/lib/components/datagrid/data_grid.js +6 -6
- package/lib/components/datagrid/utils/focus.js +1 -0
- package/lib/components/datagrid/utils/in_memory.js +6 -6
- package/lib/components/date_picker/date_picker.js +1 -1
- package/lib/components/empty_prompt/empty_prompt.js +1 -1
- package/lib/components/form/field_text/field_text.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout.js +1 -1
- package/lib/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/lib/components/health/health.js +1 -1
- package/lib/components/icon/icon.js +54 -499
- package/lib/components/icon/icon.styles.js +79 -0
- package/lib/components/icon/icon_map.js +463 -0
- package/lib/components/icon/named_colors.js +4 -15
- package/lib/components/list_group/list_group.js +1 -1
- package/lib/components/list_group/list_group_item.js +1 -1
- package/lib/components/list_group/pinnable_list_group/pinnable_list_group.js +2 -2
- package/lib/components/notification/notification_event.js +2 -2
- package/lib/components/notification/notification_event_meta.js +1 -1
- package/lib/components/notification/notification_event_read_button.js +1 -1
- package/lib/components/panel/panel.js +2 -1
- package/lib/components/progress/progress.js +36 -88
- package/lib/components/progress/progress.styles.js +166 -0
- package/lib/components/selectable/selectable_list/selectable_list.js +3 -1
- package/lib/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/lib/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/lib/components/text/text.js +2 -0
- package/lib/components/tool_tip/icon_tip.js +1 -1
- package/lib/global_styling/utility/utility.js +5 -1
- package/lib/services/theme/hooks.js +2 -0
- package/optimize/es/components/accessibility/screen_reader_live/screen_reader_live.js +21 -6
- package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.js +11 -17
- package/optimize/es/components/accessibility/screen_reader_only/screen_reader_only.styles.js +11 -1
- package/optimize/es/components/accessibility/skip_link/skip_link.js +20 -4
- package/optimize/es/components/datagrid/utils/focus.js +1 -0
- package/optimize/es/components/icon/icon.js +40 -492
- package/optimize/es/components/icon/icon.styles.js +75 -0
- package/optimize/es/components/icon/icon_map.js +455 -0
- package/optimize/es/components/icon/named_colors.js +2 -13
- package/optimize/es/components/panel/panel.js +2 -1
- package/optimize/es/components/progress/progress.js +31 -84
- package/optimize/es/components/progress/progress.styles.js +155 -0
- package/optimize/es/components/selectable/selectable_list/selectable_list.js +2 -0
- package/optimize/es/components/text/text.js +2 -0
- package/optimize/es/global_styling/utility/utility.js +3 -1
- package/optimize/es/services/theme/hooks.js +2 -0
- package/optimize/lib/components/accessibility/screen_reader_live/screen_reader_live.js +20 -5
- package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.js +18 -16
- package/optimize/lib/components/accessibility/screen_reader_only/screen_reader_only.styles.js +16 -2
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +21 -4
- package/optimize/lib/components/datagrid/utils/focus.js +1 -0
- package/optimize/lib/components/icon/icon.js +49 -494
- package/optimize/lib/components/icon/icon.styles.js +81 -0
- package/optimize/lib/components/icon/icon_map.js +463 -0
- package/optimize/lib/components/icon/named_colors.js +4 -15
- package/optimize/lib/components/panel/panel.js +2 -1
- package/optimize/lib/components/progress/progress.js +33 -85
- package/optimize/lib/components/progress/progress.styles.js +168 -0
- package/optimize/lib/components/selectable/selectable_list/selectable_list.js +2 -0
- package/optimize/lib/components/text/text.js +2 -0
- package/optimize/lib/global_styling/utility/utility.js +5 -1
- package/optimize/lib/services/theme/hooks.js +2 -0
- package/package.json +2 -2
- package/src/components/form/form_control_layout/_form_control_layout.scss +2 -4
- package/src/components/index.scss +0 -3
- package/src/global_styling/variables/_form.scss +9 -0
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accessibility/screen_reader_live/screen_reader_live.js +29 -6
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.js +21 -18
- package/test-env/components/accessibility/screen_reader_only/screen_reader_only.styles.js +16 -2
- package/test-env/components/accessibility/skip_link/skip_link.js +21 -4
- package/test-env/components/avatar/avatar.js +2 -2
- package/test-env/components/badge/badge.js +1 -1
- package/test-env/components/button/button_icon/button_icon.js +1 -1
- package/test-env/components/collapsible_nav/collapsible_nav_group/collapsible_nav_group.js +2 -2
- package/test-env/components/datagrid/body/data_grid_body.js +6 -6
- package/test-env/components/datagrid/body/data_grid_cell.js +12 -12
- package/test-env/components/datagrid/body/header/data_grid_header_cell.js +6 -6
- package/test-env/components/datagrid/body/header/data_grid_header_row.js +6 -6
- package/test-env/components/datagrid/data_grid.js +6 -6
- package/test-env/components/datagrid/utils/focus.js +1 -0
- package/test-env/components/datagrid/utils/in_memory.js +6 -6
- package/test-env/components/date_picker/date_picker.js +1 -1
- package/test-env/components/empty_prompt/empty_prompt.js +1 -1
- package/test-env/components/form/field_text/field_text.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout.js +1 -1
- package/test-env/components/form/form_control_layout/form_control_layout_icons.js +1 -1
- package/test-env/components/health/health.js +1 -1
- package/test-env/components/icon/icon.styles.js +81 -0
- package/test-env/components/icon/icon_map.js +463 -0
- package/test-env/components/icon/named_colors.js +4 -15
- package/test-env/components/list_group/list_group.js +1 -1
- package/test-env/components/list_group/list_group_item.js +1 -1
- package/test-env/components/list_group/pinnable_list_group/pinnable_list_group.js +2 -2
- package/test-env/components/notification/notification_event.js +2 -2
- package/test-env/components/notification/notification_event_meta.js +1 -1
- package/test-env/components/notification/notification_event_read_button.js +1 -1
- package/test-env/components/panel/panel.js +2 -1
- package/test-env/components/progress/progress.js +36 -88
- package/test-env/components/progress/progress.styles.js +168 -0
- package/test-env/components/selectable/selectable_list/selectable_list.js +3 -1
- package/test-env/components/selectable/selectable_list/selectable_list_item.js +1 -1
- package/test-env/components/selectable/selectable_templates/selectable_template_sitewide.js +3 -3
- package/test-env/components/text/text.js +2 -0
- package/test-env/components/tool_tip/icon_tip.js +1 -1
- package/test-env/global_styling/utility/utility.js +5 -1
- package/test-env/services/theme/hooks.js +2 -0
- package/src/components/accessibility/_index.scss +0 -1
- package/src/components/accessibility/screen_reader_only/_screen_reader_only.scss +0 -5
- package/src/components/icon/_icon.scss +0 -87
- package/src/components/icon/_index.scss +0 -2
- package/src/components/icon/_variables.scss +0 -22
- package/src/components/progress/_index.scss +0 -2
- package/src/components/progress/_progress.scss +0 -166
- package/src/components/progress/_variables.scss +0 -21
- package/src/themes/amsterdam/overrides/_progress.scss +0 -3
|
@@ -23,10 +23,12 @@ var _i18n = require("../i18n");
|
|
|
23
23
|
|
|
24
24
|
var _inner_text = require("../inner_text");
|
|
25
25
|
|
|
26
|
-
var _common = require("../common");
|
|
27
|
-
|
|
28
26
|
var _predicate = require("../../services/predicate");
|
|
29
27
|
|
|
28
|
+
var _services = require("../../services");
|
|
29
|
+
|
|
30
|
+
var _progress = require("./progress.styles");
|
|
31
|
+
|
|
30
32
|
var _react2 = require("@emotion/react");
|
|
31
33
|
|
|
32
34
|
var _excluded = ["className", "color", "size", "position", "max", "valueText", "label", "value", "labelProps"];
|
|
@@ -35,63 +37,11 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
35
37
|
|
|
36
38
|
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; }
|
|
37
39
|
|
|
38
|
-
var
|
|
39
|
-
xs: 'euiProgress--xs',
|
|
40
|
-
s: 'euiProgress--s',
|
|
41
|
-
m: 'euiProgress--m',
|
|
42
|
-
l: 'euiProgress--l'
|
|
43
|
-
};
|
|
44
|
-
var SIZES = (0, _common.keysOf)(sizeToClassNameMap);
|
|
40
|
+
var SIZES = ['xs', 's', 'm', 'l'];
|
|
45
41
|
exports.SIZES = SIZES;
|
|
46
|
-
var
|
|
47
|
-
primary: 'euiProgress--primary',
|
|
48
|
-
success: 'euiProgress--success',
|
|
49
|
-
warning: 'euiProgress--warning',
|
|
50
|
-
danger: 'euiProgress--danger',
|
|
51
|
-
subdued: 'euiProgress--subdued',
|
|
52
|
-
accent: 'euiProgress--accent',
|
|
53
|
-
vis0: 'euiProgress--vis0',
|
|
54
|
-
vis1: 'euiProgress--vis1',
|
|
55
|
-
vis2: 'euiProgress--vis2',
|
|
56
|
-
vis3: 'euiProgress--vis3',
|
|
57
|
-
vis4: 'euiProgress--vis4',
|
|
58
|
-
vis5: 'euiProgress--vis5',
|
|
59
|
-
vis6: 'euiProgress--vis6',
|
|
60
|
-
vis7: 'euiProgress--vis7',
|
|
61
|
-
vis8: 'euiProgress--vis8',
|
|
62
|
-
vis9: 'euiProgress--vis9'
|
|
63
|
-
};
|
|
64
|
-
var COLORS = (0, _common.keysOf)(colorToClassNameMap);
|
|
42
|
+
var COLORS = ['primary', 'success', 'warning', 'danger', 'subdued', 'accent', 'vis0', 'vis1', 'vis2', 'vis3', 'vis4', 'vis5', 'vis6', 'vis7', 'vis8', 'vis9'];
|
|
65
43
|
exports.COLORS = COLORS;
|
|
66
|
-
|
|
67
|
-
function isNamedColor(name) {
|
|
68
|
-
return colorToClassNameMap.hasOwnProperty(name);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
var dataColorToClassNameMap = {
|
|
72
|
-
primary: 'euiProgress__data--primary',
|
|
73
|
-
success: 'euiProgress__data--success',
|
|
74
|
-
warning: 'euiProgress__data--warning',
|
|
75
|
-
danger: 'euiProgress__data--danger',
|
|
76
|
-
subdued: 'euiProgress__data--subdued',
|
|
77
|
-
accent: 'euiProgress__data--accent',
|
|
78
|
-
vis0: 'euiProgress__data--vis0',
|
|
79
|
-
vis1: 'euiProgress__data--vis1',
|
|
80
|
-
vis2: 'euiProgress__data--vis2',
|
|
81
|
-
vis3: 'euiProgress__data--vis3',
|
|
82
|
-
vis4: 'euiProgress__data--vis4',
|
|
83
|
-
vis5: 'euiProgress__data--vis5',
|
|
84
|
-
vis6: 'euiProgress__data--vis6',
|
|
85
|
-
vis7: 'euiProgress__data--vis7',
|
|
86
|
-
vis8: 'euiProgress__data--vis8',
|
|
87
|
-
vis9: 'euiProgress__data--vis9'
|
|
88
|
-
};
|
|
89
|
-
var positionsToClassNameMap = {
|
|
90
|
-
fixed: 'euiProgress--fixed',
|
|
91
|
-
absolute: 'euiProgress--absolute',
|
|
92
|
-
static: ''
|
|
93
|
-
};
|
|
94
|
-
var POSITIONS = (0, _common.keysOf)(positionsToClassNameMap);
|
|
44
|
+
var POSITIONS = ['fixed', 'absolute', 'static'];
|
|
95
45
|
exports.POSITIONS = POSITIONS;
|
|
96
46
|
|
|
97
47
|
var EuiProgress = function EuiProgress(_ref) {
|
|
@@ -110,30 +60,23 @@ var EuiProgress = function EuiProgress(_ref) {
|
|
|
110
60
|
labelProps = _ref.labelProps,
|
|
111
61
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
112
62
|
var determinate = !(0, _predicate.isNil)(max);
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
var
|
|
130
|
-
'euiProgress--indeterminate': !determinate,
|
|
131
|
-
'euiProgress--native': determinate
|
|
132
|
-
}, sizeToClassNameMap[size], colorClass, positionsToClassNameMap[position], className);
|
|
133
|
-
var dataClasses = (0, _classnames.default)('euiProgress__data', {
|
|
134
|
-
'euiProgress__data--l': size === 'l'
|
|
135
|
-
}, dataColorClass);
|
|
136
|
-
var labelClasses = (0, _classnames.default)('euiProgress__label', labelProps && labelProps.className);
|
|
63
|
+
var isNamedColor = COLORS.includes(color);
|
|
64
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
65
|
+
var customColorStyles = !isNamedColor ? {
|
|
66
|
+
color: color
|
|
67
|
+
} : {};
|
|
68
|
+
var customTextColorStyles = !isNamedColor ? {
|
|
69
|
+
color: (0, _services.makeHighContrastColor)(color)(euiTheme.euiTheme)
|
|
70
|
+
} : {};
|
|
71
|
+
var styles = (0, _progress.euiProgressStyles)(euiTheme, determinate);
|
|
72
|
+
var cssStyles = [styles.euiProgress, determinate && styles.native, !determinate && styles.indeterminate, styles[size], styles[position], isNamedColor ? styles[color] : styles.customColor];
|
|
73
|
+
var dataStyles = (0, _progress.euiProgressDataStyles)(euiTheme);
|
|
74
|
+
var dataCssStyles = [dataStyles.euiProgress__data, size === 'l' && dataStyles[size]];
|
|
75
|
+
var labelCssStyles = [_progress.euiProgressLabelStyles.euiProgress__label];
|
|
76
|
+
var valueTextStyles = (0, _progress.euiProgressValueTextStyles)(euiTheme);
|
|
77
|
+
var valueTextCssStyles = [valueTextStyles.euiProgress__valueText, isNamedColor ? valueTextStyles[color] : styles.customColor];
|
|
78
|
+
var classes = (0, _classnames.default)('euiProgress', className);
|
|
79
|
+
var labelClasses = (0, _classnames.default)('euiProgress__label', labelProps === null || labelProps === void 0 ? void 0 : labelProps.className);
|
|
137
80
|
var valueRender;
|
|
138
81
|
|
|
139
82
|
if (valueText === true) {
|
|
@@ -154,31 +97,36 @@ var EuiProgress = function EuiProgress(_ref) {
|
|
|
154
97
|
|
|
155
98
|
if (determinate) {
|
|
156
99
|
return (0, _react2.jsx)(_react.Fragment, null, label || valueText ? (0, _react2.jsx)("div", {
|
|
157
|
-
|
|
100
|
+
css: dataCssStyles,
|
|
101
|
+
className: "euiProgress__data"
|
|
158
102
|
}, label && (0, _react2.jsx)(_inner_text.EuiInnerText, null, function (ref, innerText) {
|
|
159
103
|
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
160
104
|
title: innerText,
|
|
161
105
|
ref: ref
|
|
162
106
|
}, labelProps, {
|
|
107
|
+
css: labelCssStyles,
|
|
163
108
|
className: labelClasses
|
|
164
109
|
}), label);
|
|
165
110
|
}), valueRender && (0, _react2.jsx)(_inner_text.EuiInnerText, null, function (ref, innerText) {
|
|
166
111
|
return (0, _react2.jsx)("span", {
|
|
167
112
|
title: innerText,
|
|
168
113
|
ref: ref,
|
|
169
|
-
style:
|
|
114
|
+
style: customTextColorStyles,
|
|
115
|
+
css: valueTextCssStyles,
|
|
170
116
|
className: "euiProgress__valueText"
|
|
171
117
|
}, valueRender);
|
|
172
118
|
})) : undefined, (0, _react2.jsx)("progress", (0, _extends2.default)({
|
|
119
|
+
css: cssStyles,
|
|
173
120
|
className: classes,
|
|
174
|
-
style:
|
|
121
|
+
style: customColorStyles,
|
|
175
122
|
max: max,
|
|
176
123
|
value: value,
|
|
177
124
|
"aria-hidden": label && valueText ? true : false
|
|
178
125
|
}, rest)));
|
|
179
126
|
} else {
|
|
180
127
|
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
181
|
-
|
|
128
|
+
css: cssStyles,
|
|
129
|
+
style: customColorStyles,
|
|
182
130
|
className: classes
|
|
183
131
|
}, rest));
|
|
184
132
|
}
|
|
@@ -189,7 +137,7 @@ EuiProgress.propTypes = {
|
|
|
189
137
|
className: _propTypes.default.string,
|
|
190
138
|
"aria-label": _propTypes.default.string,
|
|
191
139
|
"data-test-subj": _propTypes.default.string,
|
|
192
|
-
size: _propTypes.default.
|
|
140
|
+
size: _propTypes.default.any,
|
|
193
141
|
|
|
194
142
|
/**
|
|
195
143
|
* One of EUI's color palette, vis colors or a valid CSS color value https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
|
|
@@ -198,8 +146,8 @@ EuiProgress.propTypes = {
|
|
|
198
146
|
/**
|
|
199
147
|
* One of EUI's color palette, vis colors or a valid CSS color value https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
|
|
200
148
|
*/
|
|
201
|
-
color: _propTypes.default.oneOfType([_propTypes.default.
|
|
202
|
-
position: _propTypes.default.
|
|
149
|
+
color: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]),
|
|
150
|
+
position: _propTypes.default.any,
|
|
203
151
|
max: _propTypes.default.number,
|
|
204
152
|
|
|
205
153
|
/*
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.euiProgressValueTextStyles = exports.euiProgressStyles = exports.euiProgressLabelStyles = exports.euiProgressDataStyles = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _react = require("@emotion/react");
|
|
13
|
+
|
|
14
|
+
var _global_styling = require("../../global_styling");
|
|
15
|
+
|
|
16
|
+
var _services = require("../../services");
|
|
17
|
+
|
|
18
|
+
var _text = require("../text/text.styles");
|
|
19
|
+
|
|
20
|
+
var _templateObject;
|
|
21
|
+
|
|
22
|
+
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)."; }
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* DRY utilities for native/determinate progress components vs non-native indeterminate
|
|
26
|
+
*/
|
|
27
|
+
var crossBrowserProgressValue = function crossBrowserProgressValue(cssProperties) {
|
|
28
|
+
return "\n &::-webkit-progress-value {\n ".concat(cssProperties, "\n }\n &::-moz-progress-bar {\n ").concat(cssProperties, "\n }\n");
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var indeterminateProgressValue = function indeterminateProgressValue(cssProperties) {
|
|
32
|
+
return "\n &:before {\n ".concat(cssProperties, "\n }\n");
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Color utilities
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
var visColors = (0, _services.euiPaletteColorBlind)();
|
|
40
|
+
|
|
41
|
+
var nativeVsIndeterminateColor = function nativeVsIndeterminateColor(color, isNative) {
|
|
42
|
+
var selectors = isNative ? crossBrowserProgressValue : indeterminateProgressValue;
|
|
43
|
+
return selectors("background-color: ".concat(color, ";"));
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* DRY utils for non-static positions
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
var nonStaticPositioning = function nonStaticPositioning(isNative) {
|
|
51
|
+
return "\n top: 0;\n left: 0;\n right: 0;\n background-color: transparent;\n ".concat(isNative ? "\n &::-webkit-progress-bar {\n background-color: transparent;\n }" : '', "\n");
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Animations
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
var euiIndeterminateAnimation = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n transform: scaleX(1) translateX(-100%);\n }\n 100% {\n transform: scaleX(1) translateX(100%);\n }\n"])));
|
|
59
|
+
/**
|
|
60
|
+
* Emotion styles
|
|
61
|
+
*/
|
|
62
|
+
|
|
63
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
64
|
+
name: "187h6sp-static",
|
|
65
|
+
styles: "position:relative;label:static;"
|
|
66
|
+
} : {
|
|
67
|
+
name: "187h6sp-static",
|
|
68
|
+
styles: "position:relative;label:static;",
|
|
69
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
var euiProgressStyles = function euiProgressStyles(_ref3, isNative) {
|
|
73
|
+
var euiTheme = _ref3.euiTheme;
|
|
74
|
+
return {
|
|
75
|
+
euiProgress: /*#__PURE__*/(0, _react.css)("overflow:hidden;background-color:", euiTheme.colors.lightShade, ";;label:euiProgress;"),
|
|
76
|
+
// https://css-tricks.com/html5-progress-element/
|
|
77
|
+
// Good resource if you need to work in here. There's some gotchas with
|
|
78
|
+
// dealing with cross-browser progress bars.
|
|
79
|
+
native: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), " appearance:none;border:none;border-radius:", euiTheme.size.s, ";&::-webkit-progress-bar{background-color:", euiTheme.colors.lightShade, ";}", crossBrowserProgressValue("transition: width ".concat(euiTheme.animation.normal, " linear;")), ";;label:native;"),
|
|
80
|
+
// An indeterminate bar has an unreliable end time. Because of a Firefox animation issue,
|
|
81
|
+
// we apply this style to a <div> instead of a <progress> element.
|
|
82
|
+
// See https://css-tricks.com/html5-progress-element/ for more info.
|
|
83
|
+
indeterminate: /*#__PURE__*/(0, _react.css)("&:before{position:absolute;content:'';", (0, _global_styling.logicalCSS)('width', '100%'), " top:0;bottom:0;left:0;transform:scaleX(0) translateX(0%);animation:", euiIndeterminateAnimation, " 1s ", euiTheme.animation.resistance, " infinite;", _global_styling.euiCantAnimate, "{animation-duration:2s;animation-timing-function:linear;}};label:indeterminate;"),
|
|
84
|
+
// Sizes
|
|
85
|
+
xs: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', euiTheme.size.xxs), ";;label:xs;"),
|
|
86
|
+
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', euiTheme.size.xs), ";;label:s;"),
|
|
87
|
+
m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', euiTheme.size.s), ";;label:m;"),
|
|
88
|
+
l: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', euiTheme.size.m), ";;label:l;"),
|
|
89
|
+
// Positioning
|
|
90
|
+
fixed: /*#__PURE__*/(0, _react.css)("position:fixed;z-index:", Number(euiTheme.levels.header) + 1, ";", nonStaticPositioning(isNative), ";;label:fixed;"),
|
|
91
|
+
absolute: /*#__PURE__*/(0, _react.css)("position:absolute;", nonStaticPositioning(isNative), ";;label:absolute;"),
|
|
92
|
+
static: _ref2,
|
|
93
|
+
// Colors
|
|
94
|
+
primary: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(euiTheme.colors.primary, isNative), ";;label:primary;"),
|
|
95
|
+
success: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(euiTheme.colors.success, isNative), ";;label:success;"),
|
|
96
|
+
warning: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(euiTheme.colors.warning, isNative), ";;label:warning;"),
|
|
97
|
+
danger: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(euiTheme.colors.danger, isNative), ";;label:danger;"),
|
|
98
|
+
subdued: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(euiTheme.colors.subduedText, isNative), ";;label:subdued;"),
|
|
99
|
+
accent: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(euiTheme.colors.accent, isNative), ";;label:accent;"),
|
|
100
|
+
vis0: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[0], isNative), ";;label:vis0;"),
|
|
101
|
+
vis1: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[1], isNative), ";;label:vis1;"),
|
|
102
|
+
vis2: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[2], isNative), ";;label:vis2;"),
|
|
103
|
+
vis3: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[3], isNative), ";;label:vis3;"),
|
|
104
|
+
vis4: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[4], isNative), ";;label:vis4;"),
|
|
105
|
+
vis5: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[5], isNative), ";;label:vis5;"),
|
|
106
|
+
vis6: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[6], isNative), ";;label:vis6;"),
|
|
107
|
+
vis7: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[7], isNative), ";;label:vis7;"),
|
|
108
|
+
vis8: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[8], isNative), ";;label:vis8;"),
|
|
109
|
+
vis9: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor(visColors[9], isNative), ";;label:vis9;"),
|
|
110
|
+
customColor: /*#__PURE__*/(0, _react.css)(nativeVsIndeterminateColor('currentColor', isNative), ";;label:customColor;")
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Data styles
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
exports.euiProgressStyles = euiProgressStyles;
|
|
119
|
+
|
|
120
|
+
var euiProgressDataStyles = function euiProgressDataStyles(euiThemeContext) {
|
|
121
|
+
return {
|
|
122
|
+
euiProgress__data: /*#__PURE__*/(0, _react.css)("display:flex;justify-content:space-between;gap:", euiThemeContext.euiTheme.size.xs, ";", (0, _text.euiText)(euiThemeContext.euiTheme), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";;label:euiProgress__data;"),
|
|
123
|
+
// Sizes
|
|
124
|
+
l: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:l;")
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
exports.euiProgressDataStyles = euiProgressDataStyles;
|
|
129
|
+
var euiProgressLabelStyles = {
|
|
130
|
+
euiProgress__label: /*#__PURE__*/(0, _react.css)("flex-grow:1;", (0, _global_styling.euiTextTruncate)(), ";;label:euiProgress__label;")
|
|
131
|
+
};
|
|
132
|
+
exports.euiProgressLabelStyles = euiProgressLabelStyles;
|
|
133
|
+
|
|
134
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
135
|
+
name: "15ioh86-customColor",
|
|
136
|
+
styles: "color:currentColor;label:customColor;"
|
|
137
|
+
} : {
|
|
138
|
+
name: "15ioh86-customColor",
|
|
139
|
+
styles: "color:currentColor;label:customColor;",
|
|
140
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
var euiProgressValueTextStyles = function euiProgressValueTextStyles(_ref4) {
|
|
144
|
+
var euiTheme = _ref4.euiTheme;
|
|
145
|
+
return {
|
|
146
|
+
euiProgress__valueText: /*#__PURE__*/(0, _react.css)("flex-grow:1;flex-shrink:0;font-feature-settings:'tnum' 1;", (0, _global_styling.logicalTextAlignCSS)('right'), " ", (0, _global_styling.euiTextTruncate)(), ";;label:euiProgress__valueText;"),
|
|
147
|
+
// Colors
|
|
148
|
+
primary: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.primaryText, ";;label:primary;"),
|
|
149
|
+
success: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.successText, ";;label:success;"),
|
|
150
|
+
warning: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.warningText, ";;label:warning;"),
|
|
151
|
+
danger: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.dangerText, ";;label:danger;"),
|
|
152
|
+
subdued: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.subduedText, ";;label:subdued;"),
|
|
153
|
+
accent: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.accentText, ";;label:accent;"),
|
|
154
|
+
vis0: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[0])(euiTheme), ";;label:vis0;"),
|
|
155
|
+
vis1: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[1])(euiTheme), ";;label:vis1;"),
|
|
156
|
+
vis2: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[2])(euiTheme), ";;label:vis2;"),
|
|
157
|
+
vis3: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[3])(euiTheme), ";;label:vis3;"),
|
|
158
|
+
vis4: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[4])(euiTheme), ";;label:vis4;"),
|
|
159
|
+
vis5: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[5])(euiTheme), ";;label:vis5;"),
|
|
160
|
+
vis6: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[6])(euiTheme), ";;label:vis6;"),
|
|
161
|
+
vis7: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[7])(euiTheme), ";;label:vis7;"),
|
|
162
|
+
vis8: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[8])(euiTheme), ";;label:vis8;"),
|
|
163
|
+
vis9: /*#__PURE__*/(0, _react.css)("color:", (0, _services.makeHighContrastColor)(visColors[9])(euiTheme), ";;label:vis9;"),
|
|
164
|
+
customColor: _ref
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
exports.euiProgressValueTextStyles = euiProgressValueTextStyles;
|
|
@@ -172,6 +172,8 @@ var EuiSelectableList = /*#__PURE__*/function (_Component) {
|
|
|
172
172
|
setActiveOptionIndex(index);
|
|
173
173
|
},
|
|
174
174
|
onClick: function onClick(event) {
|
|
175
|
+
event.persist(); // NOTE: This is needed for React v16 backwards compatibility
|
|
176
|
+
|
|
175
177
|
_this.onAddOrRemoveOption(option, event);
|
|
176
178
|
},
|
|
177
179
|
ref: ref ? ref.bind(null, index) : undefined,
|
|
@@ -433,7 +435,7 @@ EuiSelectableList.propTypes = {
|
|
|
433
435
|
/**
|
|
434
436
|
* Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
|
|
435
437
|
*/
|
|
436
|
-
color: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.
|
|
438
|
+
color: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.any.isRequired]),
|
|
437
439
|
|
|
438
440
|
/**
|
|
439
441
|
* Will override any color passed through the `color` prop.
|
|
@@ -279,7 +279,7 @@ EuiSelectableListItem.propTypes = {
|
|
|
279
279
|
/**
|
|
280
280
|
* Accepts either our palette colors (primary, success ..etc) or a hex value `#FFFFFF`, `#000`.
|
|
281
281
|
*/
|
|
282
|
-
color: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.
|
|
282
|
+
color: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.any.isRequired]),
|
|
283
283
|
|
|
284
284
|
/**
|
|
285
285
|
* Will override any color passed through the `color` prop.
|
|
@@ -298,7 +298,7 @@ EuiSelectableTemplateSitewide.propTypes = {
|
|
|
298
298
|
* One of EUI's color palette or a valid CSS color value https://developer.mozilla.org/en-US/docs/Web/CSS/color_value.
|
|
299
299
|
* Note that coloring only works if your SVG is removed of fill attributes.
|
|
300
300
|
*/
|
|
301
|
-
color: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.
|
|
301
|
+
color: _propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.any.isRequired]),
|
|
302
302
|
|
|
303
303
|
/**
|
|
304
304
|
* Descriptive title for naming the icon based on its use
|
|
@@ -355,12 +355,12 @@ EuiSelectableTemplateSitewide.propTypes = {
|
|
|
355
355
|
/**
|
|
356
356
|
* Manually change icon size
|
|
357
357
|
*/
|
|
358
|
-
iconSize: _propTypes.default.
|
|
358
|
+
iconSize: _propTypes.default.any,
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* Manually change icon color
|
|
362
362
|
*/
|
|
363
|
-
iconColor: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.
|
|
363
|
+
iconColor: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string.isRequired, _propTypes.default.any.isRequired]).isRequired, _propTypes.default.oneOf([null])]),
|
|
364
364
|
|
|
365
365
|
/**
|
|
366
366
|
* Full name of avatar for title attribute and calculating initial if not provided
|
|
@@ -53,6 +53,7 @@ var EuiText = function EuiText(_ref) {
|
|
|
53
53
|
if (color) {
|
|
54
54
|
text = (0, _react2.jsx)(_text_color.EuiTextColor, {
|
|
55
55
|
color: color,
|
|
56
|
+
className: classes,
|
|
56
57
|
cloneElement: true
|
|
57
58
|
}, text);
|
|
58
59
|
}
|
|
@@ -60,6 +61,7 @@ var EuiText = function EuiText(_ref) {
|
|
|
60
61
|
if (textAlign) {
|
|
61
62
|
text = (0, _react2.jsx)(_text_align.EuiTextAlign, {
|
|
62
63
|
textAlign: textAlign,
|
|
64
|
+
className: classes,
|
|
63
65
|
cloneElement: true
|
|
64
66
|
}, text);
|
|
65
67
|
}
|
|
@@ -11,6 +11,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
|
|
14
|
+
var _screen_reader_only = require("../../components/accessibility/screen_reader_only/screen_reader_only.styles");
|
|
15
|
+
|
|
14
16
|
/*
|
|
15
17
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
18
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -18,9 +20,11 @@ var _react2 = require("@emotion/react");
|
|
|
18
20
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
19
21
|
* Side Public License, v 1.
|
|
20
22
|
*/
|
|
23
|
+
var globalStyles = /*#__PURE__*/(0, _react2.css)(".euiScreenReaderOnly{", (0, _screen_reader_only.euiScreenReaderOnly)(), ";};label:globalStyles;");
|
|
24
|
+
|
|
21
25
|
var EuiUtilityClasses = function EuiUtilityClasses() {
|
|
22
26
|
return (0, _react2.jsx)(_react2.Global, {
|
|
23
|
-
styles:
|
|
27
|
+
styles: globalStyles
|
|
24
28
|
});
|
|
25
29
|
};
|
|
26
30
|
|
|
@@ -41,6 +41,8 @@ var useEuiTheme = function useEuiTheme() {
|
|
|
41
41
|
|
|
42
42
|
exports.useEuiTheme = useEuiTheme;
|
|
43
43
|
|
|
44
|
+
// Provide the component props interface as the generic to allow the docs props table to populate.
|
|
45
|
+
// e.g., `const EuiComponent = withEuiTheme<EuiComponentProps>(_EuiComponent)`
|
|
44
46
|
var withEuiTheme = function withEuiTheme(Component) {
|
|
45
47
|
var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
|
|
46
48
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import 'screen_reader_only/screen_reader_only';
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
.euiIcon {
|
|
2
|
-
flex-shrink: 0; // Ensures it never scales down below its intended size
|
|
3
|
-
display: inline-block;
|
|
4
|
-
vertical-align: middle;
|
|
5
|
-
fill: currentColor;
|
|
6
|
-
transform: translate(0, 0); // Hack to fix Firefox "softness"
|
|
7
|
-
|
|
8
|
-
&:focus {
|
|
9
|
-
opacity: 1; // We often hide icons on hover. Make sure they appear on focus.
|
|
10
|
-
background: $euiFocusBackgroundColor;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// App icons are two-toned so get an extra class. This provides the base color.
|
|
15
|
-
.euiIcon--app {
|
|
16
|
-
fill: $euiTextColor;
|
|
17
|
-
|
|
18
|
-
// This provides the default secondary color
|
|
19
|
-
.euiIcon__fillSecondary {
|
|
20
|
-
fill: makeGraphicContrastColor($euiColorSuccess);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.euiIcon-isLoading {
|
|
25
|
-
opacity: $euiIconLoadingOpacity;
|
|
26
|
-
background-color: currentColor;
|
|
27
|
-
border-radius: $euiBorderRadius;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.euiIcon-isLoaded {
|
|
31
|
-
animation: euiIconLoading $euiAnimSpeedNormal ease-in 0s 1 forwards;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// COLORS
|
|
35
|
-
|
|
36
|
-
@each $name, $color in $euiIconColors {
|
|
37
|
-
.euiIcon--#{$name} {
|
|
38
|
-
// Use color attribute so currentColor can be used in more properties
|
|
39
|
-
color: $color;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Really force all paths to inherit when the color is ghost/text (specifically for logos)
|
|
44
|
-
.euiIcon--ghost:not([data-type='logoElastic']),
|
|
45
|
-
.euiIcon--text:not([data-type='logoElastic']) {
|
|
46
|
-
*[fill],
|
|
47
|
-
.euiIcon__fillNegative {
|
|
48
|
-
fill: currentColor !important; // sass-lint:disable-line no-important
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Elastic logo specific colors
|
|
53
|
-
.euiIcon--ghost[data-type='logoElastic'],
|
|
54
|
-
.euiIcon--text[data-type='logoElastic'] {
|
|
55
|
-
*[fill] {
|
|
56
|
-
fill: none !important; // sass-lint:disable-line no-important
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.outline {
|
|
60
|
-
fill: currentColor !important; // sass-lint:disable-line no-important
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Use the negative fill on SVG elements that need to flip portions
|
|
65
|
-
// of the icon to light and dark compatible modes. You can see this
|
|
66
|
-
// in use on the Elastic logo icons.
|
|
67
|
-
.euiIcon__fillNegative {
|
|
68
|
-
fill: $euiColorDarkestShade;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// SIZES
|
|
72
|
-
|
|
73
|
-
@each $name, $size in $euiIconSizes {
|
|
74
|
-
.euiIcon--#{$name} {
|
|
75
|
-
@include size($size);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@keyframes euiIconLoading {
|
|
80
|
-
0% {
|
|
81
|
-
opacity: $euiIconLoadingOpacity;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
100% {
|
|
85
|
-
opacity: 1;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
$euiIconLoadingOpacity: .05;
|
|
2
|
-
|
|
3
|
-
// Modifier naming and colors.
|
|
4
|
-
$euiIconColors: (
|
|
5
|
-
accent: makeGraphicContrastColor($euiColorAccent),
|
|
6
|
-
danger: makeGraphicContrastColor($euiColorDanger),
|
|
7
|
-
ghost: $euiColorGhost,
|
|
8
|
-
primary: makeGraphicContrastColor($euiColorPrimary),
|
|
9
|
-
success: makeGraphicContrastColor($euiColorSuccess),
|
|
10
|
-
subdued: $euiTextSubduedColor,
|
|
11
|
-
text: $euiTextColor,
|
|
12
|
-
warning: makeGraphicContrastColor($euiColorWarning),
|
|
13
|
-
inherit: inherit
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
$euiIconSizes: (
|
|
17
|
-
small: $euiSizeM,
|
|
18
|
-
medium: $euiSize,
|
|
19
|
-
large: $euiSizeL,
|
|
20
|
-
xLarge: $euiSizeXL,
|
|
21
|
-
xxLarge: $euiSizeXXL
|
|
22
|
-
);
|