@atlaskit/reactions 34.0.7 → 34.1.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 +7 -0
- package/dist/cjs/components/ReactionPicker.js +2 -1
- package/dist/cjs/components/Trigger.js +4 -2
- package/dist/es2019/components/ReactionPicker.js +2 -1
- package/dist/es2019/components/Trigger.js +4 -2
- package/dist/esm/components/ReactionPicker.js +2 -1
- package/dist/esm/components/Trigger.js +4 -2
- package/dist/types/components/Trigger.d.ts +8 -0
- package/dist/types-ts4.5/components/Trigger.d.ts +8 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 34.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`954d295f45814`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/954d295f45814) -
|
|
8
|
+
[ux] Ensuring add emoji button takes emojiPickerSize as size
|
|
9
|
+
|
|
3
10
|
## 34.0.7
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -323,7 +323,8 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
323
323
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
324
324
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
325
325
|
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
326
|
-
isListItem: isListItem
|
|
326
|
+
isListItem: isListItem,
|
|
327
|
+
emojiPickerSize: emojiPickerSize
|
|
327
328
|
}))
|
|
328
329
|
);
|
|
329
330
|
}), isPopupTrayOpen && /*#__PURE__*/_react.default.createElement(_portal.default, {
|
|
@@ -76,7 +76,8 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react2.default.forwardRef(function
|
|
|
76
76
|
_props$isListItem = props.isListItem,
|
|
77
77
|
isListItem = _props$isListItem === void 0 ? false : _props$isListItem,
|
|
78
78
|
_props$fullWidthSelec = props.fullWidthSelectorTrayReactionPickerTrigger,
|
|
79
|
-
fullWidthSelectorTrayReactionPickerTrigger = _props$fullWidthSelec === void 0 ? false : _props$fullWidthSelec
|
|
79
|
+
fullWidthSelectorTrayReactionPickerTrigger = _props$fullWidthSelec === void 0 ? false : _props$fullWidthSelec,
|
|
80
|
+
emojiPickerSize = props.emojiPickerSize;
|
|
80
81
|
var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
|
|
81
82
|
if (onClick && !disabled) {
|
|
82
83
|
onClick(e, analyticsEvent);
|
|
@@ -101,7 +102,8 @@ var Trigger = exports.Trigger = /*#__PURE__*/_react2.default.forwardRef(function
|
|
|
101
102
|
_react2.default.createElement(_emojiAdd.default, {
|
|
102
103
|
testId: "emoji-add-icon",
|
|
103
104
|
color: disabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon, #292A2E)",
|
|
104
|
-
label: "Add reaction"
|
|
105
|
+
label: "Add reaction",
|
|
106
|
+
size: emojiPickerSize === 'small' ? 'small' : 'medium'
|
|
105
107
|
}), showAddReactionText && /*#__PURE__*/_react2.default.createElement(_compiled.Box, {
|
|
106
108
|
xcss: (0, _react.cx)(addReactionStyles.addReactionMessage)
|
|
107
109
|
}, reactionPickerTriggerText));
|
|
@@ -281,7 +281,8 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
281
281
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
282
282
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
283
283
|
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
284
|
-
isListItem: isListItem
|
|
284
|
+
isListItem: isListItem,
|
|
285
|
+
emojiPickerSize: emojiPickerSize
|
|
285
286
|
}))), isPopupTrayOpen && /*#__PURE__*/React.createElement(Portal, {
|
|
286
287
|
zIndex: reactionPickerPopperZIndex || layers.flag()
|
|
287
288
|
}, /*#__PURE__*/React.createElement(PopperWrapper, {
|
|
@@ -62,7 +62,8 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
62
62
|
reactionPickerTriggerText = formatMessage(i18n.addReaction),
|
|
63
63
|
fullWidthSummaryViewReactionPickerTrigger = false,
|
|
64
64
|
isListItem = false,
|
|
65
|
-
fullWidthSelectorTrayReactionPickerTrigger = false
|
|
65
|
+
fullWidthSelectorTrayReactionPickerTrigger = false,
|
|
66
|
+
emojiPickerSize
|
|
66
67
|
} = props;
|
|
67
68
|
const handleMouseDown = (e, analyticsEvent) => {
|
|
68
69
|
if (onClick && !disabled) {
|
|
@@ -87,7 +88,8 @@ export const Trigger = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
87
88
|
React.createElement(EmojiAddIcon, {
|
|
88
89
|
testId: "emoji-add-icon",
|
|
89
90
|
color: disabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon, #292A2E)",
|
|
90
|
-
label: "Add reaction"
|
|
91
|
+
label: "Add reaction",
|
|
92
|
+
size: emojiPickerSize === 'small' ? 'small' : 'medium'
|
|
91
93
|
}), showAddReactionText && /*#__PURE__*/React.createElement(Box, {
|
|
92
94
|
xcss: cx(addReactionStyles.addReactionMessage)
|
|
93
95
|
}, reactionPickerTriggerText));
|
|
@@ -314,7 +314,8 @@ export var ReactionPicker = /*#__PURE__*/React.memo(function (props) {
|
|
|
314
314
|
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
315
315
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
316
316
|
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
317
|
-
isListItem: isListItem
|
|
317
|
+
isListItem: isListItem,
|
|
318
|
+
emojiPickerSize: emojiPickerSize
|
|
318
319
|
}))
|
|
319
320
|
);
|
|
320
321
|
}), isPopupTrayOpen && /*#__PURE__*/React.createElement(Portal, {
|
|
@@ -69,7 +69,8 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
69
69
|
_props$isListItem = props.isListItem,
|
|
70
70
|
isListItem = _props$isListItem === void 0 ? false : _props$isListItem,
|
|
71
71
|
_props$fullWidthSelec = props.fullWidthSelectorTrayReactionPickerTrigger,
|
|
72
|
-
fullWidthSelectorTrayReactionPickerTrigger = _props$fullWidthSelec === void 0 ? false : _props$fullWidthSelec
|
|
72
|
+
fullWidthSelectorTrayReactionPickerTrigger = _props$fullWidthSelec === void 0 ? false : _props$fullWidthSelec,
|
|
73
|
+
emojiPickerSize = props.emojiPickerSize;
|
|
73
74
|
var handleMouseDown = function handleMouseDown(e, analyticsEvent) {
|
|
74
75
|
if (onClick && !disabled) {
|
|
75
76
|
onClick(e, analyticsEvent);
|
|
@@ -94,7 +95,8 @@ export var Trigger = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
94
95
|
React.createElement(EmojiAddIcon, {
|
|
95
96
|
testId: "emoji-add-icon",
|
|
96
97
|
color: disabled ? "var(--ds-icon-disabled, #080F214A)" : "var(--ds-icon, #292A2E)",
|
|
97
|
-
label: "Add reaction"
|
|
98
|
+
label: "Add reaction",
|
|
99
|
+
size: emojiPickerSize === 'small' ? 'small' : 'medium'
|
|
98
100
|
}), showAddReactionText && /*#__PURE__*/React.createElement(Box, {
|
|
99
101
|
xcss: cx(addReactionStyles.addReactionMessage)
|
|
100
102
|
}, reactionPickerTriggerText));
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type AriaAttributes } from 'react';
|
|
6
6
|
import { type AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
+
import { type PickerSize } from '@atlaskit/emoji/types';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
/**
|
|
9
10
|
* Test id for the tooltip
|
|
@@ -21,6 +22,13 @@ export interface TriggerProps {
|
|
|
21
22
|
* Enable/Disable the button to be clickable (defaults to false)
|
|
22
23
|
*/
|
|
23
24
|
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Optional emoji picker size; when supplied, the default trigger icon is rendered at the
|
|
27
|
+
* matching size ('small' = 12px, 'medium' = 16px). Mirrors the size used by the emoji
|
|
28
|
+
* picker popup so the trigger stays visually consistent. `'large'` is excluded because
|
|
29
|
+
* the underlying icon family does not provide a large variant.
|
|
30
|
+
*/
|
|
31
|
+
emojiPickerSize?: PickerSize;
|
|
24
32
|
fullWidthSelectorTrayReactionPickerTrigger?: boolean;
|
|
25
33
|
/**
|
|
26
34
|
* Optional prop for controlling if the summary view reaction picker trigger should be full width
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type AriaAttributes } from 'react';
|
|
6
6
|
import { type AnalyticsEvent } from '@atlaskit/analytics-next';
|
|
7
|
+
import { type PickerSize } from '@atlaskit/emoji/types';
|
|
7
8
|
import React from 'react';
|
|
8
9
|
/**
|
|
9
10
|
* Test id for the tooltip
|
|
@@ -21,6 +22,13 @@ export interface TriggerProps {
|
|
|
21
22
|
* Enable/Disable the button to be clickable (defaults to false)
|
|
22
23
|
*/
|
|
23
24
|
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Optional emoji picker size; when supplied, the default trigger icon is rendered at the
|
|
27
|
+
* matching size ('small' = 12px, 'medium' = 16px). Mirrors the size used by the emoji
|
|
28
|
+
* picker popup so the trigger stays visually consistent. `'large'` is excluded because
|
|
29
|
+
* the underlying icon family does not provide a large variant.
|
|
30
|
+
*/
|
|
31
|
+
emojiPickerSize?: PickerSize;
|
|
24
32
|
fullWidthSelectorTrayReactionPickerTrigger?: boolean;
|
|
25
33
|
/**
|
|
26
34
|
* Optional prop for controlling if the summary view reaction picker trigger should be full width
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "34.0
|
|
3
|
+
"version": "34.1.0",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@atlaskit/elements-test-helpers": "workspace:^",
|
|
73
73
|
"@atlaskit/util-data-test": "^18.5.0",
|
|
74
74
|
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
75
|
-
"@atlassian/feature-flags-test-utils": "^1.
|
|
75
|
+
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
76
76
|
"@testing-library/dom": "^10.1.0",
|
|
77
77
|
"@testing-library/jest-dom": "^6.4.5",
|
|
78
78
|
"@testing-library/react": "^16.3.0",
|