@fluentui-react-native/win32-theme 0.39.0 → 0.39.3
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.md +41 -0
- package/lib/NativeModule/_mocks_/getThemingModule.native.d.ts +1 -1
- package/lib/NativeModule/_mocks_/getThemingModule.native.js +2 -2
- package/lib/NativeModule/fallbackOfficeModule.d.ts +1 -1
- package/lib/NativeModule/fallbackOfficeModule.js +163 -163
- package/lib/NativeModule/getThemingModule.d.ts +1 -1
- package/lib/NativeModule/getThemingModule.js +2 -2
- package/lib/NativeModule/getThemingModule.native.d.ts +1 -1
- package/lib/NativeModule/getThemingModule.native.js +30 -28
- package/lib/NativeModule/hostThemeSetting.d.ts +1 -1
- package/lib/NativeModule/hostThemeSetting.js +3 -3
- package/lib/NativeModule/index.d.ts +2 -10
- package/lib/NativeModule/index.js +1 -1
- package/lib/NativeModule/officeThemingModule.d.ts +21 -21
- package/lib/NativeModule/officeThemingModule.js +1 -1
- package/lib/__tests__/win32-theme.test.d.ts +1 -1
- package/lib/__tests__/win32-theme.test.js +47 -47
- package/lib/createAliasesFromPalette.d.ts +1 -1
- package/lib/createAliasesFromPalette.js +56 -56
- package/lib/createBrandedThemeWithAlias.d.ts +1 -1
- package/lib/createBrandedThemeWithAlias.js +61 -56
- package/lib/createFontAliasTokens.d.ts +1 -1
- package/lib/createFontAliasTokens.js +3 -3
- package/lib/createOfficeAliasTokens.d.ts +1 -1
- package/lib/createOfficeAliasTokens.js +5 -5
- package/lib/createOfficeTheme.d.ts +1 -1
- package/lib/createOfficeTheme.js +46 -53
- package/lib/createPartialOfficeTheme.d.ts +1 -1
- package/lib/createPartialOfficeTheme.js +19 -22
- package/lib/getOfficeTokens.d.ts +227 -229
- package/lib/getOfficeTokens.js +26 -20
- package/lib/getThemeTypography.d.ts +1 -1
- package/lib/getThemeTypography.js +32 -32
- package/lib/highContrast/tokens-alias.d.ts +1 -1
- package/lib/highContrast/tokens-alias.js +11 -11
- package/lib/index.d.ts +2 -10
- package/lib/index.js +1 -1
- package/lib/paletteFromOfficeColors.d.ts +1 -1
- package/lib/paletteFromOfficeColors.js +114 -114
- package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.d.ts +1 -1
- package/lib-commonjs/NativeModule/_mocks_/getThemingModule.native.js +5 -5
- package/lib-commonjs/NativeModule/fallbackOfficeModule.d.ts +1 -1
- package/lib-commonjs/NativeModule/fallbackOfficeModule.js +165 -165
- package/lib-commonjs/NativeModule/getThemingModule.d.ts +1 -1
- package/lib-commonjs/NativeModule/getThemingModule.js +5 -5
- package/lib-commonjs/NativeModule/getThemingModule.native.d.ts +1 -1
- package/lib-commonjs/NativeModule/getThemingModule.native.js +35 -33
- package/lib-commonjs/NativeModule/hostThemeSetting.d.ts +1 -1
- package/lib-commonjs/NativeModule/hostThemeSetting.js +5 -5
- package/lib-commonjs/NativeModule/index.d.ts +2 -10
- package/lib-commonjs/NativeModule/index.js +8 -23
- package/lib-commonjs/NativeModule/officeThemingModule.d.ts +21 -21
- package/lib-commonjs/NativeModule/officeThemingModule.js +3 -3
- package/lib-commonjs/__tests__/win32-theme.test.d.ts +1 -1
- package/lib-commonjs/__tests__/win32-theme.test.js +57 -57
- package/lib-commonjs/createAliasesFromPalette.d.ts +1 -1
- package/lib-commonjs/createAliasesFromPalette.js +58 -58
- package/lib-commonjs/createBrandedThemeWithAlias.d.ts +1 -1
- package/lib-commonjs/createBrandedThemeWithAlias.js +64 -59
- package/lib-commonjs/createFontAliasTokens.d.ts +1 -1
- package/lib-commonjs/createFontAliasTokens.js +8 -8
- package/lib-commonjs/createOfficeAliasTokens.d.ts +1 -1
- package/lib-commonjs/createOfficeAliasTokens.js +10 -10
- package/lib-commonjs/createOfficeTheme.d.ts +1 -1
- package/lib-commonjs/createOfficeTheme.js +57 -66
- package/lib-commonjs/createPartialOfficeTheme.d.ts +1 -1
- package/lib-commonjs/createPartialOfficeTheme.js +22 -25
- package/lib-commonjs/getOfficeTokens.d.ts +227 -229
- package/lib-commonjs/getOfficeTokens.js +39 -35
- package/lib-commonjs/getThemeTypography.d.ts +1 -1
- package/lib-commonjs/getThemeTypography.js +36 -36
- package/lib-commonjs/highContrast/tokens-alias.d.ts +1 -1
- package/lib-commonjs/highContrast/tokens-alias.js +18 -20
- package/lib-commonjs/index.d.ts +2 -10
- package/lib-commonjs/index.js +23 -89
- package/lib-commonjs/paletteFromOfficeColors.d.ts +1 -1
- package/lib-commonjs/paletteFromOfficeColors.js +116 -116
- package/package.json +26 -25
- package/eslint.config.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/win32-theme
|
|
2
2
|
|
|
3
|
+
## 0.39.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9cf4444: Migrate from ESLint to oxlint
|
|
8
|
+
- Updated dependencies [9cf4444]
|
|
9
|
+
- @fluentui-react-native/default-theme@0.27.3
|
|
10
|
+
- @fluentui-react-native/theming-utils@0.27.3
|
|
11
|
+
- @fluentui-react-native/theme-tokens@0.28.3
|
|
12
|
+
- @fluentui-react-native/theme-types@0.44.3
|
|
13
|
+
- @fluentui-react-native/theme@0.12.3
|
|
14
|
+
- @fluentui-react-native/framework-base@0.3.3
|
|
15
|
+
|
|
16
|
+
## 0.39.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 8a7b549: Update to the latest rnx-kit versions, fix some typing issues, and correct the vscode settings
|
|
21
|
+
- Updated dependencies [8a7b549]
|
|
22
|
+
- @fluentui-react-native/default-theme@0.27.2
|
|
23
|
+
- @fluentui-react-native/theming-utils@0.27.2
|
|
24
|
+
- @fluentui-react-native/theme-tokens@0.28.2
|
|
25
|
+
- @fluentui-react-native/theme-types@0.44.2
|
|
26
|
+
- @fluentui-react-native/theme@0.12.2
|
|
27
|
+
- @fluentui-react-native/framework-base@0.3.2
|
|
28
|
+
|
|
29
|
+
## 0.39.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- 0d6e9c1: chore: migrate to `oxfmt`
|
|
34
|
+
- ac6e7af: Ensure packages have a default export that references the typescript entrypoint and clean up build dependency ordering
|
|
35
|
+
- Updated dependencies [0d6e9c1]
|
|
36
|
+
- Updated dependencies [ac6e7af]
|
|
37
|
+
- @fluentui-react-native/default-theme@0.27.1
|
|
38
|
+
- @fluentui-react-native/theming-utils@0.27.1
|
|
39
|
+
- @fluentui-react-native/theme-tokens@0.28.1
|
|
40
|
+
- @fluentui-react-native/theme-types@0.44.1
|
|
41
|
+
- @fluentui-react-native/theme@0.12.1
|
|
42
|
+
- @fluentui-react-native/framework-base@0.3.1
|
|
43
|
+
|
|
3
44
|
## 0.39.0
|
|
4
45
|
|
|
5
46
|
### Minor Changes
|
|
@@ -3,4 +3,4 @@ import type { OfficeThemingModule } from '../officeThemingModule';
|
|
|
3
3
|
* implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
|
|
4
4
|
*/
|
|
5
5
|
export declare function getThemingModule(): [OfficeThemingModule, undefined];
|
|
6
|
-
//# sourceMappingURL=getThemingModule.native.d.ts.map
|
|
6
|
+
//# sourceMappingURL=getThemingModule.native.d.ts.map
|
|
@@ -3,6 +3,6 @@ import { fallbackOfficeModule } from '../fallbackOfficeModule';
|
|
|
3
3
|
* implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
|
|
4
4
|
*/
|
|
5
5
|
export function getThemingModule() {
|
|
6
|
-
|
|
6
|
+
return [fallbackOfficeModule, undefined];
|
|
7
7
|
}
|
|
8
|
-
//# sourceMappingURL=getThemingModule.native.js.map
|
|
8
|
+
//# sourceMappingURL=getThemingModule.native.js.map
|
|
@@ -2,4 +2,4 @@ import type { OfficePalette } from '@fluentui-react-native/theme-types';
|
|
|
2
2
|
import type { OfficeThemingModule } from './officeThemingModule';
|
|
3
3
|
export declare function fallbackGetPalette(pal?: string): OfficePalette;
|
|
4
4
|
export declare const fallbackOfficeModule: OfficeThemingModule;
|
|
5
|
-
//# sourceMappingURL=fallbackOfficeModule.d.ts.map
|
|
5
|
+
//# sourceMappingURL=fallbackOfficeModule.d.ts.map
|
|
@@ -1,169 +1,169 @@
|
|
|
1
1
|
const whiteColorsPalette = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
2
|
+
Bkg: '#FFFFFF',
|
|
3
|
+
BkgHover: '#D2D2D2',
|
|
4
|
+
BkgPressed: '#B1B1B1',
|
|
5
|
+
BkgSelected: '#C6C6C6',
|
|
6
|
+
BkgSubtle: '#F3F3F3',
|
|
7
|
+
BkgSelectionHighlight: '#737373',
|
|
8
|
+
Text: '#262626',
|
|
9
|
+
TextRest: '#262626',
|
|
10
|
+
TextHover: '#262626',
|
|
11
|
+
TextPressed: '#262626',
|
|
12
|
+
TextSelected: '#262626',
|
|
13
|
+
TextDisabled: '#B1B1B1',
|
|
14
|
+
TextSelectionHighlight: '#FFFFFF',
|
|
15
|
+
TextSecondary: '#666666',
|
|
16
|
+
TextSecondaryRest: '#666666',
|
|
17
|
+
TextSecondaryHover: '#505050',
|
|
18
|
+
TextSecondaryPressed: '#666666',
|
|
19
|
+
TextSecondarySelected: '#666666',
|
|
20
|
+
TextEmphasis: '#D83B01',
|
|
21
|
+
TextEmphasisRest: '#D83B01',
|
|
22
|
+
TextEmphasisHover: '#EA6115',
|
|
23
|
+
TextEmphasisPressed: '#A22C01',
|
|
24
|
+
TextEmphasisSelected: '#D83B01',
|
|
25
|
+
StrokeSelectedHover: '#969696',
|
|
26
|
+
StrokeKeyboard: '#969696',
|
|
27
|
+
StrokeOverRest: '#00000000',
|
|
28
|
+
StrokeOverHover: '#00000000',
|
|
29
|
+
StrokeOverPressed: '#00000000',
|
|
30
|
+
StrokeOverSelectedRest: '#00000000',
|
|
31
|
+
StrokeOverSelectedHover: '#969696',
|
|
32
|
+
StrokeOverSelectedPressed: '#00000000',
|
|
33
|
+
BkgCtl: '#E6E6E6',
|
|
34
|
+
BkgCtlHover: '#FFF7F0',
|
|
35
|
+
BkgCtlPressed: '#FBDFD0',
|
|
36
|
+
BkgCtlSelected: '#E6E6E6',
|
|
37
|
+
BkgCtlDisabled: '#E6E6E6',
|
|
38
|
+
TextCtl: '#262626',
|
|
39
|
+
TextCtlHover: '#262626',
|
|
40
|
+
TextCtlPressed: '#262626',
|
|
41
|
+
TextCtlSelected: '#262626',
|
|
42
|
+
TextCtlDisabled: '#B1B1B1',
|
|
43
|
+
StrokeCtl: '#969696',
|
|
44
|
+
StrokeCtlHover: '#FBDFD0',
|
|
45
|
+
StrokeCtlPressed: '#EA6115',
|
|
46
|
+
StrokeCtlSelected: '#969696',
|
|
47
|
+
StrokeCtlDisabled: '#D2D2D2',
|
|
48
|
+
StrokeCtlKeyboard: '#FBDFD0',
|
|
49
|
+
BkgCtlEmphasis: '#D83B01',
|
|
50
|
+
BkgCtlEmphasisHover: '#F29F71',
|
|
51
|
+
BkgCtlEmphasisPressed: '#A22C01',
|
|
52
|
+
BkgCtlEmphasisDisabled: '#E6E6E6',
|
|
53
|
+
TextCtlEmphasis: '#FFFFFF',
|
|
54
|
+
TextCtlEmphasisHover: '#FFFFFF',
|
|
55
|
+
TextCtlEmphasisPressed: '#FFFFFF',
|
|
56
|
+
TextCtlEmphasisDisabled: '#B1B1B1',
|
|
57
|
+
StrokeCtlEmphasis: '#A22C01',
|
|
58
|
+
StrokeCtlEmphasisHover: '#D83B01',
|
|
59
|
+
StrokeCtlEmphasisPressed: '#A22C01',
|
|
60
|
+
StrokeCtlEmphasisDisabled: '#D2D2D2',
|
|
61
|
+
StrokeCtlEmphasisKeyboard: '#A22C01',
|
|
62
|
+
BkgCtlSubtle: '#FFFFFF',
|
|
63
|
+
BkgCtlSubtleHover: '#FFFFFF',
|
|
64
|
+
BkgCtlSubtlePressed: '#FFFFFF',
|
|
65
|
+
BkgCtlSubtleDisabled: '#F3F3F3',
|
|
66
|
+
TextCtlSubtle: '#262626',
|
|
67
|
+
TextCtlSubtleHover: '#262626',
|
|
68
|
+
TextCtlSubtlePressed: '#262626',
|
|
69
|
+
TextCtlSubtleDisabled: '#B1B1B1',
|
|
70
|
+
StrokeCtlSubtle: '#C6C6C6',
|
|
71
|
+
StrokeCtlSubtleHover: '#969696',
|
|
72
|
+
StrokeCtlSubtlePressed: '#969696',
|
|
73
|
+
StrokeCtlSubtleDisabled: '#C6C6C6',
|
|
74
|
+
StrokeCtlSubtleKeyboard: '#969696',
|
|
75
|
+
TextHyperlink: '#D83B01',
|
|
76
|
+
TextHyperlinkHover: '#A22C01',
|
|
77
|
+
TextHyperlinkPressed: '#6C1E01',
|
|
78
|
+
TextActive: '#262626',
|
|
79
|
+
TextActiveHover: '#EA6115',
|
|
80
|
+
TextActivePressed: '#A22C01',
|
|
81
|
+
TextActiveSelected: '#D83B01',
|
|
82
|
+
StrokeOnlyHover: '#B1B1B1',
|
|
83
|
+
StrokeOnlyPressed: '#737373',
|
|
84
|
+
StrokeOnlySelected: '#969696',
|
|
85
|
+
TextError: '#A50000',
|
|
86
|
+
TextErrorHover: '#A50000',
|
|
87
|
+
TextErrorPressed: '#A50000',
|
|
88
|
+
TextErrorSelected: '#A50000',
|
|
89
|
+
ThumbToggleSwitchOff: '#505050',
|
|
90
|
+
ThumbToggleSwitchOffHover: '#505050',
|
|
91
|
+
ThumbToggleSwitchOffPressed: '#505050',
|
|
92
|
+
ThumbToggleSwitchOffDisabled: '#D2D2D2',
|
|
93
|
+
ThumbToggleSwitchOn: '#FFFFFF',
|
|
94
|
+
ThumbToggleSwitchOnHover: '#FFFFFF',
|
|
95
|
+
ThumbToggleSwitchOnPressed: '#FFFFFF',
|
|
96
|
+
ThumbToggleSwitchOnDisabled: '#FFFFFF',
|
|
97
|
+
BkgToggleSwitchOff: '#FFFFFF',
|
|
98
|
+
BkgToggleSwitchOffHover: '#D2D2D2',
|
|
99
|
+
BkgToggleSwitchOffPressed: '#B1B1B1',
|
|
100
|
+
BkgToggleSwitchOffDisabled: '#FFFFFF',
|
|
101
|
+
BkgToggleSwitchOn: '#D83B01',
|
|
102
|
+
BkgToggleSwitchOnHover: '#EA6115',
|
|
103
|
+
BkgToggleSwitchOnPressed: '#A22C01',
|
|
104
|
+
BkgToggleSwitchOnDisabled: '#D2D2D2',
|
|
105
|
+
StrokeToggleSwitchOff: '#505050',
|
|
106
|
+
StrokeToggleSwitchOffHover: '#505050',
|
|
107
|
+
StrokeToggleSwitchOffPressed: '#505050',
|
|
108
|
+
StrokeToggleSwitchOffDisabled: '#D2D2D2',
|
|
109
|
+
StrokeToggleSwitchOn: '#D83B01',
|
|
110
|
+
StrokeToggleSwitchOnHover: '#EA6115',
|
|
111
|
+
StrokeToggleSwitchOnPressed: '#A22C01',
|
|
112
|
+
StrokeToggleSwitchOnDisabled: '#D2D2D2',
|
|
113
|
+
SliderPrimary: '#444444',
|
|
114
|
+
SliderPrimaryHover: '#D2D2D2',
|
|
115
|
+
SliderPrimaryPressed: '#262626',
|
|
116
|
+
SliderPrimaryDisabled: '#969696',
|
|
117
|
+
SliderSecondary: '#D2D2D2',
|
|
118
|
+
SliderBuffer: '#262626',
|
|
119
|
+
SliderKeyboard: '#444444',
|
|
120
|
+
SliderToolTipBorder: '#C6C6C6',
|
|
121
|
+
SliderToolTipLabel: '#262626',
|
|
122
|
+
SliderToolTipBkg: '#FFFFFF',
|
|
123
|
+
AccentDark: '#C6C6C6',
|
|
124
|
+
AccentLight: '#E6E6E6',
|
|
125
|
+
AccentEmphasis: '#D83B01',
|
|
126
|
+
AccentOutline: '#000000',
|
|
127
|
+
BkgAccentTint: '#D2E0F4',
|
|
128
|
+
TextAccentTint: '#242424',
|
|
129
|
+
TextEmphasis2: '#D83B01',
|
|
130
|
+
BkgCtlSubtleSelected: '#F3F3F3',
|
|
131
|
+
TextCtlSubtleSelected: '#262626',
|
|
132
|
+
BkgCtlEmphasisFocus: '#F3F3F3',
|
|
133
|
+
BkgCtlSubtleFocus: '#F3F3F3',
|
|
134
|
+
BkgCtlSubtleHoverDisabled: '#F3F3F3',
|
|
135
|
+
BkgCtlSubtleSelectedDisabled: '#F3F3F3',
|
|
136
|
+
BkgHeader: '#E6E6E6',
|
|
137
|
+
TextHeader: '#262626',
|
|
138
|
+
TextTextBoxPlaceholder: '#666666',
|
|
139
139
|
};
|
|
140
140
|
export function fallbackGetPalette(pal) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
141
|
+
return pal === 'TaskPane'
|
|
142
|
+
? {
|
|
143
|
+
...whiteColorsPalette,
|
|
144
|
+
Bkg: 'antiquewhite',
|
|
145
|
+
}
|
|
146
|
+
: whiteColorsPalette;
|
|
147
147
|
}
|
|
148
148
|
export const fallbackOfficeModule = {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
149
|
+
getPalette: fallbackGetPalette,
|
|
150
|
+
getConstants() {
|
|
151
|
+
return {
|
|
152
|
+
ramps: {
|
|
153
|
+
App: ['#F8F8F8', '#EFF6FC', '#BBDAF3', '#55A4E2', '#359EDD', '#0078d7', '#283E4A', '#030C13'],
|
|
154
|
+
FluentGrays: ['#FAF9F8', '#797775', '#11100F'],
|
|
155
|
+
ClassicGrays: ['#FFFFFF', '#737373', '#000000'],
|
|
156
|
+
Sepias: ['#ECE6DE'],
|
|
157
|
+
},
|
|
158
|
+
typography: {},
|
|
159
|
+
fluentTypography: {},
|
|
160
|
+
rampNames: {
|
|
161
|
+
App: ['FakeApp1', 'App2', 'App3', 'App4', 'App5', 'App6', 'App7', 'App8'],
|
|
162
|
+
FluentGrays: ['FakeGray1', 'Gray2', 'Gray3'],
|
|
163
|
+
ClassicGrays: ['FakeGray4', 'Gray5', 'Gray6'],
|
|
164
|
+
Sepias: ['FakeSepia'],
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
},
|
|
168
168
|
};
|
|
169
|
-
//# sourceMappingURL=fallbackOfficeModule.js.map
|
|
169
|
+
//# sourceMappingURL=fallbackOfficeModule.js.map
|
|
@@ -4,4 +4,4 @@ import type { OfficeThemingModule } from './officeThemingModule';
|
|
|
4
4
|
* implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
|
|
5
5
|
*/
|
|
6
6
|
export declare function getThemingModule(): [OfficeThemingModule, NativeEventEmitter | undefined];
|
|
7
|
-
//# sourceMappingURL=getThemingModule.d.ts.map
|
|
7
|
+
//# sourceMappingURL=getThemingModule.d.ts.map
|
|
@@ -3,6 +3,6 @@ import { fallbackOfficeModule } from './fallbackOfficeModule';
|
|
|
3
3
|
* implementations for react-native-web, where the native module will not exist. In this case just use the full fallback implementation
|
|
4
4
|
*/
|
|
5
5
|
export function getThemingModule() {
|
|
6
|
-
|
|
6
|
+
return [fallbackOfficeModule, undefined];
|
|
7
7
|
}
|
|
8
|
-
//# sourceMappingURL=getThemingModule.js.map
|
|
8
|
+
//# sourceMappingURL=getThemingModule.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { NativeEventEmitter } from 'react-native';
|
|
2
2
|
import type { OfficeThemingModule } from './officeThemingModule';
|
|
3
3
|
export declare function getThemingModule(): [OfficeThemingModule, NativeEventEmitter | undefined];
|
|
4
|
-
//# sourceMappingURL=getThemingModule.native.d.ts.map
|
|
4
|
+
//# sourceMappingURL=getThemingModule.native.d.ts.map
|
|
@@ -6,41 +6,43 @@ import { setCurrentHostThemeSetting } from './hostThemeSetting';
|
|
|
6
6
|
* react-native only polyfills navigator with { product: 'ReactNative', geolocation: NativeModules.Geolocation }
|
|
7
7
|
*/
|
|
8
8
|
function disableGetPalette() {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const disabled = __DEV__ && typeof globalThis.navigator !== 'undefined' && globalThis.navigator.userAgent !== undefined;
|
|
10
|
+
disabled && console.warn(console.warn('Web Debugging forces Theming Native Module to fallback to fake color values.'));
|
|
11
|
+
return disabled;
|
|
12
12
|
}
|
|
13
13
|
function themeGetConstants() {
|
|
14
|
-
|
|
14
|
+
return themingModuleConstants;
|
|
15
15
|
}
|
|
16
16
|
let themingModule = undefined;
|
|
17
17
|
let themingModuleConstants = undefined;
|
|
18
18
|
let themingModuleEmitter = undefined;
|
|
19
19
|
export function getThemingModule() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
20
|
+
if (!themingModule) {
|
|
21
|
+
const module = TurboModuleRegistry.get('Theming');
|
|
22
|
+
// if the native module exists return the module + an emitter for it
|
|
23
|
+
if (module) {
|
|
24
|
+
if (!isInstantiated) {
|
|
25
|
+
// We need to store the host theme so that when themes are created
|
|
26
|
+
// they can use this information.
|
|
27
|
+
setCurrentHostThemeSetting(module.getConstants().initialHostThemeSetting);
|
|
28
|
+
isInstantiated = true;
|
|
29
|
+
}
|
|
30
|
+
// Cache the result of getConstants to avoid continuous Native->JS marshalling
|
|
31
|
+
themingModuleConstants = module.getConstants();
|
|
32
|
+
// mock getPalette if it should be disabled
|
|
33
|
+
if (disableGetPalette()) {
|
|
34
|
+
themingModule = { ...module, getPalette: fallbackGetPalette, getConstants: themeGetConstants };
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
themingModule = { ...module, getPalette: module.getPalette, getConstants: themeGetConstants };
|
|
38
|
+
}
|
|
39
|
+
themingModuleEmitter = new NativeEventEmitter(module);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
themingModule = fallbackOfficeModule;
|
|
43
|
+
}
|
|
41
44
|
}
|
|
42
|
-
|
|
43
|
-
return [themingModule, themingModuleEmitter];
|
|
45
|
+
return [themingModule, themingModuleEmitter];
|
|
44
46
|
}
|
|
45
47
|
let isInstantiated = false;
|
|
46
|
-
//# sourceMappingURL=getThemingModule.native.js.map
|
|
48
|
+
//# sourceMappingURL=getThemingModule.native.js.map
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
// entire lifetime of the instance.
|
|
10
10
|
let currentHostThemeSetting = '';
|
|
11
11
|
export const getCurrentHostThemeSetting = () => {
|
|
12
|
-
|
|
12
|
+
return currentHostThemeSetting;
|
|
13
13
|
};
|
|
14
14
|
export const setCurrentHostThemeSetting = (newHostThemeSetting) => {
|
|
15
|
-
|
|
15
|
+
currentHostThemeSetting = newHostThemeSetting;
|
|
16
16
|
};
|
|
17
|
-
//# sourceMappingURL=hostThemeSetting.js.map
|
|
17
|
+
//# sourceMappingURL=hostThemeSetting.js.map
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
export { fallbackOfficeModule, fallbackGetPalette } from './fallbackOfficeModule';
|
|
2
2
|
export { getThemingModule } from './getThemingModule';
|
|
3
|
-
export type {
|
|
4
|
-
|
|
5
|
-
PlatformDefaultsChangedCallback,
|
|
6
|
-
CxxException,
|
|
7
|
-
NativeColorRamps,
|
|
8
|
-
NativeColorNames,
|
|
9
|
-
OfficeThemingModule,
|
|
10
|
-
IEventEmitter,
|
|
11
|
-
} from './officeThemingModule';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
3
|
+
export type { PlatformDefaultsChangedArgs, PlatformDefaultsChangedCallback, CxxException, NativeColorRamps, NativeColorNames, OfficeThemingModule, IEventEmitter, } from './officeThemingModule';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,37 +2,37 @@ import type { NativeModule, ColorValue } from 'react-native';
|
|
|
2
2
|
import type { OfficePalette, Typography } from '@fluentui-react-native/theme-types';
|
|
3
3
|
type ObjectBase = {};
|
|
4
4
|
export type PlatformDefaultsChangedArgs = {
|
|
5
|
-
|
|
5
|
+
hostThemeSetting: string;
|
|
6
6
|
};
|
|
7
7
|
export type PlatformDefaultsChangedCallback = (args?: PlatformDefaultsChangedArgs) => void;
|
|
8
8
|
export interface CxxException {
|
|
9
|
-
|
|
9
|
+
message: string;
|
|
10
10
|
}
|
|
11
11
|
export interface NativeColorRamps {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
FluentGrays: ColorValue[];
|
|
13
|
+
ClassicGrays: ColorValue[];
|
|
14
|
+
App: ColorValue[];
|
|
15
|
+
Sepias: ColorValue[];
|
|
16
|
+
[key: string]: ColorValue[];
|
|
17
17
|
}
|
|
18
18
|
export interface NativeColorNames {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
FluentGrays: string[];
|
|
20
|
+
ClassicGrays: string[];
|
|
21
|
+
App: string[];
|
|
22
|
+
Sepias: string[];
|
|
23
23
|
}
|
|
24
24
|
export interface OfficeThemingModule extends NativeModule {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
getPalette(palette?: string): OfficePalette | CxxException;
|
|
26
|
+
getConstants(): {
|
|
27
|
+
typography: ObjectBase;
|
|
28
|
+
fluentTypography: Typography;
|
|
29
|
+
ramps: NativeColorRamps;
|
|
30
|
+
rampNames: NativeColorNames;
|
|
31
|
+
initialHostThemeSetting?: string;
|
|
32
|
+
};
|
|
33
33
|
}
|
|
34
34
|
export interface IEventEmitter {
|
|
35
|
-
|
|
35
|
+
addListener: (event: string, PlatformDefaultsChangedCallback: any) => void;
|
|
36
36
|
}
|
|
37
37
|
export {};
|
|
38
|
-
//# sourceMappingURL=officeThemingModule.d.ts.map
|
|
38
|
+
//# sourceMappingURL=officeThemingModule.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=officeThemingModule.js.map
|
|
2
|
+
//# sourceMappingURL=officeThemingModule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=win32-theme.test.d.ts.map
|
|
2
|
+
//# sourceMappingURL=win32-theme.test.d.ts.map
|