@atlaskit/smart-card 33.3.0 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/styled.js +1 -0
- package/dist/cjs/view/EmbedModal/components/link-info/styled.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/common/motion-wrapper/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +1 -0
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -0
- package/dist/cjs/view/FlexibleCard/components/utils.js +3 -3
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +8 -2
- package/dist/cjs/view/InlineCard/ErroredView/index.js +6 -2
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +40 -15
- package/dist/cjs/view/InlineCard/Frame/index.js +3 -1
- package/dist/cjs/view/InlineCard/Frame/styled-emotion.js +137 -0
- package/dist/cjs/view/InlineCard/Frame/styled.compiled.css +53 -0
- package/dist/cjs/view/InlineCard/Frame/styled.js +49 -124
- package/dist/cjs/view/InlineCard/Icon-emotion.js +58 -0
- package/dist/cjs/view/InlineCard/Icon.compiled.css +10 -0
- package/dist/cjs/view/InlineCard/Icon.js +39 -18
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.compiled.css +6 -0
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +99 -25
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled-emotion.js +95 -0
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.compiled.css +36 -0
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +128 -45
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +30 -12
- package/dist/cjs/view/InlineCard/ResolvingView/styled-emotion.js +16 -0
- package/dist/cjs/view/InlineCard/ResolvingView/styled.compiled.css +5 -0
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +26 -8
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +42 -16
- package/dist/cjs/view/InlineCard/styled-emotion.js +55 -0
- package/dist/cjs/view/InlineCard/styled.compiled.css +21 -0
- package/dist/cjs/view/InlineCard/styled.js +25 -45
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/styled.js +1 -0
- package/dist/es2019/view/EmbedModal/components/link-info/styled.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/common/motion-wrapper/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -0
- package/dist/es2019/view/FlexibleCard/components/utils.js +3 -3
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +8 -2
- package/dist/es2019/view/InlineCard/ErroredView/index.js +6 -2
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +40 -15
- package/dist/es2019/view/InlineCard/Frame/index.js +3 -1
- package/dist/es2019/view/InlineCard/Frame/styled-emotion.js +143 -0
- package/dist/es2019/view/InlineCard/Frame/styled.compiled.css +53 -0
- package/dist/es2019/view/InlineCard/Frame/styled.js +44 -136
- package/dist/es2019/view/InlineCard/Icon-emotion.js +52 -0
- package/dist/es2019/view/InlineCard/Icon.compiled.css +10 -0
- package/dist/es2019/view/InlineCard/Icon.js +31 -15
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.compiled.css +6 -0
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +87 -18
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled-emotion.js +114 -0
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.compiled.css +36 -0
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +115 -43
- package/dist/es2019/view/InlineCard/ResolvingView/index.js +30 -12
- package/dist/es2019/view/InlineCard/ResolvingView/styled-emotion.js +9 -0
- package/dist/es2019/view/InlineCard/ResolvingView/styled.compiled.css +5 -0
- package/dist/es2019/view/InlineCard/ResolvingView/styled.js +20 -6
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +42 -16
- package/dist/es2019/view/InlineCard/styled-emotion.js +47 -0
- package/dist/es2019/view/InlineCard/styled.compiled.css +21 -0
- package/dist/es2019/view/InlineCard/styled.js +19 -43
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/styled.js +1 -0
- package/dist/esm/view/EmbedModal/components/link-info/styled.js +2 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -0
- package/dist/esm/view/FlexibleCard/components/common/motion-wrapper/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +1 -0
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -0
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -0
- package/dist/esm/view/FlexibleCard/components/utils.js +3 -3
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +8 -2
- package/dist/esm/view/InlineCard/ErroredView/index.js +6 -2
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +40 -15
- package/dist/esm/view/InlineCard/Frame/index.js +3 -1
- package/dist/esm/view/InlineCard/Frame/styled-emotion.js +131 -0
- package/dist/esm/view/InlineCard/Frame/styled.compiled.css +53 -0
- package/dist/esm/view/InlineCard/Frame/styled.js +46 -125
- package/dist/esm/view/InlineCard/Icon-emotion.js +51 -0
- package/dist/esm/view/InlineCard/Icon.compiled.css +10 -0
- package/dist/esm/view/InlineCard/Icon.js +36 -17
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.compiled.css +6 -0
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +90 -18
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled-emotion.js +87 -0
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.compiled.css +36 -0
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +124 -43
- package/dist/esm/view/InlineCard/ResolvingView/index.js +30 -12
- package/dist/esm/view/InlineCard/ResolvingView/styled-emotion.js +9 -0
- package/dist/esm/view/InlineCard/ResolvingView/styled.compiled.css +5 -0
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +22 -6
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +42 -16
- package/dist/esm/view/InlineCard/styled-emotion.js +47 -0
- package/dist/esm/view/InlineCard/styled.compiled.css +21 -0
- package/dist/esm/view/InlineCard/styled.js +21 -43
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
- package/dist/types/view/HoverCard/types.d.ts +15 -0
- package/dist/types/view/InlineCard/Frame/styled-emotion.d.ts +17 -0
- package/dist/types/view/InlineCard/Frame/styled.d.ts +8 -10
- package/dist/types/view/InlineCard/Icon-emotion.d.ts +12 -0
- package/dist/types/view/InlineCard/Icon.d.ts +2 -8
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled-emotion.d.ts +36 -0
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -34
- package/dist/types/view/InlineCard/ResolvingView/styled-emotion.d.ts +9 -0
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +1 -8
- package/dist/types/view/InlineCard/styled-emotion.d.ts +13 -0
- package/dist/types/view/InlineCard/styled.d.ts +1 -12
- package/dist/types-ts4.5/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +15 -0
- package/dist/types-ts4.5/view/InlineCard/Frame/styled-emotion.d.ts +17 -0
- package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +8 -10
- package/dist/types-ts4.5/view/InlineCard/Icon-emotion.d.ts +12 -0
- package/dist/types-ts4.5/view/InlineCard/Icon.d.ts +2 -8
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled-emotion.d.ts +36 -0
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -34
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled-emotion.d.ts +9 -0
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled.d.ts +1 -8
- package/dist/types-ts4.5/view/InlineCard/styled-emotion.d.ts +13 -0
- package/dist/types-ts4.5/view/InlineCard/styled.d.ts +1 -12
- package/hooks/package.json +3 -1
- package/hover-card/package.json +3 -1
- package/link-url/package.json +3 -1
- package/package.json +14 -4
- package/ssr/package.json +3 -1
- package/types/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 34.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#99301](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99301)
|
|
8
|
+
[`a537e69b1a3ce`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a537e69b1a3ce) -
|
|
9
|
+
[ux] Migration from @emotion/react to @compiled/react for styling.
|
|
10
|
+
|
|
11
|
+
## 33.4.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#99264](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/99264)
|
|
16
|
+
[`a5f4221df30a0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a5f4221df30a0) -
|
|
17
|
+
Introduce role, label and titleId props to the Hover Card component
|
|
18
|
+
|
|
3
19
|
## 33.3.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "
|
|
14
|
+
packageVersion: "34.0.0"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -22,6 +22,7 @@ var metadataBlockCss = exports.metadataBlockCss = (0, _react.css)({
|
|
|
22
22
|
},
|
|
23
23
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
24
24
|
'[data-smart-element-group]': {
|
|
25
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
25
26
|
lineHeight: '1rem'
|
|
26
27
|
}
|
|
27
28
|
});
|
|
@@ -61,9 +61,11 @@ var actionCss = exports.actionCss = (0, _react.css)({
|
|
|
61
61
|
display: 'flex',
|
|
62
62
|
flex: '0 0 auto',
|
|
63
63
|
gap: "var(--ds-space-050, 4px)",
|
|
64
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
64
65
|
lineHeight: height,
|
|
65
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
66
67
|
span: {
|
|
68
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
67
69
|
lineHeight: height
|
|
68
70
|
},
|
|
69
71
|
'@media only screen and (max-width: 980px)': {
|
|
@@ -40,6 +40,7 @@ var getButtonStyle = function getButtonStyle(size, iconOnly) {
|
|
|
40
40
|
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
41
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
42
|
'button, button:hover, button:focus, button:active': [{
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
43
44
|
lineHeight: 'inherit'
|
|
44
45
|
}, iconOnly ? "\n padding: 0.125rem;\n " : "\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n "]
|
|
45
46
|
});
|
|
@@ -35,15 +35,18 @@ var stackItemIconSizeStyles = (0, _utils.getIconSizeStyles)('20px');
|
|
|
35
35
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
36
36
|
var stackItemIconStyles = (0, _react.css)(stackItemIconSizeStyles, {
|
|
37
37
|
display: 'inline-block',
|
|
38
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
38
39
|
lineHeight: 0,
|
|
39
40
|
padding: "var(--ds-space-025, 2px)",
|
|
40
41
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
41
42
|
'span,svg,img': {
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
42
44
|
lineHeight: 0
|
|
43
45
|
}
|
|
44
46
|
});
|
|
45
47
|
var newStackItemIconStyles = (0, _react.css)({
|
|
46
48
|
display: 'inline-block',
|
|
49
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
47
50
|
lineHeight: 0
|
|
48
51
|
});
|
|
49
52
|
var ActionIcon = function ActionIcon(_ref) {
|
|
@@ -14,6 +14,7 @@ var containerStyles = (0, _primitives.xcss)({
|
|
|
14
14
|
borderRadius: 'border.radius',
|
|
15
15
|
margin: 'space.100',
|
|
16
16
|
marginBottom: 'space.0',
|
|
17
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
17
18
|
lineHeight: '20px',
|
|
18
19
|
padding: 'space.075',
|
|
19
20
|
paddingInline: 'space.100',
|
|
@@ -31,6 +31,7 @@ var _excluded = ["triggerRef"];
|
|
|
31
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
32
32
|
var styles = (0, _react2.css)({
|
|
33
33
|
display: 'inline-flex',
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
34
35
|
lineHeight: '1rem',
|
|
35
36
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
36
37
|
'> div': {
|
|
@@ -25,7 +25,7 @@ var getElementGroupStyles = function getElementGroupStyles(size, maxLines) {
|
|
|
25
25
|
// sides so they line up nicely.
|
|
26
26
|
var lineHeight = (0, _utils.getMaxLineHeight)(size);
|
|
27
27
|
return (0, _react2.css)({
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
29
29
|
lineHeight: "".concat(lineHeight, "rem")
|
|
30
30
|
},
|
|
31
31
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -65,6 +65,7 @@ var getBaseStyles = exports.getBaseStyles = function getBaseStyles(direction, si
|
|
|
65
65
|
display: 'flex',
|
|
66
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
67
67
|
gap: "".concat(getGapSize(size), "rem"),
|
|
68
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
68
69
|
lineHeight: '1rem',
|
|
69
70
|
minWidth: 0,
|
|
70
71
|
overflow: 'hidden'
|
|
@@ -40,7 +40,7 @@ var MotionWrapper = exports.MotionWrapper = function MotionWrapper(_ref) {
|
|
|
40
40
|
style: {
|
|
41
41
|
height: height,
|
|
42
42
|
minHeight: minHeight,
|
|
43
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
44
44
|
lineHeight: 0,
|
|
45
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
46
46
|
overflow: 'hidden',
|
|
@@ -46,7 +46,7 @@ var getCustomRenderStyles = function getCustomRenderStyles(value) {
|
|
|
46
46
|
return (
|
|
47
47
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
48
48
|
(0, _react2.css)((0, _utils.getTruncateStyles)(1, value), {
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
50
50
|
lineHeight: value,
|
|
51
51
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
52
|
fontSize: value,
|
|
@@ -23,6 +23,7 @@ var dropdownItemGroupStyles = exports.dropdownItemGroupStyles = (0, _react.css)(
|
|
|
23
23
|
var sharedBlockStyles = (0, _react.css)({
|
|
24
24
|
display: 'flex',
|
|
25
25
|
gap: "var(--ds-space-100, 0.5rem)",
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
26
27
|
lineHeight: '1rem',
|
|
27
28
|
minWidth: 0,
|
|
28
29
|
overflow: 'hidden',
|
|
@@ -51,6 +52,7 @@ var linkStyles = exports.linkStyles = (0, _react.css)(sharedBlockStyles, {
|
|
|
51
52
|
});
|
|
52
53
|
var textStyles = exports.textStyles = function textStyles(maxLines) {
|
|
53
54
|
return (0, _react.css)({
|
|
55
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
54
56
|
lineHeight: '1rem',
|
|
55
57
|
whiteSpace: 'normal'
|
|
56
58
|
},
|
|
@@ -13,11 +13,14 @@ var triggerButtonStyles = exports.triggerButtonStyles = (0, _react.css)({
|
|
|
13
13
|
backgroundColor: 'transparent',
|
|
14
14
|
color: 'unset',
|
|
15
15
|
cursor: 'pointer',
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
16
17
|
fontFamily: 'unset',
|
|
17
18
|
fontSize: 'unset',
|
|
18
19
|
fontStyle: 'unset',
|
|
20
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
19
21
|
fontWeight: 'unset',
|
|
20
22
|
fontVariant: 'unset',
|
|
23
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
21
24
|
lineHeight: 0,
|
|
22
25
|
padding: 0,
|
|
23
26
|
textTransform: 'unset',
|
|
@@ -93,7 +93,7 @@ var getLinkSizeStyles = exports.getLinkSizeStyles = function getLinkSizeStyles(s
|
|
|
93
93
|
return (0, _react2.css)({
|
|
94
94
|
font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
95
95
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
96
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
97
97
|
lineHeight: getLinkLineHeight(size)
|
|
98
98
|
});
|
|
99
99
|
case _constants.SmartLinkSize.Large:
|
|
@@ -101,7 +101,7 @@ var getLinkSizeStyles = exports.getLinkSizeStyles = function getLinkSizeStyles(s
|
|
|
101
101
|
return (0, _react2.css)({
|
|
102
102
|
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
103
103
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
104
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
105
105
|
lineHeight: getLinkLineHeight(size)
|
|
106
106
|
});
|
|
107
107
|
case _constants.SmartLinkSize.Small:
|
|
@@ -109,7 +109,7 @@ var getLinkSizeStyles = exports.getLinkSizeStyles = function getLinkSizeStyles(s
|
|
|
109
109
|
return (0, _react2.css)({
|
|
110
110
|
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
111
111
|
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
112
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
|
|
113
113
|
lineHeight: getLinkLineHeight(size)
|
|
114
114
|
});
|
|
115
115
|
}
|
|
@@ -49,7 +49,10 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
49
49
|
zIndex = _ref$zIndex === void 0 ? _styled.HOVER_CARD_Z_INDEX : _ref$zIndex,
|
|
50
50
|
_ref$noFadeDelay = _ref.noFadeDelay,
|
|
51
51
|
noFadeDelay = _ref$noFadeDelay === void 0 ? false : _ref$noFadeDelay,
|
|
52
|
-
hoverPreviewOptions = _ref.hoverPreviewOptions
|
|
52
|
+
hoverPreviewOptions = _ref.hoverPreviewOptions,
|
|
53
|
+
role = _ref.role,
|
|
54
|
+
label = _ref.label,
|
|
55
|
+
titleId = _ref.titleId;
|
|
53
56
|
var fadeInDelay = (_hoverPreviewOptions$ = hoverPreviewOptions === null || hoverPreviewOptions === void 0 ? void 0 : hoverPreviewOptions.fadeInDelay) !== null && _hoverPreviewOptions$ !== void 0 ? _hoverPreviewOptions$ : FADE_IN_DELAY;
|
|
54
57
|
var _React$useState = _react.default.useState(false),
|
|
55
58
|
_React$useState2 = (0, _slicedToArray2.default)(_React$useState, 2),
|
|
@@ -228,7 +231,10 @@ var HoverCardComponent = exports.HoverCardComponent = function HoverCardComponen
|
|
|
228
231
|
autoFocus: false,
|
|
229
232
|
content: content,
|
|
230
233
|
trigger: trigger,
|
|
231
|
-
zIndex: zIndex
|
|
234
|
+
zIndex: zIndex,
|
|
235
|
+
role: role,
|
|
236
|
+
titleId: titleId,
|
|
237
|
+
label: label
|
|
232
238
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
233
239
|
,
|
|
234
240
|
popupComponent: _CustomPopupContainer.default
|
|
@@ -15,13 +15,16 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
15
15
|
var _reactIntlNext = require("react-intl-next");
|
|
16
16
|
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
17
17
|
var _error = _interopRequireDefault(require("@atlaskit/icon/utility/migration/error"));
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
20
|
var _messages = require("../../../messages");
|
|
20
21
|
var _HoverCard = require("../../HoverCard");
|
|
21
22
|
var _Frame = require("../Frame");
|
|
22
23
|
var _Icon = require("../Icon");
|
|
24
|
+
var _IconEmotion = require("../Icon-emotion");
|
|
23
25
|
var _IconAndTitleLayout = require("../IconAndTitleLayout");
|
|
24
26
|
var _styled = require("../styled");
|
|
27
|
+
var _styledEmotion = require("../styled-emotion");
|
|
25
28
|
var _withFrameStyleControl = _interopRequireDefault(require("../utils/withFrameStyleControl"));
|
|
26
29
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
27
30
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -47,7 +50,7 @@ var InlineCardErroredView = exports.InlineCardErroredView = /*#__PURE__*/functio
|
|
|
47
50
|
var ActionButton = (0, _withFrameStyleControl.default)(_button.default, _this.frameRef);
|
|
48
51
|
return onRetry && /*#__PURE__*/_react.default.createElement(ActionButton, {
|
|
49
52
|
spacing: "none",
|
|
50
|
-
component: _styled.IconStyledButton,
|
|
53
|
+
component: (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? _styled.IconStyledButton : _styledEmotion.IconStyledButton,
|
|
51
54
|
onClick: _this.handleRetry,
|
|
52
55
|
role: "button"
|
|
53
56
|
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.try_again));
|
|
@@ -67,13 +70,14 @@ var InlineCardErroredView = exports.InlineCardErroredView = /*#__PURE__*/functio
|
|
|
67
70
|
icon = _this$props.icon,
|
|
68
71
|
message = _this$props.message,
|
|
69
72
|
truncateInline = _this$props.truncateInline;
|
|
73
|
+
var Wrapper = (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? _Icon.AKIconWrapper : _IconEmotion.AKIconWrapper;
|
|
70
74
|
var content = /*#__PURE__*/_react.default.createElement(_Frame.Frame, {
|
|
71
75
|
testId: testId,
|
|
72
76
|
isSelected: isSelected,
|
|
73
77
|
ref: this.frameRef,
|
|
74
78
|
truncateInline: truncateInline
|
|
75
79
|
}, /*#__PURE__*/_react.default.createElement(_IconAndTitleLayout.IconAndTitleLayout, {
|
|
76
|
-
icon: icon || /*#__PURE__*/_react.default.createElement(
|
|
80
|
+
icon: icon || /*#__PURE__*/_react.default.createElement(Wrapper, null, /*#__PURE__*/_react.default.createElement(_error.default, {
|
|
77
81
|
label: "error",
|
|
78
82
|
LEGACY_size: "small",
|
|
79
83
|
color: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
|
|
@@ -17,23 +17,37 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
17
17
|
var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
18
18
|
var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
|
|
19
19
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _colors = require("@atlaskit/theme/colors");
|
|
21
22
|
var _messages = require("../../../messages");
|
|
22
23
|
var _HoverCard = require("../../HoverCard");
|
|
23
24
|
var _Frame = require("../Frame");
|
|
24
25
|
var _Icon = require("../Icon");
|
|
26
|
+
var _IconEmotion = require("../Icon-emotion");
|
|
25
27
|
var _IconAndTitleLayout = require("../IconAndTitleLayout");
|
|
26
28
|
var _styled = require("../IconAndTitleLayout/styled");
|
|
27
29
|
var _styled2 = require("../styled");
|
|
30
|
+
var _styledEmotion = require("../styled-emotion");
|
|
28
31
|
var _withFrameStyleControl = _interopRequireDefault(require("../utils/withFrameStyleControl"));
|
|
29
32
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
30
33
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
var fallbackForbiddenIcon = function fallbackForbiddenIcon() {
|
|
35
|
+
if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
|
|
36
|
+
return /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
|
|
37
|
+
label: "error",
|
|
38
|
+
size: "small",
|
|
39
|
+
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")"),
|
|
40
|
+
testId: "forbidden-view-fallback-icon"
|
|
41
|
+
}));
|
|
42
|
+
} else {
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_IconEmotion.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
|
|
44
|
+
label: "error",
|
|
45
|
+
size: "small",
|
|
46
|
+
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")"),
|
|
47
|
+
testId: "forbidden-view-fallback-icon"
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
};
|
|
37
51
|
var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
38
52
|
function InlineCardForbiddenView() {
|
|
39
53
|
var _this$props;
|
|
@@ -78,14 +92,25 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
|
|
|
78
92
|
var ActionButton = (0, _withFrameStyleControl.default)(_button.default, _this.frameRef);
|
|
79
93
|
var accessType = (_this$props$requestAc = _this.props.requestAccessContext) === null || _this$props$requestAc === void 0 ? void 0 : _this$props$requestAc.accessType;
|
|
80
94
|
if (_this.state.hasRequestAccessContextMessage) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(ActionButton, {
|
|
97
|
+
spacing: "none",
|
|
98
|
+
onClick: _this.handleRetry,
|
|
99
|
+
component: _styled2.IconStyledButton,
|
|
100
|
+
testId: "button-connect-other-account",
|
|
101
|
+
role: "button",
|
|
102
|
+
isDisabled: accessType === 'PENDING_REQUEST_EXISTS'
|
|
103
|
+
}, _this.renderForbiddenAccessMessage());
|
|
104
|
+
} else {
|
|
105
|
+
return /*#__PURE__*/_react.default.createElement(ActionButton, {
|
|
106
|
+
spacing: "none",
|
|
107
|
+
onClick: _this.handleRetry,
|
|
108
|
+
component: _styledEmotion.IconStyledButton,
|
|
109
|
+
testId: "button-connect-other-account",
|
|
110
|
+
role: "button",
|
|
111
|
+
isDisabled: accessType === 'PENDING_REQUEST_EXISTS'
|
|
112
|
+
}, _this.renderForbiddenAccessMessage());
|
|
113
|
+
}
|
|
89
114
|
}
|
|
90
115
|
if (onAuthorise) {
|
|
91
116
|
return /*#__PURE__*/_react.default.createElement(_button.default, {
|
|
@@ -120,7 +145,7 @@ var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/fun
|
|
|
120
145
|
ref: this.frameRef,
|
|
121
146
|
truncateInline: truncateInline
|
|
122
147
|
}, /*#__PURE__*/_react.default.createElement(_IconAndTitleLayout.IconAndTitleLayout, {
|
|
123
|
-
icon: icon ? icon :
|
|
148
|
+
icon: icon ? icon : fallbackForbiddenIcon(),
|
|
124
149
|
link: url,
|
|
125
150
|
title: url,
|
|
126
151
|
onClick: onClick,
|
|
@@ -6,8 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.Frame = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
10
|
var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
|
|
10
11
|
var _styled = require("./styled");
|
|
12
|
+
var _styledEmotion = require("./styled-emotion");
|
|
11
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
15
|
var Frame = exports.Frame = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
@@ -42,7 +44,7 @@ var Frame = exports.Frame = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
|
42
44
|
var isAnchor = Boolean(link || onClick);
|
|
43
45
|
|
|
44
46
|
// Depending on whenever Frame was given onClick or link itself we display span or anchor elements
|
|
45
|
-
var Wrapper = isAnchor ? _styled.WrapperAnchor : _styled.WrapperSpan;
|
|
47
|
+
var Wrapper = (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? isAnchor ? _styled.WrapperAnchor : _styled.WrapperSpan : isAnchor ? _styledEmotion.WrapperAnchor : _styledEmotion.WrapperSpan;
|
|
46
48
|
return /*#__PURE__*/_react.default.createElement(Wrapper, {
|
|
47
49
|
href: link,
|
|
48
50
|
withoutBackground: withoutBackground,
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.WrapperSpan = exports.WrapperAnchor = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
+
var lineHeight = 22;
|
|
14
|
+
var selectedStyles = {
|
|
15
|
+
cursor: 'pointer',
|
|
16
|
+
boxShadow: "0 0 0 2px ".concat("var(--ds-border-selected, ".concat(_colors.B100, ")")),
|
|
17
|
+
outline: 'none',
|
|
18
|
+
userSelect: 'none',
|
|
19
|
+
'&, :hover, :focus, :active': {
|
|
20
|
+
textDecoration: 'none'
|
|
21
|
+
},
|
|
22
|
+
'&:hover': {
|
|
23
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"))
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var isInteractive = function isInteractive(_ref) {
|
|
27
|
+
var isInteractive = _ref.isInteractive;
|
|
28
|
+
if (isInteractive) {
|
|
29
|
+
return {
|
|
30
|
+
':active': {
|
|
31
|
+
backgroundColor: "var(--ds-background-selected, ".concat(_colors.B50, ")")
|
|
32
|
+
},
|
|
33
|
+
':focus': selectedStyles
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
37
|
+
};
|
|
38
|
+
var isSelected = function isSelected(_ref2) {
|
|
39
|
+
var isSelected = _ref2.isSelected;
|
|
40
|
+
if (isSelected) {
|
|
41
|
+
return selectedStyles;
|
|
42
|
+
} else {
|
|
43
|
+
return {
|
|
44
|
+
userSelect: 'text'
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var hoveredStyles = {
|
|
49
|
+
borderColor: "var(--ds-border-accent-blue, ".concat(_colors.B200, ")")
|
|
50
|
+
};
|
|
51
|
+
var activeHoveredFocusedStyles = function activeHoveredFocusedStyles(props) {
|
|
52
|
+
if (props.withoutBackground) {
|
|
53
|
+
return undefined;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
textDecoration: 'none'
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
var hoveredWihBorderStyles = function hoveredWihBorderStyles(props) {
|
|
60
|
+
return _objectSpread(_objectSpread({}, hoveredStyles), activeHoveredFocusedStyles(props));
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/*
|
|
64
|
+
Inline smart cards should have the following layout:
|
|
65
|
+
------------------------------------
|
|
66
|
+
| icon | title | action OR lozenge |
|
|
67
|
+
------------------------------------
|
|
68
|
+
The aim is to ensure (1) all children are
|
|
69
|
+
in line with each other, (2) are vertically
|
|
70
|
+
centered.
|
|
71
|
+
*/
|
|
72
|
+
// NB: `padding` consistent with @mentions.
|
|
73
|
+
// NB: `display: inline` required for `box-decoration-break` to work.
|
|
74
|
+
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
75
|
+
var baseWrapperStyles = function baseWrapperStyles(props) {
|
|
76
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
77
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
78
|
+
lineHeight: "".concat(lineHeight, "px"),
|
|
79
|
+
padding: "var(--ds-space-025, 2px)".concat(" 0px")
|
|
80
|
+
}, props.withoutBackground ? {
|
|
81
|
+
paddingLeft: 0,
|
|
82
|
+
marginLeft: "var(--ds-space-negative-025, -2px)"
|
|
83
|
+
} : undefined), {}, {
|
|
84
|
+
display: 'inline',
|
|
85
|
+
boxDecorationBreak: 'clone',
|
|
86
|
+
borderRadius: "var(--ds-border-radius-100, 4px)",
|
|
87
|
+
color: "var(--ds-link, ".concat(_colors.B400, ")")
|
|
88
|
+
}, props.withoutBackground ? undefined : {
|
|
89
|
+
backgroundColor: "var(--ds-surface-raised, white)"
|
|
90
|
+
}), isSelected(props)), props.withoutBackground ? undefined : {
|
|
91
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"))
|
|
92
|
+
}), {}, {
|
|
93
|
+
'&:hover': hoveredStyles,
|
|
94
|
+
'&, :hover, :focus, :active': activeHoveredFocusedStyles(props),
|
|
95
|
+
transition: '0.1s all ease-in-out',
|
|
96
|
+
MozUserSelect: 'none'
|
|
97
|
+
}, props.isHovered ? hoveredWihBorderStyles(props) : undefined);
|
|
98
|
+
};
|
|
99
|
+
var truncateStyles = {
|
|
100
|
+
overflow: 'hidden',
|
|
101
|
+
textOverflow: 'ellipsis',
|
|
102
|
+
wordBreak: 'break-all',
|
|
103
|
+
// The height of a truncated card is 1px higher than that of a non-truncated card, so we subtract 1px from the line height.
|
|
104
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
105
|
+
lineHeight: "".concat(lineHeight - 1, "px"),
|
|
106
|
+
display: '-webkit-inline-box',
|
|
107
|
+
WebkitLineClamp: 1,
|
|
108
|
+
WebkitBoxOrient: 'vertical',
|
|
109
|
+
// We need to remove the padding because display: -webkit-inline-box will cause any padding to be
|
|
110
|
+
// added to the total height, causing truncated cards to have greater height than non-truncated cards which use display: inline.
|
|
111
|
+
padding: 0,
|
|
112
|
+
'@supports not (-webkit-line-clamp: 1)': {
|
|
113
|
+
display: 'inline-block',
|
|
114
|
+
maxHeight: "".concat(lineHeight, "px"),
|
|
115
|
+
// If the browser does not support webkit, we don't need to remove the padding
|
|
116
|
+
padding: "var(--ds-space-025, 2px)".concat(" 0px")
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
var isTruncated = function isTruncated(_ref3) {
|
|
120
|
+
var truncateInline = _ref3.truncateInline;
|
|
121
|
+
if (truncateInline) {
|
|
122
|
+
return truncateStyles;
|
|
123
|
+
}
|
|
124
|
+
return undefined;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
128
|
+
var WrapperAnchor = exports.WrapperAnchor = _styled.default.a(function (props) {
|
|
129
|
+
return _objectSpread(_objectSpread(_objectSpread({}, baseWrapperStyles(props)), isInteractive(props)), isTruncated(props));
|
|
130
|
+
});
|
|
131
|
+
WrapperAnchor.displayName = 'WrapperAnchor';
|
|
132
|
+
|
|
133
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
|
|
134
|
+
var WrapperSpan = exports.WrapperSpan = _styled.default.span(function (props) {
|
|
135
|
+
return _objectSpread(_objectSpread({}, baseWrapperStyles(props)), isTruncated(props));
|
|
136
|
+
});
|
|
137
|
+
WrapperSpan.displayName = 'WrapperSpan';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
|
|
2
|
+
._19ith6cr{border:1px solid var(--ds-border,#dfe1e6)}
|
|
3
|
+
._1yt4x7n9{padding:var(--ds-space-025,2px) 0}
|
|
4
|
+
._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}
|
|
5
|
+
._v56415x0{transition:all .1s ease-in-out}
|
|
6
|
+
._1h6dmr28{border-color:var(--ds-border-accent-blue,#2684ff)}._12ji1r31{outline-color:currentColor}
|
|
7
|
+
._12y31o36{outline-width:medium}
|
|
8
|
+
._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
|
|
9
|
+
._16qscw00{box-shadow:0 0 0 2px var(--ds-border-selected,#4c9aff)}
|
|
10
|
+
._18m915vq{overflow-y:hidden}
|
|
11
|
+
._18u01i6y{margin-left:var(--ds-space-negative-025,-2px)}
|
|
12
|
+
._19bvidpf{padding-left:0}
|
|
13
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
14
|
+
._1e0c1abx{display:-webkit-inline-box}
|
|
15
|
+
._1e0c1nu9{display:inline}
|
|
16
|
+
._1hmsglyw{text-decoration-line:none}
|
|
17
|
+
._1nmz9jpi{word-break:break-all}
|
|
18
|
+
._1qu2glyw{outline-style:none}
|
|
19
|
+
._1reo15vq{overflow-x:hidden}
|
|
20
|
+
._1rkwglyw{-moz-user-select:none}
|
|
21
|
+
._1yyjkb7n{-webkit-line-clamp:1}
|
|
22
|
+
._4bfu18uv{text-decoration-color:initial}
|
|
23
|
+
._80omtlke{cursor:pointer}
|
|
24
|
+
._ajmmnqa1{text-decoration-style:solid}
|
|
25
|
+
._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
|
|
26
|
+
._ca0qidpf{padding-top:0}
|
|
27
|
+
._n3tdidpf{padding-bottom:0}
|
|
28
|
+
._sudp1e54{-webkit-box-orient:vertical}
|
|
29
|
+
._syaz1y58{color:var(--ds-link,#0052cc)}
|
|
30
|
+
._u5f3idpf{padding-right:0}
|
|
31
|
+
._uizt1kdv{-webkit-user-select:text;-ms-user-select:text;user-select:text}
|
|
32
|
+
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
33
|
+
._vwz4183y{line-height:21px}
|
|
34
|
+
._vwz4qslr{line-height:22px}
|
|
35
|
+
._1372tlke:focus{cursor:pointer}
|
|
36
|
+
._1a3b18uv:focus{text-decoration-color:initial}
|
|
37
|
+
._1hvw1o36:focus{outline-width:medium}
|
|
38
|
+
._1j5pglyw:focus{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
39
|
+
._49pcglyw:focus{outline-style:none}
|
|
40
|
+
._4fprglyw:focus{text-decoration-line:none}
|
|
41
|
+
._5goinqa1:focus{text-decoration-style:solid}
|
|
42
|
+
._7ehicw00:focus{box-shadow:0 0 0 2px var(--ds-border-selected,#4c9aff)}
|
|
43
|
+
._nt751r31:focus{outline-color:currentColor}
|
|
44
|
+
._bfw7h6cr:hover{border:1px solid var(--ds-border,#dfe1e6)}
|
|
45
|
+
._4cvxmr28:hover{border-color:var(--ds-border-accent-blue,#2684ff)}
|
|
46
|
+
._1bnxglyw:hover{text-decoration-line:none}
|
|
47
|
+
._9oik18uv:hover{text-decoration-color:initial}
|
|
48
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
49
|
+
._1di629zg:active{background-color:var(--ds-background-selected,#deebff)}
|
|
50
|
+
._1iohnqa1:active{text-decoration-style:solid}
|
|
51
|
+
._1nrm18uv:active{text-decoration-color:initial}
|
|
52
|
+
._c2waglyw:active{text-decoration-line:none}
|
|
53
|
+
@supports not (-webkit-line-clamp:1){._17bix7n9{padding:var(--ds-space-025,2px) 0}._nr8z1o8l{display:inline-block}._102kqslr{max-height:22px}}
|