@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.
Files changed (75) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/artifacts/palettes-raw/motion-palette.js +527 -0
  3. package/dist/cjs/artifacts/replacement-mapping.js +25 -1
  4. package/dist/cjs/artifacts/theme-import-map.js +7 -1
  5. package/dist/cjs/artifacts/themes/atlassian-motion.js +12 -0
  6. package/dist/cjs/artifacts/token-default-values.js +9 -1
  7. package/dist/cjs/artifacts/token-names.js +9 -1
  8. package/dist/cjs/artifacts/tokens-raw/atlassian-motion.js +254 -0
  9. package/dist/cjs/enable-global-theme.js +4 -0
  10. package/dist/cjs/get-theme-html-attrs.js +4 -0
  11. package/dist/cjs/get-theme-styles.js +2 -0
  12. package/dist/cjs/set-global-theme.js +7 -2
  13. package/dist/cjs/theme-config.js +15 -1
  14. package/dist/cjs/theme-state-transformer.js +1 -1
  15. package/dist/cjs/utils/get-theme-preferences.js +3 -2
  16. package/dist/es2019/artifacts/palettes-raw/motion-palette.js +521 -0
  17. package/dist/es2019/artifacts/replacement-mapping.js +25 -1
  18. package/dist/es2019/artifacts/theme-import-map.js +4 -2
  19. package/dist/es2019/artifacts/themes/atlassian-motion.js +113 -0
  20. package/dist/es2019/artifacts/token-default-values.js +9 -1
  21. package/dist/es2019/artifacts/token-names.js +9 -1
  22. package/dist/es2019/artifacts/tokens-raw/atlassian-motion.js +248 -0
  23. package/dist/es2019/enable-global-theme.js +3 -0
  24. package/dist/es2019/get-theme-html-attrs.js +3 -0
  25. package/dist/es2019/get-theme-styles.js +2 -0
  26. package/dist/es2019/set-global-theme.js +4 -0
  27. package/dist/es2019/theme-config.js +15 -1
  28. package/dist/es2019/theme-state-transformer.js +1 -1
  29. package/dist/es2019/utils/get-theme-preferences.js +3 -2
  30. package/dist/esm/artifacts/palettes-raw/motion-palette.js +521 -0
  31. package/dist/esm/artifacts/replacement-mapping.js +25 -1
  32. package/dist/esm/artifacts/theme-import-map.js +5 -1
  33. package/dist/esm/artifacts/themes/atlassian-motion.js +6 -0
  34. package/dist/esm/artifacts/token-default-values.js +9 -1
  35. package/dist/esm/artifacts/token-names.js +9 -1
  36. package/dist/esm/artifacts/tokens-raw/atlassian-motion.js +248 -0
  37. package/dist/esm/enable-global-theme.js +4 -0
  38. package/dist/esm/get-theme-html-attrs.js +4 -0
  39. package/dist/esm/get-theme-styles.js +2 -0
  40. package/dist/esm/set-global-theme.js +7 -2
  41. package/dist/esm/theme-config.js +15 -1
  42. package/dist/esm/theme-state-transformer.js +1 -1
  43. package/dist/esm/utils/get-theme-preferences.js +3 -2
  44. package/dist/types/artifacts/palettes-raw/motion-palette.d.ts +34 -0
  45. package/dist/types/artifacts/replacement-mapping.d.ts +1 -1
  46. package/dist/types/artifacts/theme-import-map.d.ts +1 -1
  47. package/dist/types/artifacts/themes/atlassian-motion.d.ts +7 -0
  48. package/dist/types/artifacts/token-default-values.d.ts +9 -1
  49. package/dist/types/artifacts/token-names.d.ts +17 -1
  50. package/dist/types/artifacts/tokens-raw/atlassian-motion.d.ts +41 -0
  51. package/dist/types/enable-global-theme.d.ts +2 -1
  52. package/dist/types/entry-points/css-type-schema.codegen.d.ts +2 -1
  53. package/dist/types/get-theme-html-attrs.d.ts +2 -1
  54. package/dist/types/get-theme-styles.d.ts +1 -0
  55. package/dist/types/index.d.ts +1 -1
  56. package/dist/types/set-global-theme.d.ts +1 -0
  57. package/dist/types/theme-config.d.ts +10 -7
  58. package/dist/types/types.d.ts +30 -1
  59. package/dist/types-ts4.5/artifacts/palettes-raw/motion-palette.d.ts +34 -0
  60. package/dist/types-ts4.5/artifacts/replacement-mapping.d.ts +1 -1
  61. package/dist/types-ts4.5/artifacts/theme-import-map.d.ts +1 -1
  62. package/dist/types-ts4.5/artifacts/themes/atlassian-motion.d.ts +7 -0
  63. package/dist/types-ts4.5/artifacts/token-default-values.d.ts +9 -1
  64. package/dist/types-ts4.5/artifacts/token-names.d.ts +17 -1
  65. package/dist/types-ts4.5/artifacts/tokens-raw/atlassian-motion.d.ts +41 -0
  66. package/dist/types-ts4.5/enable-global-theme.d.ts +2 -1
  67. package/dist/types-ts4.5/entry-points/css-type-schema.codegen.d.ts +2 -1
  68. package/dist/types-ts4.5/get-theme-html-attrs.d.ts +2 -1
  69. package/dist/types-ts4.5/get-theme-styles.d.ts +1 -0
  70. package/dist/types-ts4.5/index.d.ts +1 -1
  71. package/dist/types-ts4.5/set-global-theme.d.ts +1 -0
  72. package/dist/types-ts4.5/theme-config.d.ts +11 -7
  73. package/dist/types-ts4.5/types.d.ts +30 -1
  74. package/figma/atlassian-motion.json +5 -0
  75. package/package.json +9 -6
