@elastic/eui 67.1.8 → 67.1.10

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 (75) hide show
  1. package/es/components/button/button.js +1 -0
  2. package/es/components/button/button_display/_button_display.js +3 -3
  3. package/es/components/button/button_display/_button_display.styles.js +2 -1
  4. package/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
  5. package/es/components/description_list/description_list.styles.js +2 -2
  6. package/es/components/description_list/description_list_description.js +6 -2
  7. package/es/components/description_list/description_list_description.styles.js +2 -2
  8. package/es/components/description_list/description_list_title.styles.js +2 -2
  9. package/es/components/facet/facet_button.js +55 -1
  10. package/es/components/flyout/flyout.styles.js +7 -7
  11. package/es/components/image/image_wrapper.styles.js +3 -3
  12. package/es/components/page/page.styles.js +2 -2
  13. package/es/components/toast/global_toast_list.styles.js +5 -5
  14. package/es/global_styling/mixins/_helpers.js +1 -1
  15. package/es/global_styling/mixins/_responsive.js +46 -1
  16. package/eui.d.ts +23 -4
  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/date_picker/super_date_picker/super_update_button.js +1 -1
  21. package/lib/components/description_list/description_list.styles.js +1 -1
  22. package/lib/components/description_list/description_list_description.js +5 -1
  23. package/lib/components/description_list/description_list_description.styles.js +1 -1
  24. package/lib/components/description_list/description_list_title.styles.js +1 -1
  25. package/lib/components/facet/facet_button.js +56 -2
  26. package/lib/components/flyout/flyout.styles.js +6 -6
  27. package/lib/components/image/image_wrapper.styles.js +2 -2
  28. package/lib/components/page/page.styles.js +1 -1
  29. package/lib/components/toast/global_toast_list.styles.js +4 -4
  30. package/lib/global_styling/mixins/_helpers.js +1 -1
  31. package/lib/global_styling/mixins/_responsive.js +60 -3
  32. package/optimize/es/components/button/button.js +1 -0
  33. package/optimize/es/components/button/button_display/_button_display.js +2 -2
  34. package/optimize/es/components/button/button_display/_button_display.styles.js +2 -1
  35. package/optimize/es/components/date_picker/super_date_picker/super_update_button.js +1 -1
  36. package/optimize/es/components/description_list/description_list.styles.js +2 -2
  37. package/optimize/es/components/description_list/description_list_description.js +6 -2
  38. package/optimize/es/components/description_list/description_list_description.styles.js +2 -2
  39. package/optimize/es/components/description_list/description_list_title.styles.js +2 -2
  40. package/optimize/es/components/flyout/flyout.styles.js +7 -7
  41. package/optimize/es/components/image/image_wrapper.styles.js +3 -3
  42. package/optimize/es/components/page/page.styles.js +2 -2
  43. package/optimize/es/components/toast/global_toast_list.styles.js +5 -5
  44. package/optimize/es/global_styling/mixins/_helpers.js +1 -1
  45. package/optimize/es/global_styling/mixins/_responsive.js +46 -1
  46. package/optimize/lib/components/button/button.js +1 -0
  47. package/optimize/lib/components/button/button_display/_button_display.js +2 -2
  48. package/optimize/lib/components/button/button_display/_button_display.styles.js +2 -1
  49. package/optimize/lib/components/date_picker/super_date_picker/super_update_button.js +1 -1
  50. package/optimize/lib/components/description_list/description_list.styles.js +1 -1
  51. package/optimize/lib/components/description_list/description_list_description.js +5 -1
  52. package/optimize/lib/components/description_list/description_list_description.styles.js +1 -1
  53. package/optimize/lib/components/description_list/description_list_title.styles.js +1 -1
  54. package/optimize/lib/components/flyout/flyout.styles.js +6 -6
  55. package/optimize/lib/components/image/image_wrapper.styles.js +2 -2
  56. package/optimize/lib/components/page/page.styles.js +1 -1
  57. package/optimize/lib/components/toast/global_toast_list.styles.js +4 -4
  58. package/optimize/lib/global_styling/mixins/_helpers.js +1 -1
  59. package/optimize/lib/global_styling/mixins/_responsive.js +60 -3
  60. package/package.json +1 -1
  61. package/test-env/components/button/button.js +1 -0
  62. package/test-env/components/button/button_display/_button_display.js +3 -3
  63. package/test-env/components/button/button_display/_button_display.styles.js +2 -1
  64. package/test-env/components/date_picker/super_date_picker/super_update_button.js +1 -1
  65. package/test-env/components/description_list/description_list.styles.js +1 -1
  66. package/test-env/components/description_list/description_list_description.js +5 -1
  67. package/test-env/components/description_list/description_list_description.styles.js +1 -1
  68. package/test-env/components/description_list/description_list_title.styles.js +1 -1
  69. package/test-env/components/facet/facet_button.js +56 -2
  70. package/test-env/components/flyout/flyout.styles.js +6 -6
  71. package/test-env/components/image/image_wrapper.styles.js +2 -2
  72. package/test-env/components/page/page.styles.js +1 -1
  73. package/test-env/components/toast/global_toast_list.styles.js +4 -4
  74. package/test-env/global_styling/mixins/_helpers.js +1 -1
  75. package/test-env/global_styling/mixins/_responsive.js +60 -3
