@atlaskit/reactions 21.7.0 → 21.8.0
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 +13 -0
- package/dist/cjs/analytics/analytics.js +21 -2
- package/dist/cjs/components/Counter/Counter.js +39 -31
- package/dist/cjs/components/Counter/index.js +8 -2
- package/dist/cjs/components/Counter/styles.js +4 -4
- package/dist/cjs/components/EmojiButton/EmojiButton.js +3 -3
- package/dist/cjs/components/EmojiButton/styles.js +2 -2
- package/dist/cjs/components/FlashAnimation/FlashAnimation.js +2 -2
- package/dist/cjs/components/FlashAnimation/styles.js +4 -4
- package/dist/cjs/components/Reaction/Reaction.js +7 -7
- package/dist/cjs/components/Reaction/styles.js +5 -5
- package/dist/cjs/components/ReactionPicker/ReactionPicker.js +22 -12
- package/dist/cjs/components/ReactionPicker/styles.js +4 -4
- package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +8 -8
- package/dist/cjs/components/ReactionTooltip/styles.js +4 -4
- package/dist/cjs/components/Reactions/Reactions.js +7 -7
- package/dist/cjs/components/Reactions/styles.js +3 -3
- package/dist/cjs/components/Selector/Selector.js +6 -6
- package/dist/cjs/components/Selector/styles.js +5 -5
- package/dist/cjs/components/ShowMore/ShowMore.js +12 -9
- package/dist/cjs/components/ShowMore/index.js +6 -0
- package/dist/cjs/components/ShowMore/styles.js +4 -4
- package/dist/cjs/components/Trigger/Trigger.js +10 -6
- package/dist/cjs/components/Trigger/styles.js +2 -2
- package/dist/cjs/containers/ConnectedReactionsView/ConnectedReactionsView.js +5 -7
- package/dist/cjs/shared/constants.js +14 -2
- package/dist/cjs/store/MemoryReactionsStore.js +33 -29
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/analytics.js +17 -1
- package/dist/es2019/components/Counter/Counter.js +39 -32
- package/dist/es2019/components/Counter/index.js +1 -1
- package/dist/es2019/components/Counter/styles.js +1 -1
- package/dist/es2019/components/EmojiButton/EmojiButton.js +1 -1
- package/dist/es2019/components/EmojiButton/styles.js +1 -1
- package/dist/es2019/components/FlashAnimation/FlashAnimation.js +1 -1
- package/dist/es2019/components/FlashAnimation/styles.js +1 -1
- package/dist/es2019/components/Reaction/Reaction.js +1 -1
- package/dist/es2019/components/Reaction/styles.js +1 -1
- package/dist/es2019/components/ReactionPicker/ReactionPicker.js +12 -2
- package/dist/es2019/components/ReactionPicker/styles.js +1 -1
- package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +2 -2
- package/dist/es2019/components/ReactionTooltip/styles.js +1 -1
- package/dist/es2019/components/Reactions/Reactions.js +1 -1
- package/dist/es2019/components/Reactions/styles.js +1 -1
- package/dist/es2019/components/Selector/Selector.js +1 -1
- package/dist/es2019/components/Selector/styles.js +1 -1
- package/dist/es2019/components/ShowMore/ShowMore.js +4 -2
- package/dist/es2019/components/ShowMore/index.js +1 -1
- package/dist/es2019/components/ShowMore/styles.js +1 -1
- package/dist/es2019/components/Trigger/Trigger.js +7 -4
- package/dist/es2019/components/Trigger/styles.js +1 -1
- package/dist/es2019/containers/ConnectedReactionsView/ConnectedReactionsView.js +5 -7
- package/dist/es2019/shared/constants.js +10 -0
- package/dist/es2019/store/MemoryReactionsStore.js +32 -29
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/analytics.js +16 -0
- package/dist/esm/components/Counter/Counter.js +26 -24
- package/dist/esm/components/Counter/index.js +1 -1
- package/dist/esm/components/Counter/styles.js +1 -1
- package/dist/esm/components/EmojiButton/EmojiButton.js +1 -1
- package/dist/esm/components/EmojiButton/styles.js +1 -1
- package/dist/esm/components/FlashAnimation/FlashAnimation.js +1 -1
- package/dist/esm/components/FlashAnimation/styles.js +1 -1
- package/dist/esm/components/Reaction/Reaction.js +1 -1
- package/dist/esm/components/Reaction/styles.js +1 -1
- package/dist/esm/components/ReactionPicker/ReactionPicker.js +12 -2
- package/dist/esm/components/ReactionPicker/styles.js +1 -1
- package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +2 -2
- package/dist/esm/components/ReactionTooltip/styles.js +1 -1
- package/dist/esm/components/Reactions/Reactions.js +1 -1
- package/dist/esm/components/Reactions/styles.js +1 -1
- package/dist/esm/components/Selector/Selector.js +1 -1
- package/dist/esm/components/Selector/styles.js +1 -1
- package/dist/esm/components/ShowMore/ShowMore.js +4 -2
- package/dist/esm/components/ShowMore/index.js +1 -1
- package/dist/esm/components/ShowMore/styles.js +1 -1
- package/dist/esm/components/Trigger/Trigger.js +8 -4
- package/dist/esm/components/Trigger/styles.js +1 -1
- package/dist/esm/containers/ConnectedReactionsView/ConnectedReactionsView.js +5 -7
- package/dist/esm/shared/constants.js +10 -0
- package/dist/esm/store/MemoryReactionsStore.js +32 -29
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/analytics.d.ts +6 -0
- package/dist/types/components/Counter/Counter.d.ts +8 -3
- package/dist/types/components/Counter/index.d.ts +1 -1
- package/dist/types/components/Counter/styles.d.ts +3 -3
- package/dist/types/components/EmojiButton/styles.d.ts +1 -1
- package/dist/types/components/FlashAnimation/styles.d.ts +3 -3
- package/dist/types/components/Reaction/styles.d.ts +4 -4
- package/dist/types/components/ReactionPicker/styles.d.ts +3 -3
- package/dist/types/components/ReactionTooltip/styles.d.ts +3 -3
- package/dist/types/components/Reactions/Reactions.d.ts +2 -1
- package/dist/types/components/Reactions/styles.d.ts +2 -2
- package/dist/types/components/Selector/styles.d.ts +4 -4
- package/dist/types/components/ShowMore/ShowMore.d.ts +2 -1
- package/dist/types/components/ShowMore/index.d.ts +1 -1
- package/dist/types/components/ShowMore/styles.d.ts +3 -3
- package/dist/types/components/Trigger/Trigger.d.ts +5 -1
- package/dist/types/components/Trigger/styles.d.ts +1 -1
- package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +2 -2
- package/dist/types/shared/constants.d.ts +8 -0
- package/dist/types-ts4.0/analytics/analytics.d.ts +6 -0
- package/dist/types-ts4.0/components/Counter/Counter.d.ts +8 -3
- package/dist/types-ts4.0/components/Counter/index.d.ts +1 -1
- package/dist/types-ts4.0/components/Counter/styles.d.ts +3 -3
- package/dist/types-ts4.0/components/EmojiButton/styles.d.ts +1 -1
- package/dist/types-ts4.0/components/FlashAnimation/styles.d.ts +3 -3
- package/dist/types-ts4.0/components/Reaction/styles.d.ts +4 -4
- package/dist/types-ts4.0/components/ReactionPicker/styles.d.ts +3 -3
- package/dist/types-ts4.0/components/ReactionTooltip/styles.d.ts +3 -3
- package/dist/types-ts4.0/components/Reactions/Reactions.d.ts +2 -1
- package/dist/types-ts4.0/components/Reactions/styles.d.ts +2 -2
- package/dist/types-ts4.0/components/Selector/styles.d.ts +4 -4
- package/dist/types-ts4.0/components/ShowMore/ShowMore.d.ts +2 -1
- package/dist/types-ts4.0/components/ShowMore/index.d.ts +1 -1
- package/dist/types-ts4.0/components/ShowMore/styles.d.ts +3 -3
- package/dist/types-ts4.0/components/Trigger/Trigger.d.ts +5 -1
- package/dist/types-ts4.0/components/Trigger/styles.d.ts +1 -1
- package/dist/types-ts4.0/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +2 -2
- package/dist/types-ts4.0/shared/constants.d.ts +8 -0
- package/package.json +6 -5
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
3
|
/**
|
|
4
|
-
* Test id for
|
|
4
|
+
* Test id for component top level div
|
|
5
|
+
*/
|
|
6
|
+
export declare const RENDER_COMPONENT_WRAPPER = "counter-wrapper";
|
|
7
|
+
/**
|
|
8
|
+
* Test id for wrapper div of the counter inside the slider
|
|
5
9
|
*/
|
|
6
10
|
export declare const RENDER_COUNTER_TESTID = "counter-container";
|
|
7
11
|
/**
|
|
8
|
-
*
|
|
12
|
+
* Counter label value wrapper div
|
|
9
13
|
*/
|
|
10
|
-
export declare const
|
|
14
|
+
export declare const RENDER_LABEL_TESTID = "counter_label_wrapper";
|
|
11
15
|
export interface CounterProps {
|
|
12
16
|
/**
|
|
13
17
|
* Count of emoji been selected
|
|
@@ -34,6 +38,7 @@ export interface CounterProps {
|
|
|
34
38
|
*/
|
|
35
39
|
animationDuration?: number;
|
|
36
40
|
}
|
|
41
|
+
export declare const getLabel: (value: number, overLimitLabel?: string | undefined, limit?: number | undefined) => string;
|
|
37
42
|
/**
|
|
38
43
|
* Display reaction count next to the emoji button
|
|
39
44
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Counter, RENDER_COUNTER_TESTID,
|
|
1
|
+
export { Counter, RENDER_COUNTER_TESTID, RENDER_COMPONENT_WRAPPER, RENDER_LABEL_TESTID, } from './Counter';
|
|
2
2
|
export type { CounterProps } from './Counter';
|
|
3
3
|
export * as styles from './styles';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const countStyle: import("@emotion/
|
|
2
|
-
export declare const highlightStyle: import("@emotion/
|
|
3
|
-
export declare const containerStyle: import("@emotion/
|
|
1
|
+
export declare const countStyle: import("@emotion/react").SerializedStyles;
|
|
2
|
+
export declare const highlightStyle: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const containerStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const emojiButtonStyle: import("@emotion/
|
|
1
|
+
export declare const emojiButtonStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { keyframes } from '@emotion/
|
|
2
|
+
import { keyframes } from '@emotion/react';
|
|
3
3
|
export declare const flashAnimation: typeof keyframes;
|
|
4
|
-
export declare const containerStyle: import("@emotion/
|
|
5
|
-
export declare const flashStyle: import("@emotion/
|
|
4
|
+
export declare const containerStyle: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const flashStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Padding and line height are set within the child components
|
|
4
4
|
* of FlashAnimation b/c it otherwise throws off the flash styling
|
|
5
5
|
*/
|
|
6
|
-
export declare const emojiStyle: import("@emotion/
|
|
7
|
-
export declare const reactionStyle: import("@emotion/
|
|
8
|
-
export declare const reactedStyle: import("@emotion/
|
|
6
|
+
export declare const emojiStyle: import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const reactionStyle: import("@emotion/react").SerializedStyles;
|
|
8
|
+
export declare const reactedStyle: import("@emotion/react").SerializedStyles;
|
|
9
9
|
export declare const flashHeight: number;
|
|
10
|
-
export declare const flashStyle: import("@emotion/
|
|
10
|
+
export declare const flashStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const pickerStyle: import("@emotion/
|
|
2
|
-
export declare const contentStyle: import("@emotion/
|
|
3
|
-
export declare const popupStyle: import("@emotion/
|
|
1
|
+
export declare const pickerStyle: import("@emotion/react").SerializedStyles;
|
|
2
|
+
export declare const contentStyle: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const popupStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const verticalMargin = 5;
|
|
2
|
-
export declare const tooltipStyle: import("@emotion/
|
|
3
|
-
export declare const emojiNameStyle: import("@emotion/
|
|
4
|
-
export declare const footerStyle: import("@emotion/
|
|
2
|
+
export declare const tooltipStyle: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const emojiNameStyle: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const footerStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
import { ReactionStatus, ReactionClick, ReactionSummary, QuickReactionEmojiSummary } from '../../types';
|
|
4
5
|
import { ReactionPickerProps } from '../ReactionPicker';
|
|
5
6
|
import { SelectorProps } from '../Selector';
|
|
@@ -49,7 +50,7 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
|
|
|
49
50
|
/**
|
|
50
51
|
* Get content of the tooltip
|
|
51
52
|
*/
|
|
52
|
-
export declare function getTooltip(status: ReactionStatus, errorMessage?: string): string | JSX.Element | null;
|
|
53
|
+
export declare function getTooltip(status: ReactionStatus, errorMessage?: string): string | jsx.JSX.Element | null;
|
|
53
54
|
/**
|
|
54
55
|
* Renders list of reactions
|
|
55
56
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const reactionStyle: import("@emotion/
|
|
2
|
-
export declare const wrapperStyle: import("@emotion/
|
|
1
|
+
export declare const reactionStyle: import("@emotion/react").SerializedStyles;
|
|
2
|
+
export declare const wrapperStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
-
import { keyframes } from '@emotion/
|
|
4
|
-
export declare const selectorStyle: import("@emotion/
|
|
5
|
-
export declare const emojiStyle: import("@emotion/
|
|
3
|
+
import { keyframes } from '@emotion/react';
|
|
4
|
+
export declare const selectorStyle: import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const emojiStyle: import("@emotion/react").SerializedStyles;
|
|
6
6
|
export declare const revealAnimation: typeof keyframes;
|
|
7
|
-
export declare const revealStyle: import("@emotion/
|
|
7
|
+
export declare const revealStyle: import("@emotion/react").SerializedStyles;
|
|
8
8
|
/**
|
|
9
9
|
* custom css styling for the emoji icon
|
|
10
10
|
* @param index location of the emoji in the rendered list of items
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { SerializedStyles } from '@emotion/
|
|
3
|
+
import { SerializedStyles } from '@emotion/react';
|
|
4
4
|
/**
|
|
5
5
|
* Test id for wrapper button
|
|
6
6
|
*/
|
|
7
7
|
export declare const RENDER_SHOWMORE_TESTID = "show-more-button";
|
|
8
|
+
export declare const RENDER_WRAPPER_TESTID = "show-more-wrapper";
|
|
8
9
|
interface CommonProps<T> {
|
|
9
10
|
container?: T;
|
|
10
11
|
button?: T;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ShowMore, RENDER_SHOWMORE_TESTID } from './ShowMore';
|
|
1
|
+
export { ShowMore, RENDER_SHOWMORE_TESTID, RENDER_WRAPPER_TESTID, } from './ShowMore';
|
|
2
2
|
export type { ShowMoreProps } from './ShowMore';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const moreEmojiContainerStyle: import("@emotion/
|
|
2
|
-
export declare const moreButtonStyle: import("@emotion/
|
|
3
|
-
export declare const separatorStyle: import("@emotion/
|
|
1
|
+
export declare const moreEmojiContainerStyle: import("@emotion/react").SerializedStyles;
|
|
2
|
+
export declare const moreButtonStyle: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const separatorStyle: import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import React from 'react';
|
|
2
|
+
import React, { AriaAttributes } from 'react';
|
|
3
3
|
import { AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
4
|
/**
|
|
5
5
|
* Test id for the tooltip
|
|
@@ -24,6 +24,10 @@ export interface TriggerProps {
|
|
|
24
24
|
* Tooltip content for trigger button
|
|
25
25
|
*/
|
|
26
26
|
tooltipContent: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* Aria accessibility attributes that will be added to the button
|
|
29
|
+
*/
|
|
30
|
+
ariaAttributes?: AriaAttributes;
|
|
27
31
|
}
|
|
28
32
|
/**
|
|
29
33
|
* Render an emoji button to open the reactions select picker
|
|
@@ -2,4 +2,4 @@ export declare const DISABLED_BUTTON_COLOR: string;
|
|
|
2
2
|
export declare const triggerStyle: ({ miniMode, disabled }: {
|
|
3
3
|
miniMode?: boolean | undefined;
|
|
4
4
|
disabled?: boolean | undefined;
|
|
5
|
-
}) => import("@emotion/
|
|
5
|
+
}) => import("@emotion/react").SerializedStyles;
|
|
@@ -27,7 +27,7 @@ export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quick
|
|
|
27
27
|
store: StorePropInput;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Export the mapper function outside the component so easier to do unit tests
|
|
30
|
+
* Export the mapper function outside the component so easier to do unit tests
|
|
31
31
|
*/
|
|
32
32
|
export declare const mapStateToPropsHelper: (containerAri: string, ari: string, state?: State | undefined) => {
|
|
33
33
|
status: ReactionStatus;
|
|
@@ -41,7 +41,7 @@ export declare const mapStateToPropsHelper: (containerAri: string, ari: string,
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
|
-
* Export the mapper function outside the component so easier to do unit tests
|
|
44
|
+
* Export the mapper function outside the component so easier to do unit tests
|
|
45
45
|
*/
|
|
46
46
|
export declare const mapDispatchToPropsHelper: (actions: Actions, containerAri: string, ari: string) => {
|
|
47
47
|
loadReaction: () => void;
|
|
@@ -3,6 +3,14 @@ import { EmojiId } from '@atlaskit/emoji/types';
|
|
|
3
3
|
* Initial list of emoji to pick from
|
|
4
4
|
*/
|
|
5
5
|
export declare const DefaultReactions: EmojiId[];
|
|
6
|
+
/**
|
|
7
|
+
* Default label to show for the overLimitLabel prop
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_OVER_THE_LIMIT_REACTION_LABEL = "1k+";
|
|
10
|
+
/**
|
|
11
|
+
* Default maximum value to use when the emoji received higher than top limit reactions
|
|
12
|
+
*/
|
|
13
|
+
export declare const DEFAULT_REACTION_TOP_LIMIT = 1000;
|
|
6
14
|
/**
|
|
7
15
|
* ES6 Map object from default emoji reactions (with key => shortName, value => entire emoji item)
|
|
8
16
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.8.0",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"typesVersions": {
|
|
16
16
|
">=4.0 <4.5": {
|
|
17
17
|
"*": [
|
|
18
|
-
"dist/types-ts4.0/*"
|
|
18
|
+
"dist/types-ts4.0/*",
|
|
19
|
+
"dist/types-ts4.0/index.d.ts"
|
|
19
20
|
]
|
|
20
21
|
}
|
|
21
22
|
},
|
|
@@ -35,11 +36,11 @@
|
|
|
35
36
|
"@atlaskit/analytics-gas-types": "^5.0.0",
|
|
36
37
|
"@atlaskit/analytics-namespaced-context": "^6.5.0",
|
|
37
38
|
"@atlaskit/analytics-next": "^8.2.0",
|
|
38
|
-
"@atlaskit/button": "^16.
|
|
39
|
+
"@atlaskit/button": "^16.4.0",
|
|
39
40
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
40
41
|
"@atlaskit/emoji": "^66.0.0",
|
|
41
42
|
"@atlaskit/icon": "^21.11.0",
|
|
42
|
-
"@atlaskit/motion": "^1.
|
|
43
|
+
"@atlaskit/motion": "^1.3.0",
|
|
43
44
|
"@atlaskit/popper": "^5.0.0",
|
|
44
45
|
"@atlaskit/theme": "^12.2.0",
|
|
45
46
|
"@atlaskit/tokens": "^0.10.0",
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"@atlaskit/ufo": "^0.1.0",
|
|
48
49
|
"@atlaskit/util-service-support": "^6.1.0",
|
|
49
50
|
"@babel/runtime": "^7.0.0",
|
|
50
|
-
"@emotion/
|
|
51
|
+
"@emotion/react": "^11.7.1"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
54
|
"react": "^16.8.0",
|