@atlaskit/media-avatar-picker 24.6.5 → 24.6.7

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.
Files changed (70) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/compass.yml +3 -2
  3. package/dist/cjs/avatar-list/index.js +4 -1
  4. package/dist/cjs/avatar-list/styles.js +6 -0
  5. package/dist/cjs/avatar-picker-dialog/SubmitErrorDialog.js +17 -13
  6. package/dist/cjs/avatar-picker-dialog/index.js +9 -6
  7. package/dist/cjs/avatar-picker-dialog/styles.js +10 -0
  8. package/dist/cjs/image-cropper/index.js +36 -36
  9. package/dist/cjs/image-navigator/dragZone.js +2 -0
  10. package/dist/cjs/image-navigator/index.js +24 -18
  11. package/dist/cjs/image-navigator/slider.js +30 -27
  12. package/dist/cjs/image-navigator/styles.js +32 -2
  13. package/dist/cjs/image-placer/containerWrapper.js +4 -0
  14. package/dist/cjs/image-placer/imagePlacerErrorWrapper.js +7 -3
  15. package/dist/cjs/image-placer/imageWrapper.js +12 -8
  16. package/dist/cjs/image-placer/index.js +29 -26
  17. package/dist/cjs/image-placer/margin.js +3 -1
  18. package/dist/cjs/image-placer/styles.js +20 -0
  19. package/dist/cjs/predefined-avatar-list/index.js +24 -20
  20. package/dist/cjs/predefined-avatar-list/styles.js +2 -2
  21. package/dist/cjs/predefined-avatar-view/index.js +27 -23
  22. package/dist/cjs/predefined-avatar-view/styles.js +13 -0
  23. package/dist/cjs/styles.js +9 -0
  24. package/dist/es2019/avatar-list/index.js +4 -1
  25. package/dist/es2019/avatar-list/styles.js +6 -0
  26. package/dist/es2019/avatar-picker-dialog/SubmitErrorDialog.js +17 -13
  27. package/dist/es2019/avatar-picker-dialog/index.js +9 -5
  28. package/dist/es2019/avatar-picker-dialog/styles.js +10 -0
  29. package/dist/es2019/image-cropper/index.js +31 -35
  30. package/dist/es2019/image-navigator/dragZone.js +2 -0
  31. package/dist/es2019/image-navigator/index.js +24 -17
  32. package/dist/es2019/image-navigator/slider.js +26 -22
  33. package/dist/es2019/image-navigator/styles.js +32 -2
  34. package/dist/es2019/image-placer/containerWrapper.js +4 -0
  35. package/dist/es2019/image-placer/imagePlacerErrorWrapper.js +4 -1
  36. package/dist/es2019/image-placer/imageWrapper.js +4 -1
  37. package/dist/es2019/image-placer/index.js +29 -25
  38. package/dist/es2019/image-placer/margin.js +3 -0
  39. package/dist/es2019/image-placer/styles.js +19 -0
  40. package/dist/es2019/predefined-avatar-list/index.js +24 -20
  41. package/dist/es2019/predefined-avatar-list/styles.js +2 -1
  42. package/dist/es2019/predefined-avatar-view/index.js +27 -23
  43. package/dist/es2019/predefined-avatar-view/styles.js +13 -0
  44. package/dist/es2019/styles.js +9 -0
  45. package/dist/esm/avatar-list/index.js +4 -1
  46. package/dist/esm/avatar-list/styles.js +6 -0
  47. package/dist/esm/avatar-picker-dialog/SubmitErrorDialog.js +17 -13
  48. package/dist/esm/avatar-picker-dialog/index.js +9 -5
  49. package/dist/esm/avatar-picker-dialog/styles.js +10 -0
  50. package/dist/esm/image-cropper/index.js +33 -35
  51. package/dist/esm/image-navigator/dragZone.js +2 -0
  52. package/dist/esm/image-navigator/index.js +24 -17
  53. package/dist/esm/image-navigator/slider.js +30 -26
  54. package/dist/esm/image-navigator/styles.js +32 -2
  55. package/dist/esm/image-placer/containerWrapper.js +4 -0
  56. package/dist/esm/image-placer/imagePlacerErrorWrapper.js +7 -3
  57. package/dist/esm/image-placer/imageWrapper.js +12 -8
  58. package/dist/esm/image-placer/index.js +29 -25
  59. package/dist/esm/image-placer/margin.js +3 -0
  60. package/dist/esm/image-placer/styles.js +19 -0
  61. package/dist/esm/predefined-avatar-list/index.js +24 -20
  62. package/dist/esm/predefined-avatar-list/styles.js +2 -1
  63. package/dist/esm/predefined-avatar-view/index.js +27 -23
  64. package/dist/esm/predefined-avatar-view/styles.js +13 -0
  65. package/dist/esm/styles.js +9 -0
  66. package/dist/types/image-cropper/index.d.ts +1 -3
  67. package/dist/types-ts4.5/image-cropper/index.d.ts +1 -3
  68. package/example-helpers/StatefulAvatarPickerDialog.tsx +2 -0
  69. package/example-helpers/styles.ts +9 -0
  70. package/package.json +77 -77
