aboutsummaryrefslogtreecommitdiffstats
path: root/packages/theme
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-09-11 07:30:56 +0530
committerLibravatar Vijay A <avijayr@protonmail.com>2021-09-11 07:30:56 +0530
commita5f3f635525d270bf2b7326fe1c3846b05f87b5d (patch)
tree403a37786e37ab59ecdd78ff74bc0629ce1d17eb /packages/theme
parentdocs: updated Changelog with cumulative changes for 5.6.1-beta.3 [skip ci] (diff)
parent5.6.1-nightly.56 [skip ci] (diff)
downloadferdium-app-a5f3f635525d270bf2b7326fe1c3846b05f87b5d.tar.gz
ferdium-app-a5f3f635525d270bf2b7326fe1c3846b05f87b5d.tar.zst
ferdium-app-a5f3f635525d270bf2b7326fe1c3846b05f87b5d.zip
Merge branch 'nightly' into release
Diffstat (limited to 'packages/theme')
-rw-r--r--packages/theme/package.json6
-rw-r--r--packages/theme/src/themes/IStyleTypes.ts2
-rw-r--r--packages/theme/src/themes/dark/index.ts7
-rw-r--r--packages/theme/src/themes/default/index.ts9
-rw-r--r--packages/theme/test/index.test.js17
-rw-r--r--packages/theme/test/index.test.ts19
-rw-r--r--packages/theme/tsconfig.json1
7 files changed, 25 insertions, 36 deletions
diff --git a/packages/theme/package.json b/packages/theme/package.json
index 7e3c4722d..7f3226bd8 100644
--- a/packages/theme/package.json
+++ b/packages/theme/package.json
@@ -15,15 +15,15 @@
15 }, 15 },
16 "scripts": { 16 "scripts": {
17 "dev": "tsc -w", 17 "dev": "tsc -w",
18 "prepare": "tsc", 18 "build": "tsc",
19 "preprepare": "npm run test", 19 "preprepare": "npm run test",
20 "test": "npx mocha" 20 "test": "ts-mocha 'test/**/*.test.ts'"
21 }, 21 },
22 "bugs": { 22 "bugs": {
23 "url": "https://github.com/meetfranz/franz/issues" 23 "url": "https://github.com/meetfranz/franz/issues"
24 }, 24 },
25 "dependencies": { 25 "dependencies": {
26 "color": "3.1.2" 26 "color": "4.0.1"
27 }, 27 },
28 "gitHead": "9f2ab40b7602bc3df26ebb093b484b9917768f69" 28 "gitHead": "9f2ab40b7602bc3df26ebb093b484b9917768f69"
29} 29}
diff --git a/packages/theme/src/themes/IStyleTypes.ts b/packages/theme/src/themes/IStyleTypes.ts
index cf8bdea33..48f52daf2 100644
--- a/packages/theme/src/themes/IStyleTypes.ts
+++ b/packages/theme/src/themes/IStyleTypes.ts
@@ -1,4 +1,4 @@
1export default interface IStyleTypes { 1export interface IStyleTypes {
2 [index: string]: { 2 [index: string]: {
3 accent: string; 3 accent: string;
4 contrast: string; 4 contrast: string;
diff --git a/packages/theme/src/themes/dark/index.ts b/packages/theme/src/themes/dark/index.ts
index 7d7bab399..87a68cb5d 100644
--- a/packages/theme/src/themes/dark/index.ts
+++ b/packages/theme/src/themes/dark/index.ts
@@ -153,13 +153,6 @@ export default (brandPrimary: string) => {
153 }, 153 },
154 }), 154 }),
155 155
156 // Announcements
157 announcements: merge({}, defaultStyles.announcements, {
158 spotlight: {
159 background: legacyStyles.darkThemeGrayDark,
160 },
161 }),
162
163 // Todos 156 // Todos
164 todos: merge({}, defaultStyles.todos, { 157 todos: merge({}, defaultStyles.todos, {
165 todosLayer: { 158 todosLayer: {
diff --git a/packages/theme/src/themes/default/index.ts b/packages/theme/src/themes/default/index.ts
index 21017bbe0..80bcba766 100644
--- a/packages/theme/src/themes/default/index.ts
+++ b/packages/theme/src/themes/default/index.ts
@@ -2,7 +2,7 @@ import color from 'color';
2import { cloneDeep } from 'lodash'; 2import { cloneDeep } from 'lodash';
3 3
4import * as legacyStyles from '../legacy'; 4import * as legacyStyles from '../legacy';
5import IStyleTypes from '../IStyleTypes'; 5import type { IStyleTypes } from '../IStyleTypes';
6 6
7export default (brandPrimary: string) => { 7export default (brandPrimary: string) => {
8 const brandSuccess = '#5cb85c'; 8 const brandSuccess = '#5cb85c';
@@ -228,13 +228,6 @@ export default (brandPrimary: string) => {
228 }, 228 },
229 }, 229 },
230 230
231 // Announcements
232 announcements: {
233 spotlight: {
234 background: legacyStyles.themeGrayLightest,
235 },
236 },
237
238 // Todos 231 // Todos
239 todos: { 232 todos: {
240 todosLayer: { 233 todosLayer: {
diff --git a/packages/theme/test/index.test.js b/packages/theme/test/index.test.js
deleted file mode 100644
index 3906433c1..000000000
--- a/packages/theme/test/index.test.js
+++ /dev/null
@@ -1,17 +0,0 @@
1const expect = require('expect.js');
2
3const { colorBackground: colorBackgroundDefault } = require('../lib/themes/default');
4const { colorBackground: colorBackgroundDark } = require('../lib/themes/dark');
5const { default: theme } = require('../lib');
6
7describe('Load theme', () => {
8 it('Should load default theme', () => {
9 const { colorBackground } = theme('default');
10 expect(colorBackground).to.be(colorBackgroundDefault);
11 });
12
13 it('Should load dark theme', () => {
14 const { colorBackground } = theme('dark');
15 expect(colorBackground).to.be(colorBackgroundDark);
16 });
17});
diff --git a/packages/theme/test/index.test.ts b/packages/theme/test/index.test.ts
new file mode 100644
index 000000000..7eda4e359
--- /dev/null
+++ b/packages/theme/test/index.test.ts
@@ -0,0 +1,19 @@
1import expect from 'expect.js';
2
3import makeDefaultThemeConfig from '../src/themes/default';
4import makeDarkThemeConfig from '../src/themes/dark';
5import { theme, ThemeType } from '../src';
6
7describe('Load theme', () => {
8 it('Should load default theme', () => {
9 const { colorBackground } = theme('default' as ThemeType);
10 expect(colorBackground).to.be(
11 makeDefaultThemeConfig('default').colorBackground,
12 );
13 });
14
15 it('Should load dark theme', () => {
16 const { colorBackground } = theme('dark' as ThemeType);
17 expect(colorBackground).to.be(makeDarkThemeConfig('dark').colorBackground);
18 });
19});
diff --git a/packages/theme/tsconfig.json b/packages/theme/tsconfig.json
index d80ee9ee7..4deaa5dd7 100644
--- a/packages/theme/tsconfig.json
+++ b/packages/theme/tsconfig.json
@@ -4,4 +4,5 @@
4 "outDir": "lib", 4 "outDir": "lib",
5 "rootDir": "src" 5 "rootDir": "src"
6 }, 6 },
7 "exclude": ["node_modules", "lib", "test"]
7} 8}