@fluentui-react-native/apple-theme 0.18.7 → 0.18.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +46 -4
- package/CHANGELOG.md +20 -2
- package/lib/appleColors.ios.d.ts.map +1 -1
- package/lib/appleColors.ios.js +11 -169
- package/lib/appleColors.ios.js.map +1 -1
- package/lib/appleColors.types.ios.d.ts +1 -105
- package/lib/appleColors.types.ios.d.ts.map +1 -1
- package/lib-commonjs/appleColors.ios.d.ts.map +1 -1
- package/lib-commonjs/appleColors.ios.js +11 -169
- package/lib-commonjs/appleColors.ios.js.map +1 -1
- package/lib-commonjs/appleColors.types.ios.d.ts +1 -105
- package/lib-commonjs/appleColors.types.ios.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/appleColors.ios.ts +83 -248
- package/src/appleColors.types.ios.ts +3 -111
package/src/appleColors.ios.ts
CHANGED
|
@@ -1,216 +1,49 @@
|
|
|
1
|
+
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
1
2
|
import type { ThemeColorDefinition } from '@fluentui-react-native/theme-types';
|
|
2
3
|
import { getCurrentAppearance } from '@fluentui-react-native/theming-utils';
|
|
3
4
|
import { Appearance } from 'react-native';
|
|
4
5
|
import type { ApplePalette } from './appleColors.types.ios';
|
|
5
6
|
import { createiOSColorAliasTokens } from './createiOSAliasTokens';
|
|
6
7
|
|
|
8
|
+
//TODO: remove and replace with Fluent 2 alias color tokens
|
|
7
9
|
function getFluentUIAppleLightPalette(): ApplePalette {
|
|
8
10
|
return {
|
|
9
|
-
blue10: '#4F6BED',
|
|
10
|
-
blueMagenta20: '#8764B8',
|
|
11
|
-
blueMagenta30: '#5C2E91',
|
|
12
11
|
communicationBlue: '#0078D4',
|
|
13
|
-
communicationBlueShade10: '#106EBE',
|
|
14
|
-
communicationBlueShade20: '#005A9E',
|
|
15
|
-
communicationBlueShade30: '#004578',
|
|
16
12
|
communicationBlueTint10: '#2B88D8',
|
|
17
13
|
communicationBlueTint20: '#C7E0F4',
|
|
18
14
|
communicationBlueTint30: '#DEECF9',
|
|
19
|
-
communicationBlueTint40: '#EFF6FC',
|
|
20
|
-
cyan20: '#038387',
|
|
21
|
-
cyan30: '#005B70',
|
|
22
|
-
cyanBlue10: '#0078D4',
|
|
23
|
-
cyanBlue20: '#004E8C',
|
|
24
15
|
dangerPrimary: '#D92C2C',
|
|
25
|
-
dangerShade10: '#C32727',
|
|
26
|
-
dangerShade20: '#A52121',
|
|
27
|
-
dangerShade30: '#791818',
|
|
28
16
|
dangerTint10: '#DD4242',
|
|
29
|
-
dangerTint20: '#E87979',
|
|
30
|
-
dangerTint30: '#F4B9B9',
|
|
31
|
-
dangerTint40: '#F9D9D9',
|
|
32
17
|
gray20: '#69797E',
|
|
33
|
-
gray25: '#F8F8F8',
|
|
34
18
|
gray30: '#7A7574',
|
|
35
19
|
gray40: '#393939',
|
|
36
|
-
gray50: '#F1F1F1',
|
|
37
|
-
gray100: '#E1E1E1',
|
|
38
|
-
gray200: '#C8C8C8',
|
|
39
|
-
gray300: '#ACACAC',
|
|
40
|
-
gray400: '#919191',
|
|
41
|
-
gray500: '#6E6E6E',
|
|
42
|
-
gray600: '#404040',
|
|
43
|
-
gray700: '#303030',
|
|
44
|
-
gray800: '#292929',
|
|
45
|
-
gray900: '#212121',
|
|
46
|
-
gray950: '#141414',
|
|
47
|
-
green10: '#498205',
|
|
48
|
-
green20: '#0B6A0B',
|
|
49
|
-
magenta10: '#C239B3',
|
|
50
|
-
magenta20: '#881798',
|
|
51
|
-
magentaPink10: '#E3008C',
|
|
52
|
-
orange20: '#CA5010',
|
|
53
|
-
orange30: '#8E562E',
|
|
54
|
-
orangeYellow20: '#986F0B',
|
|
55
|
-
pinkRed10: '#750B1C',
|
|
56
|
-
presenceAvailable: '#6BB700',
|
|
57
|
-
presenceAway: '#FFAA44',
|
|
58
|
-
presenceBlocked: '#C50F1F',
|
|
59
|
-
presenceBusy: '#C50F1F',
|
|
60
|
-
presenceDnd: '#C50F1F',
|
|
61
|
-
presenceOffline: '#8A8886',
|
|
62
|
-
presenceOof: '#B4009E',
|
|
63
|
-
presenceUnknown: '#8A8886',
|
|
64
|
-
red10: '#D13438',
|
|
65
|
-
red20: '#A4262C',
|
|
66
|
-
successPrimary: '#13A10E',
|
|
67
|
-
successShade10: '#11910D',
|
|
68
|
-
successShade20: '#0F7A0B',
|
|
69
|
-
successShade30: '#0B5A08',
|
|
70
20
|
successTint10: '#27AC22',
|
|
71
|
-
successTint20: '#5EC65A',
|
|
72
|
-
successTint30: '#A7E3A5',
|
|
73
|
-
successTint40: '#CEF0CD',
|
|
74
21
|
warningPrimary: '#FFD335',
|
|
75
|
-
warningShade10: '#E6BE30',
|
|
76
|
-
warningShade20: '#C2A129',
|
|
77
|
-
warningShade30: '#8F761E',
|
|
78
22
|
warningTint10: '#FFD94E',
|
|
79
|
-
warningTint20: '#FFE586',
|
|
80
|
-
warningTint30: '#FFF2C3',
|
|
81
|
-
warningTint40: '#FFF8DF',
|
|
82
|
-
|
|
83
|
-
textDominant: '#212121', //= UIColor(light: gray900, lightHighContrast: .black, dark: .white)
|
|
84
|
-
textPrimary: '#212121', //= UIColor(light: gray900, lightHighContrast: .black, dark: gray100, darkHighContrast: .white)
|
|
85
|
-
textSecondary: '#6E6E6E', //= UIColor(light: gray500, lightHighContrast: gray700, dark: gray400, darkHighContrast: gray200)
|
|
86
|
-
textDisabled: '#ACACAC', //= UIColor(light: gray300, lightHighContrast: gray500, dark: gray600, darkHighContrast: gray400)
|
|
87
|
-
textOnAccent: 'white', //= UIColor(light: .white, dark: .black)
|
|
88
|
-
|
|
89
|
-
iconPrimary: '#6E6E6E', //= UIColor(light: gray500, lightHighContrast: gray700, dark: .white)
|
|
90
|
-
iconSecondary: '#919191', //= UIColor(light: gray400, lightHighContrast: gray600, dark: gray500, darkHighContrast: gray300, darkElevated: gray400)
|
|
91
|
-
iconDisabled: '#ACACAC', //= UIColor(light: gray300, lightHighContrast: gray500, dark: gray600, darkHighContrast: gray400)
|
|
92
|
-
iconOnAccent: 'white', //= UIColor(light: .white, dark: .black)
|
|
93
|
-
|
|
94
|
-
surfacePrimary: 'white', //= UIColor(light: .white, dark: .black, darkElevated: gray950)
|
|
95
|
-
surfaceSecondary: '#F8F8F8', //= UIColor(light: gray25, dark: gray950, darkElevated: gray900)
|
|
96
|
-
surfaceTertiary: '#F1F1F1', //= UIColor(light: gray50, dark: gray900, darkElevated: gray800)
|
|
97
|
-
surfaceQuaternary: '#E1E1E1', //= UIColor(light: gray100, dark: gray600)
|
|
98
|
-
|
|
99
|
-
dividerOnPrimary: '#E1E1E1', //= UIColor(light: gray100, dark: gray800, darkElevated: gray700)
|
|
100
|
-
dividerOnSecondary: '#C8C8C8', //= UIColor(light: gray200, dark: gray700, darkElevated: gray600)
|
|
101
|
-
dividerOnTertiary: '#C8C8C8', //= UIColor(light: gray200, dark: gray700, darkElevated: gray600)
|
|
102
23
|
|
|
103
|
-
buttonBackground: 'transparent',
|
|
104
24
|
buttonBackgroundFilledPressed: '#2B88D8', //UIColor(light: Colors.primaryTint10(for: window), dark: Colors.primaryTint20(for: window))
|
|
105
|
-
buttonBackgroundFilledDisabled: '#E1E1E1', //surfaceQuaternary
|
|
106
|
-
buttonBorderDisabled: '#E1E1E1', //surfaceQuaternary
|
|
107
25
|
buttonTitleDisabled: '#ACACAC', //textDisabled
|
|
108
|
-
buttonTitleWithFilledBackground: 'white', //textOnAccent
|
|
109
26
|
};
|
|
110
27
|
}
|
|
111
28
|
|
|
29
|
+
//TODO: remove and replace with Fluent 2 alias color tokens
|
|
112
30
|
function getFluentUIAppleDarkPalette(): ApplePalette {
|
|
113
31
|
return {
|
|
114
|
-
blue10: '#4F6BED',
|
|
115
|
-
blueMagenta20: '#8764B8',
|
|
116
|
-
blueMagenta30: '#5C2E91',
|
|
117
32
|
communicationBlue: '#0086F0',
|
|
118
|
-
communicationBlueShade10: '#1890F1',
|
|
119
|
-
communicationBlueShade20: '#3AA0F3',
|
|
120
|
-
communicationBlueShade30: '#6CB8F6',
|
|
121
33
|
communicationBlueTint10: '#0078D4',
|
|
122
34
|
communicationBlueTint20: '#004C87',
|
|
123
35
|
communicationBlueTint30: '#043862',
|
|
124
|
-
communicationBlueTint40: '#092C47',
|
|
125
|
-
cyan20: '#038387',
|
|
126
|
-
cyan30: '#005B70',
|
|
127
|
-
cyanBlue10: '#0078D4',
|
|
128
|
-
cyanBlue20: '#004E8C',
|
|
129
36
|
dangerPrimary: '#E83A3A',
|
|
130
|
-
dangerShade10: '#EA4C4C',
|
|
131
|
-
dangerShade20: '#EE6666',
|
|
132
|
-
dangerShade30: '#F28C8C',
|
|
133
37
|
dangerTint10: '#CC3333',
|
|
134
|
-
dangerTint20: '#8B2323',
|
|
135
|
-
dangerTint30: '#461111',
|
|
136
|
-
dangerTint40: '#250909',
|
|
137
38
|
gray20: '#69797E',
|
|
138
|
-
gray25: '#F8F8F8',
|
|
139
39
|
gray30: '#7A7574',
|
|
140
40
|
gray40: '#393939',
|
|
141
|
-
gray50: '#F1F1F1',
|
|
142
|
-
gray100: '#E1E1E1',
|
|
143
|
-
gray200: '#C8C8C8',
|
|
144
|
-
gray300: '#ACACAC',
|
|
145
|
-
gray400: '#919191',
|
|
146
|
-
gray500: '#6E6E6E',
|
|
147
|
-
gray600: '#404040',
|
|
148
|
-
gray700: '#303030',
|
|
149
|
-
gray800: '#292929',
|
|
150
|
-
gray900: '#212121',
|
|
151
|
-
gray950: '#141414',
|
|
152
|
-
green10: '#498205',
|
|
153
|
-
green20: '#0B6A0B',
|
|
154
|
-
magenta10: '#C239B3',
|
|
155
|
-
magenta20: '#881798',
|
|
156
|
-
magentaPink10: '#E3008C',
|
|
157
|
-
orange20: '#CA5010',
|
|
158
|
-
orange30: '#8E562E',
|
|
159
|
-
orangeYellow20: '#986F0B',
|
|
160
|
-
pinkRed10: '#750B1C',
|
|
161
|
-
presenceAvailable: '#92C353',
|
|
162
|
-
presenceAway: '#F8D22A',
|
|
163
|
-
presenceBlocked: '#D74553',
|
|
164
|
-
presenceBusy: '#D74553',
|
|
165
|
-
presenceDnd: '#D74553',
|
|
166
|
-
presenceOffline: '#979593',
|
|
167
|
-
presenceOof: '#E959D9',
|
|
168
|
-
presenceUnknown: '#979593',
|
|
169
|
-
red10: '#D13438',
|
|
170
|
-
red20: '#A4262C',
|
|
171
|
-
successPrimary: '#979593',
|
|
172
|
-
successShade10: '#20BA53',
|
|
173
|
-
successShade20: '#3BC569',
|
|
174
|
-
successShade30: '#67D48B',
|
|
175
41
|
successTint10: '#0D9D3D',
|
|
176
|
-
successTint20: '#096B29',
|
|
177
|
-
successTint30: '#043615',
|
|
178
|
-
successTint40: '#021D0B',
|
|
179
42
|
warningPrimary: '#FFC328',
|
|
180
|
-
warningShade10: '#FFC83E',
|
|
181
|
-
warningShade20: '#FFDD15',
|
|
182
|
-
warningShade30: '#FFDD87',
|
|
183
43
|
warningTint10: '#E0AB24',
|
|
184
|
-
warningTint20: '#997518',
|
|
185
|
-
warningTint30: '#4D3A0C',
|
|
186
|
-
warningTint40: '#291F07',
|
|
187
|
-
|
|
188
|
-
textDominant: 'white', //= UIColor(light: gray900, lightHighContrast: .black, dark: .white)
|
|
189
|
-
textPrimary: '#E1E1E1', //= UIColor(light: gray900, lightHighContrast: .black, dark: gray100, darkHighContrast: .white)
|
|
190
|
-
textSecondary: '#919191', //= UIColor(light: gray500, lightHighContrast: gray700, dark: gray400, darkHighContrast: gray200)
|
|
191
|
-
textDisabled: '#404040', //= UIColor(light: gray300, lightHighContrast: gray500, dark: gray600, darkHighContrast: gray400)
|
|
192
|
-
textOnAccent: 'black', //= UIColor(light: .white, dark: .black)
|
|
193
|
-
|
|
194
|
-
iconPrimary: '#303030', //= UIColor(light: gray500, lightHighContrast: gray700, dark: .white)
|
|
195
|
-
iconSecondary: '#404040', //= UIColor(light: gray400, lightHighContrast: gray600, dark: gray500, darkHighContrast: gray300, darkElevated: gray400)
|
|
196
|
-
iconDisabled: '#6E6E6E', //= UIColor(light: gray300, lightHighContrast: gray500, dark: gray600, darkHighContrast: gray400)
|
|
197
|
-
iconOnAccent: 'black', //= UIColor(light: .white, dark: .black)
|
|
198
|
-
|
|
199
|
-
surfacePrimary: 'black', //= UIColor(light: .white, dark: .black, darkElevated: gray950)
|
|
200
|
-
surfaceSecondary: '#141414', //= UIColor(light: gray25, dark: gray950, darkElevated: gray900)
|
|
201
|
-
surfaceTertiary: '#212121', //= UIColor(light: gray50, dark: gray900, darkElevated: gray800)
|
|
202
|
-
surfaceQuaternary: '#404040', //= UIColor(light: gray100, dark: gray600)
|
|
203
|
-
|
|
204
|
-
dividerOnPrimary: '#292929', //= UIColor(light: gray100, dark: gray800, darkElevated: gray700)
|
|
205
|
-
dividerOnSecondary: '#303030', //= UIColor(light: gray200, dark: gray700, darkElevated: gray600)
|
|
206
|
-
dividerOnTertiary: '#303030', //= UIColor(light: gray200, dark: gray700, darkElevated: gray600)
|
|
207
44
|
|
|
208
|
-
buttonBackground: 'transparent',
|
|
209
45
|
buttonBackgroundFilledPressed: '#004C87', //UIColor(light: Colors.primaryTint10(for: window), dark: Colors.primaryTint20(for: window))
|
|
210
|
-
buttonBackgroundFilledDisabled: '#404040', //surfaceQuaternary
|
|
211
|
-
buttonBorderDisabled: '#404040', //surfaceQuaternary
|
|
212
46
|
buttonTitleDisabled: '#404040', //textDisabled
|
|
213
|
-
buttonTitleWithFilledBackground: 'black', //textOnAccent
|
|
214
47
|
};
|
|
215
48
|
}
|
|
216
49
|
|
|
@@ -224,32 +57,34 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean
|
|
|
224
57
|
mode = 'darkElevated';
|
|
225
58
|
}
|
|
226
59
|
|
|
60
|
+
const fluent2AliasColorTokens = createiOSColorAliasTokens(mode);
|
|
61
|
+
|
|
227
62
|
return {
|
|
228
63
|
/* Color Alias Tokens */
|
|
229
64
|
|
|
230
|
-
...
|
|
65
|
+
...fluent2AliasColorTokens,
|
|
231
66
|
|
|
232
67
|
/* PaletteBackgroundColors & PaletteTextColors */
|
|
233
68
|
|
|
234
|
-
background:
|
|
235
|
-
bodyStandoutBackground:
|
|
236
|
-
bodyFrameBackground:
|
|
237
|
-
bodyFrameDivider:
|
|
238
|
-
bodyText:
|
|
239
|
-
bodyTextChecked:
|
|
240
|
-
subText:
|
|
241
|
-
bodyDivider:
|
|
242
|
-
|
|
243
|
-
disabledBackground:
|
|
244
|
-
disabledText:
|
|
245
|
-
disabledBodyText:
|
|
246
|
-
disabledSubtext:
|
|
247
|
-
disabledBodySubtext:
|
|
69
|
+
background: fluent2AliasColorTokens.neutralBackground1,
|
|
70
|
+
bodyStandoutBackground: fluent2AliasColorTokens.neutralBackground4,
|
|
71
|
+
bodyFrameBackground: fluent2AliasColorTokens.neutralBackground1,
|
|
72
|
+
bodyFrameDivider: fluent2AliasColorTokens.neutralStroke2,
|
|
73
|
+
bodyText: fluent2AliasColorTokens.neutralForeground1,
|
|
74
|
+
bodyTextChecked: fluent2AliasColorTokens.neutralForeground1,
|
|
75
|
+
subText: fluent2AliasColorTokens.neutralForeground3,
|
|
76
|
+
bodyDivider: fluent2AliasColorTokens.neutralStroke1,
|
|
77
|
+
|
|
78
|
+
disabledBackground: fluent2AliasColorTokens.neutralBackgroundDisabled,
|
|
79
|
+
disabledText: fluent2AliasColorTokens.neutralForegroundDisabled1,
|
|
80
|
+
disabledBodyText: fluent2AliasColorTokens.neutralForegroundDisabled1,
|
|
81
|
+
disabledSubtext: fluent2AliasColorTokens.neutralForegroundDisabled1,
|
|
82
|
+
disabledBodySubtext: fluent2AliasColorTokens.neutralForegroundDisabled1,
|
|
248
83
|
|
|
249
84
|
focusBorder: 'transparent',
|
|
250
|
-
variantBorder:
|
|
251
|
-
variantBorderHovered:
|
|
252
|
-
defaultStateBackground:
|
|
85
|
+
variantBorder: fluent2AliasColorTokens.neutralStroke2,
|
|
86
|
+
variantBorderHovered: fluent2AliasColorTokens.neutralStroke2,
|
|
87
|
+
defaultStateBackground: fluent2AliasColorTokens.neutralBackground1,
|
|
253
88
|
|
|
254
89
|
errorText: fluentApple.dangerPrimary,
|
|
255
90
|
warningText: fluentApple.warningPrimary,
|
|
@@ -259,17 +94,17 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean
|
|
|
259
94
|
warningHighlight: fluentApple.warningTint10,
|
|
260
95
|
successBackground: fluentApple.successTint10,
|
|
261
96
|
|
|
262
|
-
inputBorder:
|
|
263
|
-
inputBorderHovered:
|
|
264
|
-
inputBackground:
|
|
265
|
-
inputBackgroundChecked:
|
|
266
|
-
inputBackgroundCheckedHovered:
|
|
267
|
-
inputForegroundChecked:
|
|
268
|
-
inputFocusBorderAlt:
|
|
269
|
-
smallInputBorder:
|
|
270
|
-
inputText:
|
|
271
|
-
inputTextHovered:
|
|
272
|
-
inputPlaceholderText:
|
|
97
|
+
inputBorder: fluent2AliasColorTokens.neutralStroke2,
|
|
98
|
+
inputBorderHovered: fluent2AliasColorTokens.neutralStroke2,
|
|
99
|
+
inputBackground: fluent2AliasColorTokens.neutralBackground1,
|
|
100
|
+
inputBackgroundChecked: fluent2AliasColorTokens.neutralBackground1,
|
|
101
|
+
inputBackgroundCheckedHovered: fluent2AliasColorTokens.neutralBackground1,
|
|
102
|
+
inputForegroundChecked: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
103
|
+
inputFocusBorderAlt: fluent2AliasColorTokens.neutralStroke1,
|
|
104
|
+
smallInputBorder: fluent2AliasColorTokens.neutralStroke1,
|
|
105
|
+
inputText: fluent2AliasColorTokens.neutralForeground1,
|
|
106
|
+
inputTextHovered: fluent2AliasColorTokens.neutralForeground1,
|
|
107
|
+
inputPlaceholderText: fluent2AliasColorTokens.neutralForeground3,
|
|
273
108
|
|
|
274
109
|
// Default values without any style
|
|
275
110
|
// on FluentUI Apple iOS, this is the buttonStyle "Secondary Outline"
|
|
@@ -286,40 +121,40 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean
|
|
|
286
121
|
buttonTextCheckedHovered: fluentApple.communicationBlue,
|
|
287
122
|
buttonTextPressed: fluentApple.communicationBlueTint20,
|
|
288
123
|
buttonTextDisabled: fluentApple.buttonTitleDisabled,
|
|
289
|
-
buttonBorderDisabled:
|
|
124
|
+
buttonBorderDisabled: fluent2AliasColorTokens.neutralBackgroundDisabled,
|
|
290
125
|
buttonBorderFocused: fluentApple.communicationBlueTint10,
|
|
291
126
|
|
|
292
127
|
primaryButtonBackground: fluentApple.communicationBlue,
|
|
293
128
|
primaryButtonBackgroundHovered: fluentApple.communicationBlue,
|
|
294
129
|
primaryButtonBackgroundPressed: fluentApple.buttonBackgroundFilledPressed,
|
|
295
|
-
primaryButtonBackgroundDisabled:
|
|
130
|
+
primaryButtonBackgroundDisabled: fluent2AliasColorTokens.neutralBackgroundDisabled,
|
|
296
131
|
primaryButtonBorder: 'transparent',
|
|
297
132
|
primaryButtonBorderFocused: 'transparent',
|
|
298
|
-
primaryButtonText:
|
|
299
|
-
primaryButtonTextHovered:
|
|
300
|
-
primaryButtonTextPressed:
|
|
301
|
-
primaryButtonTextDisabled:
|
|
133
|
+
primaryButtonText: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
134
|
+
primaryButtonTextHovered: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
135
|
+
primaryButtonTextPressed: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
136
|
+
primaryButtonTextDisabled: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
302
137
|
|
|
303
138
|
accentButtonBackground: fluentApple.communicationBlue,
|
|
304
|
-
accentButtonText:
|
|
305
|
-
|
|
306
|
-
menuBackground:
|
|
307
|
-
menuDivider:
|
|
308
|
-
menuIcon:
|
|
309
|
-
menuHeader:
|
|
310
|
-
menuItemBackgroundHovered:
|
|
311
|
-
menuItemBackgroundPressed:
|
|
312
|
-
menuItemText:
|
|
313
|
-
menuItemTextHovered:
|
|
314
|
-
|
|
315
|
-
listBackground:
|
|
316
|
-
listText:
|
|
317
|
-
listItemBackgroundHovered:
|
|
318
|
-
listItemBackgroundChecked:
|
|
319
|
-
listItemBackgroundCheckedHovered:
|
|
320
|
-
|
|
321
|
-
listHeaderBackgroundHovered:
|
|
322
|
-
listHeaderBackgroundPressed:
|
|
139
|
+
accentButtonText: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
140
|
+
|
|
141
|
+
menuBackground: fluent2AliasColorTokens.neutralBackground1,
|
|
142
|
+
menuDivider: fluent2AliasColorTokens.neutralStroke2,
|
|
143
|
+
menuIcon: fluent2AliasColorTokens.neutralForeground3,
|
|
144
|
+
menuHeader: fluent2AliasColorTokens.neutralForeground1,
|
|
145
|
+
menuItemBackgroundHovered: fluent2AliasColorTokens.neutralBackground1,
|
|
146
|
+
menuItemBackgroundPressed: fluent2AliasColorTokens.neutralBackground1,
|
|
147
|
+
menuItemText: fluent2AliasColorTokens.neutralForeground1,
|
|
148
|
+
menuItemTextHovered: fluent2AliasColorTokens.neutralForeground1,
|
|
149
|
+
|
|
150
|
+
listBackground: fluent2AliasColorTokens.neutralBackground1,
|
|
151
|
+
listText: fluent2AliasColorTokens.neutralForeground1,
|
|
152
|
+
listItemBackgroundHovered: fluent2AliasColorTokens.neutralBackground1,
|
|
153
|
+
listItemBackgroundChecked: fluent2AliasColorTokens.neutralBackground1,
|
|
154
|
+
listItemBackgroundCheckedHovered: fluent2AliasColorTokens.neutralBackground1,
|
|
155
|
+
|
|
156
|
+
listHeaderBackgroundHovered: fluent2AliasColorTokens.neutralForeground1,
|
|
157
|
+
listHeaderBackgroundPressed: fluent2AliasColorTokens.neutralForeground1,
|
|
323
158
|
|
|
324
159
|
actionLink: fluentApple.communicationBlue,
|
|
325
160
|
actionLinkHovered: fluentApple.communicationBlue,
|
|
@@ -352,7 +187,7 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean
|
|
|
352
187
|
defaultPressedIcon: fluentApple.communicationBlueTint20,
|
|
353
188
|
|
|
354
189
|
defaultDisabledBackground: 'transparent',
|
|
355
|
-
defaultDisabledBorder:
|
|
190
|
+
defaultDisabledBorder: fluent2AliasColorTokens.neutralBackgroundDisabled,
|
|
356
191
|
defaultDisabledContent: fluentApple.buttonTitleDisabled,
|
|
357
192
|
defaultDisabledIcon: fluentApple.buttonTitleDisabled,
|
|
358
193
|
|
|
@@ -383,28 +218,28 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean
|
|
|
383
218
|
|
|
384
219
|
brandedBackground: fluentApple.communicationBlue,
|
|
385
220
|
brandedBorder: 'transparent',
|
|
386
|
-
brandedContent:
|
|
387
|
-
brandedIcon:
|
|
221
|
+
brandedContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
222
|
+
brandedIcon: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
388
223
|
|
|
389
224
|
brandedHoveredBackground: fluentApple.communicationBlue,
|
|
390
225
|
brandedHoveredBorder: 'transparent',
|
|
391
|
-
brandedHoveredContent:
|
|
392
|
-
brandedHoveredIcon:
|
|
226
|
+
brandedHoveredContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
227
|
+
brandedHoveredIcon: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
393
228
|
|
|
394
229
|
brandedFocusedBackground: fluentApple.communicationBlue,
|
|
395
230
|
brandedFocusedBorder: 'transparent',
|
|
396
|
-
brandedFocusedContent:
|
|
397
|
-
brandedFocusedIcon:
|
|
231
|
+
brandedFocusedContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
232
|
+
brandedFocusedIcon: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
398
233
|
|
|
399
234
|
brandedPressedBackground: fluentApple.buttonBackgroundFilledPressed,
|
|
400
235
|
brandedPressedBorder: 'transparent',
|
|
401
|
-
brandedPressedContent:
|
|
402
|
-
brandedPressedIcon:
|
|
236
|
+
brandedPressedContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
237
|
+
brandedPressedIcon: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
403
238
|
|
|
404
|
-
brandedDisabledBackground:
|
|
239
|
+
brandedDisabledBackground: fluent2AliasColorTokens.neutralBackgroundDisabled,
|
|
405
240
|
brandedDisabledBorder: 'transparent',
|
|
406
|
-
brandedDisabledContent:
|
|
407
|
-
brandedDisabledIcon:
|
|
241
|
+
brandedDisabledContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
242
|
+
brandedDisabledIcon: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
408
243
|
|
|
409
244
|
defaultCheckedBackground: 'transparent',
|
|
410
245
|
defaultCheckedContent: fluentApple.communicationBlue,
|
|
@@ -412,9 +247,9 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean
|
|
|
412
247
|
defaultCheckedHoveredContent: fluentApple.communicationBlue,
|
|
413
248
|
|
|
414
249
|
brandedCheckedBackground: fluentApple.communicationBlue,
|
|
415
|
-
brandedCheckedContent:
|
|
416
|
-
brandedCheckedHoveredBackground:
|
|
417
|
-
brandedCheckedHoveredContent:
|
|
250
|
+
brandedCheckedContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
251
|
+
brandedCheckedHoveredBackground: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
252
|
+
brandedCheckedHoveredContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
418
253
|
|
|
419
254
|
ghostCheckedBackground: 'transparent',
|
|
420
255
|
ghostCheckedContent: fluentApple.communicationBlue,
|
|
@@ -428,21 +263,21 @@ export function paletteFromAppleColors(isLightMode: boolean, isElevated: boolean
|
|
|
428
263
|
ghostHoveredSecondaryContent: fluentApple.communicationBlue,
|
|
429
264
|
ghostPressedSecondaryContent: fluentApple.communicationBlueTint20,
|
|
430
265
|
|
|
431
|
-
brandedSecondaryContent:
|
|
432
|
-
brandedFocusedSecondaryContent:
|
|
433
|
-
brandedHoveredSecondaryContent:
|
|
434
|
-
brandedPressedSecondaryContent:
|
|
266
|
+
brandedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
267
|
+
brandedFocusedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
268
|
+
brandedHoveredSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
269
|
+
brandedPressedSecondaryContent: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
435
270
|
|
|
436
271
|
defaultDisabledSecondaryContent: fluentApple.buttonTitleDisabled,
|
|
437
272
|
defaultHoveredSecondaryContent: fluentApple.communicationBlue,
|
|
438
273
|
defaultPressedSecondaryContent: fluentApple.communicationBlueTint20,
|
|
439
274
|
|
|
440
275
|
checkboxBackground: fluentApple.communicationBlue,
|
|
441
|
-
checkboxBackgroundDisabled:
|
|
442
|
-
checkboxBorderColor:
|
|
443
|
-
checkmarkColor:
|
|
276
|
+
checkboxBackgroundDisabled: fluent2AliasColorTokens.neutralBackground1,
|
|
277
|
+
checkboxBorderColor: globalTokens.color.grey26,
|
|
278
|
+
checkmarkColor: fluent2AliasColorTokens.neutralForegroundOnColor,
|
|
444
279
|
|
|
445
|
-
personaActivityGlow:
|
|
446
|
-
personaActivityRing:
|
|
280
|
+
personaActivityGlow: 'transparent',
|
|
281
|
+
personaActivityRing: fluent2AliasColorTokens.neutralBackground1,
|
|
447
282
|
};
|
|
448
283
|
}
|
|
@@ -1,135 +1,27 @@
|
|
|
1
1
|
import type { ColorValue } from 'react-native';
|
|
2
2
|
|
|
3
|
+
// TODO: remove and replace with Fluent 2 alias color tokens
|
|
3
4
|
/** Palette of colors defined in FluentUI Apple */
|
|
4
5
|
interface FluentUIApplePalette {
|
|
5
|
-
blue10: ColorValue;
|
|
6
|
-
blueMagenta20: ColorValue;
|
|
7
|
-
blueMagenta30: ColorValue;
|
|
8
6
|
communicationBlue: ColorValue;
|
|
9
|
-
communicationBlueShade10: ColorValue;
|
|
10
|
-
communicationBlueShade20: ColorValue;
|
|
11
|
-
communicationBlueShade30: ColorValue;
|
|
12
7
|
communicationBlueTint10: ColorValue;
|
|
13
8
|
communicationBlueTint20: ColorValue;
|
|
14
9
|
communicationBlueTint30: ColorValue;
|
|
15
|
-
communicationBlueTint40: ColorValue;
|
|
16
|
-
cyan20: ColorValue;
|
|
17
|
-
cyan30: ColorValue;
|
|
18
|
-
cyanBlue10: ColorValue;
|
|
19
|
-
cyanBlue20: ColorValue;
|
|
20
10
|
dangerPrimary: ColorValue;
|
|
21
|
-
dangerShade10: ColorValue;
|
|
22
|
-
dangerShade20: ColorValue;
|
|
23
|
-
dangerShade30: ColorValue;
|
|
24
11
|
dangerTint10: ColorValue;
|
|
25
|
-
dangerTint20: ColorValue;
|
|
26
|
-
dangerTint30: ColorValue;
|
|
27
|
-
dangerTint40: ColorValue;
|
|
28
12
|
gray20: ColorValue;
|
|
29
|
-
gray25: ColorValue;
|
|
30
13
|
gray30: ColorValue;
|
|
31
14
|
gray40: ColorValue;
|
|
32
|
-
gray50: ColorValue;
|
|
33
|
-
gray100: ColorValue;
|
|
34
|
-
gray200: ColorValue;
|
|
35
|
-
gray300: ColorValue;
|
|
36
|
-
gray400: ColorValue;
|
|
37
|
-
gray500: ColorValue;
|
|
38
|
-
gray600: ColorValue;
|
|
39
|
-
gray700: ColorValue;
|
|
40
|
-
gray800: ColorValue;
|
|
41
|
-
gray900: ColorValue;
|
|
42
|
-
gray950: ColorValue;
|
|
43
|
-
green10: ColorValue;
|
|
44
|
-
green20: ColorValue;
|
|
45
|
-
magenta10: ColorValue;
|
|
46
|
-
magenta20: ColorValue;
|
|
47
|
-
magentaPink10: ColorValue;
|
|
48
|
-
orange20: ColorValue;
|
|
49
|
-
orange30: ColorValue;
|
|
50
|
-
orangeYellow20: ColorValue;
|
|
51
|
-
pinkRed10: ColorValue;
|
|
52
|
-
presenceAvailable: ColorValue;
|
|
53
|
-
presenceAway: ColorValue;
|
|
54
|
-
presenceBlocked: ColorValue;
|
|
55
|
-
presenceBusy: ColorValue;
|
|
56
|
-
presenceDnd: ColorValue;
|
|
57
|
-
presenceOffline: ColorValue;
|
|
58
|
-
presenceOof: ColorValue;
|
|
59
|
-
presenceUnknown: ColorValue;
|
|
60
|
-
red10: ColorValue;
|
|
61
|
-
red20: ColorValue;
|
|
62
|
-
successPrimary: ColorValue;
|
|
63
|
-
successShade10: ColorValue;
|
|
64
|
-
successShade20: ColorValue;
|
|
65
|
-
successShade30: ColorValue;
|
|
66
15
|
successTint10: ColorValue;
|
|
67
|
-
successTint20: ColorValue;
|
|
68
|
-
successTint30: ColorValue;
|
|
69
|
-
successTint40: ColorValue;
|
|
70
16
|
warningPrimary: ColorValue;
|
|
71
|
-
warningShade10: ColorValue;
|
|
72
|
-
warningShade20: ColorValue;
|
|
73
|
-
warningShade30: ColorValue;
|
|
74
17
|
warningTint10: ColorValue;
|
|
75
|
-
warningTint20: ColorValue;
|
|
76
|
-
warningTint30: ColorValue;
|
|
77
|
-
warningTint40: ColorValue;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/** A set of colors that define semantic colors in FluentUI Apple */
|
|
81
|
-
interface FluentAppleSemanticColors {
|
|
82
|
-
/**
|
|
83
|
-
* text color should not be lower than `gray500` in light mode to achieve 4.5:1 minimum contrast ratio in `.white` background
|
|
84
|
-
* text color should not be higher than `gray400` in dark mode to achieve 4.5:1 minimum contrast ratio in `.black` background
|
|
85
|
-
* when determining high contrast color, add 200 in light mode and substract 200 in dark mode from the default color.
|
|
86
|
-
* text color used for main level in the screen. eg. title in dialog, title in navigationbar with `surfacePrimary`, etc
|
|
87
|
-
*/
|
|
88
|
-
|
|
89
|
-
/** text color used for main level in the screen. eg. title in dialog, title in navigationbar with `surfacePrimary`, etc */
|
|
90
|
-
textDominant: ColorValue; //= UIColor(light: gray900, lightHighContrast: .black, dark: .white)
|
|
91
|
-
/** text color used for titles */
|
|
92
|
-
textPrimary: ColorValue; //= UIColor(light: gray900, lightHighContrast: .black, dark: gray100, darkHighContrast: .white)
|
|
93
|
-
/** text color used for subtitles */
|
|
94
|
-
textSecondary: ColorValue; //= UIColor(light: gray500, lightHighContrast: gray700, dark: gray400, darkHighContrast: gray200)
|
|
95
|
-
/** text color used in disabled state */
|
|
96
|
-
textDisabled: ColorValue; //= UIColor(light: gray300, lightHighContrast: gray500, dark: gray600, darkHighContrast: gray400)
|
|
97
|
-
/** text appears on top of the surface that uses `Colors.primary` as background color */
|
|
98
|
-
textOnAccent: ColorValue; //= UIColor(light: .white, dark: .black)
|
|
99
|
-
|
|
100
|
-
/** icon used as call-to-actions without a label attached. They need to reach a minimum contrast ratio 4.5:1 to its background */
|
|
101
|
-
iconPrimary: ColorValue; //= UIColor(light: gray500, lightHighContrast: gray700, dark: .white)
|
|
102
|
-
/** icon that are attached to a label and are only used for decorative purposes */
|
|
103
|
-
iconSecondary: ColorValue; //= UIColor(light: gray400, lightHighContrast: gray600, dark: gray500, darkHighContrast: gray300, darkElevated: gray400)
|
|
104
|
-
/** icon color used in disabled state */
|
|
105
|
-
iconDisabled: ColorValue; //= UIColor(light: gray300, lightHighContrast: gray500, dark: gray600, darkHighContrast: gray400)
|
|
106
|
-
/** icon appears on top of surfaces that uses `Colors.primary` as background color */
|
|
107
|
-
iconOnAccent: ColorValue; //= UIColor(light: .white, dark: .black)
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* In Dark mode, our system use two sets of background colors -- called base and elevated -- to enhance the perception of depth when one dark interface is layered above another.
|
|
111
|
-
* The dark base colors are darker, making background interface appear to recede, and the elevate colors are lighter, making foreground interfaces appear to advance
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
surfacePrimary: ColorValue; //= UIColor(light: .white, dark: .black, darkElevated: gray950)
|
|
115
|
-
surfaceSecondary: ColorValue; //= UIColor(light: gray25, dark: gray950, darkElevated: gray900)
|
|
116
|
-
surfaceTertiary: ColorValue; //= UIColor(light: gray50, dark: gray900, darkElevated: gray800)
|
|
117
|
-
/** also used for disabled background color */
|
|
118
|
-
surfaceQuaternary: ColorValue; //= UIColor(light: gray100, dark: gray600)
|
|
119
|
-
|
|
120
|
-
dividerOnPrimary: ColorValue; //= UIColor(light: gray100, dark: gray800, darkElevated: gray700)
|
|
121
|
-
dividerOnSecondary: ColorValue; //= UIColor(light: gray200, dark: gray700, darkElevated: gray600)
|
|
122
|
-
dividerOnTertiary: ColorValue; //= UIColor(light: gray200, dark: gray700, darkElevated: gray600)
|
|
123
18
|
}
|
|
124
19
|
|
|
20
|
+
// TODO: remove and replace with Fluent 2 alias color tokens
|
|
125
21
|
/** FluentUI Apple Colors defined for the iOS Button */
|
|
126
22
|
interface FluentAppleButtonColors {
|
|
127
|
-
buttonBackground: ColorValue;
|
|
128
23
|
buttonBackgroundFilledPressed: ColorValue;
|
|
129
|
-
buttonBackgroundFilledDisabled: ColorValue;
|
|
130
|
-
buttonBorderDisabled: ColorValue;
|
|
131
24
|
buttonTitleDisabled: ColorValue;
|
|
132
|
-
buttonTitleWithFilledBackground: ColorValue;
|
|
133
25
|
}
|
|
134
26
|
|
|
135
|
-
export type ApplePalette = FluentUIApplePalette &
|
|
27
|
+
export type ApplePalette = FluentUIApplePalette & FluentAppleButtonColors;
|