@atlaskit/smart-card 43.25.2 → 43.25.3

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.25.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c085330e0dde8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c085330e0dde8) -
8
+ Remove new icon button styling hack
9
+ - Updated dependencies
10
+
3
11
  ## 43.25.2
4
12
 
5
13
  ### Patch Changes
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "43.25.1"
14
+ packageVersion: "43.25.2"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,4 +1,4 @@
1
- ._11c8rymc{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
1
+ ._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._11lv1xvx button{padding-left:var(--ds-space-025,.125rem)}
3
3
  ._11lvidpf button{padding-left:0}
4
4
  ._11lvpdf9 button{padding-left:var(--ds-space-050,.25rem)}
@@ -12,6 +12,7 @@ var _runtime = require("@compiled/react/runtime");
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _button = require("@atlaskit/button");
14
14
  var _new = _interopRequireWildcard(require("@atlaskit/button/new"));
15
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _compiled = require("@atlaskit/primitives/compiled");
16
17
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
17
18
  var _constants = require("../../../../../../constants");
@@ -68,17 +69,64 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
68
69
  var button = (0, _react.useMemo)(function () {
69
70
  var isLinkButton = !!href;
70
71
  var spacing = size === _constants.SmartLinkSize.Large || size === _constants.SmartLinkSize.XLarge ? 'default' : 'compact';
71
- if (iconOnly) {
72
+ if ((0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup')) {
72
73
  var icon = iconBefore || iconAfter;
73
- var iconFn = function iconFn() {
74
- return icon || null;
75
- };
76
- if (isLinkButton) {
77
- return /*#__PURE__*/_react.default.createElement(_new.LinkIconButton, {
74
+ var iconFn = icon ? function () {
75
+ return icon;
76
+ } : undefined;
77
+ if (iconOnly && iconFn) {
78
+ if (isLinkButton && iconFn) {
79
+ return /*#__PURE__*/_react.default.createElement(_new.LinkIconButton, {
80
+ appearance: IconButtonAppearanceMap[appearance],
81
+ icon: iconFn,
82
+ href: href,
83
+ isDisabled: isDisabled,
84
+ isTooltipDisabled: false,
85
+ label: tooltipMessage,
86
+ onClick: onButtonClick(onClick),
87
+ spacing: spacing,
88
+ testId: testId,
89
+ tooltip: tooltipOptions
90
+ });
91
+ }
92
+ return /*#__PURE__*/_react.default.createElement(_new.IconButton, {
78
93
  appearance: IconButtonAppearanceMap[appearance],
79
94
  icon: iconFn,
80
- href: href,
81
95
  isDisabled: isDisabled,
96
+ isLoading: isLoading,
97
+ isTooltipDisabled: false,
98
+ label: tooltipMessage,
99
+ onClick: onButtonClick(onClick),
100
+ spacing: spacing,
101
+ testId: testId,
102
+ tooltip: tooltipOptions
103
+ });
104
+ }
105
+ } else {
106
+ if (iconOnly) {
107
+ var _icon = iconBefore || iconAfter;
108
+ var _iconFn = function _iconFn() {
109
+ return _icon || null;
110
+ };
111
+ if (isLinkButton) {
112
+ return /*#__PURE__*/_react.default.createElement(_new.LinkIconButton, {
113
+ appearance: IconButtonAppearanceMap[appearance],
114
+ icon: _iconFn,
115
+ href: href,
116
+ isDisabled: isDisabled,
117
+ isTooltipDisabled: false,
118
+ label: tooltipMessage,
119
+ onClick: onButtonClick(onClick),
120
+ spacing: spacing,
121
+ testId: testId,
122
+ tooltip: tooltipOptions
123
+ });
124
+ }
125
+ return /*#__PURE__*/_react.default.createElement(_new.IconButton, {
126
+ appearance: IconButtonAppearanceMap[appearance],
127
+ icon: _iconFn,
128
+ isDisabled: isDisabled,
129
+ isLoading: isLoading,
82
130
  isTooltipDisabled: false,
83
131
  label: tooltipMessage,
84
132
  onClick: onButtonClick(onClick),
@@ -87,57 +135,86 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
87
135
  tooltip: tooltipOptions
88
136
  });
89
137
  }
90
- return /*#__PURE__*/_react.default.createElement(_new.IconButton, {
91
- appearance: IconButtonAppearanceMap[appearance],
92
- icon: iconFn,
138
+ }
139
+ if ((0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup')) {
140
+ var iconBeforeFn = iconBefore ? function () {
141
+ return iconBefore;
142
+ } : undefined;
143
+ var iconAfterFn = iconAfter ? function () {
144
+ return iconAfter;
145
+ } : undefined;
146
+ if (isLinkButton) {
147
+ return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
148
+ content: tooltipMessage,
149
+ hideTooltipOnClick: true,
150
+ testId: "".concat(testId, "-tooltip")
151
+ }, /*#__PURE__*/_react.default.createElement(_new.LinkButton, {
152
+ appearance: ButtonAppearanceMap[appearance],
153
+ "aria-label": ariaLabel,
154
+ iconAfter: iconAfterFn,
155
+ iconBefore: iconBeforeFn,
156
+ isDisabled: isDisabled,
157
+ href: href,
158
+ onClick: onButtonClick(onClick),
159
+ spacing: spacing,
160
+ testId: testId
161
+ }, content));
162
+ }
163
+ return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
164
+ content: tooltipMessage,
165
+ hideTooltipOnClick: true,
166
+ testId: "".concat(testId, "-tooltip")
167
+ }, /*#__PURE__*/_react.default.createElement(_new.default, {
168
+ appearance: ButtonAppearanceMap[appearance],
169
+ "aria-label": ariaLabel,
170
+ iconAfter: iconAfterFn,
171
+ iconBefore: iconBeforeFn,
93
172
  isDisabled: isDisabled,
94
173
  isLoading: isLoading,
95
- isTooltipDisabled: false,
96
- label: tooltipMessage,
97
174
  onClick: onButtonClick(onClick),
98
175
  spacing: spacing,
99
- testId: testId,
100
- tooltip: tooltipOptions
101
- });
102
- }
103
- var iconBeforeFn = function iconBeforeFn() {
104
- return iconBefore || null;
105
- };
106
- var iconAfterFn = function iconAfterFn() {
107
- return iconAfter || null;
108
- };
109
- if (isLinkButton) {
176
+ testId: testId
177
+ }, content));
178
+ } else {
179
+ var _iconBeforeFn = function _iconBeforeFn() {
180
+ return iconBefore || null;
181
+ };
182
+ var _iconAfterFn = function _iconAfterFn() {
183
+ return iconAfter || null;
184
+ };
185
+ if (isLinkButton) {
186
+ return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
187
+ content: tooltipMessage,
188
+ hideTooltipOnClick: true,
189
+ testId: "".concat(testId, "-tooltip")
190
+ }, /*#__PURE__*/_react.default.createElement(_new.LinkButton, {
191
+ appearance: ButtonAppearanceMap[appearance],
192
+ "aria-label": ariaLabel,
193
+ iconAfter: _iconAfterFn,
194
+ iconBefore: _iconBeforeFn,
195
+ isDisabled: isDisabled,
196
+ href: href,
197
+ onClick: onButtonClick(onClick),
198
+ spacing: spacing,
199
+ testId: testId
200
+ }, content));
201
+ }
110
202
  return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
111
203
  content: tooltipMessage,
112
204
  hideTooltipOnClick: true,
113
205
  testId: "".concat(testId, "-tooltip")
114
- }, /*#__PURE__*/_react.default.createElement(_new.LinkButton, {
206
+ }, /*#__PURE__*/_react.default.createElement(_new.default, {
115
207
  appearance: ButtonAppearanceMap[appearance],
116
208
  "aria-label": ariaLabel,
117
- iconAfter: iconAfterFn,
118
- iconBefore: iconBeforeFn,
209
+ iconAfter: _iconAfterFn,
210
+ iconBefore: _iconBeforeFn,
119
211
  isDisabled: isDisabled,
120
- href: href,
212
+ isLoading: isLoading,
121
213
  onClick: onButtonClick(onClick),
122
214
  spacing: spacing,
123
215
  testId: testId
124
216
  }, content));
125
217
  }
126
- return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
127
- content: tooltipMessage,
128
- hideTooltipOnClick: true,
129
- testId: "".concat(testId, "-tooltip")
130
- }, /*#__PURE__*/_react.default.createElement(_new.default, {
131
- appearance: ButtonAppearanceMap[appearance],
132
- "aria-label": ariaLabel,
133
- iconAfter: iconAfterFn,
134
- iconBefore: iconBeforeFn,
135
- isDisabled: isDisabled,
136
- isLoading: isLoading,
137
- onClick: onButtonClick(onClick),
138
- spacing: spacing,
139
- testId: testId
140
- }, content));
141
218
  }, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
