@atlaskit/tokens 11.0.2 → 11.1.0
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.md +7 -0
- package/dist/cjs/artifacts/palettes-raw/motion-palette.js +527 -0
- package/dist/cjs/artifacts/replacement-mapping.js +25 -1
- package/dist/cjs/artifacts/theme-import-map.js +7 -1
- package/dist/cjs/artifacts/themes/atlassian-motion.js +12 -0
- package/dist/cjs/artifacts/token-default-values.js +9 -1
- package/dist/cjs/artifacts/token-names.js +9 -1
- package/dist/cjs/artifacts/tokens-raw/atlassian-motion.js +254 -0
- package/dist/cjs/enable-global-theme.js +4 -0
- package/dist/cjs/get-theme-html-attrs.js +4 -0
- package/dist/cjs/get-theme-styles.js +2 -0
- package/dist/cjs/set-global-theme.js +7 -2
- package/dist/cjs/theme-config.js +15 -1
- package/dist/cjs/theme-state-transformer.js +1 -1
- package/dist/cjs/utils/get-theme-preferences.js +3 -2
- package/dist/es2019/artifacts/palettes-raw/motion-palette.js +521 -0
- package/dist/es2019/artifacts/replacement-mapping.js +25 -1
- package/dist/es2019/artifacts/theme-import-map.js +4 -2
- package/dist/es2019/artifacts/themes/atlassian-motion.js +113 -0
- package/dist/es2019/artifacts/token-default-values.js +9 -1
- package/dist/es2019/artifacts/token-names.js +9 -1
- package/dist/es2019/artifacts/tokens-raw/atlassian-motion.js +248 -0
- package/dist/es2019/enable-global-theme.js +3 -0
- package/dist/es2019/get-theme-html-attrs.js +3 -0
- package/dist/es2019/get-theme-styles.js +2 -0
- package/dist/es2019/set-global-theme.js +4 -0
- package/dist/es2019/theme-config.js +15 -1
- package/dist/es2019/theme-state-transformer.js +1 -1
- package/dist/es2019/utils/get-theme-preferences.js +3 -2
- package/dist/esm/artifacts/palettes-raw/motion-palette.js +521 -0
- package/dist/esm/artifacts/replacement-mapping.js +25 -1
- package/dist/esm/artifacts/theme-import-map.js +5 -1
- package/dist/esm/artifacts/themes/atlassian-motion.js +6 -0
- package/dist/esm/artifacts/token-default-values.js +9 -1
- package/dist/esm/artifacts/token-names.js +9 -1
- package/dist/esm/artifacts/tokens-raw/atlassian-motion.js +248 -0
- package/dist/esm/enable-global-theme.js +4 -0
- package/dist/esm/get-theme-html-attrs.js +4 -0
- package/dist/esm/get-theme-styles.js +2 -0
- package/dist/esm/set-global-theme.js +7 -2
- package/dist/esm/theme-config.js +15 -1
- package/dist/esm/theme-state-transformer.js +1 -1
- package/dist/esm/utils/get-theme-preferences.js +3 -2
- package/dist/types/artifacts/palettes-raw/motion-palette.d.ts +34 -0
- package/dist/types/artifacts/replacement-mapping.d.ts +1 -1
- package/dist/types/artifacts/theme-import-map.d.ts +1 -1
- package/dist/types/artifacts/themes/atlassian-motion.d.ts +7 -0
- package/dist/types/artifacts/token-default-values.d.ts +9 -1
- package/dist/types/artifacts/token-names.d.ts +17 -1
- package/dist/types/artifacts/tokens-raw/atlassian-motion.d.ts +41 -0
- package/dist/types/enable-global-theme.d.ts +2 -1
- package/dist/types/entry-points/css-type-schema.codegen.d.ts +2 -1
- package/dist/types/get-theme-html-attrs.d.ts +2 -1
- package/dist/types/get-theme-styles.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/set-global-theme.d.ts +1 -0
- package/dist/types/theme-config.d.ts +10 -7
- package/dist/types/types.d.ts +30 -1
- package/dist/types-ts4.5/artifacts/palettes-raw/motion-palette.d.ts +34 -0
- package/dist/types-ts4.5/artifacts/replacement-mapping.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
- package/dist/types-ts4.5/artifacts/themes/atlassian-motion.d.ts +7 -0
- package/dist/types-ts4.5/artifacts/token-default-values.d.ts +9 -1
- package/dist/types-ts4.5/artifacts/token-names.d.ts +17 -1
- package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-motion.d.ts +41 -0
- package/dist/types-ts4.5/enable-global-theme.d.ts +2 -1
- package/dist/types-ts4.5/entry-points/css-type-schema.codegen.d.ts +2 -1
- package/dist/types-ts4.5/get-theme-html-attrs.d.ts +2 -1
- package/dist/types-ts4.5/get-theme-styles.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/set-global-theme.d.ts +1 -0
- package/dist/types-ts4.5/theme-config.d.ts +11 -7
- package/dist/types-ts4.5/types.d.ts +30 -1
- package/figma/atlassian-motion.json +5 -0
- package/package.json +9 -6
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
* @codegen <<SignedSource::2a5ddbfd4356a65a3955ab62d7341a46>>
|
|
4
|
+
* @codegenCommand yarn build tokens
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
var tokens = [{
|
|
8
|
+
"attributes": {
|
|
9
|
+
"group": "motion",
|
|
10
|
+
"state": "experimental",
|
|
11
|
+
"introduced": "11.1.0",
|
|
12
|
+
"description": ""
|
|
13
|
+
},
|
|
14
|
+
"value": {
|
|
15
|
+
"duration": 400,
|
|
16
|
+
"curve": "cubic-bezier(0.66, 0, 0.34, 1)",
|
|
17
|
+
"keyframes": ["FadeIn"]
|
|
18
|
+
},
|
|
19
|
+
"filePath": "schema/themes/atlassian-motion/motion.tsx",
|
|
20
|
+
"isSource": true,
|
|
21
|
+
"original": {
|
|
22
|
+
"attributes": {
|
|
23
|
+
"group": "motion",
|
|
24
|
+
"state": "experimental",
|
|
25
|
+
"introduced": "11.1.0",
|
|
26
|
+
"description": ""
|
|
27
|
+
},
|
|
28
|
+
"value": {
|
|
29
|
+
"duration": "Duration400",
|
|
30
|
+
"curve": "CubicEaseInOut",
|
|
31
|
+
"keyframes": ["FadeIn"]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"name": "motion.content.enter.long",
|
|
35
|
+
"path": ["motion", "content", "enter", "long"],
|
|
36
|
+
"cleanName": "motion.content.enter.long"
|
|
37
|
+
}, {
|
|
38
|
+
"attributes": {
|
|
39
|
+
"group": "motion",
|
|
40
|
+
"state": "experimental",
|
|
41
|
+
"introduced": "11.1.0",
|
|
42
|
+
"description": ""
|
|
43
|
+
},
|
|
44
|
+
"value": {
|
|
45
|
+
"duration": 200,
|
|
46
|
+
"curve": "cubic-bezier(0.66, 0, 0.34, 1)",
|
|
47
|
+
"keyframes": ["FadeIn"]
|
|
48
|
+
},
|
|
49
|
+
"filePath": "schema/themes/atlassian-motion/motion.tsx",
|
|
50
|
+
"isSource": true,
|
|
51
|
+
"original": {
|
|
52
|
+
"attributes": {
|
|
53
|
+
"group": "motion",
|
|
54
|
+
"state": "experimental",
|
|
55
|
+
"introduced": "11.1.0",
|
|
56
|
+
"description": ""
|
|
57
|
+
},
|
|
58
|
+
"value": {
|
|
59
|
+
"duration": "Duration200",
|
|
60
|
+
"curve": "CubicEaseInOut",
|
|
61
|
+
"keyframes": ["FadeIn"]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"name": "motion.content.enter.medium",
|
|
65
|
+
"path": ["motion", "content", "enter", "medium"],
|
|
66
|
+
"cleanName": "motion.content.enter.medium"
|
|
67
|
+
}, {
|
|
68
|
+
"attributes": {
|
|
69
|
+
"group": "motion",
|
|
70
|
+
"state": "experimental",
|
|
71
|
+
"introduced": "11.1.0",
|
|
72
|
+
"description": ""
|
|
73
|
+
},
|
|
74
|
+
"value": {
|
|
75
|
+
"duration": 100,
|
|
76
|
+
"curve": "cubic-bezier(0.66, 0, 0.34, 1)",
|
|
77
|
+
"keyframes": ["FadeIn"]
|
|
78
|
+
},
|
|
79
|
+
"filePath": "schema/themes/atlassian-motion/motion.tsx",
|
|
80
|
+
"isSource": true,
|
|
81
|
+
"original": {
|
|
82
|
+
"attributes": {
|
|
83
|
+
"group": "motion",
|
|
84
|
+
"state": "experimental",
|
|
85
|
+
"introduced": "11.1.0",
|
|
86
|
+
"description": ""
|
|
87
|
+
},
|
|
88
|
+
"value": {
|
|
89
|
+
"duration": "Duration100",
|
|
90
|
+
"curve": "CubicEaseInOut",
|
|
91
|
+
"keyframes": ["FadeIn"]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"name": "motion.content.enter.short",
|
|
95
|
+
"path": ["motion", "content", "enter", "short"],
|
|
96
|
+
"cleanName": "motion.content.enter.short"
|
|
97
|
+
}, {
|
|
98
|
+
"attributes": {
|
|
99
|
+
"group": "motion",
|
|
100
|
+
"state": "experimental",
|
|
101
|
+
"introduced": "11.1.0",
|
|
102
|
+
"description": ""
|
|
103
|
+
},
|
|
104
|
+
"value": {
|
|
105
|
+
"duration": 200,
|
|
106
|
+
"curve": "cubic-bezier(0.66, 0, 0.34, 1)",
|
|
107
|
+
"keyframes": ["FadeOut"]
|
|
108
|
+
},
|
|
109
|
+
"filePath": "schema/themes/atlassian-motion/motion.tsx",
|
|
110
|
+
"isSource": true,
|
|
111
|
+
"original": {
|
|
112
|
+
"attributes": {
|
|
113
|
+
"group": "motion",
|
|
114
|
+
"state": "experimental",
|
|
115
|
+
"introduced": "11.1.0",
|
|
116
|
+
"description": ""
|
|
117
|
+
},
|
|
118
|
+
"value": {
|
|
119
|
+
"duration": "Duration200",
|
|
120
|
+
"curve": "CubicEaseInOut",
|
|
121
|
+
"keyframes": ["FadeOut"]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"name": "motion.content.exit.long",
|
|
125
|
+
"path": ["motion", "content", "exit", "long"],
|
|
126
|
+
"cleanName": "motion.content.exit.long"
|
|
127
|
+
}, {
|
|
128
|
+
"attributes": {
|
|
129
|
+
"group": "motion",
|
|
130
|
+
"state": "experimental",
|
|
131
|
+
"introduced": "11.1.0",
|
|
132
|
+
"description": ""
|
|
133
|
+
},
|
|
134
|
+
"value": {
|
|
135
|
+
"duration": 100,
|
|
136
|
+
"curve": "cubic-bezier(0.66, 0, 0.34, 1)",
|
|
137
|
+
"keyframes": ["FadeOut"]
|
|
138
|
+
},
|
|
139
|
+
"filePath": "schema/themes/atlassian-motion/motion.tsx",
|
|
140
|
+
"isSource": true,
|
|
141
|
+
"original": {
|
|
142
|
+
"attributes": {
|
|
143
|
+
"group": "motion",
|
|
144
|
+
"state": "experimental",
|
|
145
|
+
"introduced": "11.1.0",
|
|
146
|
+
"description": ""
|
|
147
|
+
},
|
|
148
|
+
"value": {
|
|
149
|
+
"duration": "Duration100",
|
|
150
|
+
"curve": "CubicEaseInOut",
|
|
151
|
+
"keyframes": ["FadeOut"]
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"name": "motion.content.exit.medium",
|
|
155
|
+
"path": ["motion", "content", "exit", "medium"],
|
|
156
|
+
"cleanName": "motion.content.exit.medium"
|
|
157
|
+
}, {
|
|
158
|
+
"attributes": {
|
|
159
|
+
"group": "motion",
|
|
160
|
+
"state": "experimental",
|
|
161
|
+
"introduced": "11.1.0",
|
|
162
|
+
"description": ""
|
|
163
|
+
},
|
|
164
|
+
"value": {
|
|
165
|
+
"duration": 50,
|
|
166
|
+
"curve": "cubic-bezier(0.66, 0, 0.34, 1)",
|
|
167
|
+
"keyframes": ["FadeOut"]
|
|
168
|
+
},
|
|
169
|
+
"filePath": "schema/themes/atlassian-motion/motion.tsx",
|
|
170
|
+
"isSource": true,
|
|
171
|
+
"original": {
|
|
172
|
+
"attributes": {
|
|
173
|
+
"group": "motion",
|
|
174
|
+
"state": "experimental",
|
|
175
|
+
"introduced": "11.1.0",
|
|
176
|
+
"description": ""
|
|
177
|
+
},
|
|
178
|
+
"value": {
|
|
179
|
+
"duration": "Duration050",
|
|
180
|
+
"curve": "CubicEaseInOut",
|
|
181
|
+
"keyframes": ["FadeOut"]
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"name": "motion.content.exit.short",
|
|
185
|
+
"path": ["motion", "content", "exit", "short"],
|
|
186
|
+
"cleanName": "motion.content.exit.short"
|
|
187
|
+
}, {
|
|
188
|
+
"attributes": {
|
|
189
|
+
"group": "motion",
|
|
190
|
+
"state": "experimental",
|
|
191
|
+
"introduced": "11.1.0",
|
|
192
|
+
"description": ""
|
|
193
|
+
},
|
|
194
|
+
"value": {
|
|
195
|
+
"duration": 350,
|
|
196
|
+
"curve": "cubic-bezier(0.66, 0, 0.34, 1)",
|
|
197
|
+
"keyframes": ["ScaleIn80", "FadeIn"]
|
|
198
|
+
},
|
|
199
|
+
"filePath": "schema/themes/atlassian-motion/motion.tsx",
|
|
200
|
+
"isSource": true,
|
|
201
|
+
"original": {
|
|
202
|
+
"attributes": {
|
|
203
|
+
"group": "motion",
|
|
204
|
+
"state": "experimental",
|
|
205
|
+
"introduced": "11.1.0",
|
|
206
|
+
"description": ""
|
|
207
|
+
},
|
|
208
|
+
"value": {
|
|
209
|
+
"duration": "Duration350",
|
|
210
|
+
"curve": "CubicEaseInOut",
|
|
211
|
+
"keyframes": ["ScaleIn80", "FadeIn"]
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"name": "motion.dialog.enter",
|
|
215
|
+
"path": ["motion", "dialog", "enter"],
|
|
216
|
+
"cleanName": "motion.dialog.enter"
|
|
217
|
+
}, {
|
|
218
|
+
"attributes": {
|
|
219
|
+
"group": "motion",
|
|
220
|
+
"state": "experimental",
|
|
221
|
+
"introduced": "11.1.0",
|
|
222
|
+
"description": ""
|
|
223
|
+
},
|
|
224
|
+
"value": {
|
|
225
|
+
"duration": 350,
|
|
226
|
+
"curve": "cubic-bezier(0.66, 0, 0.34, 1)",
|
|
227
|
+
"keyframes": ["ScaleOut80", "FadeOut"]
|
|
228
|
+
},
|
|
229
|
+
"filePath": "schema/themes/atlassian-motion/motion.tsx",
|
|
230
|
+
"isSource": true,
|
|
231
|
+
"original": {
|
|
232
|
+
"attributes": {
|
|
233
|
+
"group": "motion",
|
|
234
|
+
"state": "experimental",
|
|
235
|
+
"introduced": "11.1.0",
|
|
236
|
+
"description": ""
|
|
237
|
+
},
|
|
238
|
+
"value": {
|
|
239
|
+
"duration": "Duration350",
|
|
240
|
+
"curve": "CubicEaseInOut",
|
|
241
|
+
"keyframes": ["ScaleOut80", "FadeOut"]
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"name": "motion.dialog.exit",
|
|
245
|
+
"path": ["motion", "dialog", "exit"],
|
|
246
|
+
"cleanName": "motion.dialog.exit"
|
|
247
|
+
}];
|
|
248
|
+
export default tokens;
|
|
@@ -10,6 +10,7 @@ import { getThemePreferences } from './utils/get-theme-preferences';
|
|
|
10
10
|
* @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
|
|
11
11
|
* @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
|
|
12
12
|
* @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
|
|
13
|
+
* @param {string} themeState.motion The motion theme to be applied.
|
|
13
14
|
* @param {string} themeState.shape The shape theme to be applied.
|
|
14
15
|
* @param {string} themeState.spacing The spacing theme to be applied.
|
|
15
16
|
* @param {string} themeState.typography The typography theme to be applied.
|
|
@@ -33,6 +34,8 @@ var enableGlobalTheme = function enableGlobalTheme() {
|
|
|
33
34
|
dark = _ref$dark === void 0 ? themeStateDefaults['dark'] : _ref$dark,
|
|
34
35
|
_ref$light = _ref.light,
|
|
35
36
|
light = _ref$light === void 0 ? themeStateDefaults['light'] : _ref$light,
|
|
37
|
+
_ref$motion = _ref.motion,
|
|
38
|
+
motion = _ref$motion === void 0 ? themeStateDefaults['motion']() : _ref$motion,
|
|
36
39
|
_ref$shape = _ref.shape,
|
|
37
40
|
shape = _ref$shape === void 0 ? themeStateDefaults['shape']() : _ref$shape,
|
|
38
41
|
_ref$spacing = _ref.spacing,
|
|
@@ -47,6 +50,7 @@ var enableGlobalTheme = function enableGlobalTheme() {
|
|
|
47
50
|
contrastMode: contrastMode,
|
|
48
51
|
dark: dark,
|
|
49
52
|
light: light,
|
|
53
|
+
motion: motion,
|
|
50
54
|
shape: shape,
|
|
51
55
|
spacing: spacing,
|
|
52
56
|
typography: typography,
|
|
@@ -18,6 +18,7 @@ var defaultContrastMode = 'no-preference';
|
|
|
18
18
|
* @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
|
|
19
19
|
* @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
|
|
20
20
|
* @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
|
|
21
|
+
* @param {string} themeState.motion The motion theme to be applied.
|
|
21
22
|
* @param {string} themeState.spacing The spacing theme to be applied.
|
|
22
23
|
* @param {string} themeState.typography The typography theme to be applied.
|
|
23
24
|
* @param {Object} themeState.UNSAFE_themeOptions The custom branding options to be used for custom theme generation
|
|
@@ -34,6 +35,8 @@ var getThemeHtmlAttrs = function getThemeHtmlAttrs() {
|
|
|
34
35
|
light = _ref$light === void 0 ? themeStateDefaults['light'] : _ref$light,
|
|
35
36
|
_ref$contrastMode = _ref.contrastMode,
|
|
36
37
|
contrastMode = _ref$contrastMode === void 0 ? themeStateDefaults['contrastMode'] : _ref$contrastMode,
|
|
38
|
+
_ref$motion = _ref.motion,
|
|
39
|
+
motion = _ref$motion === void 0 ? themeStateDefaults['motion']() : _ref$motion,
|
|
37
40
|
_ref$shape = _ref.shape,
|
|
38
41
|
shape = _ref$shape === void 0 ? themeStateDefaults['shape']() : _ref$shape,
|
|
39
42
|
_ref$spacing = _ref.spacing,
|
|
@@ -45,6 +48,7 @@ var getThemeHtmlAttrs = function getThemeHtmlAttrs() {
|
|
|
45
48
|
var themeAttribute = themeObjectToString({
|
|
46
49
|
dark: dark,
|
|
47
50
|
light: light,
|
|
51
|
+
motion: motion,
|
|
48
52
|
shape: shape,
|
|
49
53
|
spacing: spacing,
|
|
50
54
|
typography: typography
|
|
@@ -14,6 +14,7 @@ import { loadThemeCss } from './utils/theme-loading';
|
|
|
14
14
|
* @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
|
|
15
15
|
* @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
|
|
16
16
|
* @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
|
|
17
|
+
* @param {string} themeState.motion The motion theme to be applied.
|
|
17
18
|
* @param {string} themeState.shape The shape theme to be applied.
|
|
18
19
|
* @param {string} themeState.spacing The spacing theme to be applied.
|
|
19
20
|
* @param {string} themeState.typography The typography theme to be applied.
|
|
@@ -44,6 +45,7 @@ var getThemeStyles = /*#__PURE__*/function () {
|
|
|
44
45
|
contrastMode: (preferences === null || preferences === void 0 ? void 0 : preferences.contrastMode) || themeStateDefaults['contrastMode'],
|
|
45
46
|
dark: (preferences === null || preferences === void 0 ? void 0 : preferences.dark) || themeStateDefaults['dark'],
|
|
46
47
|
light: (preferences === null || preferences === void 0 ? void 0 : preferences.light) || themeStateDefaults['light'],
|
|
48
|
+
motion: (preferences === null || preferences === void 0 ? void 0 : preferences.motion) || themeStateDefaults['motion'](),
|
|
47
49
|
shape: (preferences === null || preferences === void 0 ? void 0 : preferences.shape) || themeStateDefaults['shape'](),
|
|
48
50
|
spacing: (preferences === null || preferences === void 0 ? void 0 : preferences.spacing) || themeStateDefaults['spacing'],
|
|
49
51
|
typography: (preferences === null || preferences === void 0 ? void 0 : preferences.typography) || themeStateDefaults['typography']
|
|
@@ -23,6 +23,7 @@ import { loadAndAppendThemeCss } from './utils/theme-loading';
|
|
|
23
23
|
* @param {string} themeState.contrastMode The contrast mode theme to be applied. If set to `auto`, the theme applied will be determined by the OS setting.set to `auto`, the theme applied will be determined by the OS setting.
|
|
24
24
|
* @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
|
|
25
25
|
* @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
|
|
26
|
+
* @param {string} themeState.motion The motion theme to be applied.
|
|
26
27
|
* @param {string} themeState.shape The shape theme to be applied.
|
|
27
28
|
* @param {string} themeState.spacing The spacing theme to be applied.
|
|
28
29
|
* @param {string} themeState.typography The typography theme to be applied.
|
|
@@ -55,6 +56,8 @@ var setGlobalTheme = /*#__PURE__*/function () {
|
|
|
55
56
|
spacing,
|
|
56
57
|
_ref2$typography,
|
|
57
58
|
typography,
|
|
59
|
+
_ref2$motion,
|
|
60
|
+
motion,
|
|
58
61
|
_ref2$UNSAFE_themeOpt,
|
|
59
62
|
UNSAFE_themeOptions,
|
|
60
63
|
themeState,
|
|
@@ -76,8 +79,9 @@ var setGlobalTheme = /*#__PURE__*/function () {
|
|
|
76
79
|
themeLoader = _args3.length > 1 ? _args3[1] : undefined;
|
|
77
80
|
_ref2 = typeof nextThemeState === 'function' ? nextThemeState(_objectSpread(_objectSpread({}, themeStateDefaults), {}, {
|
|
78
81
|
typography: themeStateDefaults['typography'],
|
|
79
|
-
shape: themeStateDefaults['shape']()
|
|
80
|
-
|
|
82
|
+
shape: themeStateDefaults['shape'](),
|
|
83
|
+
motion: themeStateDefaults['motion']()
|
|
84
|
+
}, getGlobalTheme())) : nextThemeState, _ref2$colorMode = _ref2.colorMode, colorMode = _ref2$colorMode === void 0 ? themeStateDefaults['colorMode'] : _ref2$colorMode, _ref2$contrastMode = _ref2.contrastMode, contrastMode = _ref2$contrastMode === void 0 ? themeStateDefaults['contrastMode'] : _ref2$contrastMode, _ref2$dark = _ref2.dark, dark = _ref2$dark === void 0 ? themeStateDefaults['dark'] : _ref2$dark, _ref2$light = _ref2.light, light = _ref2$light === void 0 ? themeStateDefaults['light'] : _ref2$light, _ref2$shape = _ref2.shape, shape = _ref2$shape === void 0 ? themeStateDefaults['shape']() : _ref2$shape, _ref2$spacing = _ref2.spacing, spacing = _ref2$spacing === void 0 ? themeStateDefaults['spacing'] : _ref2$spacing, _ref2$typography = _ref2.typography, typography = _ref2$typography === void 0 ? themeStateDefaults['typography'] : _ref2$typography, _ref2$motion = _ref2.motion, motion = _ref2$motion === void 0 ? themeStateDefaults['motion']() : _ref2$motion, _ref2$UNSAFE_themeOpt = _ref2.UNSAFE_themeOptions, UNSAFE_themeOptions = _ref2$UNSAFE_themeOpt === void 0 ? themeStateDefaults['UNSAFE_themeOptions'] : _ref2$UNSAFE_themeOpt; // CLEANUP: Remove. This blocks application of increased contrast themes
|
|
81
85
|
// without the feature flag enabled.
|
|
82
86
|
if (!fg('platform_increased-contrast-themes')) {
|
|
83
87
|
if (light === 'light-increased-contrast') {
|
|
@@ -95,6 +99,7 @@ var setGlobalTheme = /*#__PURE__*/function () {
|
|
|
95
99
|
shape: shape,
|
|
96
100
|
spacing: spacing,
|
|
97
101
|
typography: typography,
|
|
102
|
+
motion: motion,
|
|
98
103
|
UNSAFE_themeOptions: themeLoader ? undefined : UNSAFE_themeOptions
|
|
99
104
|
}; // Determine what to load and loading strategy
|
|
100
105
|
themePreferences = getThemePreferences(themeState);
|
package/dist/esm/theme-config.js
CHANGED
|
@@ -40,7 +40,7 @@ var themeContrastModes = ['more', 'no-preference', 'auto'];
|
|
|
40
40
|
*
|
|
41
41
|
* These ids must be kebab case
|
|
42
42
|
*/
|
|
43
|
-
export var themeIds = ['light-increased-contrast', 'light', 'light-future', 'dark', 'dark-future', 'dark-increased-contrast', 'spacing', 'shape', 'typography'];
|
|
43
|
+
export var themeIds = ['light-increased-contrast', 'light', 'light-future', 'dark', 'dark-future', 'dark-increased-contrast', 'spacing', 'shape', 'typography', 'motion'];
|
|
44
44
|
/**
|
|
45
45
|
* Theme override ids: the equivalent of themeIds for theme overrides.
|
|
46
46
|
* Theme overrides are temporary and there may not be any defined at times.
|
|
@@ -149,6 +149,14 @@ var themeConfig = {
|
|
|
149
149
|
attributes: {
|
|
150
150
|
type: 'shape'
|
|
151
151
|
}
|
|
152
|
+
},
|
|
153
|
+
'atlassian-motion': {
|
|
154
|
+
id: 'motion',
|
|
155
|
+
displayName: 'Motion',
|
|
156
|
+
palette: 'motionPalette',
|
|
157
|
+
attributes: {
|
|
158
|
+
type: 'motion'
|
|
159
|
+
}
|
|
152
160
|
}
|
|
153
161
|
};
|
|
154
162
|
|
|
@@ -181,6 +189,12 @@ export var themeStateDefaults = {
|
|
|
181
189
|
},
|
|
182
190
|
spacing: 'spacing',
|
|
183
191
|
typography: 'typography',
|
|
192
|
+
motion: function motion() {
|
|
193
|
+
if (fg('platform-dst-motion-theme-default')) {
|
|
194
|
+
return 'motion';
|
|
195
|
+
}
|
|
196
|
+
return undefined;
|
|
197
|
+
},
|
|
184
198
|
UNSAFE_themeOptions: undefined
|
|
185
199
|
};
|
|
186
200
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import { themeIds } from './theme-config';
|
|
4
|
-
var themeKinds = ['light', 'dark', 'spacing', 'typography', 'shape'];
|
|
4
|
+
var themeKinds = ['light', 'dark', 'spacing', 'typography', 'shape', 'motion'];
|
|
5
5
|
var customThemeOptions = 'UNSAFE_themeOptions';
|
|
6
6
|
var isThemeKind = function isThemeKind(themeKind) {
|
|
7
7
|
return themeKinds.find(function (kind) {
|
|
@@ -8,7 +8,8 @@ export var getThemePreferences = function getThemePreferences(themeState) {
|
|
|
8
8
|
light = themeState.light,
|
|
9
9
|
shape = themeState.shape,
|
|
10
10
|
spacing = themeState.spacing,
|
|
11
|
-
typography = themeState.typography
|
|
11
|
+
typography = themeState.typography,
|
|
12
|
+
motion = themeState.motion;
|
|
12
13
|
var autoColorModeThemes = [light, dark];
|
|
13
14
|
var themePreferences = [];
|
|
14
15
|
if (colorMode === 'auto') {
|
|
@@ -30,7 +31,7 @@ export var getThemePreferences = function getThemePreferences(themeState) {
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
[shape, spacing, typography].forEach(function (themeId) {
|
|
34
|
+
[shape, spacing, typography, motion].forEach(function (themeId) {
|
|
34
35
|
if (themeId) {
|
|
35
36
|
themePreferences.push(themeId);
|
|
36
37
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
* @codegen <<SignedSource::863c43667e050d7cdb209823990418e0>>
|
|
4
|
+
* @codegenCommand yarn build tokens
|
|
5
|
+
*/
|
|
6
|
+
type TokenValue = string | number | {
|
|
7
|
+
duration: number;
|
|
8
|
+
curve: string;
|
|
9
|
+
keyframes: string[];
|
|
10
|
+
delay?: number;
|
|
11
|
+
} | Record<string, any>;
|
|
12
|
+
type TokenValueOriginal = string | number | {
|
|
13
|
+
duration: string;
|
|
14
|
+
curve: string;
|
|
15
|
+
keyframes: string[];
|
|
16
|
+
delay?: string;
|
|
17
|
+
} | Record<string, any>;
|
|
18
|
+
type TokenAttributes = {
|
|
19
|
+
group: string;
|
|
20
|
+
};
|
|
21
|
+
type Token = {
|
|
22
|
+
value: TokenValue;
|
|
23
|
+
filePath: string;
|
|
24
|
+
isSource: boolean;
|
|
25
|
+
attributes: TokenAttributes;
|
|
26
|
+
original: {
|
|
27
|
+
value: TokenValueOriginal;
|
|
28
|
+
attributes: TokenAttributes;
|
|
29
|
+
};
|
|
30
|
+
name: string;
|
|
31
|
+
path: string[];
|
|
32
|
+
};
|
|
33
|
+
declare const tokens: Token[];
|
|
34
|
+
export default tokens;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* These changes will then be picked up by our tooling which will attempt to
|
|
13
13
|
* migrate as many of these renames as possible.
|
|
14
14
|
*
|
|
15
|
-
* @codegen <<SignedSource::
|
|
15
|
+
* @codegen <<SignedSource::71a61fb83f1440f2c7e0c2b84375593c>>
|
|
16
16
|
* @codegenCommand yarn build tokens
|
|
17
17
|
*/
|
|
18
18
|
import type tokens from './token-names';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* This allows users to compose their themes and only use the tokens that are requested.
|
|
7
7
|
* When a new theme is created, the import should automatically be added to the map
|
|
8
8
|
*
|
|
9
|
-
* @codegen <<SignedSource::
|
|
9
|
+
* @codegen <<SignedSource::a20c72d683b08b594c5be4160eec5f78>>
|
|
10
10
|
* @codegenCommand yarn build tokens
|
|
11
11
|
*/
|
|
12
12
|
import { type ThemeIds, type ThemeOverrideIds } from '../theme-config';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
* @codegen <<SignedSource::d9cba7f2a25f65f78c6ad172ff6364ce>>
|
|
4
|
+
* @codegenCommand yarn build tokens
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: "\n@keyframes ScaleIn80 {\n 0% {\n transform: scale(0.8);\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes ScaleIn85 {\n 0% {\n transform: scale(0.85);\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes ScaleIn90 {\n 0% {\n transform: scale(0.9);\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes ScaleIn95 {\n 0% {\n transform: scale(0.95);\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes ScaleOut80 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.8);\n }\n}\n@keyframes ScaleOut85 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.85);\n }\n}\n@keyframes ScaleOut90 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.9);\n }\n}\n@keyframes ScaleOut95 {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.95);\n }\n}\n@keyframes FadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes FadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n@keyframes RotateIn {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(5deg);\n }\n}\n@keyframes RotateOut {\n 0% {\n transform: rotate(5deg);\n }\n 100% {\n transform: rotate(0deg);\n }\n}\nhtml[data-theme~=\"motion:motion\"], [data-subtree-theme][data-theme~=\"motion:motion\"] {\n --ds-content-enter-long: 400ms cubic-bezier(0.66, 0, 0.34, 1) FadeIn;\n --ds-content-enter-medium: 200ms cubic-bezier(0.66, 0, 0.34, 1) FadeIn;\n --ds-content-enter-short: 100ms cubic-bezier(0.66, 0, 0.34, 1) FadeIn;\n --ds-content-exit-long: 200ms cubic-bezier(0.66, 0, 0.34, 1) FadeOut;\n --ds-content-exit-medium: 100ms cubic-bezier(0.66, 0, 0.34, 1) FadeOut;\n --ds-content-exit-short: 50ms cubic-bezier(0.66, 0, 0.34, 1) FadeOut;\n --ds-dialog-enter: 350ms cubic-bezier(0.66, 0, 0.34, 1) ScaleIn80, 350ms cubic-bezier(0.66, 0, 0.34, 1) FadeIn;\n --ds-dialog-exit: 350ms cubic-bezier(0.66, 0, 0.34, 1) ScaleOut80, 350ms cubic-bezier(0.66, 0, 0.34, 1) FadeOut;\n}\n";
|
|
7
|
+
export default _default;
|
|
@@ -7,10 +7,18 @@
|
|
|
7
7
|
* Token names mapped to their value in the default Atlassian themes ('light').
|
|
8
8
|
* These default values are used by the Babel plugin to optionally provide automatic fallbacks.
|
|
9
9
|
*
|
|
10
|
-
* @codegen <<SignedSource::
|
|
10
|
+
* @codegen <<SignedSource::a18a0cf6bb63fbd882dcfe06ef046047>>
|
|
11
11
|
* @codegenCommand yarn build tokens
|
|
12
12
|
*/
|
|
13
13
|
declare const defaultTokenValues: {
|
|
14
|
+
readonly 'motion.content.enter.long': "400ms cubic-bezier(0.66, 0, 0.34, 1) FadeIn";
|
|
15
|
+
readonly 'motion.content.enter.medium': "200ms cubic-bezier(0.66, 0, 0.34, 1) FadeIn";
|
|
16
|
+
readonly 'motion.content.enter.short': "100ms cubic-bezier(0.66, 0, 0.34, 1) FadeIn";
|
|
17
|
+
readonly 'motion.content.exit.long': "200ms cubic-bezier(0.66, 0, 0.34, 1) FadeOut";
|
|
18
|
+
readonly 'motion.content.exit.medium': "100ms cubic-bezier(0.66, 0, 0.34, 1) FadeOut";
|
|
19
|
+
readonly 'motion.content.exit.short': "50ms cubic-bezier(0.66, 0, 0.34, 1) FadeOut";
|
|
20
|
+
readonly 'motion.dialog.enter': "350ms cubic-bezier(0.66, 0, 0.34, 1) ScaleIn80, 350ms cubic-bezier(0.66, 0, 0.34, 1) FadeIn";
|
|
21
|
+
readonly 'motion.dialog.exit': "350ms cubic-bezier(0.66, 0, 0.34, 1) ScaleOut80, 350ms cubic-bezier(0.66, 0, 0.34, 1) FadeOut";
|
|
14
22
|
readonly 'color.text': "#292A2E";
|
|
15
23
|
readonly 'color.text.accent.lime': "#4C6B1F";
|
|
16
24
|
readonly 'color.text.accent.lime.bolder': "#37471F";
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::f76d5451a0ccdab4ce74bc3e952aec8c>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
declare const tokens: {
|
|
7
|
+
readonly 'motion.content.enter.long': "--ds-content-enter-long";
|
|
8
|
+
readonly 'motion.content.enter.medium': "--ds-content-enter-medium";
|
|
9
|
+
readonly 'motion.content.enter.short': "--ds-content-enter-short";
|
|
10
|
+
readonly 'motion.content.exit.long': "--ds-content-exit-long";
|
|
11
|
+
readonly 'motion.content.exit.medium': "--ds-content-exit-medium";
|
|
12
|
+
readonly 'motion.content.exit.short': "--ds-content-exit-short";
|
|
13
|
+
readonly 'motion.dialog.enter': "--ds-dialog-enter";
|
|
14
|
+
readonly 'motion.dialog.exit': "--ds-dialog-exit";
|
|
7
15
|
readonly 'color.text': "--ds-text";
|
|
8
16
|
readonly 'color.text.accent.lime': "--ds-text-accent-lime";
|
|
9
17
|
readonly 'color.text.accent.lime.bolder': "--ds-text-accent-lime-bolder";
|
|
@@ -474,6 +482,14 @@ declare const tokens: {
|
|
|
474
482
|
readonly 'border.width.focused': "--ds-border-width-focused";
|
|
475
483
|
};
|
|
476
484
|
export type CSSTokenMap = {
|
|
485
|
+
'motion.content.enter.long': 'var(--ds-content-enter-long)';
|
|
486
|
+
'motion.content.enter.medium': 'var(--ds-content-enter-medium)';
|
|
487
|
+
'motion.content.enter.short': 'var(--ds-content-enter-short)';
|
|
488
|
+
'motion.content.exit.long': 'var(--ds-content-exit-long)';
|
|
489
|
+
'motion.content.exit.medium': 'var(--ds-content-exit-medium)';
|
|
490
|
+
'motion.content.exit.short': 'var(--ds-content-exit-short)';
|
|
491
|
+
'motion.dialog.enter': 'var(--ds-dialog-enter)';
|
|
492
|
+
'motion.dialog.exit': 'var(--ds-dialog-exit)';
|
|
477
493
|
'color.text': 'var(--ds-text)';
|
|
478
494
|
'color.text.accent.lime': 'var(--ds-text-accent-lime)';
|
|
479
495
|
'color.text.accent.lime.bolder': 'var(--ds-text-accent-lime-bolder)';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
+
* @codegen <<SignedSource::2a5ddbfd4356a65a3955ab62d7341a46>>
|
|
4
|
+
* @codegenCommand yarn build tokens
|
|
5
|
+
*/
|
|
6
|
+
type TokenValue = {
|
|
7
|
+
duration: number;
|
|
8
|
+
curve: string;
|
|
9
|
+
keyframes: string[];
|
|
10
|
+
delay?: number;
|
|
11
|
+
};
|
|
12
|
+
type TokenValueOriginal = {
|
|
13
|
+
duration: string;
|
|
14
|
+
curve: string;
|
|
15
|
+
keyframes: string[];
|
|
16
|
+
delay?: string;
|
|
17
|
+
};
|
|
18
|
+
type TokenAttributes = {
|
|
19
|
+
group: string;
|
|
20
|
+
state: string;
|
|
21
|
+
introduced: string;
|
|
22
|
+
description: string;
|
|
23
|
+
suggest?: string[];
|
|
24
|
+
deprecated?: string;
|
|
25
|
+
replacement?: string;
|
|
26
|
+
};
|
|
27
|
+
type Token = {
|
|
28
|
+
value: TokenValue;
|
|
29
|
+
filePath: string;
|
|
30
|
+
isSource: boolean;
|
|
31
|
+
attributes: TokenAttributes;
|
|
32
|
+
original: {
|
|
33
|
+
value: TokenValueOriginal;
|
|
34
|
+
attributes: TokenAttributes;
|
|
35
|
+
};
|
|
36
|
+
name: string;
|
|
37
|
+
path: string[];
|
|
38
|
+
cleanName: string;
|
|
39
|
+
};
|
|
40
|
+
declare const tokens: Token[];
|
|
41
|
+
export default tokens;
|
|
@@ -8,6 +8,7 @@ import { type ThemeIdsWithOverrides, type ThemeState } from './theme-config';
|
|
|
8
8
|
* @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
|
|
9
9
|
* @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
|
|
10
10
|
* @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
|
|
11
|
+
* @param {string} themeState.motion The motion theme to be applied.
|
|
11
12
|
* @param {string} themeState.shape The shape theme to be applied.
|
|
12
13
|
* @param {string} themeState.spacing The spacing theme to be applied.
|
|
13
14
|
* @param {string} themeState.typography The typography theme to be applied.
|
|
@@ -21,5 +22,5 @@ import { type ThemeIdsWithOverrides, type ThemeState } from './theme-config';
|
|
|
21
22
|
* enableGlobalTheme({colorMode: 'auto', light: 'light', dark: 'dark', spacing: 'spacing'});
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
declare const enableGlobalTheme: ({ colorMode, contrastMode, dark, light, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>, themeLoader?: (id: ThemeIdsWithOverrides) => void) => UnbindFn;
|
|
25
|
+
declare const enableGlobalTheme: ({ colorMode, contrastMode, dark, light, motion, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>, themeLoader?: (id: ThemeIdsWithOverrides) => void) => UnbindFn;
|
|
25
26
|
export default enableGlobalTheme;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Strict design token based typedef representing a subset of safe CSS properties.
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::a329b54d1bff55f1079838f935d27b43>>
|
|
7
7
|
* @codegenCommand yarn build tokens
|
|
8
8
|
*/
|
|
9
9
|
export type BackgroundColorHovered = 'var(--ds-background-accent-lime-subtlest-hovered)' | 'var(--ds-background-accent-lime-subtler-hovered)' | 'var(--ds-background-accent-lime-subtle-hovered)' | 'var(--ds-background-accent-lime-bolder-hovered)' | 'var(--ds-background-accent-red-subtlest-hovered)' | 'var(--ds-background-accent-red-subtler-hovered)' | 'var(--ds-background-accent-red-subtle-hovered)' | 'var(--ds-background-accent-red-bolder-hovered)' | 'var(--ds-background-accent-orange-subtlest-hovered)' | 'var(--ds-background-accent-orange-subtler-hovered)' | 'var(--ds-background-accent-orange-subtle-hovered)' | 'var(--ds-background-accent-orange-bolder-hovered)' | 'var(--ds-background-accent-yellow-subtlest-hovered)' | 'var(--ds-background-accent-yellow-subtler-hovered)' | 'var(--ds-background-accent-yellow-subtle-hovered)' | 'var(--ds-background-accent-yellow-bolder-hovered)' | 'var(--ds-background-accent-green-subtlest-hovered)' | 'var(--ds-background-accent-green-subtler-hovered)' | 'var(--ds-background-accent-green-subtle-hovered)' | 'var(--ds-background-accent-green-bolder-hovered)' | 'var(--ds-background-accent-teal-subtlest-hovered)' | 'var(--ds-background-accent-teal-subtler-hovered)' | 'var(--ds-background-accent-teal-subtle-hovered)' | 'var(--ds-background-accent-teal-bolder-hovered)' | 'var(--ds-background-accent-blue-subtlest-hovered)' | 'var(--ds-background-accent-blue-subtler-hovered)' | 'var(--ds-background-accent-blue-subtle-hovered)' | 'var(--ds-background-accent-blue-bolder-hovered)' | 'var(--ds-background-accent-purple-subtlest-hovered)' | 'var(--ds-background-accent-purple-subtler-hovered)' | 'var(--ds-background-accent-purple-subtle-hovered)' | 'var(--ds-background-accent-purple-bolder-hovered)' | 'var(--ds-background-accent-magenta-subtlest-hovered)' | 'var(--ds-background-accent-magenta-subtler-hovered)' | 'var(--ds-background-accent-magenta-subtle-hovered)' | 'var(--ds-background-accent-magenta-bolder-hovered)' | 'var(--ds-background-accent-gray-subtlest-hovered)' | 'var(--ds-background-accent-gray-subtler-hovered)' | 'var(--ds-background-accent-gray-subtle-hovered)' | 'var(--ds-background-accent-gray-bolder-hovered)' | 'var(--ds-background-input-hovered)' | 'var(--ds-background-inverse-subtle-hovered)' | 'var(--ds-background-neutral-hovered)' | 'var(--ds-background-neutral-subtle-hovered)' | 'var(--ds-background-neutral-bold-hovered)' | 'var(--ds-background-selected-hovered)' | 'var(--ds-background-selected-bold-hovered)' | 'var(--ds-background-brand-subtlest-hovered)' | 'var(--ds-background-brand-bold-hovered)' | 'var(--ds-background-brand-boldest-hovered)' | 'var(--ds-background-danger-hovered)' | 'var(--ds-background-danger-subtler-hovered)' | 'var(--ds-background-danger-bold-hovered)' | 'var(--ds-background-warning-hovered)' | 'var(--ds-background-warning-subtler-hovered)' | 'var(--ds-background-warning-bold-hovered)' | 'var(--ds-background-success-hovered)' | 'var(--ds-background-success-subtler-hovered)' | 'var(--ds-background-success-bold-hovered)' | 'var(--ds-background-discovery-hovered)' | 'var(--ds-background-discovery-subtler-hovered)' | 'var(--ds-background-discovery-bold-hovered)' | 'var(--ds-background-information-hovered)' | 'var(--ds-background-information-subtler-hovered)' | 'var(--ds-background-information-bold-hovered)' | 'var(--ds-surface-hovered)' | 'var(--ds-surface-overlay-hovered)' | 'var(--ds-surface-raised-hovered)';
|
|
@@ -27,6 +27,7 @@ export type TextColor = 'transparent' | TextColorPressed | 'var(--ds-text)' | 'v
|
|
|
27
27
|
export type Opacity = 'var(--ds-opacity-disabled)' | 'var(--ds-opacity-loading)' | 0 | 1 | '0' | '1';
|
|
28
28
|
export type FontWeight = 'var(--ds-font-weight-regular)' | 'var(--ds-font-weight-medium)' | 'var(--ds-font-weight-semibold)' | 'var(--ds-font-weight-bold)' | 'inherit' | 'initial' | 'unset';
|
|
29
29
|
export type FontFamily = 'var(--ds-font-family-heading)' | 'var(--ds-font-family-body)' | 'var(--ds-font-family-code)' | 'var(--ds-font-family-brand-heading)' | 'var(--ds-font-family-brand-body)';
|
|
30
|
+
export type Motion = 'var(--ds-content-enter-long)' | 'var(--ds-content-enter-medium)' | 'var(--ds-content-enter-short)' | 'var(--ds-content-exit-long)' | 'var(--ds-content-exit-medium)' | 'var(--ds-content-exit-short)' | 'var(--ds-dialog-enter)' | 'var(--ds-dialog-exit)';
|
|
30
31
|
export interface CSSPropertiesHovered {
|
|
31
32
|
backgroundColor: BackgroundColorHovered;
|
|
32
33
|
}
|
|
@@ -7,11 +7,12 @@ import { type ThemeState } from './theme-config';
|
|
|
7
7
|
* @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
|
|
8
8
|
* @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
|
|
9
9
|
* @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
|
|
10
|
+
* @param {string} themeState.motion The motion theme to be applied.
|
|
10
11
|
* @param {string} themeState.spacing The spacing theme to be applied.
|
|
11
12
|
* @param {string} themeState.typography The typography theme to be applied.
|
|
12
13
|
* @param {Object} themeState.UNSAFE_themeOptions The custom branding options to be used for custom theme generation
|
|
13
14
|
*
|
|
14
15
|
* @returns {Object} Object of HTML attributes to be applied to the document root
|
|
15
16
|
*/
|
|
16
|
-
declare const getThemeHtmlAttrs: ({ colorMode, dark, light, contrastMode, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>) => Record<string, string>;
|
|
17
|
+
declare const getThemeHtmlAttrs: ({ colorMode, dark, light, contrastMode, motion, shape, spacing, typography, UNSAFE_themeOptions, }?: Partial<ThemeState>) => Record<string, string>;
|
|
17
18
|
export default getThemeHtmlAttrs;
|
|
@@ -12,6 +12,7 @@ export interface ThemeStyles {
|
|
|
12
12
|
* @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
|
|
13
13
|
* @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
|
|
14
14
|
* @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
|
|
15
|
+
* @param {string} themeState.motion The motion theme to be applied.
|
|
15
16
|
* @param {string} themeState.shape The shape theme to be applied.
|
|
16
17
|
* @param {string} themeState.spacing The spacing theme to be applied.
|
|
17
18
|
* @param {string} themeState.typography The typography theme to be applied.
|