@atlaskit/tokens 0.10.18 → 0.10.20
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 +19 -0
- package/css/atlassian-dark.css +10 -2
- package/css/atlassian-legacy-dark.css +10 -2
- package/css/atlassian-legacy-light.css +9 -1
- package/css/atlassian-light.css +9 -1
- package/dist/cjs/artifacts/palettes-raw/legacy-palette.js +35 -1
- package/dist/cjs/artifacts/palettes-raw/palette.js +35 -1
- package/dist/cjs/artifacts/rename-mapping.js +4 -4
- 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-dark.js +207 -19
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-dark.js +207 -19
- package/dist/cjs/artifacts/tokens-raw/atlassian-legacy-light.js +187 -19
- package/dist/cjs/artifacts/tokens-raw/atlassian-light.js +187 -19
- package/dist/cjs/constants.js +5 -3
- package/dist/cjs/get-token.js +1 -1
- package/dist/cjs/palettes/legacy-palette.js +18 -0
- package/dist/cjs/palettes/palette.js +18 -0
- package/dist/cjs/tokens/atlassian-dark/elevation/shadow.js +12 -0
- package/dist/cjs/tokens/atlassian-dark/elevation/surface.js +27 -3
- package/dist/cjs/tokens/atlassian-dark/opacity/opacity.js +18 -0
- package/dist/cjs/tokens/atlassian-legacy-dark/elevation/shadow.js +12 -0
- package/dist/cjs/tokens/atlassian-legacy-dark/elevation/surface.js +27 -3
- package/dist/cjs/tokens/atlassian-legacy-dark/opacity/opacity.js +18 -0
- package/dist/cjs/tokens/atlassian-legacy-light/elevation/surface.js +27 -3
- package/dist/cjs/tokens/atlassian-legacy-light/opacity/opacity.js +18 -0
- package/dist/cjs/tokens/atlassian-light/elevation/surface.js +27 -3
- package/dist/cjs/tokens/atlassian-light/opacity/opacity.js +18 -0
- package/dist/cjs/tokens/default/deprecated/deprecated.js +3 -3
- package/dist/cjs/tokens/default/elevation/shadow.js +1 -1
- package/dist/cjs/tokens/default/elevation/surface.js +69 -15
- package/dist/cjs/tokens/default/opacity/opacity.js +28 -0
- package/dist/cjs/utils/token-ids.js +8 -5
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/artifacts/palettes-raw/legacy-palette.js +35 -1
- package/dist/es2019/artifacts/palettes-raw/palette.js +35 -1
- package/dist/es2019/artifacts/rename-mapping.js +4 -4
- 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-dark.js +207 -19
- package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-dark.js +207 -19
- package/dist/es2019/artifacts/tokens-raw/atlassian-legacy-light.js +187 -19
- package/dist/es2019/artifacts/tokens-raw/atlassian-light.js +187 -19
- package/dist/es2019/constants.js +2 -1
- package/dist/es2019/get-token.js +1 -1
- package/dist/es2019/palettes/legacy-palette.js +18 -0
- package/dist/es2019/palettes/palette.js +18 -0
- package/dist/es2019/tokens/atlassian-dark/elevation/shadow.js +12 -0
- package/dist/es2019/tokens/atlassian-dark/elevation/surface.js +27 -3
- package/dist/es2019/tokens/atlassian-dark/opacity/opacity.js +11 -0
- package/dist/es2019/tokens/atlassian-legacy-dark/elevation/shadow.js +12 -0
- package/dist/es2019/tokens/atlassian-legacy-dark/elevation/surface.js +27 -3
- package/dist/es2019/tokens/atlassian-legacy-dark/opacity/opacity.js +11 -0
- package/dist/es2019/tokens/atlassian-legacy-light/elevation/surface.js +27 -3
- package/dist/es2019/tokens/atlassian-legacy-light/opacity/opacity.js +11 -0
- package/dist/es2019/tokens/atlassian-light/elevation/surface.js +27 -3
- package/dist/es2019/tokens/atlassian-light/opacity/opacity.js +11 -0
- package/dist/es2019/tokens/default/deprecated/deprecated.js +3 -3
- package/dist/es2019/tokens/default/elevation/shadow.js +1 -1
- package/dist/es2019/tokens/default/elevation/surface.js +69 -17
- package/dist/es2019/tokens/default/opacity/opacity.js +21 -0
- package/dist/es2019/utils/token-ids.js +6 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/artifacts/palettes-raw/legacy-palette.js +35 -1
- package/dist/esm/artifacts/palettes-raw/palette.js +35 -1
- package/dist/esm/artifacts/rename-mapping.js +4 -4
- 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-dark.js +207 -19
- package/dist/esm/artifacts/tokens-raw/atlassian-legacy-dark.js +207 -19
- package/dist/esm/artifacts/tokens-raw/atlassian-legacy-light.js +187 -19
- package/dist/esm/artifacts/tokens-raw/atlassian-light.js +187 -19
- package/dist/esm/constants.js +2 -1
- package/dist/esm/get-token.js +1 -1
- package/dist/esm/palettes/legacy-palette.js +18 -0
- package/dist/esm/palettes/palette.js +18 -0
- package/dist/esm/tokens/atlassian-dark/elevation/shadow.js +12 -0
- package/dist/esm/tokens/atlassian-dark/elevation/surface.js +27 -3
- package/dist/esm/tokens/atlassian-dark/opacity/opacity.js +11 -0
- package/dist/esm/tokens/atlassian-legacy-dark/elevation/shadow.js +12 -0
- package/dist/esm/tokens/atlassian-legacy-dark/elevation/surface.js +27 -3
- package/dist/esm/tokens/atlassian-legacy-dark/opacity/opacity.js +11 -0
- package/dist/esm/tokens/atlassian-legacy-light/elevation/surface.js +27 -3
- package/dist/esm/tokens/atlassian-legacy-light/opacity/opacity.js +11 -0
- package/dist/esm/tokens/atlassian-light/elevation/surface.js +27 -3
- package/dist/esm/tokens/atlassian-light/opacity/opacity.js +11 -0
- package/dist/esm/tokens/default/deprecated/deprecated.js +3 -3
- package/dist/esm/tokens/default/elevation/shadow.js +1 -1
- package/dist/esm/tokens/default/elevation/surface.js +69 -15
- package/dist/esm/tokens/default/opacity/opacity.js +21 -0
- package/dist/esm/utils/token-ids.js +6 -4
- package/dist/esm/version.json +1 -1
- package/dist/types/artifacts/palettes-raw/legacy-palette.d.ts +20 -3
- package/dist/types/artifacts/palettes-raw/palette.d.ts +20 -3
- package/dist/types/artifacts/rename-mapping.d.ts +1 -1
- 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-dark.d.ts +28 -1
- package/dist/types/artifacts/tokens-raw/atlassian-legacy-dark.d.ts +28 -1
- package/dist/types/artifacts/tokens-raw/atlassian-legacy-light.d.ts +28 -1
- package/dist/types/artifacts/tokens-raw/atlassian-light.d.ts +28 -1
- package/dist/types/artifacts/types-internal.d.ts +2 -2
- package/dist/types/artifacts/types.d.ts +2 -2
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/tokens/atlassian-dark/opacity/opacity.d.ts +3 -0
- package/dist/types/tokens/atlassian-legacy-dark/opacity/opacity.d.ts +3 -0
- package/dist/types/tokens/atlassian-legacy-light/opacity/opacity.d.ts +3 -0
- package/dist/types/tokens/atlassian-light/opacity/opacity.d.ts +3 -0
- package/dist/types/tokens/default/opacity/opacity.d.ts +3 -0
- package/dist/types/types.d.ts +44 -11
- package/dist/types/utils/token-ids.d.ts +1 -3
- package/package.json +7 -6
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
const palette = {
|
|
2
|
+
value: {
|
|
3
|
+
opacity: {
|
|
4
|
+
Opacity20: {
|
|
5
|
+
value: 0.2,
|
|
6
|
+
attributes: {
|
|
7
|
+
group: 'palette',
|
|
8
|
+
category: 'opacity'
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
Opacity40: {
|
|
12
|
+
value: 0.4,
|
|
13
|
+
attributes: {
|
|
14
|
+
group: 'palette',
|
|
15
|
+
category: 'opacity'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
2
20
|
color: {
|
|
3
21
|
palette: {
|
|
4
22
|
B100: {
|
|
@@ -3,6 +3,18 @@ const shadow = {
|
|
|
3
3
|
shadow: {
|
|
4
4
|
raised: {
|
|
5
5
|
value: [{
|
|
6
|
+
// This inset shadow is just to allow animations between shadow types
|
|
7
|
+
radius: 0,
|
|
8
|
+
spread: 1,
|
|
9
|
+
// @ts-ignore no current palette colour for this yet
|
|
10
|
+
color: '#000000',
|
|
11
|
+
offset: {
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0
|
|
14
|
+
},
|
|
15
|
+
opacity: 0,
|
|
16
|
+
inset: true
|
|
17
|
+
}, {
|
|
6
18
|
radius: 1,
|
|
7
19
|
offset: {
|
|
8
20
|
x: 0,
|
|
@@ -2,16 +2,40 @@ const elevation = {
|
|
|
2
2
|
elevation: {
|
|
3
3
|
surface: {
|
|
4
4
|
'[default]': {
|
|
5
|
-
|
|
5
|
+
'[default]': {
|
|
6
|
+
value: 'DN0'
|
|
7
|
+
},
|
|
8
|
+
hovered: {
|
|
9
|
+
value: 'DN100'
|
|
10
|
+
},
|
|
11
|
+
pressed: {
|
|
12
|
+
value: 'DN200'
|
|
13
|
+
}
|
|
6
14
|
},
|
|
7
15
|
sunken: {
|
|
8
16
|
value: 'DN-100'
|
|
9
17
|
},
|
|
10
18
|
raised: {
|
|
11
|
-
|
|
19
|
+
'[default]': {
|
|
20
|
+
value: 'DN100'
|
|
21
|
+
},
|
|
22
|
+
hovered: {
|
|
23
|
+
value: 'DN200'
|
|
24
|
+
},
|
|
25
|
+
pressed: {
|
|
26
|
+
value: 'DN300'
|
|
27
|
+
}
|
|
12
28
|
},
|
|
13
29
|
overlay: {
|
|
14
|
-
|
|
30
|
+
'[default]': {
|
|
31
|
+
value: 'DN200'
|
|
32
|
+
},
|
|
33
|
+
hovered: {
|
|
34
|
+
value: 'DN300'
|
|
35
|
+
},
|
|
36
|
+
pressed: {
|
|
37
|
+
value: 'DN400'
|
|
38
|
+
}
|
|
15
39
|
}
|
|
16
40
|
}
|
|
17
41
|
}
|
|
@@ -3,6 +3,18 @@ const shadow = {
|
|
|
3
3
|
shadow: {
|
|
4
4
|
raised: {
|
|
5
5
|
value: [{
|
|
6
|
+
// This inset shadow is just to allow animations between shadow types
|
|
7
|
+
radius: 0,
|
|
8
|
+
spread: 1,
|
|
9
|
+
// @ts-ignore no current palette colour for this yet
|
|
10
|
+
color: '#000000',
|
|
11
|
+
offset: {
|
|
12
|
+
x: 0,
|
|
13
|
+
y: 0
|
|
14
|
+
},
|
|
15
|
+
opacity: 0,
|
|
16
|
+
inset: true
|
|
17
|
+
}, {
|
|
6
18
|
radius: 1,
|
|
7
19
|
offset: {
|
|
8
20
|
x: 0,
|
|
@@ -2,16 +2,40 @@ const elevation = {
|
|
|
2
2
|
elevation: {
|
|
3
3
|
surface: {
|
|
4
4
|
'[default]': {
|
|
5
|
-
|
|
5
|
+
'[default]': {
|
|
6
|
+
value: 'DN30'
|
|
7
|
+
},
|
|
8
|
+
hovered: {
|
|
9
|
+
value: 'DN40'
|
|
10
|
+
},
|
|
11
|
+
pressed: {
|
|
12
|
+
value: 'DN50'
|
|
13
|
+
}
|
|
6
14
|
},
|
|
7
15
|
sunken: {
|
|
8
16
|
value: 'DN100'
|
|
9
17
|
},
|
|
10
18
|
raised: {
|
|
11
|
-
|
|
19
|
+
'[default]': {
|
|
20
|
+
value: 'DN80'
|
|
21
|
+
},
|
|
22
|
+
hovered: {
|
|
23
|
+
value: 'DN90'
|
|
24
|
+
},
|
|
25
|
+
pressed: {
|
|
26
|
+
value: 'DN100'
|
|
27
|
+
}
|
|
12
28
|
},
|
|
13
29
|
overlay: {
|
|
14
|
-
|
|
30
|
+
'[default]': {
|
|
31
|
+
value: 'DN200'
|
|
32
|
+
},
|
|
33
|
+
hovered: {
|
|
34
|
+
value: 'DN300'
|
|
35
|
+
},
|
|
36
|
+
pressed: {
|
|
37
|
+
value: 'DN400'
|
|
38
|
+
}
|
|
15
39
|
}
|
|
16
40
|
}
|
|
17
41
|
}
|
|
@@ -2,16 +2,40 @@ const elevation = {
|
|
|
2
2
|
elevation: {
|
|
3
3
|
surface: {
|
|
4
4
|
'[default]': {
|
|
5
|
-
|
|
5
|
+
'[default]': {
|
|
6
|
+
value: 'N0'
|
|
7
|
+
},
|
|
8
|
+
hovered: {
|
|
9
|
+
value: 'N10'
|
|
10
|
+
},
|
|
11
|
+
pressed: {
|
|
12
|
+
value: 'N20'
|
|
13
|
+
}
|
|
6
14
|
},
|
|
7
15
|
sunken: {
|
|
8
16
|
value: 'N20'
|
|
9
17
|
},
|
|
10
18
|
raised: {
|
|
11
|
-
|
|
19
|
+
'[default]': {
|
|
20
|
+
value: 'N0'
|
|
21
|
+
},
|
|
22
|
+
hovered: {
|
|
23
|
+
value: 'N10'
|
|
24
|
+
},
|
|
25
|
+
pressed: {
|
|
26
|
+
value: 'N20'
|
|
27
|
+
}
|
|
12
28
|
},
|
|
13
29
|
overlay: {
|
|
14
|
-
|
|
30
|
+
'[default]': {
|
|
31
|
+
value: 'N0'
|
|
32
|
+
},
|
|
33
|
+
hovered: {
|
|
34
|
+
value: 'N10'
|
|
35
|
+
},
|
|
36
|
+
pressed: {
|
|
37
|
+
value: 'N20'
|
|
38
|
+
}
|
|
15
39
|
}
|
|
16
40
|
}
|
|
17
41
|
}
|
|
@@ -2,16 +2,40 @@ const elevation = {
|
|
|
2
2
|
elevation: {
|
|
3
3
|
surface: {
|
|
4
4
|
'[default]': {
|
|
5
|
-
|
|
5
|
+
'[default]': {
|
|
6
|
+
value: 'N0'
|
|
7
|
+
},
|
|
8
|
+
hovered: {
|
|
9
|
+
value: 'N200'
|
|
10
|
+
},
|
|
11
|
+
pressed: {
|
|
12
|
+
value: 'N300'
|
|
13
|
+
}
|
|
6
14
|
},
|
|
7
15
|
sunken: {
|
|
8
16
|
value: 'N100'
|
|
9
17
|
},
|
|
10
18
|
raised: {
|
|
11
|
-
|
|
19
|
+
'[default]': {
|
|
20
|
+
value: 'N0'
|
|
21
|
+
},
|
|
22
|
+
hovered: {
|
|
23
|
+
value: 'N200'
|
|
24
|
+
},
|
|
25
|
+
pressed: {
|
|
26
|
+
value: 'N300'
|
|
27
|
+
}
|
|
12
28
|
},
|
|
13
29
|
overlay: {
|
|
14
|
-
|
|
30
|
+
'[default]': {
|
|
31
|
+
value: 'N0'
|
|
32
|
+
},
|
|
33
|
+
hovered: {
|
|
34
|
+
value: 'N200'
|
|
35
|
+
},
|
|
36
|
+
pressed: {
|
|
37
|
+
value: 'N300'
|
|
38
|
+
}
|
|
15
39
|
}
|
|
16
40
|
}
|
|
17
41
|
}
|
|
@@ -605,7 +605,7 @@ const color = {
|
|
|
605
605
|
introduced: '0.0.15',
|
|
606
606
|
deprecated: '0.6.0',
|
|
607
607
|
deleted: '0.8.0',
|
|
608
|
-
replacement: 'elevation.surface.raised',
|
|
608
|
+
replacement: 'elevation.surface.raised.[default]',
|
|
609
609
|
description: 'Use for the background of raised cards, such as Jira cards on a Kanban board.\nCombine with shadow.card.'
|
|
610
610
|
}
|
|
611
611
|
},
|
|
@@ -616,7 +616,7 @@ const color = {
|
|
|
616
616
|
introduced: '0.0.15',
|
|
617
617
|
deprecated: '0.6.0',
|
|
618
618
|
deleted: '0.8.0',
|
|
619
|
-
replacement: 'elevation.surface.[default]',
|
|
619
|
+
replacement: 'elevation.surface.[default].[default]',
|
|
620
620
|
description: 'Use as the primary background for the UI'
|
|
621
621
|
}
|
|
622
622
|
},
|
|
@@ -640,7 +640,7 @@ const color = {
|
|
|
640
640
|
introduced: '0.0.15',
|
|
641
641
|
deprecated: '0.6.0',
|
|
642
642
|
deleted: '0.8.0',
|
|
643
|
-
replacement: 'elevation.surface.overlay',
|
|
643
|
+
replacement: 'elevation.surface.overlay.[default]',
|
|
644
644
|
description: `
|
|
645
645
|
Use for the background of overlay elements, such as modals, dropdown menus, flags, and inline dialogs (i.e. elements that sit on top of the UI).
|
|
646
646
|
|
|
@@ -14,7 +14,7 @@ const shadow = {
|
|
|
14
14
|
group: 'shadow',
|
|
15
15
|
state: 'active',
|
|
16
16
|
introduced: '0.6.0',
|
|
17
|
-
description: `Use to create a shadow when content
|
|
17
|
+
description: `Use to create a shadow when content scrolls under other content.`
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
overlay: {
|
|
@@ -2,11 +2,29 @@ const shadow = {
|
|
|
2
2
|
elevation: {
|
|
3
3
|
surface: {
|
|
4
4
|
'[default]': {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
'[default]': {
|
|
6
|
+
attributes: {
|
|
7
|
+
group: 'paint',
|
|
8
|
+
state: 'active',
|
|
9
|
+
introduced: '0.6.0',
|
|
10
|
+
description: 'Use as the primary background for the UI.'
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
hovered: {
|
|
14
|
+
attributes: {
|
|
15
|
+
group: 'paint',
|
|
16
|
+
state: 'active',
|
|
17
|
+
introduced: '0.10.20',
|
|
18
|
+
description: 'Hovered state of elevation.surface'
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
pressed: {
|
|
22
|
+
attributes: {
|
|
23
|
+
group: 'paint',
|
|
24
|
+
state: 'active',
|
|
25
|
+
introduced: '0.10.20',
|
|
26
|
+
description: 'Pressed state of elevation.surface'
|
|
27
|
+
}
|
|
10
28
|
}
|
|
11
29
|
},
|
|
12
30
|
sunken: {
|
|
@@ -18,21 +36,55 @@ const shadow = {
|
|
|
18
36
|
}
|
|
19
37
|
},
|
|
20
38
|
raised: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
'[default]': {
|
|
40
|
+
attributes: {
|
|
41
|
+
group: 'paint',
|
|
42
|
+
state: 'active',
|
|
43
|
+
introduced: '0.6.0',
|
|
44
|
+
description: 'Use for the background of cards that can be moved, such as Jira cards on a Kanban board. Combine with elevation.shadow.raised.'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
hovered: {
|
|
48
|
+
attributes: {
|
|
49
|
+
group: 'paint',
|
|
50
|
+
state: 'active',
|
|
51
|
+
introduced: '0.10.20',
|
|
52
|
+
description: 'Hovered state of elevation.surface.raised'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
pressed: {
|
|
56
|
+
attributes: {
|
|
57
|
+
group: 'paint',
|
|
58
|
+
state: 'active',
|
|
59
|
+
introduced: '0.10.20',
|
|
60
|
+
description: 'Pressed state of elevation.surface.raised'
|
|
61
|
+
}
|
|
26
62
|
}
|
|
27
63
|
},
|
|
28
64
|
overlay: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
65
|
+
'[default]': {
|
|
66
|
+
attributes: {
|
|
67
|
+
group: 'paint',
|
|
68
|
+
state: 'active',
|
|
69
|
+
introduced: '0.6.0',
|
|
70
|
+
description: `Use for the background of elements that sit on top of they UI, such as modals, dialogs, dropdown menus, floating toolbars, and floating single-action buttons. Also use for the background of raised cards in a dragged state. Combine with elevation.shadow.overlay.`
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
hovered: {
|
|
74
|
+
attributes: {
|
|
75
|
+
group: 'paint',
|
|
76
|
+
state: 'active',
|
|
77
|
+
introduced: '0.10.20',
|
|
78
|
+
description: `Hovered state of elevation.surface.overlay`
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
pressed: {
|
|
82
|
+
attributes: {
|
|
83
|
+
group: 'paint',
|
|
84
|
+
state: 'active',
|
|
85
|
+
introduced: '0.10.20',
|
|
86
|
+
description: `Pressed state of elevation.surface.overlay`
|
|
87
|
+
}
|
|
36
88
|
}
|
|
37
89
|
}
|
|
38
90
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const opacity = {
|
|
2
|
+
opacity: {
|
|
3
|
+
disabled: {
|
|
4
|
+
attributes: {
|
|
5
|
+
group: 'opacity',
|
|
6
|
+
state: 'active',
|
|
7
|
+
introduced: '0.10.13',
|
|
8
|
+
description: `Apply to images when in a disabled state.`
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
loading: {
|
|
12
|
+
attributes: {
|
|
13
|
+
group: 'opacity',
|
|
14
|
+
state: 'active',
|
|
15
|
+
introduced: '0.10.13',
|
|
16
|
+
description: `Apply to content that sits under a loading spinner.`
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export default opacity;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSS_PREFIX } from '../constants';
|
|
1
|
+
import { CSS_PREFIX, CSS_VAR_FULL } from '../constants';
|
|
2
2
|
/**
|
|
3
3
|
* Transforms a style dictionary token path to a CSS custom property.
|
|
4
4
|
*
|
|
@@ -15,10 +15,11 @@ import { CSS_PREFIX } from '../constants';
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
export const getCSSCustomProperty = path => {
|
|
18
|
-
const normalizedPath = typeof path === 'string' ? path.split('.') : path;
|
|
19
|
-
return `--${[CSS_PREFIX, ...normalizedPath.slice(1)].filter(el => el !== '[default]').join('-')}`;
|
|
20
|
-
};
|
|
18
|
+
const normalizedPath = typeof path === 'string' ? path.split('.') : path; // Opacity and other 'shallow' groups are more readable when not trimmed
|
|
21
19
|
|
|
20
|
+
const slice = CSS_VAR_FULL.includes(path[0]) ? 0 : 1;
|
|
21
|
+
return `--${[CSS_PREFIX, ...normalizedPath.slice(slice)].filter(el => el !== '[default]').join('-')}`;
|
|
22
|
+
};
|
|
22
23
|
/**
|
|
23
24
|
* Transforms a style dictionary token path to a shorthand token id
|
|
24
25
|
* These ids will be typically be how tokens are interacted with via typescript and css
|
|
@@ -33,6 +34,7 @@ export const getCSSCustomProperty = path => {
|
|
|
33
34
|
* // Returns color.background.bold
|
|
34
35
|
* getTokenId('color.background.bold.[default]')
|
|
35
36
|
*/
|
|
37
|
+
|
|
36
38
|
export const getTokenId = path => {
|
|
37
39
|
const normalizedPath = typeof path === 'string' ? path.split('.') : path;
|
|
38
40
|
return normalizedPath.filter(el => el !== '[default]').join('.');
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,9 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::91ca2bc33315a9a910c7ca93bcb63936>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
var tokens = [{
|
|
7
|
+
"value": 0.2,
|
|
8
|
+
"attributes": {
|
|
9
|
+
"group": "palette",
|
|
10
|
+
"category": "opacity"
|
|
11
|
+
},
|
|
12
|
+
"filePath": "src/palettes/legacy-palette.tsx",
|
|
13
|
+
"isSource": true,
|
|
14
|
+
"original": {
|
|
15
|
+
"value": 0.2,
|
|
16
|
+
"attributes": {
|
|
17
|
+
"group": "palette",
|
|
18
|
+
"category": "opacity"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"name": "value.opacity.Opacity20",
|
|
22
|
+
"path": ["value", "opacity", "Opacity20"]
|
|
23
|
+
}, {
|
|
24
|
+
"value": 0.4,
|
|
25
|
+
"attributes": {
|
|
26
|
+
"group": "palette",
|
|
27
|
+
"category": "opacity"
|
|
28
|
+
},
|
|
29
|
+
"filePath": "src/palettes/legacy-palette.tsx",
|
|
30
|
+
"isSource": true,
|
|
31
|
+
"original": {
|
|
32
|
+
"value": 0.4,
|
|
33
|
+
"attributes": {
|
|
34
|
+
"group": "palette",
|
|
35
|
+
"category": "opacity"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"name": "value.opacity.Opacity40",
|
|
39
|
+
"path": ["value", "opacity", "Opacity40"]
|
|
40
|
+
}, {
|
|
7
41
|
"value": "transparent",
|
|
8
42
|
"attributes": {
|
|
9
43
|
"group": "palette",
|
|
@@ -1,9 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::54a73caa5e11805075c57f698252b1e7>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
var tokens = [{
|
|
7
|
+
"value": 0.2,
|
|
8
|
+
"attributes": {
|
|
9
|
+
"group": "palette",
|
|
10
|
+
"category": "opacity"
|
|
11
|
+
},
|
|
12
|
+
"filePath": "src/palettes/palette.tsx",
|
|
13
|
+
"isSource": true,
|
|
14
|
+
"original": {
|
|
15
|
+
"value": 0.2,
|
|
16
|
+
"attributes": {
|
|
17
|
+
"group": "palette",
|
|
18
|
+
"category": "opacity"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"name": "value.opacity.Opacity20",
|
|
22
|
+
"path": ["value", "opacity", "Opacity20"]
|
|
23
|
+
}, {
|
|
24
|
+
"value": 0.4,
|
|
25
|
+
"attributes": {
|
|
26
|
+
"group": "palette",
|
|
27
|
+
"category": "opacity"
|
|
28
|
+
},
|
|
29
|
+
"filePath": "src/palettes/palette.tsx",
|
|
30
|
+
"isSource": true,
|
|
31
|
+
"original": {
|
|
32
|
+
"value": 0.4,
|
|
33
|
+
"attributes": {
|
|
34
|
+
"group": "palette",
|
|
35
|
+
"category": "opacity"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"name": "value.opacity.Opacity40",
|
|
39
|
+
"path": ["value", "opacity", "Opacity40"]
|
|
40
|
+
}, {
|
|
7
41
|
"value": "#E9F2FF",
|
|
8
42
|
"attributes": {
|
|
9
43
|
"group": "palette",
|
|
@@ -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::785f21ff78f22bc07f51619e1add8ba9>>
|
|
16
16
|
* @codegenCommand yarn build tokens
|
|
17
17
|
*/
|
|
18
18
|
var renameMapper = [{
|
|
@@ -218,15 +218,15 @@ var renameMapper = [{
|
|
|
218
218
|
}, {
|
|
219
219
|
"path": "color.background.card",
|
|
220
220
|
"state": "deleted",
|
|
221
|
-
"replacement": "elevation.surface.raised"
|
|
221
|
+
"replacement": "elevation.surface.raised.[default]"
|
|
222
222
|
}, {
|
|
223
223
|
"path": "color.background.default",
|
|
224
224
|
"state": "deleted",
|
|
225
|
-
"replacement": "elevation.surface.[default]"
|
|
225
|
+
"replacement": "elevation.surface.[default].[default]"
|
|
226
226
|
}, {
|
|
227
227
|
"path": "color.background.overlay",
|
|
228
228
|
"state": "deleted",
|
|
229
|
-
"replacement": "elevation.surface.overlay"
|
|
229
|
+
"replacement": "elevation.surface.overlay.[default]"
|
|
230
230
|
}, {
|
|
231
231
|
"path": "color.background.subtleBorderedNeutral.pressed",
|
|
232
232
|
"state": "deleted",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Token names mapped to their value in the default Atlassian theme ('light')
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::59a1a4aaa5f768efccaed2c726fc2b08>>
|
|
7
7
|
* @codegenCommand yarn build tokens
|
|
8
8
|
*/
|
|
9
9
|
var defaultTokenValues = {
|
|
@@ -285,9 +285,17 @@ var defaultTokenValues = {
|
|
|
285
285
|
'elevation.shadow.overflow': '0px 8px 8px #091E4214, 0px 0px 1px #091E421F',
|
|
286
286
|
'elevation.shadow.overlay': '0px 8px 12px #091E4226, 0px 0px 1px #091E424F',
|
|
287
287
|
'elevation.surface': '#FFFFFF',
|
|
288
|
+
'elevation.surface.hovered': '#F1F2F4',
|
|
289
|
+
'elevation.surface.pressed': '#DCDFE4',
|
|
288
290
|
'elevation.surface.sunken': '#F7F8F9',
|
|
289
291
|
'elevation.surface.raised': '#FFFFFF',
|
|
292
|
+
'elevation.surface.raised.hovered': '#F1F2F4',
|
|
293
|
+
'elevation.surface.raised.pressed': '#DCDFE4',
|
|
290
294
|
'elevation.surface.overlay': '#FFFFFF',
|
|
295
|
+
'elevation.surface.overlay.hovered': '#F1F2F4',
|
|
296
|
+
'elevation.surface.overlay.pressed': '#DCDFE4',
|
|
297
|
+
'opacity.disabled': '0.4',
|
|
298
|
+
'opacity.loading': '0.2',
|
|
291
299
|
'utility.UNSAFE_util.transparent': 'transparent',
|
|
292
300
|
'utility.UNSAFE_util.MISSING_TOKEN': '#FA11F2'
|
|
293
301
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
3
|
-
* @codegen <<SignedSource::
|
|
3
|
+
* @codegen <<SignedSource::fc7198ce92b9604af441e36c1acb2075>>
|
|
4
4
|
* @codegenCommand yarn build tokens
|
|
5
5
|
*/
|
|
6
6
|
var tokens = {
|
|
@@ -282,9 +282,17 @@ var tokens = {
|
|
|
282
282
|
'elevation.shadow.overflow': '--ds-shadow-overflow',
|
|
283
283
|
'elevation.shadow.overlay': '--ds-shadow-overlay',
|
|
284
284
|
'elevation.surface': '--ds-surface',
|
|
285
|
+
'elevation.surface.hovered': '--ds-surface-hovered',
|
|
286
|
+
'elevation.surface.pressed': '--ds-surface-pressed',
|
|
285
287
|
'elevation.surface.sunken': '--ds-surface-sunken',
|
|
286
288
|
'elevation.surface.raised': '--ds-surface-raised',
|
|
289
|
+
'elevation.surface.raised.hovered': '--ds-surface-raised-hovered',
|
|
290
|
+
'elevation.surface.raised.pressed': '--ds-surface-raised-pressed',
|
|
287
291
|
'elevation.surface.overlay': '--ds-surface-overlay',
|
|
292
|
+
'elevation.surface.overlay.hovered': '--ds-surface-overlay-hovered',
|
|
293
|
+
'elevation.surface.overlay.pressed': '--ds-surface-overlay-pressed',
|
|
294
|
+
'opacity.disabled': '--ds-opacity-disabled',
|
|
295
|
+
'opacity.loading': '--ds-opacity-loading',
|
|
288
296
|
'utility.UNSAFE_util.transparent': '--ds-UNSAFE_util-transparent',
|
|
289
297
|
'utility.UNSAFE_util.MISSING_TOKEN': '--ds-UNSAFE_util-MISSING_TOKEN'
|
|
290
298
|
};
|