@@ -9,7 +9,7 @@ import { sortMapBySmallToLargeValues } from '../../services/breakpoint/_sorting'
9
9
  import { useEuiTheme } from '../../services/theme/hooks';
10
10
 
11
11
  /**
12
- * Generates a CSS media query rule string based on the input breakpoint ranges.
12
+ * Generates a CSS media query rule string based on the input breakpoint *ranges*.
13
13
  * Examples with default theme breakpoints:
14
14
  *
15
15
  * euiBreakpoint(['s']) becomes `@media only screen and (min-width: 575px) and (max-width: 767px)`
@@ -47,4 +47,49 @@ export var euiBreakpoint = function euiBreakpoint(_ref, sizes) {
47
47
  export var useEuiBreakpoint = function useEuiBreakpoint(sizes) {
48
48
  var euiTheme = useEuiTheme();
49
49
  return euiBreakpoint(euiTheme, sizes);
50
+ };
51
+ /**
52
+ * Min/Max width breakpoint utilities that generate only a single min/max query/bound
53
+ *
54
+ * *Unlike the above euiBreakpoint utility*, these utilities treat breakpoint
55
+ * sizes as a one-dimensional point, rather than a two-dimensional *screen range*.
56
+ * Examples with default theme breakpoints:
57
+ *
58
+ * euiMaxBreakpoint('m') becomes `@media only screen and (max-width: 767px)`
59
+ * euiMinBreakpoint('m') becomes `@media only screen and (min-width: 768px)`
60
+ *
61
+ * This is safer and more intentional to use than euiBreakpoint(['xs', 's']) / euiBreakpoint(['m', 'xl'])
62
+ * in the event that consumers add larger or smaller custom breakpoints (e.g 'xxs' or `xxl`)
63
+ * and if the intention of the media query is actually "m and below/above" vs. "only screens m/l/xl".
64
+ */
65
+
66
+ export var euiMinBreakpoint = function euiMinBreakpoint(_ref2, size) {
67
+ var euiTheme = _ref2.euiTheme;
68
+ var minBreakpointSize = euiTheme.breakpoint[size];
69
+
70
+ if (minBreakpointSize) {
71
+ return "@media only screen and (min-width: ".concat(minBreakpointSize, "px)");
72
+ } else {
73
+ console.warn("Invalid min breakpoint size: ".concat(size));
74
+ return '@media only screen';
75
+ }
76
+ };
77
+ export var useEuiMinBreakpoint = function useEuiMinBreakpoint(size) {
78
+ var euiTheme = useEuiTheme();
79
+ return euiMinBreakpoint(euiTheme, size);
80
+ };
81
+ export var euiMaxBreakpoint = function euiMaxBreakpoint(_ref3, size) {
82
+ var euiTheme = _ref3.euiTheme;
83
+ var maxBreakpointSize = euiTheme.breakpoint[size];
84
+
85
+ if (maxBreakpointSize) {
86
+ return "@media only screen and (max-width: ".concat(maxBreakpointSize - 1, "px)");
87
+ } else {
88
+ console.warn("Invalid max breakpoint size: ".concat(size));
89
+ return '@media only screen';
90
+ }
91
+ };
92
+ export var useEuiMaxBreakpoint = function useEuiMaxBreakpoint(size) {
93
+ var euiTheme = useEuiTheme();
94
+ return euiMaxBreakpoint(euiTheme, size);
50
95
  };
