@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 94.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#155488](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/155488)
8
+ [`75a3286a32347`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/75a3286a32347) -
9
+ update tokens
10
+
3
11
  ## 94.3.0
4
12
 
5
13
  ### Minor Changes
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.createEditorUseOnlyNotice = createEditorUseOnlyNotice;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _sectionMessage = _interopRequireDefault(require("@atlaskit/section-message"));
10
+ /* eslint-disable @atlaskit/design-system/use-primitives-text */
11
+
10
12
  function AlternativePackagesMessage(_ref) {
11
13
  var alternatePackages = _ref.alternatePackages;
12
14
  if (!alternatePackages) {
@@ -19,6 +19,8 @@ var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-
19
19
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
20
20
  var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
21
21
  var _menu = require("@atlaskit/menu");
22
+ var _primitives = require("@atlaskit/primitives");
23
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
22
24
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
23
25
  var _analytics = require("../../../analytics");
24
26
  var _quickInsert = require("../../../quick-insert");
@@ -290,8 +292,7 @@ var itemStyleOverrides = {
290
292
  alignItems: 'flex-start'
291
293
  };
292
294
  var ElementBefore = /*#__PURE__*/(0, _react.memo)(function (_ref6) {
293
- var icon = _ref6.icon,
294
- title = _ref6.title;
295
+ var icon = _ref6.icon;
295
296
  return (0, _react2.jsx)("div", {
296
297
  css: [itemIcon, itemIconStyle]
297
298
  }, icon ? icon() : (0, _react2.jsx)(_quickInsert.IconFallback, null));
@@ -300,25 +301,51 @@ var ItemContent = /*#__PURE__*/(0, _react.memo)(function (_ref7) {
300
301
  var title = _ref7.title,
301
302
  description = _ref7.description,
302
303
  keyshortcut = _ref7.keyshortcut;
303
- return (
304
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
305
- (0, _react2.jsx)("div", {
306
- css: itemBody,
307
- className: "item-body"
308
- }, (0, _react2.jsx)("div", {
309
- css: itemText
310
- }, (0, _react2.jsx)("div", {
311
- css: itemTitleWrapper
312
- }, (0, _react2.jsx)("p", {
313
- css: itemTitle
314
- }, title), (0, _react2.jsx)("div", {
315
- css: itemAfter
316
- }, keyshortcut && (0, _react2.jsx)("div", {
317
- css: _shortcut.shortcutStyle
318
- }, keyshortcut))), description && (0, _react2.jsx)("p", {
319
- css: itemDescription
320
- }, description)))
321
- );
304
+ if ((0, _experiments.editorExperiment)('typography_migration_ugc', true)) {
305
+ return (
306
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
307
+ (0, _react2.jsx)("div", {
308
+ css: itemBody,
309
+ className: "item-body"
310
+ }, (0, _react2.jsx)("div", {
311
+ css: itemText
312
+ }, (0, _react2.jsx)(_primitives.Stack, {
313
+ space: "space.025"
314
+ }, (0, _react2.jsx)("div", {
315
+ css: itemTitleWrapper
316
+ }, (0, _react2.jsx)(_primitives.Text, {
317
+ maxLines: 1
318
+ }, title), (0, _react2.jsx)("div", {
319
+ css: itemAfter
320
+ }, keyshortcut && (0, _react2.jsx)("div", {
321
+ css: _shortcut.shortcutStyle
322
+ }, keyshortcut))), description && (0, _react2.jsx)(_primitives.Text, {
323
+ color: "color.text.subtle",
324
+ size: "small",
325
+ maxLines: 2
326
+ }, description))))
327
+ );
328
+ } else {
329
+ return (
330
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
331
+ (0, _react2.jsx)("div", {
332
+ css: itemBody,
333
+ className: "item-body"
334
+ }, (0, _react2.jsx)("div", {
335
+ css: itemText
336
+ }, (0, _react2.jsx)("div", {
337
+ css: itemTitleWrapper
338
+ }, (0, _react2.jsx)("p", {
339
+ css: itemTitle
340
+ }, title), (0, _react2.jsx)("div", {
341
+ css: itemAfter
342
+ }, keyshortcut && (0, _react2.jsx)("div", {
343
+ css: _shortcut.shortcutStyle
344
+ }, keyshortcut))), description && (0, _react2.jsx)("p", {
345
+ css: itemDescription
346
+ }, description)))
347
+ );
348
+ }
322
349
  });
323
350
  var elementItemsWrapper = (0, _react2.css)({
324
351
  flex: 1,
@@ -29,7 +29,7 @@ function EmptyState(_ref) {
29
29
  description: "Empty state heading"
30
30
  })), (0, _react.jsx)("div", {
31
31
  css: emptyStateSubHeading
32
- }, (0, _react.jsx)("p", null, (0, _react.jsx)(_reactIntlNext.FormattedMessage, {
32
+ }, (0, _react.jsx)(_primitives.Text, null, (0, _react.jsx)(_reactIntlNext.FormattedMessage, {
33
33
  id: "fabric.editor.elementbrowser.search.empty-state.sub-heading",
34
34
  defaultMessage: "Try searching with a different term or discover new apps for Atlassian products.",
35
35
  description: "Empty state sub-heading"
@@ -14,6 +14,7 @@ var _reactIntlNext = require("react-intl-next");
14
14
  var _withAnalyticsContext = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsContext"));
15
15
  var _withAnalyticsEvents = _interopRequireDefault(require("@atlaskit/analytics-next/withAnalyticsEvents"));
16
16
  var _analytics = require("../../analytics");
17
+ var _getEditorUgcToken = _interopRequireDefault(require("../../ugc-tokens/get-editor-ugc-token"));
17
18
  var _constants = require("../constants");
18
19
  var _useContainerWidth2 = _interopRequireDefault(require("../hooks/use-container-width"));
19
20
  var _useSelectAndFocusOnArrowNavigation = _interopRequireDefault(require("../hooks/use-select-and-focus-on-arrow-navigation"));
@@ -82,7 +83,8 @@ var sidebarHeading = (0, _react2.css)({
82
83
  display: 'inline-flex',
83
84
  alignItems: 'center',
84
85
  paddingLeft: "var(--ds-space-150, 12px)",
85
- fontWeight: 700
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values
87
+ font: (0, _getEditorUgcToken.default)('editor.font.heading.h1', 'typography-modernized') // use editor h1 modernized here as the style matches
86
88
  });
87
89
  var mobileMainContent = (0, _react2.css)({
88
90
  flex: '1 1 auto',
@@ -282,51 +284,54 @@ function MobileBrowser(_ref) {
282
284
  createAnalyticsEvent = _ref.createAnalyticsEvent,
283
285
  emptyStateHandler = _ref.emptyStateHandler,
284
286
  viewMoreItem = _ref.viewMoreItem;
285
- return (0, _react2.jsx)("div", {
286
- css: mobileElementBrowserContainer,
287
- onKeyDown: onKeyDown,
288
- "data-testid": "mobile__element-browser"
289
- }, (0, _react2.jsx)("div", {
290
- css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
291
- }, showSearch && (0, _react2.jsx)(_ElementSearch.default, {
292
- onSearch: onSearch,
293
- onKeyDown: onKeyPress,
294
- mode: mode,
295
- focus: focusOnSearch,
296
- onClick: setFocusOnSearch,
297
- searchTerm: searchTerm,
298
- items: items,
299
- selectedItemIndex: selectedItemIndex
300
- }), showCategories && (0, _react2.jsx)("nav", {
301
- css: mobileCategoryListWrapper,
302
- tabIndex: -1
303
- }, (0, _react2.jsx)(_CategoryList.default, {
304
- categories: categories,
305
- onSelectCategory: onSelectCategory,
306
- selectedCategory: selectedCategory,
307
- focusedCategoryIndex: focusedCategoryIndex,
308
- setFocusedCategoryIndex: setFocusedCategoryIndex,
309
- setFocusedItemIndex: setFocusedItemIndex,
310
- setFocusOnSearch: setFocusOnSearch
311
- }))), (0, _react2.jsx)("div", {
312
- css: mobileMainContent
313
- }, (0, _react2.jsx)(_ElementList.default, {
314
- items: items,
315
- mode: mode,
316
- onInsertItem: onInsertItem,
317
- selectedItemIndex: selectedItemIndex,
318
- focusedItemIndex: focusedItemIndex,
319
- setFocusedItemIndex: setFocusedItemIndex,
320
- columnCount: columnCount,
321
- setColumnCount: setColumnCount,
322
- createAnalyticsEvent: createAnalyticsEvent,
323
- emptyStateHandler: emptyStateHandler,
324
- selectedCategory: selectedCategory,
325
- searchTerm: searchTerm
326
- })), viewMoreItem && (0, _react2.jsx)(_ViewMore.ViewMore, {
327
- item: viewMoreItem,
328
- focus: focusOnViewMore
329
- }));
287
+ return (
288
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
289
+ (0, _react2.jsx)("div", {
290
+ css: mobileElementBrowserContainer,
291
+ onKeyDown: onKeyDown,
292
+ "data-testid": "mobile__element-browser"
293
+ }, (0, _react2.jsx)("div", {
294
+ css: showCategories ? [mobileSideBar, mobileSideBarShowCategories] : mobileSideBar
295
+ }, showSearch && (0, _react2.jsx)(_ElementSearch.default, {
296
+ onSearch: onSearch,
297
+ onKeyDown: onKeyPress,
298
+ mode: mode,
299
+ focus: focusOnSearch,
300
+ onClick: setFocusOnSearch,
301
+ searchTerm: searchTerm,
302
+ items: items,
303
+ selectedItemIndex: selectedItemIndex
304
+ }), showCategories && (0, _react2.jsx)("nav", {
305
+ css: mobileCategoryListWrapper,
306
+ tabIndex: -1
307
+ }, (0, _react2.jsx)(_CategoryList.default, {
308
+ categories: categories,
309
+ onSelectCategory: onSelectCategory,
310
+ selectedCategory: selectedCategory,
311
+ focusedCategoryIndex: focusedCategoryIndex,
312
+ setFocusedCategoryIndex: setFocusedCategoryIndex,
313
+ setFocusedItemIndex: setFocusedItemIndex,
314
+ setFocusOnSearch: setFocusOnSearch
315
+ }))), (0, _react2.jsx)("div", {
316
+ css: mobileMainContent
317
+ }, (0, _react2.jsx)(_ElementList.default, {
318
+ items: items,
319
+ mode: mode,
320
+ onInsertItem: onInsertItem,
321
+ selectedItemIndex: selectedItemIndex,
322
+ focusedItemIndex: focusedItemIndex,
323
+ setFocusedItemIndex: setFocusedItemIndex,
324
+ columnCount: columnCount,
325
+ setColumnCount: setColumnCount,
326
+ createAnalyticsEvent: createAnalyticsEvent,
327
+ emptyStateHandler: emptyStateHandler,
328
+ selectedCategory: selectedCategory,
329
+ searchTerm: searchTerm
330
+ })), viewMoreItem && (0, _react2.jsx)(_ViewMore.ViewMore, {
331
+ item: viewMoreItem,
332
+ focus: focusOnViewMore
333
+ }))
334
+ );
330
335
  }
331
336
  function DesktopBrowser(_ref2) {
332
337
  var showCategories = _ref2.showCategories,
@@ -358,7 +363,7 @@ function DesktopBrowser(_ref2) {
358
363
  "data-testid": "desktop__element-browser"
359
364
  }, showCategories && (0, _react2.jsx)("div", {
360
365
  css: showCategories ? sideBarShowCategories : sideBar
361
- }, (0, _react2.jsx)("h2", {
366
+ }, (0, _react2.jsx)("div", {
362
367
  css: sidebarHeading,
363
368
  "data-testid": "sidebar-heading",
364
369
  id: "sidebar-heading"
@@ -78,7 +78,7 @@ var buttonLabelStyles = (0, _react2.css)({
78
78
  '&.remove-nested-left-margin': {
79
79
  marginLeft: 0
80
80
  },
81
- fontSize: '16px',
81
+ fontSize: "var(--ds-space-200, 16px)",
82
82
  fontWeight: "var(--ds-font-weight-regular, 400)"
83
83
  });
84
84
  var spacerStyles = (0, _react2.css)({
@@ -86,6 +86,9 @@ var spacerStyles = (0, _react2.css)({
86
86
  height: '10px'
87
87
  });
88
88
  var textStyles = (0, _react2.css)({
89
+ // cannot use font.body or editor custom font.body here as line-height need to be 1 (from sharedLabelStyles)
90
+ // cannot use space token as there is not token for 14px
91
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
89
92
  fontSize: '14px',
90
93
  fontWeight: "var(--ds-font-weight-regular, 400)",
91
94
  padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
@@ -147,53 +150,58 @@ var ExtensionLabel = exports.ExtensionLabel = function ExtensionLabel(_ref) {
147
150
  var iconClassNames = (0, _classnames.default)({
148
151
  'hide-icon': isBodiedMacro && !isNodeHovered
149
152
  });
150
- return (0, _react2.jsx)("div", {
151
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
152
- css: containerStyles
153
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
154
- ,
155
- className: containerClassNames
156
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
157
- ,
158
- style: customContainerStyles,
159
- onMouseOver: function onMouseOver() {
160
- setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
161
- },
162
- onMouseLeave: function onMouseLeave() {
163
- setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
164
- },
165
- "data-testid": "new-lozenge-container"
166
- }, showMacroButtonUpdates ? (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_tooltip.default, {
167
- content: (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, i18n.configure, {
168
- values: {
169
- macroName: text
170
- }
171
- })),
172
- position: "top"
173
- }, function (tooltipProps) {
174
- return (0, _react2.jsx)("span", (0, _extends2.default)({
175
- "data-testid": "new-lozenge-button"
176
- }, tooltipProps, {
177
- css: [sharedLabelStyles, buttonLabelStyles]
153
+ return (
154
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
155
+ (0, _react2.jsx)("div", {
156
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
157
+ css: containerStyles
158
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
159
+ ,
160
+ className: containerClassNames
161
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
162
+ ,
163
+ style: customContainerStyles
164
+ // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
165
+ ,
166
+ onMouseOver: function onMouseOver() {
167
+ setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(true);
168
+ },
169
+ onMouseLeave: function onMouseLeave() {
170
+ setIsNodeHovered === null || setIsNodeHovered === void 0 || setIsNodeHovered(false);
171
+ },
172
+ "data-testid": "new-lozenge-container"
173
+ }, showMacroButtonUpdates ? (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_tooltip.default, {
174
+ content: (0, _react2.jsx)(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, i18n.configure, {
175
+ values: {
176
+ macroName: text
177
+ }
178
+ })),
179
+ position: "top"
180
+ }, function (tooltipProps) {
181
+ return (0, _react2.jsx)("span", (0, _extends2.default)({
182
+ "data-testid": "new-lozenge-button"
183
+ }, tooltipProps, {
184
+ css: [sharedLabelStyles, buttonLabelStyles]
185
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
186
+ ,
187
+ className: "".concat(sharedLabelClassNames, " ").concat(newButtonLabelClassNames)
188
+ }), text, (0, _react2.jsx)("span", {
189
+ css: iconStyles,
190
+ className: iconClassNames,
191
+ "data-testid": "config-icon"
192
+ }, (0, _react2.jsx)(_preferences.default, {
193
+ label: ""
194
+ })));
195
+ }), (0, _react2.jsx)("div", {
196
+ css: spacerStyles
197
+ })) : (0, _react2.jsx)("span", {
198
+ "data-testid": "new-lozenge",
199
+ css: [sharedLabelStyles, originalLabelStyles]
178
200
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
179
201
  ,
180
- className: "".concat(sharedLabelClassNames, " ").concat(newButtonLabelClassNames)
181
- }), text, (0, _react2.jsx)("span", {
182
- css: iconStyles,
183
- className: iconClassNames,
184
- "data-testid": "config-icon"
185
- }, (0, _react2.jsx)(_preferences.default, {
186
- label: ""
187
- })));
188
- }), (0, _react2.jsx)("div", {
189
- css: spacerStyles
190
- })) : (0, _react2.jsx)("span", {
191
- "data-testid": "new-lozenge",
192
- css: [sharedLabelStyles, originalLabelStyles]
193
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
194
- ,
195
- className: sharedLabelClassNames
196
- }, (0, _react2.jsx)("span", {
197
- css: textStyles
198
- }, text)));
202
+ className: sharedLabelClassNames
203
+ }, (0, _react2.jsx)("span", {
204
+ css: textStyles
205
+ }, text)))
206
+ );
199
207
  };
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "94.3.0";
20
+ var packageVersion = "94.3.1";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -14,6 +14,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
14
14
  var _react = _interopRequireDefault(require("react"));
15
15
  var _react2 = require("@emotion/react");
16
16
  var _reactIntlNext = require("react-intl-next");
17
+ var _primitives = require("@atlaskit/primitives");
17
18
  var _messages = require("./messages");
18
19
  function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
19
20
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
@@ -26,10 +27,10 @@ var captionWrapperStyle = (0, _react2.css)({
26
27
  position: 'relative',
27
28
  color: "var(--ds-text-subtle, #44546F)"
28
29
  });
29
- var placeholderStyle = (0, _react2.css)({
30
- color: "var(--ds-text-subtlest, #626F86)",
30
+ var placeholderStyle = (0, _primitives.xcss)({
31
+ color: 'color.text.subtlest',
31
32
  position: 'absolute',
32
- top: 0,
33
+ top: 'space.0',
33
34
  width: '100%'
34
35
  });
35
36
  var CaptionComponent = exports.CaptionComponent = /*#__PURE__*/function (_React$Component) {
@@ -54,9 +55,9 @@ var CaptionComponent = exports.CaptionComponent = /*#__PURE__*/function (_React$
54
55
  "data-testid": "media-caption"
55
56
  }, dataAttributes, {
56
57
  css: captionWrapperStyle
57
- }), showPlaceholder ? (0, _react2.jsx)("p", {
58
- css: placeholderStyle
59
- }, formatMessage(_messages.messages.placeholder)) : null, children);
58
+ }), showPlaceholder ? (0, _react2.jsx)(_primitives.Box, {
59
+ xcss: placeholderStyle
60
+ }, (0, _react2.jsx)(_primitives.Text, null, formatMessage(_messages.messages.placeholder))) : null, children);
60
61
  }
61
62
  }]);
62
63
  return CaptionComponent;
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "94.3.0";
27
+ var packageVersion = "94.3.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var DropList = /*#__PURE__*/function (_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({
@@ -14,6 +14,8 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
14
14
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
15
15
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
16
16
  import { ButtonItem } from '@atlaskit/menu';
17
+ import { Stack, Text } from '@atlaskit/primitives';
18
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
17
19
  import Tooltip from '@atlaskit/tooltip';
18
20
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../analytics';
19
21
  import { IconFallback } from '../../../quick-insert';
@@ -276,8 +278,7 @@ const itemStyleOverrides = {
276
278
  alignItems: 'flex-start'
277
279
  };
278
280
  const ElementBefore = /*#__PURE__*/memo(({
279
- icon,
280
- title
281
+ icon
281
282
  }) => jsx("div", {
282
283
  css: [itemIcon, itemIconStyle]
283
284
  }, icon ? icon() : jsx(IconFallback, null)));
@@ -285,24 +286,53 @@ const ItemContent = /*#__PURE__*/memo(({
285
286
  title,
286
287
  description,
287
288
  keyshortcut
288
- }) =>
289
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
290
- jsx("div", {
291
- css: itemBody,
292
- className: "item-body"
293
- }, jsx("div", {
294
- css: itemText
295
- }, jsx("div", {
296
- css: itemTitleWrapper
297
- }, jsx("p", {
298
- css: itemTitle
299
- }, title), jsx("div", {
300
- css: itemAfter
301
- }, keyshortcut && jsx("div", {
302
- css: shortcutStyle
303
- }, keyshortcut))), description && jsx("p", {
304
- css: itemDescription
305
- }, description))));
289
+ }) => {
290
+ if (editorExperiment('typography_migration_ugc', true)) {
291
+ return (
292
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
293
+ jsx("div", {
294
+ css: itemBody,
295
+ className: "item-body"
296
+ }, jsx("div", {
297
+ css: itemText
298
+ }, jsx(Stack, {
299
+ space: "space.025"
300
+ }, jsx("div", {
301
+ css: itemTitleWrapper
302
+ }, jsx(Text, {
303
+ maxLines: 1
304
+ }, title), jsx("div", {
305
+ css: itemAfter
306
+ }, keyshortcut && jsx("div", {
307
+ css: shortcutStyle
308
+ }, keyshortcut))), description && jsx(Text, {
309
+ color: "color.text.subtle",
310
+ size: "small",
311
+ maxLines: 2
312
+ }, description))))
313
+ );
314
+ } else {
315
+ return (
316
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
317
+ jsx("div", {
318
+ css: itemBody,
319
+ className: "item-body"
320
+ }, jsx("div", {
321
+ css: itemText
322
+ }, jsx("div", {
323
+ css: itemTitleWrapper
324
+ }, jsx("p", {
325
+ css: itemTitle
326
+ }, title), jsx("div", {
327
+ css: itemAfter
328
+ }, keyshortcut && jsx("div", {
329
+ css: shortcutStyle
330
+ }, keyshortcut))), description && jsx("p", {
331
+ css: itemDescription
332
+ }, description)))
333
+ );
334
+ }
335
+ });
306
336
  const elementItemsWrapper = css({
307
337
  flex: 1,
308
338
  flexFlow: 'row wrap',
@@ -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"