@atlaskit/smart-card 33.4.0 → 34.0.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.
Files changed (143) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/BlockCard/views/styled.js +1 -0
  4. package/dist/cjs/view/EmbedModal/components/link-info/styled.js +2 -0
  5. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +1 -0
  6. package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -0
  7. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -0
  8. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
  9. package/dist/cjs/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
  10. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +1 -0
  11. package/dist/cjs/view/FlexibleCard/components/common/motion-wrapper/index.js +1 -1
  12. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +1 -1
  13. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/index.js +1 -0
  14. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -0
  15. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -0
  16. package/dist/cjs/view/FlexibleCard/components/utils.js +3 -3
  17. package/dist/cjs/view/InlineCard/ErroredView/index.js +6 -2
  18. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +40 -15
  19. package/dist/cjs/view/InlineCard/Frame/index.js +3 -1
  20. package/dist/cjs/view/InlineCard/Frame/styled-emotion.js +137 -0
  21. package/dist/cjs/view/InlineCard/Frame/styled.compiled.css +53 -0
  22. package/dist/cjs/view/InlineCard/Frame/styled.js +49 -124
  23. package/dist/cjs/view/InlineCard/Icon-emotion.js +58 -0
  24. package/dist/cjs/view/InlineCard/Icon.compiled.css +10 -0
  25. package/dist/cjs/view/InlineCard/Icon.js +39 -18
  26. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.compiled.css +6 -0
  27. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +99 -25
  28. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled-emotion.js +95 -0
  29. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.compiled.css +36 -0
  30. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +128 -45
  31. package/dist/cjs/view/InlineCard/ResolvingView/index.js +30 -12
  32. package/dist/cjs/view/InlineCard/ResolvingView/styled-emotion.js +16 -0
  33. package/dist/cjs/view/InlineCard/ResolvingView/styled.compiled.css +5 -0
  34. package/dist/cjs/view/InlineCard/ResolvingView/styled.js +26 -8
  35. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +42 -16
  36. package/dist/cjs/view/InlineCard/styled-emotion.js +55 -0
  37. package/dist/cjs/view/InlineCard/styled.compiled.css +21 -0
  38. package/dist/cjs/view/InlineCard/styled.js +25 -45
  39. package/dist/cjs/view/LinkUrl/index.js +1 -1
  40. package/dist/es2019/utils/analytics/analytics.js +1 -1
  41. package/dist/es2019/view/BlockCard/views/styled.js +1 -0
  42. package/dist/es2019/view/EmbedModal/components/link-info/styled.js +2 -0
  43. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -0
  44. package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -0
  45. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -0
  46. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
  47. package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
  48. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +1 -0
  49. package/dist/es2019/view/FlexibleCard/components/common/motion-wrapper/index.js +1 -1
  50. package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +1 -1
  51. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +1 -0
  52. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -0
  53. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -0
  54. package/dist/es2019/view/FlexibleCard/components/utils.js +3 -3
  55. package/dist/es2019/view/InlineCard/ErroredView/index.js +6 -2
  56. package/dist/es2019/view/InlineCard/ForbiddenView/index.js +40 -15
  57. package/dist/es2019/view/InlineCard/Frame/index.js +3 -1
  58. package/dist/es2019/view/InlineCard/Frame/styled-emotion.js +143 -0
  59. package/dist/es2019/view/InlineCard/Frame/styled.compiled.css +53 -0
  60. package/dist/es2019/view/InlineCard/Frame/styled.js +44 -136
  61. package/dist/es2019/view/InlineCard/Icon-emotion.js +52 -0
  62. package/dist/es2019/view/InlineCard/Icon.compiled.css +10 -0
  63. package/dist/es2019/view/InlineCard/Icon.js +31 -15
  64. package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.compiled.css +6 -0
  65. package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +87 -18
  66. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled-emotion.js +114 -0
  67. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.compiled.css +36 -0
  68. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +115 -43
  69. package/dist/es2019/view/InlineCard/ResolvingView/index.js +30 -12
  70. package/dist/es2019/view/InlineCard/ResolvingView/styled-emotion.js +9 -0
  71. package/dist/es2019/view/InlineCard/ResolvingView/styled.compiled.css +5 -0
  72. package/dist/es2019/view/InlineCard/ResolvingView/styled.js +20 -6
  73. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +42 -16
  74. package/dist/es2019/view/InlineCard/styled-emotion.js +47 -0
  75. package/dist/es2019/view/InlineCard/styled.compiled.css +21 -0
  76. package/dist/es2019/view/InlineCard/styled.js +19 -43
  77. package/dist/es2019/view/LinkUrl/index.js +1 -1
  78. package/dist/esm/utils/analytics/analytics.js +1 -1
  79. package/dist/esm/view/BlockCard/views/styled.js +1 -0
  80. package/dist/esm/view/EmbedModal/components/link-info/styled.js +2 -0
  81. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -0
  82. package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -0
  83. package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -0
  84. package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
  85. package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
  86. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -0
  87. package/dist/esm/view/FlexibleCard/components/common/motion-wrapper/index.js +1 -1
  88. package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +1 -1
  89. package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +1 -0
  90. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -0
  91. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -0
  92. package/dist/esm/view/FlexibleCard/components/utils.js +3 -3
  93. package/dist/esm/view/InlineCard/ErroredView/index.js +6 -2
  94. package/dist/esm/view/InlineCard/ForbiddenView/index.js +40 -15
  95. package/dist/esm/view/InlineCard/Frame/index.js +3 -1
  96. package/dist/esm/view/InlineCard/Frame/styled-emotion.js +131 -0
  97. package/dist/esm/view/InlineCard/Frame/styled.compiled.css +53 -0
  98. package/dist/esm/view/InlineCard/Frame/styled.js +46 -125
  99. package/dist/esm/view/InlineCard/Icon-emotion.js +51 -0
  100. package/dist/esm/view/InlineCard/Icon.compiled.css +10 -0
  101. package/dist/esm/view/InlineCard/Icon.js +36 -17
  102. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.compiled.css +6 -0
  103. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +90 -18
  104. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled-emotion.js +87 -0
  105. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.compiled.css +36 -0
  106. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +124 -43
  107. package/dist/esm/view/InlineCard/ResolvingView/index.js +30 -12
  108. package/dist/esm/view/InlineCard/ResolvingView/styled-emotion.js +9 -0
  109. package/dist/esm/view/InlineCard/ResolvingView/styled.compiled.css +5 -0
  110. package/dist/esm/view/InlineCard/ResolvingView/styled.js +22 -6
  111. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +42 -16
  112. package/dist/esm/view/InlineCard/styled-emotion.js +47 -0
  113. package/dist/esm/view/InlineCard/styled.compiled.css +21 -0
  114. package/dist/esm/view/InlineCard/styled.js +21 -43
  115. package/dist/esm/view/LinkUrl/index.js +1 -1
  116. package/dist/types/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
  117. package/dist/types/view/InlineCard/Frame/styled-emotion.d.ts +17 -0
  118. package/dist/types/view/InlineCard/Frame/styled.d.ts +8 -10
  119. package/dist/types/view/InlineCard/Icon-emotion.d.ts +12 -0
  120. package/dist/types/view/InlineCard/Icon.d.ts +2 -8
  121. package/dist/types/view/InlineCard/IconAndTitleLayout/styled-emotion.d.ts +36 -0
  122. package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -34
  123. package/dist/types/view/InlineCard/ResolvingView/styled-emotion.d.ts +9 -0
  124. package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +1 -8
  125. package/dist/types/view/InlineCard/styled-emotion.d.ts +13 -0
  126. package/dist/types/view/InlineCard/styled.d.ts +1 -12
  127. package/dist/types-ts4.5/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
  128. package/dist/types-ts4.5/view/InlineCard/Frame/styled-emotion.d.ts +17 -0
  129. package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +8 -10
  130. package/dist/types-ts4.5/view/InlineCard/Icon-emotion.d.ts +12 -0
  131. package/dist/types-ts4.5/view/InlineCard/Icon.d.ts +2 -8
  132. package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled-emotion.d.ts +36 -0
  133. package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -34
  134. package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled-emotion.d.ts +9 -0
  135. package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled.d.ts +1 -8
  136. package/dist/types-ts4.5/view/InlineCard/styled-emotion.d.ts +13 -0
  137. package/dist/types-ts4.5/view/InlineCard/styled.d.ts +1 -12
  138. package/hooks/package.json +3 -1
  139. package/hover-card/package.json +3 -1
  140. package/link-url/package.json +3 -1
  141. package/package.json +17 -7
  142. package/ssr/package.json +3 -1
  143. package/types/package.json +3 -1