@@ -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 != null ? _objectSpread(_objectSpread({}, style), {}, {
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(), ";", (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;"),
@@ -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: 0
181
+ minWidth: false
182
182
  }, sharedButtonProps, {
183
183
  fill: fill,
184
184
  textProps: _objectSpread(_objectSpread({}, restTextProps), {}, {
@@ -26,7 +26,7 @@ var euiDescriptionListStyles = function euiDescriptionListStyles(euiThemeContext
26
26
  inline: /*#__PURE__*/(0, _react.css)(";label:inline;"),
27
27
  column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
28
28
  // Responsive columns behave as a row on breakpoints xs-s
29
- responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
29
+ responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", columnDisplay, ";};label:responsiveColumn;"),
30
30
  // Alignment
31
31
  center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;"),
32
32
  left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
@@ -45,6 +45,7 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
45
45
  align = _useContext.align,
46
46
  gutterSize = _useContext.gutterSize;
47
47
 
48
+ var showResponsiveColumns = (0, _services.useIsWithinMinBreakpoint)('m');
48
49
  var theme = (0, _services.useEuiTheme)();
49
50
  var styles = (0, _description_list_description.euiDescriptionListDescriptionStyles)(theme);
50
51
  var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
@@ -60,7 +61,10 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
60
61
  conditionalStyles.push(styles.left);
61
62
  }
62
63
 
63
- conditionalStyles.push(styles[gutterSize]);
64
+ if (type === 'column' || showResponsiveColumns) {
65
+ conditionalStyles.push(styles[gutterSize]);
66
+ }
67
+
64
68
  break;
65
69
  }
66
70
 
@@ -30,7 +30,7 @@ var euiDescriptionListDescriptionStyles = function euiDescriptionListDescription
30
30
  // Types
31
31
  row: /*#__PURE__*/(0, _react.css)(";label:row;"),
32
32
  column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
33
- responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
33
+ responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", columnDisplay, ";};label:responsiveColumn;"),
34
34
  inline: _ref,
35
35
  // This nested block handles just the font styling based on compressed and reverse
36
36
  fontStyles: {
@@ -29,7 +29,7 @@ var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiTh
29
29
  // Types
30
30
  row: /*#__PURE__*/(0, _react.css)(";label:row;"),
31
31
  column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
32
- responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
32
+ responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", columnDisplay, ";};label:responsiveColumn;"),
33
33
  inline: /*#__PURE__*/(0, _react.css)("display:inline;border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.medium, ";background-color:", colorMode === 'DARK' ? (0, _services.tint)(euiTheme.colors.lightestShade, 0.5) : euiTheme.colors.lightestShade, ";", (0, _global_styling.logicalCSS)('margin-vertical', '0'), " ", (0, _global_styling.logicalCSS)('margin-horizontal', euiTheme.size.xs), "&:first-of-type{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";};label:inline;"),
34
34
  // This nested block handles just the font styling based on compressed and reverse
35
35
  fontStyles: {
@@ -22,7 +22,7 @@ var _form = require("../form/form.styles");
22
22
  var _templateObject, _templateObject2;
23
23
 
24
24
  var euiFlyoutSlideInRight = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: 0;\n transform: translateX(100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
25
- var euiFlyoutSlideInLeft = (0, _react.keyframes)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n}\n"])));
25
+ var euiFlyoutSlideInLeft = (0, _react.keyframes)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n opacity: 0;\n transform: translateX(-100%);\n }\n 75% {\n opacity: 1;\n transform: translateX(0%);\n }\n"])));
26
26
 
27
27
  var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeContext) {
28
28
  var euiTheme = euiThemeContext.euiTheme;
@@ -33,8 +33,8 @@ var euiFlyoutCloseButtonStyles = function euiFlyoutCloseButtonStyles(euiThemeCon
33
33
  outsideSide: {
34
34
  // `transforms` pull in close buttons a little
35
35
  // `!important` is necessary here to override the hover/focus transitions of buttons
36
- right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(-100% - ", euiTheme.size.l, "))!important;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(-100% - ", euiTheme.size.xs, "))!important;};label:right;"),
37
- left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{transform:translateX(calc(100% + ", euiTheme.size.l, "))!important;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{transform:translateX(calc(100% + ", euiTheme.size.xs, "))!important;};label:left;")
36
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " ", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{transform:translateX(calc(-100% - ", euiTheme.size.xs, "))!important;}", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{transform:translateX(calc(-100% - ", euiTheme.size.l, "))!important;};label:right;"),
37
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('right', 0), " ", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{transform:translateX(calc(100% + ", euiTheme.size.xs, "))!important;}", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{transform:translateX(calc(100% + ", euiTheme.size.l, "))!important;};label:left;")
38
38
  }
