@atlaskit/smart-card 33.3.0 → 34.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/CHANGELOG.md +16 -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/HoverCard/components/HoverCardComponent.js +8 -2
  18. package/dist/cjs/view/InlineCard/ErroredView/index.js +6 -2
  19. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +40 -15
  20. package/dist/cjs/view/InlineCard/Frame/index.js +3 -1
  21. package/dist/cjs/view/InlineCard/Frame/styled-emotion.js +137 -0
  22. package/dist/cjs/view/InlineCard/Frame/styled.compiled.css +53 -0
  23. package/dist/cjs/view/InlineCard/Frame/styled.js +49 -124
  24. package/dist/cjs/view/InlineCard/Icon-emotion.js +58 -0
  25. package/dist/cjs/view/InlineCard/Icon.compiled.css +10 -0
  26. package/dist/cjs/view/InlineCard/Icon.js +39 -18
  27. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.compiled.css +6 -0
  28. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +99 -25
  29. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled-emotion.js +95 -0
  30. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.compiled.css +36 -0
  31. package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +128 -45
  32. package/dist/cjs/view/InlineCard/ResolvingView/index.js +30 -12
  33. package/dist/cjs/view/InlineCard/ResolvingView/styled-emotion.js +16 -0
  34. package/dist/cjs/view/InlineCard/ResolvingView/styled.compiled.css +5 -0
  35. package/dist/cjs/view/InlineCard/ResolvingView/styled.js +26 -8
  36. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +42 -16
  37. package/dist/cjs/view/InlineCard/styled-emotion.js +55 -0
  38. package/dist/cjs/view/InlineCard/styled.compiled.css +21 -0
  39. package/dist/cjs/view/InlineCard/styled.js +25 -45
  40. package/dist/cjs/view/LinkUrl/index.js +1 -1
  41. package/dist/es2019/utils/analytics/analytics.js +1 -1
  42. package/dist/es2019/view/BlockCard/views/styled.js +1 -0
  43. package/dist/es2019/view/EmbedModal/components/link-info/styled.js +2 -0
  44. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +1 -0
  45. package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -0
  46. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -0
  47. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
  48. package/dist/es2019/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
  49. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +1 -0
  50. package/dist/es2019/view/FlexibleCard/components/common/motion-wrapper/index.js +1 -1
  51. package/dist/es2019/view/FlexibleCard/components/elements/icon/index.js +1 -1
  52. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/index.js +1 -0
  53. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -0
  54. package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -0
  55. package/dist/es2019/view/FlexibleCard/components/utils.js +3 -3
  56. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +8 -2
  57. package/dist/es2019/view/InlineCard/ErroredView/index.js +6 -2
  58. package/dist/es2019/view/InlineCard/ForbiddenView/index.js +40 -15
  59. package/dist/es2019/view/InlineCard/Frame/index.js +3 -1
  60. package/dist/es2019/view/InlineCard/Frame/styled-emotion.js +143 -0
  61. package/dist/es2019/view/InlineCard/Frame/styled.compiled.css +53 -0
  62. package/dist/es2019/view/InlineCard/Frame/styled.js +44 -136
  63. package/dist/es2019/view/InlineCard/Icon-emotion.js +52 -0
  64. package/dist/es2019/view/InlineCard/Icon.compiled.css +10 -0
  65. package/dist/es2019/view/InlineCard/Icon.js +31 -15
  66. package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.compiled.css +6 -0
  67. package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +87 -18
  68. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled-emotion.js +114 -0
  69. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.compiled.css +36 -0
  70. package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +115 -43
  71. package/dist/es2019/view/InlineCard/ResolvingView/index.js +30 -12
  72. package/dist/es2019/view/InlineCard/ResolvingView/styled-emotion.js +9 -0
  73. package/dist/es2019/view/InlineCard/ResolvingView/styled.compiled.css +5 -0
  74. package/dist/es2019/view/InlineCard/ResolvingView/styled.js +20 -6
  75. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +42 -16
  76. package/dist/es2019/view/InlineCard/styled-emotion.js +47 -0
  77. package/dist/es2019/view/InlineCard/styled.compiled.css +21 -0
  78. package/dist/es2019/view/InlineCard/styled.js +19 -43
  79. package/dist/es2019/view/LinkUrl/index.js +1 -1
  80. package/dist/esm/utils/analytics/analytics.js +1 -1
  81. package/dist/esm/view/BlockCard/views/styled.js +1 -0
  82. package/dist/esm/view/EmbedModal/components/link-info/styled.js +2 -0
  83. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +1 -0
  84. package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +3 -0
  85. package/dist/esm/view/FlexibleCard/components/blocks/action-block/action-footer/index.js +1 -0
  86. package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +1 -0
  87. package/dist/esm/view/FlexibleCard/components/blocks/metadata-block/index.js +1 -1
  88. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +1 -0
  89. package/dist/esm/view/FlexibleCard/components/common/motion-wrapper/index.js +1 -1
  90. package/dist/esm/view/FlexibleCard/components/elements/icon/index.js +1 -1
  91. package/dist/esm/view/FlexibleCard/components/elements/lozenge/index.js +1 -0
  92. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-error/styled.js +2 -0
  93. package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/styled.js +3 -0
  94. package/dist/esm/view/FlexibleCard/components/utils.js +3 -3
  95. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +8 -2
  96. package/dist/esm/view/InlineCard/ErroredView/index.js +6 -2
  97. package/dist/esm/view/InlineCard/ForbiddenView/index.js +40 -15
  98. package/dist/esm/view/InlineCard/Frame/index.js +3 -1
  99. package/dist/esm/view/InlineCard/Frame/styled-emotion.js +131 -0
  100. package/dist/esm/view/InlineCard/Frame/styled.compiled.css +53 -0
  101. package/dist/esm/view/InlineCard/Frame/styled.js +46 -125
  102. package/dist/esm/view/InlineCard/Icon-emotion.js +51 -0
  103. package/dist/esm/view/InlineCard/Icon.compiled.css +10 -0
  104. package/dist/esm/view/InlineCard/Icon.js +36 -17
  105. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.compiled.css +6 -0
  106. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +90 -18
  107. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled-emotion.js +87 -0
  108. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.compiled.css +36 -0
  109. package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +124 -43
  110. package/dist/esm/view/InlineCard/ResolvingView/index.js +30 -12
  111. package/dist/esm/view/InlineCard/ResolvingView/styled-emotion.js +9 -0
  112. package/dist/esm/view/InlineCard/ResolvingView/styled.compiled.css +5 -0
  113. package/dist/esm/view/InlineCard/ResolvingView/styled.js +22 -6
  114. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +42 -16
  115. package/dist/esm/view/InlineCard/styled-emotion.js +47 -0
  116. package/dist/esm/view/InlineCard/styled.compiled.css +21 -0
  117. package/dist/esm/view/InlineCard/styled.js +21 -43
  118. package/dist/esm/view/LinkUrl/index.js +1 -1
  119. package/dist/types/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
  120. package/dist/types/view/HoverCard/types.d.ts +15 -0
  121. package/dist/types/view/InlineCard/Frame/styled-emotion.d.ts +17 -0
  122. package/dist/types/view/InlineCard/Frame/styled.d.ts +8 -10
  123. package/dist/types/view/InlineCard/Icon-emotion.d.ts +12 -0
  124. package/dist/types/view/InlineCard/Icon.d.ts +2 -8
  125. package/dist/types/view/InlineCard/IconAndTitleLayout/styled-emotion.d.ts +36 -0
  126. package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -34
  127. package/dist/types/view/InlineCard/ResolvingView/styled-emotion.d.ts +9 -0
  128. package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +1 -8
  129. package/dist/types/view/InlineCard/styled-emotion.d.ts +13 -0
  130. package/dist/types/view/InlineCard/styled.d.ts +1 -12
  131. package/dist/types-ts4.5/view/HoverCard/components/HoverCardComponent.d.ts +1 -1
  132. package/dist/types-ts4.5/view/HoverCard/types.d.ts +15 -0
  133. package/dist/types-ts4.5/view/InlineCard/Frame/styled-emotion.d.ts +17 -0
  134. package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +8 -10
  135. package/dist/types-ts4.5/view/InlineCard/Icon-emotion.d.ts +12 -0
  136. package/dist/types-ts4.5/view/InlineCard/Icon.d.ts +2 -8
  137. package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled-emotion.d.ts +36 -0
  138. package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled.d.ts +8 -34
  139. package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled-emotion.d.ts +9 -0
  140. package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled.d.ts +1 -8
  141. package/dist/types-ts4.5/view/InlineCard/styled-emotion.d.ts +13 -0
  142. package/dist/types-ts4.5/view/InlineCard/styled.d.ts +1 -12
  143. package/hooks/package.json +3 -1
  144. package/hover-card/package.json +3 -1
  145. package/link-url/package.json +3 -1
  146. package/package.json +14 -4
  147. package/ssr/package.json +3 -1
  148. package/types/package.json +3 -1
