@atlaskit/editor-core 193.2.1 → 193.3.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 +17 -0
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +23 -3
- package/dist/cjs/nodeviews/index.js +1 -5
- package/dist/cjs/presets/universal.js +0 -1
- package/dist/cjs/types/browser.js +1 -5
- package/dist/cjs/types/dom-at-pos.js +1 -5
- package/dist/cjs/types/editor-appearance.js +1 -5
- package/dist/cjs/types/editor-plugin.js +1 -5
- package/dist/cjs/types/editor-react-context.js +1 -5
- package/dist/cjs/types/empty-state-handler.js +1 -5
- package/dist/cjs/types/extension-config.js +1 -5
- package/dist/cjs/types/feature-flags.js +1 -5
- package/dist/cjs/types/i18n.js +1 -5
- package/dist/cjs/types/index.js +1 -5
- package/dist/cjs/types/performance-tracking.js +1 -5
- package/dist/cjs/types/pm-config.js +1 -5
- package/dist/cjs/types/pm-plugin.js +1 -5
- package/dist/cjs/types/ui-components.js +1 -5
- package/dist/cjs/ui/Addon/ClickAreaMobile/index.js +4 -5
- package/dist/cjs/ui/Addon/Dropdown/styles.js +9 -4
- package/dist/cjs/ui/Addon/DropdownItem/styles.js +15 -4
- package/dist/cjs/ui/Appearance/Chromeless.js +26 -6
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +20 -14
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +66 -12
- package/dist/cjs/ui/AppearanceComponents/Mobile.js +15 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +23 -4
- package/dist/cjs/ui/ContentStyles/date.js +1 -0
- package/dist/cjs/ui/ContentStyles/extension.js +1 -1
- package/dist/cjs/ui/ContentStyles/index.js +3 -0
- package/dist/cjs/ui/ContentStyles/layout.js +1 -0
- package/dist/cjs/ui/ContentStyles/media.js +1 -1
- package/dist/cjs/ui/ContentStyles/status.js +1 -0
- package/dist/cjs/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/cjs/ui/ContextPanel/index.js +24 -8
- package/dist/cjs/ui/PluginSlot/index.js +4 -5
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +7 -5
- package/dist/cjs/ui/WithFlash/index.js +7 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +23 -35
- package/dist/es2019/nodeviews/index.js +0 -1
- package/dist/es2019/presets/universal.js +0 -1
- package/dist/es2019/types/browser.js +0 -1
- package/dist/es2019/types/dom-at-pos.js +0 -1
- package/dist/es2019/types/editor-appearance.js +0 -1
- package/dist/es2019/types/editor-plugin.js +0 -1
- package/dist/es2019/types/editor-react-context.js +0 -1
- package/dist/es2019/types/empty-state-handler.js +0 -1
- package/dist/es2019/types/extension-config.js +0 -1
- package/dist/es2019/types/feature-flags.js +0 -1
- package/dist/es2019/types/i18n.js +0 -1
- package/dist/es2019/types/index.js +0 -1
- package/dist/es2019/types/performance-tracking.js +0 -1
- package/dist/es2019/types/pm-config.js +0 -1
- package/dist/es2019/types/pm-plugin.js +0 -1
- package/dist/es2019/types/ui-components.js +0 -1
- package/dist/es2019/ui/Addon/ClickAreaMobile/index.js +3 -4
- package/dist/es2019/ui/Addon/Dropdown/styles.js +9 -9
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +14 -15
- package/dist/es2019/ui/Appearance/Chromeless.js +23 -25
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +16 -11
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +68 -81
- package/dist/es2019/ui/AppearanceComponents/Mobile.js +12 -13
- package/dist/es2019/ui/ChromeCollapsed/styles.js +21 -23
- package/dist/es2019/ui/ContentStyles/date.js +1 -0
- package/dist/es2019/ui/ContentStyles/expand.js +1 -2
- package/dist/es2019/ui/ContentStyles/extension.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +5 -3
- package/dist/es2019/ui/ContentStyles/layout.js +2 -0
- package/dist/es2019/ui/ContentStyles/media.js +1 -1
- package/dist/es2019/ui/ContentStyles/status.js +2 -0
- package/dist/es2019/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/es2019/ui/ContextPanel/index.js +23 -23
- package/dist/es2019/ui/PluginSlot/index.js +3 -3
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +5 -6
- package/dist/es2019/ui/WithFlash/index.js +7 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +23 -3
- package/dist/esm/nodeviews/index.js +0 -1
- package/dist/esm/presets/universal.js +0 -1
- package/dist/esm/types/browser.js +0 -1
- package/dist/esm/types/dom-at-pos.js +0 -1
- package/dist/esm/types/editor-appearance.js +0 -1
- package/dist/esm/types/editor-plugin.js +0 -1
- package/dist/esm/types/editor-react-context.js +0 -1
- package/dist/esm/types/empty-state-handler.js +0 -1
- package/dist/esm/types/extension-config.js +0 -1
- package/dist/esm/types/feature-flags.js +0 -1
- package/dist/esm/types/i18n.js +0 -1
- package/dist/esm/types/index.js +0 -1
- package/dist/esm/types/performance-tracking.js +0 -1
- package/dist/esm/types/pm-config.js +0 -1
- package/dist/esm/types/pm-plugin.js +0 -1
- package/dist/esm/types/ui-components.js +0 -1
- package/dist/esm/ui/Addon/ClickAreaMobile/index.js +3 -3
- package/dist/esm/ui/Addon/Dropdown/styles.js +9 -3
- package/dist/esm/ui/Addon/DropdownItem/styles.js +15 -3
- package/dist/esm/ui/Appearance/Chromeless.js +25 -4
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +20 -14
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +66 -12
- package/dist/esm/ui/AppearanceComponents/Mobile.js +13 -3
- package/dist/esm/ui/ChromeCollapsed/styles.js +23 -3
- package/dist/esm/ui/ContentStyles/date.js +1 -0
- package/dist/esm/ui/ContentStyles/expand.js +1 -2
- package/dist/esm/ui/ContentStyles/extension.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +5 -3
- package/dist/esm/ui/ContentStyles/layout.js +2 -0
- package/dist/esm/ui/ContentStyles/media.js +1 -1
- package/dist/esm/ui/ContentStyles/status.js +2 -0
- package/dist/esm/ui/ContentStyles/tasks-and-decisions.js +1 -1
- package/dist/esm/ui/ContextPanel/index.js +23 -6
- package/dist/esm/ui/PluginSlot/index.js +3 -3
- package/dist/esm/ui/Toolbar/ToolbarInner.js +6 -3
- package/dist/esm/ui/WithFlash/index.js +7 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types/create-editor/WithEditorView.d.ts +2 -2
- package/dist/types/create-editor/get-ui-component.d.ts +1 -1
- package/dist/types/types/extension-config.d.ts +0 -1
- package/dist/types/ui/Toolbar/Toolbar.d.ts +2 -2
- package/dist/types/ui/Toolbar/ToolbarWithSizeDetector.d.ts +2 -3
- package/dist/types-ts4.5/create-editor/ErrorBoundary.d.ts +1 -1
- package/dist/types-ts4.5/create-editor/WithEditorView.d.ts +2 -2
- package/dist/types-ts4.5/create-editor/get-ui-component.d.ts +1 -1
- package/dist/types-ts4.5/types/extension-config.d.ts +0 -1
- package/dist/types-ts4.5/ui/Toolbar/Toolbar.d.ts +2 -2
- package/dist/types-ts4.5/ui/Toolbar/ToolbarWithSizeDetector.d.ts +2 -3
- package/package.json +12 -8
|
@@ -25,4 +25,5 @@ var _consts = require("@atlaskit/editor-plugins/table/ui/consts");
|
|
|
25
25
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
26
26
|
var _colors = require("@atlaskit/theme/colors");
|
|
27
27
|
var _templateObject;
|
|
28
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
28
29
|
var layoutStyles = exports.layoutStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", " [data-layout-section] {\n // TODO: Migrate away from gridSize\n // Recommendation: Replace directly with 7px\n margin: ", " -", "px 0;\n transition: border-color 0.3s ", ";\n cursor: pointer;\n\n /* Inner cursor located 26px from left */\n [data-layout-column] {\n flex: 1;\n min-width: 0;\n border: ", "px solid\n ", ";\n border-radius: 4px;\n padding: ", "px;\n box-sizing: border-box;\n\n > div {\n > :not(style):first-child,\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:first-child + span + * {\n margin-top: 0;\n }\n\n > .embedCardView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor.-right:first-child\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > style:first-child\n + .ProseMirror-gapcursor.-right\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > .ProseMirror-gapcursor.-right:first-of-type\n + .embedCardView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item,\n > style:first-child\n + .ProseMirror-gapcursor\n + span\n + .mediaSingleView-content-wrap\n .rich-media-item {\n margin-top: 0;\n }\n\n /* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n > [data-node-type='decisionList'] {\n li:first-of-type [data-decision-wrapper] {\n margin-top: 0;\n }\n }\n }\n\n /* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n [data-layout-content] {\n height: 100%;\n cursor: text;\n }\n }\n\n [data-layout-column] + [data-layout-column] {\n margin-left: ", "px;\n }\n\n @media screen and (max-width: ", "px) {\n [data-layout-column] + [data-layout-column] {\n margin-left: 0;\n }\n }\n\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-4441\n /* Shows the border when cursor is inside a layout */\n &.selected [data-layout-column],\n &:hover [data-layout-column] {\n border: ", "px solid\n ", ";\n }\n\n &.selected.danger > [data-layout-column] {\n background-color: ", ";\n border-color: ", ";\n }\n\n &.", ":not(.danger) {\n [data-layout-column] {\n ", "\n }\n }\n }\n }\n\n .fabric-editor--full-width-mode .ProseMirror {\n [data-layout-section] {\n .", " {\n margin: 0 ", "px;\n }\n }\n }\n"])), _styles.columnLayoutSharedStyle, "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset, _editorSharedStyles.akEditorSwoopCubicBezier, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-bold, ".concat(_colors.N80A, ")"), _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_SECTION_MARGIN, _editorSharedStyles.gridMediumMaxWidth, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-bold, ".concat(_colors.N90A, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Border, _editorSharedStyles.SelectionStyle.Blanket]), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode);
|
|
@@ -13,7 +13,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
13
13
|
var _mediaCard = require("@atlaskit/media-card");
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
var _templateObject;
|
|
16
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/no-exported-css -- Needs manual remediation
|
|
17
17
|
var mediaStyles = exports.mediaStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n\n .media-extended-resize-experience[layout^='wrap-'] {\n // override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n // to prevent scroll bar\n overflow: visible !important;\n }\n\n & [layout^='wrap-'] + [layout^='wrap-'] {\n clear: none;\n & + p,\n & + div[class^='fabric-editor-align'],\n & + ul,\n & + ol,\n & + h1,\n & + h2,\n & + h3,\n & + h4,\n & + h5,\n & + h6 {\n clear: both !important;\n }\n & .", " {\n margin-left: 0;\n margin-right: 0;\n }\n }\n\n ", "\n\n .mediaSingleView-content-wrap[layout^='wrap-'] {\n max-width: 100%;\n // overwrite default Prosemirror setting making it clear: both\n clear: inherit;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-left'] {\n float: left;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right'] {\n float: right;\n }\n\n .mediaSingleView-content-wrap[layout='wrap-right']\n + .mediaSingleView-content-wrap[layout='wrap-left'] {\n clear: both;\n }\n\n /* Larger margins for resize handlers when at depth 0 of the document */\n & > .mediaSingleView-content-wrap {\n .richMedia-resize-handle-right {\n margin-right: -", "px;\n }\n .richMedia-resize-handle-left {\n margin-left: -", "px;\n }\n }\n }\n\n .richMedia-resize-handle-right,\n .richMedia-resize-handle-left {\n display: flex;\n flex-direction: column;\n\n /* vertical align */\n justify-content: center;\n }\n\n .richMedia-resize-handle-right {\n align-items: flex-end;\n padding-right: ", ";\n margin-right: -", "px;\n }\n\n .richMedia-resize-handle-left {\n align-items: flex-start;\n padding-left: ", ";\n margin-left: -", "px;\n }\n\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n content: ' ';\n display: flex;\n width: 3px;\n height: 64px;\n\n border-radius: 6px;\n }\n\n .", ":hover .richMedia-resize-handle-left::after,\n .", ":hover .richMedia-resize-handle-right::after {\n background: ", ";\n }\n\n .", " .richMedia-resize-handle-right::after,\n .", " .richMedia-resize-handle-left::after,\n .", " .richMedia-resize-handle-right:hover::after,\n .", " .richMedia-resize-handle-left:hover::after,\n .", ".is-resizing .richMedia-resize-handle-right::after,\n .", ".is-resizing .richMedia-resize-handle-left::after {\n background: ", ";\n }\n\n .__resizable_base__ {\n left: unset !important;\n width: auto !important;\n height: auto !important;\n }\n\n /* Danger when top level node for smart cards / inline links */\n .danger > div > div > .media-card-frame,\n .danger > span > a {\n background-color: ", ";\n box-shadow: 0px 0px 0px ", "px\n ", ";\n transition: background-color 0s, box-shadow 0s;\n }\n /* Danger when nested node or common */\n .danger {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* Media single video player */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n /* New file experience */\n .", " .", " {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n /* Media resize legacy handlers */\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", " !important;\n }\n /* Media resize new handlers */\n .resizer-handle-thumb {\n background: ", " !important;\n }\n\n /* Smart cards */\n div div .media-card-frame,\n .inlineCardView-content-wrap > span > a {\n background-color: ", "; /* R75 with 50% opactiy */\n transition: background-color 0s;\n }\n\n div div .media-card-frame::after {\n box-shadow: none;\n }\n }\n\n .warning {\n /* Media single */\n .", " .", "::after {\n border: 1px solid ", ";\n }\n\n .", " .", "::after {\n border: 1px solid ", ";\n }\n\n .", " .", " {\n box-shadow: 0 0 0 1px ", " !important;\n }\n\n .resizer-handle-thumb {\n background: ", " !important;\n }\n }\n"])), _styles.mediaSingleSharedStyle, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _mediaInline.mediaInlineImageStyles, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border, ".concat(_colors.N60, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-warning, ".concat(_colors.Y500, ")"), _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-warning, ".concat(_colors.Y500, ")"), _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-warning, ".concat(_colors.Y500, ")"), "var(--ds-icon-warning, ".concat(_colors.Y500, ")"));
|
|
18
18
|
|
|
19
19
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
@@ -10,4 +10,5 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
12
|
var _templateObject;
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
13
14
|
var statusStyles = exports.statusStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", ",\n .", ",\n [data-layout-section] {\n .", " {\n max-width: 100%;\n line-height: 0;\n\n > span {\n width: 100%;\n }\n }\n }\n .", " {\n > span {\n cursor: pointer;\n line-height: 0; /* Prevent responsive layouts increasing height of container. */\n }\n\n &.", "\n .", "\n > span {\n ", "\n }\n }\n\n .danger {\n .", " > span {\n background-color: ", ";\n }\n\n .", ".", "\n .", "\n > span {\n box-shadow: 0 0 0 ", "px ", ";\n }\n }\n"])), _styles.TableSharedCssClassName.TABLE_CELL_WRAPPER, _styles.TableSharedCssClassName.TABLE_HEADER_CELL_WRAPPER, _styles.StatusSharedCssClassName.STATUS_CONTAINER, _styles.StatusSharedCssClassName.STATUS_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.StatusSharedCssClassName.STATUS_LOZENGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.StatusSharedCssClassName.STATUS_LOZENGE, _editorSharedStyles.akEditorDeleteBackgroundWithOpacity, _styles.StatusSharedCssClassName.STATUS_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.StatusSharedCssClassName.STATUS_LOZENGE, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder);
|
|
@@ -10,5 +10,5 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
12
|
var _templateObject;
|
|
13
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation due to `getSelectionStyles`
|
|
13
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/no-exported-css -- Needs manual remediation due to `getSelectionStyles`
|
|
14
14
|
var taskDecisionStyles = exports.taskDecisionStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n [data-decision-wrapper] {\n cursor: pointer;\n }\n\n .", " > [data-decision-wrapper],\n ol[data-node-type='decisionList'].", " {\n border-radius: 4px;\n ", "\n }\n\n .danger {\n .", ".", "\n > div {\n box-shadow: 0 0 0 ", "px\n ", ";\n background-color: ", ";\n &::after {\n content: none; /* reset the Blanket selection style */\n }\n }\n }\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _styles.TaskDecisionSharedCssClassName.DECISION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"));
|
|
@@ -17,7 +17,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
17
17
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
18
18
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
19
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
21
20
|
var _react = _interopRequireWildcard(require("react"));
|
|
22
21
|
var _react2 = require("@emotion/react");
|
|
23
22
|
var _Transition = _interopRequireDefault(require("react-transition-group/Transition"));
|
|
@@ -30,20 +29,22 @@ var _document = require("../../utils/document");
|
|
|
30
29
|
var _WithEditorActions = _interopRequireDefault(require("../WithEditorActions"));
|
|
31
30
|
var _WithPluginState = _interopRequireDefault(require("../WithPluginState"));
|
|
32
31
|
var _excluded = ["actions"];
|
|
33
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
34
|
-
/** @jsx jsx */
|
|
35
32
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
36
33
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
37
34
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
38
35
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
39
36
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
40
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
37
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
41
38
|
var ANIM_SPEED_MS = 500;
|
|
42
39
|
var EDITOR_WIDTH = _editorSharedStyles.akEditorDefaultLayoutWidth + _editorSharedStyles.akEditorBreakoutPadding;
|
|
43
40
|
var WIDE_EDITOR_WIDTH = _editorSharedStyles.akEditorWideLayoutWidth + _editorSharedStyles.akEditorBreakoutPadding;
|
|
44
41
|
var FULLWIDTH_MODE = 'full-width';
|
|
45
42
|
var WIDE_MODE = 'wide';
|
|
46
|
-
var absolutePanelStyles = (0, _react2.css)(
|
|
43
|
+
var absolutePanelStyles = (0, _react2.css)({
|
|
44
|
+
position: 'absolute',
|
|
45
|
+
right: 0,
|
|
46
|
+
height: "calc(100% - ".concat(_editorSharedStyles.ATLASSIAN_NAVIGATION_HEIGHT, ")")
|
|
47
|
+
});
|
|
47
48
|
var checkTableExistsInDoc = function checkTableExistsInDoc(editorView) {
|
|
48
49
|
var tableNodeSchema = editorView.state.schema.nodes.table;
|
|
49
50
|
var findResult = (0, _utils.findChildrenByType)(editorView.state.doc, tableNodeSchema);
|
|
@@ -69,9 +70,24 @@ var shouldPanelBePositionedOverEditor = exports.shouldPanelBePositionedOverEdito
|
|
|
69
70
|
return editorNotFullWidth && (hasSpaceForPanel || hasSpaceForWideBreakoutsAndPanel) && !isTableInDoc;
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
|
-
var panelHidden = (0, _react2.css)(
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
var panelHidden = (0, _react2.css)({
|
|
74
|
+
width: 0
|
|
75
|
+
});
|
|
76
|
+
var panel = exports.panel = (0, _react2.css)({
|
|
77
|
+
width: "".concat(_editorSharedStyles.akEditorContextPanelWidth, "px"),
|
|
78
|
+
height: '100%',
|
|
79
|
+
transition: "width ".concat(ANIM_SPEED_MS, "ms ").concat(_editorSharedStyles.akEditorSwoopCubicBezier),
|
|
80
|
+
overflow: 'hidden',
|
|
81
|
+
boxShadow: "inset 2px 0 0 0 ".concat("var(--ds-border, ".concat(_colors.N30, ")"))
|
|
82
|
+
});
|
|
83
|
+
var content = exports.content = (0, _react2.css)({
|
|
84
|
+
transition: "width 600ms ".concat(_editorSharedStyles.akEditorSwoopCubicBezier),
|
|
85
|
+
boxSizing: 'border-box',
|
|
86
|
+
padding: "var(--ds-space-200, 16px)".concat(" ", "var(--ds-space-200, 16px)", " 0px"),
|
|
87
|
+
width: "".concat(_editorSharedStyles.akEditorContextPanelWidth, "px"),
|
|
88
|
+
height: '100%',
|
|
89
|
+
overflowY: 'auto'
|
|
90
|
+
});
|
|
75
91
|
var SwappableContentArea = exports.SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
76
92
|
(0, _inherits2.default)(SwappableContentArea, _React$PureComponent);
|
|
77
93
|
var _super = _createSuper(SwappableContentArea);
|
|
@@ -12,18 +12,17 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
12
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
16
15
|
var _react = _interopRequireDefault(require("react"));
|
|
17
16
|
var _react2 = require("@emotion/react");
|
|
18
17
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
19
18
|
var _utils = require("../../utils");
|
|
20
19
|
var _ErrorBoundary = require("../ErrorBoundary");
|
|
21
20
|
var _mountPluginHooks = require("./mount-plugin-hooks");
|
|
22
|
-
var _templateObject;
|
|
23
|
-
/** @jsx jsx */
|
|
24
21
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
26
|
-
var pluginsComponentsWrapper = (0, _react2.css)(
|
|
22
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
23
|
+
var pluginsComponentsWrapper = (0, _react2.css)({
|
|
24
|
+
display: 'flex'
|
|
25
|
+
});
|
|
27
26
|
var PluginSlot = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
28
27
|
(0, _inherits2.default)(PluginSlot, _React$Component);
|
|
29
28
|
var _super = _createSuper(PluginSlot);
|
|
@@ -10,15 +10,17 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
|
|
|
10
10
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
11
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
12
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
13
|
-
var
|
|
13
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
14
14
|
var _react = _interopRequireDefault(require("react"));
|
|
15
15
|
var _react2 = require("@emotion/react");
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
|
-
var _templateObject;
|
|
18
|
-
/** @jsx jsx */
|
|
19
17
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
20
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
|
-
var toolbarComponentsWrapper = (0, _react2.css)(
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
|
|
19
|
+
var toolbarComponentsWrapper = (0, _react2.css)((0, _defineProperty2.default)({
|
|
20
|
+
display: 'flex'
|
|
21
|
+
}, "@media (max-width: ".concat(_editorSharedStyles.akEditorMobileMaxWidth, "px)"), {
|
|
22
|
+
justifyContent: 'space-between'
|
|
23
|
+
}));
|
|
22
24
|
var ToolbarInner = exports.ToolbarInner = /*#__PURE__*/function (_React$Component) {
|
|
23
25
|
(0, _inherits2.default)(ToolbarInner, _React$Component);
|
|
24
26
|
var _super = _createSuper(ToolbarInner);
|
|
@@ -64,10 +64,13 @@ var WithFlash = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
|
64
64
|
animate = _this$props.animate,
|
|
65
65
|
children = _this$props.children;
|
|
66
66
|
this.toggle = animate && !this.toggle;
|
|
67
|
-
return (
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
return (
|
|
68
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
69
|
+
(0, _react2.jsx)("div", {
|
|
70
|
+
css: animate ? flashWrapperAnimated : flashWrapper,
|
|
71
|
+
className: this.toggle ? '-flash' : ''
|
|
72
|
+
}, children)
|
|
73
|
+
);
|
|
71
74
|
}
|
|
72
75
|
}]);
|
|
73
76
|
return WithFlash;
|
|
@@ -5,43 +5,31 @@ import { ZERO_WIDTH_SPACE } from '@atlaskit/editor-common/utils';
|
|
|
5
5
|
// For reasoning behind styles, see comments in:
|
|
6
6
|
// ./getInlineNodeViewProducer -> portalChildren()
|
|
7
7
|
|
|
8
|
-
export const InlineNodeViewSharedStyles = css
|
|
9
|
-
|
|
10
|
-
display: inline
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
& > *:not(.zeroWidthSpaceContainer) {
|
|
19
|
-
white-space: pre-wrap;
|
|
8
|
+
export const InlineNodeViewSharedStyles = css({
|
|
9
|
+
[`.${inlineNodeViewClassname}`]: {
|
|
10
|
+
display: 'inline',
|
|
11
|
+
userSelect: 'all',
|
|
12
|
+
whiteSpace: 'nowrap',
|
|
13
|
+
'& > *:not(.zeroWidthSpaceContainer)': {
|
|
14
|
+
whiteSpace: 'pre-wrap'
|
|
15
|
+
},
|
|
16
|
+
'& > .assistive': {
|
|
17
|
+
userSelect: 'none'
|
|
20
18
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/** Remove browser deafult selections style. This prevents
|
|
27
|
-
unexpected visual artefacts in Safari when navigating
|
|
28
|
-
with the keyboard or making range selections. */
|
|
29
|
-
&.ua-safari {
|
|
30
|
-
.${inlineNodeViewClassname} {
|
|
31
|
-
::selection,
|
|
32
|
-
*::selection {
|
|
33
|
-
background: transparent;
|
|
19
|
+
},
|
|
20
|
+
'&.ua-safari': {
|
|
21
|
+
[`.${inlineNodeViewClassname}`]: {
|
|
22
|
+
'::selection, *::selection': {
|
|
23
|
+
background: 'transparent'
|
|
34
24
|
}
|
|
35
25
|
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
::after {
|
|
44
|
-
content: '${ZERO_WIDTH_SPACE}';
|
|
26
|
+
},
|
|
27
|
+
[`&.ua-chrome .${inlineNodeViewClassname} > span`]: {
|
|
28
|
+
userSelect: 'none'
|
|
29
|
+
},
|
|
30
|
+
[`.${inlineNodeViewClassname}AddZeroWidthSpace`]: {
|
|
31
|
+
'::after': {
|
|
32
|
+
content: `'${ZERO_WIDTH_SPACE}'`
|
|
45
33
|
}
|
|
46
34
|
}
|
|
47
|
-
|
|
35
|
+
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -146,7 +146,6 @@ export default function createUniversalPreset(appearance, props, featureFlags, p
|
|
|
146
146
|
allowCustomPanelEdit: typeof props.allowPanel === 'object' ? props.allowPanel.allowCustomPanelEdit : false
|
|
147
147
|
}], Boolean(props.allowPanel)).maybeAdd(contextPanelPlugin, Boolean(isFullPage)).maybeAdd([extensionPlugin, {
|
|
148
148
|
breakoutEnabled: appearance === 'full-page' && (typeof props.allowExtension === 'object' ? props.allowExtension.allowBreakout : true) !== false,
|
|
149
|
-
allowAutoSave: typeof props.allowExtension === 'object' ? props.allowExtension.allowAutoSave : false,
|
|
150
149
|
extensionHandlers: props.extensionHandlers,
|
|
151
150
|
useLongPressSelection: false,
|
|
152
151
|
appearance
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -12,10 +12,9 @@ import { clickAreaClickHandler } from '../click-area-helper';
|
|
|
12
12
|
const clickWrapper = ({
|
|
13
13
|
isExpanded,
|
|
14
14
|
minHeight
|
|
15
|
-
}) => css
|
|
16
|
-
height: 100
|
|
17
|
-
|
|
18
|
-
`;
|
|
15
|
+
}) => css({
|
|
16
|
+
height: '100%'
|
|
17
|
+
}, isExpanded && minHeight ? `min-height: ${minHeight}px` : '');
|
|
19
18
|
/**
|
|
20
19
|
* Click Area is responsible for improving UX by ensuring the user
|
|
21
20
|
* can always tap beneath the content area, to insert more content.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { N60A } from '@atlaskit/theme/colors';
|
|
3
3
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
4
|
-
export const dropdown = css
|
|
5
|
-
display: flex
|
|
6
|
-
|
|
7
|
-
background:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
padding:
|
|
12
|
-
|
|
4
|
+
export const dropdown = css({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
background: "var(--ds-surface-overlay, white)",
|
|
8
|
+
borderRadius: `${borderRadius()}px`,
|
|
9
|
+
boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N60A}, 0 0 1px ${N60A}`})`,
|
|
10
|
+
boxSizing: 'border-box',
|
|
11
|
+
padding: `${"var(--ds-space-050, 4px)"} 0`
|
|
12
|
+
});
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { N20, N800 } from '@atlaskit/theme/colors';
|
|
3
|
-
export const dropdownItem = css
|
|
4
|
-
display: flex
|
|
5
|
-
|
|
6
|
-
cursor: pointer
|
|
7
|
-
|
|
8
|
-
padding:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
export const dropdownItem = css({
|
|
4
|
+
display: 'flex',
|
|
5
|
+
alignItems: 'center',
|
|
6
|
+
cursor: 'pointer',
|
|
7
|
+
textDecoration: 'none',
|
|
8
|
+
padding: `${"var(--ds-space-100, 8px)"} ${"var(--ds-space-400, 32px)"} ${"var(--ds-space-100, 8px)"} ${"var(--ds-space-150, 12px)"}`,
|
|
9
|
+
color: `var(--ds-text, ${N800})`,
|
|
10
|
+
'> span': {
|
|
11
|
+
display: 'flex',
|
|
12
|
+
marginRight: "var(--ds-space-100, 8px)"
|
|
13
|
+
},
|
|
14
|
+
'&:hover': {
|
|
15
|
+
backgroundColor: `var(--ds-background-neutral-subtle-hovered, ${N20})`
|
|
14
16
|
}
|
|
15
|
-
|
|
16
|
-
background-color: ${`var(--ds-background-neutral-subtle-hovered, ${N20})`};
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
17
|
+
});
|
|
@@ -8,28 +8,26 @@ import { createEditorContentStyle } from '../ContentStyles';
|
|
|
8
8
|
import PluginSlot from '../PluginSlot';
|
|
9
9
|
import { scrollbarStyles } from '../styles';
|
|
10
10
|
import WithFlash from '../WithFlash';
|
|
11
|
-
const chromelessEditor = css
|
|
12
|
-
|
|
13
|
-
height: auto
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
& > :last-child {
|
|
29
|
-
padding-bottom: 0.5em;
|
|
11
|
+
const chromelessEditor = css({
|
|
12
|
+
lineHeight: '20px',
|
|
13
|
+
height: 'auto',
|
|
14
|
+
overflowX: 'hidden',
|
|
15
|
+
overflowY: 'auto'
|
|
16
|
+
}, scrollbarStyles, {
|
|
17
|
+
maxWidth: 'inherit',
|
|
18
|
+
boxSizing: 'border-box',
|
|
19
|
+
wordWrap: 'break-word',
|
|
20
|
+
'div > .ProseMirror': {
|
|
21
|
+
outline: 'none',
|
|
22
|
+
whiteSpace: 'pre-wrap',
|
|
23
|
+
padding: 0,
|
|
24
|
+
margin: 0,
|
|
25
|
+
'& > :last-child': {
|
|
26
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
27
|
+
paddingBottom: '0.5em'
|
|
30
28
|
}
|
|
31
29
|
}
|
|
32
|
-
|
|
30
|
+
});
|
|
33
31
|
const ContentArea = createEditorContentStyle();
|
|
34
32
|
ContentArea.displayName = 'ContentArea';
|
|
35
33
|
export default class Editor extends React.Component {
|
|
@@ -62,11 +60,11 @@ export default class Editor extends React.Component {
|
|
|
62
60
|
return jsx(WithFlash, {
|
|
63
61
|
animate: maxContentSizeReached
|
|
64
62
|
}, jsx("div", {
|
|
65
|
-
css: [chromelessEditor, maxHeight && css
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
css: [chromelessEditor, maxHeight && css({
|
|
64
|
+
maxHeight: `${maxHeight}px`
|
|
65
|
+
}), css({
|
|
66
|
+
minHeight: `${minHeight}px`
|
|
67
|
+
})],
|
|
70
68
|
"data-testid": "chromeless-editor",
|
|
71
69
|
ref: ref => this.containerElement = ref
|
|
72
70
|
}, jsx(ContentArea, {
|
|
@@ -75,18 +75,23 @@ const StickyToolbar = props => {
|
|
|
75
75
|
setTop(props.offsetTop || 0);
|
|
76
76
|
}
|
|
77
77
|
}, [props.externalToolbarRef, props.offsetTop]);
|
|
78
|
-
return
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
78
|
+
return (
|
|
79
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
80
|
+
jsx("div", {
|
|
81
|
+
css: [mainToolbarWrapperStyle(props.twoLineEditorToolbar), stickyToolbarWrapperStyle]
|
|
82
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
83
|
+
,
|
|
84
|
+
style: {
|
|
85
|
+
top: `${top}px`
|
|
86
|
+
},
|
|
87
|
+
"data-testid": "ak-editor-main-toolbar",
|
|
88
|
+
className: 'show-keyline'
|
|
89
|
+
}, props.children)
|
|
90
|
+
);
|
|
88
91
|
};
|
|
89
|
-
const FixedToolbar = props =>
|
|
92
|
+
const FixedToolbar = props =>
|
|
93
|
+
// eslint-disable-next-line @atlaskit/design-system/prefer-primitives
|
|
94
|
+
jsx("div", {
|
|
90
95
|
css: mainToolbarWrapperStyle(props.twoLineEditorToolbar),
|
|
91
96
|
"data-testid": "ak-editor-main-toolbar"
|
|
92
97
|
}, props.children);
|