@fluentui/react-migration-v8-v9 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +22 -1
- package/CHANGELOG.md +12 -2
- package/lib/components/Button/ActionButtonShim.js +18 -0
- package/lib/components/Button/ActionButtonShim.js.map +1 -0
- package/lib/components/Button/ButtonShim.js +25 -0
- package/lib/components/Button/ButtonShim.js.map +1 -0
- package/lib/components/Button/CommandButtonShim.js +5 -0
- package/lib/components/Button/CommandButtonShim.js.map +1 -0
- package/lib/components/Button/CompoundButtonShim.js +21 -0
- package/lib/components/Button/CompoundButtonShim.js.map +1 -0
- package/lib/components/Button/DefaultButtonShim.js +12 -0
- package/lib/components/Button/DefaultButtonShim.js.map +1 -0
- package/lib/components/Button/MenuButtonShim.js +23 -0
- package/lib/components/Button/MenuButtonShim.js.map +1 -0
- package/lib/components/Button/PrimaryButtonShim.js +13 -0
- package/lib/components/Button/PrimaryButtonShim.js.map +1 -0
- package/lib/components/Button/ToggleButtonShim.js +20 -0
- package/lib/components/Button/ToggleButtonShim.js.map +1 -0
- package/lib/components/Button/index.js +10 -0
- package/lib/components/Button/index.js.map +1 -0
- package/lib/components/Button/shimButtonProps.js +24 -0
- package/lib/components/Button/shimButtonProps.js.map +1 -0
- package/lib/components/Menu/MenuShim.js +49 -0
- package/lib/components/Menu/MenuShim.js.map +1 -0
- package/lib/components/Menu/index.js +3 -0
- package/lib/components/Menu/index.js.map +1 -0
- package/lib/components/Menu/shimMenuProps.js +33 -0
- package/lib/components/Menu/shimMenuProps.js.map +1 -0
- package/lib/components/Stack/StackItemShim.js +177 -0
- package/lib/components/Stack/StackItemShim.js.map +1 -0
- package/lib/components/Stack/StackShim.js +260 -0
- package/lib/components/Stack/StackShim.js.map +1 -0
- package/lib/components/Stack/index.js +3 -0
- package/lib/components/Stack/index.js.map +1 -0
- package/lib/components/Stack/stackUtils.js +168 -0
- package/lib/components/Stack/stackUtils.js.map +1 -0
- package/lib/components/Theme/index.js +5 -0
- package/lib/components/Theme/index.js.map +1 -0
- package/lib/components/Theme/themeDuplicates.js +859 -0
- package/lib/components/Theme/themeDuplicates.js.map +1 -0
- package/lib/components/Theme/v8ThemeShim.js +313 -0
- package/lib/components/Theme/v8ThemeShim.js.map +1 -0
- package/lib/components/Theme/v9BrandVariantsShim.js +77 -0
- package/lib/components/Theme/v9BrandVariantsShim.js.map +1 -0
- package/lib/components/Theme/v9ThemeShim.js +195 -0
- package/lib/components/Theme/v9ThemeShim.js.map +1 -0
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -0
- package/lib/stories/DefaultButtonShim/index.js +51 -0
- package/lib/stories/DefaultButtonShim/index.js.map +1 -0
- package/lib-amd/components/Button/ActionButtonShim.js +14 -0
- package/lib-amd/components/Button/ActionButtonShim.js.map +1 -0
- package/lib-amd/components/Button/ButtonShim.js +17 -0
- package/lib-amd/components/Button/ButtonShim.js.map +1 -0
- package/lib-amd/components/Button/CommandButtonShim.js +7 -0
- package/lib-amd/components/Button/CommandButtonShim.js.map +1 -0
- package/lib-amd/components/Button/CompoundButtonShim.js +15 -0
- package/lib-amd/components/Button/CompoundButtonShim.js.map +1 -0
- package/lib-amd/components/Button/DefaultButtonShim.js +12 -0
- package/lib-amd/components/Button/DefaultButtonShim.js.map +1 -0
- package/lib-amd/components/Button/MenuButtonShim.js +20 -0
- package/lib-amd/components/Button/MenuButtonShim.js.map +1 -0
- package/lib-amd/components/Button/PrimaryButtonShim.js +12 -0
- package/lib-amd/components/Button/PrimaryButtonShim.js.map +1 -0
- package/lib-amd/components/Button/ToggleButtonShim.js +14 -0
- package/lib-amd/components/Button/ToggleButtonShim.js.map +1 -0
- package/lib-amd/components/Button/index.js +14 -0
- package/lib-amd/components/Button/index.js.map +1 -0
- package/lib-amd/components/Button/shimButtonProps.js +19 -0
- package/lib-amd/components/Button/shimButtonProps.js.map +1 -0
- package/lib-amd/components/Menu/MenuShim.js +42 -0
- package/lib-amd/components/Menu/MenuShim.js.map +1 -0
- package/lib-amd/components/Menu/index.js +7 -0
- package/lib-amd/components/Menu/index.js.map +1 -0
- package/lib-amd/components/Menu/shimMenuProps.js +30 -0
- package/lib-amd/components/Menu/shimMenuProps.js.map +1 -0
- package/lib-amd/components/Stack/StackItemShim.js +150 -0
- package/lib-amd/components/Stack/StackItemShim.js.map +1 -0
- package/lib-amd/components/Stack/StackShim.js +242 -0
- package/lib-amd/components/Stack/StackShim.js.map +1 -0
- package/lib-amd/components/Stack/index.js +7 -0
- package/lib-amd/components/Stack/index.js.map +1 -0
- package/lib-amd/components/Stack/stackUtils.js +168 -0
- package/lib-amd/components/Stack/stackUtils.js.map +1 -0
- package/lib-amd/components/Theme/index.js +9 -0
- package/lib-amd/components/Theme/index.js.map +1 -0
- package/lib-amd/components/Theme/themeDuplicates.js +864 -0
- package/lib-amd/components/Theme/themeDuplicates.js.map +1 -0
- package/lib-amd/components/Theme/v8ThemeShim.js +140 -0
- package/lib-amd/components/Theme/v8ThemeShim.js.map +1 -0
- package/lib-amd/components/Theme/v9BrandVariantsShim.js +75 -0
- package/lib-amd/components/Theme/v9BrandVariantsShim.js.map +1 -0
- package/lib-amd/components/Theme/v9ThemeShim.js +188 -0
- package/lib-amd/components/Theme/v9ThemeShim.js.map +1 -0
- package/lib-amd/index.js +38 -0
- package/lib-amd/index.js.map +1 -0
- package/lib-amd/stories/DefaultButtonShim/index.js +44 -0
- package/lib-amd/stories/DefaultButtonShim/index.js.map +1 -0
- package/lib-commonjs/components/Button/ActionButtonShim.js +28 -0
- package/lib-commonjs/components/Button/ActionButtonShim.js.map +1 -0
- package/lib-commonjs/components/Button/ButtonShim.js +37 -0
- package/lib-commonjs/components/Button/ButtonShim.js.map +1 -0
- package/lib-commonjs/components/Button/CommandButtonShim.js +19 -0
- package/lib-commonjs/components/Button/CommandButtonShim.js.map +1 -0
- package/lib-commonjs/components/Button/CompoundButtonShim.js +31 -0
- package/lib-commonjs/components/Button/CompoundButtonShim.js.map +1 -0
- package/lib-commonjs/components/Button/DefaultButtonShim.js +21 -0
- package/lib-commonjs/components/Button/DefaultButtonShim.js.map +1 -0
- package/lib-commonjs/components/Button/MenuButtonShim.js +32 -0
- package/lib-commonjs/components/Button/MenuButtonShim.js.map +1 -0
- package/lib-commonjs/components/Button/PrimaryButtonShim.js +22 -0
- package/lib-commonjs/components/Button/PrimaryButtonShim.js.map +1 -0
- package/lib-commonjs/components/Button/ToggleButtonShim.js +30 -0
- package/lib-commonjs/components/Button/ToggleButtonShim.js.map +1 -0
- package/lib-commonjs/components/Button/index.js +26 -0
- package/lib-commonjs/components/Button/index.js.map +1 -0
- package/lib-commonjs/components/Button/shimButtonProps.js +35 -0
- package/lib-commonjs/components/Button/shimButtonProps.js.map +1 -0
- package/lib-commonjs/components/Menu/MenuShim.js +58 -0
- package/lib-commonjs/components/Menu/MenuShim.js.map +1 -0
- package/lib-commonjs/components/Menu/index.js +12 -0
- package/lib-commonjs/components/Menu/index.js.map +1 -0
- package/lib-commonjs/components/Menu/shimMenuProps.js +53 -0
- package/lib-commonjs/components/Menu/shimMenuProps.js.map +1 -0
- package/lib-commonjs/components/Stack/StackItemShim.js +188 -0
- package/lib-commonjs/components/Stack/StackItemShim.js.map +1 -0
- package/lib-commonjs/components/Stack/StackShim.js +273 -0
- package/lib-commonjs/components/Stack/StackShim.js.map +1 -0
- package/lib-commonjs/components/Stack/index.js +12 -0
- package/lib-commonjs/components/Stack/index.js.map +1 -0
- package/lib-commonjs/components/Stack/stackUtils.js +182 -0
- package/lib-commonjs/components/Stack/stackUtils.js.map +1 -0
- package/lib-commonjs/components/Theme/index.js +16 -0
- package/lib-commonjs/components/Theme/index.js.map +1 -0
- package/lib-commonjs/components/Theme/themeDuplicates.js +865 -0
- package/lib-commonjs/components/Theme/themeDuplicates.js.map +1 -0
- package/lib-commonjs/components/Theme/v8ThemeShim.js +324 -0
- package/lib-commonjs/components/Theme/v8ThemeShim.js.map +1 -0
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.js +87 -0
- package/lib-commonjs/components/Theme/v9BrandVariantsShim.js.map +1 -0
- package/lib-commonjs/components/Theme/v9ThemeShim.js +206 -0
- package/lib-commonjs/components/Theme/v9ThemeShim.js.map +1 -0
- package/lib-commonjs/index.js +211 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/stories/DefaultButtonShim/index.js +64 -0
- package/lib-commonjs/stories/DefaultButtonShim/index.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createV9Theme = void 0;
|
|
7
|
+
|
|
8
|
+
const react_components_1 = /*#__PURE__*/require("@fluentui/react-components");
|
|
9
|
+
|
|
10
|
+
const themeDuplicates_1 = /*#__PURE__*/require("./themeDuplicates");
|
|
11
|
+
/**
|
|
12
|
+
* Creates v9 color tokens from a v8 palette.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const mapAliasColors = (palette, inverted) => {
|
|
17
|
+
return {
|
|
18
|
+
colorNeutralForeground1: palette.neutralPrimary,
|
|
19
|
+
colorNeutralForeground1Hover: palette.neutralPrimary,
|
|
20
|
+
colorNeutralForeground1Pressed: palette.neutralPrimary,
|
|
21
|
+
colorNeutralForeground1Selected: palette.neutralPrimary,
|
|
22
|
+
colorNeutralForeground2: palette.neutralSecondary,
|
|
23
|
+
colorNeutralForeground2Hover: palette.neutralPrimary,
|
|
24
|
+
colorNeutralForeground2Pressed: palette.neutralPrimary,
|
|
25
|
+
colorNeutralForeground2Selected: palette.neutralPrimary,
|
|
26
|
+
colorNeutralForeground2BrandHover: palette.themePrimary,
|
|
27
|
+
colorNeutralForeground2BrandPressed: palette.themeDarkAlt,
|
|
28
|
+
colorNeutralForeground2BrandSelected: palette.themePrimary,
|
|
29
|
+
colorNeutralForeground3: palette.neutralTertiary,
|
|
30
|
+
colorNeutralForeground3Hover: palette.neutralSecondary,
|
|
31
|
+
colorNeutralForeground3Pressed: palette.neutralSecondary,
|
|
32
|
+
colorNeutralForeground3Selected: palette.neutralSecondary,
|
|
33
|
+
colorNeutralForeground3BrandHover: palette.themePrimary,
|
|
34
|
+
colorNeutralForeground3BrandPressed: palette.themeDarkAlt,
|
|
35
|
+
colorNeutralForeground3BrandSelected: palette.themePrimary,
|
|
36
|
+
colorNeutralForeground4: palette.neutralQuaternary,
|
|
37
|
+
colorNeutralForegroundDisabled: palette.neutralTertiaryAlt,
|
|
38
|
+
colorNeutralForegroundInvertedDisabled: themeDuplicates_1.whiteAlpha[40],
|
|
39
|
+
colorBrandForegroundLink: palette.themeDarkAlt,
|
|
40
|
+
colorBrandForegroundLinkHover: palette.themeDark,
|
|
41
|
+
colorBrandForegroundLinkPressed: palette.themeDarker,
|
|
42
|
+
colorBrandForegroundLinkSelected: palette.themeDarkAlt,
|
|
43
|
+
colorNeutralForeground2Link: palette.neutralSecondary,
|
|
44
|
+
colorNeutralForeground2LinkHover: palette.neutralPrimary,
|
|
45
|
+
colorNeutralForeground2LinkPressed: palette.neutralPrimary,
|
|
46
|
+
colorNeutralForeground2LinkSelected: palette.neutralPrimary,
|
|
47
|
+
colorCompoundBrandForeground1: palette.themePrimary,
|
|
48
|
+
colorCompoundBrandForeground1Hover: palette.themeDarkAlt,
|
|
49
|
+
colorCompoundBrandForeground1Pressed: palette.themeDark,
|
|
50
|
+
colorBrandForeground1: palette.themePrimary,
|
|
51
|
+
colorBrandForeground2: palette.themeDarkAlt,
|
|
52
|
+
colorNeutralForeground1Static: palette.neutralPrimary,
|
|
53
|
+
colorNeutralForegroundInverted: palette.white,
|
|
54
|
+
colorNeutralForegroundInvertedHover: palette.white,
|
|
55
|
+
colorNeutralForegroundInvertedPressed: palette.white,
|
|
56
|
+
colorNeutralForegroundInvertedSelected: palette.white,
|
|
57
|
+
colorNeutralForegroundOnBrand: palette.white,
|
|
58
|
+
colorNeutralForegroundStaticInverted: palette.white,
|
|
59
|
+
colorNeutralForegroundInvertedLink: palette.white,
|
|
60
|
+
colorNeutralForegroundInvertedLinkHover: palette.white,
|
|
61
|
+
colorNeutralForegroundInvertedLinkPressed: palette.white,
|
|
62
|
+
colorNeutralForegroundInvertedLinkSelected: palette.white,
|
|
63
|
+
colorNeutralForegroundInverted2: palette.white,
|
|
64
|
+
colorBrandForegroundInverted: palette.themeSecondary,
|
|
65
|
+
colorBrandForegroundInvertedHover: palette.themeTertiary,
|
|
66
|
+
colorBrandForegroundInvertedPressed: palette.themeSecondary,
|
|
67
|
+
colorBrandForegroundOnLight: palette.themePrimary,
|
|
68
|
+
colorBrandForegroundOnLightHover: palette.themeDarkAlt,
|
|
69
|
+
colorBrandForegroundOnLightPressed: palette.themeDark,
|
|
70
|
+
colorBrandForegroundOnLightSelected: palette.themeDark,
|
|
71
|
+
colorNeutralBackground1: palette.white,
|
|
72
|
+
colorNeutralBackground1Hover: palette.neutralLighter,
|
|
73
|
+
colorNeutralBackground1Pressed: palette.neutralQuaternaryAlt,
|
|
74
|
+
colorNeutralBackground1Selected: palette.neutralLight,
|
|
75
|
+
colorNeutralBackground2: palette.neutralLighterAlt,
|
|
76
|
+
colorNeutralBackground2Hover: palette.neutralLighter,
|
|
77
|
+
colorNeutralBackground2Pressed: palette.neutralQuaternaryAlt,
|
|
78
|
+
colorNeutralBackground2Selected: palette.neutralLight,
|
|
79
|
+
colorNeutralBackground3: palette.neutralLighter,
|
|
80
|
+
colorNeutralBackground3Hover: palette.neutralLight,
|
|
81
|
+
colorNeutralBackground3Pressed: palette.neutralQuaternary,
|
|
82
|
+
colorNeutralBackground3Selected: palette.neutralQuaternaryAlt,
|
|
83
|
+
colorNeutralBackground4: palette.neutralLighter,
|
|
84
|
+
colorNeutralBackground4Hover: palette.neutralLighterAlt,
|
|
85
|
+
colorNeutralBackground4Pressed: palette.neutralLighter,
|
|
86
|
+
colorNeutralBackground4Selected: palette.white,
|
|
87
|
+
colorNeutralBackground5: palette.neutralLight,
|
|
88
|
+
colorNeutralBackground5Hover: palette.neutralLighter,
|
|
89
|
+
colorNeutralBackground5Pressed: palette.neutralLighter,
|
|
90
|
+
colorNeutralBackground5Selected: palette.neutralLighterAlt,
|
|
91
|
+
colorNeutralBackground6: palette.neutralLight,
|
|
92
|
+
colorNeutralBackgroundStatic: themeDuplicates_1.grey[20],
|
|
93
|
+
colorNeutralBackgroundInverted: palette.neutralSecondary,
|
|
94
|
+
colorSubtleBackground: 'transparent',
|
|
95
|
+
colorSubtleBackgroundHover: palette.neutralLighter,
|
|
96
|
+
colorSubtleBackgroundPressed: palette.neutralQuaternaryAlt,
|
|
97
|
+
colorSubtleBackgroundSelected: palette.neutralLight,
|
|
98
|
+
colorSubtleBackgroundLightAlphaHover: inverted ? themeDuplicates_1.whiteAlpha[10] : themeDuplicates_1.whiteAlpha[80],
|
|
99
|
+
colorSubtleBackgroundLightAlphaPressed: inverted ? themeDuplicates_1.whiteAlpha[5] : themeDuplicates_1.whiteAlpha[50],
|
|
100
|
+
colorSubtleBackgroundLightAlphaSelected: 'transparent',
|
|
101
|
+
colorSubtleBackgroundInverted: 'transparent',
|
|
102
|
+
colorSubtleBackgroundInvertedHover: themeDuplicates_1.blackAlpha[10],
|
|
103
|
+
colorSubtleBackgroundInvertedPressed: themeDuplicates_1.blackAlpha[30],
|
|
104
|
+
colorSubtleBackgroundInvertedSelected: themeDuplicates_1.blackAlpha[20],
|
|
105
|
+
colorTransparentBackground: 'transparent',
|
|
106
|
+
colorTransparentBackgroundHover: 'transparent',
|
|
107
|
+
colorTransparentBackgroundPressed: 'transparent',
|
|
108
|
+
colorTransparentBackgroundSelected: 'transparent',
|
|
109
|
+
colorNeutralBackgroundDisabled: palette.neutralLighter,
|
|
110
|
+
colorNeutralBackgroundInvertedDisabled: themeDuplicates_1.whiteAlpha[10],
|
|
111
|
+
colorNeutralStencil1: palette.neutralLight,
|
|
112
|
+
colorNeutralStencil2: palette.neutralLighterAlt,
|
|
113
|
+
colorBackgroundOverlay: themeDuplicates_1.blackAlpha[10],
|
|
114
|
+
colorScrollbarOverlay: themeDuplicates_1.blackAlpha[50],
|
|
115
|
+
colorBrandBackground: palette.themePrimary,
|
|
116
|
+
colorBrandBackgroundHover: palette.themeDarkAlt,
|
|
117
|
+
colorBrandBackgroundPressed: palette.themeDarker,
|
|
118
|
+
colorBrandBackgroundSelected: palette.themeDark,
|
|
119
|
+
colorCompoundBrandBackground: palette.themePrimary,
|
|
120
|
+
colorCompoundBrandBackgroundHover: palette.themeDarkAlt,
|
|
121
|
+
colorCompoundBrandBackgroundPressed: palette.themeDark,
|
|
122
|
+
colorBrandBackgroundStatic: palette.themePrimary,
|
|
123
|
+
colorBrandBackground2: palette.themeLighterAlt,
|
|
124
|
+
colorBrandBackgroundInverted: palette.white,
|
|
125
|
+
colorBrandBackgroundInvertedHover: palette.themeLighterAlt,
|
|
126
|
+
colorBrandBackgroundInvertedPressed: palette.themeLight,
|
|
127
|
+
colorBrandBackgroundInvertedSelected: palette.themeLighter,
|
|
128
|
+
colorNeutralStrokeAccessible: palette.neutralSecondary,
|
|
129
|
+
colorNeutralStrokeAccessibleHover: palette.neutralSecondary,
|
|
130
|
+
colorNeutralStrokeAccessiblePressed: palette.neutralSecondary,
|
|
131
|
+
colorNeutralStrokeAccessibleSelected: palette.themePrimary,
|
|
132
|
+
colorNeutralStroke1: palette.neutralQuaternary,
|
|
133
|
+
colorNeutralStroke1Hover: palette.neutralTertiaryAlt,
|
|
134
|
+
colorNeutralStroke1Pressed: palette.neutralTertiaryAlt,
|
|
135
|
+
colorNeutralStroke1Selected: palette.neutralTertiaryAlt,
|
|
136
|
+
colorNeutralStroke2: palette.neutralQuaternaryAlt,
|
|
137
|
+
colorNeutralStroke3: palette.neutralLighter,
|
|
138
|
+
colorNeutralStrokeOnBrand: palette.white,
|
|
139
|
+
colorNeutralStrokeOnBrand2: palette.white,
|
|
140
|
+
colorNeutralStrokeOnBrand2Hover: palette.white,
|
|
141
|
+
colorNeutralStrokeOnBrand2Pressed: palette.white,
|
|
142
|
+
colorNeutralStrokeOnBrand2Selected: palette.white,
|
|
143
|
+
colorBrandStroke1: palette.themePrimary,
|
|
144
|
+
colorBrandStroke2: palette.themeLight,
|
|
145
|
+
colorCompoundBrandStroke: palette.themePrimary,
|
|
146
|
+
colorCompoundBrandStrokeHover: palette.themeDarkAlt,
|
|
147
|
+
colorCompoundBrandStrokePressed: palette.themeDark,
|
|
148
|
+
colorNeutralStrokeDisabled: palette.neutralQuaternaryAlt,
|
|
149
|
+
colorNeutralStrokeInvertedDisabled: themeDuplicates_1.whiteAlpha[40],
|
|
150
|
+
colorTransparentStroke: 'transparent',
|
|
151
|
+
colorTransparentStrokeInteractive: 'transparent',
|
|
152
|
+
colorTransparentStrokeDisabled: 'transparent',
|
|
153
|
+
colorStrokeFocus1: palette.white,
|
|
154
|
+
colorStrokeFocus2: palette.black,
|
|
155
|
+
colorNeutralShadowAmbient: 'rgba(0,0,0,0.12)',
|
|
156
|
+
colorNeutralShadowKey: 'rgba(0,0,0,0.14)',
|
|
157
|
+
colorNeutralShadowAmbientLighter: 'rgba(0,0,0,0.06)',
|
|
158
|
+
colorNeutralShadowKeyLighter: 'rgba(0,0,0,0.07)',
|
|
159
|
+
colorNeutralShadowAmbientDarker: 'rgba(0,0,0,0.20)',
|
|
160
|
+
colorNeutralShadowKeyDarker: 'rgba(0,0,0,0.24)',
|
|
161
|
+
colorBrandShadowAmbient: 'rgba(0,0,0,0.30)',
|
|
162
|
+
colorBrandShadowKey: 'rgba(0,0,0,0.25)'
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* Creates v9 shadow tokens from v8 effects.
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
const mapShadowTokens = effects => {
|
|
171
|
+
return {
|
|
172
|
+
shadow4: effects.elevation4,
|
|
173
|
+
shadow8: effects.elevation8,
|
|
174
|
+
shadow16: effects.elevation16,
|
|
175
|
+
shadow64: effects.elevation64
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Creates v9 border radius tokens from v8 effects
|
|
180
|
+
*/
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
const mapBorderRadiusTokens = effects => {
|
|
184
|
+
return {
|
|
185
|
+
borderRadiusSmall: effects.roundedCorner2,
|
|
186
|
+
borderRadiusMedium: effects.roundedCorner4,
|
|
187
|
+
borderRadiusLarge: effects.roundedCorner6
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Creates a v9 theme from a v8 theme.
|
|
192
|
+
* You can optional pass a base v9 theme; otherwise webLightTheme is used.
|
|
193
|
+
*/
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
const createV9Theme = (themeV8, baseThemeV9) => {
|
|
197
|
+
const baseTheme = baseThemeV9 !== null && baseThemeV9 !== void 0 ? baseThemeV9 : react_components_1.webLightTheme;
|
|
198
|
+
return { ...baseTheme,
|
|
199
|
+
...mapAliasColors(themeV8.palette, themeV8.isInverted),
|
|
200
|
+
...mapShadowTokens(themeV8.effects),
|
|
201
|
+
...mapBorderRadiusTokens(themeV8.effects)
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
exports.createV9Theme = createV9Theme;
|
|
206
|
+
//# sourceMappingURL=v9ThemeShim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Theme/v9ThemeShim.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,kBAAA,gBAAA,OAAA,CAAA,4BAAA,CAAA;;AAEA,MAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;AAEA;;AAEG;;;AACH,MAAM,cAAc,GAAG,CAAC,OAAD,EAAoB,QAApB,KAAsD;EAC3E,OAAO;IACL,uBAAuB,EAAE,OAAO,CAAC,cAD5B;IAEL,4BAA4B,EAAE,OAAO,CAAC,c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AM,eAAe,GAAI,OAAD,IAA6C;EACnE,OAAO;IACL,OAAO,EAAE,OAAO,CAAC,UADZ;IAEL,OAAO,EAAE,OAAO,CAAC,UAFZ;IAGL,QAAQ,EAAE,OAAO,CAAC,WAHb;IAIL,QAAQ,EAAE,OAAO,CAAC;EAJb,CAAP;AAMD,CAPD;AASA;;AAEG;;;AACH,MAAM,qBAAqB,GAAI,OAAD,IAAmD;EAC/E,OAAO;IACL,iBAAiB,EAAE,OAAO,CAAC,cADtB;IAEL,kBAAkB,EAAE,OAAO,CAAC,cAFvB;IAGL,iBAAiB,EAAE,OAAO,CAAC;EAHtB,CAAP;AAKD,CAND;AAQA;;;AAGG;;;AACI,MAAM,aAAa,GAAG,CAAC,OAAD,EAAmB,WAAnB,KAAqD;EAChF,MAAM,SAAS,GAAG,WAAW,KAAA,IAAX,IAAA,WAAW,KAAA,KAAA,CAAX,GAAA,WAAA,GAAe,kBAAA,CAAA,aAAjC;EAEA,OAAO,EACL,GAAG,SADE;IAEL,GAAG,cAAc,CAAC,OAAO,CAAC,OAAT,EAAkB,OAAO,CAAC,UAA1B,CAFZ;IAGL,GAAG,eAAe,CAAC,OAAO,CAAC,OAAT,CAHb;IAIL,GAAG,qBAAqB,CAAC,OAAO,CAAC,OAAT;EAJnB,CAAP;AAMD,CATM;;AAAM,OAAA,CAAA,aAAA,GAAa,aAAb","sourcesContent":["import { Theme as ThemeV8 } from '@fluentui/react';\nimport type { IEffects, IPalette } from '@fluentui/react';\nimport { Theme as ThemeV9, webLightTheme } from '@fluentui/react-components';\nimport type { BorderRadiusTokens, ColorTokens, ShadowTokens } from '@fluentui/react-components';\nimport { blackAlpha, whiteAlpha, grey } from './themeDuplicates';\n\n/**\n * Creates v9 color tokens from a v8 palette.\n */\nconst mapAliasColors = (palette: IPalette, inverted: boolean): ColorTokens => {\n return {\n colorNeutralForeground1: palette.neutralPrimary,\n colorNeutralForeground1Hover: palette.neutralPrimary,\n colorNeutralForeground1Pressed: palette.neutralPrimary,\n colorNeutralForeground1Selected: palette.neutralPrimary,\n colorNeutralForeground2: palette.neutralSecondary,\n colorNeutralForeground2Hover: palette.neutralPrimary,\n colorNeutralForeground2Pressed: palette.neutralPrimary,\n colorNeutralForeground2Selected: palette.neutralPrimary,\n colorNeutralForeground2BrandHover: palette.themePrimary,\n colorNeutralForeground2BrandPressed: palette.themeDarkAlt,\n colorNeutralForeground2BrandSelected: palette.themePrimary,\n colorNeutralForeground3: palette.neutralTertiary,\n colorNeutralForeground3Hover: palette.neutralSecondary,\n colorNeutralForeground3Pressed: palette.neutralSecondary,\n colorNeutralForeground3Selected: palette.neutralSecondary,\n colorNeutralForeground3BrandHover: palette.themePrimary,\n colorNeutralForeground3BrandPressed: palette.themeDarkAlt,\n colorNeutralForeground3BrandSelected: palette.themePrimary,\n colorNeutralForeground4: palette.neutralQuaternary,\n colorNeutralForegroundDisabled: palette.neutralTertiaryAlt,\n colorNeutralForegroundInvertedDisabled: whiteAlpha[40],\n colorBrandForegroundLink: palette.themeDarkAlt,\n colorBrandForegroundLinkHover: palette.themeDark,\n colorBrandForegroundLinkPressed: palette.themeDarker,\n colorBrandForegroundLinkSelected: palette.themeDarkAlt,\n colorNeutralForeground2Link: palette.neutralSecondary,\n colorNeutralForeground2LinkHover: palette.neutralPrimary,\n colorNeutralForeground2LinkPressed: palette.neutralPrimary,\n colorNeutralForeground2LinkSelected: palette.neutralPrimary,\n colorCompoundBrandForeground1: palette.themePrimary,\n colorCompoundBrandForeground1Hover: palette.themeDarkAlt,\n colorCompoundBrandForeground1Pressed: palette.themeDark,\n colorBrandForeground1: palette.themePrimary,\n colorBrandForeground2: palette.themeDarkAlt,\n colorNeutralForeground1Static: palette.neutralPrimary,\n colorNeutralForegroundInverted: palette.white,\n colorNeutralForegroundInvertedHover: palette.white,\n colorNeutralForegroundInvertedPressed: palette.white,\n colorNeutralForegroundInvertedSelected: palette.white,\n colorNeutralForegroundOnBrand: palette.white,\n colorNeutralForegroundStaticInverted: palette.white,\n colorNeutralForegroundInvertedLink: palette.white,\n colorNeutralForegroundInvertedLinkHover: palette.white,\n colorNeutralForegroundInvertedLinkPressed: palette.white,\n colorNeutralForegroundInvertedLinkSelected: palette.white,\n colorNeutralForegroundInverted2: palette.white,\n colorBrandForegroundInverted: palette.themeSecondary,\n colorBrandForegroundInvertedHover: palette.themeTertiary,\n colorBrandForegroundInvertedPressed: palette.themeSecondary,\n colorBrandForegroundOnLight: palette.themePrimary,\n colorBrandForegroundOnLightHover: palette.themeDarkAlt,\n colorBrandForegroundOnLightPressed: palette.themeDark,\n colorBrandForegroundOnLightSelected: palette.themeDark,\n colorNeutralBackground1: palette.white,\n colorNeutralBackground1Hover: palette.neutralLighter,\n colorNeutralBackground1Pressed: palette.neutralQuaternaryAlt,\n colorNeutralBackground1Selected: palette.neutralLight,\n colorNeutralBackground2: palette.neutralLighterAlt,\n colorNeutralBackground2Hover: palette.neutralLighter,\n colorNeutralBackground2Pressed: palette.neutralQuaternaryAlt,\n colorNeutralBackground2Selected: palette.neutralLight,\n colorNeutralBackground3: palette.neutralLighter,\n colorNeutralBackground3Hover: palette.neutralLight,\n colorNeutralBackground3Pressed: palette.neutralQuaternary,\n colorNeutralBackground3Selected: palette.neutralQuaternaryAlt,\n colorNeutralBackground4: palette.neutralLighter,\n colorNeutralBackground4Hover: palette.neutralLighterAlt,\n colorNeutralBackground4Pressed: palette.neutralLighter,\n colorNeutralBackground4Selected: palette.white,\n colorNeutralBackground5: palette.neutralLight,\n colorNeutralBackground5Hover: palette.neutralLighter,\n colorNeutralBackground5Pressed: palette.neutralLighter,\n colorNeutralBackground5Selected: palette.neutralLighterAlt,\n colorNeutralBackground6: palette.neutralLight,\n colorNeutralBackgroundStatic: grey[20],\n colorNeutralBackgroundInverted: palette.neutralSecondary,\n colorSubtleBackground: 'transparent',\n colorSubtleBackgroundHover: palette.neutralLighter,\n colorSubtleBackgroundPressed: palette.neutralQuaternaryAlt,\n colorSubtleBackgroundSelected: palette.neutralLight,\n colorSubtleBackgroundLightAlphaHover: inverted ? whiteAlpha[10] : whiteAlpha[80],\n colorSubtleBackgroundLightAlphaPressed: inverted ? whiteAlpha[5] : whiteAlpha[50],\n colorSubtleBackgroundLightAlphaSelected: 'transparent',\n colorSubtleBackgroundInverted: 'transparent',\n colorSubtleBackgroundInvertedHover: blackAlpha[10],\n colorSubtleBackgroundInvertedPressed: blackAlpha[30],\n colorSubtleBackgroundInvertedSelected: blackAlpha[20],\n colorTransparentBackground: 'transparent',\n colorTransparentBackgroundHover: 'transparent',\n colorTransparentBackgroundPressed: 'transparent',\n colorTransparentBackgroundSelected: 'transparent',\n colorNeutralBackgroundDisabled: palette.neutralLighter,\n colorNeutralBackgroundInvertedDisabled: whiteAlpha[10],\n colorNeutralStencil1: palette.neutralLight,\n colorNeutralStencil2: palette.neutralLighterAlt,\n colorBackgroundOverlay: blackAlpha[10],\n colorScrollbarOverlay: blackAlpha[50],\n colorBrandBackground: palette.themePrimary,\n colorBrandBackgroundHover: palette.themeDarkAlt,\n colorBrandBackgroundPressed: palette.themeDarker,\n colorBrandBackgroundSelected: palette.themeDark,\n colorCompoundBrandBackground: palette.themePrimary,\n colorCompoundBrandBackgroundHover: palette.themeDarkAlt,\n colorCompoundBrandBackgroundPressed: palette.themeDark,\n colorBrandBackgroundStatic: palette.themePrimary,\n colorBrandBackground2: palette.themeLighterAlt,\n colorBrandBackgroundInverted: palette.white,\n colorBrandBackgroundInvertedHover: palette.themeLighterAlt,\n colorBrandBackgroundInvertedPressed: palette.themeLight,\n colorBrandBackgroundInvertedSelected: palette.themeLighter,\n colorNeutralStrokeAccessible: palette.neutralSecondary,\n colorNeutralStrokeAccessibleHover: palette.neutralSecondary,\n colorNeutralStrokeAccessiblePressed: palette.neutralSecondary,\n colorNeutralStrokeAccessibleSelected: palette.themePrimary,\n colorNeutralStroke1: palette.neutralQuaternary,\n colorNeutralStroke1Hover: palette.neutralTertiaryAlt,\n colorNeutralStroke1Pressed: palette.neutralTertiaryAlt,\n colorNeutralStroke1Selected: palette.neutralTertiaryAlt,\n colorNeutralStroke2: palette.neutralQuaternaryAlt,\n colorNeutralStroke3: palette.neutralLighter,\n colorNeutralStrokeOnBrand: palette.white,\n colorNeutralStrokeOnBrand2: palette.white,\n colorNeutralStrokeOnBrand2Hover: palette.white,\n colorNeutralStrokeOnBrand2Pressed: palette.white,\n colorNeutralStrokeOnBrand2Selected: palette.white,\n colorBrandStroke1: palette.themePrimary,\n colorBrandStroke2: palette.themeLight,\n colorCompoundBrandStroke: palette.themePrimary,\n colorCompoundBrandStrokeHover: palette.themeDarkAlt,\n colorCompoundBrandStrokePressed: palette.themeDark,\n colorNeutralStrokeDisabled: palette.neutralQuaternaryAlt,\n colorNeutralStrokeInvertedDisabled: whiteAlpha[40],\n colorTransparentStroke: 'transparent',\n colorTransparentStrokeInteractive: 'transparent',\n colorTransparentStrokeDisabled: 'transparent',\n colorStrokeFocus1: palette.white,\n colorStrokeFocus2: palette.black,\n colorNeutralShadowAmbient: 'rgba(0,0,0,0.12)',\n colorNeutralShadowKey: 'rgba(0,0,0,0.14)',\n colorNeutralShadowAmbientLighter: 'rgba(0,0,0,0.06)',\n colorNeutralShadowKeyLighter: 'rgba(0,0,0,0.07)',\n colorNeutralShadowAmbientDarker: 'rgba(0,0,0,0.20)',\n colorNeutralShadowKeyDarker: 'rgba(0,0,0,0.24)',\n colorBrandShadowAmbient: 'rgba(0,0,0,0.30)',\n colorBrandShadowKey: 'rgba(0,0,0,0.25)',\n };\n};\n\n/**\n * Creates v9 shadow tokens from v8 effects.\n */\nconst mapShadowTokens = (effects: IEffects): Partial<ShadowTokens> => {\n return {\n shadow4: effects.elevation4,\n shadow8: effects.elevation8,\n shadow16: effects.elevation16,\n shadow64: effects.elevation64,\n };\n};\n\n/**\n * Creates v9 border radius tokens from v8 effects\n */\nconst mapBorderRadiusTokens = (effects: IEffects): Partial<BorderRadiusTokens> => {\n return {\n borderRadiusSmall: effects.roundedCorner2,\n borderRadiusMedium: effects.roundedCorner4,\n borderRadiusLarge: effects.roundedCorner6,\n };\n};\n\n/**\n * Creates a v9 theme from a v8 theme.\n * You can optional pass a base v9 theme; otherwise webLightTheme is used.\n */\nexport const createV9Theme = (themeV8: ThemeV8, baseThemeV9?: ThemeV9): ThemeV9 => {\n const baseTheme = baseThemeV9 ?? webLightTheme;\n\n return {\n ...baseTheme,\n ...mapAliasColors(themeV8.palette, themeV8.isInverted),\n ...mapShadowTokens(themeV8.effects),\n ...mapBorderRadiusTokens(themeV8.effects),\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.whiteAlpha = exports.white = exports.sharedColors = exports.hcHyperlink = exports.hcHighlightText = exports.hcHighlight = exports.hcDisabled = exports.hcCanvasText = exports.hcCanvas = exports.hcButtonText = exports.hcButtonFace = exports.grey14Alpha = exports.grey = exports.createV9Theme = exports.createV8Theme = exports.createBrandVariants = exports.brandWeb = exports.blackAlpha = exports.black = exports.StackShim = exports.StackItemShim = exports.shimMenuProps = exports.MenuItemShim = exports.ToggleButtonShim = exports.shimButtonProps = exports.PrimaryButtonShim = exports.MenuButtonShim = exports.DefaultButtonShim = exports.CompoundButtonShim = exports.CommandButtonShim = exports.ButtonShim = exports.ActionButtonShim = void 0;
|
|
7
|
+
|
|
8
|
+
var index_1 = /*#__PURE__*/require("./components/Button/index");
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, "ActionButtonShim", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return index_1.ActionButtonShim;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "ButtonShim", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () {
|
|
19
|
+
return index_1.ButtonShim;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(exports, "CommandButtonShim", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function () {
|
|
25
|
+
return index_1.CommandButtonShim;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "CompoundButtonShim", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () {
|
|
31
|
+
return index_1.CompoundButtonShim;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(exports, "DefaultButtonShim", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return index_1.DefaultButtonShim;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "MenuButtonShim", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () {
|
|
43
|
+
return index_1.MenuButtonShim;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "PrimaryButtonShim", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () {
|
|
49
|
+
return index_1.PrimaryButtonShim;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "shimButtonProps", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () {
|
|
55
|
+
return index_1.shimButtonProps;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "ToggleButtonShim", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () {
|
|
61
|
+
return index_1.ToggleButtonShim;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
var index_2 = /*#__PURE__*/require("./components/Menu/index");
|
|
66
|
+
|
|
67
|
+
Object.defineProperty(exports, "MenuItemShim", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () {
|
|
70
|
+
return index_2.MenuItemShim;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
Object.defineProperty(exports, "shimMenuProps", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () {
|
|
76
|
+
return index_2.shimMenuProps;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
var index_3 = /*#__PURE__*/require("./components/Stack/index");
|
|
81
|
+
|
|
82
|
+
Object.defineProperty(exports, "StackItemShim", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function () {
|
|
85
|
+
return index_3.StackItemShim;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "StackShim", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () {
|
|
91
|
+
return index_3.StackShim;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
var index_4 = /*#__PURE__*/require("./components/Theme/index");
|
|
96
|
+
|
|
97
|
+
Object.defineProperty(exports, "black", {
|
|
98
|
+
enumerable: true,
|
|
99
|
+
get: function () {
|
|
100
|
+
return index_4.black;
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
Object.defineProperty(exports, "blackAlpha", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () {
|
|
106
|
+
return index_4.blackAlpha;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
Object.defineProperty(exports, "brandWeb", {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () {
|
|
112
|
+
return index_4.brandWeb;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
Object.defineProperty(exports, "createBrandVariants", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function () {
|
|
118
|
+
return index_4.createBrandVariants;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
Object.defineProperty(exports, "createV8Theme", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function () {
|
|
124
|
+
return index_4.createV8Theme;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, "createV9Theme", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () {
|
|
130
|
+
return index_4.createV9Theme;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
Object.defineProperty(exports, "grey", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function () {
|
|
136
|
+
return index_4.grey;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
Object.defineProperty(exports, "grey14Alpha", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function () {
|
|
142
|
+
return index_4.grey14Alpha;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
Object.defineProperty(exports, "hcButtonFace", {
|
|
146
|
+
enumerable: true,
|
|
147
|
+
get: function () {
|
|
148
|
+
return index_4.hcButtonFace;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
Object.defineProperty(exports, "hcButtonText", {
|
|
152
|
+
enumerable: true,
|
|
153
|
+
get: function () {
|
|
154
|
+
return index_4.hcButtonText;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
Object.defineProperty(exports, "hcCanvas", {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
get: function () {
|
|
160
|
+
return index_4.hcCanvas;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
Object.defineProperty(exports, "hcCanvasText", {
|
|
164
|
+
enumerable: true,
|
|
165
|
+
get: function () {
|
|
166
|
+
return index_4.hcCanvasText;
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
Object.defineProperty(exports, "hcDisabled", {
|
|
170
|
+
enumerable: true,
|
|
171
|
+
get: function () {
|
|
172
|
+
return index_4.hcDisabled;
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
Object.defineProperty(exports, "hcHighlight", {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function () {
|
|
178
|
+
return index_4.hcHighlight;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
Object.defineProperty(exports, "hcHighlightText", {
|
|
182
|
+
enumerable: true,
|
|
183
|
+
get: function () {
|
|
184
|
+
return index_4.hcHighlightText;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
Object.defineProperty(exports, "hcHyperlink", {
|
|
188
|
+
enumerable: true,
|
|
189
|
+
get: function () {
|
|
190
|
+
return index_4.hcHyperlink;
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
Object.defineProperty(exports, "sharedColors", {
|
|
194
|
+
enumerable: true,
|
|
195
|
+
get: function () {
|
|
196
|
+
return index_4.sharedColors;
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
Object.defineProperty(exports, "white", {
|
|
200
|
+
enumerable: true,
|
|
201
|
+
get: function () {
|
|
202
|
+
return index_4.white;
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
Object.defineProperty(exports, "whiteAlpha", {
|
|
206
|
+
enumerable: true,
|
|
207
|
+
get: function () {
|
|
208
|
+
return index_4.whiteAlpha;
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,OAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACE,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,kBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,gBAAA;EAAgB;AAAhB,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,YAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,UAAA;EAAU;AAAV,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,mBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,iBAAA;EAAiB;AAAjB,CAAA;AACA,MAA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AA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,WAAA;EAAW;AAAX,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,iBAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,eAAA;EAAe;AAAf,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,aAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,WAAA;EAAW;AAAX,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,cAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,YAAA;EAAY;AAAZ,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,OAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,KAAA;EAAK;AAAL,CAAA;AACA,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,YAAA,EAAA;EAAA,UAAA,EAAA,IAAA;EAAA,GAAA,EAAA,YAAA;IAAA,OAAA,OAAA,CAAA,UAAA;EAAU;AAAV,CAAA","sourcesContent":["export {\n ActionButtonShim,\n ButtonShim,\n CommandButtonShim,\n CompoundButtonShim,\n DefaultButtonShim,\n MenuButtonShim,\n PrimaryButtonShim,\n shimButtonProps,\n ToggleButtonShim,\n} from './components/Button/index';\n\nexport { MenuItemShim, shimMenuProps } from './components/Menu/index';\n\nexport { StackItemShim, StackShim } from './components/Stack/index';\n\nexport {\n black,\n blackAlpha,\n brandWeb,\n createBrandVariants,\n createV8Theme,\n createV9Theme,\n grey,\n grey14Alpha,\n hcButtonFace,\n hcButtonText,\n hcCanvas,\n hcCanvasText,\n hcDisabled,\n hcHighlight,\n hcHighlightText,\n hcHyperlink,\n sharedColors,\n white,\n whiteAlpha,\n} from './components/Theme/index';\n\nexport type {\n AlphaColors,\n ColorVariants,\n GlobalSharedColors,\n Greys,\n TextAlignment,\n TextAlignments,\n} from './components/Theme/index';\n"],"sourceRoot":"../src/"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Default = void 0;
|
|
7
|
+
|
|
8
|
+
const React = /*#__PURE__*/require("react");
|
|
9
|
+
|
|
10
|
+
const Description_md_1 = /*#__PURE__*/require("./Description.md");
|
|
11
|
+
|
|
12
|
+
const react_1 = /*#__PURE__*/require("@fluentui/react");
|
|
13
|
+
|
|
14
|
+
const react_components_1 = /*#__PURE__*/require("@fluentui/react-components");
|
|
15
|
+
|
|
16
|
+
const index_1 = /*#__PURE__*/require("../../components/Button/index");
|
|
17
|
+
|
|
18
|
+
const useStyles = /*#__PURE__*/react_components_1.__styles({
|
|
19
|
+
"root": {
|
|
20
|
+
"mc9l5x": "f13qh94s",
|
|
21
|
+
"Budl1dq": "f1svr4aa",
|
|
22
|
+
"wkccdc": "f1u7ey36",
|
|
23
|
+
"a9b677": "f1acs6jw",
|
|
24
|
+
"Bmliigx": "fxe27oy",
|
|
25
|
+
"Bt984gj": "f122n59",
|
|
26
|
+
"B7hvi0a": "f1oiokrs",
|
|
27
|
+
"i8kkvl": "f18w1nra",
|
|
28
|
+
"Belr9w4": "fd7ph1c"
|
|
29
|
+
},
|
|
30
|
+
"componentName": {
|
|
31
|
+
"Bdqf98w": "f1a7i8kp",
|
|
32
|
+
"B6of3ja": "f1hu3pq6",
|
|
33
|
+
"t21cq0": ["f1pxv85q", "f1oou7ox"],
|
|
34
|
+
"jrapky": "f19f4twv",
|
|
35
|
+
"Frg6f3": ["f1tyq0we", "f11qmguv"]
|
|
36
|
+
}
|
|
37
|
+
}, {
|
|
38
|
+
"d": [".f13qh94s{display:grid;}", ".f1svr4aa{grid-template-columns:auto auto auto;}", ".f1u7ey36{grid-template-rows:1fr;}", ".f1acs6jw{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}", ".fxe27oy{-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f1oiokrs{justify-items:center;}", ".f18w1nra{-webkit-column-gap:10px;column-gap:10px;}", ".fd7ph1c{row-gap:10px;}", ".f1a7i8kp{justify-self:end;}", ".f1hu3pq6{margin-top:0;}", ".f1pxv85q{margin-right:10px;}", ".f1oou7ox{margin-left:10px;}", ".f19f4twv{margin-bottom:0;}", ".f1tyq0we{margin-left:0;}", ".f11qmguv{margin-right:0;}"]
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
const Default = () => {
|
|
42
|
+
const styles = useStyles();
|
|
43
|
+
return React.createElement("div", {
|
|
44
|
+
className: styles.root
|
|
45
|
+
}, React.createElement("h3", null, "v8"), React.createElement("h3", null, "DefaultButtonShim"), React.createElement("h3", null, "v9"), React.createElement(react_1.DefaultButton, null, "Default"), React.createElement(react_components_1.FluentProvider, {
|
|
46
|
+
theme: react_components_1.webLightTheme
|
|
47
|
+
}, React.createElement(index_1.DefaultButtonShim, null, "Default")), React.createElement(react_components_1.FluentProvider, {
|
|
48
|
+
theme: react_components_1.webLightTheme
|
|
49
|
+
}, React.createElement(react_components_1.Button, null, "Default")));
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
exports.Default = Default;
|
|
53
|
+
exports.default = {
|
|
54
|
+
title: 'Migration Shims/Button/DefaultButtonShim',
|
|
55
|
+
component: index_1.DefaultButtonShim,
|
|
56
|
+
parameters: {
|
|
57
|
+
docs: {
|
|
58
|
+
description: {
|
|
59
|
+
component: /*#__PURE__*/[Description_md_1.default].join('\n')
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
//# sourceMapp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BAAA,CAAA;EAAR,CAAf,EACE,KAAA,CAAA,aAAA,CAAC,kBAAA,CAAA,MAAD,EAAO,IAAP,EAAO,SAAP,CADF,CARF,CADF;AAcD,CAjBM;;AAAM,OAAA,CAAA,OAAA,GAAO,OAAP;AAmBb,OAAA,CAAA,OAAA,GAAe;EACb,KAAK,EAAE,0CADM;EAEb,SAAS,EAAE,OAAA,CAAA,iBAFE;EAGb,UAAU,EAAE;IACV,IAAI,EAAE;MACJ,WAAW,EAAE;QACX,SAAS,eAAE,CAAC,gBAAA,CAAA,OAAD,EAAgB,IAAhB,CAAqB,IAArB;MADA;IADT;EADI;AAHC,CAAf","sourcesContent":["import * as React from 'react';\n\nimport descriptionMd from './Description.md';\n\nimport { DefaultButton } from '@fluentui/react';\nimport { FluentProvider, Button, webLightTheme, makeStyles, shorthands } from '@fluentui/react-components';\nimport { DefaultButtonShim } from '../../components/Button/index';\n\nconst useStyles = makeStyles({\n root: {\n display: 'grid',\n gridTemplateColumns: 'auto auto auto',\n gridTemplateRows: '1fr',\n width: 'fit-content',\n alignContent: 'center',\n alignItems: 'center',\n justifyItems: 'center',\n columnGap: '10px',\n rowGap: '10px',\n },\n componentName: {\n justifySelf: 'end',\n ...shorthands.margin(0, '10px', 0, 0),\n },\n});\n\nexport const Default = () => {\n const styles = useStyles();\n\n return (\n <div className={styles.root}>\n <h3>v8</h3>\n <h3>DefaultButtonShim</h3>\n <h3>v9</h3>\n <DefaultButton>Default</DefaultButton>\n <FluentProvider theme={webLightTheme}>\n <DefaultButtonShim>Default</DefaultButtonShim>\n </FluentProvider>\n <FluentProvider theme={webLightTheme}>\n <Button>Default</Button>\n </FluentProvider>\n </div>\n );\n};\n\nexport default {\n title: 'Migration Shims/Button/DefaultButtonShim',\n component: DefaultButtonShim,\n parameters: {\n docs: {\n description: {\n component: [descriptionMd].join('\\n'),\n },\n },\n },\n};\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-migration-v8-v9",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Migration shim components and methods for hybrid v8/v9 applications building on Fluent UI React.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@ctrl/tinycolor": "3.3.4",
|
|
32
|
-
"@fluentui/react": "^8.99.
|
|
32
|
+
"@fluentui/react": "^8.99.1",
|
|
33
33
|
"@fluentui/react-components": "^9.6.1",
|
|
34
34
|
"@fluentui/react-theme": "^9.1.1",
|
|
35
35
|
"@fluentui/react-utilities": "^9.1.2",
|