@atlaskit/emoji 71.6.0 → 71.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/components/picker/EmojiPickerComponent.js +8 -4
- package/dist/cjs/components/picker/EmojiPickerList.js +4 -3
- package/dist/cjs/util/analytics/analytics.js +1 -1
- package/dist/cjs/util/productivity-colors.js +5 -0
- package/dist/es2019/components/picker/EmojiPickerComponent.js +8 -4
- package/dist/es2019/components/picker/EmojiPickerList.js +5 -4
- package/dist/es2019/util/analytics/analytics.js +1 -1
- package/dist/es2019/util/productivity-colors.js +5 -0
- package/dist/esm/components/picker/EmojiPickerComponent.js +8 -4
- package/dist/esm/components/picker/EmojiPickerList.js +5 -4
- package/dist/esm/util/analytics/analytics.js +1 -1
- package/dist/esm/util/productivity-colors.js +5 -0
- package/dist/types/components/picker/EmojiPickerList.d.ts +1 -0
- package/emoji.docs.tsx +96 -0
- package/package.json +20 -20
- package/tsconfig.json +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/emoji
|
|
2
2
|
|
|
3
|
+
## 71.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 71.6.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`ad79f1670a54c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ad79f1670a54c) -
|
|
14
|
+
Persist productivity emoji colour selection
|
|
15
|
+
- [`85dc85818cf2d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/85dc85818cf2d) -
|
|
16
|
+
Use empty refresh emoji picker footer space for the scrollable emoji list
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 71.6.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -665,7 +665,10 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
665
665
|
emojiProvider.unsubscribe(onProviderChange);
|
|
666
666
|
};
|
|
667
667
|
}, [emojiProvider, onProviderChange]);
|
|
668
|
+
var uploadEnabled = isUploadSupported && !uploading;
|
|
668
669
|
var showPreview = isRefreshEmojiPickerEnabled() ? !uploading : selectedEmoji && !uploading;
|
|
670
|
+
var shouldRenderFooter = showPreview && !(emojiToDelete && isRefreshEmojiPickerEnabled()) && !(query && filteredEmojis.length === 0 && isRefreshEmojiPickerEnabled()) && (Boolean(selectedEmoji) || uploadEnabled || !isRefreshEmojiPickerEnabled());
|
|
671
|
+
var useFooterSpaceForList = showPreview && !selectedEmoji && !uploadEnabled && !emojiToDelete && !(query && filteredEmojis.length === 0) && isRefreshEmojiPickerEnabled();
|
|
669
672
|
return /*#__PURE__*/React.createElement("div", {
|
|
670
673
|
ref: setPickerRef,
|
|
671
674
|
"data-emoji-picker-container": true,
|
|
@@ -710,7 +713,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
710
713
|
uploading: uploading,
|
|
711
714
|
emojiToDelete: emojiToDelete,
|
|
712
715
|
uploadErrorMessage: formattedErrorMessage,
|
|
713
|
-
uploadEnabled:
|
|
716
|
+
uploadEnabled: uploadEnabled,
|
|
714
717
|
onUploadEmoji: onUploadEmoji,
|
|
715
718
|
onUploadCancelled: onUploadCancelled,
|
|
716
719
|
onDeleteEmoji: onDeleteEmoji,
|
|
@@ -718,10 +721,11 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
718
721
|
onFileChooserClicked: onFileChooserClicked,
|
|
719
722
|
onOpenUpload: onOpenUpload,
|
|
720
723
|
size: size,
|
|
721
|
-
activeCategoryId: activeCategory
|
|
722
|
-
|
|
724
|
+
activeCategoryId: activeCategory,
|
|
725
|
+
useFooterSpaceForList: useFooterSpaceForList
|
|
726
|
+
}), shouldRenderFooter && /*#__PURE__*/React.createElement(_EmojiPickerFooter.default, {
|
|
723
727
|
selectedEmoji: selectedEmoji,
|
|
724
|
-
uploadEnabled:
|
|
728
|
+
uploadEnabled: uploadEnabled,
|
|
725
729
|
onOpenUpload: onOpenUpload
|
|
726
730
|
})));
|
|
727
731
|
};
|
|
@@ -93,7 +93,8 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
93
93
|
onOpenUpload = props.onOpenUpload,
|
|
94
94
|
onProductivityColorSelected = props.onProductivityColorSelected,
|
|
95
95
|
activeCategoryId = props.activeCategoryId,
|
|
96
|
-
selectedProductivityColor = props.selectedProductivityColor
|
|
96
|
+
selectedProductivityColor = props.selectedProductivityColor,
|
|
97
|
+
useFooterSpaceForList = props.useFooterSpaceForList;
|
|
97
98
|
var _useIntl = (0, _reactIntl.useIntl)(),
|
|
98
99
|
formatMessage = _useIntl.formatMessage;
|
|
99
100
|
var listRef = (0, _react.useRef)(null);
|
|
@@ -485,8 +486,8 @@ var EmojiPickerVirtualListInternal = exports.EmojiPickerVirtualListInternal = /*
|
|
|
485
486
|
// No-results state: expand the list height to fit heading + illustration without scrolling
|
|
486
487
|
return _EmojiPickerSizes.sizes.categoryHeadingHeight + _EmojiPickerSizes.sizes.noResultsHeight + (0, _utils.emojiPickerHeightOffset)(size);
|
|
487
488
|
}
|
|
488
|
-
return isTeamojiExperimentEnabled ? _EmojiPickerSizes.sizes.listHeightNew + (0, _utils.emojiPickerHeightOffset)(size) : _EmojiPickerSizes.sizes.listHeight + (0, _utils.emojiPickerHeightOffset)(size);
|
|
489
|
-
}, [size, query, visibleEmojis.length, isTeamojiExperimentEnabled]);
|
|
489
|
+
return isTeamojiExperimentEnabled ? _EmojiPickerSizes.sizes.listHeightNew + (0, _utils.emojiPickerHeightOffset)(size) + (useFooterSpaceForList ? _constants.emojiPickerPreviewHeight : 0) : _EmojiPickerSizes.sizes.listHeight + (0, _utils.emojiPickerHeightOffset)(size);
|
|
490
|
+
}, [size, query, visibleEmojis.length, isTeamojiExperimentEnabled, useFooterSpaceForList]);
|
|
490
491
|
return /*#__PURE__*/_react.default.createElement(_EmojiPickerTabPanel.default, {
|
|
491
492
|
showSearchResults: !!query
|
|
492
493
|
}, /*#__PURE__*/_react.default.createElement(_EmojiActions.default, {
|
|
@@ -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.
|
|
23
|
+
packageVersion: "71.6.1"
|
|
24
24
|
}, attributes)
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -14,7 +14,11 @@ var defaultProductivityColor = exports.defaultProductivityColor = 'blue';
|
|
|
14
14
|
var isProductivityColor = function isProductivityColor(color) {
|
|
15
15
|
return !!color && productivityColorSet.has(color);
|
|
16
16
|
};
|
|
17
|
+
var selectedProductivityColor;
|
|
17
18
|
var getStoredProductivityColor = exports.getStoredProductivityColor = function getStoredProductivityColor() {
|
|
19
|
+
if (selectedProductivityColor) {
|
|
20
|
+
return selectedProductivityColor;
|
|
21
|
+
}
|
|
18
22
|
if (typeof window === 'undefined' || !(0, _storageAvailable.default)('localStorage')) {
|
|
19
23
|
return defaultProductivityColor;
|
|
20
24
|
}
|
|
@@ -28,6 +32,7 @@ var getStoredProductivityColor = exports.getStoredProductivityColor = function g
|
|
|
28
32
|
}
|
|
29
33
|
};
|
|
30
34
|
var storeProductivityColor = exports.storeProductivityColor = function storeProductivityColor(color) {
|
|
35
|
+
selectedProductivityColor = color;
|
|
31
36
|
if (typeof window === 'undefined' || !(0, _storageAvailable.default)('localStorage')) {
|
|
32
37
|
return;
|
|
33
38
|
}
|
|
@@ -570,7 +570,10 @@ const EmojiPickerComponent = ({
|
|
|
570
570
|
emojiProvider.unsubscribe(onProviderChange);
|
|
571
571
|
};
|
|
572
572
|
}, [emojiProvider, onProviderChange]);
|
|
573
|
+
const uploadEnabled = isUploadSupported && !uploading;
|
|
573
574
|
const showPreview = isRefreshEmojiPickerEnabled() ? !uploading : selectedEmoji && !uploading;
|
|
575
|
+
const shouldRenderFooter = showPreview && !(emojiToDelete && isRefreshEmojiPickerEnabled()) && !(query && filteredEmojis.length === 0 && isRefreshEmojiPickerEnabled()) && (Boolean(selectedEmoji) || uploadEnabled || !isRefreshEmojiPickerEnabled());
|
|
576
|
+
const useFooterSpaceForList = showPreview && !selectedEmoji && !uploadEnabled && !emojiToDelete && !(query && filteredEmojis.length === 0) && isRefreshEmojiPickerEnabled();
|
|
574
577
|
return /*#__PURE__*/React.createElement("div", {
|
|
575
578
|
ref: setPickerRef,
|
|
576
579
|
"data-emoji-picker-container": true,
|
|
@@ -611,7 +614,7 @@ const EmojiPickerComponent = ({
|
|
|
611
614
|
uploading: uploading,
|
|
612
615
|
emojiToDelete: emojiToDelete,
|
|
613
616
|
uploadErrorMessage: formattedErrorMessage,
|
|
614
|
-
uploadEnabled:
|
|
617
|
+
uploadEnabled: uploadEnabled,
|
|
615
618
|
onUploadEmoji: onUploadEmoji,
|
|
616
619
|
onUploadCancelled: onUploadCancelled,
|
|
617
620
|
onDeleteEmoji: onDeleteEmoji,
|
|
@@ -619,10 +622,11 @@ const EmojiPickerComponent = ({
|
|
|
619
622
|
onFileChooserClicked: onFileChooserClicked,
|
|
620
623
|
onOpenUpload: onOpenUpload,
|
|
621
624
|
size: size,
|
|
622
|
-
activeCategoryId: activeCategory
|
|
623
|
-
|
|
625
|
+
activeCategoryId: activeCategory,
|
|
626
|
+
useFooterSpaceForList: useFooterSpaceForList
|
|
627
|
+
}), shouldRenderFooter && /*#__PURE__*/React.createElement(EmojiPickerFooter, {
|
|
624
628
|
selectedEmoji: selectedEmoji,
|
|
625
|
-
uploadEnabled:
|
|
629
|
+
uploadEnabled: uploadEnabled,
|
|
626
630
|
onOpenUpload: onOpenUpload
|
|
627
631
|
})));
|
|
628
632
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useIntl } from 'react-intl';
|
|
2
2
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
3
3
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { customCategory, defaultEmojiPickerSize, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
4
|
+
import { customCategory, defaultEmojiPickerSize, emojiPickerPreviewHeight, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
5
5
|
import { filterProductivityEmojisByColor, getProductivityColorPreviewEmojis } from '../../util/productivity-colors';
|
|
6
6
|
import { filterHiddenEmojis } from '../../util/hidden-emojis';
|
|
7
7
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
@@ -76,7 +76,8 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
76
76
|
onOpenUpload,
|
|
77
77
|
onProductivityColorSelected,
|
|
78
78
|
activeCategoryId,
|
|
79
|
-
selectedProductivityColor
|
|
79
|
+
selectedProductivityColor,
|
|
80
|
+
useFooterSpaceForList
|
|
80
81
|
} = props;
|
|
81
82
|
const {
|
|
82
83
|
formatMessage
|
|
@@ -440,8 +441,8 @@ export const EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef((pro
|
|
|
440
441
|
// No-results state: expand the list height to fit heading + illustration without scrolling
|
|
441
442
|
return sizes.categoryHeadingHeight + sizes.noResultsHeight + emojiPickerHeightOffset(size);
|
|
442
443
|
}
|
|
443
|
-
return isTeamojiExperimentEnabled ? sizes.listHeightNew + emojiPickerHeightOffset(size) : sizes.listHeight + emojiPickerHeightOffset(size);
|
|
444
|
-
}, [size, query, visibleEmojis.length, isTeamojiExperimentEnabled]);
|
|
444
|
+
return isTeamojiExperimentEnabled ? sizes.listHeightNew + emojiPickerHeightOffset(size) + (useFooterSpaceForList ? emojiPickerPreviewHeight : 0) : sizes.listHeight + emojiPickerHeightOffset(size);
|
|
445
|
+
}, [size, query, visibleEmojis.length, isTeamojiExperimentEnabled, useFooterSpaceForList]);
|
|
445
446
|
return /*#__PURE__*/React.createElement(EmojiPickerTabPanel, {
|
|
446
447
|
showSearchResults: !!query
|
|
447
448
|
}, /*#__PURE__*/React.createElement(EmojiActions, {
|
|
@@ -5,7 +5,11 @@ const productivityColorSet = new Set(productivityColors);
|
|
|
5
5
|
const zeroSquareVariantParent = '0_zero_square_blue';
|
|
6
6
|
export const defaultProductivityColor = 'blue';
|
|
7
7
|
const isProductivityColor = color => !!color && productivityColorSet.has(color);
|
|
8
|
+
let selectedProductivityColor;
|
|
8
9
|
export const getStoredProductivityColor = () => {
|
|
10
|
+
if (selectedProductivityColor) {
|
|
11
|
+
return selectedProductivityColor;
|
|
12
|
+
}
|
|
9
13
|
if (typeof window === 'undefined' || !storageAvailable('localStorage')) {
|
|
10
14
|
return defaultProductivityColor;
|
|
11
15
|
}
|
|
@@ -19,6 +23,7 @@ export const getStoredProductivityColor = () => {
|
|
|
19
23
|
}
|
|
20
24
|
};
|
|
21
25
|
export const storeProductivityColor = color => {
|
|
26
|
+
selectedProductivityColor = color;
|
|
22
27
|
if (typeof window === 'undefined' || !storageAvailable('localStorage')) {
|
|
23
28
|
return;
|
|
24
29
|
}
|
|
@@ -656,7 +656,10 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
656
656
|
emojiProvider.unsubscribe(onProviderChange);
|
|
657
657
|
};
|
|
658
658
|
}, [emojiProvider, onProviderChange]);
|
|
659
|
+
var uploadEnabled = isUploadSupported && !uploading;
|
|
659
660
|
var showPreview = isRefreshEmojiPickerEnabled() ? !uploading : selectedEmoji && !uploading;
|
|
661
|
+
var shouldRenderFooter = showPreview && !(emojiToDelete && isRefreshEmojiPickerEnabled()) && !(query && filteredEmojis.length === 0 && isRefreshEmojiPickerEnabled()) && (Boolean(selectedEmoji) || uploadEnabled || !isRefreshEmojiPickerEnabled());
|
|
662
|
+
var useFooterSpaceForList = showPreview && !selectedEmoji && !uploadEnabled && !emojiToDelete && !(query && filteredEmojis.length === 0) && isRefreshEmojiPickerEnabled();
|
|
660
663
|
return /*#__PURE__*/React.createElement("div", {
|
|
661
664
|
ref: setPickerRef,
|
|
662
665
|
"data-emoji-picker-container": true,
|
|
@@ -701,7 +704,7 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
701
704
|
uploading: uploading,
|
|
702
705
|
emojiToDelete: emojiToDelete,
|
|
703
706
|
uploadErrorMessage: formattedErrorMessage,
|
|
704
|
-
uploadEnabled:
|
|
707
|
+
uploadEnabled: uploadEnabled,
|
|
705
708
|
onUploadEmoji: onUploadEmoji,
|
|
706
709
|
onUploadCancelled: onUploadCancelled,
|
|
707
710
|
onDeleteEmoji: onDeleteEmoji,
|
|
@@ -709,10 +712,11 @@ var EmojiPickerComponent = function EmojiPickerComponent(_ref) {
|
|
|
709
712
|
onFileChooserClicked: onFileChooserClicked,
|
|
710
713
|
onOpenUpload: onOpenUpload,
|
|
711
714
|
size: size,
|
|
712
|
-
activeCategoryId: activeCategory
|
|
713
|
-
|
|
715
|
+
activeCategoryId: activeCategory,
|
|
716
|
+
useFooterSpaceForList: useFooterSpaceForList
|
|
717
|
+
}), shouldRenderFooter && /*#__PURE__*/React.createElement(EmojiPickerFooter, {
|
|
714
718
|
selectedEmoji: selectedEmoji,
|
|
715
|
-
uploadEnabled:
|
|
719
|
+
uploadEnabled: uploadEnabled,
|
|
716
720
|
onOpenUpload: onOpenUpload
|
|
717
721
|
})));
|
|
718
722
|
};
|
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import { useIntl } from 'react-intl';
|
|
4
4
|
import FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
5
5
|
import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
6
|
-
import { customCategory, defaultEmojiPickerSize, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
6
|
+
import { customCategory, defaultEmojiPickerSize, emojiPickerPreviewHeight, frequentCategory, searchCategory, userCustomTitle, yourUploadsCategory } from '../../util/constants';
|
|
7
7
|
import { filterProductivityEmojisByColor, getProductivityColorPreviewEmojis } from '../../util/productivity-colors';
|
|
8
8
|
import { filterHiddenEmojis } from '../../util/hidden-emojis';
|
|
9
9
|
import { CategoryDescriptionMap, CategoryDescriptionMapNew } from './categories';
|
|
@@ -85,7 +85,8 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
85
85
|
onOpenUpload = props.onOpenUpload,
|
|
86
86
|
onProductivityColorSelected = props.onProductivityColorSelected,
|
|
87
87
|
activeCategoryId = props.activeCategoryId,
|
|
88
|
-
selectedProductivityColor = props.selectedProductivityColor
|
|
88
|
+
selectedProductivityColor = props.selectedProductivityColor,
|
|
89
|
+
useFooterSpaceForList = props.useFooterSpaceForList;
|
|
89
90
|
var _useIntl = useIntl(),
|
|
90
91
|
formatMessage = _useIntl.formatMessage;
|
|
91
92
|
var listRef = useRef(null);
|
|
@@ -477,8 +478,8 @@ export var EmojiPickerVirtualListInternal = /*#__PURE__*/React.forwardRef(functi
|
|
|
477
478
|
// No-results state: expand the list height to fit heading + illustration without scrolling
|
|
478
479
|
return sizes.categoryHeadingHeight + sizes.noResultsHeight + emojiPickerHeightOffset(size);
|
|
479
480
|
}
|
|
480
|
-
return isTeamojiExperimentEnabled ? sizes.listHeightNew + emojiPickerHeightOffset(size) : sizes.listHeight + emojiPickerHeightOffset(size);
|
|
481
|
-
}, [size, query, visibleEmojis.length, isTeamojiExperimentEnabled]);
|
|
481
|
+
return isTeamojiExperimentEnabled ? sizes.listHeightNew + emojiPickerHeightOffset(size) + (useFooterSpaceForList ? emojiPickerPreviewHeight : 0) : sizes.listHeight + emojiPickerHeightOffset(size);
|
|
482
|
+
}, [size, query, visibleEmojis.length, isTeamojiExperimentEnabled, useFooterSpaceForList]);
|
|
482
483
|
return /*#__PURE__*/React.createElement(EmojiPickerTabPanel, {
|
|
483
484
|
showSearchResults: !!query
|
|
484
485
|
}, /*#__PURE__*/React.createElement(EmojiActions, {
|
|
@@ -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.
|
|
17
|
+
packageVersion: "71.6.1"
|
|
18
18
|
}, attributes)
|
|
19
19
|
};
|
|
20
20
|
};
|
|
@@ -7,7 +7,11 @@ export var defaultProductivityColor = 'blue';
|
|
|
7
7
|
var isProductivityColor = function isProductivityColor(color) {
|
|
8
8
|
return !!color && productivityColorSet.has(color);
|
|
9
9
|
};
|
|
10
|
+
var selectedProductivityColor;
|
|
10
11
|
export var getStoredProductivityColor = function getStoredProductivityColor() {
|
|
12
|
+
if (selectedProductivityColor) {
|
|
13
|
+
return selectedProductivityColor;
|
|
14
|
+
}
|
|
11
15
|
if (typeof window === 'undefined' || !storageAvailable('localStorage')) {
|
|
12
16
|
return defaultProductivityColor;
|
|
13
17
|
}
|
|
@@ -21,6 +25,7 @@ export var getStoredProductivityColor = function getStoredProductivityColor() {
|
|
|
21
25
|
}
|
|
22
26
|
};
|
|
23
27
|
export var storeProductivityColor = function storeProductivityColor(color) {
|
|
28
|
+
selectedProductivityColor = color;
|
|
24
29
|
if (typeof window === 'undefined' || !storageAvailable('localStorage')) {
|
|
25
30
|
return;
|
|
26
31
|
}
|
package/emoji.docs.tsx
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured MCP docs for `@atlaskit/emoji`.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import path from 'path';
|
|
6
|
+
|
|
7
|
+
import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
|
|
8
|
+
|
|
9
|
+
import packageJson from './package.json';
|
|
10
|
+
|
|
11
|
+
const packagePath = path.resolve(__dirname);
|
|
12
|
+
|
|
13
|
+
const documentation: StructuredContentSource = {
|
|
14
|
+
package: {
|
|
15
|
+
package: '@atlaskit/emoji',
|
|
16
|
+
packagePath,
|
|
17
|
+
packageJson,
|
|
18
|
+
overview:
|
|
19
|
+
'React components and utilities for displaying and picking emojis. It includes support for standard emojis, custom emojis, and skin tone variations.',
|
|
20
|
+
},
|
|
21
|
+
components: [
|
|
22
|
+
{
|
|
23
|
+
name: 'Emoji',
|
|
24
|
+
description: 'A component for displaying a single emoji.',
|
|
25
|
+
status: 'general-availability',
|
|
26
|
+
import: {
|
|
27
|
+
name: 'Emoji',
|
|
28
|
+
package: '@atlaskit/emoji',
|
|
29
|
+
type: 'named',
|
|
30
|
+
packagePath,
|
|
31
|
+
packageJson,
|
|
32
|
+
},
|
|
33
|
+
usageGuidelines: ['Use `Emoji` to render a specific emoji by its ID or short name.'],
|
|
34
|
+
keywords: ['emoji', 'display'],
|
|
35
|
+
categories: ['elements'],
|
|
36
|
+
examples: [
|
|
37
|
+
{
|
|
38
|
+
name: 'Simple emoji',
|
|
39
|
+
description: 'Basic usage of the Emoji component.',
|
|
40
|
+
source: path.resolve(packagePath, './examples/00-simple-emoji.tsx'),
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'EmojiPicker',
|
|
46
|
+
description: 'A component that provides a searchable picker for emojis.',
|
|
47
|
+
status: 'general-availability',
|
|
48
|
+
import: {
|
|
49
|
+
name: 'EmojiPicker',
|
|
50
|
+
package: '@atlaskit/emoji',
|
|
51
|
+
type: 'named',
|
|
52
|
+
packagePath,
|
|
53
|
+
packageJson,
|
|
54
|
+
},
|
|
55
|
+
usageGuidelines: [
|
|
56
|
+
'Use `EmojiPicker` when you need to allow users to select an emoji from a list.',
|
|
57
|
+
'Requires an `EmojiResource` to fetch and manage emoji data.',
|
|
58
|
+
],
|
|
59
|
+
keywords: ['emoji', 'picker', 'select'],
|
|
60
|
+
categories: ['elements'],
|
|
61
|
+
examples: [
|
|
62
|
+
{
|
|
63
|
+
name: 'Emoji picker with usage',
|
|
64
|
+
description: 'Emoji picker with frequently used emojis tracked.',
|
|
65
|
+
source: path.resolve(packagePath, './examples/06-emoji-picker-with-usage.tsx'),
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'EmojiTypeAhead',
|
|
71
|
+
description: 'A component that provides emoji suggestions based on user input.',
|
|
72
|
+
status: 'general-availability',
|
|
73
|
+
import: {
|
|
74
|
+
name: 'EmojiTypeAhead',
|
|
75
|
+
package: '@atlaskit/emoji',
|
|
76
|
+
type: 'named',
|
|
77
|
+
packagePath,
|
|
78
|
+
packageJson,
|
|
79
|
+
},
|
|
80
|
+
usageGuidelines: [
|
|
81
|
+
'Use `EmojiTypeAhead` to provide a shortcut-based emoji selection experience (e.g., typing `:smile`).',
|
|
82
|
+
],
|
|
83
|
+
keywords: ['emoji', 'typeahead', 'autocomplete'],
|
|
84
|
+
categories: ['elements'],
|
|
85
|
+
examples: [
|
|
86
|
+
{
|
|
87
|
+
name: 'Standard emoji typeahead',
|
|
88
|
+
description: 'Basic usage of EmojiTypeAhead.',
|
|
89
|
+
source: path.resolve(packagePath, './examples/03-standard-emoji-typeahead.tsx'),
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export default documentation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/emoji",
|
|
3
|
-
"version": "71.6.
|
|
3
|
+
"version": "71.6.2",
|
|
4
4
|
"description": "Fabric emoji React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,31 +30,31 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/afm-i18n-platform-elements-emoji": "2.168.0",
|
|
33
|
-
"@atlaskit/analytics-next": "^12.
|
|
34
|
-
"@atlaskit/browser-apis": "^1.
|
|
35
|
-
"@atlaskit/button": "^24.
|
|
33
|
+
"@atlaskit/analytics-next": "^12.1.0",
|
|
34
|
+
"@atlaskit/browser-apis": "^1.1.0",
|
|
35
|
+
"@atlaskit/button": "^24.3.0",
|
|
36
36
|
"@atlaskit/css": "^1.0.0",
|
|
37
37
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
38
|
-
"@atlaskit/form": "^16.
|
|
39
|
-
"@atlaskit/heading": "^6.
|
|
40
|
-
"@atlaskit/icon": "^36.
|
|
41
|
-
"@atlaskit/icon-lab": "^7.
|
|
42
|
-
"@atlaskit/image": "^4.
|
|
38
|
+
"@atlaskit/form": "^16.1.0",
|
|
39
|
+
"@atlaskit/heading": "^6.1.0",
|
|
40
|
+
"@atlaskit/icon": "^36.1.0",
|
|
41
|
+
"@atlaskit/icon-lab": "^7.2.0",
|
|
42
|
+
"@atlaskit/image": "^4.1.0",
|
|
43
43
|
"@atlaskit/media-client": "^37.1.0",
|
|
44
|
-
"@atlaskit/media-client-react": "^6.
|
|
44
|
+
"@atlaskit/media-client-react": "^6.1.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
46
46
|
"@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
|
|
47
|
-
"@atlaskit/primitives": "^20.
|
|
48
|
-
"@atlaskit/radio": "^9.
|
|
49
|
-
"@atlaskit/spinner": "^20.
|
|
50
|
-
"@atlaskit/textfield": "^9.
|
|
51
|
-
"@atlaskit/theme": "^26.
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
53
|
-
"@atlaskit/tokens": "^15.
|
|
54
|
-
"@atlaskit/tooltip": "^23.
|
|
47
|
+
"@atlaskit/primitives": "^20.2.0",
|
|
48
|
+
"@atlaskit/radio": "^9.1.0",
|
|
49
|
+
"@atlaskit/spinner": "^20.1.0",
|
|
50
|
+
"@atlaskit/textfield": "^9.1.0",
|
|
51
|
+
"@atlaskit/theme": "^26.1.0",
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^115.0.0",
|
|
53
|
+
"@atlaskit/tokens": "^15.2.0",
|
|
54
|
+
"@atlaskit/tooltip": "^23.1.0",
|
|
55
55
|
"@atlaskit/ufo": "^1.0.0",
|
|
56
|
-
"@atlaskit/util-service-support": "^7.
|
|
57
|
-
"@atlaskit/visually-hidden": "^4.
|
|
56
|
+
"@atlaskit/util-service-support": "^7.1.0",
|
|
57
|
+
"@atlaskit/visually-hidden": "^4.1.0",
|
|
58
58
|
"@babel/runtime": "^7.0.0",
|
|
59
59
|
"@compiled/react": "^0.20.0",
|
|
60
60
|
"@tanstack/react-virtual": "3.0.0-beta.60",
|