@elastic/eui 64.0.0 → 64.0.3
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 +330 -330
- package/dist/eui_charts_theme.js.map +1 -1
- package/dist/eui_theme_dark.css +7 -313
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +7 -313
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/basic_table/collapsed_item_actions.js +1 -2
- package/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/es/components/button/button_display/_button_display.js +6 -1
- package/es/components/button/button_empty/button_empty.js +10 -1
- package/es/components/card/card.js +10 -1
- package/es/components/card/card_select.js +10 -1
- package/es/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -2
- package/es/components/description_list/description_list_title.js +1 -1
- package/es/components/expression/expression.js +12 -2
- package/es/components/header/header_links/header_link.js +10 -1
- package/es/components/header/header_section/header_section_item.js +4 -3
- package/es/components/image/image.js +6 -1
- package/es/components/image/image_button.styles.js +1 -1
- package/es/components/link/link.styles.js +6 -5
- package/es/components/notification/notification_event.js +10 -1
- package/es/components/page/page_content/page_content.js +1 -2
- package/es/components/page/page_content/page_content_body.js +1 -2
- package/es/components/page/page_content/page_content_header.js +1 -2
- package/es/components/page/page_content/page_content_header_section.js +1 -2
- package/es/components/page/page_section/page_section.js +15 -3
- package/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/es/components/page/page_sidebar/page_sidebar.js +5 -1
- package/es/components/page/page_template.js +3 -1
- package/es/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/es/components/page_template/page_template.js +18 -2
- package/es/components/pagination/pagination_button.js +10 -1
- package/es/components/progress/progress.js +6 -1
- package/es/components/provider/cache/cache_provider.js +3 -9
- package/es/components/provider/provider.js +25 -2
- package/es/components/resizable_container/resizable_panel.js +6 -1
- package/es/components/side_nav/side_nav.js +5 -0
- package/es/components/text/text.styles.js +1 -1
- package/es/components/toast/global_toast_list.styles.js +2 -2
- package/es/global_styling/functions/logicals.js +16 -2
- package/es/global_styling/mixins/_helpers.js +11 -4
- package/es/global_styling/mixins/_states.js +3 -4
- package/es/global_styling/mixins/_typography.js +3 -1
- package/es/global_styling/reset/global_styles.js +1 -1
- package/es/global_styling/utility/utility.js +10 -2
- package/es/services/theme/hooks.js +11 -16
- package/eui.d.ts +98 -79
- package/i18ntokens.json +8 -8
- package/lib/components/basic_table/collapsed_item_actions.js +1 -2
- package/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/lib/components/button/button_display/_button_display.js +6 -1
- package/lib/components/button/button_empty/button_empty.js +10 -1
- package/lib/components/card/card.js +10 -1
- package/lib/components/card/card_select.js +10 -1
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/lib/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/lib/components/description_list/description_list_title.js +1 -1
- package/lib/components/expression/expression.js +12 -2
- package/lib/components/header/header_links/header_link.js +10 -1
- package/lib/components/header/header_section/header_section_item.js +4 -3
- package/lib/components/image/image.js +6 -1
- package/lib/components/image/image_button.styles.js +1 -1
- package/lib/components/link/link.styles.js +6 -5
- package/lib/components/notification/notification_event.js +10 -1
- package/lib/components/page/page_content/page_content.js +1 -2
- package/lib/components/page/page_content/page_content_body.js +1 -2
- package/lib/components/page/page_content/page_content_header.js +1 -2
- package/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/lib/components/page/page_section/page_section.js +15 -3
- package/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/lib/components/page/page_sidebar/page_sidebar.js +5 -1
- package/lib/components/page/page_template.js +3 -1
- package/lib/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/lib/components/page_template/page_template.js +18 -2
- package/lib/components/progress/progress.js +6 -1
- package/lib/components/provider/cache/cache_provider.js +3 -11
- package/lib/components/provider/provider.js +31 -6
- package/lib/components/resizable_container/resizable_panel.js +6 -1
- package/lib/components/side_nav/side_nav.js +5 -0
- package/lib/components/text/text.styles.js +1 -1
- package/lib/components/toast/global_toast_list.styles.js +1 -1
- package/lib/global_styling/functions/logicals.js +21 -4
- package/lib/global_styling/mixins/_helpers.js +17 -6
- package/lib/global_styling/mixins/_states.js +3 -4
- package/lib/global_styling/mixins/_typography.js +4 -1
- package/lib/global_styling/reset/global_styles.js +1 -1
- package/lib/global_styling/utility/utility.js +16 -3
- package/lib/services/theme/hooks.js +10 -15
- package/optimize/es/components/basic_table/collapsed_item_actions.js +1 -2
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js +0 -1
- package/optimize/es/components/description_list/description_list_title.js +1 -1
- package/optimize/es/components/header/header_section/header_section_item.js +4 -3
- package/optimize/es/components/image/image_button.styles.js +1 -1
- package/optimize/es/components/link/link.styles.js +6 -5
- package/optimize/es/components/page/page_content/page_content.js +1 -2
- package/optimize/es/components/page/page_content/page_content_body.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header.js +1 -2
- package/optimize/es/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/es/components/page/page_section/page_section.js +4 -2
- package/optimize/es/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/es/components/page/page_sidebar/page_sidebar.js +5 -1
- package/optimize/es/components/page/page_template.js +3 -1
- package/optimize/es/components/provider/cache/cache_provider.js +3 -9
- package/optimize/es/components/provider/provider.js +25 -2
- package/optimize/es/components/text/text.styles.js +1 -1
- package/optimize/es/components/toast/global_toast_list.styles.js +2 -2
- package/optimize/es/global_styling/functions/logicals.js +16 -2
- package/optimize/es/global_styling/mixins/_helpers.js +11 -4
- package/optimize/es/global_styling/mixins/_states.js +3 -4
- package/optimize/es/global_styling/mixins/_typography.js +3 -1
- package/optimize/es/global_styling/reset/global_styles.js +1 -1
- package/optimize/es/global_styling/utility/utility.js +10 -2
- package/optimize/es/services/theme/hooks.js +11 -16
- package/optimize/lib/components/basic_table/collapsed_item_actions.js +1 -2
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/optimize/lib/components/description_list/description_list_title.js +1 -1
- package/optimize/lib/components/header/header_section/header_section_item.js +4 -3
- package/optimize/lib/components/image/image_button.styles.js +1 -1
- package/optimize/lib/components/link/link.styles.js +6 -5
- package/optimize/lib/components/page/page_content/page_content.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_body.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header.js +1 -2
- package/optimize/lib/components/page/page_content/page_content_header_section.js +1 -2
- package/optimize/lib/components/page/page_section/page_section.js +4 -2
- package/optimize/lib/components/page/page_side_bar/page_side_bar.js +1 -2
- package/optimize/lib/components/page/page_sidebar/page_sidebar.js +5 -1
- package/optimize/lib/components/page/page_template.js +3 -1
- package/optimize/lib/components/provider/cache/cache_provider.js +3 -11
- package/optimize/lib/components/provider/provider.js +31 -6
- package/optimize/lib/components/text/text.styles.js +1 -1
- package/optimize/lib/components/toast/global_toast_list.styles.js +1 -1
- package/optimize/lib/global_styling/functions/logicals.js +21 -4
- package/optimize/lib/global_styling/mixins/_helpers.js +17 -6
- package/optimize/lib/global_styling/mixins/_states.js +3 -4
- package/optimize/lib/global_styling/mixins/_typography.js +4 -1
- package/optimize/lib/global_styling/reset/global_styles.js +1 -1
- package/optimize/lib/global_styling/utility/utility.js +16 -3
- package/optimize/lib/services/theme/hooks.js +10 -15
- package/package.json +1 -1
- package/src/components/datagrid/_data_grid_data_row.scss +7 -0
- package/src/components/header/header_section/_header_section_item.scss +1 -1
- package/src/global_styling/mixins/_helpers.scss +9 -0
- package/src/global_styling/utility/_utility.scss +0 -127
- package/test-env/components/basic_table/collapsed_item_actions.js +1 -2
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +2 -2
- package/test-env/components/button/button_display/_button_display.js +6 -1
- package/test-env/components/button/button_empty/button_empty.js +10 -1
- package/test-env/components/card/card.js +10 -1
- package/test-env/components/card/card_select.js +10 -1
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +6 -1
- package/test-env/components/date_picker/super_date_picker/date_popover/date_popover_button.js +6 -1
- package/test-env/components/description_list/description_list_title.js +1 -1
- package/test-env/components/expression/expression.js +12 -2
- package/test-env/components/header/header_links/header_link.js +10 -1
- package/test-env/components/header/header_section/header_section_item.js +4 -3
- package/test-env/components/image/image.js +6 -1
- package/test-env/components/image/image_button.styles.js +1 -1
- package/test-env/components/link/link.styles.js +6 -5
- package/test-env/components/notification/notification_event.js +10 -1
- package/test-env/components/page/page_content/page_content.js +1 -2
- package/test-env/components/page/page_content/page_content_body.js +1 -2
- package/test-env/components/page/page_content/page_content_header.js +1 -2
- package/test-env/components/page/page_content/page_content_header_section.js +1 -2
- package/test-env/components/page/page_section/page_section.js +15 -3
- package/test-env/components/page/page_side_bar/page_side_bar.js +1 -2
- package/test-env/components/page/page_sidebar/page_sidebar.js +5 -1
- package/test-env/components/page/page_template.js +3 -1
- package/test-env/components/page_template/empty_prompt/page_empty_prompt.js +11 -1
- package/test-env/components/page_template/page_template.js +18 -2
- package/test-env/components/progress/progress.js +6 -1
- package/test-env/components/provider/cache/cache_provider.js +3 -11
- package/test-env/components/provider/provider.js +31 -6
- package/test-env/components/resizable_container/resizable_panel.js +6 -1
- package/test-env/components/side_nav/side_nav.js +5 -0
- package/test-env/components/text/text.styles.js +1 -1
- package/test-env/components/toast/global_toast_list.styles.js +1 -1
- package/test-env/global_styling/functions/logicals.js +21 -4
- package/test-env/global_styling/mixins/_helpers.js +17 -6
- package/test-env/global_styling/mixins/_states.js +3 -4
- package/test-env/global_styling/mixins/_typography.js +4 -1
- package/test-env/global_styling/reset/global_styles.js +1 -1
- package/test-env/global_styling/utility/utility.js +16 -3
- package/test-env/services/theme/hooks.js +10 -15
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.logicals = exports.logicalTextAlignStyle = exports.logicalTextAlignCSS = exports.logicalText = exports.logicalStyle = exports.logicalSizeStyle = exports.logicalSizeCSS = exports.logicalSide = exports.logicalCSS = exports.LOGICAL_TEXT_ALIGNMENT = exports.LOGICAL_SIDES = exports.LOGICAL_PROPERTIES = void 0;
|
|
6
|
+
exports.logicals = exports.logicalTextAlignStyle = exports.logicalTextAlignCSS = exports.logicalText = exports.logicalStyle = exports.logicalSizeStyle = exports.logicalSizeCSS = exports.logicalSide = exports.logicalCSSWithFallback = exports.logicalCSS = exports.LOGICAL_TEXT_ALIGNMENT = exports.LOGICAL_SIDES = exports.LOGICAL_PROPERTIES = void 0;
|
|
7
7
|
|
|
8
8
|
var _common = require("../../components/common");
|
|
9
9
|
|
|
@@ -64,8 +64,8 @@ var logicalSize = {
|
|
|
64
64
|
'min-width': 'min-inline-size'
|
|
65
65
|
};
|
|
66
66
|
var logicalOverflow = {
|
|
67
|
-
'overflow-x': 'overflow-
|
|
68
|
-
'overflow-y': 'overflow-
|
|
67
|
+
'overflow-x': 'overflow-inline',
|
|
68
|
+
'overflow-y': 'overflow-block'
|
|
69
69
|
};
|
|
70
70
|
var logicalBorders = {
|
|
71
71
|
'border-horizontal': 'border-inline',
|
|
@@ -113,6 +113,23 @@ exports.LOGICAL_PROPERTIES = LOGICAL_PROPERTIES;
|
|
|
113
113
|
var logicalCSS = function logicalCSS(property, value) {
|
|
114
114
|
return "".concat(logicals[property], ": ").concat(value, ";");
|
|
115
115
|
};
|
|
116
|
+
/**
|
|
117
|
+
* Some logical properties are not yet fully supported by all browsers.
|
|
118
|
+
* For those cases, we should use the old property as a fallback for
|
|
119
|
+
* browsers missing support, while allowing supporting browsers to use
|
|
120
|
+
* the logical properties.
|
|
121
|
+
*
|
|
122
|
+
* Examples:
|
|
123
|
+
* https://caniuse.com/?search=overflow-block
|
|
124
|
+
* https://caniuse.com/mdn-css_properties_float_flow_relative_values
|
|
125
|
+
*/
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
exports.logicalCSS = logicalCSS;
|
|
129
|
+
|
|
130
|
+
var logicalCSSWithFallback = function logicalCSSWithFallback(property, value) {
|
|
131
|
+
return "\n ".concat(property, ": ").concat(value, ";\n ").concat(logicalCSS(property, value), "\n");
|
|
132
|
+
};
|
|
116
133
|
/**
|
|
117
134
|
*
|
|
118
135
|
* @param property A string that is a valid CSS logical property
|
|
@@ -121,7 +138,7 @@ var logicalCSS = function logicalCSS(property, value) {
|
|
|
121
138
|
*/
|
|
122
139
|
|
|
123
140
|
|
|
124
|
-
exports.
|
|
141
|
+
exports.logicalCSSWithFallback = logicalCSSWithFallback;
|
|
125
142
|
|
|
126
143
|
var logicalStyle = function logicalStyle(property, value) {
|
|
127
144
|
// Strip hyphens and camelCase the CSS logical property so React doesn't throw errors
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = void 0;
|
|
6
|
+
exports.useEuiYScrollWithShadows = exports.useEuiYScroll = exports.useEuiXScrollWithShadows = exports.useEuiXScroll = exports.useEuiScrollBar = exports.useEuiOverflowScroll = exports.euiYScrollWithShadows = exports.euiYScroll = exports.euiXScrollWithShadows = exports.euiXScroll = exports.euiScrollBarStyles = exports.euiOverflowScroll = exports.euiFullHeight = void 0;
|
|
7
7
|
|
|
8
8
|
var _theme = require("../../services/theme");
|
|
9
9
|
|
|
10
10
|
var _color = require("../../services/color");
|
|
11
11
|
|
|
12
|
+
var _functions = require("../functions");
|
|
13
|
+
|
|
12
14
|
/*
|
|
13
15
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
16
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -38,7 +40,7 @@ var euiScrollBarStyles = function euiScrollBarStyles(_ref) {
|
|
|
38
40
|
// so it's being added to this mixin for allowing support wherever custom scrollbars are
|
|
39
41
|
|
|
40
42
|
var firefoxSupport = "scrollbar-color: ".concat(thumbColor, " ").concat(trackColor, ";");
|
|
41
|
-
return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n
|
|
43
|
+
return "scrollbar-width: ".concat(width, ";\n\n &::-webkit-scrollbar {\n ").concat((0, _functions.logicalCSS)('width', scrollBarSize), "\n ").concat((0, _functions.logicalCSS)('height', scrollBarSize), "\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ").concat(thumbColor, ";\n background-clip: content-box;\n border-radius: ").concat(scrollBarSize, ";\n border: ").concat(scrollBarCorner, " solid ").concat(trackColor, ";\n }\n\n &::-webkit-scrollbar-corner,\n &::-webkit-scrollbar-track {\n background-color: ").concat(trackColor, ";\n }\n\n ").concat(firefoxSupport, "\n ");
|
|
42
44
|
};
|
|
43
45
|
|
|
44
46
|
exports.euiScrollBarStyles = euiScrollBarStyles;
|
|
@@ -92,12 +94,11 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
|
|
|
92
94
|
*/
|
|
93
95
|
|
|
94
96
|
|
|
95
|
-
// TODO: How do we use Emotion to output the CSS class utilities instead?
|
|
96
97
|
var euiYScroll = function euiYScroll(euiTheme) {
|
|
97
98
|
var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
98
99
|
height = _ref5.height;
|
|
99
100
|
|
|
100
|
-
return "\n ".concat(euiScrollBarStyles(euiTheme), "\n
|
|
101
|
+
return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSS)('height', height || '100%'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-y', 'auto'), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'hidden'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
|
|
101
102
|
};
|
|
102
103
|
|
|
103
104
|
exports.euiYScroll = euiYScroll;
|
|
@@ -140,7 +141,7 @@ var useEuiYScrollWithShadows = function useEuiYScrollWithShadows() {
|
|
|
140
141
|
exports.useEuiYScrollWithShadows = useEuiYScrollWithShadows;
|
|
141
142
|
|
|
142
143
|
var euiXScroll = function euiXScroll(euiTheme) {
|
|
143
|
-
return "\n ".concat(euiScrollBarStyles(euiTheme), "\n overflow-x
|
|
144
|
+
return "\n ".concat(euiScrollBarStyles(euiTheme), "\n ").concat((0, _functions.logicalCSSWithFallback)('overflow-x', 'auto'), "\n &:focus {\n outline: none; /* 1 */\n }\n");
|
|
144
145
|
};
|
|
145
146
|
|
|
146
147
|
exports.euiXScroll = euiXScroll;
|
|
@@ -196,5 +197,15 @@ var useEuiOverflowScroll = function useEuiOverflowScroll(direction) {
|
|
|
196
197
|
mask: mask
|
|
197
198
|
});
|
|
198
199
|
};
|
|
200
|
+
/**
|
|
201
|
+
* For quickly applying a full-height element whether using flex or not
|
|
202
|
+
*/
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
exports.useEuiOverflowScroll = useEuiOverflowScroll;
|
|
206
|
+
|
|
207
|
+
var euiFullHeight = function euiFullHeight() {
|
|
208
|
+
return "\n ".concat((0, _functions.logicalCSS)('height', '100%'), "\n flex: 1 1 auto;\n overflow: hidden;\n");
|
|
209
|
+
};
|
|
199
210
|
|
|
200
|
-
exports.
|
|
211
|
+
exports.euiFullHeight = euiFullHeight;
|
|
@@ -23,7 +23,8 @@ var _services = require("../../services");
|
|
|
23
23
|
* @param offset Accepts a specific measurement or 'inset', 'outset' or 'center' to adjust outline position
|
|
24
24
|
* @param color Accepts any CSS color, **Note: only works in -webkit-**
|
|
25
25
|
*/
|
|
26
|
-
var euiFocusRing = function euiFocusRing(
|
|
26
|
+
var euiFocusRing = function euiFocusRing(_ref) {
|
|
27
|
+
var euiTheme = _ref.euiTheme;
|
|
27
28
|
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'center';
|
|
28
29
|
var options = arguments.length > 2 ? arguments[2] : undefined;
|
|
29
30
|
// Width is enforced as a constant at the global theme layer
|
|
@@ -51,9 +52,7 @@ var euiFocusRing = function euiFocusRing(euiTheme) {
|
|
|
51
52
|
exports.euiFocusRing = euiFocusRing;
|
|
52
53
|
|
|
53
54
|
var useEuiFocusRing = function useEuiFocusRing(offset, color) {
|
|
54
|
-
var
|
|
55
|
-
euiTheme = _useEuiTheme.euiTheme;
|
|
56
|
-
|
|
55
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
57
56
|
return euiFocusRing(euiTheme, offset, {
|
|
58
57
|
color: color
|
|
59
58
|
});
|
|
@@ -9,6 +9,8 @@ var _typography = require("../functions/typography");
|
|
|
9
9
|
|
|
10
10
|
var _hooks = require("../../services/theme/hooks");
|
|
11
11
|
|
|
12
|
+
var _functions = require("../functions");
|
|
13
|
+
|
|
12
14
|
/*
|
|
13
15
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
14
16
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
@@ -54,7 +56,8 @@ exports.euiTextBreakWord = euiTextBreakWord;
|
|
|
54
56
|
|
|
55
57
|
var euiTextTruncate = function euiTextTruncate() {
|
|
56
58
|
var maxWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '100%';
|
|
57
|
-
return "\n
|
|
59
|
+
return "\n ".concat((0, _functions.logicalCSS)('max-width', maxWidth) // Ensure that the node has a maximum width after which truncation can occur
|
|
60
|
+
, "\n overflow: hidden !important;\n text-overflow: ellipsis !important;\n white-space: nowrap !important;\n");
|
|
58
61
|
};
|
|
59
62
|
/**
|
|
60
63
|
* Fixed-width numbers for tabular data
|
|
@@ -49,7 +49,7 @@ var EuiGlobalStyles = function EuiGlobalStyles(_ref) {
|
|
|
49
49
|
* Final styles
|
|
50
50
|
*/
|
|
51
51
|
|
|
52
|
-
var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height:100%;background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", (0, _mixins.euiFocusRing)(
|
|
52
|
+
var styles = /*#__PURE__*/(0, _react2.css)(_reset.resetStyles, " html{", scrollbarStyles, " ", fontReset, " text-size-adjust:100%;font-kerning:normal;height:100%;background-color:", colors.body, ";color:", colors.text, ";}code,pre,kbd,samp{font-family:", font.familyCode, ";}input,textarea,select{", fontReset, ";}button{font-family:", font.family, ";}em{font-style:italic;}strong{font-weight:", font.weight.bold, ";}*:focus{", (0, _mixins.euiFocusRing)(euiThemeContext), ";}::selection{background:", (0, _color.transparentize)(colors.primary, colorMode === 'LIGHT' ? 0.1 : 0.2), ";}a{color:", colors.primaryText, ";&,&:hover,&:focus{text-decoration:none;}}.euiBody-hasPortalContent{position:relative;};label:styles;");
|
|
53
53
|
return (0, _react2.jsx)(_react2.Global, {
|
|
54
54
|
styles: styles
|
|
55
55
|
});
|
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.EuiUtilityClasses = void 0;
|
|
6
|
+
exports.globalStyles = exports.EuiUtilityClasses = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
10
|
var _react2 = require("@emotion/react");
|
|
11
11
|
|
|
12
|
+
var _hooks = require("../../services/theme/hooks");
|
|
13
|
+
|
|
12
14
|
var _screen_reader_only = require("../../components/accessibility/screen_reader_only/screen_reader_only.styles");
|
|
13
15
|
|
|
16
|
+
var _mixins = require("../mixins");
|
|
17
|
+
|
|
18
|
+
var _functions = require("../functions");
|
|
19
|
+
|
|
14
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
21
|
|
|
16
22
|
/*
|
|
@@ -20,11 +26,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
20
26
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
21
27
|
* Side Public License, v 1.
|
|
22
28
|
*/
|
|
23
|
-
var globalStyles =
|
|
29
|
+
var globalStyles = function globalStyles(euiThemeContext) {
|
|
30
|
+
return /*#__PURE__*/(0, _react2.css)(".euiScreenReaderOnly{", (0, _screen_reader_only.euiScreenReaderOnly)(), ";}.eui-alignBaseline{vertical-align:baseline!important;}.eui-alignBottom{vertical-align:bottom!important;}.eui-alignMiddle{vertical-align:middle!important;}.eui-alignTop{vertical-align:top!important;}.eui-displayBlock{display:block!important;}.eui-displayInline{display:inline!important;}.eui-displayInlineBlock{display:inline-block!important;}.eui-fullWidth{display:block!important;", (0, _functions.logicalCSS)('width', '100% !important'), ";}.eui-fullHeight{", (0, _mixins.euiFullHeight)(), ";}.eui-textCenter{text-align:center!important;}.eui-textLeft{text-align:start!important;}.eui-textRight{text-align:end!important;}.eui-textNoWrap{white-space:nowrap!important;}.eui-textInheritColor{color:inherit!important;}.eui-textBreakWord{", (0, _mixins.euiTextBreakWord)(), ";}.eui-textBreakAll{overflow-wrap:break-word!important;word-break:break-all!important;}.eui-textBreakNormal{overflow-wrap:normal!important;word-wrap:normal!important;word-break:normal!important;}.eui-textTruncate{", (0, _mixins.euiTextTruncate)(), ";}.eui-textNumber{", (0, _mixins.euiNumberFormat)(euiThemeContext), ";}.eui-scrollBar{", (0, _mixins.euiScrollBarStyles)(euiThemeContext), ";}.eui-yScroll{", (0, _mixins.euiYScroll)(euiThemeContext), ";}.eui-xScroll{", (0, _mixins.euiXScroll)(euiThemeContext), ";}.eui-yScrollWithShadows{", (0, _mixins.euiYScrollWithShadows)(euiThemeContext), ";}.eui-xScrollWithShadows{", (0, _mixins.euiXScrollWithShadows)(euiThemeContext), ";}[class*='eui-showFor']{display:none!important;}", Object.keys(euiThemeContext.euiTheme.breakpoint).map(function (size) {
|
|
31
|
+
return "\n .eui-hideFor--".concat(size, " {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: none !important;\n }\n }\n .eui-showFor--").concat(size, " {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: inline !important;\n }\n }\n .eui-showFor--").concat(size, "--block {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: block !important;\n }\n }\n .eui-showFor--").concat(size, "--inlineBlock {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: inline-block !important;\n }\n }\n .eui-showFor--").concat(size, "--flex {\n ").concat((0, _mixins.euiBreakpoint)(euiThemeContext, [size]), " {\n display: flex !important;\n }\n }");
|
|
32
|
+
}), ";;label:globalStyles;");
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.globalStyles = globalStyles;
|
|
24
36
|
|
|
25
37
|
var EuiUtilityClasses = function EuiUtilityClasses() {
|
|
38
|
+
var euiTheme = (0, _hooks.useEuiTheme)();
|
|
26
39
|
return (0, _react2.jsx)(_react2.Global, {
|
|
27
|
-
styles: globalStyles
|
|
40
|
+
styles: globalStyles(euiTheme)
|
|
28
41
|
});
|
|
29
42
|
};
|
|
30
43
|
|
|
@@ -23,11 +23,14 @@ var useEuiTheme = function useEuiTheme() {
|
|
|
23
23
|
var theme = (0, _react.useContext)(_context.EuiThemeContext);
|
|
24
24
|
var colorMode = (0, _react.useContext)(_context.EuiColorModeContext);
|
|
25
25
|
var modifications = (0, _react.useContext)(_context.EuiModificationsContext);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
var assembledTheme = (0, _react.useMemo)(function () {
|
|
27
|
+
return {
|
|
28
|
+
euiTheme: theme,
|
|
29
|
+
colorMode: colorMode,
|
|
30
|
+
modifications: modifications
|
|
31
|
+
};
|
|
32
|
+
}, [theme, colorMode, modifications]);
|
|
33
|
+
return assembledTheme;
|
|
31
34
|
};
|
|
32
35
|
|
|
33
36
|
exports.useEuiTheme = useEuiTheme;
|
|
@@ -38,17 +41,9 @@ var withEuiTheme = function withEuiTheme(Component) {
|
|
|
38
41
|
var componentName = Component.displayName || Component.name || 'ComponentWithTheme';
|
|
39
42
|
|
|
40
43
|
var Render = function Render(props, ref) {
|
|
41
|
-
var
|
|
42
|
-
euiTheme = _useEuiTheme.euiTheme,
|
|
43
|
-
colorMode = _useEuiTheme.colorMode,
|
|
44
|
-
modifications = _useEuiTheme.modifications;
|
|
45
|
-
|
|
44
|
+
var theme = useEuiTheme();
|
|
46
45
|
return (0, _react2.jsx)(Component, _extends({
|
|
47
|
-
theme:
|
|
48
|
-
euiTheme: euiTheme,
|
|
49
|
-
colorMode: colorMode,
|
|
50
|
-
modifications: modifications
|
|
51
|
-
},
|
|
46
|
+
theme: theme,
|
|
52
47
|
ref: ref
|
|
53
48
|
}, props));
|
|
54
49
|
};
|
|
@@ -81,8 +81,7 @@ export var CollapsedItemActions = /*#__PURE__*/function (_Component) {
|
|
|
81
81
|
_defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
|
|
82
82
|
if (!_this.popoverDiv) {
|
|
83
83
|
_this.popoverDiv = popoverDiv;
|
|
84
|
-
|
|
85
|
-
_this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
|
|
84
|
+
_this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
|
|
86
85
|
}
|
|
87
86
|
});
|
|
88
87
|
|
|
@@ -50,8 +50,8 @@ export var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiT
|
|
|
50
50
|
isTruncated: /*#__PURE__*/css(euiTextTruncate("".concat(parseFloat(euiTheme.size.base) * 10, "px")), ";;label:isTruncated;"),
|
|
51
51
|
isTruncatedLast: /*#__PURE__*/css(euiTextTruncate('none'), ";;label:isTruncatedLast;"),
|
|
52
52
|
// Types
|
|
53
|
-
page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(
|
|
54
|
-
application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";background-color:", transparentize(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", transparentize(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", euiFocusRing(
|
|
53
|
+
page: /*#__PURE__*/css("&:is(a):focus{", euiFocusRing(euiThemeContext, 'inset'), ";}&:is(button):focus{", euiFocusRing(euiThemeContext, 'center'), ";};label:page;"),
|
|
54
|
+
application: /*#__PURE__*/css(euiFontSize(euiThemeContext, 'xs'), ";background-color:", transparentize(euiTheme.colors.darkestShade, 0.2), ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%,\n ", euiTheme.size.s, " 50%\n );color:", euiTheme.colors.darkestShade, ";line-height:", euiTheme.size.base, ";", logicalCSS('padding-vertical', euiTheme.size.xs), " ", logicalCSS('padding-horizontal', euiTheme.size.base), " &:is(a),&:is(button){background-color:", transparentize(euiTheme.colors.primary, 0.2), ";color:", euiTheme.colors.link, ";:focus{", euiFocusRing(euiThemeContext, 'inset'), ";:focus-visible{border-radius:", euiTheme.border.radius.medium, ";clip-path:none;}}};label:application;"),
|
|
55
55
|
applicationStyles: {
|
|
56
56
|
onlyChild: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, ";clip-path:none;", logicalCSS('padding-horizontal', euiTheme.size.m), ",;;label:onlyChild;"),
|
|
57
57
|
firstChild: /*#__PURE__*/css("border-radius:", euiTheme.border.radius.medium, " 0 0 ", euiTheme.border.radius.medium, ";clip-path:polygon(\n 0 0,\n calc(100% - ", euiTheme.size.s, ") 0,\n 100% 50%,\n calc(100% - ", euiTheme.size.s, ") 100%,\n 0 100%\n );", logicalCSS('padding-left', euiTheme.size.m), ",;;label:firstChild;"),
|
package/optimize/es/components/date_picker/super_date_picker/date_popover/date_popover_button.js
CHANGED
|
@@ -11,7 +11,6 @@ var _excluded = ["position", "isDisabled", "isInvalid", "needsUpdating", "value"
|
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
// eslint-disable-line import/named
|
|
15
14
|
import { useEuiI18n } from '../../../i18n';
|
|
16
15
|
import { EuiPopover } from '../../../popover';
|
|
17
16
|
import { useFormatTimeString } from '../pretty_duration';
|
|
@@ -30,7 +30,7 @@ export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
|
|
|
30
30
|
|
|
31
31
|
var theme = useEuiTheme();
|
|
32
32
|
var styles = euiDescriptionListTitleStyles(theme);
|
|
33
|
-
var conditionalStyles = compressed && textStyle
|
|
33
|
+
var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
|
|
34
34
|
|
|
35
35
|
switch (type) {
|
|
36
36
|
case 'inline':
|
|
@@ -24,8 +24,9 @@ export var EuiHeaderSectionItem = function EuiHeaderSectionItem(_ref) {
|
|
|
24
24
|
className = _ref.className,
|
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
26
|
|
|
27
|
-
var classes = classNames('euiHeaderSectionItem', borderToClassNameMap[border], className);
|
|
28
|
-
|
|
27
|
+
var classes = classNames('euiHeaderSectionItem', borderToClassNameMap[border], className); // we check if there is any children and if not, we don't render anything
|
|
28
|
+
|
|
29
|
+
return children ? ___EmotionJSX("div", _extends({
|
|
29
30
|
className: classes
|
|
30
|
-
}, rest), children);
|
|
31
|
+
}, rest), children) : null;
|
|
31
32
|
};
|
|
@@ -14,7 +14,7 @@ export var euiImageButtonStyles = function euiImageButtonStyles(euiThemeContext)
|
|
|
14
14
|
var euiTheme = euiThemeContext.euiTheme;
|
|
15
15
|
return {
|
|
16
16
|
// Base
|
|
17
|
-
euiImageButton: /*#__PURE__*/css("position:relative;cursor:pointer;text-align:match-parent;line-height:0;&::before{opacity:0;content:'';pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0;", euiCanAnimate, "{transition:opacity ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";}}&:hover,&:focus{&::before{opacity:1;}[class*='euiImageButton__icon']{opacity:1;}}&:focus{", euiFocusRing(
|
|
17
|
+
euiImageButton: /*#__PURE__*/css("position:relative;cursor:pointer;text-align:match-parent;line-height:0;&::before{opacity:0;content:'';pointer-events:none;position:absolute;top:0;bottom:0;left:0;right:0;", euiCanAnimate, "{transition:opacity ", euiTheme.animation.fast, " ", euiTheme.animation.resistance, ";}}&:hover,&:focus{&::before{opacity:1;}[class*='euiImageButton__icon']{opacity:1;}}&:focus{", euiFocusRing(euiThemeContext, 'outset'), ";};label:euiImageButton;"),
|
|
18
18
|
fullWidth: /*#__PURE__*/css(logicalCSS('width', '100%'), ";;label:fullWidth;"),
|
|
19
19
|
shadowHover: /*#__PURE__*/css("&::before{", euiShadow(euiThemeContext, 's'), ";};label:shadowHover;"),
|
|
20
20
|
hasShadowHover: /*#__PURE__*/css("&::before{", euiShadow(euiThemeContext, 'm'), ";};label:hasShadowHover;")
|
|
@@ -20,8 +20,9 @@ export var euiLinkHoverCSS = function euiLinkHoverCSS() {
|
|
|
20
20
|
export var euiLinkFocusCSS = function euiLinkFocusCSS(euiTheme) {
|
|
21
21
|
return "\n text-decoration: underline;\n text-decoration-thickness: ".concat(euiTheme.border.width.thick, " !important;\n ");
|
|
22
22
|
};
|
|
23
|
-
export var euiLinkCSS = function euiLinkCSS(
|
|
24
|
-
|
|
23
|
+
export var euiLinkCSS = function euiLinkCSS(euiThemeContext) {
|
|
24
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
25
|
+
return "\n font-weight: ".concat(euiTheme.font.weight.medium, ";\n text-align: left;\n\n &:hover {\n ").concat(euiLinkHoverCSS(), "\n }\n\n &:focus {\n ").concat(euiFocusRing(euiThemeContext, 'outset'), "\n ").concat(euiLinkFocusCSS(euiTheme), "\n }\n ");
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
var _ref = process.env.NODE_ENV === "production" ? {
|
|
@@ -33,10 +34,10 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
33
34
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
34
35
|
};
|
|
35
36
|
|
|
36
|
-
export var euiLinkStyles = function euiLinkStyles(
|
|
37
|
-
var euiTheme =
|
|
37
|
+
export var euiLinkStyles = function euiLinkStyles(euiThemeContext) {
|
|
38
|
+
var euiTheme = euiThemeContext.euiTheme;
|
|
38
39
|
return {
|
|
39
|
-
euiLink: /*#__PURE__*/css(euiLinkCSS(
|
|
40
|
+
euiLink: /*#__PURE__*/css(euiLinkCSS(euiThemeContext), " user-select:text;&[target='_blank']{position:relative;};label:euiLink;"),
|
|
40
41
|
disabled: _ref,
|
|
41
42
|
// Color styles
|
|
42
43
|
primary: /*#__PURE__*/css(_colorCSS(euiTheme.colors.primaryText), ";label:primary;"),
|
|
@@ -21,8 +21,7 @@ var horizontalPositionToClassNameMap = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* Use EuiPageSection instead
|
|
24
|
+
* @deprecated Use EuiPageSection instead
|
|
26
25
|
*/
|
|
27
26
|
export var EuiPageContent_Deprecated = function EuiPageContent_Deprecated(_ref) {
|
|
28
27
|
var verticalPosition = _ref.verticalPosition,
|
|
@@ -24,8 +24,7 @@ var paddingSizeToClassNameMap = {
|
|
|
24
24
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* Use EuiPageSection instead
|
|
27
|
+
* @deprecated Use EuiPageSection instead
|
|
29
28
|
*/
|
|
30
29
|
export var EuiPageContentBody_Deprecated = function EuiPageContentBody_Deprecated(_ref) {
|
|
31
30
|
var children = _ref.children,
|
|
@@ -14,8 +14,7 @@ import classNames from 'classnames';
|
|
|
14
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* Use EuiPageHeader instead
|
|
17
|
+
* @deprecated Use EuiPageHeader instead
|
|
19
18
|
*/
|
|
20
19
|
export var EuiPageContentHeader_Deprecated = function EuiPageContentHeader_Deprecated(_ref) {
|
|
21
20
|
var children = _ref.children,
|
|
@@ -14,8 +14,7 @@ import classNames from 'classnames';
|
|
|
14
14
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
* Use EuiPageHeader instead
|
|
17
|
+
* @deprecated Use EuiPageHeader instead
|
|
19
18
|
*/
|
|
20
19
|
export var EuiPageContentHeaderSection_Deprecated = function EuiPageContentHeaderSection_Deprecated(_ref) {
|
|
21
20
|
var children = _ref.children,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps"];
|
|
3
|
+
var _excluded = ["children", "alignment", "restrictWidth", "bottomBorder", "paddingSize", "color", "grow", "contentProps", "component"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -29,6 +29,8 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
29
29
|
_ref$grow = _ref.grow,
|
|
30
30
|
grow = _ref$grow === void 0 ? false : _ref$grow,
|
|
31
31
|
contentProps = _ref.contentProps,
|
|
32
|
+
_ref$component = _ref.component,
|
|
33
|
+
Component = _ref$component === void 0 ? 'section' : _ref$component,
|
|
32
34
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
35
|
|
|
34
36
|
// Set max-width as a style prop
|
|
@@ -41,7 +43,7 @@ export var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
41
43
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
42
44
|
var contentStyles = euiPageSectionContentStyles();
|
|
43
45
|
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
44
|
-
return ___EmotionJSX(
|
|
46
|
+
return ___EmotionJSX(Component, _extends({
|
|
45
47
|
css: cssStyles
|
|
46
48
|
}, rest), ___EmotionJSX("div", _extends({
|
|
47
49
|
css: cssContentStyles
|
|
@@ -22,8 +22,7 @@ var paddingSizeToClassNameMap = {
|
|
|
22
22
|
export var PADDING_SIZES = keysOf(paddingSizeToClassNameMap);
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* Use the new EuiPageSidebar instead
|
|
25
|
+
* @deprecated Use the new EuiPageSidebar in page/page_sidebar instead
|
|
27
26
|
*/
|
|
28
27
|
export var EuiPageSideBar_Deprecated = function EuiPageSideBar_Deprecated(_ref) {
|
|
29
28
|
var children = _ref.children,
|
|
@@ -46,13 +46,17 @@ export var EuiPageSidebar = function EuiPageSidebar(_ref) {
|
|
|
46
46
|
setInlineStyles = _useState2[1];
|
|
47
47
|
|
|
48
48
|
useEffect(function () {
|
|
49
|
+
var updatedStyles = _objectSpread(_objectSpread({}, style), logicalStyle('min-width', isResponding ? '100%' : minWidth));
|
|
50
|
+
|
|
49
51
|
if (sticky) {
|
|
50
52
|
var _document$body$datase;
|
|
51
53
|
|
|
52
54
|
var euiHeaderFixedCounter = Number((_document$body$datase = document.body.dataset.fixedHeaders) !== null && _document$body$datase !== void 0 ? _document$body$datase : 0);
|
|
53
55
|
var offset = _typeof(sticky) === 'object' ? sticky === null || sticky === void 0 ? void 0 : sticky.offset : themeContext.euiTheme.base * 3 * euiHeaderFixedCounter;
|
|
54
|
-
|
|
56
|
+
updatedStyles = _objectSpread(_objectSpread(_objectSpread({}, updatedStyles), logicalStyle('top', offset)), logicalStyle('max-height', "calc(100vh - ".concat(offset, "px)")));
|
|
55
57
|
}
|
|
58
|
+
|
|
59
|
+
setInlineStyles(updatedStyles);
|
|
56
60
|
}, [style, sticky, themeContext.euiTheme.base, isResponding, minWidth]);
|
|
57
61
|
return ___EmotionJSX("div", _extends({
|
|
58
62
|
className: className,
|
|
@@ -32,7 +32,9 @@ export var TEMPLATES = ['default', 'centeredBody', 'centeredContent', 'empty'];
|
|
|
32
32
|
/**
|
|
33
33
|
* This component has been deprecated in favor of the new
|
|
34
34
|
* namespaced version. You can still import this component
|
|
35
|
-
*
|
|
35
|
+
* until August 2023 by importing `as EuiPageTemplate`.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated use EuiPageTemplate from page_template/page_template instead
|
|
36
38
|
*/
|
|
37
39
|
export var EuiPageTemplate_Deprecated = function EuiPageTemplate_Deprecated(_ref) {
|
|
38
40
|
var _pageBodyProps2;
|
|
@@ -6,18 +6,12 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import createCache from '@emotion/cache';
|
|
10
9
|
import { CacheProvider } from '@emotion/react';
|
|
11
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
12
|
-
var defaultCache = createCache({
|
|
13
|
-
key: 'css'
|
|
14
|
-
});
|
|
15
|
-
defaultCache.compat = true;
|
|
16
11
|
export var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
17
|
-
var
|
|
18
|
-
cache = _ref$cache === void 0 ? defaultCache : _ref$cache,
|
|
12
|
+
var cache = _ref.cache,
|
|
19
13
|
children = _ref.children;
|
|
20
|
-
return ___EmotionJSX(CacheProvider, {
|
|
14
|
+
return children && cache ? ___EmotionJSX(CacheProvider, {
|
|
21
15
|
value: cache
|
|
22
|
-
}, children);
|
|
16
|
+
}, children) : ___EmotionJSX(React.Fragment, null, children);
|
|
23
17
|
};
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Side Public License, v 1.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import createCache from '@emotion/cache';
|
|
9
10
|
import { EuiGlobalStyles } from '../../global_styling/reset/global_styles';
|
|
10
11
|
import { EuiUtilityClasses } from '../../global_styling/utility/utility';
|
|
11
12
|
import { EuiThemeProvider, CurrentEuiBreakpointProvider } from '../../services';
|
|
@@ -17,8 +18,15 @@ var isEmotionCacheObject = function isEmotionCacheObject(obj) {
|
|
|
17
18
|
return obj.hasOwnProperty('key');
|
|
18
19
|
};
|
|
19
20
|
|
|
21
|
+
var fallbackCache = createCache({
|
|
22
|
+
key: 'css'
|
|
23
|
+
});
|
|
24
|
+
fallbackCache.compat = true;
|
|
20
25
|
export var EuiProvider = function EuiProvider(_ref) {
|
|
21
|
-
var
|
|
26
|
+
var _defaultCache;
|
|
27
|
+
|
|
28
|
+
var _ref$cache = _ref.cache,
|
|
29
|
+
cache = _ref$cache === void 0 ? fallbackCache : _ref$cache,
|
|
22
30
|
_ref$theme = _ref.theme,
|
|
23
31
|
theme = _ref$theme === void 0 ? EuiThemeAmsterdam : _ref$theme,
|
|
24
32
|
_ref$globalStyles = _ref.globalStyles,
|
|
@@ -34,16 +42,31 @@ export var EuiProvider = function EuiProvider(_ref) {
|
|
|
34
42
|
|
|
35
43
|
if (cache) {
|
|
36
44
|
if (isEmotionCacheObject(cache)) {
|
|
45
|
+
cache.compat = true;
|
|
37
46
|
defaultCache = cache;
|
|
38
47
|
} else {
|
|
48
|
+
if (cache.default) {
|
|
49
|
+
cache.default.compat = true;
|
|
50
|
+
}
|
|
51
|
+
|
|
39
52
|
defaultCache = cache.default;
|
|
53
|
+
|
|
54
|
+
if (cache.global) {
|
|
55
|
+
cache.global.compat = true;
|
|
56
|
+
}
|
|
57
|
+
|
|
40
58
|
globalCache = cache.global;
|
|
59
|
+
|
|
60
|
+
if (cache.utility) {
|
|
61
|
+
cache.utility.compat = true;
|
|
62
|
+
}
|
|
63
|
+
|
|
41
64
|
utilityCache = cache.utility;
|
|
42
65
|
}
|
|
43
66
|
}
|
|
44
67
|
|
|
45
68
|
return ___EmotionJSX(EuiCacheProvider, {
|
|
46
|
-
cache: defaultCache
|
|
69
|
+
cache: (_defaultCache = defaultCache) !== null && _defaultCache !== void 0 ? _defaultCache : fallbackCache
|
|
47
70
|
}, ___EmotionJSX(EuiThemeProvider, {
|
|
48
71
|
theme: theme !== null && theme !== void 0 ? theme : undefined,
|
|
49
72
|
colorMode: colorMode,
|
|
@@ -58,7 +58,7 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
|
|
|
58
58
|
export var euiTextStyles = function euiTextStyles(euiThemeContext) {
|
|
59
59
|
var euiTheme = euiThemeContext.euiTheme;
|
|
60
60
|
return {
|
|
61
|
-
euiText: /*#__PURE__*/css(euiText(euiTheme, true), ";clear:both;a:not([class]){", euiLinkCSS(
|
|
61
|
+
euiText: /*#__PURE__*/css(euiText(euiTheme, true), ";clear:both;a:not([class]){", euiLinkCSS(euiThemeContext), ";}img{display:block;", logicalCSS('max-width', '100%'), ";}ul{list-style:disc;}ol{list-style:decimal;}blockquote:not(.euiMarkdownFormat__blockquote){position:relative;", logicalTextAlignCSS('center'), " ", logicalCSS('margin-horizontal', 'auto'), " font-family:", euiTheme.font.familySerif, ";font-style:italic;letter-spacing:normal;p:last-child{", logicalCSS('margin-bottom', '0'), ";}&:before,&:after{position:absolute;content:'';", logicalCSS('height', euiTheme.border.width.thick), " ", logicalCSS('width', '50%'), " ", logicalCSS('left', '25%'), " ", logicalCSS('right', '25%'), " background:", euiTheme.colors.darkShade, ";}&:before{", logicalCSS('top', '0'), ";}&:after{", logicalCSS('bottom', '0'), ";}}h1{", euiTitle(euiThemeContext, 'l'), ";}h2{", euiTitle(euiThemeContext, 'm'), ";}h3{", euiTitle(euiThemeContext, 's'), ";}h4,dt{", euiTitle(euiThemeContext, 'xs'), ";}h5{", euiTitle(euiThemeContext, 'xxs'), ";}h6{", euiTitle(euiThemeContext, 'xxxs'), " text-transform:uppercase;}h1,h2,h3,h4,h5,h6,dt{color:inherit;}pre:not(.euiCodeBlock__pre){white-space:pre-wrap;background:", euiBackgroundColor(euiThemeContext, 'subdued'), ";color:", euiTheme.colors.text, ";}pre:not(.euiCodeBlock__pre),pre:not(.euiCodeBlock__pre) code{display:block;}>:last-child{", logicalCSS('margin-bottom', '0 !important'), ";}kbd{position:relative;display:inline-block;", logicalCSS('padding-vertical', euiTheme.size.xxs), " ", logicalCSS('padding-horizontal', euiTheme.size.xs), " line-height:1;border:", euiTheme.border.width.thin, " solid ", euiTheme.colors.text, ";border-radius:calc(", euiTheme.border.radius.small, " / 2);};label:euiText;"),
|
|
62
62
|
constrainedWidth: /*#__PURE__*/css(logicalCSS('max-width', euiTextConstrainedMaxWidth), ";;label:constrainedWidth;"),
|
|
63
63
|
// Sizes
|
|
64
64
|
m: /*#__PURE__*/css(euiScaleText(euiThemeContext, {
|
|
@@ -10,7 +10,7 @@ var _templateObject;
|
|
|
10
10
|
* Side Public License, v 1.
|
|
11
11
|
*/
|
|
12
12
|
import { css, keyframes } from '@emotion/react';
|
|
13
|
-
import { euiBreakpoint, euiScrollBarStyles, logicalCSS, logicalSizeCSS } from '../../global_styling';
|
|
13
|
+
import { euiBreakpoint, euiScrollBarStyles, logicalCSS, logicalCSSWithFallback, logicalSizeCSS } from '../../global_styling';
|
|
14
14
|
export var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiThemeContext) {
|
|
15
15
|
var euiTheme = euiThemeContext.euiTheme;
|
|
16
16
|
var euiToastWidth = euiTheme.base * 20;
|
|
@@ -20,7 +20,7 @@ export var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiTheme
|
|
|
20
20
|
* 2. Allow some padding for shadow
|
|
21
21
|
*/
|
|
22
22
|
// Base
|
|
23
|
-
euiGlobalToastList: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", logicalCSS('bottom', 0), ";", logicalCSS('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", logicalCSS('max-height', '100vh'), ";
|
|
23
|
+
euiGlobalToastList: /*#__PURE__*/css(euiScrollBarStyles(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", logicalCSS('bottom', 0), ";", logicalCSS('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", logicalCSS('max-height', '100vh'), ";", logicalCSSWithFallback('overflow-y', 'auto'), ";scrollbar-width:none;&::-webkit-scrollbar{", logicalSizeCSS(0, 0), ";}&:not(:empty){", logicalCSS('padding-left', euiTheme.size.base), ";", logicalCSS('padding-right', euiTheme.size.base), ";", logicalCSS('padding-vertical', euiTheme.size.base), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('left', 0), ";", logicalCSS('width', '100%'), ";}};label:euiGlobalToastList;"),
|
|
24
24
|
// Variants
|
|
25
25
|
right: /*#__PURE__*/css("&:not(:empty){", logicalCSS('right', 0), ";", logicalCSS('padding-left', "".concat(euiTheme.base * 4, "px")), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('padding-left', euiTheme.size.base), ";}};label:right;"),
|
|
26
26
|
left: /*#__PURE__*/css("&:not(:empty){", logicalCSS('left', 0), ";", logicalCSS('padding-right', "".concat(euiTheme.base * 4, "px")), ";}", euiBreakpoint(euiThemeContext, ['xs', 's']), "{&:not(:empty){", logicalCSS('padding-right', euiTheme.size.base), ";}};label:left;")
|