2023-02-02 11:12:31 +00:00
|
|
|
import { Theme } from '@mui/material';
|
2022-02-24 12:20:37 +00:00
|
|
|
|
|
|
|
const BACKGROUND_COLOR = 'rgba(51, 51, 51, .5)';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Creates the styles for the component.
|
|
|
|
*
|
|
|
|
* @param {Object} theme - The current theme.
|
|
|
|
* @returns {Object}
|
|
|
|
*/
|
2023-02-02 11:12:31 +00:00
|
|
|
export const styles = (theme: Theme) => {
|
2022-02-24 12:20:37 +00:00
|
|
|
return {
|
|
|
|
toggleFilmstripContainer: {
|
|
|
|
display: 'flex',
|
2023-02-02 11:12:31 +00:00
|
|
|
flexWrap: 'nowrap' as const,
|
2022-02-24 12:20:37 +00:00
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
|
|
|
backgroundColor: BACKGROUND_COLOR,
|
|
|
|
width: '32px',
|
|
|
|
height: '24px',
|
2023-02-02 11:12:31 +00:00
|
|
|
position: 'absolute' as const,
|
2022-02-24 12:20:37 +00:00
|
|
|
borderRadius: '4px',
|
2023-02-07 08:10:28 +00:00
|
|
|
top: 'calc(-24px - 2px)',
|
2022-02-24 12:20:37 +00:00
|
|
|
left: 'calc(50% - 16px)',
|
|
|
|
opacity: 0,
|
|
|
|
transition: 'opacity .3s',
|
2022-06-29 13:59:49 +00:00
|
|
|
zIndex: 1,
|
2022-02-24 12:20:37 +00:00
|
|
|
|
|
|
|
'&:hover': {
|
|
|
|
backgroundColor: theme.palette.ui02
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
toggleFilmstripButton: {
|
|
|
|
fontSize: '14px',
|
|
|
|
lineHeight: 1.2,
|
2023-02-02 11:12:31 +00:00
|
|
|
textAlign: 'center' as const,
|
2022-02-24 12:20:37 +00:00
|
|
|
background: 'transparent',
|
|
|
|
height: 'auto',
|
|
|
|
width: '100%',
|
|
|
|
padding: 0,
|
|
|
|
margin: 0,
|
|
|
|
border: 'none',
|
|
|
|
|
|
|
|
'-webkit-appearance': 'none',
|
|
|
|
|
|
|
|
'& svg': {
|
|
|
|
fill: theme.palette.icon01
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
toggleVerticalFilmstripContainer: {
|
|
|
|
transform: 'rotate(-90deg)',
|
2023-02-07 08:10:28 +00:00
|
|
|
left: 'calc(-24px - 2px - 4px)',
|
2022-02-24 12:20:37 +00:00
|
|
|
top: 'calc(50% - 12px)'
|
|
|
|
},
|
|
|
|
|
2022-06-29 13:59:49 +00:00
|
|
|
toggleTopPanelContainer: {
|
|
|
|
transform: 'rotate(180deg)',
|
|
|
|
bottom: 'calc(-24px - 6px)',
|
|
|
|
top: 'auto'
|
|
|
|
},
|
|
|
|
|
|
|
|
toggleTopPanelContainerHidden: {
|
2023-02-02 11:12:31 +00:00
|
|
|
visibility: 'hidden' as const
|
2022-06-29 13:59:49 +00:00
|
|
|
},
|
|
|
|
|
2022-02-24 12:20:37 +00:00
|
|
|
filmstrip: {
|
2022-06-29 13:59:49 +00:00
|
|
|
transition: 'background .2s ease-in-out, right 1s, bottom 1s, top 1s, height .3s ease-in',
|
2022-02-24 12:20:37 +00:00
|
|
|
right: 0,
|
|
|
|
bottom: 0,
|
|
|
|
|
|
|
|
'&:hover': {
|
|
|
|
'& .resizable-filmstrip': {
|
|
|
|
backgroundColor: BACKGROUND_COLOR
|
|
|
|
},
|
|
|
|
|
|
|
|
'& .filmstrip-hover': {
|
|
|
|
backgroundColor: BACKGROUND_COLOR
|
|
|
|
},
|
|
|
|
|
|
|
|
'& .toggleFilmstripContainer': {
|
|
|
|
opacity: 1
|
|
|
|
},
|
|
|
|
|
|
|
|
'& .dragHandleContainer': {
|
2023-02-02 11:12:31 +00:00
|
|
|
visibility: 'visible' as const
|
2022-02-24 12:20:37 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
'.horizontal-filmstrip &.hidden': {
|
|
|
|
bottom: '-50px',
|
|
|
|
|
|
|
|
'&:hover': {
|
|
|
|
backgroundColor: 'transparent'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
'&.hidden': {
|
|
|
|
'& .toggleFilmstripContainer': {
|
|
|
|
opacity: 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
filmstripBackground: {
|
|
|
|
backgroundColor: theme.palette.uiBackground,
|
|
|
|
|
|
|
|
'&:hover': {
|
|
|
|
backgroundColor: theme.palette.uiBackground
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
resizableFilmstripContainer: {
|
|
|
|
display: 'flex',
|
2023-02-02 11:12:31 +00:00
|
|
|
position: 'relative' as const,
|
|
|
|
flexDirection: 'row' as const,
|
2022-02-24 12:20:37 +00:00
|
|
|
alignItems: 'center',
|
|
|
|
height: '100%',
|
|
|
|
width: '100%',
|
|
|
|
transition: 'background .2s ease-in-out',
|
|
|
|
|
|
|
|
'& .avatar-container': {
|
|
|
|
maxWidth: 'initial',
|
|
|
|
maxHeight: 'initial'
|
2022-06-29 13:59:49 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
'&.top-panel-filmstrip': {
|
|
|
|
flexDirection: 'column'
|
2022-02-24 12:20:37 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
dragHandleContainer: {
|
|
|
|
height: '100%',
|
|
|
|
width: '9px',
|
|
|
|
backgroundColor: 'transparent',
|
2023-02-02 11:12:31 +00:00
|
|
|
position: 'relative' as const,
|
2022-02-24 12:20:37 +00:00
|
|
|
cursor: 'col-resize',
|
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
2023-02-02 11:12:31 +00:00
|
|
|
visibility: 'hidden' as const,
|
2022-02-24 12:20:37 +00:00
|
|
|
|
|
|
|
'&:hover': {
|
|
|
|
'& .dragHandle': {
|
|
|
|
backgroundColor: theme.palette.icon01
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
'&.visible': {
|
|
|
|
visibility: 'visible',
|
|
|
|
|
|
|
|
'& .dragHandle': {
|
|
|
|
backgroundColor: theme.palette.icon01
|
|
|
|
}
|
2022-06-29 13:59:49 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
'&.top-panel': {
|
|
|
|
order: 2,
|
|
|
|
width: '100%',
|
|
|
|
height: '9px',
|
|
|
|
cursor: 'row-resize',
|
|
|
|
|
|
|
|
'& .dragHandle': {
|
|
|
|
height: '3px',
|
|
|
|
width: '100px'
|
|
|
|
}
|
2022-02-24 12:20:37 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
dragHandle: {
|
|
|
|
backgroundColor: theme.palette.icon02,
|
|
|
|
height: '100px',
|
|
|
|
width: '3px',
|
|
|
|
borderRadius: '1px'
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|