@atlaskit/smart-card 34.0.0 → 34.1.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 (82) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/FlexibleCard/components/actions/action/ActionOld.js +112 -0
  4. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.js +95 -0
  5. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +16 -0
  6. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +20 -45
  7. package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.js +67 -0
  8. package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.compiled.css +50 -0
  9. package/dist/cjs/view/FlexibleCard/components/actions/action/action-icon/index.js +32 -39
  10. package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +25 -16
  11. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.js +90 -0
  12. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.compiled.css +27 -0
  13. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +39 -70
  14. package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +9 -10
  15. package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.js +33 -0
  16. package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.compiled.css +2 -0
  17. package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +20 -15
  18. package/dist/cjs/view/FlexibleCard/components/utils.js +8 -0
  19. package/dist/cjs/view/LinkUrl/index.js +1 -1
  20. package/dist/es2019/utils/analytics/analytics.js +1 -1
  21. package/dist/es2019/view/FlexibleCard/components/actions/action/ActionOld.js +100 -0
  22. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.js +88 -0
  23. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +16 -0
  24. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +20 -49
  25. package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.js +57 -0
  26. package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.compiled.css +50 -0
  27. package/dist/es2019/view/FlexibleCard/components/actions/action/action-icon/index.js +32 -38
  28. package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +22 -15
  29. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.js +82 -0
  30. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.compiled.css +27 -0
  31. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +28 -68
  32. package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +7 -11
  33. package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.js +23 -0
  34. package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.compiled.css +2 -0
  35. package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +16 -13
  36. package/dist/es2019/view/FlexibleCard/components/utils.js +8 -0
  37. package/dist/es2019/view/LinkUrl/index.js +1 -1
  38. package/dist/esm/utils/analytics/analytics.js +1 -1
  39. package/dist/esm/view/FlexibleCard/components/actions/action/ActionOld.js +104 -0
  40. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.js +84 -0
  41. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.compiled.css +16 -0
  42. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +20 -44
  43. package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.js +60 -0
  44. package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.compiled.css +50 -0
  45. package/dist/esm/view/FlexibleCard/components/actions/action/action-icon/index.js +28 -38
  46. package/dist/esm/view/FlexibleCard/components/actions/action/index.js +22 -15
  47. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.js +83 -0
  48. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.compiled.css +27 -0
  49. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.js +35 -68
  50. package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +7 -11
  51. package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.js +25 -0
  52. package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.compiled.css +2 -0
  53. package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.js +17 -14
  54. package/dist/esm/view/FlexibleCard/components/utils.js +8 -0
  55. package/dist/esm/view/LinkUrl/index.js +1 -1
  56. package/dist/types/view/FlexibleCard/components/actions/action/ActionOld.d.ts +13 -0
  57. package/dist/types/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.d.ts +4 -0
  58. package/dist/types/view/FlexibleCard/components/actions/action/action-button/index.d.ts +2 -2
  59. package/dist/types/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.d.ts +8 -0
  60. package/dist/types/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +2 -6
  61. package/dist/types/view/FlexibleCard/components/actions/action/index.d.ts +2 -11
  62. package/dist/types/view/FlexibleCard/components/actions/action/types.d.ts +7 -0
  63. package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.d.ts +10 -0
  64. package/dist/types/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.d.ts +3 -6
  65. package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/index.d.ts +2 -2
  66. package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.d.ts +10 -0
  67. package/dist/types/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.d.ts +2 -9
  68. package/dist/types/view/FlexibleCard/components/utils.d.ts +3 -0
  69. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/ActionOld.d.ts +13 -0
  70. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/ActionButtonOld.d.ts +4 -0
  71. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-button/index.d.ts +2 -2
  72. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-icon/ActionIconOld.d.ts +8 -0
  73. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/action-icon/index.d.ts +2 -6
  74. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/index.d.ts +2 -11
  75. package/dist/types-ts4.5/view/FlexibleCard/components/actions/action/types.d.ts +7 -0
  76. package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/SkeletonOld.d.ts +10 -0
  77. package/dist/types-ts4.5/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/skeleton/main.d.ts +3 -6
  78. package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/index.d.ts +2 -2
  79. package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/RelatedLinksActionIconOld.d.ts +10 -0
  80. package/dist/types-ts4.5/view/FlexibleCard/components/actions/view-related-links-action/related-links-action-icon/index.d.ts +2 -9
  81. package/dist/types-ts4.5/view/FlexibleCard/components/utils.d.ts +3 -0
  82. package/package.json +4 -4
