@atlaskit/media-viewer 48.3.3 → 48.3.5

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 (44) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/analytics/index.js +1 -1
  3. package/dist/cjs/analytics/ufoExperiences.js +1 -1
  4. package/dist/cjs/navigation.js +4 -4
  5. package/dist/cjs/styleWrappers.js +473 -160
  6. package/dist/cjs/styles.js +3 -83
  7. package/dist/cjs/v2/item-viewer-v2.js +66 -58
  8. package/dist/cjs/viewers/archiveSidebar/archive.js +3 -1
  9. package/dist/cjs/viewers/archiveSidebar/styleWrappers.js +111 -12
  10. package/dist/cjs/viewers/archiveSidebar/styles.js +1 -24
  11. package/dist/cjs/viewers/doc/pdfPasswordInput.js +2 -2
  12. package/dist/cjs/viewers/image/interactive-img.js +3 -3
  13. package/dist/cjs/zoomControls.js +4 -3
  14. package/dist/es2019/analytics/index.js +1 -1
  15. package/dist/es2019/analytics/ufoExperiences.js +1 -1
  16. package/dist/es2019/navigation.js +4 -4
  17. package/dist/es2019/styleWrappers.js +327 -11
  18. package/dist/es2019/styles.js +3 -342
  19. package/dist/es2019/v2/item-viewer-v2.js +68 -60
  20. package/dist/es2019/viewers/archiveSidebar/archive.js +3 -1
  21. package/dist/es2019/viewers/archiveSidebar/styleWrappers.js +101 -2
  22. package/dist/es2019/viewers/archiveSidebar/styles.js +0 -108
  23. package/dist/es2019/viewers/doc/pdfPasswordInput.js +2 -2
  24. package/dist/es2019/viewers/image/interactive-img.js +4 -4
  25. package/dist/es2019/zoomControls.js +5 -4
  26. package/dist/esm/analytics/index.js +1 -1
  27. package/dist/esm/analytics/ufoExperiences.js +1 -1
  28. package/dist/esm/navigation.js +4 -4
  29. package/dist/esm/styleWrappers.js +438 -125
  30. package/dist/esm/styles.js +3 -82
  31. package/dist/esm/v2/item-viewer-v2.js +66 -58
  32. package/dist/esm/viewers/archiveSidebar/archive.js +3 -1
  33. package/dist/esm/viewers/archiveSidebar/styleWrappers.js +101 -2
  34. package/dist/esm/viewers/archiveSidebar/styles.js +0 -22
  35. package/dist/esm/viewers/doc/pdfPasswordInput.js +2 -2
  36. package/dist/esm/viewers/image/interactive-img.js +4 -4
  37. package/dist/esm/zoomControls.js +5 -4
  38. package/dist/types/styleWrappers.d.ts +5 -2
  39. package/dist/types/styles.d.ts +1 -61
  40. package/dist/types/viewers/archiveSidebar/styles.d.ts +0 -12
  41. package/dist/types-ts4.5/styleWrappers.d.ts +5 -2
  42. package/dist/types-ts4.5/styles.d.ts +1 -61
  43. package/dist/types-ts4.5/viewers/archiveSidebar/styles.d.ts +0 -12
  44. package/package.json +2 -2
@@ -1,10 +1,325 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /** @jsx jsx */
3
- import { jsx } from '@emotion/react';
3
+ import { jsx, css } from '@emotion/react';
4
4
  import { forwardRef, useMemo } from 'react';
5
- 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
+ import { blanketColor, overlayZindex } from './styles';
6
+ import { ellipsis, hideControlsClassName } from '@atlaskit/media-ui';
6
7
  import { TouchScrollable } from 'react-scrolllock';
7
8
  import { useMergeRefs } from 'use-callback-ref';
