@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
|
var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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 @@ var 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: "\nUse 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).\n\nAlso use for the background of raised cards in a dragged state.\n\nCombine with shadow.overlay."
|
|
645
645
|
}
|
|
646
646
|
},
|
|
@@ -14,7 +14,7 @@ var 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 @@ var 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,19 +36,55 @@ var 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
|
-
|
|
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
|
+
}
|
|
34
88
|
}
|
|
35
89
|
}
|
|
36
90
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var 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,5 +1,5 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
-
import { CSS_PREFIX } from '../constants';
|
|
2
|
+
import { CSS_PREFIX, CSS_VAR_FULL } from '../constants';
|
|
3
3
|
/**
|
|
4
4
|
* Transforms a style dictionary token path to a CSS custom property.
|
|
5
5
|
*
|
|
@@ -16,12 +16,13 @@ import { CSS_PREFIX } from '../constants';
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
export var getCSSCustomProperty = function getCSSCustomProperty(path) {
|
|
19
|
-
var normalizedPath = typeof path === 'string' ? path.split('.') : path;
|
|
20
|
-
|
|
19
|
+
var normalizedPath = typeof path === 'string' ? path.split('.') : path; // Opacity and other 'shallow' groups are more readable when not trimmed
|
|
20
|
+
|
|
21
|
+
var slice = CSS_VAR_FULL.includes(path[0]) ? 0 : 1;
|
|
22
|
+
return "--".concat([CSS_PREFIX].concat(_toConsumableArray(normalizedPath.slice(slice))).filter(function (el) {
|
|
21
23
|
return el !== '[default]';
|
|
22
24
|
}).join('-'));
|
|
23
25
|
};
|
|
24
|
-
|
|
25
26
|
/**
|
|
26
27
|
* Transforms a style dictionary token path to a shorthand token id
|
|
27
28
|
* These ids will be typically be how tokens are interacted with via typescript and css
|
|
@@ -36,6 +37,7 @@ export var getCSSCustomProperty = function getCSSCustomProperty(path) {
|
|
|
36
37
|
* // Returns color.background.bold
|
|
37
38
|
* getTokenId('color.background.bold.[default]')
|
|
38
39
|
*/
|
|
40
|
+
|
|
39
41
|
export var getTokenId = function getTokenId(path) {
|
|
40
42
|
var normalizedPath = typeof path === 'string' ? path.split('.') : path;
|
|
41
43
|
return normalizedPath.filter(function (el) {
|
package/dist/esm/version.json
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
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
|
-
declare const tokens: {
|
|
6
|
+
declare const tokens: ({
|
|
7
|
+
value: number;
|
|
8
|
+
attributes: {
|
|
9
|
+
group: string;
|
|
10
|
+
category: string;
|
|
11
|
+
};
|
|
12
|
+
filePath: string;
|
|
13
|
+
isSource: boolean;
|
|
14
|
+
original: {
|
|
15
|
+
value: number;
|
|
16
|
+
attributes: {
|
|
17
|
+
group: string;
|
|
18
|
+
category: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
name: string;
|
|
22
|
+
path: string[];
|
|
23
|
+
} | {
|
|
7
24
|
value: string;
|
|
8
25
|
attributes: {
|
|
9
26
|
group: string;
|
|
@@ -20,5 +37,5 @@ declare const tokens: {
|
|
|
20
37
|
};
|
|
21
38
|
name: string;
|
|
22
39
|
path: string[];
|
|
23
|
-
}[];
|
|
40
|
+
})[];
|
|
24
41
|
export default tokens;
|
|
@@ -1,9 +1,26 @@
|
|
|
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
|
-
declare const tokens: {
|
|
6
|
+
declare const tokens: ({
|
|
7
|
+
value: number;
|
|
8
|
+
attributes: {
|
|
9
|
+
group: string;
|
|
10
|
+
category: string;
|
|
11
|
+
};
|
|
12
|
+
filePath: string;
|
|
13
|
+
isSource: boolean;
|
|
14
|
+
original: {
|
|
15
|
+
value: number;
|
|
16
|
+
attributes: {
|
|
17
|
+
group: string;
|
|
18
|
+
category: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
name: string;
|
|
22
|
+
path: string[];
|
|
23
|
+
} | {
|
|
7
24
|
value: string;
|
|
8
25
|
attributes: {
|
|
9
26
|
group: string;
|
|
@@ -20,5 +37,5 @@ declare const tokens: {
|
|
|
20
37
|
};
|
|
21
38
|
name: string;
|
|
22
39
|
path: string[];
|
|
23
|
-
}[];
|
|
40
|
+
})[];
|
|
24
41
|
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::785f21ff78f22bc07f51619e1add8ba9>>
|
|
16
16
|
* @codegenCommand yarn build tokens
|
|
17
17
|
*/
|
|
18
18
|
import tokens from './token-names';
|
|
@@ -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
|
declare const defaultTokenValues: {
|
|
@@ -285,9 +285,17 @@ declare const defaultTokenValues: {
|
|
|
285
285
|
readonly 'elevation.shadow.overflow': "0px 8px 8px #091E4214, 0px 0px 1px #091E421F";
|
|
286
286
|
readonly 'elevation.shadow.overlay': "0px 8px 12px #091E4226, 0px 0px 1px #091E424F";
|
|
287
287
|
readonly 'elevation.surface': "#FFFFFF";
|
|
288
|
+
readonly 'elevation.surface.hovered': "#F1F2F4";
|
|
289
|
+
readonly 'elevation.surface.pressed': "#DCDFE4";
|
|
288
290
|
readonly 'elevation.surface.sunken': "#F7F8F9";
|
|
289
291
|
readonly 'elevation.surface.raised': "#FFFFFF";
|
|
292
|
+
readonly 'elevation.surface.raised.hovered': "#F1F2F4";
|
|
293
|
+
readonly 'elevation.surface.raised.pressed': "#DCDFE4";
|
|
290
294
|
readonly 'elevation.surface.overlay': "#FFFFFF";
|
|
295
|
+
readonly 'elevation.surface.overlay.hovered': "#F1F2F4";
|
|
296
|
+
readonly 'elevation.surface.overlay.pressed': "#DCDFE4";
|
|
297
|
+
readonly 'opacity.disabled': "0.4";
|
|
298
|
+
readonly 'opacity.loading': "0.2";
|
|
291
299
|
readonly 'utility.UNSAFE_util.transparent': "transparent";
|
|
292
300
|
readonly '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
|
declare const tokens: {
|
|
@@ -282,9 +282,17 @@ declare const tokens: {
|
|
|
282
282
|
readonly 'elevation.shadow.overflow': "--ds-shadow-overflow";
|
|
283
283
|
readonly 'elevation.shadow.overlay': "--ds-shadow-overlay";
|
|
284
284
|
readonly 'elevation.surface': "--ds-surface";
|
|
285
|
+
readonly 'elevation.surface.hovered': "--ds-surface-hovered";
|
|
286
|
+
readonly 'elevation.surface.pressed': "--ds-surface-pressed";
|
|
285
287
|
readonly 'elevation.surface.sunken': "--ds-surface-sunken";
|
|
286
288
|
readonly 'elevation.surface.raised': "--ds-surface-raised";
|
|
289
|
+
readonly 'elevation.surface.raised.hovered': "--ds-surface-raised-hovered";
|
|
290
|
+
readonly 'elevation.surface.raised.pressed': "--ds-surface-raised-pressed";
|
|
287
291
|
readonly 'elevation.surface.overlay': "--ds-surface-overlay";
|
|
292
|
+
readonly 'elevation.surface.overlay.hovered': "--ds-surface-overlay-hovered";
|
|
293
|
+
readonly 'elevation.surface.overlay.pressed': "--ds-surface-overlay-pressed";
|
|
294
|
+
readonly 'opacity.disabled': "--ds-opacity-disabled";
|
|
295
|
+
readonly 'opacity.loading': "--ds-opacity-loading";
|
|
288
296
|
readonly 'utility.UNSAFE_util.transparent': "--ds-UNSAFE_util-transparent";
|
|
289
297
|
readonly 'utility.UNSAFE_util.MISSING_TOKEN': "--ds-UNSAFE_util-MISSING_TOKEN";
|
|
290
298
|
};
|
|
@@ -567,9 +575,17 @@ export declare type CSSTokenMap = {
|
|
|
567
575
|
'elevation.shadow.overflow': 'var(--ds-shadow-overflow)';
|
|
568
576
|
'elevation.shadow.overlay': 'var(--ds-shadow-overlay)';
|
|
569
577
|
'elevation.surface': 'var(--ds-surface)';
|
|
578
|
+
'elevation.surface.hovered': 'var(--ds-surface-hovered)';
|
|
579
|
+
'elevation.surface.pressed': 'var(--ds-surface-pressed)';
|
|
570
580
|
'elevation.surface.sunken': 'var(--ds-surface-sunken)';
|
|
571
581
|
'elevation.surface.raised': 'var(--ds-surface-raised)';
|
|
582
|
+
'elevation.surface.raised.hovered': 'var(--ds-surface-raised-hovered)';
|
|
583
|
+
'elevation.surface.raised.pressed': 'var(--ds-surface-raised-pressed)';
|
|
572
584
|
'elevation.surface.overlay': 'var(--ds-surface-overlay)';
|
|
585
|
+
'elevation.surface.overlay.hovered': 'var(--ds-surface-overlay-hovered)';
|
|
586
|
+
'elevation.surface.overlay.pressed': 'var(--ds-surface-overlay-pressed)';
|
|
587
|
+
'opacity.disabled': 'var(--ds-opacity-disabled)';
|
|
588
|
+
'opacity.loading': 'var(--ds-opacity-loading)';
|
|
573
589
|
'utility.UNSAFE_util.transparent': 'var(--ds-UNSAFE_util-transparent)';
|
|
574
590
|
'utility.UNSAFE_util.MISSING_TOKEN': 'var(--ds-UNSAFE_util-MISSING_TOKEN)';
|
|
575
591
|
};
|