@atlaskit/media-ui 23.1.1 → 23.2.0

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/media-ui
2
2
 
3
+ ## 23.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`f486dbd535c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f486dbd535c) - MEX-2481 Fix minor gap between image and border
8
+
3
9
  ## 23.1.1
4
10
 
5
11
  ### Patch Changes
@@ -51,7 +51,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
51
51
  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; } } /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */ // Keep media player components used in media-viewer to use static colors from the new color palette to
52
52
  // support the hybrid theming in media viewer https://product-fabric.atlassian.net/browse/DSP-6067
53
53
  var packageName = "@atlaskit/media-ui";
54
- var packageVersion = "23.1.1";
54
+ var packageVersion = "23.2.0";
55
55
  var MEDIUM_VIDEO_MAX_WIDTH = 400;
56
56
  var SMALL_VIDEO_MAX_WIDTH = 160;
57
57
  var MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
@@ -14,20 +14,20 @@ var CustomVideoWrapper = _styled.default.div(_templateObject || (_templateObject
14
14
  exports.CustomVideoWrapper = CustomVideoWrapper;
15
15
  var VideoWrapper = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n"])));
16
16
 
17
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
17
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
18
18
  exports.VideoWrapper = VideoWrapper;
19
19
  var TimebarWrapper = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: white;\n position: absolute;\n width: 100%;\n bottom: 10px;\n"])));
20
20
  exports.TimebarWrapper = TimebarWrapper;
21
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
21
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
22
22
  var VolumeWrapper = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 35px;\n overflow: hidden;\n transition: width 0.3s;\n align-items: center;\n bottom: 0px;\n left: 43px;\n\n ", "\n"])), function (props) {
23
23
  return props.showSlider ? "\n &:hover,\n &:active {\n width: 150px;\n transition: width 0.3s ease-out;\n }\n " : '';
24
24
  });
25
25
 
26
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
26
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
27
27
  exports.VolumeWrapper = VolumeWrapper;
28
28
  var TimeWrapper = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0 ", " 10px ", ";\n margin-bottom: 44px;\n"])), "var(--ds-space-250, 20px)", "var(--ds-space-250, 20px)");
29
29
 
30
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
30
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
31
31
  exports.TimeWrapper = TimeWrapper;
32
32
  var CurrentTime = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: #c7d1db;\n user-select: none;\n margin-right: 10px;\n white-space: nowrap;\n"])));
33
33
  exports.CurrentTime = CurrentTime;
