@atlaskit/editor-common 112.7.4 → 112.8.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 +20 -0
- package/afm-cc/tsconfig.json +0 -3
- package/afm-jira/tsconfig.json +0 -3
- package/afm-products/tsconfig.json +0 -3
- package/dist/cjs/element-browser/components/CategoryList.js +1 -1
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +1 -1
- package/dist/cjs/element-browser/components/ElementList/EmptyState.js +1 -1
- package/dist/cjs/element-browser/components/ElementSearch.js +1 -1
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +2 -2
- package/dist/cjs/extensibility/Extension/Extension/styles.js +2 -2
- package/dist/cjs/extensibility/Extension/InlineExtension/styles.js +1 -1
- package/dist/cjs/extensibility/Extension/LegacyContentHeader/index.js +1 -1
- package/dist/cjs/extensibility/MultiBodiedExtension/styles.js +1 -1
- package/dist/cjs/extensions/UnknownMacroPlaceholder.compiled.css +3 -3
- package/dist/cjs/extensions/UnknownMacroPlaceholder.js +3 -3
- package/dist/cjs/lists/build-replacement-fragment.js +85 -0
- package/dist/cjs/lists/flatten-list.js +73 -0
- package/dist/cjs/lists/index.js +27 -0
- package/dist/cjs/lists/restore-selection.js +66 -0
- package/dist/cjs/media-single/CommentBadge.js +3 -3
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/quick-insert/assets/datasource-assets-objects.js +3 -3
- package/dist/cjs/quick-insert/assets/five-column-layout.js +1 -1
- package/dist/cjs/quick-insert/assets/four-column-layout.js +1 -1
- package/dist/cjs/quick-insert/assets/one-column-layout.js +1 -1
- package/dist/cjs/quick-insert/assets/three-column-layout.js +1 -1
- package/dist/cjs/quick-insert/assets/two-column-layout.js +1 -1
- package/dist/cjs/resizer/Resizer.js +1 -1
- package/dist/cjs/styles/shared/blockquote.js +1 -1
- package/dist/cjs/styles/shared/table.js +3 -3
- package/dist/cjs/table/SortingIcon.js +3 -3
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/ui/MultiBodiedExtension/index.js +1 -1
- package/dist/cjs/ui/TableSelector/index.js +3 -4
- package/dist/cjs/ui/TableSelector/table-selector.js +9 -10
- package/dist/cjs/ui-color/ColorPalette/Palettes/highlightColorPalette.js +2 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +1 -2
- package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +3 -4
- package/dist/es2019/element-browser/components/CategoryList.js +2 -2
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +1 -1
- package/dist/es2019/element-browser/components/ElementList/EmptyState.js +1 -1
- package/dist/es2019/element-browser/components/ElementSearch.js +1 -1
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +2 -2
- package/dist/es2019/extensibility/Extension/Extension/styles.js +2 -2
- package/dist/es2019/extensibility/Extension/InlineExtension/styles.js +1 -1
- package/dist/es2019/extensibility/Extension/LegacyContentHeader/index.js +1 -1
- package/dist/es2019/extensibility/MultiBodiedExtension/styles.js +1 -1
- package/dist/es2019/extensions/UnknownMacroPlaceholder.compiled.css +3 -3
- package/dist/es2019/extensions/UnknownMacroPlaceholder.js +2 -2
- package/dist/es2019/lists/build-replacement-fragment.js +60 -0
- package/dist/es2019/lists/flatten-list.js +72 -0
- package/dist/es2019/lists/index.js +3 -0
- package/dist/es2019/lists/restore-selection.js +59 -0
- package/dist/es2019/media-single/CommentBadge.js +3 -3
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/quick-insert/assets/datasource-assets-objects.js +3 -3
- package/dist/es2019/quick-insert/assets/five-column-layout.js +1 -1
- package/dist/es2019/quick-insert/assets/four-column-layout.js +1 -1
- package/dist/es2019/quick-insert/assets/one-column-layout.js +1 -1
- package/dist/es2019/quick-insert/assets/three-column-layout.js +1 -1
- package/dist/es2019/quick-insert/assets/two-column-layout.js +1 -1
- package/dist/es2019/resizer/Resizer.js +1 -1
- package/dist/es2019/styles/shared/blockquote.js +2 -2
- package/dist/es2019/styles/shared/table.js +13 -14
- package/dist/es2019/table/SortingIcon.js +4 -4
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/ui/MultiBodiedExtension/index.js +1 -1
- package/dist/es2019/ui/TableSelector/index.js +3 -4
- package/dist/es2019/ui/TableSelector/table-selector.js +9 -10
- package/dist/es2019/ui-color/ColorPalette/Palettes/highlightColorPalette.js +2 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +1 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +7 -8
- package/dist/esm/element-browser/components/CategoryList.js +2 -2
- package/dist/esm/element-browser/components/ElementList/ElementList.js +1 -1
- package/dist/esm/element-browser/components/ElementList/EmptyState.js +1 -1
- package/dist/esm/element-browser/components/ElementSearch.js +1 -1
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +2 -2
- package/dist/esm/extensibility/Extension/Extension/styles.js +2 -2
- package/dist/esm/extensibility/Extension/InlineExtension/styles.js +1 -1
- package/dist/esm/extensibility/Extension/LegacyContentHeader/index.js +1 -1
- package/dist/esm/extensibility/MultiBodiedExtension/styles.js +1 -1
- package/dist/esm/extensions/UnknownMacroPlaceholder.compiled.css +3 -3
- package/dist/esm/extensions/UnknownMacroPlaceholder.js +3 -3
- package/dist/esm/lists/build-replacement-fragment.js +80 -0
- package/dist/esm/lists/flatten-list.js +67 -0
- package/dist/esm/lists/index.js +3 -0
- package/dist/esm/lists/restore-selection.js +59 -0
- package/dist/esm/media-single/CommentBadge.js +3 -3
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/quick-insert/assets/datasource-assets-objects.js +3 -3
- package/dist/esm/quick-insert/assets/five-column-layout.js +1 -1
- package/dist/esm/quick-insert/assets/four-column-layout.js +1 -1
- package/dist/esm/quick-insert/assets/one-column-layout.js +1 -1
- package/dist/esm/quick-insert/assets/three-column-layout.js +1 -1
- package/dist/esm/quick-insert/assets/two-column-layout.js +1 -1
- package/dist/esm/resizer/Resizer.js +1 -1
- package/dist/esm/styles/shared/blockquote.js +2 -2
- package/dist/esm/styles/shared/table.js +4 -4
- package/dist/esm/table/SortingIcon.js +3 -3
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/ui/MultiBodiedExtension/index.js +1 -1
- package/dist/esm/ui/TableSelector/index.js +3 -4
- package/dist/esm/ui/TableSelector/table-selector.js +9 -10
- package/dist/esm/ui-color/ColorPalette/Palettes/highlightColorPalette.js +2 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +1 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +3 -4
- package/dist/types/lists/build-replacement-fragment.d.ts +35 -0
- package/dist/types/lists/flatten-list.d.ts +47 -0
- package/dist/types/lists/index.d.ts +6 -0
- package/dist/types/lists/restore-selection.d.ts +41 -0
- package/dist/types-ts4.5/lists/build-replacement-fragment.d.ts +35 -0
- package/dist/types-ts4.5/lists/flatten-list.d.ts +47 -0
- package/dist/types-ts4.5/lists/index.d.ts +6 -0
- package/dist/types-ts4.5/lists/restore-selection.d.ts +41 -0
- package/package.json +2 -3
|
@@ -64,11 +64,11 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
64
64
|
var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
|
|
65
65
|
var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
|
|
66
66
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
|
|
67
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\n\t\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\t\tborder-collapse: collapse;\n\t\t\tborder: ", "px solid
|
|
67
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t", "\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin: 0 auto ", ";\n\t\t\tbox-sizing: border-box;\n\n\t\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\t.", ",\n\t\t\t\t.", " {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 1px;\n\t\t\t\theight: calc(100% - ", ");\n\t\t\t\tbackground: ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: ", ";\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tright: 0;\n\t\t\t}\n\t\t\t.", " {\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t.", "[data-with-numbered-table='true'] {\n\t\t\t\tleft: ", "px;\n\t\t\t}\n\t\t}\n\t\t.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t\tclear: both;\n\t\t}\n\n\t\t.", " {\n\t\t\twill-change: width, margin-left;\n\t\t}\n\n\t\t.", " table {\n\t\t\twill-change: width;\n\t\t}\n\n\t\t.", " > table {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\n\t\t.", " > table,\n\t\t.", " > table {\n\t\t\tmargin: ", " ", " 0 0;\n\t\t}\n\n\t\t/* support panel nested in table */\n\t\t", "\n\n\t\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\t\tborder-collapse: collapse;\n\t\t\tborder: ", "px solid ", ";\n\t\t\tborder-left-color: transparent;\n\t\t\tborder-right-color: transparent;\n\t\t\ttable-layout: fixed;\n\t\t\tfont-size: 1em;\n\t\t\twidth: 100%;\n\n\t\t\t&[data-autosize='true'] {\n\t\t\t\ttable-layout: auto;\n\t\t\t}\n\n\t\t\t& {\n\t\t\t\t* {\n\t\t\t\t\tbox-sizing: border-box;\n\t\t\t\t}\n\t\t\t\thr {\n\t\t\t\t\tbox-sizing: content-box;\n\t\t\t\t}\n\n\t\t\t\ttbody {\n\t\t\t\t\tborder-bottom: none;\n\t\t\t\t}\n\t\t\t\tth td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\t> tbody > tr > th,\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tmin-width: ", "px;\n\t\t\t\t\tfont-weight: ", ";\n\t\t\t\t\tvertical-align: top;\n\t\t\t\t\tborder: 1px solid ", ";\n\t\t\t\t\tborder-right-width: 0;\n\t\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\t\tpadding: ", ";\n\t\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t\t", "\n\n\t\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t\t> tbody > tr > td {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t}\n\n\t\t\t\tth {\n\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\ttext-align: left;\n\n\t\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t\t", " {\n\t\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, "var(--ds-space-300, 24px)", "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_RIGHT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, TableSharedCssClassName.TABLE_LEFT_BORDER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') ? ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " .ak-editor-panel {\n\t\t\tborder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #0B120E24)", ";\n\t\t}") : '', TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-background-neutral-subtle, #00000000)", tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, #DDDEE1)", "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, #F0F1F2)", (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? '&:not(.danger)' : '&:not([style]):not(.danger)', _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, #FFFFFF)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, #0B120E24)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
|
|
68
68
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
69
|
-
}), "var(--ds-background-neutral,
|
|
69
|
+
}), "var(--ds-background-neutral, #0515240F)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, #0515240F)", (0, _editorSharedStyles.overflowShadow)({
|
|
70
70
|
leftCoverWidth: "var(--ds-space-300, 24px)"
|
|
71
|
-
}), "var(--ds-background-neutral,
|
|
71
|
+
}), "var(--ds-background-neutral, #0515240F)", "var(--ds-background-neutral, #0515240F)");
|
|
72
72
|
};
|
|
73
73
|
var calcTableWidth = exports.calcTableWidth = function calcTableWidth(layout, containerWidth) {
|
|
74
74
|
var addControllerPadding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
@@ -26,7 +26,7 @@ var StatusClassNames = exports.StatusClassNames = /*#__PURE__*/function (StatusC
|
|
|
26
26
|
StatusClassNames["SORTING_NOT_ALLOWED"] = "sorting-icon-svg__not-allowed";
|
|
27
27
|
return StatusClassNames;
|
|
28
28
|
}({}); // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
29
|
-
var buttonStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tposition: absolute;\n\tdisplay: flex;\n\theight: 28px;\n\twidth: 28px;\n\tmargin: ", ";\n\tright: 0;\n\ttop: 0;\n\tborder: ", " solid ", ";\n\tborder-radius: ", ";\n\tbackground-color: ", ";\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n\n\t&:hover {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:active {\n\t\tbackground-color: ", ";\n\t}\n\n\t&.", "__not-allowed {\n\t\tcursor: not-allowed;\n\t}\n"])), "var(--ds-space-075, 6px)", "var(--ds-border-width-selected, 2px)", "var(--ds-border, #
|
|
29
|
+
var buttonStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tposition: absolute;\n\tdisplay: flex;\n\theight: 28px;\n\twidth: 28px;\n\tmargin: ", ";\n\tright: 0;\n\ttop: 0;\n\tborder: ", " solid ", ";\n\tborder-radius: ", ";\n\tbackground-color: ", ";\n\tjustify-content: center;\n\talign-items: center;\n\tcursor: pointer;\n\n\t&:hover {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:active {\n\t\tbackground-color: ", ";\n\t}\n\n\t&.", "__not-allowed {\n\t\tcursor: not-allowed;\n\t}\n"])), "var(--ds-space-075, 6px)", "var(--ds-border-width-selected, 2px)", "var(--ds-border, #0B120E24)", "var(--ds-radius-small, 4px)", "var(--ds-surface-overlay, #FFFFFF)", "var(--ds-surface-overlay-hovered, #F0F1F2)", "var(--ds-surface-overlay-pressed, #DDDEE1)", _consts.SORTABLE_COLUMN_ICON_CLASSNAME);
|
|
30
30
|
|
|
31
31
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
32
32
|
var iconWrapperStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\twidth: 8px;\n\theight: 12px;\n\ttransition: transform 0.3s cubic-bezier(0.15, 1, 0.3, 1);\n\ttransform-origin: 50% 50%;\n\tdisplay: flex;\n\tjustify-content: center;\n\n\t&.", " {\n\t\ttransform: rotate(-180deg);\n\t}\n\n\t&.", "-inactive {\n\t\topacity: 0.7;\n\t}\n"])), StatusClassNames.DESC, _consts.SORTABLE_COLUMN_ICON_CLASSNAME);
|
|
@@ -38,10 +38,10 @@ var iconStyles = (0, _react.css)({
|
|
|
38
38
|
height: '100%',
|
|
39
39
|
width: '2px',
|
|
40
40
|
borderRadius: "var(--ds-radius-full, 9999px)",
|
|
41
|
-
background: "var(--ds-icon, #
|
|
41
|
+
background: "var(--ds-icon, #292A2E)",
|
|
42
42
|
userSelect: 'none',
|
|
43
43
|
'&::before, &::after': {
|
|
44
|
-
background: "var(--ds-icon, #
|
|
44
|
+
background: "var(--ds-icon, #292A2E)",
|
|
45
45
|
content: "''",
|
|
46
46
|
height: '2px',
|
|
47
47
|
width: '6px',
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "
|
|
27
|
+
var packageVersion = "0.0.0-development";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -54,7 +54,7 @@ var mbeNavigation = (0, _react.css)({
|
|
|
54
54
|
WebkitUserModify: 'read-only',
|
|
55
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
56
56
|
borderBottom: 'none !important',
|
|
57
|
-
background: "var(--ds-surface,
|
|
57
|
+
background: "var(--ds-surface, #FFFFFF)",
|
|
58
58
|
marginLeft: "var(--ds-space-100, 8px)",
|
|
59
59
|
marginRight: "var(--ds-space-100, 8px)",
|
|
60
60
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -12,7 +12,6 @@ var _react = require("react");
|
|
|
12
12
|
var _react2 = require("@emotion/react");
|
|
13
13
|
var _bindEventListener = require("bind-event-listener");
|
|
14
14
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
16
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
16
|
var _uiReact = require("../../ui-react");
|
|
18
17
|
var _Popup = _interopRequireDefault(require("../Popup"));
|
|
@@ -38,9 +37,9 @@ var initialSizeState = {
|
|
|
38
37
|
};
|
|
39
38
|
var tableSelectorPopupWrapperStyles = (0, _react2.css)({
|
|
40
39
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
41
|
-
backgroundColor: "var(--ds-surface-overlay,
|
|
42
|
-
boxShadow: "var(--ds-shadow-overlay,
|
|
43
|
-
padding: "
|
|
40
|
+
backgroundColor: "var(--ds-surface-overlay, #FFFFFF)",
|
|
41
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #1E1F2126, 0px 0px 1px #1E1F214f)",
|
|
42
|
+
padding: "var(--ds-space-100, 8px)".concat(" ", TABLE_SELECTOR_PADDING_SIDE, "px")
|
|
44
43
|
});
|
|
45
44
|
var TableSelectorPopup = exports.TableSelectorPopup = function TableSelectorPopup(props) {
|
|
46
45
|
var _useState = (0, _react.useState)(_objectSpread(_objectSpread({}, initialSizeState), props.defaultSize)),
|
|
@@ -8,7 +8,6 @@ var _react = require("react");
|
|
|
8
8
|
var _react2 = require("@emotion/react");
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
11
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
12
11
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
13
12
|
var _messages = require("../../messages");
|
|
14
13
|
var _uiReact = require("../../ui-react");
|
|
@@ -23,22 +22,22 @@ var TABLE_SELECTOR_BUTTON_GAP = exports.TABLE_SELECTOR_BUTTON_GAP = 2;
|
|
|
23
22
|
var TABLE_SELECTOR_BUTTON_SIZE = exports.TABLE_SELECTOR_BUTTON_SIZE = 17;
|
|
24
23
|
var MULTIPLICATION_SYMBOL = '×';
|
|
25
24
|
var selectedButtonStyles = (0, _react2.css)({
|
|
26
|
-
backgroundColor: "var(--ds-background-accent-blue-subtlest, #
|
|
27
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-background-accent-blue-subtle, #
|
|
25
|
+
backgroundColor: "var(--ds-background-accent-blue-subtlest, #E9F2FE)",
|
|
26
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-background-accent-blue-subtle, #669DF1)")
|
|
28
27
|
});
|
|
29
28
|
var buttonStyles = (0, _react2.css)({
|
|
30
29
|
height: "".concat(TABLE_SELECTOR_BUTTON_SIZE, "px"),
|
|
31
30
|
width: "".concat(TABLE_SELECTOR_BUTTON_SIZE, "px"),
|
|
32
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #
|
|
33
|
-
backgroundColor: "var(--ds-background-input, #
|
|
31
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border, #0B120E24)"),
|
|
32
|
+
backgroundColor: "var(--ds-background-input, #FFFFFF)",
|
|
34
33
|
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
35
34
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
36
35
|
cursor: 'pointer',
|
|
37
36
|
display: 'block',
|
|
38
37
|
'&:focus': {
|
|
39
38
|
outline: 'none',
|
|
40
|
-
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-focused,
|
|
41
|
-
boxShadow: "0 0 0 0.5px ".concat("var(--ds-border-focused,
|
|
39
|
+
border: "var(--ds-border-width, 1px)".concat(" solid ", "var(--ds-border-focused, #4688EC)"),
|
|
40
|
+
boxShadow: "0 0 0 0.5px ".concat("var(--ds-border-focused, #4688EC)")
|
|
42
41
|
}
|
|
43
42
|
});
|
|
44
43
|
var selectionSizeTextStyles = (0, _react2.css)({
|
|
@@ -46,8 +45,8 @@ var selectionSizeTextStyles = (0, _react2.css)({
|
|
|
46
45
|
lineHeight: '14px',
|
|
47
46
|
display: 'flex',
|
|
48
47
|
justifyContent: 'center',
|
|
49
|
-
marginTop: "var(--ds-space-075,
|
|
50
|
-
padding: "var(--ds-space-075,
|
|
48
|
+
marginTop: "var(--ds-space-075, 6px)",
|
|
49
|
+
padding: "var(--ds-space-075, 6px)"
|
|
51
50
|
});
|
|
52
51
|
var TableSelectorButton = function TableSelectorButton(_ref) {
|
|
53
52
|
var row = _ref.row,
|
|
@@ -106,7 +105,7 @@ var gridWrapperStyles = function gridWrapperStyles(_ref2) {
|
|
|
106
105
|
gridTemplateColumns: "repeat(".concat(maxCols, ", 1fr)"),
|
|
107
106
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
108
107
|
gridTemplateRows: "repeat(".concat(maxRows, ", 1fr)"),
|
|
109
|
-
gap: "
|
|
108
|
+
gap: "var(--ds-space-025, 2px)"
|
|
110
109
|
});
|
|
111
110
|
};
|
|
112
111
|
var TableSelectorPopup = function TableSelectorPopup(_ref3) {
|
|
@@ -47,7 +47,7 @@ var DiagonalLineGlyph = function DiagonalLineGlyph(props) {
|
|
|
47
47
|
var EditorDiagonalLineIcon = exports.EditorDiagonalLineIcon = function EditorDiagonalLineIcon() {
|
|
48
48
|
var _useThemeObserver = (0, _tokens.useThemeObserver)(),
|
|
49
49
|
colorMode = _useThemeObserver.colorMode;
|
|
50
|
-
var primaryColor = colorMode === 'dark' ? "var(--ds-background-accent-gray-bolder, #
|
|
50
|
+
var primaryColor = colorMode === 'dark' ? "var(--ds-background-accent-gray-bolder, #6B6E76)" : "var(--ds-background-accent-gray-subtle, #8C8F97)";
|
|
51
51
|
return (
|
|
52
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
53
53
|
(0, _react.jsx)(DiagonalLineGlyph, {
|
|
@@ -62,7 +62,7 @@ var highlightColorPalette = exports.highlightColorPalette = [{
|
|
|
62
62
|
value: REMOVE_HIGHLIGHT_COLOR,
|
|
63
63
|
label: 'No color',
|
|
64
64
|
// Mostly informative, only used for analytics
|
|
65
|
-
border: "var(--ds-border, #
|
|
65
|
+
border: "var(--ds-border, #0B120E24)",
|
|
66
66
|
message: (0, _getColorMessage.default)(_paletteMessages.default, 'no-color'),
|
|
67
67
|
decorator: (0, _react.jsx)(EditorDiagonalLineIcon, null)
|
|
68
68
|
}];
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.panelBackgroundPalette = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _common = require("./common");
|
|
10
9
|
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; }
|
|
11
10
|
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; }
|
|
12
11
|
var panelBackgroundPalette = exports.panelBackgroundPalette = [{
|
|
@@ -74,6 +73,6 @@ var panelBackgroundPalette = exports.panelBackgroundPalette = [{
|
|
|
74
73
|
value: '#998DD9'
|
|
75
74
|
}].map(function (color) {
|
|
76
75
|
return _objectSpread(_objectSpread({}, color), {}, {
|
|
77
|
-
border: "var(--ds-border,
|
|
76
|
+
border: "var(--ds-border, #0B120E24)"
|
|
78
77
|
});
|
|
79
78
|
});
|
|
@@ -22,7 +22,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
22
22
|
var _react2 = require("@emotion/react");
|
|
23
23
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
24
24
|
var _menu = require("@atlaskit/menu");
|
|
25
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
25
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
27
26
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
28
27
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -64,17 +63,17 @@ var buttonStyles = function buttonStyles(isActive, submenuActive) {
|
|
|
64
63
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
65
64
|
*/
|
|
66
65
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
67
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\tposition: relative;\n\t\t\t\t&::before {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 2px;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcontent: '';\n\t\t\t\t}\n\t\t\t\t> span,\n\t\t\t\t> span:hover,\n\t\t\t\t> span:active {\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t\t", ";\n\t\t\t\t}\n\t\t\t\t:focus-visible,\n\t\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\t\t\t"])), "var(--ds-border-selected,
|
|
66
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\tposition: relative;\n\t\t\t\t&::before {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\twidth: 2px;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcontent: '';\n\t\t\t\t}\n\t\t\t\t> span,\n\t\t\t\t> span:hover,\n\t\t\t\t> span:active {\n\t\t\t\t\tbackground: ", ";\n\t\t\t\t\tcolor: ", ";\n\t\t\t\t}\n\t\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t\t", ";\n\t\t\t\t}\n\t\t\t\t:focus-visible,\n\t\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\t\t\t"])), "var(--ds-border-selected, #1868DB)", "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
68
67
|
}
|
|
69
68
|
|
|
70
69
|
/**
|
|
71
70
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
72
71
|
*/
|
|
73
72
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
74
|
-
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t> span,\n\t\t\t> span:hover,\n\t\t\t> span:active {\n\t\t\t\tbackground: ", ";\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-background-selected,
|
|
73
|
+
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t> span,\n\t\t\t> span:hover,\n\t\t\t> span:active {\n\t\t\t\tbackground: ", ";\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-background-selected, #E9F2FE)", "var(--ds-text-selected, #1868DB)", focusedMenuItemStyle);
|
|
75
74
|
} else {
|
|
76
75
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
77
|
-
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t> span:hover[aria-disabled='false'] {\n\t\t\t\tcolor: ", ";\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\t", "\n\t\t\t> span[aria-disabled='true'] {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-text, #292A2E)", "var(--ds-background-neutral-subtle-hovered,
|
|
76
|
+
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t> span:hover[aria-disabled='false'] {\n\t\t\t\tcolor: ", ";\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t\t", "\n\t\t\t> span[aria-disabled='true'] {\n\t\t\t\tcolor: ", ";\n\t\t\t}\n\t\t\t:focus > span[aria-disabled='false'] {\n\t\t\t\t", ";\n\t\t\t}\n\t\t\t:focus-visible,\n\t\t\t:focus-visible > span[aria-disabled='false'] {\n\t\t\t\toutline: none;\n\t\t\t}\n\t\t"])), "var(--ds-text, #292A2E)", "var(--ds-background-neutral-subtle-hovered, #0515240F)", !submenuActive && "\n\t\t\t\t\t> span:active[aria-disabled='false'] {\n\t\t\t\t\t\tbackground-color: ".concat("var(--ds-background-neutral-subtle-pressed, #0B120E24)", ";\n\t\t\t\t\t}"), "var(--ds-text-disabled, #080F214A)", focusedMenuItemStyle); // The default focus-visible style is removed to ensure consistency across browsers
|
|
78
77
|
}
|
|
79
78
|
};
|
|
80
79
|
var DropListWithOutsideClickTargetRef = function DropListWithOutsideClickTargetRef(props) {
|
|
@@ -10,7 +10,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
11
11
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
12
12
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, fireAnalyticsEvent } from '../../analytics';
|
|
13
|
-
import { DEVICE_BREAKPOINT_NUMBERS
|
|
13
|
+
import { DEVICE_BREAKPOINT_NUMBERS } from '../constants';
|
|
14
14
|
import useFocus from '../hooks/use-focus';
|
|
15
15
|
const arrowsKeys = new Set(['ArrowUp', 'ArrowDown']);
|
|
16
16
|
function CategoryList({
|
|
@@ -176,7 +176,7 @@ function CategoryListItem({
|
|
|
176
176
|
}
|
|
177
177
|
const buttonWrapper = css({
|
|
178
178
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
179
|
-
height:
|
|
179
|
+
height: `32px`,
|
|
180
180
|
margin: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-050, 4px)"} 0`,
|
|
181
181
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
182
182
|
[`@media (min-width: ${DEVICE_BREAKPOINT_NUMBERS.medium}px)`]: {
|
|
@@ -35,7 +35,7 @@ export const itemIcon = css({
|
|
|
35
35
|
width: `${ICON_WIDTH}px`,
|
|
36
36
|
height: `${ICON_HEIGHT}px`,
|
|
37
37
|
overflow: 'hidden',
|
|
38
|
-
border: `${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border,
|
|
38
|
+
border: `${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border, #0B120E24)"}`,
|
|
39
39
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
40
40
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
41
41
|
boxSizing: 'border-box',
|
|
@@ -52,7 +52,7 @@ export default function EmptyState({
|
|
|
52
52
|
}
|
|
53
53
|
const emptyStateHeading = css({
|
|
54
54
|
font: "var(--ds-font-heading-medium, normal 653 20px/24px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
55
|
-
color: "var(--ds-text,
|
|
55
|
+
color: "var(--ds-text, #292A2E)",
|
|
56
56
|
marginTop: "var(--ds-space-300, 24px)"
|
|
57
57
|
});
|
|
58
58
|
const emptyStateSubHeading = css({
|
|
@@ -156,7 +156,7 @@ const wrapperInline = css({
|
|
|
156
156
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
157
157
|
'& > [data-ds--text-field--container]': {
|
|
158
158
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
159
|
-
height:
|
|
159
|
+
height: `40px`,
|
|
160
160
|
flex: 'none',
|
|
161
161
|
overflow: 'revert'
|
|
162
162
|
}
|
|
@@ -94,7 +94,7 @@ const searchContainer = css({
|
|
|
94
94
|
const mobileCategoryListWrapper = css({
|
|
95
95
|
display: 'flex',
|
|
96
96
|
overflowX: 'auto',
|
|
97
|
-
padding: `${"var(--ds-space-200,
|
|
97
|
+
padding: `${"var(--ds-space-200, 16px)"} 0 ${"var(--ds-space-200, 16px)"} 0`,
|
|
98
98
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
99
99
|
minHeight: `${GRID_SIZE * 4}px`,
|
|
100
100
|
overflow: '-moz-scrollbars-none',
|
|
@@ -109,7 +109,7 @@ const mobileCategoryListWrapper = css({
|
|
|
109
109
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
110
110
|
const categoryListWrapper = css(mobileCategoryListWrapper, {
|
|
111
111
|
padding: 0,
|
|
112
|
-
marginTop: "var(--ds-space-200,
|
|
112
|
+
marginTop: "var(--ds-space-200, 16px)",
|
|
113
113
|
flexDirection: 'column'
|
|
114
114
|
});
|
|
115
115
|
function StatelessElementBrowser(props) {
|
|
@@ -62,7 +62,7 @@ export const header = css({
|
|
|
62
62
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
63
63
|
export const content = css({
|
|
64
64
|
padding: "var(--ds-space-100, 8px)",
|
|
65
|
-
background: "var(--ds-surface,
|
|
65
|
+
background: "var(--ds-surface, #FFFFFF)",
|
|
66
66
|
border: `1px solid ${"var(--ds-border, #0B120E24)"}`,
|
|
67
67
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
68
68
|
cursor: 'initial',
|
|
@@ -82,7 +82,7 @@ export const extensionContent = css({
|
|
|
82
82
|
boxSizing: 'border-box',
|
|
83
83
|
paddingTop: "var(--ds-space-100, 8px)",
|
|
84
84
|
paddingBottom: "var(--ds-space-100, 8px)",
|
|
85
|
-
background: "var(--ds-surface,
|
|
85
|
+
background: "var(--ds-surface, #FFFFFF)",
|
|
86
86
|
border: `1px solid ${"var(--ds-border, #0B120E24)"}`,
|
|
87
87
|
borderRadius: "var(--ds-radius-small, 3px)",
|
|
88
88
|
cursor: 'initial',
|
|
@@ -19,7 +19,7 @@ export const wrapperStyle = css(wrapperDefault, {
|
|
|
19
19
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
20
|
'&.with-children': {
|
|
21
21
|
padding: 0,
|
|
22
|
-
background: "var(--ds-background-neutral-subtle,
|
|
22
|
+
background: "var(--ds-background-neutral-subtle, #00000000)"
|
|
23
23
|
},
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
25
25
|
'&.with-hover-border': {
|
|
@@ -51,7 +51,7 @@ const lcmHeaderStyles = css({
|
|
|
51
51
|
},
|
|
52
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
53
53
|
'& > .legacy-content-header-text': {
|
|
54
|
-
font: "var(--ds-font-body-small, 12px)",
|
|
54
|
+
font: "var(--ds-font-body-small, normal 400 12px/16px \"Atlassian Sans\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
55
55
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
56
56
|
'& span': {
|
|
57
57
|
paddingRight: "var(--ds-space-050, 4px)"
|
|
@@ -12,7 +12,7 @@ export const mbeExtensionWrapperCSSStyles = css(wrapperDefault, {
|
|
|
12
12
|
marginRight: "var(--ds-space-negative-150, -12px)"
|
|
13
13
|
},
|
|
14
14
|
cursor: 'pointer',
|
|
15
|
-
marginTop: "var(--ds-space-250,
|
|
15
|
+
marginTop: "var(--ds-space-250, 20px)",
|
|
16
16
|
marginBottom: "var(--ds-space-200, 16px)",
|
|
17
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
18
18
|
'.extension-title': {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
._11c81a4x{font:var(--ds-font-body-small,9pt)}
|
|
2
1
|
._11c8fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
3
|
._19it1tra{border:1px solid var(--ds-background-neutral,#0515240f)}
|
|
4
4
|
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
5
5
|
._2rko14xi{border-radius:var(--ds-radius-small,4px) var(--ds-radius-small,4px) 0 0}
|
|
6
|
-
.
|
|
6
|
+
._n7zlbjo2{border-bottom:var(--ds-border-width,1px) solid var(--ds-background-neutral,#0515240f)}
|
|
7
7
|
._154i1n1a{top:-1px}
|
|
8
8
|
._18m915vq{overflow-y:hidden}
|
|
9
9
|
._18u0idpf{margin-left:0}
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
._1reo15vq{overflow-x:hidden}
|
|
15
15
|
._2hwxidpf{margin-right:0}
|
|
16
16
|
._6z24egat{tab-size:4}
|
|
17
|
+
._bfhkhp5a{background-color:var(--ds-surface-raised,#fff)}
|
|
17
18
|
._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
|
|
18
|
-
._bfhkrnwa{background-color:var(--ds-surface-raised,#fffdf6)}
|
|
19
19
|
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
20
20
|
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
21
21
|
._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
|
|
@@ -36,9 +36,9 @@ export function UnknownMacroPlaceholder({
|
|
|
36
36
|
});
|
|
37
37
|
return /*#__PURE__*/React.createElement("section", {
|
|
38
38
|
"aria-label": intl.formatMessage(messages.unknownMacroPlaceholderAriaLabel),
|
|
39
|
-
className: ax(["_19it1tra _2rko12b0 _1reo15vq _18m915vq
|
|
39
|
+
className: ax(["_19it1tra _2rko12b0 _1reo15vq _18m915vq _bfhkhp5a"])
|
|
40
40
|
}, /*#__PURE__*/React.createElement("div", {
|
|
41
|
-
className: ax(["_2rko14xi
|
|
41
|
+
className: ax(["_2rko14xi _11c8wadc _n7zlbjo2 _bfhki8nm _ca0qu2gc _u5f3pxbi _n3td1b66 _19bvpxbi _kqswh2mm _154i1n1a"])
|
|
42
42
|
}, headerText), /*#__PURE__*/React.createElement("div", {
|
|
43
43
|
className: ax(["_19pkidpf _2hwxidpf _otyridpf _18u0idpf _bfhkvuon _ca0qutpp _u5f3utpp _n3tdutpp _19bvutpp"])
|
|
44
44
|
}, /*#__PURE__*/React.createElement("pre", {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
|
|
3
|
+
/** Rebuilds a list-like PM node from a flat array of items. */
|
|
4
|
+
|
|
5
|
+
/** Extracts top-level content nodes from an item being broken out past the root list. */
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Build a replacement Fragment from a flat array of items.
|
|
9
|
+
*
|
|
10
|
+
* Items with depth >= 0 are grouped and rebuilt via `rebuildFn`.
|
|
11
|
+
* Items with depth < 0 are extracted via `extractContentFn`.
|
|
12
|
+
*/
|
|
13
|
+
export function buildReplacementFragment({
|
|
14
|
+
items,
|
|
15
|
+
schema,
|
|
16
|
+
rebuildFn,
|
|
17
|
+
extractContentFn
|
|
18
|
+
}) {
|
|
19
|
+
let fragment = Fragment.empty;
|
|
20
|
+
let pendingListSegment = [];
|
|
21
|
+
let pendingStartIdx = 0;
|
|
22
|
+
const contentStartOffsets = new Array(items.length);
|
|
23
|
+
const flushListSegment = () => {
|
|
24
|
+
if (pendingListSegment.length > 0) {
|
|
25
|
+
const fragmentOffset = fragment.size;
|
|
26
|
+
const result = rebuildFn(pendingListSegment, schema);
|
|
27
|
+
if (result) {
|
|
28
|
+
// Map the rebuild's content start offsets into the overall fragment.
|
|
29
|
+
for (let i = 0; i < pendingListSegment.length; i++) {
|
|
30
|
+
contentStartOffsets[pendingStartIdx + i] = fragmentOffset + result.contentStartOffsets[i];
|
|
31
|
+
}
|
|
32
|
+
fragment = fragment.addToEnd(result.node);
|
|
33
|
+
}
|
|
34
|
+
pendingListSegment = [];
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
let elIdx = 0;
|
|
38
|
+
for (const item of items) {
|
|
39
|
+
if (item.depth < 0) {
|
|
40
|
+
flushListSegment();
|
|
41
|
+
// Extracted element — content children become top-level nodes.
|
|
42
|
+
// Record offset of first content child.
|
|
43
|
+
contentStartOffsets[elIdx] = fragment.size;
|
|
44
|
+
for (const node of extractContentFn(item, schema)) {
|
|
45
|
+
fragment = fragment.addToEnd(node);
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
if (pendingListSegment.length === 0) {
|
|
49
|
+
pendingStartIdx = elIdx;
|
|
50
|
+
}
|
|
51
|
+
pendingListSegment.push(item);
|
|
52
|
+
}
|
|
53
|
+
elIdx++;
|
|
54
|
+
}
|
|
55
|
+
flushListSegment();
|
|
56
|
+
return {
|
|
57
|
+
fragment,
|
|
58
|
+
contentStartOffsets
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-specific predicates that vary between regular lists and task lists.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Flattens a list-like PM structure (regular list or task list) into an
|
|
7
|
+
* array of content-bearing items with computed depths.
|
|
8
|
+
*
|
|
9
|
+
* Uses `doc.nodesBetween` to walk the tree and delegates type-specific
|
|
10
|
+
* decisions to the provided predicates. The core algorithm — selection
|
|
11
|
+
* intersection, depth adjustment, index tracking — is shared.
|
|
12
|
+
*/
|
|
13
|
+
export function flattenList(options, predicates) {
|
|
14
|
+
const {
|
|
15
|
+
doc,
|
|
16
|
+
rootListStart,
|
|
17
|
+
rootListEnd,
|
|
18
|
+
selectionFrom,
|
|
19
|
+
selectionTo,
|
|
20
|
+
indentDelta,
|
|
21
|
+
maxDepth
|
|
22
|
+
} = options;
|
|
23
|
+
const {
|
|
24
|
+
isContentNode,
|
|
25
|
+
getSelectionBounds,
|
|
26
|
+
getDepth
|
|
27
|
+
} = predicates;
|
|
28
|
+
const items = [];
|
|
29
|
+
let startIndex = -1;
|
|
30
|
+
let endIndex = -1;
|
|
31
|
+
let exceedsMaxDepth = false;
|
|
32
|
+
const rootDepth = doc.resolve(rootListStart).depth;
|
|
33
|
+
doc.nodesBetween(rootListStart, rootListEnd, (node, pos, parent) => {
|
|
34
|
+
if (!isContentNode(node, parent) || parent == null) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
const {
|
|
38
|
+
start,
|
|
39
|
+
end
|
|
40
|
+
} = getSelectionBounds(node, pos);
|
|
41
|
+
const isSelected = selectionFrom === selectionTo ? selectionFrom >= start && selectionFrom <= end : start < selectionTo && end > selectionFrom;
|
|
42
|
+
const resolvedDepth = doc.resolve(pos).depth;
|
|
43
|
+
const depth = getDepth(resolvedDepth, rootDepth) + (isSelected ? indentDelta : 0);
|
|
44
|
+
items.push({
|
|
45
|
+
node,
|
|
46
|
+
pos,
|
|
47
|
+
depth,
|
|
48
|
+
isSelected,
|
|
49
|
+
listType: parent.type.name,
|
|
50
|
+
parentListAttrs: parent.attrs
|
|
51
|
+
});
|
|
52
|
+
if (isSelected) {
|
|
53
|
+
const index = items.length - 1;
|
|
54
|
+
if (startIndex === -1) {
|
|
55
|
+
startIndex = index;
|
|
56
|
+
}
|
|
57
|
+
endIndex = index;
|
|
58
|
+
if (maxDepth != null && depth >= maxDepth) {
|
|
59
|
+
exceedsMaxDepth = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return true;
|
|
63
|
+
});
|
|
64
|
+
if (items.length === 0 || startIndex === -1 || exceedsMaxDepth) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
items,
|
|
69
|
+
startIndex,
|
|
70
|
+
endIndex
|
|
71
|
+
};
|
|
72
|
+
}
|
|
@@ -6,5 +6,8 @@ export { moveTargetIntoList } from './replace-content';
|
|
|
6
6
|
export { JoinDirection, isListNodeValidContent, joinSiblingLists, processNestedTaskListsInSameLevel } from './node';
|
|
7
7
|
export { getCommonListAnalyticsAttributes, countListItemsInSelection } from './analytics';
|
|
8
8
|
export { hasValidListIndentationLevel } from './indentation';
|
|
9
|
+
export { restoreSelection, computeSelectionOffsets } from './restore-selection';
|
|
10
|
+
export { buildReplacementFragment } from './build-replacement-fragment';
|
|
11
|
+
export { flattenList } from './flatten-list';
|
|
9
12
|
export { isListNode, isListItemNode, isBulletList, isParagraphNode } from '../utils';
|
|
10
13
|
export { messages } from './messages';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { NodeSelection, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import { GapCursorSelection } from '../selection';
|
|
3
|
+
/**
|
|
4
|
+
* Compute the new selection offsets after list items have been moved/indented/outdented.
|
|
5
|
+
*
|
|
6
|
+
* Uses the content start offsets computed during fragment rebuild to map each
|
|
7
|
+
* selection endpoint to its new absolute position, accounting for the change
|
|
8
|
+
* in the list structure.
|
|
9
|
+
*/
|
|
10
|
+
export function computeSelectionOffsets({
|
|
11
|
+
items,
|
|
12
|
+
startIndex,
|
|
13
|
+
endIndex,
|
|
14
|
+
originalFrom,
|
|
15
|
+
originalTo,
|
|
16
|
+
contentStartOffsets,
|
|
17
|
+
rootListStart,
|
|
18
|
+
docSize
|
|
19
|
+
}) {
|
|
20
|
+
// +1 shifts from the outer edge of the list item node to the start of the content within
|
|
21
|
+
const fromContentStart = items[startIndex].pos + 1;
|
|
22
|
+
const toContentStart = items[endIndex].pos + 1;
|
|
23
|
+
const fromOffset = originalFrom - fromContentStart;
|
|
24
|
+
const toOffset = originalTo - toContentStart;
|
|
25
|
+
const clamp = pos => Math.min(Math.max(0, pos), docSize);
|
|
26
|
+
return {
|
|
27
|
+
from: clamp(rootListStart + contentStartOffsets[startIndex] + fromOffset),
|
|
28
|
+
to: clamp(rootListStart + contentStartOffsets[endIndex] + toOffset)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Restore the transaction's selection after a list structural change
|
|
34
|
+
* (indent/outdent of list items or task list items).
|
|
35
|
+
*
|
|
36
|
+
* Uses the content start offsets computed during fragment rebuild to
|
|
37
|
+
* map each selection endpoint to its new absolute position.
|
|
38
|
+
*
|
|
39
|
+
* Handles NodeSelection, GapCursorSelection, and TextSelection.
|
|
40
|
+
*/
|
|
41
|
+
export function restoreSelection({
|
|
42
|
+
tr,
|
|
43
|
+
originalSelection,
|
|
44
|
+
from,
|
|
45
|
+
to
|
|
46
|
+
}) {
|
|
47
|
+
const maxPos = tr.doc.content.size;
|
|
48
|
+
if (originalSelection instanceof NodeSelection) {
|
|
49
|
+
try {
|
|
50
|
+
tr.setSelection(NodeSelection.create(tr.doc, Math.min(from, maxPos - 1)));
|
|
51
|
+
} catch {
|
|
52
|
+
tr.setSelection(Selection.near(tr.doc.resolve(from)));
|
|
53
|
+
}
|
|
54
|
+
} else if (originalSelection instanceof GapCursorSelection) {
|
|
55
|
+
tr.setSelection(new GapCursorSelection(tr.doc.resolve(from), originalSelection.side));
|
|
56
|
+
} else {
|
|
57
|
+
tr.setSelection(TextSelection.create(tr.doc, from, to));
|
|
58
|
+
}
|
|
59
|
+
}
|