@atlaskit/emoji 69.0.1 → 69.0.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 +17 -0
- package/afm-cc/tsconfig.json +3 -0
- package/afm-jira/tsconfig.json +3 -0
- package/afm-post-office/tsconfig.json +3 -0
- package/dist/cjs/components/compiled/common/EmojiActions.js +1 -1
- package/dist/cjs/components/compiled/common/EmojiPreviewComponent.compiled.css +0 -1
- package/dist/cjs/components/compiled/common/EmojiPreviewComponent.js +1 -1
- package/dist/cjs/components/compiled/picker/CategorySelector.compiled.css +24 -0
- package/dist/cjs/components/compiled/picker/CategorySelector.js +161 -0
- package/dist/cjs/components/compiled/picker/EmojiPicker.compiled.css +12 -0
- package/dist/cjs/components/compiled/picker/EmojiPicker.js +109 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerCategoryHeading.compiled.css +9 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerCategoryHeading.js +43 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerComponent.compiled.css +20 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerComponent.js +574 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerEmojiRow.compiled.css +35 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerEmojiRow.js +76 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerFooter.compiled.css +5 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerFooter.js +33 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerListSearch.compiled.css +23 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerListSearch.js +93 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerTabPanel.compiled.css +6 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerTabPanel.js +60 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerVirtualItems.compiled.css +8 -0
- package/dist/cjs/components/compiled/picker/EmojiPickerVirtualItems.js +86 -0
- package/dist/cjs/components/compiled/picker/VirtualList.compiled.css +10 -0
- package/dist/cjs/components/compiled/picker/VirtualList.js +303 -0
- package/dist/cjs/components/picker/EmojiPickerFooter.js +0 -2
- package/dist/cjs/components/picker/EmojiPickerList.js +219 -145
- package/dist/cjs/components/picker/EmojiPickerTabPanel.js +67 -0
- package/dist/cjs/components/picker/styles.js +1 -10
- package/dist/cjs/index.js +4 -6
- package/dist/cjs/picker.js +5 -7
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/es2019/components/compiled/common/EmojiActions.js +1 -1
- package/dist/es2019/components/compiled/common/EmojiPreviewComponent.compiled.css +0 -1
- package/dist/es2019/components/compiled/common/EmojiPreviewComponent.js +1 -1
- package/dist/es2019/components/compiled/picker/CategorySelector.compiled.css +24 -0
- package/dist/es2019/components/compiled/picker/CategorySelector.js +136 -0
- package/dist/es2019/components/compiled/picker/EmojiPicker.compiled.css +12 -0
- package/dist/es2019/components/compiled/picker/EmojiPicker.js +67 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerCategoryHeading.compiled.css +9 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerCategoryHeading.js +30 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerComponent.compiled.css +19 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerComponent.js +506 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerEmojiRow.compiled.css +35 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerEmojiRow.js +69 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerFooter.compiled.css +5 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerFooter.js +19 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerListSearch.compiled.css +23 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerListSearch.js +79 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerTabPanel.compiled.css +6 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerTabPanel.js +39 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerVirtualItems.compiled.css +8 -0
- package/dist/es2019/components/compiled/picker/EmojiPickerVirtualItems.js +51 -0
- package/dist/es2019/components/compiled/picker/VirtualList.compiled.css +10 -0
- package/dist/es2019/components/compiled/picker/VirtualList.js +288 -0
- package/dist/es2019/components/picker/EmojiPickerFooter.js +1 -1
- package/dist/es2019/components/picker/EmojiPickerList.js +186 -114
- package/dist/es2019/components/picker/EmojiPickerTabPanel.js +48 -0
- package/dist/es2019/components/picker/styles.js +0 -9
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/picker.js +5 -1
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/esm/components/compiled/common/EmojiActions.js +1 -1
- package/dist/esm/components/compiled/common/EmojiPreviewComponent.compiled.css +0 -1
- package/dist/esm/components/compiled/common/EmojiPreviewComponent.js +1 -1
- package/dist/esm/components/compiled/picker/CategorySelector.compiled.css +24 -0
- package/dist/esm/components/compiled/picker/CategorySelector.js +151 -0
- package/dist/esm/components/compiled/picker/EmojiPicker.compiled.css +12 -0
- package/dist/esm/components/compiled/picker/EmojiPicker.js +97 -0
- package/dist/esm/components/compiled/picker/EmojiPickerCategoryHeading.compiled.css +9 -0
- package/dist/esm/components/compiled/picker/EmojiPickerCategoryHeading.js +34 -0
- package/dist/esm/components/compiled/picker/EmojiPickerComponent.compiled.css +20 -0
- package/dist/esm/components/compiled/picker/EmojiPickerComponent.js +564 -0
- package/dist/esm/components/compiled/picker/EmojiPickerEmojiRow.compiled.css +35 -0
- package/dist/esm/components/compiled/picker/EmojiPickerEmojiRow.js +66 -0
- package/dist/esm/components/compiled/picker/EmojiPickerFooter.compiled.css +5 -0
- package/dist/esm/components/compiled/picker/EmojiPickerFooter.js +24 -0
- package/dist/esm/components/compiled/picker/EmojiPickerListSearch.compiled.css +23 -0
- package/dist/esm/components/compiled/picker/EmojiPickerListSearch.js +83 -0
- package/dist/esm/components/compiled/picker/EmojiPickerTabPanel.compiled.css +6 -0
- package/dist/esm/components/compiled/picker/EmojiPickerTabPanel.js +50 -0
- package/dist/esm/components/compiled/picker/EmojiPickerVirtualItems.compiled.css +8 -0
- package/dist/esm/components/compiled/picker/EmojiPickerVirtualItems.js +76 -0
- package/dist/esm/components/compiled/picker/VirtualList.compiled.css +10 -0
- package/dist/esm/components/compiled/picker/VirtualList.js +293 -0
- package/dist/esm/components/picker/EmojiPickerFooter.js +1 -1
- package/dist/esm/components/picker/EmojiPickerList.js +219 -147
- package/dist/esm/components/picker/EmojiPickerTabPanel.js +59 -0
- package/dist/esm/components/picker/styles.js +0 -9
- package/dist/esm/index.js +2 -1
- package/dist/esm/picker.js +5 -1
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/types/components/compiled/picker/CategorySelector.d.ts +17 -0
- package/dist/types/components/compiled/picker/EmojiPicker.d.ts +44 -0
- package/dist/types/components/compiled/picker/EmojiPickerCategoryHeading.d.ts +13 -0
- package/dist/types/components/compiled/picker/EmojiPickerComponent.d.ts +24 -0
- package/dist/types/components/compiled/picker/EmojiPickerEmojiRow.d.ts +17 -0
- package/dist/types/components/compiled/picker/EmojiPickerFooter.d.ts +8 -0
- package/dist/types/components/compiled/picker/EmojiPickerListSearch.d.ts +11 -0
- package/dist/types/components/compiled/picker/EmojiPickerTabPanel.d.ts +21 -0
- package/dist/types/components/compiled/picker/EmojiPickerVirtualItems.d.ts +35 -0
- package/dist/types/components/compiled/picker/VirtualList.d.ts +42 -0
- package/dist/types/components/picker/EmojiPickerList.d.ts +1 -6
- package/dist/types/components/picker/EmojiPickerTabPanel.d.ts +21 -0
- package/dist/types/components/picker/styles.d.ts +0 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/picker.d.ts +3 -1
- package/dist/types-ts4.5/components/compiled/picker/CategorySelector.d.ts +17 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPicker.d.ts +44 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerCategoryHeading.d.ts +13 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerComponent.d.ts +24 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerEmojiRow.d.ts +17 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerFooter.d.ts +8 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerListSearch.d.ts +11 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerTabPanel.d.ts +21 -0
- package/dist/types-ts4.5/components/compiled/picker/EmojiPickerVirtualItems.d.ts +35 -0
- package/dist/types-ts4.5/components/compiled/picker/VirtualList.d.ts +42 -0
- package/dist/types-ts4.5/components/picker/EmojiPickerList.d.ts +1 -6
- package/dist/types-ts4.5/components/picker/EmojiPickerTabPanel.d.ts +21 -0
- package/dist/types-ts4.5/components/picker/styles.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +2 -1
- package/dist/types-ts4.5/picker.d.ts +3 -1
- package/package.json +4 -3
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/* CategorySelector.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import "./CategorySelector.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
7
|
+
import { cx } from '@atlaskit/css';
|
|
8
|
+
import { N30 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { useIntl } from 'react-intl-next';
|
|
10
|
+
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
11
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
12
|
+
import { CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED, defaultCategories, KeyboardKeys } from '../../../util/constants';
|
|
13
|
+
import { messages } from '../../i18n';
|
|
14
|
+
import { CategoryDescriptionMap } from '../../picker/categories';
|
|
15
|
+
import { usePrevious } from '../../../hooks/usePrevious';
|
|
16
|
+
import { RENDER_EMOJI_PICKER_LIST_TESTID } from '../../picker/EmojiPickerList';
|
|
17
|
+
var styles = {
|
|
18
|
+
commonCategory: "_2rkoglpi _v564h5h4 _189eidpf _bfhksm61 _ca0qze3t _n3tdze3t _19bvze3t _u5f3ze3t",
|
|
19
|
+
defaultCategory: "_syaz131l _30l3aqb7",
|
|
20
|
+
activeCategory: "_syazaqb7 _30l3aqb7",
|
|
21
|
+
disabledCategory: "_syaz131l"
|
|
22
|
+
};
|
|
23
|
+
var categorySelector = null;
|
|
24
|
+
var categorySelectorTablist = null;
|
|
25
|
+
export var sortCategories = function sortCategories(c1, c2) {
|
|
26
|
+
return CategoryDescriptionMap[c1].order - CategoryDescriptionMap[c2].order;
|
|
27
|
+
};
|
|
28
|
+
var addNewCategories = function addNewCategories(oldCategories, newCategories) {
|
|
29
|
+
if (!newCategories) {
|
|
30
|
+
return oldCategories;
|
|
31
|
+
}
|
|
32
|
+
return oldCategories.concat(newCategories.filter(function (category) {
|
|
33
|
+
return !!CategoryDescriptionMap[category];
|
|
34
|
+
})).sort(sortCategories);
|
|
35
|
+
};
|
|
36
|
+
export var categorySelectorComponentTestId = 'category-selector-component';
|
|
37
|
+
export var categorySelectorCategoryTestId = function categorySelectorCategoryTestId(categoryId) {
|
|
38
|
+
return "category-selector-".concat(categoryId);
|
|
39
|
+
};
|
|
40
|
+
var CategorySelector = function CategorySelector(props) {
|
|
41
|
+
var disableCategories = props.disableCategories,
|
|
42
|
+
dynamicCategories = props.dynamicCategories,
|
|
43
|
+
activeCategoryId = props.activeCategoryId,
|
|
44
|
+
onCategorySelected = props.onCategorySelected;
|
|
45
|
+
var _useState = useState(addNewCategories(defaultCategories, dynamicCategories)),
|
|
46
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
47
|
+
categories = _useState2[0],
|
|
48
|
+
setCategories = _useState2[1];
|
|
49
|
+
var _useState3 = useState(0),
|
|
50
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
51
|
+
currentFocus = _useState4[0],
|
|
52
|
+
setCurrentFocus = _useState4[1];
|
|
53
|
+
var categoryRef = useRef(null);
|
|
54
|
+
var prevDynamicCategories = usePrevious(dynamicCategories);
|
|
55
|
+
var _useIntl = useIntl(),
|
|
56
|
+
formatMessage = _useIntl.formatMessage;
|
|
57
|
+
var updateCategories = useCallback(function () {
|
|
58
|
+
var newCategories = addNewCategories(defaultCategories, dynamicCategories);
|
|
59
|
+
setCategories(newCategories);
|
|
60
|
+
}, [dynamicCategories]);
|
|
61
|
+
useEffect(function () {
|
|
62
|
+
if (prevDynamicCategories !== dynamicCategories) {
|
|
63
|
+
updateCategories();
|
|
64
|
+
}
|
|
65
|
+
}, [prevDynamicCategories, dynamicCategories, updateCategories]);
|
|
66
|
+
var focusCategory = useCallback(function (index) {
|
|
67
|
+
var _categoryRef$current;
|
|
68
|
+
var categoryToFocus = (_categoryRef$current = categoryRef.current) === null || _categoryRef$current === void 0 ? void 0 : _categoryRef$current.querySelector("[data-focus-index=\"".concat(index, "\"]"));
|
|
69
|
+
categoryToFocus && categoryToFocus.focus();
|
|
70
|
+
setCurrentFocus(index);
|
|
71
|
+
}, [categoryRef, setCurrentFocus]);
|
|
72
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
73
|
+
if (!CATEGORYSELECTOR_KEYBOARD_KEYS_SUPPORTED.includes(e.key)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
e.preventDefault();
|
|
77
|
+
e.stopPropagation();
|
|
78
|
+
var lastCategoryIndex = categories.length - 1;
|
|
79
|
+
switch (e.key) {
|
|
80
|
+
// navigate to the right category
|
|
81
|
+
case KeyboardKeys.ArrowRight:
|
|
82
|
+
focusCategory(currentFocus === lastCategoryIndex ? 0 : currentFocus + 1);
|
|
83
|
+
break;
|
|
84
|
+
// navigate to the left category
|
|
85
|
+
case KeyboardKeys.ArrowLeft:
|
|
86
|
+
focusCategory(currentFocus === 0 ? lastCategoryIndex : currentFocus - 1);
|
|
87
|
+
break;
|
|
88
|
+
// navigate to the first category
|
|
89
|
+
case KeyboardKeys.Home:
|
|
90
|
+
focusCategory(0);
|
|
91
|
+
break;
|
|
92
|
+
// navigate to the last category
|
|
93
|
+
case KeyboardKeys.End:
|
|
94
|
+
focusCategory(lastCategoryIndex);
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var handleClick = function handleClick(categoryId, index) {
|
|
99
|
+
return function (event) {
|
|
100
|
+
if (disableCategories) {
|
|
101
|
+
event.preventDefault();
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
if (onCategorySelected) {
|
|
105
|
+
onCategorySelected(categoryId);
|
|
106
|
+
}
|
|
107
|
+
setCurrentFocus(index);
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
var categoriesSection;
|
|
111
|
+
if (categories) {
|
|
112
|
+
categoriesSection = /*#__PURE__*/React.createElement("div", {
|
|
113
|
+
role: "tablist",
|
|
114
|
+
"aria-label": formatMessage(messages.categoriesSelectorLabel),
|
|
115
|
+
"data-testid": categorySelectorComponentTestId,
|
|
116
|
+
ref: categoryRef,
|
|
117
|
+
className: ax(["_ca0q12x7 _n3td12x7 _19bvu2gc _u5f3u2gc _1e0c1txw _2lx2vrvc _1bah1b1v _4cvr1h6o"])
|
|
118
|
+
}, categories.map(function (categoryId, index) {
|
|
119
|
+
var category = CategoryDescriptionMap[categoryId];
|
|
120
|
+
var Icon = category.icon;
|
|
121
|
+
var categoryName = formatMessage(messages[category.name]);
|
|
122
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
123
|
+
content: categoryName,
|
|
124
|
+
position: "bottom",
|
|
125
|
+
key: category.id
|
|
126
|
+
}, /*#__PURE__*/React.createElement(Pressable, {
|
|
127
|
+
id: "category-selector-".concat(category.id),
|
|
128
|
+
"data-focus-index": index,
|
|
129
|
+
"aria-label": categoryName,
|
|
130
|
+
"aria-controls": currentFocus === index ? RENDER_EMOJI_PICKER_LIST_TESTID : undefined,
|
|
131
|
+
"aria-selected": categoryId === activeCategoryId,
|
|
132
|
+
xcss: cx(styles.commonCategory, styles.defaultCategory, categoryId === activeCategoryId && styles.activeCategory, disableCategories && styles.disabledCategory),
|
|
133
|
+
isDisabled: disableCategories,
|
|
134
|
+
onClick: handleClick(categoryId, index),
|
|
135
|
+
testId: categorySelectorCategoryTestId(categoryId),
|
|
136
|
+
tabIndex: currentFocus === index ? 0 : -1,
|
|
137
|
+
onKeyDown: handleKeyDown,
|
|
138
|
+
role: "tab"
|
|
139
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
140
|
+
label: categoryName
|
|
141
|
+
})));
|
|
142
|
+
}));
|
|
143
|
+
}
|
|
144
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _bfhkxd9y _dpd31txw"]),
|
|
146
|
+
style: {
|
|
147
|
+
"--_mj39lq": ix("var(--ds-surface-sunken, ".concat(N30, ")"))
|
|
148
|
+
}
|
|
149
|
+
}, categoriesSection);
|
|
150
|
+
};
|
|
151
|
+
export default CategorySelector;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
._19itbw7i{border:var(--_t8mjz6)}
|
|
3
|
+
._2rkosqtm{border-radius:var(--ds-border-radius-100,3px)}._16qsp2xt{box-shadow:var(--ds-shadow-overlay,0 3px 6px rgba(0,0,0,.2))}
|
|
4
|
+
._1bah1yb4{justify-content:space-between}
|
|
5
|
+
._1bsb1edt{width:350px}
|
|
6
|
+
._1e0c1txw{display:flex}
|
|
7
|
+
._1tke5x59{min-height:340px}
|
|
8
|
+
._1ul91edt{min-width:350px}
|
|
9
|
+
._2lx21bp4{flex-direction:column}
|
|
10
|
+
._4t3iixjv{height:375px}
|
|
11
|
+
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
12
|
+
._c71l1y6z{max-height:calc(80vh - 86px)}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/* EmojiPicker.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
4
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
5
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
+
var _excluded = ["emojiProvider"];
|
|
10
|
+
import "./EmojiPicker.compiled.css";
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
13
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
14
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
15
|
+
import { N40 } from '@atlaskit/theme/colors';
|
|
16
|
+
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
17
|
+
import { ufoExperiences } from '../../../util/analytics';
|
|
18
|
+
import LoadingEmojiComponent from '../../common/LoadingEmojiComponent';
|
|
19
|
+
import { LoadingItem } from './EmojiPickerVirtualItems';
|
|
20
|
+
import { UfoErrorBoundary } from '../../common/UfoErrorBoundary';
|
|
21
|
+
import { defaultEmojiPickerSize } from '../../../util/constants';
|
|
22
|
+
import { EmojiCommonProvider } from '../../../context/EmojiCommonProvider';
|
|
23
|
+
var emojiPicker = null;
|
|
24
|
+
var emojiPickerModuleLoader = function emojiPickerModuleLoader() {
|
|
25
|
+
return import( /* webpackChunkName:"@atlaskit-internal_emojiPickerComponent" */'./EmojiPickerComponent');
|
|
26
|
+
};
|
|
27
|
+
var emojiPickerLoader = function emojiPickerLoader() {
|
|
28
|
+
return emojiPickerModuleLoader().then(function (module) {
|
|
29
|
+
return module.default;
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
export var preloadEmojiPicker = function preloadEmojiPicker() {
|
|
33
|
+
emojiPickerLoader().then(function (component) {
|
|
34
|
+
EmojiPickerInternal.AsyncLoadedComponent = component;
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
export var EmojiPickerInternal = /*#__PURE__*/function (_LoadingEmojiComponen) {
|
|
38
|
+
function EmojiPickerInternal(props) {
|
|
39
|
+
var _this;
|
|
40
|
+
_classCallCheck(this, EmojiPickerInternal);
|
|
41
|
+
_this = _callSuper(this, EmojiPickerInternal, [props, {}]);
|
|
42
|
+
_defineProperty(_this, "state", {
|
|
43
|
+
asyncLoadedComponent: EmojiPickerInternal.AsyncLoadedComponent
|
|
44
|
+
});
|
|
45
|
+
ufoExperiences['emoji-picker-opened'].start();
|
|
46
|
+
return _this;
|
|
47
|
+
}
|
|
48
|
+
_inherits(EmojiPickerInternal, _LoadingEmojiComponen);
|
|
49
|
+
return _createClass(EmojiPickerInternal, [{
|
|
50
|
+
key: "asyncLoadComponent",
|
|
51
|
+
value: function asyncLoadComponent() {
|
|
52
|
+
var _this2 = this;
|
|
53
|
+
emojiPickerLoader().then(function (component) {
|
|
54
|
+
EmojiPickerInternal.AsyncLoadedComponent = component;
|
|
55
|
+
_this2.setAsyncState(component);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
key: "renderLoading",
|
|
60
|
+
value: function renderLoading() {
|
|
61
|
+
var _this3 = this;
|
|
62
|
+
var item = new LoadingItem();
|
|
63
|
+
var handlePickerRef = function handlePickerRef(ref) {
|
|
64
|
+
if (_this3.props.onPickerRef) {
|
|
65
|
+
_this3.props.onPickerRef(ref);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
ufoExperiences['emoji-picker-opened'].markFMP();
|
|
69
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
ref: handlePickerRef,
|
|
71
|
+
className: ax(["_19itbw7i _2rkosqtm _1e0c1txw _2lx21bp4 _1bah1yb4 _bfhk1bhr _16qsp2xt _4t3iixjv _1bsb1edt _1ul91edt _1tke5x59 _c71l1y6z"]),
|
|
72
|
+
style: {
|
|
73
|
+
"--_t8mjz6": ix("".concat("var(--ds-border, ".concat(N40, ")"), " 1px solid"))
|
|
74
|
+
}
|
|
75
|
+
}, item.renderItem());
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: "renderLoaded",
|
|
79
|
+
value: function renderLoaded(loadedEmojiProvider, EmojiPickerComponent) {
|
|
80
|
+
var _this$props = this.props,
|
|
81
|
+
emojiProvider = _this$props.emojiProvider,
|
|
82
|
+
otherProps = _objectWithoutProperties(_this$props, _excluded);
|
|
83
|
+
return /*#__PURE__*/React.createElement(UfoErrorBoundary, {
|
|
84
|
+
experiences: [ufoExperiences['emoji-picker-opened']]
|
|
85
|
+
}, /*#__PURE__*/React.createElement(EmojiCommonProvider, {
|
|
86
|
+
emojiProvider: loadedEmojiProvider
|
|
87
|
+
}, /*#__PURE__*/React.createElement(EmojiPickerComponent, otherProps)));
|
|
88
|
+
}
|
|
89
|
+
}]);
|
|
90
|
+
}(LoadingEmojiComponent);
|
|
91
|
+
// state initialised with static component to prevent
|
|
92
|
+
// rerender when the module has already been loaded
|
|
93
|
+
_defineProperty(EmojiPickerInternal, "defaultProps", {
|
|
94
|
+
size: defaultEmojiPickerSize
|
|
95
|
+
});
|
|
96
|
+
var EmojiPicker = withAnalyticsEvents()(EmojiPickerInternal);
|
|
97
|
+
export default EmojiPicker;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._19bvu2gc{padding-left:var(--ds-space-100,8px)}
|
|
3
|
+
._1p1d1qyh{text-transform:lowercase}
|
|
4
|
+
._299mangw:first-letter{text-transform:uppercase}
|
|
5
|
+
._ca0q12x7{padding-top:var(--ds-space-075,6px)}
|
|
6
|
+
._n3td12x7{padding-bottom:var(--ds-space-075,6px)}
|
|
7
|
+
._syazovqm{color:var(--_5xk3r4)}
|
|
8
|
+
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
9
|
+
._vchhusvi{box-sizing:border-box}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* EmojiPickerCategoryHeading.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./EmojiPickerCategoryHeading.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
import { N900 } from '@atlaskit/theme/colors';
|
|
6
|
+
import { FormattedMessage } from 'react-intl-next';
|
|
7
|
+
import { isMessagesKey } from '../../../util/type-helpers';
|
|
8
|
+
import { messages } from '../../i18n';
|
|
9
|
+
var emojiCategoryTitle = null;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Test id for wrapper Emoji Picker List div
|
|
13
|
+
*/
|
|
14
|
+
export var RENDER_EMOJI_PICKER_CATEGORY_HEADING_TESTID = 'render-emoji-picker-categorty-heading';
|
|
15
|
+
var EmojiPickerCategoryHeading = function EmojiPickerCategoryHeading(_ref) {
|
|
16
|
+
var id = _ref.id,
|
|
17
|
+
title = _ref.title,
|
|
18
|
+
className = _ref.className;
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
id: id,
|
|
21
|
+
"data-category-id": id
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
23
|
+
,
|
|
24
|
+
className: className,
|
|
25
|
+
"data-testid": RENDER_EMOJI_PICKER_CATEGORY_HEADING_TESTID,
|
|
26
|
+
role: "rowheader"
|
|
27
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: ax(["_11c82smr _vchhusvi _syazovqm _ca0q12x7 _n3td12x7 _19bvu2gc _u5f3u2gc _1p1d1qyh _299mangw"]),
|
|
29
|
+
style: {
|
|
30
|
+
"--_5xk3r4": ix("var(--ds-text, ".concat(N900, ")"))
|
|
31
|
+
}
|
|
32
|
+
}, isMessagesKey(title) ? /*#__PURE__*/React.createElement(FormattedMessage, messages[title]) : title));
|
|
33
|
+
};
|
|
34
|
+
export default EmojiPickerCategoryHeading;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
._19itbw7i{border:var(--_t8mjz6)}
|
|
3
|
+
._2rkosqtm{border-radius:var(--ds-border-radius-100,3px)}._16qsp2xt{box-shadow:var(--ds-shadow-overlay,0 3px 6px rgba(0,0,0,.2))}
|
|
4
|
+
._1bah1yb4{justify-content:space-between}
|
|
5
|
+
._1bsb10mj{width:var(--_gsvyy7)}
|
|
6
|
+
._1e0c1txw{display:flex}
|
|
7
|
+
._1tke1pna{min-height:420px}
|
|
8
|
+
._1tke5x59{min-height:340px}
|
|
9
|
+
._1tkegx0z{min-height:260px}
|
|
10
|
+
._1ul910mj{min-width:var(--_gsvyy7)}
|
|
11
|
+
._2lx21bp4{flex-direction:column}
|
|
12
|
+
._4t3i1ckg{height:455px}
|
|
13
|
+
._4t3i2300{height:429px}
|
|
14
|
+
._4t3iaq3k{height:295px}
|
|
15
|
+
._4t3iixjv{height:375px}
|
|
16
|
+
._4t3iuxo9{height:var(--_19dn98e)}
|
|
17
|
+
._4t3ivixp{height:349px}
|
|
18
|
+
._4t3ixt2k{height:509px}
|
|
19
|
+
._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
|
|
20
|
+
._c71l1y6z{max-height:calc(80vh - 86px)}
|