39
39
  };
40
40
  };
@@ -44,7 +44,7 @@ exports.euiFlyoutCloseButtonStyles = euiFlyoutCloseButtonStyles;
44
44
  var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
45
45
  var euiTheme = euiThemeContext.euiTheme;
46
46
  return {
47
- euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('height', '100%'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _global_styling.logicalCSS)('max-width', '90vw !important'), ";};label:euiFlyout;"),
47
+ euiFlyout: /*#__PURE__*/(0, _react.css)("position:fixed;", (0, _global_styling.logicalCSS)('top', 0), " ", (0, _global_styling.logicalCSS)('bottom', 0), " ", (0, _global_styling.logicalCSS)('height', '100%'), " z-index:", euiTheme.levels.flyout, ";background:", euiTheme.colors.emptyShade, ";display:flex;flex-direction:column;align-items:stretch;&:focus{outline:none;}", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('max-width', '90vw !important'), ";};label:euiFlyout;"),
48
48
  // Flyout sizes
49
49
  s: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 's'), ";;label:s;"),
50
50
  m: /*#__PURE__*/(0, _react.css)(composeFlyoutSizing(euiThemeContext, 'm'), ";;label:m;"),
@@ -53,7 +53,7 @@ var euiFlyoutStyles = function euiFlyoutStyles(euiThemeContext) {
53
53
  // Side
54
54
  right: /*#__PURE__*/(0, _react.css)("clip-path:polygon(-50% 0, 100% 0, 100% 100%, -50% 100%);", (0, _global_styling.logicalCSS)('right', 0), " ", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInRight, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:right;"),
55
55
  // Left-side flyouts should only be used for navigation
56
- left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, ";};label:left;"),
56
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('left', 0), " clip-path:polygon(0 0, 150% 0, 150% 100%, 0 100%);", _global_styling.euiCanAnimate, "{animation:", euiFlyoutSlideInLeft, " ", euiTheme.animation.normal, " ", euiTheme.animation.resistance, ";};label:left;"),
57
57
  // Type
58
58
  overlay: /*#__PURE__*/(0, _react.css)((0, _mixins.euiShadowXLarge)(euiThemeContext), ";;label:overlay;"),
59
59
  push: /*#__PURE__*/(0, _react.css)("clip-path:none;animation-duration:0s!important;z-index:", Number(euiTheme.levels.flyout) - 1, ";;label:push;"),
@@ -98,7 +98,7 @@ var composeFlyoutSizing = function composeFlyoutSizing(euiThemeContext, size) {
98
98
  max: "".concat(euiTheme.breakpoint.l, "px")
99
99
  }
100
100
  };
