@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.
Files changed (121) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/analytics/analytics.js +21 -2
  3. package/dist/cjs/components/Counter/Counter.js +39 -31
  4. package/dist/cjs/components/Counter/index.js +8 -2
  5. package/dist/cjs/components/Counter/styles.js +4 -4
  6. package/dist/cjs/components/EmojiButton/EmojiButton.js +3 -3
  7. package/dist/cjs/components/EmojiButton/styles.js +2 -2
  8. package/dist/cjs/components/FlashAnimation/FlashAnimation.js +2 -2
  9. package/dist/cjs/components/FlashAnimation/styles.js +4 -4
  10. package/dist/cjs/components/Reaction/Reaction.js +7 -7
  11. package/dist/cjs/components/Reaction/styles.js +5 -5
  12. package/dist/cjs/components/ReactionPicker/ReactionPicker.js +22 -12
  13. package/dist/cjs/components/ReactionPicker/styles.js +4 -4
  14. package/dist/cjs/components/ReactionTooltip/ReactionTooltip.js +8 -8
  15. package/dist/cjs/components/ReactionTooltip/styles.js +4 -4
  16. package/dist/cjs/components/Reactions/Reactions.js +7 -7
  17. package/dist/cjs/components/Reactions/styles.js +3 -3
  18. package/dist/cjs/components/Selector/Selector.js +6 -6
  19. package/dist/cjs/components/Selector/styles.js +5 -5
  20. package/dist/cjs/components/ShowMore/ShowMore.js +12 -9
  21. package/dist/cjs/components/ShowMore/index.js +6 -0
  22. package/dist/cjs/components/ShowMore/styles.js +4 -4
  23. package/dist/cjs/components/Trigger/Trigger.js +10 -6
  24. package/dist/cjs/components/Trigger/styles.js +2 -2
  25. package/dist/cjs/containers/ConnectedReactionsView/ConnectedReactionsView.js +5 -7
  26. package/dist/cjs/shared/constants.js +14 -2
  27. package/dist/cjs/store/MemoryReactionsStore.js +33 -29
  28. package/dist/cjs/version.json +1 -1
  29. package/dist/es2019/analytics/analytics.js +17 -1
  30. package/dist/es2019/components/Counter/Counter.js +39 -32
  31. package/dist/es2019/components/Counter/index.js +1 -1
  32. package/dist/es2019/components/Counter/styles.js +1 -1
  33. package/dist/es2019/components/EmojiButton/EmojiButton.js +1 -1
  34. package/dist/es2019/components/EmojiButton/styles.js +1 -1
  35. package/dist/es2019/components/FlashAnimation/FlashAnimation.js +1 -1
  36. package/dist/es2019/components/FlashAnimation/styles.js +1 -1
  37. package/dist/es2019/components/Reaction/Reaction.js +1 -1
  38. package/dist/es2019/components/Reaction/styles.js +1 -1
  39. package/dist/es2019/components/ReactionPicker/ReactionPicker.js +12 -2
  40. package/dist/es2019/components/ReactionPicker/styles.js +1 -1
  41. package/dist/es2019/components/ReactionTooltip/ReactionTooltip.js +2 -2
  42. package/dist/es2019/components/ReactionTooltip/styles.js +1 -1
  43. package/dist/es2019/components/Reactions/Reactions.js +1 -1
  44. package/dist/es2019/components/Reactions/styles.js +1 -1
  45. package/dist/es2019/components/Selector/Selector.js +1 -1
  46. package/dist/es2019/components/Selector/styles.js +1 -1
  47. package/dist/es2019/components/ShowMore/ShowMore.js +4 -2
  48. package/dist/es2019/components/ShowMore/index.js +1 -1
  49. package/dist/es2019/components/ShowMore/styles.js +1 -1
  50. package/dist/es2019/components/Trigger/Trigger.js +7 -4
  51. package/dist/es2019/components/Trigger/styles.js +1 -1
  52. package/dist/es2019/containers/ConnectedReactionsView/ConnectedReactionsView.js +5 -7
  53. package/dist/es2019/shared/constants.js +10 -0
  54. package/dist/es2019/store/MemoryReactionsStore.js +32 -29
  55. package/dist/es2019/version.json +1 -1
  56. package/dist/esm/analytics/analytics.js +16 -0
  57. package/dist/esm/components/Counter/Counter.js +26 -24
  58. package/dist/esm/components/Counter/index.js +1 -1
  59. package/dist/esm/components/Counter/styles.js +1 -1
  60. package/dist/esm/components/EmojiButton/EmojiButton.js +1 -1
  61. package/dist/esm/components/EmojiButton/styles.js +1 -1
  62. package/dist/esm/components/FlashAnimation/FlashAnimation.js +1 -1
  63. package/dist/esm/components/FlashAnimation/styles.js +1 -1
  64. package/dist/esm/components/Reaction/Reaction.js +1 -1
  65. package/dist/esm/components/Reaction/styles.js +1 -1
  66. package/dist/esm/components/ReactionPicker/ReactionPicker.js +12 -2
  67. package/dist/esm/components/ReactionPicker/styles.js +1 -1
  68. package/dist/esm/components/ReactionTooltip/ReactionTooltip.js +2 -2
  69. package/dist/esm/components/ReactionTooltip/styles.js +1 -1
  70. package/dist/esm/components/Reactions/Reactions.js +1 -1
  71. package/dist/esm/components/Reactions/styles.js +1 -1
  72. package/dist/esm/components/Selector/Selector.js +1 -1
  73. package/dist/esm/components/Selector/styles.js +1 -1
  74. package/dist/esm/components/ShowMore/ShowMore.js +4 -2
  75. package/dist/esm/components/ShowMore/index.js +1 -1
  76. package/dist/esm/components/ShowMore/styles.js +1 -1
  77. package/dist/esm/components/Trigger/Trigger.js +8 -4
  78. package/dist/esm/components/Trigger/styles.js +1 -1
  79. package/dist/esm/containers/ConnectedReactionsView/ConnectedReactionsView.js +5 -7
  80. package/dist/esm/shared/constants.js +10 -0
  81. package/dist/esm/store/MemoryReactionsStore.js +32 -29
  82. package/dist/esm/version.json +1 -1
  83. package/dist/types/analytics/analytics.d.ts +6 -0
  84. package/dist/types/components/Counter/Counter.d.ts +8 -3
  85. package/dist/types/components/Counter/index.d.ts +1 -1
  86. package/dist/types/components/Counter/styles.d.ts +3 -3
  87. package/dist/types/components/EmojiButton/styles.d.ts +1 -1
  88. package/dist/types/components/FlashAnimation/styles.d.ts +3 -3
  89. package/dist/types/components/Reaction/styles.d.ts +4 -4
  90. package/dist/types/components/ReactionPicker/styles.d.ts +3 -3
  91. package/dist/types/components/ReactionTooltip/styles.d.ts +3 -3
  92. package/dist/types/components/Reactions/Reactions.d.ts +2 -1
  93. package/dist/types/components/Reactions/styles.d.ts +2 -2
  94. package/dist/types/components/Selector/styles.d.ts +4 -4
  95. package/dist/types/components/ShowMore/ShowMore.d.ts +2 -1
  96. package/dist/types/components/ShowMore/index.d.ts +1 -1
  97. package/dist/types/components/ShowMore/styles.d.ts +3 -3
  98. package/dist/types/components/Trigger/Trigger.d.ts +5 -1
  99. package/dist/types/components/Trigger/styles.d.ts +1 -1
  100. package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +2 -2
  101. package/dist/types/shared/constants.d.ts +8 -0
  102. package/dist/types-ts4.0/analytics/analytics.d.ts +6 -0
  103. package/dist/types-ts4.0/components/Counter/Counter.d.ts +8 -3
  104. package/dist/types-ts4.0/components/Counter/index.d.ts +1 -1
  105. package/dist/types-ts4.0/components/Counter/styles.d.ts +3 -3
  106. package/dist/types-ts4.0/components/EmojiButton/styles.d.ts +1 -1
  107. package/dist/types-ts4.0/components/FlashAnimation/styles.d.ts +3 -3
  108. package/dist/types-ts4.0/components/Reaction/styles.d.ts +4 -4
  109. package/dist/types-ts4.0/components/ReactionPicker/styles.d.ts +3 -3
  110. package/dist/types-ts4.0/components/ReactionTooltip/styles.d.ts +3 -3
  111. package/dist/types-ts4.0/components/Reactions/Reactions.d.ts +2 -1
  112. package/dist/types-ts4.0/components/Reactions/styles.d.ts +2 -2
  113. package/dist/types-ts4.0/components/Selector/styles.d.ts +4 -4
  114. package/dist/types-ts4.0/components/ShowMore/ShowMore.d.ts +2 -1
  115. package/dist/types-ts4.0/components/ShowMore/index.d.ts +1 -1
  116. package/dist/types-ts4.0/components/ShowMore/styles.d.ts +3 -3
  117. package/dist/types-ts4.0/components/Trigger/Trigger.d.ts +5 -1
  118. package/dist/types-ts4.0/components/Trigger/styles.d.ts +1 -1
  119. package/dist/types-ts4.0/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +2 -2
  120. package/dist/types-ts4.0/shared/constants.d.ts +8 -0
  121. 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 wrapper div
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
- * Test id for container div
12
+ * Counter label value wrapper div
9
13
  */
