Skip to content

Commit

Permalink
Merge pull request Expensify#22986 from Expensify/georgia-addLightTheme
Browse files Browse the repository at this point in the history
Add Light Theme `light.js` and clean up `colors.js`
  • Loading branch information
grgia authored Sep 15, 2023
2 parents ab5d4c4 + 1efe653 commit cd9e86e
Show file tree
Hide file tree
Showing 29 changed files with 247 additions and 240 deletions.
18 changes: 9 additions & 9 deletions .storybook/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ export default create({
fontBase: 'ExpensifyNeue-Regular',
fontCode: 'monospace',
base: 'dark',
appBg: colors.greenHighlightBackground,
colorPrimary: colors.greenDefaultButton,
appBg: colors.darkHighlightBackground,
colorPrimary: colors.darkDefaultButton,
colorSecondary: colors.green,
appContentBg: colors.greenAppBackground,
textColor: colors.white,
barTextColor: colors.white,
appContentBg: colors.darkAppBackground,
textColor: colors.darkPrimaryText,
barTextColor: colors.darkPrimaryText,
barSelectedColor: colors.green,
barBg: colors.greenAppBackground,
appBorderColor: colors.greenBorders,
inputBg: colors.greenHighlightBackground,
inputBorder: colors.greenBorders,
barBg: colors.darkAppBackground,
appBorderColor: colors.darkBorders,
inputBg: colors.darkHighlightBackground,
inputBorder: colors.darkBorders,
appBorderRadius: 8,
inputBorderRadius: 8,
});
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Text from '../Text';
import Icon from '../Icon';
import * as Illustrations from '../Icon/Illustrations';
import * as Expensicons from '../Icon/Expensicons';
import colors from '../../styles/colors';
import themeColors from '../../styles/themes/default';
import styles from '../../styles/styles';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
import Navigation from '../../libs/Navigation/Navigation';
Expand Down Expand Up @@ -56,7 +56,7 @@ function DeeplinkRedirectLoadingIndicator({translate, openLinkInBrowser, session
<Icon
width={154}
height={34}
fill={colors.green}
fill={themeColors.success}
src={Expensicons.ExpensifyWordmark}
/>
</View>
Expand Down
4 changes: 2 additions & 2 deletions src/components/DotIndicatorMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {View} from 'react-native';
import styles from '../styles/styles';
import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';
import colors from '../styles/colors';
import themeColors from '../styles/themes/default';
import Text from './Text';
import * as Localize from '../libs/Localize';

Expand Down Expand Up @@ -57,7 +57,7 @@ function DotIndicatorMessage(props) {
<View style={styles.offlineFeedback.errorDot}>
<Icon
src={Expensicons.DotIndicator}
fill={props.type === 'error' ? colors.red : colors.green}
fill={props.type === 'error' ? themeColors.danger : themeColors.success}
/>
</View>
<View style={styles.offlineFeedback.textContainer}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/FormHelpMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {View} from 'react-native';
import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';
import Text from './Text';
import colors from '../styles/colors';
import themeColors from '../styles/themes/default';
import styles from '../styles/styles';
import stylePropTypes from '../styles/stylePropTypes';
import * as Localize from '../libs/Localize';
Expand Down Expand Up @@ -42,7 +42,7 @@ function FormHelpMessage(props) {
{props.isError && (
<Icon
src={Expensicons.DotIndicator}
fill={colors.red}
fill={themeColors.success}
/>
)}
<View style={[styles.flex1, props.isError && styles.ml2]}>
Expand Down
8 changes: 4 additions & 4 deletions src/components/GrowlNotification/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState} from 'react';
import {Directions, FlingGestureHandler, State} from 'react-native-gesture-handler';
import {View, Animated} from 'react-native';
import colors from '../../styles/colors';
import themeColors from '../../styles/themes/default';
import Text from '../Text';
import Icon from '../Icon';
import * as Expensicons from '../Icon/Expensicons';
Expand All @@ -14,15 +14,15 @@ import * as Pressables from '../Pressable';
const types = {
[CONST.GROWL.SUCCESS]: {
icon: Expensicons.Checkmark,
iconColor: colors.green,
iconColor: themeColors.success,
},
[CONST.GROWL.ERROR]: {
icon: Expensicons.Exclamation,
iconColor: colors.red,
iconColor: themeColors.danger,
},
[CONST.GROWL.WARNING]: {
icon: Expensicons.Exclamation,
iconColor: colors.yellow,
iconColor: themeColors.warning,
},
};

Expand Down
3 changes: 1 addition & 2 deletions src/components/LHNOptionsList/OptionRowLHN.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import * as Expensicons from '../Icon/Expensicons';
import MultipleAvatars from '../MultipleAvatars';
import Hoverable from '../Hoverable';
import DisplayNames from '../DisplayNames';
import colors from '../../styles/colors';
import Text from '../Text';
import SubscriptAvatar from '../SubscriptAvatar';
import CONST from '../../CONST';
Expand Down Expand Up @@ -246,7 +245,7 @@ function OptionRowLHN(props) {
<View style={[styles.alignItemsCenter, styles.justifyContentCenter]}>
<Icon
src={Expensicons.DotIndicator}
fill={colors.red}
fill={themeColors.danger}
/>
</View>
)}
Expand Down
3 changes: 2 additions & 1 deletion src/components/MentionSuggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {View} from 'react-native';
import PropTypes from 'prop-types';
import _ from 'underscore';
import styles from '../styles/styles';
import themeColors from '../styles/themes/default';
import * as StyleUtils from '../styles/StyleUtils';
import Text from './Text';
import CONST from '../CONST';
Expand Down Expand Up @@ -79,7 +80,7 @@ function MentionSuggestions(props) {
size={isIcon ? CONST.AVATAR_SIZE.MENTION_ICON : CONST.AVATAR_SIZE.SMALLER}
name={item.icons[0].name}
type={item.icons[0].type}
fill={styles.success}
fill={themeColors.success}
/>
</View>
<Text
Expand Down
3 changes: 1 addition & 2 deletions src/components/MenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import Badge from './Badge';
import CONST from '../CONST';
import menuItemPropTypes from './menuItemPropTypes';
import SelectCircle from './SelectCircle';
import colors from '../styles/colors';
import MultipleAvatars from './MultipleAvatars';
import * as defaultWorkspaceAvatars from './Icon/WorkspaceDefaultAvatars';
import PressableWithSecondaryInteraction from './PressableWithSecondaryInteraction';
Expand Down Expand Up @@ -298,7 +297,7 @@ const MenuItem = React.forwardRef((props, ref) => {
<View style={[styles.alignItemsCenter, styles.justifyContentCenter, styles.ml1]}>
<Icon
src={Expensicons.DotIndicator}
fill={props.brickRoadIndicator === 'error' ? colors.red : colors.green}
fill={props.brickRoadIndicator === 'error' ? themeColors.danger : themeColors.success}
/>
</View>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/OptionsList/BaseOptionsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ function BaseOptionsList({
return (
<View style={listContainerStyles}>
{isLoading ? (
<OptionsListSkeletonView />
<OptionsListSkeletonView shouldAnimate />
) : (
<>
{headerMessage ? (
Expand Down
4 changes: 2 additions & 2 deletions src/components/OptionsListSkeletonView.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class OptionsListSkeletonView extends React.Component {
key={`skeletonViewItems${i}`}
animate={this.props.shouldAnimate}
height={CONST.LHN_SKELETON_VIEW_ITEM_HEIGHT}
backgroundColor={themeColors.borderLighter}
foregroundColor={themeColors.border}
backgroundColor={themeColors.skeletonLHNIn}
foregroundColor={themeColors.skeletonLHNOut}
style={styles.mr5}
>
<Circle
Expand Down
2 changes: 1 addition & 1 deletion src/components/QRShare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class QRShare extends Component {
>
<View style={styles.expensifyQrLogo}>
<ExpensifyWordmark
fill={defaultTheme.borderFocus}
fill={defaultTheme.QRLogo}
width="100%"
height="100%"
/>
Expand Down
3 changes: 2 additions & 1 deletion src/components/ReportActionItem/MoneyReportView.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
import reportPropTypes from '../../pages/reportPropTypes';
import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions';
import styles from '../../styles/styles';
import themeColors from '../../styles/themes/default';
import * as ReportUtils from '../../libs/ReportUtils';
import * as StyleUtils from '../../styles/StyleUtils';
import CONST from '../../CONST';
Expand Down Expand Up @@ -53,7 +54,7 @@ function MoneyReportView(props) {
<View style={[styles.defaultCheckmarkWrapper, styles.mh2]}>
<Icon
src={Expensicons.Checkmark}
fill={styles.success}
fill={themeColors.success}
/>
</View>
)}
Expand Down
3 changes: 1 addition & 2 deletions src/components/ReportActionItem/MoneyRequestPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import * as ReceiptUtils from '../../libs/ReceiptUtils';
import ReportActionItemImages from './ReportActionItemImages';
import transactionPropTypes from '../transactionPropTypes';
import * as StyleUtils from '../../styles/StyleUtils';
import colors from '../../styles/colors';
import variables from '../../styles/variables';
import useWindowDimensions from '../../hooks/useWindowDimensions';
import MoneyRequestSkeletonView from '../MoneyRequestSkeletonView';
Expand Down Expand Up @@ -265,7 +264,7 @@ function MoneyRequestPreview(props) {
{hasFieldErrors && (
<Icon
src={Expensicons.DotIndicator}
fill={colors.red}
fill={themeColors.danger}
/>
)}
</View>
Expand Down
3 changes: 1 addition & 2 deletions src/components/ReportActionItem/ReportPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import * as ReceiptUtils from '../../libs/ReceiptUtils';
import * as ReportActionUtils from '../../libs/ReportActionsUtils';
import * as TransactionUtils from '../../libs/TransactionUtils';
import ReportActionItemImages from './ReportActionItemImages';
import colors from '../../styles/colors';

const propTypes = {
/** All the data of the action */
Expand Down Expand Up @@ -199,7 +198,7 @@ function ReportPreview(props) {
{hasErrors && (
<Icon
src={Expensicons.DotIndicator}
fill={colors.red}
fill={themeColors.danger}
/>
)}
</View>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ReportActionsSkeletonView/SkeletonViewLines.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ function SkeletonViewLines(props) {
<SkeletonViewContentLoader
animate={props.shouldAnimate}
height={CONST.CHAT_SKELETON_VIEW.HEIGHT_FOR_ROW_COUNT[props.numberOfRows]}
backgroundColor={themeColors.highlightBG}
foregroundColor={themeColors.border}
backgroundColor={themeColors.skeletonLHNIn}
foregroundColor={themeColors.skeletonLHNOut}
style={styles.mr5}
>
<Circle
Expand Down
4 changes: 2 additions & 2 deletions src/components/ValidateCode/ExpiredValidateCodeModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {View} from 'react-native';
import colors from '../../styles/colors';
import themeColors from '../../styles/themes/default';
import styles from '../../styles/styles';
import Icon from '../Icon';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
Expand Down Expand Up @@ -33,7 +33,7 @@ function ExpiredValidateCodeModal(props) {
<Icon
width={variables.modalWordmarkWidth}
height={variables.modalWordmarkHeight}
fill={colors.green}
fill={themeColors.success}
src={Expensicons.ExpensifyWordmark}
/>
</View>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ValidateCode/JustSignedInModal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import {View} from 'react-native';
import colors from '../../styles/colors';
import themeColors from '../../styles/themes/default';
import styles from '../../styles/styles';
import Icon from '../Icon';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
Expand Down Expand Up @@ -41,7 +41,7 @@ function JustSignedInModal(props) {
<Icon
width={variables.modalWordmarkWidth}
height={variables.modalWordmarkHeight}
fill={colors.green}
fill={themeColors.success}
src={Expensicons.ExpensifyWordmark}
/>
</View>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ValidateCode/ValidateCodeModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {compose} from 'underscore';
import {withOnyx} from 'react-native-onyx';
import lodashGet from 'lodash/get';
import {View} from 'react-native';
import colors from '../../styles/colors';
import themeColors from '../../styles/themes/default';
import styles from '../../styles/styles';
import Icon from '../Icon';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
Expand Down Expand Up @@ -71,7 +71,7 @@ function ValidateCodeModal(props) {
<Icon
width={variables.modalWordmarkWidth}
height={variables.modalWordmarkHeight}
fill={colors.green}
fill={themeColors.success}
src={Expensicons.ExpensifyWordmark}
/>
</View>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/LogInWithShortLivedAuthTokenPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as Session from '../libs/actions/Session';
import FullScreenLoadingIndicator from '../components/FullscreenLoadingIndicator';
import Navigation from '../libs/Navigation/Navigation';
import styles from '../styles/styles';
import colors from '../styles/colors';
import themeColors from '../styles/themes/default';
import Icon from '../components/Icon';
import * as Expensicons from '../components/Icon/Expensicons';
import * as Illustrations from '../components/Icon/Illustrations';
Expand Down Expand Up @@ -93,7 +93,7 @@ function LogInWithShortLivedAuthTokenPage(props) {
<Icon
width={154}
height={34}
fill={colors.green}
fill={themeColors.success}
src={Expensicons.ExpensifyWordmark}
/>
</View>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/ReimbursementAccount/BankAccountStep.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as Expensicons from '../../components/Icon/Expensicons';
import styles from '../../styles/styles';
import TextLink from '../../components/TextLink';
import Icon from '../../components/Icon';
import colors from '../../styles/colors';
import themeColors from '../../styles/themes/default';
import CONST from '../../CONST';
import withLocalize from '../../components/withLocalize';
import Text from '../../components/Text';
Expand Down Expand Up @@ -146,7 +146,7 @@ function BankAccountStep(props) {
<View style={[styles.flexRow, styles.alignItemsCenter, styles.m4]}>
<Icon
src={Expensicons.Exclamation}
fill={colors.red}
fill={themeColors.danger}
/>
<Text style={[styles.mutedTextLabel, styles.ml4, styles.flex1]}>{props.translate('bankAccount.validateAccountError')}</Text>
</View>
Expand All @@ -164,7 +164,7 @@ function BankAccountStep(props) {
<View style={[styles.ml1]}>
<Icon
src={Expensicons.Lock}
fill={colors.blue}
fill={themeColors.BRAND_COLORS.blue400}
/>
</View>
</PressableWithoutFeedback>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/HeaderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import CONST from '../../CONST';
import * as ReportUtils from '../../libs/ReportUtils';
import Text from '../../components/Text';
import Tooltip from '../../components/Tooltip';
import colors from '../../styles/colors';
import themeColors from '../../styles/themes/default';
import reportPropTypes from '../reportPropTypes';
import ONYXKEYS from '../../ONYXKEYS';
import ThreeDotsMenu from '../../components/ThreeDotsMenu';
Expand Down Expand Up @@ -209,7 +209,7 @@ function HeaderView(props) {
<View style={[styles.alignItemsCenter, styles.justifyContentCenter]}>
<Icon
src={Expensicons.DotIndicator}
fill={colors.red}
fill={themeColors.danger}
/>
</View>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/report/LinkPreviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import TextLink from '../../../components/TextLink';
import * as StyleUtils from '../../../styles/StyleUtils';
import styles from '../../../styles/styles';
import variables from '../../../styles/variables';
import colors from '../../../styles/colors';
import themeColors from '../../../styles/themes/default';

const IMAGE_TYPES = ['jpg', 'jpeg', 'png'];
const MAX_IMAGE_HEIGHT = 180;
Expand Down Expand Up @@ -99,7 +99,7 @@ function LinkPreviewer(props) {
{!_.isEmpty(title) && (
<TextLink
fontSize={variables.fontSizeNormal}
style={[styles.mv2, StyleUtils.getTextColorStyle(colors.blueLinkPreview), styles.alignSelfStart]}
style={[styles.mv2, StyleUtils.getTextColorStyle(themeColors.link), styles.alignSelfStart]}
href={url}
>
{title}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/sidebar/SidebarLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class SidebarLinks extends React.PureComponent {
<Header
title={
<LogoComponent
fill={defaultTheme.textLight}
fill={defaultTheme.text}
width={variables.lhnLogoWidth}
height={variables.lhnLogoHeight}
/>
Expand Down
Loading

0 comments on commit cd9e86e

Please sign in to comment.