@atlaskit/editor-common 72.0.0 → 72.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/dist/cjs/analytics/types/enums.js +1 -1
- package/dist/cjs/keymaps/index.js +1 -3
- package/dist/cjs/styles/shared/annotation.js +9 -11
- package/dist/cjs/styles/shared/blockquote.js +1 -3
- package/dist/cjs/styles/shared/code-block.js +11 -13
- package/dist/cjs/styles/shared/code-mark.js +2 -4
- package/dist/cjs/styles/shared/panel.js +24 -28
- package/dist/cjs/styles/shared/rule.js +2 -4
- package/dist/cjs/styles/shared/shadow.js +1 -3
- package/dist/cjs/styles/shared/table.js +22 -24
- package/dist/cjs/ui/Caption/index.js +2 -4
- package/dist/cjs/ui/DropList/index.js +5 -7
- package/dist/cjs/ui/Expand/index.js +17 -19
- package/dist/cjs/ui/Messages/index.js +3 -5
- package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +5 -12
- package/dist/cjs/ui/UnsupportedBlock/index.js +1 -3
- package/dist/cjs/ui/UnsupportedInline/index.js +1 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -7
- package/dist/cjs/ui-color/ColorPalette/index.js +1 -1
- package/dist/cjs/ui-color/index.js +0 -6
- package/dist/cjs/ui-menu/DropdownMenu/index.js +10 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics/types/enums.js +1 -1
- package/dist/es2019/keymaps/index.js +1 -2
- package/dist/es2019/styles/shared/annotation.js +9 -10
- package/dist/es2019/styles/shared/blockquote.js +1 -2
- package/dist/es2019/styles/shared/code-block.js +11 -12
- package/dist/es2019/styles/shared/code-mark.js +2 -3
- package/dist/es2019/styles/shared/panel.js +24 -27
- package/dist/es2019/styles/shared/rule.js +2 -3
- package/dist/es2019/styles/shared/shadow.js +4 -5
- package/dist/es2019/styles/shared/table.js +22 -23
- package/dist/es2019/ui/Caption/index.js +2 -3
- package/dist/es2019/ui/DropList/index.js +5 -6
- package/dist/es2019/ui/Expand/index.js +17 -18
- package/dist/es2019/ui/Messages/index.js +3 -4
- package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +5 -12
- package/dist/es2019/ui/UnsupportedBlock/index.js +2 -3
- package/dist/es2019/ui/UnsupportedInline/index.js +2 -3
- package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -5
- package/dist/es2019/ui-color/ColorPalette/index.js +2 -2
- package/dist/es2019/ui-color/index.js +1 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +11 -12
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics/types/enums.js +1 -1
- package/dist/esm/keymaps/index.js +1 -2
- package/dist/esm/styles/shared/annotation.js +9 -10
- package/dist/esm/styles/shared/blockquote.js +1 -2
- package/dist/esm/styles/shared/code-block.js +11 -12
- package/dist/esm/styles/shared/code-mark.js +2 -3
- package/dist/esm/styles/shared/panel.js +24 -27
- package/dist/esm/styles/shared/rule.js +2 -3
- package/dist/esm/styles/shared/shadow.js +1 -2
- package/dist/esm/styles/shared/table.js +22 -23
- package/dist/esm/ui/Caption/index.js +2 -3
- package/dist/esm/ui/DropList/index.js +5 -6
- package/dist/esm/ui/Expand/index.js +17 -18
- package/dist/esm/ui/Messages/index.js +3 -4
- package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +5 -12
- package/dist/esm/ui/UnsupportedBlock/index.js +1 -2
- package/dist/esm/ui/UnsupportedInline/index.js +1 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -5
- package/dist/esm/ui-color/ColorPalette/index.js +2 -2
- package/dist/esm/ui-color/index.js +1 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +10 -11
- package/dist/esm/version.json +1 -1
- package/dist/types/analytics/types/enums.d.ts +1 -1
- package/dist/types/analytics/types/events.d.ts +3 -2
- package/dist/types/analytics/types/experimental-events.d.ts +0 -1
- package/dist/types/analytics/types/general-events.d.ts +3 -1
- package/dist/types/types/feature-flags.d.ts +15 -5
- package/dist/types/types/floating-toolbar.d.ts +2 -0
- package/dist/types/ui-color/ColorPalette/Palettes/textColorPalette.d.ts +0 -1
- package/dist/types/ui-color/index.d.ts +1 -1
- package/package.json +6 -6
- package/report.api.md +16 -0
|
@@ -13,16 +13,7 @@ import { emojiImage, emojiSprite } from '@atlaskit/emoji';
|
|
|
13
13
|
import * as colors from '@atlaskit/theme/colors';
|
|
14
14
|
import { themed } from '@atlaskit/theme/components';
|
|
15
15
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
16
|
-
|
|
17
|
-
var tokenPanelColor = {
|
|
18
|
-
info: 'color.background.information',
|
|
19
|
-
note: 'color.background.discovery',
|
|
20
|
-
tip: 'color.background.success',
|
|
21
|
-
success: 'color.background.success',
|
|
22
|
-
warning: 'color.background.warning',
|
|
23
|
-
error: 'color.background.danger'
|
|
24
|
-
};
|
|
25
|
-
var lightPanelColor = {
|
|
16
|
+
var lightPanelColors = {
|
|
26
17
|
info: colors.B50,
|
|
27
18
|
note: colors.P50,
|
|
28
19
|
tip: colors.G50,
|
|
@@ -93,20 +84,28 @@ export var darkPanelColors = {
|
|
|
93
84
|
TextColor: '#D9DDE3'
|
|
94
85
|
};
|
|
95
86
|
var lightIconColor = {
|
|
96
|
-
info:
|
|
97
|
-
note:
|
|
98
|
-
tip:
|
|
99
|
-
success:
|
|
100
|
-
warning:
|
|
101
|
-
error:
|
|
87
|
+
info: "var(--ds-icon-information, ".concat(colors.B400, ")"),
|
|
88
|
+
note: "var(--ds-icon-discovery, ".concat(colors.P400, ")"),
|
|
89
|
+
tip: "var(--ds-icon-success, ".concat(colors.G400, ")"),
|
|
90
|
+
success: "var(--ds-icon-success, ".concat(colors.G400, ")"),
|
|
91
|
+
warning: "var(--ds-icon-warning, ".concat(colors.Y400, ")"),
|
|
92
|
+
error: "var(--ds-icon-danger, ".concat(colors.R400, ")")
|
|
102
93
|
};
|
|
103
94
|
var darkIconColor = {
|
|
104
|
-
info:
|
|
105
|
-
note:
|
|
106
|
-
tip:
|
|
107
|
-
success:
|
|
108
|
-
warning:
|
|
109
|
-
error:
|
|
95
|
+
info: "var(--ds-icon-information, ".concat(colors.B100, ")"),
|
|
96
|
+
note: "var(--ds-icon-discovery, ".concat(colors.P100, ")"),
|
|
97
|
+
tip: "var(--ds-icon-success, ".concat(colors.G200, ")"),
|
|
98
|
+
success: "var(--ds-icon-success, ".concat(colors.G200, ")"),
|
|
99
|
+
warning: "var(--ds-icon-warning, ".concat(colors.Y100, ")"),
|
|
100
|
+
error: "var(--ds-icon-danger, ".concat(colors.R200, ")")
|
|
101
|
+
};
|
|
102
|
+
var tokenDarkPanelColors = {
|
|
103
|
+
info: "var(--ds-background-information, ".concat(darkPanelColors['info'], ")"),
|
|
104
|
+
note: "var(--ds-background-discovery, ".concat(darkPanelColors['note'], ")"),
|
|
105
|
+
tip: "var(--ds-background-success, ".concat(darkPanelColors['tip'], ")"),
|
|
106
|
+
success: "var(--ds-background-success, ".concat(darkPanelColors['success'], ")"),
|
|
107
|
+
warning: "var(--ds-background-warning, ".concat(darkPanelColors['warning'], ")"),
|
|
108
|
+
error: "var(--ds-background-danger, ".concat(darkPanelColors['error'], ")")
|
|
110
109
|
}; // New custom icons are a little smaller than predefined icons.
|
|
111
110
|
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
112
111
|
|
|
@@ -177,7 +176,7 @@ var iconDynamicStyles = function iconDynamicStyles(panelType) {
|
|
|
177
176
|
|
|
178
177
|
export var getPanelTypeBackgroundNoTokens = function getPanelTypeBackgroundNoTokens(panelType) {
|
|
179
178
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
180
|
-
var light =
|
|
179
|
+
var light = lightPanelColors[panelType];
|
|
181
180
|
var dark = darkPanelColors[panelType];
|
|
182
181
|
var background = themed({
|
|
183
182
|
light: light,
|
|
@@ -187,11 +186,9 @@ export var getPanelTypeBackgroundNoTokens = function getPanelTypeBackgroundNoTok
|
|
|
187
186
|
};
|
|
188
187
|
export var getPanelTypeBackground = function getPanelTypeBackground(panelType) {
|
|
189
188
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
190
|
-
//
|
|
189
|
+
var light = hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]); // hexToEditorBackgroundPaletteColor has a light mode as a fallback color - for legacy dark mode we define the tokens locally
|
|
191
190
|
|
|
192
|
-
|
|
193
|
-
var light = hexToEditorBackgroundPaletteColor(lightPanelColor[panelType]);
|
|
194
|
-
var dark = token(tokenPanelColor[panelType], darkPanelColors[panelType]);
|
|
191
|
+
var dark = tokenDarkPanelColors[panelType];
|
|
195
192
|
var background = themed({
|
|
196
193
|
light: light,
|
|
197
194
|
dark: dark
|
|
@@ -6,10 +6,9 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { akEditorLineHeight } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { DN50, N30A } from '@atlaskit/theme/colors';
|
|
8
8
|
import { themed } from '@atlaskit/theme/components';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
var divider = themed({
|
|
11
|
-
light:
|
|
12
|
-
dark:
|
|
10
|
+
light: "var(--ds-border, ".concat(N30A, ")"),
|
|
11
|
+
dark: "var(--ds-border, ".concat(DN50, ")")
|
|
13
12
|
}); // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
14
13
|
|
|
15
14
|
export var ruleSharedStyles = function ruleSharedStyles(props) {
|
|
@@ -6,7 +6,6 @@ var _templateObject;
|
|
|
6
6
|
import { css } from '@emotion/react';
|
|
7
7
|
import { akEditorShadowZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { N40A } from '@atlaskit/theme/colors';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
import { shadowClassNames } from '../../ui/OverflowShadow';
|
|
11
10
|
import { shadowObserverClassNames } from '../../ui/OverflowShadow/shadowObserver';
|
|
12
11
|
var shadowWidth = 8;
|
|
@@ -24,5 +23,5 @@ var shadowWidth = 8;
|
|
|
24
23
|
* background-attachment: local, local, scroll, scroll;
|
|
25
24
|
*/
|
|
26
25
|
|
|
27
|
-
var shadowSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &\n .", "::before,\n .", "::after,\n .", "::before,\n .", "::after {\n display: none;\n position: absolute;\n pointer-events: none;\n z-index: ", ";\n width: ", "px;\n content: '';\n /* Scrollbar is outside the content in IE, inset in other browsers. */\n height: calc(100%);\n }\n\n & .", ", .", " {\n position: relative;\n }\n\n & .", "::before {\n background: linear-gradient(\n to left,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n top: 0px;\n left: 0;\n display: block;\n }\n\n & .", "::after {\n background: linear-gradient(\n to right,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: calc(100% - ", "px);\n top: 0px;\n display: block;\n }\n\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n"])), shadowClassNames.RIGHT_SHADOW, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, shadowClassNames.LEFT_SHADOW, akEditorShadowZIndex, shadowWidth, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, shadowClassNames.LEFT_SHADOW,
|
|
26
|
+
var shadowSharedStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &\n .", "::before,\n .", "::after,\n .", "::before,\n .", "::after {\n display: none;\n position: absolute;\n pointer-events: none;\n z-index: ", ";\n width: ", "px;\n content: '';\n /* Scrollbar is outside the content in IE, inset in other browsers. */\n height: calc(100%);\n }\n\n & .", ", .", " {\n position: relative;\n }\n\n & .", "::before {\n background: linear-gradient(\n to left,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n top: 0px;\n left: 0;\n display: block;\n }\n\n & .", "::after {\n background: linear-gradient(\n to right,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: calc(100% - ", "px);\n top: 0px;\n display: block;\n }\n\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n\n & .", " {\n height: 100%;\n width: 0px;\n min-width: 0px;\n }\n"])), shadowClassNames.RIGHT_SHADOW, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, shadowClassNames.LEFT_SHADOW, akEditorShadowZIndex, shadowWidth, shadowClassNames.RIGHT_SHADOW, shadowClassNames.LEFT_SHADOW, shadowClassNames.LEFT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", shadowClassNames.RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", shadowWidth, shadowObserverClassNames.SENTINEL_LEFT, shadowObserverClassNames.SENTINEL_RIGHT);
|
|
28
27
|
export { shadowSharedStyle };
|
|
@@ -9,7 +9,6 @@ import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelected
|
|
|
9
9
|
import { DN20 } from '@atlaskit/theme/colors';
|
|
10
10
|
import { themed } from '@atlaskit/theme/components';
|
|
11
11
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
12
|
-
import { token } from '@atlaskit/tokens';
|
|
13
12
|
import browser from '../../utils/browser';
|
|
14
13
|
import { CodeBlockSharedCssClassName } from './code-block';
|
|
15
14
|
export var tableMarginTop = 24;
|
|
@@ -38,43 +37,43 @@ export var TableSharedCssClassName = {
|
|
|
38
37
|
|
|
39
38
|
var tableSharedStyle = function tableSharedStyle(props) {
|
|
40
39
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-of-type > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > :first-child:not(style),\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]):not(.danger) {\n .", ":not(.danger) {\n background-color: ", ";\n\n :not(.", ") {\n box-shadow: 0px 0px 0px 1px\n ", ";\n }\n\n .", " {\n background-image: ", ";\n\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, themed({
|
|
41
|
-
light:
|
|
42
|
-
dark:
|
|
43
|
-
})(props),
|
|
44
|
-
light:
|
|
45
|
-
dark:
|
|
40
|
+
light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
|
|
41
|
+
dark: "var(--ds-border, ".concat(akEditorTableBorderDark, ")")
|
|
42
|
+
})(props), "var(--ds-background-neutral-subtle, white)", tableCellMinWidth, themed({
|
|
43
|
+
light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
|
|
44
|
+
dark: "var(--ds-border, ".concat(akEditorTableBorderDark, ")")
|
|
46
45
|
})(props), tableCellPadding, browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', themed({
|
|
47
46
|
dark: getTableCellBackgroundDarkModeColors
|
|
48
47
|
})(props), themed({
|
|
49
|
-
light:
|
|
50
|
-
dark:
|
|
48
|
+
light: "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"),
|
|
49
|
+
dark: "var(--ds-background-neutral, ".concat(akEditorTableToolbarDark, ")")
|
|
51
50
|
})(props), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, themed({
|
|
52
|
-
light:
|
|
53
|
-
dark:
|
|
54
|
-
})(props), akEditorSelectedNodeClassName,
|
|
51
|
+
light: "var(--ds-surface-raised, rgb(235, 237, 240))",
|
|
52
|
+
dark: "var(--ds-surface-raised, rgb(36, 47, 66))"
|
|
53
|
+
})(props), akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
|
|
55
54
|
background: themed({
|
|
56
|
-
light:
|
|
57
|
-
dark:
|
|
55
|
+
light: "var(--ds-background-neutral, rgb(235, 237, 240))",
|
|
56
|
+
dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
|
|
58
57
|
})(props),
|
|
59
58
|
leftCoverWidth: "".concat(gridSize() * 3, "px")
|
|
60
59
|
}), themed({
|
|
61
|
-
light:
|
|
62
|
-
dark:
|
|
60
|
+
light: "var(--ds-background-neutral, rgb(235, 237, 240))",
|
|
61
|
+
dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
|
|
63
62
|
})(props), CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, themed({
|
|
64
|
-
light:
|
|
65
|
-
dark:
|
|
63
|
+
light: "var(--ds-background-neutral, rgb(226, 229, 233))",
|
|
64
|
+
dark: "var(--ds-background-neutral, ".concat(DN20, ")")
|
|
66
65
|
})(props), overflowShadow({
|
|
67
66
|
background: themed({
|
|
68
|
-
light:
|
|
69
|
-
dark:
|
|
67
|
+
light: "var(--ds-background-neutral, rgb(235, 237, 240))",
|
|
68
|
+
dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
|
|
70
69
|
})(props),
|
|
71
70
|
leftCoverWidth: "".concat(gridSize() * 3, "px")
|
|
72
71
|
}), themed({
|
|
73
|
-
light:
|
|
74
|
-
dark:
|
|
72
|
+
light: "var(--ds-background-neutral, rgb(235, 237, 240))",
|
|
73
|
+
dark: "var(--ds-background-neutral, rgb(36, 47, 66))"
|
|
75
74
|
})(props), themed({
|
|
76
|
-
light:
|
|
77
|
-
dark:
|
|
75
|
+
light: "var(--ds-background-neutral, rgb(226, 229, 233))",
|
|
76
|
+
dark: "var(--ds-background-neutral, ".concat(DN20, ")")
|
|
78
77
|
})(props));
|
|
79
78
|
};
|
|
80
79
|
|
|
@@ -17,10 +17,9 @@ import React from 'react';
|
|
|
17
17
|
import { css, jsx } from '@emotion/react';
|
|
18
18
|
import { injectIntl } from 'react-intl-next';
|
|
19
19
|
import { N200, N400 } from '@atlaskit/theme/colors';
|
|
20
|
-
import { token } from '@atlaskit/tokens';
|
|
21
20
|
import { messages } from './messages';
|
|
22
|
-
var captionWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: 8px;\n text-align: center;\n position: relative;\n color: ", ";\n"])),
|
|
23
|
-
var placeholderStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n position: absolute;\n top: 0;\n width: 100%;\n"])),
|
|
21
|
+
var captionWrapperStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-top: 8px;\n text-align: center;\n position: relative;\n color: ", ";\n"])), "var(--ds-text-subtle, ".concat(N400, ")"));
|
|
22
|
+
var placeholderStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n position: absolute;\n top: 0;\n width: 100%;\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
24
23
|
export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
25
24
|
_inherits(CaptionComponent, _React$Component);
|
|
26
25
|
|
|
@@ -20,10 +20,9 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
|
|
|
20
20
|
import { DN50, DN600, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
21
21
|
import { themed } from '@atlaskit/theme/components';
|
|
22
22
|
import { borderRadius, gridSize } from '@atlaskit/theme/constants';
|
|
23
|
-
import { token } from '@atlaskit/tokens';
|
|
24
23
|
import Layer from '../Layer';
|
|
25
24
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "72.
|
|
25
|
+
var packageVersion = "72.1.0";
|
|
27
26
|
var halfFocusRing = 1;
|
|
28
27
|
var dropOffset = "0, ".concat(gridSize(), "px");
|
|
29
28
|
|
|
@@ -49,11 +48,11 @@ var DropList = /*#__PURE__*/function (_Component) {
|
|
|
49
48
|
|
|
50
49
|
_defineProperty(_assertThisInitialized(_this), "menuWrapper", function (theme) {
|
|
51
50
|
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: 0 ", "px ", "px -", "px ", ",\n 0 0 1px ", ";\n box-sizing: border-box;\n overflow: auto;\n padding: ", "px 0;\n max-height: 90vh;\n "])), themed({
|
|
52
|
-
light:
|
|
53
|
-
dark:
|
|
51
|
+
light: "var(--ds-text, ".concat(N900, ")"),
|
|
52
|
+
dark: "var(--ds-text, ".concat(DN600, ")")
|
|
54
53
|
})(theme), themed({
|
|
55
|
-
light:
|
|
56
|
-
dark:
|
|
54
|
+
light: "var(--ds-surface-overlay, ".concat(N0, ")"),
|
|
55
|
+
dark: "var(--ds-surface-overlay, ".concat(DN50, ")")
|
|
57
56
|
})(theme), borderRadius(), gridSize() / 2, gridSize(), gridSize() / 4, N50A, N60A, gridSize() / 2);
|
|
58
57
|
});
|
|
59
58
|
|
|
@@ -13,7 +13,6 @@ import { akEditorLineHeight, akEditorSwoopCubicBezier, akLayoutGutterOffset, rel
|
|
|
13
13
|
import * as colors from '@atlaskit/theme/colors';
|
|
14
14
|
import { themed } from '@atlaskit/theme/components';
|
|
15
15
|
import { fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
16
|
-
import { token } from '@atlaskit/tokens';
|
|
17
16
|
export var messages = defineMessages({
|
|
18
17
|
collapseNode: {
|
|
19
18
|
id: 'fabric.editor.collapseNode',
|
|
@@ -37,16 +36,16 @@ export var messages = defineMessages({
|
|
|
37
36
|
}
|
|
38
37
|
});
|
|
39
38
|
var BORDER_RADIUS = gridSize() / 2;
|
|
40
|
-
var EXPAND_COLLAPSED_BACKGROUND =
|
|
39
|
+
var EXPAND_COLLAPSED_BACKGROUND = "var(--ds-background-neutral-subtle, transparent)";
|
|
41
40
|
var EXPAND_SELECTED_BACKGROUND = themed({
|
|
42
|
-
light:
|
|
43
|
-
dark:
|
|
41
|
+
light: "var(--ds-surface, rgba(255, 255, 255, 0.6))",
|
|
42
|
+
dark: "var(--ds-surface, rgba(9, 10, 11, 0.29))"
|
|
44
43
|
});
|
|
45
|
-
var EXPAND_FOCUSED_BORDER_COLOR =
|
|
44
|
+
var EXPAND_FOCUSED_BORDER_COLOR = "var(--ds-border-focused, ".concat(colors.B300, ")");
|
|
46
45
|
var EXPAND_COLLAPSED_BORDER_COLOR = 'transparent';
|
|
47
46
|
var EXPAND_EXPANDED_BORDER_COLOR = themed({
|
|
48
|
-
light:
|
|
49
|
-
dark:
|
|
47
|
+
light: "var(--ds-border, ".concat(colors.N40A, ")"),
|
|
48
|
+
dark: "var(--ds-border, ".concat(colors.DN50, ")")
|
|
50
49
|
});
|
|
51
50
|
export var ExpandIconWrapper = function ExpandIconWrapper(_ref) {
|
|
52
51
|
var children = _ref.children,
|
|
@@ -60,9 +59,9 @@ export var ExpandIconWrapper = function ExpandIconWrapper(_ref) {
|
|
|
60
59
|
|
|
61
60
|
var expandIconWrapperStyle = function expandIconWrapperStyle(props) {
|
|
62
61
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n cursor: pointer;\n display: flex;\n color: ", ";\n border-radius: ", "px;\n width: 24px;\n height: 24px;\n\n &:hover {\n background: ", ";\n }\n\n svg {\n transition: transform 0.2s ", ";\n }\n"])), themed({
|
|
63
|
-
light:
|
|
64
|
-
dark:
|
|
65
|
-
})(props), gridSize() / 2,
|
|
62
|
+
light: "var(--ds-icon, ".concat(colors.N90, ")"),
|
|
63
|
+
dark: "var(--ds-icon, #d9dde3)"
|
|
64
|
+
})(props), gridSize() / 2, "var(--ds-background-neutral-subtle-hovered, ".concat(colors.N30A, ")"), akEditorSwoopCubicBezier);
|
|
66
65
|
};
|
|
67
66
|
|
|
68
67
|
var expandIconWrapperExpandedStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n svg {\n transform: rotate(90deg);\n }\n"])));
|
|
@@ -89,8 +88,8 @@ var containerStyles = function containerStyles(styleProps) {
|
|
|
89
88
|
var margin = "".concat(marginTop, " ").concat(marginHorizontal, " ").concat(marginBottom);
|
|
90
89
|
return function (themeProps) {
|
|
91
90
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-width: 1px;\n border-style: solid;\n border-color: ", ";\n border-radius: ", "px;\n min-height: 25px;\n background: ", ";\n margin: ", ";\n\n transition: background 0.3s ", ",\n border-color 0.3s ", ";\n padding: ", "px;\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 ", ";\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(themeProps) : EXPAND_COLLAPSED_BORDER_COLOR, BORDER_RADIUS, !expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND(themeProps), margin, akEditorSwoopCubicBezier, akEditorSwoopCubicBezier, gridSize(), themed({
|
|
92
|
-
light:
|
|
93
|
-
dark:
|
|
91
|
+
light: "var(--ds-border, ".concat(colors.N50A, ")"),
|
|
92
|
+
dark: "var(--ds-border, ".concat(colors.DN50, ")")
|
|
94
93
|
})(themeProps), EXPAND_SELECTED_BACKGROUND(themeProps));
|
|
95
94
|
};
|
|
96
95
|
};
|
|
@@ -103,18 +102,18 @@ var contentStyles = function contentStyles(styleProps) {
|
|
|
103
102
|
|
|
104
103
|
var titleInputStyles = function titleInputStyles(props) {
|
|
105
104
|
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 ", "px;\n width: 100%;\n\n &::placeholder {\n opacity: 0.6;\n color: ", ";\n }\n"])), relativeFontSizeToBase16(fontSize()), akEditorLineHeight, themed({
|
|
106
|
-
light:
|
|
107
|
-
dark:
|
|
105
|
+
light: "var(--ds-text-subtlest, ".concat(colors.N200A, ")"),
|
|
106
|
+
dark: "var(--ds-text-subtlest, ".concat(colors.DN600, ")")
|
|
108
107
|
})(props), gridSize() / 2, themed({
|
|
109
|
-
light:
|
|
110
|
-
dark:
|
|
108
|
+
light: "var(--ds-text-subtlest, ".concat(colors.N200A, ")"),
|
|
109
|
+
dark: "var(--ds-text-subtlest, ".concat(colors.DN600, ")")
|
|
111
110
|
})(props));
|
|
112
111
|
};
|
|
113
112
|
|
|
114
113
|
var titleContainerStyles = function titleContainerStyles(props) {
|
|
115
114
|
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 // Prevent browser selection being inside the title container\n user-select: none;\n\n &:focus {\n outline: 0;\n }\n"])), relativeFontSizeToBase16(fontSize()), themed({
|
|
116
|
-
light:
|
|
117
|
-
dark:
|
|
115
|
+
light: "var(--ds-text-subtle, ".concat(colors.N300A, ")"),
|
|
116
|
+
dark: "var(--ds-text-subtle, ".concat(colors.DN600, ")")
|
|
118
117
|
})(props));
|
|
119
118
|
};
|
|
120
119
|
|
|
@@ -9,12 +9,11 @@ import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
|
9
9
|
import { G400, N200, R400 } from '@atlaskit/theme/colors';
|
|
10
10
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
11
11
|
import { h200 } from '@atlaskit/theme/typography';
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
var validColor = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), token('color.text.success', G400));
|
|
12
|
+
var errorColor = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-text-danger, ".concat(R400, ")"));
|
|
13
|
+
var validColor = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n"])), "var(--ds-text-success, ".concat(G400, ")"));
|
|
15
14
|
|
|
16
15
|
var messageStyle = function messageStyle(props) {
|
|
17
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", "px;\n display: flex;\n justify-content: baseline;\n"])), h200(props),
|
|
16
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", " font-weight: normal;\n color: ", ";\n margin-top: ", "px;\n display: flex;\n justify-content: baseline;\n"])), h200(props), "var(--ds-text-subtlest, ".concat(N200, ")"), gridSize() / 2);
|
|
18
17
|
};
|
|
19
18
|
|
|
20
19
|
var iconWrapperStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n margin-right: 4px;\n"])));
|
|
@@ -28,16 +28,9 @@ export function PortalProviderThemeProviders(props) {
|
|
|
28
28
|
mode: mode
|
|
29
29
|
};
|
|
30
30
|
}, [mode]);
|
|
31
|
-
return (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// </DeprectateStyledComponentsProvider>
|
|
37
|
-
React.createElement(ThemeProvider, {
|
|
38
|
-
theme: styledComponentsAndEmotionTheme
|
|
39
|
-
}, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
|
|
40
|
-
value: atlaskitTheme
|
|
41
|
-
}, children))
|
|
42
|
-
);
|
|
31
|
+
return /*#__PURE__*/React.createElement(ThemeProvider, {
|
|
32
|
+
theme: styledComponentsAndEmotionTheme
|
|
33
|
+
}, /*#__PURE__*/React.createElement(AtlaskitTheme.Provider, {
|
|
34
|
+
value: atlaskitTheme
|
|
35
|
+
}, children));
|
|
43
36
|
}
|
|
@@ -10,13 +10,12 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
|
10
10
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|
|
11
11
|
import { N30, N50 } from '@atlaskit/theme/colors';
|
|
12
12
|
import { borderRadius, fontSize } from '@atlaskit/theme/constants';
|
|
13
|
-
import { token } from '@atlaskit/tokens';
|
|
14
13
|
import Tooltip from '@atlaskit/tooltip';
|
|
15
14
|
import { ACTION_SUBJECT_ID } from '../../analytics';
|
|
16
15
|
import { unsupportedContentMessages } from '../../messages/unsupportedContent';
|
|
17
16
|
import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
|
|
18
17
|
import { getUnsupportedContent } from '../unsupported-content-helper';
|
|
19
|
-
var blockNodeStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n font-size: ", ";\n margin: 10px 0;\n min-height: 24px;\n padding: 10px;\n text-align: center;\n vertical-align: text-bottom;\n min-width: 120px;\n align-items: center;\n justify-content: center;\n"])),
|
|
18
|
+
var blockNodeStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: flex;\n font-size: ", ";\n margin: 10px 0;\n min-height: 24px;\n padding: 10px;\n text-align: center;\n vertical-align: text-bottom;\n min-width: 120px;\n align-items: center;\n justify-content: center;\n"])), "var(--ds-background-disabled, ".concat(N30, ")"), "var(--ds-border-disabled, ".concat(N50, ")"), borderRadius(), relativeFontSizeToBase16(fontSize()));
|
|
20
19
|
|
|
21
20
|
var UnsupportedBlockNode = function UnsupportedBlockNode(_ref) {
|
|
22
21
|
var node = _ref.node,
|
|
@@ -10,13 +10,12 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
|
10
10
|
import QuestionsIcon from '@atlaskit/icon/glyph/question-circle';
|
|
11
11
|
import { N30, N50 } from '@atlaskit/theme/colors';
|
|
12
12
|
import { borderRadius, fontSize } from '@atlaskit/theme/constants';
|
|
13
|
-
import { token } from '@atlaskit/tokens';
|
|
14
13
|
import Tooltip from '@atlaskit/tooltip';
|
|
15
14
|
import { ACTION_SUBJECT_ID } from '../../analytics';
|
|
16
15
|
import { unsupportedContentMessages } from '../../messages/unsupportedContent';
|
|
17
16
|
import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
|
|
18
17
|
import { getUnsupportedContent } from '../unsupported-content-helper';
|
|
19
|
-
var inlineNodeStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 2px;\n min-height: 24px;\n padding: 0 10px;\n vertical-align: middle;\n white-space: nowrap;\n"])),
|
|
18
|
+
var inlineNodeStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n background: ", ";\n border: 1px dashed ", ";\n border-radius: ", "px;\n box-sizing: border-box;\n cursor: default;\n display: inline-flex;\n font-size: ", ";\n margin: 0 2px;\n min-height: 24px;\n padding: 0 10px;\n vertical-align: middle;\n white-space: nowrap;\n"])), "var(--ds-background-disabled, ".concat(N30, ")"), "var(--ds-border-disabled, ".concat(N50, ")"), borderRadius(), relativeFontSizeToBase16(fontSize()));
|
|
20
19
|
|
|
21
20
|
var UnsupportedInlineNode = function UnsupportedInlineNode(_ref) {
|
|
22
21
|
var node = _ref.node,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colorPalette
|
|
1
|
+
import { colorPalette } from '@atlaskit/adf-schema';
|
|
2
2
|
import { DEFAULT_BORDER_COLOR } from './common';
|
|
3
3
|
import getColorMessage from './getColorMessage';
|
|
4
4
|
import paletteMessages from './paletteMessages';
|
|
@@ -16,10 +16,6 @@ var mapPaletteColor = function mapPaletteColor(label, color) {
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
export var textColorPalette = [];
|
|
19
|
-
export var textColorPaletteExtended = [];
|
|
20
19
|
colorPalette.forEach(function (label, color) {
|
|
21
20
|
textColorPalette.push(mapPaletteColor(label, color));
|
|
22
|
-
});
|
|
23
|
-
colorPaletteExtended.forEach(function (label, color) {
|
|
24
|
-
textColorPaletteExtended.push(mapPaletteColor(label, color));
|
|
25
21
|
});
|
|
@@ -4,7 +4,7 @@ import { jsx } from '@emotion/react';
|
|
|
4
4
|
import chromatism from 'chromatism';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import { N0, N500 } from '@atlaskit/theme/colors';
|
|
7
|
-
import {
|
|
7
|
+
import { useThemeObserver } from '@atlaskit/tokens';
|
|
8
8
|
import Color from './Color';
|
|
9
9
|
import getColorMessage from './Palettes/getColorMessage';
|
|
10
10
|
import { newDarkPalette, newLightPalette } from './Palettes/paletteMessagesTokenModeNames';
|
|
@@ -31,7 +31,7 @@ function getCheckMarkColor(color, textPalette) {
|
|
|
31
31
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
return contrastColor === N0 ?
|
|
34
|
+
return contrastColor === N0 ? "var(--ds-icon-inverse, ".concat(N0, ")") : "var(--ds-icon, ".concat(N500, ")");
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
var ColorPalette = function ColorPalette(props) {
|
|
@@ -4,5 +4,5 @@ export { default as cellBackgroundColorPalette } from './ColorPalette/Palettes/c
|
|
|
4
4
|
export { default as colorPaletteMessages } from './ColorPalette/Palettes/paletteMessages';
|
|
5
5
|
export { panelBackgroundPalette, panelDarkModeBackgroundPalette } from './ColorPalette/Palettes/panelBackgroundPalette';
|
|
6
6
|
export { lightModeStatusColorPalette, darkModeStatusColorPalette } from './ColorPalette/Palettes/statusColorPalette';
|
|
7
|
-
export { textColorPalette
|
|
7
|
+
export { textColorPalette } from './ColorPalette/Palettes/textColorPalette';
|
|
8
8
|
export { DEFAULT_BORDER_COLOR } from './ColorPalette/Palettes/common';
|
|
@@ -23,14 +23,13 @@ import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
|
|
|
23
23
|
import { CustomItem, MenuGroup } from '@atlaskit/menu';
|
|
24
24
|
import { B100, DN600, DN80, N70, N900 } from '@atlaskit/theme/colors';
|
|
25
25
|
import { themed } from '@atlaskit/theme/components';
|
|
26
|
-
import { token } from '@atlaskit/tokens';
|
|
27
26
|
import Tooltip from '@atlaskit/tooltip';
|
|
28
27
|
import { withReactEditorViewOuterListeners } from '../../ui-react';
|
|
29
28
|
import DropList from '../../ui/DropList';
|
|
30
29
|
import Popup from '../../ui/Popup';
|
|
31
30
|
import { MenuArrowKeyNavigationProvider } from '../MenuArrowKeyNavigationProvider';
|
|
32
31
|
var wrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* tooltip in ToolbarButton is display:block */\n & > div > div {\n display: flex;\n }\n"])));
|
|
33
|
-
var focusedMenuItemStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n box-shadow: inset 0px 0px 0px 2px ", ";\n outline: none;\n"])),
|
|
32
|
+
var focusedMenuItemStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n box-shadow: inset 0px 0px 0px 2px ", ";\n outline: none;\n"])), "var(--ds-border-focused, ".concat(B100, ")"));
|
|
34
33
|
|
|
35
34
|
var buttonStyles = function buttonStyles(isActive) {
|
|
36
35
|
return function (theme) {
|
|
@@ -38,20 +37,20 @@ var buttonStyles = function buttonStyles(isActive) {
|
|
|
38
37
|
/**
|
|
39
38
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
40
39
|
*/
|
|
41
|
-
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 "])),
|
|
40
|
+
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);
|
|
42
41
|
} else {
|
|
43
42
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n > span:hover[aria-disabled='false'] {\n color: ", ";\n background-color: ", ";\n }\n > span:active[aria-disabled='false'] {\n background-color: ", ";\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 "])), themed({
|
|
44
|
-
light:
|
|
45
|
-
dark:
|
|
43
|
+
light: "var(--ds-text, ".concat(N900, ")"),
|
|
44
|
+
dark: "var(--ds-text, ".concat(DN600, ")")
|
|
46
45
|
})(theme), themed({
|
|
47
|
-
light:
|
|
48
|
-
dark:
|
|
46
|
+
light: "var(--ds-background-neutral-subtle-hovered, rgb(244, 245, 247))",
|
|
47
|
+
dark: "var(--ds-background-neutral-subtle-hovered, rgb(59, 71, 92))"
|
|
49
48
|
})(theme), themed({
|
|
50
|
-
light:
|
|
51
|
-
dark:
|
|
49
|
+
light: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))",
|
|
50
|
+
dark: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))"
|
|
52
51
|
})(theme), themed({
|
|
53
|
-
light:
|
|
54
|
-
dark:
|
|
52
|
+
light: "var(--ds-text-disabled, ".concat(N70, ")"),
|
|
53
|
+
dark: "var(--ds-text-disabled, ".concat(DN80, ")")
|
|
55
54
|
})(theme), focusedMenuItemStyle); // The deafut focus-visible style is removed to ensure consistency across browsers
|
|
56
55
|
}
|
|
57
56
|
};
|
package/dist/esm/version.json
CHANGED
|
@@ -37,7 +37,7 @@ export declare enum ACTION {
|
|
|
37
37
|
DISPATCHED_VALID_TRANSACTION = "dispatchedValidTransaction",
|
|
38
38
|
EDITED = "edited",
|
|
39
39
|
EDITOR_CRASHED = "unhandledErrorCaught",
|
|
40
|
-
EDITOR_CRASHED_ADDITIONAL_INFORMATION = "
|
|
40
|
+
EDITOR_CRASHED_ADDITIONAL_INFORMATION = "unhandledErrorCaughtAdditionalInfov2",
|
|
41
41
|
EDITOR_MOUNTED = "mounted",
|
|
42
42
|
EDITOR_TTI = "tti",
|
|
43
43
|
EDITOR_CONTENT_RETRIEVAL_PERFORMED = "contentRetrievalPerformed",
|
|
@@ -109,9 +109,10 @@ export declare type ErrorEventAttributes = {
|
|
|
109
109
|
};
|
|
110
110
|
declare type ComponentCrashErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED, ACTION_SUBJECT.FLOATING_CONTEXTUAL_BUTTON | ACTION_SUBJECT.PLUGIN_SLOT | ACTION_SUBJECT.REACT_NODE_VIEW | ACTION_SUBJECT.TABLES_PLUGIN | ACTION_SUBJECT.FLOATING_TOOLBAR_PLUGIN | ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID | FLOATING_CONTROLS_TITLE, ErrorEventAttributes, undefined>;
|
|
111
111
|
declare type ComponentCrashAdditionalInfoErrorAEP = OperationalAEP<ACTION.EDITOR_CRASHED_ADDITIONAL_INFORMATION, ACTION_SUBJECT.EDITOR, undefined, {
|
|
112
|
-
errorStack: string;
|
|
113
112
|
errorId: string;
|
|
114
|
-
},
|
|
113
|
+
}, {
|
|
114
|
+
errorStack: string;
|
|
115
|
+
}>;
|
|
115
116
|
declare type SmartLinkErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.SMART_LINK, undefined, {
|
|
116
117
|
error: string;
|
|
117
118
|
errorStack?: string;
|
|
@@ -6,7 +6,6 @@ declare type ExperimentalAEP<Action, ActionSubject, ActionSubjectId, Attributes>
|
|
|
6
6
|
}, undefined>;
|
|
7
7
|
export interface TextColorSelectedAttr {
|
|
8
8
|
color: string;
|
|
9
|
-
isNewColor: boolean;
|
|
10
9
|
}
|
|
11
10
|
export declare type TextColorSelectedAEP = ExperimentalAEP<ACTION.FORMATTED, ACTION_SUBJECT.TEXT, ACTION_SUBJECT_ID.FORMAT_COLOR, TextColorSelectedAttr>;
|
|
12
11
|
export interface TextColorShowPaletteToggleAttr {
|
|
@@ -99,7 +99,9 @@ declare type DispatchedTransactionAEP = OperationalAEP<ACTION.TRANSACTION_DISPAT
|
|
|
99
99
|
}, undefined>;
|
|
100
100
|
declare type TransactionMutatedAEP = OperationalAEP<ACTION.TRANSACTION_MUTATED_AFTER_DISPATCH, ACTION_SUBJECT.EDITOR, undefined, {
|
|
101
101
|
pluginKey: string;
|
|
102
|
-
},
|
|
102
|
+
}, {
|
|
103
|
+
stack: string | undefined;
|
|
104
|
+
}>;
|
|
103
105
|
declare type WithPluginStateCalledAEP = OperationalAEP<ACTION.WITH_PLUGIN_STATE_CALLED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
104
106
|
plugin: string;
|
|
105
107
|
duration: number;
|
|
@@ -60,12 +60,13 @@ export declare type FeatureFlags = {
|
|
|
60
60
|
placeholderBracketHint?: boolean;
|
|
61
61
|
/**
|
|
62
62
|
* @description
|
|
63
|
-
*
|
|
63
|
+
* Whether placeholder hints were provided (`string[] => boolean`)
|
|
64
|
+
* Placeholder text values to display on new empty lines.
|
|
64
65
|
*
|
|
65
|
-
* @see https://product-fabric.atlassian.net/l/c/
|
|
66
|
+
* @see https://product-fabric.atlassian.net/l/c/GG1Yv9cK
|
|
66
67
|
* @default false
|
|
67
68
|
*/
|
|
68
|
-
|
|
69
|
+
placeholderHints?: boolean;
|
|
69
70
|
/**
|
|
70
71
|
* @description
|
|
71
72
|
* Enable find/replace functionality within the editor
|
|
@@ -219,13 +220,22 @@ export declare type FeatureFlags = {
|
|
|
219
220
|
*/
|
|
220
221
|
twoLineEditorToolbar?: boolean;
|
|
221
222
|
/**
|
|
222
|
-
* Prevent transactions from being mutated (e.g. apply, filterTransaction,
|
|
223
|
-
*
|
|
223
|
+
* Prevent transactions from being mutated (e.g. apply, filterTransaction, appendTransaction) after being dispatched,
|
|
224
|
+
* will throw on transaction dispatch unless saferDispatchedTransactionsAnalyticsOnly is enabled.
|
|
224
225
|
* @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/3131836958/Editor+DACI+013+Avoid+content+loss+with+bad+transactions+Ghost+Steps
|
|
225
226
|
* @see https://product-fabric.atlassian.net/browse/ED-14002
|
|
226
227
|
* @default false
|
|
227
228
|
*/
|
|
228
229
|
saferDispatchedTransactions?: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Detect when transaction is being mutated after being dispatched and emit analytics event if so (e.g. apply, filterTransaction,
|
|
232
|
+
* appendTransaction)
|
|
233
|
+
* @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/3131836958/Editor+DACI+013+Avoid+content+loss+with+bad+transactions+Ghost+Steps
|
|
234
|
+
* @see https://product-fabric.atlassian.net/browse/ED-14002
|
|
235
|
+
* @see https://product-fabric.atlassian.net/wiki/spaces/AS/pages/3321201329/Rolling+out+safer-dispatched+transaction
|
|
236
|
+
* @default false
|
|
237
|
+
*/
|
|
238
|
+
saferDispatchedTransactionsAnalyticsOnly?: boolean;
|
|
229
239
|
/**
|
|
230
240
|
* @description
|
|
231
241
|
* Enable new collab service
|