@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.
Files changed (48) hide show
  1. package/dist/eui_charts_theme.js +330 -330
  2. package/dist/eui_charts_theme.js.map +1 -1
  3. package/dist/eui_theme_dark.css +0 -1
  4. package/dist/eui_theme_dark.min.css +1 -1
  5. package/dist/eui_theme_light.css +0 -1
  6. package/dist/eui_theme_light.min.css +1 -1
  7. package/es/components/button/button.js +1 -0
  8. package/es/components/button/button_display/_button_display.js +3 -3
  9. package/es/components/button/button_display/_button_display.styles.js +2 -1
  10. package/es/components/card/card.js +6 -28
  11. package/es/components/card/checkable_card/checkable_card.js +3 -2
  12. package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
  13. package/es/components/facet/facet_button.js +55 -1
  14. package/es/global_styling/mixins/_helpers.js +1 -1
  15. package/eui.d.ts +6 -6
  16. package/i18ntokens.json +12 -12
  17. package/lib/components/button/button.js +1 -0
  18. package/lib/components/button/button_display/_button_display.js +3 -3
  19. package/lib/components/button/button_display/_button_display.styles.js +2 -1
  20. package/lib/components/card/card.js +7 -30
  21. package/lib/components/card/checkable_card/checkable_card.js +3 -2
  22. package/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
  23. package/lib/components/facet/facet_button.js +56 -2
  24. package/lib/global_styling/mixins/_helpers.js +1 -1
  25. package/optimize/es/components/button/button.js +1 -0
  26. package/optimize/es/components/button/button_display/_button_display.js +2 -2
  27. package/optimize/es/components/button/button_display/_button_display.styles.js +2 -1
  28. package/optimize/es/components/card/card.js +5 -27
  29. package/optimize/es/components/card/checkable_card/checkable_card.js +3 -2
  30. package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
  31. package/optimize/es/global_styling/mixins/_helpers.js +1 -1
  32. package/optimize/lib/components/button/button.js +1 -0
  33. package/optimize/lib/components/button/button_display/_button_display.js +2 -2
  34. package/optimize/lib/components/button/button_display/_button_display.styles.js +2 -1
  35. package/optimize/lib/components/card/card.js +6 -29
  36. package/optimize/lib/components/card/checkable_card/checkable_card.js +3 -2
  37. package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
  38. package/optimize/lib/global_styling/mixins/_helpers.js +1 -1
  39. package/package.json +1 -1
  40. package/src/components/modal/_modal.scss +3 -1
  41. package/test-env/components/button/button.js +1 -0
  42. package/test-env/components/button/button_display/_button_display.js +3 -3
  43. package/test-env/components/button/button_display/_button_display.styles.js +2 -1
  44. package/test-env/components/card/card.js +7 -30
  45. package/test-env/components/card/checkable_card/checkable_card.js +3 -2
  46. package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
  47. package/test-env/components/facet/facet_button.js +56 -2
  48. package/test-env/global_styling/mixins/_helpers.js +1 -1
