@fluentui-react-native/default-theme 0.27.4 → 0.27.6
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/.cache/tsconfig.tsbuildinfo +1 -1
- package/CHANGELOG.md +39 -0
- package/lib/__tests__/defaultThemes.test.android.d.ts +2 -0
- package/lib/__tests__/defaultThemes.test.android.d.ts.map +1 -0
- package/lib/__tests__/defaultThemes.test.android.js +11 -0
- package/lib/__tests__/defaultThemes.test.android.js.map +1 -0
- package/lib/__tests__/defaultThemes.test.ios.d.ts +2 -0
- package/lib/__tests__/defaultThemes.test.ios.d.ts.map +1 -0
- package/lib/__tests__/defaultThemes.test.ios.js +11 -0
- package/lib/__tests__/defaultThemes.test.ios.js.map +1 -0
- package/lib/__tests__/defaultThemes.test.macos.d.ts +2 -0
- package/lib/__tests__/defaultThemes.test.macos.d.ts.map +1 -0
- package/lib/__tests__/defaultThemes.test.macos.js +11 -0
- package/lib/__tests__/defaultThemes.test.macos.js.map +1 -0
- package/lib/__tests__/defaultThemes.test.win32.d.ts +2 -0
- package/lib/__tests__/defaultThemes.test.win32.d.ts.map +1 -0
- package/lib/__tests__/defaultThemes.test.win32.js +11 -0
- package/lib/__tests__/defaultThemes.test.win32.js.map +1 -0
- package/lib/__tests__/defaultThemes.test.windows.d.ts +2 -0
- package/lib/__tests__/defaultThemes.test.windows.d.ts.map +1 -0
- package/lib/__tests__/defaultThemes.test.windows.js +11 -0
- package/lib/__tests__/defaultThemes.test.windows.js.map +1 -0
- package/lib/createAliasTokens.d.ts +2 -6
- package/lib/createAliasTokens.d.ts.map +1 -1
- package/lib/createDefaultTheme.d.ts +2 -2
- package/lib/createDefaultTheme.d.ts.map +1 -1
- package/lib/createDefaultTheme.js +2 -2
- package/lib/createDefaultTheme.js.map +1 -1
- package/lib/defaultColors.d.ts +1 -1
- package/lib/defaultColors.d.ts.map +1 -1
- package/lib/defaultTheme.d.ts +1 -1
- package/lib/defaultTheme.d.ts.map +1 -1
- package/lib/defaultTheme.js +3 -2
- package/lib/defaultTheme.js.map +1 -1
- package/lib/stockWebPalette.d.ts +1 -1
- package/lib/stockWebPalette.d.ts.map +1 -1
- package/lib/stockWebPalette.js +7 -6
- package/lib/stockWebPalette.js.map +1 -1
- package/lib/stockWebPalette.macos.d.ts +1 -1
- package/lib/stockWebPalette.macos.d.ts.map +1 -1
- package/lib/stockWebPalette.macos.js +7 -6
- package/lib/stockWebPalette.macos.js.map +1 -1
- package/lib/stockWebPalette.win32.d.ts +1 -1
- package/lib/stockWebPalette.win32.d.ts.map +1 -1
- package/lib/stockWebPalette.win32.js +7 -6
- package/lib/stockWebPalette.win32.js.map +1 -1
- package/package.json +6 -8
- package/src/__tests__/__snapshots__/defaultThemes.test.android.ts.snap +1726 -0
- package/src/__tests__/__snapshots__/defaultThemes.test.ios.ts.snap +1660 -0
- package/src/__tests__/__snapshots__/defaultThemes.test.macos.ts.snap +2441 -0
- package/src/__tests__/__snapshots__/defaultThemes.test.win32.ts.snap +2441 -0
- package/src/__tests__/__snapshots__/defaultThemes.test.windows.ts.snap +2441 -0
- package/src/__tests__/default-theme.test.ts +1 -1
- package/src/__tests__/defaultThemes.test.android.ts +13 -0
- package/src/__tests__/defaultThemes.test.ios.ts +13 -0
- package/src/__tests__/defaultThemes.test.macos.ts +13 -0
- package/src/__tests__/defaultThemes.test.win32.ts +13 -0
- package/src/__tests__/defaultThemes.test.windows.ts +13 -0
- package/src/createAliasTokens.ts +1 -1
- package/src/createDefaultTheme.ts +3 -3
- package/src/defaultColors.ts +1 -1
- package/src/defaultTheme.ts +4 -3
- package/src/stockWebPalette.macos.ts +8 -7
- package/src/stockWebPalette.ts +8 -7
- package/src/stockWebPalette.win32.ts +8 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ThemeOptions, AppearanceOptions } from '@fluentui-react-native/
|
|
1
|
+
import type { ThemeOptions, AppearanceOptions } from '@fluentui-react-native/design/theming';
|
|
2
2
|
|
|
3
3
|
import { createColorAliasTokens, createShadowAliasTokens } from '../createAliasTokens';
|
|
4
4
|
import { createDefaultTheme } from '../createDefaultTheme';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defaultFluentTheme, defaultFluentDarkTheme, defaultFluentHighConstrastTheme } from '../defaultTheme';
|
|
2
|
+
|
|
3
|
+
it('defaultFluentTheme', () => {
|
|
4
|
+
expect(defaultFluentTheme).toMatchSnapshot();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
it('defaultFluentDarkTheme', () => {
|
|
8
|
+
expect(defaultFluentDarkTheme).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('defaultFluentHighConstrastTheme', () => {
|
|
12
|
+
expect(defaultFluentHighConstrastTheme).toMatchSnapshot();
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defaultFluentTheme, defaultFluentDarkTheme, defaultFluentHighConstrastTheme } from '../defaultTheme';
|
|
2
|
+
|
|
3
|
+
it('defaultFluentTheme', () => {
|
|
4
|
+
expect(defaultFluentTheme).toMatchSnapshot();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
it('defaultFluentDarkTheme', () => {
|
|
8
|
+
expect(defaultFluentDarkTheme).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('defaultFluentHighConstrastTheme', () => {
|
|
12
|
+
expect(defaultFluentHighConstrastTheme).toMatchSnapshot();
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defaultFluentTheme, defaultFluentDarkTheme, defaultFluentHighConstrastTheme } from '../defaultTheme';
|
|
2
|
+
|
|
3
|
+
it('defaultFluentTheme', () => {
|
|
4
|
+
expect(defaultFluentTheme).toMatchSnapshot();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
it('defaultFluentDarkTheme', () => {
|
|
8
|
+
expect(defaultFluentDarkTheme).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('defaultFluentHighConstrastTheme', () => {
|
|
12
|
+
expect(defaultFluentHighConstrastTheme).toMatchSnapshot();
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defaultFluentTheme, defaultFluentDarkTheme, defaultFluentHighConstrastTheme } from '../defaultTheme';
|
|
2
|
+
|
|
3
|
+
it('defaultFluentTheme', () => {
|
|
4
|
+
expect(defaultFluentTheme).toMatchSnapshot();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
it('defaultFluentDarkTheme', () => {
|
|
8
|
+
expect(defaultFluentDarkTheme).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('defaultFluentHighConstrastTheme', () => {
|
|
12
|
+
expect(defaultFluentHighConstrastTheme).toMatchSnapshot();
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defaultFluentTheme, defaultFluentDarkTheme, defaultFluentHighConstrastTheme } from '../defaultTheme';
|
|
2
|
+
|
|
3
|
+
it('defaultFluentTheme', () => {
|
|
4
|
+
expect(defaultFluentTheme).toMatchSnapshot();
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
it('defaultFluentDarkTheme', () => {
|
|
8
|
+
expect(defaultFluentDarkTheme).toMatchSnapshot();
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('defaultFluentHighConstrastTheme', () => {
|
|
12
|
+
expect(defaultFluentHighConstrastTheme).toMatchSnapshot();
|
|
13
|
+
});
|
package/src/createAliasTokens.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { memoize } from '@fluentui-react-native/framework-base';
|
|
2
2
|
import { getAliasTokens, getShadowTokens } from '@fluentui-react-native/theme-tokens';
|
|
3
|
-
import type { AliasColorTokens, AppearanceOptions, ThemeShadowDefinition } from '@fluentui-react-native/
|
|
3
|
+
import type { AliasColorTokens, AppearanceOptions, ThemeShadowDefinition } from '@fluentui-react-native/design/theming';
|
|
4
4
|
import { mapPipelineToShadow, mapPipelineToTheme } from '@fluentui-react-native/theming-utils';
|
|
5
5
|
|
|
6
6
|
function createColorAliasTokensWorker(mode: AppearanceOptions): AliasColorTokens {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Appearance } from 'react-native';
|
|
2
2
|
|
|
3
|
-
import { ThemeReference } from '@fluentui-react-native/
|
|
4
|
-
import type { Theme, ThemeOptions } from '@fluentui-react-native/
|
|
5
|
-
import { getCurrentAppearance } from '@fluentui-react-native/theming
|
|
3
|
+
import { ThemeReference } from '@fluentui-react-native/design/theming';
|
|
4
|
+
import type { Theme, ThemeOptions } from '@fluentui-react-native/design/theming';
|
|
5
|
+
import { getCurrentAppearance } from '@fluentui-react-native/design/theming';
|
|
6
6
|
import assertNever from 'assert-never';
|
|
7
7
|
|
|
8
8
|
import { defaultFluentDarkTheme, defaultFluentHighConstrastTheme, defaultFluentTheme } from './defaultTheme';
|
package/src/defaultColors.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Palette, FabricWebPalette, ThemeColorDefinition } from '@fluentui-react-native/
|
|
1
|
+
import type { Palette, FabricWebPalette, ThemeColorDefinition } from '@fluentui-react-native/design/theming';
|
|
2
2
|
|
|
3
3
|
import { createColorAliasTokens } from './createAliasTokens';
|
|
4
4
|
|
package/src/defaultTheme.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
2
|
|
|
3
3
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
4
|
-
import type { Theme, Typography, Spacing, FontWeightValue, FontSize, FontSizes, Variants } from '@fluentui-react-native/
|
|
4
|
+
import type { Theme, Typography, Spacing, FontWeightValue, FontSize, FontSizes, Variants } from '@fluentui-react-native/design/theming';
|
|
5
|
+
import { fontWeightRegular, fontWeightSemibold } from '@fluentui-react-native/design/tokens/global';
|
|
5
6
|
|
|
6
7
|
import { createShadowAliasTokens } from './createAliasTokens';
|
|
7
8
|
import { getStockWebHCPalette } from './defaultColors';
|
|
@@ -19,8 +20,8 @@ function _defaultTypography(): Typography {
|
|
|
19
20
|
heroLarge: globalTokens.font.size900 as FontSize,
|
|
20
21
|
} as FontSizes,
|
|
21
22
|
weights: {
|
|
22
|
-
regular:
|
|
23
|
-
semiBold:
|
|
23
|
+
regular: fontWeightRegular as FontWeightValue,
|
|
24
|
+
semiBold: fontWeightSemibold as FontWeightValue,
|
|
24
25
|
},
|
|
25
26
|
families: {
|
|
26
27
|
primary: 'Segoe UI',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
|
-
import type { ThemeColorDefinition } from '@fluentui-react-native/
|
|
2
|
+
import type { ThemeColorDefinition } from '@fluentui-react-native/design/theming';
|
|
3
|
+
import { colorBlack, colorBurgundyPrimary, colorRedPrimary, colorWhite } from '@fluentui-react-native/design/tokens/global';
|
|
3
4
|
|
|
4
5
|
import { createColorAliasTokens } from './createAliasTokens';
|
|
5
6
|
import { paletteFromFabricColors } from './defaultColors';
|
|
@@ -7,7 +8,7 @@ import { paletteFromFabricColors } from './defaultColors';
|
|
|
7
8
|
export function getStockWebPalette(): ThemeColorDefinition {
|
|
8
9
|
return {
|
|
9
10
|
...paletteFromFabricColors({
|
|
10
|
-
black:
|
|
11
|
+
black: colorBlack,
|
|
11
12
|
neutralDark: '#201f1e',
|
|
12
13
|
neutralPrimary: '#323130',
|
|
13
14
|
neutralPrimaryAlt: '#3b3a39',
|
|
@@ -20,10 +21,10 @@ export function getStockWebPalette(): ThemeColorDefinition {
|
|
|
20
21
|
neutralLight: '#edebe9',
|
|
21
22
|
neutralLighter: '#f3f2f1',
|
|
22
23
|
neutralLighterAlt: '#faf9f8',
|
|
23
|
-
white:
|
|
24
|
+
white: colorWhite,
|
|
24
25
|
// Shared Colors
|
|
25
|
-
red:
|
|
26
|
-
redDark:
|
|
26
|
+
red: colorRedPrimary,
|
|
27
|
+
redDark: colorBurgundyPrimary,
|
|
27
28
|
|
|
28
29
|
themeDarker: globalTokens.color.brand.shade40,
|
|
29
30
|
themeDark: globalTokens.color.brand.shade20,
|
|
@@ -55,7 +56,7 @@ export function getStockWebDarkPalette(): ThemeColorDefinition {
|
|
|
55
56
|
themeLight: globalTokens.color.brand.shade30,
|
|
56
57
|
themeLighter: globalTokens.color.brand.shade50,
|
|
57
58
|
themeLighterAlt: globalTokens.color.brand.shade60,
|
|
58
|
-
black:
|
|
59
|
+
black: colorWhite,
|
|
59
60
|
neutralDark: '#faf9f8',
|
|
60
61
|
neutralPrimary: '#f3f2f1',
|
|
61
62
|
neutralPrimaryAlt: '#c8c6c4',
|
|
@@ -69,7 +70,7 @@ export function getStockWebDarkPalette(): ThemeColorDefinition {
|
|
|
69
70
|
neutralLighter: '#252423',
|
|
70
71
|
neutralLighterAlt: '#201f1e',
|
|
71
72
|
white: '#1b1a19',
|
|
72
|
-
red:
|
|
73
|
+
red: colorRedPrimary,
|
|
73
74
|
accent: globalTokens.color.brand.primary,
|
|
74
75
|
redDark: '#f1707b',
|
|
75
76
|
blackTranslucent40: 'rgba(0,0,0,.4)',
|
package/src/stockWebPalette.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
2
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
3
|
-
import type { ThemeColorDefinition } from '@fluentui-react-native/
|
|
3
|
+
import type { ThemeColorDefinition } from '@fluentui-react-native/design/theming';
|
|
4
|
+
import { colorBlack, colorBurgundyPrimary, colorRedPrimary, colorWhite } from '@fluentui-react-native/design/tokens/global';
|
|
4
5
|
|
|
5
6
|
import { createColorAliasTokens } from './createAliasTokens';
|
|
6
7
|
import { paletteFromFabricColors } from './defaultColors';
|
|
@@ -8,7 +9,7 @@ import { paletteFromFabricColors } from './defaultColors';
|
|
|
8
9
|
export function getStockWebPalette(): ThemeColorDefinition {
|
|
9
10
|
return {
|
|
10
11
|
...paletteFromFabricColors({
|
|
11
|
-
black:
|
|
12
|
+
black: colorBlack,
|
|
12
13
|
neutralDark: '#201f1e',
|
|
13
14
|
neutralPrimary: '#323130',
|
|
14
15
|
neutralPrimaryAlt: '#3b3a39',
|
|
@@ -21,10 +22,10 @@ export function getStockWebPalette(): ThemeColorDefinition {
|
|
|
21
22
|
neutralLight: '#edebe9',
|
|
22
23
|
neutralLighter: '#f3f2f1',
|
|
23
24
|
neutralLighterAlt: '#faf9f8',
|
|
24
|
-
white:
|
|
25
|
+
white: colorWhite,
|
|
25
26
|
// Shared Colors
|
|
26
|
-
red:
|
|
27
|
-
redDark:
|
|
27
|
+
red: colorRedPrimary,
|
|
28
|
+
redDark: colorBurgundyPrimary,
|
|
28
29
|
|
|
29
30
|
// @ts-expect-error
|
|
30
31
|
accent: globalTokens.color.brand80,
|
|
@@ -59,7 +60,7 @@ export function getStockWebDarkPalette(): ThemeColorDefinition {
|
|
|
59
60
|
...paletteFromFabricColors(
|
|
60
61
|
{
|
|
61
62
|
// colors taken from fluentui DarkCustomizations.ts
|
|
62
|
-
black:
|
|
63
|
+
black: colorWhite,
|
|
63
64
|
neutralDark: '#faf9f8',
|
|
64
65
|
neutralPrimary: '#f3f2f1',
|
|
65
66
|
neutralPrimaryAlt: '#c8c6c4',
|
|
@@ -73,7 +74,7 @@ export function getStockWebDarkPalette(): ThemeColorDefinition {
|
|
|
73
74
|
neutralLighter: '#252423',
|
|
74
75
|
neutralLighterAlt: '#201f1e',
|
|
75
76
|
white: '#1b1a19',
|
|
76
|
-
red:
|
|
77
|
+
red: colorRedPrimary,
|
|
77
78
|
// @ts-expect-error
|
|
78
79
|
accent: globalTokens.color.brand40,
|
|
79
80
|
redDark: '#f1707b',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { globalTokens } from '@fluentui-react-native/theme-tokens';
|
|
2
|
-
import type { ThemeColorDefinition } from '@fluentui-react-native/
|
|
2
|
+
import type { ThemeColorDefinition } from '@fluentui-react-native/design/theming';
|
|
3
|
+
import { colorBlack, colorBurgundyPrimary, colorRedPrimary, colorWhite } from '@fluentui-react-native/design/tokens/global';
|
|
3
4
|
|
|
4
5
|
import { createColorAliasTokens } from './createAliasTokens';
|
|
5
6
|
import { paletteFromFabricColors } from './defaultColors';
|
|
@@ -7,7 +8,7 @@ import { paletteFromFabricColors } from './defaultColors';
|
|
|
7
8
|
export function getStockWebPalette(): ThemeColorDefinition {
|
|
8
9
|
return {
|
|
9
10
|
...paletteFromFabricColors({
|
|
10
|
-
black:
|
|
11
|
+
black: colorBlack,
|
|
11
12
|
neutralDark: '#201f1e',
|
|
12
13
|
neutralPrimary: '#323130',
|
|
13
14
|
neutralPrimaryAlt: '#3b3a39',
|
|
@@ -20,10 +21,10 @@ export function getStockWebPalette(): ThemeColorDefinition {
|
|
|
20
21
|
neutralLight: '#edebe9',
|
|
21
22
|
neutralLighter: '#f3f2f1',
|
|
22
23
|
neutralLighterAlt: '#faf9f8',
|
|
23
|
-
white:
|
|
24
|
+
white: colorWhite,
|
|
24
25
|
// Shared Colors
|
|
25
|
-
red:
|
|
26
|
-
redDark:
|
|
26
|
+
red: colorRedPrimary,
|
|
27
|
+
redDark: colorBurgundyPrimary,
|
|
27
28
|
|
|
28
29
|
themeDarker: globalTokens.color.brand.shade40,
|
|
29
30
|
themeDark: globalTokens.color.brand.shade20,
|
|
@@ -55,7 +56,7 @@ export function getStockWebDarkPalette(): ThemeColorDefinition {
|
|
|
55
56
|
themeLight: globalTokens.color.brand.shade30,
|
|
56
57
|
themeLighter: globalTokens.color.brand.shade50,
|
|
57
58
|
themeLighterAlt: globalTokens.color.brand.shade60,
|
|
58
|
-
black:
|
|
59
|
+
black: colorWhite,
|
|
59
60
|
neutralDark: '#faf9f8',
|
|
60
61
|
neutralPrimary: '#f3f2f1',
|
|
61
62
|
neutralPrimaryAlt: '#c8c6c4',
|
|
@@ -69,7 +70,7 @@ export function getStockWebDarkPalette(): ThemeColorDefinition {
|
|
|
69
70
|
neutralLighter: '#252423',
|
|
70
71
|
neutralLighterAlt: '#201f1e',
|
|
71
72
|
white: '#1b1a19',
|
|
72
|
-
red:
|
|
73
|
+
red: colorRedPrimary,
|
|
73
74
|
accent: globalTokens.color.brand.primary,
|
|
74
75
|
redDark: '#f1707b',
|
|
75
76
|
blackTranslucent40: 'rgba(0,0,0,.4)',
|