@atlaskit/editor-plugin-card 2.9.4 → 2.9.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-plugin-card
2
2
 
3
+ ## 2.9.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#127640](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/127640)
8
+ [`ccefb817c754a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ccefb817c754a) -
9
+ [ux] Migrate typography with new ADS token and primitive
10
+
11
+ ## 2.9.5
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 2.9.4
4
18
 
5
19
  ### Patch Changes
@@ -17,6 +17,7 @@ var _reactIntlNext = require("react-intl-next");
17
17
  var _messages = require("@atlaskit/editor-common/messages");
18
18
  var _whitespace = require("@atlaskit/editor-common/whitespace");
19
19
  var _preferences = _interopRequireDefault(require("@atlaskit/icon/glyph/preferences"));
20
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
20
21
  var _colors = require("@atlaskit/theme/colors");
21
22
  var _utils = require("./utils");
22
23
  var _excluded = ["children", "isSelected", "isVisible", "testId", "url"];
@@ -88,6 +89,11 @@ var labelStyles = (0, _react2.css)({
88
89
  fontWeight: '600',
89
90
  width: 'max-content'
90
91
  });
92
+ var labelStylesWithFontToken = (0, _react2.css)({
93
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
94
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
95
+ width: 'max-content'
96
+ });
91
97
  var iconAndLabelStyles = (0, _react2.css)({
92
98
  display: 'flex',
93
99
  alignItems: 'center',
@@ -260,7 +266,7 @@ var InlineCardOverlay = function InlineCardOverlay(_ref) {
260
266
  size: iconSize.current,
261
267
  testId: "".concat(testId, "-icon")
262
268
  })), showLabel && (0, _react2.jsx)("span", {
263
- css: labelStyles
269
+ css: (0, _platformFeatureFlags.fg)('platform_editor_migration_icon_and_typography') ? labelStylesWithFontToken : labelStyles
264
270
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
265
271
  ,
266
272
  className: OVERLAY_LABEL_CLASSNAME,
@@ -14,6 +14,7 @@ import { useIntl } from 'react-intl-next';
14
14
  import { cardMessages as messages } from '@atlaskit/editor-common/messages';
15
15
  import { ZERO_WIDTH_JOINER } from '@atlaskit/editor-common/whitespace';
16
16
  import PreferencesIcon from '@atlaskit/icon/glyph/preferences';
17
+ import { fg } from '@atlaskit/platform-feature-flags';
17
18
  import { B100, N0, N700 } from '@atlaskit/theme/colors';
18
19
  import { getChildElement, getIconSize, getInlineCardAvailableWidth, getOverlayWidths, isOneLine } from './utils';
19
20
  const DEBOUNCE_IN_MS = 5;
@@ -79,6 +80,11 @@ const labelStyles = css({
79
80
  fontWeight: '600',
80
81
  width: 'max-content'
81
82
  });
83
+ const labelStylesWithFontToken = css({
84
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
85
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
86
+ width: 'max-content'
87
+ });
82
88
  const iconAndLabelStyles = css({
83
89
  display: 'flex',
84
90
  alignItems: 'center',
@@ -239,7 +245,7 @@ const InlineCardOverlay = ({
239
245
  size: iconSize.current,
240
246
  testId: `${testId}-icon`
241
247
  })), showLabel && jsx("span", {
242
- css: labelStyles
248
+ css: fg('platform_editor_migration_icon_and_typography') ? labelStylesWithFontToken : labelStyles
243
249
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
244
250
  ,
245
251
  className: OVERLAY_LABEL_CLASSNAME,
@@ -19,6 +19,7 @@ import { useIntl } from 'react-intl-next';
19
19
  import { cardMessages as messages } from '@atlaskit/editor-common/messages';
20
20
  import { ZERO_WIDTH_JOINER } from '@atlaskit/editor-common/whitespace';
21
21
  import PreferencesIcon from '@atlaskit/icon/glyph/preferences';
22
+ import { fg } from '@atlaskit/platform-feature-flags';
22
23
  import { B100, N0, N700 } from '@atlaskit/theme/colors';
23
24
  import { getChildElement, getIconSize, getInlineCardAvailableWidth, getOverlayWidths, isOneLine } from './utils';
24
25
  var DEBOUNCE_IN_MS = 5;
@@ -79,6 +80,11 @@ var labelStyles = css({
79
80
  fontWeight: '600',
80
81
  width: 'max-content'
81
82
  });
83
+ var labelStylesWithFontToken = css({
84
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
85
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
86
+ width: 'max-content'
87
+ });
82
88
  var iconAndLabelStyles = css({
83
89
  display: 'flex',
84
90
  alignItems: 'center',
@@ -251,7 +257,7 @@ var InlineCardOverlay = function InlineCardOverlay(_ref) {
251
257
  size: iconSize.current,
252
258
  testId: "".concat(testId, "-icon")
253
259
  })), showLabel && jsx("span", {
254
- css: labelStyles
260
+ css: fg('platform_editor_migration_icon_and_typography') ? labelStylesWithFontToken : labelStyles
255
261
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
256
262
  ,
257
263
  className: OVERLAY_LABEL_CLASSNAME,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-card",
3
- "version": "2.9.4",
3
+ "version": "2.9.6",
4
4
  "description": "Card plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/adf-schema": "^40.3.0",
36
36
  "@atlaskit/analytics-next": "^10.0.0",
37
37
  "@atlaskit/custom-steps": "^0.6.0",
38
- "@atlaskit/editor-common": "^87.4.0",
38
+ "@atlaskit/editor-common": "^87.5.0",
39
39
  "@atlaskit/editor-plugin-analytics": "^1.6.0",
40
40
  "@atlaskit/editor-plugin-decorations": "^1.2.0",
41
41
  "@atlaskit/editor-plugin-editor-disabled": "^1.2.0",
@@ -53,7 +53,7 @@
53
53
  "@atlaskit/link-datasource": "^2.9.0",
54
54
  "@atlaskit/linking-common": "^5.9.0",
55
55
  "@atlaskit/linking-types": "^8.13.0",
56
- "@atlaskit/menu": "2.9.0",
56
+ "@atlaskit/menu": "2.10.0",
57
57
  "@atlaskit/platform-feature-flags": "^0.3.0",
58
58
  "@atlaskit/primitives": "^11.1.0",
59
59
  "@atlaskit/smart-card": "^27.13.0",
@@ -143,6 +143,9 @@
143
143
  },
144
144
  "editor_inline_comments_paste_insert_nodes": {
145
145
  "type": "boolean"
146
+ },
147
+ "platform_editor_migration_icon_and_typography": {
148
+ "type": "boolean"
146
149
  }
147
150
  },
148
151
  "stricter": {