@atlaskit/media-avatar-picker 24.0.3 → 24.1.1
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 +19 -0
- package/dist/cjs/avatar-picker-dialog/avatar-picker-dialog-loader.js +3 -1
- package/dist/cjs/image-cropper/styles.js +4 -2
- package/dist/cjs/image-navigator/styles.js +7 -5
- package/dist/cjs/image-placer/styles.js +5 -3
- package/dist/cjs/predefined-avatar-list/index.js +1 -0
- package/dist/cjs/predefined-avatar-view/styles.js +3 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/avatar-picker-dialog/avatar-picker-dialog-loader.js +2 -1
- package/dist/es2019/image-cropper/styles.js +5 -2
- package/dist/es2019/image-navigator/styles.js +6 -5
- package/dist/es2019/image-placer/styles.js +7 -5
- package/dist/es2019/predefined-avatar-list/index.js +1 -0
- package/dist/es2019/predefined-avatar-view/styles.js +2 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/avatar-picker-dialog/avatar-picker-dialog-loader.js +2 -1
- package/dist/esm/image-cropper/styles.js +3 -2
- package/dist/esm/image-navigator/styles.js +6 -5
- package/dist/esm/image-placer/styles.js +4 -3
- package/dist/esm/predefined-avatar-list/index.js +1 -0
- package/dist/esm/predefined-avatar-view/styles.js +2 -1
- package/dist/esm/version.json +1 -1
- package/example-helpers/StatefulAvatarPickerDialog.tsx +2 -4
- package/example-helpers/styles.ts +3 -12
- package/example-helpers/viewport-debug.ts +4 -9
- package/package.json +10 -12
- package/report.api.md +12 -5
- package/dist/types-ts4.0/avatar-list/index.d.ts +0 -18
- package/dist/types-ts4.0/avatar-list/styles.d.ts +0 -1
- package/dist/types-ts4.0/avatar-picker-dialog/avatar-picker-dialog-loader.d.ts +0 -19
- package/dist/types-ts4.0/avatar-picker-dialog/index.d.ts +0 -49
- package/dist/types-ts4.0/avatar-picker-dialog/layout-const.d.ts +0 -10
- package/dist/types-ts4.0/avatar-picker-dialog/styles.d.ts +0 -4
- package/dist/types-ts4.0/avatar-picker-dialog/types.d.ts +0 -49
- package/dist/types-ts4.0/image-cropper/crop-to-data-uri.d.ts +0 -7
- package/dist/types-ts4.0/image-cropper/index.d.ts +0 -33
- package/dist/types-ts4.0/image-cropper/isImageRemote.d.ts +0 -1
- package/dist/types-ts4.0/image-cropper/styles.d.ts +0 -20
- package/dist/types-ts4.0/image-navigator/dragZone.d.ts +0 -3
- package/dist/types-ts4.0/image-navigator/images.d.ts +0 -3
- package/dist/types-ts4.0/image-navigator/index.d.ts +0 -80
- package/dist/types-ts4.0/image-navigator/slider.d.ts +0 -16
- package/dist/types-ts4.0/image-navigator/styles.d.ts +0 -21
- package/dist/types-ts4.0/image-placer/constraints.d.ts +0 -6
- package/dist/types-ts4.0/image-placer/container.d.ts +0 -28
- package/dist/types-ts4.0/image-placer/containerWrapper.d.ts +0 -3
- package/dist/types-ts4.0/image-placer/image.d.ts +0 -20
- package/dist/types-ts4.0/image-placer/imagePlacerErrorWrapper.d.ts +0 -3
- package/dist/types-ts4.0/image-placer/imageProcessor.d.ts +0 -16
- package/dist/types-ts4.0/image-placer/imageWrapper.d.ts +0 -3
- package/dist/types-ts4.0/image-placer/index.d.ts +0 -105
- package/dist/types-ts4.0/image-placer/margin.d.ts +0 -14
- package/dist/types-ts4.0/image-placer/styles.d.ts +0 -35
- package/dist/types-ts4.0/index.d.ts +0 -5
- package/dist/types-ts4.0/predefined-avatar-list/index.d.ts +0 -17
- package/dist/types-ts4.0/predefined-avatar-list/styles.d.ts +0 -1
- package/dist/types-ts4.0/predefined-avatar-view/index.d.ts +0 -19
- package/dist/types-ts4.0/predefined-avatar-view/largeImageAvatar.d.ts +0 -3
- package/dist/types-ts4.0/predefined-avatar-view/smallImageAvatar.d.ts +0 -3
- package/dist/types-ts4.0/predefined-avatar-view/styles.d.ts +0 -6
- package/dist/types-ts4.0/util.d.ts +0 -5
- package/dist/types-ts4.0/viewport/index.d.ts +0 -2
- package/dist/types-ts4.0/viewport/viewport-render.d.ts +0 -3
- package/dist/types-ts4.0/viewport/viewport.d.ts +0 -57
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/media-avatar-picker
|
|
2
2
|
|
|
3
|
+
## 24.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 24.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`1f299384778`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1f299384778) - [ux] Instrumented `@atlaskit/media-avatar-picker` with the new theming package, `@atlaskit/tokens`.
|
|
14
|
+
|
|
15
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
16
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 24.0.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -29,6 +29,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
29
29
|
|
|
30
30
|
var _react = _interopRequireDefault(require("react"));
|
|
31
31
|
|
|
32
|
+
var _tokens = require("@atlaskit/tokens");
|
|
33
|
+
|
|
32
34
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
33
35
|
|
|
34
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -119,7 +121,7 @@ var AsyncAvatarPickerDialog = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
119
121
|
}
|
|
120
122
|
|
|
121
123
|
return /*#__PURE__*/_react.default.createElement(_mediaUi.ModalSpinner, {
|
|
122
|
-
blankedColor: "rgba(255, 255, 255, 0.53)
|
|
124
|
+
blankedColor: "".concat((0, _tokens.token)('color.blanket', 'rgba(255, 255, 255, 0.53)')),
|
|
123
125
|
invertSpinnerColor: false
|
|
124
126
|
});
|
|
125
127
|
}
|
|
@@ -9,6 +9,8 @@ exports.removeImageContainerStyles = exports.removeImageButtonStyles = exports.r
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
12
14
|
var _react = require("@emotion/react");
|
|
13
15
|
|
|
14
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
@@ -23,7 +25,7 @@ var imageContainerStyles = (0, _react.css)(_templateObject2 || (_templateObject2
|
|
|
23
25
|
exports.imageContainerStyles = imageContainerStyles;
|
|
24
26
|
var CONTAINER_PADDING = 28;
|
|
25
27
|
exports.CONTAINER_PADDING = CONTAINER_PADDING;
|
|
26
|
-
var maskStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", "px;\n bottom: ", "px;\n left: ", "px;\n right: ", "px;\n box-shadow: 0 0 0 100px
|
|
28
|
+
var maskStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", "px;\n bottom: ", "px;\n left: ", "px;\n right: ", "px;\n box-shadow: 0 0 0 100px\n ", ";\n opacity: ", ";\n"])), CONTAINER_PADDING, CONTAINER_PADDING, CONTAINER_PADDING, CONTAINER_PADDING, (0, _tokens.token)('elevation.surface.overlay', 'rgba(255, 255, 255)'), (0, _tokens.token)('opacity.disabled', '0.5'));
|
|
27
29
|
var rectMaskStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border-radius: ", "px;\n"])), maskStyles, (0, _constants.borderRadius)());
|
|
28
30
|
exports.rectMaskStyles = rectMaskStyles;
|
|
29
31
|
var circularMaskStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n border-radius: 500px;\n"])), maskStyles);
|
|
@@ -32,5 +34,5 @@ var dragOverlayStyles = (0, _react.css)(_templateObject6 || (_templateObject6 =
|
|
|
32
34
|
exports.dragOverlayStyles = dragOverlayStyles;
|
|
33
35
|
var removeImageContainerStyles = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n right: 4px;\n top: 4px;\n"])));
|
|
34
36
|
exports.removeImageContainerStyles = removeImageContainerStyles;
|
|
35
|
-
var removeImageButtonStyles = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border: none;\n cursor: pointer;\n padding: 0;\n\n svg {\n position: absolute;\n top: 4px;\n left: 4px;\n }\n\n &:hover {\n background-color: ", ";\n }\n"])), (0, _constants.borderRadius)(), _colors.N50A);
|
|
37
|
+
var removeImageButtonStyles = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border: none;\n cursor: pointer;\n padding: 0;\n\n svg {\n position: absolute;\n top: 4px;\n left: 4px;\n }\n\n &:hover {\n background-color: ", ";\n }\n"])), (0, _constants.borderRadius)(), (0, _tokens.token)('color.background.neutral.hovered', _colors.N50A));
|
|
36
38
|
exports.removeImageButtonStyles = removeImageButtonStyles;
|
|
@@ -9,6 +9,8 @@ exports.sliderWrapperStyles = exports.sliderContainerStyles = exports.selectionB
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
12
14
|
var _react = require("@emotion/react");
|
|
13
15
|
|
|
14
16
|
var _constants = require("@atlaskit/theme/constants");
|
|
@@ -26,20 +28,20 @@ var imageBgStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0,
|
|
|
26
28
|
exports.imageBgStyles = imageBgStyles;
|
|
27
29
|
var containerStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n box-sizing: border-box;\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n position: relative;\n"])), (0, _constants.gridSize)() * 32);
|
|
28
30
|
exports.containerStyles = containerStyles;
|
|
29
|
-
var sliderContainerStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n justify-content: center;\n display: flex;\n flex-direction: row;\n margin-top: ", "px;\n\n input {\n box-sizing: content-box;\n padding: 0;\n }\n background-color:
|
|
31
|
+
var sliderContainerStyles = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n justify-content: center;\n display: flex;\n flex-direction: row;\n margin-top: ", "px;\n\n input {\n box-sizing: content-box;\n padding: 0;\n }\n background-color: ", ";\n"])), (0, _constants.gridSize)(), (0, _tokens.token)('elevation.surface.overlay', '#fff'));
|
|
30
32
|
exports.sliderContainerStyles = sliderContainerStyles;
|
|
31
33
|
var fileInputStyles = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: none;\n"])));
|
|
32
34
|
exports.fileInputStyles = fileInputStyles;
|
|
33
35
|
var imageUploaderStyles = (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin: 0 10px 20px 10px;\n"])));
|
|
34
36
|
exports.imageUploaderStyles = imageUploaderStyles;
|
|
35
|
-
var droppingAnimation = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n border-color:
|
|
37
|
+
var droppingAnimation = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n border-color: ", ";\n animation: ", " 8s linear infinite;\n"])), (0, _tokens.token)('color.border.information', '#0e56c4'), spin);
|
|
36
38
|
|
|
37
39
|
var getBorder = function getBorder(showBorder) {
|
|
38
|
-
return "".concat(showBorder ?
|
|
40
|
+
return "".concat(showBorder ? "2px dashed ".concat((0, _tokens.token)('color.border', '#d0d6d0')) : 'none');
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
var getDroppingAnimation = function getDroppingAnimation(isDroppingFile) {
|
|
42
|
-
return isDroppingFile ? (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n background-color:
|
|
44
|
+
return isDroppingFile ? (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n\n &:after {\n ", "\n }\n "])), (0, _tokens.token)('color.background.information.hovered', '#ddecfe'), droppingAnimation) : '';
|
|
43
45
|
};
|
|
44
46
|
|
|
45
47
|
var dragZoneStyles = function dragZoneStyles(props) {
|
|
@@ -56,7 +58,7 @@ var getWidth = function getWidth(isFullSize) {
|
|
|
56
58
|
};
|
|
57
59
|
|
|
58
60
|
var dragZoneTextStyles = function dragZoneTextStyles(props) {
|
|
59
|
-
return (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n text-align: center;\n color: ", ";\n ", ";\n"])), _colors.N200, getWidth(props.isFullSize));
|
|
61
|
+
return (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n text-align: center;\n color: ", ";\n ", ";\n"])), (0, _tokens.token)('color.text.subtlest', _colors.N200), getWidth(props.isFullSize));
|
|
60
62
|
};
|
|
61
63
|
|
|
62
64
|
exports.dragZoneTextStyles = dragZoneTextStyles;
|
|
@@ -9,6 +9,8 @@ exports.marginWrapperSquareStyles = exports.marginWrapperCircleStyles = exports.
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
12
14
|
var _react = require("@emotion/react");
|
|
13
15
|
|
|
14
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -23,7 +25,7 @@ var imagePlacerWrapperStyles = function imagePlacerWrapperStyles(props) {
|
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
exports.imagePlacerWrapperStyles = imagePlacerWrapperStyles;
|
|
26
|
-
var imagePlacerErrorWrapperStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n color:
|
|
28
|
+
var imagePlacerErrorWrapperStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n color: ", ";\n width: 100%;\n height: 100%;\n text-align: center;\n padding-top: 45%;\n"])), (0, _tokens.token)('color.background.danger.bold', _colors.R500), (0, _tokens.token)('color.text.inverse', 'white'));
|
|
27
29
|
exports.imagePlacerErrorWrapperStyles = imagePlacerErrorWrapperStyles;
|
|
28
30
|
|
|
29
31
|
var containerWrapperStyles = function containerWrapperStyles(_ref) {
|
|
@@ -52,7 +54,7 @@ var marginWrapperSquareStyles = function marginWrapperSquareStyles(_ref3) {
|
|
|
52
54
|
var width = _ref3.width,
|
|
53
55
|
height = _ref3.height,
|
|
54
56
|
size = _ref3.size;
|
|
55
|
-
return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n
|
|
57
|
+
return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n left: 0;\n top: 0;\n border-style: solid;\n border-color: ", ";\n border-width: ", "px;\n width: ", "px;\n height: ", "px;\n opacity: ", ";\n"])), (0, _tokens.token)('elevation.surface.overlay', 'rgba(255, 255, 255)'), size, width, height, (0, _tokens.token)('opacity.disabled', '0.3'));
|
|
56
58
|
};
|
|
57
59
|
|
|
58
60
|
exports.marginWrapperSquareStyles = marginWrapperSquareStyles;
|
|
@@ -61,7 +63,7 @@ var marginWrapperCircleStyles = function marginWrapperCircleStyles(_ref4) {
|
|
|
61
63
|
var width = _ref4.width,
|
|
62
64
|
height = _ref4.height,
|
|
63
65
|
size = _ref4.size;
|
|
64
|
-
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n overflow: hidden;\n left: 0px;\n top: 0px;\n width: ", "px;\n height: ", "px;\n\n &:after {\n content: '';\n position: absolute;\n left: ", "px;\n top: ", "px;\n border-radius: 100%;\n width: ", "px;\n height: ", "px;\n box-shadow: 0px 0px 0px ", "px\n
|
|
66
|
+
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n overflow: hidden;\n left: 0px;\n top: 0px;\n width: ", "px;\n height: ", "px;\n\n &:after {\n content: '';\n position: absolute;\n left: ", "px;\n top: ", "px;\n border-radius: 100%;\n width: ", "px;\n height: ", "px;\n box-shadow: 0px 0px 0px ", "px\n ", ";\n opacity: ", ";\n }\n"])), width + size * 2, height + size * 2, size, size, width, height, Math.max(width, height), (0, _tokens.token)('elevation.surface.overlay', 'rgba(255, 255, 255)'), (0, _tokens.token)('opacity.disabled', '0.3'));
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
exports.marginWrapperCircleStyles = marginWrapperCircleStyles;
|
|
@@ -52,6 +52,7 @@ var ShowMoreButton = /*#__PURE__*/function (_PureComponent) {
|
|
|
52
52
|
(0, _createClass2.default)(ShowMoreButton, [{
|
|
53
53
|
key: "render",
|
|
54
54
|
value: function render() {
|
|
55
|
+
// TODO: refactor this button to not use custom - component reverts to square shape when hovered
|
|
55
56
|
return (0, _react.jsx)(_customThemeButton.default, {
|
|
56
57
|
className: "show-more-button",
|
|
57
58
|
iconAfter: (0, _react.jsx)(_more.default, {
|
|
@@ -9,6 +9,8 @@ exports.smallAvatarImageStyles = exports.predefinedAvatarViewWrapperStyles = exp
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
12
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
13
15
|
|
|
14
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -18,7 +20,7 @@ var _react = require("@emotion/react");
|
|
|
18
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
19
21
|
|
|
20
22
|
var avatarImageStyles = function avatarImageStyles(props) {
|
|
21
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", ";\n cursor: pointer;\n ", ";\n"])), (0, _constants.borderRadius)(), props.isSelected ? " box-shadow: 0px 0px 0px 1px white, 0px 0px 0px 3px ".concat(_colors.B200, "; ") : '');
|
|
23
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", ";\n cursor: pointer;\n ", ";\n"])), (0, _constants.borderRadius)(), props.isSelected ? " box-shadow: 0px 0px 0px 1px ".concat((0, _tokens.token)('color.border.inverse', 'white'), ", 0px 0px 0px 3px ").concat((0, _tokens.token)('color.border.selected', _colors.B200), "; ") : '');
|
|
22
24
|
};
|
|
23
25
|
|
|
24
26
|
var largeAvatarImageStyles = function largeAvatarImageStyles(props) {
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
3
4
|
import { ModalSpinner } from '@atlaskit/media-ui';
|
|
4
5
|
export default class AsyncAvatarPickerDialog extends React.PureComponent {
|
|
5
6
|
constructor(...args) {
|
|
@@ -37,7 +38,7 @@ export default class AsyncAvatarPickerDialog extends React.PureComponent {
|
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
return /*#__PURE__*/React.createElement(ModalSpinner, {
|
|
40
|
-
blankedColor:
|
|
41
|
+
blankedColor: `${token('color.blanket', 'rgba(255, 255, 255, 0.53)')}`,
|
|
41
42
|
invertSpinnerColor: false
|
|
42
43
|
});
|
|
43
44
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { token } from '@atlaskit/tokens';
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
3
4
|
import { N50A } from '@atlaskit/theme/colors'; // Using module augmentation to add crossOrigin attribute as it does not exist yet, PR has been opened in
|
|
@@ -24,7 +25,9 @@ const maskStyles = css`
|
|
|
24
25
|
bottom: ${CONTAINER_PADDING}px;
|
|
25
26
|
left: ${CONTAINER_PADDING}px;
|
|
26
27
|
right: ${CONTAINER_PADDING}px;
|
|
27
|
-
box-shadow: 0 0 0 100px
|
|
28
|
+
box-shadow: 0 0 0 100px
|
|
29
|
+
${token('elevation.surface.overlay', 'rgba(255, 255, 255)')};
|
|
30
|
+
opacity: ${token('opacity.disabled', '0.5')};
|
|
28
31
|
`;
|
|
29
32
|
export const rectMaskStyles = css`
|
|
30
33
|
${maskStyles};
|
|
@@ -61,6 +64,6 @@ export const removeImageButtonStyles = css`
|
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
&:hover {
|
|
64
|
-
background-color: ${N50A};
|
|
67
|
+
background-color: ${token('color.background.neutral.hovered', N50A)};
|
|
65
68
|
}
|
|
66
69
|
`;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { token } from '@atlaskit/tokens';
|
|
1
2
|
import { css, keyframes } from '@emotion/react';
|
|
2
3
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
3
4
|
import { N200 } from '@atlaskit/theme/colors';
|
|
@@ -37,7 +38,7 @@ export const sliderContainerStyles = css`
|
|
|
37
38
|
box-sizing: content-box;
|
|
38
39
|
padding: 0;
|
|
39
40
|
}
|
|
40
|
-
background-color: #fff;
|
|
41
|
+
background-color: ${token('elevation.surface.overlay', '#fff')};
|
|
41
42
|
`;
|
|
42
43
|
export const fileInputStyles = css`
|
|
43
44
|
display: none;
|
|
@@ -50,14 +51,14 @@ export const imageUploaderStyles = css`
|
|
|
50
51
|
margin: 0 10px 20px 10px;
|
|
51
52
|
`;
|
|
52
53
|
const droppingAnimation = css`
|
|
53
|
-
border-color: #0e56c4;
|
|
54
|
+
border-color: ${token('color.border.information', '#0e56c4')};
|
|
54
55
|
animation: ${spin} 8s linear infinite;
|
|
55
56
|
`;
|
|
56
57
|
|
|
57
|
-
const getBorder = showBorder => `${showBorder ?
|
|
58
|
+
const getBorder = showBorder => `${showBorder ? `2px dashed ${token('color.border', '#d0d6d0')}` : 'none'}`;
|
|
58
59
|
|
|
59
60
|
const getDroppingAnimation = isDroppingFile => isDroppingFile ? css`
|
|
60
|
-
background-color: #ddecfe;
|
|
61
|
+
background-color: ${token('color.background.information.hovered', '#ddecfe')};
|
|
61
62
|
|
|
62
63
|
&:after {
|
|
63
64
|
${droppingAnimation}
|
|
@@ -99,7 +100,7 @@ const getWidth = isFullSize => `${isFullSize ? `width:${AVATAR_DIALOG_WIDTH - gr
|
|
|
99
100
|
|
|
100
101
|
export const dragZoneTextStyles = props => css`
|
|
101
102
|
text-align: center;
|
|
102
|
-
color: ${N200};
|
|
103
|
+
color: ${token('color.text.subtlest', N200)};
|
|
103
104
|
${getWidth(props.isFullSize)};
|
|
104
105
|
`;
|
|
105
106
|
export const selectionBlockerStyles = css`
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { token } from '@atlaskit/tokens';
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { R500 } from '@atlaskit/theme/colors';
|
|
3
4
|
export const checkeredBg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAA6hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxOC0xMC0zMFQxMjoxMDo5MjwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjcuNTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpDb21wcmVzc2lvbj4wPC90aWZmOkNvbXByZXNzaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTA8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KX+XPjwAAACtJREFUGBljPHv27H8GNGBsbMyIJsTAhC6Aiz+ACjEcDXIjNg8OoBuJthoAzy0HeT3Qcc0AAAAASUVORK5CYII=';
|
|
@@ -6,8 +7,8 @@ export const imagePlacerWrapperStyles = props => css`
|
|
|
6
7
|
display: inline-block;
|
|
7
8
|
`;
|
|
8
9
|
export const imagePlacerErrorWrapperStyles = css`
|
|
9
|
-
background-color: ${R500};
|
|
10
|
-
color: white;
|
|
10
|
+
background-color: ${token('color.background.danger.bold', R500)};
|
|
11
|
+
color: ${token('color.text.inverse', 'white')};
|
|
11
12
|
width: 100%;
|
|
12
13
|
height: 100%;
|
|
13
14
|
text-align: center;
|
|
@@ -52,14 +53,14 @@ export const marginWrapperSquareStyles = ({
|
|
|
52
53
|
size
|
|
53
54
|
}) => css`
|
|
54
55
|
position: absolute;
|
|
55
|
-
border: 1px dotted white;
|
|
56
56
|
left: 0;
|
|
57
57
|
top: 0;
|
|
58
58
|
border-style: solid;
|
|
59
|
-
border-color: rgba(255, 255, 255
|
|
59
|
+
border-color: ${token('elevation.surface.overlay', 'rgba(255, 255, 255)')};
|
|
60
60
|
border-width: ${size}px;
|
|
61
61
|
width: ${width}px;
|
|
62
62
|
height: ${height}px;
|
|
63
|
+
opacity: ${token('opacity.disabled', '0.3')};
|
|
63
64
|
`;
|
|
64
65
|
export const marginWrapperCircleStyles = ({
|
|
65
66
|
width,
|
|
@@ -82,6 +83,7 @@ export const marginWrapperCircleStyles = ({
|
|
|
82
83
|
width: ${width}px;
|
|
83
84
|
height: ${height}px;
|
|
84
85
|
box-shadow: 0px 0px 0px ${Math.max(width, height)}px
|
|
85
|
-
rgba(255, 255, 255
|
|
86
|
+
${token('elevation.surface.overlay', 'rgba(255, 255, 255)')};
|
|
87
|
+
opacity: ${token('opacity.disabled', '0.3')};
|
|
86
88
|
}
|
|
87
89
|
`;
|
|
@@ -10,6 +10,7 @@ import { predefinedAvatarsWrapperStyles } from './styles';
|
|
|
10
10
|
|
|
11
11
|
class ShowMoreButton extends PureComponent {
|
|
12
12
|
render() {
|
|
13
|
+
// TODO: refactor this button to not use custom - component reverts to square shape when hovered
|
|
13
14
|
return jsx(Button, {
|
|
14
15
|
className: "show-more-button",
|
|
15
16
|
iconAfter: jsx(EditorMoreIcon, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { token } from '@atlaskit/tokens';
|
|
1
2
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
2
3
|
import { B200 } from '@atlaskit/theme/colors';
|
|
3
4
|
import { css } from '@emotion/react';
|
|
@@ -5,7 +6,7 @@ import { css } from '@emotion/react';
|
|
|
5
6
|
const avatarImageStyles = props => css`
|
|
6
7
|
border-radius: ${borderRadius()};
|
|
7
8
|
cursor: pointer;
|
|
8
|
-
${props.isSelected ? ` box-shadow: 0px 0px 0px 1px white, 0px 0px 0px 3px ${B200}; ` : ''};
|
|
9
|
+
${props.isSelected ? ` box-shadow: 0px 0px 0px 1px ${token('color.border.inverse', 'white')}, 0px 0px 0px 3px ${token('color.border.selected', B200)}; ` : ''};
|
|
9
10
|
`;
|
|
10
11
|
|
|
11
12
|
export const largeAvatarImageStyles = props => css`
|
package/dist/es2019/version.json
CHANGED
|
@@ -13,6 +13,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
13
13
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
14
14
|
|
|
15
15
|
import React from 'react';
|
|
16
|
+
import { token } from '@atlaskit/tokens';
|
|
16
17
|
import { ModalSpinner } from '@atlaskit/media-ui';
|
|
17
18
|
|
|
18
19
|
var AsyncAvatarPickerDialog = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -97,7 +98,7 @@ var AsyncAvatarPickerDialog = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
return /*#__PURE__*/React.createElement(ModalSpinner, {
|
|
100
|
-
blankedColor: "rgba(255, 255, 255, 0.53)
|
|
101
|
+
blankedColor: "".concat(token('color.blanket', 'rgba(255, 255, 255, 0.53)')),
|
|
101
102
|
invertSpinnerColor: false
|
|
102
103
|
});
|
|
103
104
|
}
|
|
@@ -2,6 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
4
4
|
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
import { css } from '@emotion/react';
|
|
6
7
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
8
|
import { N50A } from '@atlaskit/theme/colors'; // Using module augmentation to add crossOrigin attribute as it does not exist yet, PR has been opened in
|
|
@@ -10,9 +11,9 @@ import { N50A } from '@atlaskit/theme/colors'; // Using module augmentation to a
|
|
|
10
11
|
export var containerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n border-radius: ", "px;\n"])), borderRadius());
|
|
11
12
|
export var imageContainerStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n /* Is needed so image is not selected, when dragged */\n -webkit-user-select: none; /* Chrome all / Safari all */\n -moz-user-select: none; /* Firefox all */\n -ms-user-select: none; /* IE 10+ */\n user-select: none; /* Likely future */\n border-radius: ", "px;\n"])), borderRadius());
|
|
12
13
|
export var CONTAINER_PADDING = 28;
|
|
13
|
-
var maskStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: ", "px;\n bottom: ", "px;\n left: ", "px;\n right: ", "px;\n box-shadow: 0 0 0 100px
|
|
14
|
+
var maskStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n top: ", "px;\n bottom: ", "px;\n left: ", "px;\n right: ", "px;\n box-shadow: 0 0 0 100px\n ", ";\n opacity: ", ";\n"])), CONTAINER_PADDING, CONTAINER_PADDING, CONTAINER_PADDING, CONTAINER_PADDING, token('elevation.surface.overlay', 'rgba(255, 255, 255)'), token('opacity.disabled', '0.5'));
|
|
14
15
|
export var rectMaskStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", ";\n border-radius: ", "px;\n"])), maskStyles, borderRadius());
|
|
15
16
|
export var circularMaskStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ", ";\n border-radius: 500px;\n"])), maskStyles);
|
|
16
17
|
export var dragOverlayStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n width: 100%;\n height: 100%;\n cursor: move;\n"])));
|
|
17
18
|
export var removeImageContainerStyles = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n position: absolute;\n right: 4px;\n top: 4px;\n"])));
|
|
18
|
-
export var removeImageButtonStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border: none;\n cursor: pointer;\n padding: 0;\n\n svg {\n position: absolute;\n top: 4px;\n left: 4px;\n }\n\n &:hover {\n background-color: ", ";\n }\n"])), borderRadius(), N50A);
|
|
19
|
+
export var removeImageButtonStyles = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n background-color: transparent;\n width: 24px;\n height: 24px;\n border: none;\n cursor: pointer;\n padding: 0;\n\n svg {\n position: absolute;\n top: 4px;\n left: 4px;\n }\n\n &:hover {\n background-color: ", ";\n }\n"])), borderRadius(), token('color.background.neutral.hovered', N50A));
|
|
@@ -2,6 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
4
4
|
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
import { css, keyframes } from '@emotion/react';
|
|
6
7
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
7
8
|
import { N200 } from '@atlaskit/theme/colors';
|
|
@@ -10,17 +11,17 @@ import { AVATAR_DIALOG_WIDTH } from '../avatar-picker-dialog/layout-const';
|
|
|
10
11
|
var spin = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n"])));
|
|
11
12
|
export var imageBgStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 256px;\n height: 256px;\n background: url('", "');\n border-radius: ", ";\n"])), checkeredBg, borderRadius());
|
|
12
13
|
export var containerStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", "px;\n box-sizing: border-box;\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n position: relative;\n"])), gridSize() * 32);
|
|
13
|
-
export var sliderContainerStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n align-items: center;\n justify-content: center;\n display: flex;\n flex-direction: row;\n margin-top: ", "px;\n\n input {\n box-sizing: content-box;\n padding: 0;\n }\n background-color:
|
|
14
|
+
export var sliderContainerStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n align-items: center;\n justify-content: center;\n display: flex;\n flex-direction: row;\n margin-top: ", "px;\n\n input {\n box-sizing: content-box;\n padding: 0;\n }\n background-color: ", ";\n"])), gridSize(), token('elevation.surface.overlay', '#fff'));
|
|
14
15
|
export var fileInputStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: none;\n"])));
|
|
15
16
|
export var imageUploaderStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin: 0 10px 20px 10px;\n"])));
|
|
16
|
-
var droppingAnimation = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-color:
|
|
17
|
+
var droppingAnimation = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-color: ", ";\n animation: ", " 8s linear infinite;\n"])), token('color.border.information', '#0e56c4'), spin);
|
|
17
18
|
|
|
18
19
|
var getBorder = function getBorder(showBorder) {
|
|
19
|
-
return "".concat(showBorder ?
|
|
20
|
+
return "".concat(showBorder ? "2px dashed ".concat(token('color.border', '#d0d6d0')) : 'none');
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
var getDroppingAnimation = function getDroppingAnimation(isDroppingFile) {
|
|
23
|
-
return isDroppingFile ? css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background-color:
|
|
24
|
+
return isDroppingFile ? css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background-color: ", ";\n\n &:after {\n ", "\n }\n "])), token('color.background.information.hovered', '#ddecfe'), droppingAnimation) : '';
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
export var dragZoneStyles = function dragZoneStyles(props) {
|
|
@@ -34,7 +35,7 @@ var getWidth = function getWidth(isFullSize) {
|
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
export var dragZoneTextStyles = function dragZoneTextStyles(props) {
|
|
37
|
-
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n text-align: center;\n color: ", ";\n ", ";\n"])), N200, getWidth(props.isFullSize));
|
|
38
|
+
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n text-align: center;\n color: ", ";\n ", ";\n"])), token('color.text.subtlest', N200), getWidth(props.isFullSize));
|
|
38
39
|
};
|
|
39
40
|
export var selectionBlockerStyles = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n position: fixed;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: transparent;\n user-select: none;\n"])));
|
|
40
41
|
export var paddedBreakStyles = css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-top: 10px !important;\n margin-bottom: 10px;\n"])));
|
|
@@ -2,13 +2,14 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
4
4
|
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
import { css } from '@emotion/react';
|
|
6
7
|
import { R500 } from '@atlaskit/theme/colors';
|
|
7
8
|
export var checkeredBg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAA6hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxOC0xMC0zMFQxMjoxMDo5MjwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjcuNTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpDb21wcmVzc2lvbj4wPC90aWZmOkNvbXByZXNzaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTA8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KX+XPjwAAACtJREFUGBljPHv27H8GNGBsbMyIJsTAhC6Aiz+ACjEcDXIjNg8OoBuJthoAzy0HeT3Qcc0AAAAASUVORK5CYII=';
|
|
8
9
|
export var imagePlacerWrapperStyles = function imagePlacerWrapperStyles(props) {
|
|
9
10
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n display: inline-block;\n"])), props.backgroundColor);
|
|
10
11
|
};
|
|
11
|
-
export var imagePlacerErrorWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n color:
|
|
12
|
+
export var imagePlacerErrorWrapperStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n color: ", ";\n width: 100%;\n height: 100%;\n text-align: center;\n padding-top: 45%;\n"])), token('color.background.danger.bold', R500), token('color.text.inverse', 'white'));
|
|
12
13
|
export var containerWrapperStyles = function containerWrapperStyles(_ref) {
|
|
13
14
|
var width = _ref.width,
|
|
14
15
|
height = _ref.height,
|
|
@@ -28,11 +29,11 @@ export var marginWrapperSquareStyles = function marginWrapperSquareStyles(_ref3)
|
|
|
28
29
|
var width = _ref3.width,
|
|
29
30
|
height = _ref3.height,
|
|
30
31
|
size = _ref3.size;
|
|
31
|
-
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n
|
|
32
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n top: 0;\n border-style: solid;\n border-color: ", ";\n border-width: ", "px;\n width: ", "px;\n height: ", "px;\n opacity: ", ";\n"])), token('elevation.surface.overlay', 'rgba(255, 255, 255)'), size, width, height, token('opacity.disabled', '0.3'));
|
|
32
33
|
};
|
|
33
34
|
export var marginWrapperCircleStyles = function marginWrapperCircleStyles(_ref4) {
|
|
34
35
|
var width = _ref4.width,
|
|
35
36
|
height = _ref4.height,
|
|
36
37
|
size = _ref4.size;
|
|
37
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n overflow: hidden;\n left: 0px;\n top: 0px;\n width: ", "px;\n height: ", "px;\n\n &:after {\n content: '';\n position: absolute;\n left: ", "px;\n top: ", "px;\n border-radius: 100%;\n width: ", "px;\n height: ", "px;\n box-shadow: 0px 0px 0px ", "px\n
|
|
38
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: absolute;\n overflow: hidden;\n left: 0px;\n top: 0px;\n width: ", "px;\n height: ", "px;\n\n &:after {\n content: '';\n position: absolute;\n left: ", "px;\n top: ", "px;\n border-radius: 100%;\n width: ", "px;\n height: ", "px;\n box-shadow: 0px 0px 0px ", "px\n ", ";\n opacity: ", ";\n }\n"])), width + size * 2, height + size * 2, size, size, width, height, Math.max(width, height), token('elevation.surface.overlay', 'rgba(255, 255, 255)'), token('opacity.disabled', '0.3'));
|
|
38
39
|
};
|
|
@@ -35,6 +35,7 @@ var ShowMoreButton = /*#__PURE__*/function (_PureComponent) {
|
|
|
35
35
|
_createClass(ShowMoreButton, [{
|
|
36
36
|
key: "render",
|
|
37
37
|
value: function render() {
|
|
38
|
+
// TODO: refactor this button to not use custom - component reverts to square shape when hovered
|
|
38
39
|
return jsx(Button, {
|
|
39
40
|
className: "show-more-button",
|
|
40
41
|
iconAfter: jsx(EditorMoreIcon, {
|
|
@@ -2,12 +2,13 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
4
|
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
6
7
|
import { B200 } from '@atlaskit/theme/colors';
|
|
7
8
|
import { css } from '@emotion/react';
|
|
8
9
|
|
|
9
10
|
var avatarImageStyles = function avatarImageStyles(props) {
|
|
10
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n cursor: pointer;\n ", ";\n"])), borderRadius(), props.isSelected ? " box-shadow: 0px 0px 0px 1px white, 0px 0px 0px 3px ".concat(B200, "; ") : '');
|
|
11
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n cursor: pointer;\n ", ";\n"])), borderRadius(), props.isSelected ? " box-shadow: 0px 0px 0px 1px ".concat(token('color.border.inverse', 'white'), ", 0px 0px 0px 3px ").concat(token('color.border.selected', B200), "; ") : '');
|
|
11
12
|
};
|
|
12
13
|
|
|
13
14
|
export var largeAvatarImageStyles = function largeAvatarImageStyles(props) {
|
package/dist/esm/version.json
CHANGED
|
@@ -107,10 +107,8 @@ export default class StatefulAvatarPickerDialog extends React.Component<
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
render() {
|
|
110
|
-
const {
|
|
111
|
-
|
|
112
|
-
imagePreviewSourceViaFileAPI,
|
|
113
|
-
} = this.state;
|
|
110
|
+
const { imagePreviewSourceViaDataURIAPI, imagePreviewSourceViaFileAPI } =
|
|
111
|
+
this.state;
|
|
114
112
|
|
|
115
113
|
return (
|
|
116
114
|
<div css={layoutStyles}>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
+
import { token } from '@atlaskit/tokens';
|
|
2
3
|
import { checkeredBg } from '../src/image-placer/styles';
|
|
3
4
|
export const labelStyles = css`
|
|
4
5
|
display: block;
|
|
@@ -14,24 +15,14 @@ export const labelStyles = css`
|
|
|
14
15
|
}
|
|
15
16
|
`;
|
|
16
17
|
export const exportedImageStyles = css`
|
|
17
|
-
border: 1px solid #ccc;
|
|
18
|
+
border: 1px solid ${token('color.border', '#ccc')};
|
|
18
19
|
`;
|
|
20
|
+
|
|
19
21
|
export const exportedImageWrapperStyles = css`
|
|
20
22
|
display: inline-block;
|
|
21
23
|
background: url('${checkeredBg}');
|
|
22
24
|
margin-top: 20px;
|
|
23
25
|
position: relative;
|
|
24
|
-
|
|
25
|
-
p {
|
|
26
|
-
position: absolute;
|
|
27
|
-
top: -18px;
|
|
28
|
-
left: 0px;
|
|
29
|
-
margin-top: 0;
|
|
30
|
-
width: 100%;
|
|
31
|
-
text-align: center;
|
|
32
|
-
font-size: 12px;
|
|
33
|
-
color: blue;
|
|
34
|
-
}
|
|
35
26
|
`;
|
|
36
27
|
|
|
37
28
|
export const layoutStyles = css`
|
|
@@ -18,9 +18,8 @@ interface Pos {
|
|
|
18
18
|
|
|
19
19
|
export class ViewportDebugger {
|
|
20
20
|
private viewport: Viewport;
|
|
21
|
-
private navigationCanvas: HTMLCanvasElement =
|
|
22
|
-
'canvas'
|
|
23
|
-
);
|
|
21
|
+
private navigationCanvas: HTMLCanvasElement =
|
|
22
|
+
document.createElement('canvas');
|
|
24
23
|
private previewCanvas: HTMLCanvasElement = document.createElement('canvas');
|
|
25
24
|
private previousItemBounds: Bounds = new Bounds(0, 0, 0, 0);
|
|
26
25
|
public imageElement?: HTMLImageElement;
|
|
@@ -36,12 +35,8 @@ export class ViewportDebugger {
|
|
|
36
35
|
}
|
|
37
36
|
|
|
38
37
|
initCanvas() {
|
|
39
|
-
const {
|
|
40
|
-
|
|
41
|
-
navigationCanvasPos,
|
|
42
|
-
previewCanvasPos,
|
|
43
|
-
viewport,
|
|
44
|
-
} = this;
|
|
38
|
+
const { previewCanvas, navigationCanvasPos, previewCanvasPos, viewport } =
|
|
39
|
+
this;
|
|
45
40
|
const { innerBounds } = viewport;
|
|
46
41
|
previewCanvas.width = innerBounds.width;
|
|
47
42
|
previewCanvas.height = innerBounds.height;
|