@atlaskit/editor-shared-styles 2.3.1 → 2.3.2

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,12 @@
1
1
  # @atlaskit/editor-shared-styles
2
2
 
3
+ ## 2.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`0d93211414e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0d93211414e) - Updates usage of removed design token `utilities.UNSAFE_util.transparent` in favour of its replacement `utilities.UNSAFE.transparent`.
8
+ - Updated dependencies
9
+
3
10
  ## 2.3.1
4
11
 
5
12
  ### Patch Changes
@@ -1,21 +1,17 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.editorFontSize = exports.breakoutWideScaleRatio = exports.blockNodesVerticalMargin = exports.akRichMediaResizeZIndex = exports.akLayoutGutterOffset = exports.akEditorWideLayoutWidth = exports.akEditorUnitZIndex = exports.akEditorToolbarKeylineHeight = exports.akEditorTableToolbarSize = exports.akEditorTableToolbarSelected = exports.akEditorTableToolbarDelete = exports.akEditorTableToolbarDark = exports.akEditorTableToolbar = exports.akEditorTableNumberColumnWidth = exports.akEditorTableLegacyCellMinWidth = exports.akEditorTableFloatingControls = exports.akEditorTableCellSelected = exports.akEditorTableCellMinWidth = exports.akEditorTableCellDelete = exports.akEditorTableCellBackgroundOpacity = exports.akEditorTableBorderSelected = exports.akEditorTableBorderRadius = exports.akEditorTableBorderDelete = exports.akEditorTableBorderDark = exports.akEditorTableBorder = exports.akEditorSwoopCubicBezier = exports.akEditorSubtleAccent = exports.akEditorStickyHeaderZIndex = exports.akEditorSmallZIndex = exports.akEditorShadowZIndex = exports.akEditorSelectedNodeClassName = exports.akEditorSelectedIconColor = exports.akEditorSelectedBoxShadow = exports.akEditorSelectedBorderSize = exports.akEditorSelectedBorderColor = exports.akEditorSelectedBorderBoldSize = exports.akEditorSelectedBorder = exports.akEditorSelectedBlanketOpacity = exports.akEditorSelectedBlanketColor = exports.akEditorSelectedBgColor = exports.akEditorRuleBorderRadius = exports.akEditorRuleBackground = exports.akEditorPrimaryButton = exports.akEditorPopupText = exports.akEditorPopupBackground = exports.akEditorMobileMaxWidth = exports.akEditorMobileBreakoutPoint = exports.akEditorMenuZIndex = exports.akEditorMentionSelected = exports.akEditorMediaResizeHandlerPaddingWide = exports.akEditorMediaResizeHandlerPadding = exports.akEditorLineHeight = exports.akEditorInactiveForeground = exports.akEditorGutterPadding = exports.akEditorGridLineZIndex = exports.akEditorFullWidthLayoutWidth = exports.akEditorFullWidthLayoutLineLength = exports.akEditorFullPageMaxWidth = exports.akEditorFullPageDefaultFontSize = exports.akEditorFocus = exports.akEditorFloatingPanelZIndex = exports.akEditorFloatingOverlapPanelZIndex = exports.akEditorFloatingDialogZIndex = exports.akEditorDropdownActiveBackground = exports.akEditorDeleteIconColor = exports.akEditorDeleteBorder = exports.akEditorDeleteBackgroundWithOpacity = exports.akEditorDeleteBackgroundShaded = exports.akEditorDeleteBackground = exports.akEditorDefaultLayoutWidth = exports.akEditorCustomIconSize = exports.akEditorContextPanelWidth = exports.akEditorCodeInlinePadding = exports.akEditorCodeFontFamily = exports.akEditorCodeBlockPadding = exports.akEditorCodeBackground = exports.akEditorBreakoutPadding = exports.akEditorBlockquoteBorderColor = exports.akEditorActiveForeground = exports.akEditorActiveBackground = exports.VIEWPORT_SIZES = exports.DEFAULT_EMBED_CARD_WIDTH = exports.DEFAULT_EMBED_CARD_HEIGHT = exports.ATLASSIAN_NAVIGATION_HEIGHT = void 0;
9
8
  exports.getTableCellBackgroundDarkModeColorCSS = getTableCellBackgroundDarkModeColorCSS;
10
9
  exports.relativeSize = exports.relativeFontSizeToBase16 = exports.gridMediumMaxWidth = exports.getTableCellBackgroundDarkModeColors = void 0;
11
-
12
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
-
14
11
  var _colors = require("@atlaskit/theme/colors");
15
-
16
12
  var _constants = require("@atlaskit/theme/constants");
17
-
18
13
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
14
+
19
15
  var akEditorFullPageDefaultFontSize = 16;
20
16
  exports.akEditorFullPageDefaultFontSize = akEditorFullPageDefaultFontSize;
21
17
  var akEditorCodeFontFamily = (0, _constants.codeFontFamily)();
@@ -51,7 +47,6 @@ exports.akEditorDeleteBackground = akEditorDeleteBackground;
51
47
  var akEditorDeleteBackgroundShaded = _colors.R50;
52
48
  exports.akEditorDeleteBackgroundShaded = akEditorDeleteBackgroundShaded;
53
49
  var akEditorDeleteBackgroundWithOpacity = 'rgba(255, 189, 173, 0.5)'; // R75 with 50% opacity
54
-
55
50
  exports.akEditorDeleteBackgroundWithOpacity = akEditorDeleteBackgroundWithOpacity;
56
51
  var akEditorDeleteBorder = _colors.R300;
57
52
  exports.akEditorDeleteBorder = akEditorDeleteBorder;
@@ -82,26 +77,21 @@ exports.akEditorUnitZIndex = akEditorUnitZIndex;
82
77
  var akEditorShadowZIndex = 2;
83
78
  exports.akEditorShadowZIndex = akEditorShadowZIndex;
84
79
  var akEditorStickyHeaderZIndex = 11; // filmstrip uses 10 for its shadow
85
-
86
80
  exports.akEditorStickyHeaderZIndex = akEditorStickyHeaderZIndex;
