@atlaskit/media-avatar-picker 24.6.5 → 24.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/compass.yml +3 -2
- package/dist/cjs/avatar-list/index.js +4 -1
- package/dist/cjs/avatar-list/styles.js +6 -0
- package/dist/cjs/avatar-picker-dialog/SubmitErrorDialog.js +17 -13
- package/dist/cjs/avatar-picker-dialog/index.js +9 -6
- package/dist/cjs/avatar-picker-dialog/styles.js +10 -0
- package/dist/cjs/image-cropper/index.js +14 -1
- package/dist/cjs/image-navigator/dragZone.js +2 -0
- package/dist/cjs/image-navigator/index.js +24 -18
- package/dist/cjs/image-navigator/slider.js +30 -27
- package/dist/cjs/image-navigator/styles.js +32 -2
- package/dist/cjs/image-placer/containerWrapper.js +4 -0
- package/dist/cjs/image-placer/imagePlacerErrorWrapper.js +7 -3
- package/dist/cjs/image-placer/imageWrapper.js +12 -8
- package/dist/cjs/image-placer/index.js +29 -26
- package/dist/cjs/image-placer/margin.js +3 -1
- package/dist/cjs/image-placer/styles.js +20 -0
- package/dist/cjs/predefined-avatar-list/index.js +24 -20
- package/dist/cjs/predefined-avatar-list/styles.js +2 -2
- package/dist/cjs/predefined-avatar-view/index.js +27 -23
- package/dist/cjs/predefined-avatar-view/styles.js +13 -0
- package/dist/cjs/styles.js +9 -0
- package/dist/es2019/avatar-list/index.js +4 -1
- package/dist/es2019/avatar-list/styles.js +6 -0
- package/dist/es2019/avatar-picker-dialog/SubmitErrorDialog.js +17 -13
- package/dist/es2019/avatar-picker-dialog/index.js +9 -5
- package/dist/es2019/avatar-picker-dialog/styles.js +10 -0
- package/dist/es2019/image-cropper/index.js +14 -0
- package/dist/es2019/image-navigator/dragZone.js +2 -0
- package/dist/es2019/image-navigator/index.js +24 -17
- package/dist/es2019/image-navigator/slider.js +26 -22
- package/dist/es2019/image-navigator/styles.js +32 -2
- package/dist/es2019/image-placer/containerWrapper.js +4 -0
- package/dist/es2019/image-placer/imagePlacerErrorWrapper.js +4 -1
- package/dist/es2019/image-placer/imageWrapper.js +4 -1
- package/dist/es2019/image-placer/index.js +29 -25
- package/dist/es2019/image-placer/margin.js +3 -0
- package/dist/es2019/image-placer/styles.js +19 -0
- package/dist/es2019/predefined-avatar-list/index.js +24 -20
- package/dist/es2019/predefined-avatar-list/styles.js +2 -1
- package/dist/es2019/predefined-avatar-view/index.js +27 -23
- package/dist/es2019/predefined-avatar-view/styles.js +13 -0
- package/dist/es2019/styles.js +9 -0
- package/dist/esm/avatar-list/index.js +4 -1
- package/dist/esm/avatar-list/styles.js +6 -0
- package/dist/esm/avatar-picker-dialog/SubmitErrorDialog.js +17 -13
- package/dist/esm/avatar-picker-dialog/index.js +9 -5
- package/dist/esm/avatar-picker-dialog/styles.js +10 -0
- package/dist/esm/image-cropper/index.js +14 -0
- package/dist/esm/image-navigator/dragZone.js +2 -0
- package/dist/esm/image-navigator/index.js +24 -17
- package/dist/esm/image-navigator/slider.js +30 -26
- package/dist/esm/image-navigator/styles.js +32 -2
- package/dist/esm/image-placer/containerWrapper.js +4 -0
- package/dist/esm/image-placer/imagePlacerErrorWrapper.js +7 -3
- package/dist/esm/image-placer/imageWrapper.js +12 -8
- package/dist/esm/image-placer/index.js +29 -25
- package/dist/esm/image-placer/margin.js +3 -0
- package/dist/esm/image-placer/styles.js +19 -0
- package/dist/esm/predefined-avatar-list/index.js +24 -20
- package/dist/esm/predefined-avatar-list/styles.js +2 -1
- package/dist/esm/predefined-avatar-view/index.js +27 -23
- package/dist/esm/predefined-avatar-view/styles.js +13 -0
- package/dist/esm/styles.js +9 -0
- package/example-helpers/StatefulAvatarPickerDialog.tsx +2 -0
- package/example-helpers/styles.ts +9 -0
- package/package.json +77 -77
|
@@ -7,6 +7,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
7
7
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
9
|
/**@jsx jsx */
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
11
|
import { jsx } from '@emotion/react';
|
|
11
12
|
import React from 'react';
|
|
12
13
|
import { marginWrapperSquareStyles, marginWrapperCircleStyles } from './styles';
|
|
@@ -29,6 +30,8 @@ export var Margin = /*#__PURE__*/function (_React$Component) {
|
|
|
29
30
|
_ref2 = _slicedToArray(_ref, 2),
|
|
30
31
|
id = _ref2[0],
|
|
31
32
|
styles = _ref2[1];
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
32
35
|
return jsx("div", {
|
|
33
36
|
css: styles({
|
|
34
37
|
width: width,
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { R500 } from '@atlaskit/theme/colors';
|
|
3
4
|
export var checkeredBg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAA6hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxOC0xMC0zMFQxMjoxMDo5MjwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjcuNTwveG1wOkNyZWF0b3JUb29sPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpDb21wcmVzc2lvbj4wPC90aWZmOkNvbXByZXNzaW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMDwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MTA8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KX+XPjwAAACtJREFUGBljPHv27H8GNGBsbMyIJsTAhC6Aiz+ACjEcDXIjNg8OoBuJthoAzy0HeT3Qcc0AAAAASUVORK5CYII=';
|
|
4
5
|
export var imagePlacerWrapperStyles = function imagePlacerWrapperStyles(props) {
|
|
5
6
|
return css({
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
6
8
|
backgroundColor: props.backgroundColor,
|
|
7
9
|
display: 'inline-block'
|
|
8
10
|
});
|
|
9
11
|
};
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
10
14
|
export var imagePlacerErrorWrapperStyles = css({
|
|
11
15
|
backgroundColor: "var(--ds-background-danger-bold, ".concat(R500, ")"),
|
|
12
16
|
color: "var(--ds-text-inverse, white)",
|
|
@@ -24,10 +28,15 @@ export var imageWrapperStyles = function imageWrapperStyles(_ref) {
|
|
|
24
28
|
height = _ref.height,
|
|
25
29
|
transform = _ref.transform;
|
|
26
30
|
return css({
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
27
32
|
left: "".concat(x, "px"),
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
28
34
|
top: "".concat(y, "px"),
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
29
36
|
width: "".concat(width, "px"),
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
30
38
|
height: "".concat(height, "px"),
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
31
40
|
transform: transform,
|
|
32
41
|
position: 'absolute',
|
|
33
42
|
transition: "margin-left ".concat(EASING, "s ease-out, margin-top ").concat(EASING, "s ease-out, left ").concat(EASING, "s ease-out, top ").concat(EASING, "s ease-out, width ").concat(EASING, "s ease-out, height ").concat(EASING, "s ease-out"),
|
|
@@ -45,8 +54,11 @@ export var marginWrapperSquareStyles = function marginWrapperSquareStyles(_ref2)
|
|
|
45
54
|
top: 0,
|
|
46
55
|
borderStyle: 'solid',
|
|
47
56
|
borderColor: "var(--ds-surface-overlay, rgba(255, 255, 255))",
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
48
58
|
borderWidth: "".concat(size, "px"),
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
49
60
|
width: "".concat(width, "px"),
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
50
62
|
height: "".concat(height, "px"),
|
|
51
63
|
opacity: "var(--ds-opacity-disabled, 0.3)"
|
|
52
64
|
});
|
|
@@ -60,15 +72,22 @@ export var marginWrapperCircleStyles = function marginWrapperCircleStyles(_ref3)
|
|
|
60
72
|
overflow: 'hidden',
|
|
61
73
|
left: '0px',
|
|
62
74
|
top: '0px',
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
63
76
|
width: "".concat(width + size * 2, "px"),
|
|
77
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
64
78
|
height: "".concat(height + size * 2, "px"),
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
65
80
|
'&:after': {
|
|
66
81
|
content: "''",
|
|
67
82
|
position: 'absolute',
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
68
84
|
left: "".concat(size, "px"),
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
69
86
|
top: "".concat(size, "px"),
|
|
70
87
|
borderRadius: '100%',
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
71
89
|
width: "".concat(width, "px"),
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
72
91
|
height: "".concat(height, "px"),
|
|
73
92
|
boxShadow: "0px 0px 0px ".concat(Math.max(width, height), "px ", "var(--ds-surface-overlay, rgba(255, 255, 255))"),
|
|
74
93
|
opacity: "var(--ds-opacity-disabled, 0.3)"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { AvatarList } from '../avatar-list';
|
|
4
5
|
import EditorMoreIcon from '@atlaskit/icon/glyph/editor/more';
|
|
@@ -15,24 +16,27 @@ export var PredefinedAvatarList = function PredefinedAvatarList(_ref) {
|
|
|
15
16
|
selectAvatarLabel = _ref.selectAvatarLabel,
|
|
16
17
|
showMoreAvatarsButtonLabel = _ref.showMoreAvatarsButtonLabel;
|
|
17
18
|
var intl = useIntl();
|
|
18
|
-
return
|
|
19
|
-
css
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
19
|
+
return (
|
|
20
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
21
|
+
jsx("div", {
|
|
22
|
+
css: predefinedAvatarsWrapperStyles,
|
|
23
|
+
id: "predefined-avatar-wrapper"
|
|
24
|
+
}, jsx(AvatarList, {
|
|
25
|
+
avatars: avatars,
|
|
26
|
+
selectedAvatar: selectedAvatar,
|
|
27
|
+
onItemClick: onAvatarSelected,
|
|
28
|
+
selectAvatarLabel: selectAvatarLabel
|
|
29
|
+
}), jsx(Button, {
|
|
30
|
+
"aria-label": showMoreAvatarsButtonLabel || intl.formatMessage(messages.show_more_avatars_btn_label)
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
32
|
+
,
|
|
33
|
+
className: "show-more-button",
|
|
34
|
+
appearance: "subtle",
|
|
35
|
+
iconAfter: jsx(EditorMoreIcon, {
|
|
36
|
+
label: "",
|
|
37
|
+
size: "large"
|
|
38
|
+
}),
|
|
39
|
+
onClick: onShowMore
|
|
40
|
+
}))
|
|
41
|
+
);
|
|
38
42
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { css } from '@emotion/react';
|
|
4
5
|
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow } from '../styles';
|
|
5
6
|
|
|
6
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression --
|
|
7
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
7
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%)");
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
3
|
import { jsx } from '@emotion/react';
|
|
3
4
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
5
|
import { messages } from '@atlaskit/media-ui';
|
|
@@ -38,27 +39,30 @@ export var PredefinedAvatarView = function PredefinedAvatarView(_ref) {
|
|
|
38
39
|
alt: ""
|
|
39
40
|
}));
|
|
40
41
|
});
|
|
41
|
-
return
|
|
42
|
-
css
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
42
|
+
return (
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
44
|
+
jsx("div", {
|
|
45
|
+
css: predefinedAvatarViewWrapperStyles,
|
|
46
|
+
id: "predefined-avatar-view-wrapper"
|
|
47
|
+
}, jsx("div", {
|
|
48
|
+
className: "header"
|
|
49
|
+
}, jsx(Button, {
|
|
50
|
+
"aria-label": intl.formatMessage(messages.avatar_picker_back_btn_label)
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
52
|
+
,
|
|
53
|
+
className: "back-button",
|
|
54
|
+
iconAfter: jsx(ArrowLeftIcon, {
|
|
55
|
+
label: ""
|
|
56
|
+
}),
|
|
57
|
+
onClick: onGoBack
|
|
58
|
+
}), jsx("h2", {
|
|
59
|
+
className: "description"
|
|
60
|
+
}, predefinedAvatarsText || jsx(FormattedMessage, messages.default_avatars))), jsx("div", {
|
|
61
|
+
role: "radiogroup",
|
|
62
|
+
"aria-label": selectAvatarLabel || intl.formatMessage(messages.select_an_avatar)
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
64
|
+
,
|
|
65
|
+
className: "body"
|
|
66
|
+
}, cards))
|
|
67
|
+
);
|
|
64
68
|
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { visuallyHiddenRadioStyles, selectedShadow, focusedShadow, avatarImageStyles } from '../styles';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
3
6
|
export var largeAvatarImageStyles = css(avatarImageStyles, {
|
|
4
7
|
width: '72px',
|
|
5
8
|
height: '72px'
|
|
6
9
|
});
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
7
12
|
export var predefinedAvatarViewWrapperStyles = css({
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
8
14
|
'.body': {
|
|
9
15
|
display: 'flex',
|
|
10
16
|
flexFlow: 'row wrap',
|
|
@@ -14,26 +20,33 @@ export var predefinedAvatarViewWrapperStyles = css({
|
|
|
14
20
|
padding: "var(--ds-space-100, 8px)".concat(" 0 0"),
|
|
15
21
|
margin: 0
|
|
16
22
|
},
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
17
24
|
input: visuallyHiddenRadioStyles,
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
26
|
'input:checked + img': selectedShadow,
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
19
28
|
'input:focus + img': focusedShadow,
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
30
|
label: {
|
|
21
31
|
paddingRight: "var(--ds-space-050, 4px)",
|
|
22
32
|
paddingLeft: "var(--ds-space-050, 4px)",
|
|
23
33
|
paddingBottom: "var(--ds-space-100, 8px)",
|
|
24
34
|
display: 'inline-flex'
|
|
25
35
|
},
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
26
37
|
'.header': {
|
|
27
38
|
display: 'flex',
|
|
28
39
|
alignItems: 'center',
|
|
29
40
|
paddingTop: "var(--ds-space-050, 4px)",
|
|
30
41
|
paddingBottom: "var(--ds-space-100, 8px)",
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
31
43
|
'.description': {
|
|
32
44
|
paddingLeft: "var(--ds-space-100, 8px)",
|
|
33
45
|
margin: 0,
|
|
34
46
|
fontSize: '14px',
|
|
35
47
|
fontWeight: 400
|
|
36
48
|
},
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
37
50
|
'.back-button': {
|
|
38
51
|
width: '32px',
|
|
39
52
|
height: '32px',
|
package/dist/esm/styles.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { B200, B100 } from '@atlaskit/theme/colors';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
3
6
|
export var avatarImageStyles = css({
|
|
4
7
|
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
5
8
|
cursor: 'pointer'
|
|
6
9
|
});
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
7
12
|
export var visuallyHiddenRadioStyles = css({
|
|
8
13
|
width: '1px',
|
|
9
14
|
height: '1px',
|
|
@@ -14,9 +19,13 @@ export var visuallyHiddenRadioStyles = css({
|
|
|
14
19
|
overflow: 'hidden',
|
|
15
20
|
whiteSpace: 'nowrap'
|
|
16
21
|
});
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
17
24
|
export var selectedShadow = css({
|
|
18
25
|
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-selected, ".concat(B200, ")"))
|
|
19
26
|
});
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
20
29
|
export var focusedShadow = css({
|
|
21
30
|
boxShadow: "0px 0px 0px 1px ".concat("var(--ds-border-inverse, white)", ", 0px 0px 0px 3px ", "var(--ds-border-focused, ".concat(B100, ")"))
|
|
22
31
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**@jsx jsx */
|
|
2
2
|
/* eslint-disable no-console */
|
|
3
3
|
import React, { type ReactNode } from 'react';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
4
5
|
import { jsx } from '@emotion/react';
|
|
5
6
|
import Button from '@atlaskit/button/standard-button';
|
|
6
7
|
import { ModalTransition } from '@atlaskit/modal-dialog';
|
|
@@ -162,6 +163,7 @@ export default class StatefulAvatarPickerDialog extends React.Component<
|
|
|
162
163
|
const { requireAltText } = this.props;
|
|
163
164
|
|
|
164
165
|
return (
|
|
166
|
+
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
165
167
|
<div css={layoutStyles}>
|
|
166
168
|
<Button appearance="primary" onClick={this.openPicker}>
|
|
167
169
|
Open sesame!
|
|
@@ -1,29 +1,37 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { token } from '@atlaskit/tokens';
|
|
3
4
|
import { checkeredBg } from '../src/image-placer/styles';
|
|
4
5
|
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
5
7
|
export const labelStyles = css({
|
|
6
8
|
display: 'block',
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
7
10
|
'> input': {
|
|
8
11
|
marginLeft: token('space.100', '8px'),
|
|
9
12
|
},
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
10
14
|
'> span': {
|
|
11
15
|
display: 'inline-block',
|
|
12
16
|
minWidth: '120px',
|
|
13
17
|
textAlign: 'right',
|
|
14
18
|
},
|
|
15
19
|
});
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
16
21
|
export const exportedImageStyles = css({
|
|
17
22
|
border: `1px solid ${token('color.border', '#ccc')}`,
|
|
18
23
|
});
|
|
19
24
|
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
20
26
|
export const exportedImageWrapperStyles = css({
|
|
21
27
|
display: 'inline-block',
|
|
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
|
|
22
29
|
background: `url('${checkeredBg}')`,
|
|
23
30
|
marginTop: token('space.250', '20px'),
|
|
24
31
|
position: 'relative',
|
|
25
32
|
});
|
|
26
33
|
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
27
35
|
export const layoutStyles = css({
|
|
28
36
|
display: 'flex',
|
|
29
37
|
flexDirection: 'column',
|
|
@@ -32,6 +40,7 @@ export const layoutStyles = css({
|
|
|
32
40
|
height: '80vh',
|
|
33
41
|
});
|
|
34
42
|
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
35
44
|
export const wrapperStyles = css({
|
|
36
45
|
margin: token('space.100', '8px'),
|
|
37
46
|
});
|
package/package.json
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
2
|
+
"name": "@atlaskit/media-avatar-picker",
|
|
3
|
+
"version": "24.6.6",
|
|
4
|
+
"description": "A component to select, drag and resize image avatars. It also provides a default list of predefined avatars.",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
|
+
},
|
|
8
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
9
|
+
"author": "Atlassian Pty Ltd",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
13
|
+
"module:es2019": "dist/es2019/index.js",
|
|
14
|
+
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.5 <4.9": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.5/*",
|
|
19
|
+
"dist/types-ts4.5/index.d.ts"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"atlaskit:src": "src/index.tsx",
|
|
25
|
+
"af:exports": {
|
|
26
|
+
".": "./src/index.tsx"
|
|
27
|
+
},
|
|
28
|
+
"atlassian": {
|
|
29
|
+
"team": "Media Experience",
|
|
30
|
+
"inPublicMirror": true,
|
|
31
|
+
"releaseModel": "continuous",
|
|
32
|
+
"website": {
|
|
33
|
+
"name": "Media Avatar Picker"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@atlaskit/button": "^17.22.0",
|
|
38
|
+
"@atlaskit/flag": "^15.6.0",
|
|
39
|
+
"@atlaskit/form": "^10.4.0",
|
|
40
|
+
"@atlaskit/icon": "^22.4.0",
|
|
41
|
+
"@atlaskit/media-ui": "^25.10.0",
|
|
42
|
+
"@atlaskit/modal-dialog": "^12.14.0",
|
|
43
|
+
"@atlaskit/primitives": "^8.0.0",
|
|
44
|
+
"@atlaskit/range": "^7.3.0",
|
|
45
|
+
"@atlaskit/spinner": "^16.2.0",
|
|
46
|
+
"@atlaskit/textfield": "^6.4.0",
|
|
47
|
+
"@atlaskit/theme": "^12.10.0",
|
|
48
|
+
"@atlaskit/tokens": "^1.51.0",
|
|
49
|
+
"@atlaskit/visually-hidden": "^1.4.0",
|
|
50
|
+
"@babel/runtime": "^7.0.0",
|
|
51
|
+
"exenv": "^1.2.2"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@emotion/react": "^11.7.1",
|
|
55
|
+
"react": "^16.8.0",
|
|
56
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@atlaskit/media-core": "^34.2.0",
|
|
60
|
+
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
61
|
+
"@atlaskit/visual-regression": "*",
|
|
62
|
+
"@types/enzyme": "3.1.15",
|
|
63
|
+
"@types/exenv": "^1.2.0",
|
|
64
|
+
"enzyme": "^3.10.0",
|
|
65
|
+
"react": "^16.8.0",
|
|
66
|
+
"react-dom": "^16.8.0",
|
|
67
|
+
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
68
|
+
"typescript": "~5.4.2"
|
|
69
|
+
},
|
|
70
|
+
"techstack": {
|
|
71
|
+
"@repo/internal": {
|
|
72
|
+
"design-tokens": [
|
|
73
|
+
"color",
|
|
74
|
+
"spacing"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|