@@ -28,15 +28,18 @@ var stackItemIconSizeStyles = getIconSizeStyles('20px');
28
28
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
29
29
  var stackItemIconStyles = css(stackItemIconSizeStyles, {
30
30
  display: 'inline-block',
31
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
31
32
  lineHeight: 0,
32
33
  padding: "var(--ds-space-025, 2px)",
33
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
34
35
  'span,svg,img': {
36
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
35
37
  lineHeight: 0
36
38
  }
37
39
  });
38
40
  var newStackItemIconStyles = css({
39
41
  display: 'inline-block',
42
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
40
43
  lineHeight: 0
41
44
  });
42
45
  var ActionIcon = function ActionIcon(_ref) {
@@ -7,6 +7,7 @@ var containerStyles = xcss({
7
7
  borderRadius: 'border.radius',
8
8
  margin: 'space.100',
9
9
  marginBottom: 'space.0',
10
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
10
11
  lineHeight: '20px',
11
12
  padding: 'space.075',
12
13
  paddingInline: 'space.100',
@@ -25,6 +25,7 @@ import { filterActionItems } from '../utils';
25
25
  import ActionGroupItem from './action-group-item';
26
26
  var styles = css({
27
27
  display: 'inline-flex',
28
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
28
29
  lineHeight: '1rem',
29
30
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
30
31
  '> div': {
@@ -20,7 +20,7 @@ var getElementGroupStyles = function getElementGroupStyles(size, maxLines) {
20
20
  // sides so they line up nicely.
21
21
  var lineHeight = getMaxLineHeight(size);
22
22
  return css({
23
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
24
24
  lineHeight: "".concat(lineHeight, "rem")
25
25
  },
26
26
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -58,6 +58,7 @@ export var getBaseStyles = function getBaseStyles(direction, size) {
58
58
  display: 'flex',
59
59
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
60
60
  gap: "".concat(getGapSize(size), "rem"),
61
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
61
62
  lineHeight: '1rem',
62
63
  minWidth: 0,
63
64
  overflow: 'hidden'
@@ -30,7 +30,7 @@ export var MotionWrapper = function MotionWrapper(_ref) {
30
30
  style: {
31
31
  height: height,
32
32
  minHeight: minHeight,
33
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
34
34
  lineHeight: 0,
35
35
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
36
36
  overflow: 'hidden',
@@ -35,7 +35,7 @@ var getCustomRenderStyles = function getCustomRenderStyles(value) {
35
35
  return (
36
36
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
37
37
  css(getTruncateStyles(1, value), {
38
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
38
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
39
39
  lineHeight: value,
40
40
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
41
41
  fontSize: value,
@@ -9,6 +9,7 @@ import { useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-con
9
9
  import LozengeAction from './lozenge-action';
10
10
  var styles = css({
11
11
  display: 'inline-flex',
12
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
12
13
  lineHeight: 'inherit'
13
14
  });
14
15
 
@@ -17,6 +17,7 @@ export var dropdownItemGroupStyles = css({
17
17
  var sharedBlockStyles = css({
18
18
  display: 'flex',
19
19
  gap: "var(--ds-space-100, 0.5rem)",
20
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
20
21
  lineHeight: '1rem',
21
22
  minWidth: 0,
22
23
  overflow: 'hidden',
@@ -45,6 +46,7 @@ export var linkStyles = css(sharedBlockStyles, {
45
46
  });
46
47
  export var textStyles = function textStyles(maxLines) {
47
48
  return css({
49
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
48
50
  lineHeight: '1rem',
49
51
  whiteSpace: 'normal'
50
52
  },
@@ -6,11 +6,14 @@ export var triggerButtonStyles = css({
6
6
  backgroundColor: 'transparent',
7
7
  color: 'unset',
8
8
  cursor: 'pointer',
9
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
9
10
  fontFamily: 'unset',
10
11
  fontSize: 'unset',
11
12
  fontStyle: 'unset',
13
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
12
14
  fontWeight: 'unset',
13
15
  fontVariant: 'unset',
16
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
14
17
  lineHeight: 0,
15
18
  padding: 0,
16
19
  textTransform: 'unset',
@@ -88,7 +88,7 @@ export var getLinkSizeStyles = function getLinkSizeStyles(size) {
88
88
  return css({
89
89
  font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
90
90
  fontWeight: "var(--ds-font-weight-regular, 400)",
91
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
91
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
92
92
  lineHeight: getLinkLineHeight(size)
93
93
  });
94
94
  case SmartLinkSize.Large:
@@ -96,7 +96,7 @@ export var getLinkSizeStyles = function getLinkSizeStyles(size) {
96
96
  return css({
97
97
  font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
98
98
  fontWeight: "var(--ds-font-weight-regular, 400)",
99
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
99
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
100
100
  lineHeight: getLinkLineHeight(size)
101
101
  });
102
102
  case SmartLinkSize.Small:
@@ -104,7 +104,7 @@ export var getLinkSizeStyles = function getLinkSizeStyles(size) {
104
104
  return css({
105
105
  font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
106
106
  fontWeight: "var(--ds-font-weight-regular, 400)",
107
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
107
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/use-tokens-typography -- Ignored via go/DSP-18766
108
108
  lineHeight: getLinkLineHeight(size)
109
109
  });
110
110
  }
@@ -40,7 +40,10 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
40
40
  zIndex = _ref$zIndex === void 0 ? HOVER_CARD_Z_INDEX : _ref$zIndex,
41
41
  _ref$noFadeDelay = _ref.noFadeDelay,
42
42
  noFadeDelay = _ref$noFadeDelay === void 0 ? false : _ref$noFadeDelay,
43
- hoverPreviewOptions = _ref.hoverPreviewOptions;
43
+ hoverPreviewOptions = _ref.hoverPreviewOptions,
44
+ role = _ref.role,
45
+ label = _ref.label,
46
+ titleId = _ref.titleId;
44
47
  var fadeInDelay = (_hoverPreviewOptions$ = hoverPreviewOptions === null || hoverPreviewOptions === void 0 ? void 0 : hoverPreviewOptions.fadeInDelay) !== null && _hoverPreviewOptions$ !== void 0 ? _hoverPreviewOptions$ : FADE_IN_DELAY;
45
48
  var _React$useState = React.useState(false),
46
49
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -219,7 +222,10 @@ export var HoverCardComponent = function HoverCardComponent(_ref) {
219
222
  autoFocus: false,
220
223
  content: content,
221
224
  trigger: trigger,
222
- zIndex: zIndex
225
+ zIndex: zIndex,
226
+ role: role,
227
+ titleId: titleId,
228
+ label: label
223
229
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
224
230
  ,
225
231
  popupComponent: CustomPopupContainer
@@ -10,13 +10,16 @@ import React from 'react';
10
10
  import { FormattedMessage } from 'react-intl-next';
11
11
  import Button from '@atlaskit/button';
12
12
  import ErrorIcon from '@atlaskit/icon/utility/migration/error';
13
+ import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import { R300 } from '@atlaskit/theme/colors';
14
15
  import { messages } from '../../../messages';
15
16
  import { HoverCard } from '../../HoverCard';
16
17
  import { Frame } from '../Frame';
17
18
  import { AKIconWrapper } from '../Icon';
19
+ import { AKIconWrapper as AKIconWrapperOld } from '../Icon-emotion';
18
20
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
19
21
  import { IconStyledButton } from '../styled';
22
+ import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
20
23
  import withFrameStyleControl from '../utils/withFrameStyleControl';
21
24
  export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
22
25
  function InlineCardErroredView() {
@@ -40,7 +43,7 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
40
43
  var ActionButton = withFrameStyleControl(Button, _this.frameRef);
41
44
  return onRetry && /*#__PURE__*/React.createElement(ActionButton, {
42
45
  spacing: "none",
43
- component: IconStyledButton,
46
+ component: fg('bandicoots-compiled-migration-smartcard') ? IconStyledButton : IconStyledButtonOld,
44
47
  onClick: _this.handleRetry,
45
48
  role: "button"
46
49
  }, /*#__PURE__*/React.createElement(FormattedMessage, messages.try_again));
@@ -60,13 +63,14 @@ export var InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
60
63
  icon = _this$props.icon,
61
64
  message = _this$props.message,
62
65
  truncateInline = _this$props.truncateInline;
66
+ var Wrapper = fg('bandicoots-compiled-migration-smartcard') ? AKIconWrapper : AKIconWrapperOld;
63
67
  var content = /*#__PURE__*/React.createElement(Frame, {
64
68
  testId: testId,
65
69
  isSelected: isSelected,
66
70
  ref: this.frameRef,
67
71
  truncateInline: truncateInline
68
72
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
69
- icon: icon || /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(ErrorIcon, {
73
+ icon: icon || /*#__PURE__*/React.createElement(Wrapper, null, /*#__PURE__*/React.createElement(ErrorIcon, {
70
74
  label: "error",
71
75
  LEGACY_size: "small",
72
76
  color: "var(--ds-icon-danger, ".concat(R300, ")"),
@@ -12,21 +12,35 @@ import { FormattedMessage } from 'react-intl-next';
12
12
  import Button from '@atlaskit/button';
13
13
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
14
14
  import Lozenge from '@atlaskit/lozenge';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
15
16
  import { N500, R400 } from '@atlaskit/theme/colors';
16
17
  import { messages } from '../../../messages';
17
18
  import { HoverCard } from '../../HoverCard';
18
19
  import { Frame } from '../Frame';
19
20
  import { AKIconWrapper } from '../Icon';
21
+ import { AKIconWrapper as AKIconWrapperOld } from '../Icon-emotion';
20
22
  import { IconAndTitleLayout } from '../IconAndTitleLayout';
21
23
  import { LozengeWrapper } from '../IconAndTitleLayout/styled';
22
24
  import { IconStyledButton } from '../styled';
25
+ import { IconStyledButton as IconStyledButtonOld } from '../styled-emotion';
23
26
  import withFrameStyleControl from '../utils/withFrameStyleControl';
24
- var FallbackForbiddenIcon = /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
25
- label: "error",
26
- size: "small",
27
- primaryColor: "var(--ds-icon-danger, ".concat(R400, ")"),
28
- testId: "forbidden-view-fallback-icon"
29
- }));
27
+ var fallbackForbiddenIcon = function fallbackForbiddenIcon() {
28
+ if (fg('bandicoots-compiled-migration-smartcard')) {
29
+ return /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(LockIcon, {
30
+ label: "error",
31
+ size: "small",
32
+ primaryColor: "var(--ds-icon-danger, ".concat(R400, ")"),
33
+ testId: "forbidden-view-fallback-icon"
34
+ }));
35
+ } else {
36
+ return /*#__PURE__*/React.createElement(AKIconWrapperOld, null, /*#__PURE__*/React.createElement(LockIcon, {
37
+ label: "error",
38
+ size: "small",
39
+ primaryColor: "var(--ds-icon-danger, ".concat(R400, ")"),
40
+ testId: "forbidden-view-fallback-icon"
41
+ }));
42
+ }
43
+ };
30
44
  export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
31
45
  function InlineCardForbiddenView() {
32
46
  var _this$props;
@@ -71,14 +85,25 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
71
85
  var ActionButton = withFrameStyleControl(Button, _this.frameRef);
72
86
  var accessType = (_this$props$requestAc = _this.props.requestAccessContext) === null || _this$props$requestAc === void 0 ? void 0 : _this$props$requestAc.accessType;
73
87
  if (_this.state.hasRequestAccessContextMessage) {
74
- return /*#__PURE__*/React.createElement(ActionButton, {
75
- spacing: "none",
76
- onClick: _this.handleRetry,
77
- component: IconStyledButton,
78
- testId: "button-connect-other-account",
79
- role: "button",
80
- isDisabled: accessType === 'PENDING_REQUEST_EXISTS'
81
- }, _this.renderForbiddenAccessMessage());
88
+ if (fg('bandicoots-compiled-migration-smartcard')) {
89
+ return /*#__PURE__*/React.createElement(ActionButton, {
90
+ spacing: "none",
91
+ onClick: _this.handleRetry,
92
+ component: IconStyledButton,
93
+ testId: "button-connect-other-account",
94
+ role: "button",
95
+ isDisabled: accessType === 'PENDING_REQUEST_EXISTS'
96
+ }, _this.renderForbiddenAccessMessage());
97
+ } else {
98
+ return /*#__PURE__*/React.createElement(ActionButton, {
99
+ spacing: "none",
100
+ onClick: _this.handleRetry,
101
+ component: IconStyledButtonOld,
102
+ testId: "button-connect-other-account",
103
+ role: "button",
104
+ isDisabled: accessType === 'PENDING_REQUEST_EXISTS'
105
+ }, _this.renderForbiddenAccessMessage());
106
+ }
82
107
  }
83
108
  if (onAuthorise) {
84
109
  return /*#__PURE__*/React.createElement(Button, {
@@ -113,7 +138,7 @@ export var InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
113
138
  ref: this.frameRef,
114
139
  truncateInline: truncateInline
115
140
  }, /*#__PURE__*/React.createElement(IconAndTitleLayout, {
116
- icon: icon ? icon : FallbackForbiddenIcon,
141
+ icon: icon ? icon : fallbackForbiddenIcon(),
117
142
  link: url,
118
143
  title: url,
119
144
  onClick: onClick,
@@ -1,6 +1,8 @@
1
1
  import React, { forwardRef, useCallback } from 'react';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
2
3
  import { useMouseDownEvent } from '../../../state/analytics/useLinkClicked';
3
4
  import { WrapperAnchor, WrapperSpan } from './styled';
5
+ import { WrapperAnchor as WrapperAnchorOld, WrapperSpan as WrapperSpanOld } from './styled-emotion';
4
6
  export var Frame = /*#__PURE__*/forwardRef(function (props, ref) {
5
7
  var isSelected = props.isSelected,
6
8
  children = props.children,
@@ -33,7 +35,7 @@ export var Frame = /*#__PURE__*/forwardRef(function (props, ref) {
33
35
  var isAnchor = Boolean(link || onClick);
34
36
 
35
37
  // Depending on whenever Frame was given onClick or link itself we display span or anchor elements
36
- var Wrapper = isAnchor ? WrapperAnchor : WrapperSpan;
38
+ var Wrapper = fg('bandicoots-compiled-migration-smartcard') ? isAnchor ? WrapperAnchor : WrapperSpan : isAnchor ? WrapperAnchorOld : WrapperSpanOld;
37
39
  return /*#__PURE__*/React.createElement(Wrapper, {
38
40
  href: link,
39
41
  withoutBackground: withoutBackground,
@@ -0,0 +1,131 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ 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; }
3
+ 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; }
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
+ import styled from '@emotion/styled';
6
+ import { B100, B200, B400, B50, N40 } from '@atlaskit/theme/colors';
7
+ var lineHeight = 22;
8
+ var selectedStyles = {
9
+ cursor: 'pointer',
10
+ boxShadow: "0 0 0 2px ".concat("var(--ds-border-selected, ".concat(B100, ")")),
11
+ outline: 'none',
12
+ userSelect: 'none',
13
+ '&, :hover, :focus, :active': {
14
+ textDecoration: 'none'
15
+ },
16
+ '&:hover': {
17
+ border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")"))
18
+ }
19
+ };
20
+ var isInteractive = function isInteractive(_ref) {
21
+ var isInteractive = _ref.isInteractive;
22
+ if (isInteractive) {
23
+ return {
24
+ ':active': {
25
+ backgroundColor: "var(--ds-background-selected, ".concat(B50, ")")
26
+ },
27
+ ':focus': selectedStyles
28
+ };
29
+ }
30
+ return undefined;
31
+ };
32
+ var isSelected = function isSelected(_ref2) {
33
+ var isSelected = _ref2.isSelected;
34
+ if (isSelected) {
35
+ return selectedStyles;
36
+ } else {
37
+ return {
38
+ userSelect: 'text'
39
+ };
40
+ }
41
+ };
42
+ var hoveredStyles = {
43
+ borderColor: "var(--ds-border-accent-blue, ".concat(B200, ")")
44
+ };
45
+ var activeHoveredFocusedStyles = function activeHoveredFocusedStyles(props) {
46
+ if (props.withoutBackground) {
47
+ return undefined;
48
+ }
49
+ return {
50
+ textDecoration: 'none'
51
+ };
52
+ };
53
+ var hoveredWihBorderStyles = function hoveredWihBorderStyles(props) {
54
+ return _objectSpread(_objectSpread({}, hoveredStyles), activeHoveredFocusedStyles(props));
55
+ };
56
+
57
+ /*
58
+ Inline smart cards should have the following layout:
59
+ ------------------------------------
60
+ | icon | title | action OR lozenge |
61
+ ------------------------------------
62
+ The aim is to ensure (1) all children are
63
+ in line with each other, (2) are vertically
64
+ centered.
65
+ */
66
+ // NB: `padding` consistent with @mentions.
67
+ // NB: `display: inline` required for `box-decoration-break` to work.
68
+ // NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
69
+ var baseWrapperStyles = function baseWrapperStyles(props) {
70
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
71
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
72
+ lineHeight: "".concat(lineHeight, "px"),
73
+ padding: "var(--ds-space-025, 2px)".concat(" 0px")
74
+ }, props.withoutBackground ? {
75
+ paddingLeft: 0,
76
+ marginLeft: "var(--ds-space-negative-025, -2px)"
77
+ } : undefined), {}, {
78
+ display: 'inline',
79
+ boxDecorationBreak: 'clone',
80
+ borderRadius: "var(--ds-border-radius-100, 4px)",
81
+ color: "var(--ds-link, ".concat(B400, ")")
82
+ }, props.withoutBackground ? undefined : {
83
+ backgroundColor: "var(--ds-surface-raised, white)"
84
+ }), isSelected(props)), props.withoutBackground ? undefined : {
85
+ border: "1px solid ".concat("var(--ds-border, ".concat(N40, ")"))
86
+ }), {}, {
87
+ '&:hover': hoveredStyles,
88
+ '&, :hover, :focus, :active': activeHoveredFocusedStyles(props),
89
+ transition: '0.1s all ease-in-out',
90
+ MozUserSelect: 'none'
91
+ }, props.isHovered ? hoveredWihBorderStyles(props) : undefined);
92
+ };
93
+ var truncateStyles = {
94
+ overflow: 'hidden',
95
+ textOverflow: 'ellipsis',
96
+ wordBreak: 'break-all',
97
+ // The height of a truncated card is 1px higher than that of a non-truncated card, so we subtract 1px from the line height.
98
+ // eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
99
+ lineHeight: "".concat(lineHeight - 1, "px"),
100
+ display: '-webkit-inline-box',
101
+ WebkitLineClamp: 1,
102
+ WebkitBoxOrient: 'vertical',
103
+ // We need to remove the padding because display: -webkit-inline-box will cause any padding to be
104
+ // added to the total height, causing truncated cards to have greater height than non-truncated cards which use display: inline.
105
+ padding: 0,
106
+ '@supports not (-webkit-line-clamp: 1)': {
107
+ display: 'inline-block',
108
+ maxHeight: "".concat(lineHeight, "px"),
109
+ // If the browser does not support webkit, we don't need to remove the padding
110
+ padding: "var(--ds-space-025, 2px)".concat(" 0px")
111
+ }
112
+ };
113
+ var isTruncated = function isTruncated(_ref3) {
114
+ var truncateInline = _ref3.truncateInline;
115
+ if (truncateInline) {
116
+ return truncateStyles;
117
+ }
118
+ return undefined;
119
+ };
120
+
121
+ // 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
122
+ export var WrapperAnchor = styled.a(function (props) {
123
+ return _objectSpread(_objectSpread(_objectSpread({}, baseWrapperStyles(props)), isInteractive(props)), isTruncated(props));
124
+ });
125
+ WrapperAnchor.displayName = 'WrapperAnchor';
126
+
127
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-dynamic-styles -- Ignored via go/DSP-18766
128
+ export var WrapperSpan = styled.span(function (props) {
129
+ return _objectSpread(_objectSpread({}, baseWrapperStyles(props)), isTruncated(props));
130
+ });
131
+ WrapperSpan.displayName = 'WrapperSpan';
@@ -0,0 +1,53 @@
1
+
2
+ ._19ith6cr{border:1px solid var(--ds-border,#dfe1e6)}
3
+ ._1yt4x7n9{padding:var(--ds-space-025,2px) 0}
4
+ ._2rkoiti9{border-radius:var(--ds-border-radius-100,4px)}
5
+ ._v56415x0{transition:all .1s ease-in-out}
6
+ ._1h6dmr28{border-color:var(--ds-border-accent-blue,#2684ff)}._12ji1r31{outline-color:currentColor}
7
+ ._12y31o36{outline-width:medium}
8
+ ._16d9qvcn{-webkit-box-decoration-break:clone;box-decoration-break:clone}
9
+ ._16qscw00{box-shadow:0 0 0 2px var(--ds-border-selected,#4c9aff)}
10
+ ._18m915vq{overflow-y:hidden}
11
+ ._18u01i6y{margin-left:var(--ds-space-negative-025,-2px)}
12
+ ._19bvidpf{padding-left:0}
13
+ ._1bto1l2s{text-overflow:ellipsis}
14
+ ._1e0c1abx{display:-webkit-inline-box}
15
+ ._1e0c1nu9{display:inline}
16
+ ._1hmsglyw{text-decoration-line:none}
17
+ ._1nmz9jpi{word-break:break-all}
18
+ ._1qu2glyw{outline-style:none}
19
+ ._1reo15vq{overflow-x:hidden}
20
+ ._1rkwglyw{-moz-user-select:none}
21
+ ._1yyjkb7n{-webkit-line-clamp:1}
22
+ ._4bfu18uv{text-decoration-color:initial}
23
+ ._80omtlke{cursor:pointer}
24
+ ._ajmmnqa1{text-decoration-style:solid}
25
+ ._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
26
+ ._ca0qidpf{padding-top:0}
27
+ ._n3tdidpf{padding-bottom:0}
28
+ ._sudp1e54{-webkit-box-orient:vertical}
29
+ ._syaz1y58{color:var(--ds-link,#0052cc)}
30
+ ._u5f3idpf{padding-right:0}
31
+ ._uizt1kdv{-webkit-user-select:text;-ms-user-select:text;user-select:text}
32
+ ._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
33
+ ._vwz4183y{line-height:21px}
34
+ ._vwz4qslr{line-height:22px}
35
+ ._1372tlke:focus{cursor:pointer}
36
+ ._1a3b18uv:focus{text-decoration-color:initial}
37
+ ._1hvw1o36:focus{outline-width:medium}
38
+ ._1j5pglyw:focus{-webkit-user-select:none;-ms-user-select:none;user-select:none}
39
+ ._49pcglyw:focus{outline-style:none}
40
+ ._4fprglyw:focus{text-decoration-line:none}
41
+ ._5goinqa1:focus{text-decoration-style:solid}
42
+ ._7ehicw00:focus{box-shadow:0 0 0 2px var(--ds-border-selected,#4c9aff)}
43
+ ._nt751r31:focus{outline-color:currentColor}
44
+ ._bfw7h6cr:hover{border:1px solid var(--ds-border,#dfe1e6)}
45
+ ._4cvxmr28:hover{border-color:var(--ds-border-accent-blue,#2684ff)}
46
+ ._1bnxglyw:hover{text-decoration-line:none}
47
+ ._9oik18uv:hover{text-decoration-color:initial}
48
+ ._jf4cnqa1:hover{text-decoration-style:solid}
49
+ ._1di629zg:active{background-color:var(--ds-background-selected,#deebff)}
50
+ ._1iohnqa1:active{text-decoration-style:solid}
51
+ ._1nrm18uv:active{text-decoration-color:initial}
52
+ ._c2waglyw:active{text-decoration-line:none}
53
+ @supports not (-webkit-line-clamp:1){._17bix7n9{padding:var(--ds-space-025,2px) 0}._nr8z1o8l{display:inline-block}._102kqslr{max-height:22px}}