@elastic/eui 94.5.2 → 94.6.0

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 (26) hide show
  1. package/dist/eui_theme_dark.css +4 -2
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +4 -2
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/badge/beta_badge/beta_badge.js +1 -2
  6. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  7. package/es/components/combo_box/matching_options.js +3 -1
  8. package/es/components/form/switch/switch.js +2 -3
  9. package/eui.d.ts +8 -4
  10. package/i18ntokens.json +28 -28
  11. package/lib/components/badge/beta_badge/beta_badge.js +1 -2
  12. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  13. package/lib/components/combo_box/matching_options.js +3 -1
  14. package/lib/components/form/switch/switch.js +2 -3
  15. package/optimize/es/components/badge/beta_badge/beta_badge.js +1 -2
  16. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  17. package/optimize/es/components/combo_box/matching_options.js +3 -1
  18. package/optimize/lib/components/badge/beta_badge/beta_badge.js +1 -2
  19. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  20. package/optimize/lib/components/combo_box/matching_options.js +3 -1
  21. package/package.json +3 -2
  22. package/src/components/combo_box/combo_box_options_list/_combo_box_title.scss +3 -2
  23. package/test-env/components/badge/beta_badge/beta_badge.js +1 -2
  24. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +1 -1
  25. package/test-env/components/combo_box/matching_options.js +3 -1
  26. package/test-env/components/form/switch/switch.js +2 -3
@@ -107,8 +107,7 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
107
107
  }, ___EmotionJSX("span", _extends({
108
108
  tabIndex: 0,
109
109
  css: cssStyles,
110
- className: classes,
111
- role: "button"
110
+ className: classes
112
111
  }, rest), icon || label));
113
112
  } else {
114
113
  var spanTitle = title || label;
@@ -104,7 +104,7 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
104
104
  return ___EmotionJSX("div", {
105
105
  key: key !== null && key !== void 0 ? key : label,
106
106
  style: style
107
- }, ___EmotionJSX(EuiComboBoxTitle, null, label));
107
+ }, ___EmotionJSX(EuiComboBoxTitle, null, prepend, label, append));
108
108
  }
109
109
  var checked = undefined;
