@atlaskit/editor-common 94.3.0 → 94.3.1

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 (28) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/doc-utils/editor-use-only.js +2 -0
  3. package/dist/cjs/element-browser/components/ElementList/ElementList.js +48 -21
  4. package/dist/cjs/element-browser/components/ElementList/EmptyState.js +1 -1
  5. package/dist/cjs/element-browser/components/StatelessElementBrowser.js +52 -47
  6. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
  7. package/dist/cjs/monitoring/error.js +1 -1
  8. package/dist/cjs/ui/Caption/index.js +7 -6
  9. package/dist/cjs/ui/DropList/index.js +1 -1
  10. package/dist/es2019/doc-utils/editor-use-only.js +1 -0
  11. package/dist/es2019/element-browser/components/ElementList/ElementList.js +50 -20
  12. package/dist/es2019/element-browser/components/ElementList/EmptyState.js +2 -2
  13. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +52 -47
  14. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
  15. package/dist/es2019/monitoring/error.js +1 -1
  16. package/dist/es2019/ui/Caption/index.js +7 -6
  17. package/dist/es2019/ui/DropList/index.js +1 -1
  18. package/dist/esm/doc-utils/editor-use-only.js +1 -0
  19. package/dist/esm/element-browser/components/ElementList/ElementList.js +48 -21
  20. package/dist/esm/element-browser/components/ElementList/EmptyState.js +2 -2
  21. package/dist/esm/element-browser/components/StatelessElementBrowser.js +52 -47
  22. package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
  23. package/dist/esm/monitoring/error.js +1 -1
  24. package/dist/esm/ui/Caption/index.js +7 -6
  25. package/dist/esm/ui/DropList/index.js +1 -1
  26. package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
  27. package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
  28. package/package.json +2 -2
@@ -11,6 +11,7 @@ import { FormattedMessage } from 'react-intl-next';
11
11
  import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
12
12
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
13
13
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
14
+ import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
14
15
  import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
15
16
  import useContainerWidth from '../hooks/use-container-width';
16
17
  import useSelectAndFocusOnArrowNavigation from '../hooks/use-select-and-focus-on-arrow-navigation';
@@ -70,7 +71,8 @@ const sidebarHeading = css({
70
71
  display: 'inline-flex',
71
72
  alignItems: 'center',
72
73
  paddingLeft: "var(--ds-space-150, 12px)",
73
- fontWeight: 700
74
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
75
+ font: editorUGCToken('editor.font.heading.h1', 'typography-modernized') // use editor h1 modernized here as the style matches
74
76
  });
