@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
|
@@ -5,20 +5,32 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.ValidMessage = exports.HelperMessage = exports.ErrorMessage = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
8
|
var _react = require("@emotion/react");
|
|
10
9
|
var _success = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/success"));
|
|
11
10
|
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
12
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
13
12
|
var _typography = require("@atlaskit/theme/typography");
|
|
14
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
15
13
|
/** @jsx jsx */
|
|
16
|
-
|
|
17
|
-
var
|
|
14
|
+
|
|
15
|
+
var errorColor = (0, _react.css)({
|
|
16
|
+
color: "var(--ds-text-danger, ".concat(_colors.R400, ")")
|
|
17
|
+
});
|
|
18
|
+
var validColor = (0, _react.css)({
|
|
19
|
+
color: "var(--ds-text-success, ".concat(_colors.G400, ")")
|
|
20
|
+
});
|
|
18
21
|
var messageStyle = function messageStyle() {
|
|
19
|
-
return (0, _react.css)(
|
|
22
|
+
return (0, _react.css)((0, _typography.h200)(), {
|
|
23
|
+
fontWeight: 'normal',
|
|
24
|
+
color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
|
|
25
|
+
marginTop: "var(--ds-space-050, 4px)",
|
|
26
|
+
display: 'flex',
|
|
27
|
+
justifyContent: 'baseline'
|
|
28
|
+
});
|
|
20
29
|
};
|
|
21
|
-
var iconWrapperStyle = (0, _react.css)(
|
|
30
|
+
var iconWrapperStyle = (0, _react.css)({
|
|
31
|
+
display: 'flex',
|
|
32
|
+
marginRight: "var(--ds-space-050, 4px)"
|
|
33
|
+
});
|
|
22
34
|
var HelperMessage = exports.HelperMessage = function HelperMessage(_ref) {
|
|
23
35
|
var children = _ref.children;
|
|
24
36
|
return (0, _react.jsx)("div", {
|
|
@@ -1,17 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.panelTextInputWithCustomWidth = exports.panelTextInput = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
9
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
|
-
var _templateObject, _templateObject2;
|
|
13
10
|
// Normal .className gets overridden by input[type=text] hence this hack to produce input.className
|
|
14
|
-
var panelTextInput = exports.panelTextInput = (0, _react.css)(
|
|
11
|
+
var panelTextInput = exports.panelTextInput = (0, _react.css)({
|
|
12
|
+
'input&': {
|
|
13
|
+
background: 'transparent',
|
|
14
|
+
border: "2px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")")),
|
|
15
|
+
borderRadius: 0,
|
|
16
|
+
boxSizing: 'content-box',
|
|
17
|
+
color: "var(--ds-text-subtle, ".concat(_colors.N400, ")"),
|
|
18
|
+
flexGrow: 1,
|
|
19
|
+
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(13),
|
|
20
|
+
lineHeight: '20px',
|
|
21
|
+
padding: "var(--ds-space-075, 6px)".concat(" ", "var(--ds-space-400, 32px)", " ", "var(--ds-space-075, 6px)", " ", "var(--ds-space-100, 8px)"),
|
|
22
|
+
minWidth: '145px',
|
|
23
|
+
/* Hides IE10+ built-in [x] clear input button */
|
|
24
|
+
'&::-ms-clear': {
|
|
25
|
+
display: 'none'
|
|
26
|
+
},
|
|
27
|
+
'&:focus': {
|
|
28
|
+
outline: 'none',
|
|
29
|
+
borderColor: "var(--ds-border-focused, ".concat(_colors.B100, ")")
|
|
30
|
+
},
|
|
31
|
+
'&::placeholder': {
|
|
32
|
+
color: "var(--ds-text-subtlest, ".concat(_colors.N100, ")")
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
15
36
|
var panelTextInputWithCustomWidth = exports.panelTextInputWithCustomWidth = function panelTextInputWithCustomWidth(width) {
|
|
16
|
-
return (0, _react.css)(
|
|
37
|
+
return (0, _react.css)({
|
|
38
|
+
'input&': {
|
|
39
|
+
width: "".concat(width, "px")
|
|
40
|
+
}
|
|
41
|
+
});
|
|
17
42
|
};
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
10
|
var _react2 = require("@emotion/react");
|
|
12
11
|
var _reactIntlNext = require("react-intl-next");
|
|
@@ -19,11 +18,27 @@ var _analytics = require("../../analytics");
|
|
|
19
18
|
var _unsupportedContent = require("../../messages/unsupportedContent");
|
|
20
19
|
var _trackUnsupportedContent = require("../../utils/track-unsupported-content");
|
|
21
20
|
var _unsupportedContentHelper = require("../unsupported-content-helper");
|
|
22
|
-
var _templateObject;
|
|
23
|
-
/** @jsx jsx */
|
|
24
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
25
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
26
|
-
|
|
23
|
+
/** @jsx jsx */
|
|
24
|
+
|
|
25
|
+
var blockNodeStyle = (0, _react2.css)({
|
|
26
|
+
background: "var(--ds-background-disabled, ".concat(_colors.N30, ")"),
|
|
27
|
+
border: "1px dashed ".concat("var(--ds-border-disabled, ".concat(_colors.N50, ")")),
|
|
28
|
+
borderRadius: "".concat((0, _constants.borderRadius)(), "px"),
|
|
29
|
+
boxSizing: 'border-box',
|
|
30
|
+
cursor: 'default',
|
|
31
|
+
display: 'flex',
|
|
32
|
+
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _constants.fontSize)()),
|
|
33
|
+
margin: "var(--ds-space-100, 8px)".concat(" 0"),
|
|
34
|
+
minHeight: '24px',
|
|
35
|
+
padding: "var(--ds-space-150, 12px)",
|
|
36
|
+
textAlign: 'center',
|
|
37
|
+
verticalAlign: 'text-bottom',
|
|
38
|
+
minWidth: '120px',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
justifyContent: 'center'
|
|
41
|
+
});
|
|
27
42
|
var UnsupportedBlockNode = function UnsupportedBlockNode(_ref) {
|
|
28
43
|
var node = _ref.node,
|
|
29
44
|
intl = _ref.intl,
|
|
@@ -8,16 +8,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.WidthProvider = exports.WidthContext = exports.WidthConsumer = void 0;
|
|
9
9
|
exports.createWidthContext = createWidthContext;
|
|
10
10
|
exports.getBreakpoint = getBreakpoint;
|
|
11
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
12
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
13
|
var _react2 = require("@emotion/react");
|
|
15
14
|
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
16
15
|
var _widthDetector = require("@atlaskit/width-detector");
|
|
17
|
-
var _templateObject;
|
|
18
|
-
/** @jsx jsx */
|
|
19
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
/** @jsx jsx */
|
|
19
|
+
|
|
20
|
+
var styles = (0, _react2.css)({
|
|
21
|
+
position: 'relative',
|
|
22
|
+
width: '100%'
|
|
23
|
+
});
|
|
21
24
|
var SCROLLBAR_WIDTH = 30;
|
|
22
25
|
function getBreakpoint() {
|
|
23
26
|
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -61,7 +64,7 @@ var WidthProvider = exports.WidthProvider = function WidthProvider(_ref) {
|
|
|
61
64
|
});
|
|
62
65
|
var skipWidthDetection = shouldCheckExistingValue && existingContextValue.width > 0;
|
|
63
66
|
return (0, _react2.jsx)("div", {
|
|
64
|
-
css:
|
|
67
|
+
css: styles,
|
|
65
68
|
className: className
|
|
66
69
|
}, !skipWidthDetection && (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_widthDetector.WidthObserver, {
|
|
67
70
|
setWidth: updateWidth,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.colorPaletteWrapper = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
|
-
var
|
|
11
|
-
|
|
8
|
+
var colorPaletteWrapper = exports.colorPaletteWrapper = (0, _react.css)({
|
|
9
|
+
padding: "0 ".concat("var(--ds-space-100, 8px)"),
|
|
10
|
+
/* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */
|
|
11
|
+
display: 'flex'
|
|
12
|
+
});
|
|
@@ -34,7 +34,7 @@ var _Popup = _interopRequireDefault(require("../../ui/Popup"));
|
|
|
34
34
|
var _ArrowKeyNavigationProvider = require("../ArrowKeyNavigationProvider");
|
|
35
35
|
var _types = require("../ArrowKeyNavigationProvider/types");
|
|
36
36
|
var _excluded = ["children"];
|
|
37
|
-
var _templateObject, _templateObject2
|
|
37
|
+
var _templateObject, _templateObject2;
|
|
38
38
|
/** @jsx jsx */
|
|
39
39
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
40
40
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -42,16 +42,26 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
42
42
|
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) { (0, _defineProperty2.default)(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; }
|
|
43
43
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
44
44
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
45
|
-
var wrapper = (0, _react2.css)(
|
|
46
|
-
|
|
45
|
+
var wrapper = (0, _react2.css)({
|
|
46
|
+
/* tooltip in ToolbarButton is display:block */
|
|
47
|
+
'& > div > div': {
|
|
48
|
+
display: 'flex'
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
var focusedMenuItemStyle = (0, _react2.css)({
|
|
52
|
+
boxShadow: "inset 0px 0px 0px 2px ".concat("var(--ds-border-focused, ".concat(_colors.B100, ")")),
|
|
53
|
+
outline: 'none'
|
|
54
|
+
});
|
|
47
55
|
var buttonStyles = function buttonStyles(isActive, submenuActive) {
|
|
48
56
|
if (isActive) {
|
|
49
57
|
/**
|
|
50
58
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
51
59
|
*/
|
|
52
|
-
|
|
60
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
61
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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);
|
|
53
62
|
} else {
|
|
54
|
-
|
|
63
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
64
|
+
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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(_colors.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(_colors.N70, ")"), focusedMenuItemStyle); // The default focus-visible style is removed to ensure consistency across browsers
|
|
55
65
|
}
|
|
56
66
|
};
|
|
57
67
|
var DropListWithOutsideListeners = (0, _uiReact.withReactEditorViewOuterListeners)(_DropList.default);
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.ToolbarArrowKeyNavigationProvider = exports.KeyDownHandlerContext = void 0;
|
|
9
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _react2 = require("@emotion/react");
|
|
12
10
|
var _messages = require("../../messages");
|
|
13
11
|
var _ui = require("../../ui");
|
|
14
|
-
var _templateObject;
|
|
15
|
-
/** @jsx jsx */
|
|
16
|
-
/* eslint-disable no-console */
|
|
17
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
18
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
/** @jsx jsx */
|
|
15
|
+
/* eslint-disable no-console */
|
|
16
|
+
|
|
19
17
|
/*
|
|
20
18
|
** The context is used to handle the keydown events of submenus.
|
|
21
19
|
** Because the keyboard navigation is explicitly managed for main toolbar items
|
|
@@ -26,7 +24,11 @@ var KeyDownHandlerContext = exports.KeyDownHandlerContext = /*#__PURE__*/_react.
|
|
|
26
24
|
handleArrowRight: function handleArrowRight() {},
|
|
27
25
|
handleTab: function handleTab() {}
|
|
28
26
|
});
|
|
29
|
-
var centeredToolbarContainer = (0, _react2.css)(
|
|
27
|
+
var centeredToolbarContainer = (0, _react2.css)({
|
|
28
|
+
display: 'flex',
|
|
29
|
+
width: '100%',
|
|
30
|
+
alignItems: 'center'
|
|
31
|
+
});
|
|
30
32
|
|
|
31
33
|
/**
|
|
32
34
|
* This component is a wrapper of main toolbar which listens to keydown events of children
|
|
@@ -7,23 +7,24 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.TOOLBAR_BUTTON = void 0;
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
11
|
var _react2 = require("@emotion/react");
|
|
13
12
|
var _analyticsListeners = require("@atlaskit/analytics-listeners");
|
|
14
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
15
14
|
var _analytics = require("../../analytics");
|
|
16
15
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
17
|
-
var _templateObject; // This file is copied to `packages/editor/editor-plugin-ai/src/ui/components/AtlassianIntelligenceToolbarButton/ToolbarButton/index.tsx`
|
|
18
|
-
// If you make any change here, copy it to above file as well
|
|
19
|
-
// and notify about the change in #team-fc-editor-ai-dev channel.
|
|
20
|
-
/** @jsx jsx */
|
|
21
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
18
|
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; }
|
|
24
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
19
|
+
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) { (0, _defineProperty2.default)(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; } // This file is copied to `packages/editor/editor-plugin-ai/src/ui/components/AtlassianIntelligenceToolbarButton/ToolbarButton/index.tsx`
|
|
20
|
+
// If you make any change here, copy it to above file as well
|
|
21
|
+
// and notify about the change in #team-fc-editor-ai-dev channel.
|
|
22
|
+
/** @jsx jsx */
|
|
25
23
|
var TOOLBAR_BUTTON = exports.TOOLBAR_BUTTON = _analytics.TOOLBAR_ACTION_SUBJECT_ID;
|
|
26
|
-
var buttonWrapper = (0, _react2.css)(
|
|
24
|
+
var buttonWrapper = (0, _react2.css)({
|
|
25
|
+
display: 'flex',
|
|
26
|
+
height: '100%'
|
|
27
|
+
});
|
|
27
28
|
var ToolbarButton = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
28
29
|
var buttonId = props.buttonId,
|
|
29
30
|
testId = props.testId,
|
|
@@ -8,20 +8,9 @@ export const fireAnalyticsEvent = createAnalyticsEvent => ({
|
|
|
8
8
|
if (!createAnalyticsEvent) {
|
|
9
9
|
return;
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (queueAnalytics) {
|
|
18
|
-
const queue = AnalyticsQueue.get();
|
|
19
|
-
queue.schedule(() => {
|
|
20
|
-
var _createAnalyticsEvent;
|
|
21
|
-
return (_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel);
|
|
22
|
-
});
|
|
23
|
-
} else {
|
|
24
|
-
var _createAnalyticsEvent2;
|
|
25
|
-
(_createAnalyticsEvent2 = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent2 === void 0 ? void 0 : _createAnalyticsEvent2.fire(channel);
|
|
26
|
-
}
|
|
11
|
+
const queue = AnalyticsQueue.get();
|
|
12
|
+
queue.schedule(() => {
|
|
13
|
+
var _createAnalyticsEvent;
|
|
14
|
+
return (_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel);
|
|
15
|
+
});
|
|
27
16
|
};
|
|
@@ -7,12 +7,12 @@ import { FloatingToolbarButton as Button } from '../ui';
|
|
|
7
7
|
/**
|
|
8
8
|
* Applying `pointer-events: none;` when disabled allows the Tooltip to be displayed
|
|
9
9
|
*/
|
|
10
|
-
const buttonStyle = css
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const buttonStyleNoneEvent = css
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
const buttonStyle = css({
|
|
11
|
+
pointerEvents: 'auto'
|
|
12
|
+
});
|
|
13
|
+
const buttonStyleNoneEvent = css({
|
|
14
|
+
pointerEvents: 'none'
|
|
15
|
+
});
|
|
16
16
|
const DisallowedWrapper = ({
|
|
17
17
|
disabled,
|
|
18
18
|
...props
|
|
@@ -24,12 +24,12 @@ const DisallowedWrapper = ({
|
|
|
24
24
|
* The button requires `pointer-events: none;` in order to fix the tooltip, hence
|
|
25
25
|
* leaving us without a disabled cursor, the following fixes this:
|
|
26
26
|
*/
|
|
27
|
-
const defaultWrapperStyle = css
|
|
28
|
-
cursor: pointer
|
|
29
|
-
|
|
30
|
-
const disallowedWrapperStyle = css
|
|
31
|
-
cursor: not-allowed
|
|
32
|
-
|
|
27
|
+
const defaultWrapperStyle = css({
|
|
28
|
+
cursor: 'pointer'
|
|
29
|
+
});
|
|
30
|
+
const disallowedWrapperStyle = css({
|
|
31
|
+
cursor: 'not-allowed'
|
|
32
|
+
});
|
|
33
33
|
export const LinkToolbarButtonGroup = ({
|
|
34
34
|
options
|
|
35
35
|
}) => {
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { ButtonItem, Section } from '@atlaskit/menu';
|
|
5
|
-
const itemBefore = css
|
|
6
|
-
width: 40px
|
|
7
|
-
height: 40px
|
|
8
|
-
|
|
9
|
-
display: flex
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
const 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
|
+
});
|
|
14
14
|
export const ViewMore = ({
|
|
15
15
|
item,
|
|
16
16
|
focus
|
|
@@ -32,9 +32,9 @@ export const ViewMore = ({
|
|
|
32
32
|
"data-testid": "view-more-elements-item"
|
|
33
33
|
// @ts-ignore Overriding Menu styles is not supported
|
|
34
34
|
,
|
|
35
|
-
css: css
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
css: css({
|
|
36
|
+
padding: `0px ${"var(--ds-space-150, 12px)"}`
|
|
37
|
+
}),
|
|
38
38
|
ref: ref
|
|
39
39
|
}, item.title));
|
|
40
40
|
};
|
|
@@ -3,13 +3,13 @@ import React from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import Loadable from 'react-loadable';
|
|
5
5
|
import Spinner from '@atlaskit/spinner';
|
|
6
|
-
const spinnerContainer = css
|
|
7
|
-
display: flex
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
height: 100
|
|
11
|
-
width: 100
|
|
12
|
-
|
|
6
|
+
const spinnerContainer = css({
|
|
7
|
+
display: 'flex',
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
height: '100%',
|
|
11
|
+
width: '100%'
|
|
12
|
+
});
|
|
13
13
|
const ElementBrowserLoader = Loadable({
|
|
14
14
|
loader: () => import( /* webpackChunkName: "@atlaskit-internal_editor-element-browser" */'../ElementBrowser').then(module => module.default),
|
|
15
15
|
loading: () => jsx("div", {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
|
-
const imageContainer = css
|
|
4
|
-
width: 120px
|
|
5
|
-
height: 111px
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
const imageContainer = css({
|
|
4
|
+
width: '120px',
|
|
5
|
+
height: '111px',
|
|
6
|
+
marginTop: "var(--ds-space-600, 48px)"
|
|
7
|
+
});
|
|
8
8
|
|
|
9
9
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
10
10
|
export default function NotFoundIllustration() {
|
|
@@ -29,9 +29,9 @@ import { WidthObserver } from '@atlaskit/width-detector';
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
-
const widthObserverWrapper = css
|
|
33
|
-
position: relative
|
|
34
|
-
|
|
32
|
+
const widthObserverWrapper = css({
|
|
33
|
+
position: 'relative'
|
|
34
|
+
});
|
|
35
35
|
export default function useContainerWidth() {
|
|
36
36
|
const [containerWidth, setContainerWidth] = useState(0);
|
|
37
37
|
const ref = useRef(null);
|
|
@@ -25,44 +25,44 @@ import { filterUniqueItems, mapContentTypeToIcon, sha1, wordCount } from './util
|
|
|
25
25
|
* Visible only to screenreaders. Use when there is a need
|
|
26
26
|
* to provide more context to a non-sighted user.
|
|
27
27
|
*/
|
|
28
|
-
export const visuallyHiddenStyles = css
|
|
29
|
-
clip: rect(1px, 1px, 1px, 1px)
|
|
30
|
-
|
|
31
|
-
height: 1px
|
|
32
|
-
width: 1px
|
|
33
|
-
margin:
|
|
34
|
-
overflow: hidden
|
|
35
|
-
padding: 0
|
|
36
|
-
position: absolute
|
|
37
|
-
|
|
28
|
+
export const visuallyHiddenStyles = css({
|
|
29
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
30
|
+
clipPath: 'inset(50%)',
|
|
31
|
+
height: '1px',
|
|
32
|
+
width: '1px',
|
|
33
|
+
margin: "var(--ds-space-negative-025, -2px)",
|
|
34
|
+
overflow: 'hidden',
|
|
35
|
+
padding: 0,
|
|
36
|
+
position: 'absolute'
|
|
37
|
+
});
|
|
38
38
|
export const RECENT_SEARCH_LIST_SIZE = 5;
|
|
39
|
-
const clearText = css
|
|
40
|
-
cursor: pointer
|
|
41
|
-
padding: 0
|
|
42
|
-
|
|
43
|
-
color:
|
|
44
|
-
background: transparent
|
|
45
|
-
border: none
|
|
46
|
-
|
|
47
|
-
const clearTextWrapper = css
|
|
48
|
-
position: absolute
|
|
49
|
-
right: 0
|
|
50
|
-
|
|
51
|
-
const containerPadding = css
|
|
52
|
-
padding:
|
|
53
|
-
|
|
54
|
-
const textLabelMargin = css
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const inputLabel = css
|
|
58
|
-
|
|
59
|
-
color:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
const inputWrapperPosition = css
|
|
64
|
-
position: relative
|
|
65
|
-
|
|
39
|
+
const clearText = css({
|
|
40
|
+
cursor: 'pointer',
|
|
41
|
+
padding: 0,
|
|
42
|
+
marginRight: "var(--ds-space-100, 8px)",
|
|
43
|
+
color: `var(--ds-icon-subtle, ${N90})`,
|
|
44
|
+
background: 'transparent',
|
|
45
|
+
border: 'none'
|
|
46
|
+
});
|
|
47
|
+
const clearTextWrapper = css({
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
right: 0
|
|
50
|
+
});
|
|
51
|
+
const containerPadding = css({
|
|
52
|
+
padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-100, 8px)"}`
|
|
53
|
+
});
|
|
54
|
+
const textLabelMargin = css({
|
|
55
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
56
|
+
});
|
|
57
|
+
const inputLabel = css({
|
|
58
|
+
fontSize: `${fontSizeSmall()}px`,
|
|
59
|
+
color: `var(--ds-text-subtlest, ${N200})`,
|
|
60
|
+
fontWeight: 500,
|
|
61
|
+
paddingBottom: "var(--ds-space-050, 4px)"
|
|
62
|
+
});
|
|
63
|
+
const inputWrapperPosition = css({
|
|
64
|
+
position: 'relative'
|
|
65
|
+
});
|
|
66
66
|
export const messages = defineMessages({
|
|
67
67
|
displayText: {
|
|
68
68
|
id: 'fabric.editor.displayText',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "78.30.
|
|
3
|
+
const packageVersion = "78.30.1";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -5,18 +5,18 @@ import { css, jsx } from '@emotion/react';
|
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import { N200, N400 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { messages } from './messages';
|
|
8
|
-
const captionWrapperStyle = css
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
position: relative
|
|
12
|
-
color:
|
|
13
|
-
|
|
14
|
-
const placeholderStyle = css
|
|
15
|
-
color:
|
|
16
|
-
position: absolute
|
|
17
|
-
top: 0
|
|
18
|
-
width: 100
|
|
19
|
-
|
|
8
|
+
const captionWrapperStyle = css({
|
|
9
|
+
marginTop: "var(--ds-space-100, 8px)",
|
|
10
|
+
textAlign: 'center',
|
|
11
|
+
position: 'relative',
|
|
12
|
+
color: `var(--ds-text-subtle, ${N400})`
|
|
13
|
+
});
|
|
14
|
+
const placeholderStyle = css({
|
|
15
|
+
color: `var(--ds-text-subtlest, ${N200})`,
|
|
16
|
+
position: 'absolute',
|
|
17
|
+
top: 0,
|
|
18
|
+
width: '100%'
|
|
19
|
+
});
|
|
20
20
|
export class CaptionComponent extends React.Component {
|
|
21
21
|
render() {
|
|
22
22
|
const {
|