@elastic/eui 95.1.0 → 95.2.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 +0 -240
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -240
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/es/components/context_menu/context_menu_item.js +1 -1
- package/es/components/form/file_picker/file_picker.js +49 -35
- package/es/components/form/file_picker/file_picker.styles.js +98 -0
- package/es/components/icon/assets/app_cases.js +9 -7
- package/es/components/icon/assets/logo_elastic_stack.js +6 -12
- package/es/components/steps/step.js +5 -3
- package/es/components/steps/step.styles.js +13 -5
- package/es/components/steps/step_horizontal.js +8 -3
- package/es/components/steps/step_horizontal.styles.js +1 -0
- package/es/components/steps/step_number.js +48 -24
- package/es/components/steps/step_number.styles.js +4 -2
- package/es/components/steps/steps.js +3 -1
- package/es/components/steps/steps_horizontal.js +1 -1
- package/es/services/theme/warning.js +7 -2
- package/eui.d.ts +72 -20
- package/i18ntokens.json +16 -16
- package/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/lib/components/context_menu/context_menu_item.js +1 -1
- package/lib/components/form/file_picker/file_picker.js +51 -37
- package/lib/components/form/file_picker/file_picker.styles.js +102 -0
- package/lib/components/icon/assets/app_cases.js +9 -7
- package/lib/components/icon/assets/logo_elastic_stack.js +6 -12
- package/lib/components/icon/svgs/app_cases.svg +6 -5
- package/lib/components/icon/svgs/logo_elastic_stack.svg +4 -7
- package/lib/components/steps/step.js +5 -3
- package/lib/components/steps/step.styles.js +13 -5
- package/lib/components/steps/step_horizontal.js +8 -3
- package/lib/components/steps/step_horizontal.styles.js +1 -0
- package/lib/components/steps/step_number.js +48 -24
- package/lib/components/steps/step_number.styles.js +3 -1
- package/lib/components/steps/steps.js +3 -1
- package/lib/components/steps/steps_horizontal.js +1 -1
- package/lib/services/theme/warning.js +7 -2
- package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/optimize/es/components/form/file_picker/file_picker.js +40 -34
- package/optimize/es/components/form/file_picker/file_picker.styles.js +98 -0
- package/optimize/es/components/icon/assets/app_cases.js +9 -7
- package/optimize/es/components/icon/assets/logo_elastic_stack.js +6 -12
- package/optimize/es/components/steps/step.js +2 -2
- package/optimize/es/components/steps/step.styles.js +13 -5
- package/optimize/es/components/steps/step_horizontal.js +8 -3
- package/optimize/es/components/steps/step_horizontal.styles.js +1 -0
- package/optimize/es/components/steps/step_number.js +44 -22
- package/optimize/es/components/steps/step_number.styles.js +4 -2
- package/optimize/es/components/steps/steps_horizontal.js +1 -1
- package/optimize/es/services/theme/warning.js +7 -2
- package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/optimize/lib/components/form/file_picker/file_picker.js +42 -36
- package/optimize/lib/components/form/file_picker/file_picker.styles.js +102 -0
- package/optimize/lib/components/icon/assets/app_cases.js +9 -7
- package/optimize/lib/components/icon/assets/logo_elastic_stack.js +6 -12
- package/optimize/lib/components/icon/svgs/app_cases.svg +6 -5
- package/optimize/lib/components/icon/svgs/logo_elastic_stack.svg +4 -7
- package/optimize/lib/components/steps/step.js +2 -2
- package/optimize/lib/components/steps/step.styles.js +13 -5
- package/optimize/lib/components/steps/step_horizontal.js +8 -3
- package/optimize/lib/components/steps/step_horizontal.styles.js +1 -0
- package/optimize/lib/components/steps/step_number.js +44 -22
- package/optimize/lib/components/steps/step_number.styles.js +3 -1
- package/optimize/lib/components/steps/steps_horizontal.js +1 -1
- package/optimize/lib/services/theme/warning.js +7 -2
- package/package.json +1 -1
- package/src/components/form/_index.scss +0 -1
- package/test-env/components/combo_box/combo_box_input/combo_box_input.js +2 -1
- package/test-env/components/context_menu/context_menu_item.js +1 -1
- package/test-env/components/form/file_picker/file_picker.js +46 -37
- package/test-env/components/form/file_picker/file_picker.styles.js +102 -0
- package/test-env/components/icon/assets/app_cases.js +9 -7
- package/test-env/components/icon/assets/logo_elastic_stack.js +6 -12
- package/test-env/components/steps/step.js +5 -3
- package/test-env/components/steps/step.styles.js +13 -5
- package/test-env/components/steps/step_horizontal.js +8 -3
- package/test-env/components/steps/step_horizontal.styles.js +1 -0
- package/test-env/components/steps/step_number.js +48 -24
- package/test-env/components/steps/step_number.styles.js +3 -1
- package/test-env/components/steps/steps.js +3 -1
- package/test-env/components/steps/steps_horizontal.js +1 -1
- package/test-env/services/theme/warning.js +7 -2
- package/src/components/form/file_picker/_file_picker.scss +0 -212
- package/src/components/form/file_picker/_index.scss +0 -2
- package/src/components/form/file_picker/_variables.scss +0 -1
|
@@ -5,8 +5,9 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.EuiFilePickerClass = exports.EuiFilePicker = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
10
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
12
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
12
13
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
@@ -16,17 +17,18 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
16
17
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
18
|
var _react = _interopRequireWildcard(require("react"));
|
|
18
19
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
19
|
-
var
|
|
20
|
-
var _validatable_control = require("../validatable_control");
|
|
20
|
+
var _services = require("../../../services");
|
|
21
21
|
var _button = require("../../button");
|
|
22
22
|
var _progress = require("../../progress");
|
|
23
23
|
var _icon = require("../../icon");
|
|
24
24
|
var _i18n = require("../../i18n");
|
|
25
25
|
var _loading = require("../../loading");
|
|
26
|
-
var _accessibility = require("../../../services/accessibility");
|
|
27
26
|
var _eui_form_context = require("../eui_form_context");
|
|
27
|
+
var _validatable_control = require("../validatable_control");
|
|
28
|
+
var _form_control_layout_clear_button = require("../form_control_layout/form_control_layout_clear_button");
|
|
29
|
+
var _file_picker = require("./file_picker.styles");
|
|
28
30
|
var _react2 = require("@emotion/react");
|
|
29
|
-
var _excluded = ["id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
|
|
31
|
+
var _excluded = ["stylesMemoizer", "id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
|
|
30
32
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
31
33
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
32
34
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
@@ -37,25 +39,20 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
37
39
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
38
40
|
* Side Public License, v 1.
|
|
39
41
|
*/
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
large: 'euiFilePicker--large'
|
|
43
|
-
};
|
|
44
|
-
var DISPLAYS = exports.DISPLAYS = (0, _common.keysOf)(displayToClassNameMap);
|
|
45
|
-
var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
46
|
-
function EuiFilePicker() {
|
|
42
|
+
var EuiFilePickerClass = exports.EuiFilePickerClass = /*#__PURE__*/function (_Component) {
|
|
43
|
+
function EuiFilePickerClass() {
|
|
47
44
|
var _this;
|
|
48
|
-
(0, _classCallCheck2.default)(this,
|
|
45
|
+
(0, _classCallCheck2.default)(this, EuiFilePickerClass);
|
|
49
46
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
50
47
|
args[_key] = arguments[_key];
|
|
51
48
|
}
|
|
52
|
-
_this = _callSuper(this,
|
|
49
|
+
_this = _callSuper(this, EuiFilePickerClass, [].concat(args));
|
|
53
50
|
(0, _defineProperty2.default)(_this, "state", {
|
|
54
51
|
promptText: null,
|
|
55
52
|
isHoveringDrop: false
|
|
56
53
|
});
|
|
57
54
|
(0, _defineProperty2.default)(_this, "fileInput", null);
|
|
58
|
-
(0, _defineProperty2.default)(_this, "generatedId", (0,
|
|
55
|
+
(0, _defineProperty2.default)(_this, "generatedId", (0, _services.htmlIdGenerator)()());
|
|
59
56
|
(0, _defineProperty2.default)(_this, "handleChange", function () {
|
|
60
57
|
if (!_this.fileInput) return;
|
|
61
58
|
if (_this.fileInput.files && _this.fileInput.files.length > 1) {
|
|
@@ -105,8 +102,8 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
105
102
|
});
|
|
106
103
|
return _this;
|
|
107
104
|
}
|
|
108
|
-
(0, _inherits2.default)(
|
|
109
|
-
return (0, _createClass2.default)(
|
|
105
|
+
(0, _inherits2.default)(EuiFilePickerClass, _Component);
|
|
106
|
+
return (0, _createClass2.default)(EuiFilePickerClass, [{
|
|
110
107
|
key: "render",
|
|
111
108
|
value: function render() {
|
|
112
109
|
var _this2 = this;
|
|
@@ -117,6 +114,7 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
117
114
|
default: "Clear selected files"
|
|
118
115
|
}, function (clearSelectedFiles) {
|
|
119
116
|
var _this2$props = _this2.props,
|
|
117
|
+
stylesMemoizer = _this2$props.stylesMemoizer,
|
|
120
118
|
id = _this2$props.id,
|
|
121
119
|
name = _this2$props.name,
|
|
122
120
|
initialPromptText = _this2$props.initialPromptText,
|
|
@@ -133,34 +131,39 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
133
131
|
var promptId = "".concat(id || _this2.generatedId, "-filePicker__prompt");
|
|
134
132
|
var isOverridingInitialPrompt = _this2.state.promptText != null;
|
|
135
133
|
var normalFormControl = display === 'default';
|
|
136
|
-
var classes = (0, _classnames.default)('euiFilePicker',
|
|
137
|
-
|
|
138
|
-
'euiFilePicker--compressed': compressed,
|
|
139
|
-
'euiFilePicker--fullWidth': fullWidth,
|
|
134
|
+
var classes = (0, _classnames.default)('euiFilePicker', {
|
|
135
|
+
'euiFilePicker-isDroppingFile': _this2.state.isHoveringDrop,
|
|
140
136
|
'euiFilePicker-isInvalid': isInvalid,
|
|
141
137
|
'euiFilePicker-isLoading': isLoading,
|
|
142
138
|
'euiFilePicker-hasFiles': isOverridingInitialPrompt
|
|
143
139
|
}, className);
|
|
140
|
+
var styles = stylesMemoizer(_file_picker.euiFilePickerStyles);
|
|
141
|
+
var cssStyles = [styles.euiFilePicker, fullWidth ? styles.fullWidth : styles.formWidth, _this2.state.isHoveringDrop && styles.isDroppingFile, isInvalid && !disabled && styles.invalid, isOverridingInitialPrompt && !disabled && styles.hasFiles, isLoading && styles.loading];
|
|
142
|
+
var inputStyles = [styles.input.euiFilePicker__input, !normalFormControl && !disabled && styles.input.largeInteractive];
|
|
143
|
+
var promptStyles = [styles.euiFilePicker__prompt, disabled && styles.disabled].concat((0, _toConsumableArray2.default)(normalFormControl ? [compressed ? styles.compressed : styles.uncompressed] : [styles.large.large, compressed ? styles.large.compressed : styles.large.uncompressed]));
|
|
144
|
+
var iconStyles = [styles.icon.euiFilePicker__icon].concat((0, _toConsumableArray2.default)(normalFormControl ? [styles.icon.normal, compressed ? styles.icon.compresssed : styles.icon.uncompressed] : [styles.icon.large]));
|
|
145
|
+
var rightIconStyles = normalFormControl ? [styles.rightIcon.euiFilePicker__rightIcon, compressed ? styles.rightIcon.compressed : styles.rightIcon.uncompressed] : undefined;
|
|
144
146
|
var clearButton;
|
|
145
147
|
if (isLoading && normalFormControl) {
|
|
146
148
|
// Override clear button with loading spinner if it is in loading state
|
|
147
149
|
clearButton = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
148
|
-
|
|
150
|
+
css: rightIconStyles,
|
|
151
|
+
className: "euiFilePicker__loadingSpinner",
|
|
152
|
+
size: compressed ? 's' : 'm'
|
|
149
153
|
});
|
|
150
154
|
} else if (isOverridingInitialPrompt && !disabled) {
|
|
151
155
|
if (normalFormControl) {
|
|
152
|
-
clearButton = (0, _react2.jsx)(
|
|
153
|
-
type: "button",
|
|
156
|
+
clearButton = (0, _react2.jsx)(_form_control_layout_clear_button.EuiFormControlLayoutClearButton, {
|
|
154
157
|
"aria-label": clearSelectedFiles,
|
|
158
|
+
css: [styles.euiFilePicker__clearButton, rightIconStyles, ";label:clearButton;"],
|
|
155
159
|
className: "euiFilePicker__clearButton",
|
|
156
|
-
onClick: _this2.removeFiles
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
type: "cross"
|
|
160
|
-
}));
|
|
160
|
+
onClick: _this2.removeFiles,
|
|
161
|
+
size: compressed ? 's' : 'm'
|
|
162
|
+
});
|
|
161
163
|
} else {
|
|
162
164
|
clearButton = (0, _react2.jsx)(_button.EuiButtonEmpty, {
|
|
163
165
|
"aria-label": clearSelectedFiles,
|
|
166
|
+
css: styles.euiFilePicker__clearButton,
|
|
164
167
|
className: "euiFilePicker__clearButton",
|
|
165
168
|
size: "xs",
|
|
166
169
|
onClick: _this2.removeFiles
|
|
@@ -178,15 +181,15 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
178
181
|
position: "absolute"
|
|
179
182
|
});
|
|
180
183
|
return (0, _react2.jsx)("div", {
|
|
184
|
+
css: cssStyles,
|
|
181
185
|
className: classes
|
|
182
|
-
}, (0, _react2.jsx)("div", {
|
|
183
|
-
className: "euiFilePicker__wrap"
|
|
184
186
|
}, (0, _react2.jsx)(_validatable_control.EuiValidatableControl, {
|
|
185
187
|
isInvalid: isInvalid
|
|
186
188
|
}, (0, _react2.jsx)("input", (0, _extends2.default)({
|
|
187
189
|
type: "file",
|
|
188
190
|
id: id,
|
|
189
191
|
name: name,
|
|
192
|
+
css: inputStyles,
|
|
190
193
|
className: "euiFilePicker__input",
|
|
191
194
|
onChange: _this2.handleChange,
|
|
192
195
|
ref: function ref(input) {
|
|
@@ -198,27 +201,30 @@ var EuiFilePicker = exports.EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
198
201
|
disabled: disabled,
|
|
199
202
|
"aria-describedby": promptId
|
|
200
203
|
}, rest))), (0, _react2.jsx)("div", {
|
|
204
|
+
css: promptStyles,
|
|
201
205
|
className: "euiFilePicker__prompt",
|
|
202
206
|
id: promptId
|
|
203
207
|
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
208
|
+
css: iconStyles,
|
|
204
209
|
className: "euiFilePicker__icon",
|
|
205
210
|
color: isInvalid ? 'danger' : disabled ? 'subdued' : 'primary',
|
|
206
211
|
type: isInvalid ? 'alert' : 'importAction',
|
|
207
212
|
size: normalFormControl ? 'm' : 'l',
|
|
208
213
|
"aria-hidden": "true"
|
|
209
|
-
}), (0, _react2.jsx)("
|
|
214
|
+
}), (0, _react2.jsx)("span", {
|
|
210
215
|
className: "euiFilePicker__promptText"
|
|
211
|
-
}, _this2.state.promptText || initialPromptText), clearButton, loader))
|
|
216
|
+
}, _this2.state.promptText || initialPromptText), clearButton, loader));
|
|
212
217
|
});
|
|
213
218
|
}
|
|
214
219
|
}]);
|
|
215
220
|
}(_react.Component);
|
|
216
|
-
(0, _defineProperty2.default)(
|
|
217
|
-
(0, _defineProperty2.default)(
|
|
221
|
+
(0, _defineProperty2.default)(EuiFilePickerClass, "contextType", _eui_form_context.FormContext);
|
|
222
|
+
(0, _defineProperty2.default)(EuiFilePickerClass, "defaultProps", {
|
|
218
223
|
initialPromptText: (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
219
224
|
token: "euiFilePicker.promptText",
|
|
220
225
|
default: "Select or drag and drop a file"
|
|
221
226
|
}),
|
|
222
227
|
compressed: false,
|
|
223
228
|
display: 'large'
|
|
224
|
-
});
|
|
229
|
+
});
|
|
230
|
+
var EuiFilePicker = exports.EuiFilePicker = (0, _services.withEuiStylesMemoizer)(EuiFilePickerClass);
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiFilePickerStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _global_styling = require("../../../global_styling");
|
|
9
|
+
var _form = require("../form.styles");
|
|
10
|
+
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)."; } /*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
18
|
+
name: "6h1iuq-euiFilePicker__clearButton",
|
|
19
|
+
styles: "pointer-events:auto;position:relative;label:euiFilePicker__clearButton;"
|
|
20
|
+
} : {
|
|
21
|
+
name: "6h1iuq-euiFilePicker__clearButton",
|
|
22
|
+
styles: "pointer-events:auto;position:relative;label:euiFilePicker__clearButton;",
|
|
23
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
|
+
};
|
|
25
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
26
|
+
name: "d8me89-euiFilePicker__rightIcon",
|
|
27
|
+
styles: "position:absolute;label:euiFilePicker__rightIcon;"
|
|
28
|
+
} : {
|
|
29
|
+
name: "d8me89-euiFilePicker__rightIcon",
|
|
30
|
+
styles: "position:absolute;label:euiFilePicker__rightIcon;",
|
|
31
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
32
|
+
};
|
|
33
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
34
|
+
name: "19x04ih-largeInteractive",
|
|
35
|
+
styles: "&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{text-decoration:underline;}.euiFilePicker__icon{transform:scale(1.1);}}};label:largeInteractive;"
|
|
36
|
+
} : {
|
|
37
|
+
name: "19x04ih-largeInteractive",
|
|
38
|
+
styles: "&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{text-decoration:underline;}.euiFilePicker__icon{transform:scale(1.1);}}};label:largeInteractive;",
|
|
39
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
40
|
+
};
|
|
41
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
42
|
+
name: "1j9s7hu-euiFilePicker__input",
|
|
43
|
+
styles: "position:absolute;inset:0;opacity:0;&:hover{cursor:pointer;}&:hover:disabled{cursor:not-allowed;}&:disabled{opacity:0;};label:euiFilePicker__input;"
|
|
44
|
+
} : {
|
|
45
|
+
name: "1j9s7hu-euiFilePicker__input",
|
|
46
|
+
styles: "position:absolute;inset:0;opacity:0;&:hover{cursor:pointer;}&:hover:disabled{cursor:not-allowed;}&:disabled{opacity:0;};label:euiFilePicker__input;",
|
|
47
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
48
|
+
};
|
|
49
|
+
var euiFilePickerStyles = exports.euiFilePickerStyles = function euiFilePickerStyles(euiThemeContext) {
|
|
50
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
51
|
+
var formStyles = (0, _form.euiFormControlStyles)(euiThemeContext);
|
|
52
|
+
var formVariables = (0, _form.euiFormVariables)(euiThemeContext);
|
|
53
|
+
var _euiFontSize = (0, _global_styling.euiFontSize)(euiThemeContext, 's'),
|
|
54
|
+
fontSize = _euiFontSize.fontSize,
|
|
55
|
+
lineHeight = _euiFontSize.lineHeight;
|
|
56
|
+
return {
|
|
57
|
+
euiFilePicker: /*#__PURE__*/(0, _react.css)("--euiFormControlLeftIconsCount:1;position:relative;&:has(input:focus){--euiFormControlStateColor:", euiTheme.colors.primary, ";};label:euiFilePicker;"),
|
|
58
|
+
isDroppingFile: /*#__PURE__*/(0, _react.css)("--euiFormControlStateColor:", euiTheme.colors.primary, ";;label:isDroppingFile;"),
|
|
59
|
+
invalid: /*#__PURE__*/(0, _react.css)("--euiFormControlStateColor:", euiTheme.colors.danger, ";;label:invalid;"),
|
|
60
|
+
hasFiles: /*#__PURE__*/(0, _react.css)("--euiFormControlRightIconsCount:1;font-weight:", euiTheme.font.weight.bold, ";;label:hasFiles;"),
|
|
61
|
+
loading: /*#__PURE__*/(0, _react.css)("--euiFormControlRightIconsCount:1;border-radius:", formVariables.controlCompressedBorderRadius, ";overflow:hidden;;label:loading;"),
|
|
62
|
+
// Skip the css() on the default width to avoid generating a className
|
|
63
|
+
formWidth: formStyles.formWidth,
|
|
64
|
+
fullWidth: /*#__PURE__*/(0, _react.css)(formStyles.fullWidth, ";label:fullWidth;"),
|
|
65
|
+
// The input is an invisible dropzone / button
|
|
66
|
+
input: {
|
|
67
|
+
euiFilePicker__input: _ref4,
|
|
68
|
+
largeInteractive: _ref3
|
|
69
|
+
},
|
|
70
|
+
euiFilePicker__prompt: /*#__PURE__*/(0, _react.css)("pointer-events:none;font-size:", fontSize, ";line-height:1;", (0, _global_styling.euiTextTruncate)(), " color:", euiTheme.colors.text, ";border:", euiTheme.border.width.thick, " dashed var(--euiFormControlStateColor, ", euiTheme.colors.lightShade, ");", _global_styling.euiCanAnimate, "{transition:border-color ", euiTheme.animation.fast, " ease-in,background-color ", euiTheme.animation.fast, " ease-in;};label:euiFilePicker__prompt;"),
|
|
71
|
+
disabled: /*#__PURE__*/(0, _react.css)(formStyles.disabled, ";label:disabled;"),
|
|
72
|
+
// Skip the css() on the default height to avoid generating a className
|
|
73
|
+
uncompressed: formStyles.uncompressed,
|
|
74
|
+
compressed: /*#__PURE__*/(0, _react.css)(formStyles.compressed, ";label:compressed;"),
|
|
75
|
+
// Completely different rendering style from the normal form controls
|
|
76
|
+
large: {
|
|
77
|
+
large: /*#__PURE__*/(0, _react.css)("padding-inline:", euiTheme.size.l, ";display:flex;flex-direction:column;align-items:center;justify-content:center;.euiFilePicker__promptText{", (0, _global_styling.euiTextTruncate)(), " line-height:", lineHeight, ";};label:large;"),
|
|
78
|
+
// Static heights so that surrounding contents don't shift around
|
|
79
|
+
uncompressed: "\n ".concat((0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
80
|
+
return x * 8;
|
|
81
|
+
})), "\n border-radius: ").concat(formVariables.controlBorderRadius, ";\n "),
|
|
82
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
83
|
+
return x * 6.5;
|
|
84
|
+
})), " border-radius:", formVariables.controlCompressedBorderRadius, ";;label:compressed;")
|
|
85
|
+
},
|
|
86
|
+
icon: {
|
|
87
|
+
euiFilePicker__icon: /*#__PURE__*/(0, _react.css)(";label:euiFilePicker__icon;"),
|
|
88
|
+
normal: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('height', '100%'), ";;label:normal;"),
|
|
89
|
+
uncompressed: "\n ".concat((0, _global_styling.logicalCSS)('left', euiTheme.size.m), "\n "),
|
|
90
|
+
compresssed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('width', euiTheme.size.m), ";;label:compresssed;"),
|
|
91
|
+
large: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.base), " ", _global_styling.euiCanAnimate, "{transition:transform ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";};label:large;")
|
|
92
|
+
},
|
|
93
|
+
rightIcon: {
|
|
94
|
+
euiFilePicker__rightIcon: _ref2,
|
|
95
|
+
uncompressed: "\n ".concat((0, _global_styling.logicalCSS)('top', euiTheme.size.m), "\n ").concat((0, _global_styling.logicalCSS)('right', euiTheme.size.m), "\n "),
|
|
96
|
+
compressed: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('top', '50%'), " ", (0, _global_styling.logicalCSS)('margin-top', (0, _global_styling.mathWithUnits)(euiTheme.size.m, function (x) {
|
|
97
|
+
return x / -2;
|
|
98
|
+
})), ";;label:compressed;")
|
|
99
|
+
},
|
|
100
|
+
euiFilePicker__clearButton: _ref
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -29,21 +29,23 @@ var EuiIconAppCases = function EuiIconAppCases(_ref) {
|
|
|
29
29
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30
30
|
width: 32,
|
|
31
31
|
height: 32,
|
|
32
|
-
fill: "none",
|
|
33
32
|
viewBox: "0 0 32 32",
|
|
34
33
|
"aria-labelledby": titleId
|
|
35
34
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
36
35
|
id: titleId
|
|
37
36
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
d: "M4 6h22v7h-2V8H6v19H4V6Z",
|
|
38
|
+
className: "euiIcon__fillSecondary"
|
|
39
|
+
}), (0, _react2.jsx)("path", {
|
|
40
|
+
d: "M10 12H7v-2h3v2Zm1 0h12v-2H11v2Z",
|
|
41
|
+
className: "euiIcon__fillSecondary"
|
|
42
|
+
}), (0, _react2.jsx)("path", {
|
|
43
|
+
d: "M24 1H0v26h1l-1 .001v.026a2.256 2.256 0 0 0 .01.185 4.318 4.318 0 0 0 .563 1.792C1.194 30.064 2.399 31 4.5 31H17v-2H8.429a4.32 4.32 0 0 0 .57-1.927v-.062L9 27.005v-.003S9 27 8 27h1V16h21v3h2v-5H7v12.995l-.003.05a2.32 2.32 0 0 1-.298.95C6.442 28.436 5.898 29 4.5 29c-1.398 0-1.942-.564-2.199-1.004a2.32 2.32 0 0 1-.3-1.001L2 26.992V3h20v3h2V1Z"
|
|
40
44
|
}), (0, _react2.jsx)("path", {
|
|
41
|
-
d: "
|
|
45
|
+
d: "M23 21v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2Z"
|
|
42
46
|
}), (0, _react2.jsx)("path", {
|
|
43
47
|
fillRule: "evenodd",
|
|
44
|
-
d: "
|
|
45
|
-
className: "euiIcon__fillSecondary",
|
|
46
|
-
clipRule: "evenodd"
|
|
48
|
+
d: "M24 32a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm0-2a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z"
|
|
47
49
|
}));
|
|
48
50
|
};
|
|
49
51
|
var icon = exports.icon = EuiIconAppCases;
|
|
@@ -33,21 +33,15 @@ var EuiIconLogoElasticStack = function EuiIconLogoElasticStack(_ref) {
|
|
|
33
33
|
"aria-labelledby": titleId
|
|
34
34
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
35
35
|
id: titleId
|
|
36
|
-
}, title) : null, (0, _react2.jsx)("
|
|
37
|
-
fill: "none",
|
|
38
|
-
fillRule: "evenodd"
|
|
39
|
-
}, (0, _react2.jsx)("path", {
|
|
36
|
+
}, title) : null, (0, _react2.jsx)("path", {
|
|
40
37
|
fill: "#F04E98",
|
|
41
|
-
d: "
|
|
38
|
+
d: "M0 2.37A2.37 2.37 0 0 1 2.37 0h27.26A2.37 2.37 0 0 1 32 2.37v6.52H0V2.37Z"
|
|
42
39
|
}), (0, _react2.jsx)("path", {
|
|
43
40
|
fill: "#00BFB3",
|
|
44
|
-
d: "M0
|
|
41
|
+
d: "M0 20.148h32v-8.296H0v8.296Z"
|
|
45
42
|
}), (0, _react2.jsx)("path", {
|
|
46
|
-
fill: "#
|
|
47
|
-
d: "
|
|
48
|
-
})
|
|
49
|
-
fill: "#FEC514",
|
|
50
|
-
d: "M17.5 23v9h12a2.5 2.5 0 0 0 2.5-2.5V23H17.5Z"
|
|
51
|
-
})));
|
|
43
|
+
fill: "#07C",
|
|
44
|
+
d: "M0 23.111h32v6.519A2.37 2.37 0 0 1 29.63 32H2.37A2.37 2.37 0 0 1 0 29.63v-6.52Z"
|
|
45
|
+
}));
|
|
52
46
|
};
|
|
53
47
|
var icon = exports.icon = EuiIconLogoElasticStack;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
<svg width="32" height="32" viewBox="0 0 32 32"
|
|
2
|
-
<path
|
|
3
|
-
<path d="
|
|
4
|
-
<path d="
|
|
5
|
-
<path
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
2
|
+
<path class="euiIcon__fillSecondary" d="M4 6h22v7h-2V8H6v19H4V6Z"/>
|
|
3
|
+
<path class="euiIcon__fillSecondary" d="M10 12H7v-2h3v2Zm1 0h12v-2H11v2Z"/>
|
|
4
|
+
<path d="M24 1H0v26h1l-1 .001v.026a2.256 2.256 0 0 0 .01.185 4.318 4.318 0 0 0 .563 1.792C1.194 30.064 2.399 31 4.5 31H17v-2H8.429a4.32 4.32 0 0 0 .57-1.927v-.062L9 27.005v-.003S9 27 8 27h1V16h21v3h2v-5H7v12.995l-.003.05a2.32 2.32 0 0 1-.298.95C6.442 28.436 5.898 29 4.5 29c-1.398 0-1.942-.564-2.199-1.004a2.32 2.32 0 0 1-.3-1.001L2 26.992V3h20v3h2V1Z"/>
|
|
5
|
+
<path d="M23 21v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2Z"/>
|
|
6
|
+
<path fill-rule="evenodd" d="M24 32a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm0-2a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z"/>
|
|
6
7
|
</svg>
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
2
|
-
|
|
3
|
-
<path fill="#
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
<path fill="#FEC514" d="M17.5,23 L17.5,32 L29.5,32 C30.881,32 32,30.881 32,29.5 L32,23 L17.5,23 Z"/>
|
|
7
|
-
</g>
|
|
8
|
-
</svg>
|
|
2
|
+
<path fill="#F04E98" d="M0 2.37A2.37 2.37 0 0 1 2.37 0h27.26A2.37 2.37 0 0 1 32 2.37v6.52H0V2.37Z"/>
|
|
3
|
+
<path fill="#00BFB3" d="M0 20.148h32v-8.296H0v8.296Z"/>
|
|
4
|
+
<path fill="#07C" d="M0 23.111h32v6.519A2.37 2.37 0 0 1 29.63 32H2.37A2.37 2.37 0 0 1 0 29.63v-6.52Z"/>
|
|
5
|
+
</svg>
|
|
@@ -55,9 +55,9 @@ var EuiStep = exports.EuiStep = function EuiStep(_ref) {
|
|
|
55
55
|
}, (0, _react2.jsx)(_step_number.EuiStepNumber, {
|
|
56
56
|
number: step,
|
|
57
57
|
status: status,
|
|
58
|
-
titleSize: titleSize
|
|
58
|
+
titleSize: titleSize === 'xxs' ? 'none' : titleSize
|
|
59
59
|
}), (0, _react2.jsx)(_title.EuiTitle, {
|
|
60
|
-
size: titleSize,
|
|
60
|
+
size: titleSize === 'xxs' ? 'xs' : titleSize,
|
|
61
61
|
className: "euiStep__title",
|
|
62
62
|
css: cssStepTitleStyles
|
|
63
63
|
}, /*#__PURE__*/(0, _react.createElement)(headingElement, null, title))), (0, _react2.jsx)("div", {
|
|
@@ -19,6 +19,7 @@ var euiStepVariables = exports.euiStepVariables = function euiStepVariables(euiT
|
|
|
19
19
|
return {
|
|
20
20
|
numberSize: euiTheme.size.xl,
|
|
21
21
|
numberXSSize: euiTheme.size.l,
|
|
22
|
+
numberXXSSize: euiTheme.size.base,
|
|
22
23
|
numberMargin: euiTheme.size.base
|
|
23
24
|
};
|
|
24
25
|
};
|
|
@@ -38,9 +39,10 @@ var euiStepStyles = exports.euiStepStyles = function euiStepStyles(euiThemeConte
|
|
|
38
39
|
return {
|
|
39
40
|
euiStep: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-image:", lineGradient, ";background-repeat:no-repeat;};label:euiStep;"),
|
|
40
41
|
// Sizes
|
|
41
|
-
m: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ",
|
|
42
|
-
s: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ",
|
|
43
|
-
xs: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:-", euiTheme.size.xs, " ",
|
|
42
|
+
m: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ", euiStep.numberSize, ";};label:m;"),
|
|
43
|
+
s: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ", euiStep.numberSize, ";};label:s;"),
|
|
44
|
+
xs: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:-", euiTheme.size.xs, " ", euiStep.numberXSSize, ";};label:xs;"),
|
|
45
|
+
xxs: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:-", euiTheme.size.s, " ", euiStep.numberXXSSize, ";};label:xxs;")
|
|
44
46
|
};
|
|
45
47
|
};
|
|
46
48
|
var euiStepContentStyles = exports.euiStepContentStyles = function euiStepContentStyles(euiThemeContext) {
|
|
@@ -64,7 +66,12 @@ var euiStepContentStyles = exports.euiStepContentStyles = function euiStepConten
|
|
|
64
66
|
return x / 2 + y;
|
|
65
67
|
})), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberXSSize, function (x) {
|
|
66
68
|
return x / 2;
|
|
67
|
-
})), ";;label:xs;")
|
|
69
|
+
})), ";;label:xs;"),
|
|
70
|
+
xxs: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-left', (0, _global_styling.mathWithUnits)([euiStep.numberXXSSize, euiStep.numberMargin], function (x, y) {
|
|
71
|
+
return x / 2 + y;
|
|
72
|
+
})), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberXXSSize, function (x) {
|
|
73
|
+
return x / 2;
|
|
74
|
+
})), ";;label:xxs;")
|
|
68
75
|
};
|
|
69
76
|
};
|
|
70
77
|
var euiStepTitleStyles = exports.euiStepTitleStyles = function euiStepTitleStyles(euiThemeContext) {
|
|
@@ -77,6 +84,7 @@ var euiStepTitleStyles = exports.euiStepTitleStyles = function euiStepTitleStyle
|
|
|
77
84
|
// Sizes
|
|
78
85
|
m: /*#__PURE__*/(0, _react.css)(";label:m;"),
|
|
79
86
|
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-top', euiTheme.size.xs), ";;label:s;"),
|
|
80
|
-
xs: /*#__PURE__*/(0, _react.css)(";label:xs;")
|
|
87
|
+
xs: /*#__PURE__*/(0, _react.css)(";label:xs;"),
|
|
88
|
+
xxs: /*#__PURE__*/(0, _react.css)("line-height:", euiStep.numberXXSSize, ";;label:xxs;")
|
|
81
89
|
};
|
|
82
90
|
};
|
|
@@ -9,9 +9,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _services = require("../../services");
|
|
12
13
|
var _step_number = require("./step_number");
|
|
13
14
|
var _step_strings = require("./step_strings");
|
|
14
|
-
var _services = require("../../services");
|
|
15
15
|
var _step_horizontal = require("./step_horizontal.styles");
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _excluded = ["className", "step", "title", "onClick", "disabled", "status", "size"];
|
|
@@ -22,6 +22,12 @@ var _excluded = ["className", "step", "title", "onClick", "disabled", "status",
|
|
|
22
22
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
23
23
|
* Side Public License, v 1.
|
|
24
24
|
*/
|
|
25
|
+
// The titleSize map is not 1 to 1; small == xs on the titleSize map
|
|
26
|
+
var stepNumberSizeMap = {
|
|
27
|
+
xs: 'none',
|
|
28
|
+
s: 'xs',
|
|
29
|
+
m: 'm'
|
|
30
|
+
};
|
|
25
31
|
var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_ref) {
|
|
26
32
|
var className = _ref.className,
|
|
27
33
|
_ref$step = _ref.step,
|
|
@@ -93,8 +99,7 @@ var EuiStepHorizontal = exports.EuiStepHorizontal = function EuiStepHorizontal(_
|
|
|
93
99
|
className: "euiStepHorizontal__number",
|
|
94
100
|
status: status,
|
|
95
101
|
number: step,
|
|
96
|
-
titleSize: size
|
|
97
|
-
,
|
|
102
|
+
titleSize: stepNumberSizeMap[size],
|
|
98
103
|
css: cssNumberStyles
|
|
99
104
|
}), (0, _react2.jsx)("span", {
|
|
100
105
|
className: "euiStepHorizontal__title",
|
|
@@ -44,6 +44,7 @@ var euiStepHorizontalStyles = exports.euiStepHorizontalStyles = function euiStep
|
|
|
44
44
|
// Adjust the size of the step number and connecting lines based on size
|
|
45
45
|
m: _generateStepSizeAndInset(euiStep.numberSize),
|
|
46
46
|
s: _generateStepSizeAndInset(euiStep.numberXSSize),
|
|
47
|
+
xs: _generateStepSizeAndInset(euiStep.numberXXSSize),
|
|
47
48
|
// Note: these selectors must be nested because focus/hover state
|
|
48
49
|
// is on the parent container, but affects specific children
|
|
49
50
|
enabled: /*#__PURE__*/(0, _react.css)("&:focus,&:hover{.euiStepHorizontal__title{text-decoration:underline;}}&:focus{outline:none;.euiStepHorizontal__number{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}.euiStepHorizontal__number:not(:focus-visible){outline:", euiTheme.focus.width, " solid ", euiTheme.colors.darkestShade, ";}};label:enabled;"),
|
|
@@ -11,9 +11,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _accessibility = require("../accessibility");
|
|
13
13
|
var _icon = require("../icon");
|
|
14
|
-
var _step_strings = require("./step_strings");
|
|
15
14
|
var _loading = require("../loading");
|
|
16
15
|
var _services = require("../../services");
|
|
16
|
+
var _step_strings = require("./step_strings");
|
|
17
17
|
var _step_number = require("./step_number.styles");
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
var _excluded = ["className", "status", "number", "titleSize"];
|
|
@@ -68,37 +68,59 @@ var EuiStepNumber = exports.EuiStepNumber = function EuiStepNumber(_ref) {
|
|
|
68
68
|
switch (status) {
|
|
69
69
|
// Loading spinner
|
|
70
70
|
case 'loading':
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
{
|
|
72
|
+
var iconSizeMap = {
|
|
73
|
+
none: 'm',
|
|
74
|
+
xs: 'l',
|
|
75
|
+
s: 'xl',
|
|
76
|
+
m: 'xl'
|
|
77
|
+
};
|
|
78
|
+
screenReaderText = ariaLabelsMap.loading;
|
|
79
|
+
content = (0, _react2.jsx)(_loading.EuiLoadingSpinner, {
|
|
80
|
+
className: "euiStepNumber__loader",
|
|
81
|
+
size: iconSizeMap[titleSize]
|
|
82
|
+
});
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
77
85
|
// Statuses with icons
|
|
78
86
|
case 'danger':
|
|
79
87
|
case 'warning':
|
|
80
88
|
case 'complete':
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
{
|
|
90
|
+
var cssIconStyles = [contentStyles.euiStepNumber__icon, contentStyles[status],
|
|
91
|
+
// EuiIcon does not support a xxs size so far,
|
|
92
|
+
// we use custom sizing here instead
|
|
93
|
+
titleSize === 'none' && contentStyles[titleSize]];
|
|
94
|
+
var iconTypeMap = {
|
|
95
|
+
danger: 'cross',
|
|
96
|
+
warning: 'warning',
|
|
97
|
+
complete: 'check'
|
|
98
|
+
};
|
|
99
|
+
var _iconSizeMap = {
|
|
100
|
+
xxs: 's',
|
|
101
|
+
xs: 's',
|
|
102
|
+
s: 'm',
|
|
103
|
+
m: 'm'
|
|
104
|
+
};
|
|
105
|
+
content = (0, _react2.jsx)(_icon.EuiIcon, {
|
|
106
|
+
type: iconTypeMap[status],
|
|
107
|
+
"aria-label": ariaLabelsMap[status],
|
|
108
|
+
size: _iconSizeMap[titleSize],
|
|
109
|
+
className: "euiStepNumber__icon",
|
|
110
|
+
css: cssIconStyles
|
|
111
|
+
});
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
95
114
|
// Statuses with numbers
|
|
96
115
|
case 'incomplete':
|
|
97
116
|
case 'current':
|
|
98
117
|
case 'disabled':
|
|
99
118
|
default:
|
|
100
|
-
var cssNumberStyles = [contentStyles.euiStepNumber__number, status && contentStyles[status]];
|
|
101
119
|
screenReaderText = ariaLabelsMap[status || 'step'];
|
|
120
|
+
if (titleSize === 'none') {
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
var cssNumberStyles = [contentStyles.euiStepNumber__number, status && contentStyles[status]];
|
|
102
124
|
content = (0, _react2.jsx)("span", {
|
|
103
125
|
"aria-hidden": "true",
|
|
104
126
|
className: "euiStepNumber__number",
|
|
@@ -43,6 +43,7 @@ var euiStepNumberStyles = exports.euiStepNumberStyles = function euiStepNumberSt
|
|
|
43
43
|
m: /*#__PURE__*/(0, _react.css)(createStepsNumber(euiStep.numberSize, (0, _global_styling.euiFontSizeFromScale)('s', euiTheme)), ";;label:m;"),
|
|
44
44
|
s: /*#__PURE__*/(0, _react.css)(createStepsNumber(euiStep.numberSize, (0, _global_styling.euiFontSizeFromScale)('s', euiTheme)), ";;label:s;"),
|
|
45
45
|
xs: /*#__PURE__*/(0, _react.css)(createStepsNumber(euiStep.numberXSSize, (0, _global_styling.euiFontSizeFromScale)('xs', euiTheme)), ";;label:xs;"),
|
|
46
|
+
none: /*#__PURE__*/(0, _react.css)(createStepsNumber(euiStep.numberXXSSize, (0, _global_styling.euiFontSizeFromScale)('xs', euiTheme)), ";;label:none;"),
|
|
46
47
|
// status
|
|
47
48
|
incomplete: /*#__PURE__*/(0, _react.css)("background-color:transparent;color:", euiTheme.colors.text, ";border:", euiTheme.border.thick, ";;label:incomplete;"),
|
|
48
49
|
disabled: /*#__PURE__*/(0, _react.css)((0, _mixins.euiButtonFillColor)(euiThemeContext, 'disabled'), ";;label:disabled;"),
|
|
@@ -70,6 +71,7 @@ var euiStepNumberContentStyles = exports.euiStepNumberContentStyles = function e
|
|
|
70
71
|
incomplete: /*#__PURE__*/(0, _react.css)("display:unset;position:relative;inset-block-start:-", euiTheme.border.width.thick, ";;label:incomplete;"),
|
|
71
72
|
loading: /*#__PURE__*/(0, _react.css)(";label:loading;"),
|
|
72
73
|
disabled: /*#__PURE__*/(0, _react.css)(";label:disabled;"),
|
|
73
|
-
current: /*#__PURE__*/(0, _react.css)("display:inline-block;transform:translateY(-", euiTheme.border.width.thick, ");;label:current;")
|
|
74
|
+
current: /*#__PURE__*/(0, _react.css)("display:inline-block;transform:translateY(-", euiTheme.border.width.thick, ");;label:current;"),
|
|
75
|
+
none: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(euiTheme.size.s), ";label:none;")
|
|
74
76
|
};
|
|
75
77
|
};
|
|
@@ -20,7 +20,7 @@ var _excluded = ["className", "steps", "size"];
|
|
|
20
20
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
21
|
* Side Public License, v 1.
|
|
22
22
|
*/
|
|
23
|
-
var SIZES = exports.SIZES = ['s', 'm'];
|
|
23
|
+
var SIZES = exports.SIZES = ['xs', 's', 'm'];
|
|
24
24
|
var EuiStepsHorizontal = exports.EuiStepsHorizontal = function EuiStepsHorizontal(_ref) {
|
|
25
25
|
var className = _ref.className,
|
|
26
26
|
steps = _ref.steps,
|