101
- return "\n ".concat((0, _global_styling.logicalCSS)('max-width', flyoutSizes[size].max), "\n\n ").concat((0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', flyoutSizes[size].min), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].width), "\n }\n ").concat((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', 0), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].min), "\n }\n ");
101
+ return "\n ".concat((0, _global_styling.logicalCSS)('max-width', flyoutSizes[size].max), "\n\n ").concat((0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', 0), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].min), "\n }\n ").concat((0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), " {\n ").concat((0, _global_styling.logicalCSS)('min-width', flyoutSizes[size].min), "\n ").concat((0, _global_styling.logicalCSS)('width', flyoutSizes[size].width), "\n }\n ");
102
102
  };
103
103
 
104
104
  var composeFlyoutPadding = function composeFlyoutPadding(euiThemeContext, paddingSize) {
@@ -34,8 +34,8 @@ var euiImageWrapperStyles = function euiImageWrapperStyles(euiThemeContext) {
34
34
  // Floats
35
35
  // 1: Logical properties/values in `float` is currently not yet supported by all browsers w/o flags
36
36
  // @see https://caniuse.com/mdn-css_properties_float_flow_relative_values for when we can remove left/right fallbacks
37
- left: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{float:left;float:", _global_styling.logicalSide.left, ";", (0, _global_styling.logicalCSS)('margin-left', '0'), ";", (0, _global_styling.logicalCSS)('margin-top', '0'), ";};label:left;"),
38
- right: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{float:right;float:", _global_styling.logicalSide.right, ";", (0, _global_styling.logicalCSS)('margin-right', '0'), ";", (0, _global_styling.logicalCSS)('margin-top', '0'), ";};label:right;"),
37
+ left: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{float:left;float:", _global_styling.logicalSide.left, ";", (0, _global_styling.logicalCSS)('margin-left', '0'), ";", (0, _global_styling.logicalCSS)('margin-top', '0'), ";};label:left;"),
38
+ right: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{float:right;float:", _global_styling.logicalSide.right, ";", (0, _global_styling.logicalCSS)('margin-right', '0'), ";", (0, _global_styling.logicalCSS)('margin-top', '0'), ";};label:right;"),
39
39
  // Sizes
40
40
  fullWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('width', '100%'), ";;label:fullWidth;")
41
41
  };
@@ -37,7 +37,7 @@ var euiPageStyles = function euiPageStyles(euiThemeContext) {
37
37
  grow: _ref2,
38
38
  // Direction
39
39
  column: _ref,
40
- row: /*#__PURE__*/(0, _react.css)("flex-direction:column;", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{flex-direction:row;};label:row;"),
40
+ row: /*#__PURE__*/(0, _react.css)("flex-direction:column;", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{flex-direction:row;};label:row;"),
41
41
  // Max widths
42
42
  restrictWidth: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalCSS)('margin-horizontal', 'auto'), ";;label:restrictWidth;")
43
43
  };
@@ -17,17 +17,17 @@ var _templateObject;
17
17
 
18
18
  var euiGlobalToastListStyles = function euiGlobalToastListStyles(euiThemeContext) {
19
19
  var euiTheme = euiThemeContext.euiTheme;
20
- var euiToastWidth = euiTheme.base * 20;
20
+ var euiToastWidth = euiTheme.base * 25;
21
21
  return {
22
22
  /**
23
23
  * 1. Allow list to expand as items are added, but cap it at the screen height.
24
24
  * 2. Allow some padding for shadow
25
25
  */
26
26
  // Base
27
- euiGlobalToastList: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('bottom', 0), ";", (0, _global_styling.logicalCSS)('width', "".concat(euiToastWidth + euiTheme.base * 5, "px")), ";", (0, _global_styling.logicalCSS)('max-height', '100vh'), ";", (0, _global_styling.logicalCSSWithFallback)('overflow-y', 'auto'), ";scrollbar-width:none;&::-webkit-scrollbar{", (0, _global_styling.logicalSizeCSS)(0, 0), ";}&:not(:empty){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.base), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('left', 0), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiGlobalToastList;"),
27
+ euiGlobalToastList: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiScrollBarStyles)(euiThemeContext), " display:flex;flex-direction:column;align-items:stretch;position:fixed;z-index:", euiTheme.levels.toast, ";", (0, _global_styling.logicalCSS)('bottom', 0), ";", (0, _global_styling.logicalCSS)('width', "".concat(euiToastWidth, "px")), ";", (0, _global_styling.logicalCSS)('max-height', '100vh'), ";", (0, _global_styling.logicalCSSWithFallback)('overflow-y', 'auto'), ";scrollbar-width:none;&::-webkit-scrollbar{", (0, _global_styling.logicalSizeCSS)(0, 0), ";}&:not(:empty){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";", (0, _global_styling.logicalCSS)('padding-vertical', euiTheme.size.base), ";}", (0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{&:not(:empty){", (0, _global_styling.logicalCSS)('left', 0), ";", (0, _global_styling.logicalCSS)('width', '100%'), ";}};label:euiGlobalToastList;"),
28
28
  // Variants
