@atlaskit/media-avatar-picker 24.6.5 → 24.6.6
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 +6 -0
- package/compass.yml +3 -2
- package/dist/cjs/avatar-list/index.js +4 -1
- package/dist/cjs/avatar-list/styles.js +6 -0
- package/dist/cjs/avatar-picker-dialog/SubmitErrorDialog.js +17 -13
- package/dist/cjs/avatar-picker-dialog/index.js +9 -6
- package/dist/cjs/avatar-picker-dialog/styles.js +10 -0
- package/dist/cjs/image-cropper/index.js +14 -1
- package/dist/cjs/image-navigator/dragZone.js +2 -0
- package/dist/cjs/image-navigator/index.js +24 -18
- package/dist/cjs/image-navigator/slider.js +30 -27
- package/dist/cjs/image-navigator/styles.js +32 -2
- package/dist/cjs/image-placer/containerWrapper.js +4 -0
- package/dist/cjs/image-placer/imagePlacerErrorWrapper.js +7 -3
- package/dist/cjs/image-placer/imageWrapper.js +12 -8
- package/dist/cjs/image-placer/index.js +29 -26
- package/dist/cjs/image-placer/margin.js +3 -1
- package/dist/cjs/image-placer/styles.js +20 -0
- package/dist/cjs/predefined-avatar-list/index.js +24 -20
- package/dist/cjs/predefined-avatar-list/styles.js +2 -2
- package/dist/cjs/predefined-avatar-view/index.js +27 -23
- package/dist/cjs/predefined-avatar-view/styles.js +13 -0
- package/dist/cjs/styles.js +9 -0
- package/dist/es2019/avatar-list/index.js +4 -1
- package/dist/es2019/avatar-list/styles.js +6 -0
- package/dist/es2019/avatar-picker-dialog/SubmitErrorDialog.js +17 -13
- package/dist/es2019/avatar-picker-dialog/index.js +9 -5
- package/dist/es2019/avatar-picker-dialog/styles.js +10 -0
- package/dist/es2019/image-cropper/index.js +14 -0
- package/dist/es2019/image-navigator/dragZone.js +2 -0
- package/dist/es2019/image-navigator/index.js +24 -17
- package/dist/es2019/image-navigator/slider.js +26 -22
- package/dist/es2019/image-navigator/styles.js +32 -2
- package/dist/es2019/image-placer/containerWrapper.js +4 -0
- package/dist/es2019/image-placer/imagePlacerErrorWrapper.js +4 -1
- package/dist/es2019/image-placer/imageWrapper.js +4 -1
- package/dist/es2019/image-placer/index.js +29 -25
- package/dist/es2019/image-placer/margin.js +3 -0
- package/dist/es2019/image-placer/styles.js +19 -0
- package/dist/es2019/predefined-avatar-list/index.js +24 -20
- package/dist/es2019/predefined-avatar-list/styles.js +2 -1
- package/dist/es2019/predefined-avatar-view/index.js +27 -23
- package/dist/es2019/predefined-avatar-view/styles.js +13 -0
- package/dist/es2019/styles.js +9 -0
- package/dist/esm/avatar-list/index.js +4 -1
- package/dist/esm/avatar-list/styles.js +6 -0
- package/dist/esm/avatar-picker-dialog/SubmitErrorDialog.js +17 -13
- package/dist/esm/avatar-picker-dialog/index.js +9 -5
- package/dist/esm/avatar-picker-dialog/styles.js +10 -0
- package/dist/esm/image-cropper/index.js +14 -0
- package/dist/esm/image-navigator/dragZone.js +2 -0
- package/dist/esm/image-navigator/index.js +24 -17
- package/dist/esm/image-navigator/slider.js +30 -26
- package/dist/esm/image-navigator/styles.js +32 -2
- package/dist/esm/image-placer/containerWrapper.js +4 -0
- package/dist/esm/image-placer/imagePlacerErrorWrapper.js +7 -3
- package/dist/esm/image-placer/imageWrapper.js +12 -8
- package/dist/esm/image-placer/index.js +29 -25
- package/dist/esm/image-placer/margin.js +3 -0
- package/dist/esm/image-placer/styles.js +19 -0
- package/dist/esm/predefined-avatar-list/index.js +24 -20
- package/dist/esm/predefined-avatar-list/styles.js +2 -1
- package/dist/esm/predefined-avatar-view/index.js +27 -23
- package/dist/esm/predefined-avatar-view/styles.js +13 -0
- package/dist/esm/styles.js +9 -0
- package/example-helpers/StatefulAvatarPickerDialog.tsx +2 -0
- package/example-helpers/styles.ts +9 -0
- package/package.json +77 -77
|
@@ -26,7 +26,7 @@ var _imageProcessor = require("./imageProcessor");
|
|
|
26
26
|
var _constraints = require("./constraints");
|
|
27
27
|
var _imagePlacerErrorWrapper = require("./imagePlacerErrorWrapper");
|
|
28
28
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
29
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**@jsx jsx */
|
|
29
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**@jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
30
30
|
/*
|
|
31
31
|
"container(Width|Height)" is the outputed size of the final image plus "margin"s.
|
|
32
32
|
"visibleBounds" is the exact output size of the final image
|
|
@@ -508,31 +508,34 @@ var ImagePlacer = exports.ImagePlacer = /*#__PURE__*/function (_React$Component)
|
|
|
508
508
|
src = _this$state6.src;
|
|
509
509
|
var imageBounds = this.imageBounds;
|
|
510
510
|
var imgSrc = typeof src === 'string' ? src : undefined;
|
|
511
|
-
return (
|
|
512
|
-
css
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
511
|
+
return (
|
|
512
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
513
|
+
(0, _react.jsx)("div", {
|
|
514
|
+
css: (0, _styles.imagePlacerWrapperStyles)({
|
|
515
|
+
backgroundColor: backgroundColor
|
|
516
|
+
})
|
|
517
|
+
}, (0, _react.jsx)(_container.ImagePlacerContainer, {
|
|
518
|
+
width: containerWidth,
|
|
519
|
+
height: containerHeight,
|
|
520
|
+
margin: margin,
|
|
521
|
+
onDragStart: this.onDragStart,
|
|
522
|
+
onDragMove: this.onDragMove,
|
|
523
|
+
onWheel: this.onWheel
|
|
524
|
+
}, errorMessage ? (0, _react.jsx)(_imagePlacerErrorWrapper.ImagePlacerErrorWrapper, null, onRenderError ? onRenderError(errorMessage) : errorMessage) : (0, _react.jsx)("div", null, (0, _react.jsx)(_image.ImagePlacerImage, {
|
|
525
|
+
src: imgSrc,
|
|
526
|
+
x: imageBounds.x,
|
|
527
|
+
y: imageBounds.y,
|
|
528
|
+
width: imageBounds.width,
|
|
529
|
+
height: imageBounds.height,
|
|
530
|
+
onLoad: this.onImageLoad,
|
|
531
|
+
onError: this.onImageError
|
|
532
|
+
}), (0, _react.jsx)(_margin.Margin, {
|
|
533
|
+
width: containerWidth,
|
|
534
|
+
height: containerHeight,
|
|
535
|
+
circular: isCircular,
|
|
536
|
+
size: margin
|
|
537
|
+
}))))
|
|
538
|
+
);
|
|
536
539
|
}
|
|
537
540
|
}]);
|
|
538
541
|
return ImagePlacer;
|
|
@@ -15,7 +15,7 @@ var _react = require("@emotion/react");
|
|
|
15
15
|
var _react2 = _interopRequireDefault(require("react"));
|
|
16
16
|
var _styles = require("./styles");
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
18
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**@jsx jsx */
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**@jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
19
19
|
var Margin = exports.Margin = /*#__PURE__*/function (_React$Component) {
|
|
20
20
|
(0, _inherits2.default)(Margin, _React$Component);
|
|
21
21
|
var _super = _createSuper(Margin);
|
|
@@ -35,6 +35,8 @@ var Margin = exports.Margin = /*#__PURE__*/function (_React$Component) {
|
|
|
35
35
|
_ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
36
36
|
id = _ref2[0],
|
|
37
37
|
styles = _ref2[1];
|
|
38
|
+
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
38
40
|
return (0, _react.jsx)("div", {
|
|
39
41
|
css: styles({
|
|
40
42
|
width: width,
|
|
@@ -6,13 +6,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.marginWrapperSquareStyles = exports.marginWrapperCircleStyles = exports.imageWrapperStyles = exports.imagePlacerWrapperStyles = exports.imagePlacerErrorWrapperStyles = exports.checkeredBg = exports.EASING = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
|
|
9
11
|
var checkeredBg = exports.checkeredBg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAA6hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxOC0xMC0zMFQxMjoxMDo5MjwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjcuNTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpDb21wcmVzc2lvbj4wPC90aWZmOkNvbXByZXNzaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTA8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KX+XPjwAAACtJREFUGBljPHv27H8GNGBsbMyIJsTAhC6Aiz+ACjEcDXIjNg8OoBuJthoAzy0HeT3Qcc0AAAAASUVORK5CYII=';
|
|
10
12
|
var imagePlacerWrapperStyles = exports.imagePlacerWrapperStyles = function imagePlacerWrapperStyles(props) {
|
|
11
13
|
return (0, _react.css)({
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
12
15
|
backgroundColor: props.backgroundColor,
|
|
13
16
|
display: 'inline-block'
|
|
14
17
|
});
|
|
15
18
|
};
|
|
19
|
+
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
16
21
|
var imagePlacerErrorWrapperStyles = exports.imagePlacerErrorWrapperStyles = (0, _react.css)({
|
|
17
22
|
backgroundColor: "var(--ds-background-danger-bold, ".concat(_colors.R500, ")"),
|
|
18
23
|
color: "var(--ds-text-inverse, white)",
|
|
@@ -30,10 +35,15 @@ var imageWrapperStyles = exports.imageWrapperStyles = function imageWrapperStyle
|
|
|
30
35
|
height = _ref.height,
|
|
31
36
|
transform = _ref.transform;
|
|
32
37
|
return (0, _react.css)({
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
33
39
|
left: "".concat(x, "px"),
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
34
41
|
top: "".concat(y, "px"),
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
35
43
|
width: "".concat(width, "px"),
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
36
45
|
height: "".concat(height, "px"),
|
|
46
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
37
47
|
transform: transform,
|
|
38
48
|
position: 'absolute',
|
|
39
49
|
transition: "margin-left ".concat(EASING, "s ease-out, margin-top ").concat(EASING, "s ease-out, left ").concat(EASING, "s ease-out, top ").concat(EASING, "s ease-out, width ").concat(EASING, "s ease-out, height ").concat(EASING, "s ease-out"),
|
|
@@ -51,8 +61,11 @@ var marginWrapperSquareStyles = exports.marginWrapperSquareStyles = function mar
|
|
|
51
61
|
top: 0,
|
|
52
62
|
borderStyle: 'solid',
|
|
53
63
|
borderColor: "var(--ds-surface-overlay, rgba(255, 255, 255))",
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
54
65
|
borderWidth: "".concat(size, "px"),
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
55
67
|
width: "".concat(width, "px"),
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
56
69
|
height: "".concat(height, "px"),
|
|
57
70
|
opacity: "var(--ds-opacity-disabled, 0.3)"
|
|
58
71
|
});
|
|
@@ -66,15 +79,22 @@ var marginWrapperCircleStyles = exports.marginWrapperCircleStyles = function mar
|
|
|
66
79
|
overflow: 'hidden',
|
|
67
80
|
left: '0px',
|
|
68
81
|
top: '0px',
|
|
82
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
69
83
|
width: "".concat(width + size * 2, "px"),
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
70
85
|
height: "".concat(height + size * 2, "px"),
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
71
87
|
'&:after': {
|
|
72
88
|
content: "''",
|
|
73
89
|
position: 'absolute',
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
74
91
|
left: "".concat(size, "px"),
|
|
92
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
75
93
|
top: "".concat(size, "px"),
|
|
76
94
|
borderRadius: '100%',
|
|
95
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
77
96
|
width: "".concat(width, "px"),
|
|
97
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
78
98
|
height: "".concat(height, "px"),
|
|
79
99
|
boxShadow: "0px 0px 0px ".concat(Math.max(width, height), "px ", "var(--ds-surface-overlay, rgba(255, 255, 255))"),
|
|
80
100
|
opacity: "var(--ds-opacity-disabled, 0.3)"
|
|
@@ -13,6 +13,7 @@ var _styles = require("./styles");
|
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
14
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
15
15
|
/**@jsx jsx */
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
17
|
|
|
17
18
|
var PredefinedAvatarList = exports.PredefinedAvatarList = function PredefinedAvatarList(_ref) {
|
|
18
19
|
var _ref$avatars = _ref.avatars,
|
|
@@ -23,24 +24,27 @@ var PredefinedAvatarList = exports.PredefinedAvatarList = function PredefinedAva
|
|
|
23
24
|
selectAvatarLabel = _ref.selectAvatarLabel,
|
|
24
25
|
showMoreAvatarsButtonLabel = _ref.showMoreAvatarsButtonLabel;
|
|
25
26
|
var intl = (0, _reactIntlNext.useIntl)();
|
|
26
|
-
return (
|
|
27
|
-
css
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
27
|
+
return (
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
29
|
+
(0, _react.jsx)("div", {
|
|
30
|
+
css: _styles.predefinedAvatarsWrapperStyles,
|
|
31
|
+
id: "predefined-avatar-wrapper"
|
|
32
|
+
}, (0, _react.jsx)(_avatarList.AvatarList, {
|
|
33
|
+
avatars: avatars,
|
|
34
|
+
selectedAvatar: selectedAvatar,
|
|
35
|
+
onItemClick: onAvatarSelected,
|
|
36
|
+
selectAvatarLabel: selectAvatarLabel
|
|
37
|
+
}), (0, _react.jsx)(_standardButton.default, {
|
|
38
|
+
"aria-label": showMoreAvatarsButtonLabel || intl.formatMessage(_mediaUi.messages.show_more_avatars_btn_label)
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
40
|
+
,
|
|
41
|
+
className: "show-more-button",
|
|
42
|
+
appearance: "subtle",
|
|
43
|
+
iconAfter: (0, _react.jsx)(_more.default, {
|
|
44
|
+
label: "",
|
|
45
|
+
size: "large"
|
|
46
|
+
}),
|
|
47
|
+
onClick: onShowMore
|
|
48
|
+
}))
|
|
49
|
+
);
|
|
46
50
|
};
|
|
@@ -8,6 +8,6 @@ exports.predefinedAvatarsWrapperStyles = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _styles = require("../styles");
|
|
11
|
-
var _templateObject;
|
|
12
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression --
|
|
11
|
+
var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
13
13
|
var predefinedAvatarsWrapperStyles = exports.predefinedAvatarsWrapperStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\n\tinput {\n\t\t", "\n\t}\n\n\tinput:checked + img {\n\t\t", "\n\t}\n\n\tinput:focus + img {\n\t\t", "\n\t}\n\n\t.show-more-button {\n\t\twidth: 40px;\n\t\theight: 40px;\n\t\tborder-radius: ", ";\n\n\t\talign-items: center;\n\t\tjustify-content: center;\n\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t}\n"])), _styles.visuallyHiddenRadioStyles, _styles.selectedShadow, _styles.focusedShadow, "var(--ds-border-radius-circle, 50%)");
|
|
@@ -12,6 +12,7 @@ var _styles = require("./styles");
|
|
|
12
12
|
var _arrowLeft = _interopRequireDefault(require("@atlaskit/icon/glyph/arrow-left"));
|
|
13
13
|
var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
|
|
14
14
|
/**@jsx jsx */
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
15
16
|
|
|
16
17
|
var PredefinedAvatarView = exports.PredefinedAvatarView = function PredefinedAvatarView(_ref) {
|
|
17
18
|
var _ref$avatars = _ref.avatars,
|
|
@@ -46,27 +47,30 @@ var PredefinedAvatarView = exports.PredefinedAvatarView = function PredefinedAva
|
|
|
46
47
|
alt: ""
|
|
47
48
|
}));
|
|
48
49
|
});
|
|
49
|
-
return (
|
|
50
|
-
css
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
50
|
+
return (
|
|
51
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
52
|
+
(0, _react.jsx)("div", {
|
|
53
|
+
css: _styles.predefinedAvatarViewWrapperStyles,
|
|
54
|
+
id: "predefined-avatar-view-wrapper"
|
|
55
|
+
}, (0, _react.jsx)("div", {
|
|
56
|
+
className: "header"
|
|
57
|
+
}, (0, _react.jsx)(_standardButton.default, {
|
|
58
|
+
"aria-label": intl.formatMessage(_mediaUi.messages.avatar_picker_back_btn_label)
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
60
|
+
,
|
|
61
|
+
className: "back-button",
|
|
62
|
+
iconAfter: (0, _react.jsx)(_arrowLeft.default, {
|
|
63
|
+
label: ""
|
|
64
|
+
}),
|
|
65
|
+
onClick: onGoBack
|
|
66
|
+
}), (0, _react.jsx)("h2", {
|
|
67
|
+
className: "description"
|
|
68
|
+
}, predefinedAvatarsText || (0, _react.jsx)(_reactIntlNext.FormattedMessage, _mediaUi.messages.default_avatars))), (0, _react.jsx)("div", {
|
|
69
|
+
role: "radiogroup",
|
|
70
|
+
"aria-label": selectAvatarLabel || intl.formatMessage(_mediaUi.messages.select_an_avatar)
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
72
|
+
,
|
|
73
|
+
className: "body"
|
|
74
|
+
}, cards))
|
|
75
|
+
);
|
|
72
76
|
};
|
|
@@ -6,11 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.predefinedAvatarViewWrapperStyles = exports.largeAvatarImageStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _styles = require("../styles");
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
9
12
|
var largeAvatarImageStyles = exports.largeAvatarImageStyles = (0, _react.css)(_styles.avatarImageStyles, {
|
|
10
13
|
width: '72px',
|
|
11
14
|
height: '72px'
|
|
12
15
|
});
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
13
18
|
var predefinedAvatarViewWrapperStyles = exports.predefinedAvatarViewWrapperStyles = (0, _react.css)({
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
20
|
'.body': {
|
|
15
21
|
display: 'flex',
|
|
16
22
|
flexFlow: 'row wrap',
|
|
@@ -20,26 +26,33 @@ var predefinedAvatarViewWrapperStyles = exports.predefinedAvatarViewWrapperStyle
|
|
|
20
26
|
padding: "var(--ds-space-100, 8px)".concat(" 0 0"),
|
|
21
27
|
margin: 0
|
|
22
28
|
},
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
23
30
|
input: _styles.visuallyHiddenRadioStyles,
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
24
32
|
'input:checked + img': _styles.selectedShadow,
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
34
|
'input:focus + img': _styles.focusedShadow,
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
26
36
|
label: {
|
|
27
37
|
paddingRight: "var(--ds-space-050, 4px)",
|
|
28
38
|
paddingLeft: "var(--ds-space-050, 4px)",
|
|
29
39
|
paddingBottom: "var(--ds-space-100, 8px)",
|
|
30
40
|
display: 'inline-flex'
|
|
31
41
|
},
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
32
43
|
'.header': {
|
|
33
44
|
display: 'flex',
|
|
34
45
|
alignItems: 'center',
|
|
35
46
|
paddingTop: "var(--ds-space-050, 4px)",
|
|
36
47
|
paddingBottom: "var(--ds-space-100, 8px)",
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
37
49
|
'.description': {
|
|
38
50
|
paddingLeft: "var(--ds-space-100, 8px)",
|
|
39
51
|
margin: 0,
|
|
40
52
|
fontSize: '14px',
|
|
41
53
|
fontWeight: 400
|
|
42
54
|
},
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
43
56
|
'.back-button': {
|
|
44
57
|
width: '32px',
|
|
45
58
|
height: '32px',
|
package/dist/cjs/styles.js
CHANGED
|
@@ -6,10 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.visuallyHiddenRadioStyles = exports.selectedShadow = exports.focusedShadow = exports.avatarImageStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
9
12
|
var avatarImageStyles = exports.avatarImageStyles = (0, _react.css)({
|
|
10
13
|
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
11
14
|
cursor: 'pointer'
|
|
12
15
|
});
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
13
18
|
var visuallyHiddenRadioStyles = exports.visuallyHiddenRadioStyles = (0, _react.css)({
|
|
14
19
|
width: '1px',
|
|
15
20
|
height: '1px',
|
|
@@ -20,9 +25,13 @@ var visuallyHiddenRadioStyles = exports.visuallyHiddenRadioStyles = (0, _react.c
|
|
|
20
25
|
overflow: 'hidden',
|
|
21
26
|
whiteSpace: 'nowrap'
|
|
22
27
|
});
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
23
30
|
var selectedShadow = exports.selectedShadow = (0, _react.css)({
|
|
24
31
|
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-selected, ".concat(_colors.B200, ")"))
|
|
25
32
|
});
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
26
35
|
var focusedShadow = exports.focusedShadow = (0, _react.css)({
|
|
27
36
|
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-focused, ".concat(_colors.B100, ")"))
|
|
28
37
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { useIntl } from 'react-intl-next';
|
|
4
5
|
import { messages } from '@atlaskit/media-ui';
|
|
@@ -34,7 +35,9 @@ export const AvatarList = ({
|
|
|
34
35
|
});
|
|
35
36
|
return jsx("div", {
|
|
36
37
|
role: "radiogroup",
|
|
37
|
-
"aria-label": selectAvatarLabel || intl.formatMessage(messages.select_an_avatar)
|
|
38
|
+
"aria-label": selectAvatarLabel || intl.formatMessage(messages.select_an_avatar)
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
40
|
+
,
|
|
38
41
|
css: avatarListWrapperStyles
|
|
39
42
|
}, cards);
|
|
40
43
|
};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { avatarImageStyles } from '../styles';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
3
6
|
export const smallAvatarImageStyles = css(avatarImageStyles, {
|
|
4
7
|
width: "var(--ds-space-500, 40px)",
|
|
5
8
|
height: "var(--ds-space-500, 40px)"
|
|
6
9
|
});
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
7
12
|
export const avatarListWrapperStyles = css({
|
|
8
13
|
display: 'flex',
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
9
15
|
label: {
|
|
10
16
|
paddingRight: "var(--ds-space-050, 4px)",
|
|
11
17
|
display: 'inline-flex'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { useRef, useEffect } from 'react';
|
|
4
5
|
import { R400 } from '@atlaskit/theme/colors';
|
|
@@ -15,17 +16,20 @@ export const SubmitErrorDialog = () => {
|
|
|
15
16
|
flagContainerRef.current.children[0].focus();
|
|
16
17
|
}
|
|
17
18
|
}, []);
|
|
18
|
-
return
|
|
19
|
-
css
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
return (
|
|
20
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
21
|
+
jsx("div", {
|
|
22
|
+
css: avatarPickerErrorStyles,
|
|
23
|
+
ref: flagContainerRef
|
|
24
|
+
}, jsx(Flag, {
|
|
25
|
+
appearance: "error",
|
|
26
|
+
icon: jsx(ErrorIcon, {
|
|
27
|
+
label: "Error",
|
|
28
|
+
secondaryColor: `var(--ds-background-danger-bold, ${R400})`
|
|
29
|
+
}),
|
|
30
|
+
id: "avatar-picker-error",
|
|
31
|
+
key: "error",
|
|
32
|
+
title: intl.formatMessage(messages.or_select_default_avatars)
|
|
33
|
+
}))
|
|
34
|
+
);
|
|
31
35
|
};
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import React, { Fragment } from 'react';
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
5
6
|
import { jsx } from '@emotion/react';
|
|
6
7
|
import { PureComponent } from 'react';
|
|
7
8
|
import ModalDialog, { ModalFooter, ModalBody, useModal } from '@atlaskit/modal-dialog';
|
|
@@ -38,11 +39,14 @@ const HeaderContent = ({
|
|
|
38
39
|
title
|
|
39
40
|
}) => {
|
|
40
41
|
const modal = useModal();
|
|
41
|
-
return
|
|
42
|
-
css
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
return (
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
44
|
+
jsx("h1", {
|
|
45
|
+
css: modalHeaderStyles,
|
|
46
|
+
"data-test-id": "modal-header",
|
|
47
|
+
id: modal.titleId
|
|
48
|
+
}, title || jsx(FormattedMessage, messages.upload_an_avatar))
|
|
49
|
+
);
|
|
46
50
|
};
|
|
47
51
|
const altTextFieldStyles = xcss({
|
|
48
52
|
paddingTop: 'space.100',
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
2
5
|
export const avatarPickerErrorStyles = css({
|
|
3
6
|
margin: `0 ${"var(--ds-space-200, 16px)"} ${"var(--ds-space-200, 16px)"}`
|
|
4
7
|
});
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
5
10
|
export const formStyles = css({
|
|
6
11
|
margin: 0
|
|
7
12
|
});
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
8
15
|
export const avatarPickerViewWrapperStyles = css({
|
|
9
16
|
display: 'flex',
|
|
10
17
|
justifyContent: 'center',
|
|
@@ -12,8 +19,11 @@ export const avatarPickerViewWrapperStyles = css({
|
|
|
12
19
|
textAlign: 'center',
|
|
13
20
|
minHeight: '339px'
|
|
14
21
|
});
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
15
24
|
export const modalHeaderStyles = css({
|
|
16
25
|
// Using `&` twice to increase specificity
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
17
27
|
'&&': {
|
|
18
28
|
margin: "var(--ds-space-200, 16px)",
|
|
19
29
|
fontWeight: 500,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
/** @jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import React from 'react';
|
|
5
6
|
import { Component } from 'react';
|
|
@@ -9,6 +10,7 @@ import { messages, MediaImage } from '@atlaskit/media-ui';
|
|
|
9
10
|
import { isImageRemote } from './isImageRemote';
|
|
10
11
|
import { CONTAINER_PADDING } from './styles';
|
|
11
12
|
import { N50A } from '@atlaskit/theme/colors';
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
14
|
import { css } from '@emotion/react';
|
|
13
15
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
14
16
|
import { ERROR } from '../avatar-picker-dialog';
|
|
@@ -21,6 +23,7 @@ const removeImageButtonStyles = css({
|
|
|
21
23
|
border: 'none',
|
|
22
24
|
cursor: 'pointer',
|
|
23
25
|
padding: 0,
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
24
27
|
svg: {
|
|
25
28
|
position: 'absolute',
|
|
26
29
|
top: "var(--ds-space-050, 4px)",
|
|
@@ -46,9 +49,13 @@ const maskShadow = {
|
|
|
46
49
|
};
|
|
47
50
|
const maskStyles = xcss({
|
|
48
51
|
position: 'absolute',
|
|
52
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
49
53
|
top: `${CONTAINER_PADDING}px`,
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
50
55
|
bottom: `${CONTAINER_PADDING}px`,
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
51
57
|
left: `${CONTAINER_PADDING}px`,
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
52
59
|
right: `${CONTAINER_PADDING}px`,
|
|
53
60
|
opacity: 'opacity.disabled'
|
|
54
61
|
});
|
|
@@ -116,16 +123,23 @@ export class ImageCropper extends Component {
|
|
|
116
123
|
}
|
|
117
124
|
} = this.props;
|
|
118
125
|
const containerDimensions = xcss({
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
119
127
|
width: `${containerSize}px`,
|
|
128
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
120
129
|
height: `${containerSize}px`
|
|
121
130
|
});
|
|
122
131
|
const width = imageWidth ? `${imageWidth}px` : 'auto';
|
|
123
132
|
const height = imageHeight ? `${imageHeight}px` : 'auto';
|
|
124
133
|
const imageContainerDynamicStyles = xcss({
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
125
135
|
width,
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
126
137
|
height,
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
127
139
|
display: width === 'auto' ? 'none' : 'block',
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
128
141
|
top: `${top}px`,
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
129
143
|
left: `${left}px`
|
|
130
144
|
});
|
|
131
145
|
let crossOrigin;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/**@jsx jsx */
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { jsx } from '@emotion/react';
|
|
4
5
|
import { dragZoneStyles } from './styles';
|
|
5
6
|
export const DragZone = ({
|
|
@@ -8,6 +9,7 @@ export const DragZone = ({
|
|
|
8
9
|
children,
|
|
9
10
|
...props
|
|
10
11
|
}) => jsx("div", _extends({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
11
13
|
css: dragZoneStyles({
|
|
12
14
|
showBorder: showBorder,
|
|
13
15
|
isDroppingFile: isDroppingFile
|