@@ -1,6 +1,5 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
1
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- /** @jsx jsx */
3
- import { jsx } from '@emotion/react';
4
3
  import React from 'react';
5
4
  import { Component } from 'react';
6
5
  import CrossIcon from '@atlaskit/icon/glyph/cross';
@@ -8,28 +7,10 @@ import { injectIntl } from 'react-intl-next';
8
7
  import { messages, MediaImage } from '@atlaskit/media-ui';
9
8
  import { isImageRemote } from './isImageRemote';
10
9
  import { CONTAINER_PADDING } from './styles';
11
- import { N50A } from '@atlaskit/theme/colors';
12
- import { css } from '@emotion/react';
10
+ import { IconButton } from '@atlaskit/button/new';
13
11
  import { Box, xcss } from '@atlaskit/primitives';
14
12
  import { ERROR } from '../avatar-picker-dialog';
15
13
  import { CONTAINER_INNER_SIZE } from '../avatar-picker-dialog/layout-const';
16
- const removeImageButtonStyles = css({
17
- borderRadius: "var(--ds-border-radius-050, 3px)",
18
- backgroundColor: 'transparent',
19
- width: '24px',
20
- height: '24px',
21
- border: 'none',
22
- cursor: 'pointer',
23
- padding: 0,
24
- svg: {
25
- position: 'absolute',
26
- top: "var(--ds-space-050, 4px)",
27
- left: "var(--ds-space-050, 4px)"
28
- },
29
- '&:hover': {
30
- backgroundColor: `var(--ds-background-neutral-hovered, ${N50A})`
31
- }
32
- });
33
14
  const removeImageContainerStyles = xcss({
34
15
  position: 'absolute',
35
16
  right: 'space.050',
@@ -46,9 +27,13 @@ const maskShadow = {
46
27
  };
47
28
  const maskStyles = xcss({
48
29
  position: 'absolute',
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
49
31
  top: `${CONTAINER_PADDING}px`,
32
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
50
33
  bottom: `${CONTAINER_PADDING}px`,
34
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
51
35
  left: `${CONTAINER_PADDING}px`,
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
52
37
  right: `${CONTAINER_PADDING}px`,
53
38
  opacity: 'opacity.disabled'
54
39
  });
@@ -116,16 +101,23 @@ export class ImageCropper extends Component {
116
101
  }
117
102
  } = this.props;
118
103
  const containerDimensions = xcss({
104
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
119
105
  width: `${containerSize}px`,
106
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
120
107
  height: `${containerSize}px`
121
108
  });
122
109
  const width = imageWidth ? `${imageWidth}px` : 'auto';
123
110
  const height = imageHeight ? `${imageHeight}px` : 'auto';
124
111
  const imageContainerDynamicStyles = xcss({
112
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
125
113
  width,
114
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
126
115
  height,
116
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
127
117
  display: width === 'auto' ? 'none' : 'block',
118
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
128
119
  top: `${top}px`,
120
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
129
121
  left: `${left}px`
130
122
  });
131
123
  let crossOrigin;
@@ -134,13 +126,13 @@ export class ImageCropper extends Component {
134
126
  } catch (e) {
135
127
  return null;
136
128
  }
137
- return jsx(Box, {
129
+ return /*#__PURE__*/React.createElement(Box, {
138
130
  id: "container",
139
131
  xcss: [containerStyles, containerDimensions]
140
- }, jsx(Box, {
132
+ }, /*#__PURE__*/React.createElement(Box, {
141
133
  id: "image-container",
142
134
  xcss: [imageContainerStyles, imageContainerDynamicStyles]
143
- }, jsx(MediaImage, {
135
+ }, /*#__PURE__*/React.createElement(MediaImage, {
144
136
  crossOrigin: crossOrigin,
145
137
  dataURI: imageSource,
146
138
  crop: false,
@@ -149,30 +141,34 @@ export class ImageCropper extends Component {
149
141
  onImageLoad: onImageLoaded,
150
142
  onImageError: this.onImageError
151
143
  })), isCircularMask ?
144
+ /*#__PURE__*/
152
145
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
153
- jsx(Box, {
146
+ React.createElement(Box, {
154
147
  xcss: [maskStyles, circularMaskStyles],
155
148
  style: maskShadow
156
149
  }) :
150
+ /*#__PURE__*/
157
151
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
158
- jsx(Box, {
152
+ React.createElement(Box, {
159
153
  xcss: [maskStyles, rectMaskStyles],
160
154
  style: maskShadow
161
- }), jsx(Box, {
155
+ }), /*#__PURE__*/React.createElement(Box, {
162
156
  id: "drag-overlay",
163
157
  xcss: dragOverlayStyles,
164
158
  onMouseDown: this.onDragStarted
165
- }), jsx(Box, {
159
+ }), /*#__PURE__*/React.createElement(Box, {
166
160
  id: "remove-image-container",
167
161
  xcss: removeImageContainerStyles
168
- }, jsx("button", {
162
+ }, /*#__PURE__*/React.createElement(IconButton, {
169
163
  id: "remove-image-button",
170
- css: removeImageButtonStyles,
171
- onClick: onRemoveImage
172
- }, jsx(CrossIcon, {
173
- size: "small",
174
- label: formatMessage(messages.remove_image)
175
- }))));
164
+ icon: iconProps => /*#__PURE__*/React.createElement(CrossIcon, _extends({}, iconProps, {
165
+ size: "small"
166
+ })),
167
+ onClick: onRemoveImage,
168
+ label: formatMessage(messages.remove_image),
169
+ spacing: "compact",
170
+ appearance: "subtle"
171
+ })));
176
172
  }
177
173
  }
178
174
  _defineProperty(ImageCropper, "defaultProps", {
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /**@jsx jsx */
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import { jsx } from '@emotion/react';
4
5
  import { dragZoneStyles } from './styles';
5
6
  export const DragZone = ({
@@ -8,6 +9,7 @@ export const DragZone = ({
8
9
  children,
9
10
  ...props
10
11
  }) => jsx("div", _extends({
12
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
11
13
  css: dragZoneStyles({
12
14
  showBorder: showBorder,
13
15
  isDroppingFile: isDroppingFile
@@ -1,6 +1,7 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /** @jsx jsx */
3
3
  import React 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 { Component } from 'react';
6
7
  import { FormattedMessage, injectIntl } from 'react-intl-next';
@@ -280,23 +281,27 @@ export class ImageNavigator extends Component {
280
281
  errorMessage,
281
282
  isLoading
282
283
  } = this.props;
283
- return jsx("div", {
284
- id: "image-uploader",
285
- css: imageUploaderStyles
286
- }, this.renderDragZone(), isLoading ? null : jsx("div", null, jsx("p", {
287
- id: "padded-break",
288
- css: paddedBreakStyles
289
- }, jsx(FormattedMessage, errorMessage ? messages.try_again : messages.or)), jsx(Button, {
290
- onClick: this.onUploadButtonClick,
291
- isDisabled: isLoading,
292
- testId: "upload-button"
293
- }, jsx(FormattedMessage, messages.upload_photo), jsx("input", {
294
- css: fileInputStyles,
295
- type: "file",
296
- id: "image-input",
297
- onChange: this.onFileChange,
298
- accept: ACCEPT.join(',')
299
- }))));
284
+ return (
285
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
286
+ jsx("div", {
287
+ id: "image-uploader",
288
+ css: imageUploaderStyles
289
+ }, this.renderDragZone(), isLoading ? null : jsx("div", null, jsx("p", {
290
+ id: "padded-break",
291
+ css: paddedBreakStyles
292
+ }, jsx(FormattedMessage, errorMessage ? messages.try_again : messages.or)), jsx(Button, {
293
+ onClick: this.onUploadButtonClick,
294
+ isDisabled: isLoading,
295
+ testId: "upload-button"
296
+ }, jsx(FormattedMessage, messages.upload_photo), jsx("input", {
297
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
298
+ css: fileInputStyles,
299
+ type: "file",
300
+ id: "image-input",
301
+ onChange: this.onFileChange,
302
+ accept: ACCEPT.join(',')
303
+ }))))
304
+ );
300
305
  }
301
306
  renderImageCropper(dataURI) {
302
307
  const {
@@ -360,6 +365,8 @@ export class ImageNavigator extends Component {
360
365
  dataURI
361
366
  } = this;
362
367
  const content = dataURI && !isLoading ? this.renderImageCropper(dataURI) : this.renderImageUploader();
368
+
369
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
363
370
  return jsx("div", {
364
371
  css: containerStyles
365
372
  }, content);
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /** @jsx jsx */
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import { jsx } from '@emotion/react';
4
5
  import { Component } from 'react';
5
6
  import FieldRange from '@atlaskit/range';
@@ -16,28 +17,31 @@ export class Slider extends Component {
16
17
  value,
17
18
  onChange
18
19
  } = this.props;
19
- return jsx("div", {
20
- css: sliderWrapperStyles
21
- }, jsx(Button
22
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
23
- , {
24
- className: "zoom_button zoom_button_small",
25
- iconAfter: jsx(ScaleSmallIcon, {
26
- label: "scale-small-icon"
27
- }),
28
- onClick: () => onChange(0)
29
- }), jsx(FieldRange, {
30
- value: value,
31
- onChange: onChange
32
- }), jsx(Button
33
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
34
- , {
35
- className: "zoom_button zoom_button_large",
36
- iconAfter: jsx(ScaleLargeIcon, {
37
- label: "scale-large-icon"
38
- }),
39
- onClick: () => onChange(100)
40
- }));
20
+ return (
21
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
22
+ jsx("div", {
23
+ css: sliderWrapperStyles
24
+ }, jsx(Button
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
26
+ , {
27
+ className: "zoom_button zoom_button_small",
28
+ iconAfter: jsx(ScaleSmallIcon, {
29
+ label: "scale-small-icon"
30
+ }),
31
+ onClick: () => onChange(0)
32
+ }), jsx(FieldRange, {
33
+ value: value,
34
+ onChange: onChange
35
+ }), jsx(Button
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
37
+ , {
38
+ className: "zoom_button zoom_button_large",
39
+ iconAfter: jsx(ScaleLargeIcon, {
40
+ label: "scale-large-icon"
41
+ }),
42
+ onClick: () => onChange(100)
43
+ }))
44
+ );
41
45
  }
42
46
  }
43
47
  _defineProperty(Slider, "defaultProps", defaultProps);
@@ -1,38 +1,52 @@
1
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
1
2
  import { css, keyframes } from '@emotion/react';
2
3
  import { N200 } from '@atlaskit/theme/colors';
3
4
  import { checkeredBg } from './images';
4
5
  import { AVATAR_DIALOG_WIDTH } from '../avatar-picker-dialog/layout-const';
6
+
7
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
5
8
  export const imageBgStyles = css({
6
9
  position: 'absolute',
7
10
  top: 0,
8
11
  left: 0,
9
12
  width: '256px',
10
13
  height: '256px',
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
11
15
  background: `url('${checkeredBg}')`,
12
16
  borderRadius: "var(--ds-border-radius, 3px)"
13
17
  });
18
+
19
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
14
20
  export const containerStyles = css({
15
21
  boxSizing: 'border-box',
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
16
23
  '*, *::before, *::after': {
17
24
  boxSizing: 'border-box'
18
25
  },
19
26
  position: 'relative'
20
27
  });
28
+
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
21
30
  export const sliderContainerStyles = css({
22
31
  alignItems: 'center',
23
32
  justifyContent: 'center',
24
33
  display: 'flex',
25
34
  flexDirection: 'row',
26
35
  marginTop: "var(--ds-space-100, 8px)",
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
27
37
  input: {
28
38
  boxSizing: 'content-box',
29
39
  padding: 0
30
40
  },
31
41
  backgroundColor: "var(--ds-surface-overlay, #fff)"
32
42
  });
43
+
44
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
33
45
  export const fileInputStyles = css({
34
46
  display: 'none'
35
47
  });
48
+
49
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
36
50
  export const imageUploaderStyles = css({
37
51
  display: 'flex',
38
52
  flexDirection: 'column',
@@ -55,6 +69,7 @@ const droppingAnimation = css({
55
69
  const getBorder = showBorder => `${showBorder ? `2px dashed ${"var(--ds-border, #d0d6d0)"}` : 'none'}`;
56
70
  const getDroppingAnimation = isDroppingFile => isDroppingFile ? css({
57
71
  backgroundColor: "var(--ds-background-information-hovered, #ddecfe)",
72
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
58
73
  '&:after': droppingAnimation
59
74
  }) : '';
60
75
  export const dragZoneStyles = props => css({
@@ -70,6 +85,7 @@ export const dragZoneStyles = props => css({
70
85
  transition: 'background-color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1)',
71
86
  '&::after': {
72
87
  content: "''",
88
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
73
89
  border: getBorder(props.showBorder),
74
90
  borderRadius: '100%',
75
91
  position: 'absolute',
@@ -79,8 +95,12 @@ export const dragZoneStyles = props => css({
79
95
  height: '100%',
80
96
  transition: 'border-color 0.3s cubic-bezier(0.19, 1, 0.22, 1)'
81
97
  }
82
- }, getDroppingAnimation(props.isDroppingFile));
98
+ },
99
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
100
+ getDroppingAnimation(props.isDroppingFile));
83
101
  dragZoneStyles.displayName = 'DragZone';
102
+
103
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
84
104
  export const dragZoneImageStyles = css({
85
105
  width: '100px'
86
106
  });
@@ -88,7 +108,11 @@ const getWidth = isFullSize => `${isFullSize ? `width: calc(${AVATAR_DIALOG_WIDT
88
108
  export const dragZoneTextStyles = props => css({
89
109
  textAlign: 'center',
90
110
  color: `var(--ds-text-subtlest, ${N200})`
91
- }, getWidth(props.isFullSize));
111
+ },
112
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
113
+ getWidth(props.isFullSize));
114
+
115
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
92
116
  export const selectionBlockerStyles = css({
93
117
  position: 'fixed',
94
118
  left: 0,
@@ -98,15 +122,21 @@ export const selectionBlockerStyles = css({
98
122
  backgroundColor: 'transparent',
99
123
  userSelect: 'none'
100
124
  });
125
+
126
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
101
127
  export const paddedBreakStyles = css({
128
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
102
129
  marginTop: `${"var(--ds-space-100, 10px)"} !important`,
103
130
  marginBottom: "var(--ds-space-100, 10px)",
104
131
  textAlign: 'center'
105
132
  });
133
+
134
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
106
135
  export const sliderWrapperStyles = css({
107
136
  display: 'flex',
108
137
  alignItems: 'center',
109
138
  width: '100%',
139
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
110
140
  '.zoom_button svg': {
111
141
  position: 'relative',
112
142
  left: "var(--ds-space-negative-025, -2px)"
@@ -1,9 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /**@jsx jsx */
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import { jsx } from '@emotion/react';
4
5
  import { Box, xcss } from '@atlaskit/primitives';
5
6
  import { checkeredBg } from './styles';
6
7
  const containerWrapperStyles = xcss({
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
7
9
  background: `url('${checkeredBg}')`,
8
10
  position: `relative`,
9
11
  cursor: `move`,
@@ -18,7 +20,9 @@ export const ContainerWrapper = ({
18
20
  ...props
19
21
  }) => {
20
22
  const containerWrapperDimensions = xcss({
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
21
24
  width: `${width !== undefined ? width + margin * 2 : 0}px`,
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
26
  height: `${height !== undefined ? height + margin * 2 : 0}px`
23
27
  });
24
28
  return jsx(Box, _extends({
@@ -1,8 +1,11 @@
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 { imagePlacerErrorWrapperStyles } from './styles';
4
5
  export const ImagePlacerErrorWrapper = ({
5
6
  children
6
- }) => jsx("div", {
7
+ }) =>
8
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
9
+ jsx("div", {
7
10
  css: imagePlacerErrorWrapperStyles
8
11
  }, children);
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /**@jsx jsx */
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import { jsx } from '@emotion/react';
4
5
  import { imageWrapperStyles } from './styles';
5
6
  export const ImageWrapper = ({
@@ -8,7 +9,9 @@ export const ImageWrapper = ({
8
9
  width,
9
10
  height,
10
11
  ...props
11
- }) => jsx("img", _extends({
12
+ }) =>
13
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
14
+ jsx("img", _extends({
12
15
  css: imageWrapperStyles({
13
16
  x,
14
17
  y,
@@ -1,5 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /**@jsx jsx */
3
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
4
  import { jsx } from '@emotion/react';
4
5
  import React from 'react';
5
6
  import { Rectangle, Vector2, Bounds, dataURItoFile, getFileInfo, getFileInfoFromSrc } from '@atlaskit/media-ui';
@@ -468,31 +469,34 @@ export class ImagePlacer extends React.Component {
468
469
  imageBounds
469
470
  } = this;
470
471
  const imgSrc = typeof src === 'string' ? src : undefined;
471
- return jsx("div", {
472
- css: imagePlacerWrapperStyles({
473
- backgroundColor
474
- })
475
- }, jsx(ImagePlacerContainer, {
476
- width: containerWidth,
477
- height: containerHeight,
478
- margin: margin,
479
- onDragStart: this.onDragStart,
480
- onDragMove: this.onDragMove,
481
- onWheel: this.onWheel
482
- }, errorMessage ? jsx(ImagePlacerErrorWrapper, null, onRenderError ? onRenderError(errorMessage) : errorMessage) : jsx("div", null, jsx(ImagePlacerImage, {
483
- src: imgSrc,
484
- x: imageBounds.x,
485
- y: imageBounds.y,
486
- width: imageBounds.width,
487
- height: imageBounds.height,
488
- onLoad: this.onImageLoad,
489
- onError: this.onImageError
490
- }), jsx(Margin, {
491
- width: containerWidth,
492
- height: containerHeight,
493
- circular: isCircular,
494
- size: margin
495
- }))));
472
+ return (
473
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
474
+ jsx("div", {
475
+ css: imagePlacerWrapperStyles({
476
+ backgroundColor
477
+ })
478
+ }, jsx(ImagePlacerContainer, {
479
+ width: containerWidth,
480
+ height: containerHeight,
481
+ margin: margin,
482
+ onDragStart: this.onDragStart,
483
+ onDragMove: this.onDragMove,
484
+ onWheel: this.onWheel
485
+ }, errorMessage ? jsx(ImagePlacerErrorWrapper, null, onRenderError ? onRenderError(errorMessage) : errorMessage) : jsx("div", null, jsx(ImagePlacerImage, {
486
+ src: imgSrc,
487
+ x: imageBounds.x,
488
+ y: imageBounds.y,
489
+ width: imageBounds.width,
490
+ height: imageBounds.height,
491
+ onLoad: this.onImageLoad,
492
+ onError: this.onImageError
493
+ }), jsx(Margin, {
494
+ width: containerWidth,
495
+ height: containerHeight,
496
+ circular: isCircular,
497
+ size: margin
498
+ }))))
499
+ );
496
500
  }
497
501
  }
498
502
  /* image element used to load */
@@ -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 React from 'react';
4
5
  import { marginWrapperSquareStyles, marginWrapperCircleStyles } from './styles';
@@ -11,6 +12,8 @@ export class Margin extends React.Component {
11
12
  circular
12
13
  } = this.props;
13
14
  const [id, styles] = circular ? ['marginWrapperCircle', marginWrapperCircleStyles] : ['marginWrapperSquare', marginWrapperSquareStyles];
15
+
16
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
14
17
  return jsx("div", {
15
18
  css: styles({
16
19
  width,
@@ -1,10 +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 { 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=';
4
5
  export const imagePlacerWrapperStyles = props => css({
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
5
7
  backgroundColor: props.backgroundColor,
6
8
  display: 'inline-block'
7
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
8
12
  export const imagePlacerErrorWrapperStyles = css({
9
13
  backgroundColor: `var(--ds-background-danger-bold, ${R500})`,
10
14
  color: "var(--ds-text-inverse, white)",
@@ -22,10 +26,15 @@ export const imageWrapperStyles = ({
22
26
  height,
23
27
  transform
24
28
  }) => css({
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
30
  left: `${x}px`,
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
26
32
  top: `${y}px`,
33
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
27
34
  width: `${width}px`,
35
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
28
36
  height: `${height}px`,
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
29
38
  transform: transform,
30
39
  position: 'absolute',
31
40
  transition: `margin-left ${EASING}s ease-out, margin-top ${EASING}s ease-out, left ${EASING}s ease-out, top ${EASING}s ease-out, width ${EASING}s ease-out, height ${EASING}s ease-out`,
@@ -42,8 +51,11 @@ export const marginWrapperSquareStyles = ({
42
51
  top: 0,
43
52
  borderStyle: 'solid',
44
53
  borderColor: "var(--ds-surface-overlay, rgba(255, 255, 255))",
54
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
45
55
  borderWidth: `${size}px`,
56
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
46
57
  width: `${width}px`,
58
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
47
59
  height: `${height}px`,
48
60
  opacity: "var(--ds-opacity-disabled, 0.3)"
49
61
  });
@@ -56,15 +68,22 @@ export const marginWrapperCircleStyles = ({
56
68
  overflow: 'hidden',
57
69
  left: '0px',
58
70
  top: '0px',
71
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
59
72
  width: `${width + size * 2}px`,
73
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
60
74
  height: `${height + size * 2}px`,
75
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
61
76
  '&:after': {
62
77
  content: "''",
63
78
  position: 'absolute',
79
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
64
80
  left: `${size}px`,
81
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
65
82
  top: `${size}px`,
66
83
  borderRadius: '100%',
84
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
67
85
  width: `${width}px`,
86
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
68
87
  height: `${height}px`,
69
88
  boxShadow: `0px 0px 0px ${Math.max(width, height)}px ${"var(--ds-surface-overlay, rgba(255, 255, 255))"}`,
70
89
  opacity: "var(--ds-opacity-disabled, 0.3)"