@@ -39,17 +39,17 @@ var Thumb = _styled.default.div(_templateObject9 || (_templateObject9 = (0, _tag
39
39
  exports.Thumb = Thumb;
40
40
  var BufferedTime = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n background-color: #8696a7;\n height: inherit;\n border-radius: inherit;\n width: 0;\n"])));
41
41
 
42
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
42
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
43
43
  exports.BufferedTime = BufferedTime;
44
44
  var LeftControls = _styled.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 10px;\n"])));
45
45
 
46
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
46
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
47
47
  exports.LeftControls = LeftControls;
48
48
  var RightControls = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n margin-right: 10px;\n color: '#c7d1db';\n"])));
49
49
  exports.RightControls = RightControls;
50
50
  var ControlsWrapper = _styled.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n bottom: 0;\n left: 0;\n width: 100%;\n height: auto;\n background: linear-gradient(to top, #101214, rgba(14, 22, 36, 0));\n position: absolute;\n"])));
51
51
 
52
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
52
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
53
53
  exports.ControlsWrapper = ControlsWrapper;
54
54
  var VolumeToggleWrapper = _styled.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n margin-right: 13px;\n\n button {\n width: 36px !important;\n color: ", ";\n }\n"])), function (_ref) {
55
55
  var isMuted = _ref.isMuted;
@@ -58,13 +58,13 @@ var VolumeToggleWrapper = _styled.default.div(_templateObject14 || (_templateObj
58
58
  exports.VolumeToggleWrapper = VolumeToggleWrapper;
59
59
  var VolumeTimeRangeWrapper = _styled.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n margin-right: ", ";\n"])), "var(--ds-space-250, 20px)");
60
60
 
61
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
61
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
62
62
  exports.VolumeTimeRangeWrapper = VolumeTimeRangeWrapper;
63
63
  var MutedIndicator = _styled.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n width: 29px;\n height: 2px;\n position: absolute;\n top: 10px;\n left: 9px;\n z-index: 2;\n background: ", ";\n transform: rotate(32deg) translateY(10px);\n opacity: 0;\n pointer-events: none;\n\n ", ";\n"])), _colors.R300, function (props) {
64
64
  return props.isMuted ? "\n opacity: 1;\n " : '';
65
65
  });
66
66
  exports.MutedIndicator = MutedIndicator;
67
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
67
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
68
68
  var CurrentTimeTooltip = _styled.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n user-select: none;\n top: -28px;\n background-color: #182c4c;\n color: #eff1f3;\n font-size: 12px;\n padding: 3px 7px;\n border-radius: 3px;\n left: 50%;\n transform: translateX(-50%);\n opacity: ", ";\n transition: opacity 0.3s;\n word-break: keep-all;\n"])), function (props) {
69
69
  return props.isDragging ? '1' : '0';
70
70
  });
@@ -29,6 +29,7 @@ var _default = {
29
29
  'fabric.media.annotate.tool.text': 'Text',
30
30
  'fabric.media.archive': 'archive',
31
31
  'fabric.media.audio': 'audio',
32
+ 'fabric.media.avatar_picker_back_btn_label': 'Go Back',
32
33
  'fabric.media.cancel': 'Cancel',
33
34
  'fabric.media.cant_preview_file_type': "We can't preview this file type.",
34
35
  'fabric.media.cant_retrieve_files': 'Ouch! We could not retrieve any files',
@@ -29,6 +29,7 @@ var _default = {
29
29
  'fabric.media.annotate.tool.text': 'Text',
30
30
  'fabric.media.archive': 'archive',
31
31
  'fabric.media.audio': 'audio',
32
+ 'fabric.media.avatar_picker_back_btn_label': 'Go Back',
32
33
  'fabric.media.cancel': 'Cancel',
33
34
  'fabric.media.cant_preview_file_type': "We can't preview this file type.",
34
35
  'fabric.media.cant_retrieve_files': 'Ouch! We could not retrieve any files',
@@ -29,6 +29,7 @@ var _default = {
29
29
  'fabric.media.annotate.tool.text': '⁣⁢Text⁡⁡⁠⁠⁡؜‌‌‍⁡⁠‌‍⁣⁤',
30
30
  'fabric.media.archive': '⁣⁢archive‌⁡‌‍‍‌؜⁡⁠⁣⁤',
31
31
  'fabric.media.audio': '⁣⁢audio‍⁡⁡؜⁡⁣⁤',
32
+ 'fabric.media.avatar_picker_back_btn_label': '⁣⁢Go Back؜⁡‌‌⁡⁡⁠‌‌⁣⁤',
32
33
  'fabric.media.cancel': '⁣⁢Cancel‌‍؜⁠‍؜‌‌⁠⁡⁣⁤',
33
34
  'fabric.media.cant_preview_file_type': "⁣⁢We can't preview this file type.⁠‍‌⁡⁡‍؜‍⁠؜⁣⁤",
34
35
  'fabric.media.cant_retrieve_files': '⁣⁢Ouch! We could not retrieve any files⁠‍؜؜‌؜⁡‌⁡؜⁠⁣⁤',
@@ -270,6 +270,16 @@ var MediaImage = /*#__PURE__*/function (_Component) {
270
270
  }
271
271
  }
272
272
 
273
+ /*
274
+ For images with borders, there may be an intermittent gap between the image and the border due to weird browser behaviour.
275
+ Part of the solution is to expand the image equally in all directions (width & height) by 1px, and the below calculation is to ensure just that.
276
+ Read more: https://product-fabric.atlassian.net/browse/MEX-2481
277
+ */
278
+
279
+ if (this.props.expandByPixel !== undefined) {
280
+ percentSize = "calc(".concat(percentSize, " + ").concat(this.props.expandByPixel, "px)");
281
+ }
282
+
273
283
  /*
274
284
  When isStretchingAllowed is false image is as big as it is, but as small as container
275
285
  (according to strategy - cover or fit).
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "23.1.1",
3
+ "version": "23.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -34,7 +34,7 @@ import Tooltip from '@atlaskit/tooltip';
34
34
  import { SkipTenBackwardIcon, SkipTenForwardIcon } from './icons';
35
35
  import { getControlsWrapperClassName } from './getControlsWrapperClassName';
36
36
  const packageName = "@atlaskit/media-ui";
37
- const packageVersion = "23.1.1";
37
+ const packageVersion = "23.2.0";
38
38
  const MEDIUM_VIDEO_MAX_WIDTH = 400;
39
39
  const SMALL_VIDEO_MAX_WIDTH = 160;
40
40
  const MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
@@ -13,7 +13,7 @@ export const VideoWrapper = styled.div`
13
13
  flex-direction: column;
14
14
  `;
15
15
 
16
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
16
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
17
17
  export const TimebarWrapper = styled.div`
18
18
  display: flex;
19
19
  align-items: center;
@@ -23,7 +23,7 @@ export const TimebarWrapper = styled.div`
23
23
  width: 100%;
24
24
  bottom: 10px;
25
25
  `;
26
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
26
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
27
27
  export const VolumeWrapper = styled.div`
28
28
  display: flex;
29
29
  width: 35px;
@@ -42,13 +42,13 @@ export const VolumeWrapper = styled.div`
42
42
  ` : ''}
43
43
  `;
44
44
 
45
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
45
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
46
46
  export const TimeWrapper = styled.div`
47
47
  margin: 0 ${"var(--ds-space-250, 20px)"} 10px ${"var(--ds-space-250, 20px)"};
48
48
  margin-bottom: 44px;
49
49
  `;
50
50
 
51
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
51
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
52
52
  export const CurrentTime = styled.div`
53
53
  color: #c7d1db;
54
54
  user-select: none;
@@ -98,13 +98,13 @@ export const BufferedTime = styled.div`
98
98
  width: 0;
99
99
  `;
100
100
 
101
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
101
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
102
102
  export const LeftControls = styled.div`
103
103
  display: flex;
104
104
  margin-left: 10px;
105
105
  `;
106
106
 
107
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
107
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
108
108
  export const RightControls = styled.div`
109
109
  display: flex;
110
110
  align-items: center;
@@ -120,7 +120,7 @@ export const ControlsWrapper = styled.div`
120
120
  position: absolute;
121
121
  `;
122
122
 
123
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
123
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
124
124
  export const VolumeToggleWrapper = styled.div`
125
125
  position: relative;
126
126
  margin-right: 13px;
@@ -137,7 +137,7 @@ export const VolumeTimeRangeWrapper = styled.div`
137
137
  margin-right: ${"var(--ds-space-250, 20px)"};
138
138
  `;
139
139
 
140
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
140
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
141
141
  export const MutedIndicator = styled.div`
142
142
  width: 29px;
143
143
  height: 2px;
@@ -154,7 +154,7 @@ export const MutedIndicator = styled.div`
154
154
  opacity: 1;
155
155
  ` : ''};
156
156
  `;
157
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
157
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
158
158
  export const CurrentTimeTooltip = styled.div`
159
159
  position: absolute;
160
160
  user-select: none;
@@ -23,6 +23,7 @@ export default {
23
23
  'fabric.media.annotate.tool.text': 'Text',
24
24
  'fabric.media.archive': 'archive',
25
25
  'fabric.media.audio': 'audio',
26
+ 'fabric.media.avatar_picker_back_btn_label': 'Go Back',
26
27
  'fabric.media.cancel': 'Cancel',
27
28
  'fabric.media.cant_preview_file_type': "We can't preview this file type.",
28
29
  'fabric.media.cant_retrieve_files': 'Ouch! We could not retrieve any files',
@@ -23,6 +23,7 @@ export default {
23
23
  'fabric.media.annotate.tool.text': 'Text',
24
24
  'fabric.media.archive': 'archive',
25
25
  'fabric.media.audio': 'audio',
26
+ 'fabric.media.avatar_picker_back_btn_label': 'Go Back',
26
27
  'fabric.media.cancel': 'Cancel',
27
28
  'fabric.media.cant_preview_file_type': "We can't preview this file type.",
28
29
  'fabric.media.cant_retrieve_files': 'Ouch! We could not retrieve any files',
@@ -23,6 +23,7 @@ export default {
23
23
  'fabric.media.annotate.tool.text': '⁣⁢Text⁡⁡⁠⁠⁡؜‌‌‍⁡⁠‌‍⁣⁤',
24
24
  'fabric.media.archive': '⁣⁢archive‌⁡‌‍‍‌؜⁡⁠⁣⁤',
25
25
  'fabric.media.audio': '⁣⁢audio‍⁡⁡؜⁡⁣⁤',
26
+ 'fabric.media.avatar_picker_back_btn_label': '⁣⁢Go Back؜⁡‌‌⁡⁡⁠‌‌⁣⁤',
26
27
  'fabric.media.cancel': '⁣⁢Cancel‌‍؜⁠‍؜‌‌⁠⁡⁣⁤',
27
28
  'fabric.media.cant_preview_file_type': "⁣⁢We can't preview this file type.⁠‍‌⁡⁡‍؜‍⁠؜⁣⁤",
28
29
  'fabric.media.cant_retrieve_files': '⁣⁢Ouch! We could not retrieve any files⁠‍؜؜‌؜⁡‌⁡؜⁠⁣⁤',
@@ -248,6 +248,16 @@ export class MediaImage extends Component {
248
248
  }
249
249
  }
250
250
 
251
+ /*
252
+ For images with borders, there may be an intermittent gap between the image and the border due to weird browser behaviour.
253
+ Part of the solution is to expand the image equally in all directions (width & height) by 1px, and the below calculation is to ensure just that.
254
+ Read more: https://product-fabric.atlassian.net/browse/MEX-2481
255
+ */
256
+
257
+ if (this.props.expandByPixel !== undefined) {
258
+ percentSize = `calc(${percentSize} + ${this.props.expandByPixel}px)`;
259
+ }
260
+
251
261
  /*
252
262
  When isStretchingAllowed is false image is as big as it is, but as small as container
253
263
  (according to strategy - cover or fit).
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "23.1.1",
3
+ "version": "23.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -44,7 +44,7 @@ import Tooltip from '@atlaskit/tooltip';
44
44
  import { SkipTenBackwardIcon, SkipTenForwardIcon } from './icons';
45
45
  import { getControlsWrapperClassName } from './getControlsWrapperClassName';
46
46
  var packageName = "@atlaskit/media-ui";
47
- var packageVersion = "23.1.1";
47
+ var packageVersion = "23.2.0";
48
48
  var MEDIUM_VIDEO_MAX_WIDTH = 400;
49
49
  var SMALL_VIDEO_MAX_WIDTH = 160;
50
50
  var MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
@@ -6,42 +6,42 @@ import { R300 } from '@atlaskit/theme/colors';
6
6
  export var CustomVideoWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n user-select: none;\n"])));
7
7
  export var VideoWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n"])));
8
8
 
9
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
9
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
10
10
  export var TimebarWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: white;\n position: absolute;\n width: 100%;\n bottom: 10px;\n"])));
11
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
11
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
12
12
  export var VolumeWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n width: 35px;\n overflow: hidden;\n transition: width 0.3s;\n align-items: center;\n bottom: 0px;\n left: 43px;\n\n ", "\n"])), function (props) {
13
13
  return props.showSlider ? "\n &:hover,\n &:active {\n width: 150px;\n transition: width 0.3s ease-out;\n }\n " : '';
14
14
  });
15
15
 
16
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
16
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
17
17
  export var TimeWrapper = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 0 ", " 10px ", ";\n margin-bottom: 44px;\n"])), "var(--ds-space-250, 20px)", "var(--ds-space-250, 20px)");
18
18
 
19
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
19
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
20
20
  export var CurrentTime = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: #c7d1db;\n user-select: none;\n margin-right: 10px;\n white-space: nowrap;\n"])));
21
21
  export var TimeLine = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 100%;\n height: 2px;\n transition-delay: 1s;\n transition: all 0.1s;\n background-color: #596773;\n border-radius: 5px;\n position: relative;\n"])));
22
22
  export var CurrentTimeLine = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background-color: #05c;\n border-radius: inherit;\n height: inherit;\n position: absolute;\n top: 0;\n max-width: 100%;\n"])));
23
23
  export var Thumb = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n pointer-events: none;\n width: 14px;\n height: 14px;\n border-radius: 100%;\n background-color: white;\n border: 1px solid #666;\n position: absolute;\n right: 0;\n top: 50%;\n\n transform: translate(7px, -50%) scale(0);\n transition: all 0.1s;\n transition-delay: 1s;\n\n &:hover .current-time-tooltip {\n opacity: 1;\n }\n"])));
24
24
  export var BufferedTime = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: #8696a7;\n height: inherit;\n border-radius: inherit;\n width: 0;\n"])));
25
25
 
26
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
26
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
27
27
  export var LeftControls = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n margin-left: 10px;\n"])));
28
28
 
29
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
29
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
30
30
  export var RightControls = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-right: 10px;\n color: '#c7d1db';\n"])));
31
31
  export var ControlsWrapper = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n bottom: 0;\n left: 0;\n width: 100%;\n height: auto;\n background: linear-gradient(to top, #101214, rgba(14, 22, 36, 0));\n position: absolute;\n"])));
32
32
 
33
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
33
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
34
34
  export var VolumeToggleWrapper = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: relative;\n margin-right: 13px;\n\n button {\n width: 36px !important;\n color: ", ";\n }\n"])), function (_ref) {
35
35
  var isMuted = _ref.isMuted;
36
36
  return isMuted ? "#EF5C48 !important;" : '';
37
37
  });
38
38
  export var VolumeTimeRangeWrapper = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n width: 100%;\n margin-right: ", ";\n"])), "var(--ds-space-250, 20px)");
39
39
 
40
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
40
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
41
41
  export var MutedIndicator = styled.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: 29px;\n height: 2px;\n position: absolute;\n top: 10px;\n left: 9px;\n z-index: 2;\n background: ", ";\n transform: rotate(32deg) translateY(10px);\n opacity: 0;\n pointer-events: none;\n\n ", ";\n"])), R300, function (props) {
42
42
  return props.isMuted ? "\n opacity: 1;\n " : '';
43
43
  });
44
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
44
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
45
45
  export var CurrentTimeTooltip = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n position: absolute;\n user-select: none;\n top: -28px;\n background-color: #182c4c;\n color: #eff1f3;\n font-size: 12px;\n padding: 3px 7px;\n border-radius: 3px;\n left: 50%;\n transform: translateX(-50%);\n opacity: ", ";\n transition: opacity 0.3s;\n word-break: keep-all;\n"])), function (props) {
46
46
  return props.isDragging ? '1' : '0';
47
47
  });
@@ -23,6 +23,7 @@ export default {
23
23
  'fabric.media.annotate.tool.text': 'Text',
24
24
  'fabric.media.archive': 'archive',
25
25
  'fabric.media.audio': 'audio',
26
+ 'fabric.media.avatar_picker_back_btn_label': 'Go Back',
26
27
  'fabric.media.cancel': 'Cancel',
27
28
  'fabric.media.cant_preview_file_type': "We can't preview this file type.",
28
29
  'fabric.media.cant_retrieve_files': 'Ouch! We could not retrieve any files',
@@ -23,6 +23,7 @@ export default {
23
23
  'fabric.media.annotate.tool.text': 'Text',
24
24
  'fabric.media.archive': 'archive',
25
25
  'fabric.media.audio': 'audio',
26
+ 'fabric.media.avatar_picker_back_btn_label': 'Go Back',
26
27
  'fabric.media.cancel': 'Cancel',
27
28
  'fabric.media.cant_preview_file_type': "We can't preview this file type.",
28
29
  'fabric.media.cant_retrieve_files': 'Ouch! We could not retrieve any files',
@@ -23,6 +23,7 @@ export default {
23
23
  'fabric.media.annotate.tool.text': '⁣⁢Text⁡⁡⁠⁠⁡؜‌‌‍⁡⁠‌‍⁣⁤',
24
24
  'fabric.media.archive': '⁣⁢archive‌⁡‌‍‍‌؜⁡⁠⁣⁤',
25
25
  'fabric.media.audio': '⁣⁢audio‍⁡⁡؜⁡⁣⁤',
26
+ 'fabric.media.avatar_picker_back_btn_label': '⁣⁢Go Back؜⁡‌‌⁡⁡⁠‌‌⁣⁤',
26
27
  'fabric.media.cancel': '⁣⁢Cancel‌‍؜⁠‍؜‌‌⁠⁡⁣⁤',
27
28
  'fabric.media.cant_preview_file_type': "⁣⁢We can't preview this file type.⁠‍‌⁡⁡‍؜‍⁠؜⁣⁤",
28
29
  'fabric.media.cant_retrieve_files': '⁣⁢Ouch! We could not retrieve any files⁠‍؜؜‌؜⁡‌⁡؜⁠⁣⁤',
@@ -261,6 +261,16 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
261
261
  }
262
262
  }
263
263
 
264
+ /*
265
+ For images with borders, there may be an intermittent gap between the image and the border due to weird browser behaviour.
266
+ Part of the solution is to expand the image equally in all directions (width & height) by 1px, and the below calculation is to ensure just that.
267
+ Read more: https://product-fabric.atlassian.net/browse/MEX-2481
268
+ */
269
+
270
+ if (this.props.expandByPixel !== undefined) {
271
+ percentSize = "calc(".concat(percentSize, " + ").concat(this.props.expandByPixel, "px)");
272
+ }
273
+
264
274
  /*
265
275
  When isStretchingAllowed is false image is as big as it is, but as small as container
266
276
  (according to strategy - cover or fit).
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "23.1.1",
3
+ "version": "23.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -21,6 +21,7 @@ declare const _default: {
21
21
  'fabric.media.annotate.tool.text': string;
22
22
  'fabric.media.archive': string;
23
23
  'fabric.media.audio': string;
24
+ 'fabric.media.avatar_picker_back_btn_label': string;
24
25
  'fabric.media.cancel': string;
25
26
  'fabric.media.cant_preview_file_type': string;
26
27
  'fabric.media.cant_retrieve_files': string;
@@ -21,6 +21,7 @@ declare const _default: {
21
21
  'fabric.media.annotate.tool.text': string;
22
22
  'fabric.media.archive': string;
23
23
  'fabric.media.audio': string;
24
+ 'fabric.media.avatar_picker_back_btn_label': string;
24
25
  'fabric.media.cancel': string;
25
26
  'fabric.media.cant_preview_file_type': string;
26
27
  'fabric.media.cant_retrieve_files': string;
@@ -21,6 +21,7 @@ declare const _default: {
21
21
  'fabric.media.annotate.tool.text': string;
22
22
  'fabric.media.archive': string;
23
23
  'fabric.media.audio': string;
24
+ 'fabric.media.avatar_picker_back_btn_label': string;
24
25
  'fabric.media.cancel': string;
25
26
  'fabric.media.cant_preview_file_type': string;
26
27
  'fabric.media.cant_retrieve_files': string;
@@ -11,6 +11,7 @@ export interface MediaImageProps {
11
11
  onImageError?: () => void;
12
12
  loading?: 'auto' | 'lazy' | 'eager';
13
13
  forceSyncDisplay?: boolean;
14
+ expandByPixel?: number;
14
15
  }
15
16
  export interface MediaImageState {
16
17
  isImageLoaded: boolean;
@@ -21,6 +21,7 @@ declare const _default: {
21
21
  'fabric.media.annotate.tool.text': string;
22
22
  'fabric.media.archive': string;
23
23
  'fabric.media.audio': string;
24
+ 'fabric.media.avatar_picker_back_btn_label': string;
24
25
  'fabric.media.cancel': string;
25
26
  'fabric.media.cant_preview_file_type': string;
26
27
  'fabric.media.cant_retrieve_files': string;
@@ -21,6 +21,7 @@ declare const _default: {
21
21
  'fabric.media.annotate.tool.text': string;
22
22
  'fabric.media.archive': string;
23
23
  'fabric.media.audio': string;
24
+ 'fabric.media.avatar_picker_back_btn_label': string;
24
25
  'fabric.media.cancel': string;
25
26
  'fabric.media.cant_preview_file_type': string;
26
27
  'fabric.media.cant_retrieve_files': string;
@@ -21,6 +21,7 @@ declare const _default: {
21
21
  'fabric.media.annotate.tool.text': string;
22
22
  'fabric.media.archive': string;
23
23
  'fabric.media.audio': string;
24
+ 'fabric.media.avatar_picker_back_btn_label': string;
24
25
  'fabric.media.cancel': string;
25
26
  'fabric.media.cant_preview_file_type': string;
26
27
  'fabric.media.cant_retrieve_files': string;
@@ -11,6 +11,7 @@ export interface MediaImageProps {
11
11
  onImageError?: () => void;
12
12
  loading?: 'auto' | 'lazy' | 'eager';
13
13
  forceSyncDisplay?: boolean;
14
+ expandByPixel?: number;
14
15
  }
15
16
  export interface MediaImageState {
16
17
  isImageLoaded: boolean;
@@ -16,7 +16,7 @@ export const PreviewInfo = styled.pre`
16
16
  font-size: 80%;
17
17
  `;
18
18
 
19
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
19
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
20
20
  export const PreviewItem = styled.li`
21
21
  border-radius: 10px;
22
22
  border: 1px solid ${token('color.border', '#ccc')};
@@ -27,7 +27,7 @@ export const PreviewItem = styled.li`
27
27
  margin-bottom: 10px;
28
28
  `;
29
29
 
30
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
30
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
31
31
  export const Code = styled.code`
32
32
  padding: 5px;
33
33
  border-radius: 5px;
@@ -36,7 +36,7 @@ export const Code = styled.code`
36
36
  font-size: 80%;
37
37
  `;
38
38
 
39
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
39
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
40
40
  export const CloseButton = styled.button`
41
41
  position: absolute;
42
42
  top: 5px;
@@ -44,7 +44,7 @@ export const CloseButton = styled.button`
44
44
  cursor: pointer;
45
45
  `;
46
46
 
47
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
47
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
48
48
  export const PreviewImageContainer = styled.div`
49
49
  margin-top: 10px;
50
50
  margin-bottom: 10px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "23.1.1",
3
+ "version": "23.2.0",
4
4
  "description": "Includes common components and utilities used by other media packages",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,32 +12,8 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
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
15
  "sideEffects": false,
24
16
  "atlaskit:src": "src/index.ts",
25
- "af:exports": {
26
- "./classNames": "./src/classNames.ts",
27
- "./media-type-icon": "./src/media-type-icon.tsx",
28
- "./mime-type-icon": "./src/mime-type-icon.tsx",
29
- "./truncateText": "./src/truncateText.tsx",
30
- "./messages": "./src/messages.ts",
31
- "./modalSpinner": "./src/modalSpinner.tsx",
32
- "./browser": "./src/browser.tsx",
33
- "./codeViewer": "./src/codeViewer.ts",
34
- "./util": "./src/util.ts",
35
- "./errorIcon": "./src/errorIcon.tsx",
36
- "./types": "./src/types.ts",
37
- "./formatDate": "./src/formatDate.ts",
38
- "./locales": "./src/locales.ts",
39
- ".": "./src/index.ts"
40
- },
41
17
  "atlassian": {
42
18
  "team": "Media Experience",
43
19
  "inPublicMirror": true,
@@ -53,11 +29,11 @@
53
29
  "@atlaskit/icon": "^21.12.0",
54
30
  "@atlaskit/icon-file-type": "^6.4.0",
55
31
  "@atlaskit/locale": "^2.5.0",
56
- "@atlaskit/media-common": "^7.0.0",
32
+ "@atlaskit/media-common": "^7.1.0",
57
33
  "@atlaskit/select": "^16.5.0",
58
34
  "@atlaskit/spinner": "^15.5.0",
59
35
  "@atlaskit/theme": "^12.5.0",
60
- "@atlaskit/tokens": "^1.9.0",
36
+ "@atlaskit/tokens": "^1.11.0",
61
37
  "@atlaskit/tooltip": "^17.8.0",
62
38
  "@atlaskit/width-detector": "^4.1.0",
63
39
  "@babel/runtime": "^7.0.0",
@@ -75,12 +51,10 @@
75
51
  "react-intl-next": "npm:react-intl@^5.18.1"
76
52
  },
77
53
  "devDependencies": {
54
+ "@af/visual-regression": "*",
78
55
  "@atlaskit/analytics-listeners": "^8.7.0",
79
56
  "@atlaskit/button": "^16.8.0",
80
- "@atlaskit/docs": "*",
81
- "@atlaskit/lozenge": "^11.4.0",
82
57
  "@atlaskit/media-test-helpers": "^33.0.0",
83
- "@atlaskit/page": "^12.3.0",
84
58
  "@atlaskit/ssr": "*",
85
59
  "@atlaskit/visual-regression": "*",
86
60
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
@@ -111,5 +85,29 @@
111
85
  ]
112
86
  }
113
87
  },
88
+ "typesVersions": {
89
+ ">=4.5 <4.9": {
90
+ "*": [
91
+ "dist/types-ts4.5/*",
92
+ "dist/types-ts4.5/index.d.ts"
93
+ ]
94
+ }
95
+ },
96
+ "af:exports": {
97
+ "./classNames": "./src/classNames.ts",
98
+ "./media-type-icon": "./src/media-type-icon.tsx",
99
+ "./mime-type-icon": "./src/mime-type-icon.tsx",
100
+ "./truncateText": "./src/truncateText.tsx",
101
+ "./messages": "./src/messages.ts",
102
+ "./modalSpinner": "./src/modalSpinner.tsx",
103
+ "./browser": "./src/browser.tsx",
104
+ "./codeViewer": "./src/codeViewer.ts",
105
+ "./util": "./src/util.ts",
106
+ "./errorIcon": "./src/errorIcon.tsx",
107
+ "./types": "./src/types.ts",
108
+ "./formatDate": "./src/formatDate.ts",
109
+ "./locales": "./src/locales.ts",
110
+ ".": "./src/index.ts"
111
+ },
114
112
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
115
113
  }
package/report.api.md CHANGED
@@ -439,6 +439,8 @@ export interface MediaImageProps {
439
439
  // (undocumented)
440
440
  dataURI: string;
441
441
  // (undocumented)
442
+ expandByPixel?: number;
443
+ // (undocumented)
442
444
  forceSyncDisplay?: boolean;
443
445
  // (undocumented)
444
446
  loading?: 'auto' | 'eager' | 'lazy';
@@ -377,6 +377,8 @@ export interface MediaImageProps {
377
377
  // (undocumented)
378
378
  dataURI: string;
379
379
  // (undocumented)
380
+ expandByPixel?: number;
381
+ // (undocumented)
380
382
  forceSyncDisplay?: boolean;
381
383
  // (undocumented)
382
384
  loading?: 'auto' | 'eager' | 'lazy';