@atlaskit/emoji 71.2.1 → 71.2.2

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,13 @@
1
1
  # @atlaskit/emoji
2
2
 
3
+ ## 71.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`deb7c88f3baed`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/deb7c88f3baed) -
8
+ Update unicode emoji sizing so renderer typography can control text emoji scale.
9
+ - Updated dependencies
10
+
3
11
  ## 71.2.1
4
12
 
5
13
  ### Patch Changes
@@ -281,11 +281,11 @@ var UnicodeEmojiImage = function UnicodeEmojiImage(props) {
281
281
  });
282
282
  };
283
283
  var UnicodeEmoji = exports.UnicodeEmoji = function UnicodeEmoji(props) {
284
- var _props$fitToHeight;
285
284
  var emoji = props.emoji,
286
285
  selected = props.selected,
287
286
  selectOnHover = props.selectOnHover,
288
287
  className = props.className,
288
+ fitToHeight = props.fitToHeight,
289
289
  _props$renderUnicodeE = props.renderUnicodeEmojiAsImage,
290
290
  renderUnicodeEmojiAsImage = _props$renderUnicodeE === void 0 ? true : _props$renderUnicodeE;
291
291
  if (renderUnicodeEmojiAsImage) {
@@ -293,20 +293,14 @@ var UnicodeEmoji = exports.UnicodeEmoji = function UnicodeEmoji(props) {
293
293
  }
294
294
  var classes = "".concat(_styles.emojiNodeStyles, " ").concat(selected ? _styles.commonSelectedStyles : '', " ").concat(selectOnHover ? _styles.selectOnHoverStyles : '', " ").concat(className ? className : '');
295
295
  var emojiText = emoji.representation.unicodeEmoji;
296
- var size = (_props$fitToHeight = props.fitToHeight) !== null && _props$fitToHeight !== void 0 ? _props$fitToHeight : _constants.defaultEmojiHeight;
296
+ var defaultSize = "".concat(fitToHeight !== null && fitToHeight !== void 0 ? fitToHeight : _constants.defaultEmojiHeight, "px");
297
+ var emojiSize = "var(--emoji-common-unicode-size, ".concat(defaultSize, ")");
297
298
  var style = {
298
- display: 'inline-block',
299
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
300
- fontSize: "max(1em, ".concat(size, "px)"),
301
- width: "max(1em, ".concat(size, "px)"),
302
- height: "max(1em, ".concat(size, "px)"),
303
- textAlign: 'center',
304
- alignContent: 'center',
305
- alignSelf: 'center',
299
+ display: 'inline-flex',
306
300
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
307
- lineHeight: '0',
308
- margin: '0',
309
- padding: '0'
301
+ fontSize: emojiSize,
302
+ alignItems: 'center',
303
+ aspectRatio: '1/1'
310
304
  };
311
305
  return (
312
306
  /*#__PURE__*/
@@ -20,7 +20,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
20
20
  actionSubjectId: actionSubjectId,
21
21
  attributes: _objectSpread({
22
22
  packageName: "@atlaskit/emoji",
23
- packageVersion: "71.2.0"
23
+ packageVersion: "71.2.1"
24
24
  }, attributes)
25
25
  };
26
26
  };
@@ -256,12 +256,12 @@ const UnicodeEmojiImage = props => {
256
256
  });
257
257
  };
258
258
  export const UnicodeEmoji = props => {
259
- var _props$fitToHeight;
260
259
  const {
261
260
  emoji,
262
261
  selected,
263
262
  selectOnHover,
264
263
  className,
264
+ fitToHeight,
265
265
  renderUnicodeEmojiAsImage = true
266
266
  } = props;
267
267
  if (renderUnicodeEmojiAsImage) {
@@ -269,20 +269,14 @@ export const UnicodeEmoji = props => {
269
269
  }
270
270
  const classes = `${emojiNodeStyles} ${selected ? commonSelectedStyles : ''} ${selectOnHover ? selectOnHoverStyles : ''} ${className ? className : ''}`;
271
271
  const emojiText = emoji.representation.unicodeEmoji;
272
- const size = (_props$fitToHeight = props.fitToHeight) !== null && _props$fitToHeight !== void 0 ? _props$fitToHeight : defaultEmojiHeight;
272
+ const defaultSize = `${fitToHeight !== null && fitToHeight !== void 0 ? fitToHeight : defaultEmojiHeight}px`;
273
+ const emojiSize = `var(--emoji-common-unicode-size, ${defaultSize})`;
273
274
  const style = {
274
- display: 'inline-block',
275
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
276
- fontSize: `max(1em, ${size}px)`,
277
- width: `max(1em, ${size}px)`,
278
- height: `max(1em, ${size}px)`,
279
- textAlign: 'center',
280
- alignContent: 'center',
281
- alignSelf: 'center',
275
+ display: 'inline-flex',
282
276
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
283
- lineHeight: '0',
284
- margin: '0',
285
- padding: '0'
277
+ fontSize: emojiSize,
278
+ alignItems: 'center',
279
+ aspectRatio: '1/1'
286
280
  };
287
281
  return (
288
282
  /*#__PURE__*/
@@ -9,7 +9,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
9
9
  actionSubjectId,
10
10
  attributes: {
11
11
  packageName: "@atlaskit/emoji",
12
- packageVersion: "71.2.0",
12
+ packageVersion: "71.2.1",
13
13
  ...attributes
14
14
  }
15
15
  });
@@ -272,11 +272,11 @@ var UnicodeEmojiImage = function UnicodeEmojiImage(props) {
272
272
  });
