@elastic/eui 87.2.0 → 88.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_charts_theme.js +9 -8
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +2 -159
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +2 -159
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/collapsible_nav_beta/collapsible_nav_beta.js +9 -2
- package/es/components/color_picker/color_palette_display/color_palette_display.js +3 -6
- package/es/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -5
- package/es/components/color_picker/color_palette_display/color_palette_display_gradient.js +2 -5
- package/es/components/color_picker/color_palette_picker/color_palette_picker.js +3 -3
- package/es/components/color_picker/color_stops/color_stops.js +11 -0
- package/es/components/control_bar/control_bar.js +11 -0
- package/es/components/datagrid/controls/keyboard_shortcuts.js +1 -1
- package/es/components/description_list/description_list.js +66 -13
- package/es/components/description_list/description_list.styles.js +19 -6
- package/es/components/description_list/description_list_context.js +1 -1
- package/es/components/description_list/description_list_description.js +3 -9
- package/es/components/description_list/description_list_description.styles.js +3 -9
- package/es/components/description_list/description_list_title.js +7 -4
- package/es/components/description_list/description_list_title.styles.js +3 -6
- package/es/components/description_list/description_list_types.js +4 -2
- package/es/components/key_pad_menu/key_pad_menu_item.js +37 -34
- package/es/components/key_pad_menu/key_pad_menu_item.styles.js +41 -0
- package/es/components/markdown_editor/markdown_format.styles.js +3 -6
- package/es/components/notification/notification_event.js +10 -0
- package/es/components/suggest/suggest.js +16 -0
- package/es/components/suggest/suggest_item.js +12 -0
- package/es/components/text/text.styles.js +3 -6
- package/es/global_styling/functions/typography.js +8 -8
- package/es/global_styling/variables/typography.js +1 -1
- package/es/services/color_picker/color_picker.js +4 -0
- package/es/themes/amsterdam/global_styling/variables/_typography.js +1 -0
- package/eui.d.ts +2226 -2104
- package/i18ntokens.json +96 -96
- package/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +9 -2
- package/lib/components/color_picker/color_palette_display/color_palette_display.js +3 -6
- package/lib/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -5
- package/lib/components/color_picker/color_palette_display/color_palette_display_gradient.js +2 -5
- package/lib/components/color_picker/color_palette_picker/color_palette_picker.js +3 -3
- package/lib/components/color_picker/color_stops/color_stops.js +10 -1
- package/lib/components/control_bar/control_bar.js +10 -1
- package/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -1
- package/lib/components/description_list/description_list.js +68 -13
- package/lib/components/description_list/description_list.styles.js +24 -13
- package/lib/components/description_list/description_list_context.js +1 -1
- package/lib/components/description_list/description_list_description.js +2 -8
- package/lib/components/description_list/description_list_description.styles.js +2 -8
- package/lib/components/description_list/description_list_title.js +7 -4
- package/lib/components/description_list/description_list_title.styles.js +2 -5
- package/lib/components/description_list/description_list_types.js +8 -4
- package/lib/components/key_pad_menu/key_pad_menu_item.js +40 -34
- package/lib/components/key_pad_menu/key_pad_menu_item.styles.js +49 -0
- package/lib/components/markdown_editor/markdown_format.styles.js +3 -6
- package/lib/components/notification/notification_event.js +9 -0
- package/lib/components/suggest/suggest.js +16 -0
- package/lib/components/suggest/suggest_item.js +11 -0
- package/lib/components/text/text.styles.js +3 -6
- package/lib/global_styling/functions/typography.js +8 -8
- package/lib/global_styling/variables/typography.js +3 -3
- package/lib/services/color_picker/color_picker.js +4 -0
- package/lib/themes/amsterdam/global_styling/variables/_typography.js +1 -0
- package/optimize/es/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -2
- package/optimize/es/components/color_picker/color_stops/color_stops.js +11 -0
- package/optimize/es/components/control_bar/control_bar.js +11 -0
- package/optimize/es/components/datagrid/controls/keyboard_shortcuts.js +1 -1
- package/optimize/es/components/description_list/description_list.js +41 -11
- package/optimize/es/components/description_list/description_list.styles.js +19 -6
- package/optimize/es/components/description_list/description_list_context.js +1 -1
- package/optimize/es/components/description_list/description_list_description.js +3 -9
- package/optimize/es/components/description_list/description_list_description.styles.js +3 -9
- package/optimize/es/components/description_list/description_list_title.js +7 -4
- package/optimize/es/components/description_list/description_list_title.styles.js +3 -6
- package/optimize/es/components/description_list/description_list_types.js +4 -2
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.js +37 -34
- package/optimize/es/components/key_pad_menu/key_pad_menu_item.styles.js +41 -0
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +3 -6
- package/optimize/es/components/notification/notification_event.js +10 -0
- package/optimize/es/components/suggest/suggest.js +16 -0
- package/optimize/es/components/suggest/suggest_item.js +12 -0
- package/optimize/es/components/text/text.styles.js +3 -6
- package/optimize/es/global_styling/functions/typography.js +8 -8
- package/optimize/es/global_styling/variables/typography.js +1 -1
- package/optimize/es/services/color_picker/color_picker.js +4 -0
- package/optimize/es/themes/amsterdam/global_styling/variables/_typography.js +1 -0
- package/optimize/lib/components/collapsible_nav_beta/collapsible_nav_beta.js +4 -2
- package/optimize/lib/components/color_picker/color_stops/color_stops.js +10 -1
- package/optimize/lib/components/control_bar/control_bar.js +10 -1
- package/optimize/lib/components/datagrid/controls/keyboard_shortcuts.js +1 -1
- package/optimize/lib/components/description_list/description_list.js +44 -11
- package/optimize/lib/components/description_list/description_list.styles.js +24 -13
- package/optimize/lib/components/description_list/description_list_context.js +1 -1
- package/optimize/lib/components/description_list/description_list_description.js +2 -8
- package/optimize/lib/components/description_list/description_list_description.styles.js +2 -8
- package/optimize/lib/components/description_list/description_list_title.js +7 -4
- package/optimize/lib/components/description_list/description_list_title.styles.js +2 -5
- package/optimize/lib/components/description_list/description_list_types.js +8 -4
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.js +40 -34
- package/optimize/lib/components/key_pad_menu/key_pad_menu_item.styles.js +49 -0
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +3 -6
- package/optimize/lib/components/notification/notification_event.js +9 -0
- package/optimize/lib/components/suggest/suggest.js +16 -0
- package/optimize/lib/components/suggest/suggest_item.js +11 -0
- package/optimize/lib/components/text/text.styles.js +3 -6
- package/optimize/lib/global_styling/functions/typography.js +8 -8
- package/optimize/lib/global_styling/variables/typography.js +3 -3
- package/optimize/lib/services/color_picker/color_picker.js +4 -0
- package/optimize/lib/themes/amsterdam/global_styling/variables/_typography.js +1 -0
- package/package.json +6 -6
- package/src/components/datagrid/controls/_data_grid_keyboard_shortcuts.scss +1 -7
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/collapsible_nav_beta/collapsible_nav_beta.js +9 -2
- package/test-env/components/color_picker/color_palette_display/color_palette_display.js +3 -6
- package/test-env/components/color_picker/color_palette_display/color_palette_display_fixed.js +2 -5
- package/test-env/components/color_picker/color_palette_display/color_palette_display_gradient.js +2 -5
- package/test-env/components/color_picker/color_palette_picker/color_palette_picker.js +3 -3
- package/test-env/components/color_picker/color_stops/color_stops.js +10 -1
- package/test-env/components/control_bar/control_bar.js +10 -1
- package/test-env/components/datagrid/controls/keyboard_shortcuts.js +1 -1
- package/test-env/components/description_list/description_list.js +66 -13
- package/test-env/components/description_list/description_list.styles.js +24 -13
- package/test-env/components/description_list/description_list_context.js +1 -1
- package/test-env/components/description_list/description_list_description.js +2 -8
- package/test-env/components/description_list/description_list_description.styles.js +2 -8
- package/test-env/components/description_list/description_list_title.js +7 -4
- package/test-env/components/description_list/description_list_title.styles.js +2 -5
- package/test-env/components/description_list/description_list_types.js +8 -4
- package/test-env/components/key_pad_menu/key_pad_menu_item.js +40 -34
- package/test-env/components/key_pad_menu/key_pad_menu_item.styles.js +49 -0
- package/test-env/components/markdown_editor/markdown_format.styles.js +3 -6
- package/test-env/components/notification/notification_event.js +9 -0
- package/test-env/components/suggest/suggest.js +16 -0
- package/test-env/components/suggest/suggest_item.js +11 -0
- package/test-env/components/text/text.styles.js +3 -6
- package/test-env/global_styling/functions/typography.js +8 -8
- package/test-env/global_styling/variables/typography.js +3 -3
- package/test-env/services/color_picker/color_picker.js +4 -0
- package/test-env/themes/amsterdam/global_styling/variables/_typography.js +1 -0
- package/src/components/key_pad_menu/_index.scss +0 -5
- package/src/components/key_pad_menu/_key_pad_menu_item.scss +0 -123
- package/src/components/key_pad_menu/_variables.scss +0 -2
- package/src/themes/amsterdam/overrides/_key_pad_menu.scss +0 -46
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TYPES = exports.TEXT_STYLES = exports.
|
|
6
|
+
exports.TYPES = exports.TEXT_STYLES = exports.ROW_GUTTER_SIZES = exports.COLUMN_GUTTER_SIZES = exports.CHILD_TYPES = exports.ALIGNMENTS = void 0;
|
|
7
7
|
/*
|
|
8
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
9
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -12,11 +12,15 @@ exports.TYPES = exports.TEXT_STYLES = exports.GUTTER_SIZES = exports.ALIGNMENTS
|
|
|
12
12
|
* Side Public License, v 1.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var CHILD_TYPES = ['row', 'inline', 'column'];
|
|
16
|
+
exports.CHILD_TYPES = CHILD_TYPES;
|
|
17
|
+
var TYPES = [].concat(CHILD_TYPES, ['responsiveColumn']);
|
|
16
18
|
exports.TYPES = TYPES;
|
|
17
19
|
var ALIGNMENTS = ['center', 'left'];
|
|
18
20
|
exports.ALIGNMENTS = ALIGNMENTS;
|
|
19
21
|
var TEXT_STYLES = ['normal', 'reverse'];
|
|
20
22
|
exports.TEXT_STYLES = TEXT_STYLES;
|
|
21
|
-
var
|
|
22
|
-
exports.
|
|
23
|
+
var ROW_GUTTER_SIZES = ['s', 'm'];
|
|
24
|
+
exports.ROW_GUTTER_SIZES = ROW_GUTTER_SIZES;
|
|
25
|
+
var COLUMN_GUTTER_SIZES = ['s', 'm'];
|
|
26
|
+
exports.COLUMN_GUTTER_SIZES = COLUMN_GUTTER_SIZES;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.EuiKeyPadMenuItem = void 0;
|
|
8
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react =
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
-
var _beta_badge = require("../badge/beta_badge");
|
|
14
14
|
var _services = require("../../services");
|
|
15
|
+
var _beta_badge = require("../badge/beta_badge");
|
|
15
16
|
var _form = require("../form");
|
|
16
17
|
var _href_validator = require("../../services/security/href_validator");
|
|
17
18
|
var _tool_tip = require("../tool_tip");
|
|
19
|
+
var _key_pad_menu_item = require("./key_pad_menu_item.styles");
|
|
18
20
|
var _react2 = require("@emotion/react");
|
|
19
21
|
var _excluded = ["id", "isSelected", "isDisabled", "label", "children", "className", "betaBadgeLabel", "betaBadgeTooltipContent", "betaBadgeIconType", "betaBadgeTooltipProps", "href", "rel", "target", "buttonRef", "checkable", "name", "value", "disabled", "onChange"];
|
|
20
22
|
/*
|
|
@@ -24,6 +26,8 @@ var _excluded = ["id", "isSelected", "isDisabled", "label", "children", "classNa
|
|
|
24
26
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
25
27
|
* Side Public License, v 1.
|
|
26
28
|
*/
|
|
29
|
+
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); }
|
|
30
|
+
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; }
|
|
27
31
|
var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
28
32
|
var id = _ref.id,
|
|
29
33
|
isSelected = _ref.isSelected,
|
|
@@ -47,48 +51,45 @@ var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
|
47
51
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
52
|
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
49
53
|
var isDisabled = disabled || _isDisabled || !isHrefValid;
|
|
50
|
-
var
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
'euiKeyPadMenuItem-isSelected': isSelected
|
|
55
|
-
}, className);
|
|
54
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
55
|
+
var styles = (0, _key_pad_menu_item.euiKeyPadMenuItemStyles)(euiTheme);
|
|
56
|
+
var cssStyles = [styles.euiKeyPadMenuItem, !isDisabled ? styles.enabled : styles.disabled.disabled, isSelected && (!isDisabled ? styles.selected : styles.disabled.selected)];
|
|
57
|
+
var classes = (0, _classnames.default)('euiKeyPadMenuItem', className);
|
|
56
58
|
var Element = href && !isDisabled ? 'a' : 'button';
|
|
57
59
|
if (checkable) Element = 'label';
|
|
58
60
|
var itemId = (0, _services.useGeneratedHtmlId)({
|
|
59
61
|
conditionalId: id
|
|
60
62
|
});
|
|
61
|
-
var
|
|
63
|
+
var childStyles = (0, _react.useMemo)(function () {
|
|
64
|
+
return (0, _key_pad_menu_item.euiKeyPadMenuItemChildStyles)(euiTheme);
|
|
65
|
+
}, [euiTheme]);
|
|
66
|
+
var checkableElement = (0, _react.useMemo)(function () {
|
|
62
67
|
if (!checkable) return;
|
|
63
|
-
var
|
|
64
|
-
var
|
|
68
|
+
var cssStyles = [childStyles.euiKeyPadMenuItem__checkableInput, !isSelected && isDisabled && childStyles.hideCheckableInput, !isSelected && !isDisabled && childStyles.showCheckableInputOnInteraction];
|
|
69
|
+
var sharedProps = {
|
|
70
|
+
id: itemId,
|
|
71
|
+
className: 'euiKeyPadMenuItem__checkableInput',
|
|
72
|
+
css: cssStyles,
|
|
73
|
+
checked: isSelected,
|
|
74
|
+
disabled: isDisabled,
|
|
75
|
+
name: name
|
|
76
|
+
};
|
|
65
77
|
if (checkable === 'single') {
|
|
66
|
-
|
|
67
|
-
id: itemId,
|
|
68
|
-
className: inputClasses,
|
|
69
|
-
checked: isSelected,
|
|
70
|
-
disabled: isDisabled,
|
|
71
|
-
name: name,
|
|
78
|
+
return (0, _react2.jsx)(_form.EuiRadio, (0, _extends2.default)({}, sharedProps, {
|
|
72
79
|
value: value,
|
|
73
80
|
onChange: function onChange() {
|
|
74
81
|
return _onChange(itemId, value);
|
|
75
82
|
}
|
|
76
|
-
});
|
|
83
|
+
}));
|
|
77
84
|
} else {
|
|
78
|
-
|
|
79
|
-
id: itemId,
|
|
80
|
-
className: inputClasses,
|
|
81
|
-
checked: isSelected,
|
|
82
|
-
disabled: isDisabled,
|
|
83
|
-
name: name,
|
|
85
|
+
return (0, _react2.jsx)(_form.EuiCheckbox, (0, _extends2.default)({}, sharedProps, {
|
|
84
86
|
onChange: function onChange() {
|
|
85
87
|
return _onChange(itemId);
|
|
86
88
|
}
|
|
87
|
-
});
|
|
89
|
+
}));
|
|
88
90
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
var renderBetaBadge = function renderBetaBadge() {
|
|
91
|
+
}, [checkable, isDisabled, isSelected, _onChange, value, name, itemId, childStyles]);
|
|
92
|
+
var betaBadge = (0, _react.useMemo)(function () {
|
|
92
93
|
if (!betaBadgeLabel) return;
|
|
93
94
|
return (0, _react2.jsx)(_beta_badge.EuiBetaBadge
|
|
94
95
|
// Since we move the tooltip contents to a wrapping EuiToolTip,
|
|
@@ -98,10 +99,11 @@ var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
|
98
99
|
size: "s",
|
|
99
100
|
color: "subdued",
|
|
100
101
|
className: "euiKeyPadMenuItem__betaBadge",
|
|
102
|
+
css: childStyles.euiKeyPadMenuItem__betaBadge,
|
|
101
103
|
label: betaBadgeLabel.charAt(0),
|
|
102
104
|
iconType: betaBadgeIconType
|
|
103
105
|
});
|
|
104
|
-
};
|
|
106
|
+
}, [betaBadgeLabel, betaBadgeIconType, childStyles]);
|
|
105
107
|
var relObj = {};
|
|
106
108
|
if (href && !isDisabled) {
|
|
107
109
|
relObj.href = href;
|
|
@@ -120,16 +122,20 @@ var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
|
120
122
|
relObj['aria-pressed'] = isSelected;
|
|
121
123
|
}
|
|
122
124
|
var button = (0, _react2.jsx)(Element, (0, _extends2.default)({
|
|
123
|
-
className: classes
|
|
125
|
+
className: classes,
|
|
126
|
+
css: cssStyles
|
|
124
127
|
}, relObj, rest, {
|
|
125
128
|
// Unable to get past `LegacyRef` conflicts
|
|
126
129
|
ref: buttonRef
|
|
127
130
|
}), (0, _react2.jsx)("span", {
|
|
128
|
-
className: "euiKeyPadMenuItem__inner"
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
className: "euiKeyPadMenuItem__inner",
|
|
132
|
+
css: childStyles.euiKeyPadMenuItem__inner
|
|
133
|
+
}, checkable ? checkableElement : betaBadge, (0, _react2.jsx)("span", {
|
|
134
|
+
className: "euiKeyPadMenuItem__icon",
|
|
135
|
+
css: childStyles.euiKeyPadMenuItem__icon
|
|
131
136
|
}, children), (0, _react2.jsx)("span", {
|
|
132
|
-
className: "euiKeyPadMenuItem__label"
|
|
137
|
+
className: "euiKeyPadMenuItem__label",
|
|
138
|
+
css: childStyles.euiKeyPadMenuItem__label
|
|
133
139
|
}, label)));
|
|
134
140
|
return betaBadgeLabel ? (0, _react2.jsx)(_tool_tip.EuiToolTip, (0, _extends2.default)({}, betaBadgeTooltipProps, {
|
|
135
141
|
title: betaBadgeLabel,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.euiKeyPadMenuItemStyles = exports.euiKeyPadMenuItemChildStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _services = require("../../services");
|
|
9
|
+
var _global_styling = require("../../global_styling");
|
|
10
|
+
var _mixins = require("../../themes/amsterdam/global_styling/mixins");
|
|
11
|
+
var _accessibility = require("../accessibility");
|
|
12
|
+
var _key_pad_menu = require("./key_pad_menu.styles");
|
|
13
|
+
/*
|
|
14
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
15
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
16
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
17
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
18
|
+
* Side Public License, v 1.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var euiKeyPadMenuItemStyles = function euiKeyPadMenuItemStyles(euiThemeContext) {
|
|
22
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
23
|
+
var _euiKeyPadMenuVariabl = (0, _key_pad_menu.euiKeyPadMenuVariables)(euiThemeContext),
|
|
24
|
+
euiKeyPadMenuSize = _euiKeyPadMenuVariabl.euiKeyPadMenuSize;
|
|
25
|
+
return {
|
|
26
|
+
euiKeyPadMenuItem: /*#__PURE__*/(0, _react.css)("display:block;padding:", euiTheme.size.xs, ";", (0, _global_styling.logicalSizeCSS)(euiKeyPadMenuSize), " border-radius:", euiTheme.border.radius.medium, ";color:", euiTheme.colors.text, ";", _global_styling.euiCanAnimate, "{transition:background-color ", euiTheme.animation.fast, " ease-in,box-shadow ", euiTheme.animation.fast, " ease-in;};label:euiKeyPadMenuItem;"),
|
|
27
|
+
enabled: /*#__PURE__*/(0, _react.css)("&:hover,&:focus,&:focus-within{cursor:pointer;text-decoration:underline;", (0, _mixins.euiShadow)(euiThemeContext, 's'), " ", _global_styling.euiCanAnimate, "{.euiKeyPadMenuItem__icon{transform:translateY(0);}}}&:focus{background-color:", euiTheme.focus.backgroundColor, ";box-shadow:none;};label:enabled;"),
|
|
28
|
+
selected: /*#__PURE__*/(0, _react.css)("color:", euiTheme.colors.title, ";background-color:", euiTheme.focus.backgroundColor, ";&,&:hover,&:focus,&:focus-within{color:", euiTheme.colors.primaryText, ";};label:selected;"),
|
|
29
|
+
disabled: {
|
|
30
|
+
disabled: /*#__PURE__*/(0, _react.css)("cursor:not-allowed;color:", euiTheme.colors.disabledText, ";.euiKeyPadMenuItem__icon{filter:grayscale(100%);svg *{fill:", euiTheme.colors.disabledText, ";}};label:disabled;"),
|
|
31
|
+
selected: /*#__PURE__*/(0, _react.css)("background-color:", (0, _services.transparentize)(euiTheme.colors.disabled, euiTheme.focus.transparency), ";;label:selected;")
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
exports.euiKeyPadMenuItemStyles = euiKeyPadMenuItemStyles;
|
|
36
|
+
var euiKeyPadMenuItemChildStyles = function euiKeyPadMenuItemChildStyles(euiThemeContext) {
|
|
37
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
38
|
+
var topRightChildren = "\n z-index: 3;\n position: absolute;\n ".concat((0, _global_styling.logicalCSS)('top', euiTheme.size.xs), "\n ").concat((0, _global_styling.logicalCSS)('right', euiTheme.size.xs), "\n ");
|
|
39
|
+
return {
|
|
40
|
+
euiKeyPadMenuItem__inner: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalSizeCSS)('100%'), " display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;;label:euiKeyPadMenuItem__inner;"),
|
|
41
|
+
euiKeyPadMenuItem__icon: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.m), " transform:translateY(2px);", _global_styling.euiCanAnimate, "{transition:transform ", euiTheme.animation.normal, " ", euiTheme.animation.bounce, ";};label:euiKeyPadMenuItem__icon;"),
|
|
42
|
+
euiKeyPadMenuItem__label: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), " font-weight:", euiTheme.font.weight.semiBold, ";text-align:center;;label:euiKeyPadMenuItem__label;"),
|
|
43
|
+
euiKeyPadMenuItem__betaBadge: /*#__PURE__*/(0, _react.css)(topRightChildren, ";;label:euiKeyPadMenuItem__betaBadge;"),
|
|
44
|
+
euiKeyPadMenuItem__checkableInput: /*#__PURE__*/(0, _react.css)(topRightChildren, " transform:scale(.75);transform-origin:top right;&&{position:absolute;};label:euiKeyPadMenuItem__checkableInput;"),
|
|
45
|
+
showCheckableInputOnInteraction: /*#__PURE__*/(0, _react.css)(".euiKeyPadMenuItem:not(:hover, :focus, :focus-within) &{", (0, _accessibility.euiScreenReaderOnly)(), ";};label:showCheckableInputOnInteraction;"),
|
|
46
|
+
hideCheckableInput: /*#__PURE__*/(0, _react.css)((0, _accessibility.euiScreenReaderOnly)(), ";;label:hideCheckableInput;")
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
exports.euiKeyPadMenuItemChildStyles = euiKeyPadMenuItemChildStyles;
|
|
@@ -21,8 +21,8 @@ var euiScaleMarkdownFormatText = function euiScaleMarkdownFormatText(euiTheme, o
|
|
|
21
21
|
var _euiFontSize = (0, _global_styling.euiFontSize)(euiTheme, 'm', options),
|
|
22
22
|
fontSize = _euiFontSize.fontSize,
|
|
23
23
|
lineHeight = _euiFontSize.lineHeight;
|
|
24
|
-
var
|
|
25
|
-
var lineHeightSize =
|
|
24
|
+
var unit = options.unit;
|
|
25
|
+
var lineHeightSize = unit === 'em' ? "".concat(lineHeight, "em") : lineHeight;
|
|
26
26
|
|
|
27
27
|
// Custom scales
|
|
28
28
|
var tablePaddingVertical = (0, _global_styling.mathWithUnits)(fontSize, function (x) {
|
|
@@ -43,19 +43,16 @@ var euiMarkdownFormatStyles = function euiMarkdownFormatStyles(euiTheme) {
|
|
|
43
43
|
euiMarkdownFormat: /*#__PURE__*/(0, _react.css)(";label:euiMarkdownFormat;"),
|
|
44
44
|
// Text sizes
|
|
45
45
|
m: /*#__PURE__*/(0, _react.css)(euiScaleMarkdownFormatText(euiTheme, {
|
|
46
|
-
measurement: 'rem',
|
|
47
46
|
customScale: 'm'
|
|
48
47
|
}), ";;label:m;"),
|
|
49
48
|
s: /*#__PURE__*/(0, _react.css)(euiScaleMarkdownFormatText(euiTheme, {
|
|
50
|
-
measurement: 'rem',
|
|
51
49
|
customScale: 's'
|
|
52
50
|
}), ";;label:s;"),
|
|
53
51
|
xs: /*#__PURE__*/(0, _react.css)(euiScaleMarkdownFormatText(euiTheme, {
|
|
54
|
-
measurement: 'rem',
|
|
55
52
|
customScale: 'xs'
|
|
56
53
|
}), ";;label:xs;"),
|
|
57
54
|
relative: /*#__PURE__*/(0, _react.css)(euiScaleMarkdownFormatText(euiTheme, {
|
|
58
|
-
|
|
55
|
+
unit: 'em'
|
|
59
56
|
}), ";;label:relative;")
|
|
60
57
|
};
|
|
61
58
|
};
|
|
@@ -27,8 +27,17 @@ var _excluded = ["id", "type", "severity", "badgeColor", "iconType", "iconAriaLa
|
|
|
27
27
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
28
28
|
* Side Public License, v 1.
|
|
29
29
|
*/
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated
|
|
32
|
+
*/
|
|
30
33
|
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
34
|
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; }
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated - EuiNotificationEvent is scheduled for deprecation due to low internal usage and high
|
|
37
|
+
* maintenance requirements. If necessary, we recommend copying this component into your own application.
|
|
38
|
+
*
|
|
39
|
+
* The component will be permanently removed in December 2023.
|
|
40
|
+
*/
|
|
32
41
|
var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
33
42
|
var id = _ref.id,
|
|
34
43
|
type = _ref.type,
|
|
@@ -49,6 +49,22 @@ var statusMap = {
|
|
|
49
49
|
|
|
50
50
|
// keys of _EuiSuggestItemPropsBase
|
|
51
51
|
var suggestItemPropsKeys = ['label', 'type', 'description', 'labelDisplay', 'labelWidth', 'descriptionDisplay'];
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @deprecated
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated - EuiSuggest is scheduled for deprecation due to low internal usage and high
|
|
63
|
+
* overlap with other existing EUI components. We recommend using EuiSelectable instead,
|
|
64
|
+
* or copying this component into your own application for usage if necessary.
|
|
65
|
+
*
|
|
66
|
+
* The component will be permanently removed in October 2023.
|
|
67
|
+
*/
|
|
52
68
|
var EuiSuggest = function EuiSuggest(_ref) {
|
|
53
69
|
var onItemClick = _ref.onItemClick,
|
|
54
70
|
onBlur = _ref.onBlur,
|
|
@@ -21,6 +21,9 @@ var _excluded = ["className", "label", "type", "labelWidth", "description", "tru
|
|
|
21
21
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
22
22
|
* Side Public License, v 1.
|
|
23
23
|
*/
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
24
27
|
var colorToClassNameMap = {
|
|
25
28
|
tint0: 'euiSuggestItem__type--tint0',
|
|
26
29
|
tint1: 'euiSuggestItem__type--tint1',
|
|
@@ -35,6 +38,14 @@ var colorToClassNameMap = {
|
|
|
35
38
|
tint10: 'euiSuggestItem__type--tint10'
|
|
36
39
|
};
|
|
37
40
|
var COLORS = (0, _common.keysOf)(colorToClassNameMap);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated - EuiSuggest is scheduled for deprecation due to low internal usage and high
|
|
44
|
+
* overlap with other existing EUI components. We recommend using EuiSelectable instead,
|
|
45
|
+
* or copying this component into your own application for usage if necessary.
|
|
46
|
+
*
|
|
47
|
+
* The component will be permanently removed in October 2023.
|
|
48
|
+
*/
|
|
38
49
|
exports.COLORS = COLORS;
|
|
39
50
|
var EuiSuggestItem = function EuiSuggestItem(_ref) {
|
|
40
51
|
var className = _ref.className,
|
|
@@ -40,9 +40,9 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
|
|
|
40
40
|
fontSize = _euiFontSize.fontSize,
|
|
41
41
|
lineHeight = _euiFontSize.lineHeight;
|
|
42
42
|
var euiTheme = euiThemeContext.euiTheme;
|
|
43
|
-
var
|
|
43
|
+
var unit = options.unit,
|
|
44
44
|
_customScale = options.customScale;
|
|
45
|
-
var lineHeightSize =
|
|
45
|
+
var lineHeightSize = unit === 'em' ? "".concat(lineHeight, "em") : lineHeight;
|
|
46
46
|
var headings = {
|
|
47
47
|
h1: (0, _title.euiTitle)(euiThemeContext, 'l', options),
|
|
48
48
|
h2: (0, _title.euiTitle)(euiThemeContext, 'm', options),
|
|
@@ -78,19 +78,16 @@ var euiTextStyles = function euiTextStyles(euiThemeContext) {
|
|
|
78
78
|
constrainedWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),
|
|
79
79
|
// Sizes
|
|
80
80
|
m: /*#__PURE__*/(0, _react.css)(euiScaleText(euiThemeContext, {
|
|
81
|
-
measurement: 'rem',
|
|
82
81
|
customScale: 'm'
|
|
83
82
|
}), ";;label:m;"),
|
|
84
83
|
s: /*#__PURE__*/(0, _react.css)(euiScaleText(euiThemeContext, {
|
|
85
|
-
measurement: 'rem',
|
|
86
84
|
customScale: 's'
|
|
87
85
|
}), ";;label:s;"),
|
|
88
86
|
xs: /*#__PURE__*/(0, _react.css)(euiScaleText(euiThemeContext, {
|
|
89
|
-
measurement: 'rem',
|
|
90
87
|
customScale: 'xs'
|
|
91
88
|
}), ";;label:xs;"),
|
|
92
89
|
relative: /*#__PURE__*/(0, _react.css)(euiScaleText(euiThemeContext, {
|
|
93
|
-
|
|
90
|
+
unit: 'em'
|
|
94
91
|
}), ";;label:relative;")
|
|
95
92
|
};
|
|
96
93
|
};
|
|
@@ -28,16 +28,16 @@ function euiFontSizeFromScale(scale, _ref) {
|
|
|
28
28
|
var base = _ref.base,
|
|
29
29
|
font = _ref.font;
|
|
30
30
|
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
31
|
-
_ref2$
|
|
32
|
-
|
|
31
|
+
_ref2$unit = _ref2.unit,
|
|
32
|
+
unit = _ref2$unit === void 0 ? font.defaultUnits : _ref2$unit,
|
|
33
33
|
customScale = _ref2.customScale;
|
|
34
|
-
if (
|
|
34
|
+
if (unit === 'em') {
|
|
35
35
|
return "".concat(font.scale[scale], "em");
|
|
36
36
|
}
|
|
37
37
|
var numerator = base * font.scale[scale];
|
|
38
38
|
if (customScale) numerator *= font.scale[customScale];
|
|
39
39
|
var denominator = base * font.scale[font.body.scale];
|
|
40
|
-
return
|
|
40
|
+
return unit === 'px' ? "".concat(numerator, "px") : "".concat((numerator / denominator).toFixed(4), "rem");
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -56,8 +56,8 @@ function euiLineHeightFromBaseline(scale, _ref3) {
|
|
|
56
56
|
var base = _ref3.base,
|
|
57
57
|
font = _ref3.font;
|
|
58
58
|
var _ref4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
59
|
-
_ref4$
|
|
60
|
-
|
|
59
|
+
_ref4$unit = _ref4.unit,
|
|
60
|
+
unit = _ref4$unit === void 0 ? font.defaultUnits : _ref4$unit,
|
|
61
61
|
customScale = _ref4.customScale;
|
|
62
62
|
var baseline = font.baseline,
|
|
63
63
|
lineHeightMultiplier = font.lineHeightMultiplier;
|
|
@@ -65,13 +65,13 @@ function euiLineHeightFromBaseline(scale, _ref3) {
|
|
|
65
65
|
if (customScale) numerator *= font.scale[customScale];
|
|
66
66
|
var denominator = base * font.scale[font.body.scale];
|
|
67
67
|
var _lineHeightMultiplier = numerator <= base ? lineHeightMultiplier : lineHeightMultiplier * 0.833;
|
|
68
|
-
if (
|
|
68
|
+
if (unit === 'em') {
|
|
69
69
|
// Even though the line-height via `em` cannot be determined against the pixel baseline grid;
|
|
70
70
|
// we will assume that typically larger scale font-sizes should have a shorter line-height;
|
|
71
71
|
return _lineHeightMultiplier.toFixed(4).toString();
|
|
72
72
|
}
|
|
73
73
|
var pixelValue = Math.floor(Math.round(numerator * _lineHeightMultiplier) / baseline) * baseline;
|
|
74
|
-
return
|
|
74
|
+
return unit === 'px' ? "".concat(pixelValue, "px") : "".concat((pixelValue / denominator).toFixed(4), "rem");
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.EuiThemeFontWeights = exports.
|
|
6
|
+
exports.EuiThemeFontWeights = exports.EuiThemeFontUnits = exports.EuiThemeFontScales = void 0;
|
|
7
7
|
/*
|
|
8
8
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
9
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -16,8 +16,8 @@ exports.EuiThemeFontWeights = exports.EuiThemeFontSizeMeasurements = exports.Eui
|
|
|
16
16
|
* Font units of measure
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
exports.
|
|
19
|
+
var EuiThemeFontUnits = ['rem', 'px', 'em'];
|
|
20
|
+
exports.EuiThemeFontUnits = EuiThemeFontUnits;
|
|
21
21
|
/*
|
|
22
22
|
* Font scale
|
|
23
23
|
*/
|
|
@@ -20,6 +20,10 @@ var generateRandomColor = function generateRandomColor() {
|
|
|
20
20
|
"#".concat(Math.floor(Math.random() * 16777215).toString(16))
|
|
21
21
|
);
|
|
22
22
|
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated
|
|
26
|
+
*/
|
|
23
27
|
var useColorStopsState = function useColorStopsState() {
|
|
24
28
|
var useRandomColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
25
29
|
var initialColorStops = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [{
|
|
@@ -36,6 +36,7 @@ var fontBase = {
|
|
|
36
36
|
familySerif: 'Georgia, Times, Times New Roman, serif',
|
|
37
37
|
// Careful using ligatures. Code editors like ACE will often error because of width calculations
|
|
38
38
|
featureSettings: "'calt' 1, 'kern' 1, 'liga' 1",
|
|
39
|
+
defaultUnits: 'rem',
|
|
39
40
|
baseline: (0, _utils.computed)(function (_ref) {
|
|
40
41
|
var _ref2 = (0, _slicedToArray2.default)(_ref, 1),
|
|
41
42
|
base = _ref2[0];
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 1. If this class is applied to a button, we need to override the Chrome default font.
|
|
3
|
-
* 2. If it has a BetaBadge, make sure only the first letter shows
|
|
4
|
-
*/
|
|
5
|
-
.euiKeyPadMenuItem {
|
|
6
|
-
@include euiFont; /* 1 */
|
|
7
|
-
display: block;
|
|
8
|
-
padding: $euiSizeXS;
|
|
9
|
-
height: $euiKeyPadMenuSize;
|
|
10
|
-
width: $euiKeyPadMenuSize;
|
|
11
|
-
border: $euiBorderThin;
|
|
12
|
-
border-color: transparent;
|
|
13
|
-
border-radius: $euiBorderRadius;
|
|
14
|
-
color: $euiTextColor; // Override possible link color
|
|
15
|
-
|
|
16
|
-
@include euiCanAnimate {
|
|
17
|
-
transition:
|
|
18
|
-
background-color $euiAnimSpeedFast ease-in,
|
|
19
|
-
border-color $euiAnimSpeedFast ease-in,
|
|
20
|
-
box-shadow $euiAnimSpeedFast ease-in;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Focus and Hover states (when not disabled)
|
|
24
|
-
&:not(.euiKeyPadMenuItem-isDisabled) {
|
|
25
|
-
&:hover,
|
|
26
|
-
&:focus,
|
|
27
|
-
&:focus-within {
|
|
28
|
-
@include euiHoverState;
|
|
29
|
-
@include euiSlightShadow;
|
|
30
|
-
border-color: $euiBorderColor;
|
|
31
|
-
|
|
32
|
-
@include euiCanAnimate {
|
|
33
|
-
.euiKeyPadMenuItem__icon {
|
|
34
|
-
transform: translateY(0);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&:focus {
|
|
40
|
-
@include euiFocusState;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Disabled state
|
|
45
|
-
&.euiKeyPadMenuItem-isDisabled {
|
|
46
|
-
@include euiDisabledState;
|
|
47
|
-
|
|
48
|
-
.euiKeyPadMenuItem__icon {
|
|
49
|
-
filter: grayscale(100%);
|
|
50
|
-
|
|
51
|
-
svg * { // stylelint-disable-line max-nesting-depth
|
|
52
|
-
fill: $euiButtonColorDisabledText;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Selected state (when not disabled)
|
|
58
|
-
&.euiKeyPadMenuItem-isSelected:not(.euiKeyPadMenuItem-isDisabled) {
|
|
59
|
-
@include euiSlightShadow;
|
|
60
|
-
color: $euiTitleColor;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Selected (even if disabled)
|
|
64
|
-
&.euiKeyPadMenuItem-isSelected {
|
|
65
|
-
border-color: $euiBorderColor;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Hide the input if not selected, or being interacted with
|
|
69
|
-
&:not(:hover):not(:focus):not(:focus-within):not(.euiKeyPadMenuItem-isSelected),
|
|
70
|
-
// Also specifically if disabled but not selected
|
|
71
|
-
&.euiKeyPadMenuItem-isDisabled:not(.euiKeyPadMenuItem-isSelected) {
|
|
72
|
-
.euiKeyPadMenuItem__checkableInput {
|
|
73
|
-
@include euiScreenReaderOnly;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.euiKeyPadMenuItem__inner {
|
|
79
|
-
width: 100%;
|
|
80
|
-
height: 100%;
|
|
81
|
-
display: flex;
|
|
82
|
-
flex-direction: column;
|
|
83
|
-
align-items: center;
|
|
84
|
-
justify-content: center;
|
|
85
|
-
position: relative;
|
|
86
|
-
|
|
87
|
-
.euiKeyPadMenuItem__checkableInput {
|
|
88
|
-
transform: scale(.75);
|
|
89
|
-
transform-origin: top right;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.euiKeyPadMenuItem__checkableInput,
|
|
93
|
-
.euiKeyPadMenuItem__betaBadge {
|
|
94
|
-
position: absolute;
|
|
95
|
-
top: $euiSizeXS;
|
|
96
|
-
right: $euiSizeXS;
|
|
97
|
-
z-index: 3;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.euiKeyPadMenuItem__icon {
|
|
102
|
-
transition: transform $euiAnimSpeedNormal $euiAnimSlightBounce;
|
|
103
|
-
margin-bottom: $euiSizeM;
|
|
104
|
-
transform: translateY(2px);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.euiKeyPadMenuItem__label {
|
|
108
|
-
font-size: $euiFontSizeXS;
|
|
109
|
-
font-weight: $euiFontWeightMedium;
|
|
110
|
-
line-height: $euiSize;
|
|
111
|
-
text-align: center;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.euiKeyPadMenuItem--checkable.euiKeyPadMenuItem-isSelected:not(.euiKeyPadMenuItem-isDisabled) {
|
|
115
|
-
&,
|
|
116
|
-
&:hover,
|
|
117
|
-
&:focus,
|
|
118
|
-
&:focus-within {
|
|
119
|
-
@include euiFocusBackground;
|
|
120
|
-
color: $euiColorPrimaryText;
|
|
121
|
-
border-color: $euiColorPrimaryText;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
.euiKeyPadMenuItem {
|
|
2
|
-
border: none !important; // stylelint-disable-line declaration-no-important
|
|
3
|
-
box-shadow: none;
|
|
4
|
-
|
|
5
|
-
// Focus and Hover states (when not disabled)
|
|
6
|
-
&:not(.euiKeyPadMenuItem-isDisabled) {
|
|
7
|
-
&:hover,
|
|
8
|
-
&:focus:hover,
|
|
9
|
-
&:focus-within {
|
|
10
|
-
@include euiBottomShadowSmall;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
&:focus {
|
|
14
|
-
box-shadow: none;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&.euiKeyPadMenuItem-isSelected:not(.euiKeyPadMenuItem-isDisabled) {
|
|
19
|
-
box-shadow: none;
|
|
20
|
-
|
|
21
|
-
&:hover {
|
|
22
|
-
@include euiBottomShadowSmall;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&,
|
|
26
|
-
&:hover,
|
|
27
|
-
&:focus,
|
|
28
|
-
&:focus-within {
|
|
29
|
-
@include euiFocusBackground;
|
|
30
|
-
// Calculate the right text contrast ratio based on focus transparency
|
|
31
|
-
$backgroundColorSimulated: mix($euiColorEmptyShade, $euiColorPrimary, $euiFocusTransparencyPercent);
|
|
32
|
-
color: makeHighContrastColor($euiColorPrimaryText, $backgroundColorSimulated);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
&.euiKeyPadMenuItem-isSelected.euiKeyPadMenuItem-isDisabled {
|
|
37
|
-
@include euiFocusBackground($euiColorDisabled);
|
|
38
|
-
// Calculate the right text contrast ratio based on focus transparency
|
|
39
|
-
$backgroundColorSimulated: mix($euiColorEmptyShade, $euiColorDisabled, $euiFocusTransparencyPercent);
|
|
40
|
-
color: makeDisabledContrastColor($euiColorDisabledText, $backgroundColorSimulated);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.euiKeyPadMenuItem__label {
|
|
45
|
-
font-weight: $euiFontWeightSemiBold;
|
|
46
|
-
}
|