29
- right: /*#__PURE__*/(0, _react.css)("&:not(:empty){", (0, _global_styling.logicalCSS)('right', 0), ";", (0, _global_styling.logicalCSS)('padding-left', "".concat(euiTheme.base * 4, "px")), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('padding-left', euiTheme.size.base), ";}};label:right;"),
30
- left: /*#__PURE__*/(0, _react.css)("&:not(:empty){", (0, _global_styling.logicalCSS)('left', 0), ";", (0, _global_styling.logicalCSS)('padding-right', "".concat(euiTheme.base * 4, "px")), ";}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{&:not(:empty){", (0, _global_styling.logicalCSS)('padding-right', euiTheme.size.base), ";}};label:left;")
29
+ right: /*#__PURE__*/(0, _react.css)("&:not(:empty){", (0, _global_styling.logicalCSS)('right', 0), ";", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('padding-left', "".concat(euiTheme.base * 4, "px")), ";}};label:right;"),
30
+ left: /*#__PURE__*/(0, _react.css)("&:not(:empty){", (0, _global_styling.logicalCSS)('left', 0), ";", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('padding-right', "".concat(euiTheme.base * 4, "px")), ";}};label:left;")
31
31
  };
32
32
  };
33
33
 
@@ -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 = "calc(".concat(size.base, " * 0.75 * 1.25)");
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 = '';
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useEuiBreakpoint = exports.euiBreakpoint = void 0;
6
+ exports.useEuiMinBreakpoint = exports.useEuiMaxBreakpoint = exports.useEuiBreakpoint = exports.euiMinBreakpoint = exports.euiMaxBreakpoint = exports.euiBreakpoint = void 0;
7
7
 
8
8
  var _sorting = require("../../services/breakpoint/_sorting");
9
9
 
@@ -18,7 +18,7 @@ var _hooks = require("../../services/theme/hooks");
18
18
  */
19
19
 
20
20
  /**
21
- * Generates a CSS media query rule string based on the input breakpoint ranges.
21
+ * Generates a CSS media query rule string based on the input breakpoint *ranges*.
22
22
  * Examples with default theme breakpoints:
23
23
  *
24
24
  * euiBreakpoint(['s']) becomes `@media only screen and (min-width: 575px) and (max-width: 767px)`
@@ -60,5 +60,62 @@ var useEuiBreakpoint = function useEuiBreakpoint(sizes) {
60
60
  var euiTheme = (0, _hooks.useEuiTheme)();
61
61
  return euiBreakpoint(euiTheme, sizes);
62
62
  };
63
+ /**
64
+ * Min/Max width breakpoint utilities that generate only a single min/max query/bound
65
+ *
66
+ * *Unlike the above euiBreakpoint utility*, these utilities treat breakpoint
67
+ * sizes as a one-dimensional point, rather than a two-dimensional *screen range*.
68
+ * Examples with default theme breakpoints:
69
+ *
70
+ * euiMaxBreakpoint('m') becomes `@media only screen and (max-width: 767px)`
71
+ * euiMinBreakpoint('m') becomes `@media only screen and (min-width: 768px)`
72
+ *
73
+ * This is safer and more intentional to use than euiBreakpoint(['xs', 's']) / euiBreakpoint(['m', 'xl'])
74
+ * in the event that consumers add larger or smaller custom breakpoints (e.g 'xxs' or `xxl`)
75
+ * and if the intention of the media query is actually "m and below/above" vs. "only screens m/l/xl".
76
+ */
77
+
78
+
79
+ exports.useEuiBreakpoint = useEuiBreakpoint;
80
+
81
+ var euiMinBreakpoint = function euiMinBreakpoint(_ref2, size) {
82
+ var euiTheme = _ref2.euiTheme;
83
+ var minBreakpointSize = euiTheme.breakpoint[size];
84
+
85
+ if (minBreakpointSize) {
86
+ return "@media only screen and (min-width: ".concat(minBreakpointSize, "px)");
87
+ } else {
88
+ console.warn("Invalid min breakpoint size: ".concat(size));
89
+ return '@media only screen';
90
+ }
91
+ };
92
+
93
+ exports.euiMinBreakpoint = euiMinBreakpoint;
94
+
95
+ var useEuiMinBreakpoint = function useEuiMinBreakpoint(size) {
96
+ var euiTheme = (0, _hooks.useEuiTheme)();
97
+ return euiMinBreakpoint(euiTheme, size);
98
+ };
99
+
100
+ exports.useEuiMinBreakpoint = useEuiMinBreakpoint;
101
+
102
+ var euiMaxBreakpoint = function euiMaxBreakpoint(_ref3, size) {
103
+ var euiTheme = _ref3.euiTheme;
104
+ var maxBreakpointSize = euiTheme.breakpoint[size];
105
+
106
+ if (maxBreakpointSize) {
107
+ return "@media only screen and (max-width: ".concat(maxBreakpointSize - 1, "px)");
108
+ } else {
109
+ console.warn("Invalid max breakpoint size: ".concat(size));
110
+ return '@media only screen';
111
+ }
112
+ };
113
+
114
+ exports.euiMaxBreakpoint = euiMaxBreakpoint;
115
+
116
+ var useEuiMaxBreakpoint = function useEuiMaxBreakpoint(size) {
117
+ var euiTheme = (0, _hooks.useEuiTheme)();
118
+ return euiMaxBreakpoint(euiTheme, size);
119
+ };
63
120
 
