@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.
Files changed (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/MediaInlineCard/ErroredView/index.js +1 -1
  3. package/dist/cjs/MediaInlineCard/Frame/index.js +1 -1
  4. package/dist/cjs/MediaInlineCard/IconAndTitleLayout/index.js +1 -1
  5. package/dist/cjs/MediaInlineCard/LoadedView/index.js +1 -1
  6. package/dist/cjs/MediaInlineCard/LoadingView/index.js +1 -1
  7. package/dist/cjs/camera.js +1 -1
  8. package/dist/cjs/customMediaPlayer/index.js +55 -10
  9. package/dist/cjs/customMediaPlayer/playbackSpeedControls.js +3 -3
  10. package/dist/cjs/customMediaPlayer/styled.js +98 -41
  11. package/dist/cjs/customMediaPlayer/timeRange.js +3 -3
  12. package/dist/cjs/ellipsify.js +2 -2
  13. package/dist/cjs/humanReadableSize.js +2 -2
  14. package/dist/cjs/imageMetaData/parseJPEG.js +2 -2
  15. package/dist/cjs/imageMetaData/parsePNG.js +2 -2
  16. package/dist/cjs/inactivityDetector/inactivityDetector.js +3 -3
  17. package/dist/cjs/index.js +2 -2
  18. package/dist/cjs/locales.js +2 -2
  19. package/dist/cjs/media-type-icon.js +1 -1
  20. package/dist/cjs/mediaImage/index.js +3 -3
  21. package/dist/cjs/mediaImage/styled.js +7 -0
  22. package/dist/cjs/shortcut.js +1 -1
  23. package/dist/cjs/test-helpers/MockGlobalImage.js +1 -1
  24. package/dist/cjs/test-helpers/fileReader.js +1 -1
  25. package/dist/es2019/customMediaPlayer/index.js +53 -8
  26. package/dist/es2019/customMediaPlayer/styled.js +105 -162
  27. package/dist/es2019/mediaImage/styled.js +8 -0
  28. package/dist/esm/MediaInlineCard/ErroredView/index.js +1 -1
  29. package/dist/esm/MediaInlineCard/Frame/index.js +1 -1
  30. package/dist/esm/MediaInlineCard/IconAndTitleLayout/index.js +1 -1
  31. package/dist/esm/MediaInlineCard/LoadedView/index.js +1 -1
  32. package/dist/esm/MediaInlineCard/LoadingView/index.js +1 -1
  33. package/dist/esm/camera.js +1 -1
  34. package/dist/esm/customMediaPlayer/index.js +54 -9
  35. package/dist/esm/customMediaPlayer/playbackSpeedControls.js +1 -1
  36. package/dist/esm/customMediaPlayer/styled.js +97 -41
  37. package/dist/esm/customMediaPlayer/timeRange.js +1 -1
  38. package/dist/esm/inactivityDetector/inactivityDetector.js +1 -1
  39. package/dist/esm/media-type-icon.js +1 -1
  40. package/dist/esm/mediaImage/index.js +1 -1
  41. package/dist/esm/mediaImage/styled.js +8 -0
  42. package/dist/esm/shortcut.js +1 -1
  43. package/dist/esm/test-helpers/MockGlobalImage.js +1 -1
  44. package/dist/esm/test-helpers/fileReader.js +1 -1
  45. package/dist/types/customMediaPlayer/styled.d.ts +0 -20
  46. package/dist/types-ts4.5/customMediaPlayer/styled.d.ts +0 -20
  47. package/example-helpers/styled.ts +53 -57
  48. 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() { 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; } }
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, VideoWrapper, CustomVideoWrapper, TimebarWrapper, VolumeWrapper, TimeWrapper, LeftControls, RightControls, ControlsWrapper, VolumeToggleWrapper, MutedIndicator, SpinnerWrapper, VolumeTimeRangeWrapper } from './styled';
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.0";
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(SpinnerWrapper, null, /*#__PURE__*/React.createElement(Spinner, {
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(CustomVideoWrapper, {
608
+ return /*#__PURE__*/React.createElement(Box, {
609
+ xcss: customVideoWrapperStyles,
574
610
  ref: this.videoWrapperRef,
575
- "data-testid": "custom-media-player"
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(VideoWrapper, null, /*#__PURE__*/React.createElement(WidthObserver, {
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(TimeWrapper, null, /*#__PURE__*/React.createElement(TimeRange, {
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(TimebarWrapper, null, /*#__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()))));
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() { 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; } }
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 CustomVideoWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n user-select: none;\n"])));
7
- export var VideoWrapper = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n"])));
8
-
9
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
10
- export var TimebarWrapper = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n color: white;\n position: absolute;\n width: 100%;\n bottom: 10px;\n"])));
11
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
12
- export var VolumeWrapper = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n width: 35px;\n overflow: hidden;\n transition: width 0.3s;\n align-items: center;\n bottom: 0px;\n left: 43px;\n\n ", "\n"])), function (props) {
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
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
17
- export var TimeWrapper = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 0 ", " 10px ", ";\n margin-bottom: 44px;\n"])), "var(--ds-space-250, 20px)", "var(--ds-space-250, 20px)");
18
-
19
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
20
- export var CurrentTime = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: #c7d1db;\n user-select: none;\n margin-right: 10px;\n white-space: nowrap;\n"])));
21
- export var TimeLine = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: 100%;\n height: 2px;\n transition-delay: 1s;\n transition: all 0.1s;\n background-color: #596773;\n border-radius: 5px;\n position: relative;\n"])));
22
- export var CurrentTimeLine = styled.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n background-color: #05c;\n border-radius: inherit;\n height: inherit;\n position: absolute;\n top: 0;\n max-width: 100%;\n"])));
23
- export var Thumb = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n pointer-events: none;\n width: 14px;\n height: 14px;\n border-radius: 100%;\n background-color: white;\n border: 1px solid #666;\n position: absolute;\n right: 0;\n top: 50%;\n\n transform: translate(7px, -50%) scale(0);\n transition: all 0.1s;\n transition-delay: 1s;\n\n &:hover .current-time-tooltip {\n opacity: 1;\n }\n"])));
24
- export var BufferedTime = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: #8696a7;\n height: inherit;\n border-radius: inherit;\n width: 0;\n"])));
25
-
26
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
27
- export var LeftControls = styled.div(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n display: flex;\n margin-left: 10px;\n"])));
28
-
29
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
30
- export var RightControls = styled.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin-right: 10px;\n color: '#c7d1db';\n"])));
31
- export var ControlsWrapper = styled.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n bottom: 0;\n left: 0;\n width: 100%;\n height: auto;\n background: linear-gradient(to top, #101214, rgba(14, 22, 36, 0));\n position: absolute;\n"])));
32
-
33
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
34
- export var VolumeToggleWrapper = styled.div(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n position: relative;\n margin-right: 13px;\n\n button {\n width: 36px !important;\n color: ", ";\n }\n"])), function (_ref) {
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 ? "#EF5C48 !important;" : '';
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(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n width: 100%;\n margin-right: ", ";\n"])), "var(--ds-space-250, 20px)");
39
-
40
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
41
- export var MutedIndicator = styled.div(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n width: 29px;\n height: 2px;\n position: absolute;\n top: 10px;\n left: 9px;\n z-index: 2;\n background: ", ";\n transform: rotate(32deg) translateY(10px);\n opacity: 0;\n pointer-events: none;\n\n ", ";\n"])), R300, function (props) {
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
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
45
- export var CurrentTimeTooltip = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n position: absolute;\n user-select: none;\n top: -28px;\n background-color: #182c4c;\n color: #eff1f3;\n font-size: 12px;\n padding: 3px 7px;\n border-radius: 3px;\n left: 50%;\n transform: translateX(-50%);\n opacity: ", ";\n transition: opacity 0.3s;\n word-break: keep-all;\n"])), function (props) {
46
- return props.isDragging ? '1' : '0';
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 (_ref2) {
49
- var showAsActive = _ref2.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() { 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; } }
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() { 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; } }
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() { 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; } }
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() { 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; } }
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%',
@@ -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() { 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; } }
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() { 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; } }
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() { 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; } }
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: ${token('space.250', '20px')} 0;
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
- list-style-type: none;
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
- font-size: 80%;
17
- `;
15
+ export const PreviewInfo = styled.pre({
16
+ fontSize: '80%',
17
+ });
18
18
 
19
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
20
- export const PreviewItem = styled.li`
21
- border-radius: 10px;
22
- border: 1px solid ${token('color.border', '#ccc')};
23
- padding: 10px;
24
- overflow: auto;
25
- max-height: 600px;
26
- position: relative;
27
- margin-bottom: 10px;
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
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
31
- export const Code = styled.code`
32
- padding: 5px;
33
- border-radius: 5px;
34
- background-color: ${token('color.background.inverse.subtle', '#0002')};
35
- color: ${token('color.text', N900)};
36
- font-size: 80%;
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
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
40
- export const CloseButton = styled.button`
41
- position: absolute;
42
- top: 5px;
43
- right: 5px;
44
- cursor: pointer;
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
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
48
- export const PreviewImageContainer = styled.div`
49
- margin-top: 10px;
50
- margin-bottom: 10px;
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
- margin-bottom: ${token('space.250', '20px')};
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
- margin-top: ${token('space.500', '40px')};
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
- flex-direction: row;
65
- flex-wrap: wrap;
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: ${token('space.250', '20px')};
71
- `;
64
+ export const Group = styled.div({
65
+ width: '250px',
66
+ padding: token('space.250', '20px'),
67
+ });