@fluentui-react-native/default-theme 0.10.2 → 0.12.0
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 +112 -1
- package/CHANGELOG.md +37 -2
- package/lib/createAliasTokens.d.ts +5 -3
- package/lib/createAliasTokens.d.ts.map +1 -1
- package/lib/createAliasTokens.js +9 -4
- package/lib/createAliasTokens.js.map +1 -1
- package/lib/defaultColors.js +4 -4
- package/lib/defaultColors.js.map +1 -1
- package/lib/defaultTheme.d.ts.map +1 -1
- package/lib/defaultTheme.js +19 -161
- package/lib/defaultTheme.js.map +1 -1
- package/lib/getTokens.d.ts +302 -0
- package/lib/getTokens.d.ts.map +1 -0
- package/lib/getTokens.js +38 -0
- package/lib/getTokens.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/createAliasTokens.d.ts +5 -3
- package/lib-commonjs/createAliasTokens.d.ts.map +1 -1
- package/lib-commonjs/createAliasTokens.js +10 -5
- package/lib-commonjs/createAliasTokens.js.map +1 -1
- package/lib-commonjs/defaultColors.js +3 -3
- package/lib-commonjs/defaultColors.js.map +1 -1
- package/lib-commonjs/defaultTheme.d.ts.map +1 -1
- package/lib-commonjs/defaultTheme.js +19 -161
- package/lib-commonjs/defaultTheme.js.map +1 -1
- package/lib-commonjs/getTokens.d.ts +302 -0
- package/lib-commonjs/getTokens.d.ts.map +1 -0
- package/lib-commonjs/{getAliasTokens.js → getTokens.js} +21 -2
- package/lib-commonjs/getTokens.js.map +1 -0
- package/lib-commonjs/index.d.ts +1 -1
- package/lib-commonjs/index.d.ts.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +7 -7
- package/src/createAliasTokens.ts +12 -5
- package/src/defaultColors.ts +4 -4
- package/src/defaultTheme.ts +20 -164
- package/src/{getAliasTokens.ts → getTokens.ts} +17 -0
- package/src/index.ts +1 -1
- package/lib/getAliasTokens.d.ts +0 -3
- package/lib/getAliasTokens.d.ts.map +0 -1
- package/lib/getAliasTokens.js +0 -20
- package/lib/getAliasTokens.js.map +0 -1
- package/lib-commonjs/getAliasTokens.d.ts +0 -3
- package/lib-commonjs/getAliasTokens.d.ts.map +0 -1
- package/lib-commonjs/getAliasTokens.js.map +0 -1
package/src/createAliasTokens.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { getAliasTokens } from './
|
|
2
|
-
import { AliasColorTokens, AppearanceOptions } from '@fluentui-react-native/theme-types';
|
|
1
|
+
import { getAliasTokens, getShadowTokens } from './getTokens';
|
|
2
|
+
import { AliasColorTokens, AppearanceOptions, ThemeShadowDefinition } from '@fluentui-react-native/theme-types';
|
|
3
3
|
import { memoize } from '@fluentui-react-native/memo-cache';
|
|
4
|
-
import { mapPipelineToTheme } from '@fluentui-react-native/theming-utils';
|
|
4
|
+
import { mapPipelineToShadow, mapPipelineToTheme } from '@fluentui-react-native/theming-utils';
|
|
5
5
|
|
|
6
|
-
function
|
|
6
|
+
function createColorAliasTokensWorker(mode: AppearanceOptions): AliasColorTokens {
|
|
7
7
|
const aliasTokens = getAliasTokens(mode);
|
|
8
8
|
return mapPipelineToTheme(aliasTokens);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const createColorAliasTokens = memoize(createColorAliasTokensWorker);
|
|
12
|
+
|
|
13
|
+
function createShadowAliasTokensWorker(mode: AppearanceOptions): ThemeShadowDefinition {
|
|
14
|
+
const aliasTokens = getShadowTokens(mode);
|
|
15
|
+
return mapPipelineToShadow(aliasTokens);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const createShadowAliasTokens = memoize(createShadowAliasTokensWorker);
|
package/src/defaultColors.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Palette, FabricWebPalette, ThemeColorDefinition } from '@fluentui-react-native/theme-types';
|
|
2
2
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
3
|
-
import {
|
|
3
|
+
import { createColorAliasTokens } from './createAliasTokens';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Generate a palette from a set of fabric web colors, like those output from the theme designer.
|
|
@@ -253,7 +253,7 @@ export function getStockWebPalette(): ThemeColorDefinition {
|
|
|
253
253
|
accent: globalTokens.color.brand.primary,
|
|
254
254
|
blackTranslucent40: 'rgba(0,0,0,.4)',
|
|
255
255
|
}),
|
|
256
|
-
...
|
|
256
|
+
...createColorAliasTokens('light'),
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
259
|
|
|
@@ -292,7 +292,7 @@ export function getStockWebDarkPalette(): ThemeColorDefinition {
|
|
|
292
292
|
},
|
|
293
293
|
true,
|
|
294
294
|
),
|
|
295
|
-
...
|
|
295
|
+
...createColorAliasTokens('dark'),
|
|
296
296
|
};
|
|
297
297
|
}
|
|
298
298
|
|
|
@@ -505,6 +505,6 @@ export function getStockWebHCPalette(): ThemeColorDefinition {
|
|
|
505
505
|
|
|
506
506
|
personaActivityRing: '#ffffff',
|
|
507
507
|
personaActivityGlow: 'transparent', // glow probably doesn't make sense on HC
|
|
508
|
-
...
|
|
508
|
+
...createColorAliasTokens('highContrast'),
|
|
509
509
|
};
|
|
510
510
|
}
|
package/src/defaultTheme.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Theme, Typography, Spacing, FontWeightValue, FontSize, FontSizes, Variants
|
|
1
|
+
import { Theme, Typography, Spacing, FontWeightValue, FontSize, FontSizes, Variants } from '@fluentui-react-native/theme-types';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
3
|
import { getStockWebPalette, getStockWebDarkPalette, getStockWebHCPalette } from './defaultColors';
|
|
4
4
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
5
|
+
import { createShadowAliasTokens } from './createAliasTokens';
|
|
5
6
|
|
|
6
7
|
function _defaultTypography(): Typography {
|
|
7
8
|
const defaultsDict = {
|
|
@@ -12,7 +13,7 @@ function _defaultTypography(): Typography {
|
|
|
12
13
|
subheader: globalTokens.font.size['400'] as FontSize,
|
|
13
14
|
header: globalTokens.font.size['500'] as FontSize,
|
|
14
15
|
hero: globalTokens.font.size['700'] as FontSize,
|
|
15
|
-
heroLarge:
|
|
16
|
+
heroLarge: globalTokens.font.size['900'] as FontSize,
|
|
16
17
|
} as FontSizes,
|
|
17
18
|
weights: {
|
|
18
19
|
regular: globalTokens.font.weight.regular as FontWeightValue,
|
|
@@ -40,72 +41,20 @@ function _defaultTypography(): Typography {
|
|
|
40
41
|
heroSemibold: { face: 'primary', size: 'hero', weight: 'semiBold' },
|
|
41
42
|
heroLargeStandard: { face: 'primary', size: 'heroLarge', weight: 'regular' },
|
|
42
43
|
heroLargeSemibold: { face: 'primary', size: 'heroLarge', weight: 'semiBold' },
|
|
43
|
-
//
|
|
44
|
-
caption1: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
58
|
-
},
|
|
59
|
-
body2: {
|
|
60
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
61
|
-
size: globalTokens.font.size['300'] as FontSize,
|
|
62
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
63
|
-
},
|
|
64
|
-
body2Strong: {
|
|
65
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
66
|
-
size: globalTokens.font.size['300'] as FontSize,
|
|
67
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
68
|
-
},
|
|
69
|
-
subtitle2: {
|
|
70
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
71
|
-
size: globalTokens.font.size['400'] as FontSize,
|
|
72
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
73
|
-
},
|
|
74
|
-
subtitle2Strong: {
|
|
75
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
76
|
-
size: globalTokens.font.size['400'] as FontSize,
|
|
77
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
78
|
-
},
|
|
79
|
-
subtitle1: {
|
|
80
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
81
|
-
size: globalTokens.font.size['500'] as FontSize,
|
|
82
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
83
|
-
},
|
|
84
|
-
subtitle1Strong: {
|
|
85
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
86
|
-
size: globalTokens.font.size['500'] as FontSize,
|
|
87
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
88
|
-
},
|
|
89
|
-
title1: {
|
|
90
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
91
|
-
size: globalTokens.font.size['700'] as FontSize,
|
|
92
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
93
|
-
},
|
|
94
|
-
title1Strong: {
|
|
95
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
96
|
-
size: globalTokens.font.size['700'] as FontSize,
|
|
97
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
98
|
-
},
|
|
99
|
-
largeTitle: {
|
|
100
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
101
|
-
size: globalTokens.font.size['900'] as FontSize,
|
|
102
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
103
|
-
},
|
|
104
|
-
display: {
|
|
105
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
106
|
-
size: globalTokens.font.size['900'] as FontSize,
|
|
107
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
108
|
-
},
|
|
44
|
+
// mocked out
|
|
45
|
+
caption1: { face: 'primary', size: 'caption', weight: 'regular' },
|
|
46
|
+
body1: { face: 'primary', size: 'secondary', weight: 'regular' },
|
|
47
|
+
body1Strong: { face: 'primary', size: 'secondary', weight: 'semiBold' },
|
|
48
|
+
body2: { face: 'primary', size: 'body', weight: 'regular' },
|
|
49
|
+
body2Strong: { face: 'primary', size: 'body', weight: 'semiBold' },
|
|
50
|
+
subtitle1: { face: 'primary', size: 'header', weight: 'regular' },
|
|
51
|
+
subtitle1Strong: { face: 'primary', size: 'header', weight: 'semiBold' },
|
|
52
|
+
subtitle2: { face: 'primary', size: 'subheader', weight: 'regular' },
|
|
53
|
+
subtitle2Strong: { face: 'primary', size: 'subheader', weight: 'semiBold' },
|
|
54
|
+
title1: { face: 'primary', size: 'hero', weight: 'regular' },
|
|
55
|
+
title1Strong: { face: 'primary', size: 'hero', weight: 'semiBold' },
|
|
56
|
+
largeTitle: { face: 'primary', size: 'heroLarge', weight: 'regular' },
|
|
57
|
+
display: { face: 'primary', size: 'heroLarge', weight: 'semiBold' },
|
|
109
58
|
} as Variants,
|
|
110
59
|
};
|
|
111
60
|
|
|
@@ -121,102 +70,6 @@ function _defaultTypography(): Typography {
|
|
|
121
70
|
defaultsDict.families = familiesDictApple;
|
|
122
71
|
}
|
|
123
72
|
|
|
124
|
-
// In certain cases on win32, semibold font renders incorrectly so 'Segoe UI Semibold' is used
|
|
125
|
-
if (Platform.OS === ('win32' as any)) {
|
|
126
|
-
const familiesDictWin32 = {
|
|
127
|
-
primary: 'Segoe UI',
|
|
128
|
-
secondary: 'Segoe UI Semibold',
|
|
129
|
-
cursive: 'System',
|
|
130
|
-
monospace: 'System',
|
|
131
|
-
sansSerif: 'System',
|
|
132
|
-
serif: 'System',
|
|
133
|
-
};
|
|
134
|
-
defaultsDict.families = familiesDictWin32;
|
|
135
|
-
|
|
136
|
-
const variantsDictWin32 = {
|
|
137
|
-
captionStandard: { face: 'primary', size: 'caption', weight: 'regular' },
|
|
138
|
-
secondaryStandard: { face: 'primary', size: 'secondary', weight: 'regular' },
|
|
139
|
-
secondarySemibold: { face: 'secondary', size: 'secondary', weight: 'semiBold' },
|
|
140
|
-
bodyStandard: { face: 'primary', size: 'body', weight: 'regular' },
|
|
141
|
-
bodySemibold: { face: 'secondary', size: 'body', weight: 'semiBold' },
|
|
142
|
-
subheaderStandard: { face: 'primary', size: 'subheader', weight: 'regular' },
|
|
143
|
-
subheaderSemibold: { face: 'secondary', size: 'subheader', weight: 'semiBold' },
|
|
144
|
-
headerStandard: { face: 'primary', size: 'header', weight: 'regular' },
|
|
145
|
-
headerSemibold: { face: 'secondary', size: 'header', weight: 'semiBold' },
|
|
146
|
-
heroStandard: { face: 'primary', size: 'hero', weight: 'regular' },
|
|
147
|
-
heroSemibold: { face: 'secondary', size: 'hero', weight: 'semiBold' },
|
|
148
|
-
heroLargeStandard: { face: 'primary', size: 'heroLarge', weight: 'regular' },
|
|
149
|
-
heroLargeSemibold: { face: 'secondary', size: 'heroLarge', weight: 'semiBold' },
|
|
150
|
-
//v2 text variants
|
|
151
|
-
caption1: {
|
|
152
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
153
|
-
size: globalTokens.font.size['100'] as FontSize,
|
|
154
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
155
|
-
},
|
|
156
|
-
body1: {
|
|
157
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
158
|
-
size: globalTokens.font.size['200'] as FontSize,
|
|
159
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
160
|
-
},
|
|
161
|
-
body1Strong: {
|
|
162
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
163
|
-
size: globalTokens.font.size['200'] as FontSize,
|
|
164
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
165
|
-
},
|
|
166
|
-
body2: {
|
|
167
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
168
|
-
size: globalTokens.font.size['300'] as FontSize,
|
|
169
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
170
|
-
},
|
|
171
|
-
body2Strong: {
|
|
172
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
173
|
-
size: globalTokens.font.size['300'] as FontSize,
|
|
174
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
175
|
-
},
|
|
176
|
-
subtitle2: {
|
|
177
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
178
|
-
size: globalTokens.font.size['400'] as FontSize,
|
|
179
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
180
|
-
},
|
|
181
|
-
subtitle2Strong: {
|
|
182
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
183
|
-
size: globalTokens.font.size['400'] as FontSize,
|
|
184
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
185
|
-
},
|
|
186
|
-
subtitle1: {
|
|
187
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
188
|
-
size: globalTokens.font.size['500'] as FontSize,
|
|
189
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
190
|
-
},
|
|
191
|
-
subtitle1Strong: {
|
|
192
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
193
|
-
size: globalTokens.font.size['500'] as FontSize,
|
|
194
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
195
|
-
},
|
|
196
|
-
title1: {
|
|
197
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
198
|
-
size: globalTokens.font.size['700'] as FontSize,
|
|
199
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
200
|
-
},
|
|
201
|
-
title1Strong: {
|
|
202
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
203
|
-
size: globalTokens.font.size['700'] as FontSize,
|
|
204
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
205
|
-
},
|
|
206
|
-
largeTitle: {
|
|
207
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
208
|
-
size: globalTokens.font.size['900'] as FontSize,
|
|
209
|
-
weight: globalTokens.font.weight.regular as FontWeightValue,
|
|
210
|
-
},
|
|
211
|
-
display: {
|
|
212
|
-
face: globalTokens.font.family['base'] as FontFamily,
|
|
213
|
-
size: globalTokens.font.size['900'] as FontSize,
|
|
214
|
-
weight: globalTokens.font.weight.semibold as FontWeightValue,
|
|
215
|
-
},
|
|
216
|
-
} as Variants;
|
|
217
|
-
defaultsDict.variants = variantsDictWin32;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
73
|
return defaultsDict;
|
|
221
74
|
}
|
|
222
75
|
|
|
@@ -228,6 +81,7 @@ export const defaultFluentTheme: Theme = {
|
|
|
228
81
|
colors: getStockWebPalette(),
|
|
229
82
|
typography: _defaultTypography(),
|
|
230
83
|
spacing: defaultSpacing(),
|
|
84
|
+
shadows: createShadowAliasTokens('light'),
|
|
231
85
|
components: {},
|
|
232
86
|
host: { appearance: 'light' },
|
|
233
87
|
};
|
|
@@ -235,6 +89,7 @@ export const defaultFluentTheme: Theme = {
|
|
|
235
89
|
export const defaultFluentDarkTheme: Theme = {
|
|
236
90
|
colors: getStockWebDarkPalette(),
|
|
237
91
|
typography: defaultFluentTheme.typography,
|
|
92
|
+
shadows: createShadowAliasTokens('dark'),
|
|
238
93
|
spacing: defaultFluentTheme.spacing,
|
|
239
94
|
components: {},
|
|
240
95
|
host: { appearance: 'dark' },
|
|
@@ -243,6 +98,7 @@ export const defaultFluentDarkTheme: Theme = {
|
|
|
243
98
|
export const defaultFluentHighConstrastTheme: Theme = {
|
|
244
99
|
colors: getStockWebHCPalette(),
|
|
245
100
|
typography: defaultFluentTheme.typography,
|
|
101
|
+
shadows: createShadowAliasTokens('highContrast'),
|
|
246
102
|
spacing: defaultFluentTheme.spacing,
|
|
247
103
|
components: {},
|
|
248
104
|
host: { appearance: 'highContrast' },
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import lightAliasTokens from '@fluentui-react-native/design-tokens-windows/light/tokens-aliases.json';
|
|
2
2
|
import darkAliasTokens from '@fluentui-react-native/design-tokens-windows/dark/tokens-aliases.json';
|
|
3
3
|
import { hcAliasTokens } from './highContrast/tokens-alias';
|
|
4
|
+
import lightShadowTokens from '@fluentui-react-native/design-tokens-windows/light/tokens-shadow.json';
|
|
5
|
+
import darkShadowTokens from '@fluentui-react-native/design-tokens-windows/dark/tokens-shadow.json';
|
|
6
|
+
import hcShadowTokens from '@fluentui-react-native/design-tokens-win32/hc/tokens-shadow.json';
|
|
4
7
|
import { AppearanceOptions } from '@fluentui-react-native/theme-types';
|
|
5
8
|
import { assertNever } from 'assert-never';
|
|
6
9
|
|
|
@@ -17,3 +20,17 @@ export function getAliasTokens(mode: AppearanceOptions) {
|
|
|
17
20
|
|
|
18
21
|
return lightAliasTokens;
|
|
19
22
|
}
|
|
23
|
+
|
|
24
|
+
export function getShadowTokens(mode: AppearanceOptions) {
|
|
25
|
+
if (mode === 'light') {
|
|
26
|
+
return lightShadowTokens.shadow;
|
|
27
|
+
} else if (mode === 'dark') {
|
|
28
|
+
return darkShadowTokens.shadow;
|
|
29
|
+
} else if (mode === 'highContrast') {
|
|
30
|
+
return hcShadowTokens.shadow;
|
|
31
|
+
} else {
|
|
32
|
+
assertNever(mode);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return lightAliasTokens;
|
|
36
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { defaultFluentTheme, defaultFluentDarkTheme } from './defaultTheme';
|
|
2
2
|
export { createDefaultTheme } from './createDefaultTheme';
|
|
3
|
-
export { createAliasTokens } from './createAliasTokens';
|
|
3
|
+
export { createColorAliasTokens as createAliasTokens } from './createAliasTokens';
|
package/lib/getAliasTokens.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAliasTokens.d.ts","sourceRoot":"","sources":["../src/getAliasTokens.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,wBAAgB,cAAc,CAAC,IAAI,EAAE,iBAAiB,OAYrD"}
|
package/lib/getAliasTokens.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import lightAliasTokens from '@fluentui-react-native/design-tokens-windows/light/tokens-aliases.json';
|
|
2
|
-
import darkAliasTokens from '@fluentui-react-native/design-tokens-windows/dark/tokens-aliases.json';
|
|
3
|
-
import { hcAliasTokens } from './highContrast/tokens-alias';
|
|
4
|
-
import { assertNever } from 'assert-never';
|
|
5
|
-
export function getAliasTokens(mode) {
|
|
6
|
-
if (mode === 'light') {
|
|
7
|
-
return lightAliasTokens;
|
|
8
|
-
}
|
|
9
|
-
else if (mode === 'dark') {
|
|
10
|
-
return darkAliasTokens;
|
|
11
|
-
}
|
|
12
|
-
else if (mode === 'highContrast') {
|
|
13
|
-
return hcAliasTokens;
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
assertNever(mode);
|
|
17
|
-
}
|
|
18
|
-
return lightAliasTokens;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=getAliasTokens.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAliasTokens.js","sourceRoot":"","sources":["../src/getAliasTokens.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,wEAAwE,CAAC;AACtG,OAAO,eAAe,MAAM,uEAAuE,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,UAAU,cAAc,CAAC,IAAuB;IACpD,IAAI,IAAI,KAAK,OAAO,EAAE;QACpB,OAAO,gBAAgB,CAAC;KACzB;SAAM,IAAI,IAAI,KAAK,MAAM,EAAE;QAC1B,OAAO,eAAe,CAAC;KACxB;SAAM,IAAI,IAAI,KAAK,cAAc,EAAE;QAClC,OAAO,aAAa,CAAC;KACtB;SAAM;QACL,WAAW,CAAC,IAAI,CAAC,CAAC;KACnB;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAliasTokens.d.ts","sourceRoot":"","sources":["../src/getAliasTokens.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAGvE,wBAAgB,cAAc,CAAC,IAAI,EAAE,iBAAiB,OAYrD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAliasTokens.js","sourceRoot":"","sources":["../src/getAliasTokens.ts"],"names":[],"mappings":";;;;;;AAAA,+HAAsG;AACtG,8HAAoG;AACpG,4DAA4D;AAE5D,6CAA2C;AAE3C,SAAgB,cAAc,CAAC,IAAuB;IACpD,IAAI,IAAI,KAAK,OAAO,EAAE;QACpB,OAAO,6BAAgB,CAAC;KACzB;SAAM,IAAI,IAAI,KAAK,MAAM,EAAE;QAC1B,OAAO,6BAAe,CAAC;KACxB;SAAM,IAAI,IAAI,KAAK,cAAc,EAAE;QAClC,OAAO,4BAAa,CAAC;KACtB;SAAM;QACL,IAAA,0BAAW,EAAC,IAAI,CAAC,CAAC;KACnB;IAED,OAAO,6BAAgB,CAAC;AAC1B,CAAC;AAZD,wCAYC"}
|