@atlaskit/editor-shared-styles 2.13.4 → 3.0.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 +17 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/afm-post-office/tsconfig.json +0 -3
- package/dist/cjs/consts/consts.js +20 -43
- package/dist/cjs/consts/index.js +0 -132
- package/dist/cjs/index.js +0 -132
- package/dist/cjs/overflow-shadow/overflow-shadow.js +1 -2
- package/dist/cjs/scrollbar-styles.js +1 -1
- package/dist/cjs/selection/utils.js +2 -2
- package/dist/cjs/shortcut/shortcut.js +1 -3
- package/dist/es2019/consts/consts.js +20 -44
- package/dist/es2019/consts/index.js +1 -1
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/overflow-shadow/overflow-shadow.js +10 -11
- package/dist/es2019/scrollbar-styles.js +3 -3
- package/dist/es2019/selection/utils.js +3 -3
- package/dist/es2019/shortcut/shortcut.js +3 -5
- package/dist/esm/consts/consts.js +20 -44
- package/dist/esm/consts/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/overflow-shadow/overflow-shadow.js +1 -2
- package/dist/esm/scrollbar-styles.js +1 -1
- package/dist/esm/selection/utils.js +3 -3
- package/dist/esm/shortcut/shortcut.js +1 -3
- package/dist/types/consts/consts.d.ts +14 -36
- package/dist/types/consts/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/consts/consts.d.ts +14 -36
- package/dist/types-ts4.5/consts/index.d.ts +1 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/package.json +2 -3
- package/src/consts/consts.ts +38 -107
- package/src/consts/index.ts +0 -22
- package/src/index.ts +0 -22
- package/src/overflow-shadow/overflow-shadow.ts +12 -13
- package/src/scrollbar-styles.ts +3 -3
- package/src/selection/utils.ts +2 -3
- package/src/shortcut/shortcut.ts +3 -8
- package/tsconfig.app.json +0 -3
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
|
|
5
|
-
import { N20 } from '@atlaskit/theme/colors';
|
|
6
5
|
import { token } from '@atlaskit/tokens';
|
|
7
6
|
|
|
8
7
|
export const overflowShadow = ({
|
|
@@ -21,50 +20,50 @@ export const overflowShadow = ({
|
|
|
21
20
|
/* shadow cover left */
|
|
22
21
|
linear-gradient(
|
|
23
22
|
to right,
|
|
24
|
-
${token('color.background.neutral'
|
|
23
|
+
${token('color.background.neutral')} ${leftCoverWidthResolved},
|
|
25
24
|
transparent ${leftCoverWidthResolved}
|
|
26
25
|
),
|
|
27
26
|
/* shadow cover background left */
|
|
28
27
|
linear-gradient(
|
|
29
28
|
to right,
|
|
30
|
-
${token('elevation.surface.raised'
|
|
29
|
+
${token('elevation.surface.raised')} ${leftCoverWidthResolved},
|
|
31
30
|
transparent ${leftCoverWidthResolved}
|
|
32
31
|
),
|
|
33
32
|
/* shadow cover right */
|
|
34
33
|
linear-gradient(
|
|
35
34
|
to left,
|
|
36
|
-
${token('color.background.neutral'
|
|
35
|
+
${token('color.background.neutral')} ${rightCoverWidthResolved},
|
|
37
36
|
transparent ${rightCoverWidthResolved}
|
|
38
37
|
),
|
|
39
38
|
/* shadow cover background right */
|
|
40
39
|
linear-gradient(
|
|
41
40
|
to left,
|
|
42
|
-
${token('elevation.surface.raised'
|
|
41
|
+
${token('elevation.surface.raised')} ${rightCoverWidthResolved},
|
|
43
42
|
transparent ${rightCoverWidthResolved}
|
|
44
43
|
),
|
|
45
44
|
/* overflow shadow right spread */
|
|
46
45
|
linear-gradient(
|
|
47
46
|
to left,
|
|
48
|
-
${token('elevation.shadow.overflow.spread'
|
|
49
|
-
${token('utility.UNSAFE.transparent'
|
|
47
|
+
${token('elevation.shadow.overflow.spread')} 0,
|
|
48
|
+
${token('utility.UNSAFE.transparent')} ${width}
|
|
50
49
|
),
|
|
51
50
|
/* overflow shadow right perimeter */
|
|
52
51
|
linear-gradient(
|
|
53
52
|
to left,
|
|
54
|
-
${token('elevation.shadow.overflow.perimeter'
|
|
55
|
-
${token('utility.UNSAFE.transparent'
|
|
53
|
+
${token('elevation.shadow.overflow.perimeter')} 0,
|
|
54
|
+
${token('utility.UNSAFE.transparent')} ${width}
|
|
56
55
|
),
|
|
57
56
|
/* overflow shadow left spread */
|
|
58
57
|
linear-gradient(
|
|
59
58
|
to right,
|
|
60
|
-
${token('elevation.shadow.overflow.spread'
|
|
61
|
-
${token('utility.UNSAFE.transparent'
|
|
59
|
+
${token('elevation.shadow.overflow.spread')} 0,
|
|
60
|
+
${token('utility.UNSAFE.transparent')} ${width}
|
|
62
61
|
),
|
|
63
62
|
/* overflow shadow left perimeter */
|
|
64
63
|
linear-gradient(
|
|
65
64
|
to right,
|
|
66
|
-
${token('elevation.shadow.overflow.perimeter'
|
|
67
|
-
${token('utility.UNSAFE.transparent'
|
|
65
|
+
${token('elevation.shadow.overflow.perimeter')} 0,
|
|
66
|
+
${token('utility.UNSAFE.transparent')} ${width}
|
|
68
67
|
)
|
|
69
68
|
`;
|
|
70
69
|
};
|
package/src/scrollbar-styles.ts
CHANGED
|
@@ -13,15 +13,15 @@ export const scrollbarStyles = `
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
&::-webkit-scrollbar-thumb {
|
|
16
|
-
background-color: ${token('color.background.neutral.subtle'
|
|
16
|
+
background-color: ${token('color.background.neutral.subtle')};
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&:hover::-webkit-scrollbar-thumb {
|
|
20
|
-
background-color: ${token('color.background.neutral.bold'
|
|
20
|
+
background-color: ${token('color.background.neutral.bold')};
|
|
21
21
|
border-radius: 8px;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&::-webkit-scrollbar-thumb:hover {
|
|
25
|
-
background-color: ${token('color.background.neutral.bold.hovered'
|
|
25
|
+
background-color: ${token('color.background.neutral.bold.hovered')};
|
|
26
26
|
}
|
|
27
27
|
`;
|
package/src/selection/utils.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { token } from '@atlaskit/tokens';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
akEditorSelectedBgColor,
|
|
5
4
|
akEditorSelectedBorder,
|
|
6
5
|
akEditorSelectedBorderColor,
|
|
7
6
|
akEditorSelectedBoxShadow,
|
|
@@ -61,7 +60,7 @@ const getSelectionStyle = (style: SelectionStyle): string => {
|
|
|
61
60
|
border-color: transparent;
|
|
62
61
|
`;
|
|
63
62
|
case SelectionStyle.Background:
|
|
64
|
-
return `background-color: ${token('color.background.selected'
|
|
63
|
+
return `background-color: ${token('color.background.selected')};`;
|
|
65
64
|
case SelectionStyle.Blanket:
|
|
66
65
|
return `
|
|
67
66
|
position: relative;
|
|
@@ -80,7 +79,7 @@ const getSelectionStyle = (style: SelectionStyle): string => {
|
|
|
80
79
|
width: 100%;
|
|
81
80
|
pointer-events: none;
|
|
82
81
|
z-index: ${akEditorSmallZIndex};
|
|
83
|
-
background-color: ${token('color.blanket.selected'
|
|
82
|
+
background-color: ${token('color.blanket.selected')}
|
|
84
83
|
}`;
|
|
85
84
|
default:
|
|
86
85
|
return '';
|
package/src/shortcut/shortcut.ts
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
|
|
4
|
-
import { N100 } from '@atlaskit/theme/colors';
|
|
5
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
6
4
|
import { token } from '@atlaskit/tokens';
|
|
7
5
|
|
|
8
6
|
import { akEditorMobileMaxWidth, relativeFontSizeToBase16 } from '../consts';
|
|
9
7
|
|
|
10
8
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
9
|
export const shortcutStyle = css`
|
|
12
|
-
background-color: ${token(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
)}; /* N60 at 50% */
|
|
16
|
-
color: ${token('color.text.subtle', N100)};
|
|
17
|
-
border-radius: ${borderRadius()}px;
|
|
10
|
+
background-color: ${token('color.background.neutral')};
|
|
11
|
+
color: ${token('color.text.subtle')};
|
|
12
|
+
border-radius: ${token('border.radius', '3px')};
|
|
18
13
|
padding: ${token('space.050', '4px')};
|
|
19
14
|
line-height: 12px;
|
|
20
15
|
font-size: ${relativeFontSizeToBase16(11.67)};
|