@atlaskit/editor-shared-styles 2.4.1 → 2.4.3

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-shared-styles
2
2
 
3
+ ## 2.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure legacy types are published for TS 4.5-4.8
8
+
9
+ ## 2.4.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`9369cc38a68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9369cc38a68) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
14
+
3
15
  ## 2.4.1
4
16
 
5
17
  ### Patch Changes
@@ -7,13 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.overflowShadow = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _react = require("@emotion/react");
10
- var _constants = require("@atlaskit/theme/constants");
11
10
  var _templateObject;
12
11
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
13
12
  var overflowShadow = function overflowShadow(_ref) {
14
13
  var background = _ref.background,
15
14
  _ref$width = _ref.width,
16
- width = _ref$width === void 0 ? "".concat((0, _constants.gridSize)(), "px") : _ref$width,
15
+ width = _ref$width === void 0 ? "var(--ds-space-100, 8px)" : _ref$width,
17
16
  leftCoverWidth = _ref.leftCoverWidth,
18
17
  rightCoverWidth = _ref.rightCoverWidth;
19
18
  var leftCoverWidthResolved = leftCoverWidth || width;
@@ -4,9 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.scrollbarStyles = void 0;
7
- var _constants = require("@atlaskit/theme/constants");
8
- var akGridSize = (0, _constants.gridSize)() + 'px';
9
-
10
7
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
11
- var scrollbarStyles = "\n -ms-overflow-style: -ms-autohiding-scrollbar;\n\n &::-webkit-scrollbar {\n height: ".concat(akGridSize, ";\n width: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-corner {\n display: none;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ", "var(--ds-background-neutral-subtle, rgba(0, 0, 0, 0))", ";\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: ", "var(--ds-background-neutral-bold, rgba(0, 0, 0, 0.2))", ";\n border-radius: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ", "var(--ds-background-neutral-bold-hovered, rgba(0, 0, 0, 0.4))", ";\n }\n");
8
+ var scrollbarStyles = "\n -ms-overflow-style: -ms-autohiding-scrollbar;\n\n &::-webkit-scrollbar {\n height: ".concat("var(--ds-space-100, 8px)", ";\n width: ", "var(--ds-space-100, 8px)", ";\n }\n\n &::-webkit-scrollbar-corner {\n display: none;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ", "var(--ds-background-neutral-subtle, rgba(0, 0, 0, 0))", ";\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: ", "var(--ds-background-neutral-bold, rgba(0, 0, 0, 0.2))", ";\n border-radius: 8px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ", "var(--ds-background-neutral-bold-hovered, rgba(0, 0, 0, 0.4))", ";\n }\n");
12
9
  exports.scrollbarStyles = scrollbarStyles;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,8 @@
1
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
2
  import { B100, B300, B400, B50, B75, DN50, DN70, N0, N100, N20, N30, N40, N50, N500, N700, N900, R300, R400, R50, R75 } from '@atlaskit/theme/colors';
3
- import { codeFontFamily, fontSize as defaultFontSize, gridSize, layers } from '@atlaskit/theme/constants';
3
+ import { codeFontFamily, fontSize as defaultFontSize,
4
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
5
+ gridSize, layers } from '@atlaskit/theme/constants';
4
6
  export const akEditorFullPageDefaultFontSize = 16;
5
7
  export const akEditorCodeFontFamily = codeFontFamily();
6
8
  export const akEditorInactiveForeground = N500;
@@ -1,9 +1,8 @@
1
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
2
  import { css } from '@emotion/react';
3
- import { gridSize } from '@atlaskit/theme/constants';
4
3
  export const overflowShadow = ({
5
4
  background,
6
- width = `${gridSize()}px`,
5
+ width = "var(--ds-space-100, 8px)",
7
6
  leftCoverWidth,
8
7
  rightCoverWidth
9
8
  }) => {
@@ -1,13 +1,10 @@
1
- import { gridSize } from '@atlaskit/theme/constants';
2
- const akGridSize = gridSize() + 'px';
3
-
4
1
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
5
2
  export const scrollbarStyles = `
6
3
  -ms-overflow-style: -ms-autohiding-scrollbar;
7
4
 
8
5
  &::-webkit-scrollbar {
9
- height: ${akGridSize};
10
- width: ${akGridSize};
6
+ height: ${"var(--ds-space-100, 8px)"};
7
+ width: ${"var(--ds-space-100, 8px)"};
11
8
  }
12
9
 
13
10
  &::-webkit-scrollbar-corner {
@@ -20,7 +17,7 @@ export const scrollbarStyles = `
20
17
 
21
18
  &:hover::-webkit-scrollbar-thumb {
22
19
  background-color: ${"var(--ds-background-neutral-bold, rgba(0, 0, 0, 0.2))"};
23
- border-radius: ${akGridSize};
20
+ border-radius: 8px;
24
21
  }
25
22
 
26
23
  &::-webkit-scrollbar-thumb:hover {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,9 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
3
3
  import { B100, B300, B400, B50, B75, DN50, DN70, N0, N100, N20, N30, N40, N50, N500, N700, N900, R300, R400, R50, R75 } from '@atlaskit/theme/colors';
4
- import { codeFontFamily, fontSize as defaultFontSize, gridSize, layers } from '@atlaskit/theme/constants';
4
+ import { codeFontFamily, fontSize as defaultFontSize,
5
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
6
+ gridSize, layers } from '@atlaskit/theme/constants';
5
7
  export var akEditorFullPageDefaultFontSize = 16;
6
8
  export var akEditorCodeFontFamily = codeFontFamily();
7
9
  export var akEditorInactiveForeground = N500;
@@ -2,11 +2,10 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject;
3
3
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
4
4
  import { css } from '@emotion/react';
5
- import { gridSize } from '@atlaskit/theme/constants';
6
5
  export var overflowShadow = function overflowShadow(_ref) {
7
6
  var background = _ref.background,
8
7
  _ref$width = _ref.width,
9
- width = _ref$width === void 0 ? "".concat(gridSize(), "px") : _ref$width,
8
+ width = _ref$width === void 0 ? "var(--ds-space-100, 8px)" : _ref$width,
10
9
  leftCoverWidth = _ref.leftCoverWidth,
11
10
  rightCoverWidth = _ref.rightCoverWidth;
12
11
  var leftCoverWidthResolved = leftCoverWidth || width;
@@ -1,5 +1,2 @@
1
- import { gridSize } from '@atlaskit/theme/constants';
2
- var akGridSize = gridSize() + 'px';
3
-
4
1
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
5
- export var scrollbarStyles = "\n -ms-overflow-style: -ms-autohiding-scrollbar;\n\n &::-webkit-scrollbar {\n height: ".concat(akGridSize, ";\n width: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-corner {\n display: none;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ", "var(--ds-background-neutral-subtle, rgba(0, 0, 0, 0))", ";\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: ", "var(--ds-background-neutral-bold, rgba(0, 0, 0, 0.2))", ";\n border-radius: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ", "var(--ds-background-neutral-bold-hovered, rgba(0, 0, 0, 0.4))", ";\n }\n");
2
+ export var scrollbarStyles = "\n -ms-overflow-style: -ms-autohiding-scrollbar;\n\n &::-webkit-scrollbar {\n height: ".concat("var(--ds-space-100, 8px)", ";\n width: ", "var(--ds-space-100, 8px)", ";\n }\n\n &::-webkit-scrollbar-corner {\n display: none;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ", "var(--ds-background-neutral-subtle, rgba(0, 0, 0, 0))", ";\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: ", "var(--ds-background-neutral-bold, rgba(0, 0, 0, 0.2))", ";\n border-radius: 8px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ", "var(--ds-background-neutral-bold-hovered, rgba(0, 0, 0, 0.4))", ";\n }\n");
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,123 @@
1
+ import { EditorTheme } from './types';
2
+ export declare const akEditorFullPageDefaultFontSize = 16;
3
+ export declare const akEditorCodeFontFamily: string;
4
+ export declare const akEditorInactiveForeground = "#42526E";
5
+ export declare const akEditorFocus = "#4C9AFF";
6
+ export declare const akEditorSubtleAccent = "#DFE1E6";
7
+ export declare const akEditorActiveBackground = "#42526E";
8
+ export declare const akEditorActiveForeground = "#FFFFFF";
9
+ export declare const akEditorBlockquoteBorderColor = "#DFE1E6";
10
+ export declare const akEditorDropdownActiveBackground = "#091E42";
11
+ export declare const akEditorPopupBackground = "#253858";
12
+ export declare const akEditorPopupText = "#DEEBFF";
13
+ export declare const akEditorPrimaryButton = "#0052CC";
14
+ export declare const akEditorCodeBackground = "#F4F5F7";
15
+ export declare const akEditorCodeBlockPadding = "12px";
16
+ export declare const akEditorCodeInlinePadding = "2px 4px";
17
+ export declare const akEditorDeleteBackground = "#FFEBE6";
18
+ export declare const akEditorDeleteBackgroundShaded = "#FFEBE6";
19
+ export declare const akEditorDeleteBackgroundWithOpacity = "rgba(255, 189, 173, 0.5)";
20
+ export declare const akEditorDeleteBorder = "#FF5630";
21
+ export declare const akEditorDeleteIconColor = "#DE350B";
22
+ export declare const akEditorCustomIconSize = 20;
23
+ export declare const akEditorSelectedBorderColor = "#0065FF";
24
+ export declare const akEditorSelectedBgColor = "#DEEBFF";
25
+ export declare const akEditorSelectedBlanketColor = "#B3D4FF";
26
+ export declare const akEditorSelectedBorderSize = 1;
27
+ export declare const akEditorSelectedBorder: string;
28
+ export declare const akEditorSelectedBoxShadow: string;
29
+ export declare const akEditorSelectedIconColor = "#0052CC";
30
+ export declare const akEditorSelectedBorderBoldSize = 2;
31
+ export declare const akEditorSelectedBlanketOpacity = 0.3;
32
+ export declare const akEditorUnitZIndex = 1;
33
+ export declare const akEditorShadowZIndex = 2;
34
+ export declare const akEditorStickyHeaderZIndex = 11;
35
+ export declare const akEditorSmallZIndex: number;
36
+ export declare const akEditorGridLineZIndex = 9999;
37
+ export declare const akEditorMenuZIndex: 500;
38
+ export declare const akEditorFloatingPanelZIndex: 400;
39
+ export declare const akEditorFloatingDialogZIndex: number;
40
+ export declare const akEditorFloatingOverlapPanelZIndex: number;
41
+ export declare const akEditorMentionSelected = "#7A869A";
42
+ export declare const akEditorTableToolbarSize = 11;
43
+ export declare const akEditorTableBorder = "#C1C7D0";
44
+ export declare const akEditorTableBorderDark = "#3B475C";
45
+ export declare const akEditorTableToolbar = "#F4F5F7";
46
+ export declare const akEditorTableToolbarDark = "#283447";
47
+ export declare const akEditorTableFloatingControls = "#F4F5F7";
48
+ export declare const akEditorTableCellSelected = "#B3D4FF";
49
+ export declare const akEditorTableToolbarSelected = "#4C9AFF";
50
+ export declare const akEditorTableBorderSelected = "#0065FF";
51
+ export declare const akEditorTableCellDelete = "#FFEBE6";
52
+ export declare const akEditorTableBorderDelete = "#FF5630";
53
+ export declare const akEditorTableToolbarDelete = "#FFBDAD";
54
+ export declare const akEditorTableBorderRadius = "3px";
55
+ export declare const akEditorTableCellBackgroundOpacity = 0.5;
56
+ export declare const akEditorFullPageMaxWidth = 680;
57
+ export declare const akEditorDefaultLayoutWidth = 760;
58
+ export declare const akEditorWideLayoutWidth = 960;
59
+ export declare const akEditorFullWidthLayoutWidth = 1800;
60
+ export declare const akEditorFullWidthLayoutLineLength = 1792;
61
+ export declare const akEditorTableNumberColumnWidth = 42;
62
+ export declare const akEditorBreakoutPadding = 96;
63
+ export declare const akEditorGutterPadding = 32;
64
+ export declare const akEditorMobileBreakoutPoint = 720;
65
+ export declare const akEditorTableCellMinWidth = 48;
66
+ export declare const akEditorTableLegacyCellMinWidth = 128;
67
+ export declare const akEditorMediaResizeHandlerPaddingWide = 12;
68
+ export declare const akEditorMediaResizeHandlerPadding = 4;
69
+ export declare const akEditorSwoopCubicBezier = "cubic-bezier(0.15, 1, 0.3, 1)";
70
+ export declare const gridMediumMaxWidth = 1024;
71
+ export declare const breakoutWideScaleRatio = 1.33;
72
+ export declare const akRichMediaResizeZIndex: number;
73
+ export declare const akLayoutGutterOffset: number;
74
+ export declare const akEditorLineHeight = 1.714;
75
+ export declare const akEditorRuleBackground = "#EBECF0";
76
+ export declare const akEditorRuleBorderRadius = "1px";
77
+ export declare const akEditorToolbarKeylineHeight = 2;
78
+ export declare const akEditorContextPanelWidth = 320;
79
+ export declare const blockNodesVerticalMargin = "0.75rem";
80
+ export declare const DEFAULT_EMBED_CARD_WIDTH = 680;
81
+ export declare const DEFAULT_EMBED_CARD_HEIGHT = 480;
82
+ export declare const ATLASSIAN_NAVIGATION_HEIGHT = "56px";
83
+ export declare const akEditorSelectedNodeClassName = "ak-editor-selected-node";
84
+ export declare const editorFontSize: ({ theme }: {
85
+ theme: EditorTheme;
86
+ }) => number;
87
+ export declare const relativeSize: (multiplier: number) => ({ theme }: {
88
+ theme: EditorTheme;
89
+ }) => number;
90
+ export declare const relativeFontSizeToBase16: (px: number | string) => string;
91
+ export declare const VIEWPORT_SIZES: {
92
+ laptopHiDPI: {
93
+ width: number;
94
+ height: number;
95
+ };
96
+ laptopMDPI: {
97
+ width: number;
98
+ height: number;
99
+ };
100
+ tabletL: {
101
+ width: number;
102
+ height: number;
103
+ };
104
+ tabletS: {
105
+ width: number;
106
+ height: number;
107
+ };
108
+ mobileM: {
109
+ width: number;
110
+ height: number;
111
+ };
112
+ mobileS: {
113
+ width: number;
114
+ height: number;
115
+ };
116
+ mobileXS: {
117
+ width: number;
118
+ height: number;
119
+ };
120
+ };
121
+ export declare const akEditorMobileMaxWidth = 0;
122
+ export declare const getTableCellBackgroundDarkModeColors: string;
123
+ export declare function getTableCellBackgroundDarkModeColorCSS(colorName: string, colorValue: string): string;
@@ -0,0 +1,2 @@
1
+ export type { EditorTheme } from './types';
2
+ export { akEditorActiveBackground, akEditorActiveForeground, akEditorBlockquoteBorderColor, akEditorBreakoutPadding, akEditorCodeBackground, akEditorCodeBlockPadding, akEditorCodeFontFamily, akEditorCodeInlinePadding, akEditorContextPanelWidth, akEditorDefaultLayoutWidth, akEditorDeleteBackground, akEditorDeleteBackgroundShaded, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorDropdownActiveBackground, akEditorFloatingDialogZIndex, akEditorFloatingOverlapPanelZIndex, akEditorFloatingPanelZIndex, akEditorFocus, akEditorFullPageMaxWidth, akEditorFullPageDefaultFontSize, akEditorFullWidthLayoutWidth, akEditorFullWidthLayoutLineLength, akEditorGridLineZIndex, akEditorGutterPadding, akEditorInactiveForeground, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorMentionSelected, akEditorMenuZIndex, akEditorStickyHeaderZIndex, akEditorMobileBreakoutPoint, akEditorPopupBackground, akEditorPopupText, akEditorPrimaryButton, akEditorSelectedBorderColor, akEditorSelectedBorderBoldSize, akEditorSelectedBorderSize, akEditorSelectedBorder, akEditorSelectedBoxShadow, akEditorSelectedIconColor, akEditorCustomIconSize, akEditorSelectedBlanketColor, akEditorSelectedBgColor, akEditorSelectedBlanketOpacity, akEditorSmallZIndex, akEditorShadowZIndex, akEditorSubtleAccent, akEditorSwoopCubicBezier, akEditorTableBorder, akEditorTableBorderDark, akEditorTableBorderDelete, akEditorTableBorderRadius, akEditorTableBorderSelected, akEditorTableCellBackgroundOpacity, akEditorTableCellDelete, akEditorTableCellMinWidth, akEditorTableCellSelected, akEditorTableFloatingControls, akEditorTableLegacyCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarDelete, akEditorTableToolbarSelected, akEditorTableToolbarSize, akEditorUnitZIndex, akEditorWideLayoutWidth, akLayoutGutterOffset, akRichMediaResizeZIndex, blockNodesVerticalMargin, breakoutWideScaleRatio, editorFontSize, gridMediumMaxWidth, relativeSize, relativeFontSizeToBase16, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH, akEditorLineHeight, akEditorRuleBackground, akEditorRuleBorderRadius, akEditorSelectedNodeClassName, akEditorToolbarKeylineHeight, VIEWPORT_SIZES, akEditorMobileMaxWidth, getTableCellBackgroundDarkModeColors, ATLASSIAN_NAVIGATION_HEIGHT, } from './consts';
@@ -0,0 +1,3 @@
1
+ export type EditorTheme = {
2
+ baseFontSize?: number;
3
+ };
@@ -0,0 +1,4 @@
1
+ export { akEditorActiveBackground, akEditorActiveForeground, akEditorBlockquoteBorderColor, akEditorBreakoutPadding, akEditorCodeBackground, akEditorCodeBlockPadding, akEditorCodeFontFamily, akEditorCodeInlinePadding, akEditorContextPanelWidth, akEditorDefaultLayoutWidth, akEditorDeleteBackground, akEditorDeleteBackgroundShaded, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorDeleteIconColor, akEditorDropdownActiveBackground, akEditorFloatingDialogZIndex, akEditorFloatingOverlapPanelZIndex, akEditorFloatingPanelZIndex, akEditorFocus, akEditorFullPageMaxWidth, akEditorFullPageDefaultFontSize, akEditorFullWidthLayoutWidth, akEditorFullWidthLayoutLineLength, akEditorGridLineZIndex, akEditorGutterPadding, akEditorInactiveForeground, akEditorMediaResizeHandlerPadding, akEditorMediaResizeHandlerPaddingWide, akEditorMentionSelected, akEditorMenuZIndex, akEditorStickyHeaderZIndex, akEditorMobileBreakoutPoint, akEditorPopupBackground, akEditorPopupText, akEditorPrimaryButton, akEditorSelectedBorderColor, akEditorSelectedBorderBoldSize, akEditorSelectedBorderSize, akEditorSelectedBorder, akEditorSelectedBoxShadow, akEditorSelectedIconColor, akEditorSelectedBlanketColor, akEditorSelectedBgColor, akEditorSelectedBlanketOpacity, akEditorSmallZIndex, akEditorShadowZIndex, akEditorSubtleAccent, akEditorSwoopCubicBezier, akEditorTableBorder, akEditorTableBorderDark, akEditorTableBorderDelete, akEditorTableBorderRadius, akEditorTableBorderSelected, akEditorTableCellBackgroundOpacity, akEditorTableCellDelete, akEditorTableCellMinWidth, akEditorTableCellSelected, akEditorTableFloatingControls, akEditorTableLegacyCellMinWidth, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarDelete, akEditorTableToolbarSelected, akEditorTableToolbarSize, akEditorUnitZIndex, akEditorWideLayoutWidth, akLayoutGutterOffset, akRichMediaResizeZIndex, blockNodesVerticalMargin, breakoutWideScaleRatio, editorFontSize, gridMediumMaxWidth, relativeSize, relativeFontSizeToBase16, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH, akEditorLineHeight, akEditorRuleBackground, akEditorRuleBorderRadius, akEditorSelectedNodeClassName, akEditorToolbarKeylineHeight, VIEWPORT_SIZES, akEditorMobileMaxWidth, getTableCellBackgroundDarkModeColors, ATLASSIAN_NAVIGATION_HEIGHT, } from './consts';
2
+ export type { EditorTheme } from './consts';
3
+ export { SelectionStyle, getSelectionStyles, hideNativeBrowserTextSelectionStyles, } from './selection';
4
+ export { overflowShadow } from './overflow-shadow';
@@ -0,0 +1 @@
1
+ export { overflowShadow } from './overflow-shadow';
@@ -0,0 +1,6 @@
1
+ export declare const overflowShadow: ({ background, width, leftCoverWidth, rightCoverWidth, }: {
2
+ background: string;
3
+ width?: string | undefined;
4
+ leftCoverWidth?: string | undefined;
5
+ rightCoverWidth?: string | undefined;
6
+ }) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const scrollbarStyles: string;
@@ -0,0 +1,2 @@
1
+ export { SelectionStyle } from './types';
2
+ export { getSelectionStyles, hideNativeBrowserTextSelectionStyles, } from './utils';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * These are generic selection styles for all nodes
3
+ * If you have custom behaviour needed for a node, add that in the plugin's styles
4
+ * file in editor-core
5
+ */
6
+ export declare enum SelectionStyle {
7
+ Border = 0,
8
+ BoxShadow = 1,
9
+ Background = 2,
10
+ Blanket = 3
11
+ }
@@ -0,0 +1,13 @@
1
+ import { SelectionStyle } from './types';
2
+ /**
3
+ * Adds correct selection styling for a node
4
+ * Pass in which selection style properties you want and it will return css string of necessary styles
5
+ *
6
+ * eg.
7
+ * .expand.ak-editor-selected-node {
8
+ * ${getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Blanket])}
9
+ * }
10
+ *
11
+ */
12
+ export declare const getSelectionStyles: (selectionStyles: Array<SelectionStyle>) => string;
13
+ export declare const hideNativeBrowserTextSelectionStyles = "\n ::selection,*::selection {\n background-color: transparent;\n }\n ::-moz-selection,*::-moz-selection {\n background-color: transparent;\n }\n";
@@ -0,0 +1 @@
1
+ export { shortcutStyle } from './shortcut';
@@ -0,0 +1 @@
1
+ export declare const shortcutStyle: import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "description": "Style values used in the editor/renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,6 +24,7 @@ import {
24
24
  import {
25
25
  codeFontFamily,
26
26
  fontSize as defaultFontSize,
27
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
27
28
  gridSize,
28
29
  layers,
29
30
  } from '@atlaskit/theme/constants';
@@ -1,12 +1,11 @@
1
1
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
2
2
  import { css } from '@emotion/react';
3
3
 
4
- import { gridSize } from '@atlaskit/theme/constants';
5
4
  import { token } from '@atlaskit/tokens';
6
5
 
7
6
  export const overflowShadow = ({
8
7
  background,
9
- width = `${gridSize()}px`,
8
+ width = token('space.100', '8px'),
10
9
  leftCoverWidth,
11
10
  rightCoverWidth,
12
11
  }: {
@@ -1,15 +1,12 @@
1
- import { gridSize } from '@atlaskit/theme/constants';
2
1
  import { token } from '@atlaskit/tokens';
3
2
 
4
- const akGridSize = gridSize() + 'px';
5
-
6
3
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
7
4
  export const scrollbarStyles = `
8
5
  -ms-overflow-style: -ms-autohiding-scrollbar;
9
6
 
10
7
  &::-webkit-scrollbar {
11
- height: ${akGridSize};
12
- width: ${akGridSize};
8
+ height: ${token('space.100', '8px')};
9
+ width: ${token('space.100', '8px')};
13
10
  }
14
11
 
15
12
  &::-webkit-scrollbar-corner {
@@ -28,7 +25,7 @@ export const scrollbarStyles = `
28
25
  'color.background.neutral.bold',
29
26
  'rgba(0, 0, 0, 0.2)',
30
27
  )};
31
- border-radius: ${akGridSize};
28
+ border-radius: 8px;
32
29
  }
33
30
 
34
31
  &::-webkit-scrollbar-thumb:hover {