87
81
  var akEditorSmallZIndex = akEditorStickyHeaderZIndex + 1;
88
82
  exports.akEditorSmallZIndex = akEditorSmallZIndex;
89
- var akEditorGridLineZIndex = 9999; // z-index for main menu bar -
83
+ var akEditorGridLineZIndex = 9999;
84
+ // z-index for main menu bar -
90
85
  // this is highest as it should be above anything else in editor below.
91
-
92
86
  exports.akEditorGridLineZIndex = akEditorGridLineZIndex;
93
-
94
- var akEditorMenuZIndex = _constants.layers.blanket(); // z-index used for floating toolbars like code block, table etc
95
-
96
-
87
+ var akEditorMenuZIndex = _constants.layers.blanket();
88
+ // z-index used for floating toolbars like code block, table etc
97
89
  exports.akEditorMenuZIndex = akEditorMenuZIndex;
98
-
99
- var akEditorFloatingPanelZIndex = _constants.layers.layer(); // z-index used for pickers (date, emoji, mentions) and type-aheads, hyperlinks
100
-
101
-
90
+ var akEditorFloatingPanelZIndex = _constants.layers.layer();
91
+ // z-index used for pickers (date, emoji, mentions) and type-aheads, hyperlinks
102
92
  exports.akEditorFloatingPanelZIndex = akEditorFloatingPanelZIndex;
103
- var akEditorFloatingDialogZIndex = akEditorMenuZIndex + 10; // z-index used for floating toolbars table cell menu which are above block toolbars
104
-
93
+ var akEditorFloatingDialogZIndex = akEditorMenuZIndex + 10;
94
+ // z-index used for floating toolbars table cell menu which are above block toolbars
105
95
  exports.akEditorFloatingDialogZIndex = akEditorFloatingDialogZIndex;
106
96
  var akEditorFloatingOverlapPanelZIndex = akEditorFloatingPanelZIndex + 5;
107
97
  exports.akEditorFloatingOverlapPanelZIndex = akEditorFloatingOverlapPanelZIndex;
@@ -179,8 +169,9 @@ var akEditorRuleBorderRadius = '1px';
179
169
  exports.akEditorRuleBorderRadius = akEditorRuleBorderRadius;
180
170
  var akEditorToolbarKeylineHeight = 2;
181
171
  exports.akEditorToolbarKeylineHeight = akEditorToolbarKeylineHeight;
182
- var akEditorContextPanelWidth = 320; // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
172
+ var akEditorContextPanelWidth = 320;
183
173
 
174
+ // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
184
175
  exports.akEditorContextPanelWidth = akEditorContextPanelWidth;
185
176
  var blockNodesVerticalMargin = '0.75rem';
186
177
  exports.blockNodesVerticalMargin = blockNodesVerticalMargin;
@@ -192,14 +183,11 @@ var ATLASSIAN_NAVIGATION_HEIGHT = '56px';
192
183
  exports.ATLASSIAN_NAVIGATION_HEIGHT = ATLASSIAN_NAVIGATION_HEIGHT;
193
184
  var akEditorSelectedNodeClassName = 'ak-editor-selected-node';
194
185
  exports.akEditorSelectedNodeClassName = akEditorSelectedNodeClassName;
195
-
196
186
  var editorFontSize = function editorFontSize(_ref) {
197
187
  var theme = _ref.theme;
198
188
  return theme && theme.baseFontSize ? theme.baseFontSize : (0, _constants.fontSize)();
199
189
  };
200
-
201
190
  exports.editorFontSize = editorFontSize;
202
-
203
191
  var relativeSize = function relativeSize(multiplier) {
204
192
  return function (_ref2) {
205
193
  var theme = _ref2.theme;
@@ -208,21 +196,16 @@ var relativeSize = function relativeSize(multiplier) {
208
196
  }) * multiplier;
209
197
  };
210
198
  };
211
-
212
199
  exports.relativeSize = relativeSize;
213
-
214
200
  var relativeFontSizeToBase16 = function relativeFontSizeToBase16(px) {
215
201
  if (typeof px === 'string') {
216
202
  px = parseInt(px);
217
203
  }
218
-
219
204
  if (isNaN(px)) {
220
205
  throw new Error("Invalid font size: '".concat(px, "'"));
221
206
  }
222
-
223
207
  return "".concat(px / 16, "rem");
224
208
  };
225
-
226
209
  exports.relativeFontSizeToBase16 = relativeFontSizeToBase16;
227
210
  var VIEWPORT_SIZES = {
228
211
  laptopHiDPI: {
@@ -253,20 +236,19 @@ var VIEWPORT_SIZES = {
253
236
  width: 320,
254
237
  height: 568
255
238
  }
256
- }; // to be updated in ED-10790: this should be variable threshold based on how many buttons enabled on main toolbar
239
+ };
257
240
 
241
+ // to be updated in ED-10790: this should be variable threshold based on how many buttons enabled on main toolbar
258
242
  exports.VIEWPORT_SIZES = VIEWPORT_SIZES;
259
243
  var akEditorMobileMaxWidth = 0;
260
244
  exports.akEditorMobileMaxWidth = akEditorMobileMaxWidth;
261
245
  var getTableCellBackgroundDarkModeColors = [['White', '#000000'], ['Light blue', '#0C294F'], ['Light teal', '#0C343B'], ['Light green', '#052E21'], ['Light yellow', '#484123'], ['Light red', '#441C13'], ['Light purple', '#282249'], ['Light gray', '#202328'], ['Blue', '#0B3165'], ['Teal', '#044853'], ['Green', '#053927'], ['Yellow', '#6F5C25'], ['Red', '#582013'], ['Purple', '#3E327B'], ['Gray', '#475262'], ['Dark blue', '#003884'], ['Dark teal', '#055866'], ['Dark green', '#044932'], ['Dark yellow', '#82641C'], ['Dark red', '#6B2A19'], ['Dark purple', '#4D38B2']].map(function (_ref3) {
262
246
  var _ref4 = (0, _slicedToArray2.default)(_ref3, 2),
263
- colorName = _ref4[0],
264
- colorValue = _ref4[1];
265
-
247
+ colorName = _ref4[0],
248
+ colorValue = _ref4[1];
266
249
  return getTableCellBackgroundDarkModeColorCSS(colorName, colorValue);
267
250
  }).join('\n');