@@ -0,0 +1,254 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /**
8
+ * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
9
+ * @codegen <<SignedSource::2a5ddbfd4356a65a3955ab62d7341a46>>
10
+ * @codegenCommand yarn build tokens
11
+ */
12
+
13
+ var tokens = [{
14
+ "attributes": {
15
+ "group": "motion",
16
+ "state": "experimental",
17
+ "introduced": "11.1.0",
18
+ "description": ""
19
+ },
20
+ "value": {
21
+ "duration": 400,
22
+ "curve": "cubic-bezier(0.66, 0, 0.34, 1)",
23
+ "keyframes": ["FadeIn"]
24
+ },
25
+ "filePath": "schema/themes/atlassian-motion/motion.tsx",
26
+ "isSource": true,
27
+ "original": {
28
+ "attributes": {
29
+ "group": "motion",
30
+ "state": "experimental",
31
+ "introduced": "11.1.0",
32
+ "description": ""
33
+ },
34
+ "value": {
35
+ "duration": "Duration400",
36
+ "curve": "CubicEaseInOut",
37
+ "keyframes": ["FadeIn"]
38
+ }
39
+ },
40
+ "name": "motion.content.enter.long",
41
+ "path": ["motion", "content", "enter", "long"],
42
+ "cleanName": "motion.content.enter.long"
43
+ }, {
44
+ "attributes": {
45
+ "group": "motion",
46
+ "state": "experimental",
47
+ "introduced": "11.1.0",
48
+ "description": ""
49
+ },
50
+ "value": {
51
+ "duration": 200,
52
+ "curve": "cubic-bezier(0.66, 0, 0.34, 1)",
53
+ "keyframes": ["FadeIn"]
54
+ },
55
+ "filePath": "schema/themes/atlassian-motion/motion.tsx",
56
+ "isSource": true,
57
+ "original": {
58
+ "attributes": {
59
+ "group": "motion",
60
+ "state": "experimental",
61
+ "introduced": "11.1.0",
62
+ "description": ""
63
+ },
64
+ "value": {
65
+ "duration": "Duration200",
66
+ "curve": "CubicEaseInOut",
67
+ "keyframes": ["FadeIn"]
68
+ }
69
+ },
70
+ "name": "motion.content.enter.medium",
71
+ "path": ["motion", "content", "enter", "medium"],
72
+ "cleanName": "motion.content.enter.medium"
73
+ }, {
74
+ "attributes": {
75
+ "group": "motion",
76
+ "state": "experimental",
77
+ "introduced": "11.1.0",
78
+ "description": ""
79
+ },
80
+ "value": {
81
+ "duration": 100,
82
+ "curve": "cubic-bezier(0.66, 0, 0.34, 1)",
83
+ "keyframes": ["FadeIn"]
84
+ },
85
+ "filePath": "schema/themes/atlassian-motion/motion.tsx",
86
+ "isSource": true,
87
+ "original": {
88
+ "attributes": {
89
+ "group": "motion",
90
+ "state": "experimental",
91
+ "introduced": "11.1.0",
92
+ "description": ""
93
+ },
94
+ "value": {
95
+ "duration": "Duration100",
96
+ "curve": "CubicEaseInOut",
97
+ "keyframes": ["FadeIn"]
98
+ }
99
+ },
100
+ "name": "motion.content.enter.short",
101
+ "path": ["motion", "content", "enter", "short"],
102
+ "cleanName": "motion.content.enter.short"
103
+ }, {
104
+ "attributes": {
105
+ "group": "motion",
106
+ "state": "experimental",
107
+ "introduced": "11.1.0",
108
+ "description": ""
109
+ },
110
+ "value": {
111
+ "duration": 200,
112
+ "curve": "cubic-bezier(0.66, 0, 0.34, 1)",
113
+ "keyframes": ["FadeOut"]
114
+ },
115
+ "filePath": "schema/themes/atlassian-motion/motion.tsx",
116
+ "isSource": true,
117
+ "original": {
118
+ "attributes": {
119
+ "group": "motion",
120
+ "state": "experimental",
121
+ "introduced": "11.1.0",
122
+ "description": ""
123
+ },
124
+ "value": {
125
+ "duration": "Duration200",
126
+ "curve": "CubicEaseInOut",
127
+ "keyframes": ["FadeOut"]
128
+ }
129
+ },
130
+ "name": "motion.content.exit.long",
131
+ "path": ["motion", "content", "exit", "long"],
132
+ "cleanName": "motion.content.exit.long"
133
+ }, {
134
+ "attributes": {
135
+ "group": "motion",
136
+ "state": "experimental",
137
+ "introduced": "11.1.0",
138
+ "description": ""
139
+ },
140
+ "value": {
141
+ "duration": 100,
142
+ "curve": "cubic-bezier(0.66, 0, 0.34, 1)",
143
+ "keyframes": ["FadeOut"]
144
+ },
145
+ "filePath": "schema/themes/atlassian-motion/motion.tsx",
146
+ "isSource": true,
147
+ "original": {
148
+ "attributes": {
149
+ "group": "motion",
150
+ "state": "experimental",
151
+ "introduced": "11.1.0",
152
+ "description": ""
153
+ },
154
+ "value": {
155
+ "duration": "Duration100",
156
+ "curve": "CubicEaseInOut",
157
+ "keyframes": ["FadeOut"]
158
+ }
159
+ },
160
+ "name": "motion.content.exit.medium",
161
+ "path": ["motion", "content", "exit", "medium"],
162
+ "cleanName": "motion.content.exit.medium"
163
+ }, {
164
+ "attributes": {
165
+ "group": "motion",
166
+ "state": "experimental",
167
+ "introduced": "11.1.0",
168
+ "description": ""
169
+ },
170
+ "value": {
171
+ "duration": 50,
172
+ "curve": "cubic-bezier(0.66, 0, 0.34, 1)",
173
+ "keyframes": ["FadeOut"]
174
+ },
175
+ "filePath": "schema/themes/atlassian-motion/motion.tsx",
176
+ "isSource": true,
177
+ "original": {
178
+ "attributes": {
179
+ "group": "motion",
180
+ "state": "experimental",
181
+ "introduced": "11.1.0",
182
+ "description": ""
183
+ },
184
+ "value": {
185
+ "duration": "Duration050",
186
+ "curve": "CubicEaseInOut",
187
+ "keyframes": ["FadeOut"]
188
+ }
189
+ },
190
+ "name": "motion.content.exit.short",
191
+ "path": ["motion", "content", "exit", "short"],
192
+ "cleanName": "motion.content.exit.short"
193
+ }, {
194
+ "attributes": {
195
+ "group": "motion",
196
+ "state": "experimental",
197
+ "introduced": "11.1.0",
198
+ "description": ""
199
+ },
200
+ "value": {
201
+ "duration": 350,
202
+ "curve": "cubic-bezier(0.66, 0, 0.34, 1)",
203
+ "keyframes": ["ScaleIn80", "FadeIn"]
204
+ },
205
+ "filePath": "schema/themes/atlassian-motion/motion.tsx",
206
+ "isSource": true,
207
+ "original": {
208
+ "attributes": {
209
+ "group": "motion",
210
+ "state": "experimental",
211
+ "introduced": "11.1.0",
212
+ "description": ""
213
+ },
214
+ "value": {
215
+ "duration": "Duration350",
216
+ "curve": "CubicEaseInOut",
217
+ "keyframes": ["ScaleIn80", "FadeIn"]
218
+ }
219
+ },
220
+ "name": "motion.dialog.enter",
221
+ "path": ["motion", "dialog", "enter"],
222
+ "cleanName": "motion.dialog.enter"
223
+ }, {
224
+ "attributes": {
225
+ "group": "motion",
226
+ "state": "experimental",
227
+ "introduced": "11.1.0",
228
+ "description": ""
229
+ },
230
+ "value": {
231
+ "duration": 350,
232
+ "curve": "cubic-bezier(0.66, 0, 0.34, 1)",
233
+ "keyframes": ["ScaleOut80", "FadeOut"]
234
+ },
235
+ "filePath": "schema/themes/atlassian-motion/motion.tsx",
236
+ "isSource": true,
237
+ "original": {
238
+ "attributes": {
239
+ "group": "motion",
240
+ "state": "experimental",
241
+ "introduced": "11.1.0",
242
+ "description": ""
243
+ },
244
+ "value": {
245
+ "duration": "Duration350",
246
+ "curve": "CubicEaseInOut",
247
+ "keyframes": ["ScaleOut80", "FadeOut"]
248
+ }
249
+ },
250
+ "name": "motion.dialog.exit",
251
+ "path": ["motion", "dialog", "exit"],
252
+ "cleanName": "motion.dialog.exit"
253
+ }];
254
+ var _default = exports.default = tokens;
@@ -16,6 +16,7 @@ var _getThemePreferences = require("./utils/get-theme-preferences");
16
16
  * @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