273
273
  };
274
274
  export var UnicodeEmoji = function UnicodeEmoji(props) {
275
- var _props$fitToHeight;
276
275
  var emoji = props.emoji,
277
276
  selected = props.selected,
278
277
  selectOnHover = props.selectOnHover,
279
278
  className = props.className,
279
+ fitToHeight = props.fitToHeight,
280
280
  _props$renderUnicodeE = props.renderUnicodeEmojiAsImage,
281
281
  renderUnicodeEmojiAsImage = _props$renderUnicodeE === void 0 ? true : _props$renderUnicodeE;
282
282
  if (renderUnicodeEmojiAsImage) {
@@ -284,20 +284,14 @@ export var UnicodeEmoji = function UnicodeEmoji(props) {
284
284
  }
285
285
  var classes = "".concat(emojiNodeStyles, " ").concat(selected ? commonSelectedStyles : '', " ").concat(selectOnHover ? selectOnHoverStyles : '', " ").concat(className ? className : '');
286
286
  var emojiText = emoji.representation.unicodeEmoji;
287
- var size = (_props$fitToHeight = props.fitToHeight) !== null && _props$fitToHeight !== void 0 ? _props$fitToHeight : defaultEmojiHeight;
287
+ var defaultSize = "".concat(fitToHeight !== null && fitToHeight !== void 0 ? fitToHeight : defaultEmojiHeight, "px");
288
+ var emojiSize = "var(--emoji-common-unicode-size, ".concat(defaultSize, ")");
288
289
  var style = {
289
- display: 'inline-block',
290
- // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
291
- fontSize: "max(1em, ".concat(size, "px)"),
292
- width: "max(1em, ".concat(size, "px)"),
293
- height: "max(1em, ".concat(size, "px)"),
294
- textAlign: 'center',
295
- alignContent: 'center',
296
- alignSelf: 'center',
290
+ display: 'inline-flex',
297
291
  // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
298
- lineHeight: '0',
299
- margin: '0',
300
- padding: '0'
292
+ fontSize: emojiSize,
293
+ alignItems: 'center',
294
+ aspectRatio: '1/1'
301
295
  };
302
296
  return (
303
297
  /*#__PURE__*/
@@ -14,7 +14,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
14
14
  actionSubjectId: actionSubjectId,
15
15
  attributes: _objectSpread({
16
16
  packageName: "@atlaskit/emoji",
17
- packageVersion: "71.2.0"
17
+ packageVersion: "71.2.1"
18
18
  }, attributes)
19
19
  };
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/emoji",
3
- "version": "71.2.1",
3
+ "version": "71.2.2",
4
4
  "description": "Fabric emoji React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -32,7 +32,7 @@
32
32
  "@atlaskit/afm-i18n-platform-elements-emoji": "2.158.0",
33
33
  "@atlaskit/analytics-next": "^12.0.0",
34
34
  "@atlaskit/browser-apis": "^1.0.0",
35
- "@atlaskit/button": "^24.0.0",
35
+ "@atlaskit/button": "^24.1.0",
36
36
  "@atlaskit/css": "^1.0.0",
37
37
  "@atlaskit/feature-gate-js-client": "^6.0.0",
38
38
  "@atlaskit/form": "^16.0.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/radio": "^9.0.0",
49
49
  "@atlaskit/spinner": "^20.0.0",
50
50
  "@atlaskit/textfield": "^9.0.0",
51
- "@atlaskit/tmp-editor-statsig": "^108.0.0",
51
+ "@atlaskit/tmp-editor-statsig": "^108.4.0",
52
52
  "@atlaskit/tokens": "^14.0.0",
53
53
  "@atlaskit/tooltip": "^23.0.0",
54
54
  "@atlaskit/ufo": "^1.0.0",