summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Vijay Aravamudhan <vraravam@users.noreply.github.com>2021-10-15 17:20:09 +0530
committerLibravatar GitHub <noreply@github.com>2021-10-15 17:20:09 +0530
commita05ef4bb5101e6e8d999ad0d7383b394996fb763 (patch)
tree38072e3abe8d0bdaababf0abd1710dc47baa4a3c
parentchore: move 'packages/forms' into 'src' (no longer an injected package) (#2079) (diff)
downloadferdium-app-a05ef4bb5101e6e8d999ad0d7383b394996fb763.tar.gz
ferdium-app-a05ef4bb5101e6e8d999ad0d7383b394996fb763.tar.zst
ferdium-app-a05ef4bb5101e6e8d999ad0d7383b394996fb763.zip
chore: move 'packages/themes' into 'src' (no longer an injected package) (#2080)
-rw-r--r--.eslintignore2
-rw-r--r--electron-builder.yml1
-rw-r--r--gulpfile.babel.js16
-rw-r--r--lerna.json5
-rw-r--r--package-lock.json6
-rw-r--r--package.json4
-rw-r--r--packages/theme/.gitignore2
-rw-r--r--packages/theme/README.md11
-rw-r--r--packages/theme/package.json29
-rw-r--r--packages/theme/src/index.ts24
-rw-r--r--packages/theme/tsconfig.json8
-rw-r--r--src/components/ui/badge/ProBadge.tsx2
-rw-r--r--src/components/ui/badge/index.tsx2
-rw-r--r--src/components/ui/button/index.tsx2
-rw-r--r--src/components/ui/error/styles.ts2
-rw-r--r--src/components/ui/headline/index.tsx2
-rw-r--r--src/components/ui/icon/index.tsx2
-rw-r--r--src/components/ui/infobox/index.tsx2
-rw-r--r--src/components/ui/input/styles.ts2
-rw-r--r--src/components/ui/label/styles.ts2
-rw-r--r--src/components/ui/select/index.tsx3
-rw-r--r--src/components/ui/textarea/styles.ts2
-rw-r--r--src/components/ui/toggle/index.tsx2
-rw-r--r--src/components/ui/typings/generic.ts2
-rw-r--r--src/config.ts2
-rw-r--r--src/features/todos/store.js2
-rw-r--r--src/stores/UIStore.ts2
-rw-r--r--src/themes/IStyleTypes.ts (renamed from packages/theme/src/themes/IStyleTypes.ts)0
-rw-r--r--src/themes/dark/index.ts (renamed from packages/theme/src/themes/dark/index.ts)0
-rw-r--r--src/themes/default/index.ts (renamed from packages/theme/src/themes/default/index.ts)0
-rw-r--r--src/themes/index.ts21
-rw-r--r--src/themes/legacy/index.ts (renamed from packages/theme/src/themes/legacy/index.ts)4
-rw-r--r--test/themes/index.test.ts (renamed from packages/theme/test/index.test.ts)6
33 files changed, 44 insertions, 128 deletions
diff --git a/.eslintignore b/.eslintignore
index 0dfa46e43..820648215 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -27,6 +27,4 @@ npm-debug.log.*
27 27
28/build/ 28/build/
29/out/ 29/out/
30/packages/*/lib
31/packages/**/*.test.*
32/recipes/ 30/recipes/
diff --git a/electron-builder.yml b/electron-builder.yml
index 0159e701f..d4d30ed85 100644
--- a/electron-builder.yml
+++ b/electron-builder.yml
@@ -70,4 +70,3 @@ protocols:
70asarUnpack: 70asarUnpack:
71 - ./recipes 71 - ./recipes
72 - ./assets/images/taskbar 72 - ./assets/images/taskbar
73 - ./node_modules/@meetfranz
diff --git a/gulpfile.babel.js b/gulpfile.babel.js
index d5fb607d9..ae461ba87 100644
--- a/gulpfile.babel.js
+++ b/gulpfile.babel.js
@@ -75,7 +75,6 @@ const paths = {
75 dest: 'build/', 75 dest: 'build/',
76 watch: [ 76 watch: [
77 'src/**/*.js', 77 'src/**/*.js',
78 // 'packages/**/*.js',
79 ], 78 ],
80 }, 79 },
81 typescripts: { 80 typescripts: {
@@ -83,17 +82,8 @@ const paths = {
83 dest: 'build/', 82 dest: 'build/',
84 watch: [ 83 watch: [
85 'src/**/*.ts', 84 'src/**/*.ts',
86 // 'packages/**/*.ts',
87 ], 85 ],
88 }, 86 },
89 packages: {
90 watch: 'packages/**/*',
91 // dest: 'build/',
92 // watch: [
93 // 'src/**/*.js',
94 // // 'packages/**/*.js',
95 // ],
96 },
97}; 87};
98 88
99// eslint-disable-next-line no-unused-vars 89// eslint-disable-next-line no-unused-vars
@@ -145,10 +135,6 @@ export function mvPackageJson() {
145 return gulp.src(['./package.json']).pipe(gulp.dest(paths.dest)); 135 return gulp.src(['./package.json']).pipe(gulp.dest(paths.dest));
146} 136}
147 137
148export function mvLernaPackages() {
149 return gulp.src(['packages/**']).pipe(gulp.dest(`${paths.dest}/packages`));
150}
151
152export function mvPostinstallScript() { 138export function mvPostinstallScript() {
153 return gulp 139 return gulp
154 .src(['./scripts/postinstall.ts']) 140 .src(['./scripts/postinstall.ts'])
@@ -240,7 +226,6 @@ export function processTypescripts() {
240} 226}
241 227
242export function watch() { 228export function watch() {
243 gulp.watch(paths.packages.watch, mvLernaPackages);
244 gulp.watch(paths.styles.watch, styles); 229 gulp.watch(paths.styles.watch, styles);
245 230
246 gulp.watch([paths.src], mvSrc); 231 gulp.watch([paths.src], mvSrc);
@@ -273,7 +258,6 @@ const build = gulp.series(
273 gulp.parallel( 258 gulp.parallel(
274 mvSrc, 259 mvSrc,
275 mvPackageJson, 260 mvPackageJson,
276 mvLernaPackages,
277 mvPostinstallScript, 261 mvPostinstallScript,
278 exportBuildInfo, 262 exportBuildInfo,
279 ), 263 ),
diff --git a/lerna.json b/lerna.json
index 95aa62baa..2fec49441 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,9 +1,4 @@
1{ 1{
2 "packages": [
3 "packages/theme",
4 "packages/forms",
5 "packages/ui"
6 ],
7 "npmClient": "npm", 2 "npmClient": "npm",
8 "version": "independent", 3 "version": "independent",
9 "ignoreChanges": [ 4 "ignoreChanges": [
diff --git a/package-lock.json b/package-lock.json
index f6742cca4..e6f308bdf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5276,12 +5276,6 @@
5276 "resolved": "https://registry.npmjs.org/@mdi/react/-/react-1.5.0.tgz", 5276 "resolved": "https://registry.npmjs.org/@mdi/react/-/react-1.5.0.tgz",
5277 "integrity": "sha512-NztRgUxSYD+ImaKN94Tg66VVVqXj4SmlDGzZoz48H9riJ+Awha56sfXH2fegw819NWo7KI3oeS1Es0lNQqwr0w==" 5277 "integrity": "sha512-NztRgUxSYD+ImaKN94Tg66VVVqXj4SmlDGzZoz48H9riJ+Awha56sfXH2fegw819NWo7KI3oeS1Es0lNQqwr0w=="
5278 }, 5278 },
5279 "@meetfranz/theme": {
5280 "version": "file:packages/theme",
5281 "requires": {
5282 "color": "4.0.1"
5283 }
5284 },
5285 "@nodelib/fs.scandir": { 5279 "@nodelib/fs.scandir": {
5286 "version": "2.1.5", 5280 "version": "2.1.5",
5287 "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", 5281 "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
diff --git a/package.json b/package.json
index 248a96ef9..c453bf705 100644
--- a/package.json
+++ b/package.json
@@ -25,7 +25,7 @@
25 "dev": "cross-env NODE_ENV=development gulp dev", 25 "dev": "cross-env NODE_ENV=development gulp dev",
26 "test": "jest", 26 "test": "jest",
27 "test:watch": "jest --watch", 27 "test:watch": "jest --watch",
28 "lint": "eslint \"{src,scripts,packages}/**/*.{js,jsx,ts,tsx}\" --quiet", 28 "lint": "eslint \"{src,test,scripts}/**/*.{js,jsx,ts,tsx}\" --quiet",
29 "lint:fix": "npm run lint -- --fix", 29 "lint:fix": "npm run lint -- --fix",
30 "extract": "formatjs extract 'src/**/*.{js,ts,tsx}' --out-file temp.json --flatten --id-interpolation-pattern '[sha512:contenthash:base64:6]' --preserve-whitespace", 30 "extract": "formatjs extract 'src/**/*.{js,ts,tsx}' --out-file temp.json --flatten --id-interpolation-pattern '[sha512:contenthash:base64:6]' --preserve-whitespace",
31 "compile": "formatjs compile 'temp.json' --out-file src/i18n/locales/en-US.json", 31 "compile": "formatjs compile 'temp.json' --out-file src/i18n/locales/en-US.json",
@@ -35,7 +35,6 @@
35 "commit": "git-cz", 35 "commit": "git-cz",
36 "contributors": "all-contributors", 36 "contributors": "all-contributors",
37 "reformat-files": "./node_modules/.bin/prettier --ignore-path .eslintignore --write --require-pragma \"**/*.{js,jsx,scss}\"", 37 "reformat-files": "./node_modules/.bin/prettier --ignore-path .eslintignore --write --require-pragma \"**/*.{js,jsx,scss}\"",
38 "packages": "npx lerna publish --no-git-tag-version",
39 "postinstall": "ts-node scripts/postinstall.ts", 38 "postinstall": "ts-node scripts/postinstall.ts",
40 "apply-branding": "ts-node ./src/i18n/apply-branding.ts", 39 "apply-branding": "ts-node ./src/i18n/apply-branding.ts",
41 "update-submodules": "git submodule update --remote --force", 40 "update-submodules": "git submodule update --remote --force",
@@ -65,7 +64,6 @@
65 "@mdi/font": "6.2.95", 64 "@mdi/font": "6.2.95",
66 "@mdi/js": "6.2.95", 65 "@mdi/js": "6.2.95",
67 "@mdi/react": "1.5.0", 66 "@mdi/react": "1.5.0",
68 "@meetfranz/theme": "file:packages/theme",
69 "@sentry/electron": "2.5.3", 67 "@sentry/electron": "2.5.3",
70 "auto-launch": "5.0.5", 68 "auto-launch": "5.0.5",
71 "btoa": "1.2.1", 69 "btoa": "1.2.1",
diff --git a/packages/theme/.gitignore b/packages/theme/.gitignore
deleted file mode 100644
index d01826a6b..000000000
--- a/packages/theme/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
1node_modules/
2lib
diff --git a/packages/theme/README.md b/packages/theme/README.md
deleted file mode 100644
index 6f9cc406b..000000000
--- a/packages/theme/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
1# `theme`
2
3> TODO: description
4
5## Usage
6
7```
8const theme = require('theme');
9
10// TODO: DEMONSTRATE API
11```
diff --git a/packages/theme/package.json b/packages/theme/package.json
deleted file mode 100644
index 7f3226bd8..000000000
--- a/packages/theme/package.json
+++ /dev/null
@@ -1,29 +0,0 @@
1{
2 "name": "@meetfranz/theme",
3 "version": "1.0.14",
4 "description": "Theme configuration for Ferdi",
5 "author": "Stefan Malzner <stefan@adlk.io>",
6 "homepage": "https://github.com/meetfranz/franz",
7 "license": "Apache-2.0",
8 "main": "lib/index.js",
9 "publishConfig": {
10 "access": "public"
11 },
12 "repository": {
13 "type": "git",
14 "url": "git+https://github.com/meetfranz/franz.git"
15 },
16 "scripts": {
17 "dev": "tsc -w",
18 "build": "tsc",
19 "preprepare": "npm run test",
20 "test": "ts-mocha 'test/**/*.test.ts'"
21 },
22 "bugs": {
23 "url": "https://github.com/meetfranz/franz/issues"
24 },
25 "dependencies": {
26 "color": "4.0.1"
27 },
28 "gitHead": "9f2ab40b7602bc3df26ebb093b484b9917768f69"
29}
diff --git a/packages/theme/src/index.ts b/packages/theme/src/index.ts
deleted file mode 100644
index 5ba225e51..000000000
--- a/packages/theme/src/index.ts
+++ /dev/null
@@ -1,24 +0,0 @@
1import makeDarkThemeConfig from './themes/dark';
2import makeDefaultThemeConfig from './themes/default';
3import { themeBrandPrimary } from './themes/legacy';
4
5export enum ThemeType {
6 default = 'default',
7 dark = 'dark',
8}
9
10export const DEFAULT_ACCENT_COLOR = themeBrandPrimary;
11
12export function theme(
13 themeId: ThemeType,
14 brandColor: string = DEFAULT_ACCENT_COLOR,
15) {
16 return themeId === ThemeType.dark
17 ? makeDarkThemeConfig(brandColor)
18 : makeDefaultThemeConfig(brandColor);
19}
20
21const defaultThemeConfigWithDefaultAccentColor =
22 makeDefaultThemeConfig(DEFAULT_ACCENT_COLOR);
23
24export type Theme = typeof defaultThemeConfigWithDefaultAccentColor;
diff --git a/packages/theme/tsconfig.json b/packages/theme/tsconfig.json
deleted file mode 100644
index 8b4163e7f..000000000
--- a/packages/theme/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
1{
2 "extends": "../../tsconfig.json",
3 "compilerOptions": {
4 "outDir": "lib",
5 "rootDir": "src"
6 },
7 "exclude": ["node_modules", "lib", "test"]
8}
diff --git a/src/components/ui/badge/ProBadge.tsx b/src/components/ui/badge/ProBadge.tsx
index cb6bc4c98..dc1e76f7f 100644
--- a/src/components/ui/badge/ProBadge.tsx
+++ b/src/components/ui/badge/ProBadge.tsx
@@ -3,7 +3,7 @@ import classnames from 'classnames';
3import { Component } from 'react'; 3import { Component } from 'react';
4import injectStyle from 'react-jss'; 4import injectStyle from 'react-jss';
5 5
6import { Theme } from '@meetfranz/theme'; 6import { Theme } from '../../../themes';
7import { Icon } from '../icon'; 7import { Icon } from '../icon';
8import { Badge } from './index'; 8import { Badge } from './index';
9import { IWithStyle } from '../typings/generic'; 9import { IWithStyle } from '../typings/generic';
diff --git a/src/components/ui/badge/index.tsx b/src/components/ui/badge/index.tsx
index 6495036ff..61bede937 100644
--- a/src/components/ui/badge/index.tsx
+++ b/src/components/ui/badge/index.tsx
@@ -2,7 +2,7 @@ import classnames from 'classnames';
2import { Component, ReactNode } from 'react'; 2import { Component, ReactNode } from 'react';
3import injectStyle from 'react-jss'; 3import injectStyle from 'react-jss';
4 4
5import { Theme } from '@meetfranz/theme'; 5import { Theme } from '../../../themes';
6import { IWithStyle } from '../typings/generic'; 6import { IWithStyle } from '../typings/generic';
7 7
8interface IProps extends IWithStyle { 8interface IProps extends IWithStyle {
diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx
index 5b8927b51..12e5e4449 100644
--- a/src/components/ui/button/index.tsx
+++ b/src/components/ui/button/index.tsx
@@ -4,8 +4,8 @@ import { Property } from 'csstype';
4import { Component, MouseEvent } from 'react'; 4import { Component, MouseEvent } from 'react';
5import injectStyle, { withTheme } from 'react-jss'; 5import injectStyle, { withTheme } from 'react-jss';
6import Loader from 'react-loader'; 6import Loader from 'react-loader';
7import { Theme } from '@meetfranz/theme';
8 7
8import { Theme } from '../../../themes';
9import { IFormField, IWithStyle } from '../typings/generic'; 9import { IFormField, IWithStyle } from '../typings/generic';
10 10
11type ButtonType = 11type ButtonType =
diff --git a/src/components/ui/error/styles.ts b/src/components/ui/error/styles.ts
index ed993ddd5..9da95705a 100644
--- a/src/components/ui/error/styles.ts
+++ b/src/components/ui/error/styles.ts
@@ -1,4 +1,4 @@
1import { Theme } from '@meetfranz/theme'; 1import { Theme } from '../../../themes';
2 2
3export default (theme: Theme) => ({ 3export default (theme: Theme) => ({
4 message: { 4 message: {
diff --git a/src/components/ui/headline/index.tsx b/src/components/ui/headline/index.tsx
index 3a3654f02..ea2949102 100644
--- a/src/components/ui/headline/index.tsx
+++ b/src/components/ui/headline/index.tsx
@@ -2,7 +2,7 @@ import classnames from 'classnames';
2import { Component, createElement, ReactNode } from 'react'; 2import { Component, createElement, ReactNode } from 'react';
3import injectStyle from 'react-jss'; 3import injectStyle from 'react-jss';
4 4
5import { Theme } from '@meetfranz/theme'; 5import { Theme } from '../../../themes';
6import { IWithStyle, Omit } from '../typings/generic'; 6import { IWithStyle, Omit } from '../typings/generic';
7 7
8interface IProps extends IWithStyle { 8interface IProps extends IWithStyle {
diff --git a/src/components/ui/icon/index.tsx b/src/components/ui/icon/index.tsx
index fdc48d14a..85bb61d13 100644
--- a/src/components/ui/icon/index.tsx
+++ b/src/components/ui/icon/index.tsx
@@ -3,7 +3,7 @@ import classnames from 'classnames';
3import { Component } from 'react'; 3import { Component } from 'react';
4import injectStyle from 'react-jss'; 4import injectStyle from 'react-jss';
5 5
6import { Theme } from '@meetfranz/theme'; 6import { Theme } from '../../../themes';
7import { IWithStyle } from '../typings/generic'; 7import { IWithStyle } from '../typings/generic';
8 8
9interface IProps extends IWithStyle { 9interface IProps extends IWithStyle {
diff --git a/src/components/ui/infobox/index.tsx b/src/components/ui/infobox/index.tsx
index e6be83556..87940c4d4 100644
--- a/src/components/ui/infobox/index.tsx
+++ b/src/components/ui/infobox/index.tsx
@@ -3,7 +3,7 @@ import classnames from 'classnames';
3import { Component, ReactNode } from 'react'; 3import { Component, ReactNode } from 'react';
4import injectStyle from 'react-jss'; 4import injectStyle from 'react-jss';
5 5
6import { Theme } from '@meetfranz/theme'; 6import { Theme } from '../../../themes';
7import { Icon } from '../icon'; 7import { Icon } from '../icon';
8import { IWithStyle } from '../typings/generic'; 8import { IWithStyle } from '../typings/generic';
9 9
diff --git a/src/components/ui/input/styles.ts b/src/components/ui/input/styles.ts
index 27426152e..04c1b3991 100644
--- a/src/components/ui/input/styles.ts
+++ b/src/components/ui/input/styles.ts
@@ -1,6 +1,6 @@
1import { Property } from 'csstype'; 1import { Property } from 'csstype';
2 2
3import { Theme } from '@meetfranz/theme'; 3import { Theme } from '../../../themes';
4 4
5const prefixStyles = (theme: Theme) => ({ 5const prefixStyles = (theme: Theme) => ({
6 background: theme.inputPrefixBackground, 6 background: theme.inputPrefixBackground,
diff --git a/src/components/ui/label/styles.ts b/src/components/ui/label/styles.ts
index 0c9cef8bf..faa44ae5b 100644
--- a/src/components/ui/label/styles.ts
+++ b/src/components/ui/label/styles.ts
@@ -1,4 +1,4 @@
1import { Theme } from '@meetfranz/theme'; 1import { Theme } from '../../../themes';
2 2
3export default (theme: Theme) => ({ 3export default (theme: Theme) => ({
4 content: {}, 4 content: {},
diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx
index 41cab7818..2605503a3 100644
--- a/src/components/ui/select/index.tsx
+++ b/src/components/ui/select/index.tsx
@@ -8,8 +8,7 @@ import classnames from 'classnames';
8import { ChangeEvent, Component, createRef } from 'react'; 8import { ChangeEvent, Component, createRef } from 'react';
9import injectStyle from 'react-jss'; 9import injectStyle from 'react-jss';
10 10
11import { Theme } from '@meetfranz/theme'; 11import { Theme } from '../../../themes';
12
13import { IFormField, IWithStyle } from '../typings/generic'; 12import { IFormField, IWithStyle } from '../typings/generic';
14 13
15import { Error } from '../error'; 14import { Error } from '../error';
diff --git a/src/components/ui/textarea/styles.ts b/src/components/ui/textarea/styles.ts
index f2267e000..36fc2a82e 100644
--- a/src/components/ui/textarea/styles.ts
+++ b/src/components/ui/textarea/styles.ts
@@ -1,6 +1,6 @@
1import { Property } from 'csstype'; 1import { Property } from 'csstype';
2 2
3import { Theme } from '@meetfranz/theme'; 3import { Theme } from '../../../themes';
4 4
5export default (theme: Theme) => ({ 5export default (theme: Theme) => ({
6 label: { 6 label: {
diff --git a/src/components/ui/toggle/index.tsx b/src/components/ui/toggle/index.tsx
index 67b6c3835..7b6ba147f 100644
--- a/src/components/ui/toggle/index.tsx
+++ b/src/components/ui/toggle/index.tsx
@@ -2,8 +2,8 @@ import classnames from 'classnames';
2import { Property } from 'csstype'; 2import { Property } from 'csstype';
3import { Component, InputHTMLAttributes } from 'react'; 3import { Component, InputHTMLAttributes } from 'react';
4import injectStyle from 'react-jss'; 4import injectStyle from 'react-jss';
5import { Theme } from '@meetfranz/theme';
6 5
6import { Theme } from '../../../themes';
7import { IFormField, IWithStyle } from '../typings/generic'; 7import { IFormField, IWithStyle } from '../typings/generic';
8 8
9import { Error } from '../error'; 9import { Error } from '../error';
diff --git a/src/components/ui/typings/generic.ts b/src/components/ui/typings/generic.ts
index 084e0e0a5..65b996d59 100644
--- a/src/components/ui/typings/generic.ts
+++ b/src/components/ui/typings/generic.ts
@@ -1,6 +1,6 @@
1import { Classes } from 'jss'; 1import { Classes } from 'jss';
2 2
3import { Theme } from '@meetfranz/theme'; 3import { Theme } from '../../../themes';
4 4
5export interface IFormField { 5export interface IFormField {
6 showLabel?: boolean; 6 showLabel?: boolean;
diff --git a/src/config.ts b/src/config.ts
index e1e8230c2..5f95a59f4 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -2,7 +2,7 @@
2 2
3import ms from 'ms'; 3import ms from 'ms';
4 4
5import { DEFAULT_ACCENT_COLOR } from '@meetfranz/theme'; 5export const DEFAULT_ACCENT_COLOR = '#7266F0';
6 6
7export const CHECK_INTERVAL = ms('1h'); // How often should we perform checks 7export const CHECK_INTERVAL = ms('1h'); // How often should we perform checks
8 8
diff --git a/src/features/todos/store.js b/src/features/todos/store.js
index ec06c279d..010a029ff 100644
--- a/src/features/todos/store.js
+++ b/src/features/todos/store.js
@@ -1,7 +1,7 @@
1import { ThemeType } from '@meetfranz/theme';
2import { computed, action, observable } from 'mobx'; 1import { computed, action, observable } from 'mobx';
3import localStorage from 'mobx-localstorage'; 2import localStorage from 'mobx-localstorage';
4 3
4import { ThemeType } from '../../themes';
5import { todoActions } from './actions'; 5import { todoActions } from './actions';
6import { 6import {
7 CUSTOM_TODO_SERVICE, 7 CUSTOM_TODO_SERVICE,
diff --git a/src/stores/UIStore.ts b/src/stores/UIStore.ts
index 6ab63c2ee..6a9597006 100644
--- a/src/stores/UIStore.ts
+++ b/src/stores/UIStore.ts
@@ -1,7 +1,7 @@
1import { action, observable, computed, reaction } from 'mobx'; 1import { action, observable, computed, reaction } from 'mobx';
2import { theme, ThemeType } from '@meetfranz/theme';
3import { nativeTheme, systemPreferences } from '@electron/remote'; 2import { nativeTheme, systemPreferences } from '@electron/remote';
4 3
4import { theme, ThemeType } from '../themes';
5import Store from './lib/Store'; 5import Store from './lib/Store';
6import { isMac, isWindows } from '../environment'; 6import { isMac, isWindows } from '../environment';
7 7
diff --git a/packages/theme/src/themes/IStyleTypes.ts b/src/themes/IStyleTypes.ts
index 48f52daf2..48f52daf2 100644
--- a/packages/theme/src/themes/IStyleTypes.ts
+++ b/src/themes/IStyleTypes.ts
diff --git a/packages/theme/src/themes/dark/index.ts b/src/themes/dark/index.ts
index aa132c743..aa132c743 100644
--- a/packages/theme/src/themes/dark/index.ts
+++ b/src/themes/dark/index.ts
diff --git a/packages/theme/src/themes/default/index.ts b/src/themes/default/index.ts
index 80bcba766..80bcba766 100644
--- a/packages/theme/src/themes/default/index.ts
+++ b/src/themes/default/index.ts
diff --git a/src/themes/index.ts b/src/themes/index.ts
new file mode 100644
index 000000000..27be4d04b
--- /dev/null
+++ b/src/themes/index.ts
@@ -0,0 +1,21 @@
1import makeDarkThemeConfig from './dark';
2import makeDefaultThemeConfig from './default';
3import { themeBrandPrimary } from './legacy';
4
5export enum ThemeType {
6 default = 'default',
7 dark = 'dark',
8}
9
10export function theme(
11 themeId: ThemeType,
12 brandColor: string = themeBrandPrimary,
13) {
14 return themeId === ThemeType.dark
15 ? makeDarkThemeConfig(brandColor)
16 : makeDefaultThemeConfig(brandColor);
17}
18
19const defaultThemeConfigWithDefaultAccentColor = makeDefaultThemeConfig(themeBrandPrimary);
20
21export type Theme = typeof defaultThemeConfigWithDefaultAccentColor;
diff --git a/packages/theme/src/themes/legacy/index.ts b/src/themes/legacy/index.ts
index 3f4bec5d5..c6105a4e2 100644
--- a/packages/theme/src/themes/legacy/index.ts
+++ b/src/themes/legacy/index.ts
@@ -1,5 +1,7 @@
1import { DEFAULT_ACCENT_COLOR } from '../../config';
2
1/* legacy config, injected into sass */ 3/* legacy config, injected into sass */
2export const themeBrandPrimary = '#7266F0'; 4export const themeBrandPrimary = DEFAULT_ACCENT_COLOR;
3export const themeBrandSuccess = '#5cb85c'; 5export const themeBrandSuccess = '#5cb85c';
4export const themeBrandInfo = '#5bc0de'; 6export const themeBrandInfo = '#5bc0de';
5export const themeBrandWarning = '#FF9F00'; 7export const themeBrandWarning = '#FF9F00';
diff --git a/packages/theme/test/index.test.ts b/test/themes/index.test.ts
index 7eda4e359..042b70009 100644
--- a/packages/theme/test/index.test.ts
+++ b/test/themes/index.test.ts
@@ -1,8 +1,8 @@
1import expect from 'expect.js'; 1import expect from 'expect.js';
2 2
3import makeDefaultThemeConfig from '../src/themes/default'; 3import makeDefaultThemeConfig from '../../src/themes/default';
4import makeDarkThemeConfig from '../src/themes/dark'; 4import makeDarkThemeConfig from '../../src/themes/dark';
5import { theme, ThemeType } from '../src'; 5import { theme, ThemeType } from '../../src/themes';
6 6
7describe('Load theme', () => { 7describe('Load theme', () => {
8 it('Should load default theme', () => { 8 it('Should load default theme', () => {