@atlaskit/smart-card 26.55.2 → 26.56.1
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 +20 -0
- package/dist/cjs/constants.js +1 -0
- package/dist/cjs/extractors/flexible/actions/extract-copy-link-action.js +21 -0
- package/dist/cjs/extractors/flexible/actions/index.js +2 -1
- package/dist/cjs/messages.js +10 -0
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -3
- package/dist/cjs/view/BlockCard/views/styled.js +5 -3
- package/dist/cjs/view/Card/types.js +1 -0
- package/dist/cjs/view/EmbedCard/views/unresolved-view/styled.js +29 -8
- package/dist/cjs/view/EmbedModal/components/embed-content/index.js +5 -4
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +24 -7
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/index.js +6 -4
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +12 -4
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/index.js +88 -0
- package/dist/cjs/view/FlexibleCard/components/actions/copy-link-action/types.js +5 -0
- package/dist/cjs/view/FlexibleCard/components/actions/index.js +8 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.js +5 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +6 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +54 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +21 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +15 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +3 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +34 -7
- package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +13 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +16 -4
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -3
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +27 -4
- package/dist/cjs/view/FlexibleCard/components/container/index.js +2 -0
- package/dist/cjs/view/FlexibleCard/components/container/layered-link/index.js +33 -3
- package/dist/cjs/view/FlexibleCard/components/elements/atlaskit-badge/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +10 -3
- package/dist/cjs/view/FlexibleCard/components/elements/badge/index.js +16 -4
- package/dist/cjs/view/FlexibleCard/components/elements/date-time/index.js +6 -3
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +23 -7
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +38 -8
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +5 -3
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +46 -6
- package/dist/cjs/view/FlexibleCard/components/elements/media/index.js +31 -3
- package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +7 -3
- package/dist/cjs/view/FlexibleCard/components/utils.js +1 -0
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +1 -1
- package/dist/cjs/view/HoverCard/components/views/forbidden/styled.js +16 -6
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +2 -1
- package/dist/cjs/view/HoverCard/components/views/resolved/styled.js +10 -3
- package/dist/cjs/view/HoverCard/components/views/resolving/styled.js +23 -7
- package/dist/cjs/view/HoverCard/components/views/unauthorised/styled.js +14 -6
- package/dist/cjs/view/HoverCard/styled.js +4 -0
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +36 -10
- package/dist/cjs/view/InlineCard/ResolvingView/styled.js +4 -3
- package/dist/cjs/view/InlineCard/styled.js +37 -6
- package/dist/cjs/view/LinkUrl/LinkWarningModal/styled.js +4 -4
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/Icon.js +12 -4
- package/dist/cjs/view/common/ai-icon-loading/index.js +12 -3
- package/dist/es2019/constants.js +1 -0
- package/dist/es2019/extractors/flexible/actions/extract-copy-link-action.js +15 -0
- package/dist/es2019/extractors/flexible/actions/index.js +2 -0
- package/dist/es2019/messages.js +10 -0
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -5
- package/dist/es2019/view/BlockCard/views/styled.js +4 -4
- package/dist/es2019/view/Card/types.js +1 -0
- package/dist/es2019/view/EmbedCard/views/unresolved-view/styled.js +29 -29
- package/dist/es2019/view/EmbedModal/components/embed-content/index.js +4 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +23 -26
- package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/index.js +6 -4
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +12 -4
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/index.js +53 -0
- package/dist/es2019/view/FlexibleCard/components/actions/copy-link-action/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.js +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +6 -2
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +44 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +15 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +15 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +29 -34
- package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +3 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +11 -13
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/index.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +14 -16
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -3
- package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +25 -26
- package/dist/es2019/view/FlexibleCard/components/container/index.js +2 -0
- package/dist/es2019/view/FlexibleCard/components/container/layered-link/index.js +16 -18
- package/dist/es2019/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -4
- package/dist/es2019/view/FlexibleCard/components/elements/avatar-group/index.js +8 -7
- package/dist/es2019/view/FlexibleCard/components/elements/badge/index.js +14 -12
- package/dist/es2019/view/FlexibleCard/components/elements/date-time/index.js +5 -6
- package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +20 -23
- package/dist/es2019/view/FlexibleCard/components/elements/link/index.js +33 -40
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +4 -4
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +42 -53
- package/dist/es2019/view/FlexibleCard/components/elements/media/index.js +28 -32
- package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +6 -7
- package/dist/es2019/view/FlexibleCard/components/utils.js +1 -0
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +2 -2
- package/dist/es2019/view/HoverCard/components/views/forbidden/styled.js +16 -16
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +2 -1
- package/dist/es2019/view/HoverCard/components/views/resolved/styled.js +9 -7
- package/dist/es2019/view/HoverCard/components/views/resolving/styled.js +22 -22
- package/dist/es2019/view/HoverCard/components/views/unauthorised/styled.js +13 -13
- package/dist/es2019/view/HoverCard/styled.js +4 -0
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +36 -40
- package/dist/es2019/view/InlineCard/ResolvingView/styled.js +4 -4
- package/dist/es2019/view/InlineCard/styled.js +34 -35
- package/dist/es2019/view/LinkUrl/LinkWarningModal/styled.js +4 -4
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/Icon.js +11 -11
- package/dist/es2019/view/common/ai-icon-loading/index.js +10 -14
- package/dist/esm/constants.js +1 -0
- package/dist/esm/extractors/flexible/actions/extract-copy-link-action.js +15 -0
- package/dist/esm/extractors/flexible/actions/index.js +2 -1
- package/dist/esm/messages.js +10 -0
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/types.js +1 -1
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +5 -3
- package/dist/esm/view/BlockCard/views/styled.js +5 -3
- package/dist/esm/view/Card/types.js +1 -0
- package/dist/esm/view/EmbedCard/views/unresolved-view/styled.js +29 -7
- package/dist/esm/view/EmbedModal/components/embed-content/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +22 -6
- package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/index.js +6 -4
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +12 -4
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/index.js +78 -0
- package/dist/esm/view/FlexibleCard/components/actions/copy-link-action/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/actions/index.js +2 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.js +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-state-error.js +6 -2
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.js +47 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.js +15 -0
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +15 -1
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +3 -1
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +34 -7
- package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +3 -3
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +13 -3
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/index.js +3 -3
- package/dist/esm/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +3 -3
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +16 -4
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -3
- package/dist/esm/view/FlexibleCard/components/blocks/utils.js +2 -0
- package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +26 -4
- package/dist/esm/view/FlexibleCard/components/container/index.js +2 -0
- package/dist/esm/view/FlexibleCard/components/container/layered-link/index.js +32 -3
- package/dist/esm/view/FlexibleCard/components/elements/atlaskit-badge/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/avatar-group/index.js +11 -3
- package/dist/esm/view/FlexibleCard/components/elements/badge/index.js +16 -4
- package/dist/esm/view/FlexibleCard/components/elements/date-time/index.js +5 -3
- package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +21 -6
- package/dist/esm/view/FlexibleCard/components/elements/link/index.js +36 -7
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +4 -3
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +46 -5
- package/dist/esm/view/FlexibleCard/components/elements/media/index.js +30 -3
- package/dist/esm/view/FlexibleCard/components/elements/text/index.js +6 -3
- package/dist/esm/view/FlexibleCard/components/utils.js +1 -0
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +2 -2
- package/dist/esm/view/HoverCard/components/views/forbidden/styled.js +16 -5
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +2 -1
- package/dist/esm/view/HoverCard/components/views/resolved/styled.js +10 -3
- package/dist/esm/view/HoverCard/components/views/resolving/styled.js +23 -6
- package/dist/esm/view/HoverCard/components/views/unauthorised/styled.js +14 -5
- package/dist/esm/view/HoverCard/styled.js +4 -0
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +36 -10
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +4 -3
- package/dist/esm/view/InlineCard/styled.js +37 -6
- package/dist/esm/view/LinkUrl/LinkWarningModal/styled.js +4 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/Icon.js +11 -4
- package/dist/esm/view/common/ai-icon-loading/index.js +11 -3
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/extractors/flexible/actions/extract-copy-link-action.d.ts +4 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/flexible-ui-context/types.d.ts +4 -0
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +1 -1
- package/dist/types/view/Card/types.d.ts +2 -1
- package/dist/types/view/FlexibleCard/components/actions/action/action-button/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +19 -0
- package/dist/types/view/FlexibleCard/components/actions/copy-link-action/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/actions/copy-link-action/types.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.d.ts +3 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.d.ts +12 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +1 -1
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +3 -1
- package/dist/types/view/FlexibleCard/components/elements/avatar-group/index.d.ts +0 -1
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +2 -1
- package/dist/types/view/HoverCard/types.d.ts +2 -1
- package/dist/types-ts4.5/constants.d.ts +1 -0
- package/dist/types-ts4.5/extractors/flexible/actions/extract-copy-link-action.d.ts +4 -0
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/flexible-ui-context/types.d.ts +4 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +2 -1
- package/dist/types-ts4.5/view/Card/types.d.ts +2 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/types.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-stack-item/types.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +19 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/copy-link-action/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/copy-link-action/types.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/actions/index.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/types.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-motion-wrapper/types.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/index.d.ts +12 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/feature-discovery/styled.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +1 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +3 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/avatar-group/index.d.ts +0 -1
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +2 -1
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +2 -1
- package/package.json +3 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject
|
|
2
|
+
var _templateObject;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkPosition, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
|
|
@@ -8,25 +8,52 @@ import { getMaxLineHeight, getTruncateStyles } from '../../utils';
|
|
|
8
8
|
var getAlignmentStyles = function getAlignmentStyles(align) {
|
|
9
9
|
switch (align) {
|
|
10
10
|
case SmartLinkAlignment.Right:
|
|
11
|
-
return css(
|
|
11
|
+
return css({
|
|
12
|
+
WebkitBoxAlign: 'end',
|
|
13
|
+
MsFlexAlign: 'end',
|
|
14
|
+
justifyContent: 'flex-end',
|
|
15
|
+
textAlign: 'right'
|
|
16
|
+
});
|
|
12
17
|
case SmartLinkAlignment.Left:
|
|
13
18
|
default:
|
|
14
|
-
return css(
|
|
19
|
+
return css({
|
|
20
|
+
WebkitBoxAlign: 'start',
|
|
21
|
+
MsFlexAlign: 'start',
|
|
22
|
+
justifyContent: 'flex-start',
|
|
23
|
+
textAlign: 'left'
|
|
24
|
+
});
|
|
15
25
|
}
|
|
16
26
|
};
|
|
17
27
|
var getGapStyles = function getGapStyles(size, align) {
|
|
18
28
|
var gap = getGapSize(size);
|
|
19
29
|
if (align === SmartLinkAlignment.Right) {
|
|
20
|
-
return css(
|
|
30
|
+
return css({
|
|
31
|
+
'> span': {
|
|
32
|
+
marginLeft: "".concat(gap, "rem")
|
|
33
|
+
},
|
|
34
|
+
'> span:first-child': {
|
|
35
|
+
marginLeft: 'initial'
|
|
36
|
+
}
|
|
37
|
+
});
|
|
21
38
|
}
|
|
22
|
-
return css(
|
|
39
|
+
return css({
|
|
40
|
+
'> span': {
|
|
41
|
+
marginRight: "".concat(gap, "rem"),
|
|
42
|
+
'&:last-child': {
|
|
43
|
+
marginRight: 'initial'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
23
47
|
};
|
|
24
48
|
var getHorizontalDirectionStyles = function getHorizontalDirectionStyles(size, align) {
|
|
25
49
|
var lineHeight = getMaxLineHeight(size);
|
|
26
|
-
|
|
50
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
51
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n vertical-align: middle;\n ", "\n\n > span, > div {\n vertical-align: middle;\n\n &[data-smart-element-date-time],\n &[data-smart-element-text] {\n // Show all/wrapped/truncated\n display: inline;\n }\n }\n\n ", "\n "])), getTruncateStyles(1, lineHeight + 'rem'), getGapStyles(size, align));
|
|
27
52
|
};
|
|
28
53
|
export var getElementGroupStyles = function getElementGroupStyles(direction, size, align, width, position) {
|
|
29
|
-
return css(
|
|
54
|
+
return css(getBaseStyles(direction, size), getAlignmentStyles(align), {
|
|
55
|
+
minWidth: '10%'
|
|
56
|
+
}, width === SmartLinkWidth.Flexible ? "flex: 1 3;" : '', direction === SmartLinkDirection.Horizontal ? getHorizontalDirectionStyles(size, align) : '', position === SmartLinkPosition.Top ? 'align-self: flex-start;' : '');
|
|
30
57
|
};
|
|
31
58
|
|
|
32
59
|
/**
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
3
|
var _excluded = ["maxLines", "status", "testId", "primary", "secondary"];
|
|
5
|
-
var _templateObject;
|
|
6
4
|
import React from 'react';
|
|
7
5
|
import { css } from '@emotion/react';
|
|
8
6
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkStatus, SmartLinkWidth } from '../../../../../constants';
|
|
@@ -19,7 +17,9 @@ var getElementGroupStyles = function getElementGroupStyles(size, maxLines) {
|
|
|
19
17
|
// We need the height of the line to be equal on both left and right
|
|
20
18
|
// sides so they line up nicely.
|
|
21
19
|
var lineHeight = getMaxLineHeight(size);
|
|
22
|
-
return css(
|
|
20
|
+
return css({
|
|
21
|
+
lineHeight: "".concat(lineHeight, "rem")
|
|
22
|
+
}, getTruncateStyles(maxLines, lineHeight + 'rem'));
|
|
23
23
|
};
|
|
24
24
|
var getMaxLines = function getMaxLines(maxLines) {
|
|
25
25
|
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
4
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
5
5
|
var _excluded = ["ignoreContainerPadding", "onError", "overrideCss", "placement", "testId", "overrideUrl"];
|
|
6
|
-
var _templateObject
|
|
6
|
+
var _templateObject;
|
|
7
7
|
/** @jsx jsx */
|
|
8
8
|
import React, { useCallback, useEffect, useState } from 'react';
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
@@ -29,10 +29,20 @@ import { Preview } from '../../../elements';
|
|
|
29
29
|
var getPreviewBlockStyles = function getPreviewBlockStyles(placement, ignoreContainerPadding) {
|
|
30
30
|
if (placement === MediaPlacement.Left || placement === MediaPlacement.Right) {
|
|
31
31
|
var containerPadding = ignoreContainerPadding ? '0rem' : 'var(--container-padding)';
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
32
33
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n top: ", ";\n bottom: ", ";\n width: calc(var(--preview-block-width) - ", ");\n\n ", "\n ", "\n\n [data-smart-element-media='image'] {\n aspect-ratio: unset;\n padding-top: unset;\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n "])), containerPadding, containerPadding, containerPadding, placement === MediaPlacement.Left ? "left: ".concat(containerPadding, ";") : '', placement === MediaPlacement.Right ? "right: ".concat(containerPadding, ";") : '');
|
|
33
34
|
}
|
|
34
35
|
if (ignoreContainerPadding) {
|
|
35
|
-
return css(
|
|
36
|
+
return css({
|
|
37
|
+
marginLeft: 'calc(var(--container-gap-left) * -1)',
|
|
38
|
+
marginRight: 'calc(var(--container-gap-right) * -1)',
|
|
39
|
+
'&:first-of-type': {
|
|
40
|
+
marginTop: 'calc(var(--container-padding) * -1)'
|
|
41
|
+
},
|
|
42
|
+
'&:last-of-type': {
|
|
43
|
+
marginBottom: 'calc(var(--container-padding) * -1)'
|
|
44
|
+
}
|
|
45
|
+
});
|
|
36
46
|
}
|
|
37
47
|
};
|
|
38
48
|
|
|
@@ -56,7 +66,7 @@ var PreviewBlockResolvedView = function PreviewBlockResolvedView(_ref) {
|
|
|
56
66
|
styles = _useState2[0],
|
|
57
67
|
setStyles = _useState2[1];
|
|
58
68
|
var updateStyles = useCallback(function () {
|
|
59
|
-
setStyles(css(
|
|
69
|
+
setStyles(css(getPreviewBlockStyles(placement, ignoreContainerPadding), overrideCss));
|
|
60
70
|
}, [ignoreContainerPadding, overrideCss, placement]);
|
|
61
71
|
useEffect(function () {
|
|
62
72
|
updateStyles();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
6
|
-
var _templateObject;
|
|
7
5
|
var _excluded = ["testId", "url", "renderers"];
|
|
8
6
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
9
7
|
import React, { useEffect, useState } from 'react';
|
|
@@ -87,7 +85,9 @@ var RelatedUrlsBlock = function RelatedUrlsBlock(_ref) {
|
|
|
87
85
|
if (relatedUrls) {
|
|
88
86
|
return /*#__PURE__*/React.createElement(RelatedUrlsResolvedView, _extends({
|
|
89
87
|
renderers: renderers,
|
|
90
|
-
overrideCss: css(
|
|
88
|
+
overrideCss: css({
|
|
89
|
+
minHeight: '1.55rem'
|
|
90
|
+
}),
|
|
91
91
|
testId: "".concat(testId, "-resolved-view"),
|
|
92
92
|
relatedUrlsResponse: relatedUrls
|
|
93
93
|
}, blockProps));
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
var _templateObject;
|
|
4
2
|
import React, { useCallback, useState } from 'react';
|
|
5
3
|
import { useIntl } from 'react-intl-next';
|
|
6
4
|
import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
@@ -42,7 +40,9 @@ var RelatedUrlList = function RelatedUrlList(_ref) {
|
|
|
42
40
|
alignBlock: "center",
|
|
43
41
|
spread: "space-between"
|
|
44
42
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
45
|
-
overrideCss: css(
|
|
43
|
+
overrideCss: css({
|
|
44
|
+
fontWeight: "var(--ds-font-weight-medium, 500)"
|
|
45
|
+
}),
|
|
46
46
|
message: {
|
|
47
47
|
descriptor: title
|
|
48
48
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
4
3
|
var _excluded = ["actionGroup", "retry", "position", "testId", "title", "hideIcon"];
|
|
5
|
-
var _templateObject, _templateObject2;
|
|
6
4
|
/** @jsx jsx */
|
|
7
5
|
import React from 'react';
|
|
8
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -12,10 +10,24 @@ import Block from '../../block';
|
|
|
12
10
|
import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize } from '../../../../../../constants';
|
|
13
11
|
import { getLinkLineHeight, getLinkSizeStyles, getTruncateStyles } from '../../../utils';
|
|
14
12
|
import ElementGroup from '../../element-group';
|
|
15
|
-
var actionStyles = css(
|
|
13
|
+
var actionStyles = css({
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
':hover': {
|
|
16
|
+
color: "var(--ds-text-subtle, #8993A4)",
|
|
17
|
+
textDecoration: 'underline'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
16
20
|
var getMessageStyles = function getMessageStyles(size, hasAction) {
|
|
17
21
|
var sizeStyles = getLinkSizeStyles(size);
|
|
18
|
-
return css(
|
|
22
|
+
return css({
|
|
23
|
+
flex: '1 1 auto',
|
|
24
|
+
justifyContent: 'flex-end'
|
|
25
|
+
}, hasAction ? actionStyles : '', sizeStyles, getTruncateStyles(1, getLinkLineHeight(size)), {
|
|
26
|
+
color: "var(--ds-text-disabled, #6B778C)",
|
|
27
|
+
':focus': {
|
|
28
|
+
outline: "var(--ds-border-focused, #388BFF)".concat(" solid 2px")
|
|
29
|
+
}
|
|
30
|
+
});
|
|
19
31
|
};
|
|
20
32
|
|
|
21
33
|
/**
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _templateObject;
|
|
5
3
|
var _excluded = ["actionGroup", "metadata", "position", "subtitle", "testId", "text", "title", "metadataPosition", "hideIcon"];
|
|
6
4
|
import React from 'react';
|
|
7
5
|
import { css } from '@emotion/react';
|
|
@@ -38,7 +36,9 @@ var TitleBlockResolvedView = function TitleBlockResolvedView(_ref) {
|
|
|
38
36
|
}), /*#__PURE__*/React.createElement(ElementGroup, {
|
|
39
37
|
direction: SmartLinkDirection.Vertical,
|
|
40
38
|
width: SmartLinkWidth.Flexible,
|
|
41
|
-
overrideCss: css(
|
|
39
|
+
overrideCss: css({
|
|
40
|
+
gap: "var(--ds-space-050, 0.25rem)"
|
|
41
|
+
})
|
|
42
42
|
}, title, subtitleElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
43
43
|
direction: SmartLinkDirection.Horizontal
|
|
44
44
|
}, subtitleElements)), metadataElements && /*#__PURE__*/React.createElement(ElementGroup, {
|
|
@@ -70,6 +70,8 @@ export var getBaseStyles = function getBaseStyles(direction, size) {
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
+
|
|
74
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
73
75
|
export var highlightRemoveStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n outline: none !important;\n outline-color: inherit;\n color: inherit;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n"])));
|
|
74
76
|
var isActionGroup = function isActionGroup(node) {
|
|
75
77
|
return /*#__PURE__*/React.isValidElement(node) && node.type === ActionGroup;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { css, jsx, keyframes } from '@emotion/react';
|
|
@@ -7,8 +5,32 @@ var LoadingSkeleton = function LoadingSkeleton(_ref) {
|
|
|
7
5
|
var testId = _ref.testId,
|
|
8
6
|
width = _ref.width,
|
|
9
7
|
height = _ref.height;
|
|
10
|
-
var animationNameStyles = keyframes(
|
|
11
|
-
|
|
8
|
+
var animationNameStyles = keyframes({
|
|
9
|
+
'0%': {
|
|
10
|
+
backgroundPosition: '50% 0'
|
|
11
|
+
},
|
|
12
|
+
'100%': {
|
|
13
|
+
backgroundPosition: '-50% 0'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
var styles = css({
|
|
17
|
+
width: "".concat(width, "rem"),
|
|
18
|
+
height: "".concat(height, "rem"),
|
|
19
|
+
borderRadius: '2px',
|
|
20
|
+
userSelect: 'none',
|
|
21
|
+
background: "var(--ds-skeleton-subtle, #f6f7f8)",
|
|
22
|
+
backgroundImage: "linear-gradient( to right, transparent 0%, ".concat("var(--ds-skeleton, #edeef1)", " 20%, transparent 40%, transparent 100% )"),
|
|
23
|
+
backgroundRepeat: 'no-repeat',
|
|
24
|
+
backgroundSize: '280% 100%',
|
|
25
|
+
display: 'inline-block',
|
|
26
|
+
animationDuration: '1s',
|
|
27
|
+
animationFillMode: 'forwards',
|
|
28
|
+
animationIterationCount: 'infinite',
|
|
29
|
+
animationName: animationNameStyles,
|
|
30
|
+
animationTimingFunction: 'linear'
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- needs dynamic css
|
|
12
34
|
return jsx("span", {
|
|
13
35
|
css: styles,
|
|
14
36
|
"data-testid": testId
|
|
@@ -88,6 +88,8 @@ var getChildrenOptions = function getChildrenOptions(children, context) {
|
|
|
88
88
|
};
|
|
89
89
|
export var getContainerStyles = function getContainerStyles(size, hideBackground, hideElevation, hidePadding, clickableContainer, childrenOptions) {
|
|
90
90
|
var paddingCss = getContainerPaddingStyles(size, hidePadding, childrenOptions);
|
|
91
|
+
|
|
92
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
91
93
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n gap: ", " 0;\n flex-direction: column;\n min-width: 0;\n overflow-x: hidden;\n position: relative;\n ", "\n ", "\n ", "\n ", "\n &:hover ~ .actions-button-group {\n opacity: 1;\n }\n a:focus,\n .has-action:focus {\n outline-offset: -2px;\n }\n "])), getGap(size), hideBackground ? '' : "background-color: ".concat("var(--ds-surface-raised, #FFFFFF)", ";"), paddingCss, hideElevation ? '' : elevationStyles, clickableContainer ? clickableContainerStyles : '');
|
|
92
94
|
};
|
|
93
95
|
var renderChildren = function renderChildren(children, containerSize, containerTheme, status, retry, onClick) {
|
|
@@ -1,10 +1,39 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { jsx, css } from '@emotion/react';
|
|
6
4
|
import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
|
|
7
|
-
var styles = css(
|
|
5
|
+
var styles = css({
|
|
6
|
+
// Stretch the invisible link over the whole of the post.
|
|
7
|
+
// Hide the link’s text.
|
|
8
|
+
top: 0,
|
|
9
|
+
right: 0,
|
|
10
|
+
bottom: 0,
|
|
11
|
+
left: 0,
|
|
12
|
+
overflow: 'hidden',
|
|
13
|
+
textIndent: '100%',
|
|
14
|
+
whiteSpace: 'nowrap',
|
|
15
|
+
// Needs a heightened specificity to trump other anchor.
|
|
16
|
+
// Stack it under all other links in the post text.
|
|
17
|
+
'a&.layered-link': {
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
zIndex: 0
|
|
20
|
+
},
|
|
21
|
+
// When hovering over the layered link, any hidden action buttons inside
|
|
22
|
+
// the Container should become visible.
|
|
23
|
+
// As actions resides inside blocks and layered link is expected to be
|
|
24
|
+
// on the same level of blocks. That makes the blocks, e.g. TitleBlock,
|
|
25
|
+
// its sibling. Using general sibling combinator here to apply styling to
|
|
26
|
+
// all the siblings of layered link.
|
|
27
|
+
// The general sibling combinator (~) separates two selectors and matches all
|
|
28
|
+
// iterations of the second element, that are following the first element
|
|
29
|
+
// (though not necessarily immediately), and are children of the same parent
|
|
30
|
+
// element.
|
|
31
|
+
'&:hover ~ *': {
|
|
32
|
+
'.actions-button-group': {
|
|
33
|
+
opacity: 1
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
8
37
|
|
|
9
38
|
/**
|
|
10
39
|
* An anchor component to cover the entire container creating a clickable area.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import AKBadge from '@atlaskit/badge';
|
|
6
4
|
import { css, jsx } from '@emotion/react';
|
|
7
|
-
var badgeStyles = css(
|
|
5
|
+
var badgeStyles = css({
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
display: 'inline-flex'
|
|
8
|
+
});
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* A base element that displays a visual indicator for a numeric value
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
-
var _templateObject
|
|
3
|
+
var _templateObject;
|
|
4
4
|
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; }
|
|
5
5
|
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) { _defineProperty(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; }
|
|
6
6
|
/** @jsx jsx */
|
|
7
|
+
|
|
7
8
|
import React, { useMemo } from 'react';
|
|
8
9
|
import { css, jsx } from '@emotion/react';
|
|
9
10
|
import AtlaskitAvatarGroup from '@atlaskit/avatar-group';
|
|
@@ -14,7 +15,13 @@ import { ElementName } from '../../../../../constants';
|
|
|
14
15
|
import { getFormattedMessageAsString } from '../../utils';
|
|
15
16
|
var MAX_COUNT = 4;
|
|
16
17
|
var getStyles = function getStyles(size) {
|
|
17
|
-
var styles = css(
|
|
18
|
+
var styles = css({
|
|
19
|
+
display: 'inline-flex',
|
|
20
|
+
ul: {
|
|
21
|
+
marginRight: "var(--ds-space-100, 0.5rem)",
|
|
22
|
+
marginTop: 0
|
|
23
|
+
}
|
|
24
|
+
});
|
|
18
25
|
switch (size) {
|
|
19
26
|
case SmartLinkSize.XLarge:
|
|
20
27
|
case SmartLinkSize.Large:
|
|
@@ -23,7 +30,8 @@ var getStyles = function getStyles(size) {
|
|
|
23
30
|
case SmartLinkSize.Medium:
|
|
24
31
|
case SmartLinkSize.Small:
|
|
25
32
|
default:
|
|
26
|
-
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
34
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n li {\n span,\n svg {\n max-height: 1.25rem;\n max-width: 1.25rem;\n }\n }\n "])), styles);
|
|
27
35
|
}
|
|
28
36
|
};
|
|
29
37
|
var getPersonNameWithPrefix = function getPersonNameWithPrefix(elementName, personName, intl) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
-
var _templateObject,
|
|
3
|
+
var _templateObject, _messageMapper;
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
@@ -9,9 +9,21 @@ import { IconType } from '../../../../../constants';
|
|
|
9
9
|
import { messages } from '../../../../../messages';
|
|
10
10
|
import ImageIcon from '../../common/image-icon';
|
|
11
11
|
import AtlaskitIcon from '../../common/atlaskit-icon';
|
|
12
|
-
var badgeStyles = css(
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
var badgeStyles = css({
|
|
13
|
+
alignItems: 'center',
|
|
14
|
+
display: 'inline-flex',
|
|
15
|
+
minWidth: 'fit-content'
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
19
|
+
var iconStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n line-height: 0;\n vertical-align: middle;\n ", "\n img,\n span,\n svg {\n line-height: 0;\n vertical-align: middle;\n }\n"])), "var(--ds-icon-subtle, #626F86)", getIconSizeStyles('1rem'));
|
|
20
|
+
var labelStyles = css({
|
|
21
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
22
|
+
fontSize: '0.75rem',
|
|
23
|
+
lineHeight: '1rem',
|
|
24
|
+
paddingLeft: "var(--ds-space-025, 0.125rem)",
|
|
25
|
+
verticalAlign: 'middle'
|
|
26
|
+
});
|
|
15
27
|
var messageMapper = (_messageMapper = {}, _defineProperty(_messageMapper, IconType.PriorityBlocker, messages.priority_blocker), _defineProperty(_messageMapper, IconType.PriorityCritical, messages.priority_critical), _defineProperty(_messageMapper, IconType.PriorityHigh, messages.priority_high), _defineProperty(_messageMapper, IconType.PriorityHighest, messages.priority_highest), _defineProperty(_messageMapper, IconType.PriorityLow, messages.priority_low), _defineProperty(_messageMapper, IconType.PriorityLowest, messages.priority_lowest), _defineProperty(_messageMapper, IconType.PriorityMajor, messages.priority_major), _defineProperty(_messageMapper, IconType.PriorityMedium, messages.priority_medium), _defineProperty(_messageMapper, IconType.PriorityMinor, messages.priority_minor), _defineProperty(_messageMapper, IconType.PriorityTrivial, messages.priority_trivial), _defineProperty(_messageMapper, IconType.PriorityUndefined, messages.priority_undefined), _messageMapper);
|
|
16
28
|
var getFormattedMessageFromIcon = function getFormattedMessageFromIcon(icon) {
|
|
17
29
|
if (icon) {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
-
var _templateObject;
|
|
4
2
|
/** @jsx jsx */
|
|
5
3
|
import React from 'react';
|
|
6
4
|
import { useIntl, FormattedMessage } from 'react-intl-next';
|
|
@@ -8,7 +6,11 @@ import { css, jsx } from '@emotion/react';
|
|
|
8
6
|
import { getTruncateStyles } from '../../utils';
|
|
9
7
|
import { selectUnit } from '@formatjs/intl-utils';
|
|
10
8
|
import { messages } from '../../../../../messages';
|
|
11
|
-
var styles = css(
|
|
9
|
+
var styles = css({
|
|
10
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
11
|
+
fontSize: '0.75rem',
|
|
12
|
+
lineHeight: '1rem'
|
|
13
|
+
}, getTruncateStyles(1));
|
|
12
14
|
var typeToDescriptorMap = {
|
|
13
15
|
created: {
|
|
14
16
|
relative: messages.created_on_relative,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React, { useMemo } from 'react';
|
|
5
3
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
@@ -11,17 +9,33 @@ import { getIconSizeStyles, getIconWidth, getTruncateStyles } from '../../utils'
|
|
|
11
9
|
var getPositionStyles = function getPositionStyles(position) {
|
|
12
10
|
switch (position) {
|
|
13
11
|
case SmartLinkPosition.Center:
|
|
14
|
-
return css(
|
|
12
|
+
return css({
|
|
13
|
+
alignSelf: 'center'
|
|
14
|
+
});
|
|
15
15
|
case SmartLinkPosition.Top:
|
|
16
16
|
default:
|
|
17
|
-
return css(
|
|
17
|
+
return css({
|
|
18
|
+
alignSelf: 'flex-start',
|
|
19
|
+
margin: 0
|
|
20
|
+
});
|
|
18
21
|
}
|
|
19
22
|
};
|
|
20
23
|
var getIconStyles = function getIconStyles(position, width) {
|
|
21
|
-
return css(
|
|
24
|
+
return css(getPositionStyles(position), getIconSizeStyles(width));
|
|
22
25
|
};
|
|
23
26
|
var getCustomRenderStyles = function getCustomRenderStyles(value) {
|
|
24
|
-
return css(
|
|
27
|
+
return css(getTruncateStyles(1, value), {
|
|
28
|
+
lineHeight: value,
|
|
29
|
+
fontSize: value,
|
|
30
|
+
textAlign: 'center',
|
|
31
|
+
textOverflow: 'clip',
|
|
32
|
+
WebkitBoxOrient: 'unset',
|
|
33
|
+
span: {
|
|
34
|
+
margin: 0,
|
|
35
|
+
padding: 0,
|
|
36
|
+
verticalAlign: 'baseline'
|
|
37
|
+
}
|
|
38
|
+
});
|
|
25
39
|
};
|
|
26
40
|
var renderAtlaskitIcon = function renderAtlaskitIcon(icon, label, testId) {
|
|
27
41
|
if (icon) {
|
|
@@ -76,6 +90,7 @@ var Icon = function Icon(_ref) {
|
|
|
76
90
|
var styles = getIconStyles(position, width);
|
|
77
91
|
var renderStyles = render ? getCustomRenderStyles(width) : undefined;
|
|
78
92
|
return jsx("div", {
|
|
93
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- needs dynamic css
|
|
79
94
|
css: [styles, renderStyles, overrideCss],
|
|
80
95
|
"data-fit-to-content": true,
|
|
81
96
|
"data-smart-element": name,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
2
|
/** @jsx jsx */
|
|
5
3
|
import React, { useMemo } from 'react';
|
|
6
4
|
import { css, jsx } from '@emotion/react';
|
|
@@ -11,24 +9,55 @@ import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked
|
|
|
11
9
|
var DEFAULT_MAX_LINES = 2;
|
|
12
10
|
var MAXIMUM_MAX_LINES = 2;
|
|
13
11
|
var MINIMUM_MAX_LINES = 1;
|
|
14
|
-
var containerStyles = css(
|
|
12
|
+
var containerStyles = css({
|
|
13
|
+
flex: '1 1 auto'
|
|
14
|
+
});
|
|
15
15
|
var getThemeStyles = function getThemeStyles(theme) {
|
|
16
16
|
switch (theme) {
|
|
17
17
|
case SmartLinkInternalTheme.Grey:
|
|
18
18
|
// We are being specifc with the CSS selectors to ensure that Confluence overrides
|
|
19
19
|
// do not affect our internal Smart Card styles
|
|
20
|
-
return css(
|
|
20
|
+
return css({
|
|
21
|
+
'a&': {
|
|
22
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
23
|
+
'&:active, &:visited, &:focus, &:hover': {
|
|
24
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
25
|
+
textDecoration: 'underline'
|
|
26
|
+
},
|
|
27
|
+
fontSize: '12px'
|
|
28
|
+
}
|
|
29
|
+
});
|
|
21
30
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
22
31
|
case SmartLinkTheme.Black:
|
|
23
|
-
return css(
|
|
32
|
+
return css({
|
|
33
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
34
|
+
':active': {
|
|
35
|
+
color: "var(--ds-text, #172B4D)"
|
|
36
|
+
},
|
|
37
|
+
':hover': {
|
|
38
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
39
|
+
textDecoration: 'underline'
|
|
40
|
+
}
|
|
41
|
+
});
|
|
24
42
|
case SmartLinkTheme.Link:
|
|
25
43
|
default:
|
|
26
|
-
return css(
|
|
44
|
+
return css({
|
|
45
|
+
color: "var(--ds-link, #0C66E4)",
|
|
46
|
+
':active': {
|
|
47
|
+
color: "var(--ds-link-pressed, #0055CC)"
|
|
48
|
+
},
|
|
49
|
+
':hover': {
|
|
50
|
+
color: "var(--ds-link, #0C66E4)",
|
|
51
|
+
textDecoration: 'underline'
|
|
52
|
+
}
|
|
53
|
+
});
|
|
27
54
|
}
|
|
28
55
|
};
|
|
29
56
|
var getAnchorStyles = function getAnchorStyles(size, theme, maxLines, hasSpace) {
|
|
30
57
|
var sizeStyles = getLinkSizeStyles(size);
|
|
31
|
-
return css(
|
|
58
|
+
return css({
|
|
59
|
+
flex: '1 1 auto'
|
|
60
|
+
}, sizeStyles, getTruncateStyles(maxLines, getLinkLineHeight(size), hasSpace ? 'break-word' : 'break-all'), getThemeStyles(theme));
|
|
32
61
|
};
|
|
33
62
|
var getMaxLines = function getMaxLines(maxLines) {
|
|
34
63
|
if (maxLines > MAXIMUM_MAX_LINES) {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { css, jsx } from '@emotion/react';
|
|
6
4
|
import AtlaskitLozenge from '@atlaskit/lozenge';
|
|
7
5
|
import LozengeAction from './lozenge-action';
|
|
8
6
|
import { useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
|
|
9
|
-
var styles = css(
|
|
7
|
+
var styles = css({
|
|
8
|
+
display: 'inline-flex',
|
|
9
|
+
lineHeight: 'inherit'
|
|
10
|
+
});
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* A base element that displays a Lozenge.
|