@elastic/eui 75.0.0 → 75.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eui_theme_dark.css +0 -323
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -323
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/code/code_block.js +5 -3
- package/es/components/code/code_block_annotations.js +94 -0
- package/es/components/code/code_block_annotations.style.js +18 -0
- package/es/components/code/code_block_full_screen.js +9 -3
- package/es/components/code/code_block_line.styles.js +3 -2
- package/es/components/code/utils.js +53 -13
- package/es/components/form/range/range_track.js +1 -1
- package/es/components/icon/assets/app_agent.js +2 -10
- package/es/components/icon/assets/app_fleet.js +10 -2
- package/es/components/steps/step.js +19 -12
- package/es/components/steps/step.styles.js +73 -0
- package/es/components/steps/step_horizontal.js +55 -42
- package/es/components/steps/step_horizontal.styles.js +55 -0
- package/es/components/steps/step_number.js +82 -73
- package/es/components/steps/step_number.styles.js +76 -0
- package/es/components/steps/steps_horizontal.js +11 -7
- package/es/components/steps/steps_horizontal.styles.js +35 -0
- package/es/components/steps/sub_steps.js +7 -1
- package/es/components/steps/sub_steps.styles.js +14 -0
- package/es/components/tour/tour_step_indicator.js +0 -3
- package/es/global_styling/utility/animations.js +4 -3
- package/eui.d.ts +115 -4
- package/i18ntokens.json +26 -10
- package/lib/components/code/code_block.js +5 -3
- package/lib/components/code/code_block_annotations.js +113 -0
- package/lib/components/code/code_block_annotations.style.js +29 -0
- package/lib/components/code/code_block_full_screen.js +9 -3
- package/lib/components/code/code_block_line.styles.js +3 -2
- package/lib/components/code/utils.js +54 -13
- package/lib/components/form/range/range_track.js +1 -1
- package/lib/components/icon/assets/app_agent.js +2 -10
- package/lib/components/icon/assets/app_fleet.js +10 -2
- package/lib/components/icon/svgs/app_agent.svg +2 -4
- package/lib/components/icon/svgs/app_fleet.svg +4 -2
- package/lib/components/steps/step.js +21 -12
- package/lib/components/steps/step.styles.js +93 -0
- package/lib/components/steps/step_horizontal.js +56 -41
- package/lib/components/steps/step_horizontal.styles.js +66 -0
- package/lib/components/steps/step_number.js +86 -75
- package/lib/components/steps/step_number.styles.js +84 -0
- package/lib/components/steps/steps_horizontal.js +12 -7
- package/lib/components/steps/steps_horizontal.styles.js +38 -0
- package/lib/components/steps/sub_steps.js +9 -1
- package/lib/components/steps/sub_steps.styles.js +24 -0
- package/lib/components/tour/tour_step_indicator.js +0 -3
- package/lib/global_styling/utility/animations.js +6 -4
- package/optimize/es/components/code/code_block_annotations.js +79 -0
- package/optimize/es/components/code/code_block_annotations.style.js +18 -0
- package/optimize/es/components/code/code_block_full_screen.js +9 -3
- package/optimize/es/components/code/code_block_line.styles.js +3 -2
- package/optimize/es/components/code/utils.js +53 -13
- package/optimize/es/components/form/range/range_track.js +1 -1
- package/optimize/es/components/icon/assets/app_agent.js +2 -10
- package/optimize/es/components/icon/assets/app_fleet.js +10 -2
- package/optimize/es/components/steps/step.js +19 -12
- package/optimize/es/components/steps/step.styles.js +73 -0
- package/optimize/es/components/steps/step_horizontal.js +54 -41
- package/optimize/es/components/steps/step_horizontal.styles.js +55 -0
- package/optimize/es/components/steps/step_number.js +82 -73
- package/optimize/es/components/steps/step_number.styles.js +76 -0
- package/optimize/es/components/steps/steps_horizontal.js +11 -7
- package/optimize/es/components/steps/steps_horizontal.styles.js +35 -0
- package/optimize/es/components/steps/sub_steps.js +7 -1
- package/optimize/es/components/steps/sub_steps.styles.js +14 -0
- package/optimize/es/components/tour/tour_step_indicator.js +0 -3
- package/optimize/es/global_styling/utility/animations.js +4 -3
- package/optimize/lib/components/code/code_block_annotations.js +105 -0
- package/optimize/lib/components/code/code_block_annotations.style.js +29 -0
- package/optimize/lib/components/code/code_block_full_screen.js +9 -3
- package/optimize/lib/components/code/code_block_line.styles.js +3 -2
- package/optimize/lib/components/code/utils.js +54 -13
- package/optimize/lib/components/form/range/range_track.js +1 -1
- package/optimize/lib/components/icon/assets/app_agent.js +2 -10
- package/optimize/lib/components/icon/assets/app_fleet.js +10 -2
- package/optimize/lib/components/icon/svgs/app_agent.svg +2 -4
- package/optimize/lib/components/icon/svgs/app_fleet.svg +4 -2
- package/optimize/lib/components/steps/step.js +21 -12
- package/optimize/lib/components/steps/step.styles.js +93 -0
- package/optimize/lib/components/steps/step_horizontal.js +55 -40
- package/optimize/lib/components/steps/step_horizontal.styles.js +66 -0
- package/optimize/lib/components/steps/step_number.js +86 -75
- package/optimize/lib/components/steps/step_number.styles.js +84 -0
- package/optimize/lib/components/steps/steps_horizontal.js +12 -7
- package/optimize/lib/components/steps/steps_horizontal.styles.js +38 -0
- package/optimize/lib/components/steps/sub_steps.js +9 -1
- package/optimize/lib/components/steps/sub_steps.styles.js +24 -0
- package/optimize/lib/components/tour/tour_step_indicator.js +0 -3
- package/optimize/lib/global_styling/utility/animations.js +6 -4
- package/package.json +2 -2
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/code/code_block_annotations.js +110 -0
- package/test-env/components/code/code_block_annotations.style.js +29 -0
- package/test-env/components/code/code_block_full_screen.js +9 -3
- package/test-env/components/code/code_block_line.styles.js +3 -2
- package/test-env/components/code/utils.js +54 -13
- package/test-env/components/form/range/range_track.js +1 -1
- package/test-env/components/icon/assets/app_agent.js +2 -10
- package/test-env/components/icon/assets/app_fleet.js +10 -2
- package/test-env/components/steps/step.js +21 -12
- package/test-env/components/steps/step.styles.js +93 -0
- package/test-env/components/steps/step_horizontal.js +56 -41
- package/test-env/components/steps/step_horizontal.styles.js +66 -0
- package/test-env/components/steps/step_number.js +86 -75
- package/test-env/components/steps/step_number.styles.js +84 -0
- package/test-env/components/steps/steps_horizontal.js +12 -7
- package/test-env/components/steps/steps_horizontal.styles.js +38 -0
- package/test-env/components/steps/sub_steps.js +9 -1
- package/test-env/components/steps/sub_steps.styles.js +24 -0
- package/test-env/components/tour/tour_step_indicator.js +0 -3
- package/test-env/global_styling/utility/animations.js +6 -4
- package/src/components/steps/_index.scss +0 -7
- package/src/components/steps/_mixins.scss +0 -12
- package/src/components/steps/_step_number.scss +0 -52
- package/src/components/steps/_steps.scss +0 -57
- package/src/components/steps/_steps_horizontal.scss +0 -135
- package/src/components/steps/_sub_steps.scss +0 -15
- package/src/components/steps/_variables.scss +0 -11
- package/src/themes/amsterdam/global_styling/variables/_steps.scss +0 -8
- package/src/themes/amsterdam/overrides/_steps.scss +0 -101
package/i18ntokens.json
CHANGED
|
@@ -303,6 +303,22 @@
|
|
|
303
303
|
},
|
|
304
304
|
"filepath": "src/components/card/card_select/card_select.tsx"
|
|
305
305
|
},
|
|
306
|
+
{
|
|
307
|
+
"token": "euiCodeBlockAnnotations.ariaLabel",
|
|
308
|
+
"defString": "Click to view a code annotation for line {lineNumber}",
|
|
309
|
+
"highlighting": "string",
|
|
310
|
+
"loc": {
|
|
311
|
+
"start": {
|
|
312
|
+
"line": 26,
|
|
313
|
+
"column": 20
|
|
314
|
+
},
|
|
315
|
+
"end": {
|
|
316
|
+
"line": 30,
|
|
317
|
+
"column": 3
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"filepath": "src/components/code/code_block_annotations.tsx"
|
|
321
|
+
},
|
|
306
322
|
{
|
|
307
323
|
"token": "euiCodeBlockCopy.copy",
|
|
308
324
|
"defString": "Copy",
|
|
@@ -325,11 +341,11 @@
|
|
|
325
341
|
"highlighting": "string",
|
|
326
342
|
"loc": {
|
|
327
343
|
"start": {
|
|
328
|
-
"line":
|
|
344
|
+
"line": 54,
|
|
329
345
|
"column": 49
|
|
330
346
|
},
|
|
331
347
|
"end": {
|
|
332
|
-
"line":
|
|
348
|
+
"line": 60,
|
|
333
349
|
"column": 3
|
|
334
350
|
}
|
|
335
351
|
},
|
|
@@ -341,11 +357,11 @@
|
|
|
341
357
|
"highlighting": "string",
|
|
342
358
|
"loc": {
|
|
343
359
|
"start": {
|
|
344
|
-
"line":
|
|
360
|
+
"line": 54,
|
|
345
361
|
"column": 49
|
|
346
362
|
},
|
|
347
363
|
"end": {
|
|
348
|
-
"line":
|
|
364
|
+
"line": 60,
|
|
349
365
|
"column": 3
|
|
350
366
|
}
|
|
351
367
|
},
|
|
@@ -6101,11 +6117,11 @@
|
|
|
6101
6117
|
"highlighting": "string",
|
|
6102
6118
|
"loc": {
|
|
6103
6119
|
"start": {
|
|
6104
|
-
"line":
|
|
6120
|
+
"line": 51,
|
|
6105
6121
|
"column": 6
|
|
6106
6122
|
},
|
|
6107
6123
|
"end": {
|
|
6108
|
-
"line":
|
|
6124
|
+
"line": 51,
|
|
6109
6125
|
"column": 74
|
|
6110
6126
|
}
|
|
6111
6127
|
},
|
|
@@ -6117,11 +6133,11 @@
|
|
|
6117
6133
|
"highlighting": "string",
|
|
6118
6134
|
"loc": {
|
|
6119
6135
|
"start": {
|
|
6120
|
-
"line":
|
|
6136
|
+
"line": 59,
|
|
6121
6137
|
"column": 6
|
|
6122
6138
|
},
|
|
6123
6139
|
"end": {
|
|
6124
|
-
"line":
|
|
6140
|
+
"line": 59,
|
|
6125
6141
|
"column": 78
|
|
6126
6142
|
}
|
|
6127
6143
|
},
|
|
@@ -6133,11 +6149,11 @@
|
|
|
6133
6149
|
"highlighting": "string",
|
|
6134
6150
|
"loc": {
|
|
6135
6151
|
"start": {
|
|
6136
|
-
"line":
|
|
6152
|
+
"line": 68,
|
|
6137
6153
|
"column": 4
|
|
6138
6154
|
},
|
|
6139
6155
|
"end": {
|
|
6140
|
-
"line":
|
|
6156
|
+
"line": 72,
|
|
6141
6157
|
"column": 5
|
|
6142
6158
|
}
|
|
6143
6159
|
},
|
|
@@ -242,12 +242,14 @@ EuiCodeBlock.propTypes = {
|
|
|
242
242
|
|
|
243
243
|
/**
|
|
244
244
|
* Displays line numbers.
|
|
245
|
-
* Optionally accepts a configuration object for setting the starting number
|
|
246
|
-
*
|
|
245
|
+
* Optionally accepts a configuration object for setting the starting number,
|
|
246
|
+
* visually highlighting ranges, or annotating specific lines:
|
|
247
|
+
* `{ start: 100, highlight: '1, 5-10, 20-30, 40', annotations: { 6: 'A special note about this line' } }`
|
|
247
248
|
*/
|
|
248
249
|
lineNumbers: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.shape({
|
|
249
250
|
start: _propTypes.default.number,
|
|
250
|
-
highlight: _propTypes.default.string
|
|
251
|
+
highlight: _propTypes.default.string,
|
|
252
|
+
annotations: _propTypes.default.any
|
|
251
253
|
}).isRequired]),
|
|
252
254
|
|
|
253
255
|
/**
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.EuiCodeBlockAnnotation = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
+
|
|
14
|
+
var _services = require("../../services");
|
|
15
|
+
|
|
16
|
+
var _i18n = require("../i18n");
|
|
17
|
+
|
|
18
|
+
var _popover = require("../popover");
|
|
19
|
+
|
|
20
|
+
var _icon = require("../icon");
|
|
21
|
+
|
|
22
|
+
var _button = require("../../themes/amsterdam/global_styling/mixins/button");
|
|
23
|
+
|
|
24
|
+
var _code_block_annotations = require("./code_block_annotations.style");
|
|
25
|
+
|
|
26
|
+
var _react2 = require("@emotion/react");
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
|
+
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39
|
+
|
|
40
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
41
|
+
|
|
42
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
43
|
+
|
|
44
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
var EuiCodeBlockAnnotation = function EuiCodeBlockAnnotation(_ref) {
|
|
49
|
+
var lineNumber = _ref.lineNumber,
|
|
50
|
+
children = _ref.children;
|
|
51
|
+
|
|
52
|
+
var _useState = (0, _react.useState)(false),
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
isOpen = _useState2[0],
|
|
55
|
+
setIsOpen = _useState2[1];
|
|
56
|
+
|
|
57
|
+
var ariaLabel = (0, _i18n.useEuiI18n)('euiCodeBlockAnnotations.ariaLabel', 'Click to view a code annotation for line {lineNumber}', {
|
|
58
|
+
lineNumber: lineNumber
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
var _useEuiTheme = (0, _services.useEuiTheme)(),
|
|
62
|
+
euiTheme = _useEuiTheme.euiTheme,
|
|
63
|
+
colorMode = _useEuiTheme.colorMode;
|
|
64
|
+
|
|
65
|
+
var styles = (0, _code_block_annotations.euiCodeBlockAnnotationsStyles)(euiTheme);
|
|
66
|
+
var buttonIconFocusStyle = (0, _button.useEuiButtonFocusCSS)();
|
|
67
|
+
var cssButtonIconStyles = [styles.euiCodeBlockAnnotation__buttonIcon, buttonIconFocusStyle];
|
|
68
|
+
var isDarkMode = colorMode === 'DARK';
|
|
69
|
+
return (0, _react2.jsx)(_popover.EuiPopover, {
|
|
70
|
+
isOpen: isOpen,
|
|
71
|
+
closePopover: function closePopover() {
|
|
72
|
+
return setIsOpen(false);
|
|
73
|
+
},
|
|
74
|
+
button: (0, _react2.jsx)("button", {
|
|
75
|
+
onClick: function onClick() {
|
|
76
|
+
return setIsOpen(!isOpen);
|
|
77
|
+
},
|
|
78
|
+
"aria-label": ariaLabel,
|
|
79
|
+
css: cssButtonIconStyles,
|
|
80
|
+
"data-test-subj": "euiCodeBlockAnnotationIcon"
|
|
81
|
+
}, (0, _react2.jsx)(_icon.EuiIcon, {
|
|
82
|
+
type: AnnotationInfoIcon,
|
|
83
|
+
size: "s",
|
|
84
|
+
color: isDarkMode ? euiTheme.colors.ink : 'ghost'
|
|
85
|
+
})),
|
|
86
|
+
css: styles.euiCodeBlockAnnotation,
|
|
87
|
+
zIndex: Number(euiTheme.levels.mask) + 1 // Ensure fullscreen annotation popovers sit above the mask
|
|
88
|
+
,
|
|
89
|
+
anchorPosition: "leftCenter",
|
|
90
|
+
panelProps: {
|
|
91
|
+
'data-test-subj': 'euiCodeBlockAnnotationPopover'
|
|
92
|
+
}
|
|
93
|
+
}, children);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
exports.EuiCodeBlockAnnotation = EuiCodeBlockAnnotation;
|
|
97
|
+
EuiCodeBlockAnnotation.propTypes = {
|
|
98
|
+
lineNumber: _propTypes.default.number.isRequired
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
var AnnotationInfoIcon = function AnnotationInfoIcon(props) {
|
|
102
|
+
return (0, _react2.jsx)("svg", _extends({
|
|
103
|
+
width: 11,
|
|
104
|
+
height: 11,
|
|
105
|
+
viewBox: "0 0 16 16",
|
|
106
|
+
fill: "none",
|
|
107
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
108
|
+
}, props), (0, _react2.jsx)("path", {
|
|
109
|
+
fillRule: "evenodd",
|
|
110
|
+
clipRule: "evenodd",
|
|
111
|
+
d: "M7.139 14l-.052-6.007H5V6.28h4.111l.052 6.007h1.915V14h-3.94zM6.712 3.38c0-.396.118-.725.354-.987S7.639 2 8.077 2c.438 0 .777.131 1.016.393.24.262.359.591.359.987 0 .39-.12.714-.359.972s-.578.388-1.016.388c-.438 0-.775-.13-1.011-.388-.236-.258-.354-.582-.354-.972z"
|
|
112
|
+
}));
|
|
113
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiCodeBlockAnnotationsStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiCodeBlockAnnotationsStyles = function euiCodeBlockAnnotationsStyles(euiTheme) {
|
|
20
|
+
var buttonIconSize = (0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
21
|
+
return x - 1.5;
|
|
22
|
+
});
|
|
23
|
+
return {
|
|
24
|
+
euiCodeBlockAnnotation: /*#__PURE__*/(0, _react.css)("position:absolute;", (0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.logicalCSS)('top', '50%'), " transform:translate(50%, -50%);line-height:1;;label:euiCodeBlockAnnotation;"),
|
|
25
|
+
euiCodeBlockAnnotation__buttonIcon: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)(buttonIconSize), " display:flex;align-items:center;justify-content:center;background-color:", euiTheme.colors.primary, ";border-radius:50%;;label:euiCodeBlockAnnotation__buttonIcon;")
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
exports.euiCodeBlockAnnotationsStyles = euiCodeBlockAnnotationsStyles;
|
|
@@ -58,9 +58,15 @@ var useFullScreen = function useFullScreen(_ref) {
|
|
|
58
58
|
}, []);
|
|
59
59
|
var onKeyDown = (0, _react.useCallback)(function (event) {
|
|
60
60
|
if (event.key === _services.keys.ESCAPE) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
// We need to make sure annotation Escape keypresses don't also cause fullscreen mode to close
|
|
62
|
+
var focus = document.activeElement;
|
|
63
|
+
var isAnnotationPopover = !!(focus !== null && focus !== void 0 && focus.dataset.popoverOpen) || !!(focus !== null && focus !== void 0 && focus.closest('[data-popover-open]'));
|
|
64
|
+
|
|
65
|
+
if (!isAnnotationPopover) {
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
event.stopPropagation();
|
|
68
|
+
setIsFullScreen(false);
|
|
69
|
+
}
|
|
64
70
|
}
|
|
65
71
|
}, []);
|
|
66
72
|
|
|
@@ -33,11 +33,12 @@ var euiCodeBlockLineStyles = function euiCodeBlockLineStyles(euiThemeContext) {
|
|
|
33
33
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
34
34
|
}),
|
|
35
35
|
lineText: {
|
|
36
|
-
euiCodeBlock__lineText: /*#__PURE__*/(0, _css.css)("flex-grow:1;display:inline-block;padding-inline-start:", euiTheme.size.
|
|
36
|
+
euiCodeBlock__lineText: /*#__PURE__*/(0, _css.css)("flex-grow:1;display:inline-block;padding-inline-start:", euiTheme.size.m, ";border-inline-start:", euiTheme.border.thin, ";user-select:text;;label:euiCodeBlock__lineText;"),
|
|
37
37
|
isHighlighted: /*#__PURE__*/(0, _css.css)("background:", (0, _global_styling.euiBackgroundColor)(euiThemeContext, 'primary'), ";border-inline-start:", euiTheme.border.width.thick, " solid ", euiTheme.colors.primary, ";;label:isHighlighted;")
|
|
38
38
|
},
|
|
39
39
|
lineNumber: {
|
|
40
|
-
|
|
40
|
+
euiCodeBlock__lineNumberWrapper: /*#__PURE__*/(0, _css.css)("position:relative;flex-grow:0;flex-shrink:0;user-select:none;padding-inline-end:", euiTheme.size.m, ";box-sizing:content-box;;label:euiCodeBlock__lineNumberWrapper;"),
|
|
41
|
+
euiCodeBlock__lineNumber: /*#__PURE__*/(0, _css.css)("color:", euiTheme.colors.subduedText, ";text-align:end;display:block;;label:euiCodeBlock__lineNumber;")
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
44
|
};
|
|
@@ -13,6 +13,8 @@ var _refractor = require("refractor");
|
|
|
13
13
|
|
|
14
14
|
var _css = require("@emotion/css");
|
|
15
15
|
|
|
16
|
+
var _code_block_annotations = require("./code_block_annotations");
|
|
17
|
+
|
|
16
18
|
var _code_block_line = require("./code_block_line.styles");
|
|
17
19
|
|
|
18
20
|
var _react2 = require("@emotion/react");
|
|
@@ -66,7 +68,15 @@ var nodeToHtml = function nodeToHtml(node, idx, nodes) {
|
|
|
66
68
|
key: key,
|
|
67
69
|
className: (0, _css.cx)(properties.className)
|
|
68
70
|
}), children && children.map(function (el, i) {
|
|
69
|
-
return
|
|
71
|
+
return (// @ts-ignore - using a custom type here to handle JSX annotations
|
|
72
|
+
el.type === 'annotation' ? // @ts-ignore - custom keys are passed by annotationElement below
|
|
73
|
+
(0, _react2.jsx)(_code_block_annotations.EuiCodeBlockAnnotation, {
|
|
74
|
+
lineNumber: el.lineNumber,
|
|
75
|
+
children: el.annotation,
|
|
76
|
+
key: i
|
|
77
|
+
}) // prettier-ignore
|
|
78
|
+
: nodeToHtml(el, i, nodes, depth + 1)
|
|
79
|
+
);
|
|
70
80
|
}));
|
|
71
81
|
}
|
|
72
82
|
|
|
@@ -174,31 +184,61 @@ function wrapLines(nodes, options, euiTheme) {
|
|
|
174
184
|
var lineStyles = (0, _css.cx)([styles.euiCodeBlock__line, options.showLineNumbers && styles.hasLineNumbers]);
|
|
175
185
|
|
|
176
186
|
if (options.showLineNumbers) {
|
|
177
|
-
var _properties;
|
|
187
|
+
var _properties, _options$annotations;
|
|
178
188
|
|
|
179
189
|
var lineNumber = i + 1;
|
|
180
190
|
var digits = grouped.length.toString().length;
|
|
181
|
-
var width = digits * CHAR_SIZE;
|
|
191
|
+
var width = digits * CHAR_SIZE; // Line text element and highlights
|
|
192
|
+
|
|
182
193
|
var highlights = options.highlight ? parseLineRanges(options.highlight) : [];
|
|
183
194
|
var lineTextStyles = (0, _css.cx)([styles.lineText.euiCodeBlock__lineText, highlights.includes(lineNumber) && styles.lineText.isHighlighted]);
|
|
184
|
-
var
|
|
185
|
-
|
|
195
|
+
var lineTextElement = {
|
|
196
|
+
type: 'element',
|
|
197
|
+
tagName: 'span',
|
|
198
|
+
properties: {
|
|
199
|
+
className: ['euiCodeBlock__lineText', lineTextStyles]
|
|
200
|
+
},
|
|
201
|
+
children: node
|
|
202
|
+
}; // Line number column/wrapper
|
|
203
|
+
|
|
204
|
+
var lineNumberWrapperStyles = (0, _css.cx)(styles.lineNumber.euiCodeBlock__lineNumberWrapper);
|
|
205
|
+
var lineNumberWrapperElement = {
|
|
186
206
|
type: 'element',
|
|
187
207
|
tagName: 'span',
|
|
188
208
|
properties: (_properties = {
|
|
189
209
|
style: {
|
|
190
210
|
inlineSize: width
|
|
191
211
|
}
|
|
192
|
-
}, _defineProperty(_properties, 'data-line-number', lineNumber), _defineProperty(_properties,
|
|
212
|
+
}, _defineProperty(_properties, 'data-line-number', lineNumber), _defineProperty(_properties, "className", ['euiCodeBlock__lineNumber', lineNumberWrapperStyles]), _properties),
|
|
193
213
|
children: []
|
|
194
|
-
}
|
|
214
|
+
}; // Line number element
|
|
215
|
+
|
|
216
|
+
var lineNumberStyles = (0, _css.cx)(styles.lineNumber.euiCodeBlock__lineNumber);
|
|
217
|
+
var lineNumberElement = {
|
|
195
218
|
type: 'element',
|
|
196
219
|
tagName: 'span',
|
|
197
|
-
properties: {
|
|
198
|
-
className: [
|
|
199
|
-
},
|
|
200
|
-
children:
|
|
201
|
-
|
|
220
|
+
properties: _defineProperty({
|
|
221
|
+
className: [lineNumberStyles]
|
|
222
|
+
}, 'aria-hidden', true),
|
|
223
|
+
children: [{
|
|
224
|
+
type: 'text',
|
|
225
|
+
value: String(lineNumber)
|
|
226
|
+
}]
|
|
227
|
+
};
|
|
228
|
+
lineNumberWrapperElement.children.push(lineNumberElement); // Annotation element
|
|
229
|
+
|
|
230
|
+
var hasAnnotation = (_options$annotations = options.annotations) === null || _options$annotations === void 0 ? void 0 : _options$annotations.hasOwnProperty(lineNumber);
|
|
231
|
+
|
|
232
|
+
if (hasAnnotation) {
|
|
233
|
+
var annotationElement = {
|
|
234
|
+
type: 'annotation',
|
|
235
|
+
annotation: options.annotations[lineNumber],
|
|
236
|
+
lineNumber: lineNumber
|
|
237
|
+
};
|
|
238
|
+
lineNumberWrapperElement.children.push(annotationElement);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
children = [lineNumberWrapperElement, lineTextElement];
|
|
202
242
|
}
|
|
203
243
|
|
|
204
244
|
wrapped.push({
|
|
@@ -218,7 +258,8 @@ var highlightByLine = function highlightByLine(children, language, data, euiThem
|
|
|
218
258
|
lineNumber: data.start
|
|
219
259
|
}), {
|
|
220
260
|
showLineNumbers: data.show,
|
|
221
|
-
highlight: data.highlight
|
|
261
|
+
highlight: data.highlight,
|
|
262
|
+
annotations: data.annotations
|
|
222
263
|
}, euiTheme);
|
|
223
264
|
};
|
|
224
265
|
|
|
@@ -118,7 +118,7 @@ var EuiRangeTrack = function EuiRangeTrack(_ref) {
|
|
|
118
118
|
}, [showTicks, ticks, min, max, tickInterval, step]);
|
|
119
119
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
120
120
|
var styles = (0, _range_track.euiRangeTrackStyles)(euiTheme);
|
|
121
|
-
var cssStyles = [styles.euiRangeTrack, disabled && styles.disabled, levels && !!levels.length && styles.hasLevels, (tickSequence || ticks) && styles.hasTicks];
|
|
121
|
+
var cssStyles = [styles.euiRangeTrack, disabled && styles.disabled, levels && !!levels.length && styles.hasLevels, showTicks && (tickSequence || ticks) && styles.hasTicks];
|
|
122
122
|
|
|
123
123
|
var _useState = (0, _react.useState)(0),
|
|
124
124
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -37,18 +37,10 @@ var EuiIconAppAgent = function EuiIconAppAgent(_ref) {
|
|
|
37
37
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
38
38
|
id: titleId
|
|
39
39
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
40
|
-
|
|
41
|
-
d: "M21 2.82L16 .038 11 2.82v2.289l5-2.782 5 2.782v-2.29z"
|
|
42
|
-
}), (0, _react2.jsx)("path", {
|
|
43
|
-
className: "euiIcon__fillSecondary",
|
|
44
|
-
d: "M21 7.282L16 4.5l-5 2.782V9.57l5-2.781 5 2.781V7.282z"
|
|
45
|
-
}), (0, _react2.jsx)("path", {
|
|
46
|
-
d: "M7 5.045L2 7.827v15.577l14 7.788 14-7.788V7.827l-5-2.782v2.289l3 1.669v13.225l-12 6.676-12-6.676V9.003l3-1.669V5.045z"
|
|
40
|
+
d: "M2.996 18.636L0 20.434v6.132l6 3.6 5-3 5 3 5-3 5 3 6-3.6v-6.132l-5-3v-5l-5-3v-5l-6-3.6-6 3.6v2.832l2 .033V5.566l4-2.4 4 2.4v3.868l-1.996 1.197 1 1.733L21 11.166l4 2.4v3.868l-4 2.4-2.257-1.354-.971 1.75L20 21.565v3.868l-4 2.4-4-2.4v-1.7l-2-.033v1.733l-4 2.4-4-2.4v-3.868l1.996-1.197-1-1.733zM22 25.434v-3.868l4-2.4 4 2.4v3.868l-4 2.4-4-2.4z"
|
|
47
41
|
}), (0, _react2.jsx)("path", {
|
|
48
42
|
className: "euiIcon__fillSecondary",
|
|
49
|
-
|
|
50
|
-
clipRule: "evenodd",
|
|
51
|
-
d: "M22 12.5L16 9l-6 3.5v7l6 3.5 6-3.5v-7zm-9.974 1.205L16 11.387l3.974 2.318v4.59L16 20.613l-3.974-2.318v-4.59z"
|
|
43
|
+
d: "M11 22.166l-6-3.6v-6.132l6-3.6 6 3.6v6.132l-6 3.6zm4-4.732v-3.868l-4-2.4-4 2.4v3.868l4 2.4 4-2.4z"
|
|
52
44
|
}));
|
|
53
45
|
};
|
|
54
46
|
|
|
@@ -37,10 +37,18 @@ var EuiIconAppFleet = function EuiIconAppFleet(_ref) {
|
|
|
37
37
|
}, props), title ? (0, _react2.jsx)("title", {
|
|
38
38
|
id: titleId
|
|
39
39
|
}, title) : null, (0, _react2.jsx)("path", {
|
|
40
|
-
|
|
40
|
+
className: "euiIcon__fillSecondary",
|
|
41
|
+
d: "M21 2.82L16 .038 11 2.82v2.289l5-2.782 5 2.782v-2.29z"
|
|
42
|
+
}), (0, _react2.jsx)("path", {
|
|
43
|
+
className: "euiIcon__fillSecondary",
|
|
44
|
+
d: "M21 7.282L16 4.5l-5 2.782V9.57l5-2.781 5 2.781V7.282z"
|
|
45
|
+
}), (0, _react2.jsx)("path", {
|
|
46
|
+
d: "M7 5.045L2 7.827v15.577l14 7.788 14-7.788V7.827l-5-2.782v2.289l3 1.669v13.225l-12 6.676-12-6.676V9.003l3-1.669V5.045z"
|
|
41
47
|
}), (0, _react2.jsx)("path", {
|
|
42
48
|
className: "euiIcon__fillSecondary",
|
|
43
|
-
|
|
49
|
+
fillRule: "evenodd",
|
|
50
|
+
clipRule: "evenodd",
|
|
51
|
+
d: "M22 12.5L16 9l-6 3.5v7l6 3.5 6-3.5v-7zm-9.974 1.205L16 11.387l3.974 2.318v4.59L16 20.613l-3.974-2.318v-4.59z"
|
|
44
52
|
}));
|
|
45
53
|
};
|
|
46
54
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path
|
|
3
|
-
<path class="euiIcon__fillSecondary" d="
|
|
4
|
-
<path d="M7 5.04535L2 7.82695V23.4039L16 31.1923L30 23.4039V7.82695L25 5.04536V7.33402L28 9.00297V22.2278L16 28.9037L4 22.2279V9.00297L7 7.33401V5.04535Z" />
|
|
5
|
-
<path class="euiIcon__fillSecondary" fill-rule="evenodd" clip-rule="evenodd" d="M22 12.5L16 9L10 12.5V19.5L16 23L22 19.5V12.5ZM12.026 13.7053L16 11.3871L19.974 13.7053V18.2947L16 20.6129L12.026 18.2947V13.7053Z" />
|
|
2
|
+
<path d="M2.99581 18.6363L0 20.4337V26.5661L6 30.1661L11 27.1661L16 30.1661L21 27.1661L26 30.1661L32 26.5661V20.4337L27 17.4337V12.4337L22 9.43374V4.43374L16 0.83374L10 4.43374V7.26581L12 7.29946V5.56612L16 3.16612L20 5.56612V9.43374L18.0041 10.6313L19.0042 12.3636L21 11.1661L25 13.5661V17.4337L21 19.8337L18.7433 18.4797L17.772 20.2293L20 21.5661V25.4337L16 27.8337L12 25.4337V23.7342L10 23.7006V25.4337L6 27.8337L2 25.4337L2 21.5661L3.99595 20.3686L2.99581 18.6363ZM22 25.4337V21.5661L26 19.1661L30 21.5661V25.4337L26 27.8337L22 25.4337Z" />
|
|
3
|
+
<path class="euiIcon__fillSecondary" d="M11 22.1662L5 18.5662L5 12.4338L11 8.83382L17 12.4338L17 18.5662L11 22.1662ZM15 17.4338L15 13.5662L11 11.1662L7 13.5662L7 17.4338L11 19.8338L15 17.4338Z" />
|
|
6
4
|
</svg>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="
|
|
3
|
-
<path class="euiIcon__fillSecondary" d="
|
|
2
|
+
<path class="euiIcon__fillSecondary" d="M21 2.81994L16 0.0383301L11 2.81991V5.10857L16 2.32699L21 5.1086V2.81994Z" />
|
|
3
|
+
<path class="euiIcon__fillSecondary" d="M21 7.28161L16 4.5L11 7.28158V9.57024L16 6.78866L21 9.57027V7.28161Z" />
|
|
4
|
+
<path d="M7 5.04535L2 7.82695V23.4039L16 31.1923L30 23.4039V7.82695L25 5.04536V7.33402L28 9.00297V22.2278L16 28.9037L4 22.2279V9.00297L7 7.33401V5.04535Z" />
|
|
5
|
+
<path class="euiIcon__fillSecondary" fill-rule="evenodd" clip-rule="evenodd" d="M22 12.5L16 9L10 12.5V19.5L16 23L22 19.5V12.5ZM12.026 13.7053L16 11.3871L19.974 13.7053V18.2947L16 20.6129L12.026 18.2947V13.7053Z" />
|
|
4
6
|
</svg>
|
|
@@ -17,6 +17,10 @@ var _title = require("../title");
|
|
|
17
17
|
|
|
18
18
|
var _step_number = require("./step_number");
|
|
19
19
|
|
|
20
|
+
var _services = require("../../services");
|
|
21
|
+
|
|
22
|
+
var _step = require("./step.styles");
|
|
23
|
+
|
|
20
24
|
var _react2 = require("@emotion/react");
|
|
21
25
|
|
|
22
26
|
var _excluded = ["className", "children", "headingElement", "step", "title", "titleSize", "status"];
|
|
@@ -46,27 +50,32 @@ var EuiStep = function EuiStep(_ref) {
|
|
|
46
50
|
status = _ref.status,
|
|
47
51
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
48
52
|
|
|
49
|
-
var classes = (0, _classnames.default)('euiStep',
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
var classes = (0, _classnames.default)('euiStep', className);
|
|
54
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
55
|
+
var styles = (0, _step.euiStepStyles)(euiTheme);
|
|
56
|
+
var cssStyles = [styles.euiStep, styles[titleSize]];
|
|
57
|
+
var contentStyles = (0, _step.euiStepContentStyles)(euiTheme);
|
|
58
|
+
var cssContentStyles = [contentStyles.euiStep__content, contentStyles[titleSize]];
|
|
59
|
+
var titleStyles = (0, _step.euiStepTitleStyles)(euiTheme);
|
|
60
|
+
var cssStepTitleStyles = [titleStyles.euiStep__title, status === 'disabled' && titleStyles.isDisabled, titleStyles[titleSize]];
|
|
61
|
+
var cssTitleWrapperStyles = titleStyles.euiStep__titleWrapper;
|
|
56
62
|
return (0, _react2.jsx)("div", _extends({
|
|
57
|
-
className: classes
|
|
63
|
+
className: classes,
|
|
64
|
+
css: cssStyles
|
|
58
65
|
}, rest), (0, _react2.jsx)("div", {
|
|
59
|
-
className: "euiStep__titleWrapper"
|
|
66
|
+
className: "euiStep__titleWrapper",
|
|
67
|
+
css: cssTitleWrapperStyles
|
|
60
68
|
}, (0, _react2.jsx)(_step_number.EuiStepNumber, {
|
|
61
|
-
className: numberClasses,
|
|
62
69
|
number: step,
|
|
63
70
|
status: status,
|
|
64
71
|
titleSize: titleSize
|
|
65
72
|
}), (0, _react2.jsx)(_title.EuiTitle, {
|
|
66
73
|
size: titleSize,
|
|
67
|
-
className: "euiStep__title"
|
|
74
|
+
className: "euiStep__title",
|
|
75
|
+
css: cssStepTitleStyles
|
|
68
76
|
}, /*#__PURE__*/(0, _react.createElement)(headingElement, null, title))), (0, _react2.jsx)("div", {
|
|
69
|
-
className: "euiStep__content"
|
|
77
|
+
className: "euiStep__content",
|
|
78
|
+
css: cssContentStyles
|
|
70
79
|
}, children));
|
|
71
80
|
};
|
|
72
81
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiStepVariables = exports.euiStepTitleStyles = exports.euiStepStyles = exports.euiStepContentStyles = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
10
|
+
var _global_styling = require("../../global_styling");
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
15
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
16
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
17
|
+
* Side Public License, v 1.
|
|
18
|
+
*/
|
|
19
|
+
var euiStepVariables = function euiStepVariables(euiTheme) {
|
|
20
|
+
return {
|
|
21
|
+
numberSize: euiTheme.size.xl,
|
|
22
|
+
numberXSSize: euiTheme.size.l,
|
|
23
|
+
numberMargin: euiTheme.size.base
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.euiStepVariables = euiStepVariables;
|
|
28
|
+
|
|
29
|
+
var euiStepStyles = function euiStepStyles(euiThemeContext) {
|
|
30
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
31
|
+
var euiStep = euiStepVariables(euiTheme); // the vertical line is centered on the number, so we need to offset the line
|
|
32
|
+
// by half of the number size & half of the line size to center it
|
|
33
|
+
|
|
34
|
+
var lineStartPosition = (0, _global_styling.mathWithUnits)([euiStep.numberSize, euiTheme.border.width.thick], function (x, y) {
|
|
35
|
+
return x / 2 - y / 2;
|
|
36
|
+
});
|
|
37
|
+
var lineEndPosition = (0, _global_styling.mathWithUnits)([euiStep.numberSize, euiTheme.border.width.thick], function (x, y) {
|
|
38
|
+
return x / 2 + y / 2;
|
|
39
|
+
});
|
|
40
|
+
var lineGradient = "linear-gradient(to right,\n transparent 0,\n transparent ".concat(lineStartPosition, ",\n ").concat(euiTheme.border.color, " ").concat(lineStartPosition, ",\n ").concat(euiTheme.border.color, " ").concat(lineEndPosition, ",\n transparent ").concat(lineEndPosition, ",\n transparent 100%)");
|
|
41
|
+
return {
|
|
42
|
+
euiStep: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-image:", lineGradient, ";background-repeat:no-repeat;};label:euiStep;"),
|
|
43
|
+
// Sizes
|
|
44
|
+
m: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ", euiTheme.size.xl, ";};label:m;"),
|
|
45
|
+
s: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:left ", euiTheme.size.xl, ";};label:s;"),
|
|
46
|
+
xs: /*#__PURE__*/(0, _react.css)("&:not(:last-of-type){background-position:-", euiTheme.size.xs, " ", euiTheme.size.l, ";};label:xs;")
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
exports.euiStepStyles = euiStepStyles;
|
|
51
|
+
|
|
52
|
+
var euiStepContentStyles = function euiStepContentStyles(euiThemeContext) {
|
|
53
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
54
|
+
var euiStep = euiStepVariables(euiTheme);
|
|
55
|
+
var styles = {
|
|
56
|
+
euiStep__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), " ", (0, _global_styling.logicalCSS)('padding-top', euiTheme.size.base), " ", (0, _global_styling.logicalCSS)('padding-bottom', (0, _global_styling.mathWithUnits)([euiTheme.size.xl, euiTheme.size.s], function (x, y) {
|
|
57
|
+
return x + y;
|
|
58
|
+
})), " ", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";;label:euiStep__content;"),
|
|
59
|
+
// Sizes
|
|
60
|
+
m: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-left', (0, _global_styling.mathWithUnits)([euiStep.numberSize, euiStep.numberMargin], function (x, y) {
|
|
61
|
+
return x / 2 + y;
|
|
62
|
+
})), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberSize, function (x) {
|
|
63
|
+
return x / 2;
|
|
64
|
+
})), ";;label:m;"),
|
|
65
|
+
s: /*#__PURE__*/(0, _react.css)(";label:s;"),
|
|
66
|
+
// s is the same as m, so we'll programmatically duplicate it below
|
|
67
|
+
xs: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-left', (0, _global_styling.mathWithUnits)([euiStep.numberXSSize, euiStep.numberMargin], function (x, y) {
|
|
68
|
+
return x / 2 + y;
|
|
69
|
+
})), (0, _global_styling.logicalCSS)('margin-left', (0, _global_styling.mathWithUnits)(euiStep.numberXSSize, function (x) {
|
|
70
|
+
return x / 2;
|
|
71
|
+
})), ";;label:xs;")
|
|
72
|
+
};
|
|
73
|
+
styles.s = styles.m;
|
|
74
|
+
return styles;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
exports.euiStepContentStyles = euiStepContentStyles;
|
|
78
|
+
|
|
79
|
+
var euiStepTitleStyles = function euiStepTitleStyles(euiThemeContext) {
|
|
80
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
81
|
+
var euiStep = euiStepVariables(euiTheme);
|
|
82
|
+
return {
|
|
83
|
+
euiStep__titleWrapper: /*#__PURE__*/(0, _react.css)("display:flex;gap:", euiStep.numberMargin, ";;label:euiStep__titleWrapper;"),
|
|
84
|
+
euiStep__title: /*#__PURE__*/(0, _react.css)(";label:euiStep__title;"),
|
|
85
|
+
isDisabled: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.disabledText, ";;label:isDisabled;"),
|
|
86
|
+
// Sizes
|
|
87
|
+
m: /*#__PURE__*/(0, _react.css)(";label:m;"),
|
|
88
|
+
s: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('padding-top', euiTheme.size.xs), ";;label:s;"),
|
|
89
|
+
xs: /*#__PURE__*/(0, _react.css)(";label:xs;")
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
exports.euiStepTitleStyles = euiStepTitleStyles;
|