@atlaskit/smart-card 27.7.0 → 27.7.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 (26) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/BlockCard/components/Action.js +2 -2
  4. package/dist/cjs/view/EmbedCard/views/ErroredView.js +2 -2
  5. package/dist/cjs/view/EmbedModal/components/link-info/link-info-button/index.js +2 -2
  6. package/dist/cjs/view/InlineCard/ErroredView/index.js +2 -2
  7. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +3 -3
  8. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +2 -2
  9. package/dist/cjs/view/LinkUrl/index.js +1 -1
  10. package/dist/es2019/utils/analytics/analytics.js +1 -1
  11. package/dist/es2019/view/BlockCard/components/Action.js +1 -1
  12. package/dist/es2019/view/EmbedCard/views/ErroredView.js +1 -1
  13. package/dist/es2019/view/EmbedModal/components/link-info/link-info-button/index.js +1 -1
  14. package/dist/es2019/view/InlineCard/ErroredView/index.js +1 -1
  15. package/dist/es2019/view/InlineCard/ForbiddenView/index.js +1 -1
  16. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +1 -1
  17. package/dist/es2019/view/LinkUrl/index.js +1 -1
  18. package/dist/esm/utils/analytics/analytics.js +1 -1
  19. package/dist/esm/view/BlockCard/components/Action.js +1 -1
  20. package/dist/esm/view/EmbedCard/views/ErroredView.js +1 -1
  21. package/dist/esm/view/EmbedModal/components/link-info/link-info-button/index.js +1 -1
  22. package/dist/esm/view/InlineCard/ErroredView/index.js +1 -1
  23. package/dist/esm/view/InlineCard/ForbiddenView/index.js +1 -1
  24. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -1
  25. package/dist/esm/view/LinkUrl/index.js +1 -1
  26. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 27.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#114683](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114683)
8
+ [`ff0815316ab38`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ff0815316ab38) -
9
+ Removes usage of custom theme button in places where its API is not being used and the default
10
+ button is able to be used instead. This should give a slight performance (runtime) improvement.
11
+
3
12
  ## 27.7.0
4
13
 
5
14
  ### 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: "27.7.0"
25
+ packageVersion: "27.7.1"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -8,7 +8,7 @@ exports.spinnerDelay = exports.Action = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _react = require("@emotion/react");
10
10
  var _react2 = require("react");
11
- var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
11
+ var _button = require("@atlaskit/button");
12
12
  var _ActionIcon = require("./ActionIcon");
13
13
  /** @jsx jsx */