17
17
  * @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
18
18
  * @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
19
+ * @param {string} themeState.motion The motion theme to be applied.
19
20
  * @param {string} themeState.shape The shape theme to be applied.
20
21
  * @param {string} themeState.spacing The spacing theme to be applied.
21
22
  * @param {string} themeState.typography The typography theme to be applied.
@@ -39,6 +40,8 @@ var enableGlobalTheme = function enableGlobalTheme() {
39
40
  dark = _ref$dark === void 0 ? _themeConfig.themeStateDefaults['dark'] : _ref$dark,
40
41
  _ref$light = _ref.light,
41
42
  light = _ref$light === void 0 ? _themeConfig.themeStateDefaults['light'] : _ref$light,
43
+ _ref$motion = _ref.motion,
44
+ motion = _ref$motion === void 0 ? _themeConfig.themeStateDefaults['motion']() : _ref$motion,
42
45
  _ref$shape = _ref.shape,
43
46
  shape = _ref$shape === void 0 ? _themeConfig.themeStateDefaults['shape']() : _ref$shape,
44
47
  _ref$spacing = _ref.spacing,
@@ -53,6 +56,7 @@ var enableGlobalTheme = function enableGlobalTheme() {
53
56
  contrastMode: contrastMode,
54
57
  dark: dark,
55
58
  light: light,
59
+ motion: motion,
56
60
  shape: shape,
57
61
  spacing: spacing,
58
62
  typography: typography,
@@ -25,6 +25,7 @@ var defaultContrastMode = 'no-preference';
25
25
  * @param {string} themeState.colorMode Determines which color theme is applied. If set to `auto`, the theme applied will be determined by the OS setting.
26
26
  * @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
27
27
  * @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
28
+ * @param {string} themeState.motion The motion theme to be applied.
28
29
  * @param {string} themeState.spacing The spacing theme to be applied.
29
30
  * @param {string} themeState.typography The typography theme to be applied.
30
31
  * @param {Object} themeState.UNSAFE_themeOptions The custom branding options to be used for custom theme generation
@@ -41,6 +42,8 @@ var getThemeHtmlAttrs = function getThemeHtmlAttrs() {
41
42
  light = _ref$light === void 0 ? _themeConfig.themeStateDefaults['light'] : _ref$light,
42
43
  _ref$contrastMode = _ref.contrastMode,
43
44
  contrastMode = _ref$contrastMode === void 0 ? _themeConfig.themeStateDefaults['contrastMode'] : _ref$contrastMode,
45
+ _ref$motion = _ref.motion,
46
+ motion = _ref$motion === void 0 ? _themeConfig.themeStateDefaults['motion']() : _ref$motion,
44
47
  _ref$shape = _ref.shape,
45
48
  shape = _ref$shape === void 0 ? _themeConfig.themeStateDefaults['shape']() : _ref$shape,
46
49
  _ref$spacing = _ref.spacing,
@@ -52,6 +55,7 @@ var getThemeHtmlAttrs = function getThemeHtmlAttrs() {
52
55
  var themeAttribute = (0, _themeStateTransformer.themeObjectToString)({
53
56
  dark: dark,
54
57
  light: light,
58
+ motion: motion,
55
59
  shape: shape,
56
60
  spacing: spacing,
57
61
  typography: typography
@@ -23,6 +23,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
23
23
  * @param {string} themeState.colorMode Determines which color theme is applied. If 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.
@@ -53,6 +54,7 @@ var getThemeStyles = /*#__PURE__*/function () {
53
54
  contrastMode: (preferences === null || preferences === void 0 ? void 0 : preferences.contrastMode) || _themeConfig.themeStateDefaults['contrastMode'],
54
55
  dark: (preferences === null || preferences === void 0 ? void 0 : preferences.dark) || _themeConfig.themeStateDefaults['dark'],
55
56
  light: (preferences === null || preferences === void 0 ? void 0 : preferences.light) || _themeConfig.themeStateDefaults['light'],
57
+ motion: (preferences === null || preferences === void 0 ? void 0 : preferences.motion) || _themeConfig.themeStateDefaults['motion'](),
56
58
  shape: (preferences === null || preferences === void 0 ? void 0 : preferences.shape) || _themeConfig.themeStateDefaults['shape'](),
57
59
  spacing: (preferences === null || preferences === void 0 ? void 0 : preferences.spacing) || _themeConfig.themeStateDefaults['spacing'],
58
60
  typography: (preferences === null || preferences === void 0 ? void 0 : preferences.typography) || _themeConfig.themeStateDefaults['typography']
@@ -31,6 +31,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
31
31
  * @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.
32
32
  * @param {string} themeState.dark The color theme to be applied when the color mode resolves to 'dark'.
33
33
  * @param {string} themeState.light The color theme to be applied when the color mode resolves to 'light'.
34
+ * @param {string} themeState.motion The motion theme to be applied.
34
35
  * @param {string} themeState.shape The shape theme to be applied.
35
36
  * @param {string} themeState.spacing The spacing theme to be applied.
36
37
  * @param {string} themeState.typography The typography theme to be applied.
@@ -63,6 +64,8 @@ var setGlobalTheme = /*#__PURE__*/function () {
63
64
  spacing,
64
65
  _ref2$typography,
65
66
  typography,
67
+ _ref2$motion,
68
+ motion,
66
69
  _ref2$UNSAFE_themeOpt,
67
70
  UNSAFE_themeOptions,
68
71
  themeState,
@@ -84,8 +87,9 @@ var setGlobalTheme = /*#__PURE__*/function () {
84
87
  themeLoader = _args3.length > 1 ? _args3[1] : undefined;
85
88
  _ref2 = typeof nextThemeState === 'function' ? nextThemeState(_objectSpread(_objectSpread({}, _themeConfig.themeStateDefaults), {}, {
86
89
  typography: _themeConfig.themeStateDefaults['typography'],
87
- shape: _themeConfig.themeStateDefaults['shape']()
88
- }, (0, _getGlobalTheme.default)())) : nextThemeState, _ref2$colorMode = _ref2.colorMode, colorMode = _ref2$colorMode === void 0 ? _themeConfig.themeStateDefaults['colorMode'] : _ref2$colorMode, _ref2$contrastMode = _ref2.contrastMode, contrastMode = _ref2$contrastMode === void 0 ? _themeConfig.themeStateDefaults['contrastMode'] : _ref2$contrastMode, _ref2$dark = _ref2.dark, dark = _ref2$dark === void 0 ? _themeConfig.themeStateDefaults['dark'] : _ref2$dark, _ref2$light = _ref2.light, light = _ref2$light === void 0 ? _themeConfig.themeStateDefaults['light'] : _ref2$light, _ref2$shape = _ref2.shape, shape = _ref2$shape === void 0 ? _themeConfig.themeStateDefaults['shape']() : _ref2$shape, _ref2$spacing = _ref2.spacing, spacing = _ref2$spacing === void 0 ? _themeConfig.themeStateDefaults['spacing'] : _ref2$spacing, _ref2$typography = _ref2.typography, typography = _ref2$typography === void 0 ? _themeConfig.themeStateDefaults['typography'] : _ref2$typography, _ref2$UNSAFE_themeOpt = _ref2.UNSAFE_themeOptions, UNSAFE_themeOptions = _ref2$UNSAFE_themeOpt === void 0 ? _themeConfig.themeStateDefaults['UNSAFE_themeOptions'] : _ref2$UNSAFE_themeOpt; // CLEANUP: Remove. This blocks application of increased contrast themes
90
+ shape: _themeConfig.themeStateDefaults['shape'](),
91
+ motion: _themeConfig.themeStateDefaults['motion']()
92
+ }, (0, _getGlobalTheme.default)())) : nextThemeState, _ref2$colorMode = _ref2.colorMode, colorMode = _ref2$colorMode === void 0 ? _themeConfig.themeStateDefaults['colorMode'] : _ref2$colorMode, _ref2$contrastMode = _ref2.contrastMode, contrastMode = _ref2$contrastMode === void 0 ? _themeConfig.themeStateDefaults['contrastMode'] : _ref2$contrastMode, _ref2$dark = _ref2.dark, dark = _ref2$dark === void 0 ? _themeConfig.themeStateDefaults['dark'] : _ref2$dark, _ref2$light = _ref2.light, light = _ref2$light === void 0 ? _themeConfig.themeStateDefaults['light'] : _ref2$light, _ref2$shape = _ref2.shape, shape = _ref2$shape === void 0 ? _themeConfig.themeStateDefaults['shape']() : _ref2$shape, _ref2$spacing = _ref2.spacing, spacing = _ref2$spacing === void 0 ? _themeConfig.themeStateDefaults['spacing'] : _ref2$spacing, _ref2$typography = _ref2.typography, typography = _ref2$typography === void 0 ? _themeConfig.themeStateDefaults['typography'] : _ref2$typography, _ref2$motion = _ref2.motion, motion = _ref2$motion === void 0 ? _themeConfig.themeStateDefaults['motion']() : _ref2$motion, _ref2$UNSAFE_themeOpt = _ref2.UNSAFE_themeOptions, UNSAFE_themeOptions = _ref2$UNSAFE_themeOpt === void 0 ? _themeConfig.themeStateDefaults['UNSAFE_themeOptions'] : _ref2$UNSAFE_themeOpt; // CLEANUP: Remove. This blocks application of increased contrast themes
89
93
  // without the feature flag enabled.
90
94
  if (!(0, _platformFeatureFlags.fg)('platform_increased-contrast-themes')) {
91
95
  if (light === 'light-increased-contrast') {
@@ -103,6 +107,7 @@ var setGlobalTheme = /*#__PURE__*/function () {
103
107
  shape: shape,
104
108
  spacing: spacing,
105
109
  typography: typography,
110
+ motion: motion,
106
111
  UNSAFE_themeOptions: themeLoader ? undefined : UNSAFE_themeOptions
107
112
  }; // Determine what to load and loading strategy
108
113
  themePreferences = (0, _getThemePreferences.getThemePreferences)(themeState);
@@ -45,7 +45,7 @@ var themeContrastModes = ['more', 'no-preference', 'auto'];
45
45
  *
46
46
  * These ids must be kebab case
47
47
  */
48
- var themeIds = exports.themeIds = ['light-increased-contrast', 'light', 'light-future', 'dark', 'dark-future', 'dark-increased-contrast', 'spacing', 'shape', 'typography'];
48
+ var themeIds = exports.themeIds = ['light-increased-contrast', 'light', 'light-future', 'dark', 'dark-future', 'dark-increased-contrast', 'spacing', 'shape', 'typography', 'motion'];
49
49
  /**
50
50
  * Theme override ids: the equivalent of themeIds for theme overrides.
51
51
  * Theme overrides are temporary and there may not be any defined at times.
@@ -154,6 +154,14 @@ var themeConfig = {
154
154
  attributes: {
155
155
  type: 'shape'
156
156
  }
157
+ },
158
+ 'atlassian-motion': {
159
+ id: 'motion',
160
+ displayName: 'Motion',
161
+ palette: 'motionPalette',
162
+ attributes: {
163
+ type: 'motion'
164
+ }
157
165
  }
158
166
  };
159
167
 
@@ -186,6 +194,12 @@ var themeStateDefaults = exports.themeStateDefaults = {
186
194
  },
187
195
  spacing: 'spacing',
188
196
  typography: 'typography',
197
+ motion: function motion() {
198
+ if ((0, _platformFeatureFlags.fg)('platform-dst-motion-theme-default')) {
199
+ return 'motion';
200
+ }
201
+ return undefined;
202
+ },
189
203
  UNSAFE_themeOptions: undefined
190
204
  };
191
205
 
@@ -8,7 +8,7 @@ exports.themeStringToObject = exports.themeObjectToString = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _themeConfig = require("./theme-config");
11
- var themeKinds = ['light', 'dark', 'spacing', 'typography', 'shape'];
11
+ var themeKinds = ['light', 'dark', 'spacing', 'typography', 'shape', 'motion'];
12
12
  var customThemeOptions = 'UNSAFE_themeOptions';
13
13
  var isThemeKind = function isThemeKind(themeKind) {
14
14
  return themeKinds.find(function (kind) {
@@ -15,7 +15,8 @@ var getThemePreferences = exports.getThemePreferences = function getThemePrefere
15
15
  light = themeState.light,
16
16
  shape = themeState.shape,
17
17
  spacing = themeState.spacing,
18
- typography = themeState.typography;
18
+ typography = themeState.typography,
19
+ motion = themeState.motion;
19
20
  var autoColorModeThemes = [light, dark];
20
21
  var themePreferences = [];
21
22
  if (colorMode === 'auto') {
@@ -37,7 +38,7 @@ var getThemePreferences = exports.getThemePreferences = function getThemePrefere
37
38
  }
38
39
  }
39
40
  }
40
- [shape, spacing, typography].forEach(function (themeId) {
41
+ [shape, spacing, typography, motion].forEach(function (themeId) {
41
42
  if (themeId) {
42
43
  themePreferences.push(themeId);
43
44
  }