@@ -1,135 +1,60 @@
1
+ /* styled.tsx generated by @compiled/babel-plugin v0.35.0 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.WrapperSpan = exports.WrapperAnchor = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
- var _styled = _interopRequireDefault(require("@emotion/styled"));
10
+ require("./styled.compiled.css");
11
+ var _runtime = require("@compiled/react/runtime");
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
14
+ var _react = _interopRequireWildcard(require("react"));
10
15
  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
16
+ var _excluded = ["truncateInline", "withoutBackground", "isHovered", "isInteractive", "isSelected", "href"],
17
+ _excluded2 = ["truncateInline", "withoutBackground", "isHovered", "isInteractive", "isSelected", "href"];
18
+ 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); }
19
+ 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
20
  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
- lineHeight: "".concat(lineHeight, "px"),
78
- padding: "var(--ds-space-025, 2px)".concat(" 0px")
79
- }, props.withoutBackground ? {
80
- paddingLeft: 0,
81
- marginLeft: "var(--ds-space-negative-025, -2px)"
82
- } : undefined), {}, {
83
- display: 'inline',
84
- boxDecorationBreak: 'clone',
85
- borderRadius: "var(--ds-border-radius-100, 4px)",
86
- color: "var(--ds-link, ".concat(_colors.B400, ")")
87
- }, props.withoutBackground ? undefined : {
88
- backgroundColor: "var(--ds-surface-raised, white)"
89
- }), isSelected(props)), props.withoutBackground ? undefined : {
90
- border: "1px solid ".concat("var(--ds-border, ".concat(_colors.N40, ")"))
91
- }), {}, {
92
- '&:hover': hoveredStyles,
93
- '&, :hover, :focus, :active': activeHoveredFocusedStyles(props),
94
- transition: '0.1s all ease-in-out',
95
- MozUserSelect: 'none'
96
- }, props.isHovered ? hoveredWihBorderStyles(props) : undefined);
97
- };
98
- var truncateStyles = {
99
- overflow: 'hidden',
100
- textOverflow: 'ellipsis',
101
- wordBreak: 'break-all',
102
- // The height of a truncated card is 1px higher than that of a non-truncated card, so we subtract 1px from the line height.
103
- lineHeight: "".concat(lineHeight - 1, "px"),
104
- display: '-webkit-inline-box',
105
- WebkitLineClamp: 1,
106
- WebkitBoxOrient: 'vertical',
107
- // We need to remove the padding because display: -webkit-inline-box will cause any padding to be
108
- // added to the total height, causing truncated cards to have greater height than non-truncated cards which use display: inline.
109
- padding: 0,
110
- '@supports not (-webkit-line-clamp: 1)': {
111
- display: 'inline-block',
112
- maxHeight: "".concat(lineHeight, "px"),
113
- // If the browser does not support webkit, we don't need to remove the padding
114
- padding: "var(--ds-space-025, 2px)".concat(" 0px")
115
- }
116
- };
117
- var isTruncated = function isTruncated(_ref3) {
118
- var truncateInline = _ref3.truncateInline;
119
- if (truncateInline) {
120
- return truncateStyles;
121
- }
122
- return undefined;
123
- };
124
-
125
- // 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
126
- var WrapperAnchor = exports.WrapperAnchor = _styled.default.a(function (props) {
127
- return _objectSpread(_objectSpread(_objectSpread({}, baseWrapperStyles(props)), isInteractive(props)), isTruncated(props));
21
+ var WrapperSpan = exports.WrapperSpan = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
22
+ var truncateInline = _ref.truncateInline,
23
+ withoutBackground = _ref.withoutBackground,
24
+ isHovered = _ref.isHovered,
25
+ isInteractive = _ref.isInteractive,
26
+ isSelected = _ref.isSelected,
27
+ href = _ref.href,
28
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
29
+ return /*#__PURE__*/_react.default.createElement("span", (0, _extends2.default)({
30
+ ref: ref
31
+ }, props, {
32
+ className: (0, _runtime.ax)(["_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv"])
33
+ }), props.children);
128
34
  });
