@fluentui/react-migration-v8-v9 9.2.1 → 9.2.2
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/.swcrc +30 -0
- package/CHANGELOG.json +52 -1
- package/CHANGELOG.md +17 -2
- package/lib/components/Button/ActionButtonShim.js.map +1 -1
- package/lib/components/Button/ButtonShim.js +4 -8
- package/lib/components/Button/ButtonShim.js.map +1 -1
- package/lib/components/Button/CommandButtonShim.js +1 -2
- package/lib/components/Button/CommandButtonShim.js.map +1 -1
- package/lib/components/Button/CompoundButtonShim.js +2 -2
- package/lib/components/Button/CompoundButtonShim.js.map +1 -1
- package/lib/components/Button/DefaultButtonShim.js.map +1 -1
- package/lib/components/Button/MenuButtonShim.js +4 -10
- package/lib/components/Button/MenuButtonShim.js.map +1 -1
- package/lib/components/Button/PrimaryButtonShim.js.map +1 -1
- package/lib/components/Button/ToggleButtonShim.js.map +1 -1
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Button/shimButtonProps.js +3 -5
- package/lib/components/Button/shimButtonProps.js.map +1 -1
- package/lib/components/Menu/MenuShim.js +12 -23
- package/lib/components/Menu/MenuShim.js.map +1 -1
- package/lib/components/Menu/index.js.map +1 -1
- package/lib/components/Menu/shimMenuProps.js +3 -5
- package/lib/components/Menu/shimMenuProps.js.map +1 -1
- package/lib/components/Stack/StackItemShim.js.map +1 -1
- package/lib/components/Stack/StackShim.js.map +1 -1
- package/lib/components/Stack/index.js.map +1 -1
- package/lib/components/Stack/stackUtils.js.map +1 -1
- package/lib/components/Theme/index.js.map +1 -1
- package/lib/components/Theme/themeDuplicates.js +1 -2
- package/lib/components/Theme/themeDuplicates.js.map +1 -1
- package/lib/components/Theme/v8ThemeShim.js +0 -12
- package/lib/components/Theme/v8ThemeShim.js.map +1 -1
- package/lib/components/Theme/v9BrandVariantsShim.js.map +1 -1
- package/lib/components/Theme/v9ThemeShim.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Button/ActionButtonShim.js +21 -20
- package/lib-commonjs/components/Button/ActionButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/ButtonShim.js +25 -25
- package/lib-commonjs/components/Button/ButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/CommandButtonShim.js +9 -12
- package/lib-commonjs/components/Button/CommandButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/CompoundButtonShim.js +24 -23
- package/lib-commonjs/components/Button/CompoundButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/DefaultButtonShim.js +14 -13
- package/lib-commonjs/components/Button/DefaultButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/MenuButtonShim.js +24 -27
- package/lib-commonjs/components/Button/MenuButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/PrimaryButtonShim.js +15 -14
- package/lib-commonjs/components/Button/PrimaryButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/ToggleButtonShim.js +24 -23
- package/lib-commonjs/components/Button/ToggleButtonShim.js.map +1 -1
- package/lib-commonjs/components/Button/index.js +13 -12
- package/lib-commonjs/components/Button/index.js.map +1 -1
- package/lib-commonjs/components/Button/shimButtonProps.js +33 -28
- package/lib-commonjs/components/Button/shimButtonProps.js.map +1 -1
- package/lib-commonjs/components/Menu/MenuShim.js +42 -52
- package/lib-commonjs/components/Menu/MenuShim.js.map +1 -1
- package/lib-commonjs/components/Menu/index.js +6 -5
- package/lib-commonjs/components/Menu/index.js.map +1 -1
- package/lib-commonjs/components/Menu/shimMenuProps.js +44 -38
- package/lib-commonjs/components/Menu/shimMenuProps.js.map +1 -1
- package/lib-commonjs/components/Stack/StackItemShim.js +195 -157
- package/lib-commonjs/components/Stack/StackItemShim.js.map +1 -1
- package/lib-commonjs/components/Stack/StackShim.js +273 -230
- package/lib-commonjs/components/Stack/StackShim.js.map +1 -1
- package/lib-commonjs/components/Stack/index.js +6 -5
- package/lib-commonjs/components/Stack/index.js.map +1 -1
- package/lib-commonjs/components/Stack/stackUtils.js +145 -151
- package/lib-commonjs/components/Stack/stackUtils.js.map +1 -1
- package/lib-commonjs/components/Theme/index.js +8 -7
- package/lib-commonjs/components/Theme/index.js.map +1 -1
- package/lib-commonjs/components/Theme/themeDuplicates.js +810 -786
- package/lib-commonjs/components/Theme/themeDuplicates.js.map +1 -1
- package/lib-commonjs/components/Theme/v8ThemeShim.js +285 -307
- package/lib-commonjs/components/Theme/v8ThemeShim.js.map +1 -1
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.js +56 -61
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.js.map +1 -1
- package/lib-commonjs/components/Theme/v9ThemeShim.js +183 -188
- package/lib-commonjs/components/Theme/v9ThemeShim.js.map +1 -1
- package/lib-commonjs/index.js +48 -200
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +11 -10
|
@@ -1,329 +1,307 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "createV8Theme", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>createV8Theme
|
|
5
8
|
});
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const themeDuplicates_1 = /*#__PURE__*/require("./themeDuplicates");
|
|
9
|
+
const _react = require("@fluentui/react");
|
|
10
|
+
const _fluent2Theme = require("@fluentui/fluent2-theme");
|
|
11
|
+
const _themeDuplicates = require("./themeDuplicates");
|
|
10
12
|
const mappedNeutrals = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
black: _themeDuplicates.black,
|
|
14
|
+
blackTranslucent40: _themeDuplicates.blackAlpha[40],
|
|
15
|
+
neutralDark: _themeDuplicates.grey[8],
|
|
16
|
+
neutralPrimary: _themeDuplicates.grey[14],
|
|
17
|
+
neutralPrimaryAlt: _themeDuplicates.grey[22],
|
|
18
|
+
neutralSecondary: _themeDuplicates.grey[36],
|
|
19
|
+
neutralSecondaryAlt: _themeDuplicates.grey[52],
|
|
20
|
+
neutralTertiary: _themeDuplicates.grey[62],
|
|
21
|
+
neutralTertiaryAlt: _themeDuplicates.grey[78],
|
|
22
|
+
neutralQuaternary: _themeDuplicates.grey[82],
|
|
23
|
+
neutralQuaternaryAlt: _themeDuplicates.grey[88],
|
|
24
|
+
neutralLight: _themeDuplicates.grey[92],
|
|
25
|
+
neutralLighter: _themeDuplicates.grey[96],
|
|
26
|
+
neutralLighterAlt: _themeDuplicates.grey[98],
|
|
27
|
+
white: _themeDuplicates.white,
|
|
28
|
+
whiteTranslucent40: _themeDuplicates.whiteAlpha[40]
|
|
27
29
|
};
|
|
28
30
|
const invertedMappedNeutrals = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
black: _themeDuplicates.white,
|
|
32
|
+
blackTranslucent40: _themeDuplicates.whiteAlpha[40],
|
|
33
|
+
neutralDark: _themeDuplicates.grey[98],
|
|
34
|
+
neutralPrimary: _themeDuplicates.grey[96],
|
|
35
|
+
neutralPrimaryAlt: _themeDuplicates.grey[84],
|
|
36
|
+
neutralSecondary: _themeDuplicates.grey[82],
|
|
37
|
+
neutralSecondaryAlt: _themeDuplicates.grey[74],
|
|
38
|
+
neutralTertiary: _themeDuplicates.grey[44],
|
|
39
|
+
neutralTertiaryAlt: _themeDuplicates.grey[26],
|
|
40
|
+
neutralQuaternary: _themeDuplicates.grey[24],
|
|
41
|
+
neutralQuaternaryAlt: _themeDuplicates.grey[18],
|
|
42
|
+
neutralLight: _themeDuplicates.grey[16],
|
|
43
|
+
neutralLighter: _themeDuplicates.grey[14],
|
|
44
|
+
neutralLighterAlt: _themeDuplicates.grey[10],
|
|
45
|
+
white: _themeDuplicates.black,
|
|
46
|
+
whiteTranslucent40: _themeDuplicates.blackAlpha[40]
|
|
45
47
|
};
|
|
46
48
|
const mappedSharedColors = {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
49
|
+
yellowDark: _themeDuplicates.sharedColors.marigold.shade10,
|
|
50
|
+
yellow: _themeDuplicates.sharedColors.yellow.primary,
|
|
51
|
+
yellowLight: _themeDuplicates.sharedColors.yellow.tint40,
|
|
52
|
+
orange: _themeDuplicates.sharedColors.orange.primary,
|
|
53
|
+
orangeLight: _themeDuplicates.sharedColors.orange.tint20,
|
|
54
|
+
orangeLighter: _themeDuplicates.sharedColors.orange.tint40,
|
|
55
|
+
redDark: _themeDuplicates.sharedColors.darkRed.primary,
|
|
56
|
+
red: _themeDuplicates.sharedColors.red.primary,
|
|
57
|
+
magentaDark: _themeDuplicates.sharedColors.magenta.shade30,
|
|
58
|
+
magenta: _themeDuplicates.sharedColors.magenta.primary,
|
|
59
|
+
magentaLight: _themeDuplicates.sharedColors.magenta.tint30,
|
|
60
|
+
purpleDark: _themeDuplicates.sharedColors.darkPurple.primary,
|
|
61
|
+
purple: _themeDuplicates.sharedColors.purple.primary,
|
|
62
|
+
purpleLight: _themeDuplicates.sharedColors.purple.tint40,
|
|
63
|
+
blueDark: _themeDuplicates.sharedColors.darkBlue.primary,
|
|
64
|
+
blueMid: _themeDuplicates.sharedColors.royalBlue.primary,
|
|
65
|
+
blue: _themeDuplicates.sharedColors.blue.primary,
|
|
66
|
+
blueLight: _themeDuplicates.sharedColors.lightBlue.primary,
|
|
67
|
+
tealDark: _themeDuplicates.sharedColors.darkTeal.primary,
|
|
68
|
+
teal: _themeDuplicates.sharedColors.teal.primary,
|
|
69
|
+
tealLight: _themeDuplicates.sharedColors.lightTeal.primary,
|
|
70
|
+
greenDark: _themeDuplicates.sharedColors.darkGreen.primary,
|
|
71
|
+
green: _themeDuplicates.sharedColors.green.primary,
|
|
72
|
+
greenLight: _themeDuplicates.sharedColors.lightGreen.primary
|
|
71
73
|
};
|
|
72
74
|
/**
|
|
73
75
|
* Creates a v8 palette given a brand ramp
|
|
74
|
-
*/
|
|
75
|
-
const
|
|
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
|
-
};
|
|
76
|
+
*/ const mapPalette = (brandColors, inverted)=>{
|
|
77
|
+
const neutrals = inverted ? invertedMappedNeutrals : mappedNeutrals;
|
|
78
|
+
const brands = inverted ? {
|
|
79
|
+
themeDarker: brandColors[110],
|
|
80
|
+
themeDark: brandColors[100],
|
|
81
|
+
themeDarkAlt: brandColors[100],
|
|
82
|
+
themePrimary: brandColors[90],
|
|
83
|
+
themeSecondary: brandColors[90],
|
|
84
|
+
themeTertiary: brandColors[60],
|
|
85
|
+
themeLight: brandColors[50],
|
|
86
|
+
themeLighter: brandColors[40],
|
|
87
|
+
themeLighterAlt: brandColors[30]
|
|
88
|
+
} : {
|
|
89
|
+
themeDarker: brandColors[40],
|
|
90
|
+
themeDark: brandColors[60],
|
|
91
|
+
themeDarkAlt: brandColors[70],
|
|
92
|
+
themePrimary: brandColors[80],
|
|
93
|
+
themeSecondary: brandColors[90],
|
|
94
|
+
themeTertiary: brandColors[120],
|
|
95
|
+
themeLight: brandColors[140],
|
|
96
|
+
themeLighter: brandColors[150],
|
|
97
|
+
themeLighterAlt: brandColors[160]
|
|
98
|
+
};
|
|
99
|
+
return {
|
|
100
|
+
..._react.DefaultPalette,
|
|
101
|
+
...neutrals,
|
|
102
|
+
accent: brands.themePrimary,
|
|
103
|
+
...mappedSharedColors,
|
|
104
|
+
...brands
|
|
105
|
+
};
|
|
105
106
|
};
|
|
106
107
|
/**
|
|
107
108
|
* Returns v9 theme colors overlaid on a base set of v8 semantic colors
|
|
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
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
// severeWarningBackground,
|
|
204
|
-
// severeWarningIcon,
|
|
205
|
-
// smallInputBorder,
|
|
206
|
-
// successBackground,
|
|
207
|
-
// successIcon,
|
|
208
|
-
// successText: ,
|
|
209
|
-
// variantBorder,
|
|
210
|
-
// variantBorderHovered,
|
|
211
|
-
// warningBackground,
|
|
212
|
-
// warningHighlight,
|
|
213
|
-
// warningIcon,
|
|
214
|
-
// warningText: ,
|
|
215
|
-
};
|
|
109
|
+
*/ const mapSemanticColors = (baseColors, theme)=>{
|
|
110
|
+
return {
|
|
111
|
+
...baseColors,
|
|
112
|
+
accentButtonBackground: theme.colorBrandBackground,
|
|
113
|
+
accentButtonText: theme.colorNeutralForegroundOnBrand,
|
|
114
|
+
actionLink: theme.colorNeutralForeground1,
|
|
115
|
+
actionLinkHovered: theme.colorNeutralForeground1Hover,
|
|
116
|
+
// blockingBackground,
|
|
117
|
+
// blockingIcon,
|
|
118
|
+
bodyBackground: theme.colorNeutralBackground1,
|
|
119
|
+
bodyBackgroundChecked: theme.colorNeutralBackground1Selected,
|
|
120
|
+
bodyBackgroundHovered: theme.colorNeutralBackground1Hover,
|
|
121
|
+
bodyDivider: theme.colorNeutralStroke2,
|
|
122
|
+
bodyFrameBackground: theme.colorNeutralBackground1,
|
|
123
|
+
bodyFrameDivider: theme.colorNeutralStroke2,
|
|
124
|
+
bodyStandoutBackground: theme.colorNeutralBackground2,
|
|
125
|
+
bodySubtext: theme.colorNeutralForeground2,
|
|
126
|
+
bodyText: theme.colorNeutralForeground1,
|
|
127
|
+
bodyTextChecked: theme.colorNeutralForeground1Selected,
|
|
128
|
+
buttonBackground: theme.colorNeutralBackground1,
|
|
129
|
+
buttonBackgroundChecked: theme.colorNeutralBackground1Selected,
|
|
130
|
+
buttonBackgroundCheckedHovered: theme.colorNeutralBackground1Hover,
|
|
131
|
+
buttonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,
|
|
132
|
+
buttonBackgroundHovered: theme.colorNeutralBackground1Hover,
|
|
133
|
+
buttonBackgroundPressed: theme.colorNeutralBackground1Pressed,
|
|
134
|
+
buttonBorder: theme.colorNeutralStroke1,
|
|
135
|
+
buttonBorderDisabled: theme.colorNeutralStrokeDisabled,
|
|
136
|
+
buttonText: theme.colorNeutralForeground1,
|
|
137
|
+
buttonTextChecked: theme.colorNeutralForeground1,
|
|
138
|
+
buttonTextCheckedHovered: theme.colorNeutralForeground1,
|
|
139
|
+
buttonTextDisabled: theme.colorNeutralForegroundDisabled,
|
|
140
|
+
buttonTextHovered: theme.colorNeutralForeground1,
|
|
141
|
+
buttonTextPressed: theme.colorNeutralForeground1,
|
|
142
|
+
cardShadow: theme.shadow4,
|
|
143
|
+
cardShadowHovered: theme.shadow8,
|
|
144
|
+
cardStandoutBackground: theme.colorNeutralBackground1,
|
|
145
|
+
defaultStateBackground: theme.colorNeutralBackground2,
|
|
146
|
+
disabledBackground: theme.colorNeutralBackgroundDisabled,
|
|
147
|
+
disabledBodySubtext: theme.colorNeutralForegroundDisabled,
|
|
148
|
+
disabledBodyText: theme.colorNeutralForegroundDisabled,
|
|
149
|
+
disabledBorder: theme.colorNeutralStrokeDisabled,
|
|
150
|
+
disabledSubtext: theme.colorNeutralForegroundDisabled,
|
|
151
|
+
disabledText: theme.colorNeutralForegroundDisabled,
|
|
152
|
+
// errorBackground,
|
|
153
|
+
// errorIcon,
|
|
154
|
+
// errorText: ,
|
|
155
|
+
focusBorder: theme.colorStrokeFocus2,
|
|
156
|
+
// infoBackground,
|
|
157
|
+
// infoIcon,
|
|
158
|
+
inputBackground: theme.colorNeutralBackground1,
|
|
159
|
+
inputBackgroundChecked: theme.colorBrandBackground,
|
|
160
|
+
inputBackgroundCheckedHovered: theme.colorBrandBackgroundHover,
|
|
161
|
+
inputBorder: theme.colorNeutralStrokeAccessible,
|
|
162
|
+
inputBorderHovered: theme.colorNeutralStrokeAccessibleHover,
|
|
163
|
+
inputFocusBorderAlt: theme.colorBrandStroke1,
|
|
164
|
+
inputForegroundChecked: theme.colorNeutralForegroundOnBrand,
|
|
165
|
+
inputIcon: theme.colorNeutralForeground3,
|
|
166
|
+
inputIconDisabled: theme.colorNeutralForegroundDisabled,
|
|
167
|
+
inputIconHovered: theme.colorNeutralForeground3,
|
|
168
|
+
inputPlaceholderBackgroundChecked: theme.colorBrandBackgroundInvertedSelected,
|
|
169
|
+
inputPlaceholderText: theme.colorNeutralForeground4,
|
|
170
|
+
inputText: theme.colorNeutralForeground1,
|
|
171
|
+
inputTextHovered: theme.colorNeutralForeground1Hover,
|
|
172
|
+
link: theme.colorBrandForegroundLink,
|
|
173
|
+
linkHovered: theme.colorBrandForegroundLinkHover,
|
|
174
|
+
listBackground: theme.colorNeutralBackground1,
|
|
175
|
+
listHeaderBackgroundHovered: theme.colorNeutralBackground1Hover,
|
|
176
|
+
listHeaderBackgroundPressed: theme.colorNeutralBackground1Pressed,
|
|
177
|
+
listItemBackgroundChecked: theme.colorNeutralBackground1Selected,
|
|
178
|
+
listItemBackgroundCheckedHovered: theme.colorNeutralBackground1Selected,
|
|
179
|
+
listItemBackgroundHovered: theme.colorNeutralBackground1Hover,
|
|
180
|
+
listText: theme.colorNeutralForeground1,
|
|
181
|
+
listTextColor: theme.colorNeutralForeground1,
|
|
182
|
+
menuBackground: theme.colorNeutralBackground1,
|
|
183
|
+
menuDivider: theme.colorNeutralStroke2,
|
|
184
|
+
menuHeader: theme.colorNeutralForeground3,
|
|
185
|
+
menuIcon: theme.colorNeutralForeground1,
|
|
186
|
+
menuItemBackgroundChecked: theme.colorNeutralBackground1,
|
|
187
|
+
menuItemBackgroundHovered: theme.colorNeutralBackground1Hover,
|
|
188
|
+
menuItemBackgroundPressed: theme.colorNeutralBackground1Hover,
|
|
189
|
+
menuItemText: theme.colorNeutralForeground1,
|
|
190
|
+
menuItemTextHovered: theme.colorNeutralForeground1Hover,
|
|
191
|
+
messageLink: theme.colorBrandForegroundLink,
|
|
192
|
+
messageLinkHovered: theme.colorBrandForegroundLinkHover,
|
|
193
|
+
messageText: theme.colorNeutralForeground1,
|
|
194
|
+
primaryButtonBackground: theme.colorBrandBackground,
|
|
195
|
+
primaryButtonBackgroundDisabled: theme.colorNeutralBackgroundDisabled,
|
|
196
|
+
primaryButtonBackgroundHovered: theme.colorBrandBackgroundHover,
|
|
197
|
+
primaryButtonBackgroundPressed: theme.colorBrandBackgroundPressed,
|
|
198
|
+
primaryButtonBorder: theme.colorTransparentStroke,
|
|
199
|
+
primaryButtonText: theme.colorNeutralForegroundOnBrand,
|
|
200
|
+
primaryButtonTextDisabled: theme.colorNeutralForegroundDisabled,
|
|
201
|
+
primaryButtonTextHovered: theme.colorNeutralForegroundOnBrand,
|
|
202
|
+
primaryButtonTextPressed: theme.colorNeutralForegroundOnBrand
|
|
203
|
+
};
|
|
216
204
|
};
|
|
217
205
|
/**
|
|
218
206
|
* Overlays v9 fonts on a set of base v8 fonts.
|
|
219
|
-
*/
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
};
|
|
207
|
+
*/ const mapFonts = (baseFonts, theme)=>{
|
|
208
|
+
return {
|
|
209
|
+
...baseFonts,
|
|
210
|
+
tiny: {
|
|
211
|
+
...baseFonts.tiny,
|
|
212
|
+
fontFamily: theme.fontFamilyBase,
|
|
213
|
+
fontSize: theme.fontSizeBase100,
|
|
214
|
+
fontWeight: theme.fontWeightRegular
|
|
215
|
+
},
|
|
216
|
+
xSmall: {
|
|
217
|
+
...baseFonts.xSmall,
|
|
218
|
+
fontFamily: theme.fontFamilyBase,
|
|
219
|
+
fontSize: theme.fontSizeBase100,
|
|
220
|
+
fontWeight: theme.fontWeightRegular
|
|
221
|
+
},
|
|
222
|
+
small: {
|
|
223
|
+
...baseFonts.small,
|
|
224
|
+
fontFamily: theme.fontFamilyBase,
|
|
225
|
+
fontSize: theme.fontSizeBase200,
|
|
226
|
+
fontWeight: theme.fontWeightRegular
|
|
227
|
+
},
|
|
228
|
+
smallPlus: {
|
|
229
|
+
...baseFonts.smallPlus,
|
|
230
|
+
fontFamily: theme.fontFamilyBase,
|
|
231
|
+
fontSize: theme.fontSizeBase200,
|
|
232
|
+
fontWeight: theme.fontWeightRegular
|
|
233
|
+
},
|
|
234
|
+
medium: {
|
|
235
|
+
...baseFonts.medium,
|
|
236
|
+
fontFamily: theme.fontFamilyBase,
|
|
237
|
+
fontSize: theme.fontSizeBase300,
|
|
238
|
+
fontWeight: theme.fontWeightRegular
|
|
239
|
+
},
|
|
240
|
+
mediumPlus: {
|
|
241
|
+
...baseFonts.mediumPlus,
|
|
242
|
+
fontFamily: theme.fontFamilyBase,
|
|
243
|
+
fontSize: theme.fontSizeBase400,
|
|
244
|
+
fontWeight: theme.fontWeightRegular
|
|
245
|
+
},
|
|
246
|
+
large: {
|
|
247
|
+
...baseFonts.large,
|
|
248
|
+
fontFamily: theme.fontFamilyBase,
|
|
249
|
+
fontSize: theme.fontSizeBase400,
|
|
250
|
+
fontWeight: theme.fontWeightRegular
|
|
251
|
+
},
|
|
252
|
+
xLarge: {
|
|
253
|
+
...baseFonts.xxLarge,
|
|
254
|
+
fontFamily: theme.fontFamilyBase,
|
|
255
|
+
fontSize: theme.fontSizeBase500,
|
|
256
|
+
fontWeight: theme.fontWeightSemibold
|
|
257
|
+
},
|
|
258
|
+
xxLarge: {
|
|
259
|
+
...baseFonts.xxLarge,
|
|
260
|
+
fontFamily: theme.fontFamilyBase,
|
|
261
|
+
fontSize: theme.fontSizeHero700,
|
|
262
|
+
fontWeight: theme.fontWeightSemibold
|
|
263
|
+
},
|
|
264
|
+
superLarge: {
|
|
265
|
+
...baseFonts.superLarge,
|
|
266
|
+
fontFamily: theme.fontFamilyBase,
|
|
267
|
+
fontSize: theme.fontSizeHero900,
|
|
268
|
+
fontWeight: theme.fontWeightSemibold
|
|
269
|
+
},
|
|
270
|
+
mega: {
|
|
271
|
+
...baseFonts.mega,
|
|
272
|
+
fontFamily: theme.fontFamilyBase,
|
|
273
|
+
fontSize: theme.fontSizeHero1000,
|
|
274
|
+
fontWeight: theme.fontWeightSemibold
|
|
275
|
+
}
|
|
276
|
+
};
|
|
290
277
|
};
|
|
291
278
|
/**
|
|
292
279
|
* Overlays v9 shadows and border radii on a base set of v8 effects.
|
|
293
|
-
*/
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
};
|
|
280
|
+
*/ const mapEffects = (baseEffects, theme)=>{
|
|
281
|
+
return {
|
|
282
|
+
...baseEffects,
|
|
283
|
+
elevation4: theme.shadow4,
|
|
284
|
+
elevation8: theme.shadow8,
|
|
285
|
+
elevation16: theme.shadow16,
|
|
286
|
+
elevation64: theme.shadow64,
|
|
287
|
+
roundedCorner2: theme.borderRadiusSmall,
|
|
288
|
+
roundedCorner4: theme.borderRadiusMedium,
|
|
289
|
+
roundedCorner6: theme.borderRadiusLarge
|
|
290
|
+
};
|
|
305
291
|
};
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
components: fluent2_theme_1.fluent2ComponentStyles,
|
|
322
|
-
semanticColors: mapSemanticColors(baseTheme.semanticColors, themeV9),
|
|
323
|
-
fonts: mapFonts(baseTheme.fonts, themeV9),
|
|
324
|
-
effects: mapEffects(baseTheme.effects, themeV9),
|
|
325
|
-
isInverted: isDarkTheme || (themeV8 === null || themeV8 === void 0 ? void 0 : themeV8.isInverted) === true
|
|
326
|
-
};
|
|
327
|
-
};
|
|
328
|
-
exports.createV8Theme = createV8Theme;
|
|
292
|
+
const createV8Theme = (brandColors, themeV9, isDarkTheme = false, themeV8)=>{
|
|
293
|
+
const baseTheme = themeV8 || (0, _react.createTheme)({
|
|
294
|
+
isInverted: isDarkTheme
|
|
295
|
+
});
|
|
296
|
+
return {
|
|
297
|
+
...baseTheme,
|
|
298
|
+
palette: mapPalette(brandColors, isDarkTheme),
|
|
299
|
+
components: _fluent2Theme.fluent2ComponentStyles,
|
|
300
|
+
semanticColors: mapSemanticColors(baseTheme.semanticColors, themeV9),
|
|
301
|
+
fonts: mapFonts(baseTheme.fonts, themeV9),
|
|
302
|
+
effects: mapEffects(baseTheme.effects, themeV9),
|
|
303
|
+
isInverted: isDarkTheme || (themeV8 === null || themeV8 === void 0 ? void 0 : themeV8.isInverted) === true
|
|
304
|
+
};
|
|
305
|
+
}; //# sourceMappingURL=v8ThemeShim.js.map
|
|
306
|
+
|
|
329
307
|
//# sourceMappingURL=v8ThemeShim.js.map
|