268
251
  exports.getTableCellBackgroundDarkModeColors = getTableCellBackgroundDarkModeColors;
269
-
270
252
  function getTableCellBackgroundDarkModeColorCSS(colorName, colorValue) {
271
253
  return "\n &[colorname=\"".concat(colorName, "\"] {\n background-color: ").concat(colorValue, " !important; // !important to override default style color\n }\n ");
272
254
  }
@@ -531,5 +531,4 @@ Object.defineProperty(exports, "relativeSize", {
531
531
  return _consts.relativeSize;
532
532
  }
533
533
  });
534
-
535
534
  var _consts = require("./consts");
package/dist/cjs/index.js CHANGED
@@ -549,9 +549,6 @@ Object.defineProperty(exports, "relativeSize", {
549
549
  return _consts.relativeSize;
550
550
  }
551
551
  });
552
-
553
552
  var _consts = require("./consts");
554
-
555
553
  var _selection = require("./selection");
556
-
557
554
  var _overflowShadow = require("./overflow-shadow");
@@ -9,5 +9,4 @@ Object.defineProperty(exports, "overflowShadow", {
9
9
  return _overflowShadow.overflowShadow;
10
10
  }
11
11
  });
12
-
13
12
  var _overflowShadow = require("./overflow-shadow");
@@ -1,29 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.overflowShadow = void 0;
9
-
10
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
-
12
9
  var _react = require("@emotion/react");
13
-
14
10
  var _constants = require("@atlaskit/theme/constants");
15
-
16
11
  var _templateObject;