10
- export declare const RENDER_COUNTER_WRAPPER_TESTID = "counter-wrapper";
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, RENDER_COUNTER_WRAPPER_TESTID, } from './Counter';
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/utils").SerializedStyles;
2
- export declare const highlightStyle: import("@emotion/utils").SerializedStyles;
3
- export declare const containerStyle: import("@emotion/utils").SerializedStyles;
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/utils").SerializedStyles;
1
+ export declare const emojiButtonStyle: import("@emotion/react").SerializedStyles;
@@ -1,5 +1,5 @@
1
1
  /** @jsx jsx */
2
- import { keyframes } from '@emotion/core';
2
+ import { keyframes } from '@emotion/react';
3
3
  export declare const flashAnimation: typeof keyframes;
4
- export declare const containerStyle: import("@emotion/utils").SerializedStyles;
5
- export declare const flashStyle: import("@emotion/utils").SerializedStyles;
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/utils").SerializedStyles;
7
- export declare const reactionStyle: import("@emotion/utils").SerializedStyles;
8
- export declare const reactedStyle: import("@emotion/utils").SerializedStyles;
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/utils").SerializedStyles;
10
+ export declare const flashStyle: import("@emotion/react").SerializedStyles;
@@ -1,3 +1,3 @@
1
- export declare const pickerStyle: import("@emotion/utils").SerializedStyles;
2
- export declare const contentStyle: import("@emotion/utils").SerializedStyles;
3
- export declare const popupStyle: import("@emotion/utils").SerializedStyles;
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/utils").SerializedStyles;
3
- export declare const emojiNameStyle: import("@emotion/utils").SerializedStyles;
4
- export declare const footerStyle: import("@emotion/utils").SerializedStyles;
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/utils").SerializedStyles;
2
- export declare const wrapperStyle: import("@emotion/utils").SerializedStyles;
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/core';
4
- export declare const selectorStyle: import("@emotion/utils").SerializedStyles;
5
- export declare const emojiStyle: import("@emotion/utils").SerializedStyles;
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/utils").SerializedStyles;
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/core';
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/utils").SerializedStyles;
2
- export declare const moreButtonStyle: import("@emotion/utils").SerializedStyles;
3
- export declare const separatorStyle: import("@emotion/utils").SerializedStyles;
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/utils").SerializedStyles;
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 migration from Enzyme to React Testing Library
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 migration from Enzyme to React Testing Library
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.7.0",
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.3.0",
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.2.0",
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/core": "^10.0.9"
51
+ "@emotion/react": "^11.7.1"
51
52
  },
52
53
  "peerDependencies": {
53
54
  "react": "^16.8.0",