9
+ import { headerAndSidebarBackgroundColor } from './viewers/modalSpinner';
10
+ import { ArchiveSideBarWidth } from './viewers/archiveSidebar/styles';
11
+ import { borderRadius } from '@atlaskit/theme/constants';
12
+ import { Box, xcss } from '@atlaskit/primitives';
13
+ const SIDEBAR_WIDTH = 416;
14
+ const blanketStyles = css({
15
+ position: 'fixed',
16
+ top: 0,
17
+ left: 0,
18
+ bottom: 0,
19
+ right: 0,
20
+ backgroundColor: blanketColor,
21
+ zIndex: overlayZindex,
22
+ display: 'flex'
23
+ });
24
+ const headerWrapperStyles = ({
25
+ isArchiveSideBarVisible
26
+ }) => css({
27
+ position: 'absolute',
28
+ top: 0,
29
+ left: 0,
30
+ width: '100%',
31
+ height: '98px',
32
+ opacity: 0.85,
33
+ background: `linear-gradient( to bottom, ${headerAndSidebarBackgroundColor}, rgba(14, 22, 36, 0) ) no-repeat`,
34
+ backgroundPosition: isArchiveSideBarVisible ? `${ArchiveSideBarWidth}px 0` : '0',
35
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
36
+ color: '#c7d1db',
37
+ fontWeight: 500,
38
+ padding: "var(--ds-space-300, 24px)",
39
+ boxSizing: 'border-box',
40
+ pointerEvents: 'none',
41
+ zIndex: overlayZindex + 1
42
+ });
43
+ const listWrapperStyles = css({
44
+ width: '100%',
45
+ height: '100%',
46
+ position: 'relative',
47
+ display: 'flex',
48
+ alignItems: 'center',
49
+ justifyContent: 'center'
50
+ });
51
+ const closeButtonWrapperStyles = css({
52
+ position: 'absolute',
53
+ top: "var(--ds-space-300, 24px)",
54
+ right: "var(--ds-space-250, 20px)",
55
+ zIndex: overlayZindex + 2
56
+ });
57
+ const contentWrapperStyles = ({
58
+ isSidebarVisible
59
+ }) => css({
60
+ width: isSidebarVisible ? `calc(100% - ${SIDEBAR_WIDTH}px)` : '100%'
61
+ });
62
+ const zoomWrapperStyles = css({
63
+ width: '100%',
64
+ position: 'absolute',
65
+ bottom: '0px',
66
+ height: '98px',
67
+ backgroundImage: `linear-gradient( to top, ${headerAndSidebarBackgroundColor}, rgba(14, 22, 36, 0) )`,
68
+ opacity: 0.85,
69
+ pointerEvents: 'none',
70
+ boxSizing: 'border-box',
71
+ display: 'flex',
72
+ alignItems: 'flex-end',
73
+ padding: `${"var(--ds-space-100, 10px)"} ${"var(--ds-space-300, 24px)"}`
74
+ });
75
+ const zoomCenterControlsStyles = css({
76
+ width: '100%',
77
+ display: 'flex',
78
+ justifyContent: 'center',
79
+ gap: "var(--ds-space-100, 10px)",
80
+ '> *': {
81
+ pointerEvents: 'all'
82
+ }
83
+ });
84
+ const zoomRightControlsStyles = css({
85
+ position: 'absolute',
86
+ right: "var(--ds-space-300, 24px)",
87
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
88
+ color: '#c7d1db',
89
+ pointerEvents: 'all',
90
+ display: 'flex',
91
+ justifyContent: 'right',
92
+ gap: "var(--ds-space-100, 10px)"
93
+ });
94
+ const zoomLevelIndicatorStyles = css({
95
+ height: '32px',
96
+ lineHeight: '32px',
97
+ verticalAlign: 'middle'
98
+ });
99
+ const hdIconGroupWrapperStyles = css({
100
+ display: 'flex',
101
+ alignItems: 'center',
102
+ gap: "var(--ds-space-100, 10px)",
103
+ position: 'relative',
104
+ width: '24px',
105
+ '> *': {
106
+ position: 'absolute'
107
+ }
108
+ });
109
+ const errorMessageWrapperStyles = css({
110
+ textAlign: 'center',
111
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
112
+ color: '#c7d1db',
113
+ p: {
114
+ lineHeight: '100%'
115
+ }
116
+ });
117
+ const errorImageStyles = css({
118
+ marginBottom: "var(--ds-space-100, 10px)",
119
+ userSelect: 'none'
120
+ });
121
+ const videoStyles = css({
122
+ width: '100vw',
123
+ height: '100vh'
124
+ });
125
+ const pdfWrapperStyles = css({
126
+ overflow: 'auto',
127
+ position: 'absolute',
128
+ top: 0,
129
+ left: 0,
130
+ bottom: 0,
131
+ right: 0,
132
+ [`.${hideControlsClassName}`]: {
133
+ position: 'fixed'
134
+ }
135
+ });
136
+ const arrowStyles = css({
137
+ cursor: 'pointer',
138
+ svg: {
139
+ filter: 'drop-shadow(0px 1px 1px rgb(9 30 66 / 25%)) drop-shadow(0px 0px 1px rgb(9 30 66 / 31%))'
140
+ },
141
+ '&& button': {
142
+ height: 'inherit',
143
+ background: 'none',
144
+ '&:hover': {
145
+ svg: {
146
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
147
+ color: '#b6c2cf'
148
+ }
149
+ },
150
+ '&:active': {
151
+ svg: {
152
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
153
+ color: '#c7d1db'
154
+ }
155
+ }
156
+ }
157
+ });
158
+ const arrowWrapperStyles = css({
159
+ position: 'absolute',
160
+ top: '50%',
161
+ transform: 'translateY(-50%)',
162
+ padding: "var(--ds-space-250, 20px)"
163
+ });
164
+ const arrowsWrapperStyles = css({
165
+ display: 'flex',
166
+ position: 'absolute',
167
+ top: '50%',
168
+ transform: 'translateY(-50%)',
169
+ left: 0,
170
+ width: '100%'
171
+ });
172
+ const leftWrapperStyles = ({
173
+ isArchiveSideBarVisible
174
+ }) => css(arrowWrapperStyles, {
175
+ textAlign: 'left',
176
+ left: isArchiveSideBarVisible ? `${ArchiveSideBarWidth}px` : '0'
177
+ });
178
+ const rightWrapperStyles = css(arrowWrapperStyles, {
179
+ textAlign: 'right',
180
+ right: 0
181
+ });
182
+ const headerStyles = ({
183
+ isArchiveSideBarVisible
184
+ }) => css({
185
+ display: 'flex',
186
+ paddingLeft: isArchiveSideBarVisible ? `${ArchiveSideBarWidth}px` : '0'
187
+ });
188
+ const leftHeaderStyles = css({
189
+ flex: 1,
190
+ overflow: 'hidden',
191
+ '> *': {
192
+ pointerEvents: 'all'
193
+ }
194
+ });
195
+ const imageWrapperStyles = css({
196
+ width: '100vw',
197
+ height: '100vh',
198
+ overflow: 'auto',
199
+ textAlign: 'center',
200
+ verticalAlign: 'middle',
201
+ whiteSpace: 'nowrap'
202
+ });
203
+ const baselineExtendStyles = css({
204
+ height: '100%',
205
+ display: 'inline-block',
206
+ verticalAlign: 'middle'
207
+ });
208
+ const imgStyles = ({
209
+ cursor,
210
+ shouldPixelate
211
+ }) => css({
212
+ display: 'inline-block',
213
+ verticalAlign: 'middle',
214
+ position: 'relative',
215
+ cursor: cursor
216
+ }, shouldPixelate ? `/* Prevent images from being smoothed when scaled up */
217
+ image-rendering: optimizeSpeed; /* Legal fallback */
218
+ image-rendering: -moz-crisp-edges; /* Firefox */
219
+ image-rendering: -o-crisp-edges; /* Opera */
220
+ image-rendering: -webkit-optimize-contrast; /* Safari */
221
+ image-rendering: optimize-contrast; /* CSS3 Proposed */
222
+ image-rendering: crisp-edges; /* CSS4 Proposed */
223
+ image-rendering: pixelated; /* CSS4 Proposed */
224
+ -ms-interpolation-mode: nearest-neighbor; /* IE8+ */` : ``);
225
+ const medatadataTextWrapperStyles = css({
226
+ overflow: 'hidden'
227
+ });
228
+ const metadataWrapperStyles = css({
229
+ display: 'flex'
230
+ });
231
+ const metadataFileNameStyles = css(ellipsis());
232
+ const metadataSubTextStyles = css({
233
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
234
+ color: '#c7d1db'
235
+ }, ellipsis());
236
+ const metadataIconWrapperStyles = xcss({
237
+ paddingTop: "var(--ds-space-050, 4px)",
238
+ paddingRight: "var(--ds-space-150, 12px)"
239
+ });
240
+ const rightHeaderStyles = css({
241
+ textAlign: 'right',
242
+ marginRight: "var(--ds-space-500, 40px)",
243
+ minWidth: '200px',
244
+ '> *': {
245
+ pointerEvents: 'all'
246
+ }
247
+ });
248
+ const customAudioPlayerWrapperStyles = css({
249
+ position: 'absolute',
250
+ bottom: 0,
251
+ left: 0,
252
+ width: '100%'
253
+ });
254
+ const audioPlayerStyles = css({
255
+ backgroundColor: blanketColor,
256
+ borderRadius: borderRadius(),
257
+ alignItems: 'center',
258
+ justifyContent: 'center',
259
+ width: '400px',
260
+ height: '400px',
261
+ overflow: 'hidden',
262
+ display: 'flex',
263
+ flexDirection: 'column',
264
+ position: 'relative'
265
+ });
266
+ const audioStyles = css({
267
+ width: '100%',
268
+ position: 'absolute',
269
+ bottom: 0,
270
+ left: 0
271
+ });
272
+ const audioCoverStyles = css({
273
+ width: '100%',
274
+ height: '100%',
275
+ objectFit: 'scale-down',
276
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
277
+ backgroundColor: '#000'
278
+ });
279
+ const defaultCoverWrapperStyles = css({
280
+ width: '100%',
281
+ height: '100%',
282
+ display: 'flex',
283
+ alignItems: 'center',
284
+ justifyContent: 'center',
285
+ '> *': {
286
+ transform: 'scale(2)'
287
+ }
288
+ });
289
+ const downloadButtonWrapperStyles = css({
290
+ marginTop: "var(--ds-space-300, 28px)",
291
+ textAlign: 'center',
292
+ button: {
293
+ '&:hover, &:active': {
294
+ // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
295
+ color: '#161a1d !important'
296
+ }
297
+ }
298
+ });
299
+ const customVideoPlayerWrapperStyles = css({
300
+ video: {
301
+ flex: 1,
302
+ width: '100vw',
303
+ height: '100vh',
304
+ maxHeight: '100vh'
305
+ }
306
+ });
307
+ const sidebarWrapperStyles = css({
308
+ top: 0,
309
+ right: 0,
310
+ width: `${SIDEBAR_WIDTH}px`,
311
+ height: '100vh',
312
+ overflow: 'hidden auto',
313
+ backgroundColor: `var(--ds-surface, ${headerAndSidebarBackgroundColor})`,
314
+ color: "var(--ds-text, #c7d1db)"
315
+ });
316
+ const spinnerWrapperStyles = css({
317
+ display: 'flex',
318
+ justifyContent: 'center',
319
+ alignItems: 'center',
320
+ height: '100%'
321
+ });
322
+ const formattedMessageWrapperStyles = css({});
8
323
  // We are keeping this data-testid since JIRA is still using it in their codebase to perform checks. Before removing this, we need to ensure this 'media-viewer-popup' test id is not being used anywhere else in other codebases
