@atlaskit/smart-card 34.6.4 → 34.6.6
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 +16 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +121 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +1 -1
- package/dist/cjs/view/BlockCard/views/unresolved-view/index.js +1 -1
- package/dist/cjs/view/BlockCard/views/utils/withFlexibleUIBlockCardStyle.js +1 -1
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +1 -1
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.compiled.css +5 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +2 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.compiled.css +4 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +1 -1
- package/dist/cjs/view/HoverCard/components/ContentContainer.js +1 -1
- package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +1 -1
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +1 -1
- package/dist/cjs/view/HoverCard/components/views/resolving/index.compiled.css +5 -2
- package/dist/cjs/view/HoverCard/components/views/resolving/index.js +2 -2
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +1 -1
- package/dist/cjs/view/InlineCard/ErroredView/index.js +10 -3
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +31 -7
- package/dist/cjs/view/InlineCard/Frame/styled.compiled.css +3 -2
- package/dist/cjs/view/InlineCard/Frame/styled.js +8 -5
- package/dist/cjs/view/InlineCard/Icon.js +1 -1
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.compiled.css +1 -0
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +163 -33
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +25 -18
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +3 -1
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +10 -5
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +6 -5
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +16 -4
- package/dist/cjs/view/InlineCard/common/action-button/index.js +61 -0
- package/dist/cjs/view/InlineCard/styled.js +5 -4
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +61 -0
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +1 -1
- package/dist/es2019/view/BlockCard/views/unresolved-view/index.js +1 -1
- package/dist/es2019/view/BlockCard/views/utils/withFlexibleUIBlockCardStyle.js +1 -1
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +1 -1
- package/dist/es2019/view/EmbedModal/components/link-info/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/es2019/view/FlexibleCard/components/container/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.compiled.css +5 -2
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.compiled.css +4 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/snippet-element/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +1 -1
- package/dist/es2019/view/HoverCard/components/ContentContainer.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +1 -1
- package/dist/es2019/view/HoverCard/components/views/resolving/index.compiled.css +5 -2
- package/dist/es2019/view/HoverCard/components/views/resolving/index.js +2 -2
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +1 -1
- package/dist/es2019/view/InlineCard/ErroredView/index.js +12 -5
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +34 -10
- package/dist/es2019/view/InlineCard/Frame/styled.compiled.css +3 -2
- package/dist/es2019/view/InlineCard/Frame/styled.js +8 -5
- package/dist/es2019/view/InlineCard/Icon.js +1 -1
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.compiled.css +1 -0
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +163 -33
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +24 -17
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +4 -2
- package/dist/es2019/view/InlineCard/ResolvingView/index.js +13 -8
- package/dist/es2019/view/InlineCard/ResolvingView/styled.js +6 -5
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +18 -6
- package/dist/es2019/view/InlineCard/common/action-button/index.js +50 -0
- package/dist/es2019/view/InlineCard/styled.js +4 -3
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +81 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/esm/view/BlockCard/views/UnauthorisedView.js +1 -1
- package/dist/esm/view/BlockCard/views/unresolved-view/index.js +1 -1
- package/dist/esm/view/BlockCard/views/utils/withFlexibleUIBlockCardStyle.js +1 -1
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +1 -1
- package/dist/esm/view/EmbedModal/components/link-info/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/container/index.compiled.css +5 -2
- package/dist/esm/view/FlexibleCard/components/container/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.compiled.css +5 -2
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +2 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.compiled.css +4 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-trigger/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/snippet-element/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +1 -1
- package/dist/esm/view/HoverCard/components/ContentContainer.js +1 -1
- package/dist/esm/view/HoverCard/components/views/forbidden/index.js +1 -1
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +1 -1
- package/dist/esm/view/HoverCard/components/views/resolving/index.compiled.css +5 -2
- package/dist/esm/view/HoverCard/components/views/resolving/index.js +2 -2
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +1 -1
- package/dist/esm/view/InlineCard/ErroredView/index.js +12 -5
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +34 -10
- package/dist/esm/view/InlineCard/Frame/styled.compiled.css +3 -2
- package/dist/esm/view/InlineCard/Frame/styled.js +8 -5
- package/dist/esm/view/InlineCard/Icon.js +1 -1
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.compiled.css +1 -0
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +163 -33
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +24 -17
- package/dist/esm/view/InlineCard/ResolvedView/index.js +4 -2
- package/dist/esm/view/InlineCard/ResolvingView/index.js +13 -8
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +6 -5
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +18 -6
- package/dist/esm/view/InlineCard/common/action-button/index.js +51 -0
- package/dist/esm/view/InlineCard/styled.js +4 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +1 -1
- package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +10 -2
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -8
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +1 -1
- package/dist/types/view/InlineCard/common/action-button/index.d.ts +19 -0
- package/dist/types/view/InlineCard/styled.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/index.d.ts +10 -2
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -8
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled.d.ts +1 -1
- package/dist/types-ts4.5/view/InlineCard/common/action-button/index.d.ts +19 -0
- package/dist/types-ts4.5/view/InlineCard/styled.d.ts +1 -1
- package/package.json +5 -2
|
@@ -8,18 +8,19 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { FormattedMessage } from 'react-intl-next';
|
|
11
|
-
import
|
|
11
|
+
import ButtonOld from '@atlaskit/button';
|
|
12
12
|
import ErrorIcon from '@atlaskit/icon/utility/migration/error';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
14
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
15
15
|
import { R300 } from '@atlaskit/theme/colors';
|
|
16
16
|
import { messages } from '../../../messages';
|
|
17
17
|
import { HoverCard } from '../../HoverCard';
|
|
18
|
+
import { ActionButton } from '../common/action-button';
|
|
18
19
|
import { Frame } from '../Frame';
|
|
19
20
|
import { AKIconWrapper } from '../Icon';
|
|
20
21
|
import { AKIconWrapper as AKIconWrapperOld } from '../Icon-emotion';
|
|
21
22
|
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
22
|
-
import {
|
|
23
|
+
import { IconStyledButtonOldVisualRefresh } from '../styled';
|
|
23
24
|
import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
|
|
24
25
|
import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
25
26
|
var iconWrapperStyles = xcss({
|
|
@@ -44,10 +45,16 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
44
45
|
});
|
|
45
46
|
_defineProperty(_this, "renderActionButton", function () {
|
|
46
47
|
var onRetry = _this.props.onRetry;
|
|
47
|
-
var
|
|
48
|
-
|
|
48
|
+
var Button = withFrameStyleControl(ButtonOld, _this.frameRef);
|
|
49
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
50
|
+
return onRetry && /*#__PURE__*/React.createElement(Button, {
|
|
51
|
+
component: ActionButton,
|
|
52
|
+
onClick: _this.handleRetry
|
|
53
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.try_again));
|
|
54
|
+
}
|
|
55
|
+
return onRetry && /*#__PURE__*/React.createElement(Button, {
|
|
49
56
|
spacing: "none",
|
|
50
|
-
component: fg('bandicoots-compiled-migration-smartcard') ?
|
|
57
|
+
component: fg('bandicoots-compiled-migration-smartcard') ? IconStyledButtonOldVisualRefresh : IconStyledButtonOld,
|
|
51
58
|
onClick: _this.handleRetry,
|
|
52
59
|
role: "button"
|
|
53
60
|
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.try_again));
|
|
@@ -9,21 +9,22 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
9
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { FormattedMessage } from 'react-intl-next';
|
|
12
|
-
import
|
|
12
|
+
import ButtonOld from '@atlaskit/button';
|
|
13
13
|
import LockLockedIcon from '@atlaskit/icon/core/lock-locked';
|
|
14
14
|
import LegacyLockIcon from '@atlaskit/icon/glyph/lock-filled';
|
|
15
15
|
import Lozenge from '@atlaskit/lozenge';
|
|
16
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
-
import { Box, xcss } from '@atlaskit/primitives';
|
|
17
|
+
import { Box, Pressable, xcss } from '@atlaskit/primitives';
|
|
18
18
|
import { N500, R400 } from '@atlaskit/theme/colors';
|
|
19
19
|
import { messages } from '../../../messages';
|
|
20
20
|
import { HoverCard } from '../../HoverCard';
|
|
21
|
+
import { ActionButton } from '../common/action-button';
|
|
21
22
|
import { Frame } from '../Frame';
|
|
22
23
|
import { AKIconWrapper } from '../Icon';
|
|
23
24
|
import { AKIconWrapper as AKIconWrapperOld } from '../Icon-emotion';
|
|
24
|
-
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
25
|
+
import { IconAndTitleLayout, LozengeWrapper as LozengeWrapperNew } from '../IconAndTitleLayout';
|
|
26
|
+
import { LozengeWrapperOldVisualRefresh } from '../IconAndTitleLayout/styled';
|
|
27
|
+
import { IconStyledButtonOldVisualRefresh } from '../styled';
|
|
27
28
|
import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
|
|
28
29
|
import withFrameStyleControl from '../utils/withFrameStyleControl';
|
|
29
30
|
var iconWrapperStyles = xcss({
|
|
@@ -105,20 +106,30 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
105
106
|
_defineProperty(_this, "renderActionButton", function () {
|
|
106
107
|
var _this$props$requestAc;
|
|
107
108
|
var onAuthorise = _this.props.onAuthorise;
|
|
108
|
-
var
|
|
109
|
+
var LozengeWrapper = fg('platform-linking-visual-refresh-v1') ? LozengeWrapperNew : LozengeWrapperOldVisualRefresh;
|
|
110
|
+
var Button = withFrameStyleControl(ButtonOld, _this.frameRef);
|
|
109
111
|
var accessType = (_this$props$requestAc = _this.props.requestAccessContext) === null || _this$props$requestAc === void 0 ? void 0 : _this$props$requestAc.accessType;
|
|
110
112
|
if (_this.state.hasRequestAccessContextMessage) {
|
|
111
113
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
112
|
-
|
|
114
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
115
|
+
var isDisabled = accessType === 'PENDING_REQUEST_EXISTS';
|
|
116
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
117
|
+
onClick: _this.handleRetry,
|
|
118
|
+
component: ActionButton,
|
|
119
|
+
testId: "button-connect-other-account",
|
|
120
|
+
isDisabled: isDisabled
|
|
121
|
+
}, _this.renderForbiddenAccessMessage());
|
|
122
|
+
}
|
|
123
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
113
124
|
spacing: "none",
|
|
114
125
|
onClick: _this.handleRetry,
|
|
115
|
-
component:
|
|
126
|
+
component: IconStyledButtonOldVisualRefresh,
|
|
116
127
|
testId: "button-connect-other-account",
|
|
117
128
|
role: "button",
|
|
118
129
|
isDisabled: accessType === 'PENDING_REQUEST_EXISTS'
|
|
119
130
|
}, _this.renderForbiddenAccessMessage());
|
|
120
131
|
} else {
|
|
121
|
-
return /*#__PURE__*/React.createElement(
|
|
132
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
122
133
|
spacing: "none",
|
|
123
134
|
onClick: _this.handleRetry,
|
|
124
135
|
component: IconStyledButtonOld,
|
|
@@ -129,6 +140,15 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
129
140
|
}
|
|
130
141
|
}
|
|
131
142
|
if (onAuthorise) {
|
|
143
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
144
|
+
return /*#__PURE__*/React.createElement(LozengeWrapper, null, /*#__PURE__*/React.createElement(Pressable, {
|
|
145
|
+
xcss: actionButtonLozengeStyle,
|
|
146
|
+
onClick: _this.handleRetry,
|
|
147
|
+
testId: "button-connect-other-account"
|
|
148
|
+
}, /*#__PURE__*/React.createElement(Lozenge, {
|
|
149
|
+
appearance: 'moved'
|
|
150
|
+
}, _this.renderForbiddenAccessMessage())));
|
|
151
|
+
}
|
|
132
152
|
return /*#__PURE__*/React.createElement(Button, {
|
|
133
153
|
spacing: "none",
|
|
134
154
|
onClick: _this.handleRetry,
|
|
@@ -175,4 +195,8 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
|
175
195
|
return content;
|
|
176
196
|
}
|
|
177
197
|
}]);
|
|
178
|
-
}(React.Component);
|
|
198
|
+
}(React.Component);
|
|
199
|
+
var actionButtonLozengeStyle = xcss({
|
|
200
|
+
backgroundColor: 'color.background.neutral.subtle',
|
|
201
|
+
padding: 'space.0'
|
|
202
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
._11c81doa{font:var(--ds-font-body-large,normal 400 1pc/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._19ith6cr{border:1px solid var(--ds-border,#dfe1e6)}
|
|
3
3
|
._1yt4x7n9{padding:var(--ds-space-025,2px) 0}
|
|
4
4
|
._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}
|
|
5
5
|
._v56415x0{transition:all .1s ease-in-out}
|
|
6
|
-
._1h6dmr28{border-color:var(--ds-border-accent-blue,#2684ff)}
|
|
6
|
+
._1h6dmr28{border-color:var(--ds-border-accent-blue,#2684ff)}
|
|
7
|
+
._12ji1r31{outline-color:currentColor}
|
|
7
8
|
._12y31o36{outline-width:medium}
|
|
8
9
|
._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
|
|
9
10
|
._16qscw00{box-shadow:0 0 0 2px var(--ds-border-selected,#4c9aff)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["truncateInline", "withoutBackground", "isHovered", "isInteractive", "isSelected", "href"],
|
|
@@ -6,6 +6,7 @@ var _excluded = ["truncateInline", "withoutBackground", "isHovered", "isInteract
|
|
|
6
6
|
import "./styled.compiled.css";
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import React, { forwardRef } from 'react';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
10
|
import { B100, B200, B400, B50, N40 } from '@atlaskit/theme/colors';
|
|
10
11
|
var lineHeight = 22;
|
|
11
12
|
export var WrapperSpan = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -19,7 +20,7 @@ export var WrapperSpan = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
19
20
|
return /*#__PURE__*/React.createElement("span", _extends({
|
|
20
21
|
ref: ref
|
|
21
22
|
}, props, {
|
|
22
|
-
className: ax(["_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv"])
|
|
23
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_11c81doa _1yt4x7n9 _2rkoiti9 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28" : "_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l", truncateInline && !fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv"])
|
|
23
24
|
}), props.children);
|
|
24
25
|
});
|
|
25
26
|
export var WrapperAnchor = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
@@ -34,10 +35,11 @@ export var WrapperAnchor = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
34
35
|
href: href,
|
|
35
36
|
ref: ref
|
|
36
37
|
}, props, {
|
|
37
|
-
className: ax(["_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg"])
|
|
38
|
+
className: ax([fg('platform-linking-visual-refresh-v1') ? "_11c81doa _1yt4x7n9 _2rkoiti9 _v56415x0 _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28" : "_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l", truncateInline && !fg('platform-linking-visual-refresh-v1') && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg"])
|
|
38
39
|
}), props.children);
|
|
39
40
|
});
|
|
40
|
-
var
|
|
41
|
+
var baseWrapperStylesNew = null;
|
|
42
|
+
var baseWrapperStylesOld = null;
|
|
41
43
|
|
|
42
44
|
// if the parent instruct the wrapper to be interactive, and the wrapper is in focus, apply selectedStyles
|
|
43
45
|
var interactiveStyles = null;
|
|
@@ -45,6 +47,7 @@ var hoveredStyles = null;
|
|
|
45
47
|
var hoveredWithBackgroundStyles = null;
|
|
46
48
|
var withoutBackgroundStyles = null;
|
|
47
49
|
var withBackgroundStyles = null;
|
|
48
|
-
var
|
|
50
|
+
var truncateStylesNew = null;
|
|
51
|
+
var truncateStylesOld = null;
|
|
49
52
|
var notSelectedStyle = null;
|
|
50
53
|
var selectedStyles = null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Icon.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* Icon.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["as", "style"],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
2
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
3
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
@@ -15,16 +15,18 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
15
15
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
16
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
17
17
|
import React from 'react';
|
|
18
|
+
import { di } from 'react-magnetic-di';
|
|
18
19
|
import ImageLoader from 'react-render-image';
|
|
19
20
|
import LinkIcon from '@atlaskit/icon/core/migration/link';
|
|
20
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
|
+
import { Box, xcss } from '@atlaskit/primitives';
|
|
21
23
|
import { B400, N200 } from '@atlaskit/theme/colors';
|
|
22
24
|
import { Icon, Shimmer } from '../Icon';
|
|
23
25
|
import { LinkAppearance as LinkAppearanceOld, NoLinkAppearance as NoLinkAppearanceOld } from '../styled-emotion';
|
|
24
|
-
import {
|
|
26
|
+
import { EmojiWrapperOldVisualRefresh, IconEmptyWrapperOldVisualRefresh, IconPositionWrapperOldVisualRefresh, IconTitleWrapperOldVisualRefresh, IconWrapperOldVisualRefresh, TitleWrapperClassNameOldVisualRefresh, TitleWrapperOldVisualRefresh } from './styled';
|
|
25
27
|
import { EmojiWrapper as EmojiWrapperOld, IconEmptyWrapper as IconEmptyWrapperOld, IconPositionWrapper as IconPositionWrapperOld, IconTitleWrapper as IconTitleWrapperOld, IconWrapper as IconWrapperOld, TitleWrapper as TitleWrapperOld } from './styled-emotion';
|
|
26
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
27
|
-
var
|
|
29
|
+
var NoLinkAppearanceOldVisualRefresh = forwardRef(function (_ref, __cmplr) {
|
|
28
30
|
var _ref$as = _ref.as,
|
|
29
31
|
C = _ref$as === void 0 ? "span" : _ref$as,
|
|
30
32
|
__cmpls = _ref.style,
|
|
@@ -38,7 +40,7 @@ var NoLinkAppearance = forwardRef(function (_ref, __cmplr) {
|
|
|
38
40
|
|
|
39
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
|
|
40
42
|
if (process.env.NODE_ENV !== 'production') {
|
|
41
|
-
|
|
43
|
+
NoLinkAppearanceOldVisualRefresh.displayName = 'NoLinkAppearanceOldVisualRefresh';
|
|
42
44
|
}
|
|
43
45
|
var LinkAppearance = forwardRef(function (_ref2, __cmplr) {
|
|
44
46
|
var _ref2$as = _ref2.as,
|
|
@@ -91,12 +93,26 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
91
93
|
icon = _this$props.icon,
|
|
92
94
|
emoji = _this$props.emoji;
|
|
93
95
|
if (emoji) {
|
|
94
|
-
|
|
96
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
97
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
98
|
+
as: "span",
|
|
99
|
+
xcss: iconWrapperStyle,
|
|
100
|
+
testId: "icon-position-emoji-wrapper"
|
|
101
|
+
}, emoji);
|
|
102
|
+
}
|
|
103
|
+
return fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(EmojiWrapperOldVisualRefresh, null, emoji) : /*#__PURE__*/React.createElement(EmojiWrapperOld, null, emoji);
|
|
95
104
|
}
|
|
96
105
|
if (!icon || typeof icon === 'string') {
|
|
97
106
|
return null;
|
|
98
107
|
}
|
|
99
|
-
|
|
108
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
109
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
110
|
+
as: "span",
|
|
111
|
+
xcss: iconWrapperStyle,
|
|
112
|
+
testId: "icon-atlaskit-icon-wrapper"
|
|
113
|
+
}, icon);
|
|
114
|
+
}
|
|
115
|
+
return fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, icon) : /*#__PURE__*/React.createElement(IconWrapperOld, null, icon);
|
|
100
116
|
}
|
|
101
117
|
}, {
|
|
102
118
|
key: "renderImageIcon",
|
|
@@ -105,6 +121,21 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
105
121
|
if (!url || typeof url !== 'string') {
|
|
106
122
|
return null;
|
|
107
123
|
}
|
|
124
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
125
|
+
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
126
|
+
src: url,
|
|
127
|
+
loaded: /*#__PURE__*/React.createElement("img", {
|
|
128
|
+
src: url,
|
|
129
|
+
"data-testid": "".concat(testId, "-image"),
|
|
130
|
+
alt: "",
|
|
131
|
+
className: ax(["_1bsb1osq"])
|
|
132
|
+
}),
|
|
133
|
+
errored: errored,
|
|
134
|
+
loading: /*#__PURE__*/React.createElement(Shimmer, {
|
|
135
|
+
testId: "".concat(testId, "-loading")
|
|
136
|
+
})
|
|
137
|
+
});
|
|
138
|
+
}
|
|
108
139
|
return /*#__PURE__*/React.createElement(ImageLoader, {
|
|
109
140
|
src: url,
|
|
110
141
|
loaded: /*#__PURE__*/React.createElement(Icon
|
|
@@ -124,10 +155,18 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
124
155
|
key: "renderIconPlaceholder",
|
|
125
156
|
value: function renderIconPlaceholder(testId) {
|
|
126
157
|
var defaultIcon = this.props.defaultIcon;
|
|
158
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
159
|
+
return defaultIcon || /*#__PURE__*/React.createElement(LinkIcon, {
|
|
160
|
+
label: "link",
|
|
161
|
+
LEGACY_size: "small",
|
|
162
|
+
testId: "".concat(testId, "-default"),
|
|
163
|
+
color: "currentColor"
|
|
164
|
+
});
|
|
165
|
+
}
|
|
127
166
|
if (defaultIcon) {
|
|
128
|
-
return /*#__PURE__*/React.createElement(
|
|
167
|
+
return /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, defaultIcon);
|
|
129
168
|
}
|
|
130
|
-
return /*#__PURE__*/React.createElement(
|
|
169
|
+
return /*#__PURE__*/React.createElement(IconWrapperOldVisualRefresh, null, /*#__PURE__*/React.createElement(LinkIcon, {
|
|
131
170
|
label: "link",
|
|
132
171
|
LEGACY_size: "small",
|
|
133
172
|
testId: "".concat(testId, "-default"),
|
|
@@ -147,6 +186,13 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
147
186
|
}
|
|
148
187
|
var placeholder = this.renderIconPlaceholder(testId);
|
|
149
188
|
var image = this.renderImageIcon(placeholder, testId);
|
|
189
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
190
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
191
|
+
as: "span",
|
|
192
|
+
xcss: iconWrapperStyle,
|
|
193
|
+
testId: "".concat(testId, "-image-wrapper")
|
|
194
|
+
}, image || placeholder);
|
|
195
|
+
}
|
|
150
196
|
return image || placeholder;
|
|
151
197
|
}
|
|
152
198
|
}, {
|
|
@@ -161,20 +207,32 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
161
207
|
rightSide = _this$props2.rightSide,
|
|
162
208
|
_this$props2$testId = _this$props2.testId,
|
|
163
209
|
testId = _this$props2$testId === void 0 ? 'inline-card-icon-and-title' : _this$props2$testId;
|
|
164
|
-
var titlePart = fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
210
|
+
var titlePart = fg('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(React.Fragment, null, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Box, {
|
|
211
|
+
as: "span",
|
|
212
|
+
xcss: iconOuterWrapperStyle,
|
|
213
|
+
testId: "icon-position-wrapper"
|
|
214
|
+
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
215
|
+
as: "span",
|
|
216
|
+
xcss: iconEmptyStyle,
|
|
217
|
+
testId: "icon-empty-wrapper"
|
|
218
|
+
}), this.renderIcon(testId))) : /*#__PURE__*/React.createElement(IconPositionWrapperOldVisualRefresh, {
|
|
165
219
|
"data-testid": "icon-position-wrapper"
|
|
166
|
-
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
220
|
+
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapperOldVisualRefresh, {
|
|
167
221
|
"data-testid": "icon-empty-wrapper"
|
|
168
|
-
}), this.renderIcon(testId))), /*#__PURE__*/React.createElement(
|
|
169
|
-
|
|
170
|
-
, {
|
|
222
|
+
}), this.renderIcon(testId))), fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(Box, _extends({
|
|
223
|
+
as: "span",
|
|
171
224
|
style: {
|
|
172
|
-
color: titleTextColor
|
|
225
|
+
color: this.props.titleTextColor
|
|
173
226
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
227
|
+
}, !fg('platform-linking-visual-refresh-v1') ? {
|
|
228
|
+
className: TitleWrapperClassNameOldVisualRefresh
|
|
229
|
+
} : {}), title) : /*#__PURE__*/React.createElement(TitleWrapperOldVisualRefresh, _extends({
|
|
230
|
+
style: {
|
|
231
|
+
color: this.props.titleTextColor
|
|
232
|
+
}
|
|
233
|
+
}, !fg('platform-linking-visual-refresh-v1') ? {
|
|
234
|
+
className: TitleWrapperClassNameOldVisualRefresh
|
|
235
|
+
} : {}), title)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconPositionWrapperOld, {
|
|
178
236
|
"data-testid": "icon-position-wrapper"
|
|
179
237
|
}, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapperOld, {
|
|
180
238
|
"data-testid": "icon-empty-wrapper"
|
|
@@ -186,23 +244,31 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
186
244
|
}
|
|
187
245
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
188
246
|
,
|
|
189
|
-
className:
|
|
247
|
+
className: TitleWrapperClassNameOldVisualRefresh
|
|
190
248
|
}, title));
|
|
191
249
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
192
|
-
return (
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
250
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, fg('platform-linking-visual-refresh-v1') ? /*#__PURE__*/React.createElement(IconTitleWrapper, {
|
|
251
|
+
style: {
|
|
252
|
+
color: this.props.titleColor
|
|
253
|
+
},
|
|
254
|
+
testId: testId
|
|
255
|
+
}, link ? /*#__PURE__*/React.createElement(LinkAppearance, {
|
|
256
|
+
href: link,
|
|
257
|
+
onClick: this.handleClick,
|
|
258
|
+
onKeyPress: this.handleKeyPress
|
|
259
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/React.createElement(Box, {
|
|
260
|
+
as: "span",
|
|
261
|
+
xcss: noLinkAppearanceStyle
|
|
262
|
+
}, rightSide) : null) : /*#__PURE__*/React.createElement(IconTitleWrapperOldVisualRefresh, {
|
|
263
|
+
style: {
|
|
264
|
+
color: this.props.titleColor
|
|
265
|
+
},
|
|
266
|
+
"data-testid": testId
|
|
267
|
+
}, link ? /*#__PURE__*/React.createElement(LinkAppearance, {
|
|
268
|
+
href: link,
|
|
269
|
+
onClick: this.handleClick,
|
|
270
|
+
onKeyPress: this.handleKeyPress
|
|
271
|
+
}, titlePart) : titlePart, rightSide ? /*#__PURE__*/React.createElement(NoLinkAppearanceOldVisualRefresh, null, rightSide) : null));
|
|
206
272
|
} else {
|
|
207
273
|
return (
|
|
208
274
|
/*#__PURE__*/
|
|
@@ -224,4 +290,68 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
224
290
|
}(React.Component);
|
|
225
291
|
_defineProperty(IconAndTitleLayout, "defaultProps", {
|
|
226
292
|
rightSideSpacer: true
|
|
293
|
+
});
|
|
294
|
+
export var IconTitleWrapper = function IconTitleWrapper(props) {
|
|
295
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
296
|
+
as: "span",
|
|
297
|
+
xcss: iconTitleWrapperStyle
|
|
298
|
+
}, props));
|
|
299
|
+
};
|
|
300
|
+
export var LozengeWrapper = function LozengeWrapper(props) {
|
|
301
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
302
|
+
as: "span",
|
|
303
|
+
xcss: lozengeWrapperStyle
|
|
304
|
+
}, /*#__PURE__*/React.createElement(Box, _extends({
|
|
305
|
+
xcss: lozengeInternalWrapperStyle
|
|
306
|
+
}, props)));
|
|
307
|
+
};
|
|
308
|
+
var lozengeInternalWrapperStyle = xcss({
|
|
309
|
+
paddingBottom: 'space.025'
|
|
310
|
+
});
|
|
311
|
+
var lozengeWrapperStyle = xcss({
|
|
312
|
+
display: 'inline-block',
|
|
313
|
+
verticalAlign: 'bottom',
|
|
314
|
+
marginTop: 'space.0',
|
|
315
|
+
marginRight: 'space.050',
|
|
316
|
+
marginBottom: 'space.0',
|
|
317
|
+
marginLeft: 'space.025'
|
|
318
|
+
});
|
|
319
|
+
var horizontalPadding = 'space.050';
|
|
320
|
+
var verticalPadding = 'space.025';
|
|
321
|
+
var iconWidth = '16px';
|
|
322
|
+
var iconEmptyStyle = xcss({
|
|
323
|
+
width: iconWidth,
|
|
324
|
+
display: 'inline-block',
|
|
325
|
+
opacity: 0
|
|
326
|
+
});
|
|
327
|
+
var iconOuterWrapperStyle = xcss({
|
|
328
|
+
marginRight: 'space.050',
|
|
329
|
+
display: 'inline-block',
|
|
330
|
+
position: 'relative'
|
|
331
|
+
});
|
|
332
|
+
var iconTitleWrapperStyle = xcss({
|
|
333
|
+
whiteSpace: 'pre-wrap',
|
|
334
|
+
wordBreak: 'break-all',
|
|
335
|
+
boxDecorationBreak: 'clone',
|
|
336
|
+
paddingTop: verticalPadding,
|
|
337
|
+
paddingRight: horizontalPadding,
|
|
338
|
+
paddingBottom: verticalPadding,
|
|
339
|
+
paddingLeft: horizontalPadding
|
|
340
|
+
});
|
|
341
|
+
var iconWrapperStyle = xcss({
|
|
342
|
+
position: 'absolute',
|
|
343
|
+
display: 'inline-flex',
|
|
344
|
+
alignItems: 'center',
|
|
345
|
+
boxSizing: 'border-box',
|
|
346
|
+
top: 'space.0',
|
|
347
|
+
left: 'space.0',
|
|
348
|
+
bottom: 'space.0',
|
|
349
|
+
width: iconWidth,
|
|
350
|
+
userSelect: 'none'
|
|
351
|
+
});
|
|
352
|
+
var iconImageStyle = null;
|
|
353
|
+
var noLinkAppearanceStyle = xcss({
|
|
354
|
+
color: 'color.text.subtlest',
|
|
355
|
+
font: 'font.body',
|
|
356
|
+
marginLeft: 'space.050'
|
|
227
357
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* styled.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* styled.tsx generated by @compiled/babel-plugin v0.36.0 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["as", "style"],
|
|
@@ -27,8 +27,9 @@ var IconObjectOverrides = "\n & > span {\n height: 16px;\n width: 16px;\n
|
|
|
27
27
|
// TODO: remove this override behaviour for @atlaskit/icon
|
|
28
28
|
var IconOverrides = "\n & > * > span {\n height: 16px;\n width: 16px;\n position: absolute;\n left: 0;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
|
|
29
29
|
|
|
30
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
30
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
31
|
-
export var
|
|
32
|
+
export var IconWrapperOldVisualRefresh = forwardRef(function (_ref, __cmplr) {
|
|
32
33
|
var _ref$as = _ref.as,
|
|
33
34
|
C = _ref$as === void 0 ? "span" : _ref$as,
|
|
34
35
|
__cmpls = _ref.style,
|
|
@@ -41,11 +42,12 @@ export var IconWrapper = forwardRef(function (_ref, __cmplr) {
|
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
// Wraps all emoji in Inline Links similar to icon
|
|
45
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
44
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
45
47
|
if (process.env.NODE_ENV !== 'production') {
|
|
46
|
-
|
|
48
|
+
IconWrapperOldVisualRefresh.displayName = 'IconWrapperOldVisualRefresh';
|
|
47
49
|
}
|
|
48
|
-
export var
|
|
50
|
+
export var EmojiWrapperOldVisualRefresh = forwardRef(function (_ref2, __cmplr) {
|
|
49
51
|
var _ref2$as = _ref2.as,
|
|
50
52
|
C = _ref2$as === void 0 ? "span" : _ref2$as,
|
|
51
53
|
__cmpls = _ref2.style,
|
|
@@ -60,11 +62,12 @@ export var EmojiWrapper = forwardRef(function (_ref2, __cmplr) {
|
|
|
60
62
|
// The main 'wrapping' element, title of the content.
|
|
61
63
|
// NB: `white-space` adds little whitespace before wrapping.
|
|
62
64
|
// NB: `word-break` line breaks as soon as an overflow takes place.
|
|
65
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
63
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
64
67
|
if (process.env.NODE_ENV !== 'production') {
|
|
65
|
-
|
|
68
|
+
EmojiWrapperOldVisualRefresh.displayName = 'EmojiWrapperOldVisualRefresh';
|
|
66
69
|
}
|
|
67
|
-
export var
|
|
70
|
+
export var IconTitleWrapperOldVisualRefresh = forwardRef(function (_ref3, __cmplr) {
|
|
68
71
|
var _ref3$as = _ref3.as,
|
|
69
72
|
C = _ref3$as === void 0 ? "span" : _ref3$as,
|
|
70
73
|
__cmpls = _ref3.style,
|
|
@@ -76,12 +79,12 @@ export var IconTitleWrapper = forwardRef(function (_ref3, __cmplr) {
|
|
|
76
79
|
}));
|
|
77
80
|
});
|
|
78
81
|
|
|
79
|
-
// TODO
|
|
82
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
80
83
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
81
84
|
if (process.env.NODE_ENV !== 'production') {
|
|
82
|
-
|
|
85
|
+
IconTitleWrapperOldVisualRefresh.displayName = 'IconTitleWrapperOldVisualRefresh';
|
|
83
86
|
}
|
|
84
|
-
export var
|
|
87
|
+
export var LozengeWrapperOldVisualRefresh = forwardRef(function (_ref4, __cmplr) {
|
|
85
88
|
var _ref4$as = _ref4.as,
|
|
86
89
|
C = _ref4$as === void 0 ? "span" : _ref4$as,
|
|
87
90
|
__cmpls = _ref4.style,
|
|
@@ -95,7 +98,7 @@ export var LozengeWrapper = forwardRef(function (_ref4, __cmplr) {
|
|
|
95
98
|
|
|
96
99
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
97
100
|
if (process.env.NODE_ENV !== 'production') {
|
|
98
|
-
|
|
101
|
+
LozengeWrapperOldVisualRefresh.displayName = 'LozengeWrapperOldVisualRefresh';
|
|
99
102
|
}
|
|
100
103
|
export var RightIconPositionWrapper = forwardRef(function (_ref5, __cmplr) {
|
|
101
104
|
var _ref5$as = _ref5.as,
|
|
@@ -112,11 +115,12 @@ export var RightIconPositionWrapper = forwardRef(function (_ref5, __cmplr) {
|
|
|
112
115
|
// The following components are used to absolutely position icons in the vertical center.
|
|
113
116
|
// - IconPositionWrapper: the `relative` parent which has no height in itself.
|
|
114
117
|
// - IconEmptyWrapper: the child which forces `IconPositionWrapper` to have a height.
|
|
118
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
115
119
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
116
120
|
if (process.env.NODE_ENV !== 'production') {
|
|
117
121
|
RightIconPositionWrapper.displayName = 'RightIconPositionWrapper';
|
|
118
122
|
}
|
|
119
|
-
export var
|
|
123
|
+
export var IconPositionWrapperOldVisualRefresh = forwardRef(function (_ref6, __cmplr) {
|
|
120
124
|
var _ref6$as = _ref6.as,
|
|
121
125
|
C = _ref6$as === void 0 ? "span" : _ref6$as,
|
|
122
126
|
__cmpls = _ref6.style,
|
|
@@ -128,11 +132,12 @@ export var IconPositionWrapper = forwardRef(function (_ref6, __cmplr) {
|
|
|
128
132
|
}));
|
|
129
133
|
});
|
|
130
134
|
|
|
135
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
131
136
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
132
137
|
if (process.env.NODE_ENV !== 'production') {
|
|
133
|
-
|
|
138
|
+
IconPositionWrapperOldVisualRefresh.displayName = 'IconPositionWrapperOldVisualRefresh';
|
|
134
139
|
}
|
|
135
|
-
export var
|
|
140
|
+
export var IconEmptyWrapperOldVisualRefresh = forwardRef(function (_ref7, __cmplr) {
|
|
136
141
|
var _ref7$as = _ref7.as,
|
|
137
142
|
C = _ref7$as === void 0 ? "span" : _ref7$as,
|
|
138
143
|
__cmpls = _ref7.style,
|
|
@@ -145,14 +150,16 @@ export var IconEmptyWrapper = forwardRef(function (_ref7, __cmplr) {
|
|
|
145
150
|
});
|
|
146
151
|
|
|
147
152
|
// With emotion it's not possible to use reference to `TitleWrapper` as part of a selector,
|
|
153
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
148
154
|
// To achieve same result we use classname instead.
|
|
149
155
|
if (process.env.NODE_ENV !== 'production') {
|
|
150
|
-
|
|
156
|
+
IconEmptyWrapperOldVisualRefresh.displayName = 'IconEmptyWrapperOldVisualRefresh';
|
|
151
157
|
}
|
|
152
|
-
export var
|
|
158
|
+
export var TitleWrapperClassNameOldVisualRefresh = 'smart-link-title-wrapper';
|
|
153
159
|
|
|
160
|
+
// TODO Delete when cleaning platform-linking-visual-refresh-v1
|
|
154
161
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-empty-styled-expression -- Ignored via go/DSP-18766
|
|
155
|
-
export var
|
|
162
|
+
export var TitleWrapperOldVisualRefresh = forwardRef(function (_ref8, __cmplr) {
|
|
156
163
|
var _ref8$as = _ref8.as,
|
|
157
164
|
C = _ref8$as === void 0 ? "span" : _ref8$as,
|
|
158
165
|
__cmpls = _ref8.style,
|
|
@@ -164,5 +171,5 @@ export var TitleWrapper = forwardRef(function (_ref8, __cmplr) {
|
|
|
164
171
|
}));
|
|
165
172
|
});
|
|
166
173
|
if (process.env.NODE_ENV !== 'production') {
|
|
167
|
-
|
|
174
|
+
TitleWrapperOldVisualRefresh.displayName = 'TitleWrapperOldVisualRefresh';
|
|
168
175
|
}
|
|
@@ -7,10 +7,11 @@ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstruct
|
|
|
7
7
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import Lozenge from '@atlaskit/lozenge';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { HoverCard } from '../../HoverCard';
|
|
11
12
|
import { Frame } from '../Frame';
|
|
12
|
-
import { IconAndTitleLayout } from '../IconAndTitleLayout';
|
|
13
|
-
import {
|
|
13
|
+
import { IconAndTitleLayout, LozengeWrapper as LozengeWrapperNew } from '../IconAndTitleLayout';
|
|
14
|
+
import { LozengeWrapperOldVisualRefresh } from '../IconAndTitleLayout/styled';
|
|
14
15
|
export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
15
16
|
function InlineCardResolvedView() {
|
|
16
17
|
_classCallCheck(this, InlineCardResolvedView);
|
|
@@ -25,6 +26,7 @@ export var InlineCardResolvedView = /*#__PURE__*/function (_React$Component) {
|
|
|
25
26
|
return null;
|
|
26
27
|
}
|
|
27
28
|
var appearance = lozenge.appearance || 'default';
|
|
29
|
+
var LozengeWrapper = fg('platform-linking-visual-refresh-v1') ? LozengeWrapperNew : LozengeWrapperOldVisualRefresh;
|
|
28
30
|
return /*#__PURE__*/React.createElement(LozengeWrapper, null, /*#__PURE__*/React.createElement(Lozenge, {
|
|
29
31
|
testId: "inline-card-resolved-view-lozenge",
|
|
30
32
|
appearance: appearance
|