@atlaskit/smart-card 34.10.12 → 34.10.13
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 +9 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/ActionOld.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +138 -5
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.compiled.css +0 -1
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +7 -4
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +2 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +6 -4
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +22 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +4 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-footer-block/resolved/index.js +5 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.compiled.css +14 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +14 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.compiled.css +9 -10
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +24 -15
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +13 -7
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.compiled.css +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/common/with-override-css/index.js +25 -0
- package/dist/cjs/view/FlexibleCard/components/container/index.js +5 -5
- package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +6 -4
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.compiled.css +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +9 -8
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.compiled.css +9 -0
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +78 -10
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.compiled.css +2 -1
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +5 -4
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +6 -4
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.compiled.css +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-summary/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/ActionOld.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +127 -3
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.compiled.css +0 -1
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +7 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +6 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +22 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +5 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-footer-block/resolved/index.js +5 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.compiled.css +14 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +15 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.compiled.css +9 -10
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +24 -15
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +13 -7
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.compiled.css +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +4 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/common/with-override-css/index.js +15 -0
- package/dist/es2019/view/FlexibleCard/components/container/index.js +5 -5
- package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +7 -4
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.compiled.css +2 -1
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +11 -8
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.compiled.css +9 -0
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +75 -9
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.compiled.css +2 -1
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +6 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +7 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.compiled.css +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +2 -2
- package/dist/es2019/view/FlexibleCard/components/elements/snippet-element/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/snippet-element/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-summary/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/ActionOld.js +2 -2
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +139 -6
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.compiled.css +0 -1
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +7 -4
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +6 -4
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +22 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +5 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-footer-block/resolved/index.js +5 -2
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.compiled.css +14 -1
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +15 -3
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.compiled.css +9 -10
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +24 -15
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +13 -7
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.compiled.css +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +9 -3
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +1 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/common/with-override-css/index.js +15 -0
- package/dist/esm/view/FlexibleCard/components/container/index.js +5 -5
- package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +6 -4
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.compiled.css +2 -1
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +9 -8
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.compiled.css +9 -0
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +75 -10
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.compiled.css +2 -1
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +5 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +6 -4
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.compiled.css +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/index.js +2 -2
- package/dist/esm/view/FlexibleCard/components/elements/snippet-element/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/snippet-element/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/text/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-summary/index.js +1 -1
- package/dist/types/view/FlexibleCard/components/actions/action/action-button/types.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/common/with-override-css/index.d.ts +6 -0
- package/dist/types/view/FlexibleCard/components/elements/badge/types.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/types.d.ts +3 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/common/with-override-css/index.d.ts +6 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/badge/types.d.ts +4 -0
- package/package.json +3 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +0 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +0 -1
- package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.compiled.css +0 -1
|
@@ -20,16 +20,17 @@ var baseStyleBySizeOld = {
|
|
|
20
20
|
small: "_zulppdf9 _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _vwz41j6v"
|
|
21
21
|
};
|
|
22
22
|
var baseStyleBySize = {
|
|
23
|
-
xlarge: "_zulpv47k _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf
|
|
24
|
-
large: "_zulppxbi _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf
|
|
25
|
-
medium: "_zulpu2gc _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf
|
|
26
|
-
small: "_zulp1b66 _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf
|
|
23
|
+
xlarge: "_zulpv47k _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
|
|
24
|
+
large: "_zulppxbi _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
|
|
25
|
+
medium: "_zulpu2gc _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
|
|
26
|
+
small: "_zulp1b66 _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf"
|
|
27
27
|
};
|
|
28
28
|
var baseStyleByDirection = {
|
|
29
29
|
horizontal: "_2lx2vrvc _4cvr1h6o",
|
|
30
30
|
vertical: "_2lx21bp4 _4cvr1y6m"
|
|
31
31
|
};
|
|
32
|
-
var
|
|
32
|
+
var baseStyleOld = null;
|
|
33
|
+
var baseStyles = null;
|
|
33
34
|
var widthStyle = {
|
|
34
35
|
flexible: "_16jlkb7n _1o9z11wp _i0dlf1ug",
|
|
35
36
|
'fit-to-content': ""
|
|
@@ -39,23 +40,31 @@ var positionStyle = {
|
|
|
39
40
|
center: ""
|
|
40
41
|
};
|
|
41
42
|
var horizontalStyleBase = null;
|
|
42
|
-
|
|
43
|
+
|
|
44
|
+
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
45
|
+
var horizontalStyleByHeightOld = {
|
|
43
46
|
xlarge: "_1e0ccj1k _102k1m1q",
|
|
44
47
|
large: "_1e0ccj1k _102k1m1q",
|
|
45
48
|
medium: "_1e0ccj1k _102k1k8s",
|
|
46
49
|
small: "_1e0ccj1k _102k1k8s"
|
|
47
50
|
};
|
|
51
|
+
var horizontalStyleByHeight = {
|
|
52
|
+
xlarge: "_1e0ccj1k _102k125z",
|
|
53
|
+
large: "_1e0ccj1k _102k125z",
|
|
54
|
+
medium: "_1e0ccj1k _102kz42d",
|
|
55
|
+
small: "_1e0ccj1k _102kz42d"
|
|
56
|
+
};
|
|
48
57
|
var gapStylesLeft = {
|
|
49
|
-
xlarge: "
|
|
50
|
-
large: "
|
|
51
|
-
medium: "
|
|
52
|
-
small: "
|
|
58
|
+
xlarge: "_7yhbv47k _m6ukidpf",
|
|
59
|
+
large: "_7yhbpxbi _m6ukidpf",
|
|
60
|
+
medium: "_7yhbu2gc _m6ukidpf",
|
|
61
|
+
small: "_7yhb1b66 _m6ukidpf"
|
|
53
62
|
};
|
|
54
63
|
var gapStylesRight = {
|
|
55
|
-
xlarge: "
|
|
56
|
-
large: "
|
|
57
|
-
medium: "
|
|
58
|
-
small: "
|
|
64
|
+
xlarge: "_24rcv47k _3dveidpf",
|
|
65
|
+
large: "_24rcpxbi _3dveidpf",
|
|
66
|
+
medium: "_24rcu2gc _3dveidpf",
|
|
67
|
+
small: "_24rc1b66 _3dveidpf"
|
|
59
68
|
};
|
|
60
69
|
var minWidthStyle = null;
|
|
61
70
|
|
|
@@ -87,7 +96,7 @@ var ElementGroupNew = function ElementGroupNew(_ref) {
|
|
|
87
96
|
"data-testid": testId
|
|
88
97
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
89
98
|
,
|
|
90
|
-
className: ax([fg('platform-linking-visual-refresh-v1')
|
|
99
|
+
className: ax([!fg('platform-linking-visual-refresh-v1') && baseStyleBySizeOld[size], fg('platform-linking-visual-refresh-v1') && baseStyleBySize[size], baseStyleByDirection[direction], !fg('platform-linking-visual-refresh-v1') && "_fiawglyw _1ouwidpf _f6ju1ns9", fg('platform-linking-visual-refresh-v1') && "_fiawglyw", alignmentStyleMap[align], "_1ul99by0", widthStyle[width], isHorizontal && "_1reo15vq _18m915vq _1e0c1ule _s7n4nkob _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54 _1aaynkob _15tynkob _1iu61nu9 _166k1nu9 _1div1nu9 _bmfb1nu9", isHorizontal && !fg('platform-linking-visual-refresh-v1') && horizontalStyleByHeightOld[size], isHorizontal && fg('platform-linking-visual-refresh-v1') && horizontalStyleByHeight[size], isHorizontal && align === SmartLinkAlignment.Left && gapStylesLeft[size], isHorizontal && align === SmartLinkAlignment.Right && gapStylesRight[size], positionStyle[position], className])
|
|
91
100
|
}, renderChildren(children, size));
|
|
92
101
|
};
|
|
93
102
|
var ElementGroup = function ElementGroup(props) {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
-
import "./index.compiled.css";
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
5
|
import { useCallback, useMemo } from 'react';
|
|
@@ -13,6 +12,7 @@ import Block from '../../block';
|
|
|
13
12
|
import ElementGroup from '../../element-group';
|
|
14
13
|
import { filterActionItems } from '../../utils';
|
|
15
14
|
import FooterBlockResolvedViewOld from './FooterBlockResolvedViewOld';
|
|
15
|
+
var actionGroupStylesOld = null;
|
|
16
16
|
var actionGroupStyles = null;
|
|
17
17
|
var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
18
18
|
var actions = props.actions,
|
|
@@ -35,15 +35,21 @@ var FooterBlockResolvedView = function FooterBlockResolvedView(props) {
|
|
|
35
35
|
}, [onActionMenuOpenChange]);
|
|
36
36
|
return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
|
|
37
37
|
testId: "".concat(testId, "-resolved-view")
|
|
38
|
-
}), !hideProvider && /*#__PURE__*/React.createElement(Provider, {
|
|
38
|
+
}), !hideProvider && /*#__PURE__*/React.createElement(Provider, _extends({}, fg('platform-linking-visual-refresh-v1') ? {
|
|
39
|
+
appearance: 'subtle'
|
|
40
|
+
} : {}, {
|
|
39
41
|
testId: "".concat(testId, "-provider")
|
|
40
|
-
}), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup, {
|
|
42
|
+
})), actions && hasActions ? /*#__PURE__*/React.createElement(ElementGroup, _extends({
|
|
41
43
|
testId: "smart-element-group-actions",
|
|
42
44
|
align: SmartLinkAlignment.Right,
|
|
43
|
-
direction: SmartLinkDirection.Horizontal
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
45
|
+
direction: SmartLinkDirection.Horizontal
|
|
46
|
+
}, fg('platform-linking-visual-refresh-v1') ? {
|
|
47
|
+
css: size === SmartLinkSize.XLarge && actionGroupStyles
|
|
48
|
+
} : {
|
|
49
|
+
css: size === SmartLinkSize.XLarge && actionGroupStylesOld
|
|
50
|
+
}, {
|
|
51
|
+
width: SmartLinkWidth.Flexible
|
|
52
|
+
}), /*#__PURE__*/React.createElement(ActionGroup, {
|
|
47
53
|
onDropdownOpenChange: onDropdownOpenChange,
|
|
48
54
|
items: actions,
|
|
49
55
|
appearance: "default",
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
._sudp1e54{-webkit-box-orient:vertical}
|
|
9
9
|
._vwz41k8s{line-height:1.5rem}
|
|
10
10
|
._vwz41m1q{line-height:1.75rem}
|
|
11
|
-
@supports not (-webkit-line-clamp:1){._102k1k7u{max-height:3.5rem}._102k1wto{max-height:3rem}}
|
|
11
|
+
@supports not (-webkit-line-clamp:1){._102k1k7u{max-height:3.5rem}._102k1wto{max-height:3rem}._102k8vuz{max-height:56px}._102kckbl{max-height:3pc}}
|
|
@@ -20,12 +20,18 @@ var truncateStyles = {
|
|
|
20
20
|
'1': "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54",
|
|
21
21
|
'2': "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjcs5v _sudp1e54"
|
|
22
22
|
};
|
|
23
|
-
var
|
|
23
|
+
var sizeStylesOld = {
|
|
24
24
|
xlarge: "_vwz41m1q _102k1k7u",
|
|
25
25
|
large: "_vwz41m1q _102k1k7u",
|
|
26
26
|
medium: "_vwz41k8s _102k1wto",
|
|
27
27
|
small: "_vwz41k8s _102k1wto"
|
|
28
28
|
};
|
|
29
|
+
var sizeStyles = {
|
|
30
|
+
xlarge: "_102k8vuz",
|
|
31
|
+
large: "_102k8vuz",
|
|
32
|
+
medium: "_102kckbl",
|
|
33
|
+
small: "_102kckbl"
|
|
34
|
+
};
|
|
29
35
|
var getMaxLines = function getMaxLines(maxLines) {
|
|
30
36
|
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
31
37
|
return DEFAULT_MAX_LINES;
|
|
@@ -70,13 +76,13 @@ var MetadataBlock = function MetadataBlock(_ref) {
|
|
|
70
76
|
direction: SmartLinkDirection.Horizontal,
|
|
71
77
|
width: SmartLinkWidth.Flexible,
|
|
72
78
|
size: size,
|
|
73
|
-
className: ax([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
79
|
+
className: ax([truncateStyles[maxLinesTotal], !fg('platform-linking-visual-refresh-v1') && sizeStylesOld[size], fg('platform-linking-visual-refresh-v1') && sizeStyles[size]])
|
|
74
80
|
}, primaryElements), secondaryElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
75
81
|
align: SmartLinkAlignment.Right,
|
|
76
82
|
direction: SmartLinkDirection.Horizontal,
|
|
77
83
|
width: SmartLinkWidth.Flexible,
|
|
78
84
|
size: size,
|
|
79
|
-
className: ax([truncateStyles[maxLinesTotal], sizeStyles[size]])
|
|
85
|
+
className: ax([truncateStyles[maxLinesTotal], !fg('platform-linking-visual-refresh-v1') && sizeStylesOld[size], fg('platform-linking-visual-refresh-v1') && sizeStyles[size]])
|
|
80
86
|
}, secondaryElements));
|
|
81
87
|
};
|
|
82
88
|
var MetadataBlockExported = function MetadataBlockExported(props) {
|
|
@@ -34,14 +34,13 @@ var PreviewBlockResolvedViewNew = function PreviewBlockResolvedViewNew(_ref) {
|
|
|
34
34
|
style = _ref.style,
|
|
35
35
|
className = _ref.className,
|
|
36
36
|
blockProps = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
-
// const [styles, setStyles] = useState<SerializedStyles | undefined>(overrideCss);
|
|
38
37
|
var _useState = useState(style !== null && style !== void 0 ? style : {}),
|
|
39
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
40
39
|
dynamicStyles = _useState2[0],
|
|
41
40
|
setDynamicStyles = _useState2[1];
|
|
42
41
|
var updateStyles = useCallback(function () {
|
|
43
42
|
if (placement === MediaPlacement.Left || placement === MediaPlacement.Right) {
|
|
44
|
-
var containerPadding = ignoreContainerPadding ? '0rem' : 'var(--container-padding)';
|
|
43
|
+
var containerPadding = ignoreContainerPadding ? fg('platform-linking-visual-refresh-v1') ? '0px' : '0rem' : 'var(--container-padding)';
|
|
45
44
|
var newStyle = _objectSpread(_objectSpread(_objectSpread({}, style), {}, {
|
|
46
45
|
position: 'absolute',
|
|
47
46
|
top: containerPadding,
|
|
@@ -83,11 +83,13 @@ var TitleBlockNew = function TitleBlockNew(_ref) {
|
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}, [onActionMenuOpenChange]);
|
|
86
|
-
var actionGroup = actions.length > 0 && /*#__PURE__*/React.createElement(ActionGroup, {
|
|
86
|
+
var actionGroup = actions.length > 0 && /*#__PURE__*/React.createElement(ActionGroup, _extends({}, fg('platform-linking-visual-refresh-v1') && {
|
|
87
|
+
appearance: 'default'
|
|
88
|
+
}, {
|
|
87
89
|
items: actions,
|
|
88
90
|
visibleButtonsNum: showActionOnHover ? 1 : 2,
|
|
89
91
|
onDropdownOpenChange: onDropdownOpenChange
|
|
90
|
-
});
|
|
92
|
+
}));
|
|
91
93
|
var overrideText = !!text ? {
|
|
92
94
|
text: text
|
|
93
95
|
} : {};
|
package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
@@ -47,7 +47,7 @@ var TitleBlockResolvedViewNew = function TitleBlockResolvedViewNew(_ref) {
|
|
|
47
47
|
direction: SmartLinkDirection.Vertical,
|
|
48
48
|
width: SmartLinkWidth.Flexible,
|
|
49
49
|
size: blockProps.size,
|
|
50
|
-
className: ax(["
|
|
50
|
+
className: ax(["_zulp1b66"])
|
|
51
51
|
}, title, subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
52
52
|
direction: SmartLinkDirection.Horizontal
|
|
53
53
|
}, subtitleElements)), metadataElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { useEffect, useRef } from 'react';
|
|
3
|
+
export function withOverrideCss(Component) {
|
|
4
|
+
return function (props) {
|
|
5
|
+
var ref = useRef(null);
|
|
6
|
+
useEffect(function () {
|
|
7
|
+
if (props !== null && props !== void 0 && props.className && ref.current) {
|
|
8
|
+
ref.current.className = "".concat(ref.current.className, " ").concat(props.className);
|
|
9
|
+
}
|
|
10
|
+
}, [props === null || props === void 0 ? void 0 : props.className]);
|
|
11
|
+
return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
|
|
12
|
+
ref: ref
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -182,14 +182,14 @@ var getGap = function getGap(size) {
|
|
|
182
182
|
if (fg('platform-linking-visual-refresh-v1')) {
|
|
183
183
|
switch (size) {
|
|
184
184
|
case SmartLinkSize.XLarge:
|
|
185
|
-
return "var(--ds-space-250,
|
|
185
|
+
return "var(--ds-space-250, 20px)";
|
|
186
186
|
case SmartLinkSize.Large:
|
|
187
|
-
return "var(--ds-space-200,
|
|
187
|
+
return "var(--ds-space-200, 16px)";
|
|
188
188
|
case SmartLinkSize.Medium:
|
|
189
|
-
return "var(--ds-space-100,
|
|
189
|
+
return "var(--ds-space-100, 8px)";
|
|
190
190
|
case SmartLinkSize.Small:
|
|
191
191
|
default:
|
|
192
|
-
return "var(--ds-space-050,
|
|
192
|
+
return "var(--ds-space-050, 4px)";
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
switch (size) {
|
|
@@ -264,7 +264,7 @@ var ContainerNew = function ContainerNew(_ref5) {
|
|
|
264
264
|
testId = _ref5$testId === void 0 ? 'smart-links-container' : _ref5$testId,
|
|
265
265
|
_ref5$theme = _ref5.theme,
|
|
266
266
|
theme = _ref5$theme === void 0 ? SmartLinkTheme.Link : _ref5$theme;
|
|
267
|
-
var padding = hidePadding ? '0rem' : getPadding(size);
|
|
267
|
+
var padding = hidePadding ? fg('platform-linking-visual-refresh-v1') ? '0px' : '0rem' : getPadding(size);
|
|
268
268
|
var gap = getGap(size);
|
|
269
269
|
var context = useContext(FlexibleUiContext);
|
|
270
270
|
var _getChildrenOptions = getChildrenOptions(children, context),
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
4
|
import "./index.compiled.css";
|
|
3
5
|
import * as React from 'react';
|
|
4
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
7
|
import AKBadge from '@atlaskit/badge';
|
|
6
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
9
|
import AtlaskitBadgeOld from './AtlaskitBadgeOld';
|
|
10
|
+
var badgeStylesOld = null;
|
|
8
11
|
var badgeStyles = null;
|
|
9
12
|
|
|
10
13
|
/**
|
|
@@ -22,15 +25,14 @@ var AtlaskitBadgeNew = function AtlaskitBadgeNew(_ref) {
|
|
|
22
25
|
if (!value) {
|
|
23
26
|
return null;
|
|
24
27
|
}
|
|
25
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
26
|
-
"data-fit-to-content": true,
|
|
28
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, fg('platform-linking-visual-refresh-v1') ? {} : _defineProperty({}, 'data-fit-to-content', true), {
|
|
27
29
|
"data-smart-element": name,
|
|
28
30
|
"data-smart-element-atlaskit-badge": true,
|
|
29
31
|
"data-testid": testId
|
|
30
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
31
33
|
,
|
|
32
|
-
className: ax(["_4cvr1h6o _1e0c116y", className])
|
|
33
|
-
}, /*#__PURE__*/React.createElement(AKBadge, null, value));
|
|
34
|
+
className: ax([!fg('platform-linking-visual-refresh-v1') && "_4cvr1h6o _1e0c116y", fg('platform-linking-visual-refresh-v1') && "_4cvr1h6o _1e0c116y _1ul91ns9", className])
|
|
35
|
+
}), /*#__PURE__*/React.createElement(AKBadge, null, value));
|
|
34
36
|
};
|
|
35
37
|
var AtlaskitBadge = function AtlaskitBadge(props) {
|
|
36
38
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
._102oidpf ul{margin-top:0}
|
|
2
2
|
._1e0c116y{display:inline-flex}
|
|
3
|
-
.
|
|
3
|
+
._1kvxu2gc ul{margin-right:var(--ds-space-100,8px)}
|
|
4
|
+
._1ul91ns9{min-width:-moz-fit-content;min-width:fit-content}
|
|
4
5
|
._6fu61k92 li span, ._1rrq1k92 li svg{max-height:1.25rem}
|
|
5
6
|
._udwj1k92 li span, ._10pr1k92 li svg{max-width:1.25rem}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
4
|
import "./index.compiled.css";
|
|
4
5
|
import * as React from 'react';
|
|
@@ -14,11 +15,12 @@ import { messages } from '../../../../../messages';
|
|
|
14
15
|
import { getFormattedMessageAsString } from '../../utils';
|
|
15
16
|
import AvatarGroupOld from './AvatarGroupOld';
|
|
16
17
|
var MAX_COUNT = 4;
|
|
18
|
+
var styles = null;
|
|
17
19
|
var stylesMap = {
|
|
18
|
-
xlarge: "_1e0c116y
|
|
19
|
-
large: "_1e0c116y
|
|
20
|
-
medium: "_1e0c116y
|
|
21
|
-
small: "_1e0c116y
|
|
20
|
+
xlarge: "_1e0c116y _1kvxu2gc _102oidpf",
|
|
21
|
+
large: "_1e0c116y _1kvxu2gc _102oidpf",
|
|
22
|
+
medium: "_1e0c116y _1kvxu2gc _102oidpf _6fu61k92 _1rrq1k92 _udwj1k92 _10pr1k92",
|
|
23
|
+
small: "_1e0c116y _1kvxu2gc _102oidpf _6fu61k92 _1rrq1k92 _udwj1k92 _10pr1k92"
|
|
22
24
|
};
|
|
23
25
|
var getPersonNameWithPrefix = function getPersonNameWithPrefix(elementName, personName, intl) {
|
|
24
26
|
switch (elementName) {
|
|
@@ -81,15 +83,14 @@ var AvatarGroupNew = function AvatarGroupNew(_ref) {
|
|
|
81
83
|
if (!data.length) {
|
|
82
84
|
return null;
|
|
83
85
|
}
|
|
84
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
85
|
-
"data-fit-to-content": true,
|
|
86
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, fg('platform-linking-visual-refresh-v1') ? {} : _defineProperty({}, 'data-fit-to-content', true), {
|
|
86
87
|
"data-smart-element": name,
|
|
87
88
|
"data-smart-element-avatar-group": true,
|
|
88
89
|
"data-testid": testId
|
|
89
90
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
90
91
|
,
|
|
91
|
-
className: ax([stylesMap[size], className])
|
|
92
|
-
}, /*#__PURE__*/React.createElement(AtlaskitAvatarGroup, {
|
|
92
|
+
className: ax([stylesMap[size], fg('platform-linking-visual-refresh-v1') && "_1ul91ns9", className])
|
|
93
|
+
}), /*#__PURE__*/React.createElement(AtlaskitAvatarGroup, {
|
|
93
94
|
maxCount: maxCount,
|
|
94
95
|
appearance: "stack",
|
|
95
96
|
size: "small",
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
._11c81vlj{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
|
|
2
2
|
._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)}
|
|
3
|
+
._zulp1b66{gap:var(--ds-space-050,4px)}
|
|
3
4
|
._16jlidpf{flex-grow:0}
|
|
4
5
|
._19bv1xvx{padding-left:var(--ds-space-025,.125rem)}
|
|
6
|
+
._19bvze3t, ._1xr1ze3t img, ._9n9oze3t span, ._7wy9ze3t svg{padding-left:var(--ds-space-0,0)}
|
|
5
7
|
._19l31j6v img, ._1pr21j6v span, ._1u5t1j6v svg{max-height:1rem}
|
|
6
8
|
._1bsb1j6v{width:1rem}
|
|
9
|
+
._1bsb7vkz, ._mezj7vkz img, ._e2oo7vkz span, ._w8l57vkz svg{width:1pc}
|
|
10
|
+
._1e0c116y, ._v4pn116y img, ._1b94116y span, ._1ii7116y svg{display:inline-flex}
|
|
7
11
|
._1e0c116y{display:inline-flex}
|
|
8
12
|
._1jtnidpf img, ._13t3idpf span, ._rm9uidpf svg{line-height:0}
|
|
9
13
|
._1o9zidpf{flex-shrink:0}
|
|
@@ -13,20 +17,25 @@
|
|
|
13
17
|
._1ul91ns9{min-width:-moz-fit-content;min-width:fit-content}
|
|
14
18
|
._4cvr1h6o{align-items:center}
|
|
15
19
|
._4t3i1j6v{height:1rem}
|
|
20
|
+
._4t3i7vkz, ._bna77vkz img, ._1xjx7vkz span, ._17527vkz svg{height:1pc}
|
|
16
21
|
._5jw9idpf svg{padding-bottom:0}
|
|
17
22
|
._7wy9idpf svg{padding-left:0}
|
|
18
23
|
._bna71j6v img, ._1xjx1j6v span, ._17521j6v svg{height:1rem}
|
|
19
24
|
._c71l1j6v{max-height:1rem}
|
|
25
|
+
._ca0qze3t, ._14bqze3t img, ._1oh2ze3t span, ._i2i3ze3t svg{padding-top:var(--ds-space-0,0)}
|
|
20
26
|
._i0dl1wug{flex-basis:auto}
|
|
21
27
|
._i2i3idpf svg{padding-top:0}
|
|
22
28
|
._mezj1j6v img, ._e2oo1j6v span, ._w8l51j6v svg{width:1rem}
|
|
29
|
+
._n3tdze3t, ._1ym6ze3t img, ._1m2uze3t span, ._5jw9ze3t svg{padding-bottom:var(--ds-space-0,0)}
|
|
23
30
|
._p12f1j6v{max-width:1rem}
|
|
24
31
|
._qci81j6v img, ._15iz1j6v span, ._erub1j6v svg{min-height:1rem}
|
|
25
32
|
._rtqbnkob img, ._e4kmnkob span, ._z239nkob svg{vertical-align:middle}
|
|
26
33
|
._rtys1j6v img, ._b8nk1j6v span, ._4x201j6v svg{max-width:1rem}
|
|
34
|
+
._s7n4nkob, ._rtqbnkob img, ._e4kmnkob span, ._z239nkob svg{vertical-align:middle}
|
|
27
35
|
._s7n4nkob{vertical-align:middle}
|
|
28
36
|
._syaz131l{color:var(--ds-text-subtlest,#626f86)}
|
|
29
37
|
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
30
38
|
._syaz1oju{color:var(--ds-icon-subtle,#626f86)}
|
|
39
|
+
._u5f3ze3t, ._3tceze3t img, ._99ztze3t span, ._uhasze3t svg{padding-right:var(--ds-space-0,0)}
|
|
31
40
|
._uhasidpf svg{padding-right:0}
|
|
32
41
|
._vwz4idpf{line-height:0}
|
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
4
|
var _messageMapper;
|
|
4
5
|
import "./index.compiled.css";
|
|
5
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
7
|
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
7
8
|
|
|
8
|
-
import React from 'react';
|
|
9
|
+
import React, { forwardRef } from 'react';
|
|
10
|
+
import { cx } from '@compiled/react';
|
|
9
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
+
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
10
13
|
import { IconType } from '../../../../../constants';
|
|
11
14
|
import { messages } from '../../../../../messages';
|
|
12
15
|
import AtlaskitIcon from '../../common/atlaskit-icon';
|
|
13
16
|
import ImageIcon from '../../common/image-icon';
|
|
17
|
+
import { withOverrideCss } from '../../common/with-override-css';
|
|
14
18
|
import { getFormattedMessage } from '../../utils';
|
|
15
19
|
import BadgeOld from './BadgeOld';
|
|
20
|
+
var styles = {
|
|
21
|
+
container: "_zulp1b66 _1e0c116y _4cvr1h6o _1ul91ns9",
|
|
22
|
+
icon: "_1e0c116y _v4pn116y _1b94116y _1ii7116y _4t3i7vkz _bna77vkz _1xjx7vkz _17527vkz _ca0qze3t _14bqze3t _1oh2ze3t _i2i3ze3t _u5f3ze3t _3tceze3t _99ztze3t _uhasze3t _n3tdze3t _1ym6ze3t _1m2uze3t _5jw9ze3t _19bvze3t _1xr1ze3t _9n9oze3t _7wy9ze3t _1bsb7vkz _mezj7vkz _e2oo7vkz _w8l57vkz _s7n4nkob _rtqbnkob _e4kmnkob _z239nkob",
|
|
23
|
+
text: "_11c81vlj"
|
|
24
|
+
};
|
|
25
|
+
var colorMap = {
|
|
26
|
+
subtle: "_syaz131l",
|
|
27
|
+
default: "_syaz1gjq"
|
|
28
|
+
};
|
|
16
29
|
var badgeStyles = null;
|
|
17
30
|
var iconStyles = null;
|
|
18
31
|
|
|
19
32
|
// TODO: Remove on fg cleanup: platform-linking-visual-refresh-v1
|
|
20
33
|
var labelStylesOld = null;
|
|
21
|
-
var labelStyles = null;
|
|
22
34
|
var messageMapper = (_messageMapper = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_messageMapper, IconType.PriorityBlocker, messages.priority_blocker), IconType.PriorityCritical, messages.priority_critical), IconType.PriorityHigh, messages.priority_high), IconType.PriorityHighest, messages.priority_highest), IconType.PriorityLow, messages.priority_low), IconType.PriorityLowest, messages.priority_lowest), IconType.PriorityMajor, messages.priority_major), IconType.PriorityMedium, messages.priority_medium), IconType.PriorityMinor, messages.priority_minor), IconType.PriorityTrivial, messages.priority_trivial), _defineProperty(_messageMapper, IconType.PriorityUndefined, messages.priority_undefined));
|
|
23
35
|
var getFormattedMessageFromIcon = function getFormattedMessageFromIcon(icon) {
|
|
24
36
|
if (icon) {
|
|
@@ -61,13 +73,14 @@ var renderImageIcon = function renderImageIcon(url, testId) {
|
|
|
61
73
|
* @see ProgrammingLanguage
|
|
62
74
|
* @see Provider
|
|
63
75
|
*/
|
|
64
|
-
var
|
|
65
|
-
var _ref$
|
|
76
|
+
var BadgeRefreshNew = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
77
|
+
var _ref$appearance = _ref.appearance,
|
|
78
|
+
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
79
|
+
_ref$hideIcon = _ref.hideIcon,
|
|
66
80
|
hideIcon = _ref$hideIcon === void 0 ? false : _ref$hideIcon,
|
|
67
81
|
icon = _ref.icon,
|
|
68
82
|
label = _ref.label,
|
|
69
83
|
name = _ref.name,
|
|
70
|
-
className = _ref.className,
|
|
71
84
|
_ref$testId = _ref.testId,
|
|
72
85
|
testId = _ref$testId === void 0 ? 'smart-element-badge' : _ref$testId,
|
|
73
86
|
url = _ref.url;
|
|
@@ -76,24 +89,76 @@ var BadgeNew = function BadgeNew(_ref) {
|
|
|
76
89
|
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
77
90
|
return null;
|
|
78
91
|
}
|
|
79
|
-
return /*#__PURE__*/React.createElement(
|
|
80
|
-
"
|
|
92
|
+
return /*#__PURE__*/React.createElement(Inline, {
|
|
93
|
+
as: "span",
|
|
94
|
+
"data-smart-element": name,
|
|
95
|
+
"data-smart-element-badge": true,
|
|
96
|
+
testId: testId,
|
|
97
|
+
xcss: cx(styles.container, colorMap[appearance]),
|
|
98
|
+
ref: ref
|
|
99
|
+
}, !hideIcon && /*#__PURE__*/React.createElement(Box, {
|
|
100
|
+
as: "span",
|
|
101
|
+
xcss: styles.icon
|
|
102
|
+
}, badgeIcon), /*#__PURE__*/React.createElement(Box, {
|
|
103
|
+
as: "span",
|
|
104
|
+
testId: "".concat(testId, "-label"),
|
|
105
|
+
xcss: styles.text
|
|
106
|
+
}, formattedMessageOrLabel));
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// On cleanup of platform-linking-visual-refresh-v1, this should become
|
|
110
|
+
// export default withOverrideCss(Badge);
|
|
111
|
+
var BadgeRefreshNewWithOverrideCss = withOverrideCss(BadgeRefreshNew);
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A base element that displays some text with an associated icon.
|
|
115
|
+
* @internal
|
|
116
|
+
* @param {BadgeProps} BadgeProps - The props necessary for the Badge.
|
|
117
|
+
* @see CommentCount
|
|
118
|
+
* @see ViewCount
|
|
119
|
+
* @see ReactCount
|
|
120
|
+
* @see VoteCount
|
|
121
|
+
* @see SubscriberCount
|
|
122
|
+
* @see Priority
|
|
123
|
+
* @see ProgrammingLanguage
|
|
124
|
+
* @see Provider
|
|
125
|
+
*/
|
|
126
|
+
var BadgeCompiledNew = function BadgeCompiledNew(_ref2) {
|
|
127
|
+
var _ref2$hideIcon = _ref2.hideIcon,
|
|
128
|
+
hideIcon = _ref2$hideIcon === void 0 ? false : _ref2$hideIcon,
|
|
129
|
+
icon = _ref2.icon,
|
|
130
|
+
label = _ref2.label,
|
|
131
|
+
name = _ref2.name,
|
|
132
|
+
className = _ref2.className,
|
|
133
|
+
_ref2$testId = _ref2.testId,
|
|
134
|
+
testId = _ref2$testId === void 0 ? 'smart-element-badge' : _ref2$testId,
|
|
135
|
+
url = _ref2.url;
|
|
136
|
+
var formattedMessageOrLabel = getFormattedMessageFromIcon(icon) || label;
|
|
137
|
+
var badgeIcon = renderAtlaskitIcon(icon, testId) || renderImageIcon(url, testId);
|
|
138
|
+
if (!formattedMessageOrLabel || !badgeIcon) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, fg('platform-linking-visual-refresh-v1') ? {} : _defineProperty({}, 'data-fit-to-content', true), {
|
|
81
142
|
"data-smart-element": name,
|
|
82
143
|
"data-smart-element-badge": true,
|
|
83
144
|
"data-testid": testId
|
|
84
145
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
85
146
|
,
|
|
86
147
|
className: ax(["_4cvr1h6o _1e0c116y _1ul91ns9", className])
|
|
87
|
-
}, !hideIcon && /*#__PURE__*/React.createElement("span", {
|
|
148
|
+
}), !hideIcon && /*#__PURE__*/React.createElement("span", {
|
|
88
149
|
className: ax(["_16jlidpf _1o9zidpf _i0dl1wug _syaz1oju _vwz4idpf _s7n4nkob _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 _1jtnidpf _13t3idpf _rm9uidpf _rtqbnkob _e4kmnkob _z239nkob"])
|
|
89
150
|
}, badgeIcon), /*#__PURE__*/React.createElement("span", {
|
|
90
151
|
"data-testid": "".concat(testId, "-label"),
|
|
91
|
-
className: ax([
|
|
152
|
+
className: ax(["_11c8qk37 _syaz131l _19bv1xvx _s7n4nkob"])
|
|
92
153
|
}, formattedMessageOrLabel));
|
|
93
154
|
};
|
|
94
155
|
var Badge = function Badge(props) {
|
|
95
156
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|
|
96
|
-
|
|
157
|
+
if (fg('platform-linking-visual-refresh-v1')) {
|
|
158
|
+
return /*#__PURE__*/React.createElement(BadgeRefreshNewWithOverrideCss, props);
|
|
159
|
+
} else {
|
|
160
|
+
return /*#__PURE__*/React.createElement(BadgeCompiledNew, props);
|
|
161
|
+
}
|
|
97
162
|
} else {
|
|
98
163
|
return /*#__PURE__*/React.createElement(BadgeOld, props);
|
|
99
164
|
}
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
._1e0ccj1k{display:-webkit-box}
|
|
6
6
|
._1nmz1hna{word-break:break-word}
|
|
7
7
|
._1reo15vq{overflow-x:hidden}
|
|
8
|
+
._1ul9idpf{min-width:0}
|
|
8
9
|
._1yyjkb7n{-webkit-line-clamp:1}
|
|
9
10
|
._sudp1e54{-webkit-box-orient:vertical}
|
|
10
11
|
._syaz131l{color:var(--ds-text-subtlest,#626f86)}
|
|
11
12
|
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
12
|
-
@supports not (-webkit-line-clamp:1){._102k1j6v{max-height:1rem}}
|
|
13
|
+
@supports not (-webkit-line-clamp:1){._102k1j6v{max-height:1rem}._102k7vkz{max-height:1pc}}
|
|
@@ -74,7 +74,7 @@ var DateTimeNew = function DateTimeNew(_ref) {
|
|
|
74
74
|
"data-testid": testId
|
|
75
75
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
76
76
|
,
|
|
77
|
-
className: ax([fg('platform-linking-visual-refresh-v1')
|
|
77
|
+
className: ax([!fg('platform-linking-visual-refresh-v1') && "_11c8qk37 _1reo15vq _18m915vq _syaz131l _1e0ccj1k _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54 _102k1j6v", fg('platform-linking-visual-refresh-v1') && "_11c81vlj _1reo15vq _18m915vq _syaz1gjq _1e0ccj1k _1ul9idpf _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54 _102k7vkz", className])
|
|
78
78
|
}, text ? "".concat(text, " ").concat(context) : /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, typeToDescriptorMap[type][typeVariant], {
|
|
79
79
|
values: {
|
|
80
80
|
context: context
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
4
|
import "./index.compiled.css";
|
|
4
5
|
import * as React from 'react';
|
|
@@ -17,6 +18,7 @@ import ImageIcon from '../../common/image-icon';
|
|
|
17
18
|
import { getIconWidth } from '../../utils';
|
|
18
19
|
import IconOld from './IconOld';
|
|
19
20
|
var styles = {
|
|
21
|
+
container: "_1ul91ns9",
|
|
20
22
|
iconWrapperStyle: "_1e0c1txw _4cvr1h6o _1bah1h6o"
|
|
21
23
|
};
|
|
22
24
|
var positionStyleMap = {
|
|
@@ -100,15 +102,14 @@ var IconNew = function IconNew(_ref) {
|
|
|
100
102
|
return overrideIcon || (render === null || render === void 0 ? void 0 : render()) || renderImageIcon(defaultIcon, url, testId, fg('platform-smart-card-icon-migration') ? size : undefined) || renderAtlaskitIcon(icon, testId, fg('platform-smart-card-icon-migration') ? size : undefined) || defaultIcon;
|
|
101
103
|
}, [overrideIcon, icon, label, render, testId, url, size]);
|
|
102
104
|
var width = getIconWidth(size);
|
|
103
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
-
"data-fit-to-content": true,
|
|
105
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, fg('platform-linking-visual-refresh-v1') ? {} : _defineProperty({}, 'data-fit-to-content', true), {
|
|
105
106
|
"data-smart-element": name,
|
|
106
107
|
"data-smart-element-icon": true,
|
|
107
108
|
"data-testid": testId
|
|
108
109
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
109
110
|
,
|
|
110
|
-
className: ax([!fg('platform-smart-card-icon-migration') && iconStylesMapOld[size], !fg('platform-smart-card-icon-migration') && positionStyleMap[position], render && !fg('platform-smart-card-icon-migration') && customRenderStyleMapOld[size], render && fg('platform-smart-card-icon-migration') && customRenderStyleMapNew[size], className])
|
|
111
|
-
}, fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
|
|
111
|
+
className: ax([fg('platform-linking-visual-refresh-v1') && styles.container, !fg('platform-smart-card-icon-migration') && iconStylesMapOld[size], !fg('platform-smart-card-icon-migration') && positionStyleMap[position], render && !fg('platform-smart-card-icon-migration') && customRenderStyleMapOld[size], render && fg('platform-smart-card-icon-migration') && customRenderStyleMapNew[size], className])
|
|
112
|
+
}), fg('platform-smart-card-icon-migration') ? /*#__PURE__*/React.createElement(Box, {
|
|
112
113
|
xcss: styles.iconWrapperStyle,
|
|
113
114
|
style: {
|
|
114
115
|
width: width,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
4
|
import "./index.compiled.css";
|
|
3
5
|
import * as React from 'react';
|
|
4
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -7,6 +9,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
7
9
|
import { useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
8
10
|
import LozengeAction from './lozenge-action';
|
|
9
11
|
import LozengeOld from './LozengeOld';
|
|
12
|
+
var stylesOld = null;
|
|
10
13
|
var styles = null;
|
|
11
14
|
|
|
12
15
|
/**
|
|
@@ -42,15 +45,14 @@ var LozengeNew = function LozengeNew(_ref) {
|
|
|
42
45
|
style: style,
|
|
43
46
|
testId: "".concat(testId, "-lozenge")
|
|
44
47
|
}, text);
|
|
45
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
46
|
-
"data-fit-to-content": true,
|
|
48
|
+
return /*#__PURE__*/React.createElement("span", _extends({}, fg('platform-linking-visual-refresh-v1') ? {} : _defineProperty({}, 'data-fit-to-content', true), {
|
|
47
49
|
"data-smart-element": name,
|
|
48
50
|
"data-smart-element-lozenge": true,
|
|
49
51
|
"data-testid": testId
|
|
50
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
51
53
|
,
|
|
52
|
-
className: ax(["_1e0c116y _vwz41kw7", className])
|
|
53
|
-
}, lozenge);
|
|
54
|
+
className: ax([!fg('platform-linking-visual-refresh-v1') && "_1e0c116y _vwz41kw7", fg('platform-linking-visual-refresh-v1') && "_1e0c116y _1ul91ns9", className])
|
|
55
|
+
}), lozenge);
|
|
54
56
|
};
|
|
55
57
|
var Lozenge = function Lozenge(props) {
|
|
56
58
|
if (fg('bandicoots-compiled-migration-smartcard')) {
|