@elastic/eui 67.1.0 → 67.1.2
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_theme_dark.css +0 -292
- package/dist/eui_theme_dark.json +0 -24
- package/dist/eui_theme_dark.json.d.ts +0 -24
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -292
- package/dist/eui_theme_light.json +0 -24
- package/dist/eui_theme_light.json.d.ts +0 -24
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accordion/accordion.js +5 -4
- package/es/components/accordion/accordion.styles.js +1 -1
- package/es/components/avatar/avatar.js +7 -1
- package/es/components/badge/badge.styles.js +10 -4
- package/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
- package/es/components/button/button_display/_button_display_content.js +2 -2
- package/es/components/button/button_icon/button_icon.js +11 -7
- package/es/components/collapsible_nav/collapsible_nav.js +8 -0
- package/es/components/expression/expression.styles.js +4 -2
- package/es/components/flyout/flyout.js +28 -48
- package/es/components/flyout/flyout.styles.js +111 -0
- package/es/components/flyout/flyout_body.js +14 -6
- package/es/components/flyout/flyout_body.styles.js +21 -0
- package/es/components/flyout/flyout_footer.js +8 -1
- package/es/components/flyout/flyout_footer.styles.js +14 -0
- package/es/components/flyout/flyout_header.js +9 -4
- package/es/components/flyout/flyout_header.styles.js +28 -0
- package/es/components/image/image_wrapper.js +3 -3
- package/es/components/markdown_editor/markdown_format.styles.js +11 -6
- package/es/components/notification/notification_event.js +2 -3
- package/es/components/page/page_header/page_header_content.js +1 -1
- package/es/components/page/page_section/page_section.js +3 -4
- package/es/components/pagination/pagination_button.styles.js +5 -3
- package/es/components/progress/progress.js +2 -2
- package/es/components/text/text.styles.js +6 -3
- package/es/components/tool_tip/tool_tip.styles.js +7 -6
- package/es/components/tour/tour.styles.js +11 -6
- package/es/global_styling/functions/index.js +1 -0
- package/es/global_styling/functions/math.js +46 -0
- package/es/global_styling/mixins/_helpers.js +5 -2
- package/eui.d.ts +95 -7
- package/i18ntokens.json +2 -2
- package/lib/components/accordion/accordion.js +5 -4
- package/lib/components/accordion/accordion.styles.js +1 -1
- package/lib/components/avatar/avatar.js +7 -1
- package/lib/components/badge/badge.styles.js +9 -3
- package/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
- package/lib/components/button/button_display/_button_display_content.js +2 -2
- package/lib/components/button/button_icon/button_icon.js +11 -7
- package/lib/components/collapsible_nav/collapsible_nav.js +8 -0
- package/lib/components/expression/expression.styles.js +3 -1
- package/lib/components/flyout/flyout.js +28 -47
- package/lib/components/flyout/flyout.styles.js +122 -0
- package/lib/components/flyout/flyout_body.js +16 -6
- package/lib/components/flyout/flyout_body.styles.js +32 -0
- package/lib/components/flyout/flyout_footer.js +10 -1
- package/lib/components/flyout/flyout_footer.styles.js +24 -0
- package/lib/components/flyout/flyout_header.js +11 -4
- package/lib/components/flyout/flyout_header.styles.js +31 -0
- package/lib/components/image/image_wrapper.js +3 -3
- package/lib/components/markdown_editor/markdown_format.styles.js +10 -5
- package/lib/components/notification/notification_event.js +2 -3
- package/lib/components/page/page_header/page_header_content.js +1 -1
- package/lib/components/page/page_section/page_section.js +3 -4
- package/lib/components/pagination/pagination_button.styles.js +4 -2
- package/lib/components/progress/progress.js +2 -2
- package/lib/components/text/text.styles.js +5 -2
- package/lib/components/tool_tip/tool_tip.styles.js +6 -5
- package/lib/components/tour/tour.styles.js +10 -5
- package/lib/global_styling/functions/index.js +13 -0
- package/lib/global_styling/functions/math.js +55 -0
- package/lib/global_styling/mixins/_helpers.js +5 -2
- package/optimize/es/components/accordion/accordion.js +5 -4
- package/optimize/es/components/accordion/accordion.styles.js +1 -1
- package/optimize/es/components/avatar/avatar.js +7 -1
- package/optimize/es/components/badge/badge.styles.js +10 -4
- package/optimize/es/components/breadcrumbs/breadcrumb.styles.js +4 -2
- package/optimize/es/components/button/button_display/_button_display_content.js +2 -2
- package/optimize/es/components/button/button_icon/button_icon.js +11 -7
- package/optimize/es/components/expression/expression.styles.js +4 -2
- package/optimize/es/components/flyout/flyout.js +28 -48
- package/optimize/es/components/flyout/flyout.styles.js +111 -0
- package/optimize/es/components/flyout/flyout_body.js +14 -6
- package/optimize/es/components/flyout/flyout_body.styles.js +21 -0
- package/optimize/es/components/flyout/flyout_footer.js +8 -1
- package/optimize/es/components/flyout/flyout_footer.styles.js +14 -0
- package/optimize/es/components/flyout/flyout_header.js +9 -4
- package/optimize/es/components/flyout/flyout_header.styles.js +28 -0
- package/optimize/es/components/image/image_wrapper.js +3 -3
- package/optimize/es/components/markdown_editor/markdown_format.styles.js +11 -6
- package/optimize/es/components/notification/notification_event.js +2 -3
- package/optimize/es/components/page/page_header/page_header_content.js +1 -1
- package/optimize/es/components/page/page_section/page_section.js +3 -4
- package/optimize/es/components/pagination/pagination_button.styles.js +5 -3
- package/optimize/es/components/progress/progress.js +2 -2
- package/optimize/es/components/text/text.styles.js +6 -3
- package/optimize/es/components/tool_tip/tool_tip.styles.js +7 -6
- package/optimize/es/components/tour/tour.styles.js +11 -6
- package/optimize/es/global_styling/functions/index.js +1 -0
- package/optimize/es/global_styling/functions/math.js +44 -0
- package/optimize/es/global_styling/mixins/_helpers.js +5 -2
- package/optimize/lib/components/accordion/accordion.js +5 -4
- package/optimize/lib/components/accordion/accordion.styles.js +1 -1
- package/optimize/lib/components/avatar/avatar.js +8 -1
- package/optimize/lib/components/badge/badge.styles.js +9 -3
- package/optimize/lib/components/breadcrumbs/breadcrumb.styles.js +3 -1
- package/optimize/lib/components/button/button_display/_button_display_content.js +2 -2
- package/optimize/lib/components/button/button_icon/button_icon.js +11 -7
- package/optimize/lib/components/expression/expression.styles.js +3 -1
- package/optimize/lib/components/flyout/flyout.js +28 -47
- package/optimize/lib/components/flyout/flyout.styles.js +124 -0
- package/optimize/lib/components/flyout/flyout_body.js +16 -6
- package/optimize/lib/components/flyout/flyout_body.styles.js +32 -0
- package/optimize/lib/components/flyout/flyout_footer.js +10 -1
- package/optimize/lib/components/flyout/flyout_footer.styles.js +24 -0
- package/optimize/lib/components/flyout/flyout_header.js +11 -4
- package/optimize/lib/components/flyout/flyout_header.styles.js +31 -0
- package/optimize/lib/components/image/image_wrapper.js +3 -3
- package/optimize/lib/components/markdown_editor/markdown_format.styles.js +10 -5
- package/optimize/lib/components/notification/notification_event.js +2 -3
- package/optimize/lib/components/page/page_header/page_header_content.js +1 -1
- package/optimize/lib/components/page/page_section/page_section.js +3 -4
- package/optimize/lib/components/pagination/pagination_button.styles.js +4 -2
- package/optimize/lib/components/progress/progress.js +2 -2
- package/optimize/lib/components/text/text.styles.js +5 -2
- package/optimize/lib/components/tool_tip/tool_tip.styles.js +6 -5
- package/optimize/lib/components/tour/tour.styles.js +10 -5
- package/optimize/lib/global_styling/functions/index.js +13 -0
- package/optimize/lib/global_styling/functions/math.js +57 -0
- package/optimize/lib/global_styling/mixins/_helpers.js +5 -2
- package/package.json +1 -1
- package/src/components/index.scss +0 -1
- package/src/themes/amsterdam/global_styling/variables/_index.scss +0 -1
- package/test-env/components/accordion/accordion.js +5 -4
- package/test-env/components/accordion/accordion.styles.js +1 -1
- package/test-env/components/avatar/avatar.js +8 -1
- package/test-env/components/badge/badge.styles.js +9 -3
- package/test-env/components/breadcrumbs/breadcrumb.styles.js +3 -1
- package/test-env/components/button/button_display/_button_display_content.js +2 -2
- package/test-env/components/button/button_icon/button_icon.js +11 -7
- package/test-env/components/collapsible_nav/collapsible_nav.js +8 -0
- package/test-env/components/expression/expression.styles.js +3 -1
- package/test-env/components/flyout/flyout.styles.js +124 -0
- package/test-env/components/flyout/flyout_body.js +16 -6
- package/test-env/components/flyout/flyout_body.styles.js +32 -0
- package/test-env/components/flyout/flyout_footer.js +10 -1
- package/test-env/components/flyout/flyout_footer.styles.js +24 -0
- package/test-env/components/flyout/flyout_header.js +11 -4
- package/test-env/components/flyout/flyout_header.styles.js +31 -0
- package/test-env/components/image/image_wrapper.js +3 -3
- package/test-env/components/markdown_editor/markdown_format.styles.js +10 -5
- package/test-env/components/notification/notification_event.js +2 -3
- package/test-env/components/page/page_header/page_header_content.js +1 -1
- package/test-env/components/page/page_section/page_section.js +3 -4
- package/test-env/components/pagination/pagination_button.styles.js +4 -2
- package/test-env/components/progress/progress.js +2 -2
- package/test-env/components/text/text.styles.js +5 -2
- package/test-env/components/tool_tip/tool_tip.styles.js +6 -5
- package/test-env/components/tour/tour.styles.js +10 -5
- package/test-env/global_styling/functions/index.js +13 -0
- package/test-env/global_styling/functions/math.js +57 -0
- package/test-env/global_styling/mixins/_helpers.js +5 -2
- package/src/components/flyout/_flyout.scss +0 -196
- package/src/components/flyout/_flyout_body.scss +0 -18
- package/src/components/flyout/_flyout_footer.scss +0 -4
- package/src/components/flyout/_flyout_header.scss +0 -7
- package/src/components/flyout/_index.scss +0 -7
- package/src/components/flyout/_mixins.scss +0 -18
- package/src/components/flyout/_variables.scss +0 -8
- package/src/themes/amsterdam/global_styling/variables/_flyout.scss +0 -1
|
@@ -61,9 +61,8 @@ var EuiNotificationEvent = function EuiNotificationEvent(_ref) {
|
|
|
61
61
|
className = _ref.className,
|
|
62
62
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
63
63
|
var classes = (0, _classnames.default)('euiNotificationEvent', {
|
|
64
|
-
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
65
|
-
|
|
66
|
-
});
|
|
64
|
+
'euiNotificationEvent--withReadState': typeof isRead === 'boolean'
|
|
65
|
+
}, className);
|
|
67
66
|
var classesTitle = (0, _classnames.default)('euiNotificationEvent__title', {
|
|
68
67
|
'euiNotificationEvent__title--isRead': isRead
|
|
69
68
|
});
|
|
@@ -75,7 +75,7 @@ var EuiPageHeaderContent = function EuiPageHeaderContent(_ref) {
|
|
|
75
75
|
|
|
76
76
|
var isResponsiveBreakpoint = (0, _services.useIsWithinBreakpoints)(['xs', 's'], !!responsive);
|
|
77
77
|
var useTheme = (0, _services.useEuiTheme)();
|
|
78
|
-
var classes = (0, _classnames.default)('euiPageHeaderContent');
|
|
78
|
+
var classes = (0, _classnames.default)('euiPageHeaderContent', className);
|
|
79
79
|
var pageHeaderStyles = (0, _page_header.euiPageHeaderStyles)(useTheme);
|
|
80
80
|
var contentStyles = (0, _page_header_content.euiPageHeaderContentStyles)(useTheme);
|
|
81
81
|
var styles = (0, _restrict_width.setStyleForRestrictedPageWidth)(restrictWidth, style);
|
|
@@ -51,12 +51,11 @@ var EuiPageSection = function EuiPageSection(_ref) {
|
|
|
51
51
|
var colors = (0, _global_styling.useEuiBackgroundColorCSS)();
|
|
52
52
|
var cssStyles = [styles.euiPageSection, grow && styles.grow, inlinePadding[paddingSize], bottomBorder === 'extended' && styles.border, alignment && styles[alignment], colors[color]];
|
|
53
53
|
var contentStyles = (0, _page_section.euiPageSectionContentStyles)();
|
|
54
|
-
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth];
|
|
54
|
+
var cssContentStyles = [contentStyles.euiPageSection__content, blockPadding[paddingSize], bottomBorder === true && styles.border, alignment.toLowerCase().includes('center') && contentStyles.center, restrictWidth && contentStyles.restrictWidth, (contentProps === null || contentProps === void 0 ? void 0 : contentProps.css) && contentProps.css];
|
|
55
55
|
return (0, _react2.jsx)(Component, (0, _extends2.default)({
|
|
56
56
|
css: cssStyles
|
|
57
|
-
}, rest), (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
58
|
-
css: cssContentStyles
|
|
59
|
-
}, contentProps, {
|
|
57
|
+
}, rest), (0, _react2.jsx)("div", (0, _extends2.default)({}, contentProps, {
|
|
58
|
+
css: cssContentStyles,
|
|
60
59
|
style: widthStyles
|
|
61
60
|
}), children));
|
|
62
61
|
};
|
|
@@ -21,7 +21,9 @@ var _mixins = require("../../themes/amsterdam/global_styling/mixins");
|
|
|
21
21
|
var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThemeContext) {
|
|
22
22
|
var euiTheme = euiThemeContext.euiTheme;
|
|
23
23
|
var fontSizeS = (0, _global_styling.euiFontSize)(euiThemeContext, 's');
|
|
24
|
-
var halfSizeM =
|
|
24
|
+
var halfSizeM = (0, _global_styling.mathWithUnits)(euiTheme.size.m, function (x) {
|
|
25
|
+
return x / 2;
|
|
26
|
+
});
|
|
25
27
|
var disabled = (0, _mixins.euiButtonEmptyColor)(euiThemeContext, 'disabled'); // && to increase specificity. Can likely be removed once EuiButtonEmpty has been converted.
|
|
26
28
|
|
|
27
29
|
return {
|
|
@@ -29,7 +31,7 @@ var euiPaginationButtonStyles = function euiPaginationButtonStyles(euiThemeConte
|
|
|
29
31
|
euiPaginationButton: /*#__PURE__*/(0, _react.css)("&&{", fontSizeS, ";padding:0;", (0, _global_styling.logicalTextAlignCSS)('center'), " border-radius:", euiTheme.border.radius.medium, ";outline-offset:-", euiTheme.focus.width, ";};label:euiPaginationButton;"),
|
|
30
32
|
// States
|
|
31
33
|
isActive: /*#__PURE__*/(0, _react.css)("&&{font-weight:", euiTheme.font.weight.bold, ";color:", euiTheme.colors.primary, ";.euiButtonEmpty__content{cursor:default;}&&,&&:hover{text-decoration:underline;}};label:isActive;"),
|
|
32
|
-
isPlaceholder: /*#__PURE__*/(0, _react.css)("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", (0, _global_styling.logicalCSS)('padding-top',
|
|
34
|
+
isPlaceholder: /*#__PURE__*/(0, _react.css)("&&{align-items:baseline;color:", disabled.color, ";", fontSizeS, ";", (0, _global_styling.logicalCSS)('padding-top', halfSizeM), ";", (0, _global_styling.logicalCSS)('padding-bottom', 0), ";", (0, _global_styling.logicalCSS)('padding-horizontal', euiTheme.size.s), ";", (0, _global_styling.logicalCSS)('height', euiTheme.size.l), ";};label:isPlaceholder;")
|
|
33
35
|
};
|
|
34
36
|
};
|
|
35
37
|
|
|
@@ -100,9 +100,9 @@ var EuiProgress = function EuiProgress(_ref) {
|
|
|
100
100
|
}, label && (0, _react2.jsx)(_inner_text.EuiInnerText, null, function (ref, innerText) {
|
|
101
101
|
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
102
102
|
title: innerText,
|
|
103
|
-
ref: ref
|
|
103
|
+
ref: ref,
|
|
104
|
+
css: labelCssStyles
|
|
104
105
|
}, labelProps, {
|
|
105
|
-
css: labelCssStyles,
|
|
106
106
|
className: labelClasses
|
|
107
107
|
}), label);
|
|
108
108
|
}), valueRender && (0, _react2.jsx)(_inner_text.EuiInnerText, null, function (ref, innerText) {
|
|
@@ -61,8 +61,11 @@ var euiScaleText = function euiScaleText(euiThemeContext, options) {
|
|
|
61
61
|
}; // Generate margins for headings based on customScale (not on heading level)
|
|
62
62
|
|
|
63
63
|
var customScale = _customScale === 'xxxs' ? 'xxs' : _customScale || 'm';
|
|
64
|
-
var
|
|
65
|
-
var
|
|
64
|
+
var marginSize = euiTheme.size[customScale];
|
|
65
|
+
var headingMarginTop = (0, _global_styling.mathWithUnits)(marginSize, function (x) {
|
|
66
|
+
return x * 2;
|
|
67
|
+
});
|
|
68
|
+
var headingMarginBottom = marginSize;
|
|
66
69
|
return "\n font-size: ".concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n\n h1 {\n font-size: ").concat(headings.h1.fontSize, ";\n line-height: ").concat(headings.h1.lineHeight, ";\n }\n h1:not(:last-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', headingMarginBottom), "\n }\n\n h2 {\n font-size: ").concat(headings.h2.fontSize, ";\n line-height: ").concat(headings.h2.lineHeight, ";\n\n &:not(:first-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', headingMarginBottom), "\n }\n }\n\n h3 {\n font-size: ").concat(headings.h3.fontSize, ";\n line-height: ").concat(headings.h3.lineHeight, ";\n\n &:not(:first-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', headingMarginBottom), "\n }\n }\n\n h4 {\n font-size: ").concat(headings.h4.fontSize, ";\n line-height: ").concat(headings.h4.lineHeight, ";\n\n &:not(:first-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', headingMarginBottom), "\n }\n }\n\n h5 {\n font-size: ").concat(headings.h5.fontSize, ";\n line-height: ").concat(headings.h5.lineHeight, ";\n\n &:not(:first-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', headingMarginBottom), "\n }\n }\n\n h6 {\n font-size: ").concat(headings.h6.fontSize, ";\n line-height: ").concat(headings.h6.lineHeight, ";\n\n &:not(:first-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-top', headingMarginTop), "\n }\n\n &:not(:last-child) {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', headingMarginBottom), "\n }\n }\n\n p,\n ul,\n ol,\n dl,\n blockquote,\n img,\n pre {\n ").concat((0, _global_styling.logicalCSS)('margin-bottom', lineHeightSize), "\n }\n\n ul,\n ol {\n ").concat((0, _global_styling.logicalCSS)('margin-left', lineHeightSize), "\n }\n \n blockquote {\n font-size: ").concat(fontSize, ";\n padding: ").concat(lineHeightSize, ";\n }\n\n dd + dt {\n ").concat((0, _global_styling.logicalCSS)('margin-top', fontSize), "\n }\n\n dt,\n .eui-definitionListReverse dd {\n font-size: ").concat(fontSize, ";\n line-height: ").concat(lineHeight, ";\n }\n\n .eui-definitionListReverse dt {\n font-size: ").concat((0, _global_styling.euiFontSize)(euiThemeContext, 'xs', options).fontSize, ";\n color: ").concat(euiTheme.colors.text, ";\n }\n\n small {\n font-size: ").concat((0, _global_styling.euiFontSize)(euiThemeContext, 's', options).fontSize, ";\n }\n\n pre:not(.euiCodeBlock__pre) {\n padding: ").concat(lineHeightSize, ";\n }\n\n code:not(.euiCode):not(.euiCodeBlock__code) {\n font-size: .9em; // 90% of parent font size\n }\n ").concat( // when textSize is 'm', the 'kbd' element gets a line between the text and the border-bottom
|
|
67
70
|
_customScale === 'm' ? "\n kbd {\n ".concat((0, _global_styling.logicalCSS)('padding-bottom', euiTheme.size.xs), "\n // ensures when only one character the shape looks like a square\n ").concat((0, _global_styling.logicalCSS)('min-width', euiTheme.size.l), "\n ").concat((0, _global_styling.logicalTextAlignCSS)('center'), "\n }\n \n kbd::after {\n content: '';\n ").concat((0, _global_styling.logicalCSS)('border-bottom', "".concat(euiTheme.border.width.thin, " solid ").concat(euiTheme.colors.text)), "\n position: absolute;\n ").concat((0, _global_styling.logicalCSS)('bottom', euiTheme.size.xxs), "\n ").concat((0, _global_styling.logicalCSS)('left', 0), "\n ").concat((0, _global_styling.logicalCSS)('width', '100%'), "\n }") : '', "\n ");
|
|
68
71
|
};
|
|
@@ -50,12 +50,13 @@ var euiToolTipStyles = function euiToolTipStyles(euiThemeContext) {
|
|
|
50
50
|
*/
|
|
51
51
|
|
|
52
52
|
var arrowSize = euiTheme.size.m;
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
var arrowPlusSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
54
|
+
return (x / 2 + 1) * -1;
|
|
55
|
+
}); // 1.
|
|
56
56
|
|
|
57
|
-
var arrowMinusSize =
|
|
58
|
-
|
|
57
|
+
var arrowMinusSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
58
|
+
return (x / 2 - 1) * -1;
|
|
59
|
+
}); // 1.
|
|
59
60
|
|
|
60
61
|
return {
|
|
61
62
|
// Base
|
|
@@ -40,15 +40,20 @@ exports.euiTourStyles = euiTourStyles;
|
|
|
40
40
|
var euiTourBeaconStyles = function euiTourBeaconStyles(_ref2) {
|
|
41
41
|
var euiTheme = _ref2.euiTheme;
|
|
42
42
|
var arrowSize = euiTheme.size[_popover_arrow.popoverArrowSize];
|
|
43
|
-
var
|
|
43
|
+
var arrowHalfSize = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
44
|
+
return x / 2;
|
|
45
|
+
});
|
|
46
|
+
var arrowOffset = (0, _global_styling.mathWithUnits)(arrowSize, function (x) {
|
|
47
|
+
return x * -2;
|
|
48
|
+
});
|
|
44
49
|
return {
|
|
45
50
|
// Base
|
|
46
51
|
euiTourBeacon: /*#__PURE__*/(0, _react.css)("pointer-events:none;position:absolute;opacity:0;transition:opacity 0s ", euiTheme.animation[_popover_panel.openAnimationTiming], ";;label:euiTourBeacon;"),
|
|
47
52
|
// Positions
|
|
48
|
-
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top',
|
|
49
|
-
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top',
|
|
50
|
-
top: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowSize), ";", (0, _global_styling.logicalCSS)('left',
|
|
51
|
-
bottom: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top',
|
|
53
|
+
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), ";", (0, _global_styling.logicalCSS)('left', arrowOffset), ";;label:right;"),
|
|
54
|
+
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowHalfSize), ";", (0, _global_styling.logicalCSS)('left', arrowSize), ";;label:left;"),
|
|
55
|
+
top: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowSize), ";", (0, _global_styling.logicalCSS)('left', arrowHalfSize), ";;label:top;"),
|
|
56
|
+
bottom: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('top', arrowOffset), ";", (0, _global_styling.logicalCSS)('left', arrowHalfSize), ";;label:bottom;")
|
|
52
57
|
};
|
|
53
58
|
};
|
|
54
59
|
|
|
@@ -17,6 +17,19 @@ Object.keys(_logicals).forEach(function (key) {
|
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
+
var _math = require("./math");
|
|
21
|
+
|
|
22
|
+
Object.keys(_math).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _math[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _math[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
20
33
|
var _size = require("./size");
|
|
21
34
|
|
|
22
35
|
Object.keys(_size).forEach(function (key) {
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.mathWithUnits = void 0;
|
|
11
|
+
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
+
|
|
14
|
+
var _setPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/setPrototypeOf"));
|
|
15
|
+
|
|
16
|
+
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); _groups.set(_this, groups || _groups.get(re)); return (0, _setPrototypeOf2.default)(_this, BabelRegExp.prototype); } (0, _inherits2.default)(BabelRegExp, RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === "string") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } else if (typeof substitution === "function") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; if (_typeof(args[args.length - 1]) !== "object") { args = [].slice.call(args); args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
20
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
21
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
22
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
23
|
+
* Side Public License, v 1.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Utility for performing math callbacks on a string with CSS units
|
|
28
|
+
* and returning a string with its unit preserved.
|
|
29
|
+
*
|
|
30
|
+
* Example usage:
|
|
31
|
+
* mathWithUnits('4px', (x) => x / 2) = '2px';
|
|
32
|
+
* mathWithUnits(euiTheme.size.xs, (x) => x + 2) = '6px';
|
|
33
|
+
*/
|
|
34
|
+
var mathWithUnits = function mathWithUnits(value, callback) {
|
|
35
|
+
var unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
36
|
+
|
|
37
|
+
if (typeof value === 'string') {
|
|
38
|
+
var _matches$groups;
|
|
39
|
+
|
|
40
|
+
var regex = /*#__PURE__*/_wrapRegExp(/(\x2D?[\.0-9]+)(%|[A-Za-z]*)/, {
|
|
41
|
+
value: 1,
|
|
42
|
+
unit: 2
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
var matches = regex.exec(value);
|
|
46
|
+
if (!(matches !== null && matches !== void 0 && (_matches$groups = matches.groups) !== null && _matches$groups !== void 0 && _matches$groups.value)) return value;
|
|
47
|
+
var numericValue = Number(matches.groups.value);
|
|
48
|
+
var passedUnit = matches.groups.unit || unit;
|
|
49
|
+
return "".concat(callback(numericValue)).concat(passedUnit);
|
|
50
|
+
} else if (typeof value === 'number') {
|
|
51
|
+
return "".concat(callback(value)).concat(unit);
|
|
52
|
+
} else {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
exports.mathWithUnits = mathWithUnits;
|
|
@@ -117,12 +117,15 @@ exports.useEuiYScroll = useEuiYScroll;
|
|
|
117
117
|
|
|
118
118
|
var euiYScrollWithShadows = function euiYScrollWithShadows(euiTheme) {
|
|
119
119
|
var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
120
|
-
height = _ref7.height
|
|
120
|
+
height = _ref7.height,
|
|
121
|
+
_ref7$side = _ref7.side,
|
|
122
|
+
side = _ref7$side === void 0 ? 'both' : _ref7$side;
|
|
121
123
|
|
|
122
124
|
return "\n ".concat(euiYScroll(euiTheme, {
|
|
123
125
|
height: height
|
|
124
126
|
}), "\n ").concat(euiOverflowShadowStyles(euiTheme, {
|
|
125
|
-
direction: 'y'
|
|
127
|
+
direction: 'y',
|
|
128
|
+
side: side
|
|
126
129
|
}), "\n");
|
|
127
130
|
};
|
|
128
131
|
|
package/package.json
CHANGED
|
@@ -213,10 +213,10 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
213
213
|
|
|
214
214
|
if (_arrowDisplay !== 'none') {
|
|
215
215
|
iconButton = (0, _react2.jsx)(_button.EuiButtonIcon, (0, _extends2.default)({
|
|
216
|
-
color: "text"
|
|
216
|
+
color: "text",
|
|
217
|
+
css: cssIconButtonStyles
|
|
217
218
|
}, arrowProps, {
|
|
218
219
|
className: iconButtonClasses,
|
|
219
|
-
css: cssIconButtonStyles,
|
|
220
220
|
iconType: "arrowRight",
|
|
221
221
|
onClick: this.onToggle,
|
|
222
222
|
"aria-controls": id,
|
|
@@ -252,10 +252,11 @@ var EuiAccordionClass = /*#__PURE__*/function (_Component) {
|
|
|
252
252
|
childrenContent = children;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
-
var button = (0, _react2.jsx)(ButtonElement, (0, _extends2.default)({
|
|
255
|
+
var button = (0, _react2.jsx)(ButtonElement, (0, _extends2.default)({
|
|
256
|
+
css: cssButtonStyles
|
|
257
|
+
}, buttonProps, {
|
|
256
258
|
id: buttonId,
|
|
257
259
|
className: buttonClasses,
|
|
258
|
-
css: cssButtonStyles,
|
|
259
260
|
"aria-controls": id,
|
|
260
261
|
"aria-expanded": isOpen,
|
|
261
262
|
onClick: isDisabled ? undefined : this.onToggle,
|
|
@@ -50,7 +50,7 @@ exports.euiAccordionChildrenStyles = euiAccordionChildrenStyles;
|
|
|
50
50
|
var euiAccordionChildWrapperStyles = function euiAccordionChildWrapperStyles(_ref6) {
|
|
51
51
|
var euiTheme = _ref6.euiTheme;
|
|
52
52
|
return {
|
|
53
|
-
euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 0), " opacity:0;overflow:hidden;transition:", _global_styling.logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden
|
|
53
|
+
euiAccordion__childWrapper: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 0), " opacity:0;overflow:hidden;transition:", _global_styling.logicals.height, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ",opacity ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";visibility:hidden;&:focus{outline:none;};label:euiAccordion__childWrapper;"),
|
|
54
54
|
isOpen: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('height', 'auto'), " opacity:1;visibility:visible;;label:isOpen;")
|
|
55
55
|
};
|
|
56
56
|
};
|
|
@@ -32,6 +32,11 @@ var _avatar = require("./avatar.styles");
|
|
|
32
32
|
var _react2 = require("@emotion/react");
|
|
33
33
|
|
|
34
34
|
var _excluded = ["className", "color", "imageUrl", "initials", "initialsLength", "iconType", "iconSize", "iconColor", "name", "size", "type", "isDisabled", "style"];
|
|
35
|
+
|
|
36
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
+
|
|
38
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
39
|
+
|
|
35
40
|
var SIZES = ['s', 'm', 'l', 'xl'];
|
|
36
41
|
exports.SIZES = SIZES;
|
|
37
42
|
var TYPES = ['space', 'user'];
|
|
@@ -65,7 +70,9 @@ var EuiAvatar = function EuiAvatar(_ref) {
|
|
|
65
70
|
var classes = (0, _classnames.default)('euiAvatar', (_classNames = {}, (0, _defineProperty2.default)(_classNames, "euiAvatar--".concat(size), size), (0, _defineProperty2.default)(_classNames, "euiAvatar--".concat(type), type), (0, _defineProperty2.default)(_classNames, 'euiAvatar-isDisabled', isDisabled), _classNames), className);
|
|
66
71
|
var cssStyles = [styles.euiAvatar, styles[size], styles[type], isPlain && styles.plain, isSubdued && styles.subdued, isDisabled && styles.isDisabled];
|
|
67
72
|
checkValidInitials(initials);
|
|
68
|
-
|
|
73
|
+
|
|
74
|
+
var avatarStyle = _objectSpread({}, style);
|
|
75
|
+
|
|
69
76
|
var iconCustomColor = iconColor;
|
|
70
77
|
var isNamedColor = color === 'plain' || color === 'subdued' || color === null;
|
|
71
78
|
|
|
@@ -28,14 +28,18 @@ var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
|
|
|
28
28
|
var euiTheme = euiThemeContext.euiTheme,
|
|
29
29
|
colorMode = euiThemeContext.colorMode;
|
|
30
30
|
return {
|
|
31
|
-
euiBadge: /*#__PURE__*/(0, _react.css)("display:inline-block;vertical-align:middle;padding:0 ", euiTheme.size.s, ";", (0, _global_styling.logicalCSS)('max-width', '100%'), " font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs').fontSize, ";line-height:", euiTheme.base + 2, "px;font-weight:", euiTheme.font.weight.medium, ";white-space:nowrap;text-decoration:none;cursor:default;background-color:transparent;border:", euiTheme.border.width.thin, " solid transparent;border-radius:",
|
|
31
|
+
euiBadge: /*#__PURE__*/(0, _react.css)("display:inline-block;vertical-align:middle;padding:0 ", euiTheme.size.s, ";", (0, _global_styling.logicalCSS)('max-width', '100%'), " font-size:", (0, _global_styling.euiFontSize)(euiThemeContext, 'xs').fontSize, ";line-height:", euiTheme.base + 2, "px;font-weight:", euiTheme.font.weight.medium, ";white-space:nowrap;text-decoration:none;cursor:default;background-color:transparent;border:", euiTheme.border.width.thin, " solid transparent;border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.medium, function (x) {
|
|
32
|
+
return x / 2;
|
|
33
|
+
}), ";", (0, _global_styling.logicalTextAlignCSS)('left'), " &:focus-within{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&+.euiBadge{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";};label:euiBadge;"),
|
|
32
34
|
clickable: /*#__PURE__*/(0, _react.css)("&:not(:disabled){&:hover,&:focus{text-decoration:underline;}}&:focus{", (0, _global_styling.euiFocusRing)(euiThemeContext), ";}&:disabled{cursor:not-allowed;};label:clickable;"),
|
|
33
35
|
disabled: /*#__PURE__*/(0, _react.css)("color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled').color, "!important;background-color:", (0, _mixins.euiButtonColor)(euiThemeContext, 'disabled').backgroundColor, "!important;;label:disabled;"),
|
|
34
36
|
// Hollow has a border and is mostly used for autocompleters.
|
|
35
37
|
hollow: /*#__PURE__*/(0, _react.css)("background-color:", euiTheme.colors.emptyShade, ";border-color:", colorMode === 'DARK' ? (0, _services.tint)(euiTheme.border.color, 0.15) : euiTheme.border.color, ";color:", euiTheme.colors.text, ";;label:hollow;"),
|
|
36
38
|
// Content wrapper
|
|
37
39
|
euiBadge__content: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)( // Ensure proper height in case of just displaying an icon
|
|
38
|
-
'min-height', "".concat(
|
|
40
|
+
'min-height', "".concat((0, _global_styling.mathWithUnits)(euiTheme.border.width.thin, function (x) {
|
|
41
|
+
return euiTheme.base + x * 2;
|
|
42
|
+
}))), " display:flex;align-items:center;overflow:hidden;;label:euiBadge__content;"),
|
|
39
43
|
// Text
|
|
40
44
|
text: {
|
|
41
45
|
euiBadge__text: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)(), " cursor:inherit;;label:euiBadge__text;"),
|
|
@@ -49,7 +53,9 @@ var euiBadgeStyles = function euiBadgeStyles(euiThemeContext) {
|
|
|
49
53
|
},
|
|
50
54
|
// Clickable icons (iconOnClick)
|
|
51
55
|
iconButton: {
|
|
52
|
-
euiBadge__iconButton: /*#__PURE__*/(0, _react.css)("font-size:0;&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.ghost, 0.8), ";color:", euiTheme.colors.ink, ";border-radius:",
|
|
56
|
+
euiBadge__iconButton: /*#__PURE__*/(0, _react.css)("font-size:0;&:focus{background-color:", (0, _services.transparentize)(euiTheme.colors.ghost, 0.8), ";color:", euiTheme.colors.ink, ";border-radius:", (0, _global_styling.mathWithUnits)(euiTheme.border.radius.small, function (x) {
|
|
57
|
+
return x / 2;
|
|
58
|
+
}), ";}&:disabled{cursor:not-allowed;}.euiBadge__icon{margin:0!important;};label:euiBadge__iconButton;"),
|
|
53
59
|
right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-left', euiTheme.size.xs), ";;label:right;"),
|
|
54
60
|
left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-right', euiTheme.size.xs), ";;label:left;")
|
|
55
61
|
},
|
|
@@ -52,7 +52,9 @@ var euiBreadcrumbContentStyles = function euiBreadcrumbContentStyles(euiThemeCon
|
|
|
52
52
|
var euiTheme = euiThemeContext.euiTheme;
|
|
53
53
|
return {
|
|
54
54
|
euiBreadcrumb__content: /*#__PURE__*/(0, _react.css)("font-weight:", euiTheme.font.weight.medium, ";text-align:center;vertical-align:baseline;;label:euiBreadcrumb__content;"),
|
|
55
|
-
isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)(
|
|
55
|
+
isTruncated: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)((0, _global_styling.mathWithUnits)(euiTheme.size.base, function (x) {
|
|
56
|
+
return x * 10;
|
|
57
|
+
})), ";;label:isTruncated;"),
|
|
56
58
|
isTruncatedLast: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextTruncate)('none'), ";;label:isTruncatedLast;"),
|
|
57
59
|
// Types
|
|
58
60
|
page: /*#__PURE__*/(0, _react.css)("&:is(a):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'inset'), ";}&:is(button):focus{", (0, _global_styling.euiFocusRing)(euiThemeContext, 'center'), ";};label:page;"),
|
|
@@ -78,9 +78,9 @@ var EuiButtonDisplayContent = function EuiButtonDisplayContent(_ref) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
var isText = typeof children === 'string';
|
|
81
|
-
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
81
|
+
return (0, _react2.jsx)("span", (0, _extends2.default)({
|
|
82
82
|
css: cssStyles
|
|
83
|
-
}), icon, isText ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
83
|
+
}, contentProps), icon, isText ? (0, _react2.jsx)("span", (0, _extends2.default)({}, textProps, {
|
|
84
84
|
className: (0, _classnames.default)('eui-textTruncate', textProps === null || textProps === void 0 ? void 0 : textProps.className)
|
|
85
85
|
}), children) : children);
|
|
86
86
|
};
|
|
@@ -85,11 +85,15 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
var color = isDisabled ? 'disabled' : _color === 'ghost' ? 'text' : _color;
|
|
88
|
-
var
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
var styles = {
|
|
89
|
+
euiButtonIcon: /*#__PURE__*/(0, _react2.css)(";label:euiButtonIcon;"),
|
|
90
|
+
colors: (0, _button.useEuiButtonColorCSS)({
|
|
91
|
+
display: display
|
|
92
|
+
}),
|
|
93
|
+
// Temporary extra style for empty `:hover` state until we decide how to handle universally
|
|
94
|
+
hoverStyles: /*#__PURE__*/(0, _react2.css)("&:hover{background-color:", (0, _button.euiButtonEmptyColor)(euiThemeContext, color).backgroundColor, ";};label:hoverStyles;")
|
|
95
|
+
};
|
|
96
|
+
var cssStyles = [styles.euiButtonIcon, styles.colors[color], display === 'empty' && styles.hoverStyles];
|
|
93
97
|
var classes = (0, _classnames.default)('euiButtonIcon', size && sizeToClassNameMap[size], className);
|
|
94
98
|
|
|
95
99
|
if (_color === 'ghost') {
|
|
@@ -135,7 +139,7 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
|
|
|
135
139
|
rel: rel
|
|
136
140
|
});
|
|
137
141
|
return (0, _react2.jsx)("a", (0, _extends2.default)({
|
|
138
|
-
css:
|
|
142
|
+
css: cssStyles,
|
|
139
143
|
tabIndex: isAriaHidden ? -1 : undefined,
|
|
140
144
|
className: classes,
|
|
141
145
|
href: href,
|
|
@@ -147,7 +151,7 @@ var EuiButtonIcon = function EuiButtonIcon(props) {
|
|
|
147
151
|
|
|
148
152
|
var buttonType;
|
|
149
153
|
return (0, _react2.jsx)("button", (0, _extends2.default)({
|
|
150
|
-
css:
|
|
154
|
+
css: cssStyles,
|
|
151
155
|
tabIndex: isAriaHidden ? -1 : undefined,
|
|
152
156
|
disabled: isDisabled,
|
|
153
157
|
className: classes,
|
|
@@ -139,6 +139,7 @@ EuiCollapsibleNav.propTypes = {
|
|
|
139
139
|
/**
|
|
140
140
|
* Defines the width of the panel.
|
|
141
141
|
* Pass a predefined size of `s | m | l`, or pass any number/string compatible with the CSS `width` attribute
|
|
142
|
+
* @default m
|
|
142
143
|
*/
|
|
143
144
|
size: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]),
|
|
144
145
|
|
|
@@ -148,21 +149,25 @@ EuiCollapsibleNav.propTypes = {
|
|
|
148
149
|
* set to `false` to not restrict the width,
|
|
149
150
|
* set to a number for a custom width in px,
|
|
150
151
|
* set to a string for a custom width in custom measurement.
|
|
152
|
+
* @default false
|
|
151
153
|
*/
|
|
152
154
|
maxWidth: _propTypes.default.oneOfType([_propTypes.default.bool.isRequired, _propTypes.default.number.isRequired, _propTypes.default.string.isRequired]),
|
|
153
155
|
|
|
154
156
|
/**
|
|
155
157
|
* Customize the padding around the content of the flyout header, body and footer
|
|
158
|
+
* @default l
|
|
156
159
|
*/
|
|
157
160
|
paddingSize: _propTypes.default.any,
|
|
158
161
|
|
|
159
162
|
/**
|
|
160
163
|
* Adds an EuiOverlayMask and wraps in an EuiPortal
|
|
164
|
+
* @default true
|
|
161
165
|
*/
|
|
162
166
|
ownFocus: _propTypes.default.bool,
|
|
163
167
|
|
|
164
168
|
/**
|
|
165
169
|
* Hides the default close button. You must provide another close button somewhere within the flyout.
|
|
170
|
+
* @default false
|
|
166
171
|
*/
|
|
167
172
|
hideCloseButton: _propTypes.default.bool,
|
|
168
173
|
|
|
@@ -175,6 +180,7 @@ EuiCollapsibleNav.propTypes = {
|
|
|
175
180
|
* Position of close button.
|
|
176
181
|
* `inside`: Floating to just inside the flyout, always top right;
|
|
177
182
|
* `outside`: Floating just outside the flyout near the top (side dependent on `side`). Helpful when the close button may cover other interactable content.
|
|
183
|
+
* @default inside
|
|
178
184
|
*/
|
|
179
185
|
closeButtonPosition: _propTypes.default.oneOf(["inside", "outside"]),
|
|
180
186
|
|
|
@@ -212,12 +218,14 @@ EuiCollapsibleNav.propTypes = {
|
|
|
212
218
|
/**
|
|
213
219
|
* Which side of the window to attach to.
|
|
214
220
|
* The `left` option should only be used for navigation.
|
|
221
|
+
* @default right
|
|
215
222
|
*/
|
|
216
223
|
side: _propTypes.default.any,
|
|
217
224
|
|
|
218
225
|
/**
|
|
219
226
|
* Defaults to `dialog` which is best for most cases of the flyout.
|
|
220
227
|
* Otherwise pass in your own, aria-role, or `null` to remove it and use the semantic `as` element instead
|
|
228
|
+
* @default dialog
|
|
221
229
|
*/
|
|
222
230
|
role: _propTypes.default.oneOfType([_propTypes.default.oneOf([null]), _propTypes.default.string.isRequired]),
|
|
223
231
|
|
|
@@ -24,7 +24,9 @@ var _colorCSS = function _colorCSS(color) {
|
|
|
24
24
|
var euiExpressionStyles = function euiExpressionStyles(euiThemeContext) {
|
|
25
25
|
var euiTheme = euiThemeContext.euiTheme;
|
|
26
26
|
return {
|
|
27
|
-
euiExpression: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", (0, _global_styling.logicalCSS)('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";", (0, _global_styling.logicalTextAlignCSS)('left'), " padding:",
|
|
27
|
+
euiExpression: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiTextBreakWord)(), ";display:inline-block;font-family:", euiTheme.font.familyCode, ";", (0, _global_styling.logicalCSS)('border-bottom', "".concat(euiTheme.border.width.thick, " solid transparent")), " ", (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";", (0, _global_styling.logicalTextAlignCSS)('left'), " padding:", (0, _global_styling.mathWithUnits)(euiTheme.size.s, function (x) {
|
|
28
|
+
return x / 2;
|
|
29
|
+
}), " 0;color:", euiTheme.colors.text, ";&:focus{", (0, _global_styling.logicalCSS)('border-bottom-style', 'solid'), ";}&+.euiExpression{", (0, _global_styling.logicalCSS)('margin-left', euiTheme.size.s), ";};label:euiExpression;"),
|
|
28
30
|
// Variants
|
|
29
31
|
columns: /*#__PURE__*/(0, _react.css)("border-color:transparent;", (0, _global_styling.logicalCSS)('border-bottom-style', 'solid'), " ", (0, _global_styling.logicalCSS)('margin-bottom', euiTheme.size.xs), " ", (0, _global_styling.logicalCSS)('width', '100%'), " display:flex;padding:", euiTheme.size.xs, ";border-radius:", euiTheme.size.xs, ";;label:columns;"),
|
|
30
32
|
truncate: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('max-width', '100%'), ";;label:truncate;"),
|