theme.boxShadow.shades[200]};
display: flex;
@@ -325,7 +324,7 @@ export const EditorArea = styled.div`
export const SideMenu = styled.div`
background: ${th('colorBackgroundToolBar')}; /* TODO is this color defined? */
- border-right: ${th('borderWidth')} ${th('borderStyle')} ${color.gray60};
+ border-right: ${th('borderWidth')} ${th('borderStyle')} ${th('color.gray60')};
height: 100%;
min-width: 200px; /* We can shrink this now if we want! */
`
diff --git a/packages/client/app/components/wax-collab/src/layout/NotesStyles.jsx b/packages/client/app/components/wax-collab/src/layout/NotesStyles.jsx
index 133db19c8..4c0e781a4 100644
--- a/packages/client/app/components/wax-collab/src/layout/NotesStyles.jsx
+++ b/packages/client/app/components/wax-collab/src/layout/NotesStyles.jsx
@@ -1,11 +1,10 @@
import styled from 'styled-components'
-import { grid } from '@coko/client'
+import { th, grid } from '@coko/client'
import EditorElements from './EditorElements'
-import { color } from '../../../../theme'
export const NotesAreaContainer = styled.div`
/* stylelint-disable selector-class-pattern */
- background: ${color.backgroundA};
+ background: ${th('color.backgroundA')};
bottom: ${grid(-2)};
box-shadow: 0 ${grid(-0.3)} ${grid(0.5)} ${grid(-0.2)} gray;
display: flex; /* this is so that comments on notes appear beside the notes */
@@ -31,8 +30,8 @@ export const NotesAreaContainer = styled.div`
`
export const ReadOnlyNotesAreaContainer = styled.div`
- background: ${color.backgroundA};
- border-top: 1px solid ${color.gray90};
+ background: ${th('color.backgroundA')};
+ border-top: 1px solid ${th('color.gray90')};
grid-column-start: editorCol;
grid-row-start: notesRow;
width: 100%;
@@ -59,7 +58,7 @@ export const NotesContainer = styled.div`
`
export const NotesHeading = styled.div`
- color: ${color.brand1.base};
+ color: ${th('color.brand1.base')};
margin: 3px 7px 3px -25px;
text-transform: uppercase;
`
diff --git a/packages/client/app/components/wax-collab/src/layout/waxTheme.js b/packages/client/app/components/wax-collab/src/layout/waxTheme.js
index 66f11ac18..92fbed325 100644
--- a/packages/client/app/components/wax-collab/src/layout/waxTheme.js
+++ b/packages/client/app/components/wax-collab/src/layout/waxTheme.js
@@ -1,9 +1,6 @@
-import theme from '../../../../theme'
-
// NOTE: this overrides the Kotahi default theme!
const waxTheme = {
- ...theme,
gridUnit: '4px',
borderRadius: '0',
borderWidth: '1px',
diff --git a/packages/client/app/pages/Group.page.tsx b/packages/client/app/pages/Group.page.tsx
index b7013f5b3..67a90b687 100644
--- a/packages/client/app/pages/Group.page.tsx
+++ b/packages/client/app/pages/Group.page.tsx
@@ -5,22 +5,12 @@ import { ThemeProvider } from 'styled-components'
import { GET_GROUPS } from '../queries'
import { reloadTranslationsForGroup } from '../i18n'
-import {
- setBrandColors,
- colorPrimaryDefault,
- colorSecondaryDefault,
-} from '../theme'
+import { validateColor, makeTheme } from '../theme'
import { Spinner, PageError } from '../components/shared'
import ErrorPageFallback from '../ui/base/ErrorPageFallback'
import { ConfigProvider } from '../components/config/src'
import { YjsProvider } from '../components/provider-yjs/YjsProvider'
import DynamicFavicon from '../dynamicFavicon'
-import { validateColor } from '../theme/color'
-
-type ThemeOverrides = {
- colorPrimary?: string
- colorSecondary?: string
-}
const GroupPage = (): ReactNode => {
const { groupName } = useParams()
@@ -78,17 +68,20 @@ const GroupPage = (): ReactNode => {
activeConfig?.flaxSiteUrl,
])
- const groupThemeOverrides: ThemeOverrides = useMemo(() => {
- if (!config?.groupIdentity) return {}
+ const theme = useMemo(() => {
+ const defaultTheme = makeTheme()
+ if (!config?.groupIdentity) return defaultTheme
const { primaryColor, secondaryColor } = config.groupIdentity
const isPrimaryValid = validateColor(primaryColor)
const isSecondaryValid = validateColor(secondaryColor)
- return {
- colorPrimary: isPrimaryValid ? primaryColor : colorPrimaryDefault,
- colorSecondary: isSecondaryValid ? secondaryColor : colorSecondaryDefault,
+ if (!isPrimaryValid || !isSecondaryValid) {
+ console.error('Primary or secondary is not a valid color value.')
+ return defaultTheme
}
+
+ return makeTheme(primaryColor, secondaryColor)
}, [config])
if (loading) return
@@ -103,15 +96,9 @@ const GroupPage = (): ReactNode => {
window.localStorage.setItem('groupId', currentGroup.id)
- // TO DO - refactor colors so that the theme is not bypassed
- setBrandColors(
- config?.groupIdentity?.primaryColor,
- config?.groupIdentity?.secondaryColor,
- )
-
// TO DO - should yjs provider wrap the whole group?
return (
-
+
diff --git a/packages/client/app/start.js b/packages/client/app/start.js
index 8f6db4927..cd43d7ee7 100644
--- a/packages/client/app/start.js
+++ b/packages/client/app/start.js
@@ -3,7 +3,7 @@ import { setContext } from '@apollo/client/link/context'
import { startClient } from '@coko/client'
-import theme from './theme'
+import { makeTheme } from './theme'
import routes from './DefaultPage'
import './i18n'
@@ -111,4 +111,6 @@ const makeApolloConfig = originalConfig => {
}
}
+const theme = makeTheme()
+
startClient(routes, theme, { makeApolloConfig })
diff --git a/packages/client/app/theme/color.js b/packages/client/app/theme/color.js
deleted file mode 100644
index b3770ff57..000000000
--- a/packages/client/app/theme/color.js
+++ /dev/null
@@ -1,138 +0,0 @@
-/* eslint-disable new-cap */
-
-import Color from 'color'
-import lightenBy from '../shared/lightenBy'
-
-const defaultBrandColor1 = '#2fac66'
-const defaultBrandColor2 = '#704f79'
-
-export const validateColor = colorCode => {
- try {
- Color(colorCode)
- return colorCode
- } catch {
- console.error(`${colorCode} is not a valid color code`)
- return null
- }
-}
-
-const validateInstanceConfigColors = (colorCode, fallbackColor) => {
- try {
- Color(colorCode)
- return colorCode
- /* eslint-disable-next-line */
- } catch (err) {
- return fallbackColor || defaultBrandColor1
- }
-}
-
-let colorBrand1 = defaultBrandColor1
-let colorBrand2 = defaultBrandColor2
-
-/** Colors are named with round numbers for ease of use. Actual lightness values may differ. */
-const color = {
- black: '#000000',
- gray0: '#000000',
- gray5: '#111111', // 7%: colorText
- gray10: '#191919', // 10%
- gray20: '#323232', // 20%
- gray30: '#4F4F4F', // 30%
- // gray35: '#595959', // 35%: colorTextPlaceholder
- gray40: '#666666', // 40%: colorIconPrimary
- gray50: '#888888', // 53%
- gray60: '#A5A5A5', // 65%: near colorBorder:#AAAAAA
- gray70: '#BFBFBF', // 75%
- gray80: '#DEDEDE', // 87%: colorContainerBorder
- gray90: '#E8E8E8', // 91%: colorFurniture
- gray95: '#EEEEEE', // 93%
- gray97: '#F8F8F9', // 97%
- gray99: '#FCFCFD', // 99%
- gray100: '#FFFFFF',
- white: '#FFFFFF',
-
- text: '#111111',
- textReverse: '#FFFFFF',
- textPlaceholder: '#666666',
-
- backgroundA: '#FFFFFF',
- backgroundB: '#f9fafb',
- backgroundC: '#f4f5f7',
-
- brand1: {
- shade50: () => Color(colorBrand1).darken(0.52),
- shade25: () => Color(colorBrand1).darken(0.27),
- shade15: () => Color(colorBrand1).darken(0.17),
- shade10: () => Color(colorBrand1).darken(0.11),
- base: () => colorBrand1,
- tint10: () => lightenBy(colorBrand1, 0.1),
- tint25: () => lightenBy(colorBrand1, 0.26),
- tint50: () => lightenBy(colorBrand1, 0.53),
- tint70: () => lightenBy(colorBrand1, 0.73),
- tint90: () => lightenBy(colorBrand1, 0.93),
- },
- brand2: {
- shade50: () => Color(colorBrand2).darken(0.52),
- shade25: () => Color(colorBrand2).darken(0.27),
- shade15: () => Color(colorBrand2).darken(0.17),
- shade10: () => Color(colorBrand2).darken(0.11),
- base: () => colorBrand2,
- tint10: () => lightenBy(colorBrand2, 0.1),
- tint25: () => lightenBy(colorBrand2, 0.26),
- tint50: () => lightenBy(colorBrand2, 0.53),
- tint70: () => lightenBy(colorBrand2, 0.73),
- tint90: () => lightenBy(colorBrand2, 0.93),
- },
-
- success: {
- shade50: '#133a0e',
- shade25: '#1b5414',
- shade15: '#25721c',
- shade10: '#2c8a21',
- base: '#329a25',
- tint10: '#3bb32b',
- tint25: '#4fcb3e',
- tint50: '#8ddf83',
- tint70: '#bcedb6',
- tint90: '#e3f8e0',
- },
- warning: {
- shade50: '#6f3f00',
- shade25: '#8e5000',
- shade15: '#ae6200',
- shade10: '#c56f00',
- base: '#e48100',
- tint10: '#f69414',
- tint25: '#f8ae4c',
- tint50: '#f6c88d',
- tint70: '#fadfbe',
- tint90: '#fdf1df',
- },
- error: {
- shade50: '#6f1919',
- shade25: '#8a1e1e',
- shade15: '#a52424',
- shade10: '#bf2828',
- base: '#d22b2b',
- tint10: '#d94747',
- tint25: '#e06969',
- tint50: '#e88e8e',
- tint70: '#f0b4b4',
- tint90: '#f8dcdc',
- },
- additional: {
- blue: '#71AED2',
- purple: '#615CCF',
- aqua: '#7ED3A6',
- green: '#89D46C',
- mustard: '#CCD66E',
- },
-}
-
-export const setBrandColors = (color1, color2) => {
- colorBrand1 = validateInstanceConfigColors(color1, defaultBrandColor1)
- colorBrand2 = validateInstanceConfigColors(color2, defaultBrandColor2)
-}
-
-setBrandColors()
-
-export default color
diff --git a/packages/client/app/theme/elements/Action.jsx b/packages/client/app/theme/elements/Action.jsx
index 1a370be5e..965345a7f 100644
--- a/packages/client/app/theme/elements/Action.jsx
+++ b/packages/client/app/theme/elements/Action.jsx
@@ -2,7 +2,6 @@
import { css } from 'styled-components'
import { th } from '@coko/client'
-import color from '../color'
const underlineFade = css`
&::before {
@@ -36,7 +35,7 @@ const underlineAnimation = css`
}
&::before {
- background-color: ${color.brand1.base};
+ background-color: ${th('color.brand1.base')};
bottom: 0;
content: '';
height: 2px;
diff --git a/packages/client/app/theme/elements/AppBar.jsx b/packages/client/app/theme/elements/AppBar.jsx
index cd4be595f..dc2dbb4b3 100644
--- a/packages/client/app/theme/elements/AppBar.jsx
+++ b/packages/client/app/theme/elements/AppBar.jsx
@@ -1,5 +1,5 @@
import { css } from 'styled-components'
-import color from '../color'
+import { th } from '@coko/client'
/*
To disable underline from Logo
@@ -7,7 +7,7 @@ import color from '../color'
export default {
Root: css`
- box-shadow: 0 0 1px ${color.brand1.base};
+ box-shadow: 0 0 1px ${th('color.brand1.base')};
margin-bottom: 1px;
`,
LogoLink: css`
diff --git a/packages/client/app/theme/elements/Button.jsx b/packages/client/app/theme/elements/Button.jsx
index c47637dbc..294fe6488 100644
--- a/packages/client/app/theme/elements/Button.jsx
+++ b/packages/client/app/theme/elements/Button.jsx
@@ -1,11 +1,10 @@
import { css } from 'styled-components'
import { th } from '@coko/client'
-import color from '../color'
const secondary = css`
background: none;
border: none;
- color: ${color.brand1.base};
+ color: ${th('color.brand1.base')};
padding: 0;
text-decoration: underline;
@@ -14,12 +13,12 @@ const secondary = css`
&:active {
background: none;
border: none;
- color: ${color.brand1.shade25};
+ color: ${th('color.brand1.shade25')};
outline: none;
}
&[disabled] {
- color: ${color.gray40};
+ color: ${th('color.gray40')};
cursor: default;
&:hover {
@@ -41,6 +40,6 @@ export default css`
&:focus,
&:hover {
- background-color: ${color.brand1.tint25};
+ background-color: ${th('color.brand1.tint25')};
}
`
diff --git a/packages/client/app/theme/elements/Checkbox.jsx b/packages/client/app/theme/elements/Checkbox.jsx
index 6b2cfadb7..ff6099a23 100644
--- a/packages/client/app/theme/elements/Checkbox.jsx
+++ b/packages/client/app/theme/elements/Checkbox.jsx
@@ -1,5 +1,5 @@
import { css, keyframes } from 'styled-components'
-import color from '../color'
+import { th } from '@coko/client'
const checking = keyframes`
0% {
@@ -25,11 +25,11 @@ const localBorderTwoSize = '1px'
export default {
Root: css`
&:hover span {
- color: ${color.brand1.base};
+ color: ${th('color.brand1.base')};
&::before {
animation: ${checking} 0.5s;
- box-shadow: 0 0 0 ${localBorderTwoSize} ${color.brand1.base};
+ box-shadow: 0 0 0 ${localBorderTwoSize} ${th('color.brand1.base')};
}
}
`,
diff --git a/packages/client/app/theme/elements/GlobalStyle.jsx b/packages/client/app/theme/elements/GlobalStyle.jsx
index 9db3ad9e5..f46dfd6cb 100644
--- a/packages/client/app/theme/elements/GlobalStyle.jsx
+++ b/packages/client/app/theme/elements/GlobalStyle.jsx
@@ -1,6 +1,5 @@
import { createGlobalStyle } from 'styled-components'
import { th } from '@coko/client'
-import color from '../color'
export default createGlobalStyle`
html {
@@ -12,9 +11,9 @@ export default createGlobalStyle`
}
body {
- background-color: ${color.backgroundA};
+ background-color: ${th('color.backgroundA')};
box-sizing: border-box;
- color: ${color.text};
+ color: ${th('color.text')};
font-family: ${th('fontInterface')}, sans-serif;
font-size: ${th('fontSizeBase')};
height: 100%;
@@ -46,7 +45,7 @@ export default createGlobalStyle`
}
a {
- color: ${color.brand1.base};
+ color: ${th('color.brand1.base')};
}
strong,
diff --git a/packages/client/app/theme/elements/Radio.jsx b/packages/client/app/theme/elements/Radio.jsx
index e0130bc9e..cdff0be1e 100644
--- a/packages/client/app/theme/elements/Radio.jsx
+++ b/packages/client/app/theme/elements/Radio.jsx
@@ -2,7 +2,6 @@
import { css, keyframes } from 'styled-components'
import { th } from '@coko/client'
-import color from '../color'
const checking = keyframes`
0% {
@@ -26,13 +25,15 @@ export default {
Root: css`
&:hover {
span {
- color: ${props => (props.checked ? 'inherit' : color.brand1.base)};
+ color: ${props =>
+ props.checked ? 'inherit' : props.theme.color.brand1.base};
&::before {
animation-duration: ${th('transitionDuration')};
animation-name: ${props => (props.checked ? 'none' : checking)};
box-shadow: 0 0 0 ${th('borderWidth')}
- ${props => (props.checked ? 'currentColor' : color.brand1.base)};
+ ${props =>
+ props.checked ? 'currentColor' : props.theme.color.brand1.base};
}
}
}
@@ -48,7 +49,7 @@ export default {
border-radius: 50%;
box-shadow: 0 0 0 ${th('borderWidth')} currentColor;
- color: ${props => (props.color ? props.color : color.text)};
+ color: ${props => (props.color ? props.color : props.theme.color.text)};
content: ' ';
display: inline-block;
height: calc(${th('gridUnit')} * 2);
diff --git a/packages/client/app/theme/elements/TextField.jsx b/packages/client/app/theme/elements/TextField.jsx
index 583293dc8..d5c064a7e 100644
--- a/packages/client/app/theme/elements/TextField.jsx
+++ b/packages/client/app/theme/elements/TextField.jsx
@@ -1,6 +1,5 @@
import { css } from 'styled-components'
import { th, grid } from '@coko/client'
-import color from '../color'
export default {
Input: css`
@@ -41,7 +40,7 @@ export default {
case 'error':
return props.theme.colorError
default:
- return color.brand1.base
+ return props.theme.color.brand1.base
}
}};
box-shadow: ${th('boxShadow')};
diff --git a/packages/client/app/theme/index.jsx b/packages/client/app/theme/index.jsx
index 4b4fe46ad..202a9a81e 100644
--- a/packages/client/app/theme/index.jsx
+++ b/packages/client/app/theme/index.jsx
@@ -1,4 +1,8 @@
+/* eslint-disable new-cap */
+
import { css } from 'styled-components'
+import Color from 'color'
+
import {
Action,
ActionGroup,
@@ -12,9 +16,6 @@ import {
Logo,
} from './elements'
import lightenBy from '../shared/lightenBy'
-import color, { setBrandColors as internalSetBrandColors } from './color'
-import spacing from './spacing'
-import typography from './typography'
// Fonts
import '@fontsource/roboto/400.css'
@@ -23,44 +24,189 @@ import '@fontsource/roboto/700.css'
import '@fontsource/roboto/900.css'
import '@fontsource/roboto/400-italic.css'
-const cokoTheme = {
- color,
- spacing,
- typography,
+export const validateColor = colorCode => {
+ try {
+ Color(colorCode)
+ return colorCode
+ } catch {
+ console.error(`${colorCode} is not a valid color code`)
+ return null
+ }
+}
+
+const defaultBrandColor1 = '#3aae2a'
+const defaultBrandColor2 = '#9e9e9e'
+
+export const makeTheme = (
+ colorBrand1 = defaultBrandColor1,
+ colorBrand2 = defaultBrandColor2,
+) => ({
+ color: {
+ black: '#000000',
+ gray0: '#000000',
+ gray5: '#111111', // 7%: colorText
+ gray10: '#191919', // 10%
+ gray20: '#323232', // 20%
+ gray30: '#4F4F4F', // 30%
+ // gray35: '#595959', // 35%: colorTextPlaceholder
+ gray40: '#666666', // 40%: colorIconPrimary
+ gray50: '#888888', // 53%
+ gray60: '#A5A5A5', // 65%: near colorBorder:#AAAAAA
+ gray70: '#BFBFBF', // 75%
+ gray80: '#DEDEDE', // 87%: colorContainerBorder
+ gray90: '#E8E8E8', // 91%: colorFurniture
+ gray95: '#EEEEEE', // 93%
+ gray97: '#F8F8F9', // 97%
+ gray99: '#FCFCFD', // 99%
+ gray100: '#FFFFFF',
+ white: '#FFFFFF',
+
+ text: '#111111',
+ textReverse: '#FFFFFF',
+ textPlaceholder: '#666666',
+
+ backgroundA: '#FFFFFF',
+ backgroundB: '#f9fafb',
+ backgroundC: '#f4f5f7',
+
+ brand1: {
+ shade50: Color(colorBrand1).darken(0.52),
+ shade25: Color(colorBrand1).darken(0.27),
+ shade15: Color(colorBrand1).darken(0.17),
+ shade10: Color(colorBrand1).darken(0.11),
+ base: colorBrand1,
+ tint10: lightenBy(colorBrand1, 0.1),
+ tint25: lightenBy(colorBrand1, 0.26),
+ tint50: lightenBy(colorBrand1, 0.53),
+ tint70: lightenBy(colorBrand1, 0.73),
+ tint90: lightenBy(colorBrand1, 0.93),
+ },
+ brand2: {
+ shade50: Color(colorBrand2).darken(0.52),
+ shade25: Color(colorBrand2).darken(0.27),
+ shade15: Color(colorBrand2).darken(0.17),
+ shade10: Color(colorBrand2).darken(0.11),
+ base: colorBrand2,
+ tint10: lightenBy(colorBrand2, 0.1),
+ tint25: lightenBy(colorBrand2, 0.26),
+ tint50: lightenBy(colorBrand2, 0.53),
+ tint70: lightenBy(colorBrand2, 0.73),
+ tint90: lightenBy(colorBrand2, 0.93),
+ },
+
+ success: {
+ shade50: '#133a0e',
+ shade25: '#1b5414',
+ shade15: '#25721c',
+ shade10: '#2c8a21',
+ base: '#329a25',
+ tint10: '#3bb32b',
+ tint25: '#4fcb3e',
+ tint50: '#8ddf83',
+ tint70: '#bcedb6',
+ tint90: '#e3f8e0',
+ },
+ warning: {
+ shade50: '#6f3f00',
+ shade25: '#8e5000',
+ shade15: '#ae6200',
+ shade10: '#c56f00',
+ base: '#e48100',
+ tint10: '#f69414',
+ tint25: '#f8ae4c',
+ tint50: '#f6c88d',
+ tint70: '#fadfbe',
+ tint90: '#fdf1df',
+ },
+ error: {
+ shade50: '#6f1919',
+ shade25: '#8a1e1e',
+ shade15: '#a52424',
+ shade10: '#bf2828',
+ base: '#d22b2b',
+ tint10: '#d94747',
+ tint25: '#e06969',
+ tint50: '#e88e8e',
+ tint70: '#f0b4b4',
+ tint90: '#f8dcdc',
+ },
+ additional: {
+ blue: '#71AED2',
+ purple: '#615CCF',
+ aqua: '#7ED3A6',
+ green: '#89D46C',
+ mustard: '#CCD66E',
+ },
+ },
+ spacing: {
+ /** 1px */
+ a: '1px',
+ /** 2px */
+ b: '2px',
+ /** 3px */
+ c: '3px',
+ /** 5px */
+ d: '5px',
+ /** 7.5px */
+ e: '7.5px',
+ /** 15px */
+ f: '15px',
+ /** 30px */
+ g: '30px',
+ /** 45px */
+ h: '45px',
+ /** 60px */
+ i: '60px',
+ /** 90px */
+ j: '90px',
+ /** 135px */
+ k: '135px',
+ },
+ typography: {
+ fonts: {
+ size: {
+ small: '12px',
+ small2: '14px',
+ regular: '16px',
+ large: '20px',
+ large2: '30px',
+ },
+ },
+ },
/* Colors */
// TODO Deprecate these in favour of definitions in color.js
/** @deprecated in favor of color.backgroundA */
- colorBackground: color.backgroundA,
+ colorBackground: '#FFFFFF',
/** @deprecated in favor of color.backgroundB */
- colorSecondaryBackground: color.backgroundB,
+ colorSecondaryBackground: '#f9fafb',
/** @deprecated in favor of color.brand1.base */
- colorPrimary: color.brand1.base(),
+ colorPrimary: colorBrand1,
/** @deprecated in favor of color.brand2.base */
- colorSecondary: color.brand2.base(),
+ colorSecondary: colorBrand2,
/** @deprecated in favor of color.gray90 */
- colorFurniture: color.gray90,
+ colorFurniture: '#E8E8E8',
/** @deprecated in favor of color.gray60 */
- colorBorder: color.gray60,
+ colorBorder: '#A5A5A5',
/** @deprecated in favor of color.backgroundC */
- colorBackgroundHue: color.backgroundC,
+ colorBackgroundHue: '#f4f5f7',
colorSuccess: '#008800',
colorError: '#FF2D1A',
/** @deprecated in favor of color.text */
- colorText: color.text,
+ colorText: '#111111',
/** @deprecated in favor of color.textReverse */
- colorTextReverse: color.textReverse,
+ colorTextReverse: '#FFFFFF',
/** @deprecated in favor of color.textPlaceholder */
- colorTextPlaceholder: color.textPlaceholder,
+ colorTextPlaceholder: '#666666',
colorWarning: '#ffc107',
colorWarningLight: '#fff9ed',
colorWarningDark: '#503303',
colorSuccessLight: '#d2ffcc',
colorSuccessDark: '#17510F',
/** @deprecated in favor of color.gray40 */
- colorIconPrimary: color.gray40,
+ colorIconPrimary: '#666666',
/** @deprecated in favor of color.gray80 */
- colorContainerBorder: color.gray80,
+ colorContainerBorder: '#DEDEDE',
/* Text variables */
@@ -197,21 +343,4 @@ const cokoTheme = {
`,
},
},
-}
-
-export const colorPrimaryDefault = '#3aae2a'
-export const colorSecondaryDefault = '#9e9e9e'
-
-export const setBrandColors = (
- color1 = colorPrimaryDefault,
- color2 = colorSecondaryDefault,
-) => {
- cokoTheme.colorPrimary = color1
- cokoTheme.colorSecondary = color2
- internalSetBrandColors(color1, color2)
-}
-
-export { color }
-export { spacing as space }
-
-export default cokoTheme
+})
diff --git a/packages/client/app/theme/spacing.js b/packages/client/app/theme/spacing.js
deleted file mode 100644
index ba8b12520..000000000
--- a/packages/client/app/theme/spacing.js
+++ /dev/null
@@ -1,28 +0,0 @@
-// TODO : Remove after replacing throghout kotahi
-
-const spacing = {
- /** 1px */
- a: '1px',
- /** 2px */
- b: '2px',
- /** 3px */
- c: '3px',
- /** 5px */
- d: '5px',
- /** 7.5px */
- e: '7.5px',
- /** 15px */
- f: '15px',
- /** 30px */
- g: '30px',
- /** 45px */
- h: '45px',
- /** 60px */
- i: '60px',
- /** 90px */
- j: '90px',
- /** 135px */
- k: '135px',
-}
-
-export default spacing
diff --git a/packages/client/app/theme/typography.js b/packages/client/app/theme/typography.js
deleted file mode 100644
index 73e3c9e1e..000000000
--- a/packages/client/app/theme/typography.js
+++ /dev/null
@@ -1,13 +0,0 @@
-const typography = {
- fonts: {
- size: {
- small: '12px',
- small2: '14px',
- regular: '16px',
- large: '20px',
- large2: '30px',
- },
- },
-}
-
-export default typography
diff --git a/packages/client/stories_backup/reporting/CardCollection.stories.jsx b/packages/client/stories_backup/reporting/CardCollection.stories.jsx
index fd4c2d88c..7beb766e9 100644
--- a/packages/client/stories_backup/reporting/CardCollection.stories.jsx
+++ b/packages/client/stories_backup/reporting/CardCollection.stories.jsx
@@ -12,7 +12,6 @@
// getReviewersConcentricBarChartData,
// } from './mockReportingData'
// import DesignEmbed from '../common/utils'
-// import { color } from '../../app/theme'
// const Header = styled.div`
// color: ${color.brand1.base};