@elastic/eui 59.0.1 → 59.1.0-rc1
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 +2 -136
- package/dist/eui_theme_dark.json +0 -6
- package/dist/eui_theme_dark.json.d.ts +0 -6
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +2 -136
- package/dist/eui_theme_light.json +0 -6
- package/dist/eui_theme_light.json.d.ts +0 -6
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/accessibility/skip_link/skip_link.js +9 -7
- package/es/components/avatar/avatar.js +9 -7
- package/es/components/bottom_bar/bottom_bar.js +8 -9
- package/es/components/breadcrumbs/breadcrumbs.js +2 -1
- package/es/components/button/{button_content.js → _button_content_deprecated.js} +4 -3
- package/es/components/button/button.js +16 -10
- package/es/components/button/button_display/_button_display.js +141 -0
- package/es/components/button/button_display/_button_display.styles.js +53 -0
- package/es/components/button/button_display/_button_display_content.js +100 -0
- package/es/components/button/button_display/_button_display_content.styles.js +61 -0
- package/es/components/button/button_empty/button_empty.js +3 -2
- package/es/components/button/button_group/button_group.js +2 -1
- package/es/components/button/button_group/button_group_button.js +3 -2
- package/es/components/call_out/call_out.js +9 -8
- package/es/components/card/card.js +2 -1
- package/es/components/card/card_select.js +2 -1
- package/es/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/es/components/expression/expression.js +11 -10
- package/es/components/facet/facet_button.js +36 -19
- package/es/components/facet/facet_button.styles.js +64 -0
- package/es/components/facet/facet_group.js +17 -27
- package/es/components/facet/facet_group.styles.js +79 -0
- package/es/components/header/header_links/header_link.js +2 -1
- package/es/components/health/health.js +7 -6
- package/es/components/horizontal_rule/horizontal_rule.js +7 -6
- package/es/components/link/link.js +8 -7
- package/es/components/loading/loading_chart.js +7 -6
- package/es/components/loading/loading_content.js +7 -6
- package/es/components/loading/loading_logo.js +7 -6
- package/es/components/loading/loading_spinner.js +20 -8
- package/es/components/loading/loading_spinner.styles.js +4 -4
- package/es/components/mark/mark.js +9 -8
- package/es/components/markdown_editor/markdown_format.js +7 -6
- package/es/components/notification/notification_event.js +2 -1
- package/es/components/pagination/pagination_button.js +2 -1
- package/es/components/panel/panel.js +8 -7
- package/es/components/provider/cache/cache_context.js +12 -0
- package/es/components/provider/cache/cache_provider.js +17 -0
- package/es/components/provider/cache/index.js +9 -0
- package/es/components/provider/index.js +1 -1
- package/es/components/provider/provider.js +39 -5
- package/es/components/provider/system/index.js +8 -0
- package/es/components/provider/system/system.js +33 -0
- package/es/components/spacer/spacer.js +7 -6
- package/es/components/text/text.js +7 -6
- package/es/components/text/text_color.js +7 -6
- package/es/components/timeline/timeline_item.js +7 -6
- package/es/components/timeline/timeline_item_icon.js +7 -6
- package/es/components/title/title.js +7 -6
- package/es/global_styling/utility/utility.js +27 -0
- package/es/services/theme/hooks.js +2 -2
- package/es/services/theme/provider.js +1 -5
- package/eui.d.ts +1030 -357
- package/i18ntokens.json +12 -12
- package/lib/components/accessibility/skip_link/skip_link.js +13 -10
- package/lib/components/avatar/avatar.js +12 -8
- package/lib/components/bottom_bar/bottom_bar.js +9 -6
- package/lib/components/breadcrumbs/breadcrumbs.js +2 -1
- package/lib/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
- package/lib/components/button/button.js +19 -13
- package/lib/components/button/button_display/_button_display.js +146 -0
- package/lib/components/button/button_display/_button_display.styles.js +59 -0
- package/lib/components/button/button_display/_button_display_content.js +111 -0
- package/lib/components/button/button_display/_button_display_content.styles.js +64 -0
- package/lib/components/button/button_empty/button_empty.js +4 -3
- package/lib/components/button/button_group/button_group.js +2 -1
- package/lib/components/button/button_group/button_group_button.js +3 -2
- package/lib/components/call_out/call_out.js +14 -10
- package/lib/components/card/card.js +2 -1
- package/lib/components/card/card_select.js +2 -1
- package/lib/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/lib/components/expression/expression.js +14 -12
- package/lib/components/facet/facet_button.js +43 -21
- package/lib/components/facet/facet_button.styles.js +79 -0
- package/lib/components/facet/facet_group.js +20 -29
- package/lib/components/facet/facet_group.styles.js +82 -0
- package/lib/components/header/header_links/header_link.js +2 -1
- package/lib/components/health/health.js +10 -8
- package/lib/components/horizontal_rule/horizontal_rule.js +10 -8
- package/lib/components/link/link.js +13 -7
- package/lib/components/loading/loading_chart.js +10 -8
- package/lib/components/loading/loading_content.js +10 -8
- package/lib/components/loading/loading_logo.js +10 -8
- package/lib/components/loading/loading_spinner.js +23 -10
- package/lib/components/loading/loading_spinner.styles.js +4 -4
- package/lib/components/mark/mark.js +12 -10
- package/lib/components/markdown_editor/markdown_format.js +10 -8
- package/lib/components/notification/notification_event.js +2 -1
- package/lib/components/panel/panel.js +11 -9
- package/lib/components/provider/cache/cache_context.js +24 -0
- package/lib/components/provider/cache/cache_provider.js +29 -0
- package/lib/components/provider/cache/index.js +31 -0
- package/lib/components/provider/index.js +12 -7
- package/lib/components/provider/provider.js +40 -5
- package/lib/components/provider/system/index.js +18 -0
- package/lib/components/provider/system/system.js +45 -0
- package/lib/components/spacer/spacer.js +10 -8
- package/lib/components/text/text.js +10 -8
- package/lib/components/text/text_color.js +10 -8
- package/lib/components/timeline/timeline_item.js +10 -8
- package/lib/components/timeline/timeline_item_icon.js +10 -8
- package/lib/components/title/title.js +11 -9
- package/lib/global_styling/utility/utility.js +31 -0
- package/lib/services/theme/hooks.js +2 -2
- package/lib/services/theme/provider.js +3 -6
- package/optimize/es/components/accessibility/skip_link/skip_link.js +6 -5
- package/optimize/es/components/avatar/avatar.js +7 -5
- package/optimize/es/components/bottom_bar/bottom_bar.js +8 -9
- package/optimize/es/components/breadcrumbs/breadcrumbs.js +2 -1
- package/optimize/es/components/button/{button_content.js → _button_content_deprecated.js} +1 -1
- package/optimize/es/components/button/button.js +13 -8
- package/optimize/es/components/button/button_display/_button_display.js +73 -0
- package/optimize/es/components/button/button_display/_button_display.styles.js +53 -0
- package/optimize/es/components/button/button_display/_button_display_content.js +67 -0
- package/optimize/es/components/button/button_display/_button_display_content.styles.js +61 -0
- package/optimize/es/components/button/button_empty/button_empty.js +1 -1
- package/optimize/es/components/button/button_group/button_group_button.js +1 -1
- package/optimize/es/components/call_out/call_out.js +8 -7
- package/optimize/es/components/expression/expression.js +10 -9
- package/optimize/es/components/facet/facet_button.js +35 -18
- package/optimize/es/components/facet/facet_button.styles.js +64 -0
- package/optimize/es/components/facet/facet_group.js +14 -24
- package/optimize/es/components/facet/facet_group.styles.js +79 -0
- package/optimize/es/components/health/health.js +6 -5
- package/optimize/es/components/horizontal_rule/horizontal_rule.js +6 -5
- package/optimize/es/components/link/link.js +7 -6
- package/optimize/es/components/loading/loading_chart.js +6 -5
- package/optimize/es/components/loading/loading_content.js +6 -5
- package/optimize/es/components/loading/loading_logo.js +6 -5
- package/optimize/es/components/loading/loading_spinner.js +8 -6
- package/optimize/es/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/es/components/mark/mark.js +8 -7
- package/optimize/es/components/markdown_editor/markdown_format.js +6 -5
- package/optimize/es/components/panel/panel.js +7 -6
- package/optimize/es/components/provider/cache/cache_context.js +12 -0
- package/optimize/es/components/provider/cache/cache_provider.js +17 -0
- package/optimize/es/components/provider/cache/index.js +9 -0
- package/optimize/es/components/provider/index.js +1 -1
- package/optimize/es/components/provider/provider.js +39 -5
- package/optimize/es/components/provider/system/index.js +8 -0
- package/optimize/es/components/provider/system/system.js +33 -0
- package/optimize/es/components/spacer/spacer.js +6 -5
- package/optimize/es/components/text/text.js +6 -5
- package/optimize/es/components/text/text_color.js +6 -5
- package/optimize/es/components/timeline/timeline_item.js +6 -5
- package/optimize/es/components/timeline/timeline_item_icon.js +6 -5
- package/optimize/es/components/title/title.js +6 -5
- package/optimize/es/global_styling/utility/utility.js +27 -0
- package/optimize/es/services/theme/hooks.js +2 -2
- package/optimize/es/services/theme/provider.js +1 -5
- package/optimize/lib/components/accessibility/skip_link/skip_link.js +8 -6
- package/optimize/lib/components/avatar/avatar.js +9 -5
- package/optimize/lib/components/bottom_bar/bottom_bar.js +9 -6
- package/optimize/lib/components/breadcrumbs/breadcrumbs.js +2 -1
- package/optimize/lib/components/button/{button_content.js → _button_content_deprecated.js} +3 -3
- package/optimize/lib/components/button/button.js +16 -11
- package/optimize/lib/components/button/button_display/_button_display.js +79 -0
- package/optimize/lib/components/button/button_display/_button_display.styles.js +59 -0
- package/optimize/lib/components/button/button_display/_button_display_content.js +78 -0
- package/optimize/lib/components/button/button_display/_button_display_content.styles.js +64 -0
- package/optimize/lib/components/button/button_empty/button_empty.js +2 -2
- package/optimize/lib/components/button/button_group/button_group_button.js +1 -1
- package/optimize/lib/components/call_out/call_out.js +13 -9
- package/optimize/lib/components/expression/expression.js +11 -9
- package/optimize/lib/components/facet/facet_button.js +40 -18
- package/optimize/lib/components/facet/facet_button.styles.js +79 -0
- package/optimize/lib/components/facet/facet_group.js +15 -24
- package/optimize/lib/components/facet/facet_group.styles.js +82 -0
- package/optimize/lib/components/health/health.js +7 -5
- package/optimize/lib/components/horizontal_rule/horizontal_rule.js +7 -5
- package/optimize/lib/components/link/link.js +12 -6
- package/optimize/lib/components/loading/loading_chart.js +7 -5
- package/optimize/lib/components/loading/loading_content.js +7 -5
- package/optimize/lib/components/loading/loading_logo.js +7 -5
- package/optimize/lib/components/loading/loading_spinner.js +9 -6
- package/optimize/lib/components/loading/loading_spinner.styles.js +4 -4
- package/optimize/lib/components/mark/mark.js +9 -7
- package/optimize/lib/components/markdown_editor/markdown_format.js +7 -5
- package/optimize/lib/components/panel/panel.js +8 -6
- package/optimize/lib/components/provider/cache/cache_context.js +24 -0
- package/optimize/lib/components/provider/cache/cache_provider.js +29 -0
- package/optimize/lib/components/provider/cache/index.js +31 -0
- package/optimize/lib/components/provider/index.js +12 -7
- package/optimize/lib/components/provider/provider.js +40 -5
- package/optimize/lib/components/provider/system/index.js +18 -0
- package/optimize/lib/components/provider/system/system.js +54 -0
- package/optimize/lib/components/spacer/spacer.js +7 -5
- package/optimize/lib/components/text/text.js +7 -5
- package/optimize/lib/components/text/text_color.js +7 -5
- package/optimize/lib/components/timeline/timeline_item.js +7 -5
- package/optimize/lib/components/timeline/timeline_item_icon.js +7 -5
- package/optimize/lib/components/title/title.js +8 -6
- package/optimize/lib/global_styling/utility/utility.js +31 -0
- package/optimize/lib/services/theme/hooks.js +2 -2
- package/optimize/lib/services/theme/provider.js +3 -6
- package/package.json +1 -1
- package/src/components/index.scss +0 -1
- package/src/components/selectable/selectable_message/_selectable_message.scss +1 -0
- package/src/themes/amsterdam/overrides/_index.scss +0 -1
- package/test-env/components/accessibility/skip_link/skip_link.js +13 -10
- package/test-env/components/avatar/avatar.js +12 -8
- package/test-env/components/bottom_bar/bottom_bar.js +9 -6
- package/test-env/components/breadcrumbs/breadcrumbs.js +2 -1
- package/test-env/components/button/{button_content.js → _button_content_deprecated.js} +6 -5
- package/test-env/components/button/button.js +19 -13
- package/test-env/components/button/button_display/_button_display.js +143 -0
- package/test-env/components/button/button_display/_button_display.styles.js +59 -0
- package/test-env/components/button/button_display/_button_display_content.js +108 -0
- package/test-env/components/button/button_display/_button_display_content.styles.js +64 -0
- package/test-env/components/button/button_empty/button_empty.js +4 -3
- package/test-env/components/button/button_group/button_group.js +2 -1
- package/test-env/components/button/button_group/button_group_button.js +3 -2
- package/test-env/components/call_out/call_out.js +14 -10
- package/test-env/components/card/card.js +2 -1
- package/test-env/components/card/card_select.js +2 -1
- package/test-env/components/date_picker/auto_refresh/auto_refresh.js +2 -1
- package/test-env/components/expression/expression.js +14 -12
- package/test-env/components/facet/facet_button.js +43 -21
- package/test-env/components/facet/facet_button.styles.js +79 -0
- package/test-env/components/facet/facet_group.js +20 -29
- package/test-env/components/facet/facet_group.styles.js +82 -0
- package/test-env/components/header/header_links/header_link.js +2 -1
- package/test-env/components/health/health.js +10 -8
- package/test-env/components/horizontal_rule/horizontal_rule.js +10 -8
- package/test-env/components/link/link.js +13 -7
- package/test-env/components/loading/loading_chart.js +10 -8
- package/test-env/components/loading/loading_content.js +10 -8
- package/test-env/components/loading/loading_logo.js +10 -8
- package/test-env/components/loading/loading_spinner.js +23 -10
- package/test-env/components/loading/loading_spinner.styles.js +4 -4
- package/test-env/components/mark/mark.js +12 -10
- package/test-env/components/markdown_editor/markdown_format.js +10 -8
- package/test-env/components/notification/notification_event.js +2 -1
- package/test-env/components/panel/panel.js +11 -9
- package/test-env/components/provider/cache/cache_context.js +24 -0
- package/test-env/components/provider/cache/cache_provider.js +29 -0
- package/test-env/components/provider/cache/index.js +31 -0
- package/test-env/components/provider/index.js +12 -7
- package/test-env/components/provider/provider.js +40 -5
- package/test-env/components/provider/system/index.js +18 -0
- package/test-env/components/provider/system/system.js +54 -0
- package/test-env/components/spacer/spacer.js +10 -8
- package/test-env/components/text/text.js +10 -8
- package/test-env/components/text/text_color.js +10 -8
- package/test-env/components/timeline/timeline_item.js +10 -8
- package/test-env/components/timeline/timeline_item_icon.js +10 -8
- package/test-env/components/title/title.js +11 -9
- package/test-env/global_styling/utility/utility.js +31 -0
- package/test-env/services/theme/hooks.js +2 -2
- package/test-env/services/theme/provider.js +3 -6
- package/src/components/facet/_facet_button.scss +0 -69
- package/src/components/facet/_facet_group.scss +0 -24
- package/src/components/facet/_index.scss +0 -4
- package/src/components/facet/_variables.scss +0 -6
- package/src/themes/amsterdam/overrides/_facet.scss +0 -10
|
@@ -23,14 +23,14 @@ var spinnerSizes = {
|
|
|
23
23
|
xxl: 'xxl'
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
return "".concat(highlight, " ").concat(
|
|
26
|
+
var spinnerColorsCSS = function spinnerColorsCSS(border, highlight) {
|
|
27
|
+
return "\n border-color: ".concat(highlight, " ").concat(border, " ").concat(border, " ").concat(border, ";\n ");
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
var euiLoadingSpinnerStyles = function euiLoadingSpinnerStyles(_ref) {
|
|
30
|
+
var euiLoadingSpinnerStyles = function euiLoadingSpinnerStyles(_ref, color) {
|
|
31
31
|
var euiTheme = _ref.euiTheme;
|
|
32
32
|
return {
|
|
33
|
-
euiLoadingSpinner: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-block;border-radius:50%;border:", euiTheme.border.thick, ";
|
|
33
|
+
euiLoadingSpinner: /*#__PURE__*/(0, _react.css)("flex-shrink:0;display:inline-block;border-radius:50%;border:", euiTheme.border.thick, ";", spinnerColorsCSS((color === null || color === void 0 ? void 0 : color.border) || euiTheme.colors.lightShade, (color === null || color === void 0 ? void 0 : color.highlight) || euiTheme.colors.primary), ";", _global_styling.euiCanAnimate, "{animation:", _loadingSpinner, " 0.6s infinite linear;};label:euiLoadingSpinner;"),
|
|
34
34
|
// Sizes
|
|
35
35
|
s: /*#__PURE__*/(0, _react.css)("width:", euiTheme.size[spinnerSizes.s], ";height:", euiTheme.size[spinnerSizes.s], ";border-width:calc(", euiTheme.border.width.thin, " * 1.5);;label:s;"),
|
|
36
36
|
m: /*#__PURE__*/(0, _react.css)("width:", euiTheme.size[spinnerSizes.m], ";height:", euiTheme.size[spinnerSizes.m], ";border-width:calc(", euiTheme.border.width.thin, " * 1.5);;label:m;"),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.EuiMark = void 0;
|
|
6
|
+
exports._EuiMark = exports.EuiMark = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -13,13 +13,13 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
13
13
|
|
|
14
14
|
var _i18n = require("../i18n");
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _system = require("../provider/system");
|
|
17
17
|
|
|
18
18
|
var _mark = require("./mark.styles");
|
|
19
19
|
|
|
20
20
|
var _react2 = require("@emotion/react");
|
|
21
21
|
|
|
22
|
-
var _excluded = ["children", "className", "hasScreenReaderHelpText"];
|
|
22
|
+
var _excluded = ["children", "className", "euiTheme", "hasScreenReaderHelpText"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -29,30 +29,30 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
29
29
|
|
|
30
30
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _EuiMark = function _EuiMark(_ref) {
|
|
33
33
|
var children = _ref.children,
|
|
34
34
|
className = _ref.className,
|
|
35
|
+
euiTheme = _ref.euiTheme,
|
|
35
36
|
_ref$hasScreenReaderH = _ref.hasScreenReaderHelpText,
|
|
36
37
|
hasScreenReaderHelpText = _ref$hasScreenReaderH === void 0 ? true : _ref$hasScreenReaderH,
|
|
37
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
38
39
|
|
|
39
|
-
var useTheme = (0, _services.useEuiTheme)();
|
|
40
40
|
var highlightStart = (0, _i18n.useEuiI18n)('euiMark.highlightStart', 'highlight start');
|
|
41
41
|
var highlightEnd = (0, _i18n.useEuiI18n)('euiMark.highlightEnd', 'highlight end');
|
|
42
|
-
var styles = (0, _mark.euiMarkStyles)(
|
|
42
|
+
var styles = (0, _mark.euiMarkStyles)(euiTheme, {
|
|
43
43
|
hasScreenReaderHelpText: hasScreenReaderHelpText,
|
|
44
44
|
highlightStart: highlightStart,
|
|
45
45
|
highlightEnd: highlightEnd
|
|
46
46
|
});
|
|
47
47
|
var classes = (0, _classnames.default)('euiMark', className);
|
|
48
48
|
return (0, _react2.jsx)("mark", _extends({
|
|
49
|
-
css: [styles
|
|
49
|
+
css: [styles],
|
|
50
50
|
className: classes
|
|
51
51
|
}, rest), children);
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
exports.
|
|
55
|
-
|
|
54
|
+
exports._EuiMark = _EuiMark;
|
|
55
|
+
_EuiMark.propTypes = {
|
|
56
56
|
className: _propTypes.default.string,
|
|
57
57
|
"aria-label": _propTypes.default.string,
|
|
58
58
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -67,4 +67,6 @@ EuiMark.propTypes = {
|
|
|
67
67
|
* ReactNode to render as this component's content
|
|
68
68
|
*/
|
|
69
69
|
children: _propTypes.default.node.isRequired
|
|
70
|
-
};
|
|
70
|
+
};
|
|
71
|
+
var EuiMark = (0, _system.withEuiSystem)(_EuiMark);
|
|
72
|
+
exports.EuiMark = EuiMark;
|
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.EuiMarkdownFormat = void 0;
|
|
8
|
+
exports._EuiMarkdownFormat = exports.EuiMarkdownFormat = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
17
17
|
|
|
18
18
|
var _text = require("../text/text");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _system = require("../provider/system");
|
|
21
21
|
|
|
22
22
|
var _markdown_format = require("./markdown_format.styles");
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ var _markdown_default_plugins = require("./plugins/markdown_default_plugins");
|
|
|
25
25
|
|
|
26
26
|
var _react2 = require("@emotion/react");
|
|
27
27
|
|
|
28
|
-
var _excluded = ["children", "className", "parsingPluginList", "processingPluginList", "textSize"];
|
|
28
|
+
var _excluded = ["children", "className", "parsingPluginList", "processingPluginList", "textSize", "euiTheme"];
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
31
|
|
|
@@ -39,7 +39,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
39
39
|
|
|
40
40
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
41
41
|
|
|
42
|
-
var
|
|
42
|
+
var _EuiMarkdownFormat = function _EuiMarkdownFormat(_ref) {
|
|
43
43
|
var children = _ref.children,
|
|
44
44
|
className = _ref.className,
|
|
45
45
|
_ref$parsingPluginLis = _ref.parsingPluginList,
|
|
@@ -48,6 +48,7 @@ var EuiMarkdownFormat = function EuiMarkdownFormat(_ref) {
|
|
|
48
48
|
processingPluginList = _ref$processingPlugin === void 0 ? _markdown_default_plugins.defaultProcessingPlugins : _ref$processingPlugin,
|
|
49
49
|
_ref$textSize = _ref.textSize,
|
|
50
50
|
textSize = _ref$textSize === void 0 ? 'm' : _ref$textSize,
|
|
51
|
+
euiTheme = _ref.euiTheme,
|
|
51
52
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
52
53
|
|
|
53
54
|
var processor = (0, _react.useMemo)(function () {
|
|
@@ -65,7 +66,6 @@ var EuiMarkdownFormat = function EuiMarkdownFormat(_ref) {
|
|
|
65
66
|
return children;
|
|
66
67
|
}
|
|
67
68
|
}, [children, processor]);
|
|
68
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
69
69
|
var styles = (0, _markdown_format.euiMarkdownFormatStyles)(euiTheme);
|
|
70
70
|
var cssStyles = [styles.euiMarkdownFormat, styles[textSize]];
|
|
71
71
|
var classes = (0, _classnames.default)('euiMarkdownFormat', className);
|
|
@@ -76,8 +76,8 @@ var EuiMarkdownFormat = function EuiMarkdownFormat(_ref) {
|
|
|
76
76
|
}, rest), result);
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
exports.
|
|
80
|
-
|
|
79
|
+
exports._EuiMarkdownFormat = _EuiMarkdownFormat;
|
|
80
|
+
_EuiMarkdownFormat.propTypes = {
|
|
81
81
|
className: _propTypes.default.string,
|
|
82
82
|
"aria-label": _propTypes.default.string,
|
|
83
83
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -93,4 +93,6 @@ EuiMarkdownFormat.propTypes = {
|
|
|
93
93
|
* Determines the text size. Choose `relative` to control the `font-size` based on the value of a parent container.
|
|
94
94
|
*/
|
|
95
95
|
textSize: _propTypes.default.any
|
|
96
|
-
};
|
|
96
|
+
};
|
|
97
|
+
var EuiMarkdownFormat = (0, _system.withEuiSystem)(_EuiMarkdownFormat);
|
|
98
|
+
exports.EuiMarkdownFormat = EuiMarkdownFormat;
|
|
@@ -275,7 +275,8 @@ EuiNotificationEvent.propTypes = {
|
|
|
275
275
|
iconSide: _propTypes.default.oneOf(["left", "right"]),
|
|
276
276
|
|
|
277
277
|
/**
|
|
278
|
-
* Object of props passed to the <span/> wrapping the content's text
|
|
278
|
+
* Object of props passed to the <span/> wrapping the content's text (only if the children is a `string`)
|
|
279
|
+
* It doesn't apply to the icon.
|
|
279
280
|
*/
|
|
280
281
|
textProps: _propTypes.default.shape({
|
|
281
282
|
className: _propTypes.default.string,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SIZES = exports.EuiPanel = exports.COLORS = exports.BORDER_RADII = void 0;
|
|
6
|
+
exports._EuiPanel = exports.SIZES = exports.EuiPanel = exports.COLORS = exports.BORDER_RADII = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _system = require("../provider/system");
|
|
15
15
|
|
|
16
16
|
var _global_styling = require("../../global_styling");
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ var _panel = require("./panel.style");
|
|
|
21
21
|
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["children", "className", "paddingSize", "borderRadius", "color", "hasShadow", "hasBorder", "grow", "panelRef", "element"];
|
|
24
|
+
var _excluded = ["children", "className", "paddingSize", "borderRadius", "color", "hasShadow", "hasBorder", "grow", "panelRef", "element", "euiTheme"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
@@ -51,7 +51,7 @@ exports.BORDER_RADII = BORDER_RADII;
|
|
|
51
51
|
var COLORS = _global_styling.BACKGROUND_COLORS;
|
|
52
52
|
exports.COLORS = COLORS;
|
|
53
53
|
|
|
54
|
-
var
|
|
54
|
+
var _EuiPanel = function _EuiPanel(_ref) {
|
|
55
55
|
var children = _ref.children,
|
|
56
56
|
className = _ref.className,
|
|
57
57
|
_ref$paddingSize = _ref.paddingSize,
|
|
@@ -68,10 +68,10 @@ var EuiPanel = function EuiPanel(_ref) {
|
|
|
68
68
|
grow = _ref$grow === void 0 ? true : _ref$grow,
|
|
69
69
|
panelRef = _ref.panelRef,
|
|
70
70
|
element = _ref.element,
|
|
71
|
+
euiTheme = _ref.euiTheme,
|
|
71
72
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
74
|
+
// Shadows are only allowed when there's a white background (plain)
|
|
75
75
|
var canHaveShadow = !hasBorder && color === 'plain';
|
|
76
76
|
var canHaveBorder = color === 'plain' || color === 'transparent';
|
|
77
77
|
var styles = (0, _panel.euiPanelStyles)(euiTheme);
|
|
@@ -92,8 +92,8 @@ var EuiPanel = function EuiPanel(_ref) {
|
|
|
92
92
|
}, rest), children);
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
exports.
|
|
96
|
-
|
|
95
|
+
exports._EuiPanel = _EuiPanel;
|
|
96
|
+
_EuiPanel.propTypes = {
|
|
97
97
|
element: _propTypes.default.oneOfType([_propTypes.default.oneOf(["button"]), _propTypes.default.oneOf(["div"])]),
|
|
98
98
|
|
|
99
99
|
/**
|
|
@@ -159,4 +159,6 @@ EuiPanel.propTypes = {
|
|
|
159
159
|
className: _propTypes.default.string,
|
|
160
160
|
"aria-label": _propTypes.default.string,
|
|
161
161
|
"data-test-subj": _propTypes.default.string
|
|
162
|
-
};
|
|
162
|
+
};
|
|
163
|
+
var EuiPanel = (0, _system.withEuiSystem)(_EuiPanel);
|
|
164
|
+
exports.EuiPanel = EuiPanel;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useEuiCacheContext = exports.EuiCacheContext = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
12
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
13
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
14
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
15
|
+
* Side Public License, v 1.
|
|
16
|
+
*/
|
|
17
|
+
var EuiCacheContext = /*#__PURE__*/(0, _react.createContext)(undefined);
|
|
18
|
+
exports.EuiCacheContext = EuiCacheContext;
|
|
19
|
+
|
|
20
|
+
var useEuiCacheContext = function useEuiCacheContext() {
|
|
21
|
+
return (0, _react.useContext)(EuiCacheContext);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.useEuiCacheContext = useEuiCacheContext;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.EuiCacheProvider = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _react2 = require("@emotion/react");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
16
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
17
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
18
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
19
|
+
* Side Public License, v 1.
|
|
20
|
+
*/
|
|
21
|
+
var EuiCacheProvider = function EuiCacheProvider(_ref) {
|
|
22
|
+
var cache = _ref.cache,
|
|
23
|
+
children = _ref.children;
|
|
24
|
+
return children && cache ? (0, _react2.jsx)(_react2.CacheProvider, {
|
|
25
|
+
value: cache
|
|
26
|
+
}, children) : (0, _react2.jsx)(_react.default.Fragment, null, children);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
exports.EuiCacheProvider = EuiCacheProvider;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _cache_context = require("./cache_context");
|
|
8
|
+
|
|
9
|
+
Object.keys(_cache_context).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _cache_context[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _cache_context[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
var _cache_provider = require("./cache_provider");
|
|
21
|
+
|
|
22
|
+
Object.keys(_cache_provider).forEach(function (key) {
|
|
23
|
+
if (key === "default" || key === "__esModule") return;
|
|
24
|
+
if (key in exports && exports[key] === _cache_provider[key]) return;
|
|
25
|
+
Object.defineProperty(exports, key, {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _cache_provider[key];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "EuiProvider", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _provider.EuiProvider;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
6
|
|
|
13
|
-
var _provider = require("./provider");
|
|
7
|
+
var _provider = require("./provider");
|
|
8
|
+
|
|
9
|
+
Object.keys(_provider).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _provider[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _provider[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -9,10 +9,14 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _global_styles = require("../../global_styling/reset/global_styles");
|
|
11
11
|
|
|
12
|
+
var _utility = require("../../global_styling/utility/utility");
|
|
13
|
+
|
|
12
14
|
var _services = require("../../services");
|
|
13
15
|
|
|
14
16
|
var _themes = require("../../themes");
|
|
15
17
|
|
|
18
|
+
var _cache = require("./cache");
|
|
19
|
+
|
|
16
20
|
var _react2 = require("@emotion/react");
|
|
17
21
|
|
|
18
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -24,21 +28,52 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
24
28
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
25
29
|
* Side Public License, v 1.
|
|
26
30
|
*/
|
|
31
|
+
var isEmotionCacheObject = function isEmotionCacheObject(obj) {
|
|
32
|
+
return obj.hasOwnProperty('key');
|
|
33
|
+
};
|
|
34
|
+
|
|
27
35
|
var EuiProvider = function EuiProvider(_ref) {
|
|
28
36
|
var cache = _ref.cache,
|
|
29
37
|
_ref$theme = _ref.theme,
|
|
30
38
|
theme = _ref$theme === void 0 ? _themes.EuiThemeAmsterdam : _ref$theme,
|
|
31
39
|
_ref$globalStyles = _ref.globalStyles,
|
|
32
|
-
|
|
40
|
+
Globals = _ref$globalStyles === void 0 ? _global_styles.EuiGlobalStyles : _ref$globalStyles,
|
|
41
|
+
_ref$utilityClasses = _ref.utilityClasses,
|
|
42
|
+
Utilities = _ref$utilityClasses === void 0 ? _utility.EuiUtilityClasses : _ref$utilityClasses,
|
|
33
43
|
colorMode = _ref.colorMode,
|
|
34
44
|
modify = _ref.modify,
|
|
35
45
|
children = _ref.children;
|
|
36
|
-
|
|
46
|
+
var defaultCache;
|
|
47
|
+
var euiCache;
|
|
48
|
+
var globalCache;
|
|
49
|
+
var utilityCache;
|
|
50
|
+
|
|
51
|
+
if (cache) {
|
|
52
|
+
if (isEmotionCacheObject(cache)) {
|
|
53
|
+
defaultCache = cache;
|
|
54
|
+
} else {
|
|
55
|
+
defaultCache = cache.default;
|
|
56
|
+
euiCache = cache.eui;
|
|
57
|
+
globalCache = cache.global;
|
|
58
|
+
utilityCache = cache.utility;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return (0, _react2.jsx)(_cache.EuiCacheProvider, {
|
|
63
|
+
cache: defaultCache
|
|
64
|
+
}, (0, _react2.jsx)(_cache.EuiCacheContext.Provider, {
|
|
65
|
+
value: euiCache
|
|
66
|
+
}, (0, _react2.jsx)(_services.EuiThemeProvider, {
|
|
37
67
|
theme: theme !== null && theme !== void 0 ? theme : undefined,
|
|
38
68
|
colorMode: colorMode,
|
|
39
|
-
modify: modify
|
|
40
|
-
|
|
41
|
-
|
|
69
|
+
modify: modify
|
|
70
|
+
}, theme && (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_cache.EuiCacheProvider, {
|
|
71
|
+
cache: globalCache || euiCache,
|
|
72
|
+
children: Globals && (0, _react2.jsx)(Globals, null)
|
|
73
|
+
}), (0, _react2.jsx)(_cache.EuiCacheProvider, {
|
|
74
|
+
cache: utilityCache,
|
|
75
|
+
children: Utilities && (0, _react2.jsx)(Utilities, null)
|
|
76
|
+
})), children)));
|
|
42
77
|
};
|
|
43
78
|
|
|
44
79
|
exports.EuiProvider = EuiProvider;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _system = require("./system");
|
|
8
|
+
|
|
9
|
+
Object.keys(_system).forEach(function (key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
if (key in exports && exports[key] === _system[key]) return;
|
|
12
|
+
Object.defineProperty(exports, key, {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _system[key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.withEuiSystem = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _services = require("../../../services");
|
|
13
|
+
|
|
14
|
+
var _cache = require("../cache");
|
|
15
|
+
|
|
16
|
+
var _react2 = require("@emotion/react");
|
|
17
|
+
|
|
18
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
|
+
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
|
|
22
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
23
|
+
|
|
24
|
+
// If a component usese `forwardRef` you'll need to pass its props directly via `T` (`withEuiTheme<EuiComponentProps>(EuiComponent)`)
|
|
25
|
+
// TypeScript cannot infer correctly with the extra `forwardRef` types.
|
|
26
|
+
var withEuiSystem = function withEuiSystem(Component) {
|
|
27
|
+
var componentName = Component.displayName || Component.name || 'Component';
|
|
28
|
+
|
|
29
|
+
var Render = function Render(props, ref) {
|
|
30
|
+
var euiTheme = (0, _services.useEuiTheme)();
|
|
31
|
+
var cache = (0, _cache.useEuiCacheContext)();
|
|
32
|
+
return (0, _react2.jsx)(_cache.EuiCacheProvider, {
|
|
33
|
+
cache: cache
|
|
34
|
+
}, (0, _react2.jsx)(Component, _extends({
|
|
35
|
+
euiTheme: euiTheme,
|
|
36
|
+
ref: ref
|
|
37
|
+
}, props)));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
var WithEuiSystem = /*#__PURE__*/(0, _react.forwardRef)(Render);
|
|
41
|
+
WithEuiSystem.displayName = componentName.replace(/^_{1}/, '');
|
|
42
|
+
return WithEuiSystem;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
exports.withEuiSystem = withEuiSystem;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SIZES = exports.EuiSpacer = void 0;
|
|
6
|
+
exports._EuiSpacer = exports.SIZES = exports.EuiSpacer = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,13 +11,13 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _system = require("../provider/system");
|
|
15
15
|
|
|
16
16
|
var _spacer = require("./spacer.styles");
|
|
17
17
|
|
|
18
18
|
var _react2 = require("@emotion/react");
|
|
19
19
|
|
|
20
|
-
var _excluded = ["className", "size"];
|
|
20
|
+
var _excluded = ["className", "euiTheme", "size"];
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
@@ -32,13 +32,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
32
32
|
var SIZES = ['xs', 's', 'm', 'l', 'xl', 'xxl'];
|
|
33
33
|
exports.SIZES = SIZES;
|
|
34
34
|
|
|
35
|
-
var
|
|
35
|
+
var _EuiSpacer = function _EuiSpacer(_ref) {
|
|
36
36
|
var className = _ref.className,
|
|
37
|
+
euiTheme = _ref.euiTheme,
|
|
37
38
|
_ref$size = _ref.size,
|
|
38
39
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
39
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
41
|
|
|
41
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
42
42
|
var styles = (0, _spacer.euiSpacerStyles)(euiTheme);
|
|
43
43
|
var classes = (0, _classnames.default)('euiSpacer', _defineProperty({}, "euiSpacer--".concat(size), size), className);
|
|
44
44
|
var cssStyles = [styles.euiSpacer, styles[size]];
|
|
@@ -48,10 +48,12 @@ var EuiSpacer = function EuiSpacer(_ref) {
|
|
|
48
48
|
}, rest));
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
exports.
|
|
52
|
-
|
|
51
|
+
exports._EuiSpacer = _EuiSpacer;
|
|
52
|
+
_EuiSpacer.propTypes = {
|
|
53
53
|
className: _propTypes.default.string,
|
|
54
54
|
"aria-label": _propTypes.default.string,
|
|
55
55
|
"data-test-subj": _propTypes.default.string,
|
|
56
56
|
size: _propTypes.default.any
|
|
57
|
-
};
|
|
57
|
+
};
|
|
58
|
+
var EuiSpacer = (0, _system.withEuiSystem)(_EuiSpacer);
|
|
59
|
+
exports.EuiSpacer = EuiSpacer;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.TEXT_SIZES = exports.EuiText = void 0;
|
|
6
|
+
exports._EuiText = exports.TEXT_SIZES = exports.EuiText = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _system = require("../provider/system");
|
|
15
15
|
|
|
16
16
|
var _text = require("./text.styles");
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ var _text_align = require("./text_align");
|
|
|
21
21
|
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
23
|
|
|
24
|
-
var _excluded = ["size", "color", "grow", "textAlign", "children", "className"];
|
|
24
|
+
var _excluded = ["size", "color", "grow", "textAlign", "children", "className", "euiTheme"];
|
|
25
25
|
|
|
26
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
27
|
|
|
@@ -34,7 +34,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
34
34
|
var TEXT_SIZES = ['xs', 's', 'm', 'relative'];
|
|
35
35
|
exports.TEXT_SIZES = TEXT_SIZES;
|
|
36
36
|
|
|
37
|
-
var
|
|
37
|
+
var _EuiText = function _EuiText(_ref) {
|
|
38
38
|
var _ref$size = _ref.size,
|
|
39
39
|
size = _ref$size === void 0 ? 'm' : _ref$size,
|
|
40
40
|
color = _ref.color,
|
|
@@ -43,9 +43,9 @@ var EuiText = function EuiText(_ref) {
|
|
|
43
43
|
textAlign = _ref.textAlign,
|
|
44
44
|
children = _ref.children,
|
|
45
45
|
className = _ref.className,
|
|
46
|
+
euiTheme = _ref.euiTheme,
|
|
46
47
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
47
48
|
|
|
48
|
-
var euiTheme = (0, _services.useEuiTheme)();
|
|
49
49
|
var styles = (0, _text.euiTextStyles)(euiTheme);
|
|
50
50
|
var cssStyles = [styles.euiText, !grow ? styles.constrainedWidth : undefined, styles[size]];
|
|
51
51
|
var classes = (0, _classnames.default)('euiText', className);
|
|
@@ -71,8 +71,8 @@ var EuiText = function EuiText(_ref) {
|
|
|
71
71
|
return text;
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
exports.
|
|
75
|
-
|
|
74
|
+
exports._EuiText = _EuiText;
|
|
75
|
+
_EuiText.propTypes = {
|
|
76
76
|
className: _propTypes.default.string,
|
|
77
77
|
"aria-label": _propTypes.default.string,
|
|
78
78
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -88,4 +88,6 @@ EuiText.propTypes = {
|
|
|
88
88
|
*/
|
|
89
89
|
color: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.any.isRequired]),
|
|
90
90
|
grow: _propTypes.default.bool
|
|
91
|
-
};
|
|
91
|
+
};
|
|
92
|
+
var EuiText = (0, _system.withEuiSystem)(_EuiText);
|
|
93
|
+
exports.EuiText = EuiText;
|