@elastic/eui 62.2.1 → 62.2.4

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.
@@ -94,8 +94,7 @@ export var CollapsedItemActions = /*#__PURE__*/function (_Component) {
94
94
  _defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
95
95
  if (!_this.popoverDiv) {
96
96
  _this.popoverDiv = popoverDiv;
97
-
98
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
97
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
99
98
  }
100
99
  });
101
100
 
@@ -30,7 +30,8 @@ import PropTypes from "prop-types";
30
30
  import classNames from 'classnames';
31
31
  import { useEuiTheme } from '../../services';
32
32
  import { euiDescriptionListDescriptionStyles } from './description_list_description.styles';
33
- import { EuiDescriptionListContext } from './description_list_context';
33
+ import { EuiDescriptionListContext } from './description_list_context'; // Export required for correct inference by HOCs
34
+
34
35
  import { jsx as ___EmotionJSX } from "@emotion/react";
35
36
  export var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref) {
36
37
  var children = _ref.children,
@@ -30,7 +30,8 @@ import PropTypes from "prop-types";
30
30
  import classNames from 'classnames';
31
31
  import { useEuiTheme } from '../../services';
32
32
  import { euiDescriptionListTitleStyles } from './description_list_title.styles';
33
- import { EuiDescriptionListContext } from './description_list_context';
33
+ import { EuiDescriptionListContext } from './description_list_context'; // Export required for correct inference by HOCs
34
+
34
35
  import { jsx as ___EmotionJSX } from "@emotion/react";
35
36
  export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
36
37
  var children = _ref.children,
@@ -45,7 +46,7 @@ export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
45
46
 
46
47
  var theme = useEuiTheme();
47
48
  var styles = euiDescriptionListTitleStyles(theme);
48
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
49
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
49
50
 
50
51
  switch (type) {
51
52
  case 'inline':
package/eui.d.ts CHANGED
@@ -13005,10 +13005,9 @@ declare module '@elastic/eui/src/components/description_list/description_list_co
13005
13005
  declare module '@elastic/eui/src/components/description_list/description_list_title' {
13006
13006
  import { HTMLAttributes, FunctionComponent } from 'react';
13007
13007
  import { CommonProps } from '@elastic/eui/src/components/common';
13008
- interface EuiDescriptionListTitleProps extends CommonProps, HTMLAttributes<HTMLElement> {
13008
+ export interface EuiDescriptionListTitleProps extends CommonProps, HTMLAttributes<HTMLElement> {
13009
13009
  }
13010
13010
  export const EuiDescriptionListTitle: FunctionComponent<EuiDescriptionListTitleProps>;
13011
- export {};
13012
13011
 
13013
13012
  }
13014
13013
  declare module '@elastic/eui/src/components/description_list/description_list_description.styles' {
@@ -13035,10 +13034,9 @@ declare module '@elastic/eui/src/components/description_list/description_list_de
13035
13034
  declare module '@elastic/eui/src/components/description_list/description_list_description' {
13036
13035
  import { HTMLAttributes, FunctionComponent } from 'react';
13037
13036
  import { CommonProps } from '@elastic/eui/src/components/common';
13038
- interface EuiDescriptionListDescriptionProps extends CommonProps, HTMLAttributes<HTMLElement> {
13037
+ export interface EuiDescriptionListDescriptionProps extends CommonProps, HTMLAttributes<HTMLElement> {
13039
13038
  }
13040
13039
  export const EuiDescriptionListDescription: FunctionComponent<EuiDescriptionListDescriptionProps>;
13041
- export {};
13042
13040
 
13043
13041
  }
13044
13042
  declare module '@elastic/eui/src/components/description_list/description_list.styles' {
@@ -18117,7 +18115,7 @@ declare module '@elastic/eui/src/components/basic_table/collapsed_item_actions'
18117
18115
  togglePopover: () => void;
18118
18116
  closePopover: () => void;
18119
18117
  onPopoverBlur: () => void;
18120
- registerPopoverDiv: (popoverDiv: HTMLDivElement) => void;
18118
+ registerPopoverDiv: (popoverDiv: HTMLDivElement | null) => void;
18121
18119
  componentWillUnmount(): void;
18122
18120
  onClickItem: (onClickAction: (() => void) | undefined) => void;
18123
18121
  render(): JSX.Element;
@@ -19068,56 +19066,6 @@ declare module '@elastic/eui' {
19068
19066
  export * from '@elastic/eui/src/themes';
19069
19067
  export * from '@elastic/eui/src/global_styling';
19070
19068
 
19071
- }
19072
- declare module '@elastic/eui/src/test/internal/render_with_styles' {
19073
- import { ReactElement } from 'react';
19074
- /**
19075
- * Use this function to add the `@emotion` Jest serializer to a single test.
19076
- * The resulting snapshot will include the styles of elements in the component that use `@emotion` for styling.
19077
- *
19078
- * This function must be run outside of a `test` block:
19079
-
19080
- ```
19081
- describe('EuiMark', () => {
19082
- renderWithStyles(<EuiMark>Marked</EuiMark>);
19083
-
19084
- test('is rendered', () => {});
19085
- });
19086
- ```
19087
- */
19088
- export const renderWithStyles: (component: ReactElement) => never;
19089
-
19090
- }
19091
- declare module '@elastic/eui/src/test/internal/render_custom_styles' {
19092
- import { ReactElement } from 'react';
19093
- /**
19094
- * Use this test helper to quickly check that the component supports custom
19095
- * `className`, `css`, and `style` properties.
19096
- *
19097
- * Example usage:
19098
- *
19099
- * shouldRenderCustomStyles(<EuiMark {...requiredProps} />Marked</EuiMark>);
19100
- */
19101
- export const shouldRenderCustomStyles: (component: ReactElement) => void;
19102
-
19103
- }
19104
- declare module '@elastic/eui/src/test/internal/test_custom_hook' {
19105
-
19106
- export const HookWrapper: (props: {
19107
- hook?: Function;
19108
- }) => JSX.Element;
19109
- export const testCustomHook: <T>(hook?: Function | undefined, args?: unknown) => {
19110
- return: T;
19111
- getUpdatedState: () => T;
19112
- updateHookArgs: (args: unknown) => void;
19113
- };
19114
-
19115
- }
19116
- declare module '@elastic/eui/src/test/internal' {
19117
- export * from '@elastic/eui/src/test/internal/render_with_styles';
19118
- export * from '@elastic/eui/src/test/internal/render_custom_styles';
19119
- export * from '@elastic/eui/src/test/internal/test_custom_hook';
19120
-
19121
19069
  }
19122
19070
  declare module '@elastic/eui/src/components/icon/assets/videoPlayer' {
19123
19071
  import * as React from 'react';
@@ -23662,96 +23610,6 @@ declare module 'mdast-util-to-hast/lib/all' {
23662
23610
  const all: (h: H, node: Node) => Node[];
23663
23611
  export = all;
23664
23612
  }
23665
- declare module '@elastic/eui/src/test/rtl/component_helpers' {
23666
- import '@testing-library/jest-dom';
23667
- /**
23668
- * Ensure the EuiPopover being tested is open/closed before continuing
23669
- * Note: Because EuiPopover is portalled, we want to query `document`
23670
- * instead of the `container` returned by RTL's render()
23671
- */
23672
- export const waitForEuiPopoverOpen: () => Promise<void>;
23673
- export const waitForEuiPopoverClose: () => Promise<void>;
23674
- /**
23675
- * Ensure the EuiToolTip being tested is open and visible before continuing
23676
- */
23677
- export const waitForEuiToolTipVisible: () => Promise<void>;
23678
- export const waitForEuiToolTipHidden: () => Promise<void>;
23679
-
23680
- }
23681
- declare module '@elastic/eui/src/test/rtl/data_test_subj_queries' {
23682
- import { queryHelpers, Matcher, MatcherOptions } from '@testing-library/react'; const queryAllByTestSubject: (container: HTMLElement, id: Matcher, options?: MatcherOptions | undefined) => HTMLElement[]; const queryByTestSubject: queryHelpers.QueryBy<[Matcher]>, getAllByTestSubject: queryHelpers.GetAllBy<[Matcher]>, getByTestSubject: queryHelpers.GetBy<[Matcher]>, findAllByTestSubject: queryHelpers.FindAllBy<[Matcher]>, findByTestSubject: queryHelpers.FindBy<[Matcher]>;
23683
- export { queryByTestSubject, queryAllByTestSubject, getByTestSubject, getAllByTestSubject, findAllByTestSubject, findByTestSubject, };
23684
-
23685
- }
23686
- declare module '@elastic/eui/src/test/rtl/custom_render' {
23687
- import { ReactElement } from 'react';
23688
- import { queries, RenderOptions, Screen } from '@testing-library/react';
23689
- import * as dataTestSubjQueries from '@elastic/eui/src/test/rtl/data_test_subj_queries'; const customRender: (ui: ReactElement, { queries: renderQueries, ...options }?: RenderOptions) => import("@testing-library/react").RenderResult<{
23690
- getByLabelText: typeof queries.getByLabelText;
23691
- getAllByLabelText: typeof queries.getAllByLabelText;
23692
- queryByLabelText: typeof queries.queryByLabelText;
23693
- queryAllByLabelText: typeof queries.queryAllByLabelText;
23694
- findByLabelText: typeof queries.findByLabelText;
23695
- findAllByLabelText: typeof queries.findAllByLabelText;
23696
- getByPlaceholderText: typeof queries.getByPlaceholderText;
23697
- getAllByPlaceholderText: typeof queries.getAllByPlaceholderText;
23698
- queryByPlaceholderText: typeof queries.queryByPlaceholderText;
23699
- queryAllByPlaceholderText: typeof queries.queryAllByPlaceholderText;
23700
- findByPlaceholderText: typeof queries.findByPlaceholderText;
23701
- findAllByPlaceholderText: typeof queries.findAllByPlaceholderText;
23702
- getByText: typeof queries.getByText;
23703
- getAllByText: typeof queries.getAllByText;
23704
- queryByText: typeof queries.queryByText;
23705
- queryAllByText: typeof queries.queryAllByText;
23706
- findByText: typeof queries.findByText;
23707
- findAllByText: typeof queries.findAllByText;
23708
- getByAltText: typeof queries.getByAltText;
23709
- getAllByAltText: typeof queries.getAllByAltText;
23710
- queryByAltText: typeof queries.queryByAltText;
23711
- queryAllByAltText: typeof queries.queryAllByAltText;
23712
- findByAltText: typeof queries.findByAltText;
23713
- findAllByAltText: typeof queries.findAllByAltText;
23714
- getByTitle: typeof queries.getByTitle;
23715
- getAllByTitle: typeof queries.getAllByTitle;
23716
- queryByTitle: typeof queries.queryByTitle;
23717
- queryAllByTitle: typeof queries.queryAllByTitle;
23718
- findByTitle: typeof queries.findByTitle;
23719
- findAllByTitle: typeof queries.findAllByTitle;
23720
- getByDisplayValue: typeof queries.getByDisplayValue;
23721
- getAllByDisplayValue: typeof queries.getAllByDisplayValue;
23722
- queryByDisplayValue: typeof queries.queryByDisplayValue;
23723
- queryAllByDisplayValue: typeof queries.queryAllByDisplayValue;
23724
- findByDisplayValue: typeof queries.findByDisplayValue;
23725
- findAllByDisplayValue: typeof queries.findAllByDisplayValue;
23726
- getByRole: typeof queries.getByRole;
23727
- getAllByRole: typeof queries.getAllByRole;
23728
- queryByRole: typeof queries.queryByRole;
23729
- queryAllByRole: typeof queries.queryAllByRole;
23730
- findByRole: typeof queries.findByRole;
23731
- findAllByRole: typeof queries.findAllByRole;
23732
- getByTestId: typeof queries.getByTestId;
23733
- getAllByTestId: typeof queries.getAllByTestId;
23734
- queryByTestId: typeof queries.queryByTestId;
23735
- queryAllByTestId: typeof queries.queryAllByTestId;
23736
- findByTestId: typeof queries.findByTestId;
23737
- findAllByTestId: typeof queries.findAllByTestId;
23738
- queryByTestSubject: import("@testing-library/react").QueryBy<[import("@testing-library/react").Matcher]>;
23739
- queryAllByTestSubject: (container: HTMLElement, id: import("@testing-library/react").Matcher, options?: import("@testing-library/react").MatcherOptions | undefined) => HTMLElement[];
23740
- getByTestSubject: import("@testing-library/react").GetBy<[import("@testing-library/react").Matcher]>;
23741
- getAllByTestSubject: import("@testing-library/react").GetAllBy<[import("@testing-library/react").Matcher]>;
23742
- findAllByTestSubject: import("@testing-library/react").FindAllBy<[import("@testing-library/react").Matcher]>;
23743
- findByTestSubject: import("@testing-library/react").FindBy<[import("@testing-library/react").Matcher]>;
23744
- }, HTMLElement, HTMLElement>;
23745
- export { customRender as render }; const customScreen: Screen<typeof queries & typeof dataTestSubjQueries>;
23746
- export { customScreen as screen };
23747
-
23748
- }
23749
- declare module '@elastic/eui/src/test/rtl' {
23750
- export * from '@elastic/eui/src/test/rtl/component_helpers';
23751
- export { queryByTestSubject, queryAllByTestSubject, getByTestSubject, getAllByTestSubject, findAllByTestSubject, findByTestSubject, } from '@elastic/eui/src/test/rtl/data_test_subj_queries';
23752
- export { render, screen } from '@elastic/eui/src/test/rtl/custom_render';
23753
-
23754
- }
23755
23613
  declare module '@elastic/eui/src/components/table/mobile' {
23756
23614
  export { EuiTableHeaderMobile } from '@elastic/eui/src/components/table/mobile/table_header_mobile';
23757
23615
  export type { EuiTableSortMobileProps } from '@elastic/eui/src/components/table/mobile/table_sort_mobile';
package/i18ntokens.json CHANGED
@@ -149,11 +149,11 @@
149
149
  "highlighting": "string",
150
150
  "loc": {
151
151
  "start": {
152
- "line": 169,
152
+ "line": 170,
153
153
  "column": 6
154
154
  },
155
155
  "end": {
156
- "line": 169,
156
+ "line": 170,
157
157
  "column": 80
158
158
  }
159
159
  },
@@ -165,11 +165,11 @@
165
165
  "highlighting": "string",
166
166
  "loc": {
167
167
  "start": {
168
- "line": 186,
168
+ "line": 187,
169
169
  "column": 6
170
170
  },
171
171
  "end": {
172
- "line": 186,
172
+ "line": 187,
173
173
  "column": 80
174
174
  }
175
175
  },
@@ -108,8 +108,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
108
108
  _defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
109
109
  if (!_this.popoverDiv) {
110
110
  _this.popoverDiv = popoverDiv;
111
-
112
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
111
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
113
112
  }
114
113
  });
115
114
 
@@ -60,7 +60,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
60
60
 
61
61
  var theme = (0, _services.useEuiTheme)();
62
62
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
63
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
63
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
64
64
 
65
65
  switch (type) {
66
66
  case 'inline':
@@ -81,8 +81,7 @@ export var CollapsedItemActions = /*#__PURE__*/function (_Component) {
81
81
  _defineProperty(_assertThisInitialized(_this), "registerPopoverDiv", function (popoverDiv) {
82
82
  if (!_this.popoverDiv) {
83
83
  _this.popoverDiv = popoverDiv;
84
-
85
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
84
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
86
85
  }
87
86
  });
88
87
 
@@ -14,7 +14,8 @@ import React, { useContext } from 'react';
14
14
  import classNames from 'classnames';
15
15
  import { useEuiTheme } from '../../services';
16
16
  import { euiDescriptionListDescriptionStyles } from './description_list_description.styles';
17
- import { EuiDescriptionListContext } from './description_list_context';
17
+ import { EuiDescriptionListContext } from './description_list_context'; // Export required for correct inference by HOCs
18
+
18
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
20
  export var EuiDescriptionListDescription = function EuiDescriptionListDescription(_ref) {
20
21
  var children = _ref.children,
@@ -14,7 +14,8 @@ import React, { useContext } from 'react';
14
14
  import classNames from 'classnames';
15
15
  import { useEuiTheme } from '../../services';
16
16
  import { euiDescriptionListTitleStyles } from './description_list_title.styles';
17
- import { EuiDescriptionListContext } from './description_list_context';
17
+ import { EuiDescriptionListContext } from './description_list_context'; // Export required for correct inference by HOCs
18
+
18
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
19
20
  export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
20
21
  var children = _ref.children,
@@ -29,7 +30,7 @@ export var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
29
30
 
30
31
  var theme = useEuiTheme();
31
32
  var styles = euiDescriptionListTitleStyles(theme);
32
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
33
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
33
34
 
34
35
  switch (type) {
35
36
  case 'inline':
@@ -96,8 +96,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
96
96
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "registerPopoverDiv", function (popoverDiv) {
97
97
  if (!_this.popoverDiv) {
98
98
  _this.popoverDiv = popoverDiv;
99
-
100
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
99
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
101
100
  }
102
101
  });
103
102
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClickItem", function (onClickAction) {
@@ -46,7 +46,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
46
46
 
47
47
  var theme = (0, _services.useEuiTheme)();
48
48
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
49
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
49
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
50
50
 
51
51
  switch (type) {
52
52
  case 'inline':
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elastic/eui",
3
3
  "description": "Elastic UI Component Library",
4
- "version": "62.2.1",
4
+ "version": "62.2.4",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "lib",
7
7
  "module": "es",
@@ -98,8 +98,7 @@ var CollapsedItemActions = /*#__PURE__*/function (_Component) {
98
98
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "registerPopoverDiv", function (popoverDiv) {
99
99
  if (!_this.popoverDiv) {
100
100
  _this.popoverDiv = popoverDiv;
101
-
102
- _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
101
+ _this.popoverDiv && _this.popoverDiv.addEventListener('focusout', _this.onPopoverBlur);
103
102
  }
104
103
  });
105
104
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClickItem", function (onClickAction) {
@@ -48,7 +48,7 @@ var EuiDescriptionListTitle = function EuiDescriptionListTitle(_ref) {
48
48
 
49
49
  var theme = (0, _services.useEuiTheme)();
50
50
  var styles = (0, _description_list_title.euiDescriptionListTitleStyles)(theme);
51
- var conditionalStyles = compressed && textStyle === 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
51
+ var conditionalStyles = compressed && textStyle !== 'reverse' ? [styles.fontStyles.compressed] : [styles.fontStyles[textStyle]];
52
52
 
53
53
  switch (type) {
54
54
  case 'inline':