@atlaskit/media-avatar-picker 24.6.8 → 24.6.10
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 +12 -0
- package/dist/cjs/avatar-list/styles.js +2 -2
- package/dist/cjs/avatar-picker-dialog/styles.js +4 -4
- package/dist/cjs/image-cropper/index.js +49 -45
- package/dist/cjs/image-navigator/styles.js +9 -9
- package/dist/cjs/image-placer/containerWrapper.js +3 -1
- package/dist/cjs/image-placer/styles.js +1 -1
- package/dist/cjs/predefined-avatar-list/styles.js +1 -1
- package/dist/cjs/predefined-avatar-view/styles.js +2 -2
- package/dist/cjs/styles.js +4 -4
- package/dist/es2019/avatar-list/styles.js +2 -2
- package/dist/es2019/avatar-picker-dialog/styles.js +4 -4
- package/dist/es2019/image-cropper/index.js +47 -43
- package/dist/es2019/image-navigator/styles.js +9 -9
- package/dist/es2019/image-placer/containerWrapper.js +3 -1
- package/dist/es2019/image-placer/styles.js +1 -1
- package/dist/es2019/predefined-avatar-list/styles.js +1 -1
- package/dist/es2019/predefined-avatar-view/styles.js +2 -2
- package/dist/es2019/styles.js +4 -4
- package/dist/esm/avatar-list/styles.js +2 -2
- package/dist/esm/avatar-picker-dialog/styles.js +4 -4
- package/dist/esm/image-cropper/index.js +49 -45
- package/dist/esm/image-navigator/styles.js +9 -9
- package/dist/esm/image-placer/containerWrapper.js +3 -1
- package/dist/esm/image-placer/styles.js +1 -1
- package/dist/esm/predefined-avatar-list/styles.js +1 -1
- package/dist/esm/predefined-avatar-view/styles.js +2 -2
- package/dist/esm/styles.js +4 -4
- package/example-helpers/styles.ts +5 -5
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -8,13 +8,13 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _styles = require("../styles");
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
12
12
|
var smallAvatarImageStyles = exports.smallAvatarImageStyles = (0, _react.css)(_styles.avatarImageStyles, {
|
|
13
13
|
width: "var(--ds-space-500, 40px)",
|
|
14
14
|
height: "var(--ds-space-500, 40px)"
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
18
18
|
var avatarListWrapperStyles = exports.avatarListWrapperStyles = (0, _react.css)({
|
|
19
19
|
display: 'flex',
|
|
20
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -7,17 +7,17 @@ exports.modalHeaderStyles = exports.formStyles = exports.avatarPickerViewWrapper
|
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
|
|
10
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
11
|
var avatarPickerErrorStyles = exports.avatarPickerErrorStyles = (0, _react.css)({
|
|
12
12
|
margin: "0 ".concat("var(--ds-space-200, 16px)", " ", "var(--ds-space-200, 16px)")
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
16
16
|
var formStyles = exports.formStyles = (0, _react.css)({
|
|
17
17
|
margin: 0
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
21
21
|
var avatarPickerViewWrapperStyles = exports.avatarPickerViewWrapperStyles = (0, _react.css)({
|
|
22
22
|
display: 'flex',
|
|
23
23
|
justifyContent: 'center',
|
|
@@ -26,7 +26,7 @@ var avatarPickerViewWrapperStyles = exports.avatarPickerViewWrapperStyles = (0,
|
|
|
26
26
|
minHeight: '339px'
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
30
30
|
var modalHeaderStyles = exports.modalHeaderStyles = (0, _react.css)({
|
|
31
31
|
// Using `&` twice to increase specificity
|
|
32
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
@@ -146,51 +146,55 @@ var ImageCropper = exports.ImageCropper = /*#__PURE__*/function (_Component) {
|
|
|
146
146
|
} catch (e) {
|
|
147
147
|
return null;
|
|
148
148
|
}
|
|
149
|
-
return
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
style
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
style
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
149
|
+
return (
|
|
150
|
+
/*#__PURE__*/
|
|
151
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
152
|
+
_react.default.createElement(_primitives.Box, {
|
|
153
|
+
id: "container",
|
|
154
|
+
xcss: [containerStyles, containerDimensions]
|
|
155
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
156
|
+
id: "image-container",
|
|
157
|
+
xcss: [imageContainerStyles, imageContainerDynamicStyles]
|
|
158
|
+
}, /*#__PURE__*/_react.default.createElement(_mediaUi.MediaImage, {
|
|
159
|
+
crossOrigin: crossOrigin,
|
|
160
|
+
dataURI: imageSource,
|
|
161
|
+
crop: false,
|
|
162
|
+
stretch: true,
|
|
163
|
+
previewOrientation: "from-image",
|
|
164
|
+
onImageLoad: onImageLoaded,
|
|
165
|
+
onImageError: this.onImageError
|
|
166
|
+
})), isCircularMask ?
|
|
167
|
+
/*#__PURE__*/
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
169
|
+
_react.default.createElement(_primitives.Box, {
|
|
170
|
+
xcss: [maskStyles, circularMaskStyles],
|
|
171
|
+
style: maskShadow
|
|
172
|
+
}) :
|
|
173
|
+
/*#__PURE__*/
|
|
174
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
175
|
+
_react.default.createElement(_primitives.Box, {
|
|
176
|
+
xcss: [maskStyles, rectMaskStyles],
|
|
177
|
+
style: maskShadow
|
|
178
|
+
}), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
179
|
+
id: "drag-overlay",
|
|
180
|
+
xcss: dragOverlayStyles,
|
|
181
|
+
onMouseDown: this.onDragStarted
|
|
182
|
+
}), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
183
|
+
id: "remove-image-container",
|
|
184
|
+
xcss: removeImageContainerStyles
|
|
185
|
+
}, /*#__PURE__*/_react.default.createElement(_new.IconButton, {
|
|
186
|
+
id: "remove-image-button",
|
|
187
|
+
icon: function icon(iconProps) {
|
|
188
|
+
return /*#__PURE__*/_react.default.createElement(_cross.default, (0, _extends2.default)({}, iconProps, {
|
|
189
|
+
size: "small"
|
|
190
|
+
}));
|
|
191
|
+
},
|
|
192
|
+
onClick: onRemoveImage,
|
|
193
|
+
label: formatMessage(_mediaUi.messages.remove_image),
|
|
194
|
+
spacing: "compact",
|
|
195
|
+
appearance: "subtle"
|
|
196
|
+
})))
|
|
197
|
+
);
|
|
194
198
|
}
|
|
195
199
|
}]);
|
|
196
200
|
return ImageCropper;
|
|
@@ -10,7 +10,7 @@ var _images = require("./images");
|
|
|
10
10
|
var _layoutConst = require("../avatar-picker-dialog/layout-const");
|
|
11
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
12
|
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
14
14
|
var imageBgStyles = exports.imageBgStyles = (0, _react.css)({
|
|
15
15
|
position: 'absolute',
|
|
16
16
|
top: 0,
|
|
@@ -22,7 +22,7 @@ var imageBgStyles = exports.imageBgStyles = (0, _react.css)({
|
|
|
22
22
|
borderRadius: "var(--ds-border-radius, 3px)"
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
26
|
var containerStyles = exports.containerStyles = (0, _react.css)({
|
|
27
27
|
boxSizing: 'border-box',
|
|
28
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -32,7 +32,7 @@ var containerStyles = exports.containerStyles = (0, _react.css)({
|
|
|
32
32
|
position: 'relative'
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
36
36
|
var sliderContainerStyles = exports.sliderContainerStyles = (0, _react.css)({
|
|
37
37
|
alignItems: 'center',
|
|
38
38
|
justifyContent: 'center',
|
|
@@ -47,12 +47,12 @@ var sliderContainerStyles = exports.sliderContainerStyles = (0, _react.css)({
|
|
|
47
47
|
backgroundColor: "var(--ds-surface-overlay, #fff)"
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
51
51
|
var fileInputStyles = exports.fileInputStyles = (0, _react.css)({
|
|
52
52
|
display: 'none'
|
|
53
53
|
});
|
|
54
54
|
|
|
55
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
56
56
|
var imageUploaderStyles = exports.imageUploaderStyles = (0, _react.css)({
|
|
57
57
|
display: 'flex',
|
|
58
58
|
flexDirection: 'column',
|
|
@@ -112,7 +112,7 @@ var dragZoneStyles = exports.dragZoneStyles = function dragZoneStyles(props) {
|
|
|
112
112
|
};
|
|
113
113
|
dragZoneStyles.displayName = 'DragZone';
|
|
114
114
|
|
|
115
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
116
116
|
var dragZoneImageStyles = exports.dragZoneImageStyles = (0, _react.css)({
|
|
117
117
|
width: '100px'
|
|
118
118
|
});
|
|
@@ -128,7 +128,7 @@ var dragZoneTextStyles = exports.dragZoneTextStyles = function dragZoneTextStyle
|
|
|
128
128
|
getWidth(props.isFullSize));
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
131
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
132
132
|
var selectionBlockerStyles = exports.selectionBlockerStyles = (0, _react.css)({
|
|
133
133
|
position: 'fixed',
|
|
134
134
|
left: 0,
|
|
@@ -139,7 +139,7 @@ var selectionBlockerStyles = exports.selectionBlockerStyles = (0, _react.css)({
|
|
|
139
139
|
userSelect: 'none'
|
|
140
140
|
});
|
|
141
141
|
|
|
142
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
143
143
|
var paddedBreakStyles = exports.paddedBreakStyles = (0, _react.css)({
|
|
144
144
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
145
145
|
marginTop: "var(--ds-space-100, 10px)".concat(" !important"),
|
|
@@ -147,7 +147,7 @@ var paddedBreakStyles = exports.paddedBreakStyles = (0, _react.css)({
|
|
|
147
147
|
textAlign: 'center'
|
|
148
148
|
});
|
|
149
149
|
|
|
150
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
150
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
151
151
|
var sliderWrapperStyles = exports.sliderWrapperStyles = (0, _react.css)({
|
|
152
152
|
display: 'flex',
|
|
153
153
|
alignItems: 'center',
|
|
@@ -34,7 +34,9 @@ var ContainerWrapper = exports.ContainerWrapper = function ContainerWrapper(_ref
|
|
|
34
34
|
height: "".concat(height !== undefined ? height + margin * 2 : 0, "px")
|
|
35
35
|
});
|
|
36
36
|
return (0, _react.jsx)(_primitives.Box, (0, _extends2.default)({
|
|
37
|
-
id: 'container-wrapper'
|
|
37
|
+
id: 'container-wrapper'
|
|
38
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
39
|
+
,
|
|
38
40
|
xcss: [containerWrapperStyles, containerWrapperDimensions]
|
|
39
41
|
}, props), children);
|
|
40
42
|
};
|
|
@@ -17,7 +17,7 @@ var imagePlacerWrapperStyles = exports.imagePlacerWrapperStyles = function image
|
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
21
21
|
var imagePlacerErrorWrapperStyles = exports.imagePlacerErrorWrapperStyles = (0, _react.css)({
|
|
22
22
|
backgroundColor: "var(--ds-background-danger-bold, ".concat(_colors.R500, ")"),
|
|
23
23
|
color: "var(--ds-text-inverse, white)",
|
|
@@ -9,5 +9,5 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _styles = require("../styles");
|
|
11
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
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- 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%)");
|
|
@@ -8,13 +8,13 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _styles = require("../styles");
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
12
12
|
var largeAvatarImageStyles = exports.largeAvatarImageStyles = (0, _react.css)(_styles.avatarImageStyles, {
|
|
13
13
|
width: '72px',
|
|
14
14
|
height: '72px'
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
18
18
|
var predefinedAvatarViewWrapperStyles = exports.predefinedAvatarViewWrapperStyles = (0, _react.css)({
|
|
19
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
20
|
'.body': {
|
package/dist/cjs/styles.js
CHANGED
|
@@ -8,13 +8,13 @@ var _react = require("@emotion/react");
|
|
|
8
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
var avatarImageStyles = exports.avatarImageStyles = (0, _react.css)({
|
|
13
13
|
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
14
14
|
cursor: 'pointer'
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
18
18
|
var visuallyHiddenRadioStyles = exports.visuallyHiddenRadioStyles = (0, _react.css)({
|
|
19
19
|
width: '1px',
|
|
20
20
|
height: '1px',
|
|
@@ -26,12 +26,12 @@ var visuallyHiddenRadioStyles = exports.visuallyHiddenRadioStyles = (0, _react.c
|
|
|
26
26
|
whiteSpace: 'nowrap'
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
30
30
|
var selectedShadow = exports.selectedShadow = (0, _react.css)({
|
|
31
31
|
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-selected, ".concat(_colors.B200, ")"))
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
35
|
var focusedShadow = exports.focusedShadow = (0, _react.css)({
|
|
36
36
|
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-focused, ".concat(_colors.B100, ")"))
|
|
37
37
|
});
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { avatarImageStyles } from '../styles';
|
|
4
4
|
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
6
6
|
export const smallAvatarImageStyles = css(avatarImageStyles, {
|
|
7
7
|
width: "var(--ds-space-500, 40px)",
|
|
8
8
|
height: "var(--ds-space-500, 40px)"
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
export const avatarListWrapperStyles = css({
|
|
13
13
|
display: 'flex',
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
|
|
4
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
5
|
export const avatarPickerErrorStyles = css({
|
|
6
6
|
margin: `0 ${"var(--ds-space-200, 16px)"} ${"var(--ds-space-200, 16px)"}`
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
10
10
|
export const formStyles = css({
|
|
11
11
|
margin: 0
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
15
15
|
export const avatarPickerViewWrapperStyles = css({
|
|
16
16
|
display: 'flex',
|
|
17
17
|
justifyContent: 'center',
|
|
@@ -20,7 +20,7 @@ export const avatarPickerViewWrapperStyles = css({
|
|
|
20
20
|
minHeight: '339px'
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
24
24
|
export const modalHeaderStyles = css({
|
|
25
25
|
// Using `&` twice to increase specificity
|
|
26
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
@@ -126,49 +126,53 @@ export class ImageCropper extends Component {
|
|
|
126
126
|
} catch (e) {
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
style
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
style
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
129
|
+
return (
|
|
130
|
+
/*#__PURE__*/
|
|
131
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
132
|
+
React.createElement(Box, {
|
|
133
|
+
id: "container",
|
|
134
|
+
xcss: [containerStyles, containerDimensions]
|
|
135
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
136
|
+
id: "image-container",
|
|
137
|
+
xcss: [imageContainerStyles, imageContainerDynamicStyles]
|
|
138
|
+
}, /*#__PURE__*/React.createElement(MediaImage, {
|
|
139
|
+
crossOrigin: crossOrigin,
|
|
140
|
+
dataURI: imageSource,
|
|
141
|
+
crop: false,
|
|
142
|
+
stretch: true,
|
|
143
|
+
previewOrientation: "from-image",
|
|
144
|
+
onImageLoad: onImageLoaded,
|
|
145
|
+
onImageError: this.onImageError
|
|
146
|
+
})), isCircularMask ?
|
|
147
|
+
/*#__PURE__*/
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
149
|
+
React.createElement(Box, {
|
|
150
|
+
xcss: [maskStyles, circularMaskStyles],
|
|
151
|
+
style: maskShadow
|
|
152
|
+
}) :
|
|
153
|
+
/*#__PURE__*/
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
155
|
+
React.createElement(Box, {
|
|
156
|
+
xcss: [maskStyles, rectMaskStyles],
|
|
157
|
+
style: maskShadow
|
|
158
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
159
|
+
id: "drag-overlay",
|
|
160
|
+
xcss: dragOverlayStyles,
|
|
161
|
+
onMouseDown: this.onDragStarted
|
|
162
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
163
|
+
id: "remove-image-container",
|
|
164
|
+
xcss: removeImageContainerStyles
|
|
165
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
166
|
+
id: "remove-image-button",
|
|
167
|
+
icon: iconProps => /*#__PURE__*/React.createElement(CrossIcon, _extends({}, iconProps, {
|
|
168
|
+
size: "small"
|
|
169
|
+
})),
|
|
170
|
+
onClick: onRemoveImage,
|
|
171
|
+
label: formatMessage(messages.remove_image),
|
|
172
|
+
spacing: "compact",
|
|
173
|
+
appearance: "subtle"
|
|
174
|
+
})))
|
|
175
|
+
);
|
|
172
176
|
}
|
|
173
177
|
}
|
|
174
178
|
_defineProperty(ImageCropper, "defaultProps", {
|
|
@@ -4,7 +4,7 @@ import { N200 } from '@atlaskit/theme/colors';
|
|
|
4
4
|
import { checkeredBg } from './images';
|
|
5
5
|
import { AVATAR_DIALOG_WIDTH } from '../avatar-picker-dialog/layout-const';
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
8
8
|
export const imageBgStyles = css({
|
|
9
9
|
position: 'absolute',
|
|
10
10
|
top: 0,
|
|
@@ -16,7 +16,7 @@ export const imageBgStyles = css({
|
|
|
16
16
|
borderRadius: "var(--ds-border-radius, 3px)"
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
20
20
|
export const containerStyles = css({
|
|
21
21
|
boxSizing: 'border-box',
|
|
22
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -26,7 +26,7 @@ export const containerStyles = css({
|
|
|
26
26
|
position: 'relative'
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
30
30
|
export const sliderContainerStyles = css({
|
|
31
31
|
alignItems: 'center',
|
|
32
32
|
justifyContent: 'center',
|
|
@@ -41,12 +41,12 @@ export const sliderContainerStyles = css({
|
|
|
41
41
|
backgroundColor: "var(--ds-surface-overlay, #fff)"
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
45
45
|
export const fileInputStyles = css({
|
|
46
46
|
display: 'none'
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
50
50
|
export const imageUploaderStyles = css({
|
|
51
51
|
display: 'flex',
|
|
52
52
|
flexDirection: 'column',
|
|
@@ -100,7 +100,7 @@ export const dragZoneStyles = props => css({
|
|
|
100
100
|
getDroppingAnimation(props.isDroppingFile));
|
|
101
101
|
dragZoneStyles.displayName = 'DragZone';
|
|
102
102
|
|
|
103
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
104
104
|
export const dragZoneImageStyles = css({
|
|
105
105
|
width: '100px'
|
|
106
106
|
});
|
|
@@ -112,7 +112,7 @@ export const dragZoneTextStyles = props => css({
|
|
|
112
112
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
113
113
|
getWidth(props.isFullSize));
|
|
114
114
|
|
|
115
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
116
116
|
export const selectionBlockerStyles = css({
|
|
117
117
|
position: 'fixed',
|
|
118
118
|
left: 0,
|
|
@@ -123,7 +123,7 @@ export const selectionBlockerStyles = css({
|
|
|
123
123
|
userSelect: 'none'
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
127
127
|
export const paddedBreakStyles = css({
|
|
128
128
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
129
129
|
marginTop: `${"var(--ds-space-100, 10px)"} !important`,
|
|
@@ -131,7 +131,7 @@ export const paddedBreakStyles = css({
|
|
|
131
131
|
textAlign: 'center'
|
|
132
132
|
});
|
|
133
133
|
|
|
134
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
135
135
|
export const sliderWrapperStyles = css({
|
|
136
136
|
display: 'flex',
|
|
137
137
|
alignItems: 'center',
|
|
@@ -26,7 +26,9 @@ export const ContainerWrapper = ({
|
|
|
26
26
|
height: `${height !== undefined ? height + margin * 2 : 0}px`
|
|
27
27
|
});
|
|
28
28
|
return jsx(Box, _extends({
|
|
29
|
-
id: 'container-wrapper'
|
|
29
|
+
id: 'container-wrapper'
|
|
30
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
31
|
+
,
|
|
30
32
|
xcss: [containerWrapperStyles, containerWrapperDimensions]
|
|
31
33
|
}, props), children);
|
|
32
34
|
};
|
|
@@ -8,7 +8,7 @@ export const imagePlacerWrapperStyles = props => css({
|
|
|
8
8
|
display: 'inline-block'
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
export const imagePlacerErrorWrapperStyles = css({
|
|
13
13
|
backgroundColor: `var(--ds-background-danger-bold, ${R500})`,
|
|
14
14
|
color: "var(--ds-text-inverse, white)",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow } from '../styles';
|
|
4
4
|
|
|
5
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
6
|
export const predefinedAvatarsWrapperStyles = css`
|
|
7
7
|
display: flex;
|
|
8
8
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow, avatarImageStyles } from '../styles';
|
|
4
4
|
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
6
6
|
export const largeAvatarImageStyles = css(avatarImageStyles, {
|
|
7
7
|
width: '72px',
|
|
8
8
|
height: '72px'
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
export const predefinedAvatarViewWrapperStyles = css({
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
14
|
'.body': {
|
package/dist/es2019/styles.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { B200, B100 } from '@atlaskit/theme/colors';
|
|
4
4
|
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
6
|
export const avatarImageStyles = css({
|
|
7
7
|
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
8
8
|
cursor: 'pointer'
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
export const visuallyHiddenRadioStyles = css({
|
|
13
13
|
width: '1px',
|
|
14
14
|
height: '1px',
|
|
@@ -20,12 +20,12 @@ export const visuallyHiddenRadioStyles = css({
|
|
|
20
20
|
whiteSpace: 'nowrap'
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
24
24
|
export const selectedShadow = css({
|
|
25
25
|
boxShadow: `0px 0px 0px 1px ${"var(--ds-border-inverse, white)"}, 0px 0px 0px 3px ${`var(--ds-border-selected, ${B200})`}`
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
29
29
|
export const focusedShadow = css({
|
|
30
30
|
boxShadow: `0px 0px 0px 1px ${"var(--ds-border-inverse, white)"}, 0px 0px 0px 3px ${`var(--ds-border-focused, ${B100})`}`
|
|
31
31
|
});
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { avatarImageStyles } from '../styles';
|
|
4
4
|
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
6
6
|
export var smallAvatarImageStyles = css(avatarImageStyles, {
|
|
7
7
|
width: "var(--ds-space-500, 40px)",
|
|
8
8
|
height: "var(--ds-space-500, 40px)"
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
export var avatarListWrapperStyles = css({
|
|
13
13
|
display: 'flex',
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
|
|
4
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
5
|
export var avatarPickerErrorStyles = css({
|
|
6
6
|
margin: "0 ".concat("var(--ds-space-200, 16px)", " ", "var(--ds-space-200, 16px)")
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
10
10
|
export var formStyles = css({
|
|
11
11
|
margin: 0
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
15
15
|
export var avatarPickerViewWrapperStyles = css({
|
|
16
16
|
display: 'flex',
|
|
17
17
|
justifyContent: 'center',
|
|
@@ -20,7 +20,7 @@ export var avatarPickerViewWrapperStyles = css({
|
|
|
20
20
|
minHeight: '339px'
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
24
24
|
export var modalHeaderStyles = css({
|
|
25
25
|
// Using `&` twice to increase specificity
|
|
26
26
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
@@ -137,51 +137,55 @@ export var ImageCropper = /*#__PURE__*/function (_Component) {
|
|
|
137
137
|
} catch (e) {
|
|
138
138
|
return null;
|
|
139
139
|
}
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
style
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
style
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
140
|
+
return (
|
|
141
|
+
/*#__PURE__*/
|
|
142
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
143
|
+
React.createElement(Box, {
|
|
144
|
+
id: "container",
|
|
145
|
+
xcss: [containerStyles, containerDimensions]
|
|
146
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
147
|
+
id: "image-container",
|
|
148
|
+
xcss: [imageContainerStyles, imageContainerDynamicStyles]
|
|
149
|
+
}, /*#__PURE__*/React.createElement(MediaImage, {
|
|
150
|
+
crossOrigin: crossOrigin,
|
|
151
|
+
dataURI: imageSource,
|
|
152
|
+
crop: false,
|
|
153
|
+
stretch: true,
|
|
154
|
+
previewOrientation: "from-image",
|
|
155
|
+
onImageLoad: onImageLoaded,
|
|
156
|
+
onImageError: this.onImageError
|
|
157
|
+
})), isCircularMask ?
|
|
158
|
+
/*#__PURE__*/
|
|
159
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
160
|
+
React.createElement(Box, {
|
|
161
|
+
xcss: [maskStyles, circularMaskStyles],
|
|
162
|
+
style: maskShadow
|
|
163
|
+
}) :
|
|
164
|
+
/*#__PURE__*/
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
166
|
+
React.createElement(Box, {
|
|
167
|
+
xcss: [maskStyles, rectMaskStyles],
|
|
168
|
+
style: maskShadow
|
|
169
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
170
|
+
id: "drag-overlay",
|
|
171
|
+
xcss: dragOverlayStyles,
|
|
172
|
+
onMouseDown: this.onDragStarted
|
|
173
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
174
|
+
id: "remove-image-container",
|
|
175
|
+
xcss: removeImageContainerStyles
|
|
176
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
177
|
+
id: "remove-image-button",
|
|
178
|
+
icon: function icon(iconProps) {
|
|
179
|
+
return /*#__PURE__*/React.createElement(CrossIcon, _extends({}, iconProps, {
|
|
180
|
+
size: "small"
|
|
181
|
+
}));
|
|
182
|
+
},
|
|
183
|
+
onClick: onRemoveImage,
|
|
184
|
+
label: formatMessage(messages.remove_image),
|
|
185
|
+
spacing: "compact",
|
|
186
|
+
appearance: "subtle"
|
|
187
|
+
})))
|
|
188
|
+
);
|
|
185
189
|
}
|
|
186
190
|
}]);
|
|
187
191
|
return ImageCropper;
|
|
@@ -4,7 +4,7 @@ import { N200 } from '@atlaskit/theme/colors';
|
|
|
4
4
|
import { checkeredBg } from './images';
|
|
5
5
|
import { AVATAR_DIALOG_WIDTH } from '../avatar-picker-dialog/layout-const';
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
8
8
|
export var imageBgStyles = css({
|
|
9
9
|
position: 'absolute',
|
|
10
10
|
top: 0,
|
|
@@ -16,7 +16,7 @@ export var imageBgStyles = css({
|
|
|
16
16
|
borderRadius: "var(--ds-border-radius, 3px)"
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
20
20
|
export var containerStyles = css({
|
|
21
21
|
boxSizing: 'border-box',
|
|
22
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -26,7 +26,7 @@ export var containerStyles = css({
|
|
|
26
26
|
position: 'relative'
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
30
30
|
export var sliderContainerStyles = css({
|
|
31
31
|
alignItems: 'center',
|
|
32
32
|
justifyContent: 'center',
|
|
@@ -41,12 +41,12 @@ export var sliderContainerStyles = css({
|
|
|
41
41
|
backgroundColor: "var(--ds-surface-overlay, #fff)"
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
45
45
|
export var fileInputStyles = css({
|
|
46
46
|
display: 'none'
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
50
50
|
export var imageUploaderStyles = css({
|
|
51
51
|
display: 'flex',
|
|
52
52
|
flexDirection: 'column',
|
|
@@ -106,7 +106,7 @@ export var dragZoneStyles = function dragZoneStyles(props) {
|
|
|
106
106
|
};
|
|
107
107
|
dragZoneStyles.displayName = 'DragZone';
|
|
108
108
|
|
|
109
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
109
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
110
110
|
export var dragZoneImageStyles = css({
|
|
111
111
|
width: '100px'
|
|
112
112
|
});
|
|
@@ -122,7 +122,7 @@ export var dragZoneTextStyles = function dragZoneTextStyles(props) {
|
|
|
122
122
|
getWidth(props.isFullSize));
|
|
123
123
|
};
|
|
124
124
|
|
|
125
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
125
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
126
126
|
export var selectionBlockerStyles = css({
|
|
127
127
|
position: 'fixed',
|
|
128
128
|
left: 0,
|
|
@@ -133,7 +133,7 @@ export var selectionBlockerStyles = css({
|
|
|
133
133
|
userSelect: 'none'
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
137
137
|
export var paddedBreakStyles = css({
|
|
138
138
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
139
139
|
marginTop: "var(--ds-space-100, 10px)".concat(" !important"),
|
|
@@ -141,7 +141,7 @@ export var paddedBreakStyles = css({
|
|
|
141
141
|
textAlign: 'center'
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
145
145
|
export var sliderWrapperStyles = css({
|
|
146
146
|
display: 'flex',
|
|
147
147
|
alignItems: 'center',
|
|
@@ -27,7 +27,9 @@ export var ContainerWrapper = function ContainerWrapper(_ref) {
|
|
|
27
27
|
height: "".concat(height !== undefined ? height + margin * 2 : 0, "px")
|
|
28
28
|
});
|
|
29
29
|
return jsx(Box, _extends({
|
|
30
|
-
id: 'container-wrapper'
|
|
30
|
+
id: 'container-wrapper'
|
|
31
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
32
|
+
,
|
|
31
33
|
xcss: [containerWrapperStyles, containerWrapperDimensions]
|
|
32
34
|
}, props), children);
|
|
33
35
|
};
|
|
@@ -10,7 +10,7 @@ export var imagePlacerWrapperStyles = function imagePlacerWrapperStyles(props) {
|
|
|
10
10
|
});
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
14
14
|
export var imagePlacerErrorWrapperStyles = css({
|
|
15
15
|
backgroundColor: "var(--ds-background-danger-bold, ".concat(R500, ")"),
|
|
16
16
|
color: "var(--ds-text-inverse, white)",
|
|
@@ -4,5 +4,5 @@ var _templateObject;
|
|
|
4
4
|
import { css } from '@emotion/react';
|
|
5
5
|
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow } from '../styles';
|
|
6
6
|
|
|
7
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles
|
|
7
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
8
8
|
export var predefinedAvatarsWrapperStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), visuallyHiddenRadioStyles, selectedShadow, focusedShadow, "var(--ds-border-radius-circle, 50%)");
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow, avatarImageStyles } from '../styles';
|
|
4
4
|
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
6
6
|
export var largeAvatarImageStyles = css(avatarImageStyles, {
|
|
7
7
|
width: '72px',
|
|
8
8
|
height: '72px'
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
export var predefinedAvatarViewWrapperStyles = css({
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
14
|
'.body': {
|
package/dist/esm/styles.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { B200, B100 } from '@atlaskit/theme/colors';
|
|
4
4
|
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
6
|
export var avatarImageStyles = css({
|
|
7
7
|
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
8
8
|
cursor: 'pointer'
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
12
|
export var visuallyHiddenRadioStyles = css({
|
|
13
13
|
width: '1px',
|
|
14
14
|
height: '1px',
|
|
@@ -20,12 +20,12 @@ export var visuallyHiddenRadioStyles = css({
|
|
|
20
20
|
whiteSpace: 'nowrap'
|
|
21
21
|
});
|
|
22
22
|
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
24
24
|
export var selectedShadow = css({
|
|
25
25
|
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-selected, ".concat(B200, ")"))
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
29
29
|
export var focusedShadow = css({
|
|
30
30
|
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-focused, ".concat(B100, ")"))
|
|
31
31
|
});
|
|
@@ -3,7 +3,7 @@ import { css } from '@emotion/react';
|
|
|
3
3
|
import { token } from '@atlaskit/tokens';
|
|
4
4
|
import { checkeredBg } from '../src/image-placer/styles';
|
|
5
5
|
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
7
7
|
export const labelStyles = css({
|
|
8
8
|
display: 'block',
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -17,12 +17,12 @@ export const labelStyles = css({
|
|
|
17
17
|
textAlign: 'right',
|
|
18
18
|
},
|
|
19
19
|
});
|
|
20
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
21
21
|
export const exportedImageStyles = css({
|
|
22
22
|
border: `1px solid ${token('color.border', '#ccc')}`,
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
26
26
|
export const exportedImageWrapperStyles = css({
|
|
27
27
|
display: 'inline-block',
|
|
28
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
@@ -31,7 +31,7 @@ export const exportedImageWrapperStyles = css({
|
|
|
31
31
|
position: 'relative',
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
35
35
|
export const layoutStyles = css({
|
|
36
36
|
display: 'flex',
|
|
37
37
|
flexDirection: 'column',
|
|
@@ -40,7 +40,7 @@ export const layoutStyles = css({
|
|
|
40
40
|
height: '80vh',
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
44
44
|
export const wrapperStyles = css({
|
|
45
45
|
margin: token('space.100', '8px'),
|
|
46
46
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-avatar-picker",
|
|
3
|
-
"version": "24.6.
|
|
3
|
+
"version": "24.6.10",
|
|
4
4
|
"description": "A component to select, drag and resize image avatars. It also provides a default list of predefined avatars.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/button": "^18.
|
|
38
|
-
"@atlaskit/flag": "^15.
|
|
37
|
+
"@atlaskit/button": "^18.3.0",
|
|
38
|
+
"@atlaskit/flag": "^15.7.0",
|
|
39
39
|
"@atlaskit/form": "^10.4.0",
|
|
40
|
-
"@atlaskit/icon": "^22.
|
|
40
|
+
"@atlaskit/icon": "^22.6.0",
|
|
41
41
|
"@atlaskit/media-ui": "^25.10.0",
|
|
42
42
|
"@atlaskit/modal-dialog": "^12.14.0",
|
|
43
|
-
"@atlaskit/primitives": "^
|
|
43
|
+
"@atlaskit/primitives": "^11.0.0",
|
|
44
44
|
"@atlaskit/range": "^7.3.0",
|
|
45
45
|
"@atlaskit/spinner": "^16.2.0",
|
|
46
46
|
"@atlaskit/textfield": "^6.4.0",
|