Skip to content

Commit 42a1ecd

Browse files
committed
chore(themes): update gray tokens
1 parent 44aa9e8 commit 42a1ecd

File tree

6 files changed

+80
-25
lines changed

6 files changed

+80
-25
lines changed

core/src/themes/base/dark.tokens.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import { mix } from '../../utils/theme';
1+
import { mix, generateColorSteps } from '../../utils/theme';
22
import type { DarkTheme } from '../themes.interfaces';
33

4-
import { defaultPrimitiveColors } from './default.tokens.primitives';
5-
64
const colors = {
75
primary: '#4d8dff',
86
secondary: '#46b1ff',
@@ -13,6 +11,7 @@ const colors = {
1311
light: '#222428',
1412
medium: '#989aa2',
1513
dark: '#f4f5f8',
14+
gray: generateColorSteps('#000000', '#ffffff', true),
1615
};
1716

1817
export const darkTheme: DarkTheme = {
@@ -162,6 +161,7 @@ export const darkTheme: DarkTheme = {
162161
tint: mix('#000', colors.dark, '12%'),
163162
},
164163
},
164+
gray: colors.gray,
165165
},
166166

167167
backgroundColor: '#000000',
@@ -220,9 +220,5 @@ export const darkTheme: DarkTheme = {
220220
IonItem: {
221221
background: '#000000',
222222
},
223-
IonDatetime: {
224-
bg: defaultPrimitiveColors.gray['50']!,
225-
timeBodyBg: defaultPrimitiveColors.gray['650']!,
226-
},
227223
},
228224
};

core/src/themes/base/light.tokens.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { mix } from '../../utils/theme';
22
import type { LightTheme } from '../themes.interfaces';
33

4-
import { defaultPrimitiveColors } from './default.tokens.primitives';
5-
64
const colors = {
75
primary: '#0054e9',
86
secondary: '#0163aa',
@@ -162,10 +160,4 @@ export const lightTheme: LightTheme = {
162160
},
163161
},
164162
},
165-
components: {
166-
IonDatetime: {
167-
bg: defaultPrimitiveColors.white,
168-
timeBodyBg: '#edeef0',
169-
},
170-
},
171163
};

core/src/themes/ios/dark.tokens.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { generateColorSteps } from '../../utils/theme';
21
import { darkTheme as baseDarkTheme } from '../base/dark.tokens';
32
import type { DarkTheme } from '../themes.interfaces';
43

5-
const graySteps = generateColorSteps('#ffffff', '#000000', true);
4+
const colors = {
5+
gray: baseDarkTheme.color!.gray!,
6+
};
67

78
export const darkTheme: DarkTheme = {
89
...baseDarkTheme,
@@ -56,7 +57,7 @@ export const darkTheme: DarkTheme = {
5657

5758
color: {
5859
// TODO: Update hex values to use the text color variable and background color variable
59-
gray: graySteps,
60+
gray: colors.gray,
6061
},
6162

6263
components: {
@@ -72,7 +73,18 @@ export const darkTheme: DarkTheme = {
7273
toolbarBorderColor: 'var(--ion-background-color-step-250)',
7374
},
7475
IonDatetime: {
75-
timeBodyBg: graySteps['300']!,
76+
bg: colors.gray['950']!,
77+
timeBodyBg: colors.gray['300']!,
78+
},
79+
IonBreadcrumb: {
80+
color: colors.gray['850']!,
81+
bgFocused: colors.gray['50']!,
82+
iconColor: colors.gray['400']!,
83+
iconColorActive: colors.gray['850']!,
84+
iconColorFocused: colors.gray['750']!, // Available only in iOS
85+
indicatorBg: colors.gray['100']!,
86+
indicatorBgFocused: colors.gray['150']!,
87+
separatorColor: colors.gray['550']!,
7688
},
7789
},
7890
};
Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
import { defaultPrimitiveColors } from '../base/default.tokens.primitives';
12
import type { LightTheme } from '../themes.interfaces';
23

3-
export const lightTheme: LightTheme = {};
4+
const colors = {
5+
gray: defaultPrimitiveColors.gray,
6+
};
7+
8+
export const lightTheme: LightTheme = {
9+
color: {
10+
gray: colors.gray,
11+
},
12+
components: {
13+
IonDatetime: {
14+
bg: colors.gray['950']!,
15+
timeBodyBg: '#edeef0',
16+
},
17+
IonBreadcrumb: {
18+
color: '#2d4665',
19+
bgFocused: 'rgba(233, 237, 243, 0.7)',
20+
iconColor: '#92a0b3',
21+
iconColorActive: '#242d39',
22+
iconColorFocused: '#445b78', // Available only in iOS
23+
indicatorBg: '#e9edf3',
24+
indicatorBgFocused: '#d9e0ea',
25+
separatorColor: '#73849a',
26+
},
27+
},
28+
};

core/src/themes/md/dark.tokens.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { generateColorSteps } from '../../utils/theme';
22
import { darkTheme as baseDarkTheme } from '../base/dark.tokens';
33
import type { DarkTheme } from '../themes.interfaces';
44

5-
const graySteps = generateColorSteps('#ffffff', '#121212', true);
5+
const colors = {
6+
gray: generateColorSteps('#ffffff', '#121212', true),
7+
};
68

79
export const darkTheme: DarkTheme = {
810
...baseDarkTheme,
@@ -58,7 +60,7 @@ export const darkTheme: DarkTheme = {
5860

5961
color: {
6062
// TODO: Update hex values to use the text color variable and background color variable
61-
gray: graySteps,
63+
gray: colors.gray,
6264
},
6365

6466
components: {
@@ -75,8 +77,18 @@ export const darkTheme: DarkTheme = {
7577
background: '#1f1f1f',
7678
},
7779
IonDatetime: {
78-
bg: graySteps['100']!,
79-
timeBodyBg: graySteps['300']!,
80+
bg: colors.gray['100']!,
81+
timeBodyBg: colors.gray['300']!,
82+
},
83+
IonBreadcrumb: {
84+
color: colors.gray['600']!,
85+
bgFocused: colors.gray['50']!,
86+
iconColor: colors.gray['550']!,
87+
iconColorActive: colors.gray['850']!,
88+
indicatorBg: colors.gray['100']!,
89+
indicatorBgFocused: colors.gray['150']!,
90+
colorFocused: colors.gray['800']!, // Available only in md
91+
separatorColor: colors.gray['550']!,
8092
},
8193
},
8294
};

core/src/themes/md/light.tokens.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
import { defaultPrimitiveColors } from '../base/default.tokens.primitives';
12
import type { LightTheme } from '../themes.interfaces';
23

3-
export const lightTheme: LightTheme = {};
4+
export const lightTheme: LightTheme = {
5+
components: {
6+
IonDatetime: {
7+
bg: defaultPrimitiveColors.white,
8+
timeBodyBg: '#edeef0',
9+
},
10+
IonBreadcrumb: {
11+
color: '#677483',
12+
bgFocused: defaultPrimitiveColors.white,
13+
iconColor: '#7d8894',
14+
iconColorActive: '#222d3a',
15+
indicatorBg: '#eef1f3',
16+
indicatorBgFocused: '#dfe5e8',
17+
colorFocused: '#35404e', // Available only in md
18+
separatorColor: '#73849a',
19+
},
20+
},
21+
};

0 commit comments

Comments
 (0)