110
110
  if (singleSelection && selectedOptions.length && selectedOptions[0].label === label && selectedOptions[0].key === key) {
@@ -112,7 +112,9 @@ export var getMatchingOptions = function getMatchingOptions(_ref3) {
112
112
  matchingOptions.push({
113
113
  key: option.key,
114
114
  label: option.label,
115
- isGroupLabelOption: true
115
+ isGroupLabelOption: true,
116
+ append: option.append,
117
+ prepend: option.prepend
116
118
  });
117
119
  // Add matching options for group
118
120
  // use concat over spreading to support large arrays - https://mathiasbynens.be/demo/javascript-argument-count
@@ -100,7 +100,7 @@ EuiSwitch.propTypes = {
100
100
  "data-test-subj": PropTypes.string,
101
101
  css: PropTypes.any,
102
102
  /**
103
- * Whether to render the render the text label
103
+ * Whether to render the text label
104
104
  */
105
105
  showLabel: PropTypes.bool,
106
106
  /**
@@ -111,9 +111,8 @@ EuiSwitch.propTypes = {
111
111
  onChange: PropTypes.func.isRequired,
112
112
  disabled: PropTypes.bool,
113
113
  compressed: PropTypes.bool,
114
- type: PropTypes.oneOf(["submit", "reset", "button"]),
115
114
  /**
116
- * Object of props passed to the label's <span/>
115
+ * Object of props passed to the label's `<span />`
117
116
  */
118
117
  labelProps: PropTypes.shape({
119
118
  className: PropTypes.string,
package/eui.d.ts CHANGED
@@ -7976,9 +7976,9 @@ declare module '@elastic/eui/src/components/form/switch/switch' {
7976
7976
  export type EuiSwitchEvent = React.BaseSyntheticEvent<React.MouseEvent<HTMLButtonElement>, HTMLButtonElement, EventTarget & {
7977
7977
  checked: boolean;
7978
7978
  }>;
7979
- export type EuiSwitchProps = CommonProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'type' | 'disabled'> & {
7979
+ export type EuiSwitchProps = CommonProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'disabled'> & {
7980
7980
  /**
7981
- * Whether to render the render the text label
7981
+ * Whether to render the text label
7982
7982
  */
7983
7983
  showLabel?: boolean;
7984
7984
  /**
@@ -7989,9 +7989,8 @@ declare module '@elastic/eui/src/components/form/switch/switch' {
7989
7989
  onChange: (event: EuiSwitchEvent) => void;
7990
7990
  disabled?: boolean;
7991
7991
  compressed?: boolean;
7992
- type?: 'submit' | 'reset' | 'button';
7993
7992
  /**
7994
- * Object of props passed to the label's <span/>
7993
+ * Object of props passed to the label's `<span />`
7995
7994
  */
7996
7995
  labelProps?: CommonProps & HTMLAttributes<HTMLSpanElement>;
7997
7996
  };
@@ -23978,6 +23977,11 @@ declare module '@elastic/eui/.storybook/loki' {
23978
23977
  * Portal element content selector
23979
23978
  */
23980
23979
  readonly portal: "[data-euiportal=\"true\"]";
23980
+ /**
23981
+ * Body selector
23982
+ * TODO: remove when LOKI_SELECTORS.portal selector works as expected again
23983
+ */
23984
+ readonly body: "body";
23981
23985
  };
23982
23986
  /**
23983
23987
  * decorator for story play functions to ensure loki VRT with included interactions
package/i18ntokens.json CHANGED
@@ -851,14 +851,14 @@
851
851
  "highlighting": "string",
852
852
  "loc": {
853
853
  "start": {
854
- "line": 335,
854
+ "line": 339,
855
855
  "column": 12,
856
- "index": 9517
856
+ "index": 9584
857
857
  },
858
858
  "end": {
859
- "line": 338,
859
+ "line": 342,
860
860
  "column": 14,
861
- "index": 9640
861
+ "index": 9707
862
862
  }
863
863
  },
864
864
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -869,14 +869,14 @@
869
869
  "highlighting": "string",
870
870
  "loc": {
871
871
  "start": {
872
- "line": 348,
872
+ "line": 352,
873
873
  "column": 16,
874
- "index": 10079
874
+ "index": 10146
875
875
  },
876
876
  "end": {
877
- "line": 352,
877
+ "line": 356,
878
878
  "column": 18,
879
- "index": 10310
879
+ "index": 10377
880
880
  }
881
881
  },
882
882
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -887,14 +887,14 @@
887
887
  "highlighting": "string",
888
888
  "loc": {
889
889
  "start": {
890
- "line": 367,
890
+ "line": 371,
891
891
  "column": 16,
892
- "index": 10739
892
+ "index": 10806
893
893
  },
894
894
  "end": {
895
- "line": 373,
895
+ "line": 377,
896
896
  "column": 18,
897
- "index": 11012
897
+ "index": 11079
898
898
  }
899
899
  },
900
900
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -905,14 +905,14 @@
905
905
  "highlighting": "string",
906
906
  "loc": {
907
907
  "start": {
908
- "line": 402,
908
+ "line": 406,
909
909
  "column": 20,
910
- "index": 12003
910
+ "index": 12070
911
911
  },
912
912
  "end": {
913
- "line": 408,
913
+ "line": 412,
914
914
  "column": 22,
915
- "index": 12301
915
+ "index": 12368
916
916
  }
917
917
  },
918
918
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -923,14 +923,14 @@
923
923
  "highlighting": "string",
924
924
  "loc": {
925
925
  "start": {
926
- "line": 419,
926
+ "line": 423,
927
927
  "column": 12,
928
- "index": 12505
928
+ "index": 12572
929
929
  },
930
930
  "end": {
931
- "line": 423,
931
+ "line": 427,
932
932
  "column": 14,
933
- "index": 12726
933
+ "index": 12793
934
934
  }
935
935
  },
936
936
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -941,14 +941,14 @@
941
941
  "highlighting": "string",
942
942
  "loc": {
943
943
  "start": {
944
- "line": 430,
944
+ "line": 434,
945
945
  "column": 10,
946
- "index": 12845
946
+ "index": 12912
947
947
  },
948
948
  "end": {
949
- "line": 433,
949
+ "line": 437,
950
950
  "column": 12,
951
- "index": 12985
951
+ "index": 13052
952
952
  }
953
953
  },
954
954
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -959,14 +959,14 @@
959
959
  "highlighting": "string",
960
960
  "loc": {
961
961
  "start": {
962
- "line": 439,
962
+ "line": 443,
963
963
  "column": 10,
964
- "index": 13098
964
+ "index": 13165
965
965
  },
966
966
  "end": {
967
- "line": 442,
967
+ "line": 446,
968
968
  "column": 12,
969
- "index": 13241
969
+ "index": 13308
970
970
  }
971
971
  },
972
972
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -116,8 +116,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
116
116
  }, (0, _react2.jsx)("span", _extends({
117
117
  tabIndex: 0,
118
118
  css: cssStyles,
119
- className: classes,
120
- role: "button"
119
+ className: classes
121
120
  }, rest), icon || label));
122
121
  } else {
123
122
  var spanTitle = title || label;
@@ -111,7 +111,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
111
111
  return (0, _react2.jsx)("div", {
112
112
  key: key !== null && key !== void 0 ? key : label,
113
113
  style: style
114
- }, (0, _react2.jsx)(_combo_box_title.EuiComboBoxTitle, null, label));
114
+ }, (0, _react2.jsx)(_combo_box_title.EuiComboBoxTitle, null, prepend, label, append));
115
115
  }
116
116
  var checked = undefined;
117
117
  if (singleSelection && selectedOptions.length && selectedOptions[0].label === label && selectedOptions[0].key === key) {
@@ -121,7 +121,9 @@ var getMatchingOptions = function getMatchingOptions(_ref3) {
121
121
  matchingOptions.push({
122
122
  key: option.key,
123
123
  label: option.label,
124
- isGroupLabelOption: true
124
+ isGroupLabelOption: true,
125
+ append: option.append,
126
+ prepend: option.prepend
125
127
  });
126
128
  // Add matching options for group
127
129
  // use concat over spreading to support large arrays - https://mathiasbynens.be/demo/javascript-argument-count
@@ -109,7 +109,7 @@ EuiSwitch.propTypes = {
109
109
  "data-test-subj": _propTypes.default.string,
110
110
  css: _propTypes.default.any,
111
111
  /**
112
- * Whether to render the render the text label
112
+ * Whether to render the text label
113
113
  */
114
114
  showLabel: _propTypes.default.bool,
115
115
  /**
@@ -120,9 +120,8 @@ EuiSwitch.propTypes = {
120
120
  onChange: _propTypes.default.func.isRequired,
121
121
  disabled: _propTypes.default.bool,
122
122
  compressed: _propTypes.default.bool,
123
- type: _propTypes.default.oneOf(["submit", "reset", "button"]),
124
123
  /**
125
- * Object of props passed to the label's <span/>
124
+ * Object of props passed to the label's `<span />`
126
125
  */
127
126
  labelProps: _propTypes.default.shape({
128
127
  className: _propTypes.default.string,
@@ -105,8 +105,7 @@ export var EuiBetaBadge = function EuiBetaBadge(_ref) {
105
105
  }, ___EmotionJSX("span", _extends({
106
106
  tabIndex: 0,
107
107
  css: cssStyles,
108
- className: classes,
109
- role: "button"
108
+ className: classes
110
109
  }, rest), icon || label));
111
110
  } else {
112
111
  var spanTitle = title || label;
@@ -97,7 +97,7 @@ export var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
97
97
  return ___EmotionJSX("div", {
98
98
  key: key !== null && key !== void 0 ? key : label,
99
99
  style: style
100
- }, ___EmotionJSX(EuiComboBoxTitle, null, label));
100
+ }, ___EmotionJSX(EuiComboBoxTitle, null, prepend, label, append));
101
101
  }
102
102
  var checked = undefined;
103
103
  if (singleSelection && selectedOptions.length && selectedOptions[0].label === label && selectedOptions[0].key === key) {
@@ -107,7 +107,9 @@ export var getMatchingOptions = function getMatchingOptions(_ref3) {
107
107
  matchingOptions.push({
108
108
  key: option.key,
109
109
  label: option.label,
110
- isGroupLabelOption: true
110
+ isGroupLabelOption: true,
111
+ append: option.append,
112
+ prepend: option.prepend
111
113
  });
112
114
  // Add matching options for group
113
115
  // use concat over spreading to support large arrays - https://mathiasbynens.be/demo/javascript-argument-count
@@ -114,8 +114,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
114
114
  }, (0, _react2.jsx)("span", (0, _extends2.default)({
115
115
  tabIndex: 0,
116
116
  css: cssStyles,
117
- className: classes,
118
- role: "button"
117
+ className: classes
119
118
  }, rest), icon || label));
120
119
  } else {
121
120
  var spanTitle = title || label;
@@ -105,7 +105,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
105
105
  return (0, _react2.jsx)("div", {
106
106
  key: key !== null && key !== void 0 ? key : label,
107
107
  style: style
108
- }, (0, _react2.jsx)(_combo_box_title.EuiComboBoxTitle, null, label));
108
+ }, (0, _react2.jsx)(_combo_box_title.EuiComboBoxTitle, null, prepend, label, append));
109
109
  }
110
110
  var checked = undefined;
111
111
  if (singleSelection && selectedOptions.length && selectedOptions[0].label === label && selectedOptions[0].key === key) {
@@ -117,7 +117,9 @@ var getMatchingOptions = function getMatchingOptions(_ref3) {
117
117
  matchingOptions.push({
118
118
  key: option.key,
119
119
  label: option.label,
120
- isGroupLabelOption: true
120
+ isGroupLabelOption: true,
121
+ append: option.append,
122
+ prepend: option.prepend
121
123
  });
122
124
  // Add matching options for group
123
125
  // use concat over spreading to support large arrays - https://mathiasbynens.be/demo/javascript-argument-count
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "94.5.2",
4
+ "version": "94.6.0",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
8
8
  "types": "eui.d.ts",
9
- "docker_image": "20.12.1",
9
+ "docker_image": "20.13.1",
10
10
  "engines": {
11
11
  "node": "16.x || 18.x || >=20.x"
12
12
  },
@@ -118,6 +118,7 @@
118
118
  "@storybook/addon-links": "^8.0.5",
119
119
  "@storybook/addon-webpack5-compiler-babel": "^3.0.3",
120
120
  "@storybook/blocks": "^8.0.5",
121
+ "@storybook/manager-api": "^8.1.2",
121
122
  "@storybook/react": "^8.0.5",
122
123
  "@storybook/react-webpack5": "^8.0.5",
123
124
  "@storybook/test": "^8.0.5",
@@ -3,9 +3,10 @@
3
3
  * works.
4
4
  */
5
5
  .euiComboBoxTitle {
6
- font-size: $euiFontSizeXS;
7
- padding: ($euiSizeXS + $euiSizeS - 1px) $euiSizeS $euiSizeXS; /* 1 */
6
+ display: flex;
8
7
  width: 100%;
8
+ padding: ($euiSizeXS + $euiSizeS - 1px) $euiSizeS $euiSizeXS; /* 1 */
9
+ font-size: $euiFontSizeXS;
9
10
  font-weight: $euiFontWeightBold;
10
11
  color: $euiColorFullShade;
11
12
  }
@@ -115,8 +115,7 @@ var EuiBetaBadge = function EuiBetaBadge(_ref) {
115
115
  }, (0, _react2.jsx)("span", (0, _extends2.default)({
116
116
  tabIndex: 0,
117
117
  css: cssStyles,
118
- className: classes,
119
- role: "button"
118
+ className: classes
120
119
  }, rest), icon || label));
121
120
  } else {
122
121
  var spanTitle = title || label;
@@ -106,7 +106,7 @@ var EuiComboBoxOptionsList = /*#__PURE__*/function (_Component) {
106
106
  return (0, _react2.jsx)("div", {
107
107
  key: key !== null && key !== void 0 ? key : label,
108
108
  style: style
109
- }, (0, _react2.jsx)(_combo_box_title.EuiComboBoxTitle, null, label));
109
+ }, (0, _react2.jsx)(_combo_box_title.EuiComboBoxTitle, null, prepend, label, append));
110
110
  }
111
111
  var checked = undefined;
112
112
  if (singleSelection && selectedOptions.length && selectedOptions[0].label === label && selectedOptions[0].key === key) {
@@ -117,7 +117,9 @@ var getMatchingOptions = function getMatchingOptions(_ref3) {
117
117
  matchingOptions.push({
118
118
  key: option.key,
119
119
  label: option.label,
120
- isGroupLabelOption: true
120
+ isGroupLabelOption: true,
121
+ append: option.append,
122
+ prepend: option.prepend
121
123
  });
122
124
  // Add matching options for group
123
125
  // use concat over spreading to support large arrays - https://mathiasbynens.be/demo/javascript-argument-count
@@ -108,7 +108,7 @@ EuiSwitch.propTypes = {
108
108
  "data-test-subj": _propTypes.default.string,
109
109
  css: _propTypes.default.any,
110
110
  /**
111
- * Whether to render the render the text label
111
+ * Whether to render the text label
112
112
  */
113
113
  showLabel: _propTypes.default.bool,
114
114
  /**
@@ -119,9 +119,8 @@ EuiSwitch.propTypes = {
119
119
  onChange: _propTypes.default.func.isRequired,
120
120
  disabled: _propTypes.default.bool,
121
121
  compressed: _propTypes.default.bool,
122
- type: _propTypes.default.oneOf(["submit", "reset", "button"]),
123
122
  /**
124
- * Object of props passed to the label's <span/>
123
+ * Object of props passed to the label's `<span />`
125
124
  */
126
125
  labelProps: _propTypes.default.shape({
127
126
  className: _propTypes.default.string,