@elastic/eui 87.2.0 → 88.0.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.map +1 -1
- package/dist/eui_theme_dark.css +0 -154
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -154
- package/dist/eui_theme_light.min.css +1 -1
- 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 +0 -1
- package/es/components/description_list/description_list.js +28 -12
- 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/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/services/color_picker/color_picker.js +4 -0
- package/eui.d.ts +2348 -2255
- package/i18ntokens.json +144 -144
- 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 +0 -1
- package/lib/components/description_list/description_list.js +31 -12
- 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/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/services/color_picker/color_picker.js +4 -0
- 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 +0 -1
- package/optimize/es/components/description_list/description_list.js +20 -10
- 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/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/services/color_picker/color_picker.js +4 -0
- 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 +0 -1
- package/optimize/lib/components/description_list/description_list.js +23 -10
- 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/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/services/color_picker/color_picker.js +4 -0
- package/package.json +6 -6
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- 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 +0 -1
- package/test-env/components/description_list/description_list.js +31 -12
- 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/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/services/color_picker/color_picker.js +4 -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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
3
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
4
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
5
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
6
|
+
* Side Public License, v 1.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { css } from '@emotion/react';
|
|
10
|
+
import { transparentize } from '../../services';
|
|
11
|
+
import { logicalCSS, logicalSizeCSS, euiCanAnimate, euiFontSize } from '../../global_styling';
|
|
12
|
+
import { euiShadow } from '../../themes/amsterdam/global_styling/mixins';
|
|
13
|
+
import { euiScreenReaderOnly } from '../accessibility';
|
|
14
|
+
import { euiKeyPadMenuVariables } from './key_pad_menu.styles';
|
|
15
|
+
export var euiKeyPadMenuItemStyles = function euiKeyPadMenuItemStyles(euiThemeContext) {
|
|
16
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
17
|
+
var _euiKeyPadMenuVariabl = euiKeyPadMenuVariables(euiThemeContext),
|
|
18
|
+
euiKeyPadMenuSize = _euiKeyPadMenuVariabl.euiKeyPadMenuSize;
|
|
19
|
+
return {
|
|
20
|
+
euiKeyPadMenuItem: /*#__PURE__*/css("display:block;padding:", euiTheme.size.xs, ";", logicalSizeCSS(euiKeyPadMenuSize), " border-radius:", euiTheme.border.radius.medium, ";color:", euiTheme.colors.text, ";", euiCanAnimate, "{transition:background-color ", euiTheme.animation.fast, " ease-in,box-shadow ", euiTheme.animation.fast, " ease-in;};label:euiKeyPadMenuItem;"),
|
|
21
|
+
enabled: /*#__PURE__*/css("&:hover,&:focus,&:focus-within{cursor:pointer;text-decoration:underline;", euiShadow(euiThemeContext, 's'), " ", euiCanAnimate, "{.euiKeyPadMenuItem__icon{transform:translateY(0);}}}&:focus{background-color:", euiTheme.focus.backgroundColor, ";box-shadow:none;};label:enabled;"),
|
|
22
|
+
selected: /*#__PURE__*/css("color:", euiTheme.colors.title, ";background-color:", euiTheme.focus.backgroundColor, ";&,&:hover,&:focus,&:focus-within{color:", euiTheme.colors.primaryText, ";};label:selected;"),
|
|
23
|
+
disabled: {
|
|
24
|
+
disabled: /*#__PURE__*/css("cursor:not-allowed;color:", euiTheme.colors.disabledText, ";.euiKeyPadMenuItem__icon{filter:grayscale(100%);svg *{fill:", euiTheme.colors.disabledText, ";}};label:disabled;"),
|
|
25
|
+
selected: /*#__PURE__*/css("background-color:", transparentize(euiTheme.colors.disabled, euiTheme.focus.transparency), ";;label:selected;")
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export var euiKeyPadMenuItemChildStyles = function euiKeyPadMenuItemChildStyles(euiThemeContext) {
|
|
30
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
31
|
+
var topRightChildren = "\n z-index: 3;\n position: absolute;\n ".concat(logicalCSS('top', euiTheme.size.xs), "\n ").concat(logicalCSS('right', euiTheme.size.xs), "\n ");
|
|
32
|
+
return {
|
|
33
|
+
euiKeyPadMenuItem__inner: /*#__PURE__*/css(logicalSizeCSS('100%'), " display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;;label:euiKeyPadMenuItem__inner;"),
|
|
34
|
+
euiKeyPadMenuItem__icon: /*#__PURE__*/css(logicalCSS('margin-bottom', euiTheme.size.m), " transform:translateY(2px);", euiCanAnimate, "{transition:transform ", euiTheme.animation.normal, " ", euiTheme.animation.bounce, ";};label:euiKeyPadMenuItem__icon;"),
|
|
35
|
+
euiKeyPadMenuItem__label: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), " font-weight:", euiTheme.font.weight.semiBold, ";text-align:center;;label:euiKeyPadMenuItem__label;"),
|
|
36
|
+
euiKeyPadMenuItem__betaBadge: /*#__PURE__*/css(topRightChildren, ";;label:euiKeyPadMenuItem__betaBadge;"),
|
|
37
|
+
euiKeyPadMenuItem__checkableInput: /*#__PURE__*/css(topRightChildren, " transform:scale(.75);transform-origin:top right;&&{position:absolute;};label:euiKeyPadMenuItem__checkableInput;"),
|
|
38
|
+
showCheckableInputOnInteraction: /*#__PURE__*/css(".euiKeyPadMenuItem:not(:hover, :focus, :focus-within) &{", euiScreenReaderOnly(), ";};label:showCheckableInputOnInteraction;"),
|
|
39
|
+
hideCheckableInput: /*#__PURE__*/css(euiScreenReaderOnly(), ";;label:hideCheckableInput;")
|
|
40
|
+
};
|
|
41
|
+
};
|
|
@@ -18,7 +18,17 @@ import { EuiButtonEmpty } from '../button';
|
|
|
18
18
|
import { EuiLink } from '../link';
|
|
19
19
|
import { useGeneratedHtmlId } from '../../services';
|
|
20
20
|
import { EuiNotificationEventReadIcon } from './notification_event_read_icon';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
*/
|
|
21
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated - EuiNotificationEvent is scheduled for deprecation due to low internal usage and high
|
|
28
|
+
* maintenance requirements. If necessary, we recommend copying this component into your own application.
|
|
29
|
+
*
|
|
30
|
+
* The component will be permanently removed in December 2023.
|
|
31
|
+
*/
|
|
22
32
|
export var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
23
33
|
var id = _ref.id,
|
|
24
34
|
type = _ref.type,
|
|
@@ -39,6 +39,22 @@ var statusMap = {
|
|
|
39
39
|
|
|
40
40
|
// keys of _EuiSuggestItemPropsBase
|
|
41
41
|
var suggestItemPropsKeys = ['label', 'type', 'description', 'labelDisplay', 'labelWidth', 'descriptionDisplay'];
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated - EuiSuggest is scheduled for deprecation due to low internal usage and high
|
|
53
|
+
* overlap with other existing EUI components. We recommend using EuiSelectable instead,
|
|
54
|
+
* or copying this component into your own application for usage if necessary.
|
|
55
|
+
*
|
|
56
|
+
* The component will be permanently removed in October 2023.
|
|
57
|
+
*/
|
|
42
58
|
export var EuiSuggest = function EuiSuggest(_ref) {
|
|
43
59
|
var onItemClick = _ref.onItemClick,
|
|
44
60
|
onBlur = _ref.onBlur,
|
|
@@ -13,6 +13,10 @@ import React from 'react';
|
|
|
13
13
|
import { keysOf } from '../common';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { EuiIcon } from '../icon';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated
|
|
19
|
+
*/
|
|
16
20
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
17
21
|
var colorToClassNameMap = {
|
|
18
22
|
tint0: 'euiSuggestItem__type--tint0',
|
|
@@ -28,6 +32,14 @@ var colorToClassNameMap = {
|
|
|
28
32
|
tint10: 'euiSuggestItem__type--tint10'
|
|
29
33
|
};
|
|
30
34
|
export var COLORS = keysOf(colorToClassNameMap);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated - EuiSuggest is scheduled for deprecation due to low internal usage and high
|
|
38
|
+
* overlap with other existing EUI components. We recommend using EuiSelectable instead,
|
|
39
|
+
* or copying this component into your own application for usage if necessary.
|
|
40
|
+
*
|
|
41
|
+
* The component will be permanently removed in October 2023.
|
|
42
|
+
*/
|
|
31
43
|
export var EuiSuggestItem = function EuiSuggestItem(_ref) {
|
|
32
44
|
var className = _ref.className,
|
|
33
45
|
label = _ref.label,
|
|
@@ -13,6 +13,10 @@ var generateRandomColor = function generateRandomColor() {
|
|
|
13
13
|
"#".concat(Math.floor(Math.random() * 16777215).toString(16))
|
|
14
14
|
);
|
|
15
15
|
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated
|
|
19
|
+
*/
|
|
16
20
|
export var useColorStopsState = function useColorStopsState() {
|
|
17
21
|
var useRandomColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
18
22
|
var initialColorStops = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [{
|
|
@@ -34,7 +34,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
34
34
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
35
35
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
36
36
|
* Side Public License, v 1.
|
|
37
|
-
*/
|
|
37
|
+
*/ /**
|
|
38
|
+
* @deprecated
|
|
39
|
+
*/
|
|
38
40
|
// Because of how the thumbs are rendered in the popover, using ref results in an infinite loop.
|
|
39
41
|
// We'll instead use old fashioned namespaced DOM selectors to get references
|
|
40
42
|
var STOP_ATTR = 'euiColorStop_';
|
|
@@ -89,6 +91,13 @@ function getRangeMax(colorStops, max) {
|
|
|
89
91
|
}
|
|
90
92
|
return DEFAULT_MAX;
|
|
91
93
|
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated - EuiColorStops is scheduled for deprecation due to low internal usage and high
|
|
97
|
+
* maintenance requirements. If necessary, we recommend copying this component into your own application.
|
|
98
|
+
*
|
|
99
|
+
* The component will be permanently removed in October 2023.
|
|
100
|
+
*/
|
|
92
101
|
var EuiColorStops = function EuiColorStops(_ref) {
|
|
93
102
|
var _ref$addColor = _ref.addColor,
|
|
94
103
|
addColor = _ref$addColor === void 0 ? _services.DEFAULT_VISUALIZATION_COLOR : _ref$addColor,
|
|
@@ -61,7 +61,16 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
61
61
|
*/ /**
|
|
62
62
|
* Icon can extend EuiButtonIcon
|
|
63
63
|
* Also omits `iconType` and `id` as these are also specific to icon control
|
|
64
|
-
*/
|
|
64
|
+
*/ /**
|
|
65
|
+
* @deprecated
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated - EuiControlBar is scheduled for deprecation due to low internal usage and high
|
|
69
|
+
* overlap with other existing EUI components. We recommend using EuiBottomBar instead,
|
|
70
|
+
* or copying this component into your own application for usage if necessary.
|
|
71
|
+
*
|
|
72
|
+
* The component will be permanently removed in December 2023.
|
|
73
|
+
*/
|
|
65
74
|
var EuiControlBar = /*#__PURE__*/function (_Component) {
|
|
66
75
|
(0, _inherits2.default)(EuiControlBar, _Component);
|
|
67
76
|
var _super = _createSuper(EuiControlBar);
|
|
@@ -66,7 +66,6 @@ var useDataGridKeyboardShortcuts = function useDataGridKeyboardShortcuts() {
|
|
|
66
66
|
type: "column",
|
|
67
67
|
align: "center",
|
|
68
68
|
compressed: true,
|
|
69
|
-
gutterSize: "s",
|
|
70
69
|
listItems: [{
|
|
71
70
|
title: (0, _react2.jsx)("kbd", null, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
72
71
|
token: "euiKeyboardShortcuts.upArrowTitle",
|
|
@@ -1,21 +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.EuiDescriptionList = 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"));
|
|
13
|
+
var _services = require("../../services");
|
|
14
|
+
var _description_list_context = require("./description_list_context");
|
|
12
15
|
var _description_list_title = require("./description_list_title");
|
|
13
16
|
var _description_list_description = require("./description_list_description");
|
|
14
|
-
var _services = require("../../services");
|
|
15
17
|
var _description_list = require("./description_list.styles");
|
|
16
|
-
var _description_list_context = require("./description_list_context");
|
|
17
18
|
var _react2 = require("@emotion/react");
|
|
18
|
-
var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "
|
|
19
|
+
var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "rowGutterSize", "columnGutterSize"];
|
|
19
20
|
/*
|
|
20
21
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
21
22
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -23,6 +24,8 @@ var _excluded = ["align", "children", "className", "compressed", "descriptionPro
|
|
|
23
24
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
24
25
|
* Side Public License, v 1.
|
|
25
26
|
*/
|
|
27
|
+
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); }
|
|
28
|
+
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
29
|
var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
27
30
|
var _ref$align = _ref.align,
|
|
28
31
|
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
@@ -36,13 +39,23 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
36
39
|
textStyle = _ref$textStyle === void 0 ? 'normal' : _ref$textStyle,
|
|
37
40
|
titleProps = _ref.titleProps,
|
|
38
41
|
_ref$type = _ref.type,
|
|
39
|
-
|
|
40
|
-
_ref$
|
|
41
|
-
|
|
42
|
+
_type = _ref$type === void 0 ? 'row' : _ref$type,
|
|
43
|
+
_ref$rowGutterSize = _ref.rowGutterSize,
|
|
44
|
+
rowGutterSize = _ref$rowGutterSize === void 0 ? 's' : _ref$rowGutterSize,
|
|
45
|
+
_ref$columnGutterSize = _ref.columnGutterSize,
|
|
46
|
+
columnGutterSize = _ref$columnGutterSize === void 0 ? 's' : _ref$columnGutterSize,
|
|
42
47
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
|
+
var showResponsiveColumns = (0, _services.useIsWithinBreakpoints)(['xs', 's']);
|
|
49
|
+
var type = (0, _react.useMemo)(function () {
|
|
50
|
+
if (_type === 'responsiveColumn') {
|
|
51
|
+
return showResponsiveColumns ? 'row' : 'column';
|
|
52
|
+
} else {
|
|
53
|
+
return _type;
|
|
54
|
+
}
|
|
55
|
+
}, [_type, showResponsiveColumns]);
|
|
43
56
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
44
57
|
var styles = (0, _description_list.euiDescriptionListStyles)(euiTheme);
|
|
45
|
-
var cssStyles = [styles.euiDescriptionList, styles[type], styles[align]];
|
|
58
|
+
var cssStyles = [styles.euiDescriptionList, styles[type], styles[align], type === 'column' && styles.rowGap[rowGutterSize], type === 'column' && styles.columnGap[columnGutterSize]];
|
|
46
59
|
var classes = (0, _classnames.default)('euiDescriptionList', className);
|
|
47
60
|
var childrenOrListItems = null;
|
|
48
61
|
if (listItems) {
|
|
@@ -62,13 +75,13 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
62
75
|
compressed: compressed,
|
|
63
76
|
textStyle: textStyle,
|
|
64
77
|
align: align,
|
|
65
|
-
|
|
78
|
+
rowGutterSize: rowGutterSize
|
|
66
79
|
}
|
|
67
80
|
}, (0, _react2.jsx)("dl", (0, _extends2.default)({
|
|
68
81
|
className: classes,
|
|
69
82
|
css: cssStyles
|
|
70
83
|
}, rest, {
|
|
71
|
-
"data-type":
|
|
84
|
+
"data-type": _type
|
|
72
85
|
}), childrenOrListItems));
|
|
73
86
|
};
|
|
74
87
|
exports.EuiDescriptionList = EuiDescriptionList;
|
|
@@ -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;
|