14
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -27,7 +27,7 @@ var Action = exports.Action = function Action(_ref) {
27
27
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
28
28
  state = _useState2[0],
29
29
  setState = _useState2[1];
30
- return (0, _react.jsx)(_customThemeButton.default, {
30
+ return (0, _react.jsx)(_button.LoadingButton, {
31
31
  spacing: "compact",
32
32
  appearance: buttonAppearance,
33
33
  isLoading: state === 'loading',
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.EmbedCardErroredView = void 0;
8
8
  var _react = require("@emotion/react");
9
- var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
9
+ var _button = _interopRequireDefault(require("@atlaskit/button"));
10
10
  var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
11
11
  var _constants = require("@atlaskit/theme/constants");
12
12
  var _colors = require("@atlaskit/theme/colors");
@@ -50,7 +50,7 @@ var EmbedCardErroredView = exports.EmbedCardErroredView = function EmbedCardErro
50
50
  label: "error-icon"
51
51
  }), (0, _react.jsx)("span", {
52
52
  css: messageStyles
53
- }, (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.could_not_load_link)), (0, _react.jsx)(_customThemeButton.default, {
53
+ }, (0, _react.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.could_not_load_link)), (0, _react.jsx)(_button.default, {
54
54
  testId: "err-view-retry",
55
55
  appearance: "link",
56
56
  spacing: "none",
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
10
- var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
10
+ var _button = _interopRequireDefault(require("@atlaskit/button"));
11
11
  var _useLinkClicked = require("../../../../../state/analytics/useLinkClicked");
12
12
  var LinkInfoButton = function LinkInfoButton(_ref) {
13
13
  var content = _ref.content,
@@ -22,7 +22,7 @@ var LinkInfoButton = function LinkInfoButton(_ref) {
22
22
  hideTooltipOnClick: true,
23
23
  tag: "span",
24
24
  testId: "".concat(testId, "-tooltip")
25
- }, /*#__PURE__*/_react.default.createElement(_customThemeButton.default, {
25
+ }, /*#__PURE__*/_react.default.createElement(_button.default, {
26
26
  appearance: "subtle",
27
27
  href: href,
28
28
  iconBefore: icon,
@@ -15,7 +15,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
15
15
  var _react = _interopRequireDefault(require("react"));
16
16
  var _colors = require("@atlaskit/theme/colors");
17
17
  var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
18
- var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
18
+ var _button = _interopRequireDefault(require("@atlaskit/button"));
19
19
  var _Frame = require("../Frame");
20
20
  var _IconAndTitleLayout = require("../IconAndTitleLayout");
21
21
  var _Icon = require("../Icon");
@@ -47,7 +47,7 @@ var InlineCardErroredView = exports.InlineCardErroredView = /*#__PURE__*/functio
47
47
  });
48
48
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderActionButton", function () {
49
49
  var onRetry = _this.props.onRetry;
50
- var ActionButton = (0, _withFrameStyleControl.default)(_customThemeButton.default, _this.frameRef);
50
+ var ActionButton = (0, _withFrameStyleControl.default)(_button.default, _this.frameRef);
51
51
  return onRetry && /*#__PURE__*/_react.default.createElement(ActionButton, {
52
52
  spacing: "none",
53
53
  component: _styled.IconStyledButton,
@@ -16,7 +16,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
16
16
  var _react = _interopRequireDefault(require("react"));
17
17
  var _colors = require("@atlaskit/theme/colors");
18
18
  var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
19
- var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
19
+ var _button = _interopRequireDefault(require("@atlaskit/button"));
20
20
  var _Frame = require("../Frame");
21
21
  var _IconAndTitleLayout = require("../IconAndTitleLayout");
22
22
  var _Icon = require("../Icon");
@@ -78,7 +78,7 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
78
78
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderActionButton", function () {
79
79
  var _this$props$requestAc;
80
80
  var onAuthorise = _this.props.onAuthorise;
81
- var ActionButton = (0, _withFrameStyleControl.default)(_customThemeButton.default, _this.frameRef);
81
+ var ActionButton = (0, _withFrameStyleControl.default)(_button.default, _this.frameRef);
82
82
  var accessType = (_this$props$requestAc = _this.props.requestAccessContext) === null || _this$props$requestAc === void 0 ? void 0 : _this$props$requestAc.accessType;
83
83
  if (_this.state.hasRequestAccessContextMessage) {
84
84
  return /*#__PURE__*/_react.default.createElement(ActionButton, {
@@ -91,7 +91,7 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
91
91
  }, _this.renderForbiddenAccessMessage());
92
92
  }
93
93
  if (onAuthorise) {
94
- return /*#__PURE__*/_react.default.createElement(_customThemeButton.default, {
94
+ return /*#__PURE__*/_react.default.createElement(_button.default, {
95
95
  spacing: "none",
96
96
  onClick: _this.handleRetry,
97
97
  appearance: "subtle-link",
@@ -13,7 +13,7 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
13
13
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
14
14
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
15
15
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
- var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
16
+ var _button = _interopRequireDefault(require("@atlaskit/button"));
17
17
  var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
18
18
  var _colors = require("@atlaskit/theme/colors");
19
19
  var _withFrameStyleControl = _interopRequireDefault(require("../utils/withFrameStyleControl"));
@@ -61,7 +61,7 @@ var InlineCardUnauthorizedView = exports.InlineCardUnauthorizedView = /*#__PURE_
61
61
  var _this$props2 = _this.props,
62
62
  onAuthorise = _this$props2.onAuthorise,
63
63
  context = _this$props2.context;
64
- var ActionButton = (0, _withFrameStyleControl.default)(_customThemeButton.default, _this.frameRef);
64
+ var ActionButton = (0, _withFrameStyleControl.default)(_button.default, _this.frameRef);
65
65
  return onAuthorise ? /*#__PURE__*/_react.default.createElement(ActionButton, {
66
66
  spacing: "none",
67
67
  component: _styled.IconStyledButton,
@@ -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: "27.7.0",
20
+ packageVersion: "27.7.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: "27.7.0"
7
+ packageVersion: "27.7.1"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -2,7 +2,7 @@
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { useState } from 'react';
5
- import Button from '@atlaskit/button/custom-theme-button';
5
+ import { LoadingButton as Button } from '@atlaskit/button';
6
6
  import { ActionIcon } from './ActionIcon';
7
7
  export const spinnerDelay = 1000;
8
8
  const baseTextStyles = css({
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { css, jsx } from '@emotion/react';
4
- import Button from '@atlaskit/button/custom-theme-button';
4
+ import Button from '@atlaskit/button';
5
5
  import ErrorIcon from '@atlaskit/icon/glyph/error';
6
6
  import { fontSize } from '@atlaskit/theme/constants';
7
7
  import { R300 } from '@atlaskit/theme/colors';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import Tooltip from '@atlaskit/tooltip';
3
- import Button from '@atlaskit/button/custom-theme-button';
3
+ import Button from '@atlaskit/button';
4
4
  import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
5
5
  const LinkInfoButton = ({
6
6
  content,
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
3
  import { R300 } from '@atlaskit/theme/colors';
4
4
  import ErrorIcon from '@atlaskit/icon/glyph/error';
5
- import Button from '@atlaskit/button/custom-theme-button';
5
+ import Button from '@atlaskit/button';
6
6
  import { Frame } from '../Frame';
7
7
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
8
8
  import { AKIconWrapper } from '../Icon';
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import React from 'react';
4
4
  import { R400, N500 } from '@atlaskit/theme/colors';
5
5
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
6
- import Button from '@atlaskit/button/custom-theme-button';
6
+ import Button from '@atlaskit/button';
7
7
  import { Frame } from '../Frame';
8
8
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
9
9
  import { AKIconWrapper } from '../Icon';
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- import Button from '@atlaskit/button/custom-theme-button';
3
+ import Button from '@atlaskit/button';
4
4
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
5
5
  import { N500, R400 } from '@atlaskit/theme/colors';
6
6
  import withFrameStyleControl from '../utils/withFrameStyleControl';
@@ -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: "27.7.0",
10
+ packageVersion: "27.7.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: "27.7.0"
18
+ packageVersion: "27.7.1"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
4
  import { css, jsx } from '@emotion/react';
5
5
  import { useState } from 'react';
6
- import Button from '@atlaskit/button/custom-theme-button';
6
+ import { LoadingButton as Button } from '@atlaskit/button';
7
7
  import { ActionIcon } from './ActionIcon';
8
8
  export var spinnerDelay = 1000;
9
9
  var baseTextStyles = css({
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { css, jsx } from '@emotion/react';
4
- import Button from '@atlaskit/button/custom-theme-button';
4
+ import Button from '@atlaskit/button';
5
5
  import ErrorIcon from '@atlaskit/icon/glyph/error';
6
6
  import { fontSize } from '@atlaskit/theme/constants';
7
7
  import { R300 } from '@atlaskit/theme/colors';
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import Tooltip from '@atlaskit/tooltip';
3
- import Button from '@atlaskit/button/custom-theme-button';
3
+ import Button from '@atlaskit/button';
4
4
  import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
5
5
  var LinkInfoButton = function LinkInfoButton(_ref) {
6
6
  var content = _ref.content,
@@ -10,7 +10,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  import React from 'react';
11
11
  import { R300 } from '@atlaskit/theme/colors';
12
12
  import ErrorIcon from '@atlaskit/icon/glyph/error';
13
- import Button from '@atlaskit/button/custom-theme-button';
13
+ import Button from '@atlaskit/button';
14
14
  import { Frame } from '../Frame';
15
15
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
16
16
  import { AKIconWrapper } from '../Icon';
@@ -11,7 +11,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
11
11
  import React from 'react';
12
12
  import { R400, N500 } from '@atlaskit/theme/colors';
13
13
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
14
- import Button from '@atlaskit/button/custom-theme-button';
14
+ import Button from '@atlaskit/button';
15
15
  import { Frame } from '../Frame';
16
16
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
17
17
  import { AKIconWrapper } from '../Icon';
@@ -8,7 +8,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
- import Button from '@atlaskit/button/custom-theme-button';
11
+ import Button from '@atlaskit/button';
12
12
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
13
13
  import { N500, R400 } from '@atlaskit/theme/colors';
14
14
  import withFrameStyleControl from '../utils/withFrameStyleControl';
@@ -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: "27.7.0",
13
+ packageVersion: "27.7.1",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "27.7.0",
3
+ "version": "27.7.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"