@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 {};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createDarkTheme = void 0;
|
7
|
+
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
9
|
+
|
10
|
+
var shadows_1 = /*#__PURE__*/require("./shadows");
|
11
|
+
|
12
|
+
var dark_1 = /*#__PURE__*/require("../alias/dark");
|
13
|
+
|
14
|
+
var utils_1 = /*#__PURE__*/require("../global/utils");
|
15
|
+
|
16
|
+
var createDarkTheme = function (brand) {
|
17
|
+
var global = utils_1.createGlobalTheme(brand);
|
18
|
+
return {
|
19
|
+
global: global,
|
20
|
+
alias: {
|
21
|
+
color: tslib_1.__assign(tslib_1.__assign({}, dark_1.generateSharedColorTokens(global.palette)), {
|
22
|
+
neutral: dark_1.neutralColorTokens
|
23
|
+
}),
|
24
|
+
shadow: shadows_1.createShadowLevelTokens(dark_1.neutralColorTokens.neutralShadowAmbient, dark_1.neutralColorTokens.neutralShadowKey)
|
25
|
+
}
|
26
|
+
};
|
27
|
+
};
|
28
|
+
|
29
|
+
exports.createDarkTheme = createDarkTheme;
|
30
|
+
//# sourceMappingURL=createDarkTheme.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["utils/createDarkTheme.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,SAAA,gBAAA,OAAA,CAAA,WAAA,CAAA;;AACA,IAAA,MAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AAGO,IAAM,eAAe,GAAoC,UAAA,KAAA,EAAK;AACnE,MAAM,MAAM,GAAG,OAAA,CAAA,iBAAA,CAAkB,KAAlB,CAAf;AACA,SAAO;AACL,IAAA,MAAM,EAAA,MADD;AAEL,IAAA,KAAK,EAAE;AACL,MAAA,KAAK,EAAE,OAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EACF,MAAA,CAAA,yBAAA,CAA0B,MAAM,CAAC,OAAjC,CADE,CAAA,EACuC;AAC5C,QAAA,OAAO,EAAE,MAAA,CAAA;AADmC,OADvC,CADF;AAKL,MAAA,MAAM,EAAE,SAAA,CAAA,uBAAA,CAAwB,MAAA,CAAA,kBAAA,CAAmB,oBAA3C,EAAiE,MAAA,CAAA,kBAAA,CAAmB,gBAApF;AALH;AAFF,GAAP;AAUD,CAZM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","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"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createHighContrastTheme = void 0;
|
7
|
+
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
9
|
+
|
10
|
+
var shadows_1 = /*#__PURE__*/require("./shadows");
|
11
|
+
|
12
|
+
var highContrast_1 = /*#__PURE__*/require("../alias/highContrast");
|
13
|
+
|
14
|
+
var utils_1 = /*#__PURE__*/require("../global/utils");
|
15
|
+
|
16
|
+
var createHighContrastTheme = function (brand) {
|
17
|
+
var global = utils_1.createGlobalTheme(brand);
|
18
|
+
return {
|
19
|
+
global: global,
|
20
|
+
alias: {
|
21
|
+
color: tslib_1.__assign(tslib_1.__assign({}, highContrast_1.generateSharedColorTokens(global.palette)), {
|
22
|
+
neutral: highContrast_1.neutralColorTokens
|
23
|
+
}),
|
24
|
+
shadow: shadows_1.createShadowLevelTokens(highContrast_1.neutralColorTokens.neutralShadowAmbient, highContrast_1.neutralColorTokens.neutralShadowKey)
|
25
|
+
}
|
26
|
+
};
|
27
|
+
};
|
28
|
+
|
29
|
+
exports.createHighContrastTheme = createHighContrastTheme;
|
30
|
+
//# sourceMappingURL=createHighContrastTheme.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["utils/createHighContrastTheme.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,SAAA,gBAAA,OAAA,CAAA,WAAA,CAAA;;AACA,IAAA,cAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AAGO,IAAM,uBAAuB,GAAoC,UAAA,KAAA,EAAK;AAC3E,MAAM,MAAM,GAAG,OAAA,CAAA,iBAAA,CAAkB,KAAlB,CAAf;AACA,SAAO;AACL,IAAA,MAAM,EAAA,MADD;AAEL,IAAA,KAAK,EAAE;AACL,MAAA,KAAK,EAAE,OAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EACF,cAAA,CAAA,yBAAA,CAA0B,MAAM,CAAC,OAAjC,CADE,CAAA,EACuC;AAC5C,QAAA,OAAO,EAAE,cAAA,CAAA;AADmC,OADvC,CADF;AAKL,MAAA,MAAM,EAAE,SAAA,CAAA,uBAAA,CAAwB,cAAA,CAAA,kBAAA,CAAmB,oBAA3C,EAAiE,cAAA,CAAA,kBAAA,CAAmB,gBAApF;AALH;AAFF,GAAP;AAUD,CAZM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","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"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createLightTheme = void 0;
|
7
|
+
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
9
|
+
|
10
|
+
var shadows_1 = /*#__PURE__*/require("./shadows");
|
11
|
+
|
12
|
+
var light_1 = /*#__PURE__*/require("../alias/light");
|
13
|
+
|
14
|
+
var utils_1 = /*#__PURE__*/require("../global/utils");
|
15
|
+
|
16
|
+
var createLightTheme = function (brand) {
|
17
|
+
var global = utils_1.createGlobalTheme(brand);
|
18
|
+
return {
|
19
|
+
global: global,
|
20
|
+
alias: {
|
21
|
+
color: tslib_1.__assign(tslib_1.__assign({}, light_1.generateSharedColorTokens(global.palette)), {
|
22
|
+
neutral: light_1.neutralColorTokens
|
23
|
+
}),
|
24
|
+
shadow: shadows_1.createShadowLevelTokens(light_1.neutralColorTokens.neutralShadowAmbient, light_1.neutralColorTokens.neutralShadowKey)
|
25
|
+
}
|
26
|
+
};
|
27
|
+
};
|
28
|
+
|
29
|
+
exports.createLightTheme = createLightTheme;
|
30
|
+
//# sourceMappingURL=createLightTheme.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["utils/createLightTheme.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,SAAA,gBAAA,OAAA,CAAA,WAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AAGO,IAAM,gBAAgB,GAAoC,UAAA,KAAA,EAAK;AACpE,MAAM,MAAM,GAAG,OAAA,CAAA,iBAAA,CAAkB,KAAlB,CAAf;AACA,SAAO;AACL,IAAA,MAAM,EAAA,MADD;AAEL,IAAA,KAAK,EAAE;AACL,MAAA,KAAK,EAAE,OAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EACF,OAAA,CAAA,yBAAA,CAA0B,MAAM,CAAC,OAAjC,CADE,CAAA,EACuC;AAC5C,QAAA,OAAO,EAAE,OAAA,CAAA;AADmC,OADvC,CADF;AAKL,MAAA,MAAM,EAAE,SAAA,CAAA,uBAAA,CAAwB,OAAA,CAAA,kBAAA,CAAmB,oBAA3C,EAAiE,OAAA,CAAA,kBAAA,CAAmB,gBAApF;AALH;AAFF,GAAP;AAUD,CAZM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","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"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createTeamsDarkTheme = void 0;
|
7
|
+
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
9
|
+
|
10
|
+
var shadows_1 = /*#__PURE__*/require("./shadows");
|
11
|
+
|
12
|
+
var teamsDark_1 = /*#__PURE__*/require("../alias/teamsDark");
|
13
|
+
|
14
|
+
var utils_1 = /*#__PURE__*/require("../global/utils");
|
15
|
+
|
16
|
+
var createTeamsDarkTheme = function (brand) {
|
17
|
+
var global = utils_1.createGlobalTheme(brand);
|
18
|
+
return {
|
19
|
+
global: global,
|
20
|
+
alias: {
|
21
|
+
color: tslib_1.__assign(tslib_1.__assign({}, teamsDark_1.generateSharedColorTokens(global.palette)), {
|
22
|
+
neutral: teamsDark_1.neutralColorTokens
|
23
|
+
}),
|
24
|
+
shadow: shadows_1.createShadowLevelTokens(teamsDark_1.neutralColorTokens.neutralShadowAmbient, teamsDark_1.neutralColorTokens.neutralShadowKey)
|
25
|
+
}
|
26
|
+
};
|
27
|
+
};
|
28
|
+
|
29
|
+
exports.createTeamsDarkTheme = createTeamsDarkTheme;
|
30
|
+
//# sourceMappingURL=createTeamsDarkTheme.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["utils/createTeamsDarkTheme.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,SAAA,gBAAA,OAAA,CAAA,WAAA,CAAA;;AACA,IAAA,WAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AAGO,IAAM,oBAAoB,GAAoC,UAAA,KAAA,EAAK;AACxE,MAAM,MAAM,GAAG,OAAA,CAAA,iBAAA,CAAkB,KAAlB,CAAf;AACA,SAAO;AACL,IAAA,MAAM,EAAA,MADD;AAEL,IAAA,KAAK,EAAE;AACL,MAAA,KAAK,EAAE,OAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EACF,WAAA,CAAA,yBAAA,CAA0B,MAAM,CAAC,OAAjC,CADE,CAAA,EACuC;AAC5C,QAAA,OAAO,EAAE,WAAA,CAAA;AADmC,OADvC,CADF;AAKL,MAAA,MAAM,EAAE,SAAA,CAAA,uBAAA,CAAwB,WAAA,CAAA,kBAAA,CAAmB,oBAA3C,EAAiE,WAAA,CAAA,kBAAA,CAAmB,gBAApF;AALH;AAFF,GAAP;AAUD,CAZM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","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"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.mergeThemes = void 0;
|
7
|
+
|
8
|
+
var tslib_1 = /*#__PURE__*/require("tslib");
|
9
|
+
|
10
|
+
tslib_1.__exportStar(require("./createLightTheme"), exports);
|
11
|
+
|
12
|
+
tslib_1.__exportStar(require("./createDarkTheme"), exports);
|
13
|
+
|
14
|
+
tslib_1.__exportStar(require("./createTeamsDarkTheme"), exports);
|
15
|
+
|
16
|
+
tslib_1.__exportStar(require("./createHighContrastTheme"), exports);
|
17
|
+
|
18
|
+
var mergeThemes_1 = /*#__PURE__*/require("./mergeThemes");
|
19
|
+
|
20
|
+
Object.defineProperty(exports, "mergeThemes", {
|
21
|
+
enumerable: true,
|
22
|
+
get: function () {
|
23
|
+
return mergeThemes_1.mergeThemes;
|
24
|
+
}
|
25
|
+
});
|
26
|
+
|
27
|
+
tslib_1.__exportStar(require("./themeToCSSVariables"), exports);
|
28
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["utils/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,2BAAA,CAAA,EAAA,OAAA;;AAEA,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,aAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,aAAA,CAAA,WAAA;AAAW;AAAX,CAAA;;AACT,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './createLightTheme';\nexport * from './createDarkTheme';\nexport * from './createTeamsDarkTheme';\nexport * from './createHighContrastTheme';\n\nexport { mergeThemes } from './mergeThemes';\nexport * from './themeToCSSVariables';\n"],"sourceRoot":"../src/"}
|
@@ -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,81 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.mergeThemes = exports.merge = void 0; // TODO
|
7
|
+
// We should consider removal merge() function from this file, ideally it should not be required
|
8
|
+
// as probably themes will have flat shape
|
9
|
+
|
10
|
+
/**
|
11
|
+
* Simple deep merge function. Takes all arguments and returns a deep copy of the objects merged
|
12
|
+
* together in the order provided. If an object creates a circular reference, it will assign the
|
13
|
+
* original reference.
|
14
|
+
*/
|
15
|
+
|
16
|
+
function merge(target) {
|
17
|
+
var args = [];
|
18
|
+
|
19
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
20
|
+
args[_i - 1] = arguments[_i];
|
21
|
+
}
|
22
|
+
|
23
|
+
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
|
24
|
+
var arg = args_1[_a];
|
25
|
+
|
26
|
+
_merge(target || {}, arg);
|
27
|
+
}
|
28
|
+
|
29
|
+
return target;
|
30
|
+
}
|
31
|
+
|
32
|
+
exports.merge = merge;
|
33
|
+
/**
|
34
|
+
* The _merge helper iterates through all props on source and assigns them to target.
|
35
|
+
* When the value is an object, we will create a deep clone of the object. However if
|
36
|
+
* there is a circular reference, the value will not be deep cloned and will persist
|
37
|
+
* the reference.
|
38
|
+
*/
|
39
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
40
|
+
|
41
|
+
function _merge(target, source, circularReferences) {
|
42
|
+
if (circularReferences === void 0) {
|
43
|
+
circularReferences = [];
|
44
|
+
}
|
45
|
+
|
46
|
+
circularReferences.push(source);
|
47
|
+
|
48
|
+
for (var name_1 in source) {
|
49
|
+
if (source.hasOwnProperty(name_1)) {
|
50
|
+
if (name_1 !== '__proto__' && name_1 !== 'constructor' && name_1 !== 'prototype') {
|
51
|
+
var value = source[name_1];
|
52
|
+
|
53
|
+
if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
|
54
|
+
var isCircularReference = circularReferences.indexOf(value) > -1;
|
55
|
+
target[name_1] = isCircularReference ? value : _merge(target[name_1] || {}, value, circularReferences);
|
56
|
+
} else {
|
57
|
+
target[name_1] = value;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
circularReferences.pop();
|
64
|
+
return target;
|
65
|
+
}
|
66
|
+
|
67
|
+
function mergeThemes(a, b) {
|
68
|
+
// Deep merge impacts perf: we should like to avoid it if it's possible
|
69
|
+
if (a && b) {
|
70
|
+
return merge({}, a, b);
|
71
|
+
}
|
72
|
+
|
73
|
+
if (a) {
|
74
|
+
return a;
|
75
|
+
}
|
76
|
+
|
77
|
+
return b;
|
78
|
+
}
|
79
|
+
|
80
|
+
exports.mergeThemes = mergeThemes;
|
81
|
+
//# sourceMappingURL=mergeThemes.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["utils/mergeThemes.ts"],"names":[],"mappings":";;;;;8CAEA;AACA;AACA;;AAEA;;;;AAIG;;AACH,SAAgB,KAAhB,CAA8B,MAA9B,EAAgD;AAAE,MAAA,IAAA,GAAA,EAAA;;OAAA,IAAA,EAAA,GAAA,C,EAAA,EAAA,GAAA,SAAA,CAAA,M,EAAA,EAAA,E,EAAkD;AAAlD,IAAA,IAAA,CAAA,EAAA,GAAA,CAAA,CAAA,GAAA,SAAA,CAAA,EAAA,CAAA;;;AAChD,OAAkB,IAAA,EAAA,GAAA,CAAA,EAAA,MAAA,GAAA,IAAlB,EAAkB,EAAA,GAAA,MAAA,CAAA,MAAlB,EAAkB,EAAA,EAAlB,EAAwB;AAAnB,QAAM,GAAG,GAAA,MAAA,CAAA,EAAA,CAAT;;AACH,IAAA,MAAM,CAAC,MAAM,IAAI,EAAX,EAAe,GAAf,CAAN;AACD;;AAED,SAAO,MAAP;AACD;;AAND,OAAA,CAAA,KAAA,GAAA,KAAA;AAQA;;;;;AAKG;AACH;;AACA,SAAS,MAAT,CAAkC,MAAlC,EAA6C,MAA7C,EAAwD,kBAAxD,EAAsF;AAA9B,MAAA,kBAAA,KAAA,KAAA,CAAA,EAAA;AAAA,IAAA,kBAAA,GAAA,EAAA;AAA8B;;AACpF,EAAA,kBAAkB,CAAC,IAAnB,CAAwB,MAAxB;;AAEA,OAAK,IAAM,MAAX,IAAmB,MAAnB,EAA2B;AACzB,QAAI,MAAM,CAAC,cAAP,CAAsB,MAAtB,CAAJ,EAAiC;AAC/B,UAAI,MAAI,KAAK,WAAT,IAAwB,MAAI,KAAK,aAAjC,IAAkD,MAAI,KAAK,WAA/D,EAA4E;AAC1E,YAAM,KAAK,GAAgC,MAAM,CAAC,MAAD,CAAjD;;AACA,YAAI,OAAO,KAAP,KAAiB,QAAjB,IAA6B,KAAK,KAAK,IAAvC,IAA+C,CAAC,KAAK,CAAC,OAAN,CAAc,KAAd,CAApD,EAA0E;AACxE,cAAM,mBAAmB,GAAG,kBAAkB,CAAC,OAAnB,CAA2B,KAA3B,IAAoC,CAAC,CAAjE;AACA,UAAA,MAAM,CAAC,MAAD,CAAN,GAAgB,mBAAmB,GAC/B,KAD+B,GAE/B,MAAM,CAAC,MAAM,CAAC,MAAD,CAAN,IAAgB,EAAjB,EAAqB,KAArB,EAA4B,kBAA5B,CAFV;AAGD,SALD,MAKO;AACL,UAAA,MAAM,CAAC,MAAD,CAAN,GAAe,KAAf;AACD;AACF;AACF;AACF;;AAED,EAAA,kBAAkB,CAAC,GAAnB;AAEA,SAAO,MAAP;AACD;;AAED,SAAgB,WAAhB,CAA4B,CAA5B,EAAkD,CAAlD,EAAqF;AACnF;AACA,MAAI,CAAC,IAAI,CAAT,EAAY;AACV,WAAO,KAAK,CAAC,EAAD,EAAK,CAAL,EAAQ,CAAR,CAAZ;AACD;;AAED,MAAI,CAAJ,EAAO;AACL,WAAO,CAAP;AACD;;AAED,SAAO,CAAP;AACD;;AAXD,OAAA,CAAA,WAAA,GAAA,WAAA","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"],"sourceRoot":"../src/"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createShadowLevelTokens = void 0;
|
7
|
+
|
8
|
+
function createShadowLevelTokens(ambientColor, keyColor) {
|
9
|
+
return {
|
10
|
+
shadow2: "0 0 2px " + ambientColor + ", 0 1px 2px " + keyColor,
|
11
|
+
shadow4: "0 0 2px " + ambientColor + ", 0 2px 4px " + keyColor,
|
12
|
+
shadow8: "0 0 2px " + ambientColor + ", 0 4px 8px " + keyColor,
|
13
|
+
shadow16: "0 0 2px " + ambientColor + ", 0 6px 16px " + keyColor,
|
14
|
+
shadow28: "0 0 8px " + ambientColor + ", 0 14px 28px " + keyColor,
|
15
|
+
shadow64: "0 0 8px " + ambientColor + ", 0 32px 64px " + keyColor
|
16
|
+
};
|
17
|
+
}
|
18
|
+
|
19
|
+
exports.createShadowLevelTokens = createShadowLevelTokens;
|
20
|
+
//# sourceMappingURL=shadows.js.map
|