@elastic/eui 67.1.7 → 67.1.9
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 +0 -1
- package/dist/eui_theme_dark.min.css +1 -1
- package/dist/eui_theme_light.css +0 -1
- package/dist/eui_theme_light.min.css +1 -1
- package/es/components/button/button.js +1 -0
- package/es/components/button/button_display/_button_display.js +3 -3
- package/es/components/button/button_display/_button_display.styles.js +2 -1
- package/es/components/card/card.js +6 -28
- package/es/components/card/checkable_card/checkable_card.js +3 -2
- package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/es/components/facet/facet_button.js +55 -1
- package/es/global_styling/mixins/_helpers.js +1 -1
- package/eui.d.ts +6 -6
- package/i18ntokens.json +12 -12
- package/lib/components/button/button.js +1 -0
- package/lib/components/button/button_display/_button_display.js +3 -3
- package/lib/components/button/button_display/_button_display.styles.js +2 -1
- package/lib/components/card/card.js +7 -30
- package/lib/components/card/checkable_card/checkable_card.js +3 -2
- package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/lib/components/facet/facet_button.js +56 -2
- package/lib/global_styling/mixins/_helpers.js +1 -1
- package/optimize/es/components/button/button.js +1 -0
- package/optimize/es/components/button/button_display/_button_display.js +2 -2
- package/optimize/es/components/button/button_display/_button_display.styles.js +2 -1
- package/optimize/es/components/card/card.js +5 -27
- package/optimize/es/components/card/checkable_card/checkable_card.js +3 -2
- package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/optimize/es/global_styling/mixins/_helpers.js +1 -1
- package/optimize/lib/components/button/button.js +1 -0
- package/optimize/lib/components/button/button_display/_button_display.js +2 -2
- package/optimize/lib/components/button/button_display/_button_display.styles.js +2 -1
- package/optimize/lib/components/card/card.js +6 -29
- package/optimize/lib/components/card/checkable_card/checkable_card.js +3 -2
- package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/optimize/lib/global_styling/mixins/_helpers.js +1 -1
- package/package.json +1 -1
- package/src/components/modal/_modal.scss +3 -1
- package/test-env/components/button/button.js +1 -0
- package/test-env/components/button/button_display/_button_display.js +3 -3
- package/test-env/components/button/button_display/_button_display.styles.js +2 -1
- package/test-env/components/card/card.js +7 -30
- package/test-env/components/card/checkable_card/checkable_card.js +3 -2
- package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
- package/test-env/components/facet/facet_button.js +56 -2
- package/test-env/global_styling/mixins/_helpers.js +1 -1
|
@@ -120,19 +120,28 @@ EuiFacetButton.propTypes = {
|
|
|
120
120
|
/**
|
|
121
121
|
* ReactNode to render as this component's content
|
|
122
122
|
*/
|
|
123
|
-
children: _propTypes.default.node.isRequired,
|
|
123
|
+
children: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.node]),
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Any node, but preferably a `EuiIcon` or `EuiAvatar`
|
|
127
127
|
*/
|
|
128
128
|
icon: _propTypes.default.node,
|
|
129
|
-
isDisabled: _propTypes.default.bool,
|
|
129
|
+
isDisabled: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.bool]),
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Force disables the button and changes the icon to a loading spinner
|
|
133
|
+
*/
|
|
130
134
|
|
|
131
135
|
/**
|
|
132
136
|
* Adds/swaps for loading spinner & disables
|
|
133
137
|
*/
|
|
134
138
|
isLoading: _propTypes.default.bool,
|
|
135
139
|
|
|
140
|
+
/**
|
|
141
|
+
* Applies the boolean state as the `aria-pressed` property to create a toggle button.
|
|
142
|
+
* *Only use when the readable text does not change between states.*
|
|
143
|
+
*/
|
|
144
|
+
|
|
136
145
|
/**
|
|
137
146
|
* Changes visual of button to indicate it's currently selected
|
|
138
147
|
*/
|
|
@@ -142,6 +151,51 @@ EuiFacetButton.propTypes = {
|
|
|
142
151
|
* Adds a notification indicator for displaying the quantity provided
|
|
143
152
|
*/
|
|
144
153
|
quantity: _propTypes.default.number,
|
|
154
|
+
size: _propTypes.default.any,
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Extends the button to 100% width
|
|
158
|
+
*/
|
|
159
|
+
fullWidth: _propTypes.default.bool,
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Override the default minimum width
|
|
163
|
+
*/
|
|
164
|
+
minWidth: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([false])]),
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Object of props passed to the <span/> wrapping the button's content
|
|
168
|
+
*/
|
|
169
|
+
contentProps: _propTypes.default.shape({
|
|
170
|
+
className: _propTypes.default.string,
|
|
171
|
+
"aria-label": _propTypes.default.string,
|
|
172
|
+
"data-test-subj": _propTypes.default.string,
|
|
173
|
+
css: _propTypes.default.any
|
|
174
|
+
}),
|
|
175
|
+
style: _propTypes.default.any,
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Any `type` accepted by EuiIcon
|
|
179
|
+
*/
|
|
180
|
+
iconType: _propTypes.default.oneOfType([_propTypes.default.oneOf(["accessibility", "addDataApp", "advancedSettingsApp", "agentApp", "aggregate", "alert", "analyzeEvent", "annotation", "apmApp", "apmTrace", "appSearchApp", "apps", "arrowDown", "arrowLeft", "arrowRight", "arrowUp", "arrowStart", "arrowEnd", "asterisk", "auditbeatApp", "beaker", "bell", "bellSlash", "bolt", "boxesHorizontal", "boxesVertical", "branch", "branchUser", "broom", "brush", "bug", "bullseye", "calendar", "canvasApp", "casesApp", "check", "checkInCircleFilled", "cheer", "classificationJob", "clock", "cloudDrizzle", "cloudStormy", "cloudSunny", "cluster", "codeApp", "color", "compute", "console", "consoleApp", "container", "continuityAbove", "continuityAboveBelow", "continuityBelow", "continuityWithin", "controlsHorizontal", "controlsVertical", "copy", "copyClipboard", "createAdvancedJob", "createMultiMetricJob", "createPopulationJob", "createSingleMetricJob", "cross", "crossClusterReplicationApp", "crossInACircleFilled", "crosshairs", "currency", "cut", "dashboardApp", "dataVisualizer", "database", "desktop", "devToolsApp", "discoverApp", "document", "documentEdit", "documentation", "documents", "dot", "doubleArrowLeft", "doubleArrowRight", "download", "editorAlignCenter", "editorAlignLeft", "editorAlignRight", "editorBold", "editorChecklist", "editorCodeBlock", "editorComment", "editorDistributeHorizontal", "editorDistributeVertical", "editorHeading", "editorItalic", "editorItemAlignBottom", "editorItemAlignCenter", "editorItemAlignLeft", "editorItemAlignMiddle", "editorItemAlignRight", "editorItemAlignTop", "editorLink", "editorOrderedList", "editorPositionBottomLeft", "editorPositionBottomRight", "editorPositionTopLeft", "editorPositionTopRight", "editorRedo", "editorStrike", "editorTable", "editorUnderline", "editorUndo", "editorUnorderedList", "email", "empty", "emsApp", "eql", "eraser", "exit", "expand", "expandMini", "exportAction", "eye", "eyeClosed", "faceHappy", "faceNeutral", "faceSad", "filebeatApp", "filter", "flag", "fleetApp", "fold", "folderCheck", "folderClosed", "folderExclamation", "folderOpen", "frameNext", "framePrevious", "fullScreen", "fullScreenExit", "function", "gear", "gisApp", "glasses", "globe", "grab", "grabHorizontal", "graphApp", "grid", "grokApp", "heart", "heartbeatApp", "heatmap", "help", "home", "iInCircle", "image", "importAction", "indexClose", "indexEdit", "indexFlush", "indexManagementApp", "indexMapping", "indexOpen", "indexPatternApp", "indexRollupApp", "indexRuntime", "indexSettings", "inputOutput", "inspect", "invert", "ip", "keyboard", "kqlField", "kqlFunction", "kqlOperand", "kqlSelector", "kqlValue", "kubernetesNode", "kubernetesPod", "layers", "lensApp", "lettering", "lineDashed", "lineDotted", "lineSolid", "link", "list", "listAdd", "lock", "lockOpen", "logoAWS", "logoAWSMono", "logoAerospike", "logoApache", "logoAppSearch", "logoAzure", "logoAzureMono", "logoBeats", "logoBusinessAnalytics", "logoCeph", "logoCloud", "logoCloudEnterprise", "logoCode", "logoCodesandbox", "logoCouchbase", "logoDocker", "logoDropwizard", "logoElastic", "logoElasticStack", "logoElasticsearch", "logoEnterpriseSearch", "logoEtcd", "logoGCP", "logoGCPMono", "logoGithub", "logoGmail", "logoGolang", "logoGoogleG", "logoHAproxy", "logoIBM", "logoIBMMono", "logoKafka", "logoKibana", "logoKubernetes", "logoLogging", "logoLogstash", "logoMaps", "logoMemcached", "logoMetrics", "logoMongodb", "logoMySQL", "logoNginx", "logoObservability", "logoOsquery", "logoPhp", "logoPostgres", "logoPrometheus", "logoRabbitmq", "logoRedis", "logoSecurity", "logoSiteSearch", "logoSketch", "logoSlack", "logoUptime", "logoWebhook", "logoWindows", "logoWorkplaceSearch", "logsApp", "logstashFilter", "logstashIf", "logstashInput", "logstashOutput", "logstashQueue", "machineLearningApp", "magnet", "magnifyWithExclamation", "magnifyWithMinus", "magnifyWithPlus", "managementApp", "mapMarker", "memory", "menu", "menuDown", "menuLeft", "menuRight", "menuUp", "merge", "metricbeatApp", "metricsApp", "minimize", "minus", "minusInCircle", "minusInCircleFilled", "mobile", "monitoringApp", "moon", "namespace", "nested", "node", "notebookApp", "number", "offline", "online", "outlierDetectionJob", "package", "packetbeatApp", "pageSelect", "pagesSelect", "paperClip", "partial", "pause", "payment", "pencil", "percent", "pin", "pinFilled", "pipelineApp", "play", "playFilled", "plus", "plusInCircle", "plusInCircleFilled", "popout", "push", "questionInCircle", "quote", "recentlyViewedApp", "refresh", "regressionJob", "reporter", "reportingApp", "returnKey", "save", "savedObjectsApp", "scale", "search", "searchProfilerApp", "securityAnalyticsApp", "securityApp", "securitySignal", "securitySignalDetected", "securitySignalResolved", "sessionViewer", "shard", "share", "snowflake", "sortDown", "sortLeft", "sortRight", "sortUp", "sortable", "spacesApp", "sqlApp", "starEmpty", "starEmptySpace", "starFilled", "starFilledSpace", "starMinusEmpty", "starMinusFilled", "starPlusEmpty", "starPlusFilled", "stats", "stop", "stopFilled", "stopSlash", "storage", "string", "submodule", "sun", "swatchInput", "symlink", "tableDensityCompact", "tableDensityExpanded", "tableDensityNormal", "tableOfContents", "tag", "tear", "temperature", "timeline", "timelionApp", "timeRefresh", "timeslider", "training", "trash", "unfold", "unlink", "upgradeAssistantApp", "uptimeApp", "user", "userAvatar", "users", "usersRolesApp", "vector", "videoPlayer", "visArea", "visAreaStacked", "visBarHorizontal", "visBarHorizontalStacked", "visBarVertical", "visBarVerticalStacked", "visGauge", "visGoal", "visLine", "visMapCoordinate", "visMapRegion", "visMetric", "visPie", "visTable", "visTagCloud", "visText", "visTimelion", "visVega", "visVisualBuilder", "visualizeApp", "watchesApp", "wordWrap", "wordWrapDisabled", "workplaceSearchApp", "wrench", "tokenAlias", "tokenAnnotation", "tokenArray", "tokenBinary", "tokenBoolean", "tokenClass", "tokenCompletionSuggester", "tokenConstant", "tokenDate", "tokenDenseVector", "tokenElement", "tokenEnum", "tokenEnumMember", "tokenEvent", "tokenException", "tokenField", "tokenFile", "tokenFlattened", "tokenFunction", "tokenGeo", "tokenHistogram", "tokenInterface", "tokenIP", "tokenJoin", "tokenKey", "tokenKeyword", "tokenMethod", "tokenMetricCounter", "tokenMetricGauge", "tokenModule", "tokenNamespace", "tokenNested", "tokenNull", "tokenNumber", "tokenObject", "tokenOperator", "tokenPackage", "tokenParameter", "tokenPercolator", "tokenProperty", "tokenRange", "tokenRankFeature", "tokenRankFeatures", "tokenRepo", "tokenSearchType", "tokenShape", "tokenString", "tokenStruct", "tokenSymbol", "tokenTag", "tokenText", "tokenTokenCount", "tokenVariable"]).isRequired, _propTypes.default.string.isRequired, _propTypes.default.elementType.isRequired]),
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Can only be one side `left` or `right`
|
|
184
|
+
*/
|
|
185
|
+
iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Object of props passed to the <span/> wrapping the content's text/children only (not icon)
|
|
189
|
+
*/
|
|
190
|
+
textProps: _propTypes.default.shape({
|
|
191
|
+
className: _propTypes.default.string,
|
|
192
|
+
"aria-label": _propTypes.default.string,
|
|
193
|
+
"data-test-subj": _propTypes.default.string,
|
|
194
|
+
css: _propTypes.default.any,
|
|
195
|
+
ref: _propTypes.default.any,
|
|
196
|
+
"data-text": _propTypes.default.string
|
|
197
|
+
}),
|
|
198
|
+
iconSize: _propTypes.default.any,
|
|
145
199
|
className: _propTypes.default.string,
|
|
146
200
|
"aria-label": _propTypes.default.string,
|
|
147
201
|
"data-test-subj": _propTypes.default.string,
|
|
@@ -66,7 +66,7 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
|
|
|
66
66
|
|
|
67
67
|
var direction = _direction || 'y';
|
|
68
68
|
var side = _side || 'both';
|
|
69
|
-
var hideHeight =
|
|
69
|
+
var hideHeight = size.s;
|
|
70
70
|
var gradientStart = "\n ".concat((0, _color.transparentize)('red', 0.1), " 0%,\n ").concat((0, _color.transparentize)('red', 1), " ").concat(hideHeight, "\n ");
|
|
71
71
|
var gradientEnd = "\n ".concat((0, _color.transparentize)('red', 1), " calc(100% - ").concat(hideHeight, "),\n ").concat((0, _color.transparentize)('red', 0.1), " 100%\n ");
|
|
72
72
|
var gradient = '';
|
|
@@ -146,6 +146,7 @@ export var EuiButtonDisplayDeprecated = /*#__PURE__*/forwardRef(function (_ref,
|
|
|
146
146
|
|
|
147
147
|
if (minWidth !== undefined || minWidth !== null) {
|
|
148
148
|
calculatedStyle = _objectSpread(_objectSpread({}, calculatedStyle), {}, {
|
|
149
|
+
// @ts-ignore - deprecated component
|
|
149
150
|
minWidth: minWidth
|
|
150
151
|
});
|
|
151
152
|
}
|
|
@@ -68,7 +68,7 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
68
68
|
var theme = useEuiTheme();
|
|
69
69
|
var styles = euiButtonDisplayStyles(theme);
|
|
70
70
|
var buttonRadiusStyle = useEuiButtonRadiusCSS()[size];
|
|
71
|
-
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
|
|
71
|
+
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, minWidth == null && styles.defaultMinWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
|
|
72
72
|
|
|
73
73
|
var innerNode = ___EmotionJSX(EuiButtonDisplayContent, _extends({
|
|
74
74
|
isLoading: isLoading,
|
|
@@ -105,7 +105,7 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
105
105
|
|
|
106
106
|
return createElement(element, _objectSpread(_objectSpread(_objectSpread({
|
|
107
107
|
css: cssStyles,
|
|
108
|
-
style: minWidth
|
|
108
|
+
style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
|
|
109
109
|
minInlineSize: minWidth
|
|
110
110
|
}) : style,
|
|
111
111
|
ref: ref
|
|
@@ -32,10 +32,11 @@ export var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeCont
|
|
|
32
32
|
var euiTheme = euiThemeContext.euiTheme;
|
|
33
33
|
return {
|
|
34
34
|
// Base
|
|
35
|
-
euiButtonDisplay: /*#__PURE__*/css(euiButtonBaseCSS(), ";
|
|
35
|
+
euiButtonDisplay: /*#__PURE__*/css(euiButtonBaseCSS(), ";font-weight:", euiTheme.font.weight.medium, ";padding:0 ", euiTheme.size.m, ";&:hover:not(:disabled),&:focus{text-decoration:underline;};label:euiButtonDisplay;"),
|
|
36
36
|
// States
|
|
37
37
|
isDisabled: _ref,
|
|
38
38
|
fullWidth: /*#__PURE__*/css("display:block;", logicalCSS('width', '100%'), ";;label:fullWidth;"),
|
|
39
|
+
defaultMinWidth: /*#__PURE__*/css(logicalCSS('min-width', "".concat(euiTheme.base * 7, "px")), ";;label:defaultMinWidth;"),
|
|
39
40
|
// Sizes
|
|
40
41
|
xs: /*#__PURE__*/css(_buttonSize(euiTheme.size.l), euiFontSize(euiThemeContext, 'xs'), ";label:xs;"),
|
|
41
42
|
s: /*#__PURE__*/css(_buttonSize(euiTheme.size.xl), euiFontSize(euiThemeContext, 's'), ";label:s;"),
|
|
@@ -17,33 +17,19 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
17
17
|
*/
|
|
18
18
|
import React, { isValidElement } from 'react';
|
|
19
19
|
import classNames from 'classnames';
|
|
20
|
-
import { keysOf } from '../common';
|
|
21
20
|
import { getSecureRelForTarget, useEuiTheme } from '../../services';
|
|
21
|
+
import { cloneElementWithCss } from '../../services/theme/clone_element';
|
|
22
22
|
import { EuiText } from '../text';
|
|
23
23
|
import { EuiTitle } from '../title';
|
|
24
24
|
import { EuiBetaBadge } from '../badge/beta_badge';
|
|
25
|
-
import { EuiCardSelect
|
|
25
|
+
import { EuiCardSelect } from './card_select';
|
|
26
26
|
import { useGeneratedHtmlId } from '../../services/accessibility';
|
|
27
27
|
import { validateHref } from '../../services/security/href_validator';
|
|
28
28
|
import { EuiPanel } from '../panel';
|
|
29
29
|
import { EuiSpacer } from '../spacer';
|
|
30
30
|
import { euiCardBetaBadgeStyles, euiCardStyles, euiCardTextStyles } from './card.styles';
|
|
31
31
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
32
|
-
var
|
|
33
|
-
left: 'euiCard--leftAligned',
|
|
34
|
-
center: 'euiCard--centerAligned',
|
|
35
|
-
right: 'euiCard--rightAligned'
|
|
36
|
-
};
|
|
37
|
-
export var ALIGNMENTS = keysOf(textAlignToClassNameMap);
|
|
38
|
-
var layoutToClassNameMap = {
|
|
39
|
-
vertical: '',
|
|
40
|
-
horizontal: 'euiCard--horizontal'
|
|
41
|
-
};
|
|
42
|
-
export var LAYOUT_ALIGNMENTS = keysOf(layoutToClassNameMap);
|
|
43
|
-
/**
|
|
44
|
-
* Certain props are only allowed when the layout is vertical
|
|
45
|
-
*/
|
|
46
|
-
|
|
32
|
+
export var ALIGNMENTS = ['left', 'center', 'right'];
|
|
47
33
|
export var EuiCard = function EuiCard(_ref) {
|
|
48
34
|
var className = _ref.className,
|
|
49
35
|
description = _ref.description,
|
|
@@ -103,15 +89,7 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
103
89
|
}
|
|
104
90
|
}
|
|
105
91
|
|
|
106
|
-
var
|
|
107
|
-
var classes = classNames('euiCard', textAlignToClassNameMap[textAlign], layoutToClassNameMap[layout], {
|
|
108
|
-
'euiCard--isClickable': isClickable,
|
|
109
|
-
'euiCard--hasBetaBadge': betaBadgeProps === null || betaBadgeProps === void 0 ? void 0 : betaBadgeProps.label,
|
|
110
|
-
'euiCard--hasIcon': icon,
|
|
111
|
-
'euiCard--isSelectable': selectable,
|
|
112
|
-
'euiCard-isSelected': selectable === null || selectable === void 0 ? void 0 : selectable.isSelected,
|
|
113
|
-
'euiCard-isDisabled': isDisabled
|
|
114
|
-
}, selectableColorClass, className);
|
|
92
|
+
var classes = classNames('euiCard', className);
|
|
115
93
|
var ariaId = useGeneratedHtmlId();
|
|
116
94
|
var ariaDesc = description ? "".concat(ariaId, "Description") : '';
|
|
117
95
|
/**
|
|
@@ -139,7 +117,7 @@ export var EuiCard = function EuiCard(_ref) {
|
|
|
139
117
|
|
|
140
118
|
if (icon) {
|
|
141
119
|
var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
|
|
142
|
-
iconNode =
|
|
120
|
+
iconNode = cloneElementWithCss(icon, {
|
|
143
121
|
className: classNames(icon.props.className, 'euiCard__icon'),
|
|
144
122
|
css: iconStyles
|
|
145
123
|
});
|
|
@@ -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", "className", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
|
|
3
|
+
var _excluded = ["children", "className", "css", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -19,6 +19,7 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
|
19
19
|
export var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
20
20
|
var children = _ref.children,
|
|
21
21
|
className = _ref.className,
|
|
22
|
+
css = _ref.css,
|
|
22
23
|
_ref$checkableType = _ref.checkableType,
|
|
23
24
|
checkableType = _ref$checkableType === void 0 ? 'radio' : _ref$checkableType,
|
|
24
25
|
label = _ref.label,
|
|
@@ -31,7 +32,7 @@ export var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
31
32
|
|
|
32
33
|
var euiThemeContext = useEuiTheme();
|
|
33
34
|
var styles = euiCheckableCardStyles(euiThemeContext);
|
|
34
|
-
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked];
|
|
35
|
+
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked, css];
|
|
35
36
|
var labelStyles = [styles.label.euiCheckableCard__label, disabled && styles.label.isDisabled];
|
|
36
37
|
var childStyles = [styles.euiCheckableCard__children];
|
|
37
38
|
var id = rest.id;
|
|
@@ -163,7 +163,7 @@ export var EuiSuperUpdateButton = /*#__PURE__*/function (_Component) {
|
|
|
163
163
|
sizes: responsive || 'none'
|
|
164
164
|
}, ___EmotionJSX(EuiButton, _extends({
|
|
165
165
|
className: classes,
|
|
166
|
-
minWidth:
|
|
166
|
+
minWidth: false
|
|
167
167
|
}, sharedButtonProps, {
|
|
168
168
|
fill: fill,
|
|
169
169
|
textProps: _objectSpread(_objectSpread({}, restTextProps), {}, {
|
|
@@ -55,7 +55,7 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
|
|
|
55
55
|
|
|
56
56
|
var direction = _direction || 'y';
|
|
57
57
|
var side = _side || 'both';
|
|
58
|
-
var hideHeight =
|
|
58
|
+
var hideHeight = size.s;
|
|
59
59
|
var gradientStart = "\n ".concat(transparentize('red', 0.1), " 0%,\n ").concat(transparentize('red', 1), " ").concat(hideHeight, "\n ");
|
|
60
60
|
var gradientEnd = "\n ".concat(transparentize('red', 1), " calc(100% - ").concat(hideHeight, "),\n ").concat(transparentize('red', 0.1), " 100%\n ");
|
|
61
61
|
var gradient = '';
|
|
@@ -168,6 +168,7 @@ var EuiButtonDisplayDeprecated = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
168
168
|
|
|
169
169
|
if (minWidth !== undefined || minWidth !== null) {
|
|
170
170
|
calculatedStyle = _objectSpread(_objectSpread({}, calculatedStyle), {}, {
|
|
171
|
+
// @ts-ignore - deprecated component
|
|
171
172
|
minWidth: minWidth
|
|
172
173
|
});
|
|
173
174
|
}
|
|
@@ -86,7 +86,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
86
86
|
var theme = (0, _services.useEuiTheme)();
|
|
87
87
|
var styles = (0, _button_display.euiButtonDisplayStyles)(theme);
|
|
88
88
|
var buttonRadiusStyle = (0, _mixins.useEuiButtonRadiusCSS)()[size];
|
|
89
|
-
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
|
|
89
|
+
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, minWidth == null && styles.defaultMinWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
|
|
90
90
|
var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, (0, _extends2.default)({
|
|
91
91
|
isLoading: isLoading,
|
|
92
92
|
isDisabled: buttonIsDisabled,
|
|
@@ -121,7 +121,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
121
121
|
|
|
122
122
|
return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
|
|
123
123
|
css: cssStyles,
|
|
124
|
-
style: minWidth
|
|
124
|
+
style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
|
|
125
125
|
minInlineSize: minWidth
|
|
126
126
|
}) : style,
|
|
127
127
|
ref: ref
|
|
@@ -36,10 +36,11 @@ var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext) {
|
|
|
36
36
|
var euiTheme = euiThemeContext.euiTheme;
|
|
37
37
|
return {
|
|
38
38
|
// Base
|
|
39
|
-
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";
|
|
39
|
+
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";font-weight:", euiTheme.font.weight.medium, ";padding:0 ", euiTheme.size.m, ";&:hover:not(:disabled),&:focus{text-decoration:underline;};label:euiButtonDisplay;"),
|
|
40
40
|
// States
|
|
41
41
|
isDisabled: _ref,
|
|
42
42
|
fullWidth: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;"),
|
|
43
|
+
defaultMinWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', "".concat(euiTheme.base * 7, "px")), ";;label:defaultMinWidth;"),
|
|
43
44
|
// Sizes
|
|
44
45
|
xs: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.l), (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";label:xs;"),
|
|
45
46
|
s: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:s;"),
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.EuiCard = exports.ALIGNMENTS = void 0;
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
@@ -19,10 +19,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
19
19
|
|
|
20
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
21
|
|
|
22
|
-
var _common = require("../common");
|
|
23
|
-
|
|
24
22
|
var _services = require("../../services");
|
|
25
23
|
|
|
24
|
+
var _clone_element = require("../../services/theme/clone_element");
|
|
25
|
+
|
|
26
26
|
var _text = require("../text");
|
|
27
27
|
|
|
28
28
|
var _title = require("../title");
|
|
@@ -54,23 +54,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
54
54
|
|
|
55
55
|
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; }
|
|
56
56
|
|
|
57
|
-
var
|
|
58
|
-
left: 'euiCard--leftAligned',
|
|
59
|
-
center: 'euiCard--centerAligned',
|
|
60
|
-
right: 'euiCard--rightAligned'
|
|
61
|
-
};
|
|
62
|
-
var ALIGNMENTS = (0, _common.keysOf)(textAlignToClassNameMap);
|
|
57
|
+
var ALIGNMENTS = ['left', 'center', 'right'];
|
|
63
58
|
exports.ALIGNMENTS = ALIGNMENTS;
|
|
64
|
-
var layoutToClassNameMap = {
|
|
65
|
-
vertical: '',
|
|
66
|
-
horizontal: 'euiCard--horizontal'
|
|
67
|
-
};
|
|
68
|
-
var LAYOUT_ALIGNMENTS = (0, _common.keysOf)(layoutToClassNameMap);
|
|
69
|
-
/**
|
|
70
|
-
* Certain props are only allowed when the layout is vertical
|
|
71
|
-
*/
|
|
72
|
-
|
|
73
|
-
exports.LAYOUT_ALIGNMENTS = LAYOUT_ALIGNMENTS;
|
|
74
59
|
|
|
75
60
|
var EuiCard = function EuiCard(_ref) {
|
|
76
61
|
var className = _ref.className,
|
|
@@ -130,15 +115,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
130
115
|
}
|
|
131
116
|
}
|
|
132
117
|
|
|
133
|
-
var
|
|
134
|
-
var classes = (0, _classnames.default)('euiCard', textAlignToClassNameMap[textAlign], layoutToClassNameMap[layout], {
|
|
135
|
-
'euiCard--isClickable': isClickable,
|
|
136
|
-
'euiCard--hasBetaBadge': betaBadgeProps === null || betaBadgeProps === void 0 ? void 0 : betaBadgeProps.label,
|
|
137
|
-
'euiCard--hasIcon': icon,
|
|
138
|
-
'euiCard--isSelectable': selectable,
|
|
139
|
-
'euiCard-isSelected': selectable === null || selectable === void 0 ? void 0 : selectable.isSelected,
|
|
140
|
-
'euiCard-isDisabled': isDisabled
|
|
141
|
-
}, selectableColorClass, className);
|
|
118
|
+
var classes = (0, _classnames.default)('euiCard', className);
|
|
142
119
|
var ariaId = (0, _accessibility.useGeneratedHtmlId)();
|
|
143
120
|
var ariaDesc = description ? "".concat(ariaId, "Description") : '';
|
|
144
121
|
/**
|
|
@@ -166,7 +143,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
166
143
|
|
|
167
144
|
if (icon) {
|
|
168
145
|
var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
|
|
169
|
-
iconNode =
|
|
146
|
+
iconNode = (0, _clone_element.cloneElementWithCss)(icon, {
|
|
170
147
|
className: (0, _classnames.default)(icon.props.className, 'euiCard__icon'),
|
|
171
148
|
css: iconStyles
|
|
172
149
|
});
|
|
@@ -27,7 +27,7 @@ var _checkable_card = require("./checkable_card.styles");
|
|
|
27
27
|
|
|
28
28
|
var _react2 = require("@emotion/react");
|
|
29
29
|
|
|
30
|
-
var _excluded = ["children", "className", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
|
|
30
|
+
var _excluded = ["children", "className", "css", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
|
|
31
31
|
|
|
32
32
|
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); }
|
|
33
33
|
|
|
@@ -36,6 +36,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
36
36
|
var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
37
37
|
var children = _ref.children,
|
|
38
38
|
className = _ref.className,
|
|
39
|
+
css = _ref.css,
|
|
39
40
|
_ref$checkableType = _ref.checkableType,
|
|
40
41
|
checkableType = _ref$checkableType === void 0 ? 'radio' : _ref$checkableType,
|
|
41
42
|
label = _ref.label,
|
|
@@ -47,7 +48,7 @@ var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
47
48
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
48
49
|
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
49
50
|
var styles = (0, _checkable_card.euiCheckableCardStyles)(euiThemeContext);
|
|
50
|
-
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked];
|
|
51
|
+
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked, css];
|
|
51
52
|
var labelStyles = [styles.label.euiCheckableCard__label, disabled && styles.label.isDisabled];
|
|
52
53
|
var childStyles = [styles.euiCheckableCard__children];
|
|
53
54
|
var id = rest.id;
|
|
@@ -178,7 +178,7 @@ var EuiSuperUpdateButton = /*#__PURE__*/function (_Component) {
|
|
|
178
178
|
sizes: responsive || 'none'
|
|
179
179
|
}, (0, _react2.jsx)(_button.EuiButton, (0, _extends2.default)({
|
|
180
180
|
className: classes,
|
|
181
|
-
minWidth:
|
|
181
|
+
minWidth: false
|
|
182
182
|
}, sharedButtonProps, {
|
|
183
183
|
fill: fill,
|
|
184
184
|
textProps: _objectSpread(_objectSpread({}, restTextProps), {}, {
|
|
@@ -66,7 +66,7 @@ var euiOverflowShadowStyles = function euiOverflowShadowStyles(_ref3) {
|
|
|
66
66
|
|
|
67
67
|
var direction = _direction || 'y';
|
|
68
68
|
var side = _side || 'both';
|
|
69
|
-
var hideHeight =
|
|
69
|
+
var hideHeight = size.s;
|
|
70
70
|
var gradientStart = "\n ".concat((0, _color.transparentize)('red', 0.1), " 0%,\n ").concat((0, _color.transparentize)('red', 1), " ").concat(hideHeight, "\n ");
|
|
71
71
|
var gradientEnd = "\n ".concat((0, _color.transparentize)('red', 1), " calc(100% - ").concat(hideHeight, "),\n ").concat((0, _color.transparentize)('red', 0.1), " 100%\n ");
|
|
72
72
|
var gradient = '';
|
package/package.json
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
max-height: 75vh; // We overflow the modal body based off this
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
// TODO: Consider restoring this once https://bugs.chromium.org/p/chromium/issues/detail?id=1229700 is resolved
|
|
10
|
+
// overflow: hidden; Ensure long, non-breaking text doesn't expand beyond the modal bounds
|
|
9
11
|
|
|
10
12
|
position: relative;
|
|
11
13
|
background-color: $euiColorEmptyShade;
|
|
@@ -218,6 +218,7 @@ var EuiButtonDisplayDeprecated = /*#__PURE__*/(0, _react.forwardRef)(function (_
|
|
|
218
218
|
|
|
219
219
|
if (minWidth !== undefined || minWidth !== null) {
|
|
220
220
|
calculatedStyle = _objectSpread(_objectSpread({}, calculatedStyle), {}, {
|
|
221
|
+
// @ts-ignore - deprecated component
|
|
221
222
|
minWidth: minWidth
|
|
222
223
|
});
|
|
223
224
|
}
|
|
@@ -88,7 +88,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
88
88
|
var theme = (0, _services.useEuiTheme)();
|
|
89
89
|
var styles = (0, _button_display.euiButtonDisplayStyles)(theme);
|
|
90
90
|
var buttonRadiusStyle = (0, _mixins.useEuiButtonRadiusCSS)()[size];
|
|
91
|
-
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
|
|
91
|
+
var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, minWidth == null && styles.defaultMinWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
|
|
92
92
|
var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, (0, _extends2.default)({
|
|
93
93
|
isLoading: isLoading,
|
|
94
94
|
isDisabled: buttonIsDisabled,
|
|
@@ -123,7 +123,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
|
|
|
123
123
|
|
|
124
124
|
return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
|
|
125
125
|
css: cssStyles,
|
|
126
|
-
style: minWidth
|
|
126
|
+
style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
|
|
127
127
|
minInlineSize: minWidth
|
|
128
128
|
}) : style,
|
|
129
129
|
ref: ref
|
|
@@ -163,7 +163,7 @@ EuiButtonDisplay.propTypes = {
|
|
|
163
163
|
/**
|
|
164
164
|
* Override the default minimum width
|
|
165
165
|
*/
|
|
166
|
-
minWidth: _propTypes.default.any,
|
|
166
|
+
minWidth: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([false])]),
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* Force disables the button and changes the icon to a loading spinner
|
|
@@ -36,10 +36,11 @@ var euiButtonDisplayStyles = function euiButtonDisplayStyles(euiThemeContext) {
|
|
|
36
36
|
var euiTheme = euiThemeContext.euiTheme;
|
|
37
37
|
return {
|
|
38
38
|
// Base
|
|
39
|
-
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";
|
|
39
|
+
euiButtonDisplay: /*#__PURE__*/(0, _react.css)(euiButtonBaseCSS(), ";font-weight:", euiTheme.font.weight.medium, ";padding:0 ", euiTheme.size.m, ";&:hover:not(:disabled),&:focus{text-decoration:underline;};label:euiButtonDisplay;"),
|
|
40
40
|
// States
|
|
41
41
|
isDisabled: _ref,
|
|
42
42
|
fullWidth: /*#__PURE__*/(0, _react.css)("display:block;", (0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;"),
|
|
43
|
+
defaultMinWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('min-width', "".concat(euiTheme.base * 7, "px")), ";;label:defaultMinWidth;"),
|
|
43
44
|
// Sizes
|
|
44
45
|
xs: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.l), (0, _global_styling.euiFontSize)(euiThemeContext, 'xs'), ";label:xs;"),
|
|
45
46
|
s: /*#__PURE__*/(0, _react.css)(_buttonSize(euiTheme.size.xl), (0, _global_styling.euiFontSize)(euiThemeContext, 's'), ";label:s;"),
|
|
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.EuiCard = exports.ALIGNMENTS = void 0;
|
|
11
11
|
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
13
|
|
|
@@ -21,10 +21,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
21
21
|
|
|
22
22
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
23
23
|
|
|
24
|
-
var _common = require("../common");
|
|
25
|
-
|
|
26
24
|
var _services = require("../../services");
|
|
27
25
|
|
|
26
|
+
var _clone_element = require("../../services/theme/clone_element");
|
|
27
|
+
|
|
28
28
|
var _text = require("../text");
|
|
29
29
|
|
|
30
30
|
var _title = require("../title");
|
|
@@ -56,23 +56,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
56
56
|
|
|
57
57
|
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; }
|
|
58
58
|
|
|
59
|
-
var
|
|
60
|
-
left: 'euiCard--leftAligned',
|
|
61
|
-
center: 'euiCard--centerAligned',
|
|
62
|
-
right: 'euiCard--rightAligned'
|
|
63
|
-
};
|
|
64
|
-
var ALIGNMENTS = (0, _common.keysOf)(textAlignToClassNameMap);
|
|
59
|
+
var ALIGNMENTS = ['left', 'center', 'right'];
|
|
65
60
|
exports.ALIGNMENTS = ALIGNMENTS;
|
|
66
|
-
var layoutToClassNameMap = {
|
|
67
|
-
vertical: '',
|
|
68
|
-
horizontal: 'euiCard--horizontal'
|
|
69
|
-
};
|
|
70
|
-
var LAYOUT_ALIGNMENTS = (0, _common.keysOf)(layoutToClassNameMap);
|
|
71
|
-
/**
|
|
72
|
-
* Certain props are only allowed when the layout is vertical
|
|
73
|
-
*/
|
|
74
|
-
|
|
75
|
-
exports.LAYOUT_ALIGNMENTS = LAYOUT_ALIGNMENTS;
|
|
76
61
|
|
|
77
62
|
var EuiCard = function EuiCard(_ref) {
|
|
78
63
|
var className = _ref.className,
|
|
@@ -132,15 +117,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
132
117
|
}
|
|
133
118
|
}
|
|
134
119
|
|
|
135
|
-
var
|
|
136
|
-
var classes = (0, _classnames.default)('euiCard', textAlignToClassNameMap[textAlign], layoutToClassNameMap[layout], {
|
|
137
|
-
'euiCard--isClickable': isClickable,
|
|
138
|
-
'euiCard--hasBetaBadge': betaBadgeProps === null || betaBadgeProps === void 0 ? void 0 : betaBadgeProps.label,
|
|
139
|
-
'euiCard--hasIcon': icon,
|
|
140
|
-
'euiCard--isSelectable': selectable,
|
|
141
|
-
'euiCard-isSelected': selectable === null || selectable === void 0 ? void 0 : selectable.isSelected,
|
|
142
|
-
'euiCard-isDisabled': isDisabled
|
|
143
|
-
}, selectableColorClass, className);
|
|
120
|
+
var classes = (0, _classnames.default)('euiCard', className);
|
|
144
121
|
var ariaId = (0, _accessibility.useGeneratedHtmlId)();
|
|
145
122
|
var ariaDesc = description ? "".concat(ariaId, "Description") : '';
|
|
146
123
|
/**
|
|
@@ -168,7 +145,7 @@ var EuiCard = function EuiCard(_ref) {
|
|
|
168
145
|
|
|
169
146
|
if (icon) {
|
|
170
147
|
var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
|
|
171
|
-
iconNode =
|
|
148
|
+
iconNode = (0, _clone_element.cloneElementWithCss)(icon, {
|
|
172
149
|
className: (0, _classnames.default)(icon.props.className, 'euiCard__icon'),
|
|
173
150
|
css: iconStyles
|
|
174
151
|
});
|
|
@@ -343,7 +320,7 @@ EuiCard.propTypes = {
|
|
|
343
320
|
/**
|
|
344
321
|
* Changes alignment of the title and description
|
|
345
322
|
*/
|
|
346
|
-
textAlign: _propTypes.default.
|
|
323
|
+
textAlign: _propTypes.default.any,
|
|
347
324
|
|
|
348
325
|
/**
|
|
349
326
|
* Accepts any combination of elements
|
|
@@ -29,7 +29,7 @@ var _checkable_card = require("./checkable_card.styles");
|
|
|
29
29
|
|
|
30
30
|
var _react2 = require("@emotion/react");
|
|
31
31
|
|
|
32
|
-
var _excluded = ["children", "className", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
|
|
32
|
+
var _excluded = ["children", "className", "css", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
|
|
33
33
|
|
|
34
34
|
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); }
|
|
35
35
|
|
|
@@ -38,6 +38,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
38
38
|
var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
39
39
|
var children = _ref.children,
|
|
40
40
|
className = _ref.className,
|
|
41
|
+
css = _ref.css,
|
|
41
42
|
_ref$checkableType = _ref.checkableType,
|
|
42
43
|
checkableType = _ref$checkableType === void 0 ? 'radio' : _ref$checkableType,
|
|
43
44
|
label = _ref.label,
|
|
@@ -49,7 +50,7 @@ var EuiCheckableCard = function EuiCheckableCard(_ref) {
|
|
|
49
50
|
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
50
51
|
var euiThemeContext = (0, _services.useEuiTheme)();
|
|
51
52
|
var styles = (0, _checkable_card.euiCheckableCardStyles)(euiThemeContext);
|
|
52
|
-
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked];
|
|
53
|
+
var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked, css];
|
|
53
54
|
var labelStyles = [styles.label.euiCheckableCard__label, disabled && styles.label.isDisabled];
|
|
54
55
|
var childStyles = [styles.euiCheckableCard__children];
|
|
55
56
|
var id = rest.id;
|
|
@@ -180,7 +180,7 @@ var EuiSuperUpdateButton = /*#__PURE__*/function (_Component) {
|
|
|
180
180
|
sizes: responsive || 'none'
|
|
181
181
|
}, (0, _react2.jsx)(_button.EuiButton, (0, _extends2.default)({
|
|
182
182
|
className: classes,
|
|
183
|
-
minWidth:
|
|
183
|
+
minWidth: false
|
|
184
184
|
}, sharedButtonProps, {
|
|
185
185
|
fill: fill,
|
|
186
186
|
textProps: _objectSpread(_objectSpread({}, restTextProps), {}, {
|