@atlaskit/editor-common 94.2.1 → 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 (46) hide show
  1. package/CHANGELOG.md +27 -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/messages/insert-block.js +0 -20
  8. package/dist/cjs/messages/layout.js +15 -0
  9. package/dist/cjs/monitoring/error.js +1 -1
  10. package/dist/cjs/ui/Caption/index.js +7 -6
  11. package/dist/cjs/ui/DropList/index.js +1 -1
  12. package/dist/cjs/ui/Pulse/Pulse.js +1 -2
  13. package/dist/cjs/with-plugin-state/index.js +1 -1
  14. package/dist/es2019/doc-utils/editor-use-only.js +1 -0
  15. package/dist/es2019/element-browser/components/ElementList/ElementList.js +50 -20
  16. package/dist/es2019/element-browser/components/ElementList/EmptyState.js +2 -2
  17. package/dist/es2019/element-browser/components/StatelessElementBrowser.js +52 -47
  18. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
  19. package/dist/es2019/messages/insert-block.js +0 -20
  20. package/dist/es2019/messages/layout.js +15 -0
  21. package/dist/es2019/monitoring/error.js +1 -1
  22. package/dist/es2019/ui/Caption/index.js +7 -6
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/es2019/ui/Pulse/Pulse.js +1 -2
  25. package/dist/es2019/with-plugin-state/index.js +1 -1
  26. package/dist/esm/doc-utils/editor-use-only.js +1 -0
  27. package/dist/esm/element-browser/components/ElementList/ElementList.js +48 -21
  28. package/dist/esm/element-browser/components/ElementList/EmptyState.js +2 -2
  29. package/dist/esm/element-browser/components/StatelessElementBrowser.js +52 -47
  30. package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +56 -48
  31. package/dist/esm/messages/insert-block.js +0 -20
  32. package/dist/esm/messages/layout.js +15 -0
  33. package/dist/esm/monitoring/error.js +1 -1
  34. package/dist/esm/ui/Caption/index.js +7 -6
  35. package/dist/esm/ui/DropList/index.js +1 -1
  36. package/dist/esm/ui/Pulse/Pulse.js +1 -2
  37. package/dist/esm/with-plugin-state/index.js +1 -1
  38. package/dist/types/messages/insert-block.d.ts +0 -20
  39. package/dist/types/messages/layout.d.ts +15 -0
  40. package/dist/types/types/floating-toolbar.d.ts +2 -0
  41. package/dist/types/ui-menu/ColorPickerButton/index.d.ts +1 -1
  42. package/dist/types-ts4.5/messages/insert-block.d.ts +0 -20
  43. package/dist/types-ts4.5/messages/layout.d.ts +15 -0
  44. package/dist/types-ts4.5/types/floating-toolbar.d.ts +2 -0
  45. package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +1 -1
  46. package/package.json +5 -5
@@ -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({
12
12
  onExternalLinkClick
@@ -22,7 +22,7 @@ export default function EmptyState({
22
22
  description: "Empty state heading"
23
23
  })), jsx("div", {
24
24
  css: emptyStateSubHeading
25
- }, jsx("p", null, jsx(FormattedMessage, {
25
+ }, jsx(Text, null, jsx(FormattedMessage, {
26
26
  id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
27
27
  defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
28
28
  description: "Empty state sub-heading"
@@ -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
  };
@@ -165,26 +165,6 @@ export const toolbarInsertBlockMessages = defineMessages({
165
165
  defaultMessage: 'Layouts',
166
166
  description: 'Create a multi column section or layout'
167
167
  },
168
- twoColumns: {
169
- id: 'fabric.editor.twoColumns',
170
- defaultMessage: '2 columns layout',
171
- description: 'Create a section or layout with two columns'
172
- },
173
- threeColumns: {
174
- id: 'fabric.editor.threeColumns',
175
- defaultMessage: '3 columns layout',
176
- description: 'Create a section or layout with three columns'
177
- },
178
- fourColumns: {
179
- id: 'fabric.editor.fourColumns',
180
- defaultMessage: '4 columns layout',
181
- description: 'Create a section or layout with four columns'
182
- },
183
- fiveColumns: {
184
- id: 'fabric.editor.fiveColumns',
185
- defaultMessage: '5 columns layout',
186
- description: 'Create a section or layout with five columns'
187
- },
188
168
  columnsDescription: {
189
169
  id: 'fabric.editor.columns.description',
190
170
  defaultMessage: 'Structure your page using sections',
@@ -15,6 +15,16 @@ export const toolbarMessages = defineMessages({
15
15
  defaultMessage: 'Three columns layout',
16
16
  description: 'Layout with three columns of equal width'
17
17
  },
18
+ fourColumns: {
19
+ id: 'fabric.editor.fourColumns',
20
+ defaultMessage: 'Four columns layout',
21
+ description: 'Layout with four columns of equal width'
22
+ },
23
+ fiveColumns: {
24
+ id: 'fabric.editor.fiveColumns',
25
+ defaultMessage: 'Five columns layout',
26
+ description: 'Layout with five columns of equal width'
27
+ },
18
28
  rightSidebar: {
19
29
  id: 'fabric.editor.rightSidebar',
20
30
  defaultMessage: 'Right sidebar layout',
@@ -39,5 +49,10 @@ export const toolbarMessages = defineMessages({
39
49
  id: 'fabric.editor.layout.placeholder',
40
50
  defaultMessage: 'Add content',
41
51
  description: 'Add placeholder text for empty layout'
52
+ },
53
+ columnOption: {
54
+ id: 'fabric.editor.layout.columnOption',
55
+ defaultMessage: '{count, plural, one {-column} other {{count}-columns}}',
56
+ description: 'column option text for layout'
42
57
  }
43
58
  });
@@ -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.2.1";
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.2.1";
16
+ const packageVersion = "94.3.1";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  class DropList extends Component {
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import { SpotlightPulse } from '@atlaskit/onboarding';
3
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
3
  /**
5
4
  * Wraps children with {@link SpotlightPulse} component.
6
5
  *
@@ -14,7 +13,7 @@ export function Pulse({
14
13
  radius = 3,
15
14
  children
16
15
  }) {
17
- if (editorExperiment('platform_editor_ai_onboarding', 'test') && pulse) {
16
+ if (pulse) {
18
17
  return (
19
18
  /*#__PURE__*/
20
19
  // SpotlightPulse shows pulse effect if `pulse` is `undefined`.
@@ -11,7 +11,7 @@ import { analyticsEventKey } from '../utils';
11
11
  const DEFAULT_SAMPLING_RATE = 100;
12
12
  const DEFAULT_SLOW_THRESHOLD = 4;
13
13
 
14
- // That context was exctract from the old WithPluginState from editor-core
14
+ // That context was extract from the old WithPluginState from editor-core
15
15
  // It was using some private types from
16
16
  // - EditorAction: packages/editor/editor-core/src/actions/index.ts
17
17
  // - EditorSharedConfig: packages/editor/editor-core/src/labs/next/internal/context/shared-config.tsx
@@ -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"