@atlaskit/media-ui 25.4.0 → 25.4.2
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 +12 -0
- package/dist/cjs/MediaInlineCard/ErroredView/index.js +1 -1
- package/dist/cjs/MediaInlineCard/Frame/index.js +1 -1
- package/dist/cjs/MediaInlineCard/IconAndTitleLayout/index.js +1 -1
- package/dist/cjs/MediaInlineCard/LoadedView/index.js +1 -1
- package/dist/cjs/MediaInlineCard/LoadingView/index.js +1 -1
- package/dist/cjs/camera.js +1 -1
- package/dist/cjs/customMediaPlayer/index.js +55 -10
- package/dist/cjs/customMediaPlayer/playbackSpeedControls.js +3 -3
- package/dist/cjs/customMediaPlayer/styled.js +98 -41
- package/dist/cjs/customMediaPlayer/timeRange.js +3 -3
- package/dist/cjs/ellipsify.js +2 -2
- package/dist/cjs/humanReadableSize.js +2 -2
- package/dist/cjs/imageMetaData/parseJPEG.js +2 -2
- package/dist/cjs/imageMetaData/parsePNG.js +2 -2
- package/dist/cjs/inactivityDetector/inactivityDetector.js +3 -3
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/locales.js +2 -2
- package/dist/cjs/media-type-icon.js +1 -1
- package/dist/cjs/mediaImage/index.js +3 -3
- package/dist/cjs/mediaImage/styled.js +7 -0
- package/dist/cjs/shortcut.js +1 -1
- package/dist/cjs/test-helpers/MockGlobalImage.js +1 -1
- package/dist/cjs/test-helpers/fileReader.js +1 -1
- package/dist/es2019/customMediaPlayer/index.js +53 -8
- package/dist/es2019/customMediaPlayer/styled.js +105 -162
- package/dist/es2019/mediaImage/styled.js +8 -0
- package/dist/esm/MediaInlineCard/ErroredView/index.js +1 -1
- package/dist/esm/MediaInlineCard/Frame/index.js +1 -1
- package/dist/esm/MediaInlineCard/IconAndTitleLayout/index.js +1 -1
- package/dist/esm/MediaInlineCard/LoadedView/index.js +1 -1
- package/dist/esm/MediaInlineCard/LoadingView/index.js +1 -1
- package/dist/esm/camera.js +1 -1
- package/dist/esm/customMediaPlayer/index.js +54 -9
- package/dist/esm/customMediaPlayer/playbackSpeedControls.js +1 -1
- package/dist/esm/customMediaPlayer/styled.js +97 -41
- package/dist/esm/customMediaPlayer/timeRange.js +1 -1
- package/dist/esm/inactivityDetector/inactivityDetector.js +1 -1
- package/dist/esm/media-type-icon.js +1 -1
- package/dist/esm/mediaImage/index.js +1 -1
- package/dist/esm/mediaImage/styled.js +8 -0
- package/dist/esm/shortcut.js +1 -1
- package/dist/esm/test-helpers/MockGlobalImage.js +1 -1
- package/dist/esm/test-helpers/fileReader.js +1 -1
- package/dist/types/customMediaPlayer/styled.d.ts +0 -20
- package/dist/types-ts4.5/customMediaPlayer/styled.d.ts +0 -20
- package/example-helpers/styled.ts +53 -57
- package/package.json +3 -2
|
@@ -8,7 +8,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
8
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
13
13
|
// Keep media player components used in media-viewer to use static colors from the new color palette to
|
|
14
14
|
// support the hybrid theming in media viewer https://product-fabric.atlassian.net/browse/DSP-6067
|
|
@@ -24,13 +24,14 @@ import HDIcon from '@atlaskit/icon/glyph/vid-hd-circle';
|
|
|
24
24
|
import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
25
25
|
import { withMediaAnalyticsContext } from '@atlaskit/media-common';
|
|
26
26
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
27
|
+
import { xcss, Box, Flex } from '@atlaskit/primitives';
|
|
27
28
|
import MediaButton from '../MediaButton';
|
|
28
29
|
import Spinner from '@atlaskit/spinner';
|
|
29
30
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
30
31
|
import MediaPlayer from 'react-video-renderer';
|
|
31
32
|
import { N0, DN60 } from '@atlaskit/theme/colors';
|
|
32
33
|
import { TimeRange } from './timeRange';
|
|
33
|
-
import { CurrentTime,
|
|
34
|
+
import { CurrentTime, VolumeWrapper, LeftControls, RightControls, ControlsWrapper, VolumeToggleWrapper, MutedIndicator, VolumeTimeRangeWrapper } from './styled';
|
|
34
35
|
import { fireAnalyticsEvent, createCustomMediaPlayerScreenEvent, createMediaButtonClickedEvent, createMediaShortcutPressedEvent, createPlayPauseBlanketClickedEvent, createTimeRangeNavigatedEvent, createPlaybackSpeedChangedEvent, createFirstPlayedTrackEvent, createPlayedTrackEvent } from './analytics';
|
|
35
36
|
import { formatDuration } from '../formatDuration';
|
|
36
37
|
import { Shortcut, keyCodes } from '../shortcut';
|
|
@@ -45,11 +46,40 @@ import Tooltip from '@atlaskit/tooltip';
|
|
|
45
46
|
import { SkipTenBackwardIcon, SkipTenForwardIcon } from './icons';
|
|
46
47
|
import { getControlsWrapperClassName } from './getControlsWrapperClassName';
|
|
47
48
|
var packageName = "@atlaskit/media-ui";
|
|
48
|
-
var packageVersion = "25.4.
|
|
49
|
+
var packageVersion = "25.4.2";
|
|
49
50
|
var MEDIUM_VIDEO_MAX_WIDTH = 400;
|
|
50
51
|
var SMALL_VIDEO_MAX_WIDTH = 160;
|
|
51
52
|
var MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
|
|
52
53
|
var VIEWED_TRACKING_SECS = 2;
|
|
54
|
+
|
|
55
|
+
/* Styles */
|
|
56
|
+
|
|
57
|
+
var timebarWrapperStyles = xcss({
|
|
58
|
+
position: 'absolute',
|
|
59
|
+
width: '100%',
|
|
60
|
+
bottom: 'space.100'
|
|
61
|
+
});
|
|
62
|
+
var customVideoWrapperStyles = xcss({
|
|
63
|
+
width: '100%',
|
|
64
|
+
height: '100%',
|
|
65
|
+
userSelect: 'none'
|
|
66
|
+
});
|
|
67
|
+
var videoWrapperStyles = xcss({
|
|
68
|
+
width: '100%',
|
|
69
|
+
height: '100%'
|
|
70
|
+
});
|
|
71
|
+
var timeWrapperStyles = xcss({
|
|
72
|
+
marginTop: 'space.0',
|
|
73
|
+
marginInline: 'space.250',
|
|
74
|
+
marginBottom: 'space.500'
|
|
75
|
+
});
|
|
76
|
+
var spinnerWrapperStyles = xcss({
|
|
77
|
+
position: 'absolute',
|
|
78
|
+
top: 'space.0',
|
|
79
|
+
left: 'space.0',
|
|
80
|
+
width: '100%',
|
|
81
|
+
height: '100%'
|
|
82
|
+
});
|
|
53
83
|
export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
|
|
54
84
|
_inherits(CustomMediaPlayerBase, _Component);
|
|
55
85
|
var _super = _createSuper(CustomMediaPlayerBase);
|
|
@@ -349,7 +379,12 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
349
379
|
}));
|
|
350
380
|
});
|
|
351
381
|
_defineProperty(_assertThisInitialized(_this), "renderSpinner", function () {
|
|
352
|
-
return /*#__PURE__*/React.createElement(
|
|
382
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
383
|
+
direction: "column",
|
|
384
|
+
alignItems: "center",
|
|
385
|
+
justifyContent: "center",
|
|
386
|
+
xcss: spinnerWrapperStyles
|
|
387
|
+
}, /*#__PURE__*/React.createElement(Spinner, {
|
|
353
388
|
appearance: "invert",
|
|
354
389
|
size: "large"
|
|
355
390
|
}));
|
|
@@ -570,9 +605,10 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
570
605
|
onCanPlay = _this$props9.onCanPlay,
|
|
571
606
|
onError = _this$props9.onError,
|
|
572
607
|
poster = _this$props9.poster;
|
|
573
|
-
return /*#__PURE__*/React.createElement(
|
|
608
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
609
|
+
xcss: customVideoWrapperStyles,
|
|
574
610
|
ref: this.videoWrapperRef,
|
|
575
|
-
|
|
611
|
+
testId: "custom-media-player"
|
|
576
612
|
}, /*#__PURE__*/React.createElement(MediaPlayer, {
|
|
577
613
|
sourceType: type,
|
|
578
614
|
src: src,
|
|
@@ -611,7 +647,10 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
611
647
|
skipBackward: skipBackward,
|
|
612
648
|
skipForward: skipForward
|
|
613
649
|
});
|
|
614
|
-
return /*#__PURE__*/React.createElement(
|
|
650
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
651
|
+
direction: "column",
|
|
652
|
+
xcss: videoWrapperStyles
|
|
653
|
+
}, /*#__PURE__*/React.createElement(WidthObserver, {
|
|
615
654
|
setWidth: _this2.onResize
|
|
616
655
|
}), shortcuts, isLoading && _this2.renderSpinner(), /*#__PURE__*/React.createElement(PlayPauseBlanket, {
|
|
617
656
|
onDoubleClick: _this2.doubleClickToFullscreen,
|
|
@@ -620,13 +659,19 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
|
|
|
620
659
|
}, video), /*#__PURE__*/React.createElement(ControlsWrapper, {
|
|
621
660
|
ref: _this2.controlsWrapperRef,
|
|
622
661
|
className: getBooleanFF('platform.editor.a11y_video_controls_keyboard_support_yhcxh') ? getControlsWrapperClassName(_this2.wasPlayedOnce, _this2.state.areVideoControlsFocused) : getControlsWrapperClassName(_this2.wasPlayedOnce)
|
|
623
|
-
}, /*#__PURE__*/React.createElement(
|
|
662
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
663
|
+
xcss: timeWrapperStyles
|
|
664
|
+
}, /*#__PURE__*/React.createElement(TimeRange, {
|
|
624
665
|
currentTime: currentTime,
|
|
625
666
|
bufferedTime: buffered,
|
|
626
667
|
duration: duration,
|
|
627
668
|
onChange: actions.navigate,
|
|
628
669
|
onChanged: _this2.onTimeChanged
|
|
629
|
-
})), /*#__PURE__*/React.createElement(
|
|
670
|
+
})), /*#__PURE__*/React.createElement(Flex, {
|
|
671
|
+
alignItems: "center",
|
|
672
|
+
justifyContent: "space-between",
|
|
673
|
+
xcss: timebarWrapperStyles
|
|
674
|
+
}, /*#__PURE__*/React.createElement(LeftControls, null, _this2.renderPlayPauseButton(isPlaying), isLargePlayer && _this2.renderSkipBackwardButton(skipBackward), isLargePlayer && _this2.renderSkipForwardButton(skipForward), _this2.renderVolume(videoState, actions, isLargePlayer)), /*#__PURE__*/React.createElement(RightControls, null, (isMediumPlayer || isLargePlayer) && _this2.renderCurrentTime(videoState), isLargePlayer && _this2.renderHDButton(), isLargePlayer && _this2.renderSpeedControls(), _this2.renderFullScreenButton(), isLargePlayer && _this2.renderDownloadButton()))));
|
|
630
675
|
}));
|
|
631
676
|
}
|
|
632
677
|
}]);
|
|
@@ -8,7 +8,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
8
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
|
-
function _isNativeReflectConstruct() {
|
|
11
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
12
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
13
13
|
// Keep PlaybackSpeedControls to use static colors from the new color palette to support the hybrid
|
|
14
14
|
// theming in media viewer https://product-fabric.atlassian.net/browse/DSP-6067
|
|
@@ -1,52 +1,108 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
|
3
1
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
2
|
import styled from '@emotion/styled';
|
|
5
3
|
import { R300 } from '@atlaskit/theme/colors';
|
|
6
|
-
export var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
export var VolumeWrapper = styled.div({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
width: '35px',
|
|
7
|
+
overflow: 'hidden',
|
|
8
|
+
transition: 'width 0.3s',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
bottom: "var(--ds-space-0, 0px)",
|
|
11
|
+
left: "var(--ds-space-500, 40px)"
|
|
12
|
+
}, 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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export var TimeLine = styled.div(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export var
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
export var CurrentTime = styled.div({
|
|
16
|
+
color: '#c7d1db',
|
|
17
|
+
userSelect: 'none',
|
|
18
|
+
marginRight: "var(--ds-space-100, 8px)",
|
|
19
|
+
whiteSpace: 'nowrap'
|
|
20
|
+
});
|
|
21
|
+
export var TimeLine = styled.div({
|
|
22
|
+
width: '100%',
|
|
23
|
+
height: '2px',
|
|
24
|
+
transitionDelay: '1s',
|
|
25
|
+
transition: 'all 0.1s',
|
|
26
|
+
backgroundColor: '#596773',
|
|
27
|
+
borderRadius: '5px',
|
|
28
|
+
position: 'relative'
|
|
29
|
+
});
|
|
30
|
+
export var CurrentTimeLine = styled.div({
|
|
31
|
+
backgroundColor: '#05c',
|
|
32
|
+
borderRadius: 'inherit',
|
|
33
|
+
height: 'inherit',
|
|
34
|
+
position: 'absolute',
|
|
35
|
+
top: "var(--ds-space-0, 0px)",
|
|
36
|
+
maxWidth: '100%',
|
|
37
|
+
display: 'flex',
|
|
38
|
+
alignItems: 'center'
|
|
39
|
+
});
|
|
40
|
+
export var Thumb = styled.div({
|
|
41
|
+
pointerEvents: 'none',
|
|
42
|
+
width: '14px',
|
|
43
|
+
height: '14px',
|
|
44
|
+
borderRadius: '100%',
|
|
45
|
+
backgroundColor: 'white',
|
|
46
|
+
border: '1px solid #666',
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
right: 0,
|
|
49
|
+
transform: 'translate(7px, -50%) scale(0)',
|
|
50
|
+
transition: 'all 0.1s',
|
|
51
|
+
transitionDelay: '1s',
|
|
52
|
+
'&:hover .current-time-tooltip': {
|
|
53
|
+
opacity: 1
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export var BufferedTime = styled.div({
|
|
57
|
+
backgroundColor: '#8696a7',
|
|
58
|
+
height: 'inherit',
|
|
59
|
+
borderRadius: 'inherit',
|
|
60
|
+
width: 0
|
|
61
|
+
});
|
|
62
|
+
export var LeftControls = styled.div({
|
|
63
|
+
display: 'flex',
|
|
64
|
+
marginLeft: "var(--ds-space-150, 12px)"
|
|
65
|
+
});
|
|
66
|
+
export var RightControls = styled.div({
|
|
67
|
+
display: 'flex',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
marginRight: "var(--ds-space-150, 12px)"
|
|
70
|
+
});
|
|
71
|
+
export var ControlsWrapper = styled.div({
|
|
72
|
+
bottom: 0,
|
|
73
|
+
left: 0,
|
|
74
|
+
width: '100%',
|
|
75
|
+
height: 'auto',
|
|
76
|
+
background: 'linear-gradient(to top, #101214, rgba(14, 22, 36, 0))',
|
|
77
|
+
position: 'absolute'
|
|
78
|
+
});
|
|
79
|
+
export var VolumeToggleWrapper = styled.div(function (_ref) {
|
|
35
80
|
var isMuted = _ref.isMuted;
|
|
36
|
-
return isMuted ?
|
|
81
|
+
return "\n position: relative;\n margin-right: 13px;\n button {\n width: 36px !important;\n color: ".concat(isMuted ? '#EF5C48 !important;' : '', "\n }");
|
|
37
82
|
});
|
|
38
|
-
export var VolumeTimeRangeWrapper = styled.div(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
83
|
+
export var VolumeTimeRangeWrapper = styled.div({
|
|
84
|
+
width: '100%',
|
|
85
|
+
marginRight: "var(--ds-space-250, 20px)"
|
|
86
|
+
});
|
|
87
|
+
export var MutedIndicator = styled.div({
|
|
88
|
+
width: '29px',
|
|
89
|
+
height: '2px',
|
|
90
|
+
position: 'absolute',
|
|
91
|
+
top: "var(--ds-space-100, 8px)",
|
|
92
|
+
left: "var(--ds-space-100, 8px)",
|
|
93
|
+
zIndex: 2,
|
|
94
|
+
background: R300,
|
|
95
|
+
transform: 'rotate(32deg) translateY(10px)',
|
|
96
|
+
opacity: 0,
|
|
97
|
+
pointerEvents: 'none'
|
|
98
|
+
}, function (props) {
|
|
42
99
|
return props.isMuted ? "\n opacity: 1;\n " : '';
|
|
43
100
|
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return
|
|
101
|
+
export var CurrentTimeTooltip = styled.div(function (_ref2) {
|
|
102
|
+
var isDragging = _ref2.isDragging;
|
|
103
|
+
return "\n position: absolute;\n user-select: none;\n top: ".concat("var(--ds-space-negative-400, -32px)", ";\n background-color: #182c4c;\n color: #eff1f3;\n font-size: ", "var(--ds-space-150, 12px)", ";\n padding: ", "var(--ds-space-050, 4px)", " ", "var(--ds-space-100, 8px)", ";\n border-radius: ", "var(--ds-space-050, 4px)", ";\n left: 50%;\n transform: translateX(-50%);\n opacity: ", isDragging ? '1' : '0', ";\n transition: opacity 0.3s;\n word-break: keep-all;\n");
|
|
47
104
|
});
|
|
48
|
-
export var TimeRangeWrapper = styled.div(function (
|
|
49
|
-
var showAsActive =
|
|
105
|
+
export var TimeRangeWrapper = styled.div(function (_ref3) {
|
|
106
|
+
var showAsActive = _ref3.showAsActive;
|
|
50
107
|
return "\n display: flex;\n align-items: center;\n height: 22px;\n\n cursor: pointer;\n width: 100%;\n\n &:hover ".concat(TimeLine, " {\n height: 4px;\n transition: all 0.1s;\n }\n\n &:hover ").concat(Thumb, " {\n transition: all 0.1s;\n transform: translate(7px, -50%) scale(1);\n }\n\n ").concat(TimeLine, " {\n transition-delay: 1s;\n ").concat(showAsActive ? 'height: 4px;' : '', "\n }\n ").concat(Thumb, " {\n ").concat(showAsActive ? 'transform: translate(7px, -50%) scale(1);' : '', "\n }\n");
|
|
51
|
-
});
|
|
52
|
-
export var SpinnerWrapper = styled.div(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
|
|
108
|
+
});
|
|
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _isNativeReflectConstruct() {
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Component } from 'react';
|
|
12
12
|
import { TimeLine, CurrentTimeLine, Thumb, BufferedTime, CurrentTimeTooltip, TimeRangeWrapper } from './styled';
|
|
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _isNativeReflectConstruct() {
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Component } from 'react';
|
|
12
12
|
import { hideControlsClassName } from '../classNames';
|
|
@@ -7,7 +7,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
7
7
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
8
8
|
var _templateObject;
|
|
9
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
|
-
function _isNativeReflectConstruct() {
|
|
10
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import styled from '@emotion/styled';
|
|
13
13
|
import ImageIcon from '@atlaskit/icon-file-type/glyph/image/24';
|
|
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _isNativeReflectConstruct() {
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import ReactDOM from 'react-dom';
|
|
12
12
|
import { Component } from 'react';
|
|
@@ -4,7 +4,15 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
4
4
|
var _excluded = ["style", "imageRef"];
|
|
5
5
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
7
8
|
import React from 'react';
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
TODO: https://product-fabric.atlassian.net/browse/CXP-3132
|
|
12
|
+
|
|
13
|
+
We need to revisit omitting percentage values for Design Token since the parent applies transform(-50%, -50%) on it (packages/media/media-ui/src/mediaImage/index.tsx). This styling is complex and may potentially cause a bug if not treaded carefully.
|
|
14
|
+
*/
|
|
15
|
+
|
|
8
16
|
var imgStyle = {
|
|
9
17
|
position: 'absolute',
|
|
10
18
|
left: '50%',
|
package/dist/esm/shortcut.js
CHANGED
|
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
|
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _isNativeReflectConstruct() {
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import { Component } from 'react';
|
|
11
11
|
export var keyCodes = {
|
|
12
12
|
space: 'Space',
|
|
@@ -4,7 +4,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
4
4
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
5
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
6
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
7
|
-
function _isNativeReflectConstruct() {
|
|
7
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
8
8
|
var globalImage = global.Image;
|
|
9
9
|
var isErrorInsteadOfLoad;
|
|
10
10
|
var MockImage = /*#__PURE__*/function (_global$Image) {
|
|
@@ -6,7 +6,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
6
6
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9
|
-
function _isNativeReflectConstruct() {
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
import { getJest } from '@atlaskit/media-common/test-helpers';
|
|
11
11
|
var jest = getJest();
|
|
12
12
|
var MockFileReader = /*#__PURE__*/_createClass(function MockFileReader() {
|
|
@@ -2,18 +2,6 @@
|
|
|
2
2
|
export interface MutedIndicatorProps {
|
|
3
3
|
isMuted: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const CustomVideoWrapper: import("@emotion/styled").StyledComponent<{
|
|
6
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
7
|
-
as?: import("react").ElementType<any> | undefined;
|
|
8
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
9
|
-
export declare const VideoWrapper: import("@emotion/styled").StyledComponent<{
|
|
10
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
-
as?: import("react").ElementType<any> | undefined;
|
|
12
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
-
export declare const TimebarWrapper: import("@emotion/styled").StyledComponent<{
|
|
14
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
-
as?: import("react").ElementType<any> | undefined;
|
|
16
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
5
|
type VolumeWrapperProps = {
|
|
18
6
|
showSlider: boolean;
|
|
19
7
|
};
|
|
@@ -21,10 +9,6 @@ export declare const VolumeWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
21
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
22
10
|
as?: import("react").ElementType<any> | undefined;
|
|
23
11
|
} & VolumeWrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
-
export declare const TimeWrapper: import("@emotion/styled").StyledComponent<{
|
|
25
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
-
as?: import("react").ElementType<any> | undefined;
|
|
27
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
28
12
|
export declare const CurrentTime: import("@emotion/styled").StyledComponent<{
|
|
29
13
|
theme?: import("@emotion/react").Theme | undefined;
|
|
30
14
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -83,8 +67,4 @@ export declare const TimeRangeWrapper: import("@emotion/styled").StyledComponent
|
|
|
83
67
|
theme?: import("@emotion/react").Theme | undefined;
|
|
84
68
|
as?: import("react").ElementType<any> | undefined;
|
|
85
69
|
} & WithAsActiveProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
86
|
-
export declare const SpinnerWrapper: import("@emotion/styled").StyledComponent<{
|
|
87
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
88
|
-
as?: import("react").ElementType<any> | undefined;
|
|
89
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
90
70
|
export {};
|
|
@@ -2,18 +2,6 @@
|
|
|
2
2
|
export interface MutedIndicatorProps {
|
|
3
3
|
isMuted: boolean;
|
|
4
4
|
}
|
|
5
|
-
export declare const CustomVideoWrapper: import("@emotion/styled").StyledComponent<{
|
|
6
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
7
|
-
as?: import("react").ElementType<any> | undefined;
|
|
8
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
9
|
-
export declare const VideoWrapper: import("@emotion/styled").StyledComponent<{
|
|
10
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
-
as?: import("react").ElementType<any> | undefined;
|
|
12
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
-
export declare const TimebarWrapper: import("@emotion/styled").StyledComponent<{
|
|
14
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
-
as?: import("react").ElementType<any> | undefined;
|
|
16
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
17
5
|
type VolumeWrapperProps = {
|
|
18
6
|
showSlider: boolean;
|
|
19
7
|
};
|
|
@@ -21,10 +9,6 @@ export declare const VolumeWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
21
9
|
theme?: import("@emotion/react").Theme | undefined;
|
|
22
10
|
as?: import("react").ElementType<any> | undefined;
|
|
23
11
|
} & VolumeWrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
-
export declare const TimeWrapper: import("@emotion/styled").StyledComponent<{
|
|
25
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
-
as?: import("react").ElementType<any> | undefined;
|
|
27
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
28
12
|
export declare const CurrentTime: import("@emotion/styled").StyledComponent<{
|
|
29
13
|
theme?: import("@emotion/react").Theme | undefined;
|
|
30
14
|
as?: import("react").ElementType<any> | undefined;
|
|
@@ -83,8 +67,4 @@ export declare const TimeRangeWrapper: import("@emotion/styled").StyledComponent
|
|
|
83
67
|
theme?: import("@emotion/react").Theme | undefined;
|
|
84
68
|
as?: import("react").ElementType<any> | undefined;
|
|
85
69
|
} & WithAsActiveProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
86
|
-
export declare const SpinnerWrapper: import("@emotion/styled").StyledComponent<{
|
|
87
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
88
|
-
as?: import("react").ElementType<any> | undefined;
|
|
89
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
90
70
|
export {};
|
|
@@ -2,70 +2,66 @@ import { token } from '@atlaskit/tokens';
|
|
|
2
2
|
import { N900 } from '@atlaskit/theme/colors';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
|
|
5
|
-
export const InputWrapper = styled.div
|
|
6
|
-
margin:
|
|
7
|
-
|
|
5
|
+
export const InputWrapper = styled.div({
|
|
6
|
+
margin: `${token('space.250', '20px')} 0`,
|
|
7
|
+
});
|
|
8
8
|
|
|
9
|
-
export const PreviewList = styled.ul
|
|
10
|
-
margin: 0
|
|
11
|
-
padding: 0
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
export const PreviewList = styled.ul({
|
|
10
|
+
margin: 0,
|
|
11
|
+
padding: 0,
|
|
12
|
+
listStyleType: 'none',
|
|
13
|
+
});
|
|
14
14
|
|
|
15
|
-
export const PreviewInfo = styled.pre
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
export const PreviewInfo = styled.pre({
|
|
16
|
+
fontSize: '80%',
|
|
17
|
+
});
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
border
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`;
|
|
19
|
+
export const PreviewItem = styled.li({
|
|
20
|
+
borderRadius: token('space.100', '8px'),
|
|
21
|
+
border: `1px solid ${token('color.border', '#ccc')}`,
|
|
22
|
+
padding: token('space.100', '8px'),
|
|
23
|
+
overflow: 'auto',
|
|
24
|
+
maxHeight: '600px',
|
|
25
|
+
position: 'relative',
|
|
26
|
+
marginBottom: token('space.100', '8px'),
|
|
27
|
+
});
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
`;
|
|
29
|
+
export const Code = styled.code({
|
|
30
|
+
padding: token('space.050', '4px'),
|
|
31
|
+
borderRadius: token('space.050', '4px'),
|
|
32
|
+
backgroundColor: token('color.background.inverse.subtle', '#0002'),
|
|
33
|
+
color: token('color.text', N900),
|
|
34
|
+
fontSize: '80%',
|
|
35
|
+
});
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
`;
|
|
37
|
+
export const CloseButton = styled.button({
|
|
38
|
+
position: 'absolute',
|
|
39
|
+
top: token('space.050', '4px'),
|
|
40
|
+
right: token('space.050', '4px'),
|
|
41
|
+
cursor: 'pointer',
|
|
42
|
+
});
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`;
|
|
44
|
+
export const PreviewImageContainer = styled.div({
|
|
45
|
+
marginTop: token('space.100', '8px'),
|
|
46
|
+
marginBottom: token('space.100', '8px'),
|
|
47
|
+
});
|
|
52
48
|
|
|
53
|
-
export const OrientationSelectWrapper = styled.label
|
|
54
|
-
|
|
55
|
-
display: block
|
|
56
|
-
|
|
49
|
+
export const OrientationSelectWrapper = styled.label({
|
|
50
|
+
marginBottom: token('space.250', '20px'),
|
|
51
|
+
display: 'block',
|
|
52
|
+
});
|
|
57
53
|
|
|
58
|
-
export const TimeRangeWrapper = styled.div
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
export const TimeRangeWrapper = styled.div({
|
|
55
|
+
marginTop: token('space.500', '40px'),
|
|
56
|
+
});
|
|
61
57
|
|
|
62
|
-
export const Container = styled.div
|
|
63
|
-
display: flex
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
export const Container = styled.div({
|
|
59
|
+
display: 'flex',
|
|
60
|
+
flexDirection: 'row',
|
|
61
|
+
flexWrap: 'wrap',
|
|
62
|
+
});
|
|
67
63
|
|
|
68
|
-
export const Group = styled.div
|
|
69
|
-
width: 250px
|
|
70
|
-
padding:
|
|
71
|
-
|
|
64
|
+
export const Group = styled.div({
|
|
65
|
+
width: '250px',
|
|
66
|
+
padding: token('space.250', '20px'),
|
|
67
|
+
});
|