@@ -1,28 +1,29 @@
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.default = void 0;
8
- var _react = require("@emotion/react");
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _runtime = require("@compiled/react/runtime");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
13
  var _constants = require("../../../../../constants");
10
14
  var _actionButton = _interopRequireDefault(require("./action-button"));
11
15
  var _actionDropdownItem = _interopRequireDefault(require("./action-dropdown-item"));
12
16
  var _actionIcon = _interopRequireDefault(require("./action-icon"));
13
17
  var _actionStackItem = _interopRequireDefault(require("./action-stack-item"));
14
- /**
15
- * @jsxRuntime classic
16
- * @jsx jsx
17
- */
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
19
-
18
+ var _ActionOld = _interopRequireDefault(require("./ActionOld"));
19
+ 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); }
20
+ 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
21
  /**
21
22
  * A base action that can be triggered with an on click.
22
23
  * @internal
23
24
  * @param {ActionProps} ActionProps - The props necessary for the Action.
24
25
  */
25
- var Action = function Action(_ref) {
26
+ var ActionNew = function ActionNew(_ref) {
26
27
  var as = _ref.as,
27
28
  _ref$appearance = _ref.appearance,
28
29
  appearance = _ref$appearance === void 0 ? 'subtle' : _ref$appearance,
@@ -44,7 +45,7 @@ var Action = function Action(_ref) {
44
45
  hideTooltipOnMouseDown = _ref.hideTooltipOnMouseDown,
45
46
  xcss = _ref.xcss,
46
47
  asDropDownItem = _ref.asDropDownItem,
47
- overrideCss = _ref.overrideCss,
48
+ className = _ref.className,
48
49
  isDisabled = _ref.isDisabled,
49
50
  href = _ref.href,
50
51
  ariaLabel = _ref.ariaLabel,
@@ -54,7 +55,7 @@ var Action = function Action(_ref) {
54
55
  }
55
56
  var isStackItem = as === 'stack-item';
56
57
  var isDropdownItem = as === 'dropdown-item' || asDropDownItem;
57
- var actionIcon = icon && (0, _react.jsx)(_actionIcon.default, {
58
+ var actionIcon = icon && /*#__PURE__*/React.createElement(_actionIcon.default, {
58
59
  asStackItemIcon: isStackItem,
59
60
  isDisabled: isDisabled,
60
61
  icon: icon,
@@ -64,7 +65,7 @@ var Action = function Action(_ref) {
64
65
  var iconBefore = icon && iconPosition === 'before' ? actionIcon : undefined;
65
66
  var iconAfter = icon && iconPosition === 'after' ? actionIcon : undefined;
66
67
  if (isStackItem) {
67
- return (0, _react.jsx)(_actionStackItem.default, {
68
+ return /*#__PURE__*/React.createElement(_actionStackItem.default, {
68
69
  content: content,
69
70
  icon: actionIcon,
70
71
  space: spaceInline,
@@ -83,7 +84,7 @@ var Action = function Action(_ref) {
83
84
  });
84
85
  }
85
86
  if (isDropdownItem) {
86
- return (0, _react.jsx)(_actionDropdownItem.default, {
87
+ return /*#__PURE__*/React.createElement(_actionDropdownItem.default, {
87
88
  content: content,
88
89
  iconAfter: iconAfter,
89
90
  iconBefore: iconBefore,
@@ -92,14 +93,16 @@ var Action = function Action(_ref) {
92
93
  testId: testId
93
94
  });
94
95
  }
95
- var button = (0, _react.jsx)(_actionButton.default, {
96
+ var button = /*#__PURE__*/React.createElement(_actionButton.default, {
96
97
  appearance: appearance,
97
98
  content: content,
98
99
  iconAfter: iconAfter,
99
100
  iconBefore: iconBefore,
100
101
  isLoading: isLoading,
101
- onClick: onClick,
102
- overrideCss: overrideCss,
102
+ onClick: onClick
103
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
104
+ ,
105
+ className: className,
103
106
  size: size,
104
107
  testId: testId,
105
108
  tooltipMessage: tooltipMessage || content,
@@ -107,6 +110,12 @@ var Action = function Action(_ref) {
107
110
  href: href,
108
111
  ariaLabel: ariaLabel
109
112
  });
110
- return Wrapper !== undefined ? (0, _react.jsx)(Wrapper, null, button) : button;
113
+ return Wrapper !== undefined ? /*#__PURE__*/React.createElement(Wrapper, null, button) : button;
114
+ };
115
+ var Action = function Action(props) {
116
+ if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
117
+ return /*#__PURE__*/React.createElement(ActionNew, props);
118
+ }
119
+ return /*#__PURE__*/React.createElement(_ActionOld.default, props);
111
120
  };
112
121
  var _default = exports.default = Action;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SkeletonOld = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _colors = require("@atlaskit/theme/colors");
9
+ /**
10
+ * @jsxRuntime classic
11
+ * @jsx jsx
12
+ */
13
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
+
15
+ var AutomationSkeletonContainer = (0, _react.css)({
16
+ paddingBlock: "var(--ds-space-025, 2px)"
17
+ });
18
+ var SkeletonContainer = (0, _react.css)({
19
+ marginBlock: "var(--ds-space-100, 8px)",
20
+ marginInline: "var(--ds-space-250, 20px)",
21
+ display: 'flex'
22
+ });
23
+ var SkeletonIcon = (0, _react.css)({
24
+ width: "var(--ds-space-200, 16px)",
25
+ height: "var(--ds-space-200, 16px)",
26
+ display: 'inline-block',
27
+ borderRadius: "var(--ds-space-025, 2px)",
28
+ backgroundColor: 'currentColor',
29
+ border: "var(--ds-space-025, 2px)".concat(" solid transparent"),
30
+ opacity: 0.15
31
+ });
32
+ var MenuIcon = (0, _react.css)({
33
+ width: '24px',
34
+ height: '24px',
35
+ display: 'flex',
36
+ justifyContent: 'center',
37
+ alignItems: 'center'
38
+ });
39
+ var shimmer = (0, _react.keyframes)({
40
+ '0%': {
41
+ backgroundPosition: '-300px 0'
42
+ },
43
+ '100%': {
44
+ backgroundPosition: '2000px 0'
45
+ }
46
+ });
47
+ var SkeletonText = (0, _react.css)({
48
+ width: '85%',
49
+ height: "var(--ds-space-200, 16px)",
50
+ marginTop: "var(--ds-space-050, 4px)",
51
+ marginLeft: "var(--ds-space-150, 12px)",
52
+ animationDuration: '1s',
53
+ animationFillMode: 'forwards',
54
+ animationIterationCount: 'infinite',
55
+ animationName: shimmer,
56
+ animationTimingFunction: 'linear',
57
+ backgroundColor: "var(--ds-skeleton, ".concat(_colors.N30, ")"),
58
+ backgroundImage: "linear-gradient(to right, ".concat("var(--ds-skeleton, ".concat(_colors.N30, ")"), " 10%, ", "var(--ds-skeleton-subtle, ".concat(_colors.N20, ")"), " 30%, ", "var(--ds-skeleton, ".concat(_colors.N30, ")"), " 50%)"),
59
+ backgroundRepeat: 'no-repeat'
60
+ });
61
+ var SkeletonLine = function SkeletonLine() {
62
+ return (0, _react.jsx)("div", {
63
+ css: SkeletonContainer
64
+ }, (0, _react.jsx)("div", {
65
+ css: MenuIcon
66
+ }, (0, _react.jsx)("div", {
67
+ css: SkeletonIcon
68
+ })), (0, _react.jsx)("div", {
69
+ css: SkeletonText
70
+ }));
71
+ };
72
+ var getSkeletonLines = function getSkeletonLines(lineCount) {
73
+ var skeletonLines = [];
74
+ for (var i = 0; i < lineCount; i++) {
75
+ skeletonLines.push((0, _react.jsx)(SkeletonLine, {
76
+ key: "skeleton-line-".concat(i)
77
+ }));
78
+ }
79
+ return skeletonLines;
80
+ };
81
+ var SkeletonOld = exports.SkeletonOld = function SkeletonOld(props) {
82
+ var _props$lineCount = props.lineCount,
83
+ lineCount = _props$lineCount === void 0 ? 5 : _props$lineCount;
84
+ return (
85
+ // eslint-disable-next-line @atlaskit/design-system/use-primitives
86
+ (0, _react.jsx)("div", {
87
+ css: AutomationSkeletonContainer
88
+ }, getSkeletonLines(lineCount))
89
+ );
90
+ };
@@ -0,0 +1,27 @@
1
+
2
+ ._19it1vjj{border:var(--_z2s59f)}
3
+ ._2rkov77o{border-radius:var(--ds-space-025,2px)}
4
+ ._195gv47k{margin-inline:var(--ds-space-250,20px)}
5
+ ._1mouu2gc{margin-block:var(--ds-space-100,8px)}
6
+ ._1rjcv77o{padding-block:var(--ds-space-025,2px)}._12vemgnk{background-repeat:no-repeat}
7
+ ._18u0utpp{margin-left:var(--ds-space-150,9pt)}
8
+ ._19pk1b66{margin-top:var(--ds-space-050,4px)}
9
+ ._1bah1h6o{justify-content:center}
10
+ ._1bsb13sl{width:85%}
11
+ ._1bsb1tcg{width:24px}
12
+ ._1bsbpxbi{width:var(--ds-space-200,1pc)}
13
+ ._1e0c1o8l{display:inline-block}
14
+ ._1e0c1txw{display:flex}
15
+ ._1itk8aai{background-image:var(--_w76hiz)}
16
+ ._1o51q7pw{animation-fill-mode:forwards}
17
+ ._1pglp3kn{animation-timing-function:linear}
18
+ ._4cvr1h6o{align-items:center}
19
+ ._4t3i1tcg{height:24px}
20
+ ._4t3ipxbi{height:var(--ds-space-200,1pc)}
21
+ ._5sag9cwz{animation-duration:1s}
22
+ ._bfhk1r31{background-color:currentColor}
23
+ ._bfhk1uqo{background-color:var(--_1vab7it)}
24
+ ._j7hq1nls{animation-name:k1a7rfge}
25
+ ._tip812c5{animation-iteration-count:infinite}
26
+ ._tzy4nh7s{opacity:.15}
27
+ @keyframes k1a7rfge{0%{background-position:-300px 0}to{background-position:125pc 0}}
@@ -1,90 +1,59 @@
1
+ /* main.tsx generated by @compiled/babel-plugin v0.35.0 */
1
2
  "use strict";
2
3
 
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
- exports.Skeleton = void 0;
7
- var _react = require("@emotion/react");
8
+ exports.SkeletonNew = exports.Skeleton = void 0;
9
+ require("./main.compiled.css");
10
+ var React = _interopRequireWildcard(require("react"));
11
+ var _runtime = require("@compiled/react/runtime");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
8
13
  var _colors = require("@atlaskit/theme/colors");
9
- /**
10
- * @jsxRuntime classic
11
- * @jsx jsx
12
- */
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
-
15
- var AutomationSkeletonContainer = (0, _react.css)({
16
- paddingBlock: "var(--ds-space-025, 2px)"
17
- });
18
- var SkeletonContainer = (0, _react.css)({
19
- marginBlock: "var(--ds-space-100, 8px)",
20
- marginInline: "var(--ds-space-250, 20px)",
21
- display: 'flex'
22
- });
23
- var SkeletonIcon = (0, _react.css)({
24
- width: "var(--ds-space-200, 16px)",
25
- height: "var(--ds-space-200, 16px)",
26
- display: 'inline-block',
27
- borderRadius: "var(--ds-space-025, 2px)",
28
- backgroundColor: 'currentColor',
29
- border: "var(--ds-space-025, 2px)".concat(" solid transparent"),
30
- opacity: 0.15
31
- });
32
- var MenuIcon = (0, _react.css)({
33
- width: '24px',
34
- height: '24px',
35
- display: 'flex',
36
- justifyContent: 'center',
37
- alignItems: 'center'
38
- });
39
- var shimmer = (0, _react.keyframes)({
40
- '0%': {
41
- backgroundPosition: '-300px 0'
42
- },
43
- '100%': {
44
- backgroundPosition: '2000px 0'
45
- }
46
- });
47
- var SkeletonText = (0, _react.css)({
48
- width: '85%',
49
- height: "var(--ds-space-200, 16px)",
50
- marginTop: "var(--ds-space-050, 4px)",
51
- marginLeft: "var(--ds-space-150, 12px)",
52
- animationDuration: '1s',
53
- animationFillMode: 'forwards',
54
- animationIterationCount: 'infinite',
55
- animationName: shimmer,
56
- animationTimingFunction: 'linear',
57
- backgroundColor: "var(--ds-skeleton, ".concat(_colors.N30, ")"),
58
- backgroundImage: "linear-gradient(to right, ".concat("var(--ds-skeleton, ".concat(_colors.N30, ")"), " 10%, ", "var(--ds-skeleton-subtle, ".concat(_colors.N20, ")"), " 30%, ", "var(--ds-skeleton, ".concat(_colors.N30, ")"), " 50%)"),
59
- backgroundRepeat: 'no-repeat'
60
- });
14
+ var _SkeletonOld = require("./SkeletonOld");
15
+ 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); }
16
+ 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; }
17
+ var AutomationSkeletonContainer = null;
18
+ var SkeletonContainer = null;
19
+ var SkeletonIcon = null;
20
+ var MenuIcon = null;
21
+ var shimmer = null;
22
+ var SkeletonText = null;
61
23
  var SkeletonLine = function SkeletonLine() {
62
- return (0, _react.jsx)("div", {
63
- css: SkeletonContainer
64
- }, (0, _react.jsx)("div", {
65
- css: MenuIcon
66
- }, (0, _react.jsx)("div", {
67
- css: SkeletonIcon
68
- })), (0, _react.jsx)("div", {
69
- css: SkeletonText
24
+ return /*#__PURE__*/React.createElement("div", {
25
+ className: (0, _runtime.ax)(["_1mouu2gc _195gv47k _1e0c1txw"])
26
+ }, /*#__PURE__*/React.createElement("div", {
27
+ className: (0, _runtime.ax)(["_1bsb1tcg _4t3i1tcg _1e0c1txw _1bah1h6o _4cvr1h6o"])
28
+ }, /*#__PURE__*/React.createElement("div", {
29
+ className: (0, _runtime.ax)(["_2rkov77o _19it1vjj _1bsbpxbi _4t3ipxbi _1e0c1o8l _bfhk1r31 _tzy4nh7s"]),
30
+ style: {
31
+ "--_z2s59f": (0, _runtime.ix)("var(--ds-space-025, 2px)".concat(" solid transparent"))
32
+ }
33
+ })), /*#__PURE__*/React.createElement("div", {
34
+ className: (0, _runtime.ax)(["_1bsb13sl _4t3ipxbi _19pk1b66 _18u0utpp _5sag9cwz _1o51q7pw _tip812c5 _j7hq1nls _1pglp3kn _bfhk1uqo _1itk8aai _12vemgnk"]),
35
+ style: {
36
+ "--_1vab7it": (0, _runtime.ix)("var(--ds-skeleton, ".concat(_colors.N30, ")")),
37
+ "--_w76hiz": (0, _runtime.ix)("linear-gradient(to right, ".concat("var(--ds-skeleton, ".concat(_colors.N30, ")"), " 10%, ", "var(--ds-skeleton-subtle, ".concat(_colors.N20, ")"), " 30%, ", "var(--ds-skeleton, ".concat(_colors.N30, ")"), " 50%)"))
38
+ }
70
39
  }));
71
40
  };
72
41
  var getSkeletonLines = function getSkeletonLines(lineCount) {
73
42
  var skeletonLines = [];
74
43
  for (var i = 0; i < lineCount; i++) {
75
- skeletonLines.push((0, _react.jsx)(SkeletonLine, {
44
+ skeletonLines.push( /*#__PURE__*/React.createElement(SkeletonLine, {
76
45
  key: "skeleton-line-".concat(i)
77
46
  }));
78
47
  }
79
48
  return skeletonLines;
80
49
  };
81
- var Skeleton = exports.Skeleton = function Skeleton(props) {
50
+ var SkeletonNew = exports.SkeletonNew = function SkeletonNew(props) {
82
51
  var _props$lineCount = props.lineCount,
83
52
  lineCount = _props$lineCount === void 0 ? 5 : _props$lineCount;
84
- return (
85
- // eslint-disable-next-line @atlaskit/design-system/use-primitives
86
- (0, _react.jsx)("div", {
87
- css: AutomationSkeletonContainer
88
- }, getSkeletonLines(lineCount))
89
- );
53
+ return /*#__PURE__*/React.createElement("div", {
54
+ className: (0, _runtime.ax)(["_1rjcv77o"])
55
+ }, getSkeletonLines(lineCount));
56
+ };
57
+ var Skeleton = exports.Skeleton = function Skeleton(props) {
58
+ return (0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard') ? /*#__PURE__*/React.createElement(SkeletonNew, props) : /*#__PURE__*/React.createElement(_SkeletonOld.SkeletonOld, props);
90
59
  };
@@ -1,3 +1,4 @@
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,11 +6,12 @@ Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var React = _react;
11
+ var _runtime = require("@compiled/react/runtime");
8
12
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
13
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
14
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
- var _react = require("react");
12
- var _react2 = require("@emotion/react");
13
15
  var _reactIntlNext = require("react-intl-next");
14
16
  var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
15
17
  var _messages = require("../../../../../messages");
@@ -19,10 +21,7 @@ var _action = _interopRequireDefault(require("../action"));
19
21
  var _relatedLinksActionIcon = _interopRequireDefault(require("./related-links-action-icon"));
20
22
  var _excluded = ["onClick"];
21
23
  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); }
22
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(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; } /**
23
- * @jsxRuntime classic
24
- * @jsx jsx
25
- */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
24
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(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; }
26
25
  var RelatedLinksModal = /*#__PURE__*/(0, _react.lazy)(function () {
27
26
  return Promise.resolve().then(function () {
28
27
  return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_smartcard-RelatedLinksModal" */'../../../../RelatedLinksModal'));
@@ -40,7 +39,7 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
40
39
  var onClick = (0, _react.useCallback)(function () {
41
40
  var ari = actionData === null || actionData === void 0 ? void 0 : actionData.ari;
42
41
  if (ari) {
43
- modal.open((0, _react2.jsx)(RelatedLinksModal, {
42
+ modal.open( /*#__PURE__*/React.createElement(RelatedLinksModal, {
44
43
  ari: ari,
45
44
  showModal: true,
46
45
  onClose: function onClose() {
@@ -51,9 +50,9 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
51
50
  fireEvent('ui.button.clicked.relatedLinks', {});
52
51
  onClickCallback === null || onClickCallback === void 0 || onClickCallback();
53
52
  }, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
54
- return actionData ? (0, _react2.jsx)(_action.default, (0, _extends2.default)({
55
- content: (0, _react2.jsx)(_reactIntlNext.FormattedMessage, _messages.messages.related_links_view_related_urls),
56
- icon: (0, _react2.jsx)(_relatedLinksActionIcon.default, null),
53
+ return actionData ? /*#__PURE__*/React.createElement(_action.default, (0, _extends2.default)({
54
+ content: /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, _messages.messages.related_links_view_related_urls),
55
+ icon: /*#__PURE__*/React.createElement(_relatedLinksActionIcon.default, null),
57
56
  onClick: onClick,
58
57
  testId: "smart-action-view-related-links-action",
59
58
  ariaLabel: "View most recent pages or content types coming from or found on this link"
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = require("@emotion/react");
9
+ var _childIssues = _interopRequireDefault(require("@atlaskit/icon/core/migration/child-issues"));
10
+ /**
11
+ * @jsxRuntime classic
12
+ * @jsx jsx
13
+ */
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
15
+
16
+ var rotateSvg = (0, _react.css)({
17
+ transform: 'rotate(180deg)',
18
+ display: 'inline-block'
19
+ });
20
+
21
+ /**
22
+ * ChildIssuesIcon but 180 degrees rotated
23
+ */
24
+ var RelatedLinksActionIconOld = function RelatedLinksActionIconOld() {
25
+ return (0, _react.jsx)("span", {
26
+ css: rotateSvg
27
+ }, (0, _react.jsx)(_childIssues.default, {
28
+ color: "currentColor",
29
+ spacing: "spacious",
30
+ label: "View recent links..."
31
+ }));
32
+ };
33
+ var _default = exports.default = RelatedLinksActionIconOld;
@@ -0,0 +1,2 @@
1
+ ._1e0c1o8l{display:inline-block}
2
+ ._t9ec1sub{transform:rotate(180deg)}
@@ -1,33 +1,38 @@
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.default = void 0;
8
- var _react = require("@emotion/react");
10
+ require("./index.compiled.css");
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _runtime = require("@compiled/react/runtime");
9
13
  var _childIssues = _interopRequireDefault(require("@atlaskit/icon/core/migration/child-issues"));
10
- /**
11
- * @jsxRuntime classic
12
- * @jsx jsx
13
- */
14
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
15
-
16
- var rotateSvg = (0, _react.css)({
17
- transform: 'rotate(180deg)',
18
- display: 'inline-block'
19
- });
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
+ var _RelatedLinksActionIconOld = _interopRequireDefault(require("./RelatedLinksActionIconOld"));
16
+ 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); }
17
+ 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; }
18
+ var rotateSvg = null;
20
19
 
21
20
  /**
22
21
  * ChildIssuesIcon but 180 degrees rotated
23
22
  */
24
- var RelatedLinksActionIcon = function RelatedLinksActionIcon() {
25
- return (0, _react.jsx)("span", {
26
- css: rotateSvg
27
- }, (0, _react.jsx)(_childIssues.default, {
23
+ var RelatedLinksActionIconNew = function RelatedLinksActionIconNew() {
24
+ return /*#__PURE__*/React.createElement("span", {
25
+ className: (0, _runtime.ax)(["_t9ec1sub _1e0c1o8l"])
26
+ }, /*#__PURE__*/React.createElement(_childIssues.default, {
28
27
  color: "currentColor",
29
28
  spacing: "spacious",
30
29
  label: "View recent links..."
31
30
  }));
32
31
  };
32
+ var RelatedLinksActionIcon = function RelatedLinksActionIcon() {
33
+ if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
34
+ return /*#__PURE__*/React.createElement(RelatedLinksActionIconNew, null);
35
+ }
36
+ return /*#__PURE__*/React.createElement(_RelatedLinksActionIconOld.default, null);
37
+ };
33
38
  var _default = exports.default = RelatedLinksActionIcon;
@@ -30,6 +30,10 @@ var getFormattedMessageAsString = exports.getFormattedMessageAsString = function
30
30
  context: context
31
31
  }) : '';
32
32
  };
33
+
34
+ /**
35
+ * @deprecated remove on FF bandicoots-compiled-migration-smartcard clean up
36
+ */
33
37
  var getIconDimensionStyles = function getIconDimensionStyles(value) {
34
38
  return (0, _react2.css)({
35
39
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -46,6 +50,10 @@ var getIconDimensionStyles = function getIconDimensionStyles(value) {
46
50
  maxWidth: value
47
51
  });
48
52
  };
53
+
54
+ /**
55
+ * @deprecated remove on FF bandicoots-compiled-migration-smartcard clean up
56
+ */
49
57
  var getIconSizeStyles = exports.getIconSizeStyles = function getIconSizeStyles(width) {
50
58
  var sizeStyles = getIconDimensionStyles(width);
51
59
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "34.0.0",
23
+ packageVersion: "34.1.0",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "34.0.0"
5
+ packageVersion: "34.1.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,100 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
+ import { jsx } from '@emotion/react';
7
+ import { SmartLinkSize } from '../../../../../constants';
8
+ import ActionButton from './action-button';
9
+ import ActionDropdownItem from './action-dropdown-item';
10
+ import ActionIcon from './action-icon';
11
+ import ActionStackItem from './action-stack-item';
12
+ /**
13
+ * A base action that can be triggered with an on click.
14
+ * @internal
15
+ * @param {ActionProps} ActionProps - The props necessary for the Action.
16
+ */
17
+ const ActionOld = ({
18
+ as,
19
+ appearance = 'subtle',
20
+ content,
21
+ isLoading = false,
22
+ onClick,
23
+ size = SmartLinkSize.Medium,
24
+ testId = 'smart-action',
25
+ icon,
26
+ iconPosition = 'before',
27
+ spaceInline,
28
+ tooltipMessage,
29
+ tooltipOnHide,
30
+ hideTooltip,
31
+ hideTooltipOnMouseDown,
32
+ xcss,
33
+ asDropDownItem,
34
+ overrideCss,
35
+ isDisabled,
36
+ href,
37
+ ariaLabel,
38
+ wrapper: Wrapper
39
+ }) => {
40
+ if (!onClick) {
41
+ return null;
42
+ }
43
+ const isStackItem = as === 'stack-item';
44
+ const isDropdownItem = as === 'dropdown-item' || asDropDownItem;
45
+ const actionIcon = icon && jsx(ActionIcon, {
46
+ asStackItemIcon: isStackItem,
47
+ isDisabled: isDisabled,
48
+ icon: icon,
49
+ size: size,
50
+ testId: testId
51
+ });
52
+ const iconBefore = icon && iconPosition === 'before' ? actionIcon : undefined;
53
+ const iconAfter = icon && iconPosition === 'after' ? actionIcon : undefined;
54
+ if (isStackItem) {
55
+ return jsx(ActionStackItem, {
56
+ content: content,
57
+ icon: actionIcon,
58
+ space: spaceInline,
59
+ isDisabled: isDisabled,
60
+ isLoading: isLoading,
61
+ onClick: onClick,
62
+ size: size,
63
+ testId: testId,
64
+ tooltipMessage: tooltipMessage || content
65
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
66
+ ,
67
+ xcss: xcss,
68
+ tooltipOnHide: tooltipOnHide,
69
+ hideTooltipOnMouseDown: hideTooltipOnMouseDown,
70
+ hideTooltip: hideTooltip
71
+ });
72
+ }
73
+ if (isDropdownItem) {
74
+ return jsx(ActionDropdownItem, {
75
+ content: content,
76
+ iconAfter: iconAfter,
77
+ iconBefore: iconBefore,
78
+ isLoading: isLoading,
79
+ onClick: onClick,
80
+ testId: testId
81
+ });
82
+ }
83
+ const button = jsx(ActionButton, {
84
+ appearance: appearance,
85
+ content: content,
86
+ iconAfter: iconAfter,
87
+ iconBefore: iconBefore,
88
+ isLoading: isLoading,
89
+ onClick: onClick,
90
+ overrideCss: overrideCss,
91
+ size: size,
92
+ testId: testId,
93
+ tooltipMessage: tooltipMessage || content,
94
+ isDisabled: isDisabled,
95
+ href: href,
96
+ ariaLabel: ariaLabel
97
+ });
98
+ return Wrapper !== undefined ? jsx(Wrapper, null, button) : button;
99
+ };
100
+ export default ActionOld;