@atlaskit/emoji 71.3.1 → 71.3.3
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 +16 -0
- package/dist/cjs/components/common/EmojiActions.js +24 -6
- package/dist/cjs/components/common/ProductivityColorSelector.compiled.css +1 -1
- package/dist/cjs/components/common/ProductivityColorSelector.js +6 -6
- package/dist/cjs/components/common/TonePreviewButton.compiled.css +1 -0
- package/dist/cjs/components/common/TonePreviewButton.js +5 -1
- package/dist/cjs/components/picker/EmojiPickerComponent.js +4 -1
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/cjs/util/constants.js +2 -1
- package/dist/cjs/util/productivity-colors.js +31 -1
- package/dist/es2019/components/common/EmojiActions.js +17 -2
- package/dist/es2019/components/common/ProductivityColorSelector.compiled.css +1 -1
- package/dist/es2019/components/common/ProductivityColorSelector.js +5 -6
- package/dist/es2019/components/common/TonePreviewButton.compiled.css +1 -0
- package/dist/es2019/components/common/TonePreviewButton.js +5 -1
- package/dist/es2019/components/picker/EmojiPickerComponent.js +3 -2
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/es2019/util/constants.js +1 -0
- package/dist/es2019/util/productivity-colors.js +27 -0
- package/dist/esm/components/common/EmojiActions.js +24 -6
- package/dist/esm/components/common/ProductivityColorSelector.compiled.css +1 -1
- package/dist/esm/components/common/ProductivityColorSelector.js +6 -6
- package/dist/esm/components/common/TonePreviewButton.compiled.css +1 -0
- package/dist/esm/components/common/TonePreviewButton.js +5 -1
- package/dist/esm/components/picker/EmojiPickerComponent.js +5 -2
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/esm/util/constants.js +1 -0
- package/dist/esm/util/productivity-colors.js +29 -0
- package/dist/types/components/common/ProductivityColorSelector.d.ts +2 -1
- package/dist/types/components/common/TonePreviewButton.d.ts +3 -2
- package/dist/types/util/constants.d.ts +1 -0
- package/dist/types/util/productivity-colors.d.ts +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 71.3.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`65b9427ab9649`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/65b9427ab9649) -
|
|
8
|
+
Increase border radius of tone picker to match search input
|
|
9
|
+
|
|
10
|
+
## 71.3.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`7e7dc2539db50`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7e7dc2539db50) -
|
|
15
|
+
Persist colour choice + do not have focus on button after select, do not have focus on selected
|
|
16
|
+
colour
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 71.3.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -94,10 +94,15 @@ var TonesWrapper = function TonesWrapper(props) {
|
|
|
94
94
|
showToneSelector = props.showToneSelector;
|
|
95
95
|
var formatMessage = intl.formatMessage;
|
|
96
96
|
var tonePreviewButtonRef = (0, _react.useRef)(null);
|
|
97
|
+
var openProductivityColorSelectorWithKeyboard = (0, _react.useRef)(false);
|
|
97
98
|
var _useState = (0, _react.useState)(false),
|
|
98
99
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
99
100
|
focusTonePreviewButton = _useState2[0],
|
|
100
101
|
setFocusTonePreviewButton = _useState2[1];
|
|
102
|
+
var _useState3 = (0, _react.useState)(false),
|
|
103
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
104
|
+
focusSelectedProductivityColorOnMount = _useState4[0],
|
|
105
|
+
setFocusSelectedProductivityColorOnMount = _useState4[1];
|
|
101
106
|
(0, _react.useLayoutEffect)(function () {
|
|
102
107
|
if (focusTonePreviewButton && !showToneSelector) {
|
|
103
108
|
var _tonePreviewButtonRef;
|
|
@@ -120,8 +125,19 @@ var TonesWrapper = function TonesWrapper(props) {
|
|
|
120
125
|
var onProductivityColorSelectedHandler = (0, _react.useCallback)(function (color) {
|
|
121
126
|
onProductivityColorSelected === null || onProductivityColorSelected === void 0 || onProductivityColorSelected(color);
|
|
122
127
|
onToneClose();
|
|
123
|
-
|
|
128
|
+
setFocusSelectedProductivityColorOnMount(false);
|
|
124
129
|
}, [onProductivityColorSelected, onToneClose]);
|
|
130
|
+
var onProductivityColorToggle = (0, _react.useCallback)(function (event) {
|
|
131
|
+
var isKeyboardClick = (event === null || event === void 0 ? void 0 : event.detail) === 0;
|
|
132
|
+
setFocusSelectedProductivityColorOnMount(!showToneSelector && (openProductivityColorSelectorWithKeyboard.current || isKeyboardClick));
|
|
133
|
+
openProductivityColorSelectorWithKeyboard.current = false;
|
|
134
|
+
onToneToggle();
|
|
135
|
+
}, [onToneToggle, showToneSelector]);
|
|
136
|
+
var onProductivityColorPreviewKeyDown = (0, _react.useCallback)(function (event) {
|
|
137
|
+
if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') {
|
|
138
|
+
openProductivityColorSelectorWithKeyboard.current = true;
|
|
139
|
+
}
|
|
140
|
+
}, []);
|
|
125
141
|
var shouldShowProductivityColorSelector = !!(activeCategoryId === 'ATLASSIAN' && productivityColorPreviewEmojis && selectedProductivityColor && onProductivityColorSelected && _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false));
|
|
126
142
|
if (shouldShowProductivityColorSelector) {
|
|
127
143
|
var previewEmoji = (productivityColorPreviewEmojis === null || productivityColorPreviewEmojis === void 0 ? void 0 : productivityColorPreviewEmojis[selectedProductivityColor]) || Object.values(productivityColorPreviewEmojis || {})[0];
|
|
@@ -140,6 +156,7 @@ var TonesWrapper = function TonesWrapper(props) {
|
|
|
140
156
|
className: (0, _runtime.ax)(["_19itia51 _2rkofajl _bfhk1bhr _16qs130s _ca0q12x7 _u5f312x7 _n3td12x7 _19bv12x7"])
|
|
141
157
|
}, /*#__PURE__*/React.createElement(_ProductivityColorSelector.default, {
|
|
142
158
|
colorPreviewEmojis: productivityColorPreviewEmojis,
|
|
159
|
+
focusSelectedColorOnMount: focusSelectedProductivityColorOnMount,
|
|
143
160
|
selectedColor: selectedProductivityColor,
|
|
144
161
|
onColorSelected: onProductivityColorSelectedHandler
|
|
145
162
|
}))), /*#__PURE__*/React.createElement(_TonePreviewButton.default, {
|
|
@@ -148,7 +165,8 @@ var TonesWrapper = function TonesWrapper(props) {
|
|
|
148
165
|
ariaExpanded: showToneSelector,
|
|
149
166
|
emoji: previewEmoji,
|
|
150
167
|
selectOnHover: true,
|
|
151
|
-
|
|
168
|
+
onKeyDown: onProductivityColorPreviewKeyDown,
|
|
169
|
+
onSelected: onProductivityColorToggle,
|
|
152
170
|
ariaLabelText: formatMessage(_i18n.messages.emojiSelectColorButtonAriaLabelText)
|
|
153
171
|
}));
|
|
154
172
|
}
|
|
@@ -196,10 +214,10 @@ var EmojiActions = exports.EmojiActions = function EmojiActions(props) {
|
|
|
196
214
|
query = props.query,
|
|
197
215
|
_props$resultsCount = props.resultsCount,
|
|
198
216
|
resultsCount = _props$resultsCount === void 0 ? 0 : _props$resultsCount;
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
showToneSelector =
|
|
202
|
-
setShowToneSelector =
|
|
217
|
+
var _useState5 = (0, _react.useState)(false),
|
|
218
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
219
|
+
showToneSelector = _useState6[0],
|
|
220
|
+
setShowToneSelector = _useState6[1];
|
|
203
221
|
var wasProductivityColorSelectorOpen = (0, _react.useRef)(false);
|
|
204
222
|
var shouldUseProductivityColorControl = !!(props.activeCategoryId === 'ATLASSIAN' && props.productivityColorPreviewEmojis && props.selectedProductivityColor && props.onProductivityColorSelected && _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false));
|
|
205
223
|
var onToneOpenHandler = (0, _react.useCallback)(function () {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
._12hvze3t input{margin-right:var(--ds-space-0,0)}
|
|
6
6
|
._12ultlke input{cursor:pointer}
|
|
7
7
|
._13yj1o36 input:focus+span{outline-width:medium}
|
|
8
|
+
._15fn7qp0 input:checked+span{background-color:var(--ds-background-accent-gray-subtler,#dddee1)}
|
|
8
9
|
._17muzwfg label{height:2pc}
|
|
9
10
|
._18m915vq{overflow-y:hidden}
|
|
10
11
|
._18u0ze3t{margin-left:var(--ds-space-0,0)}
|
|
@@ -52,7 +53,6 @@
|
|
|
52
53
|
._pytkzwfg input{height:2pc}
|
|
53
54
|
._smb7plhp input:hover+span{background-color:var(--ds-background-neutral-hovered,#0b120e24)}
|
|
54
55
|
._soq51h6o input+span{align-items:center}
|
|
55
|
-
._szw2w5lj input:checked+span{box-shadow:0 0 0 2px var(--ds-border-selected,#1868db)}
|
|
56
56
|
._tnsm1r31 input:focus+span{outline-color:currentColor}
|
|
57
57
|
._u5f3idpf{padding-right:0}
|
|
58
58
|
._x5bdze3t input{margin-bottom:var(--ds-space-0,0)}
|
|
@@ -28,6 +28,8 @@ var getColorLabel = function getColorLabel(color) {
|
|
|
28
28
|
};
|
|
29
29
|
var ProductivityColorSelector = exports.ProductivityColorSelector = function ProductivityColorSelector(_ref) {
|
|
30
30
|
var colorPreviewEmojis = _ref.colorPreviewEmojis,
|
|
31
|
+
_ref$focusSelectedCol = _ref.focusSelectedColorOnMount,
|
|
32
|
+
focusSelectedColorOnMount = _ref$focusSelectedCol === void 0 ? false : _ref$focusSelectedCol,
|
|
31
33
|
onColorSelected = _ref.onColorSelected,
|
|
32
34
|
selectedColor = _ref.selectedColor;
|
|
33
35
|
var intl = (0, _react.useContext)(_reactIntl.IntlContext);
|
|
@@ -75,15 +77,13 @@ var ProductivityColorSelector = exports.ProductivityColorSelector = function Pro
|
|
|
75
77
|
};
|
|
76
78
|
return /*#__PURE__*/React.createElement("div", {
|
|
77
79
|
key: color,
|
|
78
|
-
className: (0, _runtime.ax)(["_4t3izwfg _kqswh2mm _1bsbzwfg _1355fajl _soq51h6o _ngzz1txw _1030zwfg _6vsr1h6o _ecyuidpf _8qdiidpf _7kzvidpf _ev8ridpf _6rawzwfg _tnsm1r31 _hxs6glyw _13yj1o36 _1pi91y54 _1rgq13zc _1eq11h6o _1vzltlke _17muzwfg _1wqq1h6o _1p1fzwfg _12ultlke _pytkzwfg _2x4gze3t _12hvze3t _x5bdze3t _1rgfze3t _1e7sidpf _khufstnw _5hv9zwfg _1nn0kb7n _smb7plhp
|
|
80
|
+
className: (0, _runtime.ax)(["_4t3izwfg _kqswh2mm _1bsbzwfg _1355fajl _soq51h6o _ngzz1txw _1030zwfg _6vsr1h6o _ecyuidpf _8qdiidpf _7kzvidpf _ev8ridpf _6rawzwfg _tnsm1r31 _hxs6glyw _13yj1o36 _1pi91y54 _1rgq13zc _1eq11h6o _1vzltlke _17muzwfg _1wqq1h6o _1p1fzwfg _12ultlke _pytkzwfg _2x4gze3t _12hvze3t _x5bdze3t _1rgfze3t _1e7sidpf _khufstnw _5hv9zwfg _1nn0kb7n _smb7plhp _15fn7qp0"])
|
|
79
81
|
}, /*#__PURE__*/React.createElement(_radio.Radio, {
|
|
80
82
|
ref: function ref(el) {
|
|
81
83
|
radioRefs.current[index] = el;
|
|
82
|
-
if (selectedColor === color) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
hasFocusedSelectedColor.current = true;
|
|
86
|
-
}
|
|
84
|
+
if (focusSelectedColorOnMount && selectedColor === color && el && !hasFocusedSelectedColor.current) {
|
|
85
|
+
el.focus();
|
|
86
|
+
hasFocusedSelectedColor.current = true;
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
ariaLabel: getColorLabel(color),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
._19itia51{border:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
|
|
3
3
|
._19itidpf{border:0}
|
|
4
|
+
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
4
5
|
._2rkofajl{border-radius:var(--ds-radius-small,3px)}._11bcidpf::-moz-focus-inner{border-width:0}
|
|
5
6
|
._dqozglyw::-moz-focus-inner{border-style:none}
|
|
6
7
|
._19bvidpf{padding-left:0}
|
|
@@ -19,6 +19,7 @@ var tonePreviewTestId = exports.tonePreviewTestId = 'tone-preview';
|
|
|
19
19
|
var emojiButton = null;
|
|
20
20
|
var hidden = null;
|
|
21
21
|
var emojiButtonOutline = null;
|
|
22
|
+
var emojiButtonBorderRadius = null;
|
|
22
23
|
var TonePreviewButton = exports.TonePreviewButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
23
24
|
var emoji = props.emoji,
|
|
24
25
|
selectOnHover = props.selectOnHover,
|
|
@@ -26,6 +27,7 @@ var TonePreviewButton = exports.TonePreviewButton = /*#__PURE__*/(0, _react.forw
|
|
|
26
27
|
ariaControls = _props$ariaControls === void 0 ? 'emoji-picker-tone-selector' : _props$ariaControls,
|
|
27
28
|
ariaLabelText = props.ariaLabelText,
|
|
28
29
|
ariaExpanded = props.ariaExpanded,
|
|
30
|
+
onKeyDown = props.onKeyDown,
|
|
29
31
|
onSelected = props.onSelected,
|
|
30
32
|
_props$isVisible = props.isVisible,
|
|
31
33
|
isVisible = _props$isVisible === void 0 ? true : _props$isVisible;
|
|
@@ -33,6 +35,7 @@ var TonePreviewButton = exports.TonePreviewButton = /*#__PURE__*/(0, _react.forw
|
|
|
33
35
|
return _featureGateJsClient.default.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("button", {
|
|
34
36
|
ref: ref,
|
|
35
37
|
onClick: onSelected,
|
|
38
|
+
onKeyDown: onKeyDown,
|
|
36
39
|
"aria-label": ariaLabelText,
|
|
37
40
|
"aria-expanded": ariaExpanded,
|
|
38
41
|
"aria-controls": ariaControls
|
|
@@ -43,7 +46,7 @@ var TonePreviewButton = exports.TonePreviewButton = /*#__PURE__*/(0, _react.forw
|
|
|
43
46
|
},
|
|
44
47
|
"data-testid": tonePreviewTestId,
|
|
45
48
|
type: "button",
|
|
46
|
-
className: (0, _runtime.ax)(["_19itidpf _2rkofajl _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _bfhk1j28 _80omtlke _kqswh2mm _1e0c1o8l _lev4idpf _1cx6idpf _tyukidpf _2ewlidpf _11bcidpf _dqozglyw _1at812x7 _1cjo12x7 _1yg612x7 _hjaq12x7 _hlt21tcg _1s3c1tcg _1i911tcg _1ye71tcg _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc", !isVisible && "_tzy4idpf _3um015vq _1e0cglyw", "_19itia51"])
|
|
49
|
+
className: (0, _runtime.ax)(["_19itidpf _2rkofajl _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _bfhk1j28 _80omtlke _kqswh2mm _1e0c1o8l _lev4idpf _1cx6idpf _tyukidpf _2ewlidpf _11bcidpf _dqozglyw _1at812x7 _1cjo12x7 _1yg612x7 _hjaq12x7 _hlt21tcg _1s3c1tcg _1i911tcg _1ye71tcg _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc", !isVisible && "_tzy4idpf _3um015vq _1e0cglyw", "_19itia51", "_2rko1qi0"])
|
|
47
50
|
}, /*#__PURE__*/React.createElement(_Emoji.default, {
|
|
48
51
|
emoji: emoji,
|
|
49
52
|
selectOnHover: selectOnHover,
|
|
@@ -53,6 +56,7 @@ var TonePreviewButton = exports.TonePreviewButton = /*#__PURE__*/(0, _react.forw
|
|
|
53
56
|
})) : /*#__PURE__*/React.createElement("button", {
|
|
54
57
|
ref: ref,
|
|
55
58
|
onClick: onSelected,
|
|
59
|
+
onKeyDown: onKeyDown,
|
|
56
60
|
"aria-label": ariaLabelText,
|
|
57
61
|
"aria-expanded": ariaExpanded,
|
|
58
62
|
"aria-controls": ariaControls
|
|
@@ -119,7 +119,9 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
119
119
|
_useState10 = (0, _slicedToArray2.default)(_useState1, 2),
|
|
120
120
|
selectedTone = _useState10[0],
|
|
121
121
|
setSelectedTone = _useState10[1];
|
|
122
|
-
var _useState11 = (0, _react.useState)(
|
|
122
|
+
var _useState11 = (0, _react.useState)(function () {
|
|
123
|
+
return isTeamojiExperimentEnabled ? (0, _productivityColors.getStoredProductivityColor)() : _productivityColors.defaultProductivityColor;
|
|
124
|
+
}),
|
|
123
125
|
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
124
126
|
selectedProductivityColor = _useState12[0],
|
|
125
127
|
setSelectedProductivityColor = _useState12[1];
|
|
@@ -349,6 +351,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
349
351
|
}, [fireAnalytics]);
|
|
350
352
|
var onProductivityColorSelected = (0, _react.useCallback)(function (color) {
|
|
351
353
|
setSelectedProductivityColor(color);
|
|
354
|
+
(0, _productivityColors.storeProductivityColor)(color);
|
|
352
355
|
}, []);
|
|
353
356
|
var onSelectWrapper = (0, _react.useCallback)(function (emojiId, emoji, event) {
|
|
354
357
|
if (onSelection) {
|
|
@@ -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.3.
|
|
23
|
+
packageVersion: "71.3.2"
|
|
24
24
|
}, attributes)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.yourUploadsCategory = exports.userCustomTitle = exports.sizeGap = exports.selectedToneStorageKey = exports.searchCategory = exports.scaledEmojiHeightH4 = exports.scaledEmojiHeightH3 = exports.scaledEmojiHeightH2 = exports.scaledEmojiHeightH1 = exports.migrationUserId = exports.localStoragePrefix = exports.frequentCategory = exports.emojiPickerWidth = exports.emojiPickerPreviewHeight = exports.emojiPickerMinHeight = exports.emojiPickerListHeightNew = exports.emojiPickerListHeight = exports.emojiPickerHeightWithPreview = exports.emojiPickerHeight = exports.denseEmojiHeightH4 = exports.denseEmojiHeightH3 = exports.denseEmojiHeightH2 = exports.denseEmojiHeightH1 = exports.deleteEmojiLabel = exports.defaultListLimit = exports.defaultInlineEmojiHeight = exports.defaultEmojiPickerSize = exports.defaultEmojiHeight = exports.defaultDenseEmojiHeight = exports.defaultCategories = exports.dataURLPrefix = exports.customType = exports.customTitle = exports.customCategory = exports.analyticsEmojiPrefix = exports.TONESELECTOR_KEYBOARD_KEYS_SUPPORTED = exports.SAMPLING_RATE_EMOJI_RESOURCE_FETCHED_EXP = exports.SAMPLING_RATE_EMOJI_RENDERED_EXP = exports.MAX_ORDINAL = exports.KeyboardNavigationDirection = exports.KeyboardKeys = exports.EMOJI_SEARCH_DEBOUNCE = exports.EMOJI_LIST_PAGE_COUNT = exports.EMOJI_LIST_COLUMNS = exports.EMOJI_KEYBOARD_KEYS_SUPPORTED = exports.EMOJIPICKERLIST_KEYBOARD_KEYS_SUPPORTED = exports.DEFAULT_TONE = exports.CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED = void 0;
|
|
6
|
+
exports.yourUploadsCategory = exports.userCustomTitle = exports.sizeGap = exports.selectedToneStorageKey = exports.selectedProductivityColorStorageKey = exports.searchCategory = exports.scaledEmojiHeightH4 = exports.scaledEmojiHeightH3 = exports.scaledEmojiHeightH2 = exports.scaledEmojiHeightH1 = exports.migrationUserId = exports.localStoragePrefix = exports.frequentCategory = exports.emojiPickerWidth = exports.emojiPickerPreviewHeight = exports.emojiPickerMinHeight = exports.emojiPickerListHeightNew = exports.emojiPickerListHeight = exports.emojiPickerHeightWithPreview = exports.emojiPickerHeight = exports.denseEmojiHeightH4 = exports.denseEmojiHeightH3 = exports.denseEmojiHeightH2 = exports.denseEmojiHeightH1 = exports.deleteEmojiLabel = exports.defaultListLimit = exports.defaultInlineEmojiHeight = exports.defaultEmojiPickerSize = exports.defaultEmojiHeight = exports.defaultDenseEmojiHeight = exports.defaultCategories = exports.dataURLPrefix = exports.customType = exports.customTitle = exports.customCategory = exports.analyticsEmojiPrefix = exports.TONESELECTOR_KEYBOARD_KEYS_SUPPORTED = exports.SAMPLING_RATE_EMOJI_RESOURCE_FETCHED_EXP = exports.SAMPLING_RATE_EMOJI_RENDERED_EXP = exports.MAX_ORDINAL = exports.KeyboardNavigationDirection = exports.KeyboardKeys = exports.EMOJI_SEARCH_DEBOUNCE = exports.EMOJI_LIST_PAGE_COUNT = exports.EMOJI_LIST_COLUMNS = exports.EMOJI_KEYBOARD_KEYS_SUPPORTED = exports.EMOJIPICKERLIST_KEYBOARD_KEYS_SUPPORTED = exports.DEFAULT_TONE = exports.CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED = void 0;
|
|
7
7
|
var customCategory = exports.customCategory = 'CUSTOM';
|
|
8
8
|
var frequentCategory = exports.frequentCategory = 'FREQUENT';
|
|
9
9
|
var customType = exports.customType = 'SITE';
|
|
@@ -45,6 +45,7 @@ var emojiPickerPreviewHeight = exports.emojiPickerPreviewHeight = 54;
|
|
|
45
45
|
var emojiPickerHeightWithPreview = exports.emojiPickerHeightWithPreview = emojiPickerHeight + emojiPickerPreviewHeight;
|
|
46
46
|
var localStoragePrefix = exports.localStoragePrefix = 'fabric.emoji';
|
|
47
47
|
var selectedToneStorageKey = exports.selectedToneStorageKey = "".concat(localStoragePrefix, ".selectedTone");
|
|
48
|
+
var selectedProductivityColorStorageKey = exports.selectedProductivityColorStorageKey = "".concat(localStoragePrefix, ".selectedProductivityColor");
|
|
48
49
|
var defaultCategories = exports.defaultCategories = ['PEOPLE', 'NATURE', 'FOODS', 'ACTIVITY', 'PLACES', 'OBJECTS', 'SYMBOLS', 'FLAGS'];
|
|
49
50
|
var KeyboardKeys = exports.KeyboardKeys = /*#__PURE__*/function (KeyboardKeys) {
|
|
50
51
|
KeyboardKeys["ArrowLeft"] = "ArrowLeft";
|
|
@@ -1,13 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
|
-
exports.productivityColors = exports.isProductivityNumberEmoji = exports.getProductivityColorPreviewEmojis = exports.getProductivityColor = exports.filterProductivityEmojisByColor = exports.defaultProductivityColor = void 0;
|
|
7
|
+
exports.storeProductivityColor = exports.productivityColors = exports.isProductivityNumberEmoji = exports.getStoredProductivityColor = exports.getProductivityColorPreviewEmojis = exports.getProductivityColor = exports.filterProductivityEmojisByColor = exports.defaultProductivityColor = void 0;
|
|
8
|
+
var _constants = require("./constants");
|
|
9
|
+
var _storageAvailable = _interopRequireDefault(require("./storage-available"));
|
|
7
10
|
var productivityColors = exports.productivityColors = ['gray', 'magenta', 'purple', 'blue', 'teal', 'green', 'lime', 'yellow', 'orange', 'red'];
|
|
8
11
|
var productivityColorSet = new Set(productivityColors);
|
|
9
12
|
var zeroSquareVariantParent = '0_zero_square_blue';
|
|
10
13
|
var defaultProductivityColor = exports.defaultProductivityColor = 'blue';
|
|
14
|
+
var isProductivityColor = function isProductivityColor(color) {
|
|
15
|
+
return !!color && productivityColorSet.has(color);
|
|
16
|
+
};
|
|
17
|
+
var getStoredProductivityColor = exports.getStoredProductivityColor = function getStoredProductivityColor() {
|
|
18
|
+
if (typeof window === 'undefined' || !(0, _storageAvailable.default)('localStorage')) {
|
|
19
|
+
return defaultProductivityColor;
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
var storedColor = window.localStorage.getItem(_constants.selectedProductivityColorStorageKey);
|
|
23
|
+
return isProductivityColor(storedColor) ? storedColor : defaultProductivityColor;
|
|
24
|
+
} catch (error) {
|
|
25
|
+
// eslint-disable-next-line no-console
|
|
26
|
+
console.error('failed to load selected productivity emoji colour', error);
|
|
27
|
+
return defaultProductivityColor;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var storeProductivityColor = exports.storeProductivityColor = function storeProductivityColor(color) {
|
|
31
|
+
if (typeof window === 'undefined' || !(0, _storageAvailable.default)('localStorage')) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
window.localStorage.setItem(_constants.selectedProductivityColorStorageKey, color);
|
|
36
|
+
} catch (error) {
|
|
37
|
+
// eslint-disable-next-line no-console
|
|
38
|
+
console.error('failed to store selected productivity emoji colour', error);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
11
41
|
var getProductivityVariant = function getProductivityVariant(emoji) {
|
|
12
42
|
if (emoji.type !== 'ATLASSIAN' || !emoji.color || !productivityColorSet.has(emoji.color)) {
|
|
13
43
|
return undefined;
|
|
@@ -87,7 +87,9 @@ const TonesWrapper = props => {
|
|
|
87
87
|
formatMessage
|
|
88
88
|
} = intl;
|
|
89
89
|
const tonePreviewButtonRef = useRef(null);
|
|
90
|
+
const openProductivityColorSelectorWithKeyboard = useRef(false);
|
|
90
91
|
const [focusTonePreviewButton, setFocusTonePreviewButton] = useState(false);
|
|
92
|
+
const [focusSelectedProductivityColorOnMount, setFocusSelectedProductivityColorOnMount] = useState(false);
|
|
91
93
|
useLayoutEffect(() => {
|
|
92
94
|
if (focusTonePreviewButton && !showToneSelector) {
|
|
93
95
|
var _tonePreviewButtonRef;
|
|
@@ -114,8 +116,19 @@ const TonesWrapper = props => {
|
|
|
114
116
|
const onProductivityColorSelectedHandler = useCallback(color => {
|
|
115
117
|
onProductivityColorSelected === null || onProductivityColorSelected === void 0 ? void 0 : onProductivityColorSelected(color);
|
|
116
118
|
onToneClose();
|
|
117
|
-
|
|
119
|
+
setFocusSelectedProductivityColorOnMount(false);
|
|
118
120
|
}, [onProductivityColorSelected, onToneClose]);
|
|
121
|
+
const onProductivityColorToggle = useCallback(event => {
|
|
122
|
+
const isKeyboardClick = (event === null || event === void 0 ? void 0 : event.detail) === 0;
|
|
123
|
+
setFocusSelectedProductivityColorOnMount(!showToneSelector && (openProductivityColorSelectorWithKeyboard.current || isKeyboardClick));
|
|
124
|
+
openProductivityColorSelectorWithKeyboard.current = false;
|
|
125
|
+
onToneToggle();
|
|
126
|
+
}, [onToneToggle, showToneSelector]);
|
|
127
|
+
const onProductivityColorPreviewKeyDown = useCallback(event => {
|
|
128
|
+
if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') {
|
|
129
|
+
openProductivityColorSelectorWithKeyboard.current = true;
|
|
130
|
+
}
|
|
131
|
+
}, []);
|
|
119
132
|
const shouldShowProductivityColorSelector = !!(activeCategoryId === 'ATLASSIAN' && productivityColorPreviewEmojis && selectedProductivityColor && onProductivityColorSelected && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false));
|
|
120
133
|
if (shouldShowProductivityColorSelector) {
|
|
121
134
|
const previewEmoji = (productivityColorPreviewEmojis === null || productivityColorPreviewEmojis === void 0 ? void 0 : productivityColorPreviewEmojis[selectedProductivityColor]) || Object.values(productivityColorPreviewEmojis || {})[0];
|
|
@@ -134,6 +147,7 @@ const TonesWrapper = props => {
|
|
|
134
147
|
className: ax(["_19itia51 _2rkofajl _bfhk1bhr _16qs130s _ca0q12x7 _u5f312x7 _n3td12x7 _19bv12x7"])
|
|
135
148
|
}, /*#__PURE__*/React.createElement(ProductivityColorSelector, {
|
|
136
149
|
colorPreviewEmojis: productivityColorPreviewEmojis,
|
|
150
|
+
focusSelectedColorOnMount: focusSelectedProductivityColorOnMount,
|
|
137
151
|
selectedColor: selectedProductivityColor,
|
|
138
152
|
onColorSelected: onProductivityColorSelectedHandler
|
|
139
153
|
}))), /*#__PURE__*/React.createElement(TonePreviewButton, {
|
|
@@ -142,7 +156,8 @@ const TonesWrapper = props => {
|
|
|
142
156
|
ariaExpanded: showToneSelector,
|
|
143
157
|
emoji: previewEmoji,
|
|
144
158
|
selectOnHover: true,
|
|
145
|
-
|
|
159
|
+
onKeyDown: onProductivityColorPreviewKeyDown,
|
|
160
|
+
onSelected: onProductivityColorToggle,
|
|
146
161
|
ariaLabelText: formatMessage(messages.emojiSelectColorButtonAriaLabelText)
|
|
147
162
|
}));
|
|
148
163
|
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
._12hvze3t input{margin-right:var(--ds-space-0,0)}
|
|
6
6
|
._12ultlke input{cursor:pointer}
|
|
7
7
|
._13yj1o36 input:focus+span{outline-width:medium}
|
|
8
|
+
._15fn7qp0 input:checked+span{background-color:var(--ds-background-accent-gray-subtler,#dddee1)}
|
|
8
9
|
._17muzwfg label{height:2pc}
|
|
9
10
|
._18m915vq{overflow-y:hidden}
|
|
10
11
|
._18u0ze3t{margin-left:var(--ds-space-0,0)}
|
|
@@ -52,7 +53,6 @@
|
|
|
52
53
|
._pytkzwfg input{height:2pc}
|
|
53
54
|
._smb7plhp input:hover+span{background-color:var(--ds-background-neutral-hovered,#0b120e24)}
|
|
54
55
|
._soq51h6o input+span{align-items:center}
|
|
55
|
-
._szw2w5lj input:checked+span{box-shadow:0 0 0 2px var(--ds-border-selected,#1868db)}
|
|
56
56
|
._tnsm1r31 input:focus+span{outline-color:currentColor}
|
|
57
57
|
._u5f3idpf{padding-right:0}
|
|
58
58
|
._x5bdze3t input{margin-bottom:var(--ds-space-0,0)}
|
|
@@ -17,6 +17,7 @@ const colorOptionEmoji = null;
|
|
|
17
17
|
const getColorLabel = color => `${color.charAt(0).toUpperCase()}${color.slice(1)} productivity emoji colour`;
|
|
18
18
|
export const ProductivityColorSelector = ({
|
|
19
19
|
colorPreviewEmojis,
|
|
20
|
+
focusSelectedColorOnMount = false,
|
|
20
21
|
onColorSelected,
|
|
21
22
|
selectedColor
|
|
22
23
|
}) => {
|
|
@@ -63,15 +64,13 @@ export const ProductivityColorSelector = ({
|
|
|
63
64
|
};
|
|
64
65
|
return /*#__PURE__*/React.createElement("div", {
|
|
65
66
|
key: color,
|
|
66
|
-
className: ax(["_4t3izwfg _kqswh2mm _1bsbzwfg _1355fajl _soq51h6o _ngzz1txw _1030zwfg _6vsr1h6o _ecyuidpf _8qdiidpf _7kzvidpf _ev8ridpf _6rawzwfg _tnsm1r31 _hxs6glyw _13yj1o36 _1pi91y54 _1rgq13zc _1eq11h6o _1vzltlke _17muzwfg _1wqq1h6o _1p1fzwfg _12ultlke _pytkzwfg _2x4gze3t _12hvze3t _x5bdze3t _1rgfze3t _1e7sidpf _khufstnw _5hv9zwfg _1nn0kb7n _smb7plhp
|
|
67
|
+
className: ax(["_4t3izwfg _kqswh2mm _1bsbzwfg _1355fajl _soq51h6o _ngzz1txw _1030zwfg _6vsr1h6o _ecyuidpf _8qdiidpf _7kzvidpf _ev8ridpf _6rawzwfg _tnsm1r31 _hxs6glyw _13yj1o36 _1pi91y54 _1rgq13zc _1eq11h6o _1vzltlke _17muzwfg _1wqq1h6o _1p1fzwfg _12ultlke _pytkzwfg _2x4gze3t _12hvze3t _x5bdze3t _1rgfze3t _1e7sidpf _khufstnw _5hv9zwfg _1nn0kb7n _smb7plhp _15fn7qp0"])
|
|
67
68
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
68
69
|
ref: el => {
|
|
69
70
|
radioRefs.current[index] = el;
|
|
70
|
-
if (selectedColor === color) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
hasFocusedSelectedColor.current = true;
|
|
74
|
-
}
|
|
71
|
+
if (focusSelectedColorOnMount && selectedColor === color && el && !hasFocusedSelectedColor.current) {
|
|
72
|
+
el.focus();
|
|
73
|
+
hasFocusedSelectedColor.current = true;
|
|
75
74
|
}
|
|
76
75
|
},
|
|
77
76
|
ariaLabel: getColorLabel(color),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
._19itia51{border:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
|
|
3
3
|
._19itidpf{border:0}
|
|
4
|
+
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
4
5
|
._2rkofajl{border-radius:var(--ds-radius-small,3px)}._11bcidpf::-moz-focus-inner{border-width:0}
|
|
5
6
|
._dqozglyw::-moz-focus-inner{border-style:none}
|
|
6
7
|
._19bvidpf{padding-left:0}
|
|
@@ -10,6 +10,7 @@ export const tonePreviewTestId = 'tone-preview';
|
|
|
10
10
|
const emojiButton = null;
|
|
11
11
|
const hidden = null;
|
|
12
12
|
const emojiButtonOutline = null;
|
|
13
|
+
const emojiButtonBorderRadius = null;
|
|
13
14
|
export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
14
15
|
const {
|
|
15
16
|
emoji,
|
|
@@ -17,6 +18,7 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
17
18
|
ariaControls = 'emoji-picker-tone-selector',
|
|
18
19
|
ariaLabelText,
|
|
19
20
|
ariaExpanded,
|
|
21
|
+
onKeyDown,
|
|
20
22
|
onSelected,
|
|
21
23
|
isVisible = true
|
|
22
24
|
} = props;
|
|
@@ -24,6 +26,7 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
24
26
|
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("button", {
|
|
25
27
|
ref: ref,
|
|
26
28
|
onClick: onSelected,
|
|
29
|
+
onKeyDown: onKeyDown,
|
|
27
30
|
"aria-label": ariaLabelText,
|
|
28
31
|
"aria-expanded": ariaExpanded,
|
|
29
32
|
"aria-controls": ariaControls
|
|
@@ -34,7 +37,7 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
34
37
|
},
|
|
35
38
|
"data-testid": tonePreviewTestId,
|
|
36
39
|
type: "button",
|
|
37
|
-
className: ax(["_19itidpf _2rkofajl _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _bfhk1j28 _80omtlke _kqswh2mm _1e0c1o8l _lev4idpf _1cx6idpf _tyukidpf _2ewlidpf _11bcidpf _dqozglyw _1at812x7 _1cjo12x7 _1yg612x7 _hjaq12x7 _hlt21tcg _1s3c1tcg _1i911tcg _1ye71tcg _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc", !isVisible && "_tzy4idpf _3um015vq _1e0cglyw", "_19itia51"])
|
|
40
|
+
className: ax(["_19itidpf _2rkofajl _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _bfhk1j28 _80omtlke _kqswh2mm _1e0c1o8l _lev4idpf _1cx6idpf _tyukidpf _2ewlidpf _11bcidpf _dqozglyw _1at812x7 _1cjo12x7 _1yg612x7 _hjaq12x7 _hlt21tcg _1s3c1tcg _1i911tcg _1ye71tcg _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc", !isVisible && "_tzy4idpf _3um015vq _1e0cglyw", "_19itia51", "_2rko1qi0"])
|
|
38
41
|
}, /*#__PURE__*/React.createElement(Emoji, {
|
|
39
42
|
emoji: emoji,
|
|
40
43
|
selectOnHover: selectOnHover,
|
|
@@ -44,6 +47,7 @@ export const TonePreviewButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
44
47
|
})) : /*#__PURE__*/React.createElement("button", {
|
|
45
48
|
ref: ref,
|
|
46
49
|
onClick: onSelected,
|
|
50
|
+
onKeyDown: onKeyDown,
|
|
47
51
|
"aria-label": ariaLabelText,
|
|
48
52
|
"aria-expanded": ariaExpanded,
|
|
49
53
|
"aria-controls": ariaControls
|
|
@@ -26,7 +26,7 @@ import { createAndFireEventInElementsChannel, categoryClickedEvent, closedPicker
|
|
|
26
26
|
import { useEmoji } from '../../hooks/useEmoji';
|
|
27
27
|
import { useIsMounted } from '../../hooks/useIsMounted';
|
|
28
28
|
import { messages } from '../i18n';
|
|
29
|
-
import { defaultProductivityColor } from '../../util/productivity-colors';
|
|
29
|
+
import { defaultProductivityColor, getStoredProductivityColor, storeProductivityColor } from '../../util/productivity-colors';
|
|
30
30
|
import { filterHiddenEmojis } from '../../util/hidden-emojis';
|
|
31
31
|
const emojiPickerBoxShadow = "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)";
|
|
32
32
|
const emojiPickerHeight = 295;
|
|
@@ -87,7 +87,7 @@ const EmojiPickerComponent = ({
|
|
|
87
87
|
const [query, setQuery] = useState('');
|
|
88
88
|
const [dynamicCategories, setDynamicCategories] = useState([]);
|
|
89
89
|
const [selectedTone, setSelectedTone] = useState(!hideToneSelector ? emojiProvider.getSelectedTone() : undefined);
|
|
90
|
-
const [selectedProductivityColor, setSelectedProductivityColor] = useState(defaultProductivityColor);
|
|
90
|
+
const [selectedProductivityColor, setSelectedProductivityColor] = useState(() => isTeamojiExperimentEnabled ? getStoredProductivityColor() : defaultProductivityColor);
|
|
91
91
|
const [loading, setLoading] = useState(true);
|
|
92
92
|
const [uploading, setUploading] = useState(false);
|
|
93
93
|
const [selectedEmoji, setSelectedEmoji] = useState();
|
|
@@ -290,6 +290,7 @@ const EmojiPickerComponent = ({
|
|
|
290
290
|
}, [fireAnalytics]);
|
|
291
291
|
const onProductivityColorSelected = useCallback(color => {
|
|
292
292
|
setSelectedProductivityColor(color);
|
|
293
|
+
storeProductivityColor(color);
|
|
293
294
|
}, []);
|
|
294
295
|
const onSelectWrapper = useCallback((emojiId, emoji, event) => {
|
|
295
296
|
if (onSelection) {
|
|
@@ -39,6 +39,7 @@ export const emojiPickerPreviewHeight = 54;
|
|
|
39
39
|
export const emojiPickerHeightWithPreview = emojiPickerHeight + emojiPickerPreviewHeight;
|
|
40
40
|
export const localStoragePrefix = 'fabric.emoji';
|
|
41
41
|
export const selectedToneStorageKey = `${localStoragePrefix}.selectedTone`;
|
|
42
|
+
export const selectedProductivityColorStorageKey = `${localStoragePrefix}.selectedProductivityColor`;
|
|
42
43
|
export const defaultCategories = ['PEOPLE', 'NATURE', 'FOODS', 'ACTIVITY', 'PLACES', 'OBJECTS', 'SYMBOLS', 'FLAGS'];
|
|
43
44
|
export let KeyboardKeys = /*#__PURE__*/function (KeyboardKeys) {
|
|
44
45
|
KeyboardKeys["ArrowLeft"] = "ArrowLeft";
|
|
@@ -1,7 +1,34 @@
|
|
|
1
|
+
import { selectedProductivityColorStorageKey } from './constants';
|
|
2
|
+
import storageAvailable from './storage-available';
|
|
1
3
|
export const productivityColors = ['gray', 'magenta', 'purple', 'blue', 'teal', 'green', 'lime', 'yellow', 'orange', 'red'];
|
|
2
4
|
const productivityColorSet = new Set(productivityColors);
|
|
3
5
|
const zeroSquareVariantParent = '0_zero_square_blue';
|
|
4
6
|
export const defaultProductivityColor = 'blue';
|
|
7
|
+
const isProductivityColor = color => !!color && productivityColorSet.has(color);
|
|
8
|
+
export const getStoredProductivityColor = () => {
|
|
9
|
+
if (typeof window === 'undefined' || !storageAvailable('localStorage')) {
|
|
10
|
+
return defaultProductivityColor;
|
|
11
|
+
}
|
|
12
|
+
try {
|
|
13
|
+
const storedColor = window.localStorage.getItem(selectedProductivityColorStorageKey);
|
|
14
|
+
return isProductivityColor(storedColor) ? storedColor : defaultProductivityColor;
|
|
15
|
+
} catch (error) {
|
|
16
|
+
// eslint-disable-next-line no-console
|
|
17
|
+
console.error('failed to load selected productivity emoji colour', error);
|
|
18
|
+
return defaultProductivityColor;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export const storeProductivityColor = color => {
|
|
22
|
+
if (typeof window === 'undefined' || !storageAvailable('localStorage')) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
window.localStorage.setItem(selectedProductivityColorStorageKey, color);
|
|
27
|
+
} catch (error) {
|
|
28
|
+
// eslint-disable-next-line no-console
|
|
29
|
+
console.error('failed to store selected productivity emoji colour', error);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
5
32
|
const getProductivityVariant = emoji => {
|
|
6
33
|
if (emoji.type !== 'ATLASSIAN' || !emoji.color || !productivityColorSet.has(emoji.color)) {
|
|
7
34
|
return undefined;
|
|
@@ -85,10 +85,15 @@ var TonesWrapper = function TonesWrapper(props) {
|
|
|
85
85
|
showToneSelector = props.showToneSelector;
|
|
86
86
|
var formatMessage = intl.formatMessage;
|
|
87
87
|
var tonePreviewButtonRef = useRef(null);
|
|
88
|
+
var openProductivityColorSelectorWithKeyboard = useRef(false);
|
|
88
89
|
var _useState = useState(false),
|
|
89
90
|
_useState2 = _slicedToArray(_useState, 2),
|
|
90
91
|
focusTonePreviewButton = _useState2[0],
|
|
91
92
|
setFocusTonePreviewButton = _useState2[1];
|
|
93
|
+
var _useState3 = useState(false),
|
|
94
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
95
|
+
focusSelectedProductivityColorOnMount = _useState4[0],
|
|
96
|
+
setFocusSelectedProductivityColorOnMount = _useState4[1];
|
|
92
97
|
useLayoutEffect(function () {
|
|
93
98
|
if (focusTonePreviewButton && !showToneSelector) {
|
|
94
99
|
var _tonePreviewButtonRef;
|
|
@@ -111,8 +116,19 @@ var TonesWrapper = function TonesWrapper(props) {
|
|
|
111
116
|
var onProductivityColorSelectedHandler = useCallback(function (color) {
|
|
112
117
|
onProductivityColorSelected === null || onProductivityColorSelected === void 0 || onProductivityColorSelected(color);
|
|
113
118
|
onToneClose();
|
|
114
|
-
|
|
119
|
+
setFocusSelectedProductivityColorOnMount(false);
|
|
115
120
|
}, [onProductivityColorSelected, onToneClose]);
|
|
121
|
+
var onProductivityColorToggle = useCallback(function (event) {
|
|
122
|
+
var isKeyboardClick = (event === null || event === void 0 ? void 0 : event.detail) === 0;
|
|
123
|
+
setFocusSelectedProductivityColorOnMount(!showToneSelector && (openProductivityColorSelectorWithKeyboard.current || isKeyboardClick));
|
|
124
|
+
openProductivityColorSelectorWithKeyboard.current = false;
|
|
125
|
+
onToneToggle();
|
|
126
|
+
}, [onToneToggle, showToneSelector]);
|
|
127
|
+
var onProductivityColorPreviewKeyDown = useCallback(function (event) {
|
|
128
|
+
if (event.key === 'Enter' || event.key === ' ' || event.key === 'Spacebar') {
|
|
129
|
+
openProductivityColorSelectorWithKeyboard.current = true;
|
|
130
|
+
}
|
|
131
|
+
}, []);
|
|
116
132
|
var shouldShowProductivityColorSelector = !!(activeCategoryId === 'ATLASSIAN' && productivityColorPreviewEmojis && selectedProductivityColor && onProductivityColorSelected && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false));
|
|
117
133
|
if (shouldShowProductivityColorSelector) {
|
|
118
134
|
var previewEmoji = (productivityColorPreviewEmojis === null || productivityColorPreviewEmojis === void 0 ? void 0 : productivityColorPreviewEmojis[selectedProductivityColor]) || Object.values(productivityColorPreviewEmojis || {})[0];
|
|
@@ -131,6 +147,7 @@ var TonesWrapper = function TonesWrapper(props) {
|
|
|
131
147
|
className: ax(["_19itia51 _2rkofajl _bfhk1bhr _16qs130s _ca0q12x7 _u5f312x7 _n3td12x7 _19bv12x7"])
|
|
132
148
|
}, /*#__PURE__*/React.createElement(ProductivityColorSelector, {
|
|
133
149
|
colorPreviewEmojis: productivityColorPreviewEmojis,
|
|
150
|
+
focusSelectedColorOnMount: focusSelectedProductivityColorOnMount,
|
|
134
151
|
selectedColor: selectedProductivityColor,
|
|
135
152
|
onColorSelected: onProductivityColorSelectedHandler
|
|
136
153
|
}))), /*#__PURE__*/React.createElement(TonePreviewButton, {
|
|
@@ -139,7 +156,8 @@ var TonesWrapper = function TonesWrapper(props) {
|
|
|
139
156
|
ariaExpanded: showToneSelector,
|
|
140
157
|
emoji: previewEmoji,
|
|
141
158
|
selectOnHover: true,
|
|
142
|
-
|
|
159
|
+
onKeyDown: onProductivityColorPreviewKeyDown,
|
|
160
|
+
onSelected: onProductivityColorToggle,
|
|
143
161
|
ariaLabelText: formatMessage(messages.emojiSelectColorButtonAriaLabelText)
|
|
144
162
|
}));
|
|
145
163
|
}
|
|
@@ -187,10 +205,10 @@ export var EmojiActions = function EmojiActions(props) {
|
|
|
187
205
|
query = props.query,
|
|
188
206
|
_props$resultsCount = props.resultsCount,
|
|
189
207
|
resultsCount = _props$resultsCount === void 0 ? 0 : _props$resultsCount;
|
|
190
|
-
var
|
|
191
|
-
|
|
192
|
-
showToneSelector =
|
|
193
|
-
setShowToneSelector =
|
|
208
|
+
var _useState5 = useState(false),
|
|
209
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
210
|
+
showToneSelector = _useState6[0],
|
|
211
|
+
setShowToneSelector = _useState6[1];
|
|
194
212
|
var wasProductivityColorSelectorOpen = useRef(false);
|
|
195
213
|
var shouldUseProductivityColorControl = !!(props.activeCategoryId === 'ATLASSIAN' && props.productivityColorPreviewEmojis && props.selectedProductivityColor && props.onProductivityColorSelected && FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false));
|
|
196
214
|
var onToneOpenHandler = useCallback(function () {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
._12hvze3t input{margin-right:var(--ds-space-0,0)}
|
|
6
6
|
._12ultlke input{cursor:pointer}
|
|
7
7
|
._13yj1o36 input:focus+span{outline-width:medium}
|
|
8
|
+
._15fn7qp0 input:checked+span{background-color:var(--ds-background-accent-gray-subtler,#dddee1)}
|
|
8
9
|
._17muzwfg label{height:2pc}
|
|
9
10
|
._18m915vq{overflow-y:hidden}
|
|
10
11
|
._18u0ze3t{margin-left:var(--ds-space-0,0)}
|
|
@@ -52,7 +53,6 @@
|
|
|
52
53
|
._pytkzwfg input{height:2pc}
|
|
53
54
|
._smb7plhp input:hover+span{background-color:var(--ds-background-neutral-hovered,#0b120e24)}
|
|
54
55
|
._soq51h6o input+span{align-items:center}
|
|
55
|
-
._szw2w5lj input:checked+span{box-shadow:0 0 0 2px var(--ds-border-selected,#1868db)}
|
|
56
56
|
._tnsm1r31 input:focus+span{outline-color:currentColor}
|
|
57
57
|
._u5f3idpf{padding-right:0}
|
|
58
58
|
._x5bdze3t input{margin-bottom:var(--ds-space-0,0)}
|
|
@@ -19,6 +19,8 @@ var getColorLabel = function getColorLabel(color) {
|
|
|
19
19
|
};
|
|
20
20
|
export var ProductivityColorSelector = function ProductivityColorSelector(_ref) {
|
|
21
21
|
var colorPreviewEmojis = _ref.colorPreviewEmojis,
|
|
22
|
+
_ref$focusSelectedCol = _ref.focusSelectedColorOnMount,
|
|
23
|
+
focusSelectedColorOnMount = _ref$focusSelectedCol === void 0 ? false : _ref$focusSelectedCol,
|
|
22
24
|
onColorSelected = _ref.onColorSelected,
|
|
23
25
|
selectedColor = _ref.selectedColor;
|
|
24
26
|
var intl = useContext(IntlContext);
|
|
@@ -66,15 +68,13 @@ export var ProductivityColorSelector = function ProductivityColorSelector(_ref)
|
|
|
66
68
|
};
|
|
67
69
|
return /*#__PURE__*/React.createElement("div", {
|
|
68
70
|
key: color,
|
|
69
|
-
className: ax(["_4t3izwfg _kqswh2mm _1bsbzwfg _1355fajl _soq51h6o _ngzz1txw _1030zwfg _6vsr1h6o _ecyuidpf _8qdiidpf _7kzvidpf _ev8ridpf _6rawzwfg _tnsm1r31 _hxs6glyw _13yj1o36 _1pi91y54 _1rgq13zc _1eq11h6o _1vzltlke _17muzwfg _1wqq1h6o _1p1fzwfg _12ultlke _pytkzwfg _2x4gze3t _12hvze3t _x5bdze3t _1rgfze3t _1e7sidpf _khufstnw _5hv9zwfg _1nn0kb7n _smb7plhp
|
|
71
|
+
className: ax(["_4t3izwfg _kqswh2mm _1bsbzwfg _1355fajl _soq51h6o _ngzz1txw _1030zwfg _6vsr1h6o _ecyuidpf _8qdiidpf _7kzvidpf _ev8ridpf _6rawzwfg _tnsm1r31 _hxs6glyw _13yj1o36 _1pi91y54 _1rgq13zc _1eq11h6o _1vzltlke _17muzwfg _1wqq1h6o _1p1fzwfg _12ultlke _pytkzwfg _2x4gze3t _12hvze3t _x5bdze3t _1rgfze3t _1e7sidpf _khufstnw _5hv9zwfg _1nn0kb7n _smb7plhp _15fn7qp0"])
|
|
70
72
|
}, /*#__PURE__*/React.createElement(Radio, {
|
|
71
73
|
ref: function ref(el) {
|
|
72
74
|
radioRefs.current[index] = el;
|
|
73
|
-
if (selectedColor === color) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
hasFocusedSelectedColor.current = true;
|
|
77
|
-
}
|
|
75
|
+
if (focusSelectedColorOnMount && selectedColor === color && el && !hasFocusedSelectedColor.current) {
|
|
76
|
+
el.focus();
|
|
77
|
+
hasFocusedSelectedColor.current = true;
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
ariaLabel: getColorLabel(color),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
._19itia51{border:var(--ds-border-width,1px) solid var(--ds-border,#0b120e24)}
|
|
3
3
|
._19itidpf{border:0}
|
|
4
|
+
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
4
5
|
._2rkofajl{border-radius:var(--ds-radius-small,3px)}._11bcidpf::-moz-focus-inner{border-width:0}
|
|
5
6
|
._dqozglyw::-moz-focus-inner{border-style:none}
|
|
6
7
|
._19bvidpf{padding-left:0}
|
|
@@ -10,6 +10,7 @@ export var tonePreviewTestId = 'tone-preview';
|
|
|
10
10
|
var emojiButton = null;
|
|
11
11
|
var hidden = null;
|
|
12
12
|
var emojiButtonOutline = null;
|
|
13
|
+
var emojiButtonBorderRadius = null;
|
|
13
14
|
export var TonePreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
14
15
|
var emoji = props.emoji,
|
|
15
16
|
selectOnHover = props.selectOnHover,
|
|
@@ -17,6 +18,7 @@ export var TonePreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
17
18
|
ariaControls = _props$ariaControls === void 0 ? 'emoji-picker-tone-selector' : _props$ariaControls,
|
|
18
19
|
ariaLabelText = props.ariaLabelText,
|
|
19
20
|
ariaExpanded = props.ariaExpanded,
|
|
21
|
+
onKeyDown = props.onKeyDown,
|
|
20
22
|
onSelected = props.onSelected,
|
|
21
23
|
_props$isVisible = props.isVisible,
|
|
22
24
|
isVisible = _props$isVisible === void 0 ? true : _props$isVisible;
|
|
@@ -24,6 +26,7 @@ export var TonePreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
24
26
|
return FeatureGates.getExperimentValue('platform_teamoji_26_refresh_emoji_picker', 'isEnabled', false) ? /*#__PURE__*/React.createElement("button", {
|
|
25
27
|
ref: ref,
|
|
26
28
|
onClick: onSelected,
|
|
29
|
+
onKeyDown: onKeyDown,
|
|
27
30
|
"aria-label": ariaLabelText,
|
|
28
31
|
"aria-expanded": ariaExpanded,
|
|
29
32
|
"aria-controls": ariaControls
|
|
@@ -34,7 +37,7 @@ export var TonePreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
34
37
|
},
|
|
35
38
|
"data-testid": tonePreviewTestId,
|
|
36
39
|
type: "button",
|
|
37
|
-
className: ax(["_19itidpf _2rkofajl _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _bfhk1j28 _80omtlke _kqswh2mm _1e0c1o8l _lev4idpf _1cx6idpf _tyukidpf _2ewlidpf _11bcidpf _dqozglyw _1at812x7 _1cjo12x7 _1yg612x7 _hjaq12x7 _hlt21tcg _1s3c1tcg _1i911tcg _1ye71tcg _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc", !isVisible && "_tzy4idpf _3um015vq _1e0cglyw", "_19itia51"])
|
|
40
|
+
className: ax(["_19itidpf _2rkofajl _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _bfhk1j28 _80omtlke _kqswh2mm _1e0c1o8l _lev4idpf _1cx6idpf _tyukidpf _2ewlidpf _11bcidpf _dqozglyw _1at812x7 _1cjo12x7 _1yg612x7 _hjaq12x7 _hlt21tcg _1s3c1tcg _1i911tcg _1ye71tcg _nt751r31 _49pcglyw _1hvw1o36 _7ehi1y54 _491113zc", !isVisible && "_tzy4idpf _3um015vq _1e0cglyw", "_19itia51", "_2rko1qi0"])
|
|
38
41
|
}, /*#__PURE__*/React.createElement(Emoji, {
|
|
39
42
|
emoji: emoji,
|
|
40
43
|
selectOnHover: selectOnHover,
|
|
@@ -44,6 +47,7 @@ export var TonePreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
44
47
|
})) : /*#__PURE__*/React.createElement("button", {
|
|
45
48
|
ref: ref,
|
|
46
49
|
onClick: onSelected,
|
|
50
|
+
onKeyDown: onKeyDown,
|
|
47
51
|
"aria-label": ariaLabelText,
|
|
48
52
|
"aria-expanded": ariaExpanded,
|
|
49
53
|
"aria-controls": ariaControls
|
|
@@ -33,7 +33,7 @@ import { createAndFireEventInElementsChannel, categoryClickedEvent, closedPicker
|
|
|
33
33
|
import { useEmoji } from '../../hooks/useEmoji';
|
|
34
34
|
import { useIsMounted } from '../../hooks/useIsMounted';
|
|
35
35
|
import { messages } from '../i18n';
|
|
36
|
-
import { defaultProductivityColor } from '../../util/productivity-colors';
|
|
36
|
+
import { defaultProductivityColor, getStoredProductivityColor, storeProductivityColor } from '../../util/productivity-colors';
|
|
37
37
|
import { filterHiddenEmojis } from '../../util/hidden-emojis';
|
|
38
38
|
var emojiPickerBoxShadow = "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)";
|
|
39
39
|
var emojiPickerHeight = 295;
|
|
@@ -110,7 +110,9 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
110
110
|
_useState10 = _slicedToArray(_useState1, 2),
|
|
111
111
|
selectedTone = _useState10[0],
|
|
112
112
|
setSelectedTone = _useState10[1];
|
|
113
|
-
var _useState11 = useState(
|
|
113
|
+
var _useState11 = useState(function () {
|
|
114
|
+
return isTeamojiExperimentEnabled ? getStoredProductivityColor() : defaultProductivityColor;
|
|
115
|
+
}),
|
|
114
116
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
115
117
|
selectedProductivityColor = _useState12[0],
|
|
116
118
|
setSelectedProductivityColor = _useState12[1];
|
|
@@ -340,6 +342,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
340
342
|
}, [fireAnalytics]);
|
|
341
343
|
var onProductivityColorSelected = useCallback(function (color) {
|
|
342
344
|
setSelectedProductivityColor(color);
|
|
345
|
+
storeProductivityColor(color);
|
|
343
346
|
}, []);
|
|
344
347
|
var onSelectWrapper = useCallback(function (emojiId, emoji, event) {
|
|
345
348
|
if (onSelection) {
|
|
@@ -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.3.
|
|
17
|
+
packageVersion: "71.3.2"
|
|
18
18
|
}, attributes)
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -39,6 +39,7 @@ export var emojiPickerPreviewHeight = 54;
|
|
|
39
39
|
export var emojiPickerHeightWithPreview = emojiPickerHeight + emojiPickerPreviewHeight;
|
|
40
40
|
export var localStoragePrefix = 'fabric.emoji';
|
|
41
41
|
export var selectedToneStorageKey = "".concat(localStoragePrefix, ".selectedTone");
|
|
42
|
+
export var selectedProductivityColorStorageKey = "".concat(localStoragePrefix, ".selectedProductivityColor");
|
|
42
43
|
export var defaultCategories = ['PEOPLE', 'NATURE', 'FOODS', 'ACTIVITY', 'PLACES', 'OBJECTS', 'SYMBOLS', 'FLAGS'];
|
|
43
44
|
export var KeyboardKeys = /*#__PURE__*/function (KeyboardKeys) {
|
|
44
45
|
KeyboardKeys["ArrowLeft"] = "ArrowLeft";
|
|
@@ -1,7 +1,36 @@
|
|
|
1
|
+
import { selectedProductivityColorStorageKey } from './constants';
|
|
2
|
+
import storageAvailable from './storage-available';
|
|
1
3
|
export var productivityColors = ['gray', 'magenta', 'purple', 'blue', 'teal', 'green', 'lime', 'yellow', 'orange', 'red'];
|
|
2
4
|
var productivityColorSet = new Set(productivityColors);
|
|
3
5
|
var zeroSquareVariantParent = '0_zero_square_blue';
|
|
4
6
|
export var defaultProductivityColor = 'blue';
|
|
7
|
+
var isProductivityColor = function isProductivityColor(color) {
|
|
8
|
+
return !!color && productivityColorSet.has(color);
|
|
9
|
+
};
|
|
10
|
+
export var getStoredProductivityColor = function getStoredProductivityColor() {
|
|
11
|
+
if (typeof window === 'undefined' || !storageAvailable('localStorage')) {
|
|
12
|
+
return defaultProductivityColor;
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
var storedColor = window.localStorage.getItem(selectedProductivityColorStorageKey);
|
|
16
|
+
return isProductivityColor(storedColor) ? storedColor : defaultProductivityColor;
|
|
17
|
+
} catch (error) {
|
|
18
|
+
// eslint-disable-next-line no-console
|
|
19
|
+
console.error('failed to load selected productivity emoji colour', error);
|
|
20
|
+
return defaultProductivityColor;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export var storeProductivityColor = function storeProductivityColor(color) {
|
|
24
|
+
if (typeof window === 'undefined' || !storageAvailable('localStorage')) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
try {
|
|
28
|
+
window.localStorage.setItem(selectedProductivityColorStorageKey, color);
|
|
29
|
+
} catch (error) {
|
|
30
|
+
// eslint-disable-next-line no-console
|
|
31
|
+
console.error('failed to store selected productivity emoji colour', error);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
5
34
|
var getProductivityVariant = function getProductivityVariant(emoji) {
|
|
6
35
|
if (emoji.type !== 'ATLASSIAN' || !emoji.color || !productivityColorSet.has(emoji.color)) {
|
|
7
36
|
return undefined;
|
|
@@ -9,9 +9,10 @@ export declare const productivityColorSelectorTestId = "productivity-color-selec
|
|
|
9
9
|
export declare const productivityColorSelectorId = "emoji-picker-productivity-color-selector";
|
|
10
10
|
export interface Props {
|
|
11
11
|
colorPreviewEmojis: Partial<Record<ProductivityColor, EmojiDescription>>;
|
|
12
|
+
focusSelectedColorOnMount?: boolean;
|
|
12
13
|
onColorSelected: (color: ProductivityColor) => void;
|
|
13
14
|
selectedColor: ProductivityColor;
|
|
14
15
|
}
|
|
15
|
-
export declare const ProductivityColorSelector: ({ colorPreviewEmojis, onColorSelected, selectedColor, }: Props) => JSX.Element | null;
|
|
16
|
+
export declare const ProductivityColorSelector: ({ colorPreviewEmojis, focusSelectedColorOnMount, onColorSelected, selectedColor, }: Props) => JSX.Element | null;
|
|
16
17
|
declare const _default_1: MemoExoticComponent<typeof ProductivityColorSelector>;
|
|
17
18
|
export default _default_1;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ForwardRefExoticComponent, type MemoExoticComponent, type RefAttributes } from 'react';
|
|
5
|
+
import { type ForwardRefExoticComponent, type KeyboardEventHandler, type MemoExoticComponent, type MouseEventHandler, type RefAttributes } from 'react';
|
|
6
6
|
import type { EmojiDescription } from '../../types';
|
|
7
7
|
export declare const tonePreviewTestId = "tone-preview";
|
|
8
8
|
export interface Props {
|
|
@@ -11,7 +11,8 @@ export interface Props {
|
|
|
11
11
|
ariaLabelText?: string;
|
|
12
12
|
emoji: EmojiDescription;
|
|
13
13
|
isVisible?: boolean;
|
|
14
|
-
|
|
14
|
+
onKeyDown?: KeyboardEventHandler<HTMLButtonElement>;
|
|
15
|
+
onSelected?: MouseEventHandler<HTMLButtonElement>;
|
|
15
16
|
selectOnHover?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export declare const TonePreviewButton: ForwardRefExoticComponent<Props & RefAttributes<HTMLButtonElement>>;
|
|
@@ -36,6 +36,7 @@ export declare const emojiPickerPreviewHeight = 54;
|
|
|
36
36
|
export declare const emojiPickerHeightWithPreview: number;
|
|
37
37
|
export declare const localStoragePrefix = "fabric.emoji";
|
|
38
38
|
export declare const selectedToneStorageKey: 'fabric.emoji.selectedTone';
|
|
39
|
+
export declare const selectedProductivityColorStorageKey: 'fabric.emoji.selectedProductivityColor';
|
|
39
40
|
export declare const defaultCategories: CategoryId[];
|
|
40
41
|
export declare enum KeyboardKeys {
|
|
41
42
|
ArrowLeft = "ArrowLeft",
|
|
@@ -2,6 +2,8 @@ import type { EmojiDescription } from '../types';
|
|
|
2
2
|
export declare const productivityColors: readonly ["gray", "magenta", "purple", "blue", "teal", "green", "lime", "yellow", "orange", "red"];
|
|
3
3
|
export type ProductivityColor = (typeof productivityColors)[number];
|
|
4
4
|
export declare const defaultProductivityColor: ProductivityColor;
|
|
5
|
+
export declare const getStoredProductivityColor: () => ProductivityColor;
|
|
6
|
+
export declare const storeProductivityColor: (color: ProductivityColor) => void;
|
|
5
7
|
export declare const getProductivityColor: (emoji: EmojiDescription) => ProductivityColor | undefined;
|
|
6
8
|
export declare const isProductivityNumberEmoji: (emoji: EmojiDescription) => boolean;
|
|
7
9
|
export declare const filterProductivityEmojisByColor: (emojis: EmojiDescription[], selectedColor: ProductivityColor) => EmojiDescription[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "71.3.
|
|
3
|
+
"version": "71.3.3",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -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": "^
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^109.0.0",
|
|
52
52
|
"@atlaskit/tokens": "^14.0.0",
|
|
53
53
|
"@atlaskit/tooltip": "^23.0.0",
|
|
54
54
|
"@atlaskit/ufo": "^1.0.0",
|