@atlaskit/editor-common 92.1.1 → 93.0.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 +35 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/afm-post-office/tsconfig.json +0 -3
- package/dist/cjs/element-browser/components/CategoryList.js +2 -3
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +11 -13
- package/dist/cjs/element-browser/components/ElementSearch.js +1 -2
- package/dist/cjs/element-browser/constants.js +1 -6
- package/dist/cjs/extensibility/Extension/Extension/styles.js +3 -4
- package/dist/cjs/extensibility/Extension/InlineExtension/styles.js +1 -2
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +6 -7
- package/dist/cjs/extensibility/Extension/styles.js +3 -4
- package/dist/cjs/extensibility/MultiBodiedExtension/styles.js +2 -3
- package/dist/cjs/icons/shared/SteppedRainbowIconDecoration.js +2 -3
- package/dist/cjs/keymaps/index.js +1 -2
- package/dist/cjs/link/ConfigureLinkOverlay/StyledButton.js +4 -5
- package/dist/cjs/link/ConfigureLinkOverlay/index.js +2 -4
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -2
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +1 -2
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +4 -6
- package/dist/cjs/media-inline/constants.js +10 -8
- package/dist/cjs/media-inline/styles.js +1 -2
- package/dist/cjs/media-inline/views/error-view.js +1 -2
- package/dist/cjs/media-inline/views/wrapper.js +3 -4
- package/dist/cjs/media-single/CommentBadge.js +1 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-width/index.js +5 -10
- package/dist/cjs/panel.js +0 -12
- package/dist/cjs/react-node-view/index.js +32 -37
- package/dist/cjs/styles/shared/annotation.js +11 -14
- package/dist/cjs/styles/shared/code-block.js +2 -4
- package/dist/cjs/styles/shared/code-mark.js +1 -2
- package/dist/cjs/styles/shared/grid.js +2 -3
- package/dist/cjs/styles/shared/headings.js +56 -17
- package/dist/cjs/styles/shared/panel.js +13 -34
- package/dist/cjs/styles/shared/plugins.js +1 -2
- package/dist/cjs/styles/shared/resizer.js +1 -2
- package/dist/cjs/styles/shared/rule.js +1 -2
- package/dist/cjs/styles/shared/shadow.js +2 -3
- package/dist/cjs/styles/shared/smartCard.js +2 -3
- package/dist/cjs/table/SortingIcon.js +1 -2
- package/dist/cjs/ui/BaseTheme/index.js +1 -2
- package/dist/cjs/ui/Caption/index.js +2 -3
- package/dist/cjs/ui/DropList/index.js +4 -5
- package/dist/cjs/ui/Expand/index.js +2 -3
- package/dist/cjs/ui/Expand/sharedStyles.js +7 -17
- package/dist/cjs/ui/FloatingToolbar/Separator.js +1 -2
- package/dist/cjs/ui/FloatingToolbar/styles.js +10 -12
- package/dist/cjs/ui/Messages/index.js +8 -6
- package/dist/cjs/ui/PanelTextInput/styles.js +4 -5
- package/dist/cjs/ui/UnsupportedBlock/index.js +4 -6
- package/dist/cjs/ui/UnsupportedInline/index.js +4 -6
- package/dist/cjs/ui/WidthProvider/index.js +5 -39
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/Color/styles.js +3 -4
- package/dist/cjs/ui-color/ColorPalette/Palettes/common.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +22 -24
- package/dist/cjs/ui-color/ColorPalette/index.js +2 -3
- package/dist/cjs/ui-color/index.js +0 -13
- package/dist/cjs/ui-menu/ColorPickerButton/index.js +3 -4
- package/dist/cjs/ui-menu/DropdownMenu/index.js +2 -3
- package/dist/es2019/element-browser/components/CategoryList.js +2 -3
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +3 -5
- package/dist/es2019/element-browser/components/ElementSearch.js +1 -2
- package/dist/es2019/element-browser/constants.js +1 -5
- package/dist/es2019/extensibility/Extension/Extension/styles.js +3 -4
- package/dist/es2019/extensibility/Extension/InlineExtension/styles.js +1 -2
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +6 -7
- package/dist/es2019/extensibility/Extension/styles.js +3 -4
- package/dist/es2019/extensibility/MultiBodiedExtension/styles.js +2 -3
- package/dist/es2019/icons/shared/SteppedRainbowIconDecoration.js +2 -3
- package/dist/es2019/keymaps/index.js +1 -2
- package/dist/es2019/link/ConfigureLinkOverlay/StyledButton.js +4 -5
- package/dist/es2019/link/ConfigureLinkOverlay/index.js +2 -4
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -2
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +1 -2
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +4 -6
- package/dist/es2019/media-inline/constants.js +10 -8
- package/dist/es2019/media-inline/styles.js +1 -2
- package/dist/es2019/media-inline/views/error-view.js +1 -2
- package/dist/es2019/media-inline/views/wrapper.js +3 -4
- package/dist/es2019/media-single/CommentBadge.js +1 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-width/index.js +5 -9
- package/dist/es2019/panel.js +1 -1
- package/dist/es2019/react-node-view/index.js +32 -37
- package/dist/es2019/styles/shared/annotation.js +11 -14
- package/dist/es2019/styles/shared/code-block.js +12 -14
- package/dist/es2019/styles/shared/code-mark.js +1 -2
- package/dist/es2019/styles/shared/grid.js +2 -3
- package/dist/es2019/styles/shared/headings.js +35 -8
- package/dist/es2019/styles/shared/panel.js +12 -25
- package/dist/es2019/styles/shared/plugins.js +1 -2
- package/dist/es2019/styles/shared/resizer.js +6 -7
- package/dist/es2019/styles/shared/rule.js +1 -2
- package/dist/es2019/styles/shared/shadow.js +2 -3
- package/dist/es2019/styles/shared/smartCard.js +5 -7
- package/dist/es2019/table/SortingIcon.js +2 -3
- package/dist/es2019/ui/BaseTheme/index.js +1 -2
- package/dist/es2019/ui/Caption/index.js +2 -3
- package/dist/es2019/ui/DropList/index.js +4 -5
- package/dist/es2019/ui/Expand/index.js +2 -3
- package/dist/es2019/ui/Expand/sharedStyles.js +7 -17
- package/dist/es2019/ui/FloatingToolbar/Separator.js +1 -2
- package/dist/es2019/ui/FloatingToolbar/styles.js +10 -12
- package/dist/es2019/ui/Messages/index.js +8 -6
- package/dist/es2019/ui/PanelTextInput/styles.js +4 -5
- package/dist/es2019/ui/UnsupportedBlock/index.js +4 -6
- package/dist/es2019/ui/UnsupportedInline/index.js +4 -6
- package/dist/es2019/ui/WidthProvider/index.js +2 -33
- package/dist/es2019/ui-color/ColorPalette/Color/index.js +1 -4
- package/dist/es2019/ui-color/ColorPalette/Color/styles.js +3 -4
- package/dist/es2019/ui-color/ColorPalette/Palettes/common.js +1 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +21 -24
- package/dist/es2019/ui-color/ColorPalette/index.js +2 -3
- package/dist/es2019/ui-color/index.js +0 -1
- package/dist/es2019/ui-menu/ColorPickerButton/index.js +3 -4
- package/dist/es2019/ui-menu/DropdownMenu/index.js +3 -4
- package/dist/esm/element-browser/components/CategoryList.js +2 -3
- package/dist/esm/element-browser/components/ElementList/ElementList.js +3 -5
- package/dist/esm/element-browser/components/ElementSearch.js +1 -2
- package/dist/esm/element-browser/constants.js +1 -5
- package/dist/esm/extensibility/Extension/Extension/styles.js +3 -4
- package/dist/esm/extensibility/Extension/InlineExtension/styles.js +1 -2
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +6 -7
- package/dist/esm/extensibility/Extension/styles.js +3 -4
- package/dist/esm/extensibility/MultiBodiedExtension/styles.js +2 -3
- package/dist/esm/icons/shared/SteppedRainbowIconDecoration.js +2 -3
- package/dist/esm/keymaps/index.js +1 -2
- package/dist/esm/link/ConfigureLinkOverlay/StyledButton.js +4 -5
- package/dist/esm/link/ConfigureLinkOverlay/index.js +2 -4
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +1 -2
- package/dist/esm/link/LinkSearch/LinkSearchList.js +1 -2
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +4 -6
- package/dist/esm/media-inline/constants.js +10 -8
- package/dist/esm/media-inline/styles.js +1 -2
- package/dist/esm/media-inline/views/error-view.js +1 -2
- package/dist/esm/media-inline/views/wrapper.js +3 -4
- package/dist/esm/media-single/CommentBadge.js +1 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-width/index.js +5 -9
- package/dist/esm/panel.js +1 -1
- package/dist/esm/react-node-view/index.js +32 -37
- package/dist/esm/styles/shared/annotation.js +11 -14
- package/dist/esm/styles/shared/code-block.js +2 -4
- package/dist/esm/styles/shared/code-mark.js +1 -2
- package/dist/esm/styles/shared/grid.js +2 -3
- package/dist/esm/styles/shared/headings.js +53 -17
- package/dist/esm/styles/shared/panel.js +12 -33
- package/dist/esm/styles/shared/plugins.js +1 -2
- package/dist/esm/styles/shared/resizer.js +1 -2
- package/dist/esm/styles/shared/rule.js +1 -2
- package/dist/esm/styles/shared/shadow.js +2 -3
- package/dist/esm/styles/shared/smartCard.js +2 -4
- package/dist/esm/table/SortingIcon.js +1 -2
- package/dist/esm/ui/BaseTheme/index.js +1 -2
- package/dist/esm/ui/Caption/index.js +2 -3
- package/dist/esm/ui/DropList/index.js +4 -5
- package/dist/esm/ui/Expand/index.js +2 -3
- package/dist/esm/ui/Expand/sharedStyles.js +7 -17
- package/dist/esm/ui/FloatingToolbar/Separator.js +1 -2
- package/dist/esm/ui/FloatingToolbar/styles.js +10 -12
- package/dist/esm/ui/Messages/index.js +8 -6
- package/dist/esm/ui/PanelTextInput/styles.js +4 -5
- package/dist/esm/ui/UnsupportedBlock/index.js +4 -6
- package/dist/esm/ui/UnsupportedInline/index.js +4 -6
- package/dist/esm/ui/WidthProvider/index.js +5 -39
- package/dist/esm/ui-color/ColorPalette/Color/index.js +1 -2
- package/dist/esm/ui-color/ColorPalette/Color/styles.js +3 -4
- package/dist/esm/ui-color/ColorPalette/Palettes/common.js +1 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +21 -24
- package/dist/esm/ui-color/ColorPalette/index.js +2 -3
- package/dist/esm/ui-color/index.js +0 -1
- package/dist/esm/ui-menu/ColorPickerButton/index.js +3 -4
- package/dist/esm/ui-menu/DropdownMenu/index.js +2 -3
- package/dist/types/element-browser/constants.d.ts +3 -3
- package/dist/types/media-inline/constants.d.ts +3 -0
- package/dist/types/panel.d.ts +1 -1
- package/dist/types/styles/shared/panel.d.ts +0 -2
- package/dist/types/ui/WidthProvider/index.d.ts +0 -5
- package/dist/types/ui-color/index.d.ts +0 -1
- package/dist/types-ts4.5/element-browser/constants.d.ts +3 -3
- package/dist/types-ts4.5/media-inline/constants.d.ts +3 -0
- package/dist/types-ts4.5/panel.d.ts +1 -1
- package/dist/types-ts4.5/styles/shared/panel.d.ts +0 -2
- package/dist/types-ts4.5/ui/WidthProvider/index.d.ts +0 -5
- package/dist/types-ts4.5/ui-color/index.d.ts +0 -1
- package/package.json +4 -11
- package/dist/cjs/ui/WidthProvider/isSsrButNoBreakoutScriptObserved.js +0 -11
- package/dist/cjs/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -60
- package/dist/es2019/ui/WidthProvider/isSsrButNoBreakoutScriptObserved.js +0 -6
- package/dist/es2019/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -54
- package/dist/esm/ui/WidthProvider/isSsrButNoBreakoutScriptObserved.js +0 -6
- package/dist/esm/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -54
- package/dist/types/ui/WidthProvider/isSsrButNoBreakoutScriptObserved.d.ts +0 -1
- package/dist/types/ui-color/ColorPalette/Palettes/statusColorPalette.d.ts +0 -4
- package/dist/types-ts4.5/ui/WidthProvider/isSsrButNoBreakoutScriptObserved.d.ts +0 -1
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/statusColorPalette.d.ts +0 -4
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { headingSizes } from '@atlaskit/theme/typography';
|
|
2
1
|
export const DEFAULT_IMAGE_WIDTH = 250;
|
|
3
2
|
export const DEFAULT_IMAGE_HEIGHT = 200;
|
|
4
3
|
export const DEFAULT_INLINE_IMAGE_ASPECT_RATIO = DEFAULT_IMAGE_WIDTH / DEFAULT_IMAGE_HEIGHT;
|
|
@@ -12,13 +11,16 @@ export const DEFAULT_INLINE_IMAGE_BORDER_SIZE = 0;
|
|
|
12
11
|
*
|
|
13
12
|
* There is conversation about refactoring media inline nodes to conform to
|
|
14
13
|
* aligning correctly with the surrounding text.
|
|
14
|
+
*
|
|
15
|
+
* These constants originally came from `headingSizes` from the `theme` package
|
|
16
|
+
* and have been copied here to remove this package.
|
|
15
17
|
*/
|
|
16
18
|
export const referenceHeights = {
|
|
17
|
-
p:
|
|
18
|
-
h1:
|
|
19
|
-
h2:
|
|
20
|
-
h3:
|
|
21
|
-
h4:
|
|
22
|
-
h5:
|
|
23
|
-
h6:
|
|
19
|
+
p: 24 - 2,
|
|
20
|
+
h1: 32 + 4,
|
|
21
|
+
h2: 28 + 3,
|
|
22
|
+
h3: 24 + 1,
|
|
23
|
+
h4: 20 + 3,
|
|
24
|
+
h5: 16 + 4,
|
|
25
|
+
h6: 16 + 2
|
|
24
26
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { B300 } from '@atlaskit/theme/colors';
|
|
4
3
|
import { DEFAULT_INLINE_IMAGE_ASPECT_RATIO, DEFAULT_INLINE_IMAGE_BORDER_SIZE, referenceHeights } from './constants';
|
|
5
4
|
export const INLINE_IMAGE_WRAPPER_CLASS_NAME = 'media-inline-image-wrapper';
|
|
6
5
|
export const INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY = '--editor-media-inline-image-aspect-ratio';
|
|
@@ -76,7 +75,7 @@ export const wrapperStyle = css({
|
|
|
76
75
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
77
76
|
export const selectedStyle = css({
|
|
78
77
|
cursor: 'pointer',
|
|
79
|
-
boxShadow: `0 0 0 1px ${
|
|
78
|
+
boxShadow: `0 0 0 1px ${"var(--ds-border-selected, #0C66E4)"}`,
|
|
80
79
|
outline: 'none'
|
|
81
80
|
});
|
|
82
81
|
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
7
|
import { jsx } from '@emotion/react';
|
|
8
8
|
import WarningIcon from '@atlaskit/icon/glyph/warning';
|
|
9
|
-
import { R300 } from '@atlaskit/theme/colors';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip';
|
|
11
10
|
import { ICON_SIZE_THRESOLD } from './constants';
|
|
12
11
|
import { Frame } from './frame';
|
|
@@ -27,6 +26,6 @@ export const InlineImageCardErrorView = ({
|
|
|
27
26
|
}, jsx(IconWrapper, null, icon || jsx(WarningIcon, {
|
|
28
27
|
label: "error",
|
|
29
28
|
size: height > ICON_SIZE_THRESOLD ? 'medium' : 'small',
|
|
30
|
-
primaryColor:
|
|
29
|
+
primaryColor: "var(--ds-icon-danger, #C9372C)"
|
|
31
30
|
}))));
|
|
32
31
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
4
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
4
|
export const wrapperStyle = css({
|
|
6
5
|
display: 'inline-flex',
|
|
@@ -10,11 +9,11 @@ export const wrapperStyle = css({
|
|
|
10
9
|
justifyContent: 'center',
|
|
11
10
|
boxDecorationBreak: 'clone',
|
|
12
11
|
borderRadius: `${"var(--ds-border-radius, 3px)"}`,
|
|
13
|
-
color: `${
|
|
14
|
-
backgroundColor: `${
|
|
12
|
+
color: `${"var(--ds-text, #172B4D)"}`,
|
|
13
|
+
backgroundColor: `${"var(--ds-background-neutral, #091E420F)"}`,
|
|
15
14
|
transition: '0.1s all ease-in-out',
|
|
16
15
|
cursor: 'pointer',
|
|
17
16
|
'&:hover': {
|
|
18
|
-
backgroundColor: `${
|
|
17
|
+
backgroundColor: `${"var(--ds-background-neutral-hovered, #091E4224)"}`
|
|
19
18
|
}
|
|
20
19
|
});
|
|
@@ -10,7 +10,6 @@ import debounce from 'lodash/debounce';
|
|
|
10
10
|
import CustomThemeButton from '@atlaskit/button/custom-theme-button';
|
|
11
11
|
import { akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
|
|
12
12
|
import CommentIcon from '@atlaskit/icon/glyph/comment';
|
|
13
|
-
import { layers } from '@atlaskit/theme/constants';
|
|
14
13
|
import Tooltip from '@atlaskit/tooltip';
|
|
15
14
|
import { commentMessages as messages } from '../media';
|
|
16
15
|
const commentBadgeWrapper = css({
|
|
@@ -25,7 +24,7 @@ const commentBadgeWrapper = css({
|
|
|
25
24
|
const commentBadgeEditorOverrides = badgeOffsetRight => css({
|
|
26
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
27
26
|
right: badgeOffsetRight,
|
|
28
|
-
zIndex:
|
|
27
|
+
zIndex: 100
|
|
29
28
|
});
|
|
30
29
|
export const getBadgeSize = (width, height) => {
|
|
31
30
|
// width is the original width of image, not resized or currently rendered to user. Defaulting to medium for now
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "
|
|
4
|
+
const packageVersion = "93.0.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorWideLayoutWidth, akLayoutGutterOffset, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
3
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
4
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
5
3
|
import { BODIED_EXT_PADDING } from '../styles/shared/extension';
|
|
6
4
|
import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles/shared/layout';
|
|
7
5
|
import { absoluteBreakoutWidth } from '../utils/breakout';
|
|
6
|
+
const GRID_SIZE = 8;
|
|
8
7
|
export const layoutToWidth = {
|
|
9
8
|
default: akEditorDefaultLayoutWidth,
|
|
10
9
|
wide: akEditorWideLayoutWidth,
|
|
@@ -71,18 +70,15 @@ export const getParentNodeWidth = (pos, state, containerWidth, isFullWidthModeEn
|
|
|
71
70
|
case schema.nodes.extensionFrame:
|
|
72
71
|
parentWidth -= BODIED_EXT_PADDING * 2;
|
|
73
72
|
break;
|
|
74
|
-
|
|
75
|
-
// TODO: Migrate away from gridSize
|
|
76
|
-
// Recommendation: Replace gridSize with 8
|
|
77
73
|
case schema.nodes.expand:
|
|
78
74
|
// padding
|
|
79
|
-
parentWidth -=
|
|
75
|
+
parentWidth -= GRID_SIZE * 2;
|
|
80
76
|
// gutter offset
|
|
81
|
-
parentWidth +=
|
|
77
|
+
parentWidth += GRID_SIZE * 1.5 * 2;
|
|
82
78
|
// padding right
|
|
83
|
-
parentWidth -=
|
|
79
|
+
parentWidth -= GRID_SIZE;
|
|
84
80
|
// padding left
|
|
85
|
-
parentWidth -=
|
|
81
|
+
parentWidth -= GRID_SIZE * 4 - GRID_SIZE / 2;
|
|
86
82
|
break;
|
|
87
83
|
}
|
|
88
84
|
parentWidth -= 2; // border
|
package/dist/es2019/panel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getPanelTypeBackground, getPanelTypeBackgroundNoTokens, darkPanelColors,
|
|
1
|
+
export { getPanelTypeBackground, getPanelTypeBackgroundNoTokens, darkPanelColors, panelSharedStyles, panelSharedStylesWithoutPrefix, PanelSharedCssClassName, PanelSharedSelectors } from './styles/shared/panel';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
|
|
6
5
|
import { createDispatch } from '../event-dispatcher';
|
|
7
6
|
import { ErrorBoundary } from '../ui/ErrorBoundary';
|
|
@@ -113,48 +112,44 @@ export default class ReactNodeView {
|
|
|
113
112
|
|
|
114
113
|
// move the contentDOM node inside the inner reference after rendering
|
|
115
114
|
if (node && contentDOM && !node.contains(contentDOM)) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
oldIgnoreMutation = this.ignoreMutation; // store ref to previous ignoreMutation
|
|
115
|
+
var _this$view$state$sele;
|
|
116
|
+
// @ts-ignore - ignoreMutation may not be declared
|
|
117
|
+
oldIgnoreMutation = this.ignoreMutation; // store ref to previous ignoreMutation
|
|
120
118
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
return !isSelectionMutation;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
// capture document selection state before React DOM changes triggers ProseMirror selection change transaction
|
|
133
|
-
if (this.view.state.selection.visible) {
|
|
134
|
-
selectionBookmark = this.view.state.selection.getBookmark();
|
|
119
|
+
// ignore all mutations caused by ProseMirror's MutationObserver triggering
|
|
120
|
+
// after DOM change, except selection changes
|
|
121
|
+
// @ts-ignore ProseMirror adds selection type to MutationRecord
|
|
122
|
+
this.ignoreMutation = m => {
|
|
123
|
+
const isSelectionMutation = m.type === 'selection';
|
|
124
|
+
if (!isSelectionMutation) {
|
|
125
|
+
mutationsIgnored = true;
|
|
135
126
|
}
|
|
127
|
+
return !isSelectionMutation;
|
|
128
|
+
};
|
|
136
129
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
parentOffset = (_this$view$state$sele2 = (_this$view$state$sele3 = this.view.state.selection) === null || _this$view$state$sele3 === void 0 ? void 0 : (_this$view$state$sele4 = _this$view$state$sele3.ranges[0].$from) === null || _this$view$state$sele4 === void 0 ? void 0 : _this$view$state$sele4.parentOffset) !== null && _this$view$state$sele2 !== void 0 ? _this$view$state$sele2 : 0;
|
|
141
|
-
}
|
|
130
|
+
// capture document selection state before React DOM changes triggers ProseMirror selection change transaction
|
|
131
|
+
if (this.view.state.selection.visible) {
|
|
132
|
+
selectionBookmark = this.view.state.selection.getBookmark();
|
|
142
133
|
}
|
|
143
|
-
node.appendChild(contentDOM);
|
|
144
|
-
if (fg('platform_editor_react_18_prosemirror_sel_resync')) {
|
|
145
|
-
requestAnimationFrame(() => {
|
|
146
|
-
// Reset ignoreMutation after frame ....
|
|
147
|
-
// @ts-ignore - this may not have been declared by implementing class
|
|
148
|
-
this.ignoreMutation = oldIgnoreMutation;
|
|
149
134
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
this.view.dispatch(this.view.state.tr.setSelection(selectionBookmark.resolve(this.view.state.tr.doc)));
|
|
155
|
-
}
|
|
156
|
-
});
|
|
135
|
+
// ... and capture parent offset before DOM change
|
|
136
|
+
if (((_this$view$state$sele = this.view.state.selection) === null || _this$view$state$sele === void 0 ? void 0 : _this$view$state$sele.ranges.length) > 0) {
|
|
137
|
+
var _this$view$state$sele2, _this$view$state$sele3, _this$view$state$sele4;
|
|
138
|
+
parentOffset = (_this$view$state$sele2 = (_this$view$state$sele3 = this.view.state.selection) === null || _this$view$state$sele3 === void 0 ? void 0 : (_this$view$state$sele4 = _this$view$state$sele3.ranges[0].$from) === null || _this$view$state$sele4 === void 0 ? void 0 : _this$view$state$sele4.parentOffset) !== null && _this$view$state$sele2 !== void 0 ? _this$view$state$sele2 : 0;
|
|
157
139
|
}
|
|
140
|
+
node.appendChild(contentDOM);
|
|
141
|
+
requestAnimationFrame(() => {
|
|
142
|
+
// Reset ignoreMutation after frame ....
|
|
143
|
+
// @ts-ignore - this may not have been declared by implementing class
|
|
144
|
+
this.ignoreMutation = oldIgnoreMutation;
|
|
145
|
+
|
|
146
|
+
// only trigger selection re-sync if the selection is not at the start of the
|
|
147
|
+
// node, and DOM mutations were ignored
|
|
148
|
+
if (selectionBookmark && mutationsIgnored && parentOffset > 0) {
|
|
149
|
+
// ... and dispatch expected selection state
|
|
150
|
+
this.view.dispatch(this.view.state.tr.setSelection(selectionBookmark.resolve(this.view.state.tr.doc)));
|
|
151
|
+
}
|
|
152
|
+
});
|
|
158
153
|
}
|
|
159
154
|
}
|
|
160
155
|
render(props, forwardRef) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
|
|
5
4
|
export const annotationPrefix = 'ak-editor-annotation';
|
|
6
5
|
export const AnnotationSharedClassNames = {
|
|
7
6
|
focus: `${annotationPrefix}-focus`,
|
|
@@ -14,8 +13,6 @@ export const BlockAnnotationSharedClassNames = {
|
|
|
14
13
|
blur: `${blockAnnotationPrefix}-blur`,
|
|
15
14
|
draft: `${blockAnnotationPrefix}-draft`
|
|
16
15
|
};
|
|
17
|
-
const Yellow100 = 'rgb(255, 247, 214)';
|
|
18
|
-
const Y200a = 'rgba(255, 196, 0, 0.82)';
|
|
19
16
|
export const AnnotationSharedCSSByState = () => {
|
|
20
17
|
if (fg('editor_inline_comments_on_inline_nodes')) {
|
|
21
18
|
// NOTE: These styles are shared between renderer and editor. Sometimes they
|
|
@@ -33,20 +30,20 @@ export const AnnotationSharedCSSByState = () => {
|
|
|
33
30
|
} : {
|
|
34
31
|
paddingTop: '4px',
|
|
35
32
|
border: 'none',
|
|
36
|
-
boxShadow: `0 2px 0 0 ${
|
|
33
|
+
boxShadow: `0 2px 0 0 ${"var(--ds-border-accent-yellow, #B38600)"}`
|
|
37
34
|
},
|
|
38
35
|
'&:has(.date-lozenger-container)': {
|
|
39
36
|
paddingTop: '2px'
|
|
40
37
|
}
|
|
41
38
|
},
|
|
42
39
|
focus: css({
|
|
43
|
-
background:
|
|
44
|
-
borderBottomColor:
|
|
45
|
-
boxShadow:
|
|
40
|
+
background: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
|
|
41
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
42
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)"
|
|
46
43
|
}),
|
|
47
44
|
blur: css({
|
|
48
|
-
background:
|
|
49
|
-
borderBottomColor:
|
|
45
|
+
background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
|
|
46
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)"
|
|
50
47
|
})
|
|
51
48
|
};
|
|
52
49
|
} else {
|
|
@@ -54,15 +51,15 @@ export const AnnotationSharedCSSByState = () => {
|
|
|
54
51
|
focus: css({
|
|
55
52
|
// Background is not coming through in confluence, suspecting to be caused by some specific combination of
|
|
56
53
|
// emotion and token look up
|
|
57
|
-
background:
|
|
58
|
-
borderBottom: `2px solid ${
|
|
54
|
+
background: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
|
|
55
|
+
borderBottom: `2px solid ${"var(--ds-border-accent-yellow, #B38600)"}`,
|
|
59
56
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4147
|
|
60
|
-
boxShadow:
|
|
57
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
|
|
61
58
|
cursor: 'pointer'
|
|
62
59
|
}),
|
|
63
60
|
blur: css({
|
|
64
|
-
background:
|
|
65
|
-
borderBottom: `2px solid ${
|
|
61
|
+
background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
|
|
62
|
+
borderBottom: `2px solid ${"var(--ds-border-accent-yellow, #B38600)"}`,
|
|
66
63
|
cursor: 'pointer'
|
|
67
64
|
})
|
|
68
65
|
};
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
5
|
-
import { N20, N30, N400, N800 } from '@atlaskit/theme/colors';
|
|
6
|
-
import { fontSize } from '@atlaskit/theme/constants';
|
|
7
5
|
export const CodeBlockSharedCssClassName = {
|
|
8
6
|
CODEBLOCK_CONTAINER: 'code-block',
|
|
9
7
|
CODEBLOCK_START: 'code-block--start',
|
|
@@ -46,7 +44,7 @@ export const codeBlockSharedStyles = () => css`
|
|
|
46
44
|
|
|
47
45
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER} {
|
|
48
46
|
position: relative;
|
|
49
|
-
background-color: ${"var(--ds-surface-raised,
|
|
47
|
+
background-color: ${"var(--ds-surface-raised, #FFFFFF)"};
|
|
50
48
|
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
51
49
|
margin: ${blockNodesVerticalMargin} 0 0 0;
|
|
52
50
|
font-family: ${akEditorCodeFontFamily};
|
|
@@ -76,7 +74,7 @@ export const codeBlockSharedStyles = () => css`
|
|
|
76
74
|
}
|
|
77
75
|
|
|
78
76
|
.${CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER} {
|
|
79
|
-
background-color: ${
|
|
77
|
+
background-color: ${"var(--ds-background-neutral, #091E420F)"};
|
|
80
78
|
display: flex;
|
|
81
79
|
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
82
80
|
width: 100%;
|
|
@@ -120,7 +118,7 @@ export const codeBlockSharedStyles = () => css`
|
|
|
120
118
|
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER} {
|
|
121
119
|
flex-shrink: 0;
|
|
122
120
|
text-align: right;
|
|
123
|
-
background-color: ${
|
|
121
|
+
background-color: ${"var(--ds-background-neutral, #091E420F)"};
|
|
124
122
|
padding: ${"var(--ds-space-100, 8px)"};
|
|
125
123
|
position: relative;
|
|
126
124
|
|
|
@@ -133,20 +131,20 @@ export const codeBlockSharedStyles = () => css`
|
|
|
133
131
|
display: inline-block;
|
|
134
132
|
content: counter(line);
|
|
135
133
|
counter-increment: line;
|
|
136
|
-
color: ${
|
|
137
|
-
font-size: ${relativeFontSizeToBase16(
|
|
134
|
+
color: ${"var(--ds-text-subtlest, #626F86)"};
|
|
135
|
+
font-size: ${relativeFontSizeToBase16(14)};
|
|
138
136
|
line-height: 1.5rem;
|
|
139
137
|
}
|
|
140
138
|
}
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
.${CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER_FG} {
|
|
144
|
-
background-color: ${
|
|
142
|
+
background-color: ${"var(--ds-background-neutral, #091E420F)"};
|
|
145
143
|
position: relative;
|
|
146
144
|
width: var(--lineNumberGutterWidth, 2rem);
|
|
147
145
|
padding: 0px ${"var(--ds-space-100, 8px)"};
|
|
148
146
|
flex-shrink: 0;
|
|
149
|
-
font-size: ${relativeFontSizeToBase16(
|
|
147
|
+
font-size: ${relativeFontSizeToBase16(14)};
|
|
150
148
|
box-sizing: content-box;
|
|
151
149
|
}
|
|
152
150
|
|
|
@@ -158,11 +156,11 @@ export const codeBlockSharedStyles = () => css`
|
|
|
158
156
|
flex-grow: 1;
|
|
159
157
|
tab-size: 4;
|
|
160
158
|
cursor: text;
|
|
161
|
-
color: ${
|
|
159
|
+
color: ${"var(--ds-text, #172B4D)"};
|
|
162
160
|
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
163
161
|
margin: ${"var(--ds-space-100, 8px)"};
|
|
164
162
|
white-space: pre;
|
|
165
|
-
font-size: ${relativeFontSizeToBase16(
|
|
163
|
+
font-size: ${relativeFontSizeToBase16(14)};
|
|
166
164
|
line-height: 1.5rem;
|
|
167
165
|
}
|
|
168
166
|
}
|
|
@@ -171,10 +169,10 @@ export const codeBlockSharedStyles = () => css`
|
|
|
171
169
|
code {
|
|
172
170
|
tab-size: 4;
|
|
173
171
|
cursor: text;
|
|
174
|
-
color: ${
|
|
172
|
+
color: ${"var(--ds-text, #172B4D)"};
|
|
175
173
|
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
176
174
|
margin: ${"var(--ds-space-100, 8px)"};
|
|
177
|
-
font-size: ${relativeFontSizeToBase16(
|
|
175
|
+
font-size: ${relativeFontSizeToBase16(14)};
|
|
178
176
|
line-height: 1.5rem;
|
|
179
177
|
}
|
|
180
178
|
}
|
|
@@ -185,7 +183,7 @@ export const codeBlockSharedStyles = () => css`
|
|
|
185
183
|
width: var(--lineNumberGutterWidth, 2rem);
|
|
186
184
|
left: 0;
|
|
187
185
|
position: absolute;
|
|
188
|
-
font-size: ${relativeFontSizeToBase16(
|
|
186
|
+
font-size: ${relativeFontSizeToBase16(14)};
|
|
189
187
|
padding: 0px ${"var(--ds-space-100, 8px)"};
|
|
190
188
|
line-height: 1.5rem;
|
|
191
189
|
text-align: right;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { getCodeStyles } from '@atlaskit/code/inline';
|
|
4
|
-
import { N30A } from '@atlaskit/theme/colors';
|
|
5
4
|
export const codeMarkSharedStyles = () => {
|
|
6
5
|
return css({
|
|
7
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
8
7
|
'.code': {
|
|
9
|
-
'--ds--code--bg-color':
|
|
8
|
+
'--ds--code--bg-color': "var(--ds-background-neutral, #091E420F)",
|
|
10
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
11
10
|
...getCodeStyles()
|
|
12
11
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorGridLineZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { B200, N30A } from '@atlaskit/theme/colors';
|
|
5
4
|
export const GRID_GUTTER = 12;
|
|
6
5
|
|
|
7
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -24,7 +23,7 @@ export const gridStyles = css({
|
|
|
24
23
|
},
|
|
25
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
26
25
|
'.gridLine': {
|
|
27
|
-
borderLeft: `1px solid ${
|
|
26
|
+
borderLeft: `1px solid ${"var(--ds-border, #091E4224)"}`,
|
|
28
27
|
display: 'inline-block',
|
|
29
28
|
boxSizing: 'border-box',
|
|
30
29
|
height: '100%',
|
|
@@ -35,6 +34,6 @@ export const gridStyles = css({
|
|
|
35
34
|
},
|
|
36
35
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
37
36
|
'.highlight': {
|
|
38
|
-
borderLeft: `1px solid ${
|
|
37
|
+
borderLeft: `1px solid ${"var(--ds-border-focused, #388BFF)"}`
|
|
39
38
|
}
|
|
40
39
|
});
|
|
@@ -1,49 +1,76 @@
|
|
|
1
1
|
/* eslint-disable @atlaskit/design-system/use-tokens-space */
|
|
2
|
+
/* eslint-disable @atlaskit/design-system/use-tokens-typography */
|
|
2
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
4
|
import { css } from '@emotion/react';
|
|
4
|
-
import { h100, h300, h400, h500, h600, h700 } from '@atlaskit/theme/typography';
|
|
5
|
-
|
|
6
5
|
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
7
6
|
// text sizing prototype: http://proto/fabricrender/
|
|
8
7
|
export const headingsSharedStyles = () => css({
|
|
9
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
10
9
|
'& h1': {
|
|
11
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
12
|
-
|
|
11
|
+
fontSize: `${24 / 14}em`,
|
|
12
|
+
fontStyle: 'inherit',
|
|
13
|
+
lineHeight: 28 / 24,
|
|
14
|
+
color: "var(--ds-text, #172B4D)",
|
|
15
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
16
|
+
letterSpacing: `-0.01em`,
|
|
13
17
|
marginBottom: 0,
|
|
14
18
|
marginTop: '1.667em'
|
|
15
19
|
},
|
|
16
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
17
21
|
'& h2': {
|
|
18
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
19
|
-
|
|
23
|
+
fontSize: `${20 / 14}em`,
|
|
24
|
+
fontStyle: 'inherit',
|
|
25
|
+
lineHeight: 24 / 20,
|
|
26
|
+
color: "var(--ds-text, #172B4D)",
|
|
27
|
+
fontWeight: "var(--ds-font-weight-medium, 500)",
|
|
28
|
+
letterSpacing: `-0.008em`,
|
|
20
29
|
marginTop: '1.8em',
|
|
21
30
|
marginBottom: 0
|
|
22
31
|
},
|
|
23
32
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
24
33
|
'& h3': {
|
|
25
34
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
26
|
-
|
|
35
|
+
fontSize: `${16 / 14}em`,
|
|
36
|
+
fontStyle: 'inherit',
|
|
37
|
+
lineHeight: 20 / 16,
|
|
38
|
+
color: "var(--ds-text, #172B4D)",
|
|
39
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
40
|
+
letterSpacing: `-0.006em`,
|
|
27
41
|
marginTop: '2em',
|
|
28
42
|
marginBottom: 0
|
|
29
43
|
},
|
|
30
44
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
31
45
|
'& h4': {
|
|
32
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
33
|
-
|
|
47
|
+
fontSize: `${14 / 14}em`,
|
|
48
|
+
fontStyle: 'inherit',
|
|
49
|
+
lineHeight: 16 / 14,
|
|
50
|
+
color: "var(--ds-text, #172B4D)",
|
|
51
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
52
|
+
letterSpacing: `-0.003em`,
|
|
34
53
|
marginTop: '1.357em'
|
|
35
54
|
},
|
|
36
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
37
56
|
'& h5': {
|
|
38
57
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
39
|
-
|
|
58
|
+
fontSize: `${12 / 14}em`,
|
|
59
|
+
fontStyle: 'inherit',
|
|
60
|
+
lineHeight: 16 / 12,
|
|
61
|
+
color: "var(--ds-text, #172B4D)",
|
|
62
|
+
fontWeight: "var(--ds-font-weight-semibold, 600)",
|
|
40
63
|
marginTop: '1.667em',
|
|
41
64
|
textTransform: 'none'
|
|
42
65
|
},
|
|
43
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
44
67
|
'& h6': {
|
|
45
68
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
46
|
-
|
|
69
|
+
fontSize: `${11 / 14}em`,
|
|
70
|
+
fontStyle: 'inherit',
|
|
71
|
+
lineHeight: 16 / 11,
|
|
72
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
73
|
+
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
47
74
|
marginTop: '1.455em',
|
|
48
75
|
textTransform: 'none'
|
|
49
76
|
}
|
|
@@ -6,15 +6,14 @@ import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
|
6
6
|
import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
7
7
|
import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
|
|
8
8
|
import { emojiImage, emojiSprite } from '@atlaskit/emoji';
|
|
9
|
-
import { B100, B400, B50, B75, G200, G400, G50, G75, N0, N20, N60, P100, P400, P50, P75, R100, R400, R50, R75, T100, T50, T75, Y200, Y400, Y50, Y75 } from '@atlaskit/theme/colors';
|
|
10
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
11
10
|
const lightPanelColors = {
|
|
12
|
-
info:
|
|
13
|
-
note:
|
|
14
|
-
tip:
|
|
15
|
-
success:
|
|
16
|
-
warning:
|
|
17
|
-
error:
|
|
11
|
+
info: '#DEEBFF',
|
|
12
|
+
note: '#EAE6FF',
|
|
13
|
+
tip: '#E3FCEF',
|
|
14
|
+
success: '#E3FCEF',
|
|
15
|
+
warning: '#FFFAE6',
|
|
16
|
+
error: '#FFEBE6'
|
|
18
17
|
};
|
|
19
18
|
export const darkPanelColors = {
|
|
20
19
|
// standard panels
|
|
@@ -79,30 +78,18 @@ export const darkPanelColors = {
|
|
|
79
78
|
TextColor: '#D9DDE3'
|
|
80
79
|
};
|
|
81
80
|
const lightIconColor = {
|
|
82
|
-
info:
|
|
83
|
-
note:
|
|
84
|
-
tip:
|
|
85
|
-
success:
|
|
86
|
-
warning:
|
|
87
|
-
error:
|
|
81
|
+
info: "var(--ds-icon-information, #1D7AFC)",
|
|
82
|
+
note: "var(--ds-icon-discovery, #8270DB)",
|
|
83
|
+
tip: "var(--ds-icon-success, #22A06B)",
|
|
84
|
+
success: "var(--ds-icon-success, #22A06B)",
|
|
85
|
+
warning: "var(--ds-icon-warning, #E56910)",
|
|
86
|
+
error: "var(--ds-icon-danger, #C9372C)"
|
|
88
87
|
};
|
|
89
88
|
|
|
90
89
|
// New custom icons are a little smaller than predefined icons.
|
|
91
90
|
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
92
91
|
const panelEmojiSpriteVerticalAlignment = -(8 * 3 - akEditorCustomIconSize) / 2;
|
|
93
92
|
const panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
94
|
-
|
|
95
|
-
// TODO: https://product-fabric.atlassian.net/browse/DSP-4066
|
|
96
|
-
const panelDarkModeColors = [[B50, darkPanelColors.B1200S], [B75, darkPanelColors.B900], [B100, darkPanelColors.B800S], [N0, darkPanelColors.LightGray], [N20, darkPanelColors.Gray], [N60, darkPanelColors.DarkGray], [T50, darkPanelColors.T1200S], [T75, darkPanelColors.T900], [T100, darkPanelColors.T900S], [G50, darkPanelColors.G1200S], [G75, darkPanelColors.G900], [G200, darkPanelColors.G900S], [Y50, darkPanelColors.Y1200S], [Y75, darkPanelColors.Y900], [Y200, darkPanelColors.Y800S], [R50, darkPanelColors.R1200S], [R75, darkPanelColors.R900], [R100, darkPanelColors.R800S], [P50, darkPanelColors.P1200S], [P75, darkPanelColors.P900], [P100, darkPanelColors.P800S]];
|
|
97
|
-
|
|
98
|
-
// used for custom panels
|
|
99
|
-
export const getPanelDarkColor = panelColor => {
|
|
100
|
-
const colorObject = panelDarkModeColors.find(color => color[0] === panelColor || color[1] === panelColor);
|
|
101
|
-
return colorObject ? colorObject[1] : darkPanelColors.B1200S;
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
// used for custom panels
|
|
105
|
-
export const getPanelBackgroundDarkModeColors = panelDarkModeColors.map(([colorName, colorValue]) => getPanelDarkModeCSS(colorName, colorValue)).join('\n');
|
|
106
93
|
export function getPanelDarkModeCSS(colorName, colorValue) {
|
|
107
94
|
return `
|
|
108
95
|
&[data-panel-color="${colorName}"] {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { N30 } from '@atlaskit/theme/colors';
|
|
4
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
4
|
export const buttonGroupStyle = css({
|
|
6
5
|
display: 'inline-flex',
|
|
@@ -14,7 +13,7 @@ export const buttonGroupStyle = css({
|
|
|
14
13
|
// If you make change here, change in above file as well.
|
|
15
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
16
15
|
export const separatorStyles = css({
|
|
17
|
-
background:
|
|
16
|
+
background: "var(--ds-border, #091E4224)",
|
|
18
17
|
width: '1px',
|
|
19
18
|
height: '24px',
|
|
20
19
|
display: 'inline-block',
|