142
219
  return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
143
220
  testId: "".concat(testId, "-button-wrapper"),
@@ -169,7 +246,7 @@ var ActionButtonNew = function ActionButtonNew(_ref2) {
169
246
  }, []);
170
247
  return /*#__PURE__*/_react.default.createElement("div", {
171
248
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
172
- className: (0, _runtime.ax)([size === _constants.SmartLinkSize.Large && iconOnly && "_1gflidpf _or3fidpf _1ddvidpf _1hhaidpf _yhjmidpf _1trnidpf _1fstidpf _1xceidpf _1gqnidpf _1qdmidpf _df2ridpf _j1twidpf _11lvidpf _192bidpf _vbn7idpf _wfu3idpf _1i3bidpf _13gwidpf _4wlcidpf _rehaidpf _mp2fidpf _ro8midpf _1l0qidpf _1bnaidpf _3kh9idpf _i2vxidpf _8pvjidpf _1e1oidpf _1vtwidpf _ijvwidpf _tpwpidpf _1ad8idpf", size === _constants.SmartLinkSize.Small && "_11c8rymc _k48p1wq8", size === _constants.SmartLinkSize.Small && iconOnly && "_1gfl1xvx _or3f1xvx _1ddv1xvx _1hha1xvx _yhjm1xvx _1trn1xvx _1fst1xvx _1xce1xvx _1gqn1xvx _1qdm1xvx _df2r1xvx _j1tw1xvx _11lv1xvx _192b1xvx _vbn71xvx _wfu31xvx", size === _constants.SmartLinkSize.Small && !iconOnly && "_11lvpdf9 _192bpdf9 _vbn7pdf9 _wfu3pdf9 _yhjmpdf9 _1trnpdf9 _1fstpdf9 _1xcepdf9", className]),
249
+ className: (0, _runtime.ax)([size === _constants.SmartLinkSize.Large && iconOnly && "_1gflidpf _or3fidpf _1ddvidpf _1hhaidpf _yhjmidpf _1trnidpf _1fstidpf _1xceidpf _1gqnidpf _1qdmidpf _df2ridpf _j1twidpf _11lvidpf _192bidpf _vbn7idpf _wfu3idpf _1i3bidpf _13gwidpf _4wlcidpf _rehaidpf _mp2fidpf _ro8midpf _1l0qidpf _1bnaidpf _3kh9idpf _i2vxidpf _8pvjidpf _1e1oidpf _1vtwidpf _ijvwidpf _tpwpidpf _1ad8idpf", size === _constants.SmartLinkSize.Small && "_11c8wadc _k48p1wq8", size === _constants.SmartLinkSize.Small && iconOnly && "_1gfl1xvx _or3f1xvx _1ddv1xvx _1hha1xvx _yhjm1xvx _1trn1xvx _1fst1xvx _1xce1xvx _1gqn1xvx _1qdm1xvx _df2r1xvx _j1tw1xvx _11lv1xvx _192b1xvx _vbn71xvx _wfu31xvx", size === _constants.SmartLinkSize.Small && !iconOnly && "_11lvpdf9 _192bpdf9 _vbn7pdf9 _wfu3pdf9 _yhjmpdf9 _1trnpdf9 _1fstpdf9 _1xcepdf9", className]),
173
250
  "data-testid": "".concat(testId, "-button-wrapper")
174
251
  }, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
175
252
  content: tooltipMessage,
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
22
22
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
23
23
  var PACKAGE_DATA = {
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "43.25.1",
25
+ packageVersion: "43.25.2",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "43.25.1"
5
+ packageVersion: "43.25.2"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,4 +1,4 @@
1
- ._11c8rymc{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
1
+ ._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._11lv1xvx button{padding-left:var(--ds-space-025,.125rem)}
3
3
  ._11lvidpf button{padding-left:0}
4
4
  ._11lvpdf9 button{padding-left:var(--ds-space-050,.25rem)}
@@ -4,6 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef, useCallback, useMemo } from 'react';
5
5
  import { LoadingButton } from '@atlaskit/button';
6
6
  import Button, { IconButton, LinkButton, LinkIconButton } from '@atlaskit/button/new';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { Box } from '@atlaskit/primitives/compiled';
8
9
  import Tooltip from '@atlaskit/tooltip';
9
10
  import { SmartLinkSize } from '../../../../../../constants';
@@ -57,15 +58,29 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
57
58
  const button = useMemo(() => {
58
59
  const isLinkButton = !!href;
59
60
  const spacing = size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'default' : 'compact';
60
- if (iconOnly) {
61
+ if (fg('platform-button-icon-spacing-cleanup')) {
61
62
  const icon = iconBefore || iconAfter;
62
- const iconFn = () => icon || null;
63
- if (isLinkButton) {
64
- return /*#__PURE__*/React.createElement(LinkIconButton, {
63
+ const iconFn = icon ? () => icon : undefined;
64
+ if (iconOnly && iconFn) {
65
+ if (isLinkButton && iconFn) {
66
+ return /*#__PURE__*/React.createElement(LinkIconButton, {
67
+ appearance: IconButtonAppearanceMap[appearance],
68
+ icon: iconFn,
69
+ href: href,
70
+ isDisabled: isDisabled,
71
+ isTooltipDisabled: false,
72
+ label: tooltipMessage,
73
+ onClick: onButtonClick(onClick),
74
+ spacing: spacing,
75
+ testId: testId,
76
+ tooltip: tooltipOptions
77
+ });
78
+ }
79
+ return /*#__PURE__*/React.createElement(IconButton, {
65
80
  appearance: IconButtonAppearanceMap[appearance],
66
81
  icon: iconFn,
67
- href: href,
68
82
  isDisabled: isDisabled,
83
+ isLoading: isLoading,
69
84
  isTooltipDisabled: false,
70
85
  label: tooltipMessage,
71
86
  onClick: onButtonClick(onClick),
@@ -74,53 +89,109 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
74
89
  tooltip: tooltipOptions
75
90
  });
76
91
  }
77
- return /*#__PURE__*/React.createElement(IconButton, {
78
- appearance: IconButtonAppearanceMap[appearance],
79
- icon: iconFn,
92
+ } else {
93
+ if (iconOnly) {
94
+ const icon = iconBefore || iconAfter;
95
+ const iconFn = () => icon || null;
96
+ if (isLinkButton) {
97
+ return /*#__PURE__*/React.createElement(LinkIconButton, {
98
+ appearance: IconButtonAppearanceMap[appearance],
99
+ icon: iconFn,
100
+ href: href,
101
+ isDisabled: isDisabled,
102
+ isTooltipDisabled: false,
103
+ label: tooltipMessage,
104
+ onClick: onButtonClick(onClick),
105
+ spacing: spacing,
106
+ testId: testId,
107
+ tooltip: tooltipOptions
108
+ });
109
+ }
110
+ return /*#__PURE__*/React.createElement(IconButton, {
111
+ appearance: IconButtonAppearanceMap[appearance],
112
+ icon: iconFn,
113
+ isDisabled: isDisabled,
114
+ isLoading: isLoading,
115
+ isTooltipDisabled: false,
116
+ label: tooltipMessage,
117
+ onClick: onButtonClick(onClick),
118
+ spacing: spacing,
119
+ testId: testId,
120
+ tooltip: tooltipOptions
121
+ });
122
+ }
123
+ }
124
+ if (fg('platform-button-icon-spacing-cleanup')) {
125
+ const iconBeforeFn = iconBefore ? () => iconBefore : undefined;
126
+ const iconAfterFn = iconAfter ? () => iconAfter : undefined;
127
+ if (isLinkButton) {
128
+ return /*#__PURE__*/React.createElement(Tooltip, {
129
+ content: tooltipMessage,
130
+ hideTooltipOnClick: true,
131
+ testId: `${testId}-tooltip`
132
+ }, /*#__PURE__*/React.createElement(LinkButton, {
133
+ appearance: ButtonAppearanceMap[appearance],
134
+ "aria-label": ariaLabel,
135
+ iconAfter: iconAfterFn,
136
+ iconBefore: iconBeforeFn,
137
+ isDisabled: isDisabled,
138
+ href: href,
139
+ onClick: onButtonClick(onClick),
140
+ spacing: spacing,
141
+ testId: testId
142
+ }, content));
143
+ }
144
+ return /*#__PURE__*/React.createElement(Tooltip, {
145
+ content: tooltipMessage,
146
+ hideTooltipOnClick: true,
147
+ testId: `${testId}-tooltip`
148
+ }, /*#__PURE__*/React.createElement(Button, {
149
+ appearance: ButtonAppearanceMap[appearance],
150
+ "aria-label": ariaLabel,
151
+ iconAfter: iconAfterFn,
152
+ iconBefore: iconBeforeFn,
80
153
  isDisabled: isDisabled,
81
154
  isLoading: isLoading,
82
- isTooltipDisabled: false,
83
- label: tooltipMessage,
84
155
  onClick: onButtonClick(onClick),
85
156
  spacing: spacing,
86
- testId: testId,
87
- tooltip: tooltipOptions
88
- });
89
- }
90
- const iconBeforeFn = () => iconBefore || null;
91
- const iconAfterFn = () => iconAfter || null;
92
- if (isLinkButton) {
157
+ testId: testId
158
+ }, content));
159
+ } else {
160
+ const iconBeforeFn = () => iconBefore || null;
161
+ const iconAfterFn = () => iconAfter || null;
162
+ if (isLinkButton) {
163
+ return /*#__PURE__*/React.createElement(Tooltip, {
164
+ content: tooltipMessage,
165
+ hideTooltipOnClick: true,
166
+ testId: `${testId}-tooltip`
167
+ }, /*#__PURE__*/React.createElement(LinkButton, {
168
+ appearance: ButtonAppearanceMap[appearance],
169
+ "aria-label": ariaLabel,
170
+ iconAfter: iconAfterFn,
171
+ iconBefore: iconBeforeFn,
172
+ isDisabled: isDisabled,
173
+ href: href,
174
+ onClick: onButtonClick(onClick),
175
+ spacing: spacing,
176
+ testId: testId
177
+ }, content));
178
+ }
93
179
  return /*#__PURE__*/React.createElement(Tooltip, {
94
180
  content: tooltipMessage,
95
181
  hideTooltipOnClick: true,
96
182
  testId: `${testId}-tooltip`
97
- }, /*#__PURE__*/React.createElement(LinkButton, {
183
+ }, /*#__PURE__*/React.createElement(Button, {
98
184
  appearance: ButtonAppearanceMap[appearance],
99
185
  "aria-label": ariaLabel,
100
186
  iconAfter: iconAfterFn,
101
187
  iconBefore: iconBeforeFn,
102
188
  isDisabled: isDisabled,
103
- href: href,
189
+ isLoading: isLoading,
104
190
  onClick: onButtonClick(onClick),
105
191
  spacing: spacing,
106
192
  testId: testId
107
193
  }, content));
108
194
  }
109
- return /*#__PURE__*/React.createElement(Tooltip, {
110
- content: tooltipMessage,
111
- hideTooltipOnClick: true,
112
- testId: `${testId}-tooltip`
113
- }, /*#__PURE__*/React.createElement(Button, {
114
- appearance: ButtonAppearanceMap[appearance],
115
- "aria-label": ariaLabel,
116
- iconAfter: iconAfterFn,
117
- iconBefore: iconBeforeFn,
118
- isDisabled: isDisabled,
119
- isLoading: isLoading,
120
- onClick: onButtonClick(onClick),
121
- spacing: spacing,
122
- testId: testId
123
- }, content));
124
195
  }, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
125
196
  return /*#__PURE__*/React.createElement(Box, {
126
197
  testId: `${testId}-button-wrapper`,
@@ -150,7 +221,7 @@ const ActionButtonNew = ({
150
221
  }, []);
151
222
  return /*#__PURE__*/React.createElement("div", {
152
223
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
153
- className: ax([size === SmartLinkSize.Large && iconOnly && "_1gflidpf _or3fidpf _1ddvidpf _1hhaidpf _yhjmidpf _1trnidpf _1fstidpf _1xceidpf _1gqnidpf _1qdmidpf _df2ridpf _j1twidpf _11lvidpf _192bidpf _vbn7idpf _wfu3idpf _1i3bidpf _13gwidpf _4wlcidpf _rehaidpf _mp2fidpf _ro8midpf _1l0qidpf _1bnaidpf _3kh9idpf _i2vxidpf _8pvjidpf _1e1oidpf _1vtwidpf _ijvwidpf _tpwpidpf _1ad8idpf", size === SmartLinkSize.Small && "_11c8rymc _k48p1wq8", size === SmartLinkSize.Small && iconOnly && "_1gfl1xvx _or3f1xvx _1ddv1xvx _1hha1xvx _yhjm1xvx _1trn1xvx _1fst1xvx _1xce1xvx _1gqn1xvx _1qdm1xvx _df2r1xvx _j1tw1xvx _11lv1xvx _192b1xvx _vbn71xvx _wfu31xvx", size === SmartLinkSize.Small && !iconOnly && "_11lvpdf9 _192bpdf9 _vbn7pdf9 _wfu3pdf9 _yhjmpdf9 _1trnpdf9 _1fstpdf9 _1xcepdf9", className]),
224
+ className: ax([size === SmartLinkSize.Large && iconOnly && "_1gflidpf _or3fidpf _1ddvidpf _1hhaidpf _yhjmidpf _1trnidpf _1fstidpf _1xceidpf _1gqnidpf _1qdmidpf _df2ridpf _j1twidpf _11lvidpf _192bidpf _vbn7idpf _wfu3idpf _1i3bidpf _13gwidpf _4wlcidpf _rehaidpf _mp2fidpf _ro8midpf _1l0qidpf _1bnaidpf _3kh9idpf _i2vxidpf _8pvjidpf _1e1oidpf _1vtwidpf _ijvwidpf _tpwpidpf _1ad8idpf", size === SmartLinkSize.Small && "_11c8wadc _k48p1wq8", size === SmartLinkSize.Small && iconOnly && "_1gfl1xvx _or3f1xvx _1ddv1xvx _1hha1xvx _yhjm1xvx _1trn1xvx _1fst1xvx _1xce1xvx _1gqn1xvx _1qdm1xvx _df2r1xvx _j1tw1xvx _11lv1xvx _192b1xvx _vbn71xvx _wfu31xvx", size === SmartLinkSize.Small && !iconOnly && "_11lvpdf9 _192bpdf9 _vbn7pdf9 _wfu3pdf9 _yhjmpdf9 _1trnpdf9 _1fstpdf9 _1xcepdf9", className]),
154
225
  "data-testid": `${testId}-button-wrapper`
155
226
  }, /*#__PURE__*/React.createElement(Tooltip, {
156
227
  content: tooltipMessage,
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  const PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "43.25.1",
15
+ packageVersion: "43.25.2",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  const Anchor = withLinkClickedEvent('a');
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "43.25.1"
7
+ packageVersion: "43.25.2"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,4 +1,4 @@
1
- ._11c8rymc{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
1
+ ._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
2
  ._11lv1xvx button{padding-left:var(--ds-space-025,.125rem)}
3
3
  ._11lvidpf button{padding-left:0}
4
4
  ._11lvpdf9 button{padding-left:var(--ds-space-050,.25rem)}
@@ -4,6 +4,7 @@ import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { forwardRef, useCallback, useMemo } from 'react';
5
5
  import { LoadingButton } from '@atlaskit/button';
6
6
  import Button, { IconButton, LinkButton, LinkIconButton } from '@atlaskit/button/new';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { Box } from '@atlaskit/primitives/compiled';
8
9
  import Tooltip from '@atlaskit/tooltip';
9
10
  import { SmartLinkSize } from '../../../../../../constants';
@@ -59,17 +60,64 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
59
60
  var button = useMemo(function () {
60
61
  var isLinkButton = !!href;
61
62
  var spacing = size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'default' : 'compact';
62
- if (iconOnly) {
63
+ if (fg('platform-button-icon-spacing-cleanup')) {
63
64
  var icon = iconBefore || iconAfter;
64
- var iconFn = function iconFn() {
65
- return icon || null;
66
- };
67
- if (isLinkButton) {
68
- return /*#__PURE__*/React.createElement(LinkIconButton, {
65
+ var iconFn = icon ? function () {
66
+ return icon;
67
+ } : undefined;
68
+ if (iconOnly && iconFn) {
69
+ if (isLinkButton && iconFn) {
70
+ return /*#__PURE__*/React.createElement(LinkIconButton, {
71
+ appearance: IconButtonAppearanceMap[appearance],
72
+ icon: iconFn,
73
+ href: href,
74
+ isDisabled: isDisabled,
75
+ isTooltipDisabled: false,
76
+ label: tooltipMessage,
77
+ onClick: onButtonClick(onClick),
78
+ spacing: spacing,
79
+ testId: testId,
80
+ tooltip: tooltipOptions
81
+ });
82
+ }
83
+ return /*#__PURE__*/React.createElement(IconButton, {
69
84
  appearance: IconButtonAppearanceMap[appearance],
70
85
  icon: iconFn,
71
- href: href,
72
86
  isDisabled: isDisabled,
87
+ isLoading: isLoading,
88
+ isTooltipDisabled: false,
89
+ label: tooltipMessage,
90
+ onClick: onButtonClick(onClick),
91
+ spacing: spacing,
92
+ testId: testId,
93
+ tooltip: tooltipOptions
94
+ });
95
+ }
96
+ } else {
97
+ if (iconOnly) {
98
+ var _icon = iconBefore || iconAfter;
99
+ var _iconFn = function _iconFn() {
100
+ return _icon || null;
101
+ };
102
+ if (isLinkButton) {
103
+ return /*#__PURE__*/React.createElement(LinkIconButton, {
104
+ appearance: IconButtonAppearanceMap[appearance],
105
+ icon: _iconFn,
106
+ href: href,
107
+ isDisabled: isDisabled,
108
+ isTooltipDisabled: false,
109
+ label: tooltipMessage,
110
+ onClick: onButtonClick(onClick),
111
+ spacing: spacing,
112
+ testId: testId,
113
+ tooltip: tooltipOptions
114
+ });
115
+ }
116
+ return /*#__PURE__*/React.createElement(IconButton, {
117
+ appearance: IconButtonAppearanceMap[appearance],
118
+ icon: _iconFn,
119
+ isDisabled: isDisabled,
120
+ isLoading: isLoading,
73
121
  isTooltipDisabled: false,
74
122
  label: tooltipMessage,
75
123
  onClick: onButtonClick(onClick),
@@ -78,57 +126,86 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
78
126
  tooltip: tooltipOptions
79
127
  });
80
128
  }
81
- return /*#__PURE__*/React.createElement(IconButton, {
82
- appearance: IconButtonAppearanceMap[appearance],
83
- icon: iconFn,
129
+ }
130
+ if (fg('platform-button-icon-spacing-cleanup')) {
131
+ var iconBeforeFn = iconBefore ? function () {
132
+ return iconBefore;
133
+ } : undefined;
134
+ var iconAfterFn = iconAfter ? function () {
135
+ return iconAfter;
136
+ } : undefined;
137
+ if (isLinkButton) {
138
+ return /*#__PURE__*/React.createElement(Tooltip, {
139
+ content: tooltipMessage,
140
+ hideTooltipOnClick: true,
141
+ testId: "".concat(testId, "-tooltip")
142
+ }, /*#__PURE__*/React.createElement(LinkButton, {
143
+ appearance: ButtonAppearanceMap[appearance],
144
+ "aria-label": ariaLabel,
145
+ iconAfter: iconAfterFn,
146
+ iconBefore: iconBeforeFn,
147
+ isDisabled: isDisabled,
148
+ href: href,
149
+ onClick: onButtonClick(onClick),
150
+ spacing: spacing,
151
+ testId: testId
152
+ }, content));
153
+ }
154
+ return /*#__PURE__*/React.createElement(Tooltip, {
155
+ content: tooltipMessage,
156
+ hideTooltipOnClick: true,
157
+ testId: "".concat(testId, "-tooltip")
158
+ }, /*#__PURE__*/React.createElement(Button, {
159
+ appearance: ButtonAppearanceMap[appearance],
160
+ "aria-label": ariaLabel,
161
+ iconAfter: iconAfterFn,
162
+ iconBefore: iconBeforeFn,
84
163
  isDisabled: isDisabled,
85
164
  isLoading: isLoading,
86
- isTooltipDisabled: false,
87
- label: tooltipMessage,
88
165
  onClick: onButtonClick(onClick),
89
166
  spacing: spacing,
90
- testId: testId,
91
- tooltip: tooltipOptions
92
- });
93
- }
94
- var iconBeforeFn = function iconBeforeFn() {
95
- return iconBefore || null;
96
- };
97
- var iconAfterFn = function iconAfterFn() {
98
- return iconAfter || null;
99
- };
100
- if (isLinkButton) {
167
+ testId: testId
168
+ }, content));
169
+ } else {
170
+ var _iconBeforeFn = function _iconBeforeFn() {
171
+ return iconBefore || null;
172
+ };
173
+ var _iconAfterFn = function _iconAfterFn() {
174
+ return iconAfter || null;
175
+ };
176
+ if (isLinkButton) {
177
+ return /*#__PURE__*/React.createElement(Tooltip, {
178
+ content: tooltipMessage,
179
+ hideTooltipOnClick: true,
180
+ testId: "".concat(testId, "-tooltip")
181
+ }, /*#__PURE__*/React.createElement(LinkButton, {
182
+ appearance: ButtonAppearanceMap[appearance],
183
+ "aria-label": ariaLabel,
184
+ iconAfter: _iconAfterFn,
185
+ iconBefore: _iconBeforeFn,
186
+ isDisabled: isDisabled,
187
+ href: href,
188
+ onClick: onButtonClick(onClick),
189
+ spacing: spacing,
190
+ testId: testId
191
+ }, content));
192
+ }
101
193
  return /*#__PURE__*/React.createElement(Tooltip, {
102
194
  content: tooltipMessage,
103
195
  hideTooltipOnClick: true,
104
196
  testId: "".concat(testId, "-tooltip")
105
- }, /*#__PURE__*/React.createElement(LinkButton, {
197
+ }, /*#__PURE__*/React.createElement(Button, {
106
198
  appearance: ButtonAppearanceMap[appearance],
107
199
  "aria-label": ariaLabel,
108
- iconAfter: iconAfterFn,
109
- iconBefore: iconBeforeFn,
200
+ iconAfter: _iconAfterFn,
201
+ iconBefore: _iconBeforeFn,
110
202
  isDisabled: isDisabled,
111
- href: href,
203
+ isLoading: isLoading,
112
204
  onClick: onButtonClick(onClick),
113
205
  spacing: spacing,
114
206
  testId: testId
115
207
  }, content));
116
208
  }
117
- return /*#__PURE__*/React.createElement(Tooltip, {
118
- content: tooltipMessage,
119
- hideTooltipOnClick: true,
120
- testId: "".concat(testId, "-tooltip")
121
- }, /*#__PURE__*/React.createElement(Button, {
122
- appearance: ButtonAppearanceMap[appearance],
123
- "aria-label": ariaLabel,
124
- iconAfter: iconAfterFn,
125
- iconBefore: iconBeforeFn,
126
- isDisabled: isDisabled,
127
- isLoading: isLoading,
128
- onClick: onButtonClick(onClick),
129
- spacing: spacing,
130
- testId: testId
131
- }, content));
132
209
  }, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
133
210
  return /*#__PURE__*/React.createElement(Box, {
134
211
  testId: "".concat(testId, "-button-wrapper"),
@@ -160,7 +237,7 @@ var ActionButtonNew = function ActionButtonNew(_ref2) {
160
237
  }, []);
161
238
  return /*#__PURE__*/React.createElement("div", {
162
239
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
163
- className: ax([size === SmartLinkSize.Large && iconOnly && "_1gflidpf _or3fidpf _1ddvidpf _1hhaidpf _yhjmidpf _1trnidpf _1fstidpf _1xceidpf _1gqnidpf _1qdmidpf _df2ridpf _j1twidpf _11lvidpf _192bidpf _vbn7idpf _wfu3idpf _1i3bidpf _13gwidpf _4wlcidpf _rehaidpf _mp2fidpf _ro8midpf _1l0qidpf _1bnaidpf _3kh9idpf _i2vxidpf _8pvjidpf _1e1oidpf _1vtwidpf _ijvwidpf _tpwpidpf _1ad8idpf", size === SmartLinkSize.Small && "_11c8rymc _k48p1wq8", size === SmartLinkSize.Small && iconOnly && "_1gfl1xvx _or3f1xvx _1ddv1xvx _1hha1xvx _yhjm1xvx _1trn1xvx _1fst1xvx _1xce1xvx _1gqn1xvx _1qdm1xvx _df2r1xvx _j1tw1xvx _11lv1xvx _192b1xvx _vbn71xvx _wfu31xvx", size === SmartLinkSize.Small && !iconOnly && "_11lvpdf9 _192bpdf9 _vbn7pdf9 _wfu3pdf9 _yhjmpdf9 _1trnpdf9 _1fstpdf9 _1xcepdf9", className]),
240
+ className: ax([size === SmartLinkSize.Large && iconOnly && "_1gflidpf _or3fidpf _1ddvidpf _1hhaidpf _yhjmidpf _1trnidpf _1fstidpf _1xceidpf _1gqnidpf _1qdmidpf _df2ridpf _j1twidpf _11lvidpf _192bidpf _vbn7idpf _wfu3idpf _1i3bidpf _13gwidpf _4wlcidpf _rehaidpf _mp2fidpf _ro8midpf _1l0qidpf _1bnaidpf _3kh9idpf _i2vxidpf _8pvjidpf _1e1oidpf _1vtwidpf _ijvwidpf _tpwpidpf _1ad8idpf", size === SmartLinkSize.Small && "_11c8wadc _k48p1wq8", size === SmartLinkSize.Small && iconOnly && "_1gfl1xvx _or3f1xvx _1ddv1xvx _1hha1xvx _yhjm1xvx _1trn1xvx _1fst1xvx _1xce1xvx _1gqn1xvx _1qdm1xvx _df2r1xvx _j1tw1xvx _11lv1xvx _192b1xvx _vbn71xvx _wfu31xvx", size === SmartLinkSize.Small && !iconOnly && "_11lvpdf9 _192bpdf9 _vbn7pdf9 _wfu3pdf9 _yhjmpdf9 _1trnpdf9 _1fstpdf9 _1xcepdf9", className]),
164
241
  "data-testid": "".concat(testId, "-button-wrapper")
165
242
  }, /*#__PURE__*/React.createElement(Tooltip, {
166
243
  content: tooltipMessage,
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
15
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
16
16
  var PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "43.25.1",
18
+ packageVersion: "43.25.2",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "43.25.2",
3
+ "version": "43.25.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -64,7 +64,7 @@
64
64
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
65
65
  "@atlaskit/popup": "^4.13.0",
66
66
  "@atlaskit/primitives": "^18.0.0",
67
- "@atlaskit/react-ufo": "^5.2.0",
67
+ "@atlaskit/react-ufo": "^5.3.0",
68
68
  "@atlaskit/rovo-triggers": "^5.17.0",
69
69
  "@atlaskit/section-message": "^8.12.0",
70
70
  "@atlaskit/select": "^21.7.0",
@@ -73,7 +73,7 @@
73
73
  "@atlaskit/textfield": "^8.2.0",
74
74
  "@atlaskit/theme": "^21.0.0",
75
75
  "@atlaskit/tile": "^1.0.0",
76
- "@atlaskit/tmp-editor-statsig": "^29.0.0",
76
+ "@atlaskit/tmp-editor-statsig": "^29.1.0",
77
77
  "@atlaskit/tokens": "^11.0.0",
78
78
  "@atlaskit/tooltip": "^20.14.0",
79
79
  "@atlaskit/ufo": "^0.4.0",
@@ -232,6 +232,9 @@
232
232
  "navx-3264-refactoring-unauth-provider-images-fe": {
233
233
  "type": "boolean"
234
234
  },
235
+ "platform-button-icon-spacing-cleanup": {
236
+ "type": "boolean"
237
+ },
235
238
  "platform_sl_3p_auth_rovo_action_kill_switch": {
236
239
  "type": "boolean"
237
240
  }