@atlaskit/media-avatar-picker 24.3.25 → 24.3.27
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/image-navigator/index.js +1 -1
- package/dist/cjs/image-navigator/styles.js +107 -17
- package/dist/cjs/image-placer/styles.js +1 -0
- package/dist/cjs/predefined-avatar-view/index.js +1 -1
- package/dist/cjs/predefined-avatar-view/styles.js +45 -5
- package/dist/cjs/styles.js +21 -4
- package/dist/es2019/image-navigator/index.js +1 -1
- package/dist/es2019/image-navigator/styles.js +104 -111
- package/dist/es2019/image-placer/styles.js +1 -0
- package/dist/es2019/predefined-avatar-view/index.js +1 -1
- package/dist/es2019/predefined-avatar-view/styles.js +44 -60
- package/dist/es2019/styles.js +21 -16
- package/dist/esm/image-navigator/index.js +1 -1
- package/dist/esm/image-navigator/styles.js +107 -16
- package/dist/esm/image-placer/styles.js +1 -0
- package/dist/esm/predefined-avatar-view/index.js +1 -1
- package/dist/esm/predefined-avatar-view/styles.js +46 -6
- package/dist/esm/styles.js +21 -4
- package/dist/types/styles.d.ts +4 -4
- package/dist/types-ts4.5/styles.d.ts +4 -4
- package/example-helpers/styles.ts +30 -34
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/media-avatar-picker
|
|
2
2
|
|
|
3
|
+
## 24.3.27
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#84563](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84563) [`8f8efba47b22`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8f8efba47b22) - a11y fix - updated heading markup
|
|
8
|
+
|
|
9
|
+
## 24.3.26
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#83297](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83297) [`6b1707c169e0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6b1707c169e0) - The internal composition of this component has changed. There is no expected change in behaviour.
|
|
14
|
+
|
|
3
15
|
## 24.3.25
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -205,7 +205,7 @@ var ImageNavigator = exports.ImageNavigator = /*#__PURE__*/function (_Component)
|
|
|
205
205
|
onDrop: _this.onDrop
|
|
206
206
|
}, isLoading ? (0, _react2.jsx)(_spinner.default, {
|
|
207
207
|
size: "medium"
|
|
208
|
-
}) : (0, _react2.jsx)(
|
|
208
|
+
}) : (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)("img", {
|
|
209
209
|
id: "drag-zone-image",
|
|
210
210
|
css: _styles.dragZoneImageStyles,
|
|
211
211
|
src: dropZoneImageSrc,
|
|
@@ -1,40 +1,130 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.sliderWrapperStyles = exports.sliderContainerStyles = exports.selectionBlockerStyles = exports.paddedBreakStyles = exports.imageUploaderStyles = exports.imageBgStyles = exports.fileInputStyles = exports.dragZoneTextStyles = exports.dragZoneStyles = exports.dragZoneImageStyles = exports.containerStyles = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
11
9
|
var _images = require("./images");
|
|
12
10
|
var _layoutConst = require("../avatar-picker-dialog/layout-const");
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
var imageBgStyles = exports.imageBgStyles = (0, _react.css)({
|
|
12
|
+
position: 'absolute',
|
|
13
|
+
top: 0,
|
|
14
|
+
left: 0,
|
|
15
|
+
width: '256px',
|
|
16
|
+
height: '256px',
|
|
17
|
+
background: "url('".concat(_images.checkeredBg, "')"),
|
|
18
|
+
borderRadius: "var(--ds-border-radius, 3px)"
|
|
19
|
+
});
|
|
20
|
+
var containerStyles = exports.containerStyles = (0, _react.css)({
|
|
21
|
+
boxSizing: 'border-box',
|
|
22
|
+
'*, *::before, *::after': {
|
|
23
|
+
boxSizing: 'border-box'
|
|
24
|
+
},
|
|
25
|
+
position: 'relative'
|
|
26
|
+
});
|
|
27
|
+
var sliderContainerStyles = exports.sliderContainerStyles = (0, _react.css)({
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
display: 'flex',
|
|
31
|
+
flexDirection: 'row',
|
|
32
|
+
marginTop: "var(--ds-space-100, 8px)",
|
|
33
|
+
input: {
|
|
34
|
+
boxSizing: 'content-box',
|
|
35
|
+
padding: 0
|
|
36
|
+
},
|
|
37
|
+
backgroundColor: "var(--ds-surface-overlay, #fff)"
|
|
38
|
+
});
|
|
39
|
+
var fileInputStyles = exports.fileInputStyles = (0, _react.css)({
|
|
40
|
+
display: 'none'
|
|
41
|
+
});
|
|
42
|
+
var imageUploaderStyles = exports.imageUploaderStyles = (0, _react.css)({
|
|
43
|
+
display: 'flex',
|
|
44
|
+
flexDirection: 'column',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
margin: "0 ".concat("var(--ds-space-150, 10px)", " ", "var(--ds-space-250, 20px)", " ", "var(--ds-space-150, 10px)")
|
|
48
|
+
});
|
|
49
|
+
var spin = (0, _react.keyframes)({
|
|
50
|
+
from: {
|
|
51
|
+
transform: 'rotate(0deg)'
|
|
52
|
+
},
|
|
53
|
+
to: {
|
|
54
|
+
transform: 'rotate(360deg)'
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
var droppingAnimation = (0, _react.css)({
|
|
58
|
+
borderColor: "var(--ds-border-information, #0e56c4)",
|
|
59
|
+
animation: "".concat(spin, " 8s linear infinite")
|
|
60
|
+
});
|
|
21
61
|
var getBorder = function getBorder(showBorder) {
|
|
22
62
|
return "".concat(showBorder ? "2px dashed ".concat("var(--ds-border, #d0d6d0)") : 'none');
|
|
23
63
|
};
|
|
24
64
|
var getDroppingAnimation = function getDroppingAnimation(isDroppingFile) {
|
|
25
|
-
return isDroppingFile ? (0, _react.css)(
|
|
65
|
+
return isDroppingFile ? (0, _react.css)({
|
|
66
|
+
backgroundColor: "var(--ds-background-information-hovered, #ddecfe)",
|
|
67
|
+
'&:after': droppingAnimation
|
|
68
|
+
}) : '';
|
|
26
69
|
};
|
|
27
70
|
var dragZoneStyles = exports.dragZoneStyles = function dragZoneStyles(props) {
|
|
28
|
-
return (0, _react.css)(
|
|
71
|
+
return (0, _react.css)({
|
|
72
|
+
width: '200px',
|
|
73
|
+
height: '200px',
|
|
74
|
+
display: 'flex',
|
|
75
|
+
flexDirection: 'column',
|
|
76
|
+
alignItems: 'center',
|
|
77
|
+
justifyContent: 'center',
|
|
78
|
+
padding: "var(--ds-space-200, 15px)",
|
|
79
|
+
position: 'relative',
|
|
80
|
+
borderRadius: '100%',
|
|
81
|
+
transition: 'background-color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1)',
|
|
82
|
+
'&::after': {
|
|
83
|
+
content: "''",
|
|
84
|
+
border: getBorder(props.showBorder),
|
|
85
|
+
borderRadius: '100%',
|
|
86
|
+
position: 'absolute',
|
|
87
|
+
top: 0,
|
|
88
|
+
left: 0,
|
|
89
|
+
width: '100%',
|
|
90
|
+
height: '100%',
|
|
91
|
+
transition: 'border-color 0.3s cubic-bezier(0.19, 1, 0.22, 1)'
|
|
92
|
+
}
|
|
93
|
+
}, getDroppingAnimation(props.isDroppingFile));
|
|
29
94
|
};
|
|
30
95
|
dragZoneStyles.displayName = 'DragZone';
|
|
31
|
-
var dragZoneImageStyles = exports.dragZoneImageStyles = (0, _react.css)(
|
|
96
|
+
var dragZoneImageStyles = exports.dragZoneImageStyles = (0, _react.css)({
|
|
97
|
+
width: '100px'
|
|
98
|
+
});
|
|
32
99
|
var getWidth = function getWidth(isFullSize) {
|
|
33
100
|
return "".concat(isFullSize ? "width: calc(".concat(_layoutConst.AVATAR_DIALOG_WIDTH, " - ", "var(--ds-space-100, 8px)", " * 8)px") : 'width:auto');
|
|
34
101
|
};
|
|
35
102
|
var dragZoneTextStyles = exports.dragZoneTextStyles = function dragZoneTextStyles(props) {
|
|
36
|
-
return (0, _react.css)(
|
|
103
|
+
return (0, _react.css)({
|
|
104
|
+
textAlign: 'center',
|
|
105
|
+
color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")")
|
|
106
|
+
}, getWidth(props.isFullSize));
|
|
37
107
|
};
|
|
38
|
-
var selectionBlockerStyles = exports.selectionBlockerStyles = (0, _react.css)(
|
|
39
|
-
|
|
40
|
-
|
|
108
|
+
var selectionBlockerStyles = exports.selectionBlockerStyles = (0, _react.css)({
|
|
109
|
+
position: 'fixed',
|
|
110
|
+
left: 0,
|
|
111
|
+
top: 0,
|
|
112
|
+
right: 0,
|
|
113
|
+
bottom: 0,
|
|
114
|
+
backgroundColor: 'transparent',
|
|
115
|
+
userSelect: 'none'
|
|
116
|
+
});
|
|
117
|
+
var paddedBreakStyles = exports.paddedBreakStyles = (0, _react.css)({
|
|
118
|
+
marginTop: "var(--ds-space-100, 10px)".concat(" !important"),
|
|
119
|
+
marginBottom: "var(--ds-space-100, 10px)",
|
|
120
|
+
textAlign: 'center'
|
|
121
|
+
});
|
|
122
|
+
var sliderWrapperStyles = exports.sliderWrapperStyles = (0, _react.css)({
|
|
123
|
+
display: 'flex',
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
width: '100%',
|
|
126
|
+
'.zoom_button svg': {
|
|
127
|
+
position: 'relative',
|
|
128
|
+
left: "var(--ds-space-negative-025, -2px)"
|
|
129
|
+
}
|
|
130
|
+
});
|
|
@@ -19,6 +19,7 @@ var imagePlacerErrorWrapperStyles = exports.imagePlacerErrorWrapperStyles = (0,
|
|
|
19
19
|
width: '100%',
|
|
20
20
|
height: '100%',
|
|
21
21
|
textAlign: 'center',
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
22
23
|
paddingTop: '45%'
|
|
23
24
|
});
|
|
24
25
|
var EASING = exports.EASING = 0.15;
|
|
@@ -57,7 +57,7 @@ var PredefinedAvatarView = exports.PredefinedAvatarView = function PredefinedAva
|
|
|
57
57
|
label: ""
|
|
58
58
|
}),
|
|
59
59
|
onClick: onGoBack
|
|
60
|
-
}), (0, _react.jsx)("
|
|
60
|
+
}), (0, _react.jsx)("h2", {
|
|
61
61
|
className: "description"
|
|
62
62
|
}, predefinedAvatarsText || (0, _react.jsx)(_reactIntlNext.FormattedMessage, _mediaUi.messages.default_avatars))), (0, _react.jsx)("div", {
|
|
63
63
|
role: "radiogroup",
|
|
@@ -1,13 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.predefinedAvatarViewWrapperStyles = exports.largeAvatarImageStyles = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
8
|
var _styles = require("../styles");
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
var largeAvatarImageStyles = exports.largeAvatarImageStyles = (0, _react.css)(_styles.avatarImageStyles, {
|
|
10
|
+
width: '72px',
|
|
11
|
+
height: '72px'
|
|
12
|
+
});
|
|
13
|
+
var predefinedAvatarViewWrapperStyles = exports.predefinedAvatarViewWrapperStyles = (0, _react.css)({
|
|
14
|
+
'.body': {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexFlow: 'row wrap',
|
|
17
|
+
width: '353px',
|
|
18
|
+
maxHeight: '294px',
|
|
19
|
+
overflowY: 'auto',
|
|
20
|
+
padding: "var(--ds-space-100, 8px)".concat(" 0 0"),
|
|
21
|
+
margin: 0
|
|
22
|
+
},
|
|
23
|
+
input: _styles.visuallyHiddenRadioStyles,
|
|
24
|
+
'input:checked + img': _styles.selectedShadow,
|
|
25
|
+
'input:focus + img': _styles.focusedShadow,
|
|
26
|
+
label: {
|
|
27
|
+
paddingRight: "var(--ds-space-050, 4px)",
|
|
28
|
+
paddingLeft: "var(--ds-space-050, 4px)",
|
|
29
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
30
|
+
display: 'inline-flex'
|
|
31
|
+
},
|
|
32
|
+
'.header': {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
36
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
37
|
+
'.description': {
|
|
38
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
39
|
+
margin: 0,
|
|
40
|
+
fontSize: '14px',
|
|
41
|
+
fontWeight: 400
|
|
42
|
+
},
|
|
43
|
+
'.back-button': {
|
|
44
|
+
width: '32px',
|
|
45
|
+
height: '32px',
|
|
46
|
+
borderRadius: "var(--ds-border-radius-400, 16px)",
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
justifyContent: 'center',
|
|
49
|
+
margin: 0,
|
|
50
|
+
padding: 0
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
package/dist/cjs/styles.js
CHANGED
|
@@ -4,8 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.visuallyHiddenRadioStyles = exports.selectedShadow = exports.focusedShadow = exports.avatarImageStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
7
8
|
var _colors = require("@atlaskit/theme/colors");
|
|
8
|
-
var avatarImageStyles = exports.avatarImageStyles =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
var avatarImageStyles = exports.avatarImageStyles = (0, _react.css)({
|
|
10
|
+
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
11
|
+
cursor: 'pointer'
|
|
12
|
+
});
|
|
13
|
+
var visuallyHiddenRadioStyles = exports.visuallyHiddenRadioStyles = (0, _react.css)({
|
|
14
|
+
width: '1px',
|
|
15
|
+
height: '1px',
|
|
16
|
+
padding: 0,
|
|
17
|
+
position: 'fixed',
|
|
18
|
+
border: 0,
|
|
19
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
20
|
+
overflow: 'hidden',
|
|
21
|
+
whiteSpace: 'nowrap'
|
|
22
|
+
});
|
|
23
|
+
var selectedShadow = exports.selectedShadow = (0, _react.css)({
|
|
24
|
+
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-selected, ".concat(_colors.B200, ")"))
|
|
25
|
+
});
|
|
26
|
+
var focusedShadow = exports.focusedShadow = (0, _react.css)({
|
|
27
|
+
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-focused, ".concat(_colors.B100, ")"))
|
|
28
|
+
});
|
|
@@ -193,7 +193,7 @@ export class ImageNavigator extends Component {
|
|
|
193
193
|
onDrop: this.onDrop
|
|
194
194
|
}, isLoading ? jsx(Spinner, {
|
|
195
195
|
size: "medium"
|
|
196
|
-
}) : jsx(
|
|
196
|
+
}) : jsx(React.Fragment, null, jsx("img", {
|
|
197
197
|
id: "drag-zone-image",
|
|
198
198
|
css: dragZoneImageStyles,
|
|
199
199
|
src: dropZoneImageSrc,
|
|
@@ -2,120 +2,113 @@ import { css, keyframes } from '@emotion/react';
|
|
|
2
2
|
import { N200 } from '@atlaskit/theme/colors';
|
|
3
3
|
import { checkeredBg } from './images';
|
|
4
4
|
import { AVATAR_DIALOG_WIDTH } from '../avatar-picker-dialog/layout-const';
|
|
5
|
-
export const imageBgStyles = css
|
|
6
|
-
position: absolute
|
|
7
|
-
top: 0
|
|
8
|
-
left: 0
|
|
9
|
-
width: 256px
|
|
10
|
-
height: 256px
|
|
11
|
-
background: url('${checkeredBg}')
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export const containerStyles = css
|
|
15
|
-
|
|
16
|
-
*,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
5
|
+
export const imageBgStyles = css({
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
top: 0,
|
|
8
|
+
left: 0,
|
|
9
|
+
width: '256px',
|
|
10
|
+
height: '256px',
|
|
11
|
+
background: `url('${checkeredBg}')`,
|
|
12
|
+
borderRadius: "var(--ds-border-radius, 3px)"
|
|
13
|
+
});
|
|
14
|
+
export const containerStyles = css({
|
|
15
|
+
boxSizing: 'border-box',
|
|
16
|
+
'*, *::before, *::after': {
|
|
17
|
+
boxSizing: 'border-box'
|
|
18
|
+
},
|
|
19
|
+
position: 'relative'
|
|
20
|
+
});
|
|
21
|
+
export const sliderContainerStyles = css({
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
justifyContent: 'center',
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
marginTop: "var(--ds-space-100, 8px)",
|
|
27
|
+
input: {
|
|
28
|
+
boxSizing: 'content-box',
|
|
29
|
+
padding: 0
|
|
30
|
+
},
|
|
31
|
+
backgroundColor: "var(--ds-surface-overlay, #fff)"
|
|
32
|
+
});
|
|
33
|
+
export const fileInputStyles = css({
|
|
34
|
+
display: 'none'
|
|
35
|
+
});
|
|
36
|
+
export const imageUploaderStyles = css({
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flexDirection: 'column',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
margin: `0 ${"var(--ds-space-150, 10px)"} ${"var(--ds-space-250, 20px)"} ${"var(--ds-space-150, 10px)"}`
|
|
42
|
+
});
|
|
43
|
+
const spin = keyframes({
|
|
44
|
+
from: {
|
|
45
|
+
transform: 'rotate(0deg)'
|
|
46
|
+
},
|
|
47
|
+
to: {
|
|
48
|
+
transform: 'rotate(360deg)'
|
|
20
49
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: row;
|
|
28
|
-
margin-top: ${"var(--ds-space-100, 8px)"};
|
|
29
|
-
|
|
30
|
-
input {
|
|
31
|
-
box-sizing: content-box;
|
|
32
|
-
padding: 0;
|
|
33
|
-
}
|
|
34
|
-
background-color: ${"var(--ds-surface-overlay, #fff)"};
|
|
35
|
-
`;
|
|
36
|
-
export const fileInputStyles = css`
|
|
37
|
-
display: none;
|
|
38
|
-
`;
|
|
39
|
-
export const imageUploaderStyles = css`
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
justify-content: center;
|
|
43
|
-
align-items: center;
|
|
44
|
-
margin: 0 ${"var(--ds-space-150, 10px)"} ${"var(--ds-space-250, 20px)"}
|
|
45
|
-
${"var(--ds-space-150, 10px)"};
|
|
46
|
-
`;
|
|
47
|
-
const spin = keyframes`
|
|
48
|
-
from { transform: rotate(0deg); }
|
|
49
|
-
to { transform: rotate(360deg); }
|
|
50
|
-
`;
|
|
51
|
-
const droppingAnimation = css`
|
|
52
|
-
border-color: ${"var(--ds-border-information, #0e56c4)"};
|
|
53
|
-
animation: ${spin} 8s linear infinite;
|
|
54
|
-
`;
|
|
50
|
+
});
|
|
51
|
+
const droppingAnimation = css({
|
|
52
|
+
borderColor: "var(--ds-border-information, #0e56c4)",
|
|
53
|
+
animation: `${spin} 8s linear infinite`
|
|
54
|
+
});
|
|
55
55
|
const getBorder = showBorder => `${showBorder ? `2px dashed ${"var(--ds-border, #d0d6d0)"}` : 'none'}`;
|
|
56
|
-
const getDroppingAnimation = isDroppingFile => isDroppingFile ? css
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
left: 0;
|
|
82
|
-
width: 100%;
|
|
83
|
-
height: 100%;
|
|
84
|
-
transition: border-color 0.3s cubic-bezier(0.19, 1, 0.22, 1);
|
|
56
|
+
const getDroppingAnimation = isDroppingFile => isDroppingFile ? css({
|
|
57
|
+
backgroundColor: "var(--ds-background-information-hovered, #ddecfe)",
|
|
58
|
+
'&:after': droppingAnimation
|
|
59
|
+
}) : '';
|
|
60
|
+
export const dragZoneStyles = props => css({
|
|
61
|
+
width: '200px',
|
|
62
|
+
height: '200px',
|
|
63
|
+
display: 'flex',
|
|
64
|
+
flexDirection: 'column',
|
|
65
|
+
alignItems: 'center',
|
|
66
|
+
justifyContent: 'center',
|
|
67
|
+
padding: "var(--ds-space-200, 15px)",
|
|
68
|
+
position: 'relative',
|
|
69
|
+
borderRadius: '100%',
|
|
70
|
+
transition: 'background-color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1)',
|
|
71
|
+
'&::after': {
|
|
72
|
+
content: "''",
|
|
73
|
+
border: getBorder(props.showBorder),
|
|
74
|
+
borderRadius: '100%',
|
|
75
|
+
position: 'absolute',
|
|
76
|
+
top: 0,
|
|
77
|
+
left: 0,
|
|
78
|
+
width: '100%',
|
|
79
|
+
height: '100%',
|
|
80
|
+
transition: 'border-color 0.3s cubic-bezier(0.19, 1, 0.22, 1)'
|
|
85
81
|
}
|
|
86
|
-
|
|
87
|
-
${getDroppingAnimation(props.isDroppingFile)};
|
|
88
|
-
`;
|
|
82
|
+
}, getDroppingAnimation(props.isDroppingFile));
|
|
89
83
|
dragZoneStyles.displayName = 'DragZone';
|
|
90
|
-
export const dragZoneImageStyles = css
|
|
91
|
-
width: 100px
|
|
92
|
-
|
|
84
|
+
export const dragZoneImageStyles = css({
|
|
85
|
+
width: '100px'
|
|
86
|
+
});
|
|
93
87
|
const getWidth = isFullSize => `${isFullSize ? `width: calc(${AVATAR_DIALOG_WIDTH} - ${"var(--ds-space-100, 8px)"} * 8)px` : 'width:auto'}`;
|
|
94
|
-
export const dragZoneTextStyles = props => css
|
|
95
|
-
|
|
96
|
-
color:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
export const sliderWrapperStyles = css
|
|
113
|
-
display: flex
|
|
114
|
-
|
|
115
|
-
width: 100
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
left: ${"var(--ds-space-negative-025, -2px)"};
|
|
88
|
+
export const dragZoneTextStyles = props => css({
|
|
89
|
+
textAlign: 'center',
|
|
90
|
+
color: `var(--ds-text-subtlest, ${N200})`
|
|
91
|
+
}, getWidth(props.isFullSize));
|
|
92
|
+
export const selectionBlockerStyles = css({
|
|
93
|
+
position: 'fixed',
|
|
94
|
+
left: 0,
|
|
95
|
+
top: 0,
|
|
96
|
+
right: 0,
|
|
97
|
+
bottom: 0,
|
|
98
|
+
backgroundColor: 'transparent',
|
|
99
|
+
userSelect: 'none'
|
|
100
|
+
});
|
|
101
|
+
export const paddedBreakStyles = css({
|
|
102
|
+
marginTop: `${"var(--ds-space-100, 10px)"} !important`,
|
|
103
|
+
marginBottom: "var(--ds-space-100, 10px)",
|
|
104
|
+
textAlign: 'center'
|
|
105
|
+
});
|
|
106
|
+
export const sliderWrapperStyles = css({
|
|
107
|
+
display: 'flex',
|
|
108
|
+
alignItems: 'center',
|
|
109
|
+
width: '100%',
|
|
110
|
+
'.zoom_button svg': {
|
|
111
|
+
position: 'relative',
|
|
112
|
+
left: "var(--ds-space-negative-025, -2px)"
|
|
120
113
|
}
|
|
121
|
-
|
|
114
|
+
});
|
|
@@ -49,7 +49,7 @@ export const PredefinedAvatarView = ({
|
|
|
49
49
|
label: ""
|
|
50
50
|
}),
|
|
51
51
|
onClick: onGoBack
|
|
52
|
-
}), jsx("
|
|
52
|
+
}), jsx("h2", {
|
|
53
53
|
className: "description"
|
|
54
54
|
}, predefinedAvatarsText || jsx(FormattedMessage, messages.default_avatars))), jsx("div", {
|
|
55
55
|
role: "radiogroup",
|
|
@@ -1,63 +1,47 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow } from '../styles';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
padding-bottom: ${"var(--ds-space-100, 8px)"};
|
|
46
|
-
|
|
47
|
-
.description {
|
|
48
|
-
padding-left: ${"var(--ds-space-100, 8px)"};
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.back-button {
|
|
52
|
-
width: 32px;
|
|
53
|
-
height: 32px;
|
|
54
|
-
border-radius: ${"var(--ds-border-radius-400, 16px)"};
|
|
55
|
-
|
|
56
|
-
align-items: center;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
|
|
59
|
-
margin: 0;
|
|
60
|
-
padding: 0;
|
|
2
|
+
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow, avatarImageStyles } from '../styles';
|
|
3
|
+
export const largeAvatarImageStyles = css(avatarImageStyles, {
|
|
4
|
+
width: '72px',
|
|
5
|
+
height: '72px'
|
|
6
|
+
});
|
|
7
|
+
export const predefinedAvatarViewWrapperStyles = css({
|
|
8
|
+
'.body': {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexFlow: 'row wrap',
|
|
11
|
+
width: '353px',
|
|
12
|
+
maxHeight: '294px',
|
|
13
|
+
overflowY: 'auto',
|
|
14
|
+
padding: `${"var(--ds-space-100, 8px)"} 0 0`,
|
|
15
|
+
margin: 0
|
|
16
|
+
},
|
|
17
|
+
input: visuallyHiddenRadioStyles,
|
|
18
|
+
'input:checked + img': selectedShadow,
|
|
19
|
+
'input:focus + img': focusedShadow,
|
|
20
|
+
label: {
|
|
21
|
+
paddingRight: "var(--ds-space-050, 4px)",
|
|
22
|
+
paddingLeft: "var(--ds-space-050, 4px)",
|
|
23
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
24
|
+
display: 'inline-flex'
|
|
25
|
+
},
|
|
26
|
+
'.header': {
|
|
27
|
+
display: 'flex',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
30
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
31
|
+
'.description': {
|
|
32
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
33
|
+
margin: 0,
|
|
34
|
+
fontSize: '14px',
|
|
35
|
+
fontWeight: 400
|
|
36
|
+
},
|
|
37
|
+
'.back-button': {
|
|
38
|
+
width: '32px',
|
|
39
|
+
height: '32px',
|
|
40
|
+
borderRadius: "var(--ds-border-radius-400, 16px)",
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
justifyContent: 'center',
|
|
43
|
+
margin: 0,
|
|
44
|
+
padding: 0
|
|
61
45
|
}
|
|
62
46
|
}
|
|
63
|
-
|
|
47
|
+
});
|
package/dist/es2019/styles.js
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
1
2
|
import { B200, B100 } from '@atlaskit/theme/colors';
|
|
2
|
-
export const avatarImageStyles =
|
|
3
|
-
|
|
4
|
-
cursor: pointer
|
|
5
|
-
|
|
6
|
-
export const visuallyHiddenRadioStyles =
|
|
7
|
-
width: 1px
|
|
8
|
-
height: 1px
|
|
9
|
-
padding: 0
|
|
10
|
-
position: fixed
|
|
11
|
-
border: 0
|
|
12
|
-
clip: rect(1px, 1px, 1px, 1px)
|
|
13
|
-
overflow: hidden
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export const selectedShadow =
|
|
17
|
-
|
|
3
|
+
export const avatarImageStyles = css({
|
|
4
|
+
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
5
|
+
cursor: 'pointer'
|
|
6
|
+
});
|
|
7
|
+
export const visuallyHiddenRadioStyles = css({
|
|
8
|
+
width: '1px',
|
|
9
|
+
height: '1px',
|
|
10
|
+
padding: 0,
|
|
11
|
+
position: 'fixed',
|
|
12
|
+
border: 0,
|
|
13
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
whiteSpace: 'nowrap'
|
|
16
|
+
});
|
|
17
|
+
export const selectedShadow = css({
|
|
18
|
+
boxShadow: `0px 0px 0px 1px ${"var(--ds-border-inverse, white)"}, 0px 0px 0px 3px ${`var(--ds-border-selected, ${B200})`}`
|
|
19
|
+
});
|
|
20
|
+
export const focusedShadow = css({
|
|
21
|
+
boxShadow: `0px 0px 0px 1px ${"var(--ds-border-inverse, white)"}, 0px 0px 0px 3px ${`var(--ds-border-focused, ${B100})`}`
|
|
22
|
+
});
|
|
@@ -197,7 +197,7 @@ export var ImageNavigator = /*#__PURE__*/function (_Component) {
|
|
|
197
197
|
onDrop: _this.onDrop
|
|
198
198
|
}, isLoading ? jsx(Spinner, {
|
|
199
199
|
size: "medium"
|
|
200
|
-
}) : jsx(
|
|
200
|
+
}) : jsx(React.Fragment, null, jsx("img", {
|
|
201
201
|
id: "drag-zone-image",
|
|
202
202
|
css: dragZoneImageStyles,
|
|
203
203
|
src: dropZoneImageSrc,
|
|
@@ -1,33 +1,124 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
3
1
|
import { css, keyframes } from '@emotion/react';
|
|
4
2
|
import { N200 } from '@atlaskit/theme/colors';
|
|
5
3
|
import { checkeredBg } from './images';
|
|
6
4
|
import { AVATAR_DIALOG_WIDTH } from '../avatar-picker-dialog/layout-const';
|
|
7
|
-
export var imageBgStyles = css(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
export var imageBgStyles = css({
|
|
6
|
+
position: 'absolute',
|
|
7
|
+
top: 0,
|
|
8
|
+
left: 0,
|
|
9
|
+
width: '256px',
|
|
10
|
+
height: '256px',
|
|
11
|
+
background: "url('".concat(checkeredBg, "')"),
|
|
12
|
+
borderRadius: "var(--ds-border-radius, 3px)"
|
|
13
|
+
});
|
|
14
|
+
export var containerStyles = css({
|
|
15
|
+
boxSizing: 'border-box',
|
|
16
|
+
'*, *::before, *::after': {
|
|
17
|
+
boxSizing: 'border-box'
|
|
18
|
+
},
|
|
19
|
+
position: 'relative'
|
|
20
|
+
});
|
|
21
|
+
export var sliderContainerStyles = css({
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
justifyContent: 'center',
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flexDirection: 'row',
|
|
26
|
+
marginTop: "var(--ds-space-100, 8px)",
|
|
27
|
+
input: {
|
|
28
|
+
boxSizing: 'content-box',
|
|
29
|
+
padding: 0
|
|
30
|
+
},
|
|
31
|
+
backgroundColor: "var(--ds-surface-overlay, #fff)"
|
|
32
|
+
});
|
|
33
|
+
export var fileInputStyles = css({
|
|
34
|
+
display: 'none'
|
|
35
|
+
});
|
|
36
|
+
export var imageUploaderStyles = css({
|
|
37
|
+
display: 'flex',
|
|
38
|
+
flexDirection: 'column',
|
|
39
|
+
justifyContent: 'center',
|
|
40
|
+
alignItems: 'center',
|
|
41
|
+
margin: "0 ".concat("var(--ds-space-150, 10px)", " ", "var(--ds-space-250, 20px)", " ", "var(--ds-space-150, 10px)")
|
|
42
|
+
});
|
|
43
|
+
var spin = keyframes({
|
|
44
|
+
from: {
|
|
45
|
+
transform: 'rotate(0deg)'
|
|
46
|
+
},
|
|
47
|
+
to: {
|
|
48
|
+
transform: 'rotate(360deg)'
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
var droppingAnimation = css({
|
|
52
|
+
borderColor: "var(--ds-border-information, #0e56c4)",
|
|
53
|
+
animation: "".concat(spin, " 8s linear infinite")
|
|
54
|
+
});
|
|
14
55
|
var getBorder = function getBorder(showBorder) {
|
|
15
56
|
return "".concat(showBorder ? "2px dashed ".concat("var(--ds-border, #d0d6d0)") : 'none');
|
|
16
57
|
};
|
|
17
58
|
var getDroppingAnimation = function getDroppingAnimation(isDroppingFile) {
|
|
18
|
-
return isDroppingFile ? css(
|
|
59
|
+
return isDroppingFile ? css({
|
|
60
|
+
backgroundColor: "var(--ds-background-information-hovered, #ddecfe)",
|
|
61
|
+
'&:after': droppingAnimation
|
|
62
|
+
}) : '';
|
|
19
63
|
};
|
|
20
64
|
export var dragZoneStyles = function dragZoneStyles(props) {
|
|
21
|
-
return css(
|
|
65
|
+
return css({
|
|
66
|
+
width: '200px',
|
|
67
|
+
height: '200px',
|
|
68
|
+
display: 'flex',
|
|
69
|
+
flexDirection: 'column',
|
|
70
|
+
alignItems: 'center',
|
|
71
|
+
justifyContent: 'center',
|
|
72
|
+
padding: "var(--ds-space-200, 15px)",
|
|
73
|
+
position: 'relative',
|
|
74
|
+
borderRadius: '100%',
|
|
75
|
+
transition: 'background-color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1)',
|
|
76
|
+
'&::after': {
|
|
77
|
+
content: "''",
|
|
78
|
+
border: getBorder(props.showBorder),
|
|
79
|
+
borderRadius: '100%',
|
|
80
|
+
position: 'absolute',
|
|
81
|
+
top: 0,
|
|
82
|
+
left: 0,
|
|
83
|
+
width: '100%',
|
|
84
|
+
height: '100%',
|
|
85
|
+
transition: 'border-color 0.3s cubic-bezier(0.19, 1, 0.22, 1)'
|
|
86
|
+
}
|
|
87
|
+
}, getDroppingAnimation(props.isDroppingFile));
|
|
22
88
|
};
|
|
23
89
|
dragZoneStyles.displayName = 'DragZone';
|
|
24
|
-
export var dragZoneImageStyles = css(
|
|
90
|
+
export var dragZoneImageStyles = css({
|
|
91
|
+
width: '100px'
|
|
92
|
+
});
|
|
25
93
|
var getWidth = function getWidth(isFullSize) {
|
|
26
94
|
return "".concat(isFullSize ? "width: calc(".concat(AVATAR_DIALOG_WIDTH, " - ", "var(--ds-space-100, 8px)", " * 8)px") : 'width:auto');
|
|
27
95
|
};
|
|
28
96
|
export var dragZoneTextStyles = function dragZoneTextStyles(props) {
|
|
29
|
-
return css(
|
|
97
|
+
return css({
|
|
98
|
+
textAlign: 'center',
|
|
99
|
+
color: "var(--ds-text-subtlest, ".concat(N200, ")")
|
|
100
|
+
}, getWidth(props.isFullSize));
|
|
30
101
|
};
|
|
31
|
-
export var selectionBlockerStyles = css(
|
|
32
|
-
|
|
33
|
-
|
|
102
|
+
export var selectionBlockerStyles = css({
|
|
103
|
+
position: 'fixed',
|
|
104
|
+
left: 0,
|
|
105
|
+
top: 0,
|
|
106
|
+
right: 0,
|
|
107
|
+
bottom: 0,
|
|
108
|
+
backgroundColor: 'transparent',
|
|
109
|
+
userSelect: 'none'
|
|
110
|
+
});
|
|
111
|
+
export var paddedBreakStyles = css({
|
|
112
|
+
marginTop: "var(--ds-space-100, 10px)".concat(" !important"),
|
|
113
|
+
marginBottom: "var(--ds-space-100, 10px)",
|
|
114
|
+
textAlign: 'center'
|
|
115
|
+
});
|
|
116
|
+
export var sliderWrapperStyles = css({
|
|
117
|
+
display: 'flex',
|
|
118
|
+
alignItems: 'center',
|
|
119
|
+
width: '100%',
|
|
120
|
+
'.zoom_button svg': {
|
|
121
|
+
position: 'relative',
|
|
122
|
+
left: "var(--ds-space-negative-025, -2px)"
|
|
123
|
+
}
|
|
124
|
+
});
|
|
@@ -49,7 +49,7 @@ export var PredefinedAvatarView = function PredefinedAvatarView(_ref) {
|
|
|
49
49
|
label: ""
|
|
50
50
|
}),
|
|
51
51
|
onClick: onGoBack
|
|
52
|
-
}), jsx("
|
|
52
|
+
}), jsx("h2", {
|
|
53
53
|
className: "description"
|
|
54
54
|
}, predefinedAvatarsText || jsx(FormattedMessage, messages.default_avatars))), jsx("div", {
|
|
55
55
|
role: "radiogroup",
|
|
@@ -1,7 +1,47 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
|
-
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow } from '../styles';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow, avatarImageStyles } from '../styles';
|
|
3
|
+
export var largeAvatarImageStyles = css(avatarImageStyles, {
|
|
4
|
+
width: '72px',
|
|
5
|
+
height: '72px'
|
|
6
|
+
});
|
|
7
|
+
export var predefinedAvatarViewWrapperStyles = css({
|
|
8
|
+
'.body': {
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flexFlow: 'row wrap',
|
|
11
|
+
width: '353px',
|
|
12
|
+
maxHeight: '294px',
|
|
13
|
+
overflowY: 'auto',
|
|
14
|
+
padding: "var(--ds-space-100, 8px)".concat(" 0 0"),
|
|
15
|
+
margin: 0
|
|
16
|
+
},
|
|
17
|
+
input: visuallyHiddenRadioStyles,
|
|
18
|
+
'input:checked + img': selectedShadow,
|
|
19
|
+
'input:focus + img': focusedShadow,
|
|
20
|
+
label: {
|
|
21
|
+
paddingRight: "var(--ds-space-050, 4px)",
|
|
22
|
+
paddingLeft: "var(--ds-space-050, 4px)",
|
|
23
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
24
|
+
display: 'inline-flex'
|
|
25
|
+
},
|
|
26
|
+
'.header': {
|
|
27
|
+
display: 'flex',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
30
|
+
paddingBottom: "var(--ds-space-100, 8px)",
|
|
31
|
+
'.description': {
|
|
32
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
33
|
+
margin: 0,
|
|
34
|
+
fontSize: '14px',
|
|
35
|
+
fontWeight: 400
|
|
36
|
+
},
|
|
37
|
+
'.back-button': {
|
|
38
|
+
width: '32px',
|
|
39
|
+
height: '32px',
|
|
40
|
+
borderRadius: "var(--ds-border-radius-400, 16px)",
|
|
41
|
+
alignItems: 'center',
|
|
42
|
+
justifyContent: 'center',
|
|
43
|
+
margin: 0,
|
|
44
|
+
padding: 0
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
package/dist/esm/styles.js
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
1
2
|
import { B200, B100 } from '@atlaskit/theme/colors';
|
|
2
|
-
export var avatarImageStyles =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export var avatarImageStyles = css({
|
|
4
|
+
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
5
|
+
cursor: 'pointer'
|
|
6
|
+
});
|
|
7
|
+
export var visuallyHiddenRadioStyles = css({
|
|
8
|
+
width: '1px',
|
|
9
|
+
height: '1px',
|
|
10
|
+
padding: 0,
|
|
11
|
+
position: 'fixed',
|
|
12
|
+
border: 0,
|
|
13
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
whiteSpace: 'nowrap'
|
|
16
|
+
});
|
|
17
|
+
export var selectedShadow = css({
|
|
18
|
+
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-selected, ".concat(B200, ")"))
|
|
19
|
+
});
|
|
20
|
+
export var focusedShadow = css({
|
|
21
|
+
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-focused, ".concat(B100, ")"))
|
|
22
|
+
});
|
package/dist/types/styles.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const avatarImageStyles:
|
|
2
|
-
export declare const visuallyHiddenRadioStyles
|
|
3
|
-
export declare const selectedShadow:
|
|
4
|
-
export declare const focusedShadow:
|
|
1
|
+
export declare const avatarImageStyles: import("@emotion/react").SerializedStyles;
|
|
2
|
+
export declare const visuallyHiddenRadioStyles: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const selectedShadow: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const focusedShadow: import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const avatarImageStyles:
|
|
2
|
-
export declare const visuallyHiddenRadioStyles
|
|
3
|
-
export declare const selectedShadow:
|
|
4
|
-
export declare const focusedShadow:
|
|
1
|
+
export declare const avatarImageStyles: import("@emotion/react").SerializedStyles;
|
|
2
|
+
export declare const visuallyHiddenRadioStyles: import("@emotion/react").SerializedStyles;
|
|
3
|
+
export declare const selectedShadow: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const focusedShadow: import("@emotion/react").SerializedStyles;
|
|
@@ -2,40 +2,36 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { token } from '@atlaskit/tokens';
|
|
3
3
|
import { checkeredBg } from '../src/image-placer/styles';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export const labelStyles = css({
|
|
6
|
+
display: 'block',
|
|
7
|
+
'> input': {
|
|
8
|
+
marginLeft: token('space.100', '8px'),
|
|
9
|
+
},
|
|
10
|
+
'> span': {
|
|
11
|
+
display: 'inline-block',
|
|
12
|
+
minWidth: '120px',
|
|
13
|
+
textAlign: 'right',
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
export const exportedImageStyles = css({
|
|
17
|
+
border: `1px solid ${token('color.border', '#ccc')}`,
|
|
18
|
+
});
|
|
8
19
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
20
|
+
export const exportedImageWrapperStyles = css({
|
|
21
|
+
display: 'inline-block',
|
|
22
|
+
background: `url('${checkeredBg}')`,
|
|
23
|
+
marginTop: token('space.250', '20px'),
|
|
24
|
+
position: 'relative',
|
|
25
|
+
});
|
|
12
26
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
border: 1px solid ${token('color.border', '#ccc')};
|
|
21
|
-
`;
|
|
27
|
+
export const layoutStyles = css({
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: 'column',
|
|
30
|
+
alignItems: 'center',
|
|
31
|
+
justifyContent: 'space-around',
|
|
32
|
+
height: '80vh',
|
|
33
|
+
});
|
|
22
34
|
|
|
23
|
-
export const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
margin-top: ${token('space.250', '20px')};
|
|
27
|
-
position: relative;
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
export const layoutStyles = css`
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
align-items: center;
|
|
34
|
-
justify-content: space-around;
|
|
35
|
-
height: 80vh;
|
|
36
|
-
`;
|
|
37
|
-
|
|
38
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
39
|
-
export const wrapperStyles = css`
|
|
40
|
-
margin: 10px;
|
|
41
|
-
`;
|
|
35
|
+
export const wrapperStyles = css({
|
|
36
|
+
margin: token('space.100', '8px'),
|
|
37
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-avatar-picker",
|
|
3
|
-
"version": "24.3.
|
|
3
|
+
"version": "24.3.27",
|
|
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,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/button": "^17.
|
|
37
|
+
"@atlaskit/button": "^17.8.0",
|
|
38
38
|
"@atlaskit/flag": "^15.2.0",
|
|
39
39
|
"@atlaskit/icon": "^22.1.0",
|
|
40
40
|
"@atlaskit/media-ui": "^25.4.0",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@atlaskit/primitives": "^5.1.0",
|
|
43
43
|
"@atlaskit/range": "^7.1.0",
|
|
44
44
|
"@atlaskit/spinner": "^16.0.0",
|
|
45
|
-
"@atlaskit/theme": "^12.
|
|
45
|
+
"@atlaskit/theme": "^12.7.0",
|
|
46
46
|
"@atlaskit/tokens": "^1.42.0",
|
|
47
47
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|