@atlaskit/editor-common 76.27.8 → 76.27.10
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 +15 -0
- package/dist/cjs/media-inline/constants.js +21 -2
- package/dist/cjs/media-inline/inline-image-wrapper.js +4 -2
- package/dist/cjs/media-inline/media-inline-image-card.js +3 -3
- package/dist/cjs/media-inline/styles.js +11 -3
- package/dist/cjs/media-inline/views/icon-wrapper.js +1 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +6 -1
- package/dist/cjs/styles/shared/annotation.js +5 -22
- package/dist/cjs/styles/shared/code-block.js +4 -20
- package/dist/cjs/styles/shared/code-mark.js +2 -6
- package/dist/cjs/styles/shared/panel.js +9 -62
- package/dist/cjs/styles/shared/rule.js +2 -8
- package/dist/cjs/ui/BaseTheme/index.js +8 -15
- package/dist/cjs/ui/DropList/index.js +4 -17
- package/dist/cjs/ui/Expand/index.js +13 -38
- package/dist/cjs/ui/Messages/index.js +6 -6
- package/dist/cjs/ui/PortalProvider/index.js +7 -21
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +5 -13
- package/dist/cjs/ui-menu/DropdownMenu/index.js +10 -27
- package/dist/es2019/media-inline/constants.js +20 -1
- package/dist/es2019/media-inline/inline-image-wrapper.js +4 -2
- package/dist/es2019/media-inline/media-inline-image-card.js +3 -3
- package/dist/es2019/media-inline/styles.js +24 -9
- package/dist/es2019/media-inline/views/icon-wrapper.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +7 -1
- package/dist/es2019/styles/shared/annotation.js +9 -28
- package/dist/es2019/styles/shared/code-block.js +11 -27
- package/dist/es2019/styles/shared/code-mark.js +3 -7
- package/dist/es2019/styles/shared/panel.js +24 -83
- package/dist/es2019/styles/shared/rule.js +3 -9
- package/dist/es2019/ui/BaseTheme/index.js +3 -11
- package/dist/es2019/ui/DropList/index.js +7 -17
- package/dist/es2019/ui/Expand/index.js +18 -44
- package/dist/es2019/ui/Messages/index.js +6 -6
- package/dist/es2019/ui/PortalProvider/index.js +7 -21
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +7 -15
- package/dist/es2019/ui-menu/DropdownMenu/index.js +34 -49
- package/dist/esm/media-inline/constants.js +20 -1
- package/dist/esm/media-inline/inline-image-wrapper.js +4 -2
- package/dist/esm/media-inline/media-inline-image-card.js +3 -3
- package/dist/esm/media-inline/styles.js +11 -3
- package/dist/esm/media-inline/views/icon-wrapper.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +7 -1
- package/dist/esm/styles/shared/annotation.js +5 -22
- package/dist/esm/styles/shared/code-block.js +6 -22
- package/dist/esm/styles/shared/code-mark.js +3 -7
- package/dist/esm/styles/shared/panel.js +10 -63
- package/dist/esm/styles/shared/rule.js +3 -9
- package/dist/esm/ui/BaseTheme/index.js +9 -15
- package/dist/esm/ui/DropList/index.js +5 -18
- package/dist/esm/ui/Expand/index.js +14 -39
- package/dist/esm/ui/Messages/index.js +6 -6
- package/dist/esm/ui/PortalProvider/index.js +7 -21
- package/dist/esm/ui-menu/ColorPickerButton/index.js +6 -14
- package/dist/esm/ui-menu/DropdownMenu/index.js +11 -28
- package/dist/types/media-inline/constants.d.ts +18 -0
- package/dist/types/media-inline/styles.d.ts +6 -0
- package/dist/types/styles/shared/annotation.d.ts +2 -3
- package/dist/types/styles/shared/code-block.d.ts +1 -2
- package/dist/types/styles/shared/code-mark.d.ts +1 -2
- package/dist/types/styles/shared/panel.d.ts +4 -5
- package/dist/types/styles/shared/rule.d.ts +1 -2
- package/dist/types/ui/BaseTheme/index.d.ts +1 -1
- package/dist/types/ui/Expand/index.d.ts +4 -5
- package/dist/types/ui/Messages/index.d.ts +1 -1
- package/dist/types/ui/PortalProvider/index.d.ts +4 -8
- package/dist/types/utils/getModeFromTheme.d.ts +1 -1
- package/dist/types-ts4.5/media-inline/constants.d.ts +18 -0
- package/dist/types-ts4.5/media-inline/styles.d.ts +6 -0
- package/dist/types-ts4.5/styles/shared/annotation.d.ts +2 -3
- package/dist/types-ts4.5/styles/shared/code-block.d.ts +1 -2
- package/dist/types-ts4.5/styles/shared/code-mark.d.ts +1 -2
- package/dist/types-ts4.5/styles/shared/panel.d.ts +4 -5
- package/dist/types-ts4.5/styles/shared/rule.d.ts +1 -2
- package/dist/types-ts4.5/ui/BaseTheme/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/Expand/index.d.ts +4 -5
- package/dist/types-ts4.5/ui/Messages/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +4 -8
- package/dist/types-ts4.5/utils/getModeFromTheme.d.ts +1 -1
- package/package.json +2 -2
- package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +0 -43
- package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +0 -37
- package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +0 -36
- package/dist/types/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
- package/dist/types-ts4.5/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
|
@@ -14,12 +14,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
14
14
|
import { Component } from 'react';
|
|
15
15
|
import { css, jsx } from '@emotion/react';
|
|
16
16
|
import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
17
|
-
import {
|
|
18
|
-
import { themed } from '@atlaskit/theme/components';
|
|
19
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
17
|
+
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
20
18
|
import Layer from '../Layer';
|
|
21
19
|
var packageName = "@atlaskit/editor-common";
|
|
22
|
-
var packageVersion = "76.27.
|
|
20
|
+
var packageVersion = "76.27.10";
|
|
23
21
|
var halfFocusRing = 1;
|
|
24
22
|
var dropOffset = '0, 8';
|
|
25
23
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -35,14 +33,8 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
35
33
|
_defineProperty(_assertThisInitialized(_this), "wrapperStyles", css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n "])), _this.props.shouldFitContainer ? 'display: block; flex: 1 1 auto;' : 'display: inline-flex;'));
|
|
36
34
|
_defineProperty(_assertThisInitialized(_this), "triggerStyles", css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n ", "\n "])), _this.props.shouldFitContainer ? 'display: block; box-sizing: border-box;' : 'display: inline-flex;'));
|
|
37
35
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
38
|
-
_defineProperty(_assertThisInitialized(_this), "menuWrapper", function (
|
|
39
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-radius: ", "
|
|
40
|
-
light: "var(--ds-text, ".concat(N900, ")"),
|
|
41
|
-
dark: "var(--ds-text, ".concat(DN600, ")")
|
|
42
|
-
})(theme), themed({
|
|
43
|
-
light: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
44
|
-
dark: "var(--ds-surface-overlay, ".concat(DN50, ")")
|
|
45
|
-
})(theme), borderRadius(), "var(--ds-shadow-overlay, ".concat("0 4px 8px calc(-1 * 2px) ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"), "var(--ds-space-050, 4px)");
|
|
36
|
+
_defineProperty(_assertThisInitialized(_this), "menuWrapper", function () {
|
|
37
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n box-sizing: border-box;\n overflow: auto;\n padding: ", " 0;\n max-height: 90vh;\n "])), "var(--ds-text, ".concat(N900, ")"), "var(--ds-surface-overlay, ".concat(N0, ")"), "var(--ds-border-radius, 3px)", "var(--ds-shadow-overlay, ".concat("0 4px 8px calc(-1 * 2px) ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"), "var(--ds-space-050, 4px)");
|
|
46
38
|
});
|
|
47
39
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
48
40
|
_defineProperty(_assertThisInitialized(_this), "componentDidMount", function () {
|
|
@@ -118,7 +110,6 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
118
110
|
_createClass(DropList, [{
|
|
119
111
|
key: "render",
|
|
120
112
|
value: function render() {
|
|
121
|
-
var _this2 = this;
|
|
122
113
|
var _this$props = this.props,
|
|
123
114
|
children = _this$props.children,
|
|
124
115
|
isOpen = _this$props.isOpen,
|
|
@@ -128,11 +119,7 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
128
119
|
testId = _this$props.testId,
|
|
129
120
|
id = _this$props.id;
|
|
130
121
|
var layerContent = isOpen ? jsx("div", {
|
|
131
|
-
css:
|
|
132
|
-
return _this2.menuWrapper({
|
|
133
|
-
theme: theme
|
|
134
|
-
});
|
|
135
|
-
},
|
|
122
|
+
css: this.menuWrapper,
|
|
136
123
|
"data-role": "droplistContent",
|
|
137
124
|
"data-testid": testId && "".concat(testId, "--content"),
|
|
138
125
|
ref: this.handleContentRef,
|
|
@@ -9,8 +9,7 @@ import React, { forwardRef } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { defineMessages } from 'react-intl-next';
|
|
11
11
|
import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
12
|
-
import { B300,
|
|
13
|
-
import { themed } from '@atlaskit/theme/components';
|
|
12
|
+
import { B300, N200, N200A, N300A, N30A, N40A, N50A, N90 } from '@atlaskit/theme/colors';
|
|
14
13
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
15
14
|
import { fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
16
15
|
export var messages = defineMessages({
|
|
@@ -37,30 +36,21 @@ export var messages = defineMessages({
|
|
|
37
36
|
});
|
|
38
37
|
var BORDER_RADIUS = "var(--ds-border-radius-100, 4px)";
|
|
39
38
|
var EXPAND_COLLAPSED_BACKGROUND = "var(--ds-background-neutral-subtle, transparent)";
|
|
40
|
-
var EXPAND_SELECTED_BACKGROUND =
|
|
41
|
-
light: "var(--ds-surface, rgba(255, 255, 255, 0.6))",
|
|
42
|
-
dark: "var(--ds-surface, rgba(9, 10, 11, 0.29))"
|
|
43
|
-
});
|
|
39
|
+
var EXPAND_SELECTED_BACKGROUND = "var(--ds-surface, rgba(255, 255, 255, 0.6))";
|
|
44
40
|
var EXPAND_FOCUSED_BORDER_COLOR = "var(--ds-border-focused, ".concat(B300, ")");
|
|
45
41
|
var EXPAND_COLLAPSED_BORDER_COLOR = 'transparent';
|
|
46
|
-
var EXPAND_EXPANDED_BORDER_COLOR =
|
|
47
|
-
light: "var(--ds-border, ".concat(N40A, ")"),
|
|
48
|
-
dark: "var(--ds-border, ".concat(DN50, ")")
|
|
49
|
-
});
|
|
42
|
+
var EXPAND_EXPANDED_BORDER_COLOR = "var(--ds-border, ".concat(N40A, ")");
|
|
50
43
|
export var ExpandIconWrapper = function ExpandIconWrapper(_ref) {
|
|
51
44
|
var children = _ref.children,
|
|
52
45
|
expanded = _ref.expanded;
|
|
53
46
|
return jsx("div", {
|
|
54
|
-
css: function css(
|
|
55
|
-
return expanded ? [expandIconWrapperStyle(
|
|
47
|
+
css: function css() {
|
|
48
|
+
return expanded ? [expandIconWrapperStyle(), expandIconWrapperExpandedStyle] : expandIconWrapperStyle();
|
|
56
49
|
}
|
|
57
50
|
}, children);
|
|
58
51
|
};
|
|
59
|
-
var expandIconWrapperStyle = function expandIconWrapperStyle(
|
|
60
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n display: flex;\n color: ", ";\n border-radius: ", ";\n width: 24px;\n height: 24px;\n\n &:hover {\n background: ", ";\n }\n\n svg {\n transition: transform 0.2s ", ";\n }\n"])),
|
|
61
|
-
light: "var(--ds-icon, ".concat(N90, ")"),
|
|
62
|
-
dark: "var(--ds-icon, #d9dde3)"
|
|
63
|
-
})(props), "var(--ds-border-radius-100, 4px)", "var(--ds-background-neutral-subtle-hovered, ".concat(N30A, ")"), akEditorSwoopCubicBezier);
|
|
52
|
+
var expandIconWrapperStyle = function expandIconWrapperStyle() {
|
|
53
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n display: flex;\n color: ", ";\n border-radius: ", ";\n width: 24px;\n height: 24px;\n\n &:hover {\n background: ", ";\n }\n\n svg {\n transition: transform 0.2s ", ";\n }\n"])), "var(--ds-icon, ".concat(N90, ")"), "var(--ds-border-radius-100, 4px)", "var(--ds-background-neutral-subtle-hovered, ".concat(N30A, ")"), akEditorSwoopCubicBezier);
|
|
64
54
|
};
|
|
65
55
|
var expandIconWrapperExpandedStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n svg {\n transform: rotate(90deg);\n }\n"])));
|
|
66
56
|
export var expandLayoutWrapperStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", ";\n height: ", ";\n"])), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)");
|
|
@@ -82,35 +72,20 @@ var containerStyles = function containerStyles(styleProps) {
|
|
|
82
72
|
// and is the root level expand.
|
|
83
73
|
var marginHorizontal = styleProps['data-node-type'] === 'expand' ? "-".concat(akLayoutGutterOffset, "px") : 0;
|
|
84
74
|
var margin = "".concat(marginTop, " ").concat(marginHorizontal, " ").concat(marginBottom);
|
|
85
|
-
return function (
|
|
86
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", ";\n min-height: 25px;\n background: ", ";\n margin: ", ";\n\n transition: background 0.3s ", ",\n border-color 0.3s ", ";\n padding: ", ";\n\n &:hover {\n // TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n // This is because the default state already uses the same token and, as such, the hover style won't change anything.\n // https://product-fabric.atlassian.net/browse/DSP-4152\n border: 1px solid
|
|
87
|
-
light: "var(--ds-border, ".concat(N50A, ")"),
|
|
88
|
-
dark: "var(--ds-border, ".concat(DN50, ")")
|
|
89
|
-
})(themeProps), EXPAND_SELECTED_BACKGROUND(themeProps));
|
|
75
|
+
return function () {
|
|
76
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", ";\n min-height: 25px;\n background: ", ";\n margin: ", ";\n\n transition: background 0.3s ", ",\n border-color 0.3s ", ";\n padding: ", ";\n\n &:hover {\n // TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n // This is because the default state already uses the same token and, as such, the hover style won't change anything.\n // https://product-fabric.atlassian.net/browse/DSP-4152\n border: 1px solid ", ";\n background: ", ";\n }\n\n td > :not(style):first-child,\n td > style:first-child + * {\n margin-top: 0;\n }\n "])), focused ? EXPAND_FOCUSED_BORDER_COLOR : expanded ? EXPAND_EXPANDED_BORDER_COLOR : EXPAND_COLLAPSED_BORDER_COLOR, BORDER_RADIUS, !expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND, margin, akEditorSwoopCubicBezier, akEditorSwoopCubicBezier, "var(--ds-space-100, 8px)", "var(--ds-border, ".concat(N50A, ")"), EXPAND_SELECTED_BACKGROUND);
|
|
90
77
|
};
|
|
91
78
|
};
|
|
92
79
|
var contentStyles = function contentStyles(styleProps) {
|
|
93
|
-
return function (
|
|
80
|
+
return function () {
|
|
94
81
|
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-top: ", ";\n padding-right: ", ";\n // TODO: Migrate away from gridSize\n // Recommendation: Replace gridSize with 8 if important to highlight 8*4 - 8/2, or directly replace with 28px\n padding-left: ", "px;\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)", gridSize() * 4 - gridSize() / 2, !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 " : '');
|
|
95
82
|
};
|
|
96
83
|
};
|
|
97
|
-
var titleInputStyles = function titleInputStyles(
|
|
98
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n outline: none;\n border: none;\n font-size: ", ";\n line-height: ", ";\n font-weight: normal;\n color: ", ";\n background: transparent;\n display: flex;\n flex: 1;\n padding: 0 0 0 ", ";\n width: 100%;\n\n &::placeholder {\n opacity:
|
|
99
|
-
light: "var(--ds-text-subtlest, ".concat(N200A, ")"),
|
|
100
|
-
dark: "var(--ds-text-subtlest, ".concat(DN600, ")")
|
|
101
|
-
})(props), "var(--ds-space-050, 4px)", themed({
|
|
102
|
-
light: 1,
|
|
103
|
-
dark: 0.6
|
|
104
|
-
})(props), themed({
|
|
105
|
-
light: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
106
|
-
dark: "var(--ds-text-subtlest, ".concat(DN600, ")")
|
|
107
|
-
})(props));
|
|
84
|
+
var titleInputStyles = function titleInputStyles() {
|
|
85
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n outline: none;\n border: none;\n font-size: ", ";\n line-height: ", ";\n font-weight: normal;\n color: ", ";\n background: transparent;\n display: flex;\n flex: 1;\n padding: 0 0 0 ", ";\n width: 100%;\n\n &::placeholder {\n opacity: 1;\n color: ", ";\n }\n"])), relativeFontSizeToBase16(fontSize()), akEditorLineHeight, "var(--ds-text-subtlest, ".concat(N200A, ")"), "var(--ds-space-050, 4px)", "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
108
86
|
};
|
|
109
|
-
var titleContainerStyles = function titleContainerStyles(
|
|
110
|
-
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding: 0;\n display: flex;\n align-items: flex-start;\n background: none;\n border: none;\n font-size: ", ";\n width: 100%;\n color: ", ";\n overflow: hidden;\n cursor: pointer;\n\n &:focus {\n outline: 0;\n }\n"])), relativeFontSizeToBase16(fontSize()),
|
|
111
|
-
light: "var(--ds-text-subtle, ".concat(N300A, ")"),
|
|
112
|
-
dark: "var(--ds-text-subtle, ".concat(DN600, ")")
|
|
113
|
-
})(props));
|
|
87
|
+
var titleContainerStyles = function titleContainerStyles() {
|
|
88
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n padding: 0;\n display: flex;\n align-items: flex-start;\n background: none;\n border: none;\n font-size: ", ";\n width: 100%;\n color: ", ";\n overflow: hidden;\n cursor: pointer;\n\n &:focus {\n outline: 0;\n }\n"])), relativeFontSizeToBase16(fontSize()), "var(--ds-text-subtle, ".concat(N300A, ")"));
|
|
114
89
|
};
|
|
115
90
|
export var sharedExpandStyles = {
|
|
116
91
|
titleInputStyles: titleInputStyles,
|
|
@@ -9,8 +9,8 @@ import { G400, N200, R400 } from '@atlaskit/theme/colors';
|
|
|
9
9
|
import { h200 } from '@atlaskit/theme/typography';
|
|
10
10
|
var errorColor = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-text-danger, ".concat(R400, ")"));
|
|
11
11
|
var validColor = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-text-success, ".concat(G400, ")"));
|
|
12
|
-
var messageStyle = function messageStyle(
|
|
13
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", ";\n display: flex;\n justify-content: baseline;\n"])), h200(
|
|
12
|
+
var messageStyle = function messageStyle() {
|
|
13
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", ";\n display: flex;\n justify-content: baseline;\n"])), h200(), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-space-050, 4px)");
|
|
14
14
|
};
|
|
15
15
|
var iconWrapperStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n margin-right: ", ";\n"])), "var(--ds-space-050, 4px)");
|
|
16
16
|
export var HelperMessage = function HelperMessage(_ref) {
|
|
@@ -22,8 +22,8 @@ export var HelperMessage = function HelperMessage(_ref) {
|
|
|
22
22
|
export var ErrorMessage = function ErrorMessage(_ref2) {
|
|
23
23
|
var children = _ref2.children;
|
|
24
24
|
return jsx("div", {
|
|
25
|
-
css: function css(
|
|
26
|
-
return [messageStyle(
|
|
25
|
+
css: function css() {
|
|
26
|
+
return [messageStyle(), errorColor];
|
|
27
27
|
}
|
|
28
28
|
}, jsx("span", {
|
|
29
29
|
css: iconWrapperStyle
|
|
@@ -36,8 +36,8 @@ export var ErrorMessage = function ErrorMessage(_ref2) {
|
|
|
36
36
|
export var ValidMessage = function ValidMessage(_ref3) {
|
|
37
37
|
var children = _ref3.children;
|
|
38
38
|
return jsx("div", {
|
|
39
|
-
css: function css(
|
|
40
|
-
return [messageStyle(
|
|
39
|
+
css: function css() {
|
|
40
|
+
return [messageStyle(), validColor];
|
|
41
41
|
}
|
|
42
42
|
}, jsx("span", {
|
|
43
43
|
css: iconWrapperStyle
|
|
@@ -14,15 +14,13 @@ import PropTypes from 'prop-types';
|
|
|
14
14
|
import { createPortal, unmountComponentAtNode, unstable_renderSubtreeIntoContainer } from 'react-dom';
|
|
15
15
|
import { injectIntl, RawIntlProvider, useIntl } from 'react-intl-next';
|
|
16
16
|
import { default as AnalyticsReactContext } from '@atlaskit/analytics-next-stable-react-context';
|
|
17
|
-
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
18
17
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '../../analytics';
|
|
19
18
|
import { EventDispatcher } from '../../event-dispatcher';
|
|
20
19
|
import IntlProviderIfMissingWrapper from '../IntlProviderIfMissingWrapper';
|
|
21
|
-
import { PortalProviderThemeProviders } from './PortalProviderThemesProvider';
|
|
22
20
|
export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
23
21
|
_inherits(PortalProviderAPI, _EventDispatcher);
|
|
24
22
|
var _super = _createSuper(PortalProviderAPI);
|
|
25
|
-
function PortalProviderAPI(intl, onAnalyticsEvent, analyticsContext
|
|
23
|
+
function PortalProviderAPI(intl, onAnalyticsEvent, analyticsContext) {
|
|
26
24
|
var _this;
|
|
27
25
|
_classCallCheck(this, PortalProviderAPI);
|
|
28
26
|
_this = _super.call(this);
|
|
@@ -33,7 +31,6 @@ export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
33
31
|
_this.intl = intl;
|
|
34
32
|
_this.onAnalyticsEvent = onAnalyticsEvent;
|
|
35
33
|
_this.useAnalyticsContext = analyticsContext;
|
|
36
|
-
_this.themeMode = themeMode;
|
|
37
34
|
return _this;
|
|
38
35
|
}
|
|
39
36
|
_createClass(PortalProviderAPI, [{
|
|
@@ -46,10 +43,7 @@ export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
46
43
|
hasAnalyticsContext: hasAnalyticsContext,
|
|
47
44
|
hasIntlContext: hasIntlContext
|
|
48
45
|
});
|
|
49
|
-
var
|
|
50
|
-
mode: this.themeMode
|
|
51
|
-
}, children());
|
|
52
|
-
var wrappedChildren = this.useAnalyticsContext ? /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, childrenWithThemeProviders) : childrenWithThemeProviders;
|
|
46
|
+
var wrappedChildren = this.useAnalyticsContext ? /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, children()) : children();
|
|
53
47
|
if (hasIntlContext) {
|
|
54
48
|
wrappedChildren = /*#__PURE__*/React.createElement(RawIntlProvider, {
|
|
55
49
|
value: this.intl
|
|
@@ -65,25 +59,20 @@ export var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
65
59
|
key: "forceUpdate",
|
|
66
60
|
value: function forceUpdate(_ref) {
|
|
67
61
|
var _this2 = this;
|
|
68
|
-
var intl = _ref.intl
|
|
69
|
-
themeMode = _ref.themeMode;
|
|
62
|
+
var intl = _ref.intl;
|
|
70
63
|
this.intl = intl;
|
|
71
|
-
this.themeMode = themeMode;
|
|
72
64
|
this.portals.forEach(function (portal, container) {
|
|
73
65
|
if (!portal.hasAnalyticsContext && !_this2.useAnalyticsContext && !portal.hasIntlContext) {
|
|
74
66
|
return;
|
|
75
67
|
}
|
|
76
68
|
var wrappedChildren = portal.children();
|
|
77
|
-
var childrenWithThemeProviders = /*#__PURE__*/React.createElement(PortalProviderThemeProviders, {
|
|
78
|
-
mode: themeMode
|
|
79
|
-
}, wrappedChildren);
|
|
80
69
|
if (portal.hasAnalyticsContext && _this2.useAnalyticsContext) {
|
|
81
|
-
wrappedChildren = /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null,
|
|
70
|
+
wrappedChildren = /*#__PURE__*/React.createElement(AnalyticsContextWrapper, null, wrappedChildren);
|
|
82
71
|
}
|
|
83
72
|
if (portal.hasIntlContext) {
|
|
84
73
|
wrappedChildren = /*#__PURE__*/React.createElement(RawIntlProvider, {
|
|
85
74
|
value: _this2.intl
|
|
86
|
-
},
|
|
75
|
+
}, wrappedChildren);
|
|
87
76
|
}
|
|
88
77
|
unstable_renderSubtreeIntoContainer(_this2.context, wrappedChildren, container);
|
|
89
78
|
});
|
|
@@ -131,7 +120,7 @@ var BasePortalProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
131
120
|
var _this3;
|
|
132
121
|
_classCallCheck(this, BasePortalProvider);
|
|
133
122
|
_this3 = _super2.call(this, props);
|
|
134
|
-
_this3.portalProviderAPI = new PortalProviderAPI(props.intl, props.onAnalyticsEvent, props.useAnalyticsContext
|
|
123
|
+
_this3.portalProviderAPI = new PortalProviderAPI(props.intl, props.onAnalyticsEvent, props.useAnalyticsContext);
|
|
135
124
|
return _this3;
|
|
136
125
|
}
|
|
137
126
|
_createClass(BasePortalProvider, [{
|
|
@@ -143,8 +132,7 @@ var BasePortalProvider = /*#__PURE__*/function (_React$Component) {
|
|
|
143
132
|
key: "componentDidUpdate",
|
|
144
133
|
value: function componentDidUpdate() {
|
|
145
134
|
this.portalProviderAPI.forceUpdate({
|
|
146
|
-
intl: this.props.intl
|
|
147
|
-
themeMode: this.props.themeMode
|
|
135
|
+
intl: this.props.intl
|
|
148
136
|
});
|
|
149
137
|
}
|
|
150
138
|
}]);
|
|
@@ -167,10 +155,8 @@ var PortalProviderWithThemeAndIntlProviders = function PortalProviderWithThemeAn
|
|
|
167
155
|
useAnalyticsContext = _ref3.useAnalyticsContext,
|
|
168
156
|
render = _ref3.render;
|
|
169
157
|
var intl = useIntl();
|
|
170
|
-
var globalTheme = useGlobalTheme();
|
|
171
158
|
return /*#__PURE__*/React.createElement(BasePortalProvider, {
|
|
172
159
|
intl: intl,
|
|
173
|
-
themeMode: globalTheme.mode,
|
|
174
160
|
onAnalyticsEvent: onAnalyticsEvent,
|
|
175
161
|
useAnalyticsContext: useAnalyticsContext,
|
|
176
162
|
render: render
|
|
@@ -7,9 +7,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
7
7
|
import { withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
8
8
|
import Button from '@atlaskit/button';
|
|
9
9
|
import ExpandIcon from '@atlaskit/icon/glyph/chevron-down';
|
|
10
|
-
import {
|
|
11
|
-
import { themed } from '@atlaskit/theme/components';
|
|
12
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
10
|
+
import { N0, N30A, N60A } from '@atlaskit/theme/colors';
|
|
13
11
|
import Tooltip from '@atlaskit/tooltip';
|
|
14
12
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, editorAnalyticsChannel, EVENT_TYPE } from '../../analytics';
|
|
15
13
|
import { ColorPalette, DEFAULT_BORDER_COLOR, getSelectedRowAndColumnFromPalette } from '../../ui-color';
|
|
@@ -25,11 +23,8 @@ var colorPickerExpandContainer = css(_templateObject2 || (_templateObject2 = _ta
|
|
|
25
23
|
// Control the size of color picker buttons and preview
|
|
26
24
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4134
|
|
27
25
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
28
|
-
var colorPickerWrapper = function colorPickerWrapper(
|
|
29
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: ", "
|
|
30
|
-
light: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
31
|
-
dark: "var(--ds-surface-overlay, ".concat(DN50, ")")
|
|
32
|
-
})(theme), N60A, N60A, "var(--ds-space-100, 8px)");
|
|
26
|
+
var colorPickerWrapper = function colorPickerWrapper() {
|
|
27
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: ", ";\n background-color: ", ";\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n padding: ", " 0px;\n"])), "var(--ds-border-radius, 3px)", "var(--ds-surface-overlay, ".concat(N0, ")"), N60A, N60A, "var(--ds-space-100, 8px)");
|
|
33
28
|
};
|
|
34
29
|
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
35
30
|
|
|
@@ -159,13 +154,10 @@ var ColorPickerButton = function ColorPickerButton(props) {
|
|
|
159
154
|
};
|
|
160
155
|
var title = props.title || '';
|
|
161
156
|
var currentColor = props.currentColor && props.hexToPaletteColor ? props.hexToPaletteColor(props.currentColor) : props.currentColor;
|
|
162
|
-
var buttonStyle = function buttonStyle(
|
|
157
|
+
var buttonStyle = function buttonStyle() {
|
|
163
158
|
var _props$size, _props$size2, _props$size3;
|
|
164
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: ", " 10px;\n background-color: ", ";\n ", "\n &:before {\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: center;\n content: '';\n border: 1px solid ", ";\n border-radius: ", "
|
|
165
|
-
!!((_props$size = props.size) !== null && _props$size !== void 0 && _props$size.height) && "height: inherit;", DEFAULT_BORDER_COLOR,
|
|
166
|
-
light: "var(--ds-background-neutral-subtle-hovered, ".concat(N30A, ")"),
|
|
167
|
-
dark: "var(--ds-background-neutral-subtle-hovered, ".concat(N30A, ")")
|
|
168
|
-
})(theme));
|
|
159
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: ", " 10px;\n background-color: ", ";\n ", "\n &:before {\n display: flex;\n justify-content: center;\n align-items: center;\n align-self: center;\n content: '';\n border: 1px solid ", ";\n border-radius: ", ";\n background-color: ", ";\n width: ", ";\n height: ", ";\n padding: 0;\n margin: 0px ", ";\n }\n &:hover {\n background: ", ";\n }\n "])), "var(--ds-space-075, 6px)", "var(--ds-background-neutral-subtle, transparent)", /* If custom props size height, override the button base height property */
|
|
160
|
+
!!((_props$size = props.size) !== null && _props$size !== void 0 && _props$size.height) && "height: inherit;", DEFAULT_BORDER_COLOR, "var(--ds-border-radius, 3px)", currentColor || 'transparent', ((_props$size2 = props.size) === null || _props$size2 === void 0 ? void 0 : _props$size2.width) || '14px', ((_props$size3 = props.size) === null || _props$size3 === void 0 ? void 0 : _props$size3.height) || '14px', "var(--ds-space-025, 2px)", "var(--ds-background-neutral-subtle-hovered, ".concat(N30A, ")"));
|
|
169
161
|
};
|
|
170
162
|
return jsx("div", {
|
|
171
163
|
css: colorPickerButtonWrapper
|
|
@@ -23,8 +23,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
23
23
|
import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
24
24
|
import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
|
|
25
25
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
26
|
-
import { B100,
|
|
27
|
-
import { themed } from '@atlaskit/theme/components';
|
|
26
|
+
import { B100, N70, N900 } from '@atlaskit/theme/colors';
|
|
28
27
|
import Tooltip from '@atlaskit/tooltip';
|
|
29
28
|
import { DropdownMenuSharedCssClassName } from '../../styles';
|
|
30
29
|
import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
|
|
@@ -36,28 +35,14 @@ import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
|
|
|
36
35
|
var wrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* tooltip in ToolbarButton is display:block */\n & > div > div {\n display: flex;\n }\n"])));
|
|
37
36
|
var focusedMenuItemStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n box-shadow: inset 0px 0px 0px 2px ", ";\n outline: none;\n"])), "var(--ds-border-focused, ".concat(B100, ")"));
|
|
38
37
|
var buttonStyles = function buttonStyles(isActive, submenuActive) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
light: "var(--ds-text, ".concat(N900, ")"),
|
|
48
|
-
dark: "var(--ds-text, ".concat(DN600, ")")
|
|
49
|
-
})(theme), themed({
|
|
50
|
-
light: "var(--ds-background-neutral-subtle-hovered, rgb(244, 245, 247))",
|
|
51
|
-
dark: "var(--ds-background-neutral-subtle-hovered, rgb(59, 71, 92))"
|
|
52
|
-
})(theme), !submenuActive && "\n > span:active[aria-disabled='false'] {\n background-color: ".concat(themed({
|
|
53
|
-
light: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))",
|
|
54
|
-
dark: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))"
|
|
55
|
-
})(theme), ";\n }"), themed({
|
|
56
|
-
light: "var(--ds-text-disabled, ".concat(N70, ")"),
|
|
57
|
-
dark: "var(--ds-text-disabled, ".concat(DN80, ")")
|
|
58
|
-
})(theme), focusedMenuItemStyle); // The default focus-visible style is removed to ensure consistency across browsers
|
|
59
|
-
}
|
|
60
|
-
};
|
|
38
|
+
if (isActive) {
|
|
39
|
+
/**
|
|
40
|
+
* Hack for item to imitate old dropdown-menu selected styles
|
|
41
|
+
*/
|
|
42
|
+
return css(_templateObject3 || (_templateObject3 = _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
|
+
} else {
|
|
44
|
+
return css(_templateObject4 || (_templateObject4 = _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
|
+
}
|
|
61
46
|
};
|
|
62
47
|
|
|
63
48
|
var DropListWithOutsideListeners = withReactEditorViewOuterListeners(DropList);
|
|
@@ -291,10 +276,8 @@ function DropdownMenuItem(_ref) {
|
|
|
291
276
|
setSubmenuActive(!!event.target.closest(".".concat(DropdownMenuSharedCssClassName.SUBMENU)));
|
|
292
277
|
};
|
|
293
278
|
var dropListItem = jsx("div", {
|
|
294
|
-
css: function css(
|
|
295
|
-
return buttonStyles(item.isActive, submenuActive)
|
|
296
|
-
theme: theme
|
|
297
|
-
});
|
|
279
|
+
css: function css() {
|
|
280
|
+
return buttonStyles(item.isActive, submenuActive);
|
|
298
281
|
},
|
|
299
282
|
tabIndex: -1,
|
|
300
283
|
"aria-disabled": item.isDisabled ? 'true' : 'false',
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
export declare const DEFAULT_IMAGE_WIDTH = 250;
|
|
2
2
|
export declare const DEFAULT_IMAGE_HEIGHT = 200;
|
|
3
3
|
export declare const DEFAULT_INLINE_IMAGE_ASPECT_RATIO: number;
|
|
4
|
+
/**
|
|
5
|
+
* Reference Heights
|
|
6
|
+
*
|
|
7
|
+
* These heights enforce consistent sizes with media inline nodes due to
|
|
8
|
+
* inconsistencies with center aligned inline nodes and text.
|
|
9
|
+
*
|
|
10
|
+
* There is conversation about refactoring media inline nodes to conform to
|
|
11
|
+
* aligning correctly with the surrounding text.
|
|
12
|
+
*/
|
|
13
|
+
export declare const referenceHeights: {
|
|
14
|
+
p: number;
|
|
15
|
+
h1: number;
|
|
16
|
+
h2: number;
|
|
17
|
+
h3: number;
|
|
18
|
+
h4: number;
|
|
19
|
+
h5: number;
|
|
20
|
+
h6: number;
|
|
21
|
+
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export declare const INLINE_IMAGE_WRAPPER_CLASS_NAME = "media-inline-image-wrapper";
|
|
2
2
|
export declare const INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY = "--editor-media-inline-image-aspect-ratio";
|
|
3
|
+
/**
|
|
4
|
+
* Shifting the mediaInline image component (renders image) to align nicely with
|
|
5
|
+
* mediaInline (renders text) is a bit of a testing ground. This numbers represent
|
|
6
|
+
* shift in top and bottom and size adjustments to make up for lack of 1to1 size
|
|
7
|
+
* mapping
|
|
8
|
+
*/
|
|
3
9
|
export declare const mediaInlineImageStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const annotationPrefix = "ak-editor-annotation";
|
|
3
2
|
export declare const AnnotationSharedClassNames: {
|
|
4
3
|
focus: string;
|
|
5
4
|
blur: string;
|
|
6
5
|
draft: string;
|
|
7
6
|
};
|
|
8
|
-
export declare const AnnotationSharedCSSByState: (
|
|
7
|
+
export declare const AnnotationSharedCSSByState: () => {
|
|
9
8
|
focus: import("@emotion/react").SerializedStyles;
|
|
10
9
|
blur: import("@emotion/react").SerializedStyles;
|
|
11
10
|
};
|
|
12
|
-
export declare const annotationSharedStyles: (
|
|
11
|
+
export declare const annotationSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const CodeBlockSharedCssClassName: {
|
|
3
2
|
CODEBLOCK_CONTAINER: string;
|
|
4
3
|
CODEBLOCK_START: string;
|
|
@@ -8,5 +7,5 @@ export declare const CodeBlockSharedCssClassName: {
|
|
|
8
7
|
CODEBLOCK_CONTENT: string;
|
|
9
8
|
DS_CODEBLOCK: string;
|
|
10
9
|
};
|
|
11
|
-
export declare const codeBlockSharedStyles: (
|
|
10
|
+
export declare const codeBlockSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
12
11
|
export declare const codeBlockInListSafariFix: import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const codeMarkSharedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const codeMarkSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
3
2
|
export declare const darkPanelColors: {
|
|
4
3
|
info: string;
|
|
5
4
|
error: string;
|
|
@@ -79,7 +78,7 @@ export declare const PanelSharedSelectors: {
|
|
|
79
78
|
yellowWarningIcon: string;
|
|
80
79
|
copyButton: string;
|
|
81
80
|
};
|
|
82
|
-
export declare const getPanelTypeBackgroundNoTokens: (panelType: Exclude<PanelType, PanelType.CUSTOM
|
|
83
|
-
export declare const getPanelTypeBackground: (panelType: Exclude<PanelType, PanelType.CUSTOM
|
|
84
|
-
export declare const panelSharedStylesWithoutPrefix: (
|
|
85
|
-
export declare const panelSharedStyles: (
|
|
81
|
+
export declare const getPanelTypeBackgroundNoTokens: (panelType: Exclude<PanelType, PanelType.CUSTOM>) => string;
|
|
82
|
+
export declare const getPanelTypeBackground: (panelType: Exclude<PanelType, PanelType.CUSTOM>) => string;
|
|
83
|
+
export declare const panelSharedStylesWithoutPrefix: () => import("@emotion/react").SerializedStyles;
|
|
84
|
+
export declare const panelSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ruleSharedStyles: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
1
|
+
export declare const ruleSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Breakpoints } from '../WidthProvider';
|
|
2
|
+
import type { Breakpoints } from '../WidthProvider';
|
|
3
3
|
export declare function mapBreakpointToLayoutMaxWidth(breakpoint: Breakpoints): 760 | 680;
|
|
4
4
|
type BaseThemeWrapperProps = {
|
|
5
5
|
breakpoint: Breakpoints;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { jsx } from '@emotion/react';
|
|
3
|
-
import type { ThemeProps } from '@atlaskit/theme/types';
|
|
4
3
|
export declare const messages: {
|
|
5
4
|
collapseNode: {
|
|
6
5
|
id: string;
|
|
@@ -35,8 +34,8 @@ export declare const ExpandIconWrapper: ({ children, expanded, }: React.HTMLAttr
|
|
|
35
34
|
export declare const expandLayoutWrapperStyle: import("@emotion/react").SerializedStyles;
|
|
36
35
|
export declare const ExpandLayoutWrapperWithRef: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<any>>;
|
|
37
36
|
export declare const sharedExpandStyles: {
|
|
38
|
-
titleInputStyles: (
|
|
39
|
-
titleContainerStyles: (
|
|
40
|
-
containerStyles: (styleProps: StyleProps) => (
|
|
41
|
-
contentStyles: (styleProps: StyleProps) => (
|
|
37
|
+
titleInputStyles: () => import("@emotion/react").SerializedStyles;
|
|
38
|
+
titleContainerStyles: () => import("@emotion/react").SerializedStyles;
|
|
39
|
+
containerStyles: (styleProps: StyleProps) => () => import("@emotion/react").SerializedStyles;
|
|
40
|
+
contentStyles: (styleProps: StyleProps) => () => import("@emotion/react").SerializedStyles;
|
|
42
41
|
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import type {
|
|
4
|
-
import { FireAnalyticsCallback } from '../../analytics';
|
|
2
|
+
import type { IntlShape, WrappedComponentProps } from 'react-intl-next';
|
|
3
|
+
import type { FireAnalyticsCallback } from '../../analytics';
|
|
5
4
|
import { EventDispatcher } from '../../event-dispatcher';
|
|
6
5
|
export type BasePortalProviderProps = {
|
|
7
6
|
render: (portalProviderAPI: PortalProviderAPI) => React.ReactChild | JSX.Element | null;
|
|
8
7
|
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
9
8
|
useAnalyticsContext?: boolean;
|
|
10
|
-
themeMode?: ThemeModes;
|
|
11
9
|
} & WrappedComponentProps;
|
|
12
10
|
export type Portals = Map<HTMLElement, React.ReactChild>;
|
|
13
11
|
export type PortalRendererState = {
|
|
@@ -24,13 +22,11 @@ export declare class PortalProviderAPI extends EventDispatcher {
|
|
|
24
22
|
intl: IntlShape;
|
|
25
23
|
onAnalyticsEvent?: FireAnalyticsCallback;
|
|
26
24
|
useAnalyticsContext?: boolean;
|
|
27
|
-
|
|
28
|
-
constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean, themeMode?: ThemeModes);
|
|
25
|
+
constructor(intl: IntlShape, onAnalyticsEvent?: FireAnalyticsCallback, analyticsContext?: boolean);
|
|
29
26
|
setContext: (context: any) => void;
|
|
30
27
|
render(children: () => React.ReactChild | JSX.Element | null, container: HTMLElement, hasAnalyticsContext?: boolean, hasIntlContext?: boolean): void;
|
|
31
|
-
forceUpdate({ intl
|
|
28
|
+
forceUpdate({ intl }: {
|
|
32
29
|
intl: IntlShape;
|
|
33
|
-
themeMode: ThemeModes | undefined;
|
|
34
30
|
}): void;
|
|
35
31
|
remove(container: HTMLElement): void;
|
|
36
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function getModeFromTheme(theme: string): "
|
|
1
|
+
export declare function getModeFromTheme(theme: string): "dark" | "light";
|
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
export declare const DEFAULT_IMAGE_WIDTH = 250;
|
|
2
2
|
export declare const DEFAULT_IMAGE_HEIGHT = 200;
|
|
3
3
|
export declare const DEFAULT_INLINE_IMAGE_ASPECT_RATIO: number;
|
|
4
|
+
/**
|
|
5
|
+
* Reference Heights
|
|
6
|
+
*
|
|
7
|
+
* These heights enforce consistent sizes with media inline nodes due to
|
|
8
|
+
* inconsistencies with center aligned inline nodes and text.
|
|
9
|
+
*
|
|
10
|
+
* There is conversation about refactoring media inline nodes to conform to
|
|
11
|
+
* aligning correctly with the surrounding text.
|
|
12
|
+
*/
|
|
13
|
+
export declare const referenceHeights: {
|
|
14
|
+
p: number;
|
|
15
|
+
h1: number;
|
|
16
|
+
h2: number;
|
|
17
|
+
h3: number;
|
|
18
|
+
h4: number;
|
|
19
|
+
h5: number;
|
|
20
|
+
h6: number;
|
|
21
|
+
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export declare const INLINE_IMAGE_WRAPPER_CLASS_NAME = "media-inline-image-wrapper";
|
|
2
2
|
export declare const INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY = "--editor-media-inline-image-aspect-ratio";
|
|
3
|
+
/**
|
|
4
|
+
* Shifting the mediaInline image component (renders image) to align nicely with
|
|
5
|
+
* mediaInline (renders text) is a bit of a testing ground. This numbers represent
|
|
6
|
+
* shift in top and bottom and size adjustments to make up for lack of 1to1 size
|
|
7
|
+
* mapping
|
|
8
|
+
*/
|
|
3
9
|
export declare const mediaInlineImageStyles: import("@emotion/react").SerializedStyles;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const annotationPrefix = "ak-editor-annotation";
|
|
3
2
|
export declare const AnnotationSharedClassNames: {
|
|
4
3
|
focus: string;
|
|
5
4
|
blur: string;
|
|
6
5
|
draft: string;
|
|
7
6
|
};
|
|
8
|
-
export declare const AnnotationSharedCSSByState: (
|
|
7
|
+
export declare const AnnotationSharedCSSByState: () => {
|
|
9
8
|
focus: import("@emotion/react").SerializedStyles;
|
|
10
9
|
blur: import("@emotion/react").SerializedStyles;
|
|
11
10
|
};
|
|
12
|
-
export declare const annotationSharedStyles: (
|
|
11
|
+
export declare const annotationSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
1
|
export declare const CodeBlockSharedCssClassName: {
|
|
3
2
|
CODEBLOCK_CONTAINER: string;
|
|
4
3
|
CODEBLOCK_START: string;
|
|
@@ -8,5 +7,5 @@ export declare const CodeBlockSharedCssClassName: {
|
|
|
8
7
|
CODEBLOCK_CONTENT: string;
|
|
9
8
|
DS_CODEBLOCK: string;
|
|
10
9
|
};
|
|
11
|
-
export declare const codeBlockSharedStyles: (
|
|
10
|
+
export declare const codeBlockSharedStyles: () => import("@emotion/react").SerializedStyles;
|
|
12
11
|
export declare const codeBlockInListSafariFix: import("@emotion/react").SerializedStyles;
|