129
- WrapperAnchor.displayName = 'WrapperAnchor';
130
-
131
- // 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
132
- var WrapperSpan = exports.WrapperSpan = _styled.default.span(function (props) {
133
- return _objectSpread(_objectSpread({}, baseWrapperStyles(props)), isTruncated(props));
35
+ var WrapperAnchor = exports.WrapperAnchor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
36
+ var truncateInline = _ref2.truncateInline,
37
+ withoutBackground = _ref2.withoutBackground,
38
+ isHovered = _ref2.isHovered,
39
+ isInteractive = _ref2.isInteractive,
40
+ isSelected = _ref2.isSelected,
41
+ href = _ref2.href,
42
+ props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
43
+ return /*#__PURE__*/_react.default.createElement("a", (0, _extends2.default)({
44
+ href: href,
45
+ ref: ref
46
+ }, props, {
47
+ className: (0, _runtime.ax)(["_1yt4x7n9 _2rkoiti9 _v56415x0 _vwz4qslr _1e0c1nu9 _16d9qvcn _syaz1y58 _1rkwglyw _4cvxmr28", truncateInline && "_1reo15vq _18m915vq _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _1bto1l2s _1nmz9jpi _vwz4183y _1e0c1abx _1yyjkb7n _sudp1e54 _17bix7n9 _nr8z1o8l _102kqslr", withoutBackground ? "_19bvidpf _18u01i6y" : "_19ith6cr _bfhkhp5a _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _1nrm18uv _c2waglyw _1iohnqa1", isHovered && "_1h6dmr28", isHovered && !withoutBackground && "_4bfu18uv _1hmsglyw _ajmmnqa1", isSelected ? "_12ji1r31 _1qu2glyw _12y31o36 _80omtlke _16qscw00 _uiztglyw _1a3b18uv _4fprglyw _5goinqa1 _9oik18uv _1bnxglyw _jf4cnqa1 _bfw7h6cr _1nrm18uv _c2waglyw _1iohnqa1" : "_uizt1kdv", isInteractive && "_nt751r31 _49pcglyw _1hvw1o36 _1372tlke _7ehicw00 _1j5pglyw _1di629zg"])
48
+ }), props.children);
134
49
  });
