@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
package/dist/types/index.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ export { default as themeImportMap } from './artifacts/theme-import-map';
|
|
|
14
14
|
export type { CSSToken } from './artifacts/token-names';
|
|
15
15
|
export type { ActiveTokens } from './artifacts/types';
|
|
16
16
|
export type { ThemeColorModes, ThemeContrastModes, Themes, ThemeFileNames, ThemeIds, ThemeOptionsSchema, ThemeState, ActiveThemeState, } from './theme-config';
|
|
17
|
-
export type { FontFamilyToken, FontWeightToken, Groups, OpacityToken, PaintToken, RawToken, ShadowToken, SpacingToken, ShapeToken, TypographyToken, } from './types';
|
|
17
|
+
export type { FontFamilyToken, FontWeightToken, Groups, OpacityToken, PaintToken, RawToken, ShadowToken, SpacingToken, ShapeToken, TypographyToken, MotionToken, } from './types';
|
|
18
18
|
export { COLOR_MODE_ATTRIBUTE, CURRENT_SURFACE_CSS_VAR, SUBTREE_THEME_ATTRIBUTE, THEME_DATA_ATTRIBUTE, } from './constants';
|
|
@@ -8,6 +8,7 @@ import { type ThemeIdsWithOverrides, type ThemeState } from './theme-config';
|
|
|
8
8
|
* @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.
|
|
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.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* These ids are what the actual theme files/folders are called.
|
|
7
7
|
* style-dictionary will attempt to locate these in the file-system.
|
|
8
8
|
*/
|
|
9
|
-
export type Themes = 'atlassian-light' | 'atlassian-light-future' | 'atlassian-light-increased-contrast' | 'atlassian-dark' | 'atlassian-dark-future' | 'atlassian-dark-increased-contrast' | 'atlassian-shape' | 'atlassian-spacing' | 'atlassian-typography';
|
|
9
|
+
export type Themes = 'atlassian-light' | 'atlassian-light-future' | 'atlassian-light-increased-contrast' | 'atlassian-dark' | 'atlassian-dark-future' | 'atlassian-dark-increased-contrast' | 'atlassian-shape' | 'atlassian-spacing' | 'atlassian-typography' | 'atlassian-motion';
|
|
10
10
|
export type ThemeFileNames = Themes;
|
|
11
11
|
/**
|
|
12
12
|
* ThemeOverrides: The internal identifier of a theme override. Which are themes that contain
|
|
@@ -20,7 +20,7 @@ export type ThemeOverrides = Themes;
|
|
|
20
20
|
* Some themes are entirely focused on Color, whilst others are purely focused on spacing.
|
|
21
21
|
* In the future other types may be introduced such as typography.
|
|
22
22
|
*/
|
|
23
|
-
type ThemeKinds = 'color' | 'spacing' | 'typography' | 'shape';
|
|
23
|
+
type ThemeKinds = 'color' | 'spacing' | 'typography' | 'shape' | 'motion';
|
|
24
24
|
/**
|
|
25
25
|
* Theme modes: The general purpose of a theme.
|
|
26
26
|
* This attr is used to apply the appropriate system-preference option
|
|
@@ -42,7 +42,7 @@ export type DataContrastModes = 'more' | 'no-preference' | 'auto';
|
|
|
42
42
|
*
|
|
43
43
|
* These ids must be kebab case
|
|
44
44
|
*/
|
|
45
|
-
export declare const themeIds: readonly ["light-increased-contrast", "light", "light-future", "dark", "dark-future", "dark-increased-contrast", "spacing", "shape", "typography"];
|
|
45
|
+
export declare const themeIds: readonly ["light-increased-contrast", "light", "light-future", "dark", "dark-future", "dark-increased-contrast", "spacing", "shape", "typography", "motion"];
|
|
46
46
|
export type ThemeIds = (typeof themeIds)[number];
|
|
47
47
|
/**
|
|
48
48
|
* Theme override ids: the equivalent of themeIds for theme overrides.
|
|
@@ -59,7 +59,8 @@ export declare const themeIdsWithOverrides: readonly [
|
|
|
59
59
|
'dark-increased-contrast',
|
|
60
60
|
'spacing',
|
|
61
61
|
'shape',
|
|
62
|
-
'typography'
|
|
62
|
+
'typography',
|
|
63
|
+
'motion'
|
|
63
64
|
];
|
|
64
65
|
export type ThemeIdsWithOverrides = (typeof themeIdsWithOverrides)[number];
|
|
65
66
|
/**
|
|
@@ -73,7 +74,7 @@ type ExtensionThemeId = ThemeIds;
|
|
|
73
74
|
* For example: legacy light & dark themes use the "legacyPalette" containing colors from our
|
|
74
75
|
* previous color set.
|
|
75
76
|
*/
|
|
76
|
-
export type Palettes = 'defaultPalette' | 'spacingScale' | 'shapePalette' | 'typographyPalette';
|
|
77
|
+
export type Palettes = 'defaultPalette' | 'spacingScale' | 'shapePalette' | 'typographyPalette' | 'motionPalette';
|
|
77
78
|
/**
|
|
78
79
|
* ThemeConfig: the source of truth for all theme meta-data.
|
|
79
80
|
* This object should be used whenever interfacing with themes.
|
|
@@ -86,7 +87,7 @@ interface ThemeConfig {
|
|
|
86
87
|
type: 'color';
|
|
87
88
|
mode: DataColorModes;
|
|
88
89
|
} | {
|
|
89
|
-
type: Extract<ThemeKinds, 'spacing' | 'typography' | 'shape'>;
|
|
90
|
+
type: Extract<ThemeKinds, 'spacing' | 'typography' | 'shape' | 'motion'>;
|
|
90
91
|
}) & {
|
|
91
92
|
/**
|
|
92
93
|
* @deprecated Use top-level `extends` property instead
|
|
@@ -132,14 +133,16 @@ export interface ThemeState {
|
|
|
132
133
|
shape?: Extract<ThemeIds, 'shape'>;
|
|
133
134
|
spacing: Extract<ThemeIds, 'spacing'>;
|
|
134
135
|
typography: Extract<ThemeIds, 'typography'>;
|
|
136
|
+
motion?: Extract<ThemeIds, 'motion'>;
|
|
135
137
|
UNSAFE_themeOptions?: ThemeOptionsSchema;
|
|
136
138
|
}
|
|
137
139
|
/**
|
|
138
140
|
* Can't evaluate typography feature flags at the module level,
|
|
139
141
|
* it will always resolve to false when server side rendered or when flags are loaded async.
|
|
140
142
|
*/
|
|
141
|
-
interface ThemeStateDefaults extends Omit<ThemeState, 'shape'> {
|
|
143
|
+
interface ThemeStateDefaults extends Omit<ThemeState, 'shape' | 'motion'> {
|
|
142
144
|
shape: () => ThemeState['shape'];
|
|
145
|
+
motion: () => ThemeState['motion'];
|
|
143
146
|
}
|
|
144
147
|
/**
|
|
145
148
|
* themeStateDefaults: the default values for ThemeState used by theming utilities
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InternalTokenIds } from './artifacts/types-internal';
|
|
2
|
-
export type Groups = 'raw' | 'paint' | 'shadow' | 'palette' | 'opacity' | 'spacing' | 'shape' | 'typography' | 'fontSize' | 'fontWeight' | 'fontFamily' | 'lineHeight' | 'letterSpacing';
|
|
2
|
+
export type Groups = 'raw' | 'paint' | 'shadow' | 'palette' | 'opacity' | 'spacing' | 'shape' | 'typography' | 'fontSize' | 'fontWeight' | 'fontFamily' | 'lineHeight' | 'letterSpacing' | 'motion' | 'keyframe';
|
|
3
3
|
type ActiveTokenState = 'active';
|
|
4
4
|
type DeprecatedTokenState = 'deprecated';
|
|
5
5
|
type DeletedTokenState = 'deleted';
|
|
@@ -107,6 +107,7 @@ export type SpacingToken<BaseToken> = DesignToken<BaseToken, 'spacing'>;
|
|
|
107
107
|
export type ShapeToken<BaseToken> = DesignToken<BaseToken, 'shape'>;
|
|
108
108
|
export type FontWeightToken<BaseToken> = DesignToken<BaseToken, 'fontWeight'>;
|
|
109
109
|
export type FontFamilyToken<BaseToken> = DesignToken<BaseToken, 'fontFamily'>;
|
|
110
|
+
export type MotionToken<BaseToken> = DesignToken<BaseToken, 'motion'>;
|
|
110
111
|
export type DeprecatedTypographyToken<BaseToken> = DesignToken<BaseToken, 'fontSize' | 'fontWeight' | 'fontFamily' | 'lineHeight' | 'letterSpacing'>;
|
|
111
112
|
export type RawToken = DesignToken<string, 'raw'>;
|
|
112
113
|
export interface PaletteColorTokenSchema<PaletteValues extends string> {
|
|
@@ -131,6 +132,11 @@ export interface ShapeScaleTokenSchema<RadiusScaleValues extends string, SizeSca
|
|
|
131
132
|
};
|
|
132
133
|
radius: Record<RadiusScaleValues, ShapeSchemaValue>;
|
|
133
134
|
}
|
|
135
|
+
export interface MotionScaleTokenSchema<DurationScaleValues extends string, BezierCurveScaleValues extends string, KeyframeScaleValues extends string> {
|
|
136
|
+
duration: Record<DurationScaleValues, BaseToken<number, 'motion'>>;
|
|
137
|
+
curve: Record<BezierCurveScaleValues, BaseToken<string, 'motion'>>;
|
|
138
|
+
keyframe: Record<KeyframeScaleValues, BaseToken<Record<string, object>, 'keyframe'>>;
|
|
139
|
+
}
|
|
134
140
|
export interface FontSizeScaleTokenSchema<ScaleValues extends string> {
|
|
135
141
|
fontSize: Record<ScaleValues, BaseToken<string | number, 'fontSize'>>;
|
|
136
142
|
}
|
|
@@ -1116,4 +1122,27 @@ export interface FontFamilyTokenSchema<BaseToken> {
|
|
|
1116
1122
|
};
|
|
1117
1123
|
};
|
|
1118
1124
|
}
|
|
1125
|
+
/**
|
|
1126
|
+
* The semantic interface for motion tokens
|
|
1127
|
+
*/
|
|
1128
|
+
export interface MotionTokenSchema<BaseToken> {
|
|
1129
|
+
motion: {
|
|
1130
|
+
dialog: {
|
|
1131
|
+
enter: MotionToken<BaseToken>;
|
|
1132
|
+
exit: MotionToken<BaseToken>;
|
|
1133
|
+
};
|
|
1134
|
+
content: {
|
|
1135
|
+
enter: {
|
|
1136
|
+
short: MotionToken<BaseToken>;
|
|
1137
|
+
medium: MotionToken<BaseToken>;
|
|
1138
|
+
long: MotionToken<BaseToken>;
|
|
1139
|
+
};
|
|
1140
|
+
exit: {
|
|
1141
|
+
short: MotionToken<BaseToken>;
|
|
1142
|
+
medium: MotionToken<BaseToken>;
|
|
1143
|
+
long: MotionToken<BaseToken>;
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1119
1148
|
export {};
|
|
@@ -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.
|
|
@@ -14,5 +14,5 @@ export { default as themeImportMap } from './artifacts/theme-import-map';
|
|
|
14
14
|
export type { CSSToken } from './artifacts/token-names';
|
|
15
15
|
export type { ActiveTokens } from './artifacts/types';
|
|
16
16
|
export type { ThemeColorModes, ThemeContrastModes, Themes, ThemeFileNames, ThemeIds, ThemeOptionsSchema, ThemeState, ActiveThemeState, } from './theme-config';
|
|
17
|
-
export type { FontFamilyToken, FontWeightToken, Groups, OpacityToken, PaintToken, RawToken, ShadowToken, SpacingToken, ShapeToken, TypographyToken, } from './types';
|
|
17
|
+
export type { FontFamilyToken, FontWeightToken, Groups, OpacityToken, PaintToken, RawToken, ShadowToken, SpacingToken, ShapeToken, TypographyToken, MotionToken, } from './types';
|
|
18
18
|
export { COLOR_MODE_ATTRIBUTE, CURRENT_SURFACE_CSS_VAR, SUBTREE_THEME_ATTRIBUTE, THEME_DATA_ATTRIBUTE, } from './constants';
|
|
@@ -8,6 +8,7 @@ import { type ThemeIdsWithOverrides, type ThemeState } from './theme-config';
|
|
|
8
8
|
* @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.
|
|
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.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* These ids are what the actual theme files/folders are called.
|
|
7
7
|
* style-dictionary will attempt to locate these in the file-system.
|
|
8
8
|
*/
|
|
9
|
-
export type Themes = 'atlassian-light' | 'atlassian-light-future' | 'atlassian-light-increased-contrast' | 'atlassian-dark' | 'atlassian-dark-future' | 'atlassian-dark-increased-contrast' | 'atlassian-shape' | 'atlassian-spacing' | 'atlassian-typography';
|
|
9
|
+
export type Themes = 'atlassian-light' | 'atlassian-light-future' | 'atlassian-light-increased-contrast' | 'atlassian-dark' | 'atlassian-dark-future' | 'atlassian-dark-increased-contrast' | 'atlassian-shape' | 'atlassian-spacing' | 'atlassian-typography' | 'atlassian-motion';
|
|
10
10
|
export type ThemeFileNames = Themes;
|
|
11
11
|
/**
|
|
12
12
|
* ThemeOverrides: The internal identifier of a theme override. Which are themes that contain
|
|
@@ -20,7 +20,7 @@ export type ThemeOverrides = Themes;
|
|
|
20
20
|
* Some themes are entirely focused on Color, whilst others are purely focused on spacing.
|
|
21
21
|
* In the future other types may be introduced such as typography.
|
|
22
22
|
*/
|
|
23
|
-
type ThemeKinds = 'color' | 'spacing' | 'typography' | 'shape';
|
|
23
|
+
type ThemeKinds = 'color' | 'spacing' | 'typography' | 'shape' | 'motion';
|
|
24
24
|
/**
|
|
25
25
|
* Theme modes: The general purpose of a theme.
|
|
26
26
|
* This attr is used to apply the appropriate system-preference option
|
|
@@ -59,7 +59,8 @@ export declare const themeIds: readonly [
|
|
|
59
59
|
"dark-increased-contrast",
|
|
60
60
|
"spacing",
|
|
61
61
|
"shape",
|
|
62
|
-
"typography"
|
|
62
|
+
"typography",
|
|
63
|
+
"motion"
|
|
63
64
|
];
|
|
64
65
|
export type ThemeIds = (typeof themeIds)[number];
|
|
65
66
|
/**
|
|
@@ -78,7 +79,8 @@ export declare const themeIdsWithOverrides: readonly [
|
|
|
78
79
|
'dark-increased-contrast',
|
|
79
80
|
'spacing',
|
|
80
81
|
'shape',
|
|
81
|
-
'typography'
|
|
82
|
+
'typography',
|
|
83
|
+
'motion'
|
|
82
84
|
];
|
|
83
85
|
export type ThemeIdsWithOverrides = (typeof themeIdsWithOverrides)[number];
|
|
84
86
|
/**
|
|
@@ -92,7 +94,7 @@ type ExtensionThemeId = ThemeIds;
|
|
|
92
94
|
* For example: legacy light & dark themes use the "legacyPalette" containing colors from our
|
|
93
95
|
* previous color set.
|
|
94
96
|
*/
|
|
95
|
-
export type Palettes = 'defaultPalette' | 'spacingScale' | 'shapePalette' | 'typographyPalette';
|
|
97
|
+
export type Palettes = 'defaultPalette' | 'spacingScale' | 'shapePalette' | 'typographyPalette' | 'motionPalette';
|
|
96
98
|
/**
|
|
97
99
|
* ThemeConfig: the source of truth for all theme meta-data.
|
|
98
100
|
* This object should be used whenever interfacing with themes.
|
|
@@ -105,7 +107,7 @@ interface ThemeConfig {
|
|
|
105
107
|
type: 'color';
|
|
106
108
|
mode: DataColorModes;
|
|
107
109
|
} | {
|
|
108
|
-
type: Extract<ThemeKinds, 'spacing' | 'typography' | 'shape'>;
|
|
110
|
+
type: Extract<ThemeKinds, 'spacing' | 'typography' | 'shape' | 'motion'>;
|
|
109
111
|
}) & {
|
|
110
112
|
/**
|
|
111
113
|
* @deprecated Use top-level `extends` property instead
|
|
@@ -151,14 +153,16 @@ export interface ThemeState {
|
|
|
151
153
|
shape?: Extract<ThemeIds, 'shape'>;
|
|
152
154
|
spacing: Extract<ThemeIds, 'spacing'>;
|
|
153
155
|
typography: Extract<ThemeIds, 'typography'>;
|
|
156
|
+
motion?: Extract<ThemeIds, 'motion'>;
|
|
154
157
|
UNSAFE_themeOptions?: ThemeOptionsSchema;
|
|
155
158
|
}
|
|
156
159
|
/**
|
|
157
160
|
* Can't evaluate typography feature flags at the module level,
|
|
158
161
|
* it will always resolve to false when server side rendered or when flags are loaded async.
|
|
159
162
|
*/
|
|
160
|
-
interface ThemeStateDefaults extends Omit<ThemeState, 'shape'> {
|
|
163
|
+
interface ThemeStateDefaults extends Omit<ThemeState, 'shape' | 'motion'> {
|
|
161
164
|
shape: () => ThemeState['shape'];
|
|
165
|
+
motion: () => ThemeState['motion'];
|
|
162
166
|
}
|
|
163
167
|
/**
|
|
164
168
|
* themeStateDefaults: the default values for ThemeState used by theming utilities
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InternalTokenIds } from './artifacts/types-internal';
|
|
2
|
-
export type Groups = 'raw' | 'paint' | 'shadow' | 'palette' | 'opacity' | 'spacing' | 'shape' | 'typography' | 'fontSize' | 'fontWeight' | 'fontFamily' | 'lineHeight' | 'letterSpacing';
|
|
2
|
+
export type Groups = 'raw' | 'paint' | 'shadow' | 'palette' | 'opacity' | 'spacing' | 'shape' | 'typography' | 'fontSize' | 'fontWeight' | 'fontFamily' | 'lineHeight' | 'letterSpacing' | 'motion' | 'keyframe';
|
|
3
3
|
type ActiveTokenState = 'active';
|
|
4
4
|
type DeprecatedTokenState = 'deprecated';
|
|
5
5
|
type DeletedTokenState = 'deleted';
|
|
@@ -107,6 +107,7 @@ export type SpacingToken<BaseToken> = DesignToken<BaseToken, 'spacing'>;
|
|
|
107
107
|
export type ShapeToken<BaseToken> = DesignToken<BaseToken, 'shape'>;
|
|
108
108
|
export type FontWeightToken<BaseToken> = DesignToken<BaseToken, 'fontWeight'>;
|
|
109
109
|
export type FontFamilyToken<BaseToken> = DesignToken<BaseToken, 'fontFamily'>;
|
|
110
|
+
export type MotionToken<BaseToken> = DesignToken<BaseToken, 'motion'>;
|
|
110
111
|
export type DeprecatedTypographyToken<BaseToken> = DesignToken<BaseToken, 'fontSize' | 'fontWeight' | 'fontFamily' | 'lineHeight' | 'letterSpacing'>;
|
|
111
112
|
export type RawToken = DesignToken<string, 'raw'>;
|
|
112
113
|
export interface PaletteColorTokenSchema<PaletteValues extends string> {
|
|
@@ -131,6 +132,11 @@ export interface ShapeScaleTokenSchema<RadiusScaleValues extends string, SizeSca
|
|
|
131
132
|
};
|
|
132
133
|
radius: Record<RadiusScaleValues, ShapeSchemaValue>;
|
|
133
134
|
}
|
|
135
|
+
export interface MotionScaleTokenSchema<DurationScaleValues extends string, BezierCurveScaleValues extends string, KeyframeScaleValues extends string> {
|
|
136
|
+
duration: Record<DurationScaleValues, BaseToken<number, 'motion'>>;
|
|
137
|
+
curve: Record<BezierCurveScaleValues, BaseToken<string, 'motion'>>;
|
|
138
|
+
keyframe: Record<KeyframeScaleValues, BaseToken<Record<string, object>, 'keyframe'>>;
|
|
139
|
+
}
|
|
134
140
|
export interface FontSizeScaleTokenSchema<ScaleValues extends string> {
|
|
135
141
|
fontSize: Record<ScaleValues, BaseToken<string | number, 'fontSize'>>;
|
|
136
142
|
}
|
|
@@ -1116,4 +1122,27 @@ export interface FontFamilyTokenSchema<BaseToken> {
|
|
|
1116
1122
|
};
|
|
1117
1123
|
};
|
|
1118
1124
|
}
|
|
1125
|
+
/**
|
|
1126
|
+
* The semantic interface for motion tokens
|
|
1127
|
+
*/
|
|
1128
|
+
export interface MotionTokenSchema<BaseToken> {
|
|
1129
|
+
motion: {
|
|
1130
|
+
dialog: {
|
|
1131
|
+
enter: MotionToken<BaseToken>;
|
|
1132
|
+
exit: MotionToken<BaseToken>;
|
|
1133
|
+
};
|
|
1134
|
+
content: {
|
|
1135
|
+
enter: {
|
|
1136
|
+
short: MotionToken<BaseToken>;
|
|
1137
|
+
medium: MotionToken<BaseToken>;
|
|
1138
|
+
long: MotionToken<BaseToken>;
|
|
1139
|
+
};
|
|
1140
|
+
exit: {
|
|
1141
|
+
short: MotionToken<BaseToken>;
|
|
1142
|
+
medium: MotionToken<BaseToken>;
|
|
1143
|
+
long: MotionToken<BaseToken>;
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1119
1148
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/tokens",
|
|
3
|
-
"version": "11.0
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "Design tokens are the single source of truth to name and store design decisions.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"@af/formatting": "workspace:^",
|
|
45
45
|
"@af/visual-regression": "workspace:^",
|
|
46
46
|
"@atlaskit/avatar": "^25.8.0",
|
|
47
|
-
"@atlaskit/button": "^23.
|
|
47
|
+
"@atlaskit/button": "^23.10.0",
|
|
48
48
|
"@atlaskit/calendar": "^17.2.0",
|
|
49
49
|
"@atlaskit/checkbox": "^17.3.0",
|
|
50
50
|
"@atlaskit/code": "^17.4.0",
|
|
51
51
|
"@atlaskit/css": "^0.19.0",
|
|
52
|
-
"@atlaskit/docs": "^11.
|
|
52
|
+
"@atlaskit/docs": "^11.6.0",
|
|
53
53
|
"@atlaskit/dropdown-menu": "^16.5.0",
|
|
54
54
|
"@atlaskit/dynamic-table": "^18.3.0",
|
|
55
|
-
"@atlaskit/form": "^15.
|
|
55
|
+
"@atlaskit/form": "^15.4.0",
|
|
56
56
|
"@atlaskit/grid": "^0.18.0",
|
|
57
57
|
"@atlaskit/heading": "^5.3.0",
|
|
58
58
|
"@atlaskit/icon": "^32.0.0",
|
|
@@ -67,13 +67,13 @@
|
|
|
67
67
|
"@atlaskit/tag": "^14.5.0",
|
|
68
68
|
"@atlaskit/textarea": "^8.2.0",
|
|
69
69
|
"@atlaskit/textfield": "^8.2.0",
|
|
70
|
-
"@atlaskit/theme": "^
|
|
70
|
+
"@atlaskit/theme": "^22.0.0",
|
|
71
71
|
"@atlaskit/tooltip": "^20.14.0",
|
|
72
72
|
"@atlassian/codegen": "^0.1.0",
|
|
73
73
|
"@atlassian/feature-flags-test-utils": "^1.0.0",
|
|
74
74
|
"@atlassian/ts-loader": "^0.1.0",
|
|
75
75
|
"@babel/core": "7.24.9",
|
|
76
|
-
"@compiled/react": "^0.
|
|
76
|
+
"@compiled/react": "^0.20.0",
|
|
77
77
|
"@hypermod/utils": "^0.4.2",
|
|
78
78
|
"@testing-library/react": "^16.3.0",
|
|
79
79
|
"color-blend": "^4.0.0",
|
|
@@ -127,6 +127,9 @@
|
|
|
127
127
|
},
|
|
128
128
|
"platform_dst_subtree_theming": {
|
|
129
129
|
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
"platform-dst-motion-theme-default": {
|
|
132
|
+
"type": "boolean"
|
|
130
133
|
}
|
|
131
134
|
},
|
|
132
135
|
"homepage": "https://atlassian.design/components/tokens"
|