123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328 |
- // @flow
-
- import { StyleSheet } from 'react-native';
-
- import { BoxModel, ColorPalette, createStyleSheet } from '../../../styles';
-
- const AVATAR_OPACITY = 0.4;
- const AVATAR_SIZE = 65;
- const HEADER_COLOR = ColorPalette.blue;
-
- // Header height is from Android guidelines. Also, this looks good.
- const HEADER_HEIGHT = 56;
- const OVERLAY_FONT_COLOR = 'rgba(255, 255, 255, 0.6)';
- const SECONDARY_ACTION_BUTTON_SIZE = 30;
-
- export const HEADER_PADDING = BoxModel.padding;
- export const STATUSBAR_COLOR = ColorPalette.blueHighlight;
- export const SIDEBAR_WIDTH = 250;
- export const UNDERLAY_COLOR = 'rgba(255, 255, 255, 0.2)';
-
- const HEADER_STYLES = {
- /**
- * Platform specific header button (e.g. back, menu, etc).
- */
- headerButton: {
- alignSelf: 'center',
- color: ColorPalette.white,
- fontSize: 26,
- paddingRight: 22
- },
-
- /**
- * Style of the header overlay to cover the unsafe areas.
- */
- headerOverlay: {
- backgroundColor: HEADER_COLOR
- },
-
- /**
- * Generic style for a label placed in the header.
- */
- headerText: {
- color: ColorPalette.white,
- fontSize: 20
- },
-
- /**
- * The top-level element of a page.
- */
- page: {
- ...StyleSheet.absoluteFillObject,
- alignItems: 'stretch',
- flex: 1,
- flexDirection: 'column',
- overflow: 'hidden'
- },
-
- /**
- * Base style of Header.
- */
- screenHeader: {
- alignItems: 'center',
- backgroundColor: HEADER_COLOR,
- flexDirection: 'row',
- height: HEADER_HEIGHT,
- justifyContent: 'flex-start',
- padding: HEADER_PADDING
- }
- };
-
- /**
- * Style classes of the PagedList-based components.
- */
- const PAGED_LIST_STYLES = {
-
- /**
- * Style of the page indicator (Android).
- */
- pageIndicator: {
- alignItems: 'center',
- flex: 1,
- flexDirection: 'column',
- justifyContent: 'center'
- },
-
- /**
- * Additional style for the active indicator icon (Android).
- */
- pageIndicatorActive: {
- color: ColorPalette.white
- },
-
- /**
- * Container for the page indicators (Android).
- */
- pageIndicatorContainer: {
- alignItems: 'stretch',
- backgroundColor: ColorPalette.blue,
- flexDirection: 'row',
- height: 56,
- justifyContent: 'center'
- },
-
- /**
- * Icon of the page indicator (Android).
- */
- pageIndicatorIcon: {
- color: ColorPalette.blueHighlight,
- fontSize: 24
- },
-
- /**
- * Label of the page indicator (Android).
- */
- pageIndicatorText: {
- color: ColorPalette.blueHighlight
- },
-
- /**
- * Top level style of the paged list.
- */
- pagedList: {
- flex: 1
- },
-
- /**
- * The paged list container View.
- */
- pagedListContainer: {
- flex: 1,
- flexDirection: 'column'
- },
-
- /**
- * Disabled style for the container.
- */
- pagedListContainerDisabled: {
- opacity: 0.2
- }
- };
-
- const SECTION_LIST_STYLES = {
- /**
- * The style of the actual avatar.
- */
- avatar: {
- alignItems: 'center',
- backgroundColor: `rgba(23, 160, 219, ${AVATAR_OPACITY})`,
- borderRadius: AVATAR_SIZE,
- height: AVATAR_SIZE,
- justifyContent: 'center',
- width: AVATAR_SIZE
- },
-
- /**
- * List of styles of the avatar of a remote meeting (not the default
- * server). The number of colors are limited because they should match
- * nicely.
- */
- avatarColor1: {
- backgroundColor: `rgba(232, 105, 156, ${AVATAR_OPACITY})`
- },
-
- avatarColor2: {
- backgroundColor: `rgba(255, 198, 115, ${AVATAR_OPACITY})`
- },
-
- avatarColor3: {
- backgroundColor: `rgba(128, 128, 255, ${AVATAR_OPACITY})`
- },
-
- avatarColor4: {
- backgroundColor: `rgba(105, 232, 194, ${AVATAR_OPACITY})`
- },
-
- avatarColor5: {
- backgroundColor: `rgba(234, 255, 128, ${AVATAR_OPACITY})`
- },
-
- /**
- * The style of the avatar container that makes the avatar rounded.
- */
- avatarContainer: {
- alignItems: 'center',
- flexDirection: 'row',
- justifyContent: 'space-around',
- padding: 5
- },
-
- /**
- * Simple {@code Text} content of the avatar (the actual initials).
- */
- avatarContent: {
- backgroundColor: 'rgba(0, 0, 0, 0)',
- color: OVERLAY_FONT_COLOR,
- fontSize: 32,
- fontWeight: '100',
- textAlign: 'center'
- },
-
- /**
- * The top level container style of the list.
- */
- container: {
- flex: 1
- },
-
- list: {
- flex: 1,
- flexDirection: 'column'
- },
-
- listItem: {
- alignItems: 'center',
- flex: 1,
- flexDirection: 'row',
- paddingVertical: 5
- },
-
- listItemDetails: {
- flex: 1,
- flexDirection: 'column',
- overflow: 'hidden',
- paddingHorizontal: 5
- },
-
- listItemText: {
- color: OVERLAY_FONT_COLOR,
- fontSize: 14
- },
-
- listItemTitle: {
- fontWeight: 'bold',
- fontSize: 16
- },
-
- listSection: {
- alignItems: 'center',
- backgroundColor: 'rgba(255, 255, 255, 0.2)',
- flex: 1,
- flexDirection: 'row',
- padding: 5
- },
-
- listSectionText: {
- color: OVERLAY_FONT_COLOR,
- fontSize: 14,
- fontWeight: 'normal'
- },
-
- pullToRefresh: {
- alignItems: 'center',
- flex: 1,
- flexDirection: 'column',
- justifyContent: 'center',
- padding: 20
- },
-
- pullToRefreshIcon: {
- backgroundColor: 'transparent',
- color: OVERLAY_FONT_COLOR,
- fontSize: 20
- },
-
- pullToRefreshText: {
- backgroundColor: 'transparent',
- color: OVERLAY_FONT_COLOR
- },
-
- secondaryActionContainer: {
- alignItems: 'center',
- backgroundColor: ColorPalette.blue,
- borderRadius: 3,
- height: SECONDARY_ACTION_BUTTON_SIZE,
- justifyContent: 'center',
- margin: BoxModel.margin * 0.5,
- marginRight: BoxModel.margin,
- width: SECONDARY_ACTION_BUTTON_SIZE
- },
-
- secondaryActionLabel: {
- color: ColorPalette.white
- },
-
- touchableView: {
- flexDirection: 'row'
- }
- };
-
- const SIDEBAR_STYLES = {
- /**
- * The topmost container of the side bar.
- */
- sideMenuContainer: {
- ...StyleSheet.absoluteFillObject
- },
-
- /**
- * The container of the actual content of the side menu.
- */
- sideMenuContent: {
- bottom: 0,
- left: -SIDEBAR_WIDTH,
- position: 'absolute',
- top: 0,
- width: SIDEBAR_WIDTH
- },
-
- /**
- * The opaque area that covers the rest of the screen, when the side bar is
- * open.
- */
- sideMenuShadow: {
- ...StyleSheet.absoluteFillObject,
- backgroundColor: 'rgba(0, 0, 0, 0.5)'
- }
- };
-
- /**
- * The styles of the generic React {@code Component}s implemented by the feature
- * base/react.
- */
- export default createStyleSheet({
- ...HEADER_STYLES,
- ...PAGED_LIST_STYLES,
- ...SECTION_LIST_STYLES,
- ...SIDEBAR_STYLES
- });
|