@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
|
@@ -6,25 +6,36 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiDescriptionListStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
|
-
/*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
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)."; } /*
|
|
10
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
11
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
12
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
13
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
14
|
+
* Side Public License, v 1.
|
|
15
|
+
*/
|
|
16
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
17
|
+
name: "zr5fhc-column",
|
|
18
|
+
styles: "display:grid;grid-template-columns:minmax(auto, max-content) minmax(auto, max-content);align-items:baseline;label:column;"
|
|
19
|
+
} : {
|
|
20
|
+
name: "zr5fhc-column",
|
|
21
|
+
styles: "display:grid;grid-template-columns:minmax(auto, max-content) minmax(auto, max-content);align-items:baseline;label:column;",
|
|
22
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
23
|
+
};
|
|
17
24
|
var euiDescriptionListStyles = function euiDescriptionListStyles(euiThemeContext) {
|
|
18
|
-
// Flex display for column and responsive column
|
|
19
|
-
var columnDisplay = "\n display: flex;\n align-items: baseline;\n flex-wrap: wrap; \n ";
|
|
20
25
|
return {
|
|
21
26
|
euiDescriptionList: /*#__PURE__*/(0, _react.css)(";label:euiDescriptionList;"),
|
|
22
27
|
// Types
|
|
23
28
|
row: /*#__PURE__*/(0, _react.css)(";label:row;"),
|
|
24
29
|
inline: /*#__PURE__*/(0, _react.css)(";label:inline;"),
|
|
25
|
-
column:
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
column: _ref,
|
|
31
|
+
columnGap: {
|
|
32
|
+
s: /*#__PURE__*/(0, _react.css)("column-gap:", euiThemeContext.euiTheme.size.s, ";;label:s;"),
|
|
33
|
+
m: /*#__PURE__*/(0, _react.css)("column-gap:", euiThemeContext.euiTheme.size.xl, ";;label:m;")
|
|
34
|
+
},
|
|
35
|
+
rowGap: {
|
|
36
|
+
s: /*#__PURE__*/(0, _react.css)("row-gap:", euiThemeContext.euiTheme.size.s, ";;label:s;"),
|
|
37
|
+
m: /*#__PURE__*/(0, _react.css)("row-gap:", euiThemeContext.euiTheme.size.m, ";;label:m;")
|
|
38
|
+
},
|
|
28
39
|
// Alignment
|
|
29
40
|
center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;"),
|
|
30
41
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
|
|
@@ -17,7 +17,7 @@ var contextDefaults = {
|
|
|
17
17
|
type: 'row',
|
|
18
18
|
textStyle: 'normal',
|
|
19
19
|
align: 'left',
|
|
20
|
-
|
|
20
|
+
rowGutterSize: 's'
|
|
21
21
|
};
|
|
22
22
|
exports.contextDefaults = contextDefaults;
|
|
23
23
|
var EuiDescriptionListContext = /*#__PURE__*/(0, _react.createContext)(contextDefaults);
|
|
@@ -12,8 +12,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _services = require("../../services");
|
|
15
|
-
var _description_list_description = require("./description_list_description.styles");
|
|
16
15
|
var _description_list_context = require("./description_list_context");
|
|
16
|
+
var _description_list_description = require("./description_list_description.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _excluded = ["children", "className"];
|
|
19
19
|
/*
|
|
@@ -34,9 +34,7 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
|
|
|
34
34
|
type = _useContext.type,
|
|
35
35
|
textStyle = _useContext.textStyle,
|
|
36
36
|
compressed = _useContext.compressed,
|
|
37
|
-
align = _useContext.align
|
|
38
|
-
gutterSize = _useContext.gutterSize;
|
|
39
|
-
var showResponsiveColumns = (0, _services.useIsWithinMinBreakpoint)('m');
|
|
37
|
+
align = _useContext.align;
|
|
40
38
|
var theme = (0, _services.useEuiTheme)();
|
|
41
39
|
var styles = (0, _description_list_description.euiDescriptionListDescriptionStyles)(theme);
|
|
42
40
|
var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
@@ -44,14 +42,10 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
|
|
|
44
42
|
case 'inline':
|
|
45
43
|
conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
|
|
46
44
|
break;
|
|
47
|
-
case 'responsiveColumn':
|
|
48
45
|
case 'column':
|
|
49
46
|
if (align === 'center') {
|
|
50
47
|
conditionalStyles.push(styles.left);
|
|
51
48
|
}
|
|
52
|
-
if (type === 'column' || showResponsiveColumns) {
|
|
53
|
-
conditionalStyles.push(styles[gutterSize]);
|
|
54
|
-
}
|
|
55
49
|
break;
|
|
56
50
|
}
|
|
57
51
|
var cssStyles = [styles.euiDescriptionList__description, styles[type]].concat((0, _toConsumableArray2.default)(conditionalStyles));
|
|
@@ -23,14 +23,11 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
23
23
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
24
24
|
};
|
|
25
25
|
var euiDescriptionListDescriptionStyles = function euiDescriptionListDescriptionStyles(euiThemeContext) {
|
|
26
|
-
var euiTheme = euiThemeContext.euiTheme;
|
|
27
|
-
var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), "\n ").concat((0, _global_styling.logicalCSS)('padding-left', euiTheme.size.s), "\n ");
|
|
28
26
|
return {
|
|
29
27
|
euiDescriptionList__description: /*#__PURE__*/(0, _react.css)(";label:euiDescriptionList__description;"),
|
|
30
28
|
// Types
|
|
31
29
|
row: /*#__PURE__*/(0, _react.css)(";label:row;"),
|
|
32
|
-
column: /*#__PURE__*/(0, _react.css)(
|
|
33
|
-
responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", columnDisplay, ";};label:responsiveColumn;"),
|
|
30
|
+
column: /*#__PURE__*/(0, _react.css)(";label:column;"),
|
|
34
31
|
inline: _ref,
|
|
35
32
|
// This nested block handles just the font styling based on compressed and reverse
|
|
36
33
|
fontStyles: {
|
|
@@ -44,10 +41,7 @@ var euiDescriptionListDescriptionStyles = function euiDescriptionListDescription
|
|
|
44
41
|
normal: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";;label:normal;")
|
|
45
42
|
},
|
|
46
43
|
// Column types should align description text to the left when EuiDecriptionList is centered
|
|
47
|
-
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
|
|
48
|
-
// Gutter
|
|
49
|
-
s: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.s), ";};label:s;"),
|
|
50
|
-
m: /*#__PURE__*/(0, _react.css)("&:not(:first-of-type){", (0, _global_styling.logicalCSS)('margin-top', euiTheme.size.base), ";};label:m;")
|
|
44
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
|
|
51
45
|
};
|
|
52
46
|
};
|
|
53
47
|
exports.euiDescriptionListDescriptionStyles = euiDescriptionListDescriptionStyles;
|
|
@@ -12,8 +12,8 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
14
|
var _services = require("../../services");
|
|
15
|
-
var _description_list_title = require("./description_list_title.styles");
|
|
16
15
|
var _description_list_context = require("./description_list_context");
|
|
16
|
+
var _description_list_title = require("./description_list_title.styles");
|
|
17
17
|
var _react2 = require("@emotion/react");
|
|
18
18
|
var _excluded = ["children", "className"];
|
|
19
19
|
/*
|
|
@@ -35,22 +35,25 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
35
35
|
textStyle = _useContext.textStyle,
|
|
36
36
|
compressed = _useContext.compressed,
|
|
37
37
|
align = _useContext.align,
|
|
38
|
-
|
|
38
|
+
rowGutterSize = _useContext.rowGutterSize;
|
|
39
39
|
var theme = (0, _services.useEuiTheme)();
|
|
40
40
|
var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
|
|
41
41
|
var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
42
42
|
switch (type) {
|
|
43
43
|
case 'inline':
|
|
44
44
|
conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
|
|
45
|
+
conditionalStyles.push(styles[rowGutterSize]);
|
|
46
|
+
break;
|
|
47
|
+
case 'row':
|
|
48
|
+
conditionalStyles.push(styles[rowGutterSize]);
|
|
45
49
|
break;
|
|
46
|
-
case 'responsiveColumn':
|
|
47
50
|
case 'column':
|
|
48
51
|
if (align === 'center') {
|
|
49
52
|
conditionalStyles.push(styles.right);
|
|
50
53
|
}
|
|
51
54
|
break;
|
|
52
55
|
}
|
|
53
|
-
var cssStyles = [styles.euiDescriptionList__title, styles[type]
|
|
56
|
+
var cssStyles = [styles.euiDescriptionList__title, styles[type]].concat((0, _toConsumableArray2.default)(conditionalStyles));
|
|
54
57
|
var classes = (0, _classnames.default)('euiDescriptionList__title', className);
|
|
55
58
|
return (0, _react2.jsx)("dt", (0, _extends2.default)({
|
|
56
59
|
className: classes,
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.euiDescriptionListTitleStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _global_styling = require("../../global_styling");
|
|
9
|
-
var _services = require("../../services");
|
|
10
9
|
var _title = require("../title/title.styles");
|
|
11
10
|
/*
|
|
12
11
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -19,14 +18,12 @@ var _title = require("../title/title.styles");
|
|
|
19
18
|
var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiThemeContext) {
|
|
20
19
|
var euiTheme = euiThemeContext.euiTheme,
|
|
21
20
|
colorMode = euiThemeContext.colorMode;
|
|
22
|
-
var columnDisplay = "\n ".concat((0, _global_styling.logicalCSS)('width', '50%'), "\n ").concat((0, _global_styling.logicalCSS)('padding-right', euiTheme.size.s), "\n ");
|
|
23
21
|
return {
|
|
24
22
|
euiDescriptionList__title: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";;label:euiDescriptionList__title;"),
|
|
25
23
|
// Types
|
|
26
24
|
row: /*#__PURE__*/(0, _react.css)(";label:row;"),
|
|
27
|
-
column: /*#__PURE__*/(0, _react.css)(
|
|
28
|
-
|
|
29
|
-
inline: /*#__PURE__*/(0, _react.css)("display:inline;border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.medium, ";background-color:", colorMode === 'DARK' ? (0, _services.tint)(euiTheme.colors.lightestShade, 0.5) : euiTheme.colors.lightestShade, ";", (0, _global_styling.logicalCSS)('margin-vertical', '0'), " ", (0, _global_styling.logicalCSS)('margin-horizontal', euiTheme.size.xs), "&:first-of-type{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";};label:inline;"),
|
|
25
|
+
column: /*#__PURE__*/(0, _react.css)(";label:column;"),
|
|
26
|
+
inline: /*#__PURE__*/(0, _react.css)("display:inline;border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.medium, ";background-color:", colorMode === 'DARK' ? euiTheme.colors.lightShade : euiTheme.colors.lightestShade, ";", (0, _global_styling.logicalCSS)('margin-vertical', '0'), " ", (0, _global_styling.logicalCSS)('margin-horizontal', euiTheme.size.xs), " ", colorMode === 'DARK' && "color: ".concat(euiTheme.colors.title, ";"), "&:first-of-type{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";};label:inline;"),
|
|
30
27
|
// This nested block handles just the font styling based on compressed and reverse
|
|
31
28
|
fontStyles: {
|
|
32
29
|
normal: /*#__PURE__*/(0, _react.css)((0, _title.euiTitle)(euiThemeContext, 'xs'), ";;label:normal;"),
|
|
@@ -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,19 +1,21 @@
|
|
|
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 _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
var _beta_badge = require("../badge/beta_badge");
|
|
13
13
|
var _services = require("../../services");
|
|
14
|
+
var _beta_badge = require("../badge/beta_badge");
|
|
14
15
|
var _form = require("../form");
|
|
15
16
|
var _href_validator = require("../../services/security/href_validator");
|
|
16
17
|
var _tool_tip = require("../tool_tip");
|
|
18
|
+
var _key_pad_menu_item = require("./key_pad_menu_item.styles");
|
|
17
19
|
var _react2 = require("@emotion/react");
|
|
18
20
|
var _excluded = ["id", "isSelected", "isDisabled", "label", "children", "className", "betaBadgeLabel", "betaBadgeTooltipContent", "betaBadgeIconType", "betaBadgeTooltipProps", "href", "rel", "target", "buttonRef", "checkable", "name", "value", "disabled", "onChange"];
|
|
19
21
|
/*
|
|
@@ -23,6 +25,8 @@ var _excluded = ["id", "isSelected", "isDisabled", "label", "children", "classNa
|
|
|
23
25
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
24
26
|
* Side Public License, v 1.
|
|
25
27
|
*/
|
|
28
|
+
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); }
|
|
29
|
+
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; }
|
|
26
30
|
var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
27
31
|
var id = _ref.id,
|
|
28
32
|
isSelected = _ref.isSelected,
|
|
@@ -46,48 +50,45 @@ var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
|
46
50
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
47
51
|
var isHrefValid = !href || (0, _href_validator.validateHref)(href);
|
|
48
52
|
var isDisabled = disabled || _isDisabled || !isHrefValid;
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
'euiKeyPadMenuItem-isSelected': isSelected
|
|
54
|
-
}, className);
|
|
53
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
54
|
+
var styles = (0, _key_pad_menu_item.euiKeyPadMenuItemStyles)(euiTheme);
|
|
55
|
+
var cssStyles = [styles.euiKeyPadMenuItem, !isDisabled ? styles.enabled : styles.disabled.disabled, isSelected && (!isDisabled ? styles.selected : styles.disabled.selected)];
|
|
56
|
+
var classes = (0, _classnames.default)('euiKeyPadMenuItem', className);
|
|
55
57
|
var Element = href && !isDisabled ? 'a' : 'button';
|
|
56
58
|
if (checkable) Element = 'label';
|
|
57
59
|
var itemId = (0, _services.useGeneratedHtmlId)({
|
|
58
60
|
conditionalId: id
|
|
59
61
|
});
|
|
60
|
-
var
|
|
62
|
+
var childStyles = (0, _react.useMemo)(function () {
|
|
63
|
+
return (0, _key_pad_menu_item.euiKeyPadMenuItemChildStyles)(euiTheme);
|
|
64
|
+
}, [euiTheme]);
|
|
65
|
+
var checkableElement = (0, _react.useMemo)(function () {
|
|
61
66
|
if (!checkable) return;
|
|
62
|
-
var
|
|
63
|
-
var
|
|
67
|
+
var cssStyles = [childStyles.euiKeyPadMenuItem__checkableInput, !isSelected && isDisabled && childStyles.hideCheckableInput, !isSelected && !isDisabled && childStyles.showCheckableInputOnInteraction];
|
|
68
|
+
var sharedProps = {
|
|
69
|
+
id: itemId,
|
|
70
|
+
className: 'euiKeyPadMenuItem__checkableInput',
|
|
71
|
+
css: cssStyles,
|
|
72
|
+
checked: isSelected,
|
|
73
|
+
disabled: isDisabled,
|
|
74
|
+
name: name
|
|
75
|
+
};
|
|
64
76
|
if (checkable === 'single') {
|
|
65
|
-
|
|
66
|
-
id: itemId,
|
|
67
|
-
className: inputClasses,
|
|
68
|
-
checked: isSelected,
|
|
69
|
-
disabled: isDisabled,
|
|
70
|
-
name: name,
|
|
77
|
+
return (0, _react2.jsx)(_form.EuiRadio, (0, _extends2.default)({}, sharedProps, {
|
|
71
78
|
value: value,
|
|
72
79
|
onChange: function onChange() {
|
|
73
80
|
return _onChange(itemId, value);
|
|
74
81
|
}
|
|
75
|
-
});
|
|
82
|
+
}));
|
|
76
83
|
} else {
|
|
77
|
-
|
|
78
|
-
id: itemId,
|
|
79
|
-
className: inputClasses,
|
|
80
|
-
checked: isSelected,
|
|
81
|
-
disabled: isDisabled,
|
|
82
|
-
name: name,
|
|
84
|
+
return (0, _react2.jsx)(_form.EuiCheckbox, (0, _extends2.default)({}, sharedProps, {
|
|
83
85
|
onChange: function onChange() {
|
|
84
86
|
return _onChange(itemId);
|
|
85
87
|
}
|
|
86
|
-
});
|
|
88
|
+
}));
|
|
87
89
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
var renderBetaBadge = function renderBetaBadge() {
|
|
90
|
+
}, [checkable, isDisabled, isSelected, _onChange, value, name, itemId, childStyles]);
|
|
91
|
+
var betaBadge = (0, _react.useMemo)(function () {
|
|
91
92
|
if (!betaBadgeLabel) return;
|
|
92
93
|
return (0, _react2.jsx)(_beta_badge.EuiBetaBadge
|
|
93
94
|
// Since we move the tooltip contents to a wrapping EuiToolTip,
|
|
@@ -97,10 +98,11 @@ var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
|
97
98
|
size: "s",
|
|
98
99
|
color: "subdued",
|
|
99
100
|
className: "euiKeyPadMenuItem__betaBadge",
|
|
101
|
+
css: childStyles.euiKeyPadMenuItem__betaBadge,
|
|
100
102
|
label: betaBadgeLabel.charAt(0),
|
|
101
103
|
iconType: betaBadgeIconType
|
|
102
104
|
});
|
|
103
|
-
};
|
|
105
|
+
}, [betaBadgeLabel, betaBadgeIconType, childStyles]);
|
|
104
106
|
var relObj = {};
|
|
105
107
|
if (href && !isDisabled) {
|
|
106
108
|
relObj.href = href;
|
|
@@ -119,16 +121,20 @@ var EuiKeyPadMenuItem = function EuiKeyPadMenuItem(_ref) {
|
|
|
119
121
|
relObj['aria-pressed'] = isSelected;
|
|
120
122
|
}
|
|
121
123
|
var button = (0, _react2.jsx)(Element, (0, _extends2.default)({
|
|
122
|
-
className: classes
|
|
124
|
+
className: classes,
|
|
125
|
+
css: cssStyles
|
|
123
126
|
}, relObj, rest, {
|
|
124
127
|
// Unable to get past `LegacyRef` conflicts
|
|
125
128
|
ref: buttonRef
|
|
126
129
|
}), (0, _react2.jsx)("span", {
|
|
127
|
-
className: "euiKeyPadMenuItem__inner"
|
|
128
|
-
|
|
129
|
-
|
|
130
|
+
className: "euiKeyPadMenuItem__inner",
|
|
131
|
+
css: childStyles.euiKeyPadMenuItem__inner
|
|
132
|
+
}, checkable ? checkableElement : betaBadge, (0, _react2.jsx)("span", {
|
|
133
|
+
className: "euiKeyPadMenuItem__icon",
|
|
134
|
+
css: childStyles.euiKeyPadMenuItem__icon
|
|
130
135
|
}, children), (0, _react2.jsx)("span", {
|
|
131
|
-
className: "euiKeyPadMenuItem__label"
|
|
136
|
+
className: "euiKeyPadMenuItem__label",
|
|
137
|
+
css: childStyles.euiKeyPadMenuItem__label
|
|
132
138
|
}, label)));
|
|
133
139
|
return betaBadgeLabel ? (0, _react2.jsx)(_tool_tip.EuiToolTip, (0, _extends2.default)({}, betaBadgeTooltipProps, {
|
|
134
140
|
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
|
};
|
|
@@ -26,8 +26,17 @@ var _excluded = ["id", "type", "severity", "badgeColor", "iconType", "iconAriaLa
|
|
|
26
26
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
27
27
|
* Side Public License, v 1.
|
|
28
28
|
*/
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
*/
|
|
29
32
|
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
33
|
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; }
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated - EuiNotificationEvent is scheduled for deprecation due to low internal usage and high
|
|
36
|
+
* maintenance requirements. If necessary, we recommend copying this component into your own application.
|
|
37
|
+
*
|
|
38
|
+
* The component will be permanently removed in December 2023.
|
|
39
|
+
*/
|
|
31
40
|
var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
32
41
|
var id = _ref.id,
|
|
33
42
|
type = _ref.type,
|
|
@@ -48,6 +48,22 @@ var statusMap = {
|
|
|
48
48
|
|
|
49
49
|
// keys of _EuiSuggestItemPropsBase
|
|
50
50
|
var suggestItemPropsKeys = ['label', 'type', 'description', 'labelDisplay', 'labelWidth', 'descriptionDisplay'];
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated - EuiSuggest is scheduled for deprecation due to low internal usage and high
|
|
62
|
+
* overlap with other existing EUI components. We recommend using EuiSelectable instead,
|
|
63
|
+
* or copying this component into your own application for usage if necessary.
|
|
64
|
+
*
|
|
65
|
+
* The component will be permanently removed in October 2023.
|
|
66
|
+
*/
|
|
51
67
|
var EuiSuggest = function EuiSuggest(_ref) {
|
|
52
68
|
var onItemClick = _ref.onItemClick,
|
|
53
69
|
onBlur = _ref.onBlur,
|
|
@@ -20,6 +20,9 @@ var _excluded = ["className", "label", "type", "labelWidth", "description", "tru
|
|
|
20
20
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
21
|
* Side Public License, v 1.
|
|
22
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated
|
|
25
|
+
*/
|
|
23
26
|
var colorToClassNameMap = {
|
|
24
27
|
tint0: 'euiSuggestItem__type--tint0',
|
|
25
28
|
tint1: 'euiSuggestItem__type--tint1',
|
|
@@ -34,6 +37,14 @@ var colorToClassNameMap = {
|
|
|
34
37
|
tint10: 'euiSuggestItem__type--tint10'
|
|
35
38
|
};
|
|
36
39
|
var COLORS = (0, _common.keysOf)(colorToClassNameMap);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated - EuiSuggest is scheduled for deprecation due to low internal usage and high
|
|
43
|
+
* overlap with other existing EUI components. We recommend using EuiSelectable instead,
|
|
44
|
+
* or copying this component into your own application for usage if necessary.
|
|
45
|
+
*
|
|
46
|
+
* The component will be permanently removed in October 2023.
|
|
47
|
+
*/
|
|
37
48
|
exports.COLORS = COLORS;
|
|
38
49
|
var EuiSuggestItem = function EuiSuggestItem(_ref) {
|
|
39
50
|
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
|
*/
|