64
- exports.useEuiBreakpoint = useEuiBreakpoint;
121
+ exports.useEuiMaxBreakpoint = useEuiMaxBreakpoint;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "67.1.8",
4
+ "version": "67.1.10",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -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 != null ? _objectSpread(_objectSpread({}, style), {}, {
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(), ";", (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;"),
@@ -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: 0
183
+ minWidth: false
184
184
  }, sharedButtonProps, {
185
185
  fill: fill,
186
186
  textProps: _objectSpread(_objectSpread({}, restTextProps), {}, {
@@ -26,7 +26,7 @@ var euiDescriptionListStyles = function euiDescriptionListStyles(euiThemeContext
26
26
  inline: /*#__PURE__*/(0, _react.css)(";label:inline;"),
27
27
  column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
28
28
  // Responsive columns behave as a row on breakpoints xs-s
29
- responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
29
+ responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", columnDisplay, ";};label:responsiveColumn;"),
30
30
  // Alignment
31
31
  center: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('center'), ";;label:center;"),
32
32
  left: /*#__PURE__*/(0, _react.css)((0, _global_styling.logicalTextAlignCSS)('left'), ";;label:left;")
@@ -47,6 +47,7 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
47
47
  align = _useContext.align,
48
48
  gutterSize = _useContext.gutterSize;
49
49
 
50
+ var showResponsiveColumns = (0, _services.useIsWithinMinBreakpoint)('m');
50
51
  var theme = (0, _services.useEuiTheme)();
51
52
  var styles = (0, _description_list_description.euiDescriptionListDescriptionStyles)(theme);
52
53
  var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
@@ -62,7 +63,10 @@ var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref)
62
63
  conditionalStyles.push(styles.left);
63
64
  }
64
65
 
65
- conditionalStyles.push(styles[gutterSize]);
66
+ if (type === 'column' || showResponsiveColumns) {
67
+ conditionalStyles.push(styles[gutterSize]);
68
+ }
69
+
66
70
  break;
67
71
  }
68
72
 
@@ -30,7 +30,7 @@ var euiDescriptionListDescriptionStyles = function euiDescriptionListDescription
30
30
  // Types
31
31
  row: /*#__PURE__*/(0, _react.css)(";label:row;"),
32
32
  column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
33
- responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
33
+ responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", columnDisplay, ";};label:responsiveColumn;"),
34
34
  inline: _ref,
35
35
  // This nested block handles just the font styling based on compressed and reverse