135
- WrapperSpan.displayName = 'WrapperSpan';
50
+ var baseWrapperStyles = null;
51
+
52
+ // if the parent instruct the wrapper to be interactive, and the wrapper is in focus, apply selectedStyles
53
+ var interactiveStyles = null;
54
+ var hoveredStyles = null;
55
+ var hoveredWithBackgroundStyles = null;
56
+ var withoutBackgroundStyles = null;
57
+ var withBackgroundStyles = null;
58
+ var truncateStyles = null;
59
+ var notSelectedStyle = null;
60
+ var selectedStyles = null;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.Shimmer = exports.Icon = exports.AKIconWrapper = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _styled = _interopRequireDefault(require("@emotion/styled"));
10
+ var _linkingCommon = require("@atlaskit/linking-common");
11
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
+
13
+ // TODO: Figure out a more scalable/responsive solution
14
+ // for vertical alignment.
15
+ // Current rationale: vertically positioned at the top of
16
+ // the smart card container (when set to 0). Offset this
17
+ // to position it with appropriate whitespace from the top.
18
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
19
+ var Icon = exports.Icon = _styled.default.img({
20
+ height: '16px',
21
+ width: '16px',
22
+ marginRight: "var(--ds-space-050, 4px)",
23
+ borderRadius: '2px',
24
+ userSelect: 'none',
25
+ position: 'absolute',
26
+ top: '50%',
27
+ left: '50%',
28
+ transform: 'translate(-50%, -50%)'
29
+ });
30
+
31
+ // Used for 'untrue' icons which claim to be 16x16 but
32
+ // are less than that in height/width.
33
+ // TODO: Replace this override with proper AtlasKit solution.
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
35
+ var AKIconWrapper = exports.AKIconWrapper = _styled.default.span({
36
+ marginRight: "var(--ds-space-negative-025, -2px)"
37
+ });
38
+ var Shimmer = exports.Shimmer = function Shimmer(_ref) {
39
+ var testId = _ref.testId;
40
+ var skeletonCustomStyles = {
41
+ position: 'absolute',
42
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
43
+ top: '50%',
44
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
45
+ left: '50%',
46
+ transform: 'translate(-50%, -50%)',
47
+ marginRight: "var(--ds-space-050, 4px)"
48
+ };
49
+ return /*#__PURE__*/_react.default.createElement(_linkingCommon.SpanSkeleton, {
50
+ width: 16,
51
+ height: 16,
52
+ borderRadius: 2,
53
+ testId: testId
54
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
55
+ ,
56
+ style: skeletonCustomStyles
57
+ });
58
+ };
@@ -0,0 +1,10 @@
1
+
2
+ ._2rkoyh40{border-radius:2px}._154i1ssb{top:50%}
3
+ ._1bsb7vkz{width:1pc}
4
+ ._1ltv1ssb{left:50%}
5
+ ._2hwx1b66{margin-right:var(--ds-space-050,4px)}
6
+ ._2hwx1i6y{margin-right:var(--ds-space-negative-025,-2px)}
7
+ ._4t3i7vkz{height:1pc}
8
+ ._kqswstnw{position:absolute}
9
+ ._t9ec1ooe{transform:translate(-50%,-50%)}
10
+ ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
@@ -1,42 +1,63 @@
1
+ /* Icon.tsx generated by @compiled/babel-plugin v0.35.0 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.Shimmer = exports.Icon = exports.AKIconWrapper = void 0;
8
- var _react = _interopRequireDefault(require("react"));
9
- var _styled = _interopRequireDefault(require("@emotion/styled"));
10
+ require("./Icon.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _runtime = require("@compiled/react/runtime");
13
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
14
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
15
  var _linkingCommon = require("@atlaskit/linking-common");
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
12
-
16
+ var _excluded = ["as", "style"],
17
+ _excluded2 = ["as", "style"];
18
+ 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); }
19
+ 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
20
  // TODO: Figure out a more scalable/responsive solution
14
21
  // for vertical alignment.
15
22
  // Current rationale: vertically positioned at the top of
16
23
  // the smart card container (when set to 0). Offset this
17
24
  // to position it with appropriate whitespace from the top.
18
25
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
19
- var Icon = exports.Icon = _styled.default.img({
20
- height: '16px',
21
- width: '16px',
22
- marginRight: "var(--ds-space-050, 4px)",
23
- borderRadius: '2px',
24
- userSelect: 'none',
25
- position: 'absolute',
26
- top: '50%',
27
- left: '50%',
28
- transform: 'translate(-50%, -50%)'
26
+ var Icon = exports.Icon = (0, _react.forwardRef)(function (_ref, __cmplr) {
27
+ var _ref$as = _ref.as,
28
+ C = _ref$as === void 0 ? "img" : _ref$as,
29
+ __cmpls = _ref.style,
30
+ __cmplp = (0, _objectWithoutProperties2.default)(_ref, _excluded);
31
+ return /*#__PURE__*/_react.default.createElement(C, (0, _extends2.default)({}, __cmplp, {
32
+ style: __cmpls,
33
+ ref: __cmplr,
34
+ className: (0, _runtime.ax)(["_2rkoyh40 _4t3i7vkz _1bsb7vkz _2hwx1b66 _uiztglyw _kqswstnw _154i1ssb _1ltv1ssb _t9ec1ooe", __cmplp.className])
35
+ }));
29
36
  });
