@atlaskit/media-ui 22.1.2 → 22.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 +27 -0
- package/browser/package.json +8 -1
- package/classNames/package.json +8 -1
- package/codeViewer/package.json +8 -1
- package/dist/cjs/MediaButton.js +23 -15
- package/dist/cjs/MediaInlineCard/ErroredView/index.js +3 -1
- package/dist/cjs/MediaInlineCard/Frame/styled.js +7 -10
- package/dist/cjs/MediaInlineCard/IconAndTitleLayout/index.js +5 -1
- package/dist/cjs/MediaInlineCard/styled.js +3 -6
- package/dist/cjs/customMediaPlayer/index.js +2 -2
- package/dist/cjs/customMediaPlayer/playbackSpeedControls.js +14 -4
- package/dist/cjs/customMediaPlayer/styled.js +7 -7
- package/dist/cjs/errorIcon.js +1 -0
- package/dist/cjs/mime-type-icon.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/MediaButton.js +27 -14
- package/dist/es2019/MediaInlineCard/ErroredView/index.js +2 -1
- package/dist/es2019/MediaInlineCard/Frame/styled.js +7 -10
- package/dist/es2019/MediaInlineCard/IconAndTitleLayout/index.js +3 -1
- package/dist/es2019/MediaInlineCard/styled.js +2 -5
- package/dist/es2019/customMediaPlayer/index.js +7 -3
- package/dist/es2019/customMediaPlayer/playbackSpeedControls.js +17 -5
- package/dist/es2019/customMediaPlayer/styled.js +9 -8
- package/dist/es2019/errorIcon.js +1 -0
- package/dist/es2019/mime-type-icon.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/MediaButton.js +26 -14
- package/dist/esm/MediaInlineCard/ErroredView/index.js +2 -1
- package/dist/esm/MediaInlineCard/Frame/styled.js +7 -10
- package/dist/esm/MediaInlineCard/IconAndTitleLayout/index.js +3 -1
- package/dist/esm/MediaInlineCard/styled.js +2 -5
- package/dist/esm/customMediaPlayer/index.js +6 -3
- package/dist/esm/customMediaPlayer/playbackSpeedControls.js +18 -5
- package/dist/esm/customMediaPlayer/styled.js +9 -8
- package/dist/esm/errorIcon.js +1 -0
- package/dist/esm/mime-type-icon.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/MediaInlineCard/styled.d.ts +1 -3
- package/dist/types/media-type-icon.d.ts +1 -0
- package/errorIcon/package.json +8 -1
- package/example-helpers/styled.ts +5 -3
- package/formatDate/package.json +8 -1
- package/locales/package.json +8 -1
- package/media-type-icon/package.json +8 -1
- package/messages/package.json +8 -1
- package/mime-type-icon/package.json +8 -1
- package/modalSpinner/package.json +8 -1
- package/package.json +20 -16
- package/report.api.md +504 -323
- package/truncateText/package.json +8 -1
- package/types/package.json +8 -1
- package/util/package.json +8 -1
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
|
+
// Keep PlaybackSpeedControls to use static colors from the new color palette to support the hybrid
|
|
5
|
+
// theming in media viewer https://product-fabric.atlassian.net/browse/DSP-6067
|
|
2
6
|
import React from 'react';
|
|
3
7
|
import { Component } from 'react';
|
|
4
8
|
import { PopupSelect } from '@atlaskit/select';
|
|
5
|
-
import {
|
|
9
|
+
import { N600 } from '@atlaskit/theme/colors';
|
|
6
10
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
7
11
|
import Tooltip from '@atlaskit/tooltip';
|
|
8
12
|
import MediaButton from '../MediaButton';
|
|
@@ -16,7 +20,7 @@ export class PlaybackSpeedControls extends Component {
|
|
|
16
20
|
popupHeight: 255
|
|
17
21
|
});
|
|
18
22
|
|
|
19
|
-
_defineProperty(this, "onPlaybackSpeedChange", option => {
|
|
23
|
+
_defineProperty(this, "onPlaybackSpeedChange", (option, _actionMeta) => {
|
|
20
24
|
const {
|
|
21
25
|
onPlaybackSpeedChange
|
|
22
26
|
} = this.props;
|
|
@@ -30,6 +34,7 @@ export class PlaybackSpeedControls extends Component {
|
|
|
30
34
|
});
|
|
31
35
|
|
|
32
36
|
_defineProperty(this, "speedOptions", () => [{
|
|
37
|
+
// @ts-ignore: FormattedMessage is returning an Element which is a type mismatch with what OptionType wants. This can be fix by using 'intl' object once this packages gets refactor later.
|
|
33
38
|
label: /*#__PURE__*/React.createElement(FormattedMessage, messages.playbackSpeed),
|
|
34
39
|
options: [{
|
|
35
40
|
label: '0.75x',
|
|
@@ -51,7 +56,8 @@ export class PlaybackSpeedControls extends Component {
|
|
|
51
56
|
|
|
52
57
|
_defineProperty(this, "popupCustomStyles", {
|
|
53
58
|
container: styles => ({ ...styles,
|
|
54
|
-
backgroundColor:
|
|
59
|
+
backgroundColor: '#22272b',
|
|
60
|
+
boxShadow: 'inset 0px 0px 0px 1px #bcd6f00a,0px 8px 12px #0304045c,0px 0px 1px #03040480'
|
|
55
61
|
}),
|
|
56
62
|
// added these overrides to keep the look of the current design
|
|
57
63
|
// however this does not benefit from the DS a11y changes
|
|
@@ -62,8 +68,14 @@ export class PlaybackSpeedControls extends Component {
|
|
|
62
68
|
isFocused,
|
|
63
69
|
isSelected
|
|
64
70
|
}) => ({ ...styles,
|
|
65
|
-
color: isSelected ?
|
|
66
|
-
backgroundColor: isSelected ?
|
|
71
|
+
color: isSelected ? '#579dff' : 'inherit',
|
|
72
|
+
backgroundColor: isSelected ? '#082145' : isFocused ? '#a1bdd914' : '#22272b',
|
|
73
|
+
':active': {
|
|
74
|
+
backgroundColor: '#a6c5e229'
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
groupHeading: styles => ({ ...styles,
|
|
78
|
+
color: '#9fadbc'
|
|
67
79
|
})
|
|
68
80
|
});
|
|
69
81
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
|
-
import { R300
|
|
3
|
+
import { R300 } from '@atlaskit/theme/colors';
|
|
3
4
|
export const CustomVideoWrapper = styled.div`
|
|
4
5
|
width: 100%;
|
|
5
6
|
height: 100%;
|
|
@@ -42,7 +43,7 @@ export const TimeWrapper = styled.div`
|
|
|
42
43
|
margin-bottom: 44px;
|
|
43
44
|
`;
|
|
44
45
|
export const CurrentTime = styled.div`
|
|
45
|
-
color: #
|
|
46
|
+
color: #c7d1db;
|
|
46
47
|
user-select: none;
|
|
47
48
|
margin-right: 10px;
|
|
48
49
|
white-space: nowrap;
|
|
@@ -52,12 +53,12 @@ export const TimeLine = styled.div`
|
|
|
52
53
|
height: 2px;
|
|
53
54
|
transition-delay: 1s;
|
|
54
55
|
transition: all 0.1s;
|
|
55
|
-
background-color: #
|
|
56
|
+
background-color: #596773;
|
|
56
57
|
border-radius: 5px;
|
|
57
58
|
position: relative;
|
|
58
59
|
`;
|
|
59
60
|
export const CurrentTimeLine = styled.div`
|
|
60
|
-
background-color: #
|
|
61
|
+
background-color: #05c;
|
|
61
62
|
border-radius: inherit;
|
|
62
63
|
height: inherit;
|
|
63
64
|
position: absolute;
|
|
@@ -84,7 +85,7 @@ export const Thumb = styled.div`
|
|
|
84
85
|
}
|
|
85
86
|
`;
|
|
86
87
|
export const BufferedTime = styled.div`
|
|
87
|
-
background-color: #
|
|
88
|
+
background-color: #8696a7;
|
|
88
89
|
height: inherit;
|
|
89
90
|
border-radius: inherit;
|
|
90
91
|
width: 0;
|
|
@@ -97,14 +98,14 @@ export const RightControls = styled.div`
|
|
|
97
98
|
display: flex;
|
|
98
99
|
align-items: center;
|
|
99
100
|
margin-right: 10px;
|
|
100
|
-
color:
|
|
101
|
+
color: '#c7d1db';
|
|
101
102
|
`;
|
|
102
103
|
export const ControlsWrapper = styled.div`
|
|
103
104
|
bottom: 0;
|
|
104
105
|
left: 0;
|
|
105
106
|
width: 100%;
|
|
106
107
|
height: auto;
|
|
107
|
-
background: linear-gradient(to top, #
|
|
108
|
+
background: linear-gradient(to top, #101214, rgba(14, 22, 36, 0));
|
|
108
109
|
position: absolute;
|
|
109
110
|
`;
|
|
110
111
|
export const VolumeToggleWrapper = styled.div`
|
|
@@ -115,7 +116,7 @@ export const VolumeToggleWrapper = styled.div`
|
|
|
115
116
|
width: 36px !important;
|
|
116
117
|
color: ${({
|
|
117
118
|
isMuted
|
|
118
|
-
}) => isMuted ?
|
|
119
|
+
}) => isMuted ? `#EF5C48 !important;` : ''};
|
|
119
120
|
}
|
|
120
121
|
`;
|
|
121
122
|
export const VolumeTimeRangeWrapper = styled.div`
|
package/dist/es2019/errorIcon.js
CHANGED
|
@@ -26,7 +26,7 @@ export const MimeTypeIcon = ({
|
|
|
26
26
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
27
27
|
label: iconInfo.label
|
|
28
28
|
}));
|
|
29
|
-
} // no
|
|
29
|
+
} // no corresponding mimetype icon/label was found.
|
|
30
30
|
// Hence, return a mediatype (image/doc/audio/video/unknown) icon
|
|
31
31
|
|
|
32
32
|
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/MediaButton.js
CHANGED
|
@@ -9,9 +9,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
9
9
|
|
|
10
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
11
11
|
|
|
12
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
13
|
+
// Keep Media buttons to use static colors from the new color palette to support the hybrid
|
|
14
|
+
// theming in media viewer https://product-fabric.atlassian.net/browse/DSP-6067
|
|
12
15
|
import React from 'react';
|
|
13
16
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
14
|
-
import { DN60, B75, DN400, B400, DN100, B100, B200, DN70, DN30 } from '@atlaskit/theme/colors';
|
|
15
17
|
var buttonTheme = {
|
|
16
18
|
default: {
|
|
17
19
|
background: {
|
|
@@ -19,55 +21,65 @@ var buttonTheme = {
|
|
|
19
21
|
light: 'transparent'
|
|
20
22
|
},
|
|
21
23
|
hover: {
|
|
22
|
-
light:
|
|
24
|
+
light: '#a1bdd914'
|
|
23
25
|
},
|
|
24
26
|
active: {
|
|
25
|
-
light:
|
|
27
|
+
light: '#a6c5e229'
|
|
26
28
|
}
|
|
27
29
|
},
|
|
28
30
|
boxShadowColor: {
|
|
29
31
|
focus: {
|
|
30
|
-
light:
|
|
32
|
+
light: '#85b8ff'
|
|
31
33
|
}
|
|
32
34
|
},
|
|
33
35
|
color: {
|
|
34
36
|
default: {
|
|
35
|
-
light:
|
|
37
|
+
light: '#c7d1db'
|
|
36
38
|
},
|
|
37
39
|
hover: {
|
|
38
|
-
light:
|
|
40
|
+
light: '#c7d1db'
|
|
39
41
|
},
|
|
40
42
|
active: {
|
|
41
|
-
light:
|
|
43
|
+
light: '#c7d1db'
|
|
42
44
|
},
|
|
43
45
|
disabled: {
|
|
44
|
-
light:
|
|
46
|
+
light: '#bfdbf847'
|
|
47
|
+
},
|
|
48
|
+
focus: {
|
|
49
|
+
light: '#c7d1db'
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
},
|
|
48
53
|
primary: {
|
|
49
54
|
background: {
|
|
50
55
|
default: {
|
|
51
|
-
light:
|
|
56
|
+
light: '#579dff'
|
|
52
57
|
},
|
|
53
58
|
hover: {
|
|
54
|
-
light:
|
|
59
|
+
light: '#85b8ff'
|
|
55
60
|
},
|
|
56
61
|
active: {
|
|
57
|
-
light:
|
|
62
|
+
light: '#cce0ff'
|
|
58
63
|
},
|
|
59
64
|
disabled: {
|
|
60
|
-
light:
|
|
65
|
+
light: '#bcd6f00a'
|
|
61
66
|
}
|
|
62
67
|
},
|
|
63
68
|
boxShadowColor: {
|
|
64
69
|
focus: {
|
|
65
|
-
light:
|
|
70
|
+
light: '#85b8ff'
|
|
66
71
|
}
|
|
67
72
|
},
|
|
68
73
|
color: {
|
|
69
74
|
default: {
|
|
70
|
-
light:
|
|
75
|
+
light: '#161a1d'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
selected: {
|
|
80
|
+
color: {
|
|
81
|
+
default: {
|
|
82
|
+
light: 'red'
|
|
71
83
|
}
|
|
72
84
|
}
|
|
73
85
|
}
|
|
@@ -10,6 +10,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
|
|
11
11
|
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; } }
|
|
12
12
|
|
|
13
|
+
import { token } from '@atlaskit/tokens';
|
|
13
14
|
import React from 'react';
|
|
14
15
|
import { R300 } from '@atlaskit/theme/colors';
|
|
15
16
|
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
@@ -59,7 +60,7 @@ export var MediaInlineCardErroredView = /*#__PURE__*/function (_React$Component)
|
|
|
59
60
|
icon: icon || /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
60
61
|
label: "error",
|
|
61
62
|
size: "small",
|
|
62
|
-
primaryColor: R300
|
|
63
|
+
primaryColor: token('color.icon.danger', R300)
|
|
63
64
|
})),
|
|
64
65
|
title: this.renderMessage()
|
|
65
66
|
}));
|
|
@@ -2,14 +2,13 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
import styled from '@emotion/styled';
|
|
6
|
-
import { B300, N30A, N40A,
|
|
7
|
+
import { B300, N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
7
8
|
import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
var BACKGROUND_COLOR_LIGHT = N30A;
|
|
12
|
-
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat(B300, ";\n outline: none;\n user-select: none;\n border-color: transparent;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
|
|
9
|
+
var FONT_COLOR = token('color.text', N900);
|
|
10
|
+
var BACKGROUND_COLOR = token('color.background.neutral', N30A);
|
|
11
|
+
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat(token('color.border.selected', B300), ";\n outline: none;\n user-select: none;\n border-color: transparent;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
|
|
13
12
|
|
|
14
13
|
var isSelected = function isSelected(_ref) {
|
|
15
14
|
var isSelected = _ref.isSelected;
|
|
@@ -34,8 +33,6 @@ var isSelected = function isSelected(_ref) {
|
|
|
34
33
|
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
35
34
|
|
|
36
35
|
|
|
37
|
-
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(), FONT_COLOR,
|
|
38
|
-
light: BACKGROUND_COLOR_LIGHT
|
|
39
|
-
}), function (props) {
|
|
36
|
+
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(), FONT_COLOR, BACKGROUND_COLOR, function (props) {
|
|
40
37
|
return isSelected(props);
|
|
41
|
-
}, N40A);
|
|
38
|
+
}, token('color.background.neutral.hovered', N40A));
|
|
@@ -13,6 +13,8 @@ import ImageLoader from 'react-render-image';
|
|
|
13
13
|
import { Icon } from '../Icon';
|
|
14
14
|
import { IconEmptyWrapper, IconPositionWrapper, IconTitleWrapper, IconWrapper, TitleWrapper, EmojiWrapper } from './styled';
|
|
15
15
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
16
|
+
import { token } from '@atlaskit/tokens';
|
|
17
|
+
import { N900 } from '@atlaskit/theme/colors';
|
|
16
18
|
export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
17
19
|
_inherits(IconAndTitleLayout, _React$Component);
|
|
18
20
|
|
|
@@ -103,7 +105,7 @@ export var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
103
105
|
testId = _this$props2$testId === void 0 ? 'media-inline-card-icon-and-title' : _this$props2$testId;
|
|
104
106
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconTitleWrapper, {
|
|
105
107
|
style: {
|
|
106
|
-
color: titleColor
|
|
108
|
+
color: titleColor || token('color.text', N900)
|
|
107
109
|
}
|
|
108
110
|
}, /*#__PURE__*/React.createElement(IconPositionWrapper, null, children || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/React.createElement(TitleWrapper, null, title)));
|
|
109
111
|
}
|
|
@@ -2,10 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
+
import { token } from '@atlaskit/tokens';
|
|
5
6
|
import styled from '@emotion/styled';
|
|
6
7
|
import { N200 } from '@atlaskit/theme/colors';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export var NoLinkAppearance = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), themed({
|
|
10
|
-
light: N200
|
|
11
|
-
}));
|
|
8
|
+
export var NoLinkAppearance = styled.span(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), token('color.text.subtlest', N200));
|
|
@@ -14,6 +14,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
14
14
|
|
|
15
15
|
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; } }
|
|
16
16
|
|
|
17
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
18
|
+
// Keep media player components used in media-viewer to use static colors from the new color palette to
|
|
19
|
+
// support the hybrid theming in media viewer https://product-fabric.atlassian.net/browse/DSP-6067
|
|
17
20
|
import React from 'react';
|
|
18
21
|
import { Component } from 'react';
|
|
19
22
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -29,7 +32,7 @@ import MediaButton from '../MediaButton';
|
|
|
29
32
|
import Spinner from '@atlaskit/spinner';
|
|
30
33
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
31
34
|
import MediaPlayer from 'react-video-renderer';
|
|
32
|
-
import {
|
|
35
|
+
import { N0, DN60 } from '@atlaskit/theme/colors';
|
|
33
36
|
import { TimeRange } from './timeRange';
|
|
34
37
|
import { CurrentTime, VideoWrapper, CustomVideoWrapper, TimebarWrapper, VolumeWrapper, TimeWrapper, LeftControls, RightControls, ControlsWrapper, VolumeToggleWrapper, MutedIndicator, SpinnerWrapper, VolumeTimeRangeWrapper } from './styled';
|
|
35
38
|
import { fireAnalyticsEvent, relevantFeatureFlagNames, createCustomMediaPlayerScreenEvent, createMediaButtonClickedEvent, createMediaShortcutPressedEvent, createPlayPauseBlanketClickedEvent, createTimeRangeNavigatedEvent, createPlaybackSpeedChangedEvent, createFirstPlayedTrackEvent, createPlayedTrackEvent } from './analytics';
|
|
@@ -46,7 +49,7 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
46
49
|
import { SkipTenBackwardIcon, SkipTenForwardIcon } from './icons';
|
|
47
50
|
import { getControlsWrapperClassName } from './getControlsWrapperClassName';
|
|
48
51
|
var packageName = "@atlaskit/media-ui";
|
|
49
|
-
var packageVersion = "22.
|
|
52
|
+
var packageVersion = "22.2.0";
|
|
50
53
|
var MEDIUM_VIDEO_MAX_WIDTH = 400;
|
|
51
54
|
var SMALL_VIDEO_MAX_WIDTH = 160;
|
|
52
55
|
var MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
|
|
@@ -145,7 +148,7 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
145
148
|
return;
|
|
146
149
|
}
|
|
147
150
|
|
|
148
|
-
var primaryColor = isHDActive ?
|
|
151
|
+
var primaryColor = isHDActive ? '#579DFF' : '#c7d1db';
|
|
149
152
|
var secondaryColor = isHDActive ? N0 : DN60;
|
|
150
153
|
return /*#__PURE__*/React.createElement(MediaButton, {
|
|
151
154
|
testId: "custom-media-player-hd-button",
|
|
@@ -14,10 +14,13 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
14
14
|
|
|
15
15
|
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; } }
|
|
16
16
|
|
|
17
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
18
|
+
// Keep PlaybackSpeedControls to use static colors from the new color palette to support the hybrid
|
|
19
|
+
// theming in media viewer https://product-fabric.atlassian.net/browse/DSP-6067
|
|
17
20
|
import React from 'react';
|
|
18
21
|
import { Component } from 'react';
|
|
19
22
|
import { PopupSelect } from '@atlaskit/select';
|
|
20
|
-
import {
|
|
23
|
+
import { N600 } from '@atlaskit/theme/colors';
|
|
21
24
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
22
25
|
import Tooltip from '@atlaskit/tooltip';
|
|
23
26
|
import MediaButton from '../MediaButton';
|
|
@@ -43,7 +46,7 @@ export var PlaybackSpeedControls = /*#__PURE__*/function (_Component) {
|
|
|
43
46
|
popupHeight: 255
|
|
44
47
|
});
|
|
45
48
|
|
|
46
|
-
_defineProperty(_assertThisInitialized(_this), "onPlaybackSpeedChange", function (option) {
|
|
49
|
+
_defineProperty(_assertThisInitialized(_this), "onPlaybackSpeedChange", function (option, _actionMeta) {
|
|
47
50
|
var onPlaybackSpeedChange = _this.props.onPlaybackSpeedChange;
|
|
48
51
|
|
|
49
52
|
if (!option) {
|
|
@@ -56,6 +59,7 @@ export var PlaybackSpeedControls = /*#__PURE__*/function (_Component) {
|
|
|
56
59
|
|
|
57
60
|
_defineProperty(_assertThisInitialized(_this), "speedOptions", function () {
|
|
58
61
|
return [{
|
|
62
|
+
// @ts-ignore: FormattedMessage is returning an Element which is a type mismatch with what OptionType wants. This can be fix by using 'intl' object once this packages gets refactor later.
|
|
59
63
|
label: /*#__PURE__*/React.createElement(FormattedMessage, messages.playbackSpeed),
|
|
60
64
|
options: [{
|
|
61
65
|
label: '0.75x',
|
|
@@ -79,7 +83,8 @@ export var PlaybackSpeedControls = /*#__PURE__*/function (_Component) {
|
|
|
79
83
|
_defineProperty(_assertThisInitialized(_this), "popupCustomStyles", {
|
|
80
84
|
container: function container(styles) {
|
|
81
85
|
return _objectSpread(_objectSpread({}, styles), {}, {
|
|
82
|
-
backgroundColor:
|
|
86
|
+
backgroundColor: '#22272b',
|
|
87
|
+
boxShadow: 'inset 0px 0px 0px 1px #bcd6f00a,0px 8px 12px #0304045c,0px 0px 1px #03040480'
|
|
83
88
|
});
|
|
84
89
|
},
|
|
85
90
|
// added these overrides to keep the look of the current design
|
|
@@ -93,8 +98,16 @@ export var PlaybackSpeedControls = /*#__PURE__*/function (_Component) {
|
|
|
93
98
|
var isFocused = _ref.isFocused,
|
|
94
99
|
isSelected = _ref.isSelected;
|
|
95
100
|
return _objectSpread(_objectSpread({}, styles), {}, {
|
|
96
|
-
color: isSelected ?
|
|
97
|
-
backgroundColor: isSelected ?
|
|
101
|
+
color: isSelected ? '#579dff' : 'inherit',
|
|
102
|
+
backgroundColor: isSelected ? '#082145' : isFocused ? '#a1bdd914' : '#22272b',
|
|
103
|
+
':active': {
|
|
104
|
+
backgroundColor: '#a6c5e229'
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
groupHeading: function groupHeading(styles) {
|
|
109
|
+
return _objectSpread(_objectSpread({}, styles), {}, {
|
|
110
|
+
color: '#9fadbc'
|
|
98
111
|
});
|
|
99
112
|
}
|
|
100
113
|
});
|
|
@@ -2,8 +2,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
|
4
4
|
|
|
5
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
5
6
|
import styled from '@emotion/styled';
|
|
6
|
-
import { R300
|
|
7
|
+
import { R300 } from '@atlaskit/theme/colors';
|
|
7
8
|
export var CustomVideoWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n user-select: none;\n"])));
|
|
8
9
|
export var VideoWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n"])));
|
|
9
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,17 +12,17 @@ export var VolumeWrapper = styled.div(_templateObject4 || (_templateObject4 = _t
|
|
|
11
12
|
return props.showSlider ? "\n &:hover,\n &:active {\n width: 150px;\n transition: width 0.3s ease-out;\n }\n " : '';
|
|
12
13
|
});
|
|
13
14
|
export var TimeWrapper = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 0 20px 10px 20px;\n margin-bottom: 44px;\n"])));
|
|
14
|
-
export var CurrentTime = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: #
|
|
15
|
-
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: #
|
|
16
|
-
export var CurrentTimeLine = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background-color: #
|
|
15
|
+
export var CurrentTime = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: #c7d1db;\n user-select: none;\n margin-right: 10px;\n white-space: nowrap;\n"])));
|
|
16
|
+
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"])));
|
|
17
|
+
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"])));
|
|
17
18
|
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"])));
|
|
18
|
-
export var BufferedTime = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: #
|
|
19
|
+
export var BufferedTime = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: #8696a7;\n height: inherit;\n border-radius: inherit;\n width: 0;\n"])));
|
|
19
20
|
export var LeftControls = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n margin-left: 10px;\n"])));
|
|
20
|
-
export var RightControls = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-right: 10px;\n color:
|
|
21
|
-
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, #
|
|
21
|
+
export var RightControls = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-right: 10px;\n color: '#c7d1db';\n"])));
|
|
22
|
+
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"])));
|
|
22
23
|
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) {
|
|
23
24
|
var isMuted = _ref.isMuted;
|
|
24
|
-
return isMuted ? "
|
|
25
|
+
return isMuted ? "#EF5C48 !important;" : '';
|
|
25
26
|
});
|
|
26
27
|
export var VolumeTimeRangeWrapper = styled.div(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n width: 100%;\n margin-right: 20px;\n"])));
|
|
27
28
|
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) {
|
package/dist/esm/errorIcon.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
var style = "\n.cls-1{fill:url(#linear-gradient);}\n.cls-2{fill:#253858;}\n.cls-3{fill:#ffc400;}\n.cls-4{fill:#ffab00;}\n.cls-5,.cls-6{fill:none;stroke-linecap:round;stroke-miterlimit:10;stroke-width:2px;}\n.cls-5{stroke:#344563;}\n.cls-6{stroke:#5e6c84;}\n";
|
|
3
4
|
export var errorIcon = /*#__PURE__*/React.createElement("svg", {
|
|
@@ -29,7 +29,7 @@ export var MimeTypeIcon = function MimeTypeIcon(_ref) {
|
|
|
29
29
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
30
30
|
label: iconInfo.label
|
|
31
31
|
}));
|
|
32
|
-
} // no
|
|
32
|
+
} // no corresponding mimetype icon/label was found.
|
|
33
33
|
// Hence, return a mediatype (image/doc/audio/video/unknown) icon
|
|
34
34
|
|
|
35
35
|
|
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const NoLinkAppearance: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("
|
|
3
|
-
__ATLASKIT_THEME__: import("@atlaskit/theme").Theme;
|
|
4
|
-
}>;
|
|
2
|
+
export declare const NoLinkAppearance: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, keyof import("react").HTMLAttributes<HTMLSpanElement>>, object>;
|
|
@@ -7,6 +7,7 @@ export interface FileIconProps {
|
|
|
7
7
|
testId?: string;
|
|
8
8
|
type?: MediaType;
|
|
9
9
|
size?: 'small' | 'large';
|
|
10
|
+
className?: string;
|
|
10
11
|
}
|
|
11
12
|
export declare const IconWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
12
13
|
size: Required<FileIconProps['size']>;
|
package/errorIcon/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/errorIcon.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/errorIcon.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/errorIcon.d.ts"
|
|
7
|
+
"types": "../dist/types/errorIcon.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/errorIcon.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { token } from '@atlaskit/tokens';
|
|
2
|
+
import { N900 } from '@atlaskit/theme/colors';
|
|
1
3
|
import styled from '@emotion/styled';
|
|
2
4
|
|
|
3
5
|
export const InputWrapper = styled.div`
|
|
@@ -16,7 +18,7 @@ export const PreviewInfo = styled.pre`
|
|
|
16
18
|
|
|
17
19
|
export const PreviewItem = styled.li`
|
|
18
20
|
border-radius: 10px;
|
|
19
|
-
border: 1px solid #ccc;
|
|
21
|
+
border: 1px solid ${token('color.border', '#ccc')};
|
|
20
22
|
padding: 10px;
|
|
21
23
|
overflow: auto;
|
|
22
24
|
max-height: 600px;
|
|
@@ -27,8 +29,8 @@ export const PreviewItem = styled.li`
|
|
|
27
29
|
export const Code = styled.code`
|
|
28
30
|
padding: 5px;
|
|
29
31
|
border-radius: 5px;
|
|
30
|
-
background-color: #
|
|
31
|
-
color:
|
|
32
|
+
background-color: ${token('color.background.inverse.subtle', '#0002')};
|
|
33
|
+
color: ${token('color.text', N900)};
|
|
32
34
|
font-size: 80%;
|
|
33
35
|
`;
|
|
34
36
|
|
package/formatDate/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/formatDate.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/formatDate.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/formatDate.d.ts"
|
|
7
|
+
"types": "../dist/types/formatDate.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/formatDate.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
package/locales/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/locales.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/locales.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/locales.d.ts"
|
|
7
|
+
"types": "../dist/types/locales.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/locales.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/media-type-icon.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/media-type-icon.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/media-type-icon.d.ts"
|
|
7
|
+
"types": "../dist/types/media-type-icon.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/media-type-icon.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
package/messages/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/messages.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/messages.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/messages.d.ts"
|
|
7
|
+
"types": "../dist/types/messages.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/messages.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/mime-type-icon.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/mime-type-icon.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/mime-type-icon.d.ts"
|
|
7
|
+
"types": "../dist/types/mime-type-icon.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/mime-type-icon.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/modalSpinner.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/modalSpinner.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/modalSpinner.d.ts"
|
|
7
|
+
"types": "../dist/types/modalSpinner.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/modalSpinner.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|