@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
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
var _excluded = ["id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
|
|
1
|
+
var _excluded = ["stylesMemoizer", "id", "name", "initialPromptText", "className", "disabled", "compressed", "onChange", "isInvalid", "fullWidth", "isLoading", "display"];
|
|
2
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
3
3
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
7
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
8
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
9
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
4
10
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], t.indexOf(o) >= 0 || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
5
11
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.indexOf(n) >= 0) continue; t[n] = r[n]; } return t; }
|
|
6
12
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -27,29 +33,25 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
27
33
|
import React, { Component } from 'react';
|
|
28
34
|
import PropTypes from "prop-types";
|
|
29
35
|
import classNames from 'classnames';
|
|
30
|
-
import {
|
|
31
|
-
import { EuiValidatableControl } from '../validatable_control';
|
|
36
|
+
import { withEuiStylesMemoizer, htmlIdGenerator } from '../../../services';
|
|
32
37
|
import { EuiButtonEmpty } from '../../button';
|
|
33
38
|
import { EuiProgress } from '../../progress';
|
|
34
39
|
import { EuiIcon } from '../../icon';
|
|
35
40
|
import { EuiI18n } from '../../i18n';
|
|
36
41
|
import { EuiLoadingSpinner } from '../../loading';
|
|
37
|
-
import { htmlIdGenerator } from '../../../services/accessibility';
|
|
38
42
|
import { FormContext } from '../eui_form_context';
|
|
43
|
+
import { EuiValidatableControl } from '../validatable_control';
|
|
44
|
+
import { EuiFormControlLayoutClearButton } from '../form_control_layout/form_control_layout_clear_button';
|
|
45
|
+
import { euiFilePickerStyles } from './file_picker.styles';
|
|
39
46
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
large: 'euiFilePicker--large'
|
|
43
|
-
};
|
|
44
|
-
export var DISPLAYS = keysOf(displayToClassNameMap);
|
|
45
|
-
export var EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
46
|
-
function EuiFilePicker() {
|
|
47
|
+
export var EuiFilePickerClass = /*#__PURE__*/function (_Component) {
|
|
48
|
+
function EuiFilePickerClass() {
|
|
47
49
|
var _this;
|
|
48
|
-
_classCallCheck(this,
|
|
50
|
+
_classCallCheck(this, EuiFilePickerClass);
|
|
49
51
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
50
52
|
args[_key] = arguments[_key];
|
|
51
53
|
}
|
|
52
|
-
_this = _callSuper(this,
|
|
54
|
+
_this = _callSuper(this, EuiFilePickerClass, [].concat(args));
|
|
53
55
|
_defineProperty(_this, "state", {
|
|
54
56
|
promptText: null,
|
|
55
57
|
isHoveringDrop: false
|
|
@@ -105,8 +107,8 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
105
107
|
});
|
|
106
108
|
return _this;
|
|
107
109
|
}
|
|
108
|
-
_inherits(
|
|
109
|
-
return _createClass(
|
|
110
|
+
_inherits(EuiFilePickerClass, _Component);
|
|
111
|
+
return _createClass(EuiFilePickerClass, [{
|
|
110
112
|
key: "render",
|
|
111
113
|
value: function render() {
|
|
112
114
|
var _this2 = this;
|
|
@@ -117,6 +119,7 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
117
119
|
default: "Clear selected files"
|
|
118
120
|
}, function (clearSelectedFiles) {
|
|
119
121
|
var _this2$props = _this2.props,
|
|
122
|
+
stylesMemoizer = _this2$props.stylesMemoizer,
|
|
120
123
|
id = _this2$props.id,
|
|
121
124
|
name = _this2$props.name,
|
|
122
125
|
initialPromptText = _this2$props.initialPromptText,
|
|
@@ -133,34 +136,39 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
133
136
|
var promptId = "".concat(id || _this2.generatedId, "-filePicker__prompt");
|
|
134
137
|
var isOverridingInitialPrompt = _this2.state.promptText != null;
|
|
135
138
|
var normalFormControl = display === 'default';
|
|
136
|
-
var classes = classNames('euiFilePicker',
|
|
137
|
-
|
|
138
|
-
'euiFilePicker--compressed': compressed,
|
|
139
|
-
'euiFilePicker--fullWidth': fullWidth,
|
|
139
|
+
var classes = classNames('euiFilePicker', {
|
|
140
|
+
'euiFilePicker-isDroppingFile': _this2.state.isHoveringDrop,
|
|
140
141
|
'euiFilePicker-isInvalid': isInvalid,
|
|
141
142
|
'euiFilePicker-isLoading': isLoading,
|
|
142
143
|
'euiFilePicker-hasFiles': isOverridingInitialPrompt
|
|
143
144
|
}, className);
|
|
145
|
+
var styles = stylesMemoizer(euiFilePickerStyles);
|
|
146
|
+
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];
|
|
147
|
+
var inputStyles = [styles.input.euiFilePicker__input, !normalFormControl && !disabled && styles.input.largeInteractive];
|
|
148
|
+
var promptStyles = [styles.euiFilePicker__prompt, disabled && styles.disabled].concat(_toConsumableArray(normalFormControl ? [compressed ? styles.compressed : styles.uncompressed] : [styles.large.large, compressed ? styles.large.compressed : styles.large.uncompressed]));
|
|
149
|
+
var iconStyles = [styles.icon.euiFilePicker__icon].concat(_toConsumableArray(normalFormControl ? [styles.icon.normal, compressed ? styles.icon.compresssed : styles.icon.uncompressed] : [styles.icon.large]));
|
|
150
|
+
var rightIconStyles = normalFormControl ? [styles.rightIcon.euiFilePicker__rightIcon, compressed ? styles.rightIcon.compressed : styles.rightIcon.uncompressed] : undefined;
|
|
144
151
|
var clearButton;
|
|
145
152
|
if (isLoading && normalFormControl) {
|
|
146
153
|
// Override clear button with loading spinner if it is in loading state
|
|
147
154
|
clearButton = ___EmotionJSX(EuiLoadingSpinner, {
|
|
148
|
-
|
|
155
|
+
css: rightIconStyles,
|
|
156
|
+
className: "euiFilePicker__loadingSpinner",
|
|
157
|
+
size: compressed ? 's' : 'm'
|
|
149
158
|
});
|
|
150
159
|
} else if (isOverridingInitialPrompt && !disabled) {
|
|
151
160
|
if (normalFormControl) {
|
|
152
|
-
clearButton = ___EmotionJSX(
|
|
153
|
-
type: "button",
|
|
161
|
+
clearButton = ___EmotionJSX(EuiFormControlLayoutClearButton, {
|
|
154
162
|
"aria-label": clearSelectedFiles,
|
|
163
|
+
css: [styles.euiFilePicker__clearButton, rightIconStyles, ";label:clearButton;"],
|
|
155
164
|
className: "euiFilePicker__clearButton",
|
|
156
|
-
onClick: _this2.removeFiles
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
type: "cross"
|
|
160
|
-
}));
|
|
165
|
+
onClick: _this2.removeFiles,
|
|
166
|
+
size: compressed ? 's' : 'm'
|
|
167
|
+
});
|
|
161
168
|
} else {
|
|
162
169
|
clearButton = ___EmotionJSX(EuiButtonEmpty, {
|
|
163
170
|
"aria-label": clearSelectedFiles,
|
|
171
|
+
css: styles.euiFilePicker__clearButton,
|
|
164
172
|
className: "euiFilePicker__clearButton",
|
|
165
173
|
size: "xs",
|
|
166
174
|
onClick: _this2.removeFiles
|
|
@@ -178,15 +186,15 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
178
186
|
position: "absolute"
|
|
179
187
|
});
|
|
180
188
|
return ___EmotionJSX("div", {
|
|
189
|
+
css: cssStyles,
|
|
181
190
|
className: classes
|
|
182
|
-
}, ___EmotionJSX("div", {
|
|
183
|
-
className: "euiFilePicker__wrap"
|
|
184
191
|
}, ___EmotionJSX(EuiValidatableControl, {
|
|
185
192
|
isInvalid: isInvalid
|
|
186
193
|
}, ___EmotionJSX("input", _extends({
|
|
187
194
|
type: "file",
|
|
188
195
|
id: id,
|
|
189
196
|
name: name,
|
|
197
|
+
css: inputStyles,
|
|
190
198
|
className: "euiFilePicker__input",
|
|
191
199
|
onChange: _this2.handleChange,
|
|
192
200
|
ref: function ref(input) {
|
|
@@ -198,23 +206,25 @@ export var EuiFilePicker = /*#__PURE__*/function (_Component) {
|
|
|
198
206
|
disabled: disabled,
|
|
199
207
|
"aria-describedby": promptId
|
|
200
208
|
}, rest))), ___EmotionJSX("div", {
|
|
209
|
+
css: promptStyles,
|
|
201
210
|
className: "euiFilePicker__prompt",
|
|
202
211
|
id: promptId
|
|
203
212
|
}, ___EmotionJSX(EuiIcon, {
|
|
213
|
+
css: iconStyles,
|
|
204
214
|
className: "euiFilePicker__icon",
|
|
205
215
|
color: isInvalid ? 'danger' : disabled ? 'subdued' : 'primary',
|
|
206
216
|
type: isInvalid ? 'alert' : 'importAction',
|
|
207
217
|
size: normalFormControl ? 'm' : 'l',
|
|
208
218
|
"aria-hidden": "true"
|
|
209
|
-
}), ___EmotionJSX("
|
|
219
|
+
}), ___EmotionJSX("span", {
|
|
210
220
|
className: "euiFilePicker__promptText"
|
|
211
|
-
}, _this2.state.promptText || initialPromptText), clearButton, loader))
|
|
221
|
+
}, _this2.state.promptText || initialPromptText), clearButton, loader));
|
|
212
222
|
});
|
|
213
223
|
}
|
|
214
224
|
}]);
|
|
215
225
|
}(Component);
|
|
216
|
-
_defineProperty(
|
|
217
|
-
_defineProperty(
|
|
226
|
+
_defineProperty(EuiFilePickerClass, "contextType", FormContext);
|
|
227
|
+
_defineProperty(EuiFilePickerClass, "defaultProps", {
|
|
218
228
|
initialPromptText: ___EmotionJSX(EuiI18n, {
|
|
219
229
|
token: "euiFilePicker.promptText",
|
|
220
230
|
default: "Select or drag and drop a file"
|
|
@@ -222,12 +232,13 @@ _defineProperty(EuiFilePicker, "defaultProps", {
|
|
|
222
232
|
compressed: false,
|
|
223
233
|
display: 'large'
|
|
224
234
|
});
|
|
225
|
-
|
|
235
|
+
EuiFilePickerClass.propTypes = {
|
|
226
236
|
id: PropTypes.string,
|
|
227
237
|
name: PropTypes.string,
|
|
228
238
|
className: PropTypes.string,
|
|
229
239
|
/**
|
|
230
240
|
* The content that appears in the dropzone if no file is attached
|
|
241
|
+
* @default 'Select or drag and drop a file'
|
|
231
242
|
*/
|
|
232
243
|
initialPromptText: PropTypes.node,
|
|
233
244
|
/**
|
|
@@ -236,12 +247,14 @@ EuiFilePicker.propTypes = {
|
|
|
236
247
|
onChange: PropTypes.func,
|
|
237
248
|
/**
|
|
238
249
|
* Reduces the size to a typical (compressed) input
|
|
250
|
+
* @default false
|
|
239
251
|
*/
|
|
240
252
|
compressed: PropTypes.bool,
|
|
241
253
|
/**
|
|
242
254
|
* Size or type of display;
|
|
243
255
|
* `default` for normal height, similar to other controls;
|
|
244
256
|
* `large` for taller size
|
|
257
|
+
* @default large
|
|
245
258
|
*/
|
|
246
259
|
display: PropTypes.oneOf(["default", "large"]),
|
|
247
260
|
/**
|
|
@@ -256,4 +269,5 @@ EuiFilePicker.propTypes = {
|
|
|
256
269
|
"aria-label": PropTypes.string,
|
|
257
270
|
"data-test-subj": PropTypes.string,
|
|
258
271
|
css: PropTypes.any
|
|
259
|
-
};
|
|
272
|
+
};
|
|
273
|
+
export var EuiFilePicker = withEuiStylesMemoizer(EuiFilePickerClass);
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
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)."; }
|
|
2
|
+
/*
|
|
3
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
4
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
5
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
6
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
7
|
+
* Side Public License, v 1.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { css } from '@emotion/react';
|
|
11
|
+
import { euiCanAnimate, euiFontSize, euiTextTruncate, logicalCSS, mathWithUnits } from '../../../global_styling';
|
|
12
|
+
import { euiFormControlStyles, euiFormVariables } from '../form.styles';
|
|
13
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "6h1iuq-euiFilePicker__clearButton",
|
|
15
|
+
styles: "pointer-events:auto;position:relative;label:euiFilePicker__clearButton;"
|
|
16
|
+
} : {
|
|
17
|
+
name: "6h1iuq-euiFilePicker__clearButton",
|
|
18
|
+
styles: "pointer-events:auto;position:relative;label:euiFilePicker__clearButton;",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
};
|
|
21
|
+
var _ref2 = process.env.NODE_ENV === "production" ? {
|
|
22
|
+
name: "d8me89-euiFilePicker__rightIcon",
|
|
23
|
+
styles: "position:absolute;label:euiFilePicker__rightIcon;"
|
|
24
|
+
} : {
|
|
25
|
+
name: "d8me89-euiFilePicker__rightIcon",
|
|
26
|
+
styles: "position:absolute;label:euiFilePicker__rightIcon;",
|
|
27
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
+
};
|
|
29
|
+
var _ref3 = process.env.NODE_ENV === "production" ? {
|
|
30
|
+
name: "19x04ih-largeInteractive",
|
|
31
|
+
styles: "&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{text-decoration:underline;}.euiFilePicker__icon{transform:scale(1.1);}}};label:largeInteractive;"
|
|
32
|
+
} : {
|
|
33
|
+
name: "19x04ih-largeInteractive",
|
|
34
|
+
styles: "&:hover,&:focus,.euiFilePicker-isDroppingFile &{&+.euiFilePicker__prompt{.euiFilePicker__promptText{text-decoration:underline;}.euiFilePicker__icon{transform:scale(1.1);}}};label:largeInteractive;",
|
|
35
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
36
|
+
};
|
|
37
|
+
var _ref4 = process.env.NODE_ENV === "production" ? {
|
|
38
|
+
name: "1j9s7hu-euiFilePicker__input",
|
|
39
|
+
styles: "position:absolute;inset:0;opacity:0;&:hover{cursor:pointer;}&:hover:disabled{cursor:not-allowed;}&:disabled{opacity:0;};label:euiFilePicker__input;"
|
|
40
|
+
} : {
|
|
41
|
+
name: "1j9s7hu-euiFilePicker__input",
|
|
42
|
+
styles: "position:absolute;inset:0;opacity:0;&:hover{cursor:pointer;}&:hover:disabled{cursor:not-allowed;}&:disabled{opacity:0;};label:euiFilePicker__input;",
|
|
43
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
44
|
+
};
|
|
45
|
+
export var euiFilePickerStyles = function euiFilePickerStyles(euiThemeContext) {
|
|
46
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
47
|
+
var formStyles = euiFormControlStyles(euiThemeContext);
|
|
48
|
+
var formVariables = euiFormVariables(euiThemeContext);
|
|
49
|
+
var _euiFontSize = euiFontSize(euiThemeContext, 's'),
|
|
50
|
+
fontSize = _euiFontSize.fontSize,
|
|
51
|
+
lineHeight = _euiFontSize.lineHeight;
|
|
52
|
+
return {
|
|
53
|
+
euiFilePicker: /*#__PURE__*/css("--euiFormControlLeftIconsCount:1;position:relative;&:has(input:focus){--euiFormControlStateColor:", euiTheme.colors.primary, ";};label:euiFilePicker;"),
|
|
54
|
+
isDroppingFile: /*#__PURE__*/css("--euiFormControlStateColor:", euiTheme.colors.primary, ";;label:isDroppingFile;"),
|
|
55
|
+
invalid: /*#__PURE__*/css("--euiFormControlStateColor:", euiTheme.colors.danger, ";;label:invalid;"),
|
|
56
|
+
hasFiles: /*#__PURE__*/css("--euiFormControlRightIconsCount:1;font-weight:", euiTheme.font.weight.bold, ";;label:hasFiles;"),
|
|
57
|
+
loading: /*#__PURE__*/css("--euiFormControlRightIconsCount:1;border-radius:", formVariables.controlCompressedBorderRadius, ";overflow:hidden;;label:loading;"),
|
|
58
|
+
// Skip the css() on the default width to avoid generating a className
|
|
59
|
+
formWidth: formStyles.formWidth,
|
|
60
|
+
fullWidth: /*#__PURE__*/css(formStyles.fullWidth, ";label:fullWidth;"),
|
|
61
|
+
// The input is an invisible dropzone / button
|
|
62
|
+
input: {
|
|
63
|
+
euiFilePicker__input: _ref4,
|
|
64
|
+
largeInteractive: _ref3
|
|
65
|
+
},
|
|
66
|
+
euiFilePicker__prompt: /*#__PURE__*/css("pointer-events:none;font-size:", fontSize, ";line-height:1;", euiTextTruncate(), " color:", euiTheme.colors.text, ";border:", euiTheme.border.width.thick, " dashed var(--euiFormControlStateColor, ", euiTheme.colors.lightShade, ");", euiCanAnimate, "{transition:border-color ", euiTheme.animation.fast, " ease-in,background-color ", euiTheme.animation.fast, " ease-in;};label:euiFilePicker__prompt;"),
|
|
67
|
+
disabled: /*#__PURE__*/css(formStyles.disabled, ";label:disabled;"),
|
|
68
|
+
// Skip the css() on the default height to avoid generating a className
|
|
69
|
+
uncompressed: formStyles.uncompressed,
|
|
70
|
+
compressed: /*#__PURE__*/css(formStyles.compressed, ";label:compressed;"),
|
|
71
|
+
// Completely different rendering style from the normal form controls
|
|
72
|
+
large: {
|
|
73
|
+
large: /*#__PURE__*/css("padding-inline:", euiTheme.size.l, ";display:flex;flex-direction:column;align-items:center;justify-content:center;.euiFilePicker__promptText{", euiTextTruncate(), " line-height:", lineHeight, ";};label:large;"),
|
|
74
|
+
// Static heights so that surrounding contents don't shift around
|
|
75
|
+
uncompressed: "\n ".concat(logicalCSS('height', mathWithUnits(euiTheme.size.base, function (x) {
|
|
76
|
+
return x * 8;
|
|
77
|
+
})), "\n border-radius: ").concat(formVariables.controlBorderRadius, ";\n "),
|
|
78
|
+
compressed: /*#__PURE__*/css(logicalCSS('height', mathWithUnits(euiTheme.size.base, function (x) {
|
|
79
|
+
return x * 6.5;
|
|
80
|
+
})), " border-radius:", formVariables.controlCompressedBorderRadius, ";;label:compressed;")
|
|
81
|
+
},
|
|
82
|
+
icon: {
|
|
83
|
+
euiFilePicker__icon: /*#__PURE__*/css(";label:euiFilePicker__icon;"),
|
|
84
|
+
normal: /*#__PURE__*/css("position:absolute;", logicalCSS('top', 0), " ", logicalCSS('height', '100%'), ";;label:normal;"),
|
|
85
|
+
uncompressed: "\n ".concat(logicalCSS('left', euiTheme.size.m), "\n "),
|
|
86
|
+
compresssed: /*#__PURE__*/css(logicalCSS('left', euiTheme.size.s), " ", logicalCSS('width', euiTheme.size.m), ";;label:compresssed;"),
|
|
87
|
+
large: /*#__PURE__*/css(logicalCSS('margin-bottom', euiTheme.size.base), " ", euiCanAnimate, "{transition:transform ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";};label:large;")
|
|
88
|
+
},
|
|
89
|
+
rightIcon: {
|
|
90
|
+
euiFilePicker__rightIcon: _ref2,
|
|
91
|
+
uncompressed: "\n ".concat(logicalCSS('top', euiTheme.size.m), "\n ").concat(logicalCSS('right', euiTheme.size.m), "\n "),
|
|
92
|
+
compressed: /*#__PURE__*/css(logicalCSS('right', euiTheme.size.s), " ", logicalCSS('top', '50%'), " ", logicalCSS('margin-top', mathWithUnits(euiTheme.size.m, function (x) {
|
|
93
|
+
return x / -2;
|
|
94
|
+
})), ";;label:compressed;")
|
|
95
|
+
},
|
|
96
|
+
euiFilePicker__clearButton: _ref
|
|
97
|
+
};
|
|
98
|
+
};
|
|
@@ -22,21 +22,23 @@ var EuiIconAppCases = function EuiIconAppCases(_ref) {
|
|
|
22
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23
23
|
width: 32,
|
|
24
24
|
height: 32,
|
|
25
|
-
fill: "none",
|
|
26
25
|
viewBox: "0 0 32 32",
|
|
27
26
|
"aria-labelledby": titleId
|
|
28
27
|
}, props), title ? ___EmotionJSX("title", {
|
|
29
28
|
id: titleId
|
|
30
29
|
}, title) : null, ___EmotionJSX("path", {
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
d: "M4 6h22v7h-2V8H6v19H4V6Z",
|
|
31
|
+
className: "euiIcon__fillSecondary"
|
|
32
|
+
}), ___EmotionJSX("path", {
|
|
33
|
+
d: "M10 12H7v-2h3v2Zm1 0h12v-2H11v2Z",
|
|
34
|
+
className: "euiIcon__fillSecondary"
|
|
35
|
+
}), ___EmotionJSX("path", {
|
|
36
|
+
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"
|
|
33
37
|
}), ___EmotionJSX("path", {
|
|
34
|
-
d: "
|
|
38
|
+
d: "M23 21v3h-3v2h3v3h2v-3h3v-2h-3v-3h-2Z"
|
|
35
39
|
}), ___EmotionJSX("path", {
|
|
36
40
|
fillRule: "evenodd",
|
|
37
|
-
d: "
|
|
38
|
-
className: "euiIcon__fillSecondary",
|
|
39
|
-
clipRule: "evenodd"
|
|
41
|
+
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"
|
|
40
42
|
}));
|
|
41
43
|
};
|
|
42
44
|
export var icon = EuiIconAppCases;
|
|
@@ -26,21 +26,15 @@ var EuiIconLogoElasticStack = function EuiIconLogoElasticStack(_ref) {
|
|
|
26
26
|
"aria-labelledby": titleId
|
|
27
27
|
}, props), title ? ___EmotionJSX("title", {
|
|
28
28
|
id: titleId
|
|
29
|
-
}, title) : null, ___EmotionJSX("
|
|
30
|
-
fill: "none",
|
|
31
|
-
fillRule: "evenodd"
|
|
32
|
-
}, ___EmotionJSX("path", {
|
|
29
|
+
}, title) : null, ___EmotionJSX("path", {
|
|
33
30
|
fill: "#F04E98",
|
|
34
|
-
d: "
|
|
31
|
+
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"
|
|
35
32
|
}), ___EmotionJSX("path", {
|
|
36
33
|
fill: "#00BFB3",
|
|
37
|
-
d: "M0
|
|
34
|
+
d: "M0 20.148h32v-8.296H0v8.296Z"
|
|
38
35
|
}), ___EmotionJSX("path", {
|
|
39
|
-
fill: "#
|
|
40
|
-
d: "
|
|
41
|
-
})
|
|
42
|
-
fill: "#FEC514",
|
|
43
|
-
d: "M17.5 23v9h12a2.5 2.5 0 0 0 2.5-2.5V23H17.5Z"
|
|
44
|
-
})));
|
|
36
|
+
fill: "#07C",
|
|
37
|
+
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"
|
|
38
|
+
}));
|
|
45
39
|
};
|
|
46
40
|
export var icon = EuiIconLogoElasticStack;
|
|
@@ -48,9 +48,9 @@ export var EuiStep = function EuiStep(_ref) {
|
|
|
48
48
|
}, ___EmotionJSX(EuiStepNumber, {
|
|
49
49
|
number: step,
|
|
50
50
|
status: status,
|
|
51
|
-
titleSize: titleSize
|
|
51
|
+
titleSize: titleSize === 'xxs' ? 'none' : titleSize
|
|
52
52
|
}), ___EmotionJSX(EuiTitle, {
|
|
53
|
-
size: titleSize,
|
|
53
|
+
size: titleSize === 'xxs' ? 'xs' : titleSize,
|
|
54
54
|
className: "euiStep__title",
|
|
55
55
|
css: cssStepTitleStyles
|
|
56
56
|
}, /*#__PURE__*/createElement(headingElement, null, title))), ___EmotionJSX("div", {
|
|
@@ -81,7 +81,9 @@ EuiStep.propTypes = {
|
|
|
81
81
|
*/
|
|
82
82
|
status: PropTypes.any,
|
|
83
83
|
/**
|
|
84
|
-
* Title sizing equivalent to EuiTitle
|
|
84
|
+
* Title sizing equivalent to **EuiTitle**, but only `m`, `s`, `xs` font sizes.
|
|
85
|
+
* The `xxs` size reduces the size of the accompanying step indicator, but not the title itself.
|
|
86
|
+
* @default s
|
|
85
87
|
*/
|
|
86
88
|
titleSize: PropTypes.any
|
|
87
89
|
};
|
|
@@ -13,6 +13,7 @@ export var euiStepVariables = function euiStepVariables(euiTheme) {
|
|
|
13
13
|
return {
|
|
14
14
|
numberSize: euiTheme.size.xl,
|
|
15
15
|
numberXSSize: euiTheme.size.l,
|
|
16
|
+
numberXXSSize: euiTheme.size.base,
|
|
16
17
|
numberMargin: euiTheme.size.base
|
|
17
18
|
};
|
|
18
19
|
};
|
|
@@ -32,9 +33,10 @@ export var euiStepStyles = function euiStepStyles(euiThemeContext) {
|
|
|
32
33
|
return {
|
|
33
34
|
euiStep: /*#__PURE__*/css("&:not(:last-of-type){background-image:", lineGradient, ";background-repeat:no-repeat;};label:euiStep;"),
|
|
34
35
|
// Sizes
|
|
35
|
-
m: /*#__PURE__*/css("&:not(:last-of-type){background-position:left ",
|
|
36
|
-
s: /*#__PURE__*/css("&:not(:last-of-type){background-position:left ",
|
|
37
|
-
xs: /*#__PURE__*/css("&:not(:last-of-type){background-position:-", euiTheme.size.xs, " ",
|
|
36
|
+
m: /*#__PURE__*/css("&:not(:last-of-type){background-position:left ", euiStep.numberSize, ";};label:m;"),
|
|
37
|
+
s: /*#__PURE__*/css("&:not(:last-of-type){background-position:left ", euiStep.numberSize, ";};label:s;"),
|
|
38
|
+
xs: /*#__PURE__*/css("&:not(:last-of-type){background-position:-", euiTheme.size.xs, " ", euiStep.numberXSSize, ";};label:xs;"),
|
|
39
|
+
xxs: /*#__PURE__*/css("&:not(:last-of-type){background-position:-", euiTheme.size.s, " ", euiStep.numberXXSSize, ";};label:xxs;")
|
|
38
40
|
};
|
|
39
41
|
};
|
|
40
42
|
export var euiStepContentStyles = function euiStepContentStyles(euiThemeContext) {
|
|
@@ -58,7 +60,12 @@ export var euiStepContentStyles = function euiStepContentStyles(euiThemeContext)
|
|
|
58
60
|
return x / 2 + y;
|
|
59
61
|
})), logicalCSS('margin-left', mathWithUnits(euiStep.numberXSSize, function (x) {
|
|
60
62
|
return x / 2;
|
|
61
|
-
})), ";;label:xs;")
|
|
63
|
+
})), ";;label:xs;"),
|
|
64
|
+
xxs: /*#__PURE__*/css(logicalCSS('padding-left', mathWithUnits([euiStep.numberXXSSize, euiStep.numberMargin], function (x, y) {
|
|
65
|
+
return x / 2 + y;
|
|
66
|
+
})), logicalCSS('margin-left', mathWithUnits(euiStep.numberXXSSize, function (x) {
|
|
67
|
+
return x / 2;
|
|
68
|
+
})), ";;label:xxs;")
|
|
62
69
|
};
|
|
63
70
|
};
|
|
64
71
|
export var euiStepTitleStyles = function euiStepTitleStyles(euiThemeContext) {
|
|
@@ -71,6 +78,7 @@ export var euiStepTitleStyles = function euiStepTitleStyles(euiThemeContext) {
|
|
|
71
78
|
// Sizes
|
|
72
79
|
m: /*#__PURE__*/css(";label:m;"),
|
|
73
80
|
s: /*#__PURE__*/css(logicalCSS('padding-top', euiTheme.size.xs), ";;label:s;"),
|
|
74
|
-
xs: /*#__PURE__*/css(";label:xs;")
|
|
81
|
+
xs: /*#__PURE__*/css(";label:xs;"),
|
|
82
|
+
xxs: /*#__PURE__*/css("line-height:", euiStep.numberXXSSize, ";;label:xxs;")
|
|
75
83
|
};
|
|
76
84
|
};
|
|
@@ -13,11 +13,17 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import PropTypes from "prop-types";
|
|
15
15
|
import React from 'react';
|
|
16
|
+
import { useEuiTheme } from '../../services';
|
|
16
17
|
import { EuiStepNumber } from './step_number';
|
|
17
18
|
import { useI18nCompleteStep, useI18nCurrentStep, useI18nDisabledStep, useI18nIncompleteStep, useI18nStep, useI18nWarningStep, useI18nErrorsStep, useI18nLoadingStep } from './step_strings';
|
|
18
|
-
import { useEuiTheme } from '../../services';
|
|
19
19
|
import { euiStepHorizontalStyles, euiStepHorizontalNumberStyles, euiStepHorizontalTitleStyles } from './step_horizontal.styles';
|
|
20
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
21
|
+
// The titleSize map is not 1 to 1; small == xs on the titleSize map
|
|
22
|
+
var stepNumberSizeMap = {
|
|
23
|
+
xs: 'none',
|
|
24
|
+
s: 'xs',
|
|
25
|
+
m: 'm'
|
|
26
|
+
};
|
|
21
27
|
export var EuiStepHorizontal = function EuiStepHorizontal(_ref) {
|
|
22
28
|
var className = _ref.className,
|
|
23
29
|
_ref$step = _ref.step,
|
|
@@ -89,8 +95,7 @@ export var EuiStepHorizontal = function EuiStepHorizontal(_ref) {
|
|
|
89
95
|
className: "euiStepHorizontal__number",
|
|
90
96
|
status: status,
|
|
91
97
|
number: step,
|
|
92
|
-
titleSize: size
|
|
93
|
-
,
|
|
98
|
+
titleSize: stepNumberSizeMap[size],
|
|
94
99
|
css: cssNumberStyles
|
|
95
100
|
}), ___EmotionJSX("span", {
|
|
96
101
|
className: "euiStepHorizontal__title",
|
|
@@ -40,6 +40,7 @@ export var euiStepHorizontalStyles = function euiStepHorizontalStyles(euiThemeCo
|
|
|
40
40
|
// Adjust the size of the step number and connecting lines based on size
|
|
41
41
|
m: _generateStepSizeAndInset(euiStep.numberSize),
|
|
42
42
|
s: _generateStepSizeAndInset(euiStep.numberXSSize),
|
|
43
|
+
xs: _generateStepSizeAndInset(euiStep.numberXXSSize),
|
|
43
44
|
// Note: these selectors must be nested because focus/hover state
|
|
44
45
|
// is on the parent container, but affects specific children
|
|
45
46
|
enabled: /*#__PURE__*/css("&:focus,&:hover{.euiStepHorizontal__title{text-decoration:underline;}}&:focus{outline:none;.euiStepHorizontal__number{", euiFocusRing(euiThemeContext), ";}.euiStepHorizontal__number:not(:focus-visible){outline:", euiTheme.focus.width, " solid ", euiTheme.colors.darkestShade, ";}};label:enabled;"),
|
|
@@ -15,9 +15,9 @@ import PropTypes from "prop-types";
|
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import { EuiScreenReaderOnly } from '../accessibility';
|
|
17
17
|
import { EuiIcon } from '../icon';
|
|
18
|
-
import { useI18nCompleteStep, useI18nDisabledStep, useI18nErrorsStep, useI18nIncompleteStep, useI18nStep, useI18nWarningStep, useI18nLoadingStep, useI18nCurrentStep } from './step_strings';
|
|
19
18
|
import { EuiLoadingSpinner } from '../loading';
|
|
20
19
|
import { useEuiTheme } from '../../services';
|
|
20
|
+
import { useI18nCompleteStep, useI18nDisabledStep, useI18nErrorsStep, useI18nIncompleteStep, useI18nStep, useI18nWarningStep, useI18nLoadingStep, useI18nCurrentStep } from './step_strings';
|
|
21
21
|
import { euiStepNumberStyles, euiStepNumberContentStyles } from './step_number.styles';
|
|
22
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
23
23
|
export var STATUS = ['incomplete', 'disabled', 'loading', 'warning', 'danger', 'complete', 'current'];
|
|
@@ -64,37 +64,59 @@ export var EuiStepNumber = function EuiStepNumber(_ref) {
|
|
|
64
64
|
switch (status) {
|
|
65
65
|
// Loading spinner
|
|
66
66
|
case 'loading':
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
{
|
|
68
|
+
var iconSizeMap = {
|
|
69
|
+
none: 'm',
|
|
70
|
+
xs: 'l',
|
|
71
|
+
s: 'xl',
|
|
72
|
+
m: 'xl'
|
|
73
|
+
};
|
|
74
|
+
screenReaderText = ariaLabelsMap.loading;
|
|
75
|
+
content = ___EmotionJSX(EuiLoadingSpinner, {
|
|
76
|
+
className: "euiStepNumber__loader",
|
|
77
|
+
size: iconSizeMap[titleSize]
|
|
78
|
+
});
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
73
81
|
// Statuses with icons
|
|
74
82
|
case 'danger':
|
|
75
83
|
case 'warning':
|
|
76
84
|
case 'complete':
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
{
|
|
86
|
+
var cssIconStyles = [contentStyles.euiStepNumber__icon, contentStyles[status],
|
|
87
|
+
// EuiIcon does not support a xxs size so far,
|
|
88
|
+
// we use custom sizing here instead
|
|
89
|
+
titleSize === 'none' && contentStyles[titleSize]];
|
|
90
|
+
var iconTypeMap = {
|
|
91
|
+
danger: 'cross',
|
|
92
|
+
warning: 'warning',
|
|
93
|
+
complete: 'check'
|
|
94
|
+
};
|
|
95
|
+
var _iconSizeMap = {
|
|
96
|
+
xxs: 's',
|
|
97
|
+
xs: 's',
|
|
98
|
+
s: 'm',
|
|
99
|
+
m: 'm'
|
|
100
|
+
};
|
|
101
|
+
content = ___EmotionJSX(EuiIcon, {
|
|
102
|
+
type: iconTypeMap[status],
|
|
103
|
+
"aria-label": ariaLabelsMap[status],
|
|
104
|
+
size: _iconSizeMap[titleSize],
|
|
105
|
+
className: "euiStepNumber__icon",
|
|
106
|
+
css: cssIconStyles
|
|
107
|
+
});
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
91
110
|
// Statuses with numbers
|
|
92
111
|
case 'incomplete':
|
|
93
112
|
case 'current':
|
|
94
113
|
case 'disabled':
|
|
95
114
|
default:
|
|
96
|
-
var cssNumberStyles = [contentStyles.euiStepNumber__number, status && contentStyles[status]];
|
|
97
115
|
screenReaderText = ariaLabelsMap[status || 'step'];
|
|
116
|
+
if (titleSize === 'none') {
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
var cssNumberStyles = [contentStyles.euiStepNumber__number, status && contentStyles[status]];
|
|
98
120
|
content = ___EmotionJSX("span", {
|
|
99
121
|
"aria-hidden": "true",
|
|
100
122
|
className: "euiStepNumber__number",
|
|
@@ -114,9 +136,11 @@ EuiStepNumber.propTypes = {
|
|
|
114
136
|
status: PropTypes.any,
|
|
115
137
|
number: PropTypes.number,
|
|
116
138
|
/**
|
|
117
|
-
* Title sizing equivalent to EuiTitle, but only `m`, `s
|
|
139
|
+
* Title sizing equivalent to EuiTitle, but only `m`, `s`, `xs`.
|
|
140
|
+
* `none` indicates no step number should be rendered.
|
|
141
|
+
* @default s
|
|
118
142
|
*/
|
|
119
|
-
titleSize: PropTypes.any,
|
|
143
|
+
titleSize: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf(["none"])]),
|
|
120
144
|
className: PropTypes.string,
|
|
121
145
|
"aria-label": PropTypes.string,
|
|
122
146
|
"data-test-subj": PropTypes.string,
|
|
@@ -8,7 +8,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { css } from '@emotion/react';
|
|
11
|
-
import { mathWithUnits, logicalCSS, euiFontSizeFromScale, euiCanAnimate, euiAnimScale } from '../../global_styling';
|
|
11
|
+
import { mathWithUnits, logicalCSS, euiFontSizeFromScale, euiCanAnimate, euiAnimScale, logicalSizeCSS } from '../../global_styling';
|
|
12
12
|
import { euiStepVariables } from './step.styles';
|
|
13
13
|
import { euiButtonFillColor } from '../../themes/amsterdam/global_styling/mixins';
|
|
14
14
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -39,6 +39,7 @@ export var euiStepNumberStyles = function euiStepNumberStyles(euiThemeContext) {
|
|
|
39
39
|
m: /*#__PURE__*/css(createStepsNumber(euiStep.numberSize, euiFontSizeFromScale('s', euiTheme)), ";;label:m;"),
|
|
40
40
|
s: /*#__PURE__*/css(createStepsNumber(euiStep.numberSize, euiFontSizeFromScale('s', euiTheme)), ";;label:s;"),
|
|
41
41
|
xs: /*#__PURE__*/css(createStepsNumber(euiStep.numberXSSize, euiFontSizeFromScale('xs', euiTheme)), ";;label:xs;"),
|
|
42
|
+
none: /*#__PURE__*/css(createStepsNumber(euiStep.numberXXSSize, euiFontSizeFromScale('xs', euiTheme)), ";;label:none;"),
|
|
42
43
|
// status
|
|
43
44
|
incomplete: /*#__PURE__*/css("background-color:transparent;color:", euiTheme.colors.text, ";border:", euiTheme.border.thick, ";;label:incomplete;"),
|
|
44
45
|
disabled: /*#__PURE__*/css(euiButtonFillColor(euiThemeContext, 'disabled'), ";;label:disabled;"),
|
|
@@ -66,6 +67,7 @@ export var euiStepNumberContentStyles = function euiStepNumberContentStyles(_ref
|
|
|
66
67
|
incomplete: /*#__PURE__*/css("display:unset;position:relative;inset-block-start:-", euiTheme.border.width.thick, ";;label:incomplete;"),
|
|
67
68
|
loading: /*#__PURE__*/css(";label:loading;"),
|
|
68
69
|
disabled: /*#__PURE__*/css(";label:disabled;"),
|
|
69
|
-
current: /*#__PURE__*/css("display:inline-block;transform:translateY(-", euiTheme.border.width.thick, ");;label:current;")
|
|
70
|
+
current: /*#__PURE__*/css("display:inline-block;transform:translateY(-", euiTheme.border.width.thick, ");;label:current;"),
|
|
71
|
+
none: /*#__PURE__*/css(logicalSizeCSS(euiTheme.size.s), ";label:none;")
|
|
70
72
|
};
|
|
71
73
|
};
|
|
@@ -62,7 +62,9 @@ EuiSteps.propTypes = {
|
|
|
62
62
|
*/
|
|
63
63
|
headingElement: PropTypes.string,
|
|
64
64
|
/**
|
|
65
|
-
* Title sizing equivalent to EuiTitle
|
|
65
|
+
* Title sizing equivalent to **EuiTitle**, but only `m`, `s`, `xs` font sizes.
|
|
66
|
+
* The `xxs` size reduces the size of the accompanying step indicator, but not the title itself.
|
|
67
|
+
* @default s
|
|
66
68
|
*/
|
|
67
69
|
titleSize: PropTypes.any,
|
|
68
70
|
className: PropTypes.string,
|
|
@@ -16,7 +16,7 @@ import React from 'react';
|
|
|
16
16
|
import { EuiStepHorizontal } from './step_horizontal';
|
|
17
17
|
import { euiStepsHorizontalStyles } from './steps_horizontal.styles';
|
|
18
18
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
19
|
-
export var SIZES = ['s', 'm'];
|
|
19
|
+
export var SIZES = ['xs', 's', 'm'];
|
|
20
20
|
export var EuiStepsHorizontal = function EuiStepsHorizontal(_ref) {
|
|
21
21
|
var className = _ref.className,
|
|
22
22
|
steps = _ref.steps,
|