@atlaskit/media-ui 24.0.2 → 25.0.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,17 @@
1
1
  # @atlaskit/media-ui
2
2
 
3
+ ## 25.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`e6122bf1c9a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e6122bf1c9a) - MEX-2481 revert and re-introduce a new fix for media border gap issue
8
+
9
+ ## 24.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
14
+
3
15
  ## 24.0.2
4
16
 
5
17
  ### Patch Changes
@@ -2089,7 +2101,7 @@ Bumped dependencies.
2089
2101
 
2090
2102
  ## 7.3.0
2091
2103
 
2092
- - [minor][023cb45" d](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/023cb45"
2104
+ - [minor][023cb45](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/023cb45"
2093
2105
  d):
2094
2106
 
2095
2107
  - Add i18n support to MediaViewer
@@ -2102,7 +2114,7 @@ Bumped dependencies.
2102
2114
 
2103
2115
  ## 7.2.0
2104
2116
 
2105
- - [minor][439dde6" d](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/439dde6"
2117
+ - [minor][439dde6](https://bitbucket.org/atlassian/atlaskit-mk-2/commits/439dde6"
2106
2118
  d):
2107
2119
 
2108
2120
  - rotate local image preview in cards based on the file orientation
@@ -33,7 +33,7 @@ var isSelected = function isSelected(_ref) {
33
33
  // NB: `padding` consistent with @mentions.
34
34
  // NB: `display: inline` required for `box-decoration-break` to work.
35
35
  // NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
36
- var Wrapper = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n line-height: 16px;\n padding: 2px 4px 2px 4px;\n box-decoration-break: clone;\n display: inline;\n border-radius: ", "px;\n color: ", ";\n background-color: ", ";\n ", ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), (0, _constants.borderRadius)(), (0, _components.themed)({
36
+ var Wrapper = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n line-height: 16px;\n padding: ", " ", "\n ", " ", ";\n box-decoration-break: clone;\n display: inline;\n border-radius: ", "px;\n color: ", ";\n background-color: ", ";\n ", ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", (0, _constants.borderRadius)(), (0, _components.themed)({
37
37
  light: "var(--ds-text, ".concat(_colors.N900, ")"),
38
38
  dark: "var(--ds-text, ".concat(_colors.DN600, ")")
39
39
  }), (0, _components.themed)({
@@ -19,5 +19,5 @@ var Icon = _styled.default.img(_templateObject || (_templateObject = (0, _tagged
19
19
  // are less than that in height/width.
20
20
  // TODO: Replace this override with proper AtlasKit solution.
21
21
  exports.Icon = Icon;
22
- var AKIconWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-025, 2px)");
22
+ var AKIconWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: ", ";\n"])), "var(--ds-space-negative-025, -2px)");
23
23
  exports.AKIconWrapper = AKIconWrapper;
@@ -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 = "24.0.2";
54
+ var packageVersion = "25.0.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;
@@ -270,16 +270,6 @@ 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
-
283
273
  /*
284
274
  When isStretchingAllowed is false image is as big as it is, but as small as container
285
275
  (according to strategy - cover or fit).
@@ -36,7 +36,8 @@ const isSelected = ({
36
36
  // NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
37
37
  export const Wrapper = styled.span`
38
38
  line-height: 16px;
39
- padding: 2px 4px 2px 4px;
39
+ padding: ${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"}
40
+ ${"var(--ds-space-025, 2px)"} ${"var(--ds-space-050, 4px)"};
40
41
  box-decoration-break: clone;
41
42
  display: inline;
42
43
  border-radius: ${akBorderRadius()}px;
@@ -20,5 +20,5 @@ export const Icon = styled.img`
20
20
  // are less than that in height/width.
21
21
  // TODO: Replace this override with proper AtlasKit solution.
22
22
  export const AKIconWrapper = styled.span`
23
- margin-right: calc(-1 * ${"var(--ds-space-025, 2px)"});
23
+ margin-right: ${"var(--ds-space-negative-025, -2px)"};
24
24
  `;
@@ -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 = "24.0.2";
37
+ const packageVersion = "25.0.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;
@@ -248,16 +248,6 @@ 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
-
261
251
  /*
262
252
  When isStretchingAllowed is false image is as big as it is, but as small as container
263
253
  (according to strategy - cover or fit).
@@ -26,7 +26,7 @@ var isSelected = function isSelected(_ref) {
26
26
  // NB: `padding` consistent with @mentions.
27
27
  // NB: `display: inline` required for `box-decoration-break` to work.
28
28
  // NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
29
- export var Wrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 16px;\n padding: 2px 4px 2px 4px;\n box-decoration-break: clone;\n display: inline;\n border-radius: ", "px;\n color: ", ";\n background-color: ", ";\n ", ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), akBorderRadius(), themed({
29
+ export var Wrapper = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n line-height: 16px;\n padding: ", " ", "\n ", " ", ";\n box-decoration-break: clone;\n display: inline;\n border-radius: ", "px;\n color: ", ";\n background-color: ", ";\n ", ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n"])), "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", "var(--ds-space-025, 2px)", "var(--ds-space-050, 4px)", akBorderRadius(), themed({
30
30
  light: "var(--ds-text, ".concat(N900, ")"),
31
31
  dark: "var(--ds-text, ".concat(DN600, ")")
32
32
  }), themed({
@@ -11,4 +11,4 @@ export var Icon = styled.img(_templateObject || (_templateObject = _taggedTempla
11
11
  // Used for 'untrue' icons which claim to be 16x16 but
12
12
  // are less than that in height/width.
13
13
  // TODO: Replace this override with proper AtlasKit solution.
14
- export var AKIconWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: calc(-1 * ", ");\n"])), "var(--ds-space-025, 2px)");
14
+ export var AKIconWrapper = styled.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-right: ", ";\n"])), "var(--ds-space-negative-025, -2px)");
@@ -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 = "24.0.2";
47
+ var packageVersion = "25.0.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;
@@ -261,16 +261,6 @@ 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
-
274
264
  /*
275
265
  When isStretchingAllowed is false image is as big as it is, but as small as container
276
266
  (according to strategy - cover or fit).
@@ -11,7 +11,6 @@ export interface MediaImageProps {
11
11
  onImageError?: () => void;
12
12
  loading?: 'lazy' | 'eager';
13
13
  forceSyncDisplay?: boolean;
14
- expandByPixel?: number;
15
14
  }
16
15
  export interface MediaImageState {
17
16
  isImageLoaded: boolean;
@@ -11,7 +11,6 @@ export interface MediaImageProps {
11
11
  onImageError?: () => void;
12
12
  loading?: 'lazy' | 'eager';
13
13
  forceSyncDisplay?: boolean;
14
- expandByPixel?: number;
15
14
  }
16
15
  export interface MediaImageState {
17
16
  isImageLoaded: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "24.0.2",
3
+ "version": "25.0.0",
4
4
  "description": "Includes common components and utilities used by other media packages",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@atlaskit/analytics-next": "^9.1.0",
27
- "@atlaskit/button": "^16.9.0",
27
+ "@atlaskit/button": "^16.10.0",
28
28
  "@atlaskit/code": "^14.6.0",
29
29
  "@atlaskit/icon": "^21.12.0",
30
30
  "@atlaskit/icon-file-type": "^6.4.0",
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/select": "^16.5.0",
34
34
  "@atlaskit/spinner": "^15.5.0",
35
35
  "@atlaskit/theme": "^12.6.0",
36
- "@atlaskit/tokens": "^1.20.0",
36
+ "@atlaskit/tokens": "^1.22.0",
37
37
  "@atlaskit/tooltip": "^17.8.0",
38
38
  "@atlaskit/width-detector": "^4.1.0",
39
39
  "@babel/runtime": "^7.0.0",
@@ -53,7 +53,7 @@
53
53
  "devDependencies": {
54
54
  "@af/visual-regression": "*",
55
55
  "@atlaskit/analytics-listeners": "^8.7.0",
56
- "@atlaskit/button": "^16.9.0",
56
+ "@atlaskit/button": "^16.10.0",
57
57
  "@atlaskit/ssr": "*",
58
58
  "@atlaskit/visual-regression": "*",
59
59
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
package/report.api.md CHANGED
@@ -439,8 +439,6 @@ export interface MediaImageProps {
439
439
  // (undocumented)
440
440
  dataURI: string;
441
441
  // (undocumented)
442
- expandByPixel?: number;
443
- // (undocumented)
444
442
  forceSyncDisplay?: boolean;
445
443
  // (undocumented)
446
444
  loading?: 'eager' | 'lazy';
@@ -377,8 +377,6 @@ export interface MediaImageProps {
377
377
  // (undocumented)
378
378
  dataURI: string;
379
379
  // (undocumented)
380
- expandByPixel?: number;
381
- // (undocumented)
382
380
  forceSyncDisplay?: boolean;
383
381
  // (undocumented)
384
382
  loading?: 'eager' | 'lazy';