@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.
Files changed (82) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +52 -1
  3. package/CHANGELOG.md +17 -2
  4. package/lib/components/Button/ActionButtonShim.js.map +1 -1
  5. package/lib/components/Button/ButtonShim.js +4 -8
  6. package/lib/components/Button/ButtonShim.js.map +1 -1
  7. package/lib/components/Button/CommandButtonShim.js +1 -2
  8. package/lib/components/Button/CommandButtonShim.js.map +1 -1
  9. package/lib/components/Button/CompoundButtonShim.js +2 -2
  10. package/lib/components/Button/CompoundButtonShim.js.map +1 -1
  11. package/lib/components/Button/DefaultButtonShim.js.map +1 -1
  12. package/lib/components/Button/MenuButtonShim.js +4 -10
  13. package/lib/components/Button/MenuButtonShim.js.map +1 -1
  14. package/lib/components/Button/PrimaryButtonShim.js.map +1 -1
  15. package/lib/components/Button/ToggleButtonShim.js.map +1 -1
  16. package/lib/components/Button/index.js.map +1 -1
  17. package/lib/components/Button/shimButtonProps.js +3 -5
  18. package/lib/components/Button/shimButtonProps.js.map +1 -1
  19. package/lib/components/Menu/MenuShim.js +12 -23
  20. package/lib/components/Menu/MenuShim.js.map +1 -1
  21. package/lib/components/Menu/index.js.map +1 -1
  22. package/lib/components/Menu/shimMenuProps.js +3 -5
  23. package/lib/components/Menu/shimMenuProps.js.map +1 -1
  24. package/lib/components/Stack/StackItemShim.js.map +1 -1
  25. package/lib/components/Stack/StackShim.js.map +1 -1
  26. package/lib/components/Stack/index.js.map +1 -1
  27. package/lib/components/Stack/stackUtils.js.map +1 -1
  28. package/lib/components/Theme/index.js.map +1 -1
  29. package/lib/components/Theme/themeDuplicates.js +1 -2
  30. package/lib/components/Theme/themeDuplicates.js.map +1 -1
  31. package/lib/components/Theme/v8ThemeShim.js +0 -12
  32. package/lib/components/Theme/v8ThemeShim.js.map +1 -1
  33. package/lib/components/Theme/v9BrandVariantsShim.js.map +1 -1
  34. package/lib/components/Theme/v9ThemeShim.js.map +1 -1
  35. package/lib/index.js.map +1 -1
  36. package/lib-commonjs/components/Button/ActionButtonShim.js +21 -20
  37. package/lib-commonjs/components/Button/ActionButtonShim.js.map +1 -1
  38. package/lib-commonjs/components/Button/ButtonShim.js +25 -25
  39. package/lib-commonjs/components/Button/ButtonShim.js.map +1 -1
  40. package/lib-commonjs/components/Button/CommandButtonShim.js +9 -12
  41. package/lib-commonjs/components/Button/CommandButtonShim.js.map +1 -1
  42. package/lib-commonjs/components/Button/CompoundButtonShim.js +24 -23
  43. package/lib-commonjs/components/Button/CompoundButtonShim.js.map +1 -1
  44. package/lib-commonjs/components/Button/DefaultButtonShim.js +14 -13
  45. package/lib-commonjs/components/Button/DefaultButtonShim.js.map +1 -1
  46. package/lib-commonjs/components/Button/MenuButtonShim.js +24 -27
  47. package/lib-commonjs/components/Button/MenuButtonShim.js.map +1 -1
  48. package/lib-commonjs/components/Button/PrimaryButtonShim.js +15 -14
  49. package/lib-commonjs/components/Button/PrimaryButtonShim.js.map +1 -1
  50. package/lib-commonjs/components/Button/ToggleButtonShim.js +24 -23
  51. package/lib-commonjs/components/Button/ToggleButtonShim.js.map +1 -1
  52. package/lib-commonjs/components/Button/index.js +13 -12
  53. package/lib-commonjs/components/Button/index.js.map +1 -1
  54. package/lib-commonjs/components/Button/shimButtonProps.js +33 -28
  55. package/lib-commonjs/components/Button/shimButtonProps.js.map +1 -1
  56. package/lib-commonjs/components/Menu/MenuShim.js +42 -52
  57. package/lib-commonjs/components/Menu/MenuShim.js.map +1 -1
  58. package/lib-commonjs/components/Menu/index.js +6 -5
  59. package/lib-commonjs/components/Menu/index.js.map +1 -1
  60. package/lib-commonjs/components/Menu/shimMenuProps.js +44 -38
  61. package/lib-commonjs/components/Menu/shimMenuProps.js.map +1 -1
  62. package/lib-commonjs/components/Stack/StackItemShim.js +195 -157
  63. package/lib-commonjs/components/Stack/StackItemShim.js.map +1 -1
  64. package/lib-commonjs/components/Stack/StackShim.js +273 -230
  65. package/lib-commonjs/components/Stack/StackShim.js.map +1 -1
  66. package/lib-commonjs/components/Stack/index.js +6 -5
  67. package/lib-commonjs/components/Stack/index.js.map +1 -1
  68. package/lib-commonjs/components/Stack/stackUtils.js +145 -151
  69. package/lib-commonjs/components/Stack/stackUtils.js.map +1 -1
  70. package/lib-commonjs/components/Theme/index.js +8 -7
  71. package/lib-commonjs/components/Theme/index.js.map +1 -1
  72. package/lib-commonjs/components/Theme/themeDuplicates.js +810 -786
  73. package/lib-commonjs/components/Theme/themeDuplicates.js.map +1 -1
  74. package/lib-commonjs/components/Theme/v8ThemeShim.js +285 -307
  75. package/lib-commonjs/components/Theme/v8ThemeShim.js.map +1 -1
  76. package/lib-commonjs/components/Theme/v9BrandVariantsShim.js +56 -61
  77. package/lib-commonjs/components/Theme/v9BrandVariantsShim.js.map +1 -1
  78. package/lib-commonjs/components/Theme/v9ThemeShim.js +183 -188
  79. package/lib-commonjs/components/Theme/v9ThemeShim.js.map +1 -1
  80. package/lib-commonjs/index.js +48 -200
  81. package/lib-commonjs/index.js.map +1 -1
  82. package/package.json +11 -10
