@atlaskit/smart-card 43.26.6 → 43.26.7
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 +8 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +43 -120
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +35 -106
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +43 -120
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/package.json +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 43.26.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`236ae1160f1a0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/236ae1160f1a0) -
|
|
8
|
+
Clean up platform-button-icon-spacing-cleanup FG
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 43.26.6
|
|
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.26.
|
|
14
|
+
packageVersion: "43.26.6"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -12,7 +12,6 @@ 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");
|
|
16
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
16
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
18
17
|
var _constants = require("../../../../../../constants");
|
|
@@ -69,64 +68,17 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
69
68
|
var button = (0, _react.useMemo)(function () {
|
|
70
69
|
var isLinkButton = !!href;
|
|
71
70
|
var spacing = size === _constants.SmartLinkSize.Large || size === _constants.SmartLinkSize.XLarge ? 'default' : 'compact';
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
if (
|
|
78
|
-
|
|
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, {
|
|
71
|
+
var icon = iconBefore || iconAfter;
|
|
72
|
+
var iconFn = icon ? function () {
|
|
73
|
+
return icon;
|
|
74
|
+
} : undefined;
|
|
75
|
+
if (iconOnly && iconFn) {
|
|
76
|
+
if (isLinkButton && iconFn) {
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_new.LinkIconButton, {
|
|
93
78
|
appearance: IconButtonAppearanceMap[appearance],
|
|
94
79
|
icon: iconFn,
|
|
80
|
+
href: href,
|
|
95
81
|
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,
|
|
130
82
|
isTooltipDisabled: false,
|
|
131
83
|
label: tooltipMessage,
|
|
132
84
|
onClick: onButtonClick(onClick),
|
|
@@ -135,86 +87,57 @@ var ActionButtonRefresh = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, re
|
|
|
135
87
|
tooltip: tooltipOptions
|
|
136
88
|
});
|
|
137
89
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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,
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
91
|
+
appearance: IconButtonAppearanceMap[appearance],
|
|
92
|
+
icon: iconFn,
|
|
172
93
|
isDisabled: isDisabled,
|
|
173
94
|
isLoading: isLoading,
|
|
95
|
+
isTooltipDisabled: false,
|
|
96
|
+
label: tooltipMessage,
|
|
174
97
|
onClick: onButtonClick(onClick),
|
|
175
98
|
spacing: spacing,
|
|
176
|
-
testId: testId
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
}
|
|
99
|
+
testId: testId,
|
|
100
|
+
tooltip: tooltipOptions
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
var iconBeforeFn = iconBefore ? function () {
|
|
104
|
+
return iconBefore;
|
|
105
|
+
} : undefined;
|
|
106
|
+
var iconAfterFn = iconAfter ? function () {
|
|
107
|
+
return iconAfter;
|
|
108
|
+
} : undefined;
|
|
109
|
+
if (isLinkButton) {
|
|
202
110
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
203
111
|
content: tooltipMessage,
|
|
204
112
|
hideTooltipOnClick: true,
|
|
205
113
|
testId: "".concat(testId, "-tooltip")
|
|
206
|
-
}, /*#__PURE__*/_react.default.createElement(_new.
|
|
114
|
+
}, /*#__PURE__*/_react.default.createElement(_new.LinkButton, {
|
|
207
115
|
appearance: ButtonAppearanceMap[appearance],
|
|
208
116
|
"aria-label": ariaLabel,
|
|
209
|
-
iconAfter:
|
|
210
|
-
iconBefore:
|
|
117
|
+
iconAfter: iconAfterFn,
|
|
118
|
+
iconBefore: iconBeforeFn,
|
|
211
119
|
isDisabled: isDisabled,
|
|
212
|
-
|
|
120
|
+
href: href,
|
|
213
121
|
onClick: onButtonClick(onClick),
|
|
214
122
|
spacing: spacing,
|
|
215
123
|
testId: testId
|
|
216
124
|
}, content));
|
|
217
125
|
}
|
|
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));
|
|
218
141
|
}, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
|
|
219
142
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
220
143
|
testId: "".concat(testId, "-button-wrapper"),
|
|
@@ -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.26.
|
|
25
|
+
packageVersion: "43.26.6",
|
|
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.26.
|
|
5
|
+
packageVersion: "43.26.6"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -4,7 +4,6 @@ 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';
|
|
8
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
9
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
9
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
@@ -58,60 +57,15 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
|
|
|
58
57
|
const button = useMemo(() => {
|
|
59
58
|
const isLinkButton = !!href;
|
|
60
59
|
const spacing = size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'default' : 'compact';
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
|
|
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, {
|
|
80
|
-
appearance: IconButtonAppearanceMap[appearance],
|
|
81
|
-
icon: iconFn,
|
|
82
|
-
isDisabled: isDisabled,
|
|
83
|
-
isLoading: isLoading,
|
|
84
|
-
isTooltipDisabled: false,
|
|
85
|
-
label: tooltipMessage,
|
|
86
|
-
onClick: onButtonClick(onClick),
|
|
87
|
-
spacing: spacing,
|
|
88
|
-
testId: testId,
|
|
89
|
-
tooltip: tooltipOptions
|
|
90
|
-
});
|
|
91
|
-
}
|
|
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, {
|
|
60
|
+
const icon = iconBefore || iconAfter;
|
|
61
|
+
const iconFn = icon ? () => icon : undefined;
|
|
62
|
+
if (iconOnly && iconFn) {
|
|
63
|
+
if (isLinkButton && iconFn) {
|
|
64
|
+
return /*#__PURE__*/React.createElement(LinkIconButton, {
|
|
111
65
|
appearance: IconButtonAppearanceMap[appearance],
|
|
112
66
|
icon: iconFn,
|
|
67
|
+
href: href,
|
|
113
68
|
isDisabled: isDisabled,
|
|
114
|
-
isLoading: isLoading,
|
|
115
69
|
isTooltipDisabled: false,
|
|
116
70
|
label: tooltipMessage,
|
|
117
71
|
onClick: onButtonClick(onClick),
|
|
@@ -120,78 +74,53 @@ const ActionButtonRefresh = /*#__PURE__*/forwardRef(({
|
|
|
120
74
|
tooltip: tooltipOptions
|
|
121
75
|
});
|
|
122
76
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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,
|
|
77
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
78
|
+
appearance: IconButtonAppearanceMap[appearance],
|
|
79
|
+
icon: iconFn,
|
|
153
80
|
isDisabled: isDisabled,
|
|
154
81
|
isLoading: isLoading,
|
|
82
|
+
isTooltipDisabled: false,
|
|
83
|
+
label: tooltipMessage,
|
|
155
84
|
onClick: onButtonClick(onClick),
|
|
156
85
|
spacing: spacing,
|
|
157
|
-
testId: testId
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
}
|
|
86
|
+
testId: testId,
|
|
87
|
+
tooltip: tooltipOptions
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const iconBeforeFn = iconBefore ? () => iconBefore : undefined;
|
|
91
|
+
const iconAfterFn = iconAfter ? () => iconAfter : undefined;
|
|
92
|
+
if (isLinkButton) {
|
|
179
93
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
180
94
|
content: tooltipMessage,
|
|
181
95
|
hideTooltipOnClick: true,
|
|
182
96
|
testId: `${testId}-tooltip`
|
|
183
|
-
}, /*#__PURE__*/React.createElement(
|
|
97
|
+
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
184
98
|
appearance: ButtonAppearanceMap[appearance],
|
|
185
99
|
"aria-label": ariaLabel,
|
|
186
100
|
iconAfter: iconAfterFn,
|
|
187
101
|
iconBefore: iconBeforeFn,
|
|
188
102
|
isDisabled: isDisabled,
|
|
189
|
-
|
|
103
|
+
href: href,
|
|
190
104
|
onClick: onButtonClick(onClick),
|
|
191
105
|
spacing: spacing,
|
|
192
106
|
testId: testId
|
|
193
107
|
}, content));
|
|
194
108
|
}
|
|
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));
|
|
195
124
|
}, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
|
|
196
125
|
return /*#__PURE__*/React.createElement(Box, {
|
|
197
126
|
testId: `${testId}-button-wrapper`,
|
|
@@ -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.26.
|
|
15
|
+
packageVersion: "43.26.6",
|
|
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.26.
|
|
7
|
+
packageVersion: "43.26.6"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -4,7 +4,6 @@ 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';
|
|
8
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
9
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
9
|
import { SmartLinkSize } from '../../../../../../constants';
|
|
@@ -60,64 +59,17 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
60
59
|
var button = useMemo(function () {
|
|
61
60
|
var isLinkButton = !!href;
|
|
62
61
|
var spacing = size === SmartLinkSize.Large || size === SmartLinkSize.XLarge ? 'default' : 'compact';
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (
|
|
69
|
-
|
|
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, {
|
|
62
|
+
var icon = iconBefore || iconAfter;
|
|
63
|
+
var iconFn = icon ? function () {
|
|
64
|
+
return icon;
|
|
65
|
+
} : undefined;
|
|
66
|
+
if (iconOnly && iconFn) {
|
|
67
|
+
if (isLinkButton && iconFn) {
|
|
68
|
+
return /*#__PURE__*/React.createElement(LinkIconButton, {
|
|
84
69
|
appearance: IconButtonAppearanceMap[appearance],
|
|
85
70
|
icon: iconFn,
|
|
71
|
+
href: href,
|
|
86
72
|
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,
|
|
121
73
|
isTooltipDisabled: false,
|
|
122
74
|
label: tooltipMessage,
|
|
123
75
|
onClick: onButtonClick(onClick),
|
|
@@ -126,86 +78,57 @@ var ActionButtonRefresh = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
126
78
|
tooltip: tooltipOptions
|
|
127
79
|
});
|
|
128
80
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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,
|
|
81
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
82
|
+
appearance: IconButtonAppearanceMap[appearance],
|
|
83
|
+
icon: iconFn,
|
|
163
84
|
isDisabled: isDisabled,
|
|
164
85
|
isLoading: isLoading,
|
|
86
|
+
isTooltipDisabled: false,
|
|
87
|
+
label: tooltipMessage,
|
|
165
88
|
onClick: onButtonClick(onClick),
|
|
166
89
|
spacing: spacing,
|
|
167
|
-
testId: testId
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
}
|
|
90
|
+
testId: testId,
|
|
91
|
+
tooltip: tooltipOptions
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
var iconBeforeFn = iconBefore ? function () {
|
|
95
|
+
return iconBefore;
|
|
96
|
+
} : undefined;
|
|
97
|
+
var iconAfterFn = iconAfter ? function () {
|
|
98
|
+
return iconAfter;
|
|
99
|
+
} : undefined;
|
|
100
|
+
if (isLinkButton) {
|
|
193
101
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
194
102
|
content: tooltipMessage,
|
|
195
103
|
hideTooltipOnClick: true,
|
|
196
104
|
testId: "".concat(testId, "-tooltip")
|
|
197
|
-
}, /*#__PURE__*/React.createElement(
|
|
105
|
+
}, /*#__PURE__*/React.createElement(LinkButton, {
|
|
198
106
|
appearance: ButtonAppearanceMap[appearance],
|
|
199
107
|
"aria-label": ariaLabel,
|
|
200
|
-
iconAfter:
|
|
201
|
-
iconBefore:
|
|
108
|
+
iconAfter: iconAfterFn,
|
|
109
|
+
iconBefore: iconBeforeFn,
|
|
202
110
|
isDisabled: isDisabled,
|
|
203
|
-
|
|
111
|
+
href: href,
|
|
204
112
|
onClick: onButtonClick(onClick),
|
|
205
113
|
spacing: spacing,
|
|
206
114
|
testId: testId
|
|
207
115
|
}, content));
|
|
208
116
|
}
|
|
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));
|
|
209
132
|
}, [appearance, ariaLabel, content, href, iconAfter, iconBefore, iconOnly, isDisabled, isLoading, onButtonClick, onClick, size, testId, tooltipMessage]);
|
|
210
133
|
return /*#__PURE__*/React.createElement(Box, {
|
|
211
134
|
testId: "".concat(testId, "-button-wrapper"),
|
|
@@ -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.26.
|
|
18
|
+
packageVersion: "43.26.6",
|
|
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.26.
|
|
3
|
+
"version": "43.26.7",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/popup": "^4.13.0",
|
|
67
67
|
"@atlaskit/primitives": "^18.0.0",
|
|
68
68
|
"@atlaskit/react-ufo": "^5.4.0",
|
|
69
|
-
"@atlaskit/rovo-triggers": "^5.
|
|
69
|
+
"@atlaskit/rovo-triggers": "^5.26.0",
|
|
70
70
|
"@atlaskit/section-message": "^8.12.0",
|
|
71
71
|
"@atlaskit/select": "^21.8.0",
|
|
72
72
|
"@atlaskit/spinner": "^19.0.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@atlaskit/textfield": "^8.2.0",
|
|
75
75
|
"@atlaskit/theme": "^22.0.0",
|
|
76
76
|
"@atlaskit/tile": "^1.0.0",
|
|
77
|
-
"@atlaskit/tmp-editor-statsig": "^40.
|
|
77
|
+
"@atlaskit/tmp-editor-statsig": "^40.2.0",
|
|
78
78
|
"@atlaskit/tokens": "^11.1.0",
|
|
79
79
|
"@atlaskit/tooltip": "^20.14.0",
|
|
80
80
|
"@atlaskit/ufo": "^0.4.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@atlassian/a11y-jest-testing": "^0.10.0",
|
|
109
109
|
"@atlassian/analytics-tooling": "workspace:^",
|
|
110
110
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
111
|
-
"@atlassian/gemini": "^1.
|
|
111
|
+
"@atlassian/gemini": "^1.38.0",
|
|
112
112
|
"@atlassian/testing-library": "^0.4.0",
|
|
113
113
|
"@testing-library/dom": "^10.1.0",
|
|
114
114
|
"@testing-library/jest-dom": "^6.4.5",
|
|
@@ -224,9 +224,6 @@
|
|
|
224
224
|
"platform_navx_send_context_to_ugs_for_rel_links": {
|
|
225
225
|
"type": "boolean"
|
|
226
226
|
},
|
|
227
|
-
"platform-button-icon-spacing-cleanup": {
|
|
228
|
-
"type": "boolean"
|
|
229
|
-
},
|
|
230
227
|
"platform_sl_3p_auth_rovo_action_kill_switch": {
|
|
231
228
|
"type": "boolean"
|
|
232
229
|
},
|