30
37
 
31
38
  // Used for 'untrue' icons which claim to be 16x16 but
32
39
  // are less than that in height/width.
33
40
  // TODO: Replace this override with proper AtlasKit solution.
34
41
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
35
- var AKIconWrapper = exports.AKIconWrapper = _styled.default.span({
36
- marginRight: "var(--ds-space-negative-025, -2px)"
42
+ if (process.env.NODE_ENV !== 'production') {
43
+ Icon.displayName = 'Icon';
44
+ }
45
+ var AKIconWrapper = exports.AKIconWrapper = (0, _react.forwardRef)(function (_ref2, __cmplr) {
46
+ var _ref2$as = _ref2.as,
47
+ C = _ref2$as === void 0 ? "span" : _ref2$as,
48
+ __cmpls = _ref2.style,
49
+ __cmplp = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
50
+ return /*#__PURE__*/_react.default.createElement(C, (0, _extends2.default)({}, __cmplp, {
51
+ style: __cmpls,
52
+ ref: __cmplr,
53
+ className: (0, _runtime.ax)(["_2hwx1i6y", __cmplp.className])
54
+ }));
37
55
  });
38
- var Shimmer = exports.Shimmer = function Shimmer(_ref) {
39
- var testId = _ref.testId;
56
+ if (process.env.NODE_ENV !== 'production') {
57
+ AKIconWrapper.displayName = 'AKIconWrapper';
58
+ }
59
+ var Shimmer = exports.Shimmer = function Shimmer(_ref3) {
60
+ var testId = _ref3.testId;
40
61
  var skeletonCustomStyles = {
41
62
  position: 'absolute',
42
63
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
@@ -0,0 +1,6 @@
1
+ ._18u01b66{margin-left:var(--ds-space-050,4px)}
2
+ ._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
3
+ ._syaz1y58{color:var(--ds-link,#0052cc)}
4
+ ._1bnxglyw:hover{text-decoration-line:none}
5
+ ._9oik18uv:hover{text-decoration-color:initial}
6
+ ._jf4cnqa1:hover{text-decoration-style:solid}
@@ -1,24 +1,68 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.35.0 */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  exports.IconAndTitleLayout = void 0;
10
+ require("./index.compiled.css");
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _runtime = require("@compiled/react/runtime");
8
13
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
14
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
15
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
11
16
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
17
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
18
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
- var _react = _interopRequireDefault(require("react"));
19
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
20
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
15
21
  var _reactRenderImage = _interopRequireDefault(require("react-render-image"));
16
22
  var _link = _interopRequireDefault(require("@atlaskit/icon/core/migration/link"));
23
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
24
+ var _colors = require("@atlaskit/theme/colors");
17
25
  var _Icon = require("../Icon");
18
- var _styled = require("../styled");
19
- var _styled2 = require("./styled");
26
+ var _styledEmotion = require("../styled-emotion");
27
+ var _styled = require("./styled");
28
+ var _styledEmotion2 = require("./styled-emotion");
29
+ var _excluded = ["as", "style"],
30
+ _excluded2 = ["as", "style"];
31
+ 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); }
32
+ 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; }
20
33
  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)); }
21
34
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
36
+ var NoLinkAppearance = (0, _react.forwardRef)(function (_ref, __cmplr) {
37
+ var _ref$as = _ref.as,
38
+ C = _ref$as === void 0 ? "span" : _ref$as,
39
+ __cmpls = _ref.style,
40
+ __cmplp = (0, _objectWithoutProperties2.default)(_ref, _excluded);
41
+ return /*#__PURE__*/_react.default.createElement(C, (0, _extends2.default)({}, __cmplp, {
42
+ style: __cmpls,
43
+ ref: __cmplr,
44
+ className: (0, _runtime.ax)(["_syaz1wmz _18u01b66", __cmplp.className])
45
+ }));
46
+ });
47
+
48
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled -- Ignored via go/DSP-18766
49
+ if (process.env.NODE_ENV !== 'production') {
50
+ NoLinkAppearance.displayName = 'NoLinkAppearance';
51
+ }
52
+ var LinkAppearance = (0, _react.forwardRef)(function (_ref2, __cmplr) {
53
+ var _ref2$as = _ref2.as,
54
+ C = _ref2$as === void 0 ? "a" : _ref2$as,
55
+ __cmpls = _ref2.style,
56
+ __cmplp = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
57
+ return /*#__PURE__*/_react.default.createElement(C, (0, _extends2.default)({}, __cmplp, {
58
+ style: __cmpls,
59
+ ref: __cmplr,
60
+ className: (0, _runtime.ax)(["_syaz1y58 _9oik18uv _1bnxglyw _jf4cnqa1", __cmplp.className])
61
+ }));
62
+ });
63
+ if (process.env.NODE_ENV !== 'production') {
64
+ LinkAppearance.displayName = 'LinkAppearance';
65
+ }
22
66
  var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
23
67
  function IconAndTitleLayout() {
24
68
  var _this;
@@ -56,12 +100,12 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
56
100
  icon = _this$props.icon,
57
101
  emoji = _this$props.emoji;
58
102
  if (emoji) {
59
- return /*#__PURE__*/_react.default.createElement(_styled2.EmojiWrapper, null, emoji);
103
+ return (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/_react.default.createElement(_styled.EmojiWrapper, null, emoji) : /*#__PURE__*/_react.default.createElement(_styledEmotion2.EmojiWrapper, null, emoji);
60
104
  }
61
105
  if (!icon || typeof icon === 'string') {
62
106
  return null;
63
107
  }
64
- return /*#__PURE__*/_react.default.createElement(_styled2.IconWrapper, null, icon);
108
+ return (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/_react.default.createElement(_styled.IconWrapper, null, icon) : /*#__PURE__*/_react.default.createElement(_styledEmotion2.IconWrapper, null, icon);
65
109
  }
66
110
  }, {
67
111
  key: "renderImageIcon",
@@ -90,9 +134,9 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
90
134
  value: function renderIconPlaceholder(testId) {
91
135
  var defaultIcon = this.props.defaultIcon;
92
136
  if (defaultIcon) {
93
- return /*#__PURE__*/_react.default.createElement(_styled2.IconWrapper, null, defaultIcon);
137
+ return /*#__PURE__*/_react.default.createElement(_styled.IconWrapper, null, defaultIcon);
94
138
  }
95
- return /*#__PURE__*/_react.default.createElement(_styled2.IconWrapper, null, /*#__PURE__*/_react.default.createElement(_link.default, {
139
+ return /*#__PURE__*/_react.default.createElement(_styled.IconWrapper, null, /*#__PURE__*/_react.default.createElement(_link.default, {
96
140
  label: "link",
97
141
  LEGACY_size: "small",
98
142
  testId: "".concat(testId, "-default"),
@@ -126,11 +170,11 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
126
170
  rightSide = _this$props2.rightSide,
127
171
  _this$props2$testId = _this$props2.testId,
128
172
  testId = _this$props2$testId === void 0 ? 'inline-card-icon-and-title' : _this$props2$testId;
129
- var titlePart = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled2.IconPositionWrapper, {
173
+ var titlePart = (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconPositionWrapper, {
130
174
  "data-testid": "icon-position-wrapper"
131
- }, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled2.IconEmptyWrapper, {
175
+ }, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconEmptyWrapper, {
132
176
  "data-testid": "icon-empty-wrapper"
133
- }), this.renderIcon(testId))), /*#__PURE__*/_react.default.createElement(_styled2.TitleWrapper
177
+ }), this.renderIcon(testId))), /*#__PURE__*/_react.default.createElement(_styled.TitleWrapper
134
178
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
135
179
  , {
136
180
  style: {
@@ -138,22 +182,52 @@ var IconAndTitleLayout = exports.IconAndTitleLayout = /*#__PURE__*/function (_Re
138
182
  }
139
183
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
140
184
  ,
141
- className: _styled2.TitleWrapperClassName
185
+ className: _styled.TitleWrapperClassName
186
+ }, title)) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styledEmotion2.IconPositionWrapper, {
187
+ "data-testid": "icon-position-wrapper"
188
+ }, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styledEmotion2.IconEmptyWrapper, {
189
+ "data-testid": "icon-empty-wrapper"
190
+ }), this.renderIcon(testId))), /*#__PURE__*/_react.default.createElement(_styledEmotion2.TitleWrapper
191
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
192
+ , {
193
+ style: {
194
+ color: titleTextColor
195
+ }
196
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
197
+ ,
198
+ className: _styled.TitleWrapperClassName
142
199
  }, title));
143
- return (
144
- /*#__PURE__*/
145
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
146
- _react.default.createElement(_styled2.IconTitleWrapper, {
147
- style: {
148
- color: titleColor
149
- },
150
- "data-testid": testId
151
- }, link ? /*#__PURE__*/_react.default.createElement(_styled.LinkAppearance, {
152
- href: link,
153
- onClick: this.handleClick,
154
- onKeyPress: this.handleKeyPress
155
- }, titlePart) : titlePart, rightSide ? /*#__PURE__*/_react.default.createElement(_styled.NoLinkAppearance, null, rightSide) : null)
156
- );
200
+ if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
201
+ return (
202
+ /*#__PURE__*/
203
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
204
+ _react.default.createElement(_styled.IconTitleWrapper, {
205
+ style: {
206
+ color: titleColor
207
+ },
208
+ "data-testid": testId
209
+ }, link ? /*#__PURE__*/_react.default.createElement(LinkAppearance, {
210
+ href: link,
211
+ onClick: this.handleClick,
212
+ onKeyPress: this.handleKeyPress
213
+ }, titlePart) : titlePart, rightSide ? /*#__PURE__*/_react.default.createElement(NoLinkAppearance, null, rightSide) : null)
214
+ );
215
+ } else {
216
+ return (
217
+ /*#__PURE__*/
218
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
219
+ _react.default.createElement(_styledEmotion2.IconTitleWrapper, {
220
+ style: {
221
+ color: titleColor
222
+ },
223
+ "data-testid": testId
224
+ }, link ? /*#__PURE__*/_react.default.createElement(_styledEmotion.LinkAppearance, {
225
+ href: link,
226
+ onClick: this.handleClick,
227
+ onKeyPress: this.handleKeyPress
228
+ }, titlePart) : titlePart, rightSide ? /*#__PURE__*/_react.default.createElement(_styledEmotion.NoLinkAppearance, null, rightSide) : null)
229
+ );
230
+ }
157
231
  }
