@atlaskit/smart-card 26.57.0 → 26.57.1

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 (21) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -2
  4. package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +3 -1
  5. package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +2 -1
  6. package/dist/cjs/view/LinkUrl/index.js +1 -1
  7. package/dist/es2019/utils/analytics/analytics.js +1 -1
  8. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -2
  9. package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +3 -1
  10. package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +2 -1
  11. package/dist/es2019/view/LinkUrl/index.js +1 -1
  12. package/dist/esm/utils/analytics/analytics.js +1 -1
  13. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/index.js +3 -2
  14. package/dist/esm/view/FlexibleCard/components/actions/action/index.js +3 -1
  15. package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +2 -1
  16. package/dist/esm/view/LinkUrl/index.js +1 -1
  17. package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +1 -0
  18. package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +4 -0
  19. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +1 -0
  20. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +4 -0
  21. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 26.57.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#92926](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92926) [`9bc2cc714add`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/9bc2cc714add) - [ux] Hide ActionBlock Tooltip on MouseDown for PreviewAction
8
+
3
9
  ## 26.57.0
4
10
 
5
11
  ### Minor Changes
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "26.57.0"
25
+ packageVersion: "26.57.1"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -57,7 +57,8 @@ var ActionStackItem = function ActionStackItem(_ref) {
57
57
  testId = _ref.testId,
58
58
  tooltipMessage = _ref.tooltipMessage,
59
59
  xcss = _ref.xcss,
60
- tooltipOnHide = _ref.tooltipOnHide;
60
+ tooltipOnHide = _ref.tooltipOnHide,
61
+ hideTooltipOnMouseDown = _ref.hideTooltipOnMouseDown;
61
62
  var space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : (0, _utils.getPrimitivesInlineSpaceBySize)(size);
62
63
  var onClick = (0, _react.useCallback)(function () {
63
64
  if (!isDisabled && !isLoading && onClickCallback) {
@@ -76,7 +77,7 @@ var ActionStackItem = function ActionStackItem(_ref) {
76
77
  return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
77
78
  content: tooltipMessage || content,
78
79
  onHide: tooltipOnHide,
79
- hideTooltipOnMouseDown: true
80
+ hideTooltipOnMouseDown: hideTooltipOnMouseDown
80
81
  }, function (tooltipProps) {
81
82
  return /*#__PURE__*/_react.default.createElement(_primitives.Box, (0, _extends2.default)({
82
83
  as: "button",
@@ -36,6 +36,7 @@ var Action = function Action(_ref) {
36
36
  spaceInline = _ref.spaceInline,
37
37
  tooltipMessage = _ref.tooltipMessage,
38
38
  tooltipOnHide = _ref.tooltipOnHide,
39
+ hideTooltipOnMouseDown = _ref.hideTooltipOnMouseDown,
39
40
  xcss = _ref.xcss,
40
41
  asDropDownItem = _ref.asDropDownItem,
41
42
  overrideCss = _ref.overrideCss,
@@ -69,7 +70,8 @@ var Action = function Action(_ref) {
69
70
  testId: testId,
70
71
  tooltipMessage: tooltipMessage || content,
71
72
  xcss: xcss,
72
- tooltipOnHide: tooltipOnHide
73
+ tooltipOnHide: tooltipOnHide,
74
+ hideTooltipOnMouseDown: hideTooltipOnMouseDown
73
75
  });
74
76
  }
75
77
  if (isDropdownItem) {
@@ -81,7 +81,8 @@ var PreviewAction = function PreviewAction(_ref) {
81
81
  }),
82
82
  onClick: onClick,
83
83
  testId: "smart-action-preview-action",
84
- tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, tooltipMessage)
84
+ tooltipMessage: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, tooltipMessage),
85
+ hideTooltipOnMouseDown: true
85
86
  }, data, props)) : null;
86
87
  };
87
88
  var _default = exports.default = PreviewAction;
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "26.57.0",
20
+ packageVersion: "26.57.1",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "26.57.0"
7
+ packageVersion: "26.57.1"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -47,7 +47,8 @@ const ActionStackItem = ({
47
47
  testId,
48
48
  tooltipMessage,
49
49
  xcss,
50
- tooltipOnHide
50
+ tooltipOnHide,
51
+ hideTooltipOnMouseDown
51
52
  }) => {
52
53
  const space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : getPrimitivesInlineSpaceBySize(size);
53
54
  const onClick = useCallback(() => {
@@ -67,7 +68,7 @@ const ActionStackItem = ({
67
68
  return /*#__PURE__*/React.createElement(Tooltip, {
68
69
  content: tooltipMessage || content,
69
70
  onHide: tooltipOnHide,
70
- hideTooltipOnMouseDown: true
71
+ hideTooltipOnMouseDown: hideTooltipOnMouseDown
71
72
  }, tooltipProps => /*#__PURE__*/React.createElement(Box, _extends({
72
73
  as: "button",
73
74
  xcss: [buttonStyles, xcss]
@@ -25,6 +25,7 @@ const Action = ({
25
25
  spaceInline,
26
26
  tooltipMessage,
27
27
  tooltipOnHide,
28
+ hideTooltipOnMouseDown,
28
29
  xcss,
29
30
  asDropDownItem,
30
31
  overrideCss,
@@ -59,7 +60,8 @@ const Action = ({
59
60
  testId: testId,
60
61
  tooltipMessage: tooltipMessage || content,
61
62
  xcss: xcss,
62
- tooltipOnHide: tooltipOnHide
63
+ tooltipOnHide: tooltipOnHide,
64
+ hideTooltipOnMouseDown: hideTooltipOnMouseDown
63
65
  });
64
66
  }
65
67
  if (isDropdownItem) {
@@ -50,7 +50,8 @@ const PreviewAction = ({
50
50
  }),
51
51
  onClick: onClick,
52
52
  testId: "smart-action-preview-action",
53
- tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage)
53
+ tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage),
54
+ hideTooltipOnMouseDown: true
54
55
  }, data, props)) : null;
55
56
  };
56
57
  export default PreviewAction;
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "26.57.0",
10
+ packageVersion: "26.57.1",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "26.57.0"
18
+ packageVersion: "26.57.1"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -47,7 +47,8 @@ var ActionStackItem = function ActionStackItem(_ref) {
47
47
  testId = _ref.testId,
48
48
  tooltipMessage = _ref.tooltipMessage,
49
49
  xcss = _ref.xcss,
50
- tooltipOnHide = _ref.tooltipOnHide;
50
+ tooltipOnHide = _ref.tooltipOnHide,
51
+ hideTooltipOnMouseDown = _ref.hideTooltipOnMouseDown;
51
52
  var space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : getPrimitivesInlineSpaceBySize(size);
52
53
  var onClick = useCallback(function () {
53
54
  if (!isDisabled && !isLoading && onClickCallback) {
@@ -66,7 +67,7 @@ var ActionStackItem = function ActionStackItem(_ref) {
66
67
  return /*#__PURE__*/React.createElement(Tooltip, {
67
68
  content: tooltipMessage || content,
68
69
  onHide: tooltipOnHide,
69
- hideTooltipOnMouseDown: true
70
+ hideTooltipOnMouseDown: hideTooltipOnMouseDown
70
71
  }, function (tooltipProps) {
71
72
  return /*#__PURE__*/React.createElement(Box, _extends({
72
73
  as: "button",
@@ -30,6 +30,7 @@ var Action = function Action(_ref) {
30
30
  spaceInline = _ref.spaceInline,
31
31
  tooltipMessage = _ref.tooltipMessage,
32
32
  tooltipOnHide = _ref.tooltipOnHide,
33
+ hideTooltipOnMouseDown = _ref.hideTooltipOnMouseDown,
33
34
  xcss = _ref.xcss,
34
35
  asDropDownItem = _ref.asDropDownItem,
35
36
  overrideCss = _ref.overrideCss,
@@ -63,7 +64,8 @@ var Action = function Action(_ref) {
63
64
  testId: testId,
64
65
  tooltipMessage: tooltipMessage || content,
65
66
  xcss: xcss,
66
- tooltipOnHide: tooltipOnHide
67
+ tooltipOnHide: tooltipOnHide,
68
+ hideTooltipOnMouseDown: hideTooltipOnMouseDown
67
69
  });
68
70
  }
69
71
  if (isDropdownItem) {
@@ -71,7 +71,8 @@ var PreviewAction = function PreviewAction(_ref) {
71
71
  }),
72
72
  onClick: onClick,
73
73
  testId: "smart-action-preview-action",
74
- tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage)
74
+ tooltipMessage: /*#__PURE__*/React.createElement(FormattedMessage, tooltipMessage),
75
+ hideTooltipOnMouseDown: true
75
76
  }, data, props)) : null;
76
77
  };
77
78
  export default PreviewAction;
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "26.57.0",
13
+ packageVersion: "26.57.1",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -9,4 +9,5 @@ export type ActionStackItemProps = ActionProps & {
9
9
  space?: Space;
10
10
  xcss?: XCSS;
11
11
  tooltipOnHide?: (analyticsEvent: UIAnalyticsEvent) => any;
12
+ hideTooltipOnMouseDown?: boolean;
12
13
  };
@@ -46,6 +46,10 @@ export type ActionProps = {
46
46
  * Determines the onHide behaviour of the Tooltip
47
47
  */
48
48
  tooltipOnHide?: (analyticsEvent: UIAnalyticsEvent) => any;
49
+ /**
50
+ * Determines the hideTooltipOnMouseDown behaviour of the Tooltip
51
+ */
52
+ hideTooltipOnMouseDown?: boolean;
49
53
  /**
50
54
  * @deprecated Use 'as' instead
51
55
  * Used to determine whether the Action is in a Dropdown.
@@ -9,4 +9,5 @@ export type ActionStackItemProps = ActionProps & {
9
9
  space?: Space;
10
10
  xcss?: XCSS;
11
11
  tooltipOnHide?: (analyticsEvent: UIAnalyticsEvent) => any;
12
+ hideTooltipOnMouseDown?: boolean;
12
13
  };
@@ -46,6 +46,10 @@ export type ActionProps = {
46
46
  * Determines the onHide behaviour of the Tooltip
47
47
  */
48
48
  tooltipOnHide?: (analyticsEvent: UIAnalyticsEvent) => any;
49
+ /**
50
+ * Determines the hideTooltipOnMouseDown behaviour of the Tooltip
51
+ */
52
+ hideTooltipOnMouseDown?: boolean;
49
53
  /**
50
54
  * @deprecated Use 'as' instead
51
55
  * Used to determine whether the Action is in a Dropdown.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.57.0",
3
+ "version": "26.57.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"