@atlaskit/smart-card 34.2.2 → 34.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/index.js +201 -263
- package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +8 -13
- package/dist/cjs/view/FlexibleCard/components/actions/view-related-links-action/index.js +5 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +33 -18
- package/dist/cjs/view/FlexibleCard/components/blocks/block/indexOld.js +56 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.js +115 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.compiled.css +46 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +58 -81
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/index.js +12 -8
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/indexOld.js +37 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +18 -52
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +104 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.js +135 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.js +108 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/errored/index.js +10 -57
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.compiled.css +2 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +38 -37
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.js +58 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +24 -16
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +48 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +55 -0
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +23 -19
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +14 -9
- package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +4 -9
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +15 -14
- package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.js +63 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.js +61 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-link-item/index.js +20 -19
- package/dist/cjs/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.js +51 -0
- package/dist/cjs/view/RelatedLinksModal/components/related-links-list/index.js +24 -24
- package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.js +66 -0
- package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/index.compiled.css +6 -0
- package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/index.js +31 -25
- package/dist/cjs/view/RelatedLinksModal/views/resolved/ResolvedOld.js +45 -0
- package/dist/cjs/view/RelatedLinksModal/views/resolved/index.js +16 -14
- package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.js +141 -0
- package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.compiled.css +6 -0
- package/dist/cjs/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +56 -50
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/utils/index.js +69 -55
- package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -3
- package/dist/es2019/view/FlexibleCard/components/actions/view-related-links-action/index.js +1 -4
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/block/index.js +32 -35
- package/dist/es2019/view/FlexibleCard/components/blocks/block/indexOld.js +62 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.js +113 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.compiled.css +46 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +60 -95
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/index.js +12 -8
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/indexOld.js +28 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +14 -62
- package/dist/es2019/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +106 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.js +118 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.js +102 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/errored/index.js +11 -57
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.compiled.css +2 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/index.js +35 -36
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.js +50 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +15 -11
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +42 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +55 -0
- package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -18
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +9 -2
- package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +1 -3
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +15 -14
- package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.js +55 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.js +55 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-link-item/index.js +19 -18
- package/dist/es2019/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.js +42 -0
- package/dist/es2019/view/RelatedLinksModal/components/related-links-list/index.js +23 -22
- package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.js +58 -0
- package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.compiled.css +6 -0
- package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.js +28 -24
- package/dist/es2019/view/RelatedLinksModal/views/resolved/ResolvedOld.js +36 -0
- package/dist/es2019/view/RelatedLinksModal/views/resolved/index.js +16 -13
- package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.js +133 -0
- package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.compiled.css +6 -0
- package/dist/es2019/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +53 -49
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/utils/index.js +116 -162
- package/dist/esm/view/FlexibleCard/components/actions/action/index.js +1 -3
- package/dist/esm/view/FlexibleCard/components/actions/view-related-links-action/index.js +1 -4
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.compiled.css +34 -0
- package/dist/esm/view/FlexibleCard/components/blocks/block/index.js +31 -20
- package/dist/esm/view/FlexibleCard/components/blocks/block/indexOld.js +50 -0
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.js +108 -0
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.compiled.css +46 -0
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +54 -79
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/index.js +12 -8
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/indexOld.js +30 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.compiled.css +15 -0
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +15 -53
- package/dist/esm/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.js +98 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.js +127 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.js +101 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/errored/index.js +11 -56
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.compiled.css +2 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/index.js +36 -37
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.js +53 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.compiled.css +1 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +15 -11
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.js +42 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +55 -0
- package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +20 -18
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +14 -9
- package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +1 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +15 -14
- package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.js +53 -0
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.js +54 -0
- package/dist/esm/view/RelatedLinksModal/components/related-link-item/index.js +19 -18
- package/dist/esm/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.js +43 -0
- package/dist/esm/view/RelatedLinksModal/components/related-links-list/index.js +24 -23
- package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.js +58 -0
- package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.compiled.css +6 -0
- package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.js +28 -24
- package/dist/esm/view/RelatedLinksModal/views/resolved/ResolvedOld.js +37 -0
- package/dist/esm/view/RelatedLinksModal/views/resolved/index.js +16 -13
- package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.js +133 -0
- package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.compiled.css +6 -0
- package/dist/esm/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.js +53 -49
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/view/FlexibleCard/components/blocks/block/index.d.ts +3 -10
- package/dist/types/view/FlexibleCard/components/blocks/block/indexOld.d.ts +11 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.d.ts +17 -0
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +5 -9
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/index.d.ts +3 -13
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/indexOld.d.ts +14 -0
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/resolved/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.d.ts +10 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.d.ts +16 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.d.ts +15 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +5 -7
- package/dist/types/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -13
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.d.ts +9 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +8 -2
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.d.ts +14 -0
- package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +5 -3
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +2 -0
- package/dist/types/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +3 -7
- package/dist/types/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.d.ts +8 -0
- package/dist/types/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.d.ts +8 -0
- package/dist/types/view/RelatedLinksModal/components/related-link-item/index.d.ts +3 -7
- package/dist/types/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.d.ts +8 -0
- package/dist/types/view/RelatedLinksModal/components/related-links-list/index.d.ts +3 -7
- package/dist/types/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.d.ts +6 -0
- package/dist/types/view/RelatedLinksModal/views/errored/error-svg/index.d.ts +2 -6
- package/dist/types/view/RelatedLinksModal/views/resolved/ResolvedOld.d.ts +8 -0
- package/dist/types/view/RelatedLinksModal/views/resolved/index.d.ts +3 -7
- package/dist/types/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.d.ts +6 -0
- package/dist/types/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.d.ts +2 -6
- package/dist/types-ts4.5/utils/index.d.ts +2 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/block/index.d.ts +3 -10
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/block/indexOld.d.ts +11 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/ElementGroupOld.d.ts +17 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/index.d.ts +5 -9
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/types.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/index.d.ts +3 -13
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/indexOld.d.ts +14 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/resolved/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/preview-block/resolved/indexOld.d.ts +10 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/TitleBlockOld.d.ts +16 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/errored/TitleBlockErroredViewOld.d.ts +15 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/errored/index.d.ts +5 -7
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/index.d.ts +1 -13
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/TitleBlockResolvedViewOld.d.ts +9 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolved/index.d.ts +8 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolving/TitleBlockResolvingViewOld.d.ts +14 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +5 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +2 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/RelatedLinksBaseModal.d.ts +3 -7
- package/dist/types-ts4.5/view/RelatedLinksModal/components/RelatedLinksBaseModalOld.d.ts +8 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-link-item/RelatedLinkItemOld.d.ts +8 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-link-item/index.d.ts +3 -7
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-links-list/RelatedLinksListOld.d.ts +8 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/components/related-links-list/index.d.ts +3 -7
- package/dist/types-ts4.5/view/RelatedLinksModal/views/errored/error-svg/ErrorSvgOld.d.ts +6 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/errored/error-svg/index.d.ts +2 -6
- package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/ResolvedOld.d.ts +8 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/resolved/index.d.ts +3 -7
- package/dist/types-ts4.5/view/RelatedLinksModal/views/unavailable/unavailable-svg/UnavailableSvgOld.d.ts +6 -0
- package/dist/types-ts4.5/view/RelatedLinksModal/views/unavailable/unavailable-svg/index.d.ts +2 -6
- package/package.json +4 -4
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
4
|
Object.defineProperty(exports, "__esModule", {
|
|
7
5
|
value: true
|
|
8
6
|
});
|
|
9
7
|
exports.default = void 0;
|
|
10
|
-
var
|
|
11
|
-
var _runtime = require("@compiled/react/runtime");
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
9
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
10
|
var _constants = require("../../../../../constants");
|
|
14
11
|
var _actionButton = _interopRequireDefault(require("./action-button"));
|
|
@@ -16,8 +13,6 @@ var _actionDropdownItem = _interopRequireDefault(require("./action-dropdown-item
|
|
|
16
13
|
var _actionIcon = _interopRequireDefault(require("./action-icon"));
|
|
17
14
|
var _actionStackItem = _interopRequireDefault(require("./action-stack-item"));
|
|
18
15
|
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; }
|
|
21
16
|
/**
|
|
22
17
|
* A base action that can be triggered with an on click.
|
|
23
18
|
* @internal
|
|
@@ -55,7 +50,7 @@ var ActionNew = function ActionNew(_ref) {
|
|
|
55
50
|
}
|
|
56
51
|
var isStackItem = as === 'stack-item';
|
|
57
52
|
var isDropdownItem = as === 'dropdown-item' || asDropDownItem;
|
|
58
|
-
var actionIcon = icon && /*#__PURE__*/
|
|
53
|
+
var actionIcon = icon && /*#__PURE__*/_react.default.createElement(_actionIcon.default, {
|
|
59
54
|
asStackItemIcon: isStackItem,
|
|
60
55
|
isDisabled: isDisabled,
|
|
61
56
|
icon: icon,
|
|
@@ -65,7 +60,7 @@ var ActionNew = function ActionNew(_ref) {
|
|
|
65
60
|
var iconBefore = icon && iconPosition === 'before' ? actionIcon : undefined;
|
|
66
61
|
var iconAfter = icon && iconPosition === 'after' ? actionIcon : undefined;
|
|
67
62
|
if (isStackItem) {
|
|
68
|
-
return /*#__PURE__*/
|
|
63
|
+
return /*#__PURE__*/_react.default.createElement(_actionStackItem.default, {
|
|
69
64
|
content: content,
|
|
70
65
|
icon: actionIcon,
|
|
71
66
|
space: spaceInline,
|
|
@@ -84,7 +79,7 @@ var ActionNew = function ActionNew(_ref) {
|
|
|
84
79
|
});
|
|
85
80
|
}
|
|
86
81
|
if (isDropdownItem) {
|
|
87
|
-
return /*#__PURE__*/
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_actionDropdownItem.default, {
|
|
88
83
|
content: content,
|
|
89
84
|
iconAfter: iconAfter,
|
|
90
85
|
iconBefore: iconBefore,
|
|
@@ -93,7 +88,7 @@ var ActionNew = function ActionNew(_ref) {
|
|
|
93
88
|
testId: testId
|
|
94
89
|
});
|
|
95
90
|
}
|
|
96
|
-
var button = /*#__PURE__*/
|
|
91
|
+
var button = /*#__PURE__*/_react.default.createElement(_actionButton.default, {
|
|
97
92
|
appearance: appearance,
|
|
98
93
|
content: content,
|
|
99
94
|
iconAfter: iconAfter,
|
|
@@ -110,12 +105,12 @@ var ActionNew = function ActionNew(_ref) {
|
|
|
110
105
|
href: href,
|
|
111
106
|
ariaLabel: ariaLabel
|
|
112
107
|
});
|
|
113
|
-
return Wrapper !== undefined ? /*#__PURE__*/
|
|
108
|
+
return Wrapper !== undefined ? /*#__PURE__*/_react.default.createElement(Wrapper, null, button) : button;
|
|
114
109
|
};
|
|
115
110
|
var Action = function Action(props) {
|
|
116
111
|
if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
|
|
117
|
-
return /*#__PURE__*/
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement(ActionNew, props);
|
|
118
113
|
}
|
|
119
|
-
return /*#__PURE__*/
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_ActionOld.default, props);
|
|
120
115
|
};
|
|
121
116
|
var _default = exports.default = Action;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* index.tsx generated by @compiled/babel-plugin v0.35.0 */
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,12 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var React = _react;
|
|
11
|
-
var _runtime = require("@compiled/react/runtime");
|
|
12
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
12
|
var _reactIntlNext = require("react-intl-next");
|
|
16
13
|
var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
|
|
17
14
|
var _messages = require("../../../../../messages");
|
|
@@ -39,7 +36,7 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
|
|
|
39
36
|
var onClick = (0, _react.useCallback)(function () {
|
|
40
37
|
var ari = actionData === null || actionData === void 0 ? void 0 : actionData.ari;
|
|
41
38
|
if (ari) {
|
|
42
|
-
modal.open( /*#__PURE__*/
|
|
39
|
+
modal.open( /*#__PURE__*/_react.default.createElement(RelatedLinksModal, {
|
|
43
40
|
ari: ari,
|
|
44
41
|
showModal: true,
|
|
45
42
|
onClose: function onClose() {
|
|
@@ -50,9 +47,9 @@ var ViewRelatedLinksAction = function ViewRelatedLinksAction(_ref) {
|
|
|
50
47
|
fireEvent('ui.button.clicked.relatedLinks', {});
|
|
51
48
|
onClickCallback === null || onClickCallback === void 0 || onClickCallback();
|
|
52
49
|
}, [actionData === null || actionData === void 0 ? void 0 : actionData.ari, fireEvent, modal, onClickCallback]);
|
|
53
|
-
return actionData ? /*#__PURE__*/
|
|
54
|
-
content: /*#__PURE__*/
|
|
55
|
-
icon: /*#__PURE__*/
|
|
50
|
+
return actionData ? /*#__PURE__*/_react.default.createElement(_action.default, (0, _extends2.default)({
|
|
51
|
+
content: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.related_links_view_related_urls),
|
|
52
|
+
icon: /*#__PURE__*/_react.default.createElement(_relatedLinksActionIcon.default, null),
|
|
56
53
|
onClick: onClick,
|
|
57
54
|
testId: "smart-action-view-related-links-action",
|
|
58
55
|
ariaLabel: "View most recent pages or content types coming from or found on this link"
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
._zulp1j6v{gap:1rem}
|
|
3
|
+
._zulp1k92{gap:1.25rem}
|
|
4
|
+
._zulp1kwk{gap:.5rem}
|
|
5
|
+
._zulp6mu8{gap:.25rem}._12ji1kw7{outline-color:inherit}
|
|
6
|
+
._12ji1snc{outline-color:currentColor!important}
|
|
7
|
+
._12y310yn{outline-width:medium!important}
|
|
8
|
+
._181uglyw{-webkit-user-select:none}
|
|
9
|
+
._18m915vq{overflow-y:hidden}
|
|
10
|
+
._18ql1j28{-webkit-tap-highlight-color:transparent}
|
|
11
|
+
._1bah1y6m{justify-content:flex-start}
|
|
12
|
+
._1e0c1txw{display:flex}
|
|
13
|
+
._1ifmglyw{-webkit-touch-callout:none}
|
|
14
|
+
._1ljq1j6v [data-separator]+[data-separator]:before{margin-right:1rem}
|
|
15
|
+
._1ljq1k92 [data-separator]+[data-separator]:before{margin-right:1.25rem}
|
|
16
|
+
._1ljq1kwk [data-separator]+[data-separator]:before{margin-right:.5rem}
|
|
17
|
+
._1ljq6mu8 [data-separator]+[data-separator]:before{margin-right:.25rem}
|
|
18
|
+
._1ouwidpf>*{min-width:0}
|
|
19
|
+
._1qu2agmp{outline-style:none!important}
|
|
20
|
+
._1reo15vq{overflow-x:hidden}
|
|
21
|
+
._1rkwglyw{-moz-user-select:none}
|
|
22
|
+
._1ul9idpf{min-width:0}
|
|
23
|
+
._1uzp1mp2 [data-separator]+[data-separator]:before{content:"•"}
|
|
24
|
+
._2lx21bp4{flex-direction:column}
|
|
25
|
+
._2lx2vrvc{flex-direction:row}
|
|
26
|
+
._4cvr1h6o{align-items:center}
|
|
27
|
+
._4cvr1y6m{align-items:flex-start}
|
|
28
|
+
._a7e8uxlv [data-smart-element=TargetBranch]+[data-smart-element=SourceBranch]:before{content:"←"}
|
|
29
|
+
._f6ju1ns9>[data-fit-to-content]{min-width:-moz-fit-content;min-width:fit-content}
|
|
30
|
+
._fiawglyw:empty{display:none}
|
|
31
|
+
._syaz1kw7{color:inherit}
|
|
32
|
+
._te17glyw{-ms-user-select:none}
|
|
33
|
+
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
34
|
+
._ytq1bjq5 [data-smart-element=SourceBranch]+[data-smart-element=TargetBranch]:before{content:"→"}
|
|
@@ -1,25 +1,33 @@
|
|
|
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
|
-
|
|
9
|
-
var _react = require("react");
|
|
10
|
-
var
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
14
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
15
|
var _constants = require("../../../../../constants");
|
|
12
16
|
var _utils = require("../utils");
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
var _indexOld = _interopRequireDefault(require("./indexOld"));
|
|
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; }
|
|
20
|
+
var BaseBlockStyles = null;
|
|
21
|
+
var highlightRemoveStyles = null;
|
|
22
|
+
var gapsStyles = {
|
|
23
|
+
xlarge: "_zulp1k92 _1ljq1k92",
|
|
24
|
+
large: "_zulp1j6v _1ljq1j6v",
|
|
25
|
+
medium: "_zulp1kwk _1ljq1kwk",
|
|
26
|
+
small: "_zulp6mu8 _1ljq6mu8"
|
|
27
|
+
};
|
|
28
|
+
var directionStyles = {
|
|
29
|
+
vertical: "_2lx21bp4 _4cvr1y6m",
|
|
30
|
+
horizontal: "_2lx2vrvc _4cvr1h6o"
|
|
23
31
|
};
|
|
24
32
|
|
|
25
33
|
/**
|
|
@@ -37,20 +45,27 @@ var Block = function Block(_ref) {
|
|
|
37
45
|
size = _ref$size === void 0 ? _constants.SmartLinkSize.Medium : _ref$size,
|
|
38
46
|
_ref$testId = _ref.testId,
|
|
39
47
|
testId = _ref$testId === void 0 ? 'smart-block' : _ref$testId,
|
|
40
|
-
|
|
48
|
+
className = _ref.className,
|
|
41
49
|
blockRef = _ref.blockRef,
|
|
42
50
|
onRender = _ref.onRender,
|
|
43
51
|
onTransitionEnd = _ref.onTransitionEnd;
|
|
44
52
|
(0, _react.useEffect)(function () {
|
|
45
53
|
onRender && onRender();
|
|
46
54
|
}, [onRender]);
|
|
47
|
-
return
|
|
48
|
-
// eslint-disable-next-line @atlaskit/
|
|
49
|
-
|
|
55
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
57
|
+
className: (0, _runtime.ax)(["_1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf _1bah1y6m _fiawglyw _1ouwidpf _f6ju1ns9 _1uzp1mp2 _ytq1bjq5 _a7e8uxlv", "_12ji1snc _1qu2agmp _12y310yn _12ji1kw7 _syaz1kw7 _18ql1j28 _1ifmglyw _181uglyw _1rkwglyw _te17glyw _uiztglyw", directionStyles[direction], gapsStyles[size], className]),
|
|
50
58
|
"data-smart-block": true,
|
|
51
59
|
"data-testid": testId,
|
|
52
60
|
onTransitionEnd: onTransitionEnd,
|
|
53
61
|
ref: blockRef
|
|
54
62
|
}, (0, _utils.renderChildren)(children, size));
|
|
55
63
|
};
|
|
56
|
-
var
|
|
64
|
+
var Exported = function Exported(props) {
|
|
65
|
+
if ((0, _platformFeatureFlags.fg)('bandicoots-compiled-migration-smartcard')) {
|
|
66
|
+
return /*#__PURE__*/React.createElement(Block, props);
|
|
67
|
+
} else {
|
|
68
|
+
return /*#__PURE__*/React.createElement(_indexOld.default, props);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
var _default = exports.default = Exported;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _react2 = require("@emotion/react");
|
|
11
|
+
var _constants = require("../../../../../constants");
|
|
12
|
+
var _utils = require("../utils");
|
|
13
|
+
var _templateObject;
|
|
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
|
+
var getBlockStyles = function getBlockStyles(direction, size
|
|
20
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
21
|
+
) {
|
|
22
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t", "\n justify-content: flex-start;\n\t[data-separator] + [data-separator]:before {\n\t\tcontent: '\u2022';\n\t\tmargin-right: ", "rem;\n\t}\n\t// Pull request elements: source branch \u2192 target branch\n\t[data-smart-element='", "']\n\t\t+ [data-smart-element='", "']:before {\n\t\tcontent: '\u2192';\n\t}\n\t// Pull request elements: target branch \u2190 source branch\n\t[data-smart-element='", "']\n\t\t+ [data-smart-element='", "']:before {\n\t\tcontent: '\u2190';\n\t}\n"])), (0, _utils.getBaseStyles)(direction, size), _utils.highlightRemoveStyles, (0, _utils.getGapSize)(size), _constants.ElementName.SourceBranch, _constants.ElementName.TargetBranch, _constants.ElementName.TargetBranch, _constants.ElementName.SourceBranch);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A block represents a collection of elements and actions that are arranged
|
|
27
|
+
* in a row. All elements and actions should be contained within a Block.
|
|
28
|
+
* @internal
|
|
29
|
+
* @param {ActionGroupProps} ActionGroupProps
|
|
30
|
+
* @see Action
|
|
31
|
+
*/
|
|
32
|
+
var Block = function Block(_ref) {
|
|
33
|
+
var children = _ref.children,
|
|
34
|
+
_ref$direction = _ref.direction,
|
|
35
|
+
direction = _ref$direction === void 0 ? _constants.SmartLinkDirection.Horizontal : _ref$direction,
|
|
36
|
+
_ref$size = _ref.size,
|
|
37
|
+
size = _ref$size === void 0 ? _constants.SmartLinkSize.Medium : _ref$size,
|
|
38
|
+
_ref$testId = _ref.testId,
|
|
39
|
+
testId = _ref$testId === void 0 ? 'smart-block' : _ref$testId,
|
|
40
|
+
overrideCss = _ref.overrideCss,
|
|
41
|
+
blockRef = _ref.blockRef,
|
|
42
|
+
onRender = _ref.onRender,
|
|
43
|
+
onTransitionEnd = _ref.onTransitionEnd;
|
|
44
|
+
(0, _react.useEffect)(function () {
|
|
45
|
+
onRender && onRender();
|
|
46
|
+
}, [onRender]);
|
|
47
|
+
return (0, _react2.jsx)("div", {
|
|
48
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
49
|
+
css: [getBlockStyles(direction, size), overrideCss],
|
|
50
|
+
"data-smart-block": true,
|
|
51
|
+
"data-testid": testId,
|
|
52
|
+
onTransitionEnd: onTransitionEnd,
|
|
53
|
+
ref: blockRef
|
|
54
|
+
}, (0, _utils.renderChildren)(children, size));
|
|
55
|
+
};
|
|
56
|
+
var _default = exports.default = Block;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.getElementGroupStyles = exports.default = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _constants = require("../../../../../constants");
|
|
11
|
+
var _utils = require("../../utils");
|
|
12
|
+
var _utils2 = require("../utils");
|
|
13
|
+
var _templateObject;
|
|
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
|
+
var getAlignmentStyles = function getAlignmentStyles(align) {
|
|
20
|
+
switch (align) {
|
|
21
|
+
case _constants.SmartLinkAlignment.Right:
|
|
22
|
+
return (0, _react.css)({
|
|
23
|
+
WebkitBoxAlign: 'end',
|
|
24
|
+
MsFlexAlign: 'end',
|
|
25
|
+
justifyContent: 'flex-end',
|
|
26
|
+
textAlign: 'right'
|
|
27
|
+
});
|
|
28
|
+
case _constants.SmartLinkAlignment.Left:
|
|
29
|
+
default:
|
|
30
|
+
return (0, _react.css)({
|
|
31
|
+
WebkitBoxAlign: 'start',
|
|
32
|
+
MsFlexAlign: 'start',
|
|
33
|
+
justifyContent: 'flex-start',
|
|
34
|
+
textAlign: 'left'
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var getGapStyles = function getGapStyles(size, align) {
|
|
39
|
+
var gap = (0, _utils2.getGapSize)(size);
|
|
40
|
+
if (align === _constants.SmartLinkAlignment.Right) {
|
|
41
|
+
return (0, _react.css)({
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
43
|
+
'> span': {
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
45
|
+
marginLeft: "".concat(gap, "rem")
|
|
46
|
+
},
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
48
|
+
'> span:first-child': {
|
|
49
|
+
marginLeft: 'initial'
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return (0, _react.css)({
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
55
|
+
'> span': {
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
57
|
+
marginRight: "".concat(gap, "rem"),
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
59
|
+
'&:last-child': {
|
|
60
|
+
marginRight: 'initial'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var getHorizontalDirectionStyles = function getHorizontalDirectionStyles(size, align) {
|
|
66
|
+
var lineHeight = (0, _utils.getMaxLineHeight)(size);
|
|
67
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
68
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\tdisplay: block;\n\t\tvertical-align: middle;\n\t\t", "\n\n\t\t> span, > div {\n\t\t\tvertical-align: middle;\n\n\t\t\t&[data-smart-element-date-time],\n\t\t\t&[data-smart-element-text] {\n\t\t\t\t// Show all/wrapped/truncated\n\t\t\t\tdisplay: inline;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\t"])), (0, _utils.getTruncateStyles)(1, lineHeight + 'rem'), getGapStyles(size, align));
|
|
69
|
+
};
|
|
70
|
+
var getElementGroupStyles = exports.getElementGroupStyles = function getElementGroupStyles(direction, size, align, width, position) {
|
|
71
|
+
return (0, _react.css)(
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
73
|
+
(0, _utils2.getBaseStyles)(direction, size),
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
75
|
+
getAlignmentStyles(align), {
|
|
76
|
+
minWidth: '10%'
|
|
77
|
+
},
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
79
|
+
width === _constants.SmartLinkWidth.Flexible ? "flex: 1 3;" : '',
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
81
|
+
direction === _constants.SmartLinkDirection.Horizontal ? getHorizontalDirectionStyles(size, align) : '',
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
83
|
+
position === _constants.SmartLinkPosition.Top ? 'align-self: flex-start;' : '');
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Creates a group of Action components. Accepts an array of Actions, in addition to some styling
|
|
88
|
+
* preferences.
|
|
89
|
+
* @internal
|
|
90
|
+
* @param {ActionGroupProps} ActionGroupProps
|
|
91
|
+
* @see Action
|
|
92
|
+
*/
|
|
93
|
+
var ElementGroup = function ElementGroup(_ref) {
|
|
94
|
+
var _ref$align = _ref.align,
|
|
95
|
+
align = _ref$align === void 0 ? _constants.SmartLinkAlignment.Left : _ref$align,
|
|
96
|
+
children = _ref.children,
|
|
97
|
+
overrideCss = _ref.overrideCss,
|
|
98
|
+
_ref$direction = _ref.direction,
|
|
99
|
+
direction = _ref$direction === void 0 ? _constants.SmartLinkDirection.Horizontal : _ref$direction,
|
|
100
|
+
_ref$size = _ref.size,
|
|
101
|
+
size = _ref$size === void 0 ? _constants.SmartLinkSize.Medium : _ref$size,
|
|
102
|
+
_ref$testId = _ref.testId,
|
|
103
|
+
testId = _ref$testId === void 0 ? 'smart-element-group' : _ref$testId,
|
|
104
|
+
_ref$width = _ref.width,
|
|
105
|
+
width = _ref$width === void 0 ? _constants.SmartLinkWidth.FitToContent : _ref$width,
|
|
106
|
+
_ref$position = _ref.position,
|
|
107
|
+
position = _ref$position === void 0 ? _constants.SmartLinkPosition.Center : _ref$position;
|
|
108
|
+
return (0, _react.jsx)("div", {
|
|
109
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
110
|
+
css: [getElementGroupStyles(direction, size, align, width, position), overrideCss],
|
|
111
|
+
"data-smart-element-group": true,
|
|
112
|
+
"data-testid": testId
|
|
113
|
+
}, (0, _utils2.renderChildren)(children, size));
|
|
114
|
+
};
|
|
115
|
+
var _default = exports.default = ElementGroup;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
._zulp147b{gap:var(--ds-space-250,1.25rem)}
|
|
3
|
+
._zulp1e9d{gap:var(--ds-space-200,1rem)}
|
|
4
|
+
._zulpcxkx{gap:var(--ds-space-100,.5rem)}
|
|
5
|
+
._zulppdf9{gap:var(--ds-space-050,.25rem)}._16jlkb7n{flex-grow:1}
|
|
6
|
+
._18m915vq{overflow-y:hidden}
|
|
7
|
+
._1aaynkob >div, ._15tynkob >span{vertical-align:middle}
|
|
8
|
+
._1bah1y6m{justify-content:flex-start}
|
|
9
|
+
._1bahesu3{justify-content:flex-end}
|
|
10
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
11
|
+
._1dthh9n0{-webkit-box-align:end}
|
|
12
|
+
._1dthv2br{-webkit-box-align:start}
|
|
13
|
+
._1e0c1txw{display:flex}
|
|
14
|
+
._1e0c1ule{display:block}
|
|
15
|
+
._1iu61nu9 >div[data-smart-element-date-time], ._166k1nu9 >div[data-smart-element-text], ._1div1nu9 >span[data-smart-element-date-time], ._bmfb1nu9 >span[data-smart-element-text]{display:inline}
|
|
16
|
+
._1nmz1hna{word-break:break-word}
|
|
17
|
+
._1o9z11wp{flex-shrink:3}
|
|
18
|
+
._1ouwidpf>*{min-width:0}
|
|
19
|
+
._1reo15vq{overflow-x:hidden}
|
|
20
|
+
._1ul99by0{min-width:10%}
|
|
21
|
+
._1ul9idpf{min-width:0}
|
|
22
|
+
._1wpz1y6m{align-self:flex-start}
|
|
23
|
+
._1yyjkb7n{-webkit-line-clamp:1}
|
|
24
|
+
._24rc147b >span{margin-left:var(--ds-space-250,1.25rem)}
|
|
25
|
+
._24rc1e9d >span{margin-left:var(--ds-space-200,1rem)}
|
|
26
|
+
._24rccxkx >span{margin-left:var(--ds-space-100,.5rem)}
|
|
27
|
+
._24rcpdf9 >span{margin-left:var(--ds-space-050,.25rem)}
|
|
28
|
+
._2lx21bp4{flex-direction:column}
|
|
29
|
+
._2lx2vrvc{flex-direction:row}
|
|
30
|
+
._3dveidpf >span:first-of-type{margin-left:0}
|
|
31
|
+
._4cvr1h6o{align-items:center}
|
|
32
|
+
._4cvr1y6m{align-items:flex-start}
|
|
33
|
+
._7yhb147b >span{margin-right:var(--ds-space-250,1.25rem)}
|
|
34
|
+
._7yhb1e9d >span{margin-right:var(--ds-space-200,1rem)}
|
|
35
|
+
._7yhbcxkx >span{margin-right:var(--ds-space-100,.5rem)}
|
|
36
|
+
._7yhbpdf9 >span{margin-right:var(--ds-space-050,.25rem)}
|
|
37
|
+
._f6ju1ns9>[data-fit-to-content]{min-width:-moz-fit-content;min-width:fit-content}
|
|
38
|
+
._fiawglyw:empty{display:none}
|
|
39
|
+
._i0dlf1ug{flex-basis:0%}
|
|
40
|
+
._m6ukidpf >span:last-child{margin-right:0}
|
|
41
|
+
._r291h9n0{-ms-flex-align:end}
|
|
42
|
+
._r291v2br{-ms-flex-align:start}
|
|
43
|
+
._s7n4nkob{vertical-align:middle}
|
|
44
|
+
._sudp1e54{-webkit-box-orient:vertical}
|
|
45
|
+
._y3gn1e5h{text-align:left}
|
|
46
|
+
._y3gnusic{text-align:right}
|
|
@@ -1,86 +1,61 @@
|
|
|
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
|
-
exports.
|
|
8
|
-
|
|
9
|
-
var
|
|
9
|
+
exports.default = exports.ElementGroupNew = void 0;
|
|
10
|
+
require("./index.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
10
13
|
var _constants = require("../../../../../constants");
|
|
11
|
-
var _utils = require("
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
14
|
+
var _utils = require("../utils");
|
|
15
|
+
var _ElementGroupOld = _interopRequireDefault(require("./ElementGroupOld"));
|
|
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 alignmentStyleMap = {
|
|
19
|
+
right: "_1dthh9n0 _r291h9n0 _1bahesu3 _y3gnusic",
|
|
20
|
+
left: "_1dthv2br _r291v2br _1bah1y6m _y3gn1e5h"
|
|
21
|
+
};
|
|
22
|
+
var baseStyleBySize = {
|
|
23
|
+
xlarge: "_zulp147b _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
|
|
24
|
+
large: "_zulp1e9d _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
|
|
25
|
+
medium: "_zulpcxkx _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf",
|
|
26
|
+
small: "_zulppdf9 _1reo15vq _18m915vq _4cvr1h6o _1e0c1txw _1ul9idpf"
|
|
27
|
+
};
|
|
28
|
+
var baseStyleByDirection = {
|
|
29
|
+
horizontal: "_2lx2vrvc _4cvr1h6o",
|
|
30
|
+
vertical: "_2lx21bp4 _4cvr1y6m"
|
|
31
|
+
};
|
|
32
|
+
var baseStyle = null;
|
|
33
|
+
var widthStyle = {
|
|
34
|
+
flexible: "_16jlkb7n _1o9z11wp _i0dlf1ug",
|
|
35
|
+
'fit-to-content': ""
|
|
36
|
+
};
|
|
37
|
+
var positionStyle = {
|
|
38
|
+
top: "_1wpz1y6m",
|
|
39
|
+
center: ""
|
|
37
40
|
};
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
45
|
-
marginLeft: "".concat(gap, "rem")
|
|
46
|
-
},
|
|
47
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
48
|
-
'> span:first-child': {
|
|
49
|
-
marginLeft: 'initial'
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return (0, _react.css)({
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
55
|
-
'> span': {
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
57
|
-
marginRight: "".concat(gap, "rem"),
|
|
58
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
59
|
-
'&:last-child': {
|
|
60
|
-
marginRight: 'initial'
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
41
|
+
var horizontalStyleBase = null;
|
|
42
|
+
var horizontalStyleByHeight = {
|
|
43
|
+
'xlarge': "_1e0ccj1k _102k1m1q",
|
|
44
|
+
'large': "_1e0ccj1k _102k1m1q",
|
|
45
|
+
'medium': "_1e0ccj1k _102k1k8s",
|
|
46
|
+
'small': "_1e0ccj1k _102k1k8s"
|
|
64
47
|
};
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
48
|
+
var gapStylesLeft = {
|
|
49
|
+
'xlarge': "_7yhb147b _m6ukidpf",
|
|
50
|
+
'large': "_7yhb1e9d _m6ukidpf",
|
|
51
|
+
'medium': "_7yhbcxkx _m6ukidpf",
|
|
52
|
+
'small': "_7yhbpdf9 _m6ukidpf"
|
|
69
53
|
};
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
getAlignmentStyles(align), {
|
|
76
|
-
minWidth: '10%'
|
|
77
|
-
},
|
|
78
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
79
|
-
width === _constants.SmartLinkWidth.Flexible ? "flex: 1 3;" : '',
|
|
80
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
81
|
-
direction === _constants.SmartLinkDirection.Horizontal ? getHorizontalDirectionStyles(size, align) : '',
|
|
82
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
83
|
-
position === _constants.SmartLinkPosition.Top ? 'align-self: flex-start;' : '');
|
|
54
|
+
var gapStylesRight = {
|
|
55
|
+
'xlarge': "_24rc147b _3dveidpf",
|
|
56
|
+
'large': "_24rc1e9d _3dveidpf",
|
|
57
|
+
'medium': "_24rccxkx _3dveidpf",
|
|
58
|
+
'small': "_24rcpdf9 _3dveidpf"
|
|
84
59
|
};
|
|
85
60
|
|
|
86
61
|
/**
|
|
@@ -90,11 +65,10 @@ var getElementGroupStyles = exports.getElementGroupStyles = function getElementG
|
|
|
90
65
|
* @param {ActionGroupProps} ActionGroupProps
|
|
91
66
|
* @see Action
|
|
92
67
|
*/
|
|
93
|
-
var
|
|
68
|
+
var ElementGroupNew = exports.ElementGroupNew = function ElementGroupNew(_ref) {
|
|
94
69
|
var _ref$align = _ref.align,
|
|
95
70
|
align = _ref$align === void 0 ? _constants.SmartLinkAlignment.Left : _ref$align,
|
|
96
71
|
children = _ref.children,
|
|
97
|
-
overrideCss = _ref.overrideCss,
|
|
98
72
|
_ref$direction = _ref.direction,
|
|
99
73
|
direction = _ref$direction === void 0 ? _constants.SmartLinkDirection.Horizontal : _ref$direction,
|
|
100
74
|
_ref$size = _ref.size,
|
|
@@ -104,12 +78,15 @@ var ElementGroup = function ElementGroup(_ref) {
|
|
|
104
78
|
_ref$width = _ref.width,
|
|
105
79
|
width = _ref$width === void 0 ? _constants.SmartLinkWidth.FitToContent : _ref$width,
|
|
106
80
|
_ref$position = _ref.position,
|
|
107
|
-
position = _ref$position === void 0 ? _constants.SmartLinkPosition.Center : _ref$position
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
81
|
+
position = _ref$position === void 0 ? _constants.SmartLinkPosition.Center : _ref$position,
|
|
82
|
+
className = _ref.className;
|
|
83
|
+
var totalCss = [baseStyleBySize[size], baseStyleByDirection[direction], baseStyle, alignmentStyleMap[align], null, widthStyle[width], direction === _constants.SmartLinkDirection.Horizontal ? horizontalStyleBase : {}, direction === _constants.SmartLinkDirection.Horizontal ? horizontalStyleByHeight[size] : {}, direction === _constants.SmartLinkDirection.Horizontal ? _constants.SmartLinkAlignment.Left ? gapStylesLeft[size] : gapStylesRight[size] : {}, positionStyle[position]];
|
|
84
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
111
85
|
"data-smart-element-group": true,
|
|
112
86
|
"data-testid": testId
|
|
113
|
-
|
|
87
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
88
|
+
,
|
|
89
|
+
className: (0, _runtime.ax)([baseStyleBySize[size], baseStyleByDirection[direction], "_fiawglyw _1ouwidpf _f6ju1ns9", alignmentStyleMap[align], "_1ul99by0", widthStyle[width], direction === _constants.SmartLinkDirection.Horizontal && "_1reo15vq _18m915vq _1e0c1ule _s7n4nkob _1bto1l2s _1nmz1hna _1yyjkb7n _sudp1e54 _1aaynkob _15tynkob _1iu61nu9 _166k1nu9 _1div1nu9 _bmfb1nu9", direction === _constants.SmartLinkDirection.Horizontal && "", _constants.SmartLinkAlignment.Left ? gapStylesLeft[size] : gapStylesRight[size], positionStyle[position], className])
|
|
90
|
+
}, (0, _utils.renderChildren)(children, size));
|
|
114
91
|
};
|
|
115
|
-
var _default = exports.default =
|
|
92
|
+
var _default = exports.default = _ElementGroupOld.default;
|