@atlaskit/emoji 73.4.5 → 73.4.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 +10 -0
- package/dist/cjs/components/common/EmojiUploadPicker.js +5 -4
- package/dist/cjs/components/i18n.js +5 -0
- package/dist/cjs/components/picker/EmojiPickerListSearch.js +2 -1
- package/dist/cjs/util/analytics/createEvent.js +1 -1
- package/dist/es2019/components/common/EmojiUploadPicker.js +5 -4
- package/dist/es2019/components/i18n.js +5 -0
- package/dist/es2019/components/picker/EmojiPickerListSearch.js +2 -1
- package/dist/es2019/util/analytics/createEvent.js +1 -1
- package/dist/esm/components/common/EmojiUploadPicker.js +5 -4
- package/dist/esm/components/i18n.js +5 -0
- package/dist/esm/components/picker/EmojiPickerListSearch.js +2 -1
- package/dist/esm/util/analytics/createEvent.js +1 -1
- package/dist/types/components/i18n.d.ts +20 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 73.4.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`af710251cf46e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/af710251cf46e) -
|
|
8
|
+
Match the custom emoji name input's accessible name to its visible label behind the
|
|
9
|
+
`platform_ally_emoji_fixes_various` feature gate.
|
|
10
|
+
- [`2c7cd60cc134e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2c7cd60cc134e) -
|
|
11
|
+
Update the emoji picker search label under platform_ally_emoji_fixes_various
|
|
12
|
+
|
|
3
13
|
## 73.4.5
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -85,7 +85,8 @@ var ChooseEmojiFile = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
85
85
|
var fileChooserButtonDescriptionId = 'choose.emoji.file.button.screen.reader.description.id';
|
|
86
86
|
var emojiNameErrorId = 'new-emoji-name-error';
|
|
87
87
|
var inputRef = (0, _react.useRef)(null);
|
|
88
|
-
var isA11yFixEnabled =
|
|
88
|
+
var isA11yFixEnabled = (0, _fg.fg)('platform_ally_emoji_fixes_various');
|
|
89
|
+
var shouldFocusNameOnError = !!nameErrorMessage && isA11yFixEnabled;
|
|
89
90
|
var onKeyDownHandler = (0, _react.useCallback)(function (event) {
|
|
90
91
|
if (event.key === 'Escape') {
|
|
91
92
|
onUploadCancelled();
|
|
@@ -98,11 +99,11 @@ var ChooseEmojiFile = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
98
99
|
});
|
|
99
100
|
}, []);
|
|
100
101
|
(0, _react.useEffect)(function () {
|
|
101
|
-
if (
|
|
102
|
+
if (shouldFocusNameOnError) {
|
|
102
103
|
var _inputRef$current2;
|
|
103
104
|
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.focus();
|
|
104
105
|
}
|
|
105
|
-
}, [
|
|
106
|
+
}, [shouldFocusNameOnError]);
|
|
106
107
|
var emojiPlaceholder = formatMessage(_i18n.messages.emojiPlaceholder);
|
|
107
108
|
var emojiNameAriaLabel = formatMessage(_i18n.messages.emojiNameAriaLabel);
|
|
108
109
|
var emojiChooseFileTitleNew = formatMessage(_i18n.messages.emojiChooseFileDndTitle);
|
|
@@ -138,7 +139,7 @@ var ChooseEmojiFile = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
138
139
|
className: (0, _runtime.ax)(["_1w90azsu", "_11c8wadc _k48p1pd9"])
|
|
139
140
|
}, /*#__PURE__*/React.createElement(_reactIntl.FormattedMessage, _i18n.messages.emojiNameLabel)), /*#__PURE__*/React.createElement(_textField.default, {
|
|
140
141
|
placeholder: emojiPlaceholder,
|
|
141
|
-
"aria-label": emojiNameAriaLabel,
|
|
142
|
+
"aria-label": isA11yFixEnabled ? formatMessage(_i18n.messages.emojiNameLabel) : emojiNameAriaLabel,
|
|
142
143
|
maxLength: maxNameLength,
|
|
143
144
|
onChange: onNameChange,
|
|
144
145
|
onKeyDown: onKeyDownHandler,
|
|
@@ -151,6 +151,11 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
|
|
|
151
151
|
defaultMessage: 'Emoji name',
|
|
152
152
|
description: 'Accessible label for the emoji name search input field in the emoji picker, used by screen readers.'
|
|
153
153
|
},
|
|
154
|
+
searchLabelUpdated: {
|
|
155
|
+
id: 'emoji.i18n.searchLabelUpdated',
|
|
156
|
+
defaultMessage: 'Search emoji by name',
|
|
157
|
+
description: 'Accessible label for the emoji name search input field in the emoji picker, used by screen readers.'
|
|
158
|
+
},
|
|
154
159
|
searchResultsStatus: {
|
|
155
160
|
id: 'fabric.emoji.search.status.count',
|
|
156
161
|
defaultMessage: 'Found {count} emojis',
|
|
@@ -14,6 +14,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
15
|
var _useDebounce = require("use-debounce");
|
|
16
16
|
var _search = _interopRequireDefault(require("@atlaskit/icon/core/search"));
|
|
17
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
17
18
|
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
18
19
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden/visually-hidden"));
|
|
19
20
|
var _constants = require("../../util/constants");
|
|
@@ -64,7 +65,7 @@ var EmojiPickerListSearch = exports.EmojiPickerListSearch = function EmojiPicker
|
|
|
64
65
|
className: (0, _runtime.ax)(["_n6341l7x _18z11b66"])
|
|
65
66
|
}, /*#__PURE__*/_react.default.createElement(_textField.default, {
|
|
66
67
|
role: "searchbox",
|
|
67
|
-
"aria-label": formatMessage(_i18n.messages.searchLabel),
|
|
68
|
+
"aria-label": formatMessage((0, _fg.fg)('platform_ally_emoji_fixes_various') ? _i18n.messages.searchLabelUpdated : _i18n.messages.searchLabel),
|
|
68
69
|
autoComplete: "off",
|
|
69
70
|
name: "search",
|
|
70
71
|
placeholder: "".concat(formatMessage(_i18n.messages.searchPlaceholder), "..."),
|
|
@@ -17,7 +17,7 @@ var createEvent = exports.createEvent = function createEvent(eventType, action,
|
|
|
17
17
|
actionSubjectId: actionSubjectId,
|
|
18
18
|
attributes: _objectSpread({
|
|
19
19
|
packageName: "@atlaskit/emoji",
|
|
20
|
-
packageVersion: "73.4.
|
|
20
|
+
packageVersion: "73.4.5"
|
|
21
21
|
}, attributes)
|
|
22
22
|
};
|
|
23
23
|
};
|
|
@@ -74,7 +74,8 @@ const ChooseEmojiFile = /*#__PURE__*/memo(props => {
|
|
|
74
74
|
const fileChooserButtonDescriptionId = 'choose.emoji.file.button.screen.reader.description.id';
|
|
75
75
|
const emojiNameErrorId = 'new-emoji-name-error';
|
|
76
76
|
const inputRef = useRef(null);
|
|
77
|
-
const isA11yFixEnabled =
|
|
77
|
+
const isA11yFixEnabled = fg('platform_ally_emoji_fixes_various');
|
|
78
|
+
const shouldFocusNameOnError = !!nameErrorMessage && isA11yFixEnabled;
|
|
78
79
|
const onKeyDownHandler = useCallback(event => {
|
|
79
80
|
if (event.key === 'Escape') {
|
|
80
81
|
onUploadCancelled();
|
|
@@ -87,11 +88,11 @@ const ChooseEmojiFile = /*#__PURE__*/memo(props => {
|
|
|
87
88
|
});
|
|
88
89
|
}, []);
|
|
89
90
|
useEffect(() => {
|
|
90
|
-
if (
|
|
91
|
+
if (shouldFocusNameOnError) {
|
|
91
92
|
var _inputRef$current2;
|
|
92
93
|
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
|
|
93
94
|
}
|
|
94
|
-
}, [
|
|
95
|
+
}, [shouldFocusNameOnError]);
|
|
95
96
|
const emojiPlaceholder = formatMessage(messages.emojiPlaceholder);
|
|
96
97
|
const emojiNameAriaLabel = formatMessage(messages.emojiNameAriaLabel);
|
|
97
98
|
const emojiChooseFileTitleNew = formatMessage(messages.emojiChooseFileDndTitle);
|
|
@@ -125,7 +126,7 @@ const ChooseEmojiFile = /*#__PURE__*/memo(props => {
|
|
|
125
126
|
className: ax(["_1w90azsu", "_11c8wadc _k48p1pd9"])
|
|
126
127
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiNameLabel)), /*#__PURE__*/React.createElement(TextField, {
|
|
127
128
|
placeholder: emojiPlaceholder,
|
|
128
|
-
"aria-label": emojiNameAriaLabel,
|
|
129
|
+
"aria-label": isA11yFixEnabled ? formatMessage(messages.emojiNameLabel) : emojiNameAriaLabel,
|
|
129
130
|
maxLength: maxNameLength,
|
|
130
131
|
onChange: onNameChange,
|
|
131
132
|
onKeyDown: onKeyDownHandler,
|
|
@@ -145,6 +145,11 @@ export const messages = defineMessages({
|
|
|
145
145
|
defaultMessage: 'Emoji name',
|
|
146
146
|
description: 'Accessible label for the emoji name search input field in the emoji picker, used by screen readers.'
|
|
147
147
|
},
|
|
148
|
+
searchLabelUpdated: {
|
|
149
|
+
id: 'emoji.i18n.searchLabelUpdated',
|
|
150
|
+
defaultMessage: 'Search emoji by name',
|
|
151
|
+
description: 'Accessible label for the emoji name search input field in the emoji picker, used by screen readers.'
|
|
152
|
+
},
|
|
148
153
|
searchResultsStatus: {
|
|
149
154
|
id: 'fabric.emoji.search.status.count',
|
|
150
155
|
defaultMessage: 'Found {count} emojis',
|
|
@@ -5,6 +5,7 @@ import React, { useRef, useState } from 'react';
|
|
|
5
5
|
import { useIntl } from 'react-intl';
|
|
6
6
|
import { useDebouncedCallback } from 'use-debounce';
|
|
7
7
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
9
|
import TextField from '@atlaskit/textfield/text-field';
|
|
9
10
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
10
11
|
import { EMOJI_SEARCH_DEBOUNCE } from '../../util/constants';
|
|
@@ -51,7 +52,7 @@ export const EmojiPickerListSearch = props => {
|
|
|
51
52
|
className: ax(["_n6341l7x _18z11b66"])
|
|
52
53
|
}, /*#__PURE__*/React.createElement(TextField, {
|
|
53
54
|
role: "searchbox",
|
|
54
|
-
"aria-label": formatMessage(messages.searchLabel),
|
|
55
|
+
"aria-label": formatMessage(fg('platform_ally_emoji_fixes_various') ? messages.searchLabelUpdated : messages.searchLabel),
|
|
55
56
|
autoComplete: "off",
|
|
56
57
|
name: "search",
|
|
57
58
|
placeholder: `${formatMessage(messages.searchPlaceholder)}...`,
|
|
@@ -76,7 +76,8 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
|
|
|
76
76
|
var fileChooserButtonDescriptionId = 'choose.emoji.file.button.screen.reader.description.id';
|
|
77
77
|
var emojiNameErrorId = 'new-emoji-name-error';
|
|
78
78
|
var inputRef = useRef(null);
|
|
79
|
-
var isA11yFixEnabled =
|
|
79
|
+
var isA11yFixEnabled = fg('platform_ally_emoji_fixes_various');
|
|
80
|
+
var shouldFocusNameOnError = !!nameErrorMessage && isA11yFixEnabled;
|
|
80
81
|
var onKeyDownHandler = useCallback(function (event) {
|
|
81
82
|
if (event.key === 'Escape') {
|
|
82
83
|
onUploadCancelled();
|
|
@@ -89,11 +90,11 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
|
|
|
89
90
|
});
|
|
90
91
|
}, []);
|
|
91
92
|
useEffect(function () {
|
|
92
|
-
if (
|
|
93
|
+
if (shouldFocusNameOnError) {
|
|
93
94
|
var _inputRef$current2;
|
|
94
95
|
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.focus();
|
|
95
96
|
}
|
|
96
|
-
}, [
|
|
97
|
+
}, [shouldFocusNameOnError]);
|
|
97
98
|
var emojiPlaceholder = formatMessage(messages.emojiPlaceholder);
|
|
98
99
|
var emojiNameAriaLabel = formatMessage(messages.emojiNameAriaLabel);
|
|
99
100
|
var emojiChooseFileTitleNew = formatMessage(messages.emojiChooseFileDndTitle);
|
|
@@ -129,7 +130,7 @@ var ChooseEmojiFile = /*#__PURE__*/memo(function (props) {
|
|
|
129
130
|
className: ax(["_1w90azsu", "_11c8wadc _k48p1pd9"])
|
|
130
131
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.emojiNameLabel)), /*#__PURE__*/React.createElement(TextField, {
|
|
131
132
|
placeholder: emojiPlaceholder,
|
|
132
|
-
"aria-label": emojiNameAriaLabel,
|
|
133
|
+
"aria-label": isA11yFixEnabled ? formatMessage(messages.emojiNameLabel) : emojiNameAriaLabel,
|
|
133
134
|
maxLength: maxNameLength,
|
|
134
135
|
onChange: onNameChange,
|
|
135
136
|
onKeyDown: onKeyDownHandler,
|
|
@@ -145,6 +145,11 @@ export var messages = defineMessages({
|
|
|
145
145
|
defaultMessage: 'Emoji name',
|
|
146
146
|
description: 'Accessible label for the emoji name search input field in the emoji picker, used by screen readers.'
|
|
147
147
|
},
|
|
148
|
+
searchLabelUpdated: {
|
|
149
|
+
id: 'emoji.i18n.searchLabelUpdated',
|
|
150
|
+
defaultMessage: 'Search emoji by name',
|
|
151
|
+
description: 'Accessible label for the emoji name search input field in the emoji picker, used by screen readers.'
|
|
152
|
+
},
|
|
148
153
|
searchResultsStatus: {
|
|
149
154
|
id: 'fabric.emoji.search.status.count',
|
|
150
155
|
defaultMessage: 'Found {count} emojis',
|
|
@@ -6,6 +6,7 @@ import React, { useRef, useState } from 'react';
|
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { useDebouncedCallback } from 'use-debounce';
|
|
8
8
|
import SearchIcon from '@atlaskit/icon/core/search';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
10
|
import TextField from '@atlaskit/textfield/text-field';
|
|
10
11
|
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
11
12
|
import { EMOJI_SEARCH_DEBOUNCE } from '../../util/constants';
|
|
@@ -55,7 +56,7 @@ export var EmojiPickerListSearch = function EmojiPickerListSearch(props) {
|
|
|
55
56
|
className: ax(["_n6341l7x _18z11b66"])
|
|
56
57
|
}, /*#__PURE__*/React.createElement(TextField, {
|
|
57
58
|
role: "searchbox",
|
|
58
|
-
"aria-label": formatMessage(messages.searchLabel),
|
|
59
|
+
"aria-label": formatMessage(fg('platform_ally_emoji_fixes_various') ? messages.searchLabelUpdated : messages.searchLabel),
|
|
59
60
|
autoComplete: "off",
|
|
60
61
|
name: "search",
|
|
61
62
|
placeholder: "".concat(formatMessage(messages.searchPlaceholder), "..."),
|
|
@@ -10,7 +10,7 @@ export var createEvent = function createEvent(eventType, action, actionSubject,
|
|
|
10
10
|
actionSubjectId: actionSubjectId,
|
|
11
11
|
attributes: _objectSpread({
|
|
12
12
|
packageName: "@atlaskit/emoji",
|
|
13
|
-
packageVersion: "73.4.
|
|
13
|
+
packageVersion: "73.4.5"
|
|
14
14
|
}, attributes)
|
|
15
15
|
};
|
|
16
16
|
};
|
|
@@ -14,52 +14,52 @@ export declare const messages: {
|
|
|
14
14
|
description: string;
|
|
15
15
|
id: string;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
allUploadsCustomCategory: {
|
|
18
18
|
defaultMessage: string;
|
|
19
19
|
description: string;
|
|
20
20
|
id: string;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
cancelLabel: {
|
|
23
23
|
defaultMessage: string;
|
|
24
24
|
description: string;
|
|
25
25
|
id: string;
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
categoriesSearchResults: {
|
|
28
28
|
defaultMessage: string;
|
|
29
29
|
description: string;
|
|
30
30
|
id: string;
|
|
31
31
|
};
|
|
32
|
-
|
|
32
|
+
categoriesSelectorLabel: {
|
|
33
33
|
defaultMessage: string;
|
|
34
34
|
description: string;
|
|
35
35
|
id: string;
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
changeEmojiShortnameButtonLabel: {
|
|
38
38
|
defaultMessage: string;
|
|
39
39
|
description: string;
|
|
40
40
|
id: string;
|
|
41
41
|
};
|
|
42
|
-
|
|
42
|
+
createEmojiWithRovoError: {
|
|
43
43
|
defaultMessage: string;
|
|
44
44
|
description: string;
|
|
45
45
|
id: string;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
createEmojiWithRovoGenerateLabel: {
|
|
48
48
|
defaultMessage: string;
|
|
49
49
|
description: string;
|
|
50
50
|
id: string;
|
|
51
51
|
};
|
|
52
|
-
|
|
52
|
+
createEmojiWithRovoPromptAriaLabel: {
|
|
53
53
|
defaultMessage: string;
|
|
54
54
|
description: string;
|
|
55
55
|
id: string;
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
createEmojiWithRovoPromptPlaceholder: {
|
|
58
58
|
defaultMessage: string;
|
|
59
59
|
description: string;
|
|
60
60
|
id: string;
|
|
61
61
|
};
|
|
62
|
-
|
|
62
|
+
createEmojiWithRovoTitle: {
|
|
63
63
|
defaultMessage: string;
|
|
64
64
|
description: string;
|
|
65
65
|
id: string;
|
|
@@ -154,12 +154,12 @@ export declare const messages: {
|
|
|
154
154
|
description: string;
|
|
155
155
|
id: string;
|
|
156
156
|
};
|
|
157
|
-
|
|
157
|
+
emojiPickerListPanel: {
|
|
158
158
|
defaultMessage: string;
|
|
159
159
|
description: string;
|
|
160
160
|
id: string;
|
|
161
161
|
};
|
|
162
|
-
|
|
162
|
+
emojiPickerNoResults: {
|
|
163
163
|
defaultMessage: string;
|
|
164
164
|
description: string;
|
|
165
165
|
id: string;
|
|
@@ -184,17 +184,17 @@ export declare const messages: {
|
|
|
184
184
|
description: string;
|
|
185
185
|
id: string;
|
|
186
186
|
};
|
|
187
|
-
|
|
187
|
+
emojiSelectColorButtonAriaLabelText: {
|
|
188
188
|
defaultMessage: string;
|
|
189
189
|
description: string;
|
|
190
190
|
id: string;
|
|
191
191
|
};
|
|
192
|
-
|
|
192
|
+
emojiSelectColorListAriaLabelText: {
|
|
193
193
|
defaultMessage: string;
|
|
194
194
|
description: string;
|
|
195
195
|
id: string;
|
|
196
196
|
};
|
|
197
|
-
|
|
197
|
+
emojiSelectSkinToneButtonAriaLabelText: {
|
|
198
198
|
defaultMessage: string;
|
|
199
199
|
description: string;
|
|
200
200
|
id: string;
|
|
@@ -274,6 +274,11 @@ export declare const messages: {
|
|
|
274
274
|
description: string;
|
|
275
275
|
id: string;
|
|
276
276
|
};
|
|
277
|
+
searchLabelUpdated: {
|
|
278
|
+
defaultMessage: string;
|
|
279
|
+
description: string;
|
|
280
|
+
id: string;
|
|
281
|
+
};
|
|
277
282
|
searchPlaceholder: {
|
|
278
283
|
defaultMessage: string;
|
|
279
284
|
description: string;
|