@@ -212,6 +212,7 @@ export var EuiButtonDisplayDeprecated = /*#__PURE__*/forwardRef(function (_ref,
212
212
 
213
213
  if (minWidth !== undefined || minWidth !== null) {
214
214
  calculatedStyle = _objectSpread(_objectSpread({}, calculatedStyle), {}, {
215
+ // @ts-ignore - deprecated component
215
216
  minWidth: minWidth
216
217
  });
217
218
  }
@@ -74,7 +74,7 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
74
74
  var theme = useEuiTheme();
75
75
  var styles = euiButtonDisplayStyles(theme);
76
76
  var buttonRadiusStyle = useEuiButtonRadiusCSS()[size];
77
- var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
77
+ var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, minWidth == null && styles.defaultMinWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
78
78
 
79
79
  var innerNode = ___EmotionJSX(EuiButtonDisplayContent, _extends({
80
80
  isLoading: isLoading,
@@ -111,7 +111,7 @@ export var EuiButtonDisplay = /*#__PURE__*/forwardRef(function (_ref2, ref) {
111
111
 
112
112
  return createElement(element, _objectSpread(_objectSpread(_objectSpread({
113
113
  css: cssStyles,
114
- style: minWidth != null ? _objectSpread(_objectSpread({}, style), {}, {
114
+ style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
115
115
  minInlineSize: minWidth
116
116
  }) : style,
117
117
  ref: ref
@@ -150,7 +150,7 @@ EuiButtonDisplay.propTypes = {
150
150
  /**
151
151
  * Override the default minimum width
152
152
  */
153
- minWidth: PropTypes.any,
153
+ minWidth: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf([false])]),
154
154
 
155
155
  /**
156
156
  * Force disables the button and changes the icon to a loading spinner
@@ -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(), ";", logicalCSS('min-width', "".concat(euiTheme.base * 7, "px")), " font-weight:", euiTheme.font.weight.medium, ";padding:0 ", euiTheme.size.m, ";&:hover:not(:disabled),&:focus{text-decoration:underline;};label:euiButtonDisplay;"),
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;"),
@@ -23,33 +23,19 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
23
23
  import React, { isValidElement } from 'react';
24
24
  import PropTypes from "prop-types";
25
25
  import classNames from 'classnames';
26
- import { keysOf } from '../common';
27
26
  import { getSecureRelForTarget, useEuiTheme } from '../../services';
27
+ import { cloneElementWithCss } from '../../services/theme/clone_element';
28
28
  import { EuiText } from '../text';
29
29
  import { EuiTitle } from '../title';
30
30
  import { EuiBetaBadge } from '../badge/beta_badge';
31
- import { EuiCardSelect, euiCardSelectableColor } from './card_select';
31
+ import { EuiCardSelect } from './card_select';
32
32
  import { useGeneratedHtmlId } from '../../services/accessibility';
33
33
  import { validateHref } from '../../services/security/href_validator';
34
34
  import { EuiPanel } from '../panel';
35
35
  import { EuiSpacer } from '../spacer';
36
36
  import { euiCardBetaBadgeStyles, euiCardStyles, euiCardTextStyles } from './card.styles';
37
37
  import { jsx as ___EmotionJSX } from "@emotion/react";
38
- var textAlignToClassNameMap = {
39
- left: 'euiCard--leftAligned',
40
- center: 'euiCard--centerAligned',
41
- right: 'euiCard--rightAligned'
42
- };
43
- export var ALIGNMENTS = keysOf(textAlignToClassNameMap);
44
- var layoutToClassNameMap = {
45
- vertical: '',
46
- horizontal: 'euiCard--horizontal'
47
- };
48
- export var LAYOUT_ALIGNMENTS = keysOf(layoutToClassNameMap);
49
- /**
50
- * Certain props are only allowed when the layout is vertical
51
- */
52
-
38
+ export var ALIGNMENTS = ['left', 'center', 'right'];
53
39
  export var EuiCard = function EuiCard(_ref) {
54
40
  var className = _ref.className,
55
41
  description = _ref.description,
@@ -109,15 +95,7 @@ export var EuiCard = function EuiCard(_ref) {
109
95
  }
110
96
  }
111
97
 
112
- var selectableColorClass = selectable ? "euiCard--isSelectable--".concat(euiCardSelectableColor(selectable.color, selectable.isSelected)) : undefined;
113
- var classes = classNames('euiCard', textAlignToClassNameMap[textAlign], layoutToClassNameMap[layout], {
114
- 'euiCard--isClickable': isClickable,
115
- 'euiCard--hasBetaBadge': betaBadgeProps === null || betaBadgeProps === void 0 ? void 0 : betaBadgeProps.label,
116
- 'euiCard--hasIcon': icon,
117
- 'euiCard--isSelectable': selectable,
118
- 'euiCard-isSelected': selectable === null || selectable === void 0 ? void 0 : selectable.isSelected,
119
- 'euiCard-isDisabled': isDisabled
120
- }, selectableColorClass, className);
98
+ var classes = classNames('euiCard', className);
121
99
  var ariaId = useGeneratedHtmlId();
122
100
  var ariaDesc = description ? "".concat(ariaId, "Description") : '';
123
101
  /**
@@ -145,7 +123,7 @@ export var EuiCard = function EuiCard(_ref) {
145
123
 
146
124
  if (icon) {
147
125
  var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
148
- iconNode = /*#__PURE__*/React.cloneElement(icon, {
126
+ iconNode = cloneElementWithCss(icon, {
149
127
  className: classNames(icon.props.className, 'euiCard__icon'),
150
128
  css: iconStyles
151
129
  });
@@ -320,7 +298,7 @@ EuiCard.propTypes = {
320
298
  /**
321
299
  * Changes alignment of the title and description
322
300
  */
323
- textAlign: PropTypes.oneOf(["left", "center", "right"]),
301
+ textAlign: PropTypes.any,
324
302
 
325
303
  /**
326
304
  * Accepts any combination of elements
@@ -1,4 +1,4 @@
1
- var _excluded = ["children", "className", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
1
+ var _excluded = ["children", "className", "css", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
2
2
 
3
3
  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); }
4
4
 
@@ -24,6 +24,7 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
24
24
  export var EuiCheckableCard = function EuiCheckableCard(_ref) {
25
25
  var children = _ref.children,
26
26
  className = _ref.className,
27
+ css = _ref.css,
27
28
  _ref$checkableType = _ref.checkableType,
28
29
  checkableType = _ref$checkableType === void 0 ? 'radio' : _ref$checkableType,
29
30
  label = _ref.label,
@@ -36,7 +37,7 @@ export var EuiCheckableCard = function EuiCheckableCard(_ref) {
36
37
 
37
38
  var euiThemeContext = useEuiTheme();
38
39
  var styles = euiCheckableCardStyles(euiThemeContext);
39
- var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked];
40
+ var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked, css];
40
41
  var labelStyles = [styles.label.euiCheckableCard__label, disabled && styles.label.isDisabled];
41
42
  var childStyles = [styles.euiCheckableCard__children];
42
43
  var id = rest.id;
@@ -181,7 +181,7 @@ export var EuiSuperUpdateButton = /*#__PURE__*/function (_Component) {
181
181
  sizes: responsive || 'none'
182
182
  }, ___EmotionJSX(EuiButton, _extends({
183
183
  className: classes,
184
- minWidth: 0
184
+ minWidth: false
185
185
  }, sharedButtonProps, {
186
186
  fill: fill,
187
187
  textProps: _objectSpread(_objectSpread({}, restTextProps), {}, {
@@ -105,7 +105,7 @@ EuiFacetButton.propTypes = {
105
105
  /**
106
106
  * ReactNode to render as this component's content
107
107
  */
108
- children: PropTypes.node.isRequired,
108
+ children: PropTypes.oneOfType([PropTypes.node.isRequired, PropTypes.node]),
109
109
 
110
110
  /**
111
111
  * Any node, but preferably a `EuiIcon` or `EuiAvatar`
@@ -113,11 +113,20 @@ EuiFacetButton.propTypes = {
113
113
  icon: PropTypes.node,
114
114
  isDisabled: PropTypes.bool,
115
115
 
116
+ /**
117
+ * Force disables the button and changes the icon to a loading spinner
118
+ */
119
+
116
120
  /**
117
121
  * Adds/swaps for loading spinner & disables
118
122
  */
119
123
  isLoading: PropTypes.bool,
120
124
 
125
+ /**
126
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
127
+ * *Only use when the readable text does not change between states.*
128
+ */
129
+
121
130
  /**
122
131
  * Changes visual of button to indicate it's currently selected
123
132
  */
@@ -127,6 +136,51 @@ EuiFacetButton.propTypes = {
127
136
  * Adds a notification indicator for displaying the quantity provided
128
137
  */
129
138
  quantity: PropTypes.number,
139
+ size: PropTypes.any,
140
+
141
+ /**
142
+ * Extends the button to 100% width
143
+ */
144
+ fullWidth: PropTypes.bool,
145
+
146
+ /**
147
+ * Override the default minimum width
148
+ */
149
+ minWidth: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf([false])]),
150
+
151
+ /**
152
+ * Object of props passed to the <span/> wrapping the button's content
153
+ */
154
+ contentProps: PropTypes.shape({
155
+ className: PropTypes.string,
156
+ "aria-label": PropTypes.string,
157
+ "data-test-subj": PropTypes.string,
158
+ css: PropTypes.any
159
+ }),
160
+ style: PropTypes.any,
161
+
162
+ /**
163
+ * Any `type` accepted by EuiIcon
164
+ */
165
+ iconType: PropTypes.oneOfType([PropTypes.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.string.isRequired, PropTypes.elementType.isRequired]),
166
+
167
+ /**
168
+ * Can only be one side `left` or `right`
169
+ */
170
+ iconSide: PropTypes.oneOfType([PropTypes.any.isRequired, PropTypes.oneOf([undefined])]),
171
+
172
+ /**
173
+ * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
174
+ */
175
+ textProps: PropTypes.shape({
176
+ className: PropTypes.string,
177
+ "aria-label": PropTypes.string,
178
+ "data-test-subj": PropTypes.string,
179
+ css: PropTypes.any,
180
+ ref: PropTypes.any,
181
+ "data-text": PropTypes.string
182
+ }),
183
+ iconSize: PropTypes.any,
130
184
  className: PropTypes.string,
131
185
  "aria-label": PropTypes.string,
132
186
  "data-test-subj": PropTypes.string,
@@ -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 = "calc(".concat(size.base, " * 0.75 * 1.25)");
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 = '';
package/eui.d.ts CHANGED
@@ -1891,6 +1891,7 @@ declare module '@elastic/eui/src/components/button/button_display/_button_displa
1891
1891
  euiButtonDisplay: import("@emotion/utils").SerializedStyles;
1892
1892
  isDisabled: import("@emotion/utils").SerializedStyles;
1893
1893
  fullWidth: import("@emotion/utils").SerializedStyles;
1894
+ defaultMinWidth: import("@emotion/utils").SerializedStyles;
1894
1895
  xs: import("@emotion/utils").SerializedStyles;
1895
1896
  s: import("@emotion/utils").SerializedStyles;
1896
1897
  m: import("@emotion/utils").SerializedStyles;
@@ -2042,7 +2043,7 @@ declare module '@elastic/eui/src/components/button/button_display/_button_displa
2042
2043
  /**
2043
2044
  * Override the default minimum width
2044
2045
  */
2045
- minWidth?: CSSProperties['minWidth'];
2046
+ minWidth?: CSSProperties['minWidth'] | false;
2046
2047
  /**
2047
2048
  * Force disables the button and changes the icon to a loading spinner
2048
2049
  */
@@ -8345,9 +8346,8 @@ declare module '@elastic/eui/src/components/card/card' {
8345
8346
  import { EuiBetaBadgeProps } from '@elastic/eui/src/components/badge/beta_badge';
8346
8347
  import { EuiIconProps } from '@elastic/eui/src/components/icon';
8347
8348
  import { EuiCardSelectProps } from '@elastic/eui/src/components/card/card_select';
8348
- import { EuiPanelProps } from '@elastic/eui/src/components/panel'; type CardAlignment = 'left' | 'center' | 'right';
8349
- export const ALIGNMENTS: CardAlignment[]; type CardLayout = 'vertical' | 'horizontal';
8350
- export const LAYOUT_ALIGNMENTS: CardLayout[]; type EuiCardPropsLayout = ExclusiveUnion<{
8349
+ import { EuiPanelProps } from '@elastic/eui/src/components/panel';
8350
+ export const ALIGNMENTS: readonly ["left", "center", "right"]; type CardAlignment = typeof ALIGNMENTS[number]; type EuiCardPropsLayout = ExclusiveUnion<{
8351
8351
  layout?: 'vertical';
8352
8352
  /**
8353
8353
  * Changes alignment of the title and description
@@ -13787,8 +13787,8 @@ declare module '@elastic/eui/src/components/facet/facet_button.styles' {
13787
13787
  }
13788
13788
  declare module '@elastic/eui/src/components/facet/facet_button' {
13789
13789
  import { FunctionComponent, HTMLAttributes, ReactNode, RefCallback } from 'react';
13790
- import { CommonProps } from '@elastic/eui/src/components/common';
13791
- export interface EuiFacetButtonProps extends CommonProps, HTMLAttributes<HTMLButtonElement> {
13790
+ import { EuiButtonDisplayCommonProps } from '@elastic/eui/src/components/button/button_display/_button_display';
13791
+ export interface EuiFacetButtonProps extends EuiButtonDisplayCommonProps, HTMLAttributes<HTMLButtonElement> {
13792
13792
  buttonRef?: RefCallback<HTMLButtonElement>;
13793
13793
  /**
13794
13794
  * ReactNode to render as this component's content
package/i18ntokens.json CHANGED
@@ -229,11 +229,11 @@
229
229
  "highlighting": "string",
230
230
  "loc": {
231
231
  "start": {
232
- "line": 180,
232
+ "line": 182,
233
233
  "column": 20
234
234
  },
235
235
  "end": {
236
- "line": 183,
236
+ "line": 185,
237
237
  "column": 3
238
238
  }
239
239
  },
@@ -4229,11 +4229,11 @@
4229
4229
  "highlighting": "string",
4230
4230
  "loc": {
4231
4231
  "start": {
4232
- "line": 88,
4232
+ "line": 107,
4233
4233
  "column": 10
4234
4234
  },
4235
4235
  "end": {
4236
- "line": 91,
4236
+ "line": 110,
4237
4237
  "column": 11
4238
4238
  }
4239
4239
  },
@@ -4661,11 +4661,11 @@
4661
4661
  "highlighting": "string",
4662
4662
  "loc": {
4663
4663
  "start": {
4664
- "line": 677,
4664
+ "line": 684,
4665
4665
  "column": 16
4666
4666
  },
4667
4667
  "end": {
4668
- "line": 680,
4668
+ "line": 687,
4669
4669
  "column": 18
4670
4670
  }
4671
4671
  },
@@ -5605,11 +5605,11 @@
5605
5605
  "highlighting": "string",
5606
5606
  "loc": {
5607
5607
  "start": {
5608
- "line": 231,
5608
+ "line": 234,
5609
5609
  "column": 10
5610
5610
  },
5611
5611
  "end": {
5612
- "line": 238,
5612
+ "line": 241,
5613
5613
  "column": 11
5614
5614
  }
5615
5615
  },
@@ -5621,11 +5621,11 @@
5621
5621
  "highlighting": "string",
5622
5622
  "loc": {
5623
5623
  "start": {
5624
- "line": 231,
5624
+ "line": 234,
5625
5625
  "column": 10
5626
5626
  },
5627
5627
  "end": {
5628
- "line": 238,
5628
+ "line": 241,
5629
5629
  "column": 11
5630
5630
  }
5631
5631
  },
@@ -5637,11 +5637,11 @@
5637
5637
  "highlighting": "string",
5638
5638
  "loc": {
5639
5639
  "start": {
5640
- "line": 231,
5640
+ "line": 234,
5641
5641
  "column": 10
5642
5642
  },
5643
5643
  "end": {
5644
- "line": 238,
5644
+ "line": 241,
5645
5645
  "column": 11
5646
5646
  }
5647
5647
  },
@@ -231,6 +231,7 @@ var EuiButtonDisplayDeprecated = /*#__PURE__*/(0, _react.forwardRef)(function (_
231
231
 
232
232
  if (minWidth !== undefined || minWidth !== null) {
233
233
  calculatedStyle = _objectSpread(_objectSpread({}, calculatedStyle), {}, {
234
+ // @ts-ignore - deprecated component
234
235
  minWidth: minWidth
235
236
  });
236
237
  }
@@ -91,7 +91,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
91
91
  var theme = (0, _services.useEuiTheme)();
92
92
  var styles = (0, _button_display.euiButtonDisplayStyles)(theme);
93
93
  var buttonRadiusStyle = (0, _mixins.useEuiButtonRadiusCSS)()[size];
94
- var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
94
+ var cssStyles = [styles.euiButtonDisplay, styles[size], fullWidth && styles.fullWidth, minWidth == null && styles.defaultMinWidth, buttonIsDisabled && styles.isDisabled, buttonRadiusStyle];
95
95
  var innerNode = (0, _react2.jsx)(_button_display_content.EuiButtonDisplayContent, _extends({
96
96
  isLoading: isLoading,
97
97
  isDisabled: buttonIsDisabled,
@@ -126,7 +126,7 @@ var EuiButtonDisplay = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref)
126
126
 
127
127
  return (0, _react2.createElement)(element, _objectSpread(_objectSpread(_objectSpread({
128
128
  css: cssStyles,
129
- style: minWidth != null ? _objectSpread(_objectSpread({}, style), {}, {
129
+ style: minWidth ? _objectSpread(_objectSpread({}, style), {}, {
130
130
  minInlineSize: minWidth
131
131
  }) : style,
132
132
  ref: ref
@@ -166,7 +166,7 @@ EuiButtonDisplay.propTypes = {
166
166
  /**
167
167
  * Override the default minimum width
168
168
  */
169
- minWidth: _propTypes.default.any,
169
+ minWidth: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([false])]),
170
170
 
171
171
  /**
172
172
  * 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(), ";", (0, _global_styling.logicalCSS)('min-width', "".concat(euiTheme.base * 7, "px")), " font-weight:", euiTheme.font.weight.medium, ";padding:0 ", euiTheme.size.m, ";&:hover:not(:disabled),&:focus{text-decoration:underline;};label:euiButtonDisplay;"),
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;"),
@@ -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.LAYOUT_ALIGNMENTS = exports.EuiCard = exports.ALIGNMENTS = void 0;
8
+ exports.EuiCard = exports.ALIGNMENTS = void 0;
9
9
 
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
 
@@ -13,10 +13,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
- var _common = require("../common");
17
-
18
16
  var _services = require("../../services");
19
17
 
18
+ var _clone_element = require("../../services/theme/clone_element");
19
+
20
20
  var _text = require("../text");
21
21
 
22
22
  var _title = require("../title");
@@ -58,23 +58,8 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
58
58
 
59
59
  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; }
60
60
 
61
- var textAlignToClassNameMap = {
62
- left: 'euiCard--leftAligned',
63
- center: 'euiCard--centerAligned',
64
- right: 'euiCard--rightAligned'
65
- };
66
- var ALIGNMENTS = (0, _common.keysOf)(textAlignToClassNameMap);
61
+ var ALIGNMENTS = ['left', 'center', 'right'];
67
62
  exports.ALIGNMENTS = ALIGNMENTS;
68
- var layoutToClassNameMap = {
69
- vertical: '',
70
- horizontal: 'euiCard--horizontal'
71
- };
72
- var LAYOUT_ALIGNMENTS = (0, _common.keysOf)(layoutToClassNameMap);
73
- /**
74
- * Certain props are only allowed when the layout is vertical
75
- */
76
-
77
- exports.LAYOUT_ALIGNMENTS = LAYOUT_ALIGNMENTS;
78
63
 
79
64
  var EuiCard = function EuiCard(_ref) {
80
65
  var className = _ref.className,
@@ -135,15 +120,7 @@ var EuiCard = function EuiCard(_ref) {
135
120
  }
136
121
  }
137
122
 
138
- var selectableColorClass = selectable ? "euiCard--isSelectable--".concat((0, _card_select.euiCardSelectableColor)(selectable.color, selectable.isSelected)) : undefined;
139
- var classes = (0, _classnames.default)('euiCard', textAlignToClassNameMap[textAlign], layoutToClassNameMap[layout], {
140
- 'euiCard--isClickable': isClickable,
141
- 'euiCard--hasBetaBadge': betaBadgeProps === null || betaBadgeProps === void 0 ? void 0 : betaBadgeProps.label,
142
- 'euiCard--hasIcon': icon,
143
- 'euiCard--isSelectable': selectable,
144
- 'euiCard-isSelected': selectable === null || selectable === void 0 ? void 0 : selectable.isSelected,
145
- 'euiCard-isDisabled': isDisabled
146
- }, selectableColorClass, className);
123
+ var classes = (0, _classnames.default)('euiCard', className);
147
124
  var ariaId = (0, _accessibility.useGeneratedHtmlId)();
148
125
  var ariaDesc = description ? "".concat(ariaId, "Description") : '';
149
126
  /**
@@ -171,7 +148,7 @@ var EuiCard = function EuiCard(_ref) {
171
148
 
172
149
  if (icon) {
173
150
  var iconStyles = [styles.icon.euiCard__icon, styles.icon.layout[layout], imageNode && styles.icon.withImage];
174
- iconNode = /*#__PURE__*/_react.default.cloneElement(icon, {
151
+ iconNode = (0, _clone_element.cloneElementWithCss)(icon, {
175
152
  className: (0, _classnames.default)(icon.props.className, 'euiCard__icon'),
176
153
  css: iconStyles
177
154
  });
@@ -348,7 +325,7 @@ EuiCard.propTypes = {
348
325
  /**
349
326
  * Changes alignment of the title and description
350
327
  */
351
- textAlign: _propTypes.default.oneOf(["left", "center", "right"]),
328
+ textAlign: _propTypes.default.any,
352
329
 
353
330
  /**
354
331
  * Accepts any combination of elements
@@ -23,7 +23,7 @@ var _checkable_card = require("./checkable_card.styles");
23
23
 
24
24
  var _react2 = require("@emotion/react");
25
25
 
26
- var _excluded = ["children", "className", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
26
+ var _excluded = ["children", "className", "css", "checkableType", "label", "checked", "disabled", "hasShadow", "hasBorder"];
27
27
 
28
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
29
 
@@ -40,6 +40,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
40
40
  var EuiCheckableCard = function EuiCheckableCard(_ref) {
41
41
  var children = _ref.children,
42
42
  className = _ref.className,
43
+ css = _ref.css,
43
44
  _ref$checkableType = _ref.checkableType,
44
45
  checkableType = _ref$checkableType === void 0 ? 'radio' : _ref$checkableType,
45
46
  label = _ref.label,
@@ -52,7 +53,7 @@ var EuiCheckableCard = function EuiCheckableCard(_ref) {
52
53
 
53
54
  var euiThemeContext = (0, _services.useEuiTheme)();
54
55
  var styles = (0, _checkable_card.euiCheckableCardStyles)(euiThemeContext);
55
- var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked];
56
+ var baseStyles = [styles.euiCheckableCard, checked && !disabled && styles.isChecked, css];
56
57
  var labelStyles = [styles.label.euiCheckableCard__label, disabled && styles.label.isDisabled];
57
58
  var childStyles = [styles.euiCheckableCard__children];
58
59
  var id = rest.id;
@@ -194,7 +194,7 @@ var EuiSuperUpdateButton = /*#__PURE__*/function (_Component) {
194
194
  sizes: responsive || 'none'
195
195
  }, (0, _react2.jsx)(_button.EuiButton, _extends({
196
196
  className: classes,
197
- minWidth: 0
197
+ minWidth: false
198
198
  }, sharedButtonProps, {
199
199
  fill: fill,
200
200
  textProps: _objectSpread(_objectSpread({}, restTextProps), {}, {