17
-
18
12
  var overflowShadow = function overflowShadow(_ref) {
19
13
  var background = _ref.background,
20
- _ref$width = _ref.width,
21
- width = _ref$width === void 0 ? "".concat((0, _constants.gridSize)(), "px") : _ref$width,
22
- leftCoverWidth = _ref.leftCoverWidth,
23
- rightCoverWidth = _ref.rightCoverWidth;
14
+ _ref$width = _ref.width,
15
+ width = _ref$width === void 0 ? "".concat((0, _constants.gridSize)(), "px") : _ref$width,
16
+ leftCoverWidth = _ref.leftCoverWidth,
17
+ rightCoverWidth = _ref.rightCoverWidth;
24
18
  var leftCoverWidthResolved = leftCoverWidth || width;
25
19
  var rightCoverWidthResolved = rightCoverWidth || width;
26
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n/* shadow cover left */\n linear-gradient(\n to right,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover background left */\n linear-gradient(\n to right,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover right */\n linear-gradient(\n to left,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover background right */\n linear-gradient(\n to left,\n ", " ", ",\n transparent ", "\n ),\n/* overflow shadow right spread */\n linear-gradient(\n to left,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow right perimeter */\n linear-gradient(\n to left,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow left spread */\n linear-gradient(\n to right,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow left perimeter */\n linear-gradient(\n to right,\n ", " 0,\n ", " ", "\n )\n"])), background, leftCoverWidthResolved, leftCoverWidthResolved, "var(--ds-surface-raised, transparent)", leftCoverWidthResolved, leftCoverWidthResolved, background, rightCoverWidthResolved, rightCoverWidthResolved, "var(--ds-surface-raised, transparent)", rightCoverWidthResolved, rightCoverWidthResolved, "var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))", "var(--ds-UNSAFE_util-transparent, rgba(99, 114, 130, 0))", width, "var(--ds-shadow-overflow-perimeter, transparent)", "var(--ds-UNSAFE_util-transparent, transparent)", width, "var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))", "var(--ds-UNSAFE_util-transparent, rgba(99, 114, 130, 0))", width, "var(--ds-shadow-overflow-perimeter, transparent)", "var(--ds-UNSAFE_util-transparent, transparent)", width);
20
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n/* shadow cover left */\n linear-gradient(\n to right,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover background left */\n linear-gradient(\n to right,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover right */\n linear-gradient(\n to left,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover background right */\n linear-gradient(\n to left,\n ", " ", ",\n transparent ", "\n ),\n/* overflow shadow right spread */\n linear-gradient(\n to left,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow right perimeter */\n linear-gradient(\n to left,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow left spread */\n linear-gradient(\n to right,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow left perimeter */\n linear-gradient(\n to right,\n ", " 0,\n ", " ", "\n )\n"])), background, leftCoverWidthResolved, leftCoverWidthResolved, "var(--ds-surface-raised, transparent)", leftCoverWidthResolved, leftCoverWidthResolved, background, rightCoverWidthResolved, rightCoverWidthResolved, "var(--ds-surface-raised, transparent)", rightCoverWidthResolved, rightCoverWidthResolved, "var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))", "var(--ds-UNSAFE-transparent, rgba(99, 114, 130, 0))", width, "var(--ds-shadow-overflow-perimeter, transparent)", "var(--ds-UNSAFE-transparent, transparent)", width, "var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))", "var(--ds-UNSAFE-transparent, rgba(99, 114, 130, 0))", width, "var(--ds-shadow-overflow-perimeter, transparent)", "var(--ds-UNSAFE-transparent, transparent)", width);
27
21
  };
28
-
29
22
  exports.overflowShadow = overflowShadow;
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.scrollbarStyles = void 0;
7
-
8
7
  var _constants = require("@atlaskit/theme/constants");
8
+ var akGridSize = (0, _constants.gridSize)() + 'px';
9
9
 
10
- var akGridSize = (0, _constants.gridSize)() + 'px'; // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
11
-
10
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
12
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");
13
12
  exports.scrollbarStyles = scrollbarStyles;
@@ -21,7 +21,5 @@ Object.defineProperty(exports, "hideNativeBrowserTextSelectionStyles", {
21
21
  return _utils.hideNativeBrowserTextSelectionStyles;
22
22
  }
23
23
  });
24
-
25
24
  var _types = require("./types");
26
-
27
25
  var _utils = require("./utils");
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.SelectionStyle = void 0;
7
-
8
7
  /**
9
8
  * These are generic selection styles for all nodes
10
9
  * If you have custom behaviour needed for a node, add that in the plugin's styles
@@ -12,7 +11,6 @@ exports.SelectionStyle = void 0;
12
11
  */
13
12
  var SelectionStyle;
14
13
  exports.SelectionStyle = SelectionStyle;
15
-
16
14
  (function (SelectionStyle) {
17
15
  SelectionStyle[SelectionStyle["Border"] = 0] = "Border";
18
16
  SelectionStyle[SelectionStyle["BoxShadow"] = 1] = "BoxShadow";
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.hideNativeBrowserTextSelectionStyles = exports.getSelectionStyles = void 0;
7
-
8
7
  var _consts = require("../consts");
9
-
10
8
  var _types = require("./types");
11
-
12
9
  /**
13
10
  * Adds correct selection styling for a node
14
11
  * Pass in which selection style properties you want and it will return css string of necessary styles
@@ -24,25 +21,19 @@ var getSelectionStyles = function getSelectionStyles(selectionStyles) {
24
21
  return getSelectionStyle(selectionStyle);
25
22
  }).concat(hideNativeBrowserTextSelectionStyles).join('\n');
26
23
  };
27
-
28
24
  exports.getSelectionStyles = getSelectionStyles;
29
25
  var hideNativeBrowserTextSelectionStyles = "\n ::selection,*::selection {\n background-color: transparent;\n }\n ::-moz-selection,*::-moz-selection {\n background-color: transparent;\n }\n";
30
26
  exports.hideNativeBrowserTextSelectionStyles = hideNativeBrowserTextSelectionStyles;
31
-
32
27
  var getSelectionStyle = function getSelectionStyle(style) {
33
28
  switch (style) {
34
29
  case _types.SelectionStyle.Border:
35
30
  return "\n border: ".concat(_consts.akEditorSelectedBorder, ";\n\n // Fixes ED-15246: Trello card is visible through a border of a table border\n &::after {\n height: 100%;\n content: '\\00a0';\n background: ").concat(_consts.akEditorSelectedBorderColor, ";\n position: absolute;\n right: -1px;\n top: 0;\n bottom: 0;\n width: 1px;\n border: none;\n display: inline-block;\n }\n ");
36
-
37
31
  case _types.SelectionStyle.BoxShadow:
38
32
  return "\n box-shadow: ".concat(_consts.akEditorSelectedBoxShadow, ";\n border-color: transparent;\n ");
39
-
40
33
  case _types.SelectionStyle.Background:
41
34
  return "background-color: ".concat("var(--ds-background-selected, ".concat(_consts.akEditorSelectedBgColor, ")"), ";");
42
-
43
35
  case _types.SelectionStyle.Blanket:
44
36
  return "\n position: relative;\n\n // Fixes ED-9263, where emoji or inline card in panel makes selection go outside the panel\n // in Safari. Looks like it's caused by user-select: all in the emoji element\n -webkit-user-select: text;\n\n ::before {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n z-index: ".concat(_consts.akEditorSmallZIndex, ";\n background-color: ", "var(--ds-blanket-selected, #B3D4FF4C)", "\n }");
45
-
46
37
  default:
47
38
  return '';
48
39
  }
@@ -9,5 +9,4 @@ Object.defineProperty(exports, "shortcutStyle", {
9
9
  return _shortcut.shortcutStyle;
10
10
  }
11
11
  });
12
-
13
12
  var _shortcut = require("./shortcut");
@@ -1,23 +1,15 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.shortcutStyle = void 0;
9
-
10
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
-
12
9
  var _react = require("@emotion/react");
13
-
14
10
  var _colors = require("@atlaskit/theme/colors");
15
-
16
11
  var _constants = require("@atlaskit/theme/constants");
17
-
18
12
  var _consts = require("../consts");
19
-
20
13
  var _templateObject;
21
-
22
14
  var shortcutStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", "; /* N60 at 50% */\n color: ", ";\n border-radius: ", "px;\n padding: 4px;\n line-height: 12px;\n font-size: ", ";\n align-self: flex-end;\n @media (max-width: ", "px) {\n display: none;\n }\n"])), "var(--ds-background-neutral, rgba(223, 225, 229, 0.5))", "var(--ds-text-subtle, ".concat(_colors.N100, ")"), (0, _constants.borderRadius)(), (0, _consts.relativeFontSizeToBase16)(11.67), _consts.akEditorMobileMaxWidth);
23
15
  exports.shortcutStyle = shortcutStyle;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "sideEffects": false
5
5
  }
@@ -19,7 +19,6 @@ export const akEditorCodeInlinePadding = '2px 4px';
19
19
  export const akEditorDeleteBackground = R50;
20
20
  export const akEditorDeleteBackgroundShaded = R50;
21
21
  export const akEditorDeleteBackgroundWithOpacity = 'rgba(255, 189, 173, 0.5)'; // R75 with 50% opacity
22
-
23
22
  export const akEditorDeleteBorder = R300;
24
23
  export const akEditorDeleteIconColor = R400;
25
24
  export const akEditorCustomIconSize = 20;
@@ -35,17 +34,16 @@ export const akEditorSelectedBlanketOpacity = 0.3;
35
34
  export const akEditorUnitZIndex = 1;
36
35
  export const akEditorShadowZIndex = 2;
37
36
  export const akEditorStickyHeaderZIndex = 11; // filmstrip uses 10 for its shadow
38
-
39
37
  export const akEditorSmallZIndex = akEditorStickyHeaderZIndex + 1;
40
- export const akEditorGridLineZIndex = 9999; // z-index for main menu bar -
38
+ export const akEditorGridLineZIndex = 9999;
39
+ // z-index for main menu bar -
41
40
  // this is highest as it should be above anything else in editor below.
42
-
43
- export const akEditorMenuZIndex = layers.blanket(); // z-index used for floating toolbars like code block, table etc
44
-
45
- export const akEditorFloatingPanelZIndex = layers.layer(); // z-index used for pickers (date, emoji, mentions) and type-aheads, hyperlinks
46
-
47
- export const akEditorFloatingDialogZIndex = akEditorMenuZIndex + 10; // z-index used for floating toolbars table cell menu which are above block toolbars
48
-
41
+ export const akEditorMenuZIndex = layers.blanket();
42
+ // z-index used for floating toolbars like code block, table etc
43
+ export const akEditorFloatingPanelZIndex = layers.layer();
44
+ // z-index used for pickers (date, emoji, mentions) and type-aheads, hyperlinks
45
+ export const akEditorFloatingDialogZIndex = akEditorMenuZIndex + 10;
46
+ // z-index used for floating toolbars table cell menu which are above block toolbars
49
47
  export const akEditorFloatingOverlapPanelZIndex = akEditorFloatingPanelZIndex + 5;
50
48
  export const akEditorMentionSelected = N100;
51
49
  export const akEditorTableToolbarSize = 11;
@@ -84,8 +82,9 @@ export const akEditorLineHeight = 1.714;
84
82
  export const akEditorRuleBackground = N30;
85
83
  export const akEditorRuleBorderRadius = '1px';
86
84
  export const akEditorToolbarKeylineHeight = 2;
87
- export const akEditorContextPanelWidth = 320; // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
85
+ export const akEditorContextPanelWidth = 320;
88
86
 
87
+ // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
89
88
  export const blockNodesVerticalMargin = '0.75rem';
90
89
  export const DEFAULT_EMBED_CARD_WIDTH = 680;
91
90
  export const DEFAULT_EMBED_CARD_HEIGHT = 480;
@@ -103,11 +102,9 @@ export const relativeFontSizeToBase16 = px => {
103
102
  if (typeof px === 'string') {
104
103
  px = parseInt(px);
105
104
  }
106
-
107
105
  if (isNaN(px)) {
108
106
  throw new Error(`Invalid font size: '${px}'`);
109
107
  }
110
-
111
108
  return `${px / 16}rem`;
112
109
  };
113
110
  export const VIEWPORT_SIZES = {
@@ -139,8 +136,9 @@ export const VIEWPORT_SIZES = {
139
136
  width: 320,
140
137
  height: 568
141
138
  }
142
- }; // to be updated in ED-10790: this should be variable threshold based on how many buttons enabled on main toolbar
139
+ };
143
140
 
141
+ // to be updated in ED-10790: this should be variable threshold based on how many buttons enabled on main toolbar
144
142
  export const akEditorMobileMaxWidth = 0;
145
143
  export const getTableCellBackgroundDarkModeColors = [['White', '#000000'], ['Light blue', '#0C294F'], ['Light teal', '#0C343B'], ['Light green', '#052E21'], ['Light yellow', '#484123'], ['Light red', '#441C13'], ['Light purple', '#282249'], ['Light gray', '#202328'], ['Blue', '#0B3165'], ['Teal', '#044853'], ['Green', '#053927'], ['Yellow', '#6F5C25'], ['Red', '#582013'], ['Purple', '#3E327B'], ['Gray', '#475262'], ['Dark blue', '#003884'], ['Dark teal', '#055866'], ['Dark green', '#044932'], ['Dark yellow', '#82641C'], ['Dark red', '#6B2A19'], ['Dark purple', '#4D38B2']].map(([colorName, colorValue]) => getTableCellBackgroundDarkModeColorCSS(colorName, colorValue)).join('\n');
146
144
  export function getTableCellBackgroundDarkModeColorCSS(colorName, colorValue) {
@@ -38,25 +38,25 @@ export const overflowShadow = ({
38
38
  linear-gradient(
39
39
  to left,
40
40
  ${"var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))"} 0,
41
- ${"var(--ds-UNSAFE_util-transparent, rgba(99, 114, 130, 0))"} ${width}
41
+ ${"var(--ds-UNSAFE-transparent, rgba(99, 114, 130, 0))"} ${width}
42
42
  ),
43
43
  /* overflow shadow right perimeter */
44
44
  linear-gradient(
45
45
  to left,
46
46
  ${"var(--ds-shadow-overflow-perimeter, transparent)"} 0,
47
- ${"var(--ds-UNSAFE_util-transparent, transparent)"} ${width}
47
+ ${"var(--ds-UNSAFE-transparent, transparent)"} ${width}
48
48
  ),
49
49
  /* overflow shadow left spread */
50
50
  linear-gradient(
51
51
  to right,
52
52
  ${"var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))"} 0,
53
- ${"var(--ds-UNSAFE_util-transparent, rgba(99, 114, 130, 0))"} ${width}
53
+ ${"var(--ds-UNSAFE-transparent, rgba(99, 114, 130, 0))"} ${width}
54
54
  ),
55
55
  /* overflow shadow left perimeter */
56
56
  linear-gradient(
57
57
  to right,
58
58
  ${"var(--ds-shadow-overflow-perimeter, transparent)"} 0,
59
- ${"var(--ds-UNSAFE_util-transparent, transparent)"} ${width}
59
+ ${"var(--ds-UNSAFE-transparent, transparent)"} ${width}
60
60
  )
61
61
  `;
62
62
  };
@@ -1,6 +1,7 @@
1
1
  import { gridSize } from '@atlaskit/theme/constants';
2
- const akGridSize = gridSize() + 'px'; // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
2
+ const akGridSize = gridSize() + 'px';
3
3
 
4
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
4
5
  export const scrollbarStyles = `
5
6
  -ms-overflow-style: -ms-autohiding-scrollbar;
6
7
 
@@ -4,7 +4,6 @@
4
4
  * file in editor-core
5
5
  */
6
6
  export let SelectionStyle;
7
-
8
7
  (function (SelectionStyle) {
9
8
  SelectionStyle[SelectionStyle["Border"] = 0] = "Border";
10
9
  SelectionStyle[SelectionStyle["BoxShadow"] = 1] = "BoxShadow";
@@ -1,5 +1,6 @@
1
1
  import { akEditorSelectedBgColor, akEditorSelectedBorder, akEditorSelectedBorderColor, akEditorSelectedBoxShadow, akEditorSmallZIndex } from '../consts';
2
2
  import { SelectionStyle } from './types';
3
+
3
4
  /**
4
5
  * Adds correct selection styling for a node
5
6
  * Pass in which selection style properties you want and it will return css string of necessary styles
@@ -10,7 +11,6 @@ import { SelectionStyle } from './types';
10
11
  * }
11
12
  *
12
13
  */
13
-
14
14
  export const getSelectionStyles = selectionStyles => selectionStyles.map(selectionStyle => getSelectionStyle(selectionStyle)).concat(hideNativeBrowserTextSelectionStyles).join('\n');
15
15
  export const hideNativeBrowserTextSelectionStyles = `
16
16
  ::selection,*::selection {
@@ -20,7 +20,6 @@ export const hideNativeBrowserTextSelectionStyles = `
20
20
  background-color: transparent;
21
21
  }
22
22
  `;
23
-
24
23
  const getSelectionStyle = style => {
25
24
  switch (style) {
26
25
  case SelectionStyle.Border:
@@ -41,16 +40,13 @@ const getSelectionStyle = style => {
41
40
  display: inline-block;
42
41
  }
43
42
  `;
44
-
45
43
  case SelectionStyle.BoxShadow:
46
44
  return `
47
45
  box-shadow: ${akEditorSelectedBoxShadow};
48
46
  border-color: transparent;
49
47
  `;
50
-
51
48
  case SelectionStyle.Background:
52
49
  return `background-color: ${`var(--ds-background-selected, ${akEditorSelectedBgColor})`};`;
53
-
54
50
  case SelectionStyle.Blanket:
55
51
  return `
56
52
  position: relative;
@@ -71,7 +67,6 @@ const getSelectionStyle = style => {
71
67
  z-index: ${akEditorSmallZIndex};
72
68
  background-color: ${"var(--ds-blanket-selected, #B3D4FF4C)"}
73
69
  }`;
74
-
75
70
  default:
76
71
  return '';
77
72
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,4 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
-
3
2
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
4
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';
5
4
  import { codeFontFamily, fontSize as defaultFontSize, gridSize, layers } from '@atlaskit/theme/constants';
@@ -21,7 +20,6 @@ export var akEditorCodeInlinePadding = '2px 4px';
21
20
  export var akEditorDeleteBackground = R50;
22
21
  export var akEditorDeleteBackgroundShaded = R50;
23
22
  export var akEditorDeleteBackgroundWithOpacity = 'rgba(255, 189, 173, 0.5)'; // R75 with 50% opacity
24
-
25
23
  export var akEditorDeleteBorder = R300;
26
24
  export var akEditorDeleteIconColor = R400;
27
25
  export var akEditorCustomIconSize = 20;
@@ -37,17 +35,16 @@ export var akEditorSelectedBlanketOpacity = 0.3;
37
35
  export var akEditorUnitZIndex = 1;
38
36
  export var akEditorShadowZIndex = 2;
39
37
  export var akEditorStickyHeaderZIndex = 11; // filmstrip uses 10 for its shadow
40
-
41
38
  export var akEditorSmallZIndex = akEditorStickyHeaderZIndex + 1;
42
- export var akEditorGridLineZIndex = 9999; // z-index for main menu bar -
39
+ export var akEditorGridLineZIndex = 9999;
40
+ // z-index for main menu bar -
43
41
  // this is highest as it should be above anything else in editor below.
44
-
45
- export var akEditorMenuZIndex = layers.blanket(); // z-index used for floating toolbars like code block, table etc
46
-
47
- export var akEditorFloatingPanelZIndex = layers.layer(); // z-index used for pickers (date, emoji, mentions) and type-aheads, hyperlinks
48
-
49
- export var akEditorFloatingDialogZIndex = akEditorMenuZIndex + 10; // z-index used for floating toolbars table cell menu which are above block toolbars
50
-
42
+ export var akEditorMenuZIndex = layers.blanket();
43
+ // z-index used for floating toolbars like code block, table etc
44
+ export var akEditorFloatingPanelZIndex = layers.layer();
45
+ // z-index used for pickers (date, emoji, mentions) and type-aheads, hyperlinks
46
+ export var akEditorFloatingDialogZIndex = akEditorMenuZIndex + 10;
47
+ // z-index used for floating toolbars table cell menu which are above block toolbars
51
48
  export var akEditorFloatingOverlapPanelZIndex = akEditorFloatingPanelZIndex + 5;
52
49
  export var akEditorMentionSelected = N100;
53
50
  export var akEditorTableToolbarSize = 11;
@@ -86,8 +83,9 @@ export var akEditorLineHeight = 1.714;
86
83
  export var akEditorRuleBackground = N30;
87
84
  export var akEditorRuleBorderRadius = '1px';
88
85
  export var akEditorToolbarKeylineHeight = 2;
89
- export var akEditorContextPanelWidth = 320; // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
86
+ export var akEditorContextPanelWidth = 320;
90
87
 
88
+ // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
91
89
  export var blockNodesVerticalMargin = '0.75rem';
92
90
  export var DEFAULT_EMBED_CARD_WIDTH = 680;
93
91
  export var DEFAULT_EMBED_CARD_HEIGHT = 480;
@@ -109,11 +107,9 @@ export var relativeFontSizeToBase16 = function relativeFontSizeToBase16(px) {
109
107
  if (typeof px === 'string') {
110
108
  px = parseInt(px);
111
109
  }
112
-
113
110
  if (isNaN(px)) {
114
111
  throw new Error("Invalid font size: '".concat(px, "'"));
115
112
  }
116
-
117
113
  return "".concat(px / 16, "rem");
118
114
  };
119
115
  export var VIEWPORT_SIZES = {
@@ -145,14 +141,14 @@ export var VIEWPORT_SIZES = {
145
141
  width: 320,
146
142
  height: 568
147
143
  }
148
- }; // to be updated in ED-10790: this should be variable threshold based on how many buttons enabled on main toolbar
144
+ };
149
145
 
146
+ // to be updated in ED-10790: this should be variable threshold based on how many buttons enabled on main toolbar
150
147
  export var akEditorMobileMaxWidth = 0;
151
148
  export var getTableCellBackgroundDarkModeColors = [['White', '#000000'], ['Light blue', '#0C294F'], ['Light teal', '#0C343B'], ['Light green', '#052E21'], ['Light yellow', '#484123'], ['Light red', '#441C13'], ['Light purple', '#282249'], ['Light gray', '#202328'], ['Blue', '#0B3165'], ['Teal', '#044853'], ['Green', '#053927'], ['Yellow', '#6F5C25'], ['Red', '#582013'], ['Purple', '#3E327B'], ['Gray', '#475262'], ['Dark blue', '#003884'], ['Dark teal', '#055866'], ['Dark green', '#044932'], ['Dark yellow', '#82641C'], ['Dark red', '#6B2A19'], ['Dark purple', '#4D38B2']].map(function (_ref3) {
152
149
  var _ref4 = _slicedToArray(_ref3, 2),
153
- colorName = _ref4[0],
154
- colorValue = _ref4[1];
155
-
150
+ colorName = _ref4[0],
151
+ colorValue = _ref4[1];
156
152
  return getTableCellBackgroundDarkModeColorCSS(colorName, colorValue);
157
153
  }).join('\n');
158
154
  export function getTableCellBackgroundDarkModeColorCSS(colorName, colorValue) {
@@ -1,17 +1,15 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
6
4
  import { css } from '@emotion/react';
7
5
  import { gridSize } from '@atlaskit/theme/constants';
8
6
  export var overflowShadow = function overflowShadow(_ref) {
9
7
  var background = _ref.background,
10
- _ref$width = _ref.width,
11
- width = _ref$width === void 0 ? "".concat(gridSize(), "px") : _ref$width,
12
- leftCoverWidth = _ref.leftCoverWidth,
13
- rightCoverWidth = _ref.rightCoverWidth;
8
+ _ref$width = _ref.width,
9
+ width = _ref$width === void 0 ? "".concat(gridSize(), "px") : _ref$width,
10
+ leftCoverWidth = _ref.leftCoverWidth,
11
+ rightCoverWidth = _ref.rightCoverWidth;
14
12
  var leftCoverWidthResolved = leftCoverWidth || width;
15
13
  var rightCoverWidthResolved = rightCoverWidth || width;
16
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n/* shadow cover left */\n linear-gradient(\n to right,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover background left */\n linear-gradient(\n to right,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover right */\n linear-gradient(\n to left,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover background right */\n linear-gradient(\n to left,\n ", " ", ",\n transparent ", "\n ),\n/* overflow shadow right spread */\n linear-gradient(\n to left,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow right perimeter */\n linear-gradient(\n to left,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow left spread */\n linear-gradient(\n to right,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow left perimeter */\n linear-gradient(\n to right,\n ", " 0,\n ", " ", "\n )\n"])), background, leftCoverWidthResolved, leftCoverWidthResolved, "var(--ds-surface-raised, transparent)", leftCoverWidthResolved, leftCoverWidthResolved, background, rightCoverWidthResolved, rightCoverWidthResolved, "var(--ds-surface-raised, transparent)", rightCoverWidthResolved, rightCoverWidthResolved, "var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))", "var(--ds-UNSAFE_util-transparent, rgba(99, 114, 130, 0))", width, "var(--ds-shadow-overflow-perimeter, transparent)", "var(--ds-UNSAFE_util-transparent, transparent)", width, "var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))", "var(--ds-UNSAFE_util-transparent, rgba(99, 114, 130, 0))", width, "var(--ds-shadow-overflow-perimeter, transparent)", "var(--ds-UNSAFE_util-transparent, transparent)", width);
14
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n/* shadow cover left */\n linear-gradient(\n to right,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover background left */\n linear-gradient(\n to right,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover right */\n linear-gradient(\n to left,\n ", " ", ",\n transparent ", "\n ),\n/* shadow cover background right */\n linear-gradient(\n to left,\n ", " ", ",\n transparent ", "\n ),\n/* overflow shadow right spread */\n linear-gradient(\n to left,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow right perimeter */\n linear-gradient(\n to left,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow left spread */\n linear-gradient(\n to right,\n ", " 0,\n ", " ", "\n ),\n /* overflow shadow left perimeter */\n linear-gradient(\n to right,\n ", " 0,\n ", " ", "\n )\n"])), background, leftCoverWidthResolved, leftCoverWidthResolved, "var(--ds-surface-raised, transparent)", leftCoverWidthResolved, leftCoverWidthResolved, background, rightCoverWidthResolved, rightCoverWidthResolved, "var(--ds-surface-raised, transparent)", rightCoverWidthResolved, rightCoverWidthResolved, "var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))", "var(--ds-UNSAFE-transparent, rgba(99, 114, 130, 0))", width, "var(--ds-shadow-overflow-perimeter, transparent)", "var(--ds-UNSAFE-transparent, transparent)", width, "var(--ds-shadow-overflow-spread, rgba(9, 30, 66, 0.13))", "var(--ds-UNSAFE-transparent, rgba(99, 114, 130, 0))", width, "var(--ds-shadow-overflow-perimeter, transparent)", "var(--ds-UNSAFE-transparent, transparent)", width);
17
15
  };
@@ -1,4 +1,5 @@
1
1
  import { gridSize } from '@atlaskit/theme/constants';
2
- var akGridSize = gridSize() + 'px'; // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
2
+ var akGridSize = gridSize() + 'px';
3
3
 
4
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
4
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");
@@ -4,7 +4,6 @@
4
4
  * file in editor-core
5
5
  */
6
6
  export var SelectionStyle;
7
-
8
7
  (function (SelectionStyle) {
9
8
  SelectionStyle[SelectionStyle["Border"] = 0] = "Border";
10
9
  SelectionStyle[SelectionStyle["BoxShadow"] = 1] = "BoxShadow";
@@ -1,5 +1,6 @@
1
1
  import { akEditorSelectedBgColor, akEditorSelectedBorder, akEditorSelectedBorderColor, akEditorSelectedBoxShadow, akEditorSmallZIndex } from '../consts';
2
2
  import { SelectionStyle } from './types';
3
+
3
4
  /**
4
5
  * Adds correct selection styling for a node
5
6
  * Pass in which selection style properties you want and it will return css string of necessary styles
@@ -10,28 +11,22 @@ import { SelectionStyle } from './types';
10
11
  * }
11
12
  *
12
13
  */
13
-
14
14
  export var getSelectionStyles = function getSelectionStyles(selectionStyles) {
15
15
  return selectionStyles.map(function (selectionStyle) {
16
16
  return getSelectionStyle(selectionStyle);
17
17
  }).concat(hideNativeBrowserTextSelectionStyles).join('\n');
18
18
  };
19
19
  export var hideNativeBrowserTextSelectionStyles = "\n ::selection,*::selection {\n background-color: transparent;\n }\n ::-moz-selection,*::-moz-selection {\n background-color: transparent;\n }\n";
20
-
21
20
  var getSelectionStyle = function getSelectionStyle(style) {
22
21
  switch (style) {
23
22
  case SelectionStyle.Border:
24
23
  return "\n border: ".concat(akEditorSelectedBorder, ";\n\n // Fixes ED-15246: Trello card is visible through a border of a table border\n &::after {\n height: 100%;\n content: '\\00a0';\n background: ").concat(akEditorSelectedBorderColor, ";\n position: absolute;\n right: -1px;\n top: 0;\n bottom: 0;\n width: 1px;\n border: none;\n display: inline-block;\n }\n ");
25
-
26
24
  case SelectionStyle.BoxShadow:
27
25
  return "\n box-shadow: ".concat(akEditorSelectedBoxShadow, ";\n border-color: transparent;\n ");
28
-
29
26
  case SelectionStyle.Background:
30
27
  return "background-color: ".concat("var(--ds-background-selected, ".concat(akEditorSelectedBgColor, ")"), ";");
31
-
32
28
  case SelectionStyle.Blanket:
33
29
  return "\n position: relative;\n\n // Fixes ED-9263, where emoji or inline card in panel makes selection go outside the panel\n // in Safari. Looks like it's caused by user-select: all in the emoji element\n -webkit-user-select: text;\n\n ::before {\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n z-index: ".concat(akEditorSmallZIndex, ";\n background-color: ", "var(--ds-blanket-selected, #B3D4FF4C)", "\n }");
34
-
35
30
  default:
36
31
  return '';
37
32
  }
@@ -1,7 +1,5 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
-
3
2
  var _templateObject;
4
-
5
3
  import { css } from '@emotion/react';
6
4
  import { N100 } from '@atlaskit/theme/colors';
7
5
  import { borderRadius } from '@atlaskit/theme/constants';
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Style values used in the editor/renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@atlaskit/theme": "^12.2.0",
31
- "@atlaskit/tokens": "^0.13.0",
31
+ "@atlaskit/tokens": "^1.0.0",
32
32
  "@babel/runtime": "^7.0.0",
33
33
  "@emotion/react": "^11.7.1"
34
34
  },
package/report.api.md CHANGED
@@ -8,6 +8,7 @@
8
8
  ### Table of contents
9
9
 
10
10
  - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
11
12
 
12
13
  ### Main Entry Types
13
14
 
@@ -351,3 +352,13 @@ export const VIEWPORT_SIZES: {
351
352
  ```
352
353
 
353
354
  <!--SECTION END: Main Entry Types-->
355
+
356
+ ### Peer Dependencies
357
+
358
+ <!--SECTION START: Peer Dependencies-->
359
+
360
+ ```json
361
+ {}
362
+ ```
363
+
364
+ <!--SECTION END: Peer Dependencies-->
@@ -53,31 +53,25 @@ export const overflowShadow = ({
53
53
  linear-gradient(
54
54
  to left,
55
55
  ${token('elevation.shadow.overflow.spread', 'rgba(9, 30, 66, 0.13)')} 0,
56
- ${token(
57
- 'utility.UNSAFE_util.transparent',
58
- 'rgba(99, 114, 130, 0)',
59
- )} ${width}
56
+ ${token('utility.UNSAFE.transparent', 'rgba(99, 114, 130, 0)')} ${width}
60
57
  ),
61
58
  /* overflow shadow right perimeter */
62
59
  linear-gradient(
63
60
  to left,
64
61
  ${token('elevation.shadow.overflow.perimeter', 'transparent')} 0,
65
- ${token('utility.UNSAFE_util.transparent', 'transparent')} ${width}
62
+ ${token('utility.UNSAFE.transparent', 'transparent')} ${width}
66
63
  ),
67
64
  /* overflow shadow left spread */
68
65
  linear-gradient(
69
66
  to right,
70
67
  ${token('elevation.shadow.overflow.spread', 'rgba(9, 30, 66, 0.13)')} 0,
71
- ${token(
72
- 'utility.UNSAFE_util.transparent',
73
- 'rgba(99, 114, 130, 0)',
74
- )} ${width}
68
+ ${token('utility.UNSAFE.transparent', 'rgba(99, 114, 130, 0)')} ${width}
75
69
  ),
76
70
  /* overflow shadow left perimeter */
77
71
  linear-gradient(
78
72
  to right,
79
73
  ${token('elevation.shadow.overflow.perimeter', 'transparent')} 0,
80
- ${token('utility.UNSAFE_util.transparent', 'transparent')} ${width}
74
+ ${token('utility.UNSAFE.transparent', 'transparent')} ${width}
81
75
  )
82
76
  `;
83
77
  };