9
324
  export const Blanket = ({
10
325
  'data-testid': datatestId,
@@ -37,6 +352,7 @@ ListWrapper.displayName = 'ListWrapper';
37
352
  export const ArrowsWrapper = ({
38
353
  children
39
354
  }) => jsx("div", {
355
+ id: "media-viewer-navigation",
40
356
  css: arrowsWrapperStyles
41
357
  }, children);
42
358
  export const CloseButtonWrapper = ({
@@ -61,10 +377,15 @@ export const ZoomWrapper = ({
61
377
  css: zoomWrapperStyles,
62
378
  className: className
63
379
  }, children);
64
- export const ZoomControlsWrapper = ({
380
+ export const ZoomCenterControls = ({
381
+ children
382
+ }) => jsx("div", {
383
+ css: zoomCenterControlsStyles
384
+ }, children);
385
+ export const ZoomRightControls = ({
65
386
  children
66
387
  }) => jsx("div", {
67
- css: zoomControlsWrapperStyles
388
+ css: zoomRightControlsStyles
68
389
  }, children);
69
390
  export const ZoomLevelIndicator = ({
70
391
  children
@@ -78,11 +399,6 @@ export const HDIconGroupWrapper = ({
78
399
  css: hdIconGroupWrapperStyles,
79
400
  className: className
80
401
  }, children);
81
- export const HDIconWrapper = ({
82
- children
83
- }) => jsx("div", {
84
- css: hdIconWrapperStyles
85
- }, children);
86
402
  export const ErrorMessageWrapper = ({
87
403
  'data-testid': datatestId,
88
404
  children
@@ -243,8 +559,8 @@ export const MetadataSubText = ({
243
559
  }, children);
244
560
  export const MetadataIconWrapper = ({
245
561
  children
246
- }) => jsx("div", {
247
- css: metadataIconWrapperStyles
562
+ }) => jsx(Box, {
563
+ xcss: metadataIconWrapperStyles
248
564
  }, children);
249
565
  export const RightHeader = ({
250
566
  children
@@ -1,342 +1,3 @@
1
- /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
- import { css } from '@emotion/react';
3
- import { layers, borderRadius } from '@atlaskit/theme/constants';
4
- import { ellipsis, hideControlsClassName } from '@atlaskit/media-ui';
5
- import { ArchiveSideBarWidth } from './viewers/archiveSidebar/styles';
6
- import { headerAndSidebarBackgroundColor } from './viewers/modalSpinner';
7
- const overlayZindex = layers.modal() + 10;
8
- const sidebarWidth = 416;
9
- export const blanketColor = '#22272B';
10
- export const blanketStyles = css`
11
- position: fixed;
12
- top: 0;
13
- left: 0;
14
- bottom: 0;
15
- right: 0;
16
- background-color: ${blanketColor};
17
- z-index: ${overlayZindex};
18
- display: flex;
19
- `;
20
- export const headerWrapperStyles = ({
21
- isArchiveSideBarVisible
22
- }) =>
23
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
24
- css`
25
- position: absolute;
26
- top: 0;
27
- left: 0;
28
- width: 100%;
29
- height: 98px;
30
- opacity: 0.85;
31
- background: linear-gradient(
32
- to bottom,
33
- ${headerAndSidebarBackgroundColor},
34
- rgba(14, 22, 36, 0)
35
- )
36
- no-repeat;
37
- background-position: ${isArchiveSideBarVisible ? `${ArchiveSideBarWidth}px 0` : '0'};
38
- color: #c7d1db;
39
- font-weight: 500;
40
- padding-top: 15px;
41
- padding: ${"var(--ds-space-300, 24px)"};
42
- box-sizing: border-box;
43
- pointer-events: none;
44
- z-index: ${overlayZindex + 1};
45
- `;
46
- export const listWrapperStyles = css`
47
- width: 100%;
48
- height: 100%;
49
- position: relative;
50
- display: flex;
51
- align-items: center;
52
- justify-content: center;
53
- `;
54
- export const arrowsWrapperStyles = css`
55
- display: flex;
56
- position: absolute;
57
- top: 50%;
58
- transform: translateY(-50%);
59
- left: 0;
60
- width: 100%;
61
- `;
62
- export const closeButtonWrapperStyles = css`
63
- position: absolute;
64
- top: ${"var(--ds-space-300, 24px)"};
65
- right: ${"var(--ds-space-250, 20px)"};
66
- z-index: ${overlayZindex + 2};
67
- `;
68
- export const contentWrapperStyles = ({
69
- isSidebarVisible
70
- }) => css`
71
- width: ${isSidebarVisible ? `calc(100% - ${sidebarWidth}px)` : '100%'};
72
- `;
73
- export const zoomWrapperStyles = css`
74
- width: 100%;
75
- position: absolute;
76
- bottom: 0;
77
- height: 98px;
78
- background-image: linear-gradient(
79
- to top,
80
- ${headerAndSidebarBackgroundColor},
81
- rgba(14, 22, 36, 0)
82
- );
83
- opacity: 0.85;
84
- pointer-events: none;
85
- `;
86
-
87
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
88
- export const zoomControlsWrapperStyles = css`
89
- width: 100%;
90
- position: absolute;
91
- text-align: center;
92
- bottom: 10px;
93
- button {
94
- margin-right: 10px;
95
- }
96
- > * {
97
- pointer-events: all;
98
- }
99
- `;
100
-
101
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
102
- export const zoomLevelIndicatorStyles = css`
103
- position: absolute;
104
- right: ${"var(--ds-space-300, 24px)"};
105
- bottom: 22px;
106
- color: #c7d1db;
107
- pointer-events: all;
108
- `;
109
-
110
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
111
- export const hdIconGroupWrapperStyles = css`
112
- position: absolute;
113
- right: 69px;
114
- bottom: ${"var(--ds-space-200, 16px)"};
115
- `;
116
- export const hdIconWrapperStyles = css`
117
- display: inline-block;
118
- vertical-align: top;
119
- margin-left: ${"var(--ds-space-negative-300, -24px)"};
120
- `;
121
- export const errorMessageWrapperStyles = css`
122
- text-align: center;
123
- color: #c7d1db;
124
- p {
125
- line-height: 100%;
126
- }
127
- `;
128
-
129
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
130
- export const errorImageStyles = css`
131
- margin-bottom: 10px;
132
- user-select: none;
133
- `;
134
- export const videoStyles = css`
135
- width: 100vw;
136
- height: 100vh;
137
- `;
138
- export const pdfWrapperStyles = css`
139
- overflow: auto;
140
- position: absolute;
141
- top: 0;
142
- left: 0;
143
- bottom: 0;
144
- right: 0;
145
-
146
- .${hideControlsClassName} {
147
- position: fixed;
148
- }
149
- `;
150
- export const arrowStyles = css`
151
- cursor: pointer;
152
-
153
- svg {
154
- filter: drop-shadow(0px 1px 1px rgb(9 30 66 / 25%))
155
- drop-shadow(0px 0px 1px rgb(9 30 66 / 31%));
156
- }
157
-
158
- && button {
159
- height: inherit;
160
- background: none;
161
-
162
- &:hover {
163
- svg {
164
- color: #b6c2cf;
165
- }
166
- }
167
-
168
- &:active {
169
- svg {
170
- color: #c7d1db;
171
- }
172
- }
173
- }
174
- `;
175
- const arrowWrapperStyles = css`
176
- position: absolute;
177
- top: 50%;
178
- transform: translateY(-50%);
179
- padding: ${"var(--ds-space-250, 20px)"};
180
- `;
181
- export const leftWrapperStyles = ({
182
- isArchiveSideBarVisible
183
- }) => css`
184
- ${arrowWrapperStyles}
185
- text-align: left;
186
- left: ${isArchiveSideBarVisible ? `${ArchiveSideBarWidth}px` : '0'};
187
- `;
188
- export const rightWrapperStyles = css`
189
- ${arrowWrapperStyles}
190
- text-align: right;
191
- right: 0;
192
- `;
193
-
194
- // header.tsx
195
-
196
- export const headerStyles = ({
197
- isArchiveSideBarVisible
198
- }) => css`
199
- display: flex;
200
- padding-left: ${isArchiveSideBarVisible ? `${ArchiveSideBarWidth}px` : '0'};
201
- `;
202
- export const leftHeaderStyles = css`
203
- flex: 1;
204
- overflow: hidden;
205
- > * {
206
- pointer-events: all;
207
- }
208
- `;
209
- export const imageWrapperStyles = css`
210
- width: 100vw;
211
- height: 100vh;
212
- overflow: auto;
213
- text-align: center;
214
- vertical-align: middle;
215
- white-space: nowrap;
216
- `;
217
- export const baselineExtendStyles = css`
218
- height: 100%;
219
- display: inline-block;
220
- vertical-align: middle;
221
- `;
222
- export const imgStyles = ({
223
- cursor,
224
- shouldPixelate
225
- }) => css`
226
- display: inline-block;
227
- vertical-align: middle;
228
- position: relative;
229
- cursor: ${cursor};
230
- ${shouldPixelate ? `/* Prevent images from being smoothed when scaled up */
231
- image-rendering: optimizeSpeed; /* Legal fallback */
232
- image-rendering: -moz-crisp-edges; /* Firefox */
233
- image-rendering: -o-crisp-edges; /* Opera */
234
- image-rendering: -webkit-optimize-contrast; /* Safari */
235
- image-rendering: optimize-contrast; /* CSS3 Proposed */
236
- image-rendering: crisp-edges; /* CSS4 Proposed */
237
- image-rendering: pixelated; /* CSS4 Proposed */
238
- -ms-interpolation-mode: nearest-neighbor; /* IE8+ */` : ``}
239
- `;
240
- export const medatadataTextWrapperStyles = css`
241
- overflow: hidden;
242
- `;
243
- export const metadataWrapperStyles = css`
244
- display: flex;
245
- `;
246
- export const metadataFileNameStyles = css`
247
- ${ellipsis()};
248
- `;
249
- export const metadataSubTextStyles = css`
250
- color: #c7d1db;
251
- ${ellipsis()};
252
- `;
253
- export const metadataIconWrapperStyles = css`
254
- padding-top: ${"var(--ds-space-050, 4px)"};
255
- padding-right: ${"var(--ds-space-150, 12px)"};
256
- `;
257
- export const rightHeaderStyles = css`
258
- text-align: right;
259
- margin-right: ${"var(--ds-space-500, 40px)"};
260
- min-width: 200px;
261
- > * {
262
- pointer-events: all;
263
- }
264
- `;
265
- export const customAudioPlayerWrapperStyles = css`
266
- position: absolute;
267
- bottom: 0;
268
- left: 0;
269
- width: 100%;
270
- `;
271
- export const audioPlayerStyles = css`
272
- background-color: ${blanketColor};
273
- border-radius: ${borderRadius()};
274
- align-items: center;
275
- justify-content: center;
276
- width: 400px;
277
- height: 400px;
278
- overflow: hidden;
279
- display: flex;
280
- flex-direction: column;
281
- position: relative;
282
- `;
283
- export const audioStyles = css`
284
- width: 100%;
285
- position: absolute;
286
- bottom: 0;
287
- left: 0;
288
- `;
289
- export const audioCoverStyles = css`
290
- width: 100%;
291
- height: 100%;
292
- object-fit: scale-down;
293
- background-color: #000;
294
- `;
295
- export const defaultCoverWrapperStyles = css`
296
- width: 100%;
297
- height: 100%;
298
- display: flex;
299
- align-items: center;
300
- justify-content: center;
301
-
302
- > * {
303
- transform: scale(2);
304
- }
305
- `;
306
-
307
- // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
308
- export const downloadButtonWrapperStyles = css`
309
- margin-top: 28px;
310
- text-align: center;
311
-
312
- button {
313
- &:hover,
314
- &:active {
315
- color: #161a1d !important;
316
- }
317
- }
318
- `;
319
- export const customVideoPlayerWrapperStyles = css`
320
- video {
321
- flex: 1;
322
- width: 100vw;
323
- height: 100vh;
324
- max-height: 100vh;
325
- }
326
- `;
327
- export const sidebarWrapperStyles = css`
328
- top: 0;
329
- right: 0;
330
- width: ${sidebarWidth}px;
331
- height: 100vh;
332
- overflow: hidden auto;
333
- background-color: ${`var(--ds-surface, ${headerAndSidebarBackgroundColor})`};
334
- color: ${"var(--ds-text, #c7d1db)"};
335
- `;
336
- export const spinnerWrapperStyles = css`
337
- display: flex;
338
- justify-content: center;
339
- align-items: center;
340
- height: 100%;
341
- `;
342
- export const formattedMessageWrapperStyles = css``;
1
+ import { layers } from '@atlaskit/theme/constants';
2
+ export const overlayZindex = layers.modal() + 10;
3
+ export const blanketColor = '#22272B';