@@ -1,329 +1,307 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "createV8Theme", {
6
+ enumerable: true,
7
+ get: ()=>createV8Theme
5
8
  });
6
- exports.createV8Theme = void 0;
7
- const react_1 = /*#__PURE__*/require("@fluentui/react");
8
- const fluent2_theme_1 = /*#__PURE__*/require("@fluentui/fluent2-theme");
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
- black: themeDuplicates_1.black,
12
- blackTranslucent40: themeDuplicates_1.blackAlpha[40],
13
- neutralDark: themeDuplicates_1.grey[8],
14
- neutralPrimary: themeDuplicates_1.grey[14],
15
- neutralPrimaryAlt: themeDuplicates_1.grey[22],
16
- neutralSecondary: themeDuplicates_1.grey[36],
17
- neutralSecondaryAlt: themeDuplicates_1.grey[52],
18
- neutralTertiary: themeDuplicates_1.grey[62],
19
- neutralTertiaryAlt: themeDuplicates_1.grey[78],
20
- neutralQuaternary: themeDuplicates_1.grey[82],
21
- neutralQuaternaryAlt: themeDuplicates_1.grey[88],
22
- neutralLight: themeDuplicates_1.grey[92],
23
- neutralLighter: themeDuplicates_1.grey[96],
24
- neutralLighterAlt: themeDuplicates_1.grey[98],
25
- white: themeDuplicates_1.white,
26
- whiteTranslucent40: themeDuplicates_1.whiteAlpha[40]
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
- black: themeDuplicates_1.white,
30
- blackTranslucent40: themeDuplicates_1.whiteAlpha[40],
31
- neutralDark: themeDuplicates_1.grey[98],
32
- neutralPrimary: themeDuplicates_1.grey[96],
33
- neutralPrimaryAlt: themeDuplicates_1.grey[84],
34
- neutralSecondary: themeDuplicates_1.grey[82],
35
- neutralSecondaryAlt: themeDuplicates_1.grey[74],
36
- neutralTertiary: themeDuplicates_1.grey[44],
37
- neutralTertiaryAlt: themeDuplicates_1.grey[26],
38
- neutralQuaternary: themeDuplicates_1.grey[24],
39
- neutralQuaternaryAlt: themeDuplicates_1.grey[18],
40
- neutralLight: themeDuplicates_1.grey[16],
41
- neutralLighter: themeDuplicates_1.grey[14],
42
- neutralLighterAlt: themeDuplicates_1.grey[10],
43
- white: themeDuplicates_1.black,
44
- whiteTranslucent40: themeDuplicates_1.blackAlpha[40]
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
- yellowDark: themeDuplicates_1.sharedColors.marigold.shade10,
48
- yellow: themeDuplicates_1.sharedColors.yellow.primary,
49
- yellowLight: themeDuplicates_1.sharedColors.yellow.tint40,
50
- orange: themeDuplicates_1.sharedColors.orange.primary,
51
- orangeLight: themeDuplicates_1.sharedColors.orange.tint20,
52
- orangeLighter: themeDuplicates_1.sharedColors.orange.tint40,
53
- redDark: themeDuplicates_1.sharedColors.darkRed.primary,
54
- red: themeDuplicates_1.sharedColors.red.primary,
55
- magentaDark: themeDuplicates_1.sharedColors.magenta.shade30,
56
- magenta: themeDuplicates_1.sharedColors.magenta.primary,
57
- magentaLight: themeDuplicates_1.sharedColors.magenta.tint30,
58
- purpleDark: themeDuplicates_1.sharedColors.darkPurple.primary,
59
- purple: themeDuplicates_1.sharedColors.purple.primary,
60
- purpleLight: themeDuplicates_1.sharedColors.purple.tint40,
61
- blueDark: themeDuplicates_1.sharedColors.darkBlue.primary,
62
- blueMid: themeDuplicates_1.sharedColors.royalBlue.primary,
63
- blue: themeDuplicates_1.sharedColors.blue.primary,
64
- blueLight: themeDuplicates_1.sharedColors.lightBlue.primary,
65
- tealDark: themeDuplicates_1.sharedColors.darkTeal.primary,
66
- teal: themeDuplicates_1.sharedColors.teal.primary,
67
- tealLight: themeDuplicates_1.sharedColors.lightTeal.primary,
68
- greenDark: themeDuplicates_1.sharedColors.darkGreen.primary,
69
- green: themeDuplicates_1.sharedColors.green.primary,
70
- greenLight: themeDuplicates_1.sharedColors.lightGreen.primary
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 mapPalette = (brandColors, inverted) => {
76
- const neutrals = inverted ? invertedMappedNeutrals : mappedNeutrals;
77
- const brands = inverted ? {
78
- themeDarker: brandColors[110],
79
- themeDark: brandColors[100],
80
- themeDarkAlt: brandColors[100],
81
- themePrimary: brandColors[90],
82
- themeSecondary: brandColors[90],
83
- themeTertiary: brandColors[60],
84
- themeLight: brandColors[50],
85
- themeLighter: brandColors[40],
86
- themeLighterAlt: brandColors[30]
87
- } : {
88
- themeDarker: brandColors[40],
89
- themeDark: brandColors[60],
90
- themeDarkAlt: brandColors[70],
91
- themePrimary: brandColors[80],
92
- themeSecondary: brandColors[90],
93
- themeTertiary: brandColors[120],
94
- themeLight: brandColors[140],
95
- themeLighter: brandColors[150],
96
- themeLighterAlt: brandColors[160]
97
- };
98
- return {
99
- ...react_1.DefaultPalette,
100
- ...neutrals,
101
- accent: brands.themePrimary,
102
- ...mappedSharedColors,
103
- ...brands
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
- 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
- // 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
- const mapFonts = (baseFonts, theme) => {
221
- return {
222
- ...baseFonts,
223
- tiny: {
224
- ...baseFonts.tiny,
225
- fontFamily: theme.fontFamilyBase,
226
- fontSize: theme.fontSizeBase100,
227
- fontWeight: theme.fontWeightRegular
228
- },
229
- xSmall: {
230
- ...baseFonts.xSmall,
231
- fontFamily: theme.fontFamilyBase,
232
- fontSize: theme.fontSizeBase100,
233
- fontWeight: theme.fontWeightRegular
234
- },
235
- small: {
236
- ...baseFonts.small,
237
- fontFamily: theme.fontFamilyBase,
238
- fontSize: theme.fontSizeBase200,
239
- fontWeight: theme.fontWeightRegular
240
- },
241
- smallPlus: {
242
- ...baseFonts.smallPlus,
243
- fontFamily: theme.fontFamilyBase,
244
- fontSize: theme.fontSizeBase200,
245
- fontWeight: theme.fontWeightRegular
246
- },
247
- medium: {
248
- ...baseFonts.medium,
249
- fontFamily: theme.fontFamilyBase,
250
- fontSize: theme.fontSizeBase300,
251
- fontWeight: theme.fontWeightRegular
252
- },
253
- mediumPlus: {
254
- ...baseFonts.mediumPlus,
255
- fontFamily: theme.fontFamilyBase,
256
- fontSize: theme.fontSizeBase400,
257
- fontWeight: theme.fontWeightRegular
258
- },
259
- large: {
260
- ...baseFonts.large,
261
- fontFamily: theme.fontFamilyBase,
262
- fontSize: theme.fontSizeBase400,
263
- fontWeight: theme.fontWeightRegular
264
- },
265
- xLarge: {
266
- ...baseFonts.xxLarge,
267
- fontFamily: theme.fontFamilyBase,
268
- fontSize: theme.fontSizeBase500,
269
- fontWeight: theme.fontWeightSemibold
270
- },
271
- xxLarge: {
272
- ...baseFonts.xxLarge,
273
- fontFamily: theme.fontFamilyBase,
274
- fontSize: theme.fontSizeHero700,
275
- fontWeight: theme.fontWeightSemibold
276
- },
277
- superLarge: {
278
- ...baseFonts.superLarge,
279
- fontFamily: theme.fontFamilyBase,
280
- fontSize: theme.fontSizeHero900,
281
- fontWeight: theme.fontWeightSemibold
282
- },
283
- mega: {
284
- ...baseFonts.mega,
285
- fontFamily: theme.fontFamilyBase,
286
- fontSize: theme.fontSizeHero1000,
287
- fontWeight: theme.fontWeightSemibold
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
- const mapEffects = (baseEffects, theme) => {
295
- return {
296
- ...baseEffects,
297
- elevation4: theme.shadow4,
298
- elevation8: theme.shadow8,
299
- elevation16: theme.shadow16,
300
- elevation64: theme.shadow64,
301
- roundedCorner2: theme.borderRadiusSmall,
302
- roundedCorner4: theme.borderRadiusMedium,
303
- roundedCorner6: theme.borderRadiusLarge
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
- * Creates a v8 theme from v9 brand colors and theme.
308
- * You can optionally pass a v8 base theme.
309
- * Otherwise the default v8 theme is used.
310
- *
311
- * The v9 colors, fonts, and effects are applied on top of the v8 theme
312
- * to allow v8 components to look as much like v9 components as possible.
313
- */
314
- const createV8Theme = (brandColors, themeV9, isDarkTheme = false, themeV8) => {
315
- const baseTheme = themeV8 || react_1.createTheme({
316
- isInverted: isDarkTheme
317
- });
318
- return {
319
- ...baseTheme,
320
- palette: mapPalette(brandColors, isDarkTheme),
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