158
232
  }]);
159
233
  }(_react.default.Component);
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.TitleWrapperClassName = exports.TitleWrapper = exports.RightIconPositionWrapper = exports.LozengeWrapper = exports.IconWrapper = exports.IconTitleWrapper = exports.IconPositionWrapper = exports.IconOverrides = exports.IconObjectOverrides = exports.IconEmptyWrapper = exports.EmojiWrapper = void 0;
8
+ var _styled = _interopRequireDefault(require("@emotion/styled"));
9
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
10
+
11
+ // Wraps all icons represented in Inline Links. Icons have three sources/types:
12
+ // - JSON-LD: from the generator.icon property coming back from ORS.
13
+ // - @atlaskit/icon: for lock icons, unauthorized, etc.
14
+ // - @atlaskit/icon-object: for object icons, e.g. repository, branch, etc.
15
+ // NB: the first set of overrides style icons imported from @atlaskit/icon-object correctly.
16
+ // NB: the second set of overrides style icons imported from @atlaskit/icon correctly.
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
18
+
19
+ // TODO: remove this override behaviour for @atlaskit/icon-object
20
+ var IconObjectOverrides = exports.IconObjectOverrides = "\n & > span {\n height: 16px;\n width: 16px;\n position: absolute;\n top: 3px;\n left: 0;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
21
+
22
+ // TODO: remove this override behaviour for @atlaskit/icon
23
+ var IconOverrides = exports.IconOverrides = "\n & > * > span {\n height: 16px;\n width: 16px;\n position: absolute;\n left: 0;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
24
+
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
26
+ var IconWrapper = exports.IconWrapper = _styled.default.span({
27
+ userSelect: 'none'
28
+ },
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
30
+ IconOverrides,
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
32
+ IconObjectOverrides);
33
+
34
+ // Wraps all emoji in Inline Links similar to icon
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
36
+ var EmojiWrapper = exports.EmojiWrapper = _styled.default.span({
37
+ display: 'inline-block',
38
+ marginRight: "var(--ds-space-025, 2px)",
39
+ userSelect: 'none'
40
+ },
41
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
42
+ IconOverrides,
43
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
44
+ IconObjectOverrides);
45
+
46
+ // The main 'wrapping' element, title of the content.
47
+ // NB: `white-space` adds little whitespace before wrapping.
48
+ // NB: `word-break` line breaks as soon as an overflow takes place.
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
50
+ var IconTitleWrapper = exports.IconTitleWrapper = _styled.default.span({
51
+ whiteSpace: 'pre-wrap',
52
+ wordBreak: 'break-all',
53
+ boxDecorationBreak: 'clone',
54
+ padding: "var(--ds-space-025, 2px)".concat(" ", "var(--ds-space-050, 4px)")
55
+ });
56
+
57
+ // TODO: Replace overrides with proper AtlasKit solution.
58
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
59
+ var LozengeWrapper = exports.LozengeWrapper = _styled.default.span({
60
+ display: 'inline-block',
61
+ verticalAlign: '1px',
62
+ margin: "0 ".concat("var(--ds-space-050, 4px)", " 0 ", "var(--ds-space-025, 2px)")
63
+ });
64
+
65
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
66
+ var RightIconPositionWrapper = exports.RightIconPositionWrapper = _styled.default.span({
67
+ marginLeft: "var(--ds-space-025, 2px)",
68
+ position: 'relative',
69
+ display: 'inline-block'
70
+ });
71
+
72
+ // The following components are used to absolutely position icons in the vertical center.
73
+ // - IconPositionWrapper: the `relative` parent which has no height in itself.
74
+ // - IconEmptyWrapper: the child which forces `IconPositionWrapper` to have a height.
75
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
76
+ var IconPositionWrapper = exports.IconPositionWrapper = _styled.default.span({
77
+ marginRight: "var(--ds-space-050, 4px)",
78
+ position: 'relative',
79
+ display: 'inline-block'
80
+ });
81
+
82
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
83
+ var IconEmptyWrapper = exports.IconEmptyWrapper = _styled.default.span({
84
+ width: '16px',
85
+ height: '100%',
86
+ display: 'inline-block',
87
+ opacity: 0
88
+ });
89
+
90
+ // With emotion it's not possible to use reference to `TitleWrapper` as part of a selector,
91
+ // To achieve same result we use classname instead.
92
+ var TitleWrapperClassName = exports.TitleWrapperClassName = 'smart-link-title-wrapper';
93
+
94
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-empty-styled-expression -- Ignored via go/DSP-18766
95
+ var TitleWrapper = exports.TitleWrapper = _styled.default.span({});