@fluentui/react-theme 9.0.0-alpha.23
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 +786 -0
- package/CHANGELOG.md +317 -0
- package/LICENSE +15 -0
- package/README.md +5 -0
- package/dist/react-theme.d.ts +425 -0
- package/lib/alias/dark.d.ts +3 -0
- package/lib/alias/dark.js +123 -0
- package/lib/alias/dark.js.map +1 -0
- package/lib/alias/highContrast.d.ts +3 -0
- package/lib/alias/highContrast.js +123 -0
- package/lib/alias/highContrast.js.map +1 -0
- package/lib/alias/light.d.ts +3 -0
- package/lib/alias/light.js +123 -0
- package/lib/alias/light.js.map +1 -0
- package/lib/alias/teamsDark.d.ts +3 -0
- package/lib/alias/teamsDark.js +123 -0
- package/lib/alias/teamsDark.js.map +1 -0
- package/lib/global/borderRadius.d.ts +2 -0
- package/lib/global/borderRadius.js +9 -0
- package/lib/global/borderRadius.js.map +1 -0
- package/lib/global/brandColors.d.ts +4 -0
- package/lib/global/brandColors.js +37 -0
- package/lib/global/brandColors.js.map +1 -0
- package/lib/global/colors.d.ts +15 -0
- package/lib/global/colors.js +825 -0
- package/lib/global/colors.js.map +1 -0
- package/lib/global/fonts.d.ts +6 -0
- package/lib/global/fonts.js +51 -0
- package/lib/global/fonts.js.map +1 -0
- package/lib/global/index.d.ts +5 -0
- package/lib/global/index.js +6 -0
- package/lib/global/index.js.map +1 -0
- package/lib/global/strokeWidths.d.ts +2 -0
- package/lib/global/strokeWidths.js +7 -0
- package/lib/global/strokeWidths.js.map +1 -0
- package/lib/global/utils.d.ts +2 -0
- package/lib/global/utils.js +37 -0
- package/lib/global/utils.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -0
- package/lib/themes/index.d.ts +2 -0
- package/lib/themes/index.js +3 -0
- package/lib/themes/index.js.map +1 -0
- package/lib/themes/teams/darkTheme.d.ts +2 -0
- package/lib/themes/teams/darkTheme.js +4 -0
- package/lib/themes/teams/darkTheme.js.map +1 -0
- package/lib/themes/teams/highContrastTheme.d.ts +2 -0
- package/lib/themes/teams/highContrastTheme.js +4 -0
- package/lib/themes/teams/highContrastTheme.js.map +1 -0
- package/lib/themes/teams/index.d.ts +3 -0
- package/lib/themes/teams/index.js +4 -0
- package/lib/themes/teams/index.js.map +1 -0
- package/lib/themes/teams/lightTheme.d.ts +2 -0
- package/lib/themes/teams/lightTheme.js +4 -0
- package/lib/themes/teams/lightTheme.js.map +1 -0
- package/lib/themes/web/darkTheme.d.ts +2 -0
- package/lib/themes/web/darkTheme.js +4 -0
- package/lib/themes/web/darkTheme.js.map +1 -0
- package/lib/themes/web/highContrastTheme.d.ts +2 -0
- package/lib/themes/web/highContrastTheme.js +4 -0
- package/lib/themes/web/highContrastTheme.js.map +1 -0
- package/lib/themes/web/index.d.ts +3 -0
- package/lib/themes/web/index.js +4 -0
- package/lib/themes/web/index.js.map +1 -0
- package/lib/themes/web/lightTheme.d.ts +2 -0
- package/lib/themes/web/lightTheme.js +4 -0
- package/lib/themes/web/lightTheme.js.map +1 -0
- package/lib/tsdoc-metadata.json +11 -0
- package/lib/types.d.ts +333 -0
- package/lib/types.js +2 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/createDarkTheme.d.ts +2 -0
- package/lib/utils/createDarkTheme.js +17 -0
- package/lib/utils/createDarkTheme.js.map +1 -0
- package/lib/utils/createHighContrastTheme.d.ts +2 -0
- package/lib/utils/createHighContrastTheme.js +17 -0
- package/lib/utils/createHighContrastTheme.js.map +1 -0
- package/lib/utils/createLightTheme.d.ts +2 -0
- package/lib/utils/createLightTheme.js +17 -0
- package/lib/utils/createLightTheme.js.map +1 -0
- package/lib/utils/createTeamsDarkTheme.d.ts +2 -0
- package/lib/utils/createTeamsDarkTheme.js +17 -0
- package/lib/utils/createTeamsDarkTheme.js.map +1 -0
- package/lib/utils/index.d.ts +6 -0
- package/lib/utils/index.js +7 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/mergeThemes.d.ts +8 -0
- package/lib/utils/mergeThemes.js +71 -0
- package/lib/utils/mergeThemes.js.map +1 -0
- package/lib/utils/shadows.d.ts +2 -0
- package/lib/utils/shadows.js +11 -0
- package/lib/utils/shadows.js.map +1 -0
- package/lib/utils/themeToCSSVariables.d.ts +2 -0
- package/lib/utils/themeToCSSVariables.js +29 -0
- package/lib/utils/themeToCSSVariables.js.map +1 -0
- package/lib-amd/alias/dark.d.ts +3 -0
- package/lib-amd/alias/dark.js +129 -0
- package/lib-amd/alias/dark.js.map +1 -0
- package/lib-amd/alias/highContrast.d.ts +3 -0
- package/lib-amd/alias/highContrast.js +129 -0
- package/lib-amd/alias/highContrast.js.map +1 -0
- package/lib-amd/alias/light.d.ts +3 -0
- package/lib-amd/alias/light.js +129 -0
- package/lib-amd/alias/light.js.map +1 -0
- package/lib-amd/alias/teamsDark.d.ts +3 -0
- package/lib-amd/alias/teamsDark.js +129 -0
- package/lib-amd/alias/teamsDark.js.map +1 -0
- package/lib-amd/global/borderRadius.d.ts +2 -0
- package/lib-amd/global/borderRadius.js +14 -0
- package/lib-amd/global/borderRadius.js.map +1 -0
- package/lib-amd/global/brandColors.d.ts +4 -0
- package/lib-amd/global/brandColors.js +42 -0
- package/lib-amd/global/brandColors.js.map +1 -0
- package/lib-amd/global/colors.d.ts +15 -0
- package/lib-amd/global/colors.js +830 -0
- package/lib-amd/global/colors.js.map +1 -0
- package/lib-amd/global/fonts.d.ts +6 -0
- package/lib-amd/global/fonts.js +58 -0
- package/lib-amd/global/fonts.js.map +1 -0
- package/lib-amd/global/index.d.ts +5 -0
- package/lib-amd/global/index.js +10 -0
- package/lib-amd/global/index.js.map +1 -0
- package/lib-amd/global/strokeWidths.d.ts +2 -0
- package/lib-amd/global/strokeWidths.js +12 -0
- package/lib-amd/global/strokeWidths.js.map +1 -0
- package/lib-amd/global/utils.d.ts +2 -0
- package/lib-amd/global/utils.js +35 -0
- package/lib-amd/global/utils.js.map +1 -0
- package/lib-amd/index.d.ts +4 -0
- package/lib-amd/index.js +9 -0
- package/lib-amd/index.js.map +1 -0
- package/lib-amd/themes/index.d.ts +2 -0
- package/lib-amd/themes/index.js +7 -0
- package/lib-amd/themes/index.js.map +1 -0
- package/lib-amd/themes/teams/darkTheme.d.ts +2 -0
- package/lib-amd/themes/teams/darkTheme.js +7 -0
- package/lib-amd/themes/teams/darkTheme.js.map +1 -0
- package/lib-amd/themes/teams/highContrastTheme.d.ts +2 -0
- package/lib-amd/themes/teams/highContrastTheme.js +7 -0
- package/lib-amd/themes/teams/highContrastTheme.js.map +1 -0
- package/lib-amd/themes/teams/index.d.ts +3 -0
- package/lib-amd/themes/teams/index.js +8 -0
- package/lib-amd/themes/teams/index.js.map +1 -0
- package/lib-amd/themes/teams/lightTheme.d.ts +2 -0
- package/lib-amd/themes/teams/lightTheme.js +7 -0
- package/lib-amd/themes/teams/lightTheme.js.map +1 -0
- package/lib-amd/themes/web/darkTheme.d.ts +2 -0
- package/lib-amd/themes/web/darkTheme.js +7 -0
- package/lib-amd/themes/web/darkTheme.js.map +1 -0
- package/lib-amd/themes/web/highContrastTheme.d.ts +2 -0
- package/lib-amd/themes/web/highContrastTheme.js +7 -0
- package/lib-amd/themes/web/highContrastTheme.js.map +1 -0
- package/lib-amd/themes/web/index.d.ts +3 -0
- package/lib-amd/themes/web/index.js +8 -0
- package/lib-amd/themes/web/index.js.map +1 -0
- package/lib-amd/themes/web/lightTheme.d.ts +2 -0
- package/lib-amd/themes/web/lightTheme.js +7 -0
- package/lib-amd/themes/web/lightTheme.js.map +1 -0
- package/lib-amd/types.d.ts +333 -0
- package/lib-amd/types.js +5 -0
- package/lib-amd/types.js.map +1 -0
- package/lib-amd/utils/createDarkTheme.d.ts +2 -0
- package/lib-amd/utils/createDarkTheme.js +17 -0
- package/lib-amd/utils/createDarkTheme.js.map +1 -0
- package/lib-amd/utils/createHighContrastTheme.d.ts +2 -0
- package/lib-amd/utils/createHighContrastTheme.js +17 -0
- package/lib-amd/utils/createHighContrastTheme.js.map +1 -0
- package/lib-amd/utils/createLightTheme.d.ts +2 -0
- package/lib-amd/utils/createLightTheme.js +17 -0
- package/lib-amd/utils/createLightTheme.js.map +1 -0
- package/lib-amd/utils/createTeamsDarkTheme.d.ts +2 -0
- package/lib-amd/utils/createTeamsDarkTheme.js +17 -0
- package/lib-amd/utils/createTeamsDarkTheme.js.map +1 -0
- package/lib-amd/utils/index.d.ts +6 -0
- package/lib-amd/utils/index.js +12 -0
- package/lib-amd/utils/index.js.map +1 -0
- package/lib-amd/utils/mergeThemes.d.ts +8 -0
- package/lib-amd/utils/mergeThemes.js +66 -0
- package/lib-amd/utils/mergeThemes.js.map +1 -0
- package/lib-amd/utils/shadows.d.ts +2 -0
- package/lib-amd/utils/shadows.js +17 -0
- package/lib-amd/utils/shadows.js.map +1 -0
- package/lib-amd/utils/themeToCSSVariables.d.ts +2 -0
- package/lib-amd/utils/themeToCSSVariables.js +28 -0
- package/lib-amd/utils/themeToCSSVariables.js.map +1 -0
- package/lib-commonjs/alias/dark.d.ts +3 -0
- package/lib-commonjs/alias/dark.js +132 -0
- package/lib-commonjs/alias/dark.js.map +1 -0
- package/lib-commonjs/alias/highContrast.d.ts +3 -0
- package/lib-commonjs/alias/highContrast.js +132 -0
- package/lib-commonjs/alias/highContrast.js.map +1 -0
- package/lib-commonjs/alias/light.d.ts +3 -0
- package/lib-commonjs/alias/light.js +132 -0
- package/lib-commonjs/alias/light.js.map +1 -0
- package/lib-commonjs/alias/teamsDark.d.ts +3 -0
- package/lib-commonjs/alias/teamsDark.js +132 -0
- package/lib-commonjs/alias/teamsDark.js.map +1 -0
- package/lib-commonjs/global/borderRadius.d.ts +2 -0
- package/lib-commonjs/global/borderRadius.js +15 -0
- package/lib-commonjs/global/borderRadius.js.map +1 -0
- package/lib-commonjs/global/brandColors.d.ts +4 -0
- package/lib-commonjs/global/brandColors.js +43 -0
- package/lib-commonjs/global/brandColors.js.map +1 -0
- package/lib-commonjs/global/colors.d.ts +15 -0
- package/lib-commonjs/global/colors.js +831 -0
- package/lib-commonjs/global/colors.js.map +1 -0
- package/lib-commonjs/global/fonts.d.ts +6 -0
- package/lib-commonjs/global/fonts.js +57 -0
- package/lib-commonjs/global/fonts.js.map +1 -0
- package/lib-commonjs/global/index.d.ts +5 -0
- package/lib-commonjs/global/index.js +18 -0
- package/lib-commonjs/global/index.js.map +1 -0
- package/lib-commonjs/global/strokeWidths.d.ts +2 -0
- package/lib-commonjs/global/strokeWidths.js +13 -0
- package/lib-commonjs/global/strokeWidths.js.map +1 -0
- package/lib-commonjs/global/utils.d.ts +2 -0
- package/lib-commonjs/global/utils.js +51 -0
- package/lib-commonjs/global/utils.js.map +1 -0
- package/lib-commonjs/index.d.ts +4 -0
- package/lib-commonjs/index.js +16 -0
- package/lib-commonjs/index.js.map +1 -0
- package/lib-commonjs/themes/index.d.ts +2 -0
- package/lib-commonjs/themes/index.js +12 -0
- package/lib-commonjs/themes/index.js.map +1 -0
- package/lib-commonjs/themes/teams/darkTheme.d.ts +2 -0
- package/lib-commonjs/themes/teams/darkTheme.js +13 -0
- package/lib-commonjs/themes/teams/darkTheme.js.map +1 -0
- package/lib-commonjs/themes/teams/highContrastTheme.d.ts +2 -0
- package/lib-commonjs/themes/teams/highContrastTheme.js +13 -0
- package/lib-commonjs/themes/teams/highContrastTheme.js.map +1 -0
- package/lib-commonjs/themes/teams/index.d.ts +3 -0
- package/lib-commonjs/themes/teams/index.js +14 -0
- package/lib-commonjs/themes/teams/index.js.map +1 -0
- package/lib-commonjs/themes/teams/lightTheme.d.ts +2 -0
- package/lib-commonjs/themes/teams/lightTheme.js +13 -0
- package/lib-commonjs/themes/teams/lightTheme.js.map +1 -0
- package/lib-commonjs/themes/web/darkTheme.d.ts +2 -0
- package/lib-commonjs/themes/web/darkTheme.js +13 -0
- package/lib-commonjs/themes/web/darkTheme.js.map +1 -0
- package/lib-commonjs/themes/web/highContrastTheme.d.ts +2 -0
- package/lib-commonjs/themes/web/highContrastTheme.js +13 -0
- package/lib-commonjs/themes/web/highContrastTheme.js.map +1 -0
- package/lib-commonjs/themes/web/index.d.ts +3 -0
- package/lib-commonjs/themes/web/index.js +14 -0
- package/lib-commonjs/themes/web/index.js.map +1 -0
- package/lib-commonjs/themes/web/lightTheme.d.ts +2 -0
- package/lib-commonjs/themes/web/lightTheme.js +13 -0
- package/lib-commonjs/themes/web/lightTheme.js.map +1 -0
- package/lib-commonjs/types.d.ts +333 -0
- package/lib-commonjs/types.js +6 -0
- package/lib-commonjs/types.js.map +1 -0
- package/lib-commonjs/utils/createDarkTheme.d.ts +2 -0
- package/lib-commonjs/utils/createDarkTheme.js +30 -0
- package/lib-commonjs/utils/createDarkTheme.js.map +1 -0
- package/lib-commonjs/utils/createHighContrastTheme.d.ts +2 -0
- package/lib-commonjs/utils/createHighContrastTheme.js +30 -0
- package/lib-commonjs/utils/createHighContrastTheme.js.map +1 -0
- package/lib-commonjs/utils/createLightTheme.d.ts +2 -0
- package/lib-commonjs/utils/createLightTheme.js +30 -0
- package/lib-commonjs/utils/createLightTheme.js.map +1 -0
- package/lib-commonjs/utils/createTeamsDarkTheme.d.ts +2 -0
- package/lib-commonjs/utils/createTeamsDarkTheme.js +30 -0
- package/lib-commonjs/utils/createTeamsDarkTheme.js.map +1 -0
- package/lib-commonjs/utils/index.d.ts +6 -0
- package/lib-commonjs/utils/index.js +28 -0
- package/lib-commonjs/utils/index.js.map +1 -0
- package/lib-commonjs/utils/mergeThemes.d.ts +8 -0
- package/lib-commonjs/utils/mergeThemes.js +81 -0
- package/lib-commonjs/utils/mergeThemes.js.map +1 -0
- package/lib-commonjs/utils/shadows.d.ts +2 -0
- package/lib-commonjs/utils/shadows.js +20 -0
- package/lib-commonjs/utils/shadows.js.map +1 -0
- package/lib-commonjs/utils/themeToCSSVariables.d.ts +2 -0
- package/lib-commonjs/utils/themeToCSSVariables.js +38 -0
- package/lib-commonjs/utils/themeToCSSVariables.js.map +1 -0
- package/package.json +52 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursive partial type.
|
|
3
|
+
*/
|
|
4
|
+
declare type RecursivePartial<T> = {
|
|
5
|
+
[P in keyof T]?: T[P] extends Array<infer I> ? Array<RecursivePartial<I>> : RecursivePartial<T[P]>;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Design tokens for neutral colors
|
|
9
|
+
*/
|
|
10
|
+
export declare type NeutralColorTokens = {
|
|
11
|
+
neutralForeground1: string;
|
|
12
|
+
neutralForeground2: string;
|
|
13
|
+
neutralForeground2Hover: string;
|
|
14
|
+
neutralForeground2Pressed: string;
|
|
15
|
+
neutralForeground2Selected: string;
|
|
16
|
+
neutralForeground2BrandHover: string;
|
|
17
|
+
neutralForeground2BrandPressed: string;
|
|
18
|
+
neutralForeground2BrandSelected: string;
|
|
19
|
+
neutralForeground3: string;
|
|
20
|
+
neutralForeground3Hover: string;
|
|
21
|
+
neutralForeground3Pressed: string;
|
|
22
|
+
neutralForeground3Selected: string;
|
|
23
|
+
neutralForeground3BrandHover: string;
|
|
24
|
+
neutralForeground3BrandPressed: string;
|
|
25
|
+
neutralForeground3BrandSelected: string;
|
|
26
|
+
neutralForeground4: string;
|
|
27
|
+
neutralForegroundDisabled: string;
|
|
28
|
+
brandForegroundLink: string;
|
|
29
|
+
brandForegroundLinkHover: string;
|
|
30
|
+
brandForegroundLinkPressed: string;
|
|
31
|
+
brandForegroundLinkSelected: string;
|
|
32
|
+
compoundBrandForeground1: string;
|
|
33
|
+
compoundBrandForeground1Hover: string;
|
|
34
|
+
compoundBrandForeground1Pressed: string;
|
|
35
|
+
brandForeground1: string;
|
|
36
|
+
brandForeground2: string;
|
|
37
|
+
neutralForegroundInverted: string;
|
|
38
|
+
neutralForegroundOnBrand: string;
|
|
39
|
+
neutralForegroundInvertedLink: string;
|
|
40
|
+
neutralForegroundInvertedLinkHover: string;
|
|
41
|
+
neutralForegroundInvertedLinkPressed: string;
|
|
42
|
+
neutralForegroundInvertedLinkSelected: string;
|
|
43
|
+
neutralBackground1: string;
|
|
44
|
+
neutralBackground1Hover: string;
|
|
45
|
+
neutralBackground1Pressed: string;
|
|
46
|
+
neutralBackground1Selected: string;
|
|
47
|
+
neutralBackground2: string;
|
|
48
|
+
neutralBackground2Hover: string;
|
|
49
|
+
neutralBackground2Pressed: string;
|
|
50
|
+
neutralBackground2Selected: string;
|
|
51
|
+
neutralBackground3: string;
|
|
52
|
+
neutralBackground3Hover: string;
|
|
53
|
+
neutralBackground3Pressed: string;
|
|
54
|
+
neutralBackground3Selected: string;
|
|
55
|
+
neutralBackground4: string;
|
|
56
|
+
neutralBackground4Hover: string;
|
|
57
|
+
neutralBackground4Pressed: string;
|
|
58
|
+
neutralBackground4Selected: string;
|
|
59
|
+
neutralBackground5: string;
|
|
60
|
+
neutralBackground5Hover: string;
|
|
61
|
+
neutralBackground5Pressed: string;
|
|
62
|
+
neutralBackground5Selected: string;
|
|
63
|
+
neutralBackground6: string;
|
|
64
|
+
neutralBackgroundInverted: string;
|
|
65
|
+
subtleBackground: string;
|
|
66
|
+
subtleBackgroundHover: string;
|
|
67
|
+
subtleBackgroundPressed: string;
|
|
68
|
+
subtleBackgroundSelected: string;
|
|
69
|
+
transparentBackground: string;
|
|
70
|
+
transparentBackgroundHover: string;
|
|
71
|
+
transparentBackgroundPressed: string;
|
|
72
|
+
transparentBackgroundSelected: string;
|
|
73
|
+
neutralBackgroundDisabled: string;
|
|
74
|
+
neutralStencil1: string;
|
|
75
|
+
neutralStencil2: string;
|
|
76
|
+
brandBackground: string;
|
|
77
|
+
brandBackgroundHover: string;
|
|
78
|
+
brandBackgroundPressed: string;
|
|
79
|
+
brandBackgroundSelected: string;
|
|
80
|
+
compoundBrandBackground: string;
|
|
81
|
+
compoundBrandBackgroundHover: string;
|
|
82
|
+
compoundBrandBackgroundPressed: string;
|
|
83
|
+
brandBackgroundStatic: string;
|
|
84
|
+
brandBackground2: string;
|
|
85
|
+
neutralStrokeAccessible: string;
|
|
86
|
+
neutralStrokeAccessibleHover: string;
|
|
87
|
+
neutralStrokeAccessiblePressed: string;
|
|
88
|
+
neutralStrokeAccessibleSelected: string;
|
|
89
|
+
neutralStroke1: string;
|
|
90
|
+
neutralStroke1Hover: string;
|
|
91
|
+
neutralStroke1Pressed: string;
|
|
92
|
+
neutralStroke1Selected: string;
|
|
93
|
+
neutralStroke2: string;
|
|
94
|
+
neutralStroke3: string;
|
|
95
|
+
brandStroke1: string;
|
|
96
|
+
brandStroke2: string;
|
|
97
|
+
compoundBrandStroke: string;
|
|
98
|
+
compoundBrandStrokeHover: string;
|
|
99
|
+
compoundBrandStrokePressed: string;
|
|
100
|
+
neutralStrokeDisabled: string;
|
|
101
|
+
transparentStroke: string;
|
|
102
|
+
transparentStrokeInteractive: string;
|
|
103
|
+
transparentStrokeDisabled: string;
|
|
104
|
+
strokeFocus1: string;
|
|
105
|
+
strokeFocus2: string;
|
|
106
|
+
neutralShadowAmbient: string;
|
|
107
|
+
neutralShadowKey: string;
|
|
108
|
+
neutralShadowAmbientLighter: string;
|
|
109
|
+
neutralShadowKeyLighter: string;
|
|
110
|
+
neutralShadowAmbientDarker: string;
|
|
111
|
+
neutralShadowKeyDarker: string;
|
|
112
|
+
brandShadowAmbient: string;
|
|
113
|
+
brandShadowKey: string;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Design tokens available for shared colors
|
|
117
|
+
*/
|
|
118
|
+
export declare type SharedColorTokens = {
|
|
119
|
+
background1: string;
|
|
120
|
+
background2: string;
|
|
121
|
+
background3: string;
|
|
122
|
+
foreground1: string;
|
|
123
|
+
foreground2: string;
|
|
124
|
+
foreground3: string;
|
|
125
|
+
borderActive: string;
|
|
126
|
+
border2: string;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Possible color variant values
|
|
130
|
+
*/
|
|
131
|
+
export declare type ColorVariants = {
|
|
132
|
+
shade50: string;
|
|
133
|
+
shade40: string;
|
|
134
|
+
shade30: string;
|
|
135
|
+
shade20: string;
|
|
136
|
+
shade10: string;
|
|
137
|
+
primary: string;
|
|
138
|
+
tint10: string;
|
|
139
|
+
tint20: string;
|
|
140
|
+
tint30: string;
|
|
141
|
+
tint40: string;
|
|
142
|
+
tint50: string;
|
|
143
|
+
tint60: string;
|
|
144
|
+
};
|
|
145
|
+
export declare type BrandVariants = ColorVariants & {
|
|
146
|
+
shade60: string;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* All the global shared colors and their shade/tint variants
|
|
150
|
+
*/
|
|
151
|
+
export declare type GlobalSharedColors = {
|
|
152
|
+
darkRed: ColorVariants;
|
|
153
|
+
burgundy: ColorVariants;
|
|
154
|
+
cranberry: ColorVariants;
|
|
155
|
+
red: ColorVariants;
|
|
156
|
+
darkOrange: ColorVariants;
|
|
157
|
+
bronze: ColorVariants;
|
|
158
|
+
pumpkin: ColorVariants;
|
|
159
|
+
orange: ColorVariants;
|
|
160
|
+
peach: ColorVariants;
|
|
161
|
+
marigold: ColorVariants;
|
|
162
|
+
yellow: ColorVariants;
|
|
163
|
+
gold: ColorVariants;
|
|
164
|
+
brass: ColorVariants;
|
|
165
|
+
brown: ColorVariants;
|
|
166
|
+
darkBrown: ColorVariants;
|
|
167
|
+
lime: ColorVariants;
|
|
168
|
+
forest: ColorVariants;
|
|
169
|
+
seafoam: ColorVariants;
|
|
170
|
+
lightGreen: ColorVariants;
|
|
171
|
+
green: ColorVariants;
|
|
172
|
+
darkGreen: ColorVariants;
|
|
173
|
+
lightTeal: ColorVariants;
|
|
174
|
+
teal: ColorVariants;
|
|
175
|
+
darkTeal: ColorVariants;
|
|
176
|
+
cyan: ColorVariants;
|
|
177
|
+
steel: ColorVariants;
|
|
178
|
+
lightBlue: ColorVariants;
|
|
179
|
+
blue: ColorVariants;
|
|
180
|
+
royalBlue: ColorVariants;
|
|
181
|
+
darkBlue: ColorVariants;
|
|
182
|
+
cornflower: ColorVariants;
|
|
183
|
+
navy: ColorVariants;
|
|
184
|
+
lavender: ColorVariants;
|
|
185
|
+
purple: ColorVariants;
|
|
186
|
+
darkPurple: ColorVariants;
|
|
187
|
+
orchid: ColorVariants;
|
|
188
|
+
grape: ColorVariants;
|
|
189
|
+
berry: ColorVariants;
|
|
190
|
+
lilac: ColorVariants;
|
|
191
|
+
pink: ColorVariants;
|
|
192
|
+
hotPink: ColorVariants;
|
|
193
|
+
magenta: ColorVariants;
|
|
194
|
+
plum: ColorVariants;
|
|
195
|
+
beige: ColorVariants;
|
|
196
|
+
mink: ColorVariants;
|
|
197
|
+
silver: ColorVariants;
|
|
198
|
+
platinum: ColorVariants;
|
|
199
|
+
anchor: ColorVariants;
|
|
200
|
+
charcoal: ColorVariants;
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Brand color variants by product
|
|
204
|
+
*/
|
|
205
|
+
export declare type ProductBrandColors = {
|
|
206
|
+
teams: BrandVariants;
|
|
207
|
+
web: BrandVariants;
|
|
208
|
+
};
|
|
209
|
+
export declare type FontSizes = {
|
|
210
|
+
base: {
|
|
211
|
+
100: string;
|
|
212
|
+
200: string;
|
|
213
|
+
300: string;
|
|
214
|
+
400: string;
|
|
215
|
+
500: string;
|
|
216
|
+
600: string;
|
|
217
|
+
};
|
|
218
|
+
hero: {
|
|
219
|
+
700: string;
|
|
220
|
+
800: string;
|
|
221
|
+
900: string;
|
|
222
|
+
1000: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
export declare type LineHeights = FontSizes;
|
|
226
|
+
export declare type FontWeights = {
|
|
227
|
+
regular: number;
|
|
228
|
+
medium: number;
|
|
229
|
+
semibold: number;
|
|
230
|
+
};
|
|
231
|
+
export declare type FontFamilies = {
|
|
232
|
+
base: string;
|
|
233
|
+
monospace: string;
|
|
234
|
+
numeric: string;
|
|
235
|
+
};
|
|
236
|
+
export declare type TextAlignment = 'inherit' | 'initial' | 'revert' | 'unset' | 'center' | 'end' | 'start' | 'justify' | 'left' | 'match-parent' | 'right';
|
|
237
|
+
export declare type TextAlignments = {
|
|
238
|
+
start: TextAlignment;
|
|
239
|
+
center: TextAlignment;
|
|
240
|
+
end: TextAlignment;
|
|
241
|
+
justify: TextAlignment;
|
|
242
|
+
};
|
|
243
|
+
export declare type BorderRadius = {
|
|
244
|
+
none: string;
|
|
245
|
+
small: string;
|
|
246
|
+
medium: string;
|
|
247
|
+
large: string;
|
|
248
|
+
xLarge: string;
|
|
249
|
+
circular: string;
|
|
250
|
+
};
|
|
251
|
+
export declare type StrokeWidths = {
|
|
252
|
+
thin: string;
|
|
253
|
+
thick: string;
|
|
254
|
+
thicker: string;
|
|
255
|
+
thickest: string;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Design tokens for shadow levels
|
|
259
|
+
*/
|
|
260
|
+
export declare type ShadowLevelTokens = {
|
|
261
|
+
shadow2: string;
|
|
262
|
+
shadow4: string;
|
|
263
|
+
shadow8: string;
|
|
264
|
+
shadow16: string;
|
|
265
|
+
shadow28: string;
|
|
266
|
+
shadow64: string;
|
|
267
|
+
};
|
|
268
|
+
export declare type GhostColorTokens = {
|
|
269
|
+
ghostBackground: string;
|
|
270
|
+
ghostBackgroundHover: string;
|
|
271
|
+
ghostBackgroundPressed: string;
|
|
272
|
+
ghostBackgroundSelected: string;
|
|
273
|
+
};
|
|
274
|
+
export declare type TransparentColorTokens = {
|
|
275
|
+
transparentBackground: string;
|
|
276
|
+
transparentBackgroundHover: string;
|
|
277
|
+
transparentBackgroundPressed: string;
|
|
278
|
+
transparentBackgroundSelected: string;
|
|
279
|
+
};
|
|
280
|
+
export declare type BackgroundColorTokens = {
|
|
281
|
+
background: string;
|
|
282
|
+
backgroundHover: string;
|
|
283
|
+
backgroundPressed: string;
|
|
284
|
+
backgroundSelected: string;
|
|
285
|
+
};
|
|
286
|
+
export declare type BrandColorTokens = {
|
|
287
|
+
brandBackground: string;
|
|
288
|
+
brandBackgroundHover: string;
|
|
289
|
+
brandBackgroundPressed: string;
|
|
290
|
+
brandBackgroundSelected: string;
|
|
291
|
+
brandBackgroundStatic: string;
|
|
292
|
+
};
|
|
293
|
+
export declare type Greys = 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 76 | 78 | 80 | 82 | 84 | 86 | 88 | 90 | 92 | 94 | 96 | 98 | 100;
|
|
294
|
+
export declare type AlphaColors = 5 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90;
|
|
295
|
+
export declare type Theme = {
|
|
296
|
+
global: {
|
|
297
|
+
color: {
|
|
298
|
+
black: string;
|
|
299
|
+
white: string;
|
|
300
|
+
hcHyperlink: string;
|
|
301
|
+
hcHighlight: string;
|
|
302
|
+
hcDisabled: string;
|
|
303
|
+
hcCanvas: string;
|
|
304
|
+
hcCanvasText: string;
|
|
305
|
+
hcHighlightText: string;
|
|
306
|
+
hcButtonText: string;
|
|
307
|
+
hcButtonFace: string;
|
|
308
|
+
};
|
|
309
|
+
palette: GlobalSharedColors & {
|
|
310
|
+
brand: BrandVariants;
|
|
311
|
+
grey: Record<Greys, string>;
|
|
312
|
+
whiteAlpha: Record<AlphaColors, string>;
|
|
313
|
+
blackAlpha: Record<AlphaColors, string>;
|
|
314
|
+
};
|
|
315
|
+
type: {
|
|
316
|
+
fontSizes: FontSizes;
|
|
317
|
+
fontWeights: FontWeights;
|
|
318
|
+
fontFamilies: FontFamilies;
|
|
319
|
+
lineHeights: LineHeights;
|
|
320
|
+
alignment: TextAlignments;
|
|
321
|
+
};
|
|
322
|
+
borderRadius: BorderRadius;
|
|
323
|
+
strokeWidth: StrokeWidths;
|
|
324
|
+
};
|
|
325
|
+
alias: {
|
|
326
|
+
color: Record<keyof GlobalSharedColors, SharedColorTokens> & {
|
|
327
|
+
neutral: NeutralColorTokens;
|
|
328
|
+
};
|
|
329
|
+
shadow: ShadowLevelTokens;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
export declare type PartialTheme = RecursivePartial<Theme>;
|
|
333
|
+
export {};
|
package/lib-amd/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"../src/","sources":["types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Recursive partial type.\n */\ntype RecursivePartial<T> = {\n [P in keyof T]?: T[P] extends Array<infer I> ? Array<RecursivePartial<I>> : RecursivePartial<T[P]>;\n};\n\n/**\n * Design tokens for neutral colors\n */\nexport type NeutralColorTokens = {\n // https://www.figma.com/file/KB9oUjMKen2cKnyPG7RgdS/Design-tokens-superset?node-id=1963%3A17486\n neutralForeground1: string;\n neutralForeground2: string;\n neutralForeground2Hover: string;\n neutralForeground2Pressed: string;\n neutralForeground2Selected: string;\n neutralForeground2BrandHover: string;\n neutralForeground2BrandPressed: string;\n neutralForeground2BrandSelected: string;\n neutralForeground3: string;\n neutralForeground3Hover: string;\n neutralForeground3Pressed: string;\n neutralForeground3Selected: string;\n neutralForeground3BrandHover: string;\n neutralForeground3BrandPressed: string;\n neutralForeground3BrandSelected: string;\n neutralForeground4: string;\n neutralForegroundDisabled: string;\n brandForegroundLink: string;\n brandForegroundLinkHover: string;\n brandForegroundLinkPressed: string;\n brandForegroundLinkSelected: string;\n compoundBrandForeground1: string;\n compoundBrandForeground1Hover: string;\n compoundBrandForeground1Pressed: string;\n brandForeground1: string;\n brandForeground2: string;\n neutralForegroundInverted: string;\n neutralForegroundOnBrand: string;\n neutralForegroundInvertedLink: string;\n neutralForegroundInvertedLinkHover: string;\n neutralForegroundInvertedLinkPressed: string;\n neutralForegroundInvertedLinkSelected: string;\n neutralBackground1: string;\n neutralBackground1Hover: string;\n neutralBackground1Pressed: string;\n neutralBackground1Selected: string;\n neutralBackground2: string;\n neutralBackground2Hover: string;\n neutralBackground2Pressed: string;\n neutralBackground2Selected: string;\n neutralBackground3: string;\n neutralBackground3Hover: string;\n neutralBackground3Pressed: string;\n neutralBackground3Selected: string;\n neutralBackground4: string;\n neutralBackground4Hover: string;\n neutralBackground4Pressed: string;\n neutralBackground4Selected: string;\n neutralBackground5: string;\n neutralBackground5Hover: string;\n neutralBackground5Pressed: string;\n neutralBackground5Selected: string;\n neutralBackground6: string;\n neutralBackgroundInverted: string;\n subtleBackground: string;\n subtleBackgroundHover: string;\n subtleBackgroundPressed: string;\n subtleBackgroundSelected: string;\n transparentBackground: string;\n transparentBackgroundHover: string;\n transparentBackgroundPressed: string;\n transparentBackgroundSelected: string;\n neutralBackgroundDisabled: string;\n neutralStencil1: string;\n neutralStencil2: string;\n brandBackground: string;\n brandBackgroundHover: string;\n brandBackgroundPressed: string;\n brandBackgroundSelected: string;\n compoundBrandBackground: string;\n compoundBrandBackgroundHover: string;\n compoundBrandBackgroundPressed: string;\n brandBackgroundStatic: string;\n brandBackground2: string;\n neutralStrokeAccessible: string;\n neutralStrokeAccessibleHover: string;\n neutralStrokeAccessiblePressed: string;\n neutralStrokeAccessibleSelected: string;\n neutralStroke1: string;\n neutralStroke1Hover: string;\n neutralStroke1Pressed: string;\n neutralStroke1Selected: string;\n neutralStroke2: string;\n neutralStroke3: string;\n brandStroke1: string;\n brandStroke2: string;\n compoundBrandStroke: string;\n compoundBrandStrokeHover: string;\n compoundBrandStrokePressed: string;\n neutralStrokeDisabled: string;\n transparentStroke: string;\n transparentStrokeInteractive: string;\n transparentStrokeDisabled: string;\n strokeFocus1: string;\n strokeFocus2: string;\n neutralShadowAmbient: string;\n neutralShadowKey: string;\n neutralShadowAmbientLighter: string;\n neutralShadowKeyLighter: string;\n neutralShadowAmbientDarker: string;\n neutralShadowKeyDarker: string;\n brandShadowAmbient: string;\n brandShadowKey: string;\n};\n\n/**\n * Design tokens available for shared colors\n */\nexport type SharedColorTokens = {\n background1: string;\n background2: string;\n background3: string;\n foreground1: string;\n foreground2: string;\n foreground3: string;\n borderActive: string;\n border2: string;\n};\n\n/**\n * Possible color variant values\n */\nexport type ColorVariants = {\n shade50: string;\n shade40: string;\n shade30: string;\n shade20: string;\n shade10: string;\n primary: string;\n tint10: string;\n tint20: string;\n tint30: string;\n tint40: string;\n tint50: string;\n tint60: string;\n};\n\nexport type BrandVariants = ColorVariants & { shade60: string };\n\n/**\n * All the global shared colors and their shade/tint variants\n */\nexport type GlobalSharedColors = {\n darkRed: ColorVariants;\n burgundy: ColorVariants;\n cranberry: ColorVariants;\n red: ColorVariants;\n darkOrange: ColorVariants;\n bronze: ColorVariants;\n pumpkin: ColorVariants;\n orange: ColorVariants;\n peach: ColorVariants;\n marigold: ColorVariants;\n yellow: ColorVariants;\n gold: ColorVariants;\n brass: ColorVariants;\n brown: ColorVariants;\n darkBrown: ColorVariants;\n lime: ColorVariants;\n forest: ColorVariants;\n seafoam: ColorVariants;\n lightGreen: ColorVariants;\n green: ColorVariants;\n darkGreen: ColorVariants;\n lightTeal: ColorVariants;\n teal: ColorVariants;\n darkTeal: ColorVariants;\n cyan: ColorVariants;\n steel: ColorVariants;\n lightBlue: ColorVariants;\n blue: ColorVariants;\n royalBlue: ColorVariants;\n darkBlue: ColorVariants;\n cornflower: ColorVariants;\n navy: ColorVariants;\n lavender: ColorVariants;\n purple: ColorVariants;\n darkPurple: ColorVariants;\n orchid: ColorVariants;\n grape: ColorVariants;\n berry: ColorVariants;\n lilac: ColorVariants;\n pink: ColorVariants;\n hotPink: ColorVariants;\n magenta: ColorVariants;\n plum: ColorVariants;\n beige: ColorVariants;\n mink: ColorVariants;\n silver: ColorVariants;\n platinum: ColorVariants;\n anchor: ColorVariants;\n charcoal: ColorVariants;\n};\n\n/**\n * Brand color variants by product\n */\nexport type ProductBrandColors = {\n teams: BrandVariants;\n web: BrandVariants;\n};\n\nexport type FontSizes = {\n base: {\n 100: string;\n 200: string;\n 300: string;\n 400: string;\n 500: string;\n 600: string;\n };\n hero: {\n 700: string;\n 800: string;\n 900: string;\n 1000: string;\n };\n};\n\nexport type LineHeights = FontSizes;\n\nexport type FontWeights = {\n regular: number;\n medium: number;\n semibold: number;\n};\n\nexport type FontFamilies = {\n base: string;\n monospace: string;\n numeric: string;\n};\n\nexport type TextAlignment =\n | 'inherit'\n | 'initial'\n | 'revert'\n | 'unset'\n | 'center'\n | 'end'\n | 'start'\n | 'justify'\n | 'left'\n | 'match-parent'\n | 'right';\n\nexport type TextAlignments = {\n start: TextAlignment;\n center: TextAlignment;\n end: TextAlignment;\n justify: TextAlignment;\n};\n\nexport type BorderRadius = {\n none: string;\n small: string;\n medium: string;\n large: string;\n xLarge: string;\n circular: string;\n};\n\nexport type StrokeWidths = {\n thin: string;\n thick: string;\n thicker: string;\n thickest: string;\n};\n\n/**\n * Design tokens for shadow levels\n */\nexport type ShadowLevelTokens = {\n shadow2: string;\n shadow4: string;\n shadow8: string;\n shadow16: string;\n shadow28: string;\n shadow64: string;\n};\n\nexport type GhostColorTokens = {\n ghostBackground: string;\n ghostBackgroundHover: string;\n ghostBackgroundPressed: string;\n ghostBackgroundSelected: string;\n};\n\nexport type TransparentColorTokens = {\n transparentBackground: string;\n transparentBackgroundHover: string;\n transparentBackgroundPressed: string;\n transparentBackgroundSelected: string;\n};\n\nexport type BackgroundColorTokens = {\n background: string;\n backgroundHover: string;\n backgroundPressed: string;\n backgroundSelected: string;\n};\n\nexport type BrandColorTokens = {\n brandBackground: string;\n brandBackgroundHover: string;\n brandBackgroundPressed: string;\n brandBackgroundSelected: string;\n brandBackgroundStatic: string;\n // FIXME: the rest is unclear in the spec\n};\n\nexport type Greys =\n | 0\n | 2\n | 4\n | 6\n | 8\n | 10\n | 12\n | 14\n | 16\n | 18\n | 20\n | 22\n | 24\n | 26\n | 28\n | 30\n | 32\n | 34\n | 36\n | 38\n | 40\n | 42\n | 44\n | 46\n | 48\n | 50\n | 52\n | 54\n | 56\n | 58\n | 60\n | 62\n | 64\n | 66\n | 68\n | 70\n | 72\n | 74\n | 76\n | 78\n | 80\n | 82\n | 84\n | 86\n | 88\n | 90\n | 92\n | 94\n | 96\n | 98\n | 100;\n\nexport type AlphaColors = 5 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90;\n\n// TODO: do we want to split theme for better tree shaking? (MUI)\n// But will this end up in the bundle at all? It should be used only in makeStyles and should be removed during build\nexport type Theme = {\n global: {\n // TODO: this means \"static\", will not change with light/dark/contrast switch. better named static?\n // TODO: Shift: we should move global away from theme, this is not themable\n // ThemeProvider should not inject these css variables?\n color: {\n black: string;\n white: string;\n hcHyperlink: string;\n hcHighlight: string;\n hcDisabled: string;\n hcCanvas: string;\n hcCanvasText: string;\n hcHighlightText: string;\n hcButtonText: string;\n hcButtonFace: string;\n };\n palette: GlobalSharedColors & {\n brand: BrandVariants; // Only the Theme brand, not all\n grey: Record<Greys, string>;\n whiteAlpha: Record<AlphaColors, string>;\n blackAlpha: Record<AlphaColors, string>;\n };\n type: {\n fontSizes: FontSizes;\n fontWeights: FontWeights;\n fontFamilies: FontFamilies;\n lineHeights: LineHeights;\n alignment: TextAlignments;\n };\n borderRadius: BorderRadius;\n strokeWidth: StrokeWidths;\n };\n alias: {\n color: Record<keyof GlobalSharedColors, SharedColorTokens> & {\n neutral: NeutralColorTokens;\n };\n shadow: ShadowLevelTokens;\n };\n};\n\n// TODO: fix shape\nexport type PartialTheme = RecursivePartial<Theme>;\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./shadows", "../alias/dark", "../global/utils"], function (require, exports, tslib_1, shadows_1, dark_1, utils_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.createDarkTheme = void 0;
|
|
5
|
+
var createDarkTheme = function (brand) {
|
|
6
|
+
var global = utils_1.createGlobalTheme(brand);
|
|
7
|
+
return {
|
|
8
|
+
global: global,
|
|
9
|
+
alias: {
|
|
10
|
+
color: tslib_1.__assign(tslib_1.__assign({}, dark_1.generateSharedColorTokens(global.palette)), { neutral: dark_1.neutralColorTokens }),
|
|
11
|
+
shadow: shadows_1.createShadowLevelTokens(dark_1.neutralColorTokens.neutralShadowAmbient, dark_1.neutralColorTokens.neutralShadowKey),
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.createDarkTheme = createDarkTheme;
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=createDarkTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDarkTheme.js","sourceRoot":"../src/","sources":["utils/createDarkTheme.ts"],"names":[],"mappings":";;;;IAKO,IAAM,eAAe,GAAoC,UAAA,KAAK;QACnE,IAAM,MAAM,GAAG,yBAAiB,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO;YACL,MAAM,QAAA;YACN,KAAK,EAAE;gBACL,KAAK,EAAE,sCACF,gCAAyB,CAAC,MAAM,CAAC,OAAO,CAAC,KAC5C,OAAO,EAAE,yBAAkB,GACD;gBAC5B,MAAM,EAAE,iCAAuB,CAAC,yBAAkB,CAAC,oBAAoB,EAAE,yBAAkB,CAAC,gBAAgB,CAAC;aAC9G;SACF,CAAC;IACJ,CAAC,CAAC;IAZW,QAAA,eAAe,mBAY1B","sourcesContent":["import { createShadowLevelTokens } from './shadows';\nimport { generateSharedColorTokens, neutralColorTokens } from '../alias/dark';\nimport { createGlobalTheme } from '../global/utils';\nimport type { BrandVariants, Theme } from '../types';\n\nexport const createDarkTheme: (brand: BrandVariants) => Theme = brand => {\n const global = createGlobalTheme(brand);\n return {\n global,\n alias: {\n color: {\n ...generateSharedColorTokens(global.palette),\n neutral: neutralColorTokens,\n } as Theme['alias']['color'],\n shadow: createShadowLevelTokens(neutralColorTokens.neutralShadowAmbient, neutralColorTokens.neutralShadowKey),\n },\n };\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./shadows", "../alias/highContrast", "../global/utils"], function (require, exports, tslib_1, shadows_1, highContrast_1, utils_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.createHighContrastTheme = void 0;
|
|
5
|
+
var createHighContrastTheme = function (brand) {
|
|
6
|
+
var global = utils_1.createGlobalTheme(brand);
|
|
7
|
+
return {
|
|
8
|
+
global: global,
|
|
9
|
+
alias: {
|
|
10
|
+
color: tslib_1.__assign(tslib_1.__assign({}, highContrast_1.generateSharedColorTokens(global.palette)), { neutral: highContrast_1.neutralColorTokens }),
|
|
11
|
+
shadow: shadows_1.createShadowLevelTokens(highContrast_1.neutralColorTokens.neutralShadowAmbient, highContrast_1.neutralColorTokens.neutralShadowKey),
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.createHighContrastTheme = createHighContrastTheme;
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=createHighContrastTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createHighContrastTheme.js","sourceRoot":"../src/","sources":["utils/createHighContrastTheme.ts"],"names":[],"mappings":";;;;IAKO,IAAM,uBAAuB,GAAoC,UAAA,KAAK;QAC3E,IAAM,MAAM,GAAG,yBAAiB,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO;YACL,MAAM,QAAA;YACN,KAAK,EAAE;gBACL,KAAK,EAAE,sCACF,wCAAyB,CAAC,MAAM,CAAC,OAAO,CAAC,KAC5C,OAAO,EAAE,iCAAkB,GACD;gBAC5B,MAAM,EAAE,iCAAuB,CAAC,iCAAkB,CAAC,oBAAoB,EAAE,iCAAkB,CAAC,gBAAgB,CAAC;aAC9G;SACF,CAAC;IACJ,CAAC,CAAC;IAZW,QAAA,uBAAuB,2BAYlC","sourcesContent":["import { createShadowLevelTokens } from './shadows';\nimport { generateSharedColorTokens, neutralColorTokens } from '../alias/highContrast';\nimport { createGlobalTheme } from '../global/utils';\nimport type { BrandVariants, Theme } from '../types';\n\nexport const createHighContrastTheme: (brand: BrandVariants) => Theme = brand => {\n const global = createGlobalTheme(brand);\n return {\n global,\n alias: {\n color: {\n ...generateSharedColorTokens(global.palette),\n neutral: neutralColorTokens,\n } as Theme['alias']['color'],\n shadow: createShadowLevelTokens(neutralColorTokens.neutralShadowAmbient, neutralColorTokens.neutralShadowKey),\n },\n };\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./shadows", "../alias/light", "../global/utils"], function (require, exports, tslib_1, shadows_1, light_1, utils_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.createLightTheme = void 0;
|
|
5
|
+
var createLightTheme = function (brand) {
|
|
6
|
+
var global = utils_1.createGlobalTheme(brand);
|
|
7
|
+
return {
|
|
8
|
+
global: global,
|
|
9
|
+
alias: {
|
|
10
|
+
color: tslib_1.__assign(tslib_1.__assign({}, light_1.generateSharedColorTokens(global.palette)), { neutral: light_1.neutralColorTokens }),
|
|
11
|
+
shadow: shadows_1.createShadowLevelTokens(light_1.neutralColorTokens.neutralShadowAmbient, light_1.neutralColorTokens.neutralShadowKey),
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.createLightTheme = createLightTheme;
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=createLightTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLightTheme.js","sourceRoot":"../src/","sources":["utils/createLightTheme.ts"],"names":[],"mappings":";;;;IAKO,IAAM,gBAAgB,GAAoC,UAAA,KAAK;QACpE,IAAM,MAAM,GAAG,yBAAiB,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO;YACL,MAAM,QAAA;YACN,KAAK,EAAE;gBACL,KAAK,EAAE,sCACF,iCAAyB,CAAC,MAAM,CAAC,OAAO,CAAC,KAC5C,OAAO,EAAE,0BAAkB,GACD;gBAC5B,MAAM,EAAE,iCAAuB,CAAC,0BAAkB,CAAC,oBAAoB,EAAE,0BAAkB,CAAC,gBAAgB,CAAC;aAC9G;SACF,CAAC;IACJ,CAAC,CAAC;IAZW,QAAA,gBAAgB,oBAY3B","sourcesContent":["import { createShadowLevelTokens } from './shadows';\nimport { generateSharedColorTokens, neutralColorTokens } from '../alias/light';\nimport { createGlobalTheme } from '../global/utils';\nimport type { BrandVariants, Theme } from '../types';\n\nexport const createLightTheme: (brand: BrandVariants) => Theme = brand => {\n const global = createGlobalTheme(brand);\n return {\n global,\n alias: {\n color: {\n ...generateSharedColorTokens(global.palette),\n neutral: neutralColorTokens,\n } as Theme['alias']['color'],\n shadow: createShadowLevelTokens(neutralColorTokens.neutralShadowAmbient, neutralColorTokens.neutralShadowKey),\n },\n };\n};\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./shadows", "../alias/teamsDark", "../global/utils"], function (require, exports, tslib_1, shadows_1, teamsDark_1, utils_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.createTeamsDarkTheme = void 0;
|
|
5
|
+
var createTeamsDarkTheme = function (brand) {
|
|
6
|
+
var global = utils_1.createGlobalTheme(brand);
|
|
7
|
+
return {
|
|
8
|
+
global: global,
|
|
9
|
+
alias: {
|
|
10
|
+
color: tslib_1.__assign(tslib_1.__assign({}, teamsDark_1.generateSharedColorTokens(global.palette)), { neutral: teamsDark_1.neutralColorTokens }),
|
|
11
|
+
shadow: shadows_1.createShadowLevelTokens(teamsDark_1.neutralColorTokens.neutralShadowAmbient, teamsDark_1.neutralColorTokens.neutralShadowKey),
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
exports.createTeamsDarkTheme = createTeamsDarkTheme;
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=createTeamsDarkTheme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTeamsDarkTheme.js","sourceRoot":"../src/","sources":["utils/createTeamsDarkTheme.ts"],"names":[],"mappings":";;;;IAKO,IAAM,oBAAoB,GAAoC,UAAA,KAAK;QACxE,IAAM,MAAM,GAAG,yBAAiB,CAAC,KAAK,CAAC,CAAC;QACxC,OAAO;YACL,MAAM,QAAA;YACN,KAAK,EAAE;gBACL,KAAK,EAAE,sCACF,qCAAyB,CAAC,MAAM,CAAC,OAAO,CAAC,KAC5C,OAAO,EAAE,8BAAkB,GACD;gBAC5B,MAAM,EAAE,iCAAuB,CAAC,8BAAkB,CAAC,oBAAoB,EAAE,8BAAkB,CAAC,gBAAgB,CAAC;aAC9G;SACF,CAAC;IACJ,CAAC,CAAC;IAZW,QAAA,oBAAoB,wBAY/B","sourcesContent":["import { createShadowLevelTokens } from './shadows';\nimport { generateSharedColorTokens, neutralColorTokens } from '../alias/teamsDark';\nimport { createGlobalTheme } from '../global/utils';\nimport type { BrandVariants, Theme } from '../types';\n\nexport const createTeamsDarkTheme: (brand: BrandVariants) => Theme = brand => {\n const global = createGlobalTheme(brand);\n return {\n global,\n alias: {\n color: {\n ...generateSharedColorTokens(global.palette),\n neutral: neutralColorTokens,\n } as Theme['alias']['color'],\n shadow: createShadowLevelTokens(neutralColorTokens.neutralShadowAmbient, neutralColorTokens.neutralShadowKey),\n },\n };\n};\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./createLightTheme", "./createDarkTheme", "./createTeamsDarkTheme", "./createHighContrastTheme", "./mergeThemes", "./themeToCSSVariables"], function (require, exports, tslib_1, createLightTheme_1, createDarkTheme_1, createTeamsDarkTheme_1, createHighContrastTheme_1, mergeThemes_1, themeToCSSVariables_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.mergeThemes = void 0;
|
|
5
|
+
tslib_1.__exportStar(createLightTheme_1, exports);
|
|
6
|
+
tslib_1.__exportStar(createDarkTheme_1, exports);
|
|
7
|
+
tslib_1.__exportStar(createTeamsDarkTheme_1, exports);
|
|
8
|
+
tslib_1.__exportStar(createHighContrastTheme_1, exports);
|
|
9
|
+
Object.defineProperty(exports, "mergeThemes", { enumerable: true, get: function () { return mergeThemes_1.mergeThemes; } });
|
|
10
|
+
tslib_1.__exportStar(themeToCSSVariables_1, exports);
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["utils/index.ts"],"names":[],"mappings":";;;;IAAA,kDAAmC;IACnC,iDAAkC;IAClC,sDAAuC;IACvC,yDAA0C;IAEjC,0GAAA,WAAW,OAAA;IACpB,qDAAsC","sourcesContent":["export * from './createLightTheme';\nexport * from './createDarkTheme';\nexport * from './createTeamsDarkTheme';\nexport * from './createHighContrastTheme';\n\nexport { mergeThemes } from './mergeThemes';\nexport * from './themeToCSSVariables';\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PartialTheme, Theme } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Simple deep merge function. Takes all arguments and returns a deep copy of the objects merged
|
|
4
|
+
* together in the order provided. If an object creates a circular reference, it will assign the
|
|
5
|
+
* original reference.
|
|
6
|
+
*/
|
|
7
|
+
export declare function merge<T = {}>(target: Partial<T>, ...args: (Partial<T> | null | undefined | false)[]): T;
|
|
8
|
+
export declare function mergeThemes(a: Theme | undefined, b: PartialTheme | Theme | undefined): Theme;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
define(["require", "exports"], function (require, exports) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.mergeThemes = exports.merge = void 0;
|
|
5
|
+
// TODO
|
|
6
|
+
// We should consider removal merge() function from this file, ideally it should not be required
|
|
7
|
+
// as probably themes will have flat shape
|
|
8
|
+
/**
|
|
9
|
+
* Simple deep merge function. Takes all arguments and returns a deep copy of the objects merged
|
|
10
|
+
* together in the order provided. If an object creates a circular reference, it will assign the
|
|
11
|
+
* original reference.
|
|
12
|
+
*/
|
|
13
|
+
function merge(target) {
|
|
14
|
+
var args = [];
|
|
15
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
16
|
+
args[_i - 1] = arguments[_i];
|
|
17
|
+
}
|
|
18
|
+
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
|
|
19
|
+
var arg = args_1[_a];
|
|
20
|
+
_merge(target || {}, arg);
|
|
21
|
+
}
|
|
22
|
+
return target;
|
|
23
|
+
}
|
|
24
|
+
exports.merge = merge;
|
|
25
|
+
/**
|
|
26
|
+
* The _merge helper iterates through all props on source and assigns them to target.
|
|
27
|
+
* When the value is an object, we will create a deep clone of the object. However if
|
|
28
|
+
* there is a circular reference, the value will not be deep cloned and will persist
|
|
29
|
+
* the reference.
|
|
30
|
+
*/
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
32
|
+
function _merge(target, source, circularReferences) {
|
|
33
|
+
if (circularReferences === void 0) { circularReferences = []; }
|
|
34
|
+
circularReferences.push(source);
|
|
35
|
+
for (var name_1 in source) {
|
|
36
|
+
if (source.hasOwnProperty(name_1)) {
|
|
37
|
+
if (name_1 !== '__proto__' && name_1 !== 'constructor' && name_1 !== 'prototype') {
|
|
38
|
+
var value = source[name_1];
|
|
39
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
|
40
|
+
var isCircularReference = circularReferences.indexOf(value) > -1;
|
|
41
|
+
target[name_1] = (isCircularReference
|
|
42
|
+
? value
|
|
43
|
+
: _merge(target[name_1] || {}, value, circularReferences));
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
target[name_1] = value;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
circularReferences.pop();
|
|
52
|
+
return target;
|
|
53
|
+
}
|
|
54
|
+
function mergeThemes(a, b) {
|
|
55
|
+
// Deep merge impacts perf: we should like to avoid it if it's possible
|
|
56
|
+
if (a && b) {
|
|
57
|
+
return merge({}, a, b);
|
|
58
|
+
}
|
|
59
|
+
if (a) {
|
|
60
|
+
return a;
|
|
61
|
+
}
|
|
62
|
+
return b;
|
|
63
|
+
}
|
|
64
|
+
exports.mergeThemes = mergeThemes;
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=mergeThemes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mergeThemes.js","sourceRoot":"../src/","sources":["utils/mergeThemes.ts"],"names":[],"mappings":";;;;IAEA,OAAO;IACP,gGAAgG;IAChG,0CAA0C;IAE1C;;;;OAIG;IACH,SAAgB,KAAK,CAAS,MAAkB;QAAE,cAAkD;aAAlD,UAAkD,EAAlD,qBAAkD,EAAlD,IAAkD;YAAlD,6BAAkD;;QAClG,KAAkB,UAAI,EAAJ,aAAI,EAAJ,kBAAI,EAAJ,IAAI,EAAE;YAAnB,IAAM,GAAG,aAAA;YACZ,MAAM,CAAC,MAAM,IAAI,EAAE,EAAE,GAAiB,CAAC,CAAC;SACzC;QAED,OAAO,MAAW,CAAC;IACrB,CAAC;IAND,sBAMC;IAED;;;;;OAKG;IACH,8DAA8D;IAC9D,SAAS,MAAM,CAAmB,MAAS,EAAE,MAAS,EAAE,kBAA8B;QAA9B,mCAAA,EAAA,uBAA8B;QACpF,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEhC,KAAK,IAAM,MAAI,IAAI,MAAM,EAAE;YACzB,IAAI,MAAM,CAAC,cAAc,CAAC,MAAI,CAAC,EAAE;gBAC/B,IAAI,MAAI,KAAK,WAAW,IAAI,MAAI,KAAK,aAAa,IAAI,MAAI,KAAK,WAAW,EAAE;oBAC1E,IAAM,KAAK,GAAgC,MAAM,CAAC,MAAI,CAAC,CAAC;oBACxD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;wBACxE,IAAM,mBAAmB,GAAG,kBAAkB,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;wBACnE,MAAM,CAAC,MAAI,CAAC,GAAG,CAAC,mBAAmB;4BACjC,CAAC,CAAC,KAAK;4BACP,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAgC,CAAC;qBAC3F;yBAAM;wBACL,MAAM,CAAC,MAAI,CAAC,GAAG,KAAK,CAAC;qBACtB;iBACF;aACF;SACF;QAED,kBAAkB,CAAC,GAAG,EAAE,CAAC;QAEzB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,SAAgB,WAAW,CAAC,CAAoB,EAAE,CAAmC;QACnF,uEAAuE;QACvE,IAAI,CAAC,IAAI,CAAC,EAAE;YACV,OAAO,KAAK,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAU,CAAC;SACjC;QAED,IAAI,CAAC,EAAE;YACL,OAAO,CAAC,CAAC;SACV;QAED,OAAO,CAAU,CAAC;IACpB,CAAC;IAXD,kCAWC","sourcesContent":["import type { PartialTheme, Theme } from '../types';\n\n// TODO\n// We should consider removal merge() function from this file, ideally it should not be required\n// as probably themes will have flat shape\n\n/**\n * Simple deep merge function. Takes all arguments and returns a deep copy of the objects merged\n * together in the order provided. If an object creates a circular reference, it will assign the\n * original reference.\n */\nexport function merge<T = {}>(target: Partial<T>, ...args: (Partial<T> | null | undefined | false)[]): T {\n for (const arg of args) {\n _merge(target || {}, arg as Partial<T>);\n }\n\n return target as T;\n}\n\n/**\n * The _merge helper iterates through all props on source and assigns them to target.\n * When the value is an object, we will create a deep clone of the object. However if\n * there is a circular reference, the value will not be deep cloned and will persist\n * the reference.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _merge<T extends Object>(target: T, source: T, circularReferences: any[] = []): T {\n circularReferences.push(source);\n\n for (const name in source) {\n if (source.hasOwnProperty(name)) {\n if (name !== '__proto__' && name !== 'constructor' && name !== 'prototype') {\n const value: T[Extract<keyof T, string>] = source[name];\n if (typeof value === 'object' && value !== null && !Array.isArray(value)) {\n const isCircularReference = circularReferences.indexOf(value) > -1;\n target[name] = (isCircularReference\n ? value\n : _merge(target[name] || {}, value, circularReferences)) as T[Extract<keyof T, string>];\n } else {\n target[name] = value;\n }\n }\n }\n }\n\n circularReferences.pop();\n\n return target;\n}\n\nexport function mergeThemes(a: Theme | undefined, b: PartialTheme | Theme | undefined): Theme {\n // Deep merge impacts perf: we should like to avoid it if it's possible\n if (a && b) {\n return merge({}, a, b) as Theme;\n }\n\n if (a) {\n return a;\n }\n\n return b as Theme;\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
define(["require", "exports"], function (require, exports) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.createShadowLevelTokens = void 0;
|
|
5
|
+
function createShadowLevelTokens(ambientColor, keyColor) {
|
|
6
|
+
return {
|
|
7
|
+
shadow2: "0 0 2px " + ambientColor + ", 0 1px 2px " + keyColor,
|
|
8
|
+
shadow4: "0 0 2px " + ambientColor + ", 0 2px 4px " + keyColor,
|
|
9
|
+
shadow8: "0 0 2px " + ambientColor + ", 0 4px 8px " + keyColor,
|
|
10
|
+
shadow16: "0 0 2px " + ambientColor + ", 0 6px 16px " + keyColor,
|
|
11
|
+
shadow28: "0 0 8px " + ambientColor + ", 0 14px 28px " + keyColor,
|
|
12
|
+
shadow64: "0 0 8px " + ambientColor + ", 0 32px 64px " + keyColor,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.createShadowLevelTokens = createShadowLevelTokens;
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=shadows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadows.js","sourceRoot":"../src/","sources":["utils/shadows.ts"],"names":[],"mappings":";;;;IAEA,SAAgB,uBAAuB,CAAC,YAAoB,EAAE,QAAgB;QAC5E,OAAO;YACL,OAAO,EAAE,aAAW,YAAY,oBAAe,QAAU;YACzD,OAAO,EAAE,aAAW,YAAY,oBAAe,QAAU;YACzD,OAAO,EAAE,aAAW,YAAY,oBAAe,QAAU;YACzD,QAAQ,EAAE,aAAW,YAAY,qBAAgB,QAAU;YAC3D,QAAQ,EAAE,aAAW,YAAY,sBAAiB,QAAU;YAC5D,QAAQ,EAAE,aAAW,YAAY,sBAAiB,QAAU;SAC7D,CAAC;IACJ,CAAC;IATD,0DASC","sourcesContent":["import type { ShadowLevelTokens } from '../types';\n\nexport function createShadowLevelTokens(ambientColor: string, keyColor: string): ShadowLevelTokens {\n return {\n shadow2: `0 0 2px ${ambientColor}, 0 1px 2px ${keyColor}`,\n shadow4: `0 0 2px ${ambientColor}, 0 2px 4px ${keyColor}`,\n shadow8: `0 0 2px ${ambientColor}, 0 4px 8px ${keyColor}`,\n shadow16: `0 0 2px ${ambientColor}, 0 6px 16px ${keyColor}`,\n shadow28: `0 0 8px ${ambientColor}, 0 14px 28px ${keyColor}`,\n shadow64: `0 0 8px ${ambientColor}, 0 32px 64px ${keyColor}`,\n };\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
define(["require", "exports"], function (require, exports) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.themeToCSSVariables = void 0;
|
|
5
|
+
function flattenThemeToCSSVariables(
|
|
6
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7
|
+
themePart, parentKey, result) {
|
|
8
|
+
if (parentKey === void 0) { parentKey = ''; }
|
|
9
|
+
if (result === void 0) { result = {}; }
|
|
10
|
+
for (var propertyName in themePart) {
|
|
11
|
+
if (Object.prototype.hasOwnProperty.call(themePart, propertyName)) {
|
|
12
|
+
var variableName = parentKey ? parentKey + '-' + propertyName : "--" + propertyName;
|
|
13
|
+
if (typeof themePart[propertyName] === 'object') {
|
|
14
|
+
flattenThemeToCSSVariables(themePart[propertyName], variableName, result);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
result[variableName] = themePart[propertyName];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return result;
|
|
22
|
+
}
|
|
23
|
+
function themeToCSSVariables(theme) {
|
|
24
|
+
return flattenThemeToCSSVariables(theme);
|
|
25
|
+
}
|
|
26
|
+
exports.themeToCSSVariables = themeToCSSVariables;
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=themeToCSSVariables.js.map
|