@atlaskit/editor-common 78.30.0 → 78.30.1
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 +7 -0
- package/dist/cjs/analytics/fire-analytics-event.js +5 -16
- package/dist/cjs/card/LinkToolbarButtonGroup.js +12 -6
- package/dist/cjs/element-browser/ViewMore.js +13 -5
- package/dist/cjs/element-browser/components/ElementBrowserLoader.js +9 -6
- package/dist/cjs/element-browser/components/ElementList/NotFoundIllustration.js +6 -4
- package/dist/cjs/element-browser/hooks/use-container-width.js +5 -4
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +38 -11
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/Caption/index.js +13 -6
- package/dist/cjs/ui/DropList/index.js +23 -6
- package/dist/cjs/ui/Expand/index.js +81 -9
- package/dist/cjs/ui/FloatingToolbar/Separator.js +8 -4
- package/dist/cjs/ui/FloatingToolbar/SmallerEditIcon.js +4 -3
- package/dist/cjs/ui/MediaSingle/link.js +11 -4
- package/dist/cjs/ui/Messages/index.js +18 -6
- package/dist/cjs/ui/PanelTextInput/styles.js +30 -5
- package/dist/cjs/ui/UnsupportedBlock/index.js +19 -4
- package/dist/cjs/ui/WidthProvider/index.js +7 -4
- package/dist/cjs/ui-color/ColorPalette/styles.js +5 -4
- package/dist/cjs/ui-menu/DropdownMenu/index.js +15 -5
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +8 -6
- package/dist/cjs/ui-menu/ToolbarButton/index.js +8 -7
- package/dist/es2019/analytics/fire-analytics-event.js +5 -16
- package/dist/es2019/card/LinkToolbarButtonGroup.js +12 -12
- package/dist/es2019/element-browser/ViewMore.js +12 -12
- package/dist/es2019/element-browser/components/ElementBrowserLoader.js +7 -7
- package/dist/es2019/element-browser/components/ElementList/NotFoundIllustration.js +5 -5
- package/dist/es2019/element-browser/hooks/use-container-width.js +3 -3
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +37 -37
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/Caption/index.js +12 -12
- package/dist/es2019/ui/DropList/index.js +23 -21
- package/dist/es2019/ui/Expand/index.js +71 -78
- package/dist/es2019/ui/FloatingToolbar/Separator.js +7 -7
- package/dist/es2019/ui/FloatingToolbar/SmallerEditIcon.js +3 -3
- package/dist/es2019/ui/MediaSingle/link.js +11 -11
- package/dist/es2019/ui/Messages/index.js +17 -17
- package/dist/es2019/ui/PanelTextInput/styles.js +26 -30
- package/dist/es2019/ui/UnsupportedBlock/index.js +17 -17
- package/dist/es2019/ui/WidthProvider/index.js +5 -4
- package/dist/es2019/ui-color/ColorPalette/styles.js +4 -4
- package/dist/es2019/ui-menu/DropdownMenu/index.js +10 -8
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -5
- package/dist/es2019/ui-menu/ToolbarButton/index.js +4 -4
- package/dist/esm/analytics/fire-analytics-event.js +5 -16
- package/dist/esm/card/LinkToolbarButtonGroup.js +12 -6
- package/dist/esm/element-browser/ViewMore.js +12 -4
- package/dist/esm/element-browser/components/ElementBrowserLoader.js +7 -3
- package/dist/esm/element-browser/components/ElementList/NotFoundIllustration.js +5 -3
- package/dist/esm/element-browser/hooks/use-container-width.js +3 -3
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +37 -9
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/Caption/index.js +12 -4
- package/dist/esm/ui/DropList/index.js +23 -6
- package/dist/esm/ui/Expand/index.js +81 -9
- package/dist/esm/ui/FloatingToolbar/Separator.js +7 -3
- package/dist/esm/ui/FloatingToolbar/SmallerEditIcon.js +3 -3
- package/dist/esm/ui/MediaSingle/link.js +11 -3
- package/dist/esm/ui/Messages/index.js +17 -6
- package/dist/esm/ui/PanelTextInput/styles.js +30 -4
- package/dist/esm/ui/UnsupportedBlock/index.js +17 -3
- package/dist/esm/ui/WidthProvider/index.js +5 -3
- package/dist/esm/ui-color/ColorPalette/styles.js +5 -3
- package/dist/esm/ui-menu/DropdownMenu/index.js +15 -5
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -3
- package/dist/esm/ui-menu/ToolbarButton/index.js +4 -3
- package/dist/types/types/feature-flags.d.ts +2 -0
- package/dist/types/ui/Caption/index.d.ts +1 -1
- package/dist/types/ui/UnsupportedBlock/index.d.ts +3 -3
- package/dist/types-ts4.5/types/feature-flags.d.ts +2 -0
- package/dist/types-ts4.5/ui/Caption/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/UnsupportedBlock/index.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import { useEffect, useRef } from 'react';
|
|
5
3
|
import { css, jsx } from '@emotion/react';
|
|
6
4
|
import { ButtonItem, Section } from '@atlaskit/menu';
|
|
7
|
-
var itemBefore = css(
|
|
5
|
+
var itemBefore = css({
|
|
6
|
+
width: '40px',
|
|
7
|
+
height: '40px',
|
|
8
|
+
boxSizing: 'border-box',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
justifyContent: 'center',
|
|
11
|
+
alignItems: 'center',
|
|
12
|
+
marginRight: "var(--ds-space-050, 4px)"
|
|
13
|
+
});
|
|
8
14
|
export var ViewMore = function ViewMore(_ref) {
|
|
9
15
|
var item = _ref.item,
|
|
10
16
|
focus = _ref.focus;
|
|
@@ -25,7 +31,9 @@ export var ViewMore = function ViewMore(_ref) {
|
|
|
25
31
|
"data-testid": "view-more-elements-item"
|
|
26
32
|
// @ts-ignore Overriding Menu styles is not supported
|
|
27
33
|
,
|
|
28
|
-
css: css(
|
|
34
|
+
css: css({
|
|
35
|
+
padding: "0px ".concat("var(--ds-space-150, 12px)")
|
|
36
|
+
}),
|
|
29
37
|
ref: ref
|
|
30
38
|
}, item.title));
|
|
31
39
|
};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { css, jsx } from '@emotion/react';
|
|
6
4
|
import Loadable from 'react-loadable';
|
|
7
5
|
import Spinner from '@atlaskit/spinner';
|
|
8
|
-
var spinnerContainer = css(
|
|
6
|
+
var spinnerContainer = css({
|
|
7
|
+
display: 'flex',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
height: '100%',
|
|
11
|
+
width: '100%'
|
|
12
|
+
});
|
|
9
13
|
var ElementBrowserLoader = Loadable({
|
|
10
14
|
loader: function loader() {
|
|
11
15
|
return import( /* webpackChunkName: "@atlaskit-internal_editor-element-browser" */'../ElementBrowser').then(function (module) {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import { css, jsx } from '@emotion/react';
|
|
5
|
-
var imageContainer = css(
|
|
3
|
+
var imageContainer = css({
|
|
4
|
+
width: '120px',
|
|
5
|
+
height: '111px',
|
|
6
|
+
marginTop: "var(--ds-space-600, 48px)"
|
|
7
|
+
});
|
|
6
8
|
|
|
7
9
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
8
10
|
export default function NotFoundIllustration() {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
-
var _templateObject;
|
|
4
2
|
/** @jsx jsx */
|
|
5
3
|
import React, { memo, useEffect, useRef, useState } from 'react';
|
|
6
4
|
import { css, jsx } from '@emotion/react';
|
|
@@ -32,7 +30,9 @@ import { WidthObserver } from '@atlaskit/width-detector';
|
|
|
32
30
|
*
|
|
33
31
|
*/
|
|
34
32
|
|
|
35
|
-
var widthObserverWrapper = css(
|
|
33
|
+
var widthObserverWrapper = css({
|
|
34
|
+
position: 'relative'
|
|
35
|
+
});
|
|
36
36
|
export default function useContainerWidth() {
|
|
37
37
|
var _useState = useState(0),
|
|
38
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -8,8 +8,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
8
8
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
9
9
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
12
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
13
11
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
14
12
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
15
13
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
@@ -39,14 +37,44 @@ import { filterUniqueItems, mapContentTypeToIcon, sha1, wordCount } from './util
|
|
|
39
37
|
* Visible only to screenreaders. Use when there is a need
|
|
40
38
|
* to provide more context to a non-sighted user.
|
|
41
39
|
*/
|
|
42
|
-
export var visuallyHiddenStyles = css(
|
|
40
|
+
export var visuallyHiddenStyles = css({
|
|
41
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
42
|
+
clipPath: 'inset(50%)',
|
|
43
|
+
height: '1px',
|
|
44
|
+
width: '1px',
|
|
45
|
+
margin: "var(--ds-space-negative-025, -2px)",
|
|
46
|
+
overflow: 'hidden',
|
|
47
|
+
padding: 0,
|
|
48
|
+
position: 'absolute'
|
|
49
|
+
});
|
|
43
50
|
export var RECENT_SEARCH_LIST_SIZE = 5;
|
|
44
|
-
var clearText = css(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
var clearText = css({
|
|
52
|
+
cursor: 'pointer',
|
|
53
|
+
padding: 0,
|
|
54
|
+
marginRight: "var(--ds-space-100, 8px)",
|
|
55
|
+
color: "var(--ds-icon-subtle, ".concat(N90, ")"),
|
|
56
|
+
background: 'transparent',
|
|
57
|
+
border: 'none'
|
|
58
|
+
});
|
|
59
|
+
var clearTextWrapper = css({
|
|
60
|
+
position: 'absolute',
|
|
61
|
+
right: 0
|
|
62
|
+
});
|
|
63
|
+
var containerPadding = css({
|
|
64
|
+
padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-100, 8px)")
|
|
65
|
+
});
|
|
66
|
+
var textLabelMargin = css({
|
|
67
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
68
|
+
});
|
|
69
|
+
var inputLabel = css({
|
|
70
|
+
fontSize: "".concat(fontSizeSmall(), "px"),
|
|
71
|
+
color: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
72
|
+
fontWeight: 500,
|
|
73
|
+
paddingBottom: "var(--ds-space-050, 4px)"
|
|
74
|
+
});
|
|
75
|
+
var inputWrapperPosition = css({
|
|
76
|
+
position: 'relative'
|
|
77
|
+
});
|
|
50
78
|
export var messages = defineMessages({
|
|
51
79
|
displayText: {
|
|
52
80
|
id: 'fabric.editor.displayText',
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "78.30.
|
|
9
|
+
var packageVersion = "78.30.1";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -4,8 +4,6 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
4
4
|
import _inherits from "@babel/runtime/helpers/inherits";
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
8
|
-
var _templateObject, _templateObject2;
|
|
9
7
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
9
|
/** @jsx jsx */
|
|
@@ -14,8 +12,18 @@ import { css, jsx } from '@emotion/react';
|
|
|
14
12
|
import { injectIntl } from 'react-intl-next';
|
|
15
13
|
import { N200, N400 } from '@atlaskit/theme/colors';
|
|
16
14
|
import { messages } from './messages';
|
|
17
|
-
var captionWrapperStyle = css(
|
|
18
|
-
|
|
15
|
+
var captionWrapperStyle = css({
|
|
16
|
+
marginTop: "var(--ds-space-100, 8px)",
|
|
17
|
+
textAlign: 'center',
|
|
18
|
+
position: 'relative',
|
|
19
|
+
color: "var(--ds-text-subtle, ".concat(N400, ")")
|
|
20
|
+
});
|
|
21
|
+
var placeholderStyle = css({
|
|
22
|
+
color: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
23
|
+
position: 'absolute',
|
|
24
|
+
top: 0,
|
|
25
|
+
width: '100%'
|
|
26
|
+
});
|
|
19
27
|
export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
20
28
|
_inherits(CaptionComponent, _React$Component);
|
|
21
29
|
var _super = _createSuper(CaptionComponent);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
1
|
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
2
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
3
|
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
@@ -6,7 +5,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
var _templateObject, _templateObject2, _templateObject3;
|
|
10
8
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
9
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
12
10
|
/** @jsx jsx */
|
|
@@ -17,7 +15,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
17
15
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
18
16
|
import Layer from '../Layer';
|
|
19
17
|
var packageName = "@atlaskit/editor-common";
|
|
20
|
-
var packageVersion = "78.30.
|
|
18
|
+
var packageVersion = "78.30.1";
|
|
21
19
|
var halfFocusRing = 1;
|
|
22
20
|
var dropOffset = '0, 8';
|
|
23
21
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -30,11 +28,30 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
30
28
|
args[_key] = arguments[_key];
|
|
31
29
|
}
|
|
32
30
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
33
|
-
_defineProperty(_assertThisInitialized(_this), "wrapperStyles", css(
|
|
34
|
-
|
|
31
|
+
_defineProperty(_assertThisInitialized(_this), "wrapperStyles", css({
|
|
32
|
+
display: _this.props.shouldFitContainer ? 'block' : 'inline-flex',
|
|
33
|
+
flex: _this.props.shouldFitContainer ? '1 1 auto' : undefined,
|
|
34
|
+
transitionDuration: '0.2s',
|
|
35
|
+
transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)'
|
|
36
|
+
}));
|
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "triggerStyles", css({
|
|
38
|
+
transitionDuration: '0.2s',
|
|
39
|
+
transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)',
|
|
40
|
+
display: _this.props.shouldFitContainer ? 'block' : 'inline-flex',
|
|
41
|
+
boxSizing: _this.props.shouldFitContainer ? 'border-box' : undefined
|
|
42
|
+
}));
|
|
35
43
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
36
44
|
_defineProperty(_assertThisInitialized(_this), "menuWrapper", function () {
|
|
37
|
-
return css(
|
|
45
|
+
return css({
|
|
46
|
+
color: "var(--ds-text, ".concat(N900, ")"),
|
|
47
|
+
backgroundColor: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
48
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
49
|
+
boxShadow: "var(--ds-shadow-overlay, ".concat("0 4px 8px calc(-1 * 2px) ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"),
|
|
50
|
+
boxSizing: 'border-box',
|
|
51
|
+
overflow: 'auto',
|
|
52
|
+
padding: "var(--ds-space-050, 4px)".concat(" 0"),
|
|
53
|
+
maxHeight: '90vh'
|
|
54
|
+
});
|
|
38
55
|
});
|
|
39
56
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
40
57
|
_defineProperty(_assertThisInitialized(_this), "componentDidMount", function () {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
|
|
4
|
+
var _templateObject;
|
|
4
5
|
var _excluded = ["children"];
|
|
5
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
|
6
6
|
/** @jsx jsx */
|
|
7
7
|
|
|
8
8
|
import React, { forwardRef } from 'react';
|
|
@@ -50,10 +50,30 @@ export var ExpandIconWrapper = function ExpandIconWrapper(_ref) {
|
|
|
50
50
|
}, children);
|
|
51
51
|
};
|
|
52
52
|
var expandIconWrapperStyle = function expandIconWrapperStyle() {
|
|
53
|
-
return css(
|
|
53
|
+
return css({
|
|
54
|
+
cursor: 'pointer',
|
|
55
|
+
display: 'flex',
|
|
56
|
+
color: "var(--ds-icon, ".concat(N90, ")"),
|
|
57
|
+
borderRadius: "var(--ds-border-radius-100, 4px)",
|
|
58
|
+
width: '24px',
|
|
59
|
+
height: '24px',
|
|
60
|
+
'&:hover': {
|
|
61
|
+
background: "var(--ds-background-neutral-subtle-hovered, ".concat(N30A, ")")
|
|
62
|
+
},
|
|
63
|
+
svg: {
|
|
64
|
+
transition: "transform 0.2s ".concat(akEditorSwoopCubicBezier)
|
|
65
|
+
}
|
|
66
|
+
});
|
|
54
67
|
};
|
|
55
|
-
var expandIconWrapperExpandedStyle = css(
|
|
56
|
-
|
|
68
|
+
var expandIconWrapperExpandedStyle = css({
|
|
69
|
+
svg: {
|
|
70
|
+
transform: 'rotate(90deg)'
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export var expandLayoutWrapperStyle = css({
|
|
74
|
+
width: "var(--ds-space-300, 24px)",
|
|
75
|
+
height: "var(--ds-space-300, 24px)"
|
|
76
|
+
});
|
|
57
77
|
export var ExpandLayoutWrapperWithRef = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
58
78
|
var children = props.children,
|
|
59
79
|
rest = _objectWithoutProperties(props, _excluded);
|
|
@@ -73,19 +93,71 @@ var containerStyles = function containerStyles(styleProps) {
|
|
|
73
93
|
var marginHorizontal = styleProps['data-node-type'] === 'expand' ? "-".concat(akLayoutGutterOffset, "px") : 0;
|
|
74
94
|
var margin = "".concat(marginTop, " ").concat(marginHorizontal, " ").concat(marginBottom);
|
|
75
95
|
return function () {
|
|
76
|
-
return css(
|
|
96
|
+
return css({
|
|
97
|
+
borderWidth: '1px',
|
|
98
|
+
borderStyle: 'solid',
|
|
99
|
+
borderColor: focused ? EXPAND_FOCUSED_BORDER_COLOR : expanded ? EXPAND_EXPANDED_BORDER_COLOR : EXPAND_COLLAPSED_BORDER_COLOR,
|
|
100
|
+
borderRadius: BORDER_RADIUS,
|
|
101
|
+
minHeight: '25px',
|
|
102
|
+
background: !expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND,
|
|
103
|
+
margin: margin,
|
|
104
|
+
transition: "background 0.3s ".concat(akEditorSwoopCubicBezier, ", border-color 0.3s ").concat(akEditorSwoopCubicBezier),
|
|
105
|
+
padding: "var(--ds-space-100, 8px)",
|
|
106
|
+
'&:hover': {
|
|
107
|
+
// TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.
|
|
108
|
+
// This is because the default state already uses the same token and, as such, the hover style won't change anything.
|
|
109
|
+
// https://product-fabric.atlassian.net/browse/DSP-4152
|
|
110
|
+
border: "1px solid ".concat("var(--ds-border, ".concat(N50A, ")")),
|
|
111
|
+
background: EXPAND_SELECTED_BACKGROUND
|
|
112
|
+
},
|
|
113
|
+
'td > :not(style):first-child, td > style:first-child + *': {
|
|
114
|
+
marginTop: 0
|
|
115
|
+
}
|
|
116
|
+
});
|
|
77
117
|
};
|
|
78
118
|
};
|
|
79
119
|
var contentStyles = function contentStyles(styleProps) {
|
|
80
120
|
return function () {
|
|
81
|
-
return
|
|
121
|
+
return (// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
122
|
+
css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-top: ", ";\n padding-right: ", ";\n padding-left: ", ";\n margin-left: ", ";\n display: flow-root;\n\n // The follow rules inside @supports block are added as a part of ED-8893\n // The fix is targeting mobile bridge on iOS 12 or below,\n // We should consider remove this fix when we no longer support iOS 12\n @supports not (display: flow-root) {\n width: 100%;\n box-sizing: border-box;\n }\n\n ", "\n "])), styleProps.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)", "var(--ds-space-100, 8px)", "var(--ds-space-300, 24px)", "var(--ds-space-050, 4px)", !styleProps.expanded ? "\n .expand-content-wrapper, .nestedExpand-content-wrapper {\n /* We visually hide the content here to preserve the content during copy+paste */\n /* Do not add text nowrap here because inline comment navigation depends on the location of the text */\n width: 100%;\n display: block;\n height: 0;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n user-select: none;\n }\n " : '')
|
|
123
|
+
);
|
|
82
124
|
};
|
|
83
125
|
};
|
|
84
126
|
var titleInputStyles = function titleInputStyles() {
|
|
85
|
-
return css(
|
|
127
|
+
return css({
|
|
128
|
+
outline: 'none',
|
|
129
|
+
border: 'none',
|
|
130
|
+
fontSize: relativeFontSizeToBase16(fontSize()),
|
|
131
|
+
lineHeight: akEditorLineHeight,
|
|
132
|
+
fontWeight: 'normal',
|
|
133
|
+
color: "var(--ds-text-subtlest, ".concat(N200A, ")"),
|
|
134
|
+
background: 'transparent',
|
|
135
|
+
display: 'flex',
|
|
136
|
+
flex: 1,
|
|
137
|
+
padding: "0 0 0 ".concat("var(--ds-space-050, 4px)"),
|
|
138
|
+
width: '100%',
|
|
139
|
+
'&::placeholder': {
|
|
140
|
+
opacity: 1,
|
|
141
|
+
color: "var(--ds-text-subtlest, ".concat(N200, ")")
|
|
142
|
+
}
|
|
143
|
+
});
|
|
86
144
|
};
|
|
87
145
|
var titleContainerStyles = function titleContainerStyles() {
|
|
88
|
-
return css(
|
|
146
|
+
return css({
|
|
147
|
+
padding: 0,
|
|
148
|
+
display: 'flex',
|
|
149
|
+
alignItems: 'flex-start',
|
|
150
|
+
background: 'none',
|
|
151
|
+
border: 'none',
|
|
152
|
+
fontSize: relativeFontSizeToBase16(fontSize()),
|
|
153
|
+
width: '100%',
|
|
154
|
+
color: "var(--ds-text-subtle, ".concat(N300A, ")"),
|
|
155
|
+
overflow: 'hidden',
|
|
156
|
+
cursor: 'pointer',
|
|
157
|
+
'&:focus': {
|
|
158
|
+
outline: 0
|
|
159
|
+
}
|
|
160
|
+
});
|
|
89
161
|
};
|
|
90
162
|
export var sharedExpandStyles = {
|
|
91
163
|
titleInputStyles: titleInputStyles,
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import { css, jsx } from '@emotion/react';
|
|
5
3
|
import { N30 } from '@atlaskit/theme/colors';
|
|
6
|
-
var separator = css(
|
|
4
|
+
var separator = css({
|
|
5
|
+
background: "var(--ds-border, ".concat(N30, ")"),
|
|
6
|
+
width: '1px',
|
|
7
|
+
height: '20px',
|
|
8
|
+
margin: "0 ".concat("var(--ds-space-050, 4px)"),
|
|
9
|
+
alignSelf: 'center'
|
|
10
|
+
});
|
|
7
11
|
export default (function () {
|
|
8
12
|
return jsx("div", {
|
|
9
13
|
css: separator,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import { css, jsx } from '@emotion/react';
|
|
5
3
|
import EditIcon from '@atlaskit/icon/glyph/edit';
|
|
6
|
-
var editIconStyles = css(
|
|
4
|
+
var editIconStyles = css({
|
|
5
|
+
width: '20px'
|
|
6
|
+
});
|
|
7
7
|
|
|
8
8
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
9
9
|
export var SmallerEditIcon = function SmallerEditIcon() {
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
|
-
export var mediaLinkStyle = css(
|
|
2
|
+
export var mediaLinkStyle = css({
|
|
3
|
+
position: 'absolute',
|
|
4
|
+
background: 'transparent',
|
|
5
|
+
top: 0,
|
|
6
|
+
right: 0,
|
|
7
|
+
bottom: 0,
|
|
8
|
+
left: 0,
|
|
9
|
+
cursor: 'pointer',
|
|
10
|
+
width: '100%',
|
|
11
|
+
height: '100%'
|
|
12
|
+
});
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
|
|
5
3
|
import { css, jsx } from '@emotion/react';
|
|
@@ -7,12 +5,25 @@ import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
|
|
|
7
5
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
8
6
|
import { G400, N200, R400 } from '@atlaskit/theme/colors';
|
|
9
7
|
import { h200 } from '@atlaskit/theme/typography';
|
|
10
|
-
var errorColor = css(
|
|
11
|
-
|
|
8
|
+
var errorColor = css({
|
|
9
|
+
color: "var(--ds-text-danger, ".concat(R400, ")")
|
|
10
|
+
});
|
|
11
|
+
var validColor = css({
|
|
12
|
+
color: "var(--ds-text-success, ".concat(G400, ")")
|
|
13
|
+
});
|
|
12
14
|
var messageStyle = function messageStyle() {
|
|
13
|
-
return css(
|
|
15
|
+
return css(h200(), {
|
|
16
|
+
fontWeight: 'normal',
|
|
17
|
+
color: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
18
|
+
marginTop: "var(--ds-space-050, 4px)",
|
|
19
|
+
display: 'flex',
|
|
20
|
+
justifyContent: 'baseline'
|
|
21
|
+
});
|
|
14
22
|
};
|
|
15
|
-
var iconWrapperStyle = css(
|
|
23
|
+
var iconWrapperStyle = css({
|
|
24
|
+
display: 'flex',
|
|
25
|
+
marginRight: "var(--ds-space-050, 4px)"
|
|
26
|
+
});
|
|
16
27
|
export var HelperMessage = function HelperMessage(_ref) {
|
|
17
28
|
var children = _ref.children;
|
|
18
29
|
return jsx("div", {
|
|
@@ -1,10 +1,36 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject, _templateObject2;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
2
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
3
|
import { B100, N100, N30, N400 } from '@atlaskit/theme/colors';
|
|
6
4
|
// Normal .className gets overridden by input[type=text] hence this hack to produce input.className
|
|
7
|
-
export var panelTextInput = css(
|
|
5
|
+
export var panelTextInput = css({
|
|
6
|
+
'input&': {
|
|
7
|
+
background: 'transparent',
|
|
8
|
+
border: "2px solid ".concat("var(--ds-border, ".concat(N30, ")")),
|
|
9
|
+
borderRadius: 0,
|
|
10
|
+
boxSizing: 'content-box',
|
|
11
|
+
color: "var(--ds-text-subtle, ".concat(N400, ")"),
|
|
12
|
+
flexGrow: 1,
|
|
13
|
+
fontSize: relativeFontSizeToBase16(13),
|
|
14
|
+
lineHeight: '20px',
|
|
15
|
+
padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-400, 32px)", " ", "var(--ds-space-075, 6px)", " ", "var(--ds-space-100, 8px)"),
|
|
16
|
+
minWidth: '145px',
|
|
17
|
+
/* Hides IE10+ built-in [x] clear input button */
|
|
18
|
+
'&::-ms-clear': {
|
|
19
|
+
display: 'none'
|
|
20
|
+
},
|
|
21
|
+
'&:focus': {
|
|
22
|
+
outline: 'none',
|
|
23
|
+
borderColor: "var(--ds-border-focused, ".concat(B100, ")")
|
|
24
|
+
},
|
|
25
|
+
'&::placeholder': {
|
|
26
|
+
color: "var(--ds-text-subtlest, ".concat(N100, ")")
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
8
30
|
export var panelTextInputWithCustomWidth = function panelTextInputWithCustomWidth(width) {
|
|
9
|
-
return css(
|
|
31
|
+
return css({
|
|
32
|
+
'input&': {
|
|
33
|
+
width: "".concat(width, "px")
|
|
34
|
+
}
|
|
35
|
+
});
|
|
10
36
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import React, { useCallback, useRef } from 'react';
|
|
5
3
|
import { css, jsx } from '@emotion/react';
|
|
@@ -13,7 +11,23 @@ import { ACTION_SUBJECT_ID } from '../../analytics';
|
|
|
13
11
|
import { unsupportedContentMessages } from '../../messages/unsupportedContent';
|
|
14
12
|
import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
|
|
15
13
|
import { getUnsupportedContent } from '../unsupported-content-helper';
|
|
16
|
-
var blockNodeStyle = css(
|
|
14
|
+
var blockNodeStyle = css({
|
|
15
|
+
background: "var(--ds-background-disabled, ".concat(N30, ")"),
|
|
16
|
+
border: "1px dashed ".concat("var(--ds-border-disabled, ".concat(N50, ")")),
|
|
17
|
+
borderRadius: "".concat(borderRadius(), "px"),
|
|
18
|
+
boxSizing: 'border-box',
|
|
19
|
+
cursor: 'default',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
fontSize: relativeFontSizeToBase16(fontSize()),
|
|
22
|
+
margin: "var(--ds-space-100, 8px)".concat(" 0"),
|
|
23
|
+
minHeight: '24px',
|
|
24
|
+
padding: "var(--ds-space-150, 12px)",
|
|
25
|
+
textAlign: 'center',
|
|
26
|
+
verticalAlign: 'text-bottom',
|
|
27
|
+
minWidth: '120px',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
justifyContent: 'center'
|
|
30
|
+
});
|
|
17
31
|
var UnsupportedBlockNode = function UnsupportedBlockNode(_ref) {
|
|
18
32
|
var node = _ref.node,
|
|
19
33
|
intl = _ref.intl,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
var _templateObject;
|
|
4
2
|
/** @jsx jsx */
|
|
5
3
|
import React, { Fragment } from 'react';
|
|
6
4
|
import { css, jsx } from '@emotion/react';
|
|
7
5
|
import rafSchedule from 'raf-schd';
|
|
8
6
|
import { WidthObserver } from '@atlaskit/width-detector';
|
|
7
|
+
var styles = css({
|
|
8
|
+
position: 'relative',
|
|
9
|
+
width: '100%'
|
|
10
|
+
});
|
|
9
11
|
var SCROLLBAR_WIDTH = 30;
|
|
10
12
|
export function getBreakpoint() {
|
|
11
13
|
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -49,7 +51,7 @@ export var WidthProvider = function WidthProvider(_ref) {
|
|
|
49
51
|
});
|
|
50
52
|
var skipWidthDetection = shouldCheckExistingValue && existingContextValue.width > 0;
|
|
51
53
|
return jsx("div", {
|
|
52
|
-
css:
|
|
54
|
+
css: styles,
|
|
53
55
|
className: className
|
|
54
56
|
}, !skipWidthDetection && jsx(Fragment, null, jsx(WidthObserver, {
|
|
55
57
|
setWidth: updateWidth,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
import { css } from '@emotion/react';
|
|
4
|
-
export var colorPaletteWrapper = css(
|
|
2
|
+
export var colorPaletteWrapper = css({
|
|
3
|
+
padding: "0 ".concat("var(--ds-space-100, 8px)"),
|
|
4
|
+
/* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */
|
|
5
|
+
display: 'flex'
|
|
6
|
+
});
|
|
@@ -11,7 +11,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
|
11
11
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
12
12
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
13
13
|
var _excluded = ["children"];
|
|
14
|
-
var _templateObject, _templateObject2
|
|
14
|
+
var _templateObject, _templateObject2;
|
|
15
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
@@ -32,16 +32,26 @@ import DropList from '../../ui/DropList';
|
|
|
32
32
|
import Popup from '../../ui/Popup';
|
|
33
33
|
import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
|
|
34
34
|
import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
|
|
35
|
-
var wrapper = css(
|
|
36
|
-
|
|
35
|
+
var wrapper = css({
|
|
36
|
+
/* tooltip in ToolbarButton is display:block */
|
|
37
|
+
'& > div > div': {
|
|
38
|
+
display: 'flex'
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
var focusedMenuItemStyle = css({
|
|
42
|
+
boxShadow: "inset 0px 0px 0px 2px ".concat("var(--ds-border-focused, ".concat(B100, ")")),
|
|
43
|
+
outline: 'none'
|
|
44
|
+
});
|
|
37
45
|
var buttonStyles = function buttonStyles(isActive, submenuActive) {
|
|
38
46
|
if (isActive) {
|
|
39
47
|
/**
|
|
40
48
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
41
49
|
*/
|
|
42
|
-
|
|
50
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
51
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > span,\n > span:hover,\n > span:active {\n background: ", ";\n color: ", ";\n }\n :focus > span[aria-disabled='false'] {\n ", ";\n }\n :focus-visible,\n :focus-visible > span[aria-disabled='false'] {\n outline: none;\n }\n "])), "var(--ds-background-selected, #6c798f)", "var(--ds-text, #fff)", focusedMenuItemStyle);
|
|
43
52
|
} else {
|
|
44
|
-
|
|
53
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
54
|
+
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n > span:hover[aria-disabled='false'] {\n color: ", ";\n background-color: ", ";\n }\n ", "\n > span[aria-disabled='true'] {\n color: ", ";\n }\n :focus > span[aria-disabled='false'] {\n ", ";\n }\n :focus-visible,\n :focus-visible > span[aria-disabled='false'] {\n outline: none;\n }\n "])), "var(--ds-text, ".concat(N900, ")"), "var(--ds-background-neutral-subtle-hovered, rgb(244, 245, 247))", !submenuActive && "\n > span:active[aria-disabled='false'] {\n background-color: ".concat("var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))", ";\n }"), "var(--ds-text-disabled, ".concat(N70, ")"), focusedMenuItemStyle); // The default focus-visible style is removed to ensure consistency across browsers
|
|
45
55
|
}
|
|
46
56
|
};
|
|
47
57
|
var DropListWithOutsideListeners = withReactEditorViewOuterListeners(DropList);
|