diff options
Diffstat (limited to 'packages/theme/src/themes/dark/index.ts')
-rw-r--r-- | packages/theme/src/themes/dark/index.ts | 171 |
1 files changed, 0 insertions, 171 deletions
diff --git a/packages/theme/src/themes/dark/index.ts b/packages/theme/src/themes/dark/index.ts deleted file mode 100644 index aa132c743..000000000 --- a/packages/theme/src/themes/dark/index.ts +++ /dev/null | |||
@@ -1,171 +0,0 @@ | |||
1 | import color from 'color'; | ||
2 | import { cloneDeep, merge } from 'lodash'; | ||
3 | |||
4 | import makeDefaultThemeConfig from '../default'; | ||
5 | import * as legacyStyles from '../legacy'; | ||
6 | |||
7 | export default (brandPrimary: string) => { | ||
8 | const defaultStyles = makeDefaultThemeConfig(brandPrimary); | ||
9 | let brandPrimaryColor = color(legacyStyles.themeBrandPrimary); | ||
10 | try { | ||
11 | brandPrimaryColor = color(defaultStyles.brandPrimary); | ||
12 | } catch { | ||
13 | // Ignore invalid color and fall back to default. | ||
14 | } | ||
15 | |||
16 | const colorBackground = legacyStyles.darkThemeGrayDarkest; | ||
17 | const colorText = legacyStyles.darkThemeTextColor; | ||
18 | const inputColor = legacyStyles.darkThemeGrayLightest; | ||
19 | const inputBackground = legacyStyles.themeGrayDark; | ||
20 | const inputBorder = `1px solid ${legacyStyles.darkThemeGrayLight}`; | ||
21 | const inputPrefixColor = color(legacyStyles.darkThemeGrayLighter) | ||
22 | .lighten(0.3) | ||
23 | .hex(); | ||
24 | const buttonSecondaryTextColor = legacyStyles.darkThemeTextColor; | ||
25 | const selectColor = inputColor; | ||
26 | const drawerBg = color(colorBackground).lighten(0.3).hex(); | ||
27 | |||
28 | const services = merge({}, defaultStyles.services, { | ||
29 | listItems: { | ||
30 | borderColor: legacyStyles.darkThemeGrayDarker, | ||
31 | hoverBgColor: legacyStyles.darkThemeGrayDarker, | ||
32 | disabled: { | ||
33 | color: legacyStyles.darkThemeGray, | ||
34 | }, | ||
35 | }, | ||
36 | }); | ||
37 | |||
38 | return { | ||
39 | ...defaultStyles, | ||
40 | |||
41 | colorBackground, | ||
42 | colorContentBackground: legacyStyles.darkThemeGrayDarkest, | ||
43 | colorBackgroundSubscriptionContainer: legacyStyles.themeBrandInfo, | ||
44 | |||
45 | colorHeadline: legacyStyles.darkThemeTextColor, | ||
46 | colorText: legacyStyles.darkThemeTextColor, | ||
47 | |||
48 | defaultContentBorder: legacyStyles.themeGrayDark, | ||
49 | |||
50 | // Loader | ||
51 | colorFullscreenLoaderSpinner: '#FFF', | ||
52 | colorWebviewLoaderBackground: color(legacyStyles.darkThemeGrayDarkest) | ||
53 | .alpha(0.5) | ||
54 | .rgb() | ||
55 | .string(), | ||
56 | |||
57 | // Input | ||
58 | labelColor: legacyStyles.darkThemeTextColor, | ||
59 | inputColor, | ||
60 | inputBackground, | ||
61 | inputBorder, | ||
62 | inputPrefixColor, | ||
63 | inputPrefixBackground: legacyStyles.darkThemeGray, | ||
64 | inputDisabledOpacity: 0.5, | ||
65 | inputScorePasswordBackground: legacyStyles.darkThemeGrayDark, | ||
66 | inputModifierColor: color(legacyStyles.darkThemeGrayLighter) | ||
67 | .lighten(0.3) | ||
68 | .hex(), | ||
69 | inputPlaceholderColor: color(legacyStyles.darkThemeGrayLighter) | ||
70 | .darken(0.1) | ||
71 | .hex(), | ||
72 | |||
73 | // Toggle | ||
74 | toggleBackground: legacyStyles.darkThemeGray, | ||
75 | toggleButton: legacyStyles.darkThemeGrayLighter, | ||
76 | |||
77 | // Button | ||
78 | buttonPrimaryTextColor: legacyStyles.darkThemeTextColor, | ||
79 | |||
80 | buttonSecondaryBackground: legacyStyles.darkThemeGrayLighter, | ||
81 | buttonSecondaryTextColor, | ||
82 | |||
83 | buttonDangerTextColor: legacyStyles.darkThemeTextColor, | ||
84 | |||
85 | buttonWarningTextColor: legacyStyles.darkThemeTextColor, | ||
86 | |||
87 | buttonLoaderColor: { | ||
88 | primary: '#FFF', | ||
89 | secondary: buttonSecondaryTextColor, | ||
90 | success: '#FFF', | ||
91 | warning: '#FFF', | ||
92 | danger: '#FFF', | ||
93 | inverted: defaultStyles.brandPrimary, | ||
94 | }, | ||
95 | |||
96 | // Select | ||
97 | selectBackground: inputBackground, | ||
98 | selectBorder: inputBorder, | ||
99 | selectColor, | ||
100 | selectToggleColor: inputPrefixColor, | ||
101 | selectPopupBackground: legacyStyles.darkThemeGrayLight, | ||
102 | selectOptionColor: '#FFF', | ||
103 | selectOptionBorder: `1px solid ${color(legacyStyles.darkThemeGrayLight) | ||
104 | .darken(0.2) | ||
105 | .hex()}`, | ||
106 | selectOptionItemHover: color(legacyStyles.darkThemeGrayLight) | ||
107 | .darken(0.2) | ||
108 | .hex(), | ||
109 | selectOptionItemHoverColor: selectColor, | ||
110 | selectSearchColor: inputBackground, | ||
111 | |||
112 | // Modal | ||
113 | colorModalOverlayBackground: color(legacyStyles.darkThemeBlack) | ||
114 | .alpha(0.9) | ||
115 | .rgb() | ||
116 | .string(), | ||
117 | colorModalBackground: legacyStyles.darkThemeGrayDark, | ||
118 | |||
119 | // Services | ||
120 | services, | ||
121 | |||
122 | // Service Icon | ||
123 | serviceIcon: merge({}, defaultStyles.serviceIcon, { | ||
124 | isCustom: { | ||
125 | border: `1px solid ${legacyStyles.darkThemeGrayDark}`, | ||
126 | }, | ||
127 | }), | ||
128 | |||
129 | // Workspaces | ||
130 | workspaces: merge({}, defaultStyles.workspaces, { | ||
131 | settings: { | ||
132 | listItems: cloneDeep(services.listItems), | ||
133 | }, | ||
134 | drawer: { | ||
135 | background: drawerBg, | ||
136 | addButton: { | ||
137 | color: legacyStyles.darkThemeGrayLighter, | ||
138 | hoverColor: legacyStyles.darkThemeGraySmoke, | ||
139 | }, | ||
140 | listItem: { | ||
141 | border: color(drawerBg).lighten(0.2).hex(), | ||
142 | hoverBackground: color(drawerBg).lighten(0.2).hex(), | ||
143 | activeBackground: defaultStyles.brandPrimary, | ||
144 | name: { | ||
145 | color: colorText, | ||
146 | activeColor: 'white', | ||
147 | }, | ||
148 | services: { | ||
149 | color: color(colorText).darken(0.5).hex(), | ||
150 | active: brandPrimaryColor.lighten(0.5).hex(), | ||
151 | }, | ||
152 | }, | ||
153 | }, | ||
154 | }), | ||
155 | |||
156 | // Todos | ||
157 | todos: merge({}, defaultStyles.todos, { | ||
158 | todosLayer: { | ||
159 | borderLeftColor: legacyStyles.darkThemeGrayDarker, | ||
160 | }, | ||
161 | toggleButton: { | ||
162 | background: defaultStyles.styleTypes.primary.accent, | ||
163 | textColor: defaultStyles.styleTypes.primary.contrast, | ||
164 | shadowColor: 'rgba(0, 0, 0, 0.2)', | ||
165 | }, | ||
166 | dragIndicator: { | ||
167 | background: legacyStyles.themeGrayLight, | ||
168 | }, | ||
169 | }), | ||
170 | }; | ||
171 | }; | ||