75
77
  const mobileMainContent = css({
76
78
  flex: '1 1 auto',
@@ -272,51 +274,54 @@ function MobileBrowser({
272
274
  emptyStateHandler,
273
275
  viewMoreItem
274
276
  }) {
275
- return jsx("div", {
276
- css: mobileElementBrowserContainer,
277
- onKeyDown: onKeyDown,
278
- "data-testid": "mobile__element-browser"
279
- }, jsx("div", {
280
- css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
281
- }, showSearch && jsx(ElementSearch, {
282
- onSearch: onSearch,
283
- onKeyDown: onKeyPress,
284
- mode: mode,
285
- focus: focusOnSearch,
286
- onClick: setFocusOnSearch,
287
- searchTerm: searchTerm,
288
- items: items,
289
- selectedItemIndex: selectedItemIndex
290
- }), showCategories && jsx("nav", {
291
- css: mobileCategoryListWrapper,
292
- tabIndex: -1
293
- }, jsx(CategoryList, {
294
- categories: categories,
295
- onSelectCategory: onSelectCategory,
296
- selectedCategory: selectedCategory,
297
- focusedCategoryIndex: focusedCategoryIndex,
298
- setFocusedCategoryIndex: setFocusedCategoryIndex,
299
- setFocusedItemIndex: setFocusedItemIndex,
300
- setFocusOnSearch: setFocusOnSearch
301
- }))), jsx("div", {
302
- css: mobileMainContent
303
- }, jsx(ElementList, {
304
- items: items,
305
- mode: mode,
306
- onInsertItem: onInsertItem,
307
- selectedItemIndex: selectedItemIndex,
308
- focusedItemIndex: focusedItemIndex,
309
- setFocusedItemIndex: setFocusedItemIndex,
310
- columnCount: columnCount,
311
- setColumnCount: setColumnCount,
312
- createAnalyticsEvent: createAnalyticsEvent,
313
- emptyStateHandler: emptyStateHandler,
314
- selectedCategory: selectedCategory,
315
- searchTerm: searchTerm
316
- })), viewMoreItem && jsx(ViewMore, {
317
- item: viewMoreItem,
318
- focus: focusOnViewMore
319
- }));
277
+ return (
278
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
279
+ jsx("div", {
280
+ css: mobileElementBrowserContainer,
281
+ onKeyDown: onKeyDown,
282
+ "data-testid": "mobile__element-browser"
283
+ }, jsx("div", {
284
+ css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
285
+ }, showSearch && jsx(ElementSearch, {
286
+ onSearch: onSearch,
287
+ onKeyDown: onKeyPress,
288
+ mode: mode,
289
+ focus: focusOnSearch,
290
+ onClick: setFocusOnSearch,
291
+ searchTerm: searchTerm,
292
+ items: items,
293
+ selectedItemIndex: selectedItemIndex
294
+ }), showCategories && jsx("nav", {
295
+ css: mobileCategoryListWrapper,
296
+ tabIndex: -1
297
+ }, jsx(CategoryList, {
298
+ categories: categories,
299
+ onSelectCategory: onSelectCategory,
300
+ selectedCategory: selectedCategory,
301
+ focusedCategoryIndex: focusedCategoryIndex,
302
+ setFocusedCategoryIndex: setFocusedCategoryIndex,
303
+ setFocusedItemIndex: setFocusedItemIndex,
304
+ setFocusOnSearch: setFocusOnSearch
305
+ }))), jsx("div", {
306
+ css: mobileMainContent
307
+ }, jsx(ElementList, {
308
+ items: items,
309
+ mode: mode,
310
+ onInsertItem: onInsertItem,
311
+ selectedItemIndex: selectedItemIndex,
312
+ focusedItemIndex: focusedItemIndex,
313
+ setFocusedItemIndex: setFocusedItemIndex,
314
+ columnCount: columnCount,
315
+ setColumnCount: setColumnCount,
316
+ createAnalyticsEvent: createAnalyticsEvent,
317
+ emptyStateHandler: emptyStateHandler,
318
+ selectedCategory: selectedCategory,
319
+ searchTerm: searchTerm
320
+ })), viewMoreItem && jsx(ViewMore, {
321
+ item: viewMoreItem,
322
+ focus: focusOnViewMore
323
+ }))
324
+ );
320
325
  }
321
326
  function DesktopBrowser({
322
327
  showCategories,
@@ -349,7 +354,7 @@ function DesktopBrowser({
349
354
  "data-testid": "desktop__element-browser"
350
355
  }, showCategories && jsx("div", {
351
356
  css: showCategories ? sideBarShowCategories : sideBar
352
- }, jsx("h2", {
357
+ }, jsx("div", {
353
358
  css: sidebarHeading,
354
359
  "data-testid": "sidebar-heading",
355
360
  id: "sidebar-heading"
@@ -69,7 +69,7 @@ const buttonLabelStyles = css({
69
69
  '&.remove-nested-left-margin': {
70
70
  marginLeft: 0
71
71
  },
72
- fontSize: '16px',
72
+ fontSize: "var(--ds-space-200, 16px)",
73
73
  fontWeight: "var(--ds-font-weight-regular, 400)"
74
74
  });
75
75
  const spacerStyles = css({
@@ -77,6 +77,9 @@ const spacerStyles = css({
77
77
  height: '10px'
78
78
  });
79
79
  const textStyles = css({
80
+ // cannot use font.body or editor custom font.body here as line-height need to be 1 (from sharedLabelStyles)
81
+ // cannot use space token as there is not token for 14px
82
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
80
83
  fontSize: '14px',
81
84
  fontWeight: "var(--ds-font-weight-regular, 400)",
82
85
  padding: `${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"}`
@@ -139,51 +142,56 @@ export const ExtensionLabel = ({
139
142
  const iconClassNames = classnames({
140
143
  'hide-icon': isBodiedMacro && !isNodeHovered
141
144
  });
142
- return jsx("div", {
143
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
144
- css: containerStyles
145
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
146
- ,
147
- className: containerClassNames
148
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
149
- ,
150
- style: customContainerStyles,
151
- onMouseOver: () => {
152
- setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
153
- },
154
- onMouseLeave: () => {
155
- setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
156
- },
157
- "data-testid": "new-lozenge-container"
158
- }, showMacroButtonUpdates ? jsx(Fragment, null, jsx(Tooltip, {
159
- content: jsx(FormattedMessage, _extends({}, i18n.configure, {
160
- values: {
161
- macroName: text
162
- }
163
- })),
164
- position: "top"
165
- }, tooltipProps => jsx("span", _extends({
166
- "data-testid": "new-lozenge-button"
167
- }, tooltipProps, {
168
- css: [sharedLabelStyles, buttonLabelStyles]
169
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
170
- ,
171
- className: `${sharedLabelClassNames} ${newButtonLabelClassNames}`
172
- }), text, jsx("span", {
173
- css: iconStyles,
174
- className: iconClassNames,
175
- "data-testid": "config-icon"
176
- }, jsx(PreferencesIcon, {
177
- label: ""
178
- })))), jsx("div", {
179
- css: spacerStyles
180
- })) : jsx("span", {
181
- "data-testid": "new-lozenge",
182
- css: [sharedLabelStyles, originalLabelStyles]
183
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
184
- ,
185
- className: sharedLabelClassNames
186
- }, jsx("span", {
187
- css: textStyles
188
- }, text)));
145
+ return (
146
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
147
+ jsx("div", {
148
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
149
+ css: containerStyles
150
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
151
+ ,
152
+ className: containerClassNames
153
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
154
+ ,
155
+ style: customContainerStyles
156
+ // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
157
+ ,
158
+ onMouseOver: () => {
159
+ setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(true);
160
+ },
161
+ onMouseLeave: () => {
162
+ setIsNodeHovered === null || setIsNodeHovered === void 0 ? void 0 : setIsNodeHovered(false);
163
+ },
164
+ "data-testid": "new-lozenge-container"
165
+ }, showMacroButtonUpdates ? jsx(Fragment, null, jsx(Tooltip, {
166
+ content: jsx(FormattedMessage, _extends({}, i18n.configure, {
167
+ values: {
168
+ macroName: text
169
+ }
170
+ })),
171
+ position: "top"
172
+ }, tooltipProps => jsx("span", _extends({
173
+ "data-testid": "new-lozenge-button"
174
+ }, tooltipProps, {
175
+ css: [sharedLabelStyles, buttonLabelStyles]
176
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
177
+ ,
178
+ className: `${sharedLabelClassNames} ${newButtonLabelClassNames}`
179
+ }), text, jsx("span", {
180
+ css: iconStyles,
181
+ className: iconClassNames,
182
+ "data-testid": "config-icon"
183
+ }, jsx(PreferencesIcon, {
184
+ label: ""
185
+ })))), jsx("div", {
186
+ css: spacerStyles
187
+ })) : jsx("span", {
188
+ "data-testid": "new-lozenge",
189
+ css: [sharedLabelStyles, originalLabelStyles]
190
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
191
+ ,
192
+ className: sharedLabelClassNames
193
+ }, jsx("span", {
194
+ css: textStyles
195
+ }, text)))
196
+ );
189
197
  };
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "94.3.0";
4
+ const packageVersion = "94.3.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -8,6 +8,7 @@ import React from 'react';
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
10
  import { injectIntl } from 'react-intl-next';
11
+ import { Box, Text, xcss } from '@atlaskit/primitives';
11
12
  import { messages } from './messages';
12
13
  const captionWrapperStyle = css({
13
14
  marginTop: "var(--ds-space-100, 8px)",
@@ -15,10 +16,10 @@ const captionWrapperStyle = css({
15
16
  position: 'relative',
16
17
  color: "var(--ds-text-subtle, #44546F)"
17
18
  });
18
- const placeholderStyle = css({
19
- color: "var(--ds-text-subtlest, #626F86)",
19
+ const placeholderStyle = xcss({
20
+ color: 'color.text.subtlest',
20
21
  position: 'absolute',
21
- top: 0,
22
+ top: 'space.0',
22
23
  width: '100%'
23
24
  });
24
25
  export class CaptionComponent extends React.Component {
@@ -38,9 +39,9 @@ export class CaptionComponent extends React.Component {
38
39
  "data-testid": "media-caption"
39
40
  }, dataAttributes, {
40
41
  css: captionWrapperStyle
41
- }), showPlaceholder ? jsx("p", {
42
- css: placeholderStyle
43
- }, formatMessage(messages.placeholder)) : null, children);
42
+ }), showPlaceholder ? jsx(Box, {
43
+ xcss: placeholderStyle
44
+ }, jsx(Text, null, formatMessage(messages.placeholder))) : null, children);
44
45
  }
45
46
  }
46
47
  export default injectIntl(CaptionComponent);
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "94.3.0";
16
+ const packageVersion = "94.3.1";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @atlaskit/design-system/use-primitives-text */
1
2
  import React from 'react';
2
3
  import SectionMessage from '@atlaskit/section-message';
3
4
  function AlternativePackagesMessage(_ref) {
@@ -17,6 +17,8 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
17
17
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
18
18
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
19
19
  import { ButtonItem } from '@atlaskit/menu';
20
+ import { Stack, Text } from '@atlaskit/primitives';
21
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
20
22
  import Tooltip from '@atlaskit/tooltip';
21
23
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
22
24
  import { IconFallback } from '../../../quick-insert';
@@ -280,8 +282,7 @@ var itemStyleOverrides = {
280
282
  alignItems: 'flex-start'
281
283
  };
282
284
  var ElementBefore = /*#__PURE__*/memo(function (_ref6) {
283
- var icon = _ref6.icon,
284
- title = _ref6.title;
285
+ var icon = _ref6.icon;
285
286
  return jsx("div", {
286
287
  css: [itemIcon, itemIconStyle]
287
288
  }, icon ? icon() : jsx(IconFallback, null));
@@ -290,25 +291,51 @@ var ItemContent = /*#__PURE__*/memo(function (_ref7) {
290
291
  var title = _ref7.title,
291
292
  description = _ref7.description,
292
293
  keyshortcut = _ref7.keyshortcut;
293
- return (
294
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
295
- jsx("div", {
296
- css: itemBody,
297
- className: "item-body"
298
- }, jsx("div", {
299
- css: itemText
300
- }, jsx("div", {
301
- css: itemTitleWrapper
302
- }, jsx("p", {
303
- css: itemTitle
304
- }, title), jsx("div", {
305
- css: itemAfter
306
- }, keyshortcut && jsx("div", {
307
- css: shortcutStyle
308
- }, keyshortcut))), description && jsx("p", {
309
- css: itemDescription
310
- }, description)))
311
- );
294
+ if (editorExperiment('typography_migration_ugc', true)) {
295
+ return (
296
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
297
+ jsx("div", {
298
+ css: itemBody,
299
+ className: "item-body"
300
+ }, jsx("div", {
301
+ css: itemText
302
+ }, jsx(Stack, {
303
+ space: "space.025"
304
+ }, jsx("div", {
305
+ css: itemTitleWrapper
306
+ }, jsx(Text, {
307
+ maxLines: 1
308
+ }, title), jsx("div", {
309
+ css: itemAfter
310
+ }, keyshortcut && jsx("div", {
311
+ css: shortcutStyle
312
+ }, keyshortcut))), description && jsx(Text, {
313
+ color: "color.text.subtle",
314
+ size: "small",
315
+ maxLines: 2
316
+ }, description))))
317
+ );
318
+ } else {
319
+ return (
320
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
321
+ jsx("div", {
322
+ css: itemBody,
323
+ className: "item-body"
324
+ }, jsx("div", {
325
+ css: itemText
326
+ }, jsx("div", {
327
+ css: itemTitleWrapper
328
+ }, jsx("p", {
329
+ css: itemTitle
330
+ }, title), jsx("div", {
331
+ css: itemAfter
332
+ }, keyshortcut && jsx("div", {
333
+ css: shortcutStyle
334
+ }, keyshortcut))), description && jsx("p", {
335
+ css: itemDescription
336
+ }, description)))
337
+ );
338
+ }
312
339
  });
313
340
  var elementItemsWrapper = css({
314
341
  flex: 1,
@@ -6,7 +6,7 @@
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { FormattedMessage } from 'react-intl-next';
8
8
  import { LinkButton } from '@atlaskit/button/new';
9
- import { Box, xcss } from '@atlaskit/primitives';
9
+ import { Box, Text, xcss } from '@atlaskit/primitives';
10
10
  import NotFoundIllustration from './NotFoundIllustration';
11
11
  export default function EmptyState(_ref) {
12
12
  var onExternalLinkClick = _ref.onExternalLinkClick;
@@ -21,7 +21,7 @@ export default function EmptyState(_ref) {
21
21
  description: "Empty state heading"
22
22
  })), jsx("div", {
23
23
  css: emptyStateSubHeading
24
- }, jsx("p", null, jsx(FormattedMessage, {
24
+ }, jsx(Text, null, jsx(FormattedMessage, {
25
25
  id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
26
26
  defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
27
27
  description: "Empty state sub-heading"
@@ -12,6 +12,7 @@ import { FormattedMessage } from 'react-intl-next';
12
12
  import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
15
+ import editorUGCToken from '../../ugc-tokens/get-editor-ugc-token';
15
16
  import { DEVICE_BREAKPOINT_NUMBERS, ELEMENT_BROWSER_ID, GRID_SIZE, INLINE_SIDEBAR_HEIGHT, SIDEBAR_HEADING_WRAPPER_HEIGHT, SIDEBAR_WIDTH } from '../constants';
16
17
  import useContainerWidth from '../hooks/use-container-width';
17
18
  import useSelectAndFocusOnArrowNavigation from '../hooks/use-select-and-focus-on-arrow-navigation';
@@ -71,7 +72,8 @@ var sidebarHeading = css({
71
72
  display: 'inline-flex',
72
73
  alignItems: 'center',
73
74
  paddingLeft: "var(--ds-space-150, 12px)",
74
- fontWeight: 700
75
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
76
+ font: editorUGCToken('editor.font.heading.h1', 'typography-modernized') // use editor h1 modernized here as the style matches
75
77
  });
76
78
  var mobileMainContent = css({
77
79
  flex: '1 1 auto',
@@ -271,51 +273,54 @@ function MobileBrowser(_ref) {
271
273
  createAnalyticsEvent = _ref.createAnalyticsEvent,
272
274
  emptyStateHandler = _ref.emptyStateHandler,
273
275
  viewMoreItem = _ref.viewMoreItem;
274
- return jsx("div", {
275
- css: mobileElementBrowserContainer,
276
- onKeyDown: onKeyDown,
277
- "data-testid": "mobile__element-browser"
278
- }, jsx("div", {
279
- css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
280
- }, showSearch && jsx(ElementSearch, {
281
- onSearch: onSearch,
282
- onKeyDown: onKeyPress,
283
- mode: mode,
284
- focus: focusOnSearch,
285
- onClick: setFocusOnSearch,
286
- searchTerm: searchTerm,
287
- items: items,
288
- selectedItemIndex: selectedItemIndex
289
- }), showCategories && jsx("nav", {
290
- css: mobileCategoryListWrapper,
291
- tabIndex: -1
292
- }, jsx(CategoryList, {
293
- categories: categories,
294
- onSelectCategory: onSelectCategory,
295
- selectedCategory: selectedCategory,
296
- focusedCategoryIndex: focusedCategoryIndex,
297
- setFocusedCategoryIndex: setFocusedCategoryIndex,
298
- setFocusedItemIndex: setFocusedItemIndex,
299
- setFocusOnSearch: setFocusOnSearch
300
- }))), jsx("div", {
301
- css: mobileMainContent
302
- }, jsx(ElementList, {
303
- items: items,
304
- mode: mode,
305
- onInsertItem: onInsertItem,
306
- selectedItemIndex: selectedItemIndex,
307
- focusedItemIndex: focusedItemIndex,
308
- setFocusedItemIndex: setFocusedItemIndex,
309
- columnCount: columnCount,
310
- setColumnCount: setColumnCount,
311
- createAnalyticsEvent: createAnalyticsEvent,
312
- emptyStateHandler: emptyStateHandler,
313
- selectedCategory: selectedCategory,
314
- searchTerm: searchTerm
315
- })), viewMoreItem && jsx(ViewMore, {
316
- item: viewMoreItem,
317
- focus: focusOnViewMore
318
- }));
276
+ return (
277
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
278
+ jsx("div", {
279
+ css: mobileElementBrowserContainer,
280
+ onKeyDown: onKeyDown,
281
+ "data-testid": "mobile__element-browser"
282
+ }, jsx("div", {
283
+ css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
284
+ }, showSearch && jsx(ElementSearch, {
285
+ onSearch: onSearch,
286
+ onKeyDown: onKeyPress,
287
+ mode: mode,
288
+ focus: focusOnSearch,
289
+ onClick: setFocusOnSearch,
290
+ searchTerm: searchTerm,
291
+ items: items,
292
+ selectedItemIndex: selectedItemIndex
293
+ }), showCategories && jsx("nav", {
294
+ css: mobileCategoryListWrapper,
295
+ tabIndex: -1
296
+ }, jsx(CategoryList, {
297
+ categories: categories,
298
+ onSelectCategory: onSelectCategory,
299
+ selectedCategory: selectedCategory,
300
+ focusedCategoryIndex: focusedCategoryIndex,
301
+ setFocusedCategoryIndex: setFocusedCategoryIndex,
302
+ setFocusedItemIndex: setFocusedItemIndex,
303
+ setFocusOnSearch: setFocusOnSearch
304
+ }))), jsx("div", {
305
+ css: mobileMainContent
306
+ }, jsx(ElementList, {
307
+ items: items,
308
+ mode: mode,
309
+ onInsertItem: onInsertItem,
310
+ selectedItemIndex: selectedItemIndex,
311
+ focusedItemIndex: focusedItemIndex,
312
+ setFocusedItemIndex: setFocusedItemIndex,
313
+ columnCount: columnCount,
314
+ setColumnCount: setColumnCount,
315
+ createAnalyticsEvent: createAnalyticsEvent,
316
+ emptyStateHandler: emptyStateHandler,
317
+ selectedCategory: selectedCategory,
318
+ searchTerm: searchTerm
319
+ })), viewMoreItem && jsx(ViewMore, {
320
+ item: viewMoreItem,
321
+ focus: focusOnViewMore
322
+ }))
323
+ );
319
324
  }
320
325
  function DesktopBrowser(_ref2) {
321
326
  var showCategories = _ref2.showCategories,
@@ -347,7 +352,7 @@ function DesktopBrowser(_ref2) {
347
352
  "data-testid": "desktop__element-browser"
348
353
  }, showCategories && jsx("div", {
349
354
  css: showCategories ? sideBarShowCategories : sideBar
350
- }, jsx("h2", {
355
+ }, jsx("div", {
351
356
  css: sidebarHeading,
352
357
  "data-testid": "sidebar-heading",
353
358
  id: "sidebar-heading"