@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
|
@@ -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];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elastic/eui",
|
|
3
3
|
"description": "Elastic UI Component Library",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "88.1.0",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "lib",
|
|
7
7
|
"module": "es",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@hello-pangea/dnd": "^16.2.0",
|
|
68
68
|
"@types/lodash": "^4.14.194",
|
|
69
|
-
"@types/numeral": "^
|
|
69
|
+
"@types/numeral": "^2.0.2",
|
|
70
70
|
"@types/react-input-autosize": "^2.2.1",
|
|
71
71
|
"@types/react-window": "^1.8.5",
|
|
72
|
-
"@types/refractor": "^3.0.
|
|
73
|
-
"@types/resize-observer-browser": "^0.1.
|
|
72
|
+
"@types/refractor": "^3.0.2",
|
|
73
|
+
"@types/resize-observer-browser": "^0.1.7",
|
|
74
74
|
"@types/vfile-message": "^2.0.0",
|
|
75
75
|
"chroma-js": "^2.4.2",
|
|
76
76
|
"classnames": "^2.3.2",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"react-window": "^1.8.9",
|
|
89
89
|
"refractor": "^3.5.0",
|
|
90
90
|
"rehype-raw": "^5.0.0",
|
|
91
|
-
"rehype-react": "^6.
|
|
91
|
+
"rehype-react": "^6.2.1",
|
|
92
92
|
"rehype-stringify": "^8.0.0",
|
|
93
93
|
"remark-breaks": "^2.0.2",
|
|
94
94
|
"remark-emoji": "^2.1.0",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"remark-rehype": "^8.0.0",
|
|
97
97
|
"tabbable": "^5.3.3",
|
|
98
98
|
"text-diff": "^1.0.1",
|
|
99
|
-
"unified": "^9.2.
|
|
99
|
+
"unified": "^9.2.2",
|
|
100
100
|
"unist-util-visit": "^2.0.3",
|
|
101
101
|
"url-parse": "^1.5.10",
|
|
102
102
|
"uuid": "^8.3.0",
|
|
@@ -23,7 +23,7 @@ var _context = require("./context");
|
|
|
23
23
|
var _collapsible_nav_button = require("./collapsible_nav_button");
|
|
24
24
|
var _collapsible_nav_beta = require("./collapsible_nav_beta.styles");
|
|
25
25
|
var _react2 = require("@emotion/react");
|
|
26
|
-
var _excluded = ["id", "children", "className", "style", "initialIsCollapsed", "width", "side", "focusTrapProps"];
|
|
26
|
+
var _excluded = ["id", "children", "className", "style", "initialIsCollapsed", "onCollapseToggle", "width", "side", "focusTrapProps"];
|
|
27
27
|
/*
|
|
28
28
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
29
29
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -42,6 +42,7 @@ var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
|
|
|
42
42
|
style = _ref.style,
|
|
43
43
|
_ref$initialIsCollaps = _ref.initialIsCollapsed,
|
|
44
44
|
initialIsCollapsed = _ref$initialIsCollaps === void 0 ? false : _ref$initialIsCollaps,
|
|
45
|
+
onCollapseToggle = _ref.onCollapseToggle,
|
|
45
46
|
_ref$width = _ref.width,
|
|
46
47
|
_width = _ref$width === void 0 ? 248 : _ref$width,
|
|
47
48
|
_ref$side = _ref.side,
|
|
@@ -60,9 +61,10 @@ var EuiCollapsibleNavBeta = function EuiCollapsibleNavBeta(_ref) {
|
|
|
60
61
|
setIsCollapsed = _useState2[1];
|
|
61
62
|
var toggleCollapsed = (0, _react.useCallback)(function () {
|
|
62
63
|
return setIsCollapsed(function (isCollapsed) {
|
|
64
|
+
onCollapseToggle === null || onCollapseToggle === void 0 ? void 0 : onCollapseToggle(!isCollapsed);
|
|
63
65
|
return !isCollapsed;
|
|
64
66
|
});
|
|
65
|
-
}, []);
|
|
67
|
+
}, [onCollapseToggle]);
|
|
66
68
|
var onClose = (0, _react.useCallback)(function () {
|
|
67
69
|
return setIsCollapsed(true);
|
|
68
70
|
}, []);
|
|
@@ -200,6 +202,11 @@ EuiCollapsibleNavBeta.propTypes = {
|
|
|
200
202
|
* Whether the navigation flyout should default to initially collapsed or expanded
|
|
201
203
|
*/
|
|
202
204
|
initialIsCollapsed: _propTypes.default.bool,
|
|
205
|
+
/**
|
|
206
|
+
* Optional callback that fires when the user toggles the nav between
|
|
207
|
+
* collapsed and uncollapsed states
|
|
208
|
+
*/
|
|
209
|
+
onCollapseToggle: _propTypes.default.func,
|
|
203
210
|
/**
|
|
204
211
|
* Defaults to 248px wide. The navigation width determines behavior at
|
|
205
212
|
* various responsive breakpoints.
|
|
@@ -65,13 +65,10 @@ EuiColorPaletteDisplay.propTypes = {
|
|
|
65
65
|
"data-test-subj": _propTypes.default.string,
|
|
66
66
|
css: _propTypes.default.any,
|
|
67
67
|
/**
|
|
68
|
-
* Array of color `strings` or an array of #
|
|
68
|
+
* Array of color `strings` or an array of #PaletteColorStop. The stops must be numbers in an ordered range.
|
|
69
69
|
*/
|
|
70
70
|
/**
|
|
71
|
-
* Array of color `strings` or an array of #
|
|
71
|
+
* Array of color `strings` or an array of #PaletteColorStop. The stops must be numbers in an ordered range.
|
|
72
72
|
*/
|
|
73
|
-
palette: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired, _propTypes.default.arrayOf(_propTypes.default.
|
|
74
|
-
stop: _propTypes.default.number.isRequired,
|
|
75
|
-
color: _propTypes.default.string.isRequired
|
|
76
|
-
}).isRequired).isRequired]).isRequired
|
|
73
|
+
palette: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired, _propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired]).isRequired
|
|
77
74
|
};
|
package/test-env/components/color_picker/color_palette_display/color_palette_display_fixed.js
CHANGED
|
@@ -47,10 +47,7 @@ EuiColorPaletteDisplayFixed.propTypes = {
|
|
|
47
47
|
"data-test-subj": _propTypes.default.string,
|
|
48
48
|
css: _propTypes.default.any,
|
|
49
49
|
/**
|
|
50
|
-
* Array of color `strings` or an array of #
|
|
50
|
+
* Array of color `strings` or an array of #PaletteColorStop. The stops must be numbers in an ordered range.
|
|
51
51
|
*/
|
|
52
|
-
palette: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired, _propTypes.default.arrayOf(_propTypes.default.
|
|
53
|
-
stop: _propTypes.default.number.isRequired,
|
|
54
|
-
color: _propTypes.default.string.isRequired
|
|
55
|
-
}).isRequired).isRequired]).isRequired
|
|
52
|
+
palette: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired, _propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired]).isRequired
|
|
56
53
|
};
|
package/test-env/components/color_picker/color_palette_display/color_palette_display_gradient.js
CHANGED
|
@@ -46,10 +46,7 @@ EuiColorPaletteDisplayGradient.propTypes = {
|
|
|
46
46
|
"data-test-subj": _propTypes.default.string,
|
|
47
47
|
css: _propTypes.default.any,
|
|
48
48
|
/**
|
|
49
|
-
* Array of color `strings` or an array of #
|
|
49
|
+
* Array of color `strings` or an array of #PaletteColorStop. The stops must be numbers in an ordered range.
|
|
50
50
|
*/
|
|
51
|
-
palette: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired, _propTypes.default.arrayOf(_propTypes.default.
|
|
52
|
-
stop: _propTypes.default.number.isRequired,
|
|
53
|
-
color: _propTypes.default.string.isRequired
|
|
54
|
-
}).isRequired).isRequired]).isRequired
|
|
51
|
+
palette: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired, _propTypes.default.arrayOf(_propTypes.default.any.isRequired).isRequired]).isRequired
|
|
55
52
|
};
|
|
@@ -176,7 +176,7 @@ EuiColorPalettePicker.propTypes = {
|
|
|
176
176
|
*/
|
|
177
177
|
type: _propTypes.default.oneOf(["text"]).isRequired,
|
|
178
178
|
/**
|
|
179
|
-
* Array of color `strings` or an array of #
|
|
179
|
+
* Array of color `strings` or an array of #PaletteColorStop. The stops must be numbers in an ordered range.
|
|
180
180
|
*/
|
|
181
181
|
palette: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired, _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
182
182
|
stop: _propTypes.default.number.isRequired,
|
|
@@ -200,7 +200,7 @@ EuiColorPalettePicker.propTypes = {
|
|
|
200
200
|
*/
|
|
201
201
|
type: _propTypes.default.oneOf(["fixed"]).isRequired,
|
|
202
202
|
/**
|
|
203
|
-
* Array of color `strings` or an array of #
|
|
203
|
+
* Array of color `strings` or an array of #PaletteColorStop. The stops must be numbers in an ordered range.
|
|
204
204
|
*/
|
|
205
205
|
palette: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired, _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
206
206
|
stop: _propTypes.default.number.isRequired,
|
|
@@ -224,7 +224,7 @@ EuiColorPalettePicker.propTypes = {
|
|
|
224
224
|
*/
|
|
225
225
|
type: _propTypes.default.oneOf(["gradient"]).isRequired,
|
|
226
226
|
/**
|
|
227
|
-
* Array of color `strings` or an array of #
|
|
227
|
+
* Array of color `strings` or an array of #PaletteColorStop. The stops must be numbers in an ordered range.
|
|
228
228
|
*/
|
|
229
229
|
palette: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string.isRequired).isRequired, _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
230
230
|
stop: _propTypes.default.number.isRequired,
|
|
@@ -35,7 +35,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
35
35
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
36
36
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
37
37
|
* Side Public License, v 1.
|
|
38
|
-
*/
|
|
38
|
+
*/ /**
|
|
39
|
+
* @deprecated
|
|
40
|
+
*/
|
|
39
41
|
// Because of how the thumbs are rendered in the popover, using ref results in an infinite loop.
|
|
40
42
|
// We'll instead use old fashioned namespaced DOM selectors to get references
|
|
41
43
|
var STOP_ATTR = 'euiColorStop_';
|
|
@@ -90,6 +92,13 @@ function getRangeMax(colorStops, max) {
|
|
|
90
92
|
}
|
|
91
93
|
return DEFAULT_MAX;
|
|
92
94
|
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @deprecated - EuiColorStops is scheduled for deprecation due to low internal usage and high
|
|
98
|
+
* maintenance requirements. If necessary, we recommend copying this component into your own application.
|
|
99
|
+
*
|
|
100
|
+
* The component will be permanently removed in October 2023.
|
|
101
|
+
*/
|
|
93
102
|
var EuiColorStops = function EuiColorStops(_ref) {
|
|
94
103
|
var _ref$addColor = _ref.addColor,
|
|
95
104
|
addColor = _ref$addColor === void 0 ? _services.DEFAULT_VISUALIZATION_COLOR : _ref$addColor,
|
|
@@ -62,7 +62,16 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
62
62
|
*/ /**
|
|
63
63
|
* Icon can extend EuiButtonIcon
|
|
64
64
|
* Also omits `iconType` and `id` as these are also specific to icon control
|
|
65
|
-
*/
|
|
65
|
+
*/ /**
|
|
66
|
+
* @deprecated
|
|
67
|
+
*/
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated - EuiControlBar is scheduled for deprecation due to low internal usage and high
|
|
70
|
+
* overlap with other existing EUI components. We recommend using EuiBottomBar instead,
|
|
71
|
+
* or copying this component into your own application for usage if necessary.
|
|
72
|
+
*
|
|
73
|
+
* The component will be permanently removed in December 2023.
|
|
74
|
+
*/
|
|
66
75
|
var EuiControlBar = /*#__PURE__*/function (_Component) {
|
|
67
76
|
(0, _inherits2.default)(EuiControlBar, _Component);
|
|
68
77
|
var _super = _createSuper(EuiControlBar);
|
|
@@ -64,9 +64,9 @@ var useDataGridKeyboardShortcuts = function useDataGridKeyboardShortcuts() {
|
|
|
64
64
|
}, (0, _react2.jsx)(_description_list.EuiDescriptionList, {
|
|
65
65
|
"aria-labelledby": titleId,
|
|
66
66
|
type: "column",
|
|
67
|
+
columnWidths: [1, 3],
|
|
67
68
|
align: "center",
|
|
68
69
|
compressed: true,
|
|
69
|
-
gutterSize: "s",
|
|
70
70
|
listItems: [{
|
|
71
71
|
title: (0, _react2.jsx)("kbd", null, (0, _react2.jsx)(_i18n.EuiI18n, {
|
|
72
72
|
token: "euiKeyboardShortcuts.upArrowTitle",
|
|
@@ -1,22 +1,24 @@
|
|
|
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"));
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
-
var _react =
|
|
12
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
var _services = require("../../services");
|
|
16
|
+
var _description_list_context = require("./description_list_context");
|
|
13
17
|
var _description_list_title = require("./description_list_title");
|
|
14
18
|
var _description_list_description = require("./description_list_description");
|
|
15
|
-
var _services = require("../../services");
|
|
16
19
|
var _description_list = require("./description_list.styles");
|
|
17
|
-
var _description_list_context = require("./description_list_context");
|
|
18
20
|
var _react2 = require("@emotion/react");
|
|
19
|
-
var _excluded = ["align", "children", "className", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "
|
|
21
|
+
var _excluded = ["align", "children", "className", "style", "compressed", "descriptionProps", "listItems", "textStyle", "titleProps", "type", "rowGutterSize", "columnGutterSize", "columnWidths"];
|
|
20
22
|
/*
|
|
21
23
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
22
24
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -24,11 +26,16 @@ var _excluded = ["align", "children", "className", "compressed", "descriptionPro
|
|
|
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; }
|
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
27
33
|
var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
28
34
|
var _ref$align = _ref.align,
|
|
29
35
|
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
30
36
|
children = _ref.children,
|
|
31
37
|
className = _ref.className,
|
|
38
|
+
style = _ref.style,
|
|
32
39
|
_ref$compressed = _ref.compressed,
|
|
33
40
|
compressed = _ref$compressed === void 0 ? false : _ref$compressed,
|
|
34
41
|
descriptionProps = _ref.descriptionProps,
|
|
@@ -37,13 +44,38 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
37
44
|
textStyle = _ref$textStyle === void 0 ? 'normal' : _ref$textStyle,
|
|
38
45
|
titleProps = _ref.titleProps,
|
|
39
46
|
_ref$type = _ref.type,
|
|
40
|
-
|
|
41
|
-
_ref$
|
|
42
|
-
|
|
47
|
+
_type = _ref$type === void 0 ? 'row' : _ref$type,
|
|
48
|
+
_ref$rowGutterSize = _ref.rowGutterSize,
|
|
49
|
+
rowGutterSize = _ref$rowGutterSize === void 0 ? 's' : _ref$rowGutterSize,
|
|
50
|
+
_ref$columnGutterSize = _ref.columnGutterSize,
|
|
51
|
+
columnGutterSize = _ref$columnGutterSize === void 0 ? 's' : _ref$columnGutterSize,
|
|
52
|
+
columnWidths = _ref.columnWidths,
|
|
43
53
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
54
|
+
var showResponsiveColumns = (0, _services.useIsWithinBreakpoints)(['xs', 's']);
|
|
55
|
+
var type = (0, _react.useMemo)(function () {
|
|
56
|
+
if (_type === 'responsiveColumn') {
|
|
57
|
+
return showResponsiveColumns ? 'row' : 'column';
|
|
58
|
+
} else {
|
|
59
|
+
return _type;
|
|
60
|
+
}
|
|
61
|
+
}, [_type, showResponsiveColumns]);
|
|
44
62
|
var euiTheme = (0, _services.useEuiTheme)();
|
|
45
63
|
var styles = (0, _description_list.euiDescriptionListStyles)(euiTheme);
|
|
46
|
-
var cssStyles = [styles.euiDescriptionList, styles[type], styles[align]];
|
|
64
|
+
var cssStyles = [styles.euiDescriptionList, styles[type], styles[align], type === 'column' && styles.rowGap[rowGutterSize], type === 'column' && styles.columnGap[columnGutterSize]];
|
|
65
|
+
var inlineStyles = (0, _react.useMemo)(function () {
|
|
66
|
+
if (type === 'column' && columnWidths) {
|
|
67
|
+
// Leave string values as is - e.g. if a consumer passes in a specific '200px' or 'minmax()'
|
|
68
|
+
var convertNumbersToFr = function convertNumbersToFr(value) {
|
|
69
|
+
return typeof value === 'number' ? "".concat(value, "fr") : value;
|
|
70
|
+
};
|
|
71
|
+
var titleWidth = convertNumbersToFr(columnWidths[0]);
|
|
72
|
+
var descriptionWidth = convertNumbersToFr(columnWidths[1]);
|
|
73
|
+
return _objectSpread({
|
|
74
|
+
gridTemplateColumns: "".concat(titleWidth, " ").concat(descriptionWidth)
|
|
75
|
+
}, style);
|
|
76
|
+
}
|
|
77
|
+
return style;
|
|
78
|
+
}, [style, type, columnWidths]);
|
|
47
79
|
var classes = (0, _classnames.default)('euiDescriptionList', className);
|
|
48
80
|
var childrenOrListItems = null;
|
|
49
81
|
if (listItems) {
|
|
@@ -63,13 +95,14 @@ var EuiDescriptionList = function EuiDescriptionList(_ref) {
|
|
|
63
95
|
compressed: compressed,
|
|
64
96
|
textStyle: textStyle,
|
|
65
97
|
align: align,
|
|
66
|
-
|
|
98
|
+
rowGutterSize: rowGutterSize
|
|
67
99
|
}
|
|
68
100
|
}, (0, _react2.jsx)("dl", (0, _extends2.default)({
|
|
69
101
|
className: classes,
|
|
70
|
-
css: cssStyles
|
|
102
|
+
css: cssStyles,
|
|
103
|
+
style: inlineStyles
|
|
71
104
|
}, rest, {
|
|
72
|
-
"data-type":
|
|
105
|
+
"data-type": _type
|
|
73
106
|
}), childrenOrListItems));
|
|
74
107
|
};
|
|
75
108
|
exports.EuiDescriptionList = EuiDescriptionList;
|
|
@@ -118,7 +151,27 @@ EuiDescriptionList.propTypes = {
|
|
|
118
151
|
css: _propTypes.default.any
|
|
119
152
|
}),
|
|
120
153
|
/**
|
|
121
|
-
*
|
|
154
|
+
* Allows customizing the vertical spacing between rows.
|
|
155
|
+
*/
|
|
156
|
+
rowGutterSize: _propTypes.default.any,
|
|
157
|
+
/**
|
|
158
|
+
* Allows customizing the horizontal spacing between columns.
|
|
159
|
+
*
|
|
160
|
+
* Only applies to `column` and `responsiveColumn` types.
|
|
161
|
+
*/
|
|
162
|
+
columnGutterSize: _propTypes.default.any,
|
|
163
|
+
/**
|
|
164
|
+
* Allows customizing specific column widths (e.g. `['100px', '200px']`). The first
|
|
165
|
+
* array value applies to the title column, and the second applies to the description column.
|
|
166
|
+
*
|
|
167
|
+
* Passing numbers instead of CSS width strings will use a ratio of widths.
|
|
168
|
+
* For example, [1, 3] will render a description column 3x the width of the title column.
|
|
169
|
+
* In other words, descriptions will have a width of `75%` and titles will have a width of `25%`.
|
|
170
|
+
*
|
|
171
|
+
* Only applies to `column` and `responsiveColumn` types.
|
|
172
|
+
*
|
|
173
|
+
* _Advanced usage note:_ column width strings also accept [CSS grid special units,
|
|
174
|
+
* sizing, keywords, and sizing functions](https://css-tricks.com/snippets/css/complete-guide-grid/#aa-special-units-functions).
|
|
122
175
|
*/
|
|
123
|
-
|
|
176
|
+
columnWidths: _propTypes.default.any
|
|
124
177
|
};
|
|
@@ -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);
|
|
@@ -13,8 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
var _services = require("../../services");
|
|
16
|
-
var _description_list_description = require("./description_list_description.styles");
|
|
17
16
|
var _description_list_context = require("./description_list_context");
|
|
17
|
+
var _description_list_description = require("./description_list_description.styles");
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
var _excluded = ["children", "className"];
|
|
20
20
|
/*
|
|
@@ -35,9 +35,7 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
|
|
|
35
35
|
type = _useContext.type,
|
|
36
36
|
textStyle = _useContext.textStyle,
|
|
37
37
|
compressed = _useContext.compressed,
|
|
38
|
-
align = _useContext.align
|
|
39
|
-
gutterSize = _useContext.gutterSize;
|
|
40
|
-
var showResponsiveColumns = (0, _services.useIsWithinMinBreakpoint)('m');
|
|
38
|
+
align = _useContext.align;
|
|
41
39
|
var theme = (0, _services.useEuiTheme)();
|
|
42
40
|
var styles = (0, _description_list_description.euiDescriptionListDescriptionStyles)(theme);
|
|
43
41
|
var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
@@ -45,14 +43,10 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
|
|
|
45
43
|
case 'inline':
|
|
46
44
|
conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
|
|
47
45
|
break;
|
|
48
|
-
case 'responsiveColumn':
|
|
49
46
|
case 'column':
|
|
50
47
|
if (align === 'center') {
|
|
51
48
|
conditionalStyles.push(styles.left);
|
|
52
49
|
}
|
|
53
|
-
if (type === 'column' || showResponsiveColumns) {
|
|
54
|
-
conditionalStyles.push(styles[gutterSize]);
|
|
55
|
-
}
|
|
56
50
|
break;
|
|
57
51
|
}
|
|
58
52
|
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;
|
|
@@ -13,8 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
var _services = require("../../services");
|
|
16
|
-
var _description_list_title = require("./description_list_title.styles");
|
|
17
16
|
var _description_list_context = require("./description_list_context");
|
|
17
|
+
var _description_list_title = require("./description_list_title.styles");
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
var _excluded = ["children", "className"];
|
|
20
20
|
/*
|
|
@@ -36,22 +36,25 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
36
36
|
textStyle = _useContext.textStyle,
|
|
37
37
|
compressed = _useContext.compressed,
|
|
38
38
|
align = _useContext.align,
|
|
39
|
-
|
|
39
|
+
rowGutterSize = _useContext.rowGutterSize;
|
|
40
40
|
var theme = (0, _services.useEuiTheme)();
|
|
41
41
|
var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
|
|
42
42
|
var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
43
43
|
switch (type) {
|
|
44
44
|
case 'inline':
|
|
45
45
|
conditionalStyles = compressed ? [styles.inlineStyles.compressed] : [styles.inlineStyles.normal];
|
|
46
|
+
conditionalStyles.push(styles[rowGutterSize]);
|
|
47
|
+
break;
|
|
48
|
+
case 'row':
|
|
49
|
+
conditionalStyles.push(styles[rowGutterSize]);
|
|
46
50
|
break;
|
|
47
|
-
case 'responsiveColumn':
|
|
48
51
|
case 'column':
|
|
49
52
|
if (align === 'center') {
|
|
50
53
|
conditionalStyles.push(styles.right);
|
|
51
54
|
}
|
|
52
55
|
break;
|
|
53
56
|
}
|
|
54
|
-
var cssStyles = [styles.euiDescriptionList__title, styles[type]
|
|
57
|
+
var cssStyles = [styles.euiDescriptionList__title, styles[type]].concat((0, _toConsumableArray2.default)(conditionalStyles));
|
|
55
58
|
var classes = (0, _classnames.default)('euiDescriptionList__title', className);
|
|
56
59
|
return (0, _react2.jsx)("dt", (0, _extends2.default)({
|
|
57
60
|
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;"),
|