@atlaskit/smart-card 34.0.0 → 34.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/ActionOld.js +112 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.js +95 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +16 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +20 -45
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.js +67 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.compiled.css +50 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +32 -39
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +25 -16
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.js +90 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.compiled.css +27 -0
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +39 -70
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +9 -10
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.js +33 -0
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.compiled.css +2 -0
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +20 -15
- package/dist/cjs/view/FlexibleCard/components/utils.js +8 -0
- 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/ActionOld.js +100 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.js +88 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +16 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +20 -49
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.js +57 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.compiled.css +50 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +32 -38
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +22 -15
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.js +82 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.compiled.css +27 -0
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +28 -68
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +7 -11
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.js +23 -0
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.compiled.css +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +16 -13
- package/dist/es2019/view/FlexibleCard/components/utils.js +8 -0
- 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/ActionOld.js +104 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.js +84 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +16 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +20 -44
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.js +60 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.compiled.css +50 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +28 -38
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +22 -15
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.js +83 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.compiled.css +27 -0
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +35 -68
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +7 -11
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.js +25 -0
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.compiled.css +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +17 -14
- package/dist/esm/view/FlexibleCard/components/utils.js +8 -0
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/ActionOld.d.ts +13 -0
- package/dist/types/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/actions/action/action-button/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.d.ts +8 -0
- package/dist/types/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +2 -6
- package/dist/types/view/FlexibleCard/components/actions/action/index.d.ts +2 -11
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +7 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.d.ts +10 -0
- package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.d.ts +3 -6
- package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.d.ts +10 -0
- package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.d.ts +2 -9
- package/dist/types/view/FlexibleCard/components/utils.d.ts +3 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/ActionOld.d.ts +13 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.d.ts +8 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +2 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/index.d.ts +2 -11
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +7 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.d.ts +10 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.d.ts +3 -6
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.d.ts +10 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.d.ts +2 -9
- package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +3 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 34.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#102113](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102113)
|
|
8
|
+
[`73750905491ce`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/73750905491ce) -
|
|
9
|
+
[ux] Migrate FlexibleCard actions to use compiled
|
|
10
|
+
|
|
11
|
+
## 34.0.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 34.0.0
|
|
4
18
|
|
|
5
19
|
### Major 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: "34.
|
|
14
|
+
packageVersion: "34.1.0"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
var _constants = require("../../../../../constants");
|
|
10
|
+
var _actionButton = _interopRequireDefault(require("./action-button"));
|
|
11
|
+
var _actionDropdownItem = _interopRequireDefault(require("./action-dropdown-item"));
|
|
12
|
+
var _actionIcon = _interopRequireDefault(require("./action-icon"));
|
|
13
|
+
var _actionStackItem = _interopRequireDefault(require("./action-stack-item"));
|
|
14
|
+
/**
|
|
15
|
+
* @jsxRuntime classic
|
|
16
|
+
* @jsx jsx
|
|
17
|
+
*/
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A base action that can be triggered with an on click.
|
|
22
|
+
* @internal
|
|
23
|
+
* @param {ActionProps} ActionProps - The props necessary for the Action.
|
|
24
|
+
*/
|
|
25
|
+
var ActionOld = function ActionOld(_ref) {
|
|
26
|
+
var as = _ref.as,
|
|
27
|
+
_ref$appearance = _ref.appearance,
|
|
28
|
+
appearance = _ref$appearance === void 0 ? 'subtle' : _ref$appearance,
|
|
29
|
+
content = _ref.content,
|
|
30
|
+
_ref$isLoading = _ref.isLoading,
|
|
31
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
32
|
+
onClick = _ref.onClick,
|
|
33
|
+
_ref$size = _ref.size,
|
|
34
|
+
size = _ref$size === void 0 ? _constants.SmartLinkSize.Medium : _ref$size,
|
|
35
|
+
_ref$testId = _ref.testId,
|
|
36
|
+
testId = _ref$testId === void 0 ? 'smart-action' : _ref$testId,
|
|
37
|
+
icon = _ref.icon,
|
|
38
|
+
_ref$iconPosition = _ref.iconPosition,
|
|
39
|
+
iconPosition = _ref$iconPosition === void 0 ? 'before' : _ref$iconPosition,
|
|
40
|
+
spaceInline = _ref.spaceInline,
|
|
41
|
+
tooltipMessage = _ref.tooltipMessage,
|
|
42
|
+
tooltipOnHide = _ref.tooltipOnHide,
|
|
43
|
+
hideTooltip = _ref.hideTooltip,
|
|
44
|
+
hideTooltipOnMouseDown = _ref.hideTooltipOnMouseDown,
|
|
45
|
+
xcss = _ref.xcss,
|
|
46
|
+
asDropDownItem = _ref.asDropDownItem,
|
|
47
|
+
overrideCss = _ref.overrideCss,
|
|
48
|
+
isDisabled = _ref.isDisabled,
|
|
49
|
+
href = _ref.href,
|
|
50
|
+
ariaLabel = _ref.ariaLabel,
|
|
51
|
+
Wrapper = _ref.wrapper;
|
|
52
|
+
if (!onClick) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
var isStackItem = as === 'stack-item';
|
|
56
|
+
var isDropdownItem = as === 'dropdown-item' || asDropDownItem;
|
|
57
|
+
var actionIcon = icon && (0, _react.jsx)(_actionIcon.default, {
|
|
58
|
+
asStackItemIcon: isStackItem,
|
|
59
|
+
isDisabled: isDisabled,
|
|
60
|
+
icon: icon,
|
|
61
|
+
size: size,
|
|
62
|
+
testId: testId
|
|
63
|
+
});
|
|
64
|
+
var iconBefore = icon && iconPosition === 'before' ? actionIcon : undefined;
|
|
65
|
+
var iconAfter = icon && iconPosition === 'after' ? actionIcon : undefined;
|
|
66
|
+
if (isStackItem) {
|
|
67
|
+
return (0, _react.jsx)(_actionStackItem.default, {
|
|
68
|
+
content: content,
|
|
69
|
+
icon: actionIcon,
|
|
70
|
+
space: spaceInline,
|
|
71
|
+
isDisabled: isDisabled,
|
|
72
|
+
isLoading: isLoading,
|
|
73
|
+
onClick: onClick,
|
|
74
|
+
size: size,
|
|
75
|
+
testId: testId,
|
|
76
|
+
tooltipMessage: tooltipMessage || content
|
|
77
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
78
|
+
,
|
|
79
|
+
xcss: xcss,
|
|
80
|
+
tooltipOnHide: tooltipOnHide,
|
|
81
|
+
hideTooltipOnMouseDown: hideTooltipOnMouseDown,
|
|
82
|
+
hideTooltip: hideTooltip
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (isDropdownItem) {
|
|
86
|
+
return (0, _react.jsx)(_actionDropdownItem.default, {
|
|
87
|
+
content: content,
|
|
88
|
+
iconAfter: iconAfter,
|
|
89
|
+
iconBefore: iconBefore,
|
|
90
|
+
isLoading: isLoading,
|
|
91
|
+
onClick: onClick,
|
|
92
|
+
testId: testId
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
var button = (0, _react.jsx)(_actionButton.default, {
|
|
96
|
+
appearance: appearance,
|
|
97
|
+
content: content,
|
|
98
|
+
iconAfter: iconAfter,
|
|
99
|
+
iconBefore: iconBefore,
|
|
100
|
+
isLoading: isLoading,
|
|
101
|
+
onClick: onClick,
|
|
102
|
+
overrideCss: overrideCss,
|
|
103
|
+
size: size,
|
|
104
|
+
testId: testId,
|
|
105
|
+
tooltipMessage: tooltipMessage || content,
|
|
106
|
+
isDisabled: isDisabled,
|
|
107
|
+
href: href,
|
|
108
|
+
ariaLabel: ariaLabel
|
|
109
|
+
});
|
|
110
|
+
return Wrapper !== undefined ? (0, _react.jsx)(Wrapper, null, button) : button;
|
|
111
|
+
};
|
|
112
|
+
var _default = exports.default = ActionOld;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _react2 = require("@emotion/react");
|
|
11
|
+
var _button = require("@atlaskit/button");
|
|
12
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
13
|
+
var _constants = require("../../../../../../constants");
|
|
14
|
+
var _utils = require("../../../utils");
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
/**
|
|
18
|
+
* @jsxRuntime classic
|
|
19
|
+
* @jsx jsx
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
|
+
|
|
24
|
+
var getButtonStyle = function getButtonStyle(size, iconOnly) {
|
|
25
|
+
switch (size) {
|
|
26
|
+
case _constants.SmartLinkSize.Large:
|
|
27
|
+
return iconOnly ? (0, _react2.css)({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
29
|
+
'button, button:hover, button:focus, button:active': {
|
|
30
|
+
padding: 0,
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
32
|
+
'> span': {
|
|
33
|
+
margin: 0
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}) : '';
|
|
37
|
+
case _constants.SmartLinkSize.Small:
|
|
38
|
+
return (0, _react2.css)({
|
|
39
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
40
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
|
+
'button, button:hover, button:focus, button:active': [{
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
44
|
+
lineHeight: 'inherit'
|
|
45
|
+
}, iconOnly ? "\n padding: 0.125rem;\n " : "\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n "]
|
|
46
|
+
});
|
|
47
|
+
case _constants.SmartLinkSize.XLarge:
|
|
48
|
+
case _constants.SmartLinkSize.Medium:
|
|
49
|
+
default:
|
|
50
|
+
return '';
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var ActionButtonOld = function ActionButtonOld(_ref) {
|
|
54
|
+
var appearance = _ref.appearance,
|
|
55
|
+
content = _ref.content,
|
|
56
|
+
iconAfter = _ref.iconAfter,
|
|
57
|
+
iconBefore = _ref.iconBefore,
|
|
58
|
+
isLoading = _ref.isLoading,
|
|
59
|
+
onClick = _ref.onClick,
|
|
60
|
+
overrideCss = _ref.overrideCss,
|
|
61
|
+
size = _ref.size,
|
|
62
|
+
testId = _ref.testId,
|
|
63
|
+
tooltipMessage = _ref.tooltipMessage,
|
|
64
|
+
isDisabled = _ref.isDisabled,
|
|
65
|
+
href = _ref.href,
|
|
66
|
+
ariaLabel = _ref.ariaLabel;
|
|
67
|
+
var iconOnly = !content;
|
|
68
|
+
var onButtonClick = (0, _react.useCallback)(function (handler) {
|
|
69
|
+
return function (e) {
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
handler();
|
|
72
|
+
};
|
|
73
|
+
}, []);
|
|
74
|
+
return (0, _react2.jsx)("div", {
|
|
75
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
76
|
+
css: [getButtonStyle(size, iconOnly), overrideCss],
|
|
77
|
+
"data-testid": "".concat(testId, "-button-wrapper")
|
|
78
|
+
}, (0, _react2.jsx)(_tooltip.default, {
|
|
79
|
+
content: tooltipMessage,
|
|
80
|
+
hideTooltipOnClick: true,
|
|
81
|
+
testId: "".concat(testId, "-tooltip")
|
|
82
|
+
}, (0, _react2.jsx)(_button.LoadingButton, {
|
|
83
|
+
appearance: appearance,
|
|
84
|
+
iconAfter: iconAfter,
|
|
85
|
+
iconBefore: iconBefore,
|
|
86
|
+
isDisabled: isDisabled,
|
|
87
|
+
isLoading: isLoading,
|
|
88
|
+
onClick: onButtonClick(onClick),
|
|
89
|
+
spacing: _utils.sizeToButtonSpacing[size],
|
|
90
|
+
testId: testId,
|
|
91
|
+
href: href,
|
|
92
|
+
"aria-label": ariaLabel
|
|
93
|
+
}, content)));
|
|
94
|
+
};
|
|
95
|
+
var _default = exports.default = ActionButtonOld;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
._11c8qk37{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._11lv1xvx button, ._192b1xvx button:active, ._vbn71xvx button:focus, ._wfu31xvx button:hover{padding-left:var(--ds-space-025,.125rem)}
|
|
3
|
+
._11lvidpf button, ._192bidpf button:active, ._vbn7idpf button:focus, ._wfu3idpf button:hover{padding-left:0}
|
|
4
|
+
._11lvpdf9 button, ._192bpdf9 button:active, ._vbn7pdf9 button:focus, ._wfu3pdf9 button:hover{padding-left:var(--ds-space-050,.25rem)}
|
|
5
|
+
._1gfl1xvx button, ._or3f1xvx button:active, ._1ddv1xvx button:focus, ._1hha1xvx button:hover{padding-top:var(--ds-space-025,.125rem)}
|
|
6
|
+
._1gflidpf button, ._or3fidpf button:active, ._1ddvidpf button:focus, ._1hhaidpf button:hover{padding-top:0}
|
|
7
|
+
._1gqn1xvx button, ._1qdm1xvx button:active, ._df2r1xvx button:focus, ._j1tw1xvx button:hover{padding-bottom:var(--ds-space-025,.125rem)}
|
|
8
|
+
._1gqnidpf button, ._1qdmidpf button:active, ._df2ridpf button:focus, ._j1twidpf button:hover{padding-bottom:0}
|
|
9
|
+
._1i3bidpf button:active>span, ._13gwidpf button:focus>span, ._4wlcidpf button:hover>span, ._rehaidpf button>span{margin-top:0}
|
|
10
|
+
._1vtwidpf button:active>span, ._ijvwidpf button:focus>span, ._tpwpidpf button:hover>span, ._1ad8idpf button>span{margin-left:0}
|
|
11
|
+
._3kh9idpf button:active>span, ._i2vxidpf button:focus>span, ._8pvjidpf button:hover>span, ._1e1oidpf button>span{margin-bottom:0}
|
|
12
|
+
._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
|
|
13
|
+
._mp2fidpf button:active>span, ._ro8midpf button:focus>span, ._1l0qidpf button:hover>span, ._1bnaidpf button>span{margin-right:0}
|
|
14
|
+
._yhjm1xvx button, ._1trn1xvx button:active, ._1fst1xvx button:focus, ._1xce1xvx button:hover{padding-right:var(--ds-space-025,.125rem)}
|
|
15
|
+
._yhjmidpf button, ._1trnidpf button:active, ._1fstidpf button:focus, ._1xceidpf button:hover{padding-right:0}
|
|
16
|
+
._yhjmpdf9 button, ._1trnpdf9 button:active, ._1fstpdf9 button:focus, ._1xcepdf9 button:hover{padding-right:var(--ds-space-050,.25rem)}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,64 +7,35 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
7
|
value: true
|
|
7
8
|
});
|
|
8
9
|
exports.default = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
9
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
11
13
|
var _button = require("@atlaskit/button");
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
15
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
13
16
|
var _constants = require("../../../../../../constants");
|
|
14
17
|
var _utils = require("../../../utils");
|
|
18
|
+
var _ActionButtonOld = _interopRequireDefault(require("./ActionButtonOld"));
|
|
15
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
|
-
|
|
24
|
-
var getButtonStyle = function getButtonStyle(size, iconOnly) {
|
|
25
|
-
switch (size) {
|
|
26
|
-
case _constants.SmartLinkSize.Large:
|
|
27
|
-
return iconOnly ? (0, _react2.css)({
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
29
|
-
'button, button:hover, button:focus, button:active': {
|
|
30
|
-
padding: 0,
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
32
|
-
'> span': {
|
|
33
|
-
margin: 0
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}) : '';
|
|
37
|
-
case _constants.SmartLinkSize.Small:
|
|
38
|
-
return (0, _react2.css)({
|
|
39
|
-
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
40
|
-
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
|
-
'button, button:hover, button:focus, button:active': [{
|
|
43
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
44
|
-
lineHeight: 'inherit'
|
|
45
|
-
}, iconOnly ? "\n padding: 0.125rem;\n " : "\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n "]
|
|
46
|
-
});
|
|
47
|
-
case _constants.SmartLinkSize.XLarge:
|
|
48
|
-
case _constants.SmartLinkSize.Medium:
|
|
49
|
-
default:
|
|
50
|
-
return '';
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var ActionButton = function ActionButton(_ref) {
|
|
21
|
+
var IconOnlyLarge = null;
|
|
22
|
+
var SizeSmall = null;
|
|
23
|
+
var SizeSmallIconOnly = null;
|
|
24
|
+
var SizeSmallNotIconOnly = null;
|
|
25
|
+
var ActionButtonNew = function ActionButtonNew(_ref) {
|
|
54
26
|
var appearance = _ref.appearance,
|
|
55
27
|
content = _ref.content,
|
|
56
28
|
iconAfter = _ref.iconAfter,
|
|
57
29
|
iconBefore = _ref.iconBefore,
|
|
58
30
|
isLoading = _ref.isLoading,
|
|
59
31
|
onClick = _ref.onClick,
|
|
60
|
-
overrideCss = _ref.overrideCss,
|
|
61
32
|
size = _ref.size,
|
|
62
33
|
testId = _ref.testId,
|
|
63
34
|
tooltipMessage = _ref.tooltipMessage,
|
|
64
35
|
isDisabled = _ref.isDisabled,
|
|
65
36
|
href = _ref.href,
|
|
66
|
-
ariaLabel = _ref.ariaLabel
|
|
37
|
+
ariaLabel = _ref.ariaLabel,
|
|
38
|
+
className = _ref.className;
|
|
67
39
|
var iconOnly = !content;
|
|
68
40
|
var onButtonClick = (0, _react.useCallback)(function (handler) {
|
|
69
41
|
return function (e) {
|
|
@@ -71,15 +43,15 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
71
43
|
handler();
|
|
72
44
|
};
|
|
73
45
|
}, []);
|
|
74
|
-
return
|
|
75
|
-
// eslint-disable-next-line @atlaskit/
|
|
76
|
-
|
|
46
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
48
|
+
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 && "_11c8qk37 _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]),
|
|
77
49
|
"data-testid": "".concat(testId, "-button-wrapper")
|
|
78
|
-
},
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
79
51
|
content: tooltipMessage,
|
|
80
52
|
hideTooltipOnClick: true,
|
|
81
53
|
testId: "".concat(testId, "-tooltip")
|
|
82
|
-
},
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_button.LoadingButton, {
|
|
83
55
|
appearance: appearance,
|
|
84
56
|
iconAfter: iconAfter,
|
|
85
57
|
iconBefore: iconBefore,
|
|
@@ -92,4 +64,7 @@ var ActionButton = function ActionButton(_ref) {
|
|
|
92
64
|
"aria-label": ariaLabel
|
|
93
65
|
}, content)));
|
|
94
66
|
};
|
|
67
|
+
var ActionButton = function ActionButton(props) {
|
|
68
|
+
return (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/_react.default.createElement(ActionButtonNew, props) : /*#__PURE__*/_react.default.createElement(_ActionButtonOld.default, props);
|
|
69
|
+
};
|
|
95
70
|
var _default = exports.default = ActionButton;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
|
+
var _constants = require("../../../../../../constants");
|
|
10
|
+
var _utils = require("../../../utils");
|
|
11
|
+
/**
|
|
12
|
+
* @jsxRuntime classic
|
|
13
|
+
* @jsx jsx
|
|
14
|
+
*/
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
+
|
|
17
|
+
var getIconWidth = function getIconWidth(size) {
|
|
18
|
+
switch (size) {
|
|
19
|
+
case _constants.SmartLinkSize.XLarge:
|
|
20
|
+
case _constants.SmartLinkSize.Large:
|
|
21
|
+
return '1.5rem';
|
|
22
|
+
case _constants.SmartLinkSize.Medium:
|
|
23
|
+
case _constants.SmartLinkSize.Small:
|
|
24
|
+
default:
|
|
25
|
+
return '1rem';
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
var getIconStyles = function getIconStyles(isDisabled) {
|
|
29
|
+
return (0, _react.css)({
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
31
|
+
color: isDisabled ? "var(--ds-text-disabled, #6B778C)" : "var(--ds-icon, #44546F)"
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var stackItemIconSizeStyles = (0, _utils.getIconSizeStyles)('20px');
|
|
35
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
36
|
+
var stackItemIconStyles = (0, _react.css)(stackItemIconSizeStyles, {
|
|
37
|
+
display: 'inline-block',
|
|
38
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
39
|
+
lineHeight: 0,
|
|
40
|
+
padding: "var(--ds-space-025, 2px)",
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
42
|
+
'span,svg,img': {
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
44
|
+
lineHeight: 0
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
var newStackItemIconStyles = (0, _react.css)({
|
|
48
|
+
display: 'inline-block',
|
|
49
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
50
|
+
lineHeight: 0
|
|
51
|
+
});
|
|
52
|
+
var ActionIconOld = function ActionIconOld(_ref) {
|
|
53
|
+
var size = _ref.size,
|
|
54
|
+
testId = _ref.testId,
|
|
55
|
+
icon = _ref.icon,
|
|
56
|
+
isDisabled = _ref.isDisabled,
|
|
57
|
+
asStackItemIcon = _ref.asStackItemIcon;
|
|
58
|
+
return (0, _react.jsx)("span", {
|
|
59
|
+
css: [
|
|
60
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
61
|
+
getIconStyles(isDisabled), !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? asStackItemIcon ? stackItemIconStyles :
|
|
62
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
63
|
+
(0, _utils.getIconSizeStyles)(getIconWidth(size)) : newStackItemIconStyles],
|
|
64
|
+
"data-testid": "".concat(testId, "-icon")
|
|
65
|
+
}, icon);
|
|
66
|
+
};
|
|
67
|
+
var _default = exports.default = ActionIconOld;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
._16jlidpf{flex-grow:0}
|
|
2
|
+
._19bvv77o{padding-left:var(--ds-space-025,2px)}
|
|
3
|
+
._19l31j6v img, ._1pr21j6v span, ._1u5t1j6v svg{max-height:1rem}
|
|
4
|
+
._19l31k8s img, ._1pr21k8s span, ._1u5t1k8s svg{max-height:1.5rem}
|
|
5
|
+
._19l3gktf img, ._1pr2gktf span, ._1u5tgktf svg{max-height:20px}
|
|
6
|
+
._1bsb1j6v{width:1rem}
|
|
7
|
+
._1bsb1k8s{width:1.5rem}
|
|
8
|
+
._1bsbgktf{width:20px}
|
|
9
|
+
._1e0c1o8l{display:inline-block}
|
|
10
|
+
._1o9zidpf{flex-shrink:0}
|
|
11
|
+
._1rg21j6v img, ._q7cv1j6v span, ._xwbj1j6v svg{min-width:1rem}
|
|
12
|
+
._1rg21k8s img, ._q7cv1k8s span, ._xwbj1k8s svg{min-width:1.5rem}
|
|
13
|
+
._1rg2gktf img, ._q7cvgktf span, ._xwbjgktf svg{min-width:20px}
|
|
14
|
+
._1tke1j6v{min-height:1rem}
|
|
15
|
+
._1tke1k8s{min-height:1.5rem}
|
|
16
|
+
._1tkegktf{min-height:20px}
|
|
17
|
+
._1ul91j6v{min-width:1rem}
|
|
18
|
+
._1ul91k8s{min-width:1.5rem}
|
|
19
|
+
._1ul9gktf{min-width:20px}
|
|
20
|
+
._4t3i1j6v{height:1rem}
|
|
21
|
+
._4t3i1k8s{height:1.5rem}
|
|
22
|
+
._4t3igktf{height:20px}
|
|
23
|
+
._5jw9idpf svg{padding-bottom:0}
|
|
24
|
+
._7wy9idpf svg{padding-left:0}
|
|
25
|
+
._bna71j6v img, ._1xjx1j6v span, ._17521j6v svg{height:1rem}
|
|
26
|
+
._bna71k8s img, ._1xjx1k8s span, ._17521k8s svg{height:1.5rem}
|
|
27
|
+
._bna7gktf img, ._1xjxgktf span, ._1752gktf svg{height:20px}
|
|
28
|
+
._c71l1j6v{max-height:1rem}
|
|
29
|
+
._c71l1k8s{max-height:1.5rem}
|
|
30
|
+
._c71lgktf{max-height:20px}
|
|
31
|
+
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
32
|
+
._i0dl1wug{flex-basis:auto}
|
|
33
|
+
._i2i3idpf svg{padding-top:0}
|
|
34
|
+
._mezj1j6v img, ._e2oo1j6v span, ._w8l51j6v svg{width:1rem}
|
|
35
|
+
._mezj1k8s img, ._e2oo1k8s span, ._w8l51k8s svg{width:1.5rem}
|
|
36
|
+
._mezjgktf img, ._e2oogktf span, ._w8l5gktf svg{width:20px}
|
|
37
|
+
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
38
|
+
._p12f1j6v{max-width:1rem}
|
|
39
|
+
._p12f1k8s{max-width:1.5rem}
|
|
40
|
+
._p12fgktf{max-width:20px}
|
|
41
|
+
._qci81j6v img, ._15iz1j6v span, ._erub1j6v svg{min-height:1rem}
|
|
42
|
+
._qci81k8s img, ._15iz1k8s span, ._erub1k8s svg{min-height:1.5rem}
|
|
43
|
+
._qci8gktf img, ._15izgktf span, ._erubgktf svg{min-height:20px}
|
|
44
|
+
._rtys1j6v img, ._b8nk1j6v span, ._4x201j6v svg{max-width:1rem}
|
|
45
|
+
._rtys1k8s img, ._b8nk1k8s span, ._4x201k8s svg{max-width:1.5rem}
|
|
46
|
+
._rtysgktf img, ._b8nkgktf span, ._4x20gktf svg{max-width:20px}
|
|
47
|
+
._syaz2oi6{color:var(--ds-text-disabled,#6b778c)}
|
|
48
|
+
._syazwdcn{color:var(--ds-icon,#44546f)}
|
|
49
|
+
._u5f3v77o{padding-right:var(--ds-space-025,2px)}
|
|
50
|
+
._uhasidpf svg{padding-right:0}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
6
|
Object.defineProperty(exports, "__esModule", {
|
|
4
7
|
value: true
|
|
5
8
|
});
|
|
6
9
|
exports.default = void 0;
|
|
7
|
-
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
13
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
14
|
var _constants = require("../../../../../../constants");
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* @jsx jsx
|
|
14
|
-
*/
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
-
|
|
15
|
+
var _ActionIconOld = _interopRequireDefault(require("./ActionIconOld"));
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
18
|
var getIconWidth = function getIconWidth(size) {
|
|
18
19
|
switch (size) {
|
|
19
20
|
case _constants.SmartLinkSize.XLarge:
|
|
@@ -25,43 +26,35 @@ var getIconWidth = function getIconWidth(size) {
|
|
|
25
26
|
return '1rem';
|
|
26
27
|
}
|
|
27
28
|
};
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
29
|
+
var iconSizeStyleMap = {
|
|
30
|
+
'1.5rem': "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1k8s _1tke1k8s _c71l1k8s _1bsb1k8s _1ul91k8s _p12f1k8s _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71k8s _1xjx1k8s _17521k8s _qci81k8s _15iz1k8s _erub1k8s _19l31k8s _1pr21k8s _1u5t1k8s _mezj1k8s _e2oo1k8s _w8l51k8s _1rg21k8s _q7cv1k8s _xwbj1k8s _rtys1k8s _b8nk1k8s _4x201k8s",
|
|
31
|
+
'1rem': "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1j6v _1tke1j6v _c71l1j6v _1bsb1j6v _1ul91j6v _p12f1j6v _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71j6v _1xjx1j6v _17521j6v _qci81j6v _15iz1j6v _erub1j6v _19l31j6v _1pr21j6v _1u5t1j6v _mezj1j6v _e2oo1j6v _w8l51j6v _1rg21j6v _q7cv1j6v _xwbj1j6v _rtys1j6v _b8nk1j6v _4x201j6v",
|
|
32
|
+
'20px': "_16jlidpf _1o9zidpf _i0dl1wug _4t3igktf _1tkegktf _c71lgktf _1bsbgktf _1ul9gktf _p12fgktf _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7gktf _1xjxgktf _1752gktf _qci8gktf _15izgktf _erubgktf _19l3gktf _1pr2gktf _1u5tgktf _mezjgktf _e2oogktf _w8l5gktf _1rg2gktf _q7cvgktf _xwbjgktf _rtysgktf _b8nkgktf _4x20gktf"
|
|
33
33
|
};
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
42
|
-
'span,svg,img': {
|
|
43
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
44
|
-
lineHeight: 0
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
var newStackItemIconStyles = (0, _react.css)({
|
|
48
|
-
display: 'inline-block',
|
|
49
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
50
|
-
lineHeight: 0
|
|
51
|
-
});
|
|
52
|
-
var ActionIcon = function ActionIcon(_ref) {
|
|
34
|
+
var stackItemIconStyles = null;
|
|
35
|
+
var newStackItemIconStyles = null;
|
|
36
|
+
var iconStyleMap = {
|
|
37
|
+
true: "_syaz2oi6",
|
|
38
|
+
false: "_syazwdcn"
|
|
39
|
+
};
|
|
40
|
+
var ActionIconNew = function ActionIconNew(_ref) {
|
|
53
41
|
var size = _ref.size,
|
|
54
42
|
testId = _ref.testId,
|
|
55
43
|
icon = _ref.icon,
|
|
56
44
|
isDisabled = _ref.isDisabled,
|
|
57
45
|
asStackItemIcon = _ref.asStackItemIcon;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
if (!(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons')) {
|
|
47
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
48
|
+
"data-testid": "".concat(testId, "-icon"),
|
|
49
|
+
className: (0, _runtime.ax)([iconStyleMap[isDisabled ? 'true' : 'false'], asStackItemIcon && "_1e0c1o8l _ca0qv77o _u5f3v77o _n3tdv77o _19bvv77o", asStackItemIcon && iconSizeStyleMap['20px'], !asStackItemIcon && iconSizeStyleMap[getIconWidth(size)]])
|
|
50
|
+
}, icon);
|
|
51
|
+
}
|
|
52
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
53
|
+
"data-testid": "".concat(testId, "-icon"),
|
|
54
|
+
className: (0, _runtime.ax)([iconStyleMap[isDisabled ? 'true' : 'false'], "_1e0c1o8l"])
|
|
65
55
|
}, icon);
|
|
66
56
|
};
|
|
57
|
+
var ActionIcon = function ActionIcon(props) {
|
|
58
|
+
return (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(ActionIconNew, props) : /*#__PURE__*/React.createElement(_ActionIconOld.default, props);
|
|
59
|
+
};
|
|
67
60
|
var _default = exports.default = ActionIcon;
|