@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaskit/media-ui
|
|
2
2
|
|
|
3
|
+
## 22.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`6de3a9494a8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6de3a9494a8) - [ux] Instrumented `@atlaskit/media-card` with the new theming package, `@atlaskit/tokens`.
|
|
8
|
+
|
|
9
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
10
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
11
|
+
|
|
12
|
+
- [`3b86aedf4cf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3b86aedf4cf) - Instrumented `@atlaskit/media-ui` with the new theming package, `@atlaskit/tokens`.
|
|
13
|
+
|
|
14
|
+
New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
|
|
15
|
+
These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`cb8f8e76d25`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb8f8e76d25) - Update types for react-select and @atlaskit/select upgrade
|
|
20
|
+
Update commerce-ui entrypoints that caused a pipeline issue.
|
|
21
|
+
- [`7c8727e3cb0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7c8727e3cb0) - [ux] Updated color usages in MediaButton and CustomMediaPlayer to use new colors from the new color palette.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
24
|
+
## 22.1.3
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
|
|
29
|
+
|
|
3
30
|
## 22.1.2
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/browser/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/browser.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/browser.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/browser.d.ts"
|
|
7
|
+
"types": "../dist/types/browser.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/browser.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
package/classNames/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/classNames.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/classNames.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/classNames.d.ts"
|
|
7
|
+
"types": "../dist/types/classNames.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/classNames.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
package/codeViewer/package.json
CHANGED
|
@@ -4,5 +4,12 @@
|
|
|
4
4
|
"module": "../dist/esm/codeViewer.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/codeViewer.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/codeViewer.d.ts"
|
|
7
|
+
"types": "../dist/types/codeViewer.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
">=4.0 <4.5": {
|
|
10
|
+
"*": [
|
|
11
|
+
"../dist/types-ts4.0/codeViewer.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
package/dist/cjs/MediaButton.js
CHANGED
|
@@ -19,8 +19,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
19
19
|
|
|
20
20
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
21
21
|
|
|
22
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
23
|
-
|
|
24
22
|
var _excluded = ["appearance", "buttonRef"],
|
|
25
23
|
_excluded2 = ["buttonStyles"];
|
|
26
24
|
|
|
@@ -35,55 +33,65 @@ var buttonTheme = {
|
|
|
35
33
|
light: 'transparent'
|
|
36
34
|
},
|
|
37
35
|
hover: {
|
|
38
|
-
light:
|
|
36
|
+
light: '#a1bdd914'
|
|
39
37
|
},
|
|
40
38
|
active: {
|
|
41
|
-
light:
|
|
39
|
+
light: '#a6c5e229'
|
|
42
40
|
}
|
|
43
41
|
},
|
|
44
42
|
boxShadowColor: {
|
|
45
43
|
focus: {
|
|
46
|
-
light:
|
|
44
|
+
light: '#85b8ff'
|
|
47
45
|
}
|
|
48
46
|
},
|
|
49
47
|
color: {
|
|
50
48
|
default: {
|
|
51
|
-
light:
|
|
49
|
+
light: '#c7d1db'
|
|
52
50
|
},
|
|
53
51
|
hover: {
|
|
54
|
-
light:
|
|
52
|
+
light: '#c7d1db'
|
|
55
53
|
},
|
|
56
54
|
active: {
|
|
57
|
-
light:
|
|
55
|
+
light: '#c7d1db'
|
|
58
56
|
},
|
|
59
57
|
disabled: {
|
|
60
|
-
light:
|
|
58
|
+
light: '#bfdbf847'
|
|
59
|
+
},
|
|
60
|
+
focus: {
|
|
61
|
+
light: '#c7d1db'
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
primary: {
|
|
65
66
|
background: {
|
|
66
67
|
default: {
|
|
67
|
-
light:
|
|
68
|
+
light: '#579dff'
|
|
68
69
|
},
|
|
69
70
|
hover: {
|
|
70
|
-
light:
|
|
71
|
+
light: '#85b8ff'
|
|
71
72
|
},
|
|
72
73
|
active: {
|
|
73
|
-
light:
|
|
74
|
+
light: '#cce0ff'
|
|
74
75
|
},
|
|
75
76
|
disabled: {
|
|
76
|
-
light:
|
|
77
|
+
light: '#bcd6f00a'
|
|
77
78
|
}
|
|
78
79
|
},
|
|
79
80
|
boxShadowColor: {
|
|
80
81
|
focus: {
|
|
81
|
-
light:
|
|
82
|
+
light: '#85b8ff'
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
color: {
|
|
85
86
|
default: {
|
|
86
|
-
light:
|
|
87
|
+
light: '#161a1d'
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
selected: {
|
|
92
|
+
color: {
|
|
93
|
+
default: {
|
|
94
|
+
light: 'red'
|
|
87
95
|
}
|
|
88
96
|
}
|
|
89
97
|
}
|
|
@@ -21,6 +21,8 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
21
21
|
|
|
22
22
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
23
|
|
|
24
|
+
var _tokens = require("@atlaskit/tokens");
|
|
25
|
+
|
|
24
26
|
var _react = _interopRequireDefault(require("react"));
|
|
25
27
|
|
|
26
28
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -81,7 +83,7 @@ var MediaInlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
|
81
83
|
icon: icon || /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_warning.default, {
|
|
82
84
|
label: "error",
|
|
83
85
|
size: "small",
|
|
84
|
-
primaryColor: _colors.R300
|
|
86
|
+
primaryColor: (0, _tokens.token)('color.icon.danger', _colors.R300)
|
|
85
87
|
})),
|
|
86
88
|
title: this.renderMessage()
|
|
87
89
|
}));
|
|
@@ -9,20 +9,19 @@ exports.Wrapper = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
12
14
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
15
|
|
|
14
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
17
|
|
|
16
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
19
|
|
|
18
|
-
var _components = require("@atlaskit/theme/components");
|
|
19
|
-
|
|
20
20
|
var _templateObject;
|
|
21
21
|
|
|
22
|
-
var FONT_COLOR =
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat(_colors.B300, ";\n outline: none;\n user-select: none;\n border-color: transparent;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
|
|
22
|
+
var FONT_COLOR = (0, _tokens.token)('color.text', _colors.N900);
|
|
23
|
+
var BACKGROUND_COLOR = (0, _tokens.token)('color.background.neutral', _colors.N30A);
|
|
24
|
+
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat((0, _tokens.token)('color.border.selected', _colors.B300), ";\n outline: none;\n user-select: none;\n border-color: transparent;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
|
|
26
25
|
|
|
27
26
|
var isSelected = function isSelected(_ref) {
|
|
28
27
|
var isSelected = _ref.isSelected;
|
|
@@ -47,10 +46,8 @@ var isSelected = function isSelected(_ref) {
|
|
|
47
46
|
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
48
47
|
|
|
49
48
|
|
|
50
|
-
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)(), FONT_COLOR,
|
|
51
|
-
light: BACKGROUND_COLOR_LIGHT
|
|
52
|
-
}), function (props) {
|
|
49
|
+
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)(), FONT_COLOR, BACKGROUND_COLOR, function (props) {
|
|
53
50
|
return isSelected(props);
|
|
54
|
-
}, _colors.N40A);
|
|
51
|
+
}, (0, _tokens.token)('color.background.neutral.hovered', _colors.N40A));
|
|
55
52
|
|
|
56
53
|
exports.Wrapper = Wrapper;
|
|
@@ -27,6 +27,10 @@ var _styled = require("./styled");
|
|
|
27
27
|
|
|
28
28
|
var _link = _interopRequireDefault(require("@atlaskit/icon/glyph/link"));
|
|
29
29
|
|
|
30
|
+
var _tokens = require("@atlaskit/tokens");
|
|
31
|
+
|
|
32
|
+
var _colors = require("@atlaskit/theme/colors");
|
|
33
|
+
|
|
30
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
31
35
|
|
|
32
36
|
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; } }
|
|
@@ -120,7 +124,7 @@ var IconAndTitleLayout = /*#__PURE__*/function (_React$Component) {
|
|
|
120
124
|
testId = _this$props2$testId === void 0 ? 'media-inline-card-icon-and-title' : _this$props2$testId;
|
|
121
125
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconTitleWrapper, {
|
|
122
126
|
style: {
|
|
123
|
-
color: titleColor
|
|
127
|
+
color: titleColor || (0, _tokens.token)('color.text', _colors.N900)
|
|
124
128
|
}
|
|
125
129
|
}, /*#__PURE__*/_react.default.createElement(_styled.IconPositionWrapper, null, children || /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.IconEmptyWrapper, null), this.renderIcon(testId))), /*#__PURE__*/_react.default.createElement(_styled.TitleWrapper, null, title)));
|
|
126
130
|
}
|
|
@@ -9,17 +9,14 @@ exports.NoLinkAppearance = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
|
+
var _tokens = require("@atlaskit/tokens");
|
|
13
|
+
|
|
12
14
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
15
|
|
|
14
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
17
|
|
|
16
|
-
var _components = require("@atlaskit/theme/components");
|
|
17
|
-
|
|
18
18
|
var _templateObject;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
var NoLinkAppearance = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _components.themed)({
|
|
22
|
-
light: _colors.N200
|
|
23
|
-
}));
|
|
20
|
+
var NoLinkAppearance = _styled.default.span(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (0, _tokens.token)('color.text.subtlest', _colors.N200));
|
|
24
21
|
|
|
25
22
|
exports.NoLinkAppearance = NoLinkAppearance;
|
|
@@ -96,7 +96,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
96
96
|
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; } }
|
|
97
97
|
|
|
98
98
|
var packageName = "@atlaskit/media-ui";
|
|
99
|
-
var packageVersion = "22.
|
|
99
|
+
var packageVersion = "22.2.0";
|
|
100
100
|
var MEDIUM_VIDEO_MAX_WIDTH = 400;
|
|
101
101
|
var SMALL_VIDEO_MAX_WIDTH = 160;
|
|
102
102
|
var MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
|
|
@@ -184,7 +184,7 @@ var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
var primaryColor = isHDActive ?
|
|
187
|
+
var primaryColor = isHDActive ? '#579DFF' : '#c7d1db';
|
|
188
188
|
var secondaryColor = isHDActive ? _colors.N0 : _colors.DN60;
|
|
189
189
|
return /*#__PURE__*/_react.default.createElement(_MediaButton.default, {
|
|
190
190
|
testId: "custom-media-player-hd-button",
|
|
@@ -69,7 +69,7 @@ var PlaybackSpeedControls = /*#__PURE__*/function (_Component) {
|
|
|
69
69
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
70
70
|
popupHeight: 255
|
|
71
71
|
});
|
|
72
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onPlaybackSpeedChange", function (option) {
|
|
72
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onPlaybackSpeedChange", function (option, _actionMeta) {
|
|
73
73
|
var onPlaybackSpeedChange = _this.props.onPlaybackSpeedChange;
|
|
74
74
|
|
|
75
75
|
if (!option) {
|
|
@@ -81,6 +81,7 @@ var PlaybackSpeedControls = /*#__PURE__*/function (_Component) {
|
|
|
81
81
|
});
|
|
82
82
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "speedOptions", function () {
|
|
83
83
|
return [{
|
|
84
|
+
// @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.
|
|
84
85
|
label: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.playbackSpeed),
|
|
85
86
|
options: [{
|
|
86
87
|
label: '0.75x',
|
|
@@ -103,7 +104,8 @@ var PlaybackSpeedControls = /*#__PURE__*/function (_Component) {
|
|
|
103
104
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "popupCustomStyles", {
|
|
104
105
|
container: function container(styles) {
|
|
105
106
|
return _objectSpread(_objectSpread({}, styles), {}, {
|
|
106
|
-
backgroundColor:
|
|
107
|
+
backgroundColor: '#22272b',
|
|
108
|
+
boxShadow: 'inset 0px 0px 0px 1px #bcd6f00a,0px 8px 12px #0304045c,0px 0px 1px #03040480'
|
|
107
109
|
});
|
|
108
110
|
},
|
|
109
111
|
// added these overrides to keep the look of the current design
|
|
@@ -117,8 +119,16 @@ var PlaybackSpeedControls = /*#__PURE__*/function (_Component) {
|
|
|
117
119
|
var isFocused = _ref.isFocused,
|
|
118
120
|
isSelected = _ref.isSelected;
|
|
119
121
|
return _objectSpread(_objectSpread({}, styles), {}, {
|
|
120
|
-
color: isSelected ?
|
|
121
|
-
backgroundColor: isSelected ?
|
|
122
|
+
color: isSelected ? '#579dff' : 'inherit',
|
|
123
|
+
backgroundColor: isSelected ? '#082145' : isFocused ? '#a1bdd914' : '#22272b',
|
|
124
|
+
':active': {
|
|
125
|
+
backgroundColor: '#a6c5e229'
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
groupHeading: function groupHeading(styles) {
|
|
130
|
+
return _objectSpread(_objectSpread({}, styles), {}, {
|
|
131
|
+
color: '#9fadbc'
|
|
122
132
|
});
|
|
123
133
|
}
|
|
124
134
|
});
|
|
@@ -37,15 +37,15 @@ var TimeWrapper = _styled.default.div(_templateObject5 || (_templateObject5 = (0
|
|
|
37
37
|
|
|
38
38
|
exports.TimeWrapper = TimeWrapper;
|
|
39
39
|
|
|
40
|
-
var CurrentTime = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: #
|
|
40
|
+
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"])));
|
|
41
41
|
|
|
42
42
|
exports.CurrentTime = CurrentTime;
|
|
43
43
|
|
|
44
|
-
var TimeLine = _styled.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 2px;\n transition-delay: 1s;\n transition: all 0.1s;\n background-color: #
|
|
44
|
+
var TimeLine = _styled.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\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"])));
|
|
45
45
|
|
|
46
46
|
exports.TimeLine = TimeLine;
|
|
47
47
|
|
|
48
|
-
var CurrentTimeLine = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n background-color: #
|
|
48
|
+
var CurrentTimeLine = _styled.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n background-color: #05c;\n border-radius: inherit;\n height: inherit;\n position: absolute;\n top: 0;\n max-width: 100%;\n"])));
|
|
49
49
|
|
|
50
50
|
exports.CurrentTimeLine = CurrentTimeLine;
|
|
51
51
|
|
|
@@ -53,7 +53,7 @@ var Thumb = _styled.default.div(_templateObject9 || (_templateObject9 = (0, _tag
|
|
|
53
53
|
|
|
54
54
|
exports.Thumb = Thumb;
|
|
55
55
|
|
|
56
|
-
var BufferedTime = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n background-color: #
|
|
56
|
+
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"])));
|
|
57
57
|
|
|
58
58
|
exports.BufferedTime = BufferedTime;
|
|
59
59
|
|
|
@@ -61,17 +61,17 @@ var LeftControls = _styled.default.div(_templateObject11 || (_templateObject11 =
|
|
|
61
61
|
|
|
62
62
|
exports.LeftControls = LeftControls;
|
|
63
63
|
|
|
64
|
-
var RightControls = _styled.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n margin-right: 10px;\n color:
|
|
64
|
+
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"])));
|
|
65
65
|
|
|
66
66
|
exports.RightControls = RightControls;
|
|
67
67
|
|
|
68
|
-
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, #
|
|
68
|
+
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"])));
|
|
69
69
|
|
|
70
70
|
exports.ControlsWrapper = ControlsWrapper;
|
|
71
71
|
|
|
72
72
|
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) {
|
|
73
73
|
var isMuted = _ref.isMuted;
|
|
74
|
-
return isMuted ? "
|
|
74
|
+
return isMuted ? "#EF5C48 !important;" : '';
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
exports.VolumeToggleWrapper = VolumeToggleWrapper;
|
package/dist/cjs/errorIcon.js
CHANGED
|
@@ -9,6 +9,7 @@ exports.errorIcon = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
12
13
|
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";
|
|
13
14
|
|
|
14
15
|
var errorIcon = /*#__PURE__*/_react.default.createElement("svg", {
|
|
@@ -39,7 +39,7 @@ var MimeTypeIcon = function MimeTypeIcon(_ref) {
|
|
|
39
39
|
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
40
40
|
label: iconInfo.label
|
|
41
41
|
}));
|
|
42
|
-
} // no
|
|
42
|
+
} // no corresponding mimetype icon/label was found.
|
|
43
43
|
// Hence, return a mediatype (image/doc/audio/video/unknown) icon
|
|
44
44
|
|
|
45
45
|
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
|
+
// Keep Media buttons 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 Button from '@atlaskit/button/custom-theme-button';
|
|
4
|
-
import { DN60, B75, DN400, B400, DN100, B100, B200, DN70, DN30 } from '@atlaskit/theme/colors';
|
|
5
8
|
const buttonTheme = {
|
|
6
9
|
default: {
|
|
7
10
|
background: {
|
|
@@ -9,55 +12,65 @@ const buttonTheme = {
|
|
|
9
12
|
light: 'transparent'
|
|
10
13
|
},
|
|
11
14
|
hover: {
|
|
12
|
-
light:
|
|
15
|
+
light: '#a1bdd914'
|
|
13
16
|
},
|
|
14
17
|
active: {
|
|
15
|
-
light:
|
|
18
|
+
light: '#a6c5e229'
|
|
16
19
|
}
|
|
17
20
|
},
|
|
18
21
|
boxShadowColor: {
|
|
19
22
|
focus: {
|
|
20
|
-
light:
|
|
23
|
+
light: '#85b8ff'
|
|
21
24
|
}
|
|
22
25
|
},
|
|
23
26
|
color: {
|
|
24
27
|
default: {
|
|
25
|
-
light:
|
|
28
|
+
light: '#c7d1db'
|
|
26
29
|
},
|
|
27
30
|
hover: {
|
|
28
|
-
light:
|
|
31
|
+
light: '#c7d1db'
|
|
29
32
|
},
|
|
30
33
|
active: {
|
|
31
|
-
light:
|
|
34
|
+
light: '#c7d1db'
|
|
32
35
|
},
|
|
33
36
|
disabled: {
|
|
34
|
-
light:
|
|
37
|
+
light: '#bfdbf847'
|
|
38
|
+
},
|
|
39
|
+
focus: {
|
|
40
|
+
light: '#c7d1db'
|
|
35
41
|
}
|
|
36
42
|
}
|
|
37
43
|
},
|
|
38
44
|
primary: {
|
|
39
45
|
background: {
|
|
40
46
|
default: {
|
|
41
|
-
light:
|
|
47
|
+
light: '#579dff'
|
|
42
48
|
},
|
|
43
49
|
hover: {
|
|
44
|
-
light:
|
|
50
|
+
light: '#85b8ff'
|
|
45
51
|
},
|
|
46
52
|
active: {
|
|
47
|
-
light:
|
|
53
|
+
light: '#cce0ff'
|
|
48
54
|
},
|
|
49
55
|
disabled: {
|
|
50
|
-
light:
|
|
56
|
+
light: '#bcd6f00a'
|
|
51
57
|
}
|
|
52
58
|
},
|
|
53
59
|
boxShadowColor: {
|
|
54
60
|
focus: {
|
|
55
|
-
light:
|
|
61
|
+
light: '#85b8ff'
|
|
56
62
|
}
|
|
57
63
|
},
|
|
58
64
|
color: {
|
|
59
65
|
default: {
|
|
60
|
-
light:
|
|
66
|
+
light: '#161a1d'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
selected: {
|
|
71
|
+
color: {
|
|
72
|
+
default: {
|
|
73
|
+
light: 'red'
|
|
61
74
|
}
|
|
62
75
|
}
|
|
63
76
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import { token } from '@atlaskit/tokens';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { R300 } from '@atlaskit/theme/colors';
|
|
4
5
|
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
@@ -34,7 +35,7 @@ export class MediaInlineCardErroredView extends React.Component {
|
|
|
34
35
|
icon: icon || /*#__PURE__*/React.createElement(AKIconWrapper, null, /*#__PURE__*/React.createElement(WarningIcon, {
|
|
35
36
|
label: "error",
|
|
36
37
|
size: "small",
|
|
37
|
-
primaryColor: R300
|
|
38
|
+
primaryColor: token('color.icon.danger', R300)
|
|
38
39
|
})),
|
|
39
40
|
title: this.renderMessage()
|
|
40
41
|
}));
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import { token } from '@atlaskit/tokens';
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
|
-
import { B300, N30A, N40A,
|
|
3
|
+
import { B300, N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
3
4
|
import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const BACKGROUND_COLOR_LIGHT = N30A;
|
|
5
|
+
const FONT_COLOR = token('color.text', N900);
|
|
6
|
+
const BACKGROUND_COLOR = token('color.background.neutral', N30A);
|
|
8
7
|
const selected = `
|
|
9
8
|
cursor: pointer;
|
|
10
|
-
box-shadow: 0 0 0 1px ${B300};
|
|
9
|
+
box-shadow: 0 0 0 1px ${token('color.border.selected', B300)};
|
|
11
10
|
outline: none;
|
|
12
11
|
user-select: none;
|
|
13
12
|
border-color: transparent;
|
|
@@ -46,15 +45,13 @@ export const Wrapper = styled.span`
|
|
|
46
45
|
display: inline;
|
|
47
46
|
border-radius: ${akBorderRadius()}px;
|
|
48
47
|
color: ${FONT_COLOR};
|
|
49
|
-
background-color: ${
|
|
50
|
-
light: BACKGROUND_COLOR_LIGHT
|
|
51
|
-
})};
|
|
48
|
+
background-color: ${BACKGROUND_COLOR};
|
|
52
49
|
${props => isSelected(props)};
|
|
53
50
|
transition: 0.1s all ease-in-out;
|
|
54
51
|
-moz-user-select: none;
|
|
55
52
|
cursor: pointer;
|
|
56
53
|
|
|
57
54
|
&:hover {
|
|
58
|
-
background-color: ${N40A};
|
|
55
|
+
background-color: ${token('color.background.neutral.hovered', N40A)};
|
|
59
56
|
}
|
|
60
57
|
`;
|
|
@@ -3,6 +3,8 @@ import ImageLoader from 'react-render-image';
|
|
|
3
3
|
import { Icon } from '../Icon';
|
|
4
4
|
import { IconEmptyWrapper, IconPositionWrapper, IconTitleWrapper, IconWrapper, TitleWrapper, EmojiWrapper } from './styled';
|
|
5
5
|
import LinkIcon from '@atlaskit/icon/glyph/link';
|
|
6
|
+
import { token } from '@atlaskit/tokens';
|
|
7
|
+
import { N900 } from '@atlaskit/theme/colors';
|
|
6
8
|
export class IconAndTitleLayout extends React.Component {
|
|
7
9
|
renderAtlaskitIcon() {
|
|
8
10
|
const {
|
|
@@ -82,7 +84,7 @@ export class IconAndTitleLayout extends React.Component {
|
|
|
82
84
|
} = this.props;
|
|
83
85
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconTitleWrapper, {
|
|
84
86
|
style: {
|
|
85
|
-
color: titleColor
|
|
87
|
+
color: titleColor || token('color.text', N900)
|
|
86
88
|
}
|
|
87
89
|
}, /*#__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)));
|
|
88
90
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
+
import { token } from '@atlaskit/tokens';
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
3
|
import { N200 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { themed } from '@atlaskit/theme/components'; // TODO: Dark mode colors to be added in the future.
|
|
4
|
-
|
|
5
4
|
export const NoLinkAppearance = styled.span`
|
|
6
|
-
color: ${
|
|
7
|
-
light: N200
|
|
8
|
-
})};
|
|
5
|
+
color: ${token('color.text.subtlest', N200)};
|
|
9
6
|
`;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
|
+
// Keep media player components used in media-viewer to use static colors from the new color palette to
|
|
5
|
+
// support the hybrid 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 { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
@@ -14,7 +18,7 @@ import MediaButton from '../MediaButton';
|
|
|
14
18
|
import Spinner from '@atlaskit/spinner';
|
|
15
19
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
16
20
|
import MediaPlayer from 'react-video-renderer';
|
|
17
|
-
import {
|
|
21
|
+
import { N0, DN60 } from '@atlaskit/theme/colors';
|
|
18
22
|
import { TimeRange } from './timeRange';
|
|
19
23
|
import { CurrentTime, VideoWrapper, CustomVideoWrapper, TimebarWrapper, VolumeWrapper, TimeWrapper, LeftControls, RightControls, ControlsWrapper, VolumeToggleWrapper, MutedIndicator, SpinnerWrapper, VolumeTimeRangeWrapper } from './styled';
|
|
20
24
|
import { fireAnalyticsEvent, relevantFeatureFlagNames, createCustomMediaPlayerScreenEvent, createMediaButtonClickedEvent, createMediaShortcutPressedEvent, createPlayPauseBlanketClickedEvent, createTimeRangeNavigatedEvent, createPlaybackSpeedChangedEvent, createFirstPlayedTrackEvent, createPlayedTrackEvent } from './analytics';
|
|
@@ -31,7 +35,7 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
31
35
|
import { SkipTenBackwardIcon, SkipTenForwardIcon } from './icons';
|
|
32
36
|
import { getControlsWrapperClassName } from './getControlsWrapperClassName';
|
|
33
37
|
const packageName = "@atlaskit/media-ui";
|
|
34
|
-
const packageVersion = "22.
|
|
38
|
+
const packageVersion = "22.2.0";
|
|
35
39
|
const MEDIUM_VIDEO_MAX_WIDTH = 400;
|
|
36
40
|
const SMALL_VIDEO_MAX_WIDTH = 160;
|
|
37
41
|
const MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
|
|
@@ -121,7 +125,7 @@ export class CustomMediaPlayerBase extends Component {
|
|
|
121
125
|
return;
|
|
122
126
|
}
|
|
123
127
|
|
|
124
|
-
const primaryColor = isHDActive ?
|
|
128
|
+
const primaryColor = isHDActive ? '#579DFF' : '#c7d1db';
|
|
125
129
|
const secondaryColor = isHDActive ? N0 : DN60;
|
|
126
130
|
return /*#__PURE__*/React.createElement(MediaButton, {
|
|
127
131
|
testId: "custom-media-player-hd-button",
|