36
36
  fontStyles: {
@@ -29,7 +29,7 @@ var euiDescriptionListTitleStyles = function euiDescriptionListTitleStyles(euiTh
29
29
  // Types
30
30
  row: /*#__PURE__*/(0, _react.css)(";label:row;"),
31
31
  column: /*#__PURE__*/(0, _react.css)(columnDisplay, ";;label:column;"),
32
- responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiBreakpoint)(euiThemeContext, ['xs', 's']), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiBreakpoint)(euiThemeContext, ['m', 'xl']), "{", columnDisplay, ";};label:responsiveColumn;"),
32
+ responsiveColumn: /*#__PURE__*/(0, _react.css)((0, _global_styling.euiMaxBreakpoint)(euiThemeContext, 'm'), "{", (0, _global_styling.logicalCSS)('width', '100%'), " padding:0;}", (0, _global_styling.euiMinBreakpoint)(euiThemeContext, 'm'), "{", columnDisplay, ";};label:responsiveColumn;"),
33
33
  inline: /*#__PURE__*/(0, _react.css)("display:inline;border-radius:", euiTheme.border.radius.small, ";font-weight:", euiTheme.font.weight.medium, ";background-color:", colorMode === 'DARK' ? (0, _services.tint)(euiTheme.colors.lightestShade, 0.5) : euiTheme.colors.lightestShade, ";", (0, _global_styling.logicalCSS)('margin-vertical', '0'), " ", (0, _global_styling.logicalCSS)('margin-horizontal', euiTheme.size.xs), "&:first-of-type{", (0, _global_styling.logicalCSS)('margin-left', '0'), ";};label:inline;"),
34
34
  // This nested block handles just the font styling based on compressed and reverse
35
35
  fontStyles: {
@@ -117,19 +117,28 @@ EuiFacetButton.propTypes = {
117
117
  /**
118
118
  * ReactNode to render as this component's content
119
119
  */
120
- children: _propTypes.default.node.isRequired,
120
+ children: _propTypes.default.oneOfType([_propTypes.default.node.isRequired, _propTypes.default.node]),
121
121
 
122
122
  /**
123
123
  * Any node, but preferably a `EuiIcon` or `EuiAvatar`
124
124
  */
125
125
  icon: _propTypes.default.node,
126
- isDisabled: _propTypes.default.bool,
126
+ isDisabled: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.bool]),
127
+
128
+ /**
129
+ * Force disables the button and changes the icon to a loading spinner
130
+ */
127
131
 
128
132
  /**
129
133
  * Adds/swaps for loading spinner & disables
130
134
  */
131
135
  isLoading: _propTypes.default.bool,
132
136
 
137
+ /**
138
+ * Applies the boolean state as the `aria-pressed` property to create a toggle button.
139
+ * *Only use when the readable text does not change between states.*
140
+ */
141
+
133
142
  /**
134
143
  * Changes visual of button to indicate it's currently selected
135
144
  */
@@ -139,6 +148,51 @@ EuiFacetButton.propTypes = {
139
148
  * Adds a notification indicator for displaying the quantity provided
140
149
  */
141
150
  quantity: _propTypes.default.number,
151
+ size: _propTypes.default.any,
152
+
153
+ /**
154
+ * Extends the button to 100% width
155
+ */
156
+ fullWidth: _propTypes.default.bool,
157
+
158
+ /**
159
+ * Override the default minimum width
160
+ */
161
+ minWidth: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([false])]),
162
+
163
+ /**
164
+ * Object of props passed to the <span/> wrapping the button's content
165
+ */
166
+ contentProps: _propTypes.default.shape({
167
+ className: _propTypes.default.string,
168
+ "aria-label": _propTypes.default.string,
169
+ "data-test-subj": _propTypes.default.string,
170
+ css: _propTypes.default.any
171
+ }),
172
+ style: _propTypes.default.any,
173
+
174
+ /**
175
+ * Any `type` accepted by EuiIcon
176
+ */
177
+ 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]),
178
+
179
+ /**
180
+ * Can only be one side `left` or `right`
181
+ */
182
+ iconSide: _propTypes.default.oneOfType([_propTypes.default.any.isRequired, _propTypes.default.oneOf([undefined])]),
183
+
184
+ /**
185
+ * Object of props passed to the <span/> wrapping the content's text/children only (not icon)
186
+ */
187
+ textProps: _propTypes.default.shape({
188
+ className: _propTypes.default.string,
189
+ "aria-label": _propTypes.default.string,
190
+ "data-test-subj": _propTypes.default.string,
191
+ css: _propTypes.default.any,
192
+ ref: _propTypes.default.any,
193
+ "data-text": _propTypes.default.string
194
+ }),
195
+ iconSize: _propTypes.default.any,
142
196
  className: _propTypes.default.string,
143
197
  "aria-label": _propTypes.default.string,
144
198
  "data-test-subj": _propTypes.default.string,