@atlaskit/media-viewer 47.1.2 → 47.2.1
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 +19 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/components/media-viewer-loader.js +13 -6
- package/dist/cjs/header.js +6 -1
- package/dist/cjs/list.js +17 -5
- package/dist/cjs/navigation.js +16 -8
- package/dist/cjs/styleWrappers.js +11 -5
- package/dist/cjs/styles.js +33 -23
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/viewers/archiveSidebar/archive-sidebar-folder-entry.js +30 -16
- package/dist/cjs/viewers/archiveSidebar/archive.js +2 -1
- package/dist/cjs/viewers/archiveSidebar/archiveViewerLoader.js +4 -4
- package/dist/cjs/viewers/archiveSidebar/styles.js +15 -11
- package/dist/cjs/viewers/audio.js +3 -1
- package/dist/cjs/viewers/codeViewer/styles.js +8 -2
- package/dist/cjs/viewers/doc/pdfRenderer.js +4 -0
- package/dist/cjs/viewers/image/interactive-img.js +4 -2
- package/dist/cjs/viewers/useThemeObserverHoc.js +26 -0
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/components/media-viewer-loader.js +11 -5
- package/dist/es2019/header.js +6 -1
- package/dist/es2019/list.js +12 -5
- package/dist/es2019/navigation.js +16 -7
- package/dist/es2019/styleWrappers.js +17 -9
- package/dist/es2019/styles.js +48 -25
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/viewers/archiveSidebar/archive-sidebar-folder-entry.js +30 -7
- package/dist/es2019/viewers/archiveSidebar/archive.js +4 -1
- package/dist/es2019/viewers/archiveSidebar/archiveViewerLoader.js +3 -3
- package/dist/es2019/viewers/archiveSidebar/styles.js +21 -14
- package/dist/es2019/viewers/audio.js +3 -1
- package/dist/es2019/viewers/codeViewer/styles.js +7 -2
- package/dist/es2019/viewers/doc/pdfRenderer.js +4 -0
- package/dist/es2019/viewers/image/interactive-img.js +4 -2
- package/dist/es2019/viewers/useThemeObserverHoc.js +14 -0
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/components/media-viewer-loader.js +7 -6
- package/dist/esm/header.js +6 -1
- package/dist/esm/list.js +17 -5
- package/dist/esm/navigation.js +17 -7
- package/dist/esm/styleWrappers.js +12 -6
- package/dist/esm/styles.js +28 -21
- package/dist/esm/version.json +1 -1
- package/dist/esm/viewers/archiveSidebar/archive-sidebar-folder-entry.js +30 -14
- package/dist/esm/viewers/archiveSidebar/archive.js +4 -1
- package/dist/esm/viewers/archiveSidebar/archiveViewerLoader.js +3 -3
- package/dist/esm/viewers/archiveSidebar/styles.js +15 -12
- package/dist/esm/viewers/audio.js +3 -1
- package/dist/esm/viewers/codeViewer/styles.js +7 -2
- package/dist/esm/viewers/doc/pdfRenderer.js +4 -0
- package/dist/esm/viewers/image/interactive-img.js +4 -2
- package/dist/esm/viewers/useThemeObserverHoc.js +14 -0
- package/dist/types/components/media-viewer-loader.d.ts +5 -2
- package/dist/types/header.d.ts +1 -0
- package/dist/types/list.d.ts +1 -0
- package/dist/types/navigation.d.ts +1 -0
- package/dist/types/styleWrappers.d.ts +8 -2
- package/dist/types/styles.d.ts +10 -4
- package/dist/types/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +6 -4
- package/dist/types/viewers/archiveSidebar/styles.d.ts +4 -1
- package/dist/types/viewers/useThemeObserverHoc.d.ts +3 -0
- package/example-helpers/styles.ts +2 -1
- package/package.json +16 -17
- package/report.api.md +46 -52
- package/dist/types-ts4.0/analytics/events/index.d.ts +0 -14
- package/dist/types-ts4.0/analytics/events/operational/_mediaFile.d.ts +0 -3
- package/dist/types-ts4.0/analytics/events/operational/commenced.d.ts +0 -5
- package/dist/types-ts4.0/analytics/events/operational/loadFailed.d.ts +0 -6
- package/dist/types-ts4.0/analytics/events/operational/loadSucceeded.d.ts +0 -5
- package/dist/types-ts4.0/analytics/events/operational/previewUnsupported.d.ts +0 -6
- package/dist/types-ts4.0/analytics/events/operational/zipEntryLoadFailed.d.ts +0 -13
- package/dist/types-ts4.0/analytics/events/operational/zipEntryLoadSucceeded.d.ts +0 -12
- package/dist/types-ts4.0/analytics/events/screen/modal.d.ts +0 -3
- package/dist/types-ts4.0/analytics/events/ui/_clickedButton.d.ts +0 -2
- package/dist/types-ts4.0/analytics/events/ui/closed.d.ts +0 -8
- package/dist/types-ts4.0/analytics/events/ui/downloadButtonClicked.d.ts +0 -8
- package/dist/types-ts4.0/analytics/events/ui/failedPreviewDownloadButtonClicked.d.ts +0 -10
- package/dist/types-ts4.0/analytics/events/ui/navigated.d.ts +0 -12
- package/dist/types-ts4.0/analytics/events/ui/zoomInButtonClicked.d.ts +0 -8
- package/dist/types-ts4.0/analytics/events/ui/zoomOutButtonClicked.d.ts +0 -6
- package/dist/types-ts4.0/analytics/index.d.ts +0 -28
- package/dist/types-ts4.0/analytics/ufoExperiences.d.ts +0 -19
- package/dist/types-ts4.0/classnames.d.ts +0 -5
- package/dist/types-ts4.0/collection.d.ts +0 -36
- package/dist/types-ts4.0/components/media-viewer-analytics-error-boundary.d.ts +0 -10
- package/dist/types-ts4.0/components/media-viewer-loader.d.ts +0 -20
- package/dist/types-ts4.0/components/media-viewer.d.ts +0 -7
- package/dist/types-ts4.0/components/types.d.ts +0 -31
- package/dist/types-ts4.0/content.d.ts +0 -10
- package/dist/types-ts4.0/domain/index.d.ts +0 -10
- package/dist/types-ts4.0/domain/outcome.d.ts +0 -32
- package/dist/types-ts4.0/domain/zoomLevel.d.ts +0 -15
- package/dist/types-ts4.0/download.d.ts +0 -24
- package/dist/types-ts4.0/error-images.d.ts +0 -2
- package/dist/types-ts4.0/errorMessage.d.ts +0 -29
- package/dist/types-ts4.0/errors.d.ts +0 -23
- package/dist/types-ts4.0/header.d.ts +0 -40
- package/dist/types-ts4.0/index.d.ts +0 -2
- package/dist/types-ts4.0/item-viewer.d.ts +0 -44
- package/dist/types-ts4.0/list.d.ts +0 -27
- package/dist/types-ts4.0/loading.d.ts +0 -2
- package/dist/types-ts4.0/media-viewer.d.ts +0 -33
- package/dist/types-ts4.0/navigation.d.ts +0 -19
- package/dist/types-ts4.0/styleWrappers.d.ts +0 -114
- package/dist/types-ts4.0/styles.d.ts +0 -57
- package/dist/types-ts4.0/utils/closeOnDirectClick.d.ts +0 -2
- package/dist/types-ts4.0/utils/getIdentifierCollection.d.ts +0 -2
- package/dist/types-ts4.0/utils/getObjectUrlFromFileState.d.ts +0 -2
- package/dist/types-ts4.0/utils/index.d.ts +0 -10
- package/dist/types-ts4.0/utils/isIE.d.ts +0 -1
- package/dist/types-ts4.0/viewers/archiveSidebar/archive-sidebar-folder-entry.d.ts +0 -25
- package/dist/types-ts4.0/viewers/archiveSidebar/archive-sidebar-header.d.ts +0 -9
- package/dist/types-ts4.0/viewers/archiveSidebar/archive-sidebar-renderer.d.ts +0 -26
- package/dist/types-ts4.0/viewers/archiveSidebar/archive-sidebar.d.ts +0 -26
- package/dist/types-ts4.0/viewers/archiveSidebar/archive.d.ts +0 -37
- package/dist/types-ts4.0/viewers/archiveSidebar/archiveViewerLoader.d.ts +0 -12
- package/dist/types-ts4.0/viewers/archiveSidebar/consts.d.ts +0 -2
- package/dist/types-ts4.0/viewers/archiveSidebar/styleWrappers.d.ts +0 -24
- package/dist/types-ts4.0/viewers/archiveSidebar/styles.d.ts +0 -23
- package/dist/types-ts4.0/viewers/archiveSidebar/types.d.ts +0 -9
- package/dist/types-ts4.0/viewers/audio.d.ts +0 -31
- package/dist/types-ts4.0/viewers/base-viewer.d.ts +0 -28
- package/dist/types-ts4.0/viewers/codeViewer/codeViewerRenderer.d.ts +0 -31
- package/dist/types-ts4.0/viewers/codeViewer/index.d.ts +0 -25
- package/dist/types-ts4.0/viewers/codeViewer/msg-parser.d.ts +0 -8
- package/dist/types-ts4.0/viewers/codeViewer/styles.d.ts +0 -3
- package/dist/types-ts4.0/viewers/codeViewer/util.d.ts +0 -4
- package/dist/types-ts4.0/viewers/doc/index.d.ts +0 -27
- package/dist/types-ts4.0/viewers/doc/pdfRenderer.d.ts +0 -30
- package/dist/types-ts4.0/viewers/image/index.d.ts +0 -32
- package/dist/types-ts4.0/viewers/image/interactive-img.d.ts +0 -41
- package/dist/types-ts4.0/viewers/video.d.ts +0 -30
- package/dist/types-ts4.0/zoomControls.d.ts +0 -15
|
@@ -13,11 +13,17 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _theme = require("@atlaskit/theme");
|
|
15
15
|
|
|
16
|
+
var _tokens = require("@atlaskit/tokens");
|
|
17
|
+
|
|
16
18
|
var _templateObject, _templateObject2, _templateObject3;
|
|
17
19
|
|
|
18
|
-
var codeViewWrapperStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: ", ";\n overflow: auto;\n"])), _theme.colors.N20);
|
|
20
|
+
var codeViewWrapperStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n background-color: ", ";\n overflow: auto;\n"])), (0, _tokens.token)('elevation.surface', _theme.colors.N20));
|
|
21
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
22
|
+
|
|
19
23
|
exports.codeViewWrapperStyles = codeViewWrapperStyles;
|
|
20
|
-
var codeViewerHeaderBarStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 75px;\n background-color: #
|
|
24
|
+
var codeViewerHeaderBarStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 75px;\n background-color: #1d2125;\n"])));
|
|
25
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
26
|
+
|
|
21
27
|
exports.codeViewerHeaderBarStyles = codeViewerHeaderBarStyles;
|
|
22
28
|
var codeViewerHTMLStyles = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n line-height: 20px;\n overflow-x: auto;\n white-space: pre;\n font-size: 12px;\n padding: 8px;\n"])));
|
|
23
29
|
exports.codeViewerHTMLStyles = codeViewerHTMLStyles;
|
|
@@ -64,10 +64,14 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
64
64
|
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; } }
|
|
65
65
|
|
|
66
66
|
var pdfViewerClassName = 'pdfViewer';
|
|
67
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
68
|
+
|
|
67
69
|
exports.pdfViewerClassName = pdfViewerClassName;
|
|
68
70
|
var globalStyles = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n margin-top: 64px;\n margin-bottom: 64px;\n .page {\n margin: 1px auto -8px auto;\n border: 9px solid transparent;\n position: relative;\n\n .canvasWrapper {\n overflow: hidden;\n }\n\n .textLayer {\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n line-height: 1;\n font-family: sans-serif;\n opacity: 0.8;\n\n ::selection {\n background: rgb(0, 0, 255);\n }\n }\n\n .annotationLayer {\n position: absolute;\n top: 0;\n bottom: 0;\n }\n\n .textLayer > div,\n .annotationLayer > section {\n color: transparent;\n position: absolute;\n white-space: pre;\n cursor: text;\n transform-origin: 0% 0%;\n }\n .linkAnnotation > a {\n position: absolute;\n font-size: 1em;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n .linkAnnotation > a {\n background: url('data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7')\n 0 0 repeat;\n }\n\n .linkAnnotation > a:hover {\n opacity: 0.2;\n background: #ff0;\n box-shadow: 0 2px 10px #ff0;\n }\n }\n }\n"])), pdfViewerClassName);
|
|
69
71
|
/* eslint-enable no-unused-expressions */
|
|
70
72
|
|
|
73
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
74
|
+
|
|
71
75
|
pdfjsLib.GlobalWorkerOptions.workerSrc = '/'; // TODO: use web workers instead of fake worker.
|
|
72
76
|
|
|
73
77
|
var fetchPdf = function fetchPdf(url) {
|
|
@@ -274,9 +274,11 @@ var InteractiveImgComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
274
274
|
|
|
275
275
|
if (!isHDAvailable) {
|
|
276
276
|
return null;
|
|
277
|
-
}
|
|
277
|
+
} // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
var hdPrimaryColor = isHDActivating ? _colors.B75 : isHDActive ? _colors.B200 : _colors.DN400; // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
278
281
|
|
|
279
|
-
var hdPrimaryColor = isHDActivating ? _colors.B75 : isHDActive ? _colors.B200 : _colors.DN400;
|
|
280
282
|
var hdSecondaryColor = isHDActive && !isHDActivating ? _colors.N0 : _colors.DN60;
|
|
281
283
|
var testId = isHDActivating ? 'hd-activating' : isHDActive ? 'hd-active' : 'hd-inactive';
|
|
282
284
|
return /*#__PURE__*/_react.default.createElement(_styleWrappers.HDIconGroupWrapper, {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
|
|
14
|
+
var _tokens = require("@atlaskit/tokens");
|
|
15
|
+
|
|
16
|
+
var withThemeObserverHOC = function withThemeObserverHOC(Component) {
|
|
17
|
+
return function (props) {
|
|
18
|
+
var theme = (0, _tokens.useThemeObserver)();
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(Component, (0, _extends2.default)({
|
|
20
|
+
theme: theme
|
|
21
|
+
}, props));
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var _default = withThemeObserverHOC;
|
|
26
|
+
exports.default = _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { filterFeatureFlagNames, filterFeatureFlagKeysAllProducts, ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
|
|
2
2
|
const componentName = 'mediaViewer';
|
|
3
3
|
const packageName = "@atlaskit/media-viewer";
|
|
4
|
-
const packageVersion = "47.1
|
|
4
|
+
const packageVersion = "47.2.1";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export const relevantFlags = {
|
|
7
7
|
newCardExperience: false,
|
|
@@ -2,7 +2,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
2
2
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
3
3
|
import { LOGGED_FEATURE_FLAG_KEYS } from '.';
|
|
4
4
|
const packageName = "@atlaskit/media-viewer";
|
|
5
|
-
const packageVersion = "47.1
|
|
5
|
+
const packageVersion = "47.2.1";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
|
|
8
8
|
const getExperience = () => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ModalSpinner } from '@atlaskit/media-ui';
|
|
4
|
-
import
|
|
5
|
-
|
|
4
|
+
import { headerAndSidebarBackgroundColor } from '../styles';
|
|
5
|
+
import withThemeObserverHOC from '../viewers/useThemeObserverHoc';
|
|
6
|
+
export class AsyncMediaViewer extends React.PureComponent {
|
|
6
7
|
constructor(...args) {
|
|
7
8
|
super(...args);
|
|
8
9
|
|
|
@@ -36,6 +37,9 @@ export default class AsyncMediaViewer extends React.PureComponent {
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
render() {
|
|
40
|
+
const {
|
|
41
|
+
theme
|
|
42
|
+
} = this.props;
|
|
39
43
|
const {
|
|
40
44
|
MediaViewer,
|
|
41
45
|
MediaViewerErrorBoundary
|
|
@@ -43,8 +47,8 @@ export default class AsyncMediaViewer extends React.PureComponent {
|
|
|
43
47
|
|
|
44
48
|
if (!MediaViewer || !MediaViewerErrorBoundary) {
|
|
45
49
|
return /*#__PURE__*/React.createElement(ModalSpinner, {
|
|
46
|
-
blankedColor:
|
|
47
|
-
invertSpinnerColor:
|
|
50
|
+
blankedColor: headerAndSidebarBackgroundColor,
|
|
51
|
+
invertSpinnerColor: theme !== 'dark'
|
|
48
52
|
});
|
|
49
53
|
}
|
|
50
54
|
|
|
@@ -53,4 +57,6 @@ export default class AsyncMediaViewer extends React.PureComponent {
|
|
|
53
57
|
|
|
54
58
|
}
|
|
55
59
|
|
|
56
|
-
_defineProperty(AsyncMediaViewer, "displayName", 'AsyncMediaViewer');
|
|
60
|
+
_defineProperty(AsyncMediaViewer, "displayName", 'AsyncMediaViewer');
|
|
61
|
+
|
|
62
|
+
export default withThemeObserverHOC(AsyncMediaViewer);
|
package/dist/es2019/header.js
CHANGED
|
@@ -133,7 +133,8 @@ export class Header extends React.Component {
|
|
|
133
133
|
this.setState(initialState, () => {
|
|
134
134
|
const {
|
|
135
135
|
mediaClient,
|
|
136
|
-
identifier
|
|
136
|
+
identifier,
|
|
137
|
+
onSetArchiveSideBarVisible
|
|
137
138
|
} = props;
|
|
138
139
|
|
|
139
140
|
if (isExternalImageIdentifier(identifier)) {
|
|
@@ -163,6 +164,10 @@ export class Header extends React.Component {
|
|
|
163
164
|
collectionName: identifier.collectionName
|
|
164
165
|
}).subscribe({
|
|
165
166
|
next: file => {
|
|
167
|
+
if (!isErrorFileState(file) && file.mediaType === 'archive' && onSetArchiveSideBarVisible) {
|
|
168
|
+
onSetArchiveSideBarVisible(true);
|
|
169
|
+
}
|
|
170
|
+
|
|
166
171
|
this.setState({
|
|
167
172
|
item: Outcome.successful(file)
|
|
168
173
|
});
|
package/dist/es2019/list.js
CHANGED
|
@@ -11,7 +11,8 @@ export class List extends React.Component {
|
|
|
11
11
|
|
|
12
12
|
_defineProperty(this, "state", {
|
|
13
13
|
selectedItem: this.props.defaultSelectedItem,
|
|
14
|
-
previewCount: 0
|
|
14
|
+
previewCount: 0,
|
|
15
|
+
isArchiveSideBarVisible: false
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
_defineProperty(this, "onNavigationChange", selectedItem => {
|
|
@@ -54,10 +55,12 @@ export class List extends React.Component {
|
|
|
54
55
|
featureFlags
|
|
55
56
|
} = this.props;
|
|
56
57
|
const {
|
|
57
|
-
selectedItem
|
|
58
|
+
selectedItem,
|
|
59
|
+
isArchiveSideBarVisible
|
|
58
60
|
} = this.state;
|
|
59
61
|
return /*#__PURE__*/React.createElement(ListWrapper, null, /*#__PURE__*/React.createElement(HeaderWrapper, {
|
|
60
|
-
className: hideControlsClassName
|
|
62
|
+
className: hideControlsClassName,
|
|
63
|
+
isArchiveSideBarVisible: isArchiveSideBarVisible
|
|
61
64
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
62
65
|
mediaClient: mediaClient,
|
|
63
66
|
identifier: selectedItem,
|
|
@@ -65,7 +68,10 @@ export class List extends React.Component {
|
|
|
65
68
|
extensions: extensions,
|
|
66
69
|
onSidebarButtonClick: onSidebarButtonClick,
|
|
67
70
|
isSidebarVisible: isSidebarVisible,
|
|
68
|
-
featureFlags: featureFlags
|
|
71
|
+
featureFlags: featureFlags,
|
|
72
|
+
onSetArchiveSideBarVisible: isVisible => this.setState({
|
|
73
|
+
isArchiveSideBarVisible: isVisible
|
|
74
|
+
})
|
|
69
75
|
})), /*#__PURE__*/React.createElement(ItemViewer, {
|
|
70
76
|
mediaClient: mediaClient,
|
|
71
77
|
identifier: selectedItem,
|
|
@@ -77,7 +83,8 @@ export class List extends React.Component {
|
|
|
77
83
|
}), /*#__PURE__*/React.createElement(Navigation, {
|
|
78
84
|
items: items,
|
|
79
85
|
selectedItem: selectedItem,
|
|
80
|
-
onChange: this.onNavigationChange
|
|
86
|
+
onChange: this.onNavigationChange,
|
|
87
|
+
isArchiveSideBarVisible: isArchiveSideBarVisible
|
|
81
88
|
}));
|
|
82
89
|
}
|
|
83
90
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { Component } from 'react';
|
|
3
4
|
import ArrowLeftCircleIcon from '@atlaskit/icon/glyph/chevron-left-circle';
|
|
4
5
|
import ArrowRightCircleIcon from '@atlaskit/icon/glyph/chevron-right-circle';
|
|
5
|
-
import { N800 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { hideControlsClassName } from '@atlaskit/media-ui';
|
|
7
7
|
import Button from '@atlaskit/button/standard-button';
|
|
8
8
|
import { Shortcut } from '@atlaskit/media-ui';
|
|
@@ -42,7 +42,8 @@ export class NavigationBase extends Component {
|
|
|
42
42
|
|
|
43
43
|
render() {
|
|
44
44
|
const {
|
|
45
|
-
items
|
|
45
|
+
items,
|
|
46
|
+
isArchiveSideBarVisible
|
|
46
47
|
} = this.props;
|
|
47
48
|
const {
|
|
48
49
|
selectedIndex
|
|
@@ -59,7 +60,9 @@ export class NavigationBase extends Component {
|
|
|
59
60
|
|
|
60
61
|
const next = source => this.navigate('next', source);
|
|
61
62
|
|
|
62
|
-
return /*#__PURE__*/React.createElement(ArrowsWrapper, null, /*#__PURE__*/React.createElement(LeftWrapper,
|
|
63
|
+
return /*#__PURE__*/React.createElement(ArrowsWrapper, null, /*#__PURE__*/React.createElement(LeftWrapper, {
|
|
64
|
+
isArchiveSideBarVisible: !!isArchiveSideBarVisible
|
|
65
|
+
}, isLeftVisible ? /*#__PURE__*/React.createElement(Arrow, {
|
|
63
66
|
className: hideControlsClassName
|
|
64
67
|
}, /*#__PURE__*/React.createElement(Shortcut, {
|
|
65
68
|
keyCode: 37,
|
|
@@ -67,8 +70,11 @@ export class NavigationBase extends Component {
|
|
|
67
70
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
68
71
|
testId: prevNavButtonId,
|
|
69
72
|
onClick: prev('mouse'),
|
|
70
|
-
iconBefore: /*#__PURE__*/React.createElement(ArrowLeftCircleIcon
|
|
71
|
-
|
|
73
|
+
iconBefore: /*#__PURE__*/React.createElement(ArrowLeftCircleIcon // DN800
|
|
74
|
+
, {
|
|
75
|
+
primaryColor: "#9FADBC" // DN0
|
|
76
|
+
,
|
|
77
|
+
secondaryColor: "#161A1D",
|
|
72
78
|
size: "xlarge",
|
|
73
79
|
label: "Previous"
|
|
74
80
|
})
|
|
@@ -80,8 +86,11 @@ export class NavigationBase extends Component {
|
|
|
80
86
|
}), /*#__PURE__*/React.createElement(Button, {
|
|
81
87
|
testId: nextNavButtonId,
|
|
82
88
|
onClick: next('mouse'),
|
|
83
|
-
iconBefore: /*#__PURE__*/React.createElement(ArrowRightCircleIcon
|
|
84
|
-
|
|
89
|
+
iconBefore: /*#__PURE__*/React.createElement(ArrowRightCircleIcon // DN800
|
|
90
|
+
, {
|
|
91
|
+
primaryColor: "#9FADBC" // DN0
|
|
92
|
+
,
|
|
93
|
+
secondaryColor: "#161A1D",
|
|
85
94
|
size: "xlarge",
|
|
86
95
|
label: "Next"
|
|
87
96
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
3
|
import { forwardRef, useMemo } from 'react';
|
|
4
|
-
import { arrowStyles, arrowsWrapperStyles, audioCoverStyles, audioPlayerStyles, audioStyles, baselineExtendStyles, blanketStyles, closeButtonWrapperStyles, contentWrapperStyles, customAudioPlayerWrapperStyles, customVideoPlayerWrapperStyles, downloadButtonWrapperStyles, errorImageStyles, errorMessageWrapperStyles, formattedMessageWrapperStyles, hdIconGroupWrapperStyles, hdIconWrapperStyles, headerStyles, headerWrapperStyles, imageWrapperStyles, imgStyles, leftHeaderStyles, leftWrapperStyles, listWrapperStyles, medatadataTextWrapperStyles, metadataFileNameStyles, metadataIconWrapperStyles, metadataSubTextStyles, metadataWrapperStyles, pdfWrapperStyles, rightHeaderStyles, rightWrapperStyles, sidebarWrapperStyles, spinnerWrapperStyles, videoStyles, zoomControlsWrapperStyles, zoomLevelIndicatorStyles, zoomWrapperStyles } from './styles';
|
|
4
|
+
import { arrowStyles, arrowsWrapperStyles, audioCoverStyles, audioPlayerStyles, audioStyles, baselineExtendStyles, blanketStyles, closeButtonWrapperStyles, contentWrapperStyles, customAudioPlayerWrapperStyles, customVideoPlayerWrapperStyles, defaultCoverWrapperStyles, downloadButtonWrapperStyles, errorImageStyles, errorMessageWrapperStyles, formattedMessageWrapperStyles, hdIconGroupWrapperStyles, hdIconWrapperStyles, headerStyles, headerWrapperStyles, imageWrapperStyles, imgStyles, leftHeaderStyles, leftWrapperStyles, listWrapperStyles, medatadataTextWrapperStyles, metadataFileNameStyles, metadataIconWrapperStyles, metadataSubTextStyles, metadataWrapperStyles, pdfWrapperStyles, rightHeaderStyles, rightWrapperStyles, sidebarWrapperStyles, spinnerWrapperStyles, videoStyles, zoomControlsWrapperStyles, zoomLevelIndicatorStyles, zoomWrapperStyles } from './styles';
|
|
5
5
|
export const Blanket = ({
|
|
6
6
|
'data-testid': datatestId,
|
|
7
7
|
className,
|
|
@@ -13,11 +13,16 @@ export const Blanket = ({
|
|
|
13
13
|
}, children);
|
|
14
14
|
export const HeaderWrapper = ({
|
|
15
15
|
className,
|
|
16
|
-
children
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
children,
|
|
17
|
+
isArchiveSideBarVisible
|
|
18
|
+
}) => {
|
|
19
|
+
return jsx("div", {
|
|
20
|
+
css: headerWrapperStyles({
|
|
21
|
+
isArchiveSideBarVisible
|
|
22
|
+
}),
|
|
23
|
+
className: className
|
|
24
|
+
}, children);
|
|
25
|
+
};
|
|
21
26
|
HeaderWrapper.displayName = 'HeaderWrapper';
|
|
22
27
|
export const ListWrapper = ({
|
|
23
28
|
children
|
|
@@ -116,9 +121,12 @@ export const Arrow = ({
|
|
|
116
121
|
className: className
|
|
117
122
|
}, children);
|
|
118
123
|
export const LeftWrapper = ({
|
|
119
|
-
children
|
|
124
|
+
children,
|
|
125
|
+
isArchiveSideBarVisible
|
|
120
126
|
}) => jsx("div", {
|
|
121
|
-
css: leftWrapperStyles
|
|
127
|
+
css: leftWrapperStyles({
|
|
128
|
+
isArchiveSideBarVisible
|
|
129
|
+
})
|
|
122
130
|
}, children);
|
|
123
131
|
export const RightWrapper = ({
|
|
124
132
|
children
|
|
@@ -265,7 +273,7 @@ export const AudioCover = ({
|
|
|
265
273
|
export const DefaultCoverWrapper = ({
|
|
266
274
|
children
|
|
267
275
|
}) => jsx("div", {
|
|
268
|
-
css:
|
|
276
|
+
css: defaultCoverWrapperStyles
|
|
269
277
|
}, children);
|
|
270
278
|
export const DownloadButtonWrapper = ({
|
|
271
279
|
children
|
package/dist/es2019/styles.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
1
2
|
import { css } from '@emotion/react';
|
|
2
3
|
import { layers, borderRadius } from '@atlaskit/theme/constants';
|
|
3
|
-
import {
|
|
4
|
+
import { token } from '@atlaskit/tokens';
|
|
4
5
|
import { ellipsis, hideControlsClassName } from '@atlaskit/media-ui';
|
|
5
6
|
import { ArchiveSideBarWidth } from './viewers/archiveSidebar/styles';
|
|
6
7
|
const overlayZindex = layers.modal() + 10;
|
|
7
8
|
const sidebarWidth = 416;
|
|
8
|
-
export const blanketColor =
|
|
9
|
+
export const blanketColor = '#22272B';
|
|
10
|
+
export const headerAndSidebarBackgroundColor = '#101214';
|
|
9
11
|
export const blanketStyles = css`
|
|
10
12
|
position: fixed;
|
|
11
13
|
top: 0;
|
|
@@ -16,15 +18,23 @@ export const blanketStyles = css`
|
|
|
16
18
|
z-index: ${overlayZindex};
|
|
17
19
|
display: flex;
|
|
18
20
|
`;
|
|
19
|
-
export const headerWrapperStyles =
|
|
21
|
+
export const headerWrapperStyles = ({
|
|
22
|
+
isArchiveSideBarVisible
|
|
23
|
+
}) => css`
|
|
20
24
|
position: absolute;
|
|
21
25
|
top: 0;
|
|
22
26
|
left: 0;
|
|
23
27
|
width: 100%;
|
|
24
28
|
height: 98px;
|
|
25
29
|
opacity: 0.85;
|
|
26
|
-
background
|
|
27
|
-
|
|
30
|
+
background: linear-gradient(
|
|
31
|
+
to bottom,
|
|
32
|
+
${headerAndSidebarBackgroundColor},
|
|
33
|
+
rgba(14, 22, 36, 0)
|
|
34
|
+
)
|
|
35
|
+
no-repeat;
|
|
36
|
+
background-position: ${isArchiveSideBarVisible ? `${ArchiveSideBarWidth}px 0` : '0'};
|
|
37
|
+
color: #c7d1db;
|
|
28
38
|
font-weight: 500;
|
|
29
39
|
padding-top: 15px;
|
|
30
40
|
padding: 24px;
|
|
@@ -64,7 +74,11 @@ export const zoomWrapperStyles = css`
|
|
|
64
74
|
position: absolute;
|
|
65
75
|
bottom: 0;
|
|
66
76
|
height: 98px;
|
|
67
|
-
background-image: linear-gradient(
|
|
77
|
+
background-image: linear-gradient(
|
|
78
|
+
to top,
|
|
79
|
+
${headerAndSidebarBackgroundColor},
|
|
80
|
+
rgba(14, 22, 36, 0)
|
|
81
|
+
);
|
|
68
82
|
opacity: 0.85;
|
|
69
83
|
pointer-events: none;
|
|
70
84
|
`;
|
|
@@ -84,7 +98,7 @@ export const zoomLevelIndicatorStyles = css`
|
|
|
84
98
|
position: absolute;
|
|
85
99
|
right: 24px;
|
|
86
100
|
bottom: 22px;
|
|
87
|
-
color: #
|
|
101
|
+
color: #c7d1db;
|
|
88
102
|
pointer-events: all;
|
|
89
103
|
`;
|
|
90
104
|
export const hdIconGroupWrapperStyles = css`
|
|
@@ -99,7 +113,7 @@ export const hdIconWrapperStyles = css`
|
|
|
99
113
|
`;
|
|
100
114
|
export const errorMessageWrapperStyles = css`
|
|
101
115
|
text-align: center;
|
|
102
|
-
color: #
|
|
116
|
+
color: #c7d1db;
|
|
103
117
|
p {
|
|
104
118
|
line-height: 100%;
|
|
105
119
|
}
|
|
@@ -126,17 +140,26 @@ export const pdfWrapperStyles = css`
|
|
|
126
140
|
`;
|
|
127
141
|
export const arrowStyles = css`
|
|
128
142
|
cursor: pointer;
|
|
143
|
+
|
|
144
|
+
svg {
|
|
145
|
+
filter: drop-shadow(0px 1px 1px rgb(9 30 66 / 25%))
|
|
146
|
+
drop-shadow(0px 0px 1px rgb(9 30 66 / 31%));
|
|
147
|
+
}
|
|
148
|
+
|
|
129
149
|
&& button {
|
|
130
150
|
height: inherit;
|
|
131
151
|
background: none;
|
|
132
|
-
}
|
|
133
|
-
> span {
|
|
134
|
-
color: rgba(27, 38, 56, 0.5);
|
|
135
|
-
fill: #9fb0cc;
|
|
136
|
-
filter: drop-shadow(1px 1px 1px rgba(27, 38, 56, 0.2));
|
|
137
152
|
|
|
138
153
|
&:hover {
|
|
139
|
-
|
|
154
|
+
svg {
|
|
155
|
+
color: #b6c2cf;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:active {
|
|
160
|
+
svg {
|
|
161
|
+
color: #c7d1db;
|
|
162
|
+
}
|
|
140
163
|
}
|
|
141
164
|
}
|
|
142
165
|
`;
|
|
@@ -146,10 +169,12 @@ const arrowWrapperStyles = css`
|
|
|
146
169
|
transform: translateY(-50%);
|
|
147
170
|
padding: 20px;
|
|
148
171
|
`;
|
|
149
|
-
export const leftWrapperStyles =
|
|
172
|
+
export const leftWrapperStyles = ({
|
|
173
|
+
isArchiveSideBarVisible
|
|
174
|
+
}) => css`
|
|
150
175
|
${arrowWrapperStyles}
|
|
151
176
|
text-align: left;
|
|
152
|
-
left: 0;
|
|
177
|
+
left: ${isArchiveSideBarVisible ? `${ArchiveSideBarWidth}px` : '0'};
|
|
153
178
|
`;
|
|
154
179
|
export const rightWrapperStyles = css`
|
|
155
180
|
${arrowWrapperStyles}
|
|
@@ -214,7 +239,7 @@ export const metadataFileNameStyles = css`
|
|
|
214
239
|
${ellipsis()};
|
|
215
240
|
`;
|
|
216
241
|
export const metadataSubTextStyles = css`
|
|
217
|
-
color:
|
|
242
|
+
color: #c7d1db;
|
|
218
243
|
${ellipsis()};
|
|
219
244
|
`;
|
|
220
245
|
export const metadataIconWrapperStyles = css`
|
|
@@ -275,7 +300,10 @@ export const downloadButtonWrapperStyles = css`
|
|
|
275
300
|
text-align: center;
|
|
276
301
|
|
|
277
302
|
button {
|
|
278
|
-
|
|
303
|
+
&:hover,
|
|
304
|
+
&:active {
|
|
305
|
+
color: #161a1d !important;
|
|
306
|
+
}
|
|
279
307
|
}
|
|
280
308
|
`;
|
|
281
309
|
export const customVideoPlayerWrapperStyles = css`
|
|
@@ -292,8 +320,8 @@ export const sidebarWrapperStyles = css`
|
|
|
292
320
|
width: ${sidebarWidth}px;
|
|
293
321
|
height: 100vh;
|
|
294
322
|
overflow: hidden auto;
|
|
295
|
-
background-color: ${
|
|
296
|
-
color: ${
|
|
323
|
+
background-color: ${token('elevation.surface', headerAndSidebarBackgroundColor)};
|
|
324
|
+
color: ${token('color.text', '#c7d1db')};
|
|
297
325
|
`;
|
|
298
326
|
export const spinnerWrapperStyles = css`
|
|
299
327
|
display: flex;
|
|
@@ -301,9 +329,4 @@ export const spinnerWrapperStyles = css`
|
|
|
301
329
|
align-items: center;
|
|
302
330
|
height: 100%;
|
|
303
331
|
`;
|
|
304
|
-
export const errorReasonTipStyles = css`
|
|
305
|
-
font-size: 10pt;
|
|
306
|
-
margin: 10px 0 40px 0;
|
|
307
|
-
color: ${DN400};
|
|
308
|
-
`;
|
|
309
332
|
export const formattedMessageWrapperStyles = css``;
|
package/dist/es2019/version.json
CHANGED
|
@@ -65,22 +65,45 @@ export class ArchiveSidebarFolderEntry extends React.Component {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
isDirectChild(root, entry) {
|
|
69
|
-
return entry.name.startsWith(root) && entry.name.replace(root, '').match(/^[^/]+\/?$/g);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
68
|
formatName(root, name) {
|
|
73
69
|
return name.replace(root, '');
|
|
74
70
|
}
|
|
75
71
|
|
|
72
|
+
renderSidebarContent(root, entries) {
|
|
73
|
+
const navItems = new Map();
|
|
74
|
+
|
|
75
|
+
for (const value of Object.values(entries)) {
|
|
76
|
+
const {
|
|
77
|
+
name
|
|
78
|
+
} = value;
|
|
79
|
+
|
|
80
|
+
if (!name.startsWith(root) || isMacPrivateFile(name)) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const paths = name.replace(root, '').split('/').filter(Boolean);
|
|
85
|
+
|
|
86
|
+
if (paths.length > 1) {
|
|
87
|
+
if (!navItems.has(paths[0])) {
|
|
88
|
+
navItems.set(paths[0], {
|
|
89
|
+
name: `${root}${paths[0]}/`,
|
|
90
|
+
isDirectory: true
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
} else if (paths.length === 1) {
|
|
94
|
+
navItems.set(paths[0], value);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return Array.from(navItems.values()).map(this.renderEntry);
|
|
99
|
+
}
|
|
100
|
+
|
|
76
101
|
render() {
|
|
77
102
|
const {
|
|
78
103
|
root,
|
|
79
104
|
entries
|
|
80
105
|
} = this.props;
|
|
81
|
-
|
|
82
|
-
const archiveSidebarFolder = /*#__PURE__*/React.createElement(ArchiveSidebarFolderWrapper, null, entriesContent);
|
|
83
|
-
return archiveSidebarFolder;
|
|
106
|
+
return /*#__PURE__*/React.createElement(ArchiveSidebarFolderWrapper, null, this.renderSidebarContent(root, entries));
|
|
84
107
|
}
|
|
85
108
|
|
|
86
109
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
|
|
3
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import { unzip, HTTPRangeReader } from 'unzipit';
|
|
4
6
|
import { FormattedMessage } from 'react-intl-next';
|
|
@@ -221,7 +223,8 @@ export class ArchiveViewerBase extends BaseViewer {
|
|
|
221
223
|
}, /*#__PURE__*/React.createElement(DefaultCoverWrapper, null, /*#__PURE__*/React.createElement(AudioIcon, {
|
|
222
224
|
label: "cover",
|
|
223
225
|
size: "xlarge",
|
|
224
|
-
primaryColor: blanketColor
|
|
226
|
+
primaryColor: blanketColor,
|
|
227
|
+
secondaryColor: "#9FADBC"
|
|
225
228
|
})), /*#__PURE__*/React.createElement(CustomAudioPlayerWrapper, null, /*#__PURE__*/React.createElement(CustomMediaPlayer, {
|
|
226
229
|
type: "audio",
|
|
227
230
|
isAutoPlay: false,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { DN30 } from '@atlaskit/theme/colors';
|
|
4
3
|
import ModalSpinner from '@atlaskit/media-ui/modalSpinner';
|
|
5
4
|
import ErrorMessage from '../../errorMessage';
|
|
6
5
|
import { MediaViewerError } from '../../errors';
|
|
6
|
+
import { headerAndSidebarBackgroundColor } from '../../styles';
|
|
7
7
|
export default class ArchiveViewerLoader extends React.PureComponent {
|
|
8
8
|
constructor(...args) {
|
|
9
9
|
super(...args);
|
|
@@ -53,8 +53,8 @@ export default class ArchiveViewerLoader extends React.PureComponent {
|
|
|
53
53
|
return /*#__PURE__*/React.createElement(ArchiveViewer, this.props);
|
|
54
54
|
} else {
|
|
55
55
|
return /*#__PURE__*/React.createElement(ModalSpinner, {
|
|
56
|
-
blankedColor:
|
|
57
|
-
invertSpinnerColor:
|
|
56
|
+
blankedColor: headerAndSidebarBackgroundColor,
|
|
57
|
+
invertSpinnerColor: false
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { css, keyframes } from '@emotion/react';
|
|
2
2
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
3
|
-
import {
|
|
3
|
+
import { token } from '@atlaskit/tokens';
|
|
4
|
+
import { DN500 } from '@atlaskit/theme/colors';
|
|
4
5
|
export const ArchiveSideBarWidth = 300;
|
|
5
6
|
export const archiveItemViewerWrapperStyles = css`
|
|
6
7
|
width: 100%;
|
|
@@ -9,8 +10,7 @@ export const archiveItemViewerWrapperStyles = css`
|
|
|
9
10
|
`;
|
|
10
11
|
export const archiveSideBarStyles = css`
|
|
11
12
|
padding: 22px 20px 20px 20px;
|
|
12
|
-
|
|
13
|
-
background-color: rgba(14, 22, 36);
|
|
13
|
+
background-color: ${token('elevation.surface', '#101214')};
|
|
14
14
|
position: absolute;
|
|
15
15
|
left: 0;
|
|
16
16
|
top: 0;
|
|
@@ -41,11 +41,16 @@ export const archiveDownloadButtonWrapperStyles = css`
|
|
|
41
41
|
border: none;
|
|
42
42
|
border-radius: 3px;
|
|
43
43
|
background-color: transparent;
|
|
44
|
+
color: ${token('color.icon', '#9FADBC')};
|
|
44
45
|
|
|
45
46
|
&:hover {
|
|
46
47
|
cursor: pointer;
|
|
47
|
-
background-color: #
|
|
48
|
-
|
|
48
|
+
background-color: ${token('color.background.neutral.subtle.hovered', '#A1BDD914')};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:active {
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
background-color: ${token('color.background.neutral.subtle.pressed', '#A6C5E229')};
|
|
49
54
|
}
|
|
50
55
|
`;
|
|
51
56
|
export const sidebarItemWrapperStyles = css`
|
|
@@ -76,7 +81,7 @@ export const separatorStyles = css`
|
|
|
76
81
|
border-radius: 1px;
|
|
77
82
|
height: 2px;
|
|
78
83
|
margin: ${(gridSize() * 5 - 2) / 2}px 0;
|
|
79
|
-
background-color:
|
|
84
|
+
background-color: ${token('color.border', '#A6C5E229')};
|
|
80
85
|
flex-shrink: 0;
|
|
81
86
|
`;
|
|
82
87
|
export const sidebarHeaderWrapperStyles = css`
|
|
@@ -96,16 +101,18 @@ export const sidebarHeaderEntryStyles = css`
|
|
|
96
101
|
text-overflow: ellipsis;
|
|
97
102
|
white-space: nowrap;
|
|
98
103
|
line-height: 1.14286;
|
|
99
|
-
color: ${DN500};
|
|
104
|
+
color: ${token('color.text', DN500)};
|
|
100
105
|
`;
|
|
101
|
-
/** TODO Replace background colors of item with theme from @atlaskit/tokens once ready*/
|
|
102
|
-
|
|
103
106
|
export const itemStyle = {
|
|
104
|
-
backgroundColor: `${
|
|
105
|
-
fill: `${
|
|
106
|
-
color: `${DN500}`,
|
|
107
|
+
backgroundColor: `${token('color.background.neutral.subtle', '#101214')}`,
|
|
108
|
+
fill: `${token('color.icon.success', '#101214')}`,
|
|
109
|
+
color: `${token('color.text', DN500)}`,
|
|
107
110
|
':hover': {
|
|
108
|
-
backgroundColor: '#
|
|
109
|
-
color: `${DN500}`
|
|
111
|
+
backgroundColor: `${token('color.background.neutral.subtle.hovered', '#A1BDD914')}`,
|
|
112
|
+
color: `${token('color.text', DN500)}`
|
|
113
|
+
},
|
|
114
|
+
':active': {
|
|
115
|
+
backgroundColor: `${token('color.background.neutral.subtle.pressed', '#A6C5E229')}`,
|
|
116
|
+
color: `${token('color.text', DN500)}`
|
|
110
117
|
}
|
|
111
118
|
};
|