@atlaskit/editor-shared-styles 2.1.5 → 2.2.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/editor-shared-styles
2
2
 
3
+ ## 2.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`73d9a2fa116`](https://bitbucket.org/atlassian/atlassian-frontend/commits/73d9a2fa116) - ED-15568 Restore table's FloatingContextualMenu, extract utils/UI components
8
+
3
9
  ## 2.1.5
4
10
 
5
11
  ### Patch Changes
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.scrollbarStyles = void 0;
7
+
8
+ var _constants = require("@atlaskit/theme/constants");
9
+
10
+ var _tokens = require("@atlaskit/tokens");
11
+
12
+ var akGridSize = (0, _constants.gridSize)() + 'px'; // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
13
+
14
+ 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: ").concat((0, _tokens.token)('color.background.neutral.subtle', 'rgba(0, 0, 0, 0)'), ";\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: ").concat((0, _tokens.token)('color.background.neutral.bold', 'rgba(0, 0, 0, 0.2)'), ";\n border-radius: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ").concat((0, _tokens.token)('color.background.neutral.bold.hovered', 'rgba(0, 0, 0, 0.4)'), ";\n }\n");
15
+ exports.scrollbarStyles = scrollbarStyles;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "shortcutStyle", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _shortcut.shortcutStyle;
10
+ }
11
+ });
12
+
13
+ var _shortcut = require("./shortcut");
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.shortcutStyle = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
11
+
12
+ var _react = require("@emotion/react");
13
+
14
+ var _colors = require("@atlaskit/theme/colors");
15
+
16
+ var _constants = require("@atlaskit/theme/constants");
17
+
18
+ var _tokens = require("@atlaskit/tokens");
19
+
20
+ var _consts = require("../consts");
21
+
22
+ var _templateObject;
23
+
24
+ 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"])), (0, _tokens.token)('color.background.neutral', 'rgba(223, 225, 229, 0.5)'), (0, _tokens.token)('color.text.subtle', _colors.N100), (0, _constants.borderRadius)(), (0, _consts.relativeFontSizeToBase16)(11.67), _consts.akEditorMobileMaxWidth);
25
+ exports.shortcutStyle = shortcutStyle;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.1.5",
3
+ "version": "2.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,29 @@
1
+ import { gridSize } from '@atlaskit/theme/constants';
2
+ import { token } from '@atlaskit/tokens';
3
+ const akGridSize = gridSize() + 'px'; // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
4
+
5
+ export const scrollbarStyles = `
6
+ -ms-overflow-style: -ms-autohiding-scrollbar;
7
+
8
+ &::-webkit-scrollbar {
9
+ height: ${akGridSize};
10
+ width: ${akGridSize};
11
+ }
12
+
13
+ &::-webkit-scrollbar-corner {
14
+ display: none;
15
+ }
16
+
17
+ &::-webkit-scrollbar-thumb {
18
+ background-color: ${token('color.background.neutral.subtle', 'rgba(0, 0, 0, 0)')};
19
+ }
20
+
21
+ &:hover::-webkit-scrollbar-thumb {
22
+ background-color: ${token('color.background.neutral.bold', 'rgba(0, 0, 0, 0.2)')};
23
+ border-radius: ${akGridSize};
24
+ }
25
+
26
+ &::-webkit-scrollbar-thumb:hover {
27
+ background-color: ${token('color.background.neutral.bold.hovered', 'rgba(0, 0, 0, 0.4)')};
28
+ }
29
+ `;
@@ -0,0 +1 @@
1
+ export { shortcutStyle } from './shortcut';
@@ -0,0 +1,17 @@
1
+ import { css } from '@emotion/react';
2
+ import { N100 } from '@atlaskit/theme/colors';
3
+ import { borderRadius } from '@atlaskit/theme/constants';
4
+ import { token } from '@atlaskit/tokens';
5
+ import { akEditorMobileMaxWidth, relativeFontSizeToBase16 } from '../consts';
6
+ export const shortcutStyle = css`
7
+ background-color: ${token('color.background.neutral', 'rgba(223, 225, 229, 0.5)')}; /* N60 at 50% */
8
+ color: ${token('color.text.subtle', N100)};
9
+ border-radius: ${borderRadius()}px;
10
+ padding: 4px;
11
+ line-height: 12px;
12
+ font-size: ${relativeFontSizeToBase16(11.67)};
13
+ align-self: flex-end;
14
+ @media (max-width: ${akEditorMobileMaxWidth}px) {
15
+ display: none;
16
+ }
17
+ `;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.1.5",
3
+ "version": "2.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,5 @@
1
+ import { gridSize } from '@atlaskit/theme/constants';
2
+ import { token } from '@atlaskit/tokens';
3
+ var akGridSize = gridSize() + 'px'; // 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: ").concat(token('color.background.neutral.subtle', 'rgba(0, 0, 0, 0)'), ";\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: ").concat(token('color.background.neutral.bold', 'rgba(0, 0, 0, 0.2)'), ";\n border-radius: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ").concat(token('color.background.neutral.bold.hovered', 'rgba(0, 0, 0, 0.4)'), ";\n }\n");
@@ -0,0 +1 @@
1
+ export { shortcutStyle } from './shortcut';
@@ -0,0 +1,10 @@
1
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
+
3
+ var _templateObject;
4
+
5
+ import { css } from '@emotion/react';
6
+ import { N100 } from '@atlaskit/theme/colors';
7
+ import { borderRadius } from '@atlaskit/theme/constants';
8
+ import { token } from '@atlaskit/tokens';
9
+ import { akEditorMobileMaxWidth, relativeFontSizeToBase16 } from '../consts';
10
+ export var shortcutStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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"])), token('color.background.neutral', 'rgba(223, 225, 229, 0.5)'), token('color.text.subtle', N100), borderRadius(), relativeFontSizeToBase16(11.67), akEditorMobileMaxWidth);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-shared-styles",
3
- "version": "2.1.5",
3
+ "version": "2.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1 @@
1
+ export declare const scrollbarStyles: string;
@@ -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.1.5",
3
+ "version": "2.2.0",
4
4
  "description": "Style values used in the editor/renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -22,6 +22,8 @@
22
22
  "af:exports": {
23
23
  "./consts": "./src/consts/index.ts",
24
24
  "./selection": "./src/selection/index.ts",
25
+ "./shortcut": "./src/shortcut/index.ts",
26
+ "./scrollbar": "./src/scrollbar-styles.ts",
25
27
  ".": "./src/index.ts"
26
28
  },
27
29
  "dependencies": {
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@atlaskit/editor-shared-styles/scrollbar",
3
+ "main": "../dist/cjs/scrollbar-styles.js",
4
+ "module": "../dist/esm/scrollbar-styles.js",
5
+ "module:es2019": "../dist/es2019/scrollbar-styles.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/scrollbar-styles.d.ts"
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@atlaskit/editor-shared-styles/shortcut",
3
+ "main": "../dist/cjs/shortcut/index.js",
4
+ "module": "../dist/esm/shortcut/index.js",
5
+ "module:es2019": "../dist/es2019/shortcut/index.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/shortcut/index.d.ts"
8
+ }
@@ -0,0 +1,40 @@
1
+ import { gridSize } from '@atlaskit/theme/constants';
2
+ import { token } from '@atlaskit/tokens';
3
+
4
+ const akGridSize = gridSize() + 'px';
5
+
6
+ // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
7
+ export const scrollbarStyles = `
8
+ -ms-overflow-style: -ms-autohiding-scrollbar;
9
+
10
+ &::-webkit-scrollbar {
11
+ height: ${akGridSize};
12
+ width: ${akGridSize};
13
+ }
14
+
15
+ &::-webkit-scrollbar-corner {
16
+ display: none;
17
+ }
18
+
19
+ &::-webkit-scrollbar-thumb {
20
+ background-color: ${token(
21
+ 'color.background.neutral.subtle',
22
+ 'rgba(0, 0, 0, 0)',
23
+ )};
24
+ }
25
+
26
+ &:hover::-webkit-scrollbar-thumb {
27
+ background-color: ${token(
28
+ 'color.background.neutral.bold',
29
+ 'rgba(0, 0, 0, 0.2)',
30
+ )};
31
+ border-radius: ${akGridSize};
32
+ }
33
+
34
+ &::-webkit-scrollbar-thumb:hover {
35
+ background-color: ${token(
36
+ 'color.background.neutral.bold.hovered',
37
+ 'rgba(0, 0, 0, 0.4)',
38
+ )};
39
+ }
40
+ `;
@@ -0,0 +1 @@
1
+ export { shortcutStyle } from './shortcut';
@@ -0,0 +1,23 @@
1
+ import { css } from '@emotion/react';
2
+
3
+ import { N100 } from '@atlaskit/theme/colors';
4
+ import { borderRadius } from '@atlaskit/theme/constants';
5
+ import { token } from '@atlaskit/tokens';
6
+
7
+ import { akEditorMobileMaxWidth, relativeFontSizeToBase16 } from '../consts';
8
+
9
+ export const shortcutStyle = css`
10
+ background-color: ${token(
11
+ 'color.background.neutral',
12
+ 'rgba(223, 225, 229, 0.5)',
13
+ )}; /* N60 at 50% */
14
+ color: ${token('color.text.subtle', N100)};
15
+ border-radius: ${borderRadius()}px;
16
+ padding: 4px;
17
+ line-height: 12px;
18
+ font-size: ${relativeFontSizeToBase16(11.67)};
19
+ align-self: flex-end;
20
+ @media (max-width: ${akEditorMobileMaxWidth}px) {
21
+ display: none;
22
+ }
23
+ `;