@atlaskit/emoji 69.10.55 → 69.11.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/emoji
2
2
 
3
+ ## 69.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 69.11.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`adc71fefc3966`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/adc71fefc3966) -
14
+ The emoji change button used in page title should have an accessible label
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 69.10.55
4
21
 
5
22
  ### Patch Changes
@@ -28,6 +28,8 @@ var _useInView3 = require("../../hooks/useInView");
28
28
  var _ufoExperiences = require("../../util/analytics/ufoExperiences");
29
29
  var _DeletableEmojiTooltipContent = require("./DeletableEmojiTooltipContent");
30
30
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
31
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
32
+ var _i18n = require("../i18n");
31
33
  var _excluded = ["emoji", "fitToHeight", "selected", "selectOnHover", "className", "showTooltip", "showDelete", "shouldBeInteractive", "tabIndex", "onSelected", "onMouseMove", "onFocus", "onDelete", "onLoadError", "onLoadSuccess", "disableLazyLoad", "autoWidth", "children", "type", "editorEmoji"];
32
34
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
33
35
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -321,9 +323,10 @@ var EmojiNodeWrapper = exports.EmojiNodeWrapper = /*#__PURE__*/(0, _react.forwar
321
323
  type = props.type,
322
324
  editorEmoji = props.editorEmoji,
323
325
  other = (0, _objectWithoutProperties2.default)(props, _excluded);
326
+ var ariaLabel = (0, _platformFeatureFlags.fg)('platform_change_emoji_button_label') ? _i18n.messages.changeEmojiButtonLabel.defaultMessage : editorEmoji ? undefined : emoji.shortName;
324
327
  return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
325
328
  role: editorEmoji ? undefined : shouldBeInteractive ? 'button' : 'img',
326
- "aria-label": editorEmoji ? undefined : emoji.shortName,
329
+ "aria-label": ariaLabel,
327
330
  ref: ref,
328
331
  "data-testid": "".concat(type, "-emoji-").concat(emoji.shortName),
329
332
  "data-emoji-type": type,
@@ -231,6 +231,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
231
231
  defaultMessage: 'emoji button',
232
232
  description: "Aria roledescription for emoji button, used in emoji picker."
233
233
  },
234
+ changeEmojiButtonLabel: {
235
+ id: 'fabric.emoji.change.button.label',
236
+ defaultMessage: 'Change emoji',
237
+ description: 'Aria label for the button in page title used to change emoji'
238
+ },
234
239
  error: {
235
240
  id: 'fabric.emoji.emojipicker.error',
236
241
  defaultMessage: 'Error!',
@@ -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: "0.0.0-development"
23
+ packageVersion: "69.11.0"
24
24
  }, attributes)
25
25
  };
26
26
  };
@@ -17,6 +17,8 @@ import { useInView } from '../../hooks/useInView';
17
17
  import { hasUfoMarked } from '../../util/analytics/ufoExperiences';
18
18
  import { DeletableEmojiTooltipContent, DeletableEmojiTooltipContentForScreenReader } from './DeletableEmojiTooltipContent';
19
19
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
20
+ import { fg } from '@atlaskit/platform-feature-flags';
21
+ import { messages } from '../i18n';
20
22
  const emojiSpriteContainer = null;
21
23
  const emojiImageContainer = null;
22
24
  const handleMouseDown = (props, event) => {
@@ -313,9 +315,10 @@ export const EmojiNodeWrapper = /*#__PURE__*/forwardRef((props, ref) => {
313
315
  editorEmoji,
314
316
  ...other
315
317
  } = props;
318
+ const ariaLabel = fg('platform_change_emoji_button_label') ? messages.changeEmojiButtonLabel.defaultMessage : editorEmoji ? undefined : emoji.shortName;
316
319
  return /*#__PURE__*/React.createElement("span", _extends({
317
320
  role: editorEmoji ? undefined : shouldBeInteractive ? 'button' : 'img',
318
- "aria-label": editorEmoji ? undefined : emoji.shortName,
321
+ "aria-label": ariaLabel,
319
322
  ref: ref,
320
323
  "data-testid": `${type}-emoji-${emoji.shortName}`,
321
324
  "data-emoji-type": type,
@@ -225,6 +225,11 @@ export const messages = defineMessages({
225
225
  defaultMessage: 'emoji button',
226
226
  description: `Aria roledescription for emoji button, used in emoji picker.`
227
227
  },
228
+ changeEmojiButtonLabel: {
229
+ id: 'fabric.emoji.change.button.label',
230
+ defaultMessage: 'Change emoji',
231
+ description: 'Aria label for the button in page title used to change emoji'
232
+ },
228
233
  error: {
229
234
  id: 'fabric.emoji.emojipicker.error',
230
235
  defaultMessage: 'Error!',
@@ -9,7 +9,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
9
9
  actionSubjectId,
10
10
  attributes: {
11
11
  packageName: "@atlaskit/emoji",
12
- packageVersion: "0.0.0-development",
12
+ packageVersion: "69.11.0",
13
13
  ...attributes
14
14
  }
15
15
  });
@@ -23,6 +23,8 @@ import { useInView } from '../../hooks/useInView';
23
23
  import { hasUfoMarked } from '../../util/analytics/ufoExperiences';
24
24
  import { DeletableEmojiTooltipContent, DeletableEmojiTooltipContentForScreenReader } from './DeletableEmojiTooltipContent';
25
25
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
26
+ import { fg } from '@atlaskit/platform-feature-flags';
27
+ import { messages } from '../i18n';
26
28
  var emojiSpriteContainer = null;
27
29
  var emojiImageContainer = null;
28
30
  var handleMouseDown = function handleMouseDown(props, event) {
@@ -312,9 +314,10 @@ export var EmojiNodeWrapper = /*#__PURE__*/forwardRef(function (props, ref) {
312
314
  type = props.type,
313
315
  editorEmoji = props.editorEmoji,
314
316
  other = _objectWithoutProperties(props, _excluded);
317
+ var ariaLabel = fg('platform_change_emoji_button_label') ? messages.changeEmojiButtonLabel.defaultMessage : editorEmoji ? undefined : emoji.shortName;
315
318
  return /*#__PURE__*/React.createElement("span", _extends({
316
319
  role: editorEmoji ? undefined : shouldBeInteractive ? 'button' : 'img',
317
- "aria-label": editorEmoji ? undefined : emoji.shortName,
320
+ "aria-label": ariaLabel,
318
321
  ref: ref,
319
322
  "data-testid": "".concat(type, "-emoji-").concat(emoji.shortName),
320
323
  "data-emoji-type": type,
@@ -225,6 +225,11 @@ export var messages = defineMessages({
225
225
  defaultMessage: 'emoji button',
226
226
  description: "Aria roledescription for emoji button, used in emoji picker."
227
227
  },
228
+ changeEmojiButtonLabel: {
229
+ id: 'fabric.emoji.change.button.label',
230
+ defaultMessage: 'Change emoji',
231
+ description: 'Aria label for the button in page title used to change emoji'
232
+ },
228
233
  error: {
229
234
  id: 'fabric.emoji.emojipicker.error',
230
235
  defaultMessage: 'Error!',
@@ -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: "0.0.0-development"
17
+ packageVersion: "69.11.0"
18
18
  }, attributes)
19
19
  };
20
20
  };
@@ -224,6 +224,11 @@ export declare const messages: {
224
224
  defaultMessage: string;
225
225
  description: string;
226
226
  };
227
+ changeEmojiButtonLabel: {
228
+ id: string;
229
+ defaultMessage: string;
230
+ description: string;
231
+ };
227
232
  error: {
228
233
  id: string;
229
234
  defaultMessage: string;
@@ -224,6 +224,11 @@ export declare const messages: {
224
224
  defaultMessage: string;
225
225
  description: string;
226
226
  };
227
+ changeEmojiButtonLabel: {
228
+ id: string;
229
+ defaultMessage: string;
230
+ description: string;
231
+ };
227
232
  error: {
228
233
  id: string;
229
234
  defaultMessage: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/emoji",
3
- "version": "69.10.55",
3
+ "version": "69.11.1",
4
4
  "description": "Fabric emoji React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -49,8 +49,8 @@
49
49
  "@atlaskit/primitives": "^18.1.0",
50
50
  "@atlaskit/spinner": "^19.1.0",
51
51
  "@atlaskit/textfield": "^8.3.0",
52
- "@atlaskit/tmp-editor-statsig": "^55.0.0",
53
- "@atlaskit/tokens": "^11.4.0",
52
+ "@atlaskit/tmp-editor-statsig": "^56.0.0",
53
+ "@atlaskit/tokens": "^12.0.0",
54
54
  "@atlaskit/tooltip": "^21.1.0",
55
55
  "@atlaskit/ufo": "^0.4.0",
56
56
  "@atlaskit/util-service-support": "^6.3.0",
@@ -77,7 +77,7 @@
77
77
  "@atlaskit/elements-test-helpers": "workspace:^",
78
78
  "@atlaskit/media-core": "^37.0.0",
79
79
  "@atlaskit/ssr": "workspace:^",
80
- "@atlaskit/theme": "^22.0.0",
80
+ "@atlaskit/theme": "^23.0.0",
81
81
  "@atlassian/a11y-jest-testing": "^0.11.0",
82
82
  "@atlassian/feature-flags-test-utils": "^1.0.0",
83
83
  "@emotion/jest": "^11.8.0",
@@ -127,6 +127,9 @@
127
127
  },
128
128
  "platform_suppression_removal_emoji_radio_a11y": {
129
129
  "type": "boolean"
130
+ },
131
+ "platform_change_emoji_button_label": {
132
+ "type": "boolean"
130
133
  }
131
134
  },
132
135
  "scripts": {