@atlaskit/editor-plugin-table
Version:
Table plugin for the @atlaskit/editor
88 lines (84 loc) • 77.2 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.tableStyles = exports.tableRowHeight = exports.tableFullPageEditorStyles = exports.tableCommentEditorStyles = exports.insertColumnButtonOffset = exports.baseTableStyles = void 0;
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
var _react = require("@emotion/react");
var _browser = require("@atlaskit/editor-common/browser");
var _styles = require("@atlaskit/editor-common/styles");
var _table = require("@atlaskit/editor-common/table");
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
var _selection = require("@atlaskit/editor-shared-styles/selection");
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
var _consts = require("../pm-plugins/view-mode-sort/consts");
var _types = require("../types");
var _consts2 = require("./consts");
var _uiStyles = require("./ui-styles");
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
/* eslint-disable @atlaskit/editor/no-re-export */
// Entry file in package.json
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
var cornerControlHeight = _consts2.tableToolbarSize + 1;
/*
compensating for half of the insert column button
that is aligned to the right edge initially on hover of the top right column control when table overflown,
its center should be aligned with the edge
*/
var insertColumnButtonOffset = exports.insertColumnButtonOffset = _consts2.tableInsertColumnButtonSize / 2;
var tableRowHeight = exports.tableRowHeight = 44;
// Shared styling for numbered column buttons in selected state
var numberedColumnButtonSelectedStyles = "\n\tborder-bottom: 1px solid ".concat(_consts2.tableBorderSelectedColor, ";\n\tborder-color: ").concat(_consts2.tableBorderSelectedColor, ";\n\tbackground-color: ").concat(_consts2.tableToolbarSelectedColor, ";\n\tposition: relative;\n\tz-index: ").concat(_editorSharedStyles.akEditorUnitZIndex, ";\n\tcolor: ", "var(--ds-text-selected, #1868DB)", ";\n");
var rangeSelectionStyles = "\n.".concat(_types.TableCssClassName.NODEVIEW_WRAPPER, ".").concat(_editorSharedStyles.akEditorSelectedNodeClassName, " table tbody tr {\n th,td {\n ").concat((0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), "\n\n // The non-break space /00a0 in :after selector caused a table scroll issue when pressing Cmd+A to select table\n // This line is to override the content of :after selector from the shared getSelectionStyles\n &::after {\n content: '';\n }\n }\n}\n");
var rangeSelectionStylesForFakeBorders = "\n.".concat(_types.TableCssClassName.NODEVIEW_WRAPPER, ".").concat(_editorSharedStyles.akEditorSelectedNodeClassName, " .").concat(_styles.TableSharedCssClassName.TABLE_LEFT_BORDER, ",\n.").concat(_types.TableCssClassName.NODEVIEW_WRAPPER, ".").concat(_editorSharedStyles.akEditorSelectedNodeClassName, " .").concat(_styles.TableSharedCssClassName.TABLE_RIGHT_BORDER, " {\n\t background: ").concat(_editorSharedStyles.akEditorSelectedBorderColor, ";\n}\n");
var sentinelStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, ", > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n position: absolute;\n width: 100%;\n height: 1px;\n margin-top: -1px;\n // need this to avoid sentinel being focused via keyboard\n // this still allows it to be detected by intersection observer\n visibility: hidden;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: ").concat(_consts2.columnControlsDecorationHeight, "px;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n bottom: ").concat(_consts2.tableScrollbarOffset + _consts2.stickyRowOffsetTop + _consts2.tablePadding * 2 + 23, "px;\n }\n &.").concat(_types.TableCssClassName.WITH_CONTROLS, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_TOP, " {\n top: 0px;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SENTINEL_BOTTOM, " {\n margin-bottom: ").concat(_consts2.columnControlsDecorationHeight, "px;\n }\n }\n}");
var stickyScrollbarSentinelStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM, ",\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP, " {\n position: absolute;\n width: 100%;\n height: 1px;\n margin-top: -1px;\n // need this to avoid sentinel being focused via keyboard\n // this still allows it to be detected by intersection observer\n visibility: hidden;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_TOP, " {\n top: ").concat(_consts2.columnControlsDecorationHeight + tableRowHeight * 3, "px;\n }\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_SENTINEL_BOTTOM, " {\n bottom: ").concat(_editorSharedStyles.MAX_BROWSER_SCROLLBAR_HEIGHT, "px;\n }\n}");
var stickyScrollbarContainerStyles = ".".concat(_types.TableCssClassName.TABLE_CONTAINER, " {\n > .").concat(_types.TableCssClassName.TABLE_STICKY_SCROLLBAR_CONTAINER, " {\n width: 100%;\n display: none;\n overflow-x: auto;\n position: sticky;\n bottom: 0;\n z-index: 1;\n }\n}");
var stickyScrollbarStyles = "".concat(stickyScrollbarContainerStyles, " ").concat(stickyScrollbarSentinelStyles);
var shadowSentinelStyles = "\n .".concat(_types.TableCssClassName.TABLE_SHADOW_SENTINEL_LEFT, ",\n .").concat(_types.TableCssClassName.TABLE_SHADOW_SENTINEL_RIGHT, " {\n position: absolute;\n top: 0;\n height: 100%;\n width: 1px;\n visibility: hidden;\n }\n .").concat(_types.TableCssClassName.TABLE_SHADOW_SENTINEL_LEFT, " {\n left: 0;\n }\n .").concat(_types.TableCssClassName.TABLE_SHADOW_SENTINEL_RIGHT, " {\n right: 0;\n }\n");
var breakoutWidthStyling = function breakoutWidthStyling() {
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t> *:not([data-mark-type='fragment'])\n\t\t\t.", "\n\t\t\t.", " {\n\t\t\tmargin-left: unset !important;\n\t\t\twidth: 100% !important;\n\t\t}\n\n\t\t> [data-mark-type='fragment'] * .", " .", " {\n\t\t\tmargin-left: unset !important;\n\t\t\twidth: 100% !important;\n\t\t}\n\t"])), _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.NODEVIEW_WRAPPER, _types.TableCssClassName.TABLE_CONTAINER);
};
var viewModeSortStyles = function viewModeSortStyles() {
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t/* new styles */\n\t\tth {\n\t\t\t.", " {\n\t\t\t\t+ p {\n\t\t\t\t\tmargin-top: 0 !important;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t> .", " {\n\t\t\t\t&:has(.is-active) {\n\t\t\t\t\t.", " {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t> .", " {\n\t\t\t\t.", " {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:hover:not(:has(.", ":hover)) {\n\t\t\t\t> .", " {\n\t\t\t\t\t.", " {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), _consts.SORTING_ICON_CLASS_NAME, _consts.SORTING_ICON_CLASS_NAME, _table.SORTABLE_COLUMN_ICON_CLASSNAME, _consts.SORTING_ICON_CLASS_NAME, _table.SORTABLE_COLUMN_ICON_CLASSNAME, _types.TableCssClassName.TABLE_CONTAINER, _consts.SORTING_ICON_CLASS_NAME, _table.SORTABLE_COLUMN_ICON_CLASSNAME);
};
var tableBorderStyles = function tableBorderStyles() {
return "border-color: ".concat(_consts2.tableBorderDeleteColor);
};
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
var tableStickyHeaderColumnControlsDecorationsStyle = function tableStickyHeaderColumnControlsDecorationsStyle() {
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t.", " .", " {\n\t\t\tz-index: 0;\n\t\t\tleft: -1px;\n\t\t}\n\n\t\t.", " .", "::after {\n\t\t\tborder-left: 1px solid ", ";\n\t\t}\n\n\t\t.", " tr:first-of-type th.", " {\n\t\t\t&.", ", &.", " {\n\t\t\t\t.", "::after {\n\t\t\t\t\tleft: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.COLUMN_SELECTED, _types.TableCssClassName.HOVERED_COLUMN, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS);
};
var tableStickyHeaderFirefoxFixStyle = function tableStickyHeaderFirefoxFixStyle() {
var browser = (0, _browser.getBrowserInfo)();
/*
This is MAGIC!
This fixes a bug which occurs in firefox when the first row becomes sticky.
see https://product-fabric.atlassian.net/browse/ED-19177
*/
if (browser.gecko) {
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t.", " > tbody::before {\n\t\t\t\tcontent: '';\n\t\t\t}\n\t\t"])), _types.TableCssClassName.TABLE_STICKY);
}
};
var roundedTableCellCornerStyles = function roundedTableCellCornerStyles() {
return (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " > table {\n\t\t/* Round table corner cells (including merged cells that span to the edge)\n\t\t and their interaction overlays. The data-reaches-* attributes are set by the\n\t\t TableCell node view based on each cell's position + rowspan/colspan. */\n\t\t> tbody > tr > td[data-reaches-top][data-reaches-left],\n\t\t> tbody > tr > th[data-reaches-top][data-reaches-left] {\n\t\t\tborder-top-left-radius: ", ";\n\n\t\t\t&::after,\n\t\t\t&.", "::after,\n\t\t\t\t&.", ".", "::after {\n\t\t\t\tborder-top-left-radius: ", ";\n\t\t\t}\n\t\t}\n\n\t\t> tbody > tr > td[data-reaches-top][data-reaches-right],\n\t\t> tbody > tr > th[data-reaches-top][data-reaches-right] {\n\t\t\tborder-top-right-radius: ", ";\n\n\t\t\t&::after,\n\t\t\t&.", "::after,\n\t\t\t\t&.", ".", "::after {\n\t\t\t\tborder-top-right-radius: ", ";\n\t\t\t}\n\t\t}\n\n\t\t> tbody > tr > td[data-reaches-bottom][data-reaches-left],\n\t\t> tbody > tr > th[data-reaches-bottom][data-reaches-left] {\n\t\t\tborder-bottom-left-radius: ", ";\n\n\t\t\t&::after,\n\t\t\t&.", "::after,\n\t\t\t\t&.", ".", "::after {\n\t\t\t\tborder-bottom-left-radius: ", ";\n\t\t\t}\n\t\t}\n\n\t\t> tbody > tr > td[data-reaches-bottom][data-reaches-right],\n\t\t> tbody > tr > th[data-reaches-bottom][data-reaches-right] {\n\t\t\tborder-bottom-right-radius: ", ";\n\n\t\t\t&::after,\n\t\t\t&.", "::after,\n\t\t\t\t&.", ".", "::after {\n\t\t\t\tborder-bottom-right-radius: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, "var(--ds-radius-medium, 6px)", _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-medium, 6px)", "var(--ds-radius-medium, 6px)", _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-medium, 6px)", "var(--ds-radius-medium, 6px)", _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-medium, 6px)", "var(--ds-radius-medium, 6px)", _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_NO_HIGHLIGHT, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-medium, 6px)");
};
var roundedTableInteractionOverlayStyles = function roundedTableInteractionOverlayStyles() {
return (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " > table {\n\t\t/* Active-cell highlight base properties (replaces activeCellHighlightStyles).\n\t\t width/height: auto overrides the base cell ::after which uses width: 100%; height: 100%,\n\t\t so that left/right/top/bottom determine the size instead. */\n\t\ttd.", ".", "::after,\n\t\t\tth.", ".", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t\tbox-shadow: ", ";\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop: -1px;\n\t\t\tleft: -1px;\n\t\t\tright: -1px;\n\t\t\tbottom: -1px;\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t\tz-index: ", ";\n\t\t\tpointer-events: none;\n\t\t}\n\n\t\t/* Normalize selected/hover/danger overlays to the same box model as active-cell.\n\t\t width/height: auto overrides the base cell ::after which uses width: 100%; height: 100%. */\n\t\ttd.", "::after,\n\t\t\ttd.", "::after,\n\t\t\tth.", ".", "::after,\n\t\t\tth.", ".", "::after,\n\t\t\tth.", ".", "::after,\n\t\t\ttd.", ".", "::after {\n\t\t\tleft: -1px;\n\t\t\tright: -1px;\n\t\t\ttop: -1px;\n\t\t\tbottom: -1px;\n\t\t\twidth: auto;\n\t\t\theight: auto;\n\t\t}\n\n\t\t/* Active-cell overlays: clamp outer sides using data-reaches-* attributes.\n\t\t Internal sides keep -1px overlap; true outer edges are clamped to 0. */\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-top].", "::after,\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-top].", "::after {\n\t\t\ttop: 0;\n\t\t}\n\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-left].", "::after,\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-left].", "::after {\n\t\t\tleft: 0;\n\t\t}\n\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-right].", "::after,\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-right].", "::after {\n\t\t\tright: 0;\n\t\t}\n\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-bottom].", "::after,\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-bottom].", "::after {\n\t\t\tbottom: 0;\n\t\t}\n\n\t\t/* Selected/hover/active overlays: clamp outer left side and draw overlay border. */\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-left].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-left].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-left].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-left].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-left].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-left].", " {\n\t\t\tborder-left-color: transparent;\n\n\t\t\t&::after {\n\t\t\t\tleft: 0;\n\t\t\t\tborder-left-color: ", ";\n\t\t\t}\n\t\t}\n\n\t\t/* Danger/delete overlays: clamp outer left side. */\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-left].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-left].", " {\n\t\t\tborder-left-color: transparent;\n\n\t\t\t&::after {\n\t\t\t\tleft: 0;\n\t\t\t\tborder-left-color: ", ";\n\t\t\t}\n\t\t}\n\n\t\t/* Selected/hover/active overlays: clamp outer right side. */\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-right].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-right].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-right].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-right].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-right].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-right].", " {\n\t\t\tborder-right-color: transparent;\n\n\t\t\t&::after {\n\t\t\t\tright: 0;\n\t\t\t\tborder-right-color: ", ";\n\t\t\t}\n\t\t}\n\n\t\t/* Danger/delete overlays: clamp outer right side. */\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-right].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-right].", " {\n\t\t\tborder-right-color: transparent;\n\n\t\t\t&::after {\n\t\t\t\tright: 0;\n\t\t\t\tborder-right-color: ", ";\n\t\t\t}\n\t\t}\n\n\t\t/* Selected/hover/active overlays: clamp outer bottom side. */\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-bottom].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-bottom].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-bottom].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-bottom].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-bottom].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-bottom].", " {\n\t\t\tborder-bottom-color: transparent;\n\n\t\t\t&::after {\n\t\t\t\tborder-bottom-color: ", ";\n\t\t\t}\n\t\t}\n\n\t\t/* Danger/delete overlays: clamp outer bottom side. */\n\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-bottom].", ",\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-bottom].", " {\n\t\t\tborder-bottom-color: transparent;\n\n\t\t\t&::after {\n\t\t\t\tborder-bottom-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, "var(--ds-border-selected, #1868DB)", "var(--ds-shadow-raised, 0px 1px 1px #1E1F2140, 0px 0px 1px #1E1F214f)", _editorSharedStyles.akEditorSmallZIndex, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _consts2.tableBorderSelectedColor, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts2.tableBorderDeleteColor, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _consts2.tableBorderSelectedColor, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts2.tableBorderDeleteColor, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.SELECTED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.HOVERED_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _types.TableCssClassName.ACTIVE_CURSOR_CELL, _consts2.tableBorderSelectedColor, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _consts2.tableBorderDeleteColor);
};
var roundedTableNumberedColumnStyles = function roundedTableNumberedColumnStyles() {
return (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t/* Numbered columns are separate, so they need their own rounded edge owner. */\n\t.", "[data-number-column='true'] {\n\t\t/* Override the inline/container left border and replace it with one rounded pseudo-border. */\n\t\t> .", "\n\t\t\t.", ",\n\t\t\t> .", "\n\t\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tborder-left: 0;\n\n\t\t\t&::before {\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\tbottom: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder-left: 1px solid ", ";\n\t\t\t\tborder-top-left-radius: ", ";\n\t\t\t\tborder-bottom-left-radius: ", ";\n\t\t\t\tpointer-events: none;\n\t\t\t\tz-index: ", ";\n\t\t\t}\n\t\t}\n\n\t\t/* Prevent individual number buttons from drawing a straight left border. */\n\t\t> .", "\n\t\t\t.", ",\n\t\t\t> .", "\n\t\t\t.", " {\n\t\t\tborder-left-color: transparent;\n\t\t}\n\n\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".", ",\n\t\t\t> .", "\n\t\t\t.", ".active,\n\t\t\t> .", "\n\t\t\t.", ".active {\n\t\t\tborder-left-color: transparent;\n\t\t}\n\n\t\t/* When numbered column is present, the visual left edge belongs to the number column widget.\n\t\t Zero out any left-side border-radius on the cell and its overlays/pseudo-borders \u2014\n\t\t but leave right-side radii untouched so right-edge cells still round correctly. */\n\t\t.", " > table > tbody > tr > th[data-reaches-top][data-reaches-left],\n\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-top][data-reaches-left] {\n\t\t\tborder-top-left-radius: 0;\n\n\t\t\t&::after,\n\t\t\t&::before {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> th[data-reaches-bottom][data-reaches-left],\n\t\t.", "\n\t\t\t> table\n\t\t\t> tbody\n\t\t\t> tr\n\t\t\t> td[data-reaches-bottom][data-reaches-left] {\n\t\t\tborder-bottom-left-radius: 0;\n\n\t\t\t&::after,\n\t\t\t&::before {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t/* Preserve rounded numbered-column corners across normal, active, and danger states. */\n\t\t.", ":first-of-type {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\n\t\t.", ":last-of-type {\n\t\t\tborder-bottom-left-radius: ", ";\n\t\t}\n\n\t\t.", ".", ":first-of-type,\n\t\t\t.", ".", ":first-of-type,\n\t\t\t.", ".active:first-of-type {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\n\t\t.", ".", ":last-of-type,\n\t\t\t.", ".", ":last-of-type,\n\t\t\t.", ".active:last-of-type {\n\t\t\tborder-bottom-left-radius: ", ";\n\t\t}\n\n\t\t.", ".", ":first-of-type::after {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\n\t\t.", ".", ":last-of-type::after {\n\t\t\tborder-bottom-left-radius: ", ";\n\t\t}\n\n\t\t/* Sticky numbered-column mask also needs the same top-left radius. */\n\t\t.", "\n\t\t\ttr\n\t\t\tth[data-reaches-top][data-reaches-left]::before {\n\t\t\tborder-top-left-radius: ", ";\n\t\t}\n\t}\n"])), _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _consts2.tableBorderColor, "var(--ds-radius-medium, 6px)", "var(--ds-radius-medium, 6px)", _editorSharedStyles.akEditorUnitZIndex, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_ACTIVE, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_ACTIVE, _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, "var(--ds-radius-medium, 6px)", _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, "var(--ds-radius-medium, 6px)", _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_ACTIVE, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, "var(--ds-radius-medium, 6px)", _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_ACTIVE, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, "var(--ds-radius-medium, 6px)", _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-medium, 6px)", _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _types.TableCssClassName.HOVERED_CELL_IN_DANGER, "var(--ds-radius-medium, 6px)", _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, "var(--ds-radius-medium, 6px)");
};
var roundedTableStickyHeaderStyles = function roundedTableStickyHeaderStyles() {
return (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t/* Sticky header rows have independent border/shadow/mask painting, so patch the sticky-only painters too. */\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ",\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky {\n\t\t> th[data-reaches-left],\n\t\t> td[data-reaches-left] {\n\t\t\tborder-top-left-radius: ", ";\n\n\t\t\t&::after,\n\t\t\t&::before {\n\t\t\t\tborder-top-left-radius: ", ";\n\t\t\t}\n\t\t}\n\n\t\t> td[data-reaches-right],\n\t\t> th[data-reaches-right] {\n\t\t\tborder-top-right-radius: ", ";\n\n\t\t\t&::after,\n\t\t\t&::before {\n\t\t\t\tborder-top-right-radius: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " .", "::after {\n\t\tborder-left-color: transparent;\n\t}\n\n\t.", "[data-number-column='true'] .", " tr th[data-reaches-top][data-reaches-left]::before,\n\t.", "[data-number-column='true'] .", " tr.", " th[data-reaches-left]::before,\n\t.", "[data-number-column='true'] .", " .", " th[data-reaches-left]::before {\n\t\tborder-top-left-radius: ", ";\n\t\tclip-path: inset(0 0 0 0 round ", " 0 0 0);\n\t\tbox-shadow: none !important;\n\t}\n\n\t.", "\n\t\t> table\n\t\t> tbody\n\t\t> tr.", ",\n\t\t.", "\n\t\t> table.", "\n\t\t> tbody\n\t\t> tr.sticky {\n\t\tbox-shadow: none !important;\n\t}\n\n\t.", ".", ":has(tr.sticky)\n\t\t.", "\n\t\t.", ":first-of-type {\n\t\tbox-shadow: none !important;\n\t}\n"])), _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, "var(--ds-radius-medium, 6px)", "var(--ds-radius-medium, 6px)", "var(--ds-radius-medium, 6px)", "var(--ds-radius-medium, 6px)", _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.COLUMN_CONTROLS_DECORATIONS, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.TABLE_NODE_WRAPPER_NO_OVERFLOW, _types.TableCssClassName.NATIVE_STICKY_ACTIVE, "var(--ds-radius-medium, 6px)", "var(--ds-radius-medium, 6px)", _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.NATIVE_STICKY, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_CONTAINER, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON);
};
var roundedTableOverrides = function roundedTableOverrides() {
return (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t", "\n\t", "\n\t", "\n"])), roundedTableCellCornerStyles(), roundedTableInteractionOverlayStyles(), roundedTableNumberedColumnStyles(), roundedTableStickyHeaderStyles());
};
var baseTableStylesWithoutSharedStyle = function baseTableStylesWithoutSharedStyle(props) {
return (0, _react.css)(_templateObject0 || (_templateObject0 = (0, _taggedTemplateLiteral2.default)(["\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\t", ";\n\n\t.", " {\n\t\ttd.", ", th.", " {\n\t\t\tposition: relative;\n\t\t\toverflow: visible;\n\t\t}\n\n\t\ttd.", " {\n\t\t\tbackground-color: ", ";\n\t\t\t&::after {\n\t\t\t\theight: 100%;\n\t\t\t\tcontent: '';\n\t\t\t\tborder-left: 1px solid ", ";\n\t\t\t\tborder-bottom: 1px solid ", ";\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0px;\n\t\t\t\ttop: 0px;\n\t\t\t\tbottom: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t", "\n\t}\n\n\t.", " {\n\t\t", "\n\t}\n\n\t", "\n\n\t", "\n\n\t/* Delete button */\n\t", "\n\t/* Ends Delete button */\n\n\t/* sticky styles */\n\t.", " > .", " .", " .", ":first-of-type {\n\t\tmargin-top: ", "px;\n\t\twidth: ", "px;\n\n\t\tposition: fixed !important;\n\t\tz-index: ", " !important;\n\t\tbox-shadow: 0px -", "px ", ";\n\t\tborder-right: 0 none;\n\t\t/* top set by NumberColumn component */\n\t}\n\n\t.", " .", ".sticky {\n\t\tposition: fixed !important;\n\t\t/* needs to be above row controls */\n\t\tz-index: ", " !important;\n\t\tbackground: ", ";\n\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t}\n\n\t.", ".sticky .", " {\n\t\tborder-bottom: 0px none;\n\t\tborder-right: 0px none;\n\n\t\theight: ", "px;\n\t\twidth: ", "px;\n\t}\n\n\t", "\n\n\t", "\n\n .", "\n .", "\n .", ".sticky {\n\t\tposition: fixed !important;\n\t\tz-index: ", " !important;\n\t\tdisplay: flex;\n\t\tborder-left: ", "px solid ", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.", " col:first-of-type {\n\t\t/* moving rows out of a table layout does weird things in Chrome */\n\t\tborder-right: 1px solid ", ";\n\t}\n\n\ttr.sticky {\n\t\tpadding-top: ", "px;\n\t\tposition: fixed;\n\t\tdisplay: grid;\n\n\t\t/* to keep it above cell selection but below date and other nodes popups that are inside sticky header */\n\t\tz-index: ", ";\n\n\t\toverflow-y: visible;\n\t\toverflow-x: hidden;\n\n\t\tgrid-auto-flow: column;\n\n\t\t/* background for where controls apply */\n\t\tbackground: ", ";\n\t\tbox-sizing: content-box;\n\t\tbox-shadow: 0 6px 4px -4px ", ";\n\n\t\tmargin-left: -1px;\n\n\t\t&.no-pointer-events {\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n\n\t.", " .", " {\n\t\tleft: unset;\n\t\tposition: fixed;\n\t\t/* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */\n\t\tz-index: ", ";\n\t}\n\n\t.", ".", " .", " {\n\t\tpadding-bottom: ", "px;\n\t}\n\n\t.tableView-content-wrap:has(.tableView-content-wrap):has(\n\t\t\t.", "\n\t\t) {\n\t\tpadding-left: unset;\n\t}\n\n\t.tableView-content-wrap:has(.", ") {\n\t\tpadding-left: 15px;\n\t}\n\n\ttr.sticky th {\n\t\tborder-bottom: ", "px solid ", ";\n\t\tmargin-right: -1px;\n\t}\n\n\t.", " tr.sticky > th:last-child {\n\t\tborder-right-width: 1px;\n\t}\n\n\t/* add left edge for first cell */\n\t.", " tr.sticky > th:first-of-type {\n\t\tmargin-left: 0px;\n\t}\n\n\t/* add a little bit so the scroll lines up with the table */\n\t.", " tr.sticky::after {\n\t\tcontent: ' ';\n\t\twidth: ", "px;\n\t}\n\n\t/* To fix jumpiness caused in Chrome Browsers for sticky headers */\n\t.", " .sticky + tr {\n\t\tmin-height: 0px;\n\t}\n\n\t/* move resize line a little in sticky bar */\n\t.", ".", " {\n\t\ttr.sticky td.", ", tr.sticky th.", " {\n\t\t\t.", "::after {\n\t\t\t\tright: ", "px;\n\t\t\t}\n\t\t}\n\n\t\t/* when selected put it back to normal -- :not selector would be nicer */\n\t\ttr.sticky\n\t\t\ttd.", ".", ",\n\t\t\ttr.sticky\n\t\t\tth.", ".", " {\n\t\t\t.", "::after {\n\t\t\t\tright: ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\ttr.sticky .", ", tr.sticky .", " {\n\t\tz-index: 1;\n\t}\n\n\ttr.", " {\n\t\tposition: sticky;\n\t\ttop: ", "px;\n\t\tz-index: calc(", " - 5);\n\t\tbox-shadow:\n\t\t\tinset -1px 1px ", ",\n\t\t\tinset 1px -1px ", ";\n\n\t\t&.", " {\n\t\t\tbox-shadow:\n\t\t\t\tinset -1px 1px ", ",\n\t\t\t\tinset 1px -1px ", ",\n\t\t\t\t0 6px 4px -4px ", ";\n\t\t}\n\n\t\t", "\n\t}\n\n\t/** Adds mask above sticky header to prevent table content from bleeding through on scroll */\n\t.", ":has(tr.", ")::before {\n\t\tcontent: ' ';\n\t\tdisplay: block;\n\t\ttop: 0;\n\t\tbox-sizing: border-box;\n\t\twidth: 100%;\n\t\theight: 0;\n\t\tmargin-bottom: -", "px;\n\t\tposition: sticky;\n\t\tborder-top: ", "px solid ", ";\n\t\tz-index: ", ";\n\t}\n\n\t/** When cleaning up, merge this with the mask style above */\n\t", "\n\n\t/** Corrects position of drag row controls when sticky header top mask is present */\n\t.", ":has(.", ")\n\t\t> .", "\n\t\t> div\n\t\t> .", " {\n\t\ttop: ", "px;\n\t\tz-index: ", ";\n\t}\n\n\t", "\n\n\t.", "[data-table-header-is-stuck='true']:has(.", ")\n\t\t> .", "\n\t\t> div\n\t\t> .", " {\n\t\tz-index: ", ";\n\t}\n\n\t/** Corrects position of numbered column when sticky header top mask is present */\n\t.", ":has(.", " ", ")\n\t\t> .", "\n\t\t> div\n\t\t> .", " {\n\t\ttop: ", "px;\n\t}\n\n\t/** Expands the mask to encompass the numbered column */\n\t.pm-table-wrapper:has([data-number-column='true'] tr.", ")::before {\n\t\tmargin-left: -", "px;\n\t\twidth: calc(100% + ", "px);\n\t}\n\n\t/** Hides the header row drag handle when the position:sticky table header is 'stuck'\n\t *\n\t * 1. We check that the header is 'stuck'.\n\t * - The table container has attribute data-table-header-is-stuck='true' when sticky positioned header is 'stuck'\n\t *\n\t * 2. We check that the header row drag handle is in the first row or the first row is selected\n\t * - The header row drag handle has the data-row-index='0' attribute (i.e. hovered), OR\n\t * - The header row drag handle has the data-selected-row-index='0' attribute\n\t * \t\tAND does not have the data-handle-appearance='default' attribute (i.e. selected)\n\t*/\n\t.", ".", "[data-table-header-is-stuck='true']\n\t.", ":is([data-row-index='0'], [data-selected-row-index='0']:not([data-handle-appearance='default'])) {\n\t\tvisibility: hidden;\n\t}\n\n\t.", " tr.", " {\n\t\ttop: ", "px;\n\t}\n\n\t.", " tr.sticky {\n\t\tpadding-top: ", "px;\n\t}\n\n\t.", ".", "\n\t\t> .", "\n\t\t.", "\n\t\t.", ":first-of-type {\n\t\tmargin-top: ", "px;\n\t}\n\n\t.", ".sticky {\n\t\tborder-top: ", "px solid ", ";\n\t}\n\n\t", "\n\t", "\n ", "\n\n .", " .", " {\n\t\theight: 0; /* stop overflow flash & set correct height in update-overflow-shadows.ts */\n\t}\n\n\t.less-padding {\n\t\tpadding: 0 ", "px;\n\n\t\t.", ", .", " {\n\t\t\tpadding: 0 ", "px;\n\n\t\t\t/* https://product-fabric.atlassian.net/browse/ED-16386\n\t\t\tFixes issue where the extra padding that is added here throws off the position\n\t\t\tof the rows control dot */\n\t\t\t&::after {\n\t\t\t\tright: 6px !important;\n\t\t\t}\n\t\t}\n\n\t\t.", ".", " {\n\t\t\tleft: -4px;\n\t\t}\n\n\t\t.", " {\n\t\t\tpadding: 0 ", "px;\n\t\t}\n\n\t\t.", ".", " {\n\t\t\tleft: -8px;\n\t\t}\n\n\t\t&.", "[data-number-column='true'] {\n\t\t\tpadding-left: ", "px;\n\t\t}\n\t\t.", ", .", " {\n\t\t\twidth: ", "px;\n\t\t}\n\n\t\t.", " {\n\t\t\tleft: 6px;\n\t\t}\n\t\t.", ".", " {\n\t\t\tleft: 8px;\n\t\t}\n\n\t\t.", " {\n\t\t\tleft: calc(100% - 6px);\n\t\t}\n\t\t.", ".", " {\n\t\t\tleft: calc(100% - 16px);\n\t\t}\n\n\t\t.", " {\n\t\t\tleft: 8px;\n\t\t}\n\t\t.", " {\n\t\t\tright: 8px;\n\t\t}\n\t}\n\n\t> .", " {\n\t\t/**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n\t}\n\n\t/* Breakout only works on top level unless wrapped in fragment mark */\n\t", "\n\n\t", ";\n\t", ";\n\n\t/* Corner controls */\n\t.", " {\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t\tdisplay: none;\n\n\t\t.", " {\n\t\t\tposition: relative;\n\n\t\t\t", ";\n\t\t}\n\t}\n\n\t.", ".sticky {\n\t\t.", " {\n\t\t\t/* sticky row insert dot overlaps other row insert and messes things up */\n\t\t\tdisplay: none !important;\n\t\t}\n\t}\n\n\t.", " {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t\tborder: 1px solid ", ";\n\t\tborder-radius: 0;\n\t\tborder-top-left-radius: ", "px;\n\t\tbackground: ", ";\n\t\tbox-sizing: border-box;\n\t\tpadding: 0;\n\t\t:focus {\n\t\t\toutline: none;\n\t\t}\n\t}\n\t.active .", " {\n\t\tborder-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t.", "[data-number-column='true'] {\n\t\t.", ", .", " {\n\t\t\twidth: ", "px;\n\t\t}\n\t\t.", " .", " {\n\t\t\tborder-right-width: 0;\n\t\t}\n\t}\n\n\t:not(.", ") .", ":hover {\n\t\tborder-color: ", ";\n\t\tbackground: ", ";\n\t\tcursor: pointer;\n\t}\n\n\t:not(.", ")\n\t\t.", ".", " {\n\t\tborder-color: ", ";\n\t\tbackground: ", ";\n\t}\n\n\t/* Row controls */\n\t.", " {\n\t\twidth: ", "px;\n\t\tbox-sizing: border-box;\n\t\tdisplay: none;\n\t\tposition: relative;\n\n\t\t", ";\n\n\t\t.", " {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\t.", ":last-child > button {\n\t\t\tborder-bottom-left-radius: ", "px;\n\t\t}\n\t\t.", " {\n\t\t\tposition: relative;\n\t\t\tmargin-top: -1px;\n\t\t}\n\t\t.", ":hover,\n\t\t\t.", ".active,\n\t\t\t.", ":hover {\n\t\t\tz-index: ", ";\n\t\t}\n\n\t\t", "\n\t}\n\n\t.", " {\n\t\tdisplay: grid;\n\t\talign-items: center;\n\t\tposition: absolute;\n\t\tz-index: ", ";\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\talign-self: end;\n\t\t\theight: 100%;\n\t\t\twidth: 18px;\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\tbottom: -3px;\n\t\t\tleft: 2px;\n\t\t\tbackground-color: ", ";\n\t\t\theight: 4px;\n\t\t\twidth: 4px;\n\t\t\tborder-radius: 50%;\n\t\t\tpointer-events: none;\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " {\n\t\t\theight: ", "px;\n\t\t\tposition: absolute;\n\t\t\ttop: ", ";\n\t\t\tz-index: ", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tposition: absolute;\n\t\t\theight: ", "px;\n\t\t\twidth: 100%;\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\theight: 4px;\n\t\t\twidth: 4px;\n\t\t\tborder-radius: 50%;\n\t\t\tposition: absolute;\n\t\t\tright: -2px;\n\t\t}\n\t}\n\n\t.", " {\n\t\tbackground: none;\n\t\tborder: none;\n\t\toutline: none;\n\t\tposition: absolute;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t:focus {\n\t\t\toutline: none;\n\t\t}\n\t}\n\n\t.", " {\n\t\tcursor: grab;\n\t\tpointer-events: auto;\n\n\t\tline-height: 0;\n\t\tpadding: 0;\n\t\tborder-radius: 6px;\n\t\twidth: max-content;\n\t\tborder: 2px solid ", ";\n\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\talign-items: center;\n\t\tbackground: transparent;\n\t\toutline: none;\n\n\t\t&.placeholder {\n\t\t\tbackground-color: transparent;\n\t\t\tborder: 2px solid transparent;\n\t\t}\n\n\t\t&.", " {\n\t\t\tcursor: pointer;\n\t\t\t& svg {\n\t\t\t\t& > rect.", " {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t\t& > rect {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t\t& > g > rect {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t&:not(.", ") {\n\t\t\t& svg {\n\t\t\t\trect {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t\tg {\n\t\t\t\t\tfill: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\tsvg {\n\t\t\t\t\trect {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t\tg {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:active {\n\t\t\t\tcursor: grabbing;\n\t\t\t}\n\n\t\t\t&.selected {\n\t\t\t\t:focus {\n\t\t\t\t\toutline: 2px solid ", ";\n\t\t\t\t\toutline-offset: 1px;\n\t\t\t\t}\n\n\t\t\t\t&:active {\n\t\t\t\t\toutline: none;\n\t\t\t\t}\n\n\t\t\t\tsvg {\n\t\t\t\t\trect {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t\tg {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.danger {\n\t\t\t\tsvg {\n\t\t\t\t\trect {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t\tg {\n\t\t\t\t\t\tfill: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n\n\t:not(.", ") .", " {\n\t\t", "\n\t\t", "\n\t}\n\n\t/* Numbered column */\n\t.", " {\n\t\tposition: relative;\n\t\tfloat: right;\n\t\tmargin-left: ", "px;\n\t\ttop: ", "px;\n\t\twidth: ", "px;\n\t\tbox-sizing: border-box;\n\t}\n\n\t.", " {\n\t\tborder: 1px solid ", ";\n\t\tbox-sizing: border-box;\n\t\tmargin-top: -1px;\n\t\tpadding-bottom: 2px;\n\t\tpadding: ", "\n\t\t\t2px;\n\t\ttext-align: center;\n\t\tfont-size: ", ";\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\tborder-color: ", ";\n\n\t\t:first-child:not(style),\n\t\tstyle:first-child + * {\n\t\t\tmargin-top: 0;\n\t\t}\n\t\t:last-child {\n\t\t\tborder-bottom: 1px solid ", ";\n\t\t}\n\t}\n\n\t/* add a background above the first numbered column cell when sticky header is engaged\n\twhich hides the table when scrolling */\n\t.", "\n\t\t> .", " {\n\t\t.", ":first-of-type::after {\n\t\t\tcontent: '';\n\t\t\tdisplay: block;\n\t\t\theight: 33px;\n\t\t\twidth: 100%;\n\t\t\tbackground-color: ", ";\n\t\t\tposition: absolute;\n\n\t\t\t/* the extra pixel is accounting for borders */\n\t\t\ttop: -34px;\n\t\t\tleft: -1px;\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", ", .", " {\n\t\t\tdisplay: block;\n\t\t}\n\t\t.", " {\n\t\t\tpadding-left: 0px;\n\n\t\t\t.", " {\n\t\t\t\tborder-left: 0 none;\n\t\t\t}\n\n\t\t\t.", ".active {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t/* nested tables should be ignored when we apply border-left: 0 to the parent table */\n\t\t.", " {\n\t\t\t.", " {\n\t\t\t\tborder-left: 1px solid ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n\n\t:not(.", ") .", " {\n\t\t.", ":not(.", ") {\n\t\t\tcursor: pointer;\n\t\t}\n\t\t.", ":not(.", "):hover {\n\t\t\t", "\n\t\t}\n\t\t.", ".", " {\n\t\t\tbackground-color: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t\tborder-left: 0;\n\t\t\tcolor: ", ";\n\t\t\tposition: relative;\n\t\t\tz-index: ", ";\n\t\t}\n\t}\n\n\t", "\n\n\t/* Table */\n\t.", " > table {\n\t\ttable-layout: fixed;\n\t\twhite-space: normal;\n\t\tborder-top: none;\n\t\t/* 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212 */\n\t\tmargin-right: -1px;\n\t\t/* Allows better positioning for the shadow sentinels - ED-16668 */\n\t\tposition: relative;\n\n\t\t> tbody > tr {\n\t\t\twhite-space: pre-wrap;\n\t\t}\n\n\t\t.", " + * {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t/*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n\t\tth.", " > .fabric-editor-block-mark {\n\t\t\t> h1:first-of-type,\n\t\t\t> h2:first-of-type,\n\t\t\t> h3:first-of-type,\n\t\t\t> h4:first-of-type,\n\t\t\t> h5:first-of-type,\n\t\t\t> h6:first-of-type {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t.", ", .", " {\n\t\t\tposition: relative;\n\t\t}\n\t\t/* Give selected cells a blue overlay */\n\t\t.", "::after, .", "::after {\n\t\t\tz-index: ", ";\n\t\t\tposition: absolute;\n\t\t\tcontent: '';\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\ttop: 0;\n\t\t\tbottom: 0;\n\t\t\twidth: 100%;\n\t\t\tpointer-events: none;\n\t\t}\n\t\t.", " {\n\t\t\t", "\n\t\t}\n\t\t.", "::after {\n\t\t\tbackground: ", ";\n\t\t\tz-index: ", ";\n\t\t}\n\t\t/* Override border colors for danger state */\n\t\tth.", ".", ",\n\t\t\ttd.", ".", " {\n\t\t\t", "\n\t\t\t&::after {\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: 0;\n\t\t\t\tz-index: ", ";\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tpointer-events: none;\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t\ttd.", ",\n\t\t\ttd.", ",\n\t\t\tth.", ".", ",\n\t\t\tth.", ".", " {\n\t\t\t&::after {\n\t\t\t\theight: 100%;\n\t\t\t\twidth: 100%;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tcontent: '';\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: -1px;\n\t\t\t\ttop: -1px;\n\t\t\t\tbottom: 0;\n\t\t\t\tz-index: ", ";\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\t\t\t&.", "::after {\n\t\t\t\t", ";\n\t\t\t\tz-index: ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\n\t\t\t&.", ".", "::after {\n\t\t\t\t", ";\n\t\t\t\tz-index: ", ";\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n\n\t/* override for DnD controls */\n\t.", " {\n\t\tposition: absolute;\n\t\tmargin-top: ", "px;\n\t\tleft: -", "px;\n\t}\n\n\t.", " {\n\t\tposition: absolute;\n\t\t/* this is to fix the misalignment of the numbered column in live page view mode */\n\t\t", "\n\t}\n\n\t.", ".", ",\n\t\t.", ".", " {\n\t\tz-index: ", ";\n\t}\n\n\t.", " {\n\t\tposition: absolute;\n\t\ttop: ", "px;\n\t}\n\n\t", "\n\n\t/** Mask for content to the left of the column controls */\n\n\t.", "[data-number-column=\"true\"] .", " > .", "::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t\tdisplay: inline-block;\n\t\tmargin-left: -", "px;\n\t\twidth: ", "px;\n\t\theight: ", "px;\n\t\tbackground: ", ";\n\t\tz-index: ", ";\n\t}\n\n\t/** Mask for numbered column content to the left of the header row */\n\t.", "[data-number-column=\"true\"] .", " tr:first-of-type th:first-of-type::before {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t\tleft: 0;\n\t\twidth: ", "px;\n\t\theight: 100%;\n\t\tmargin-left: -", "px;\n\t\tmargin-top: -", "px;\n\t\toutline: ", ";\n\t\tborder-left: ", ";\n\t\tbackground: ", ";\n\t\t", "\n\n\t\t", "\n\t}\n\n\t", "\n\n\t.", "[data-number-column=\"true\"].", " .", " tr:first-of-type th.", ":not(.", "):first-of-type::before, .", "[data-number-column=\"true\"] .", " tr:first-of-type th.", ":not(.", ", .", "):first-of-type::before {\n\t\toutline: none;\n\t\tborder-left-color: ", ";\n\t\t", "\n\t\tbackground: ", ";\n\t}\n\n\t", "\n\n\t.", "[data-number-column=\"true\"] .", " .", " th:first-of-type::before {\n\t\tbox-shadow: 0 6px 4px -4px ", ";\n\t}\n\n\t.", "\n\t\t.", ":not(.", " *) {\n\t\t/* !important to override the inline style in the inner controls component */\n\t\tmargin-top: ", "px !important;\n\t}\n\n\t.", " .", " {\n\t\tposition: fixed;\n\t\t/* higher zIndex than sticky header which is akEditorTableCellOnStickyHeaderZIndex - 5 */\n\t\tz-index: ", ";\n\t}\n\n\t", "\n\n\t/* nested tables */\n\t.", " {\n\t\t.", " .", " {\n\t\t\tposition: absolute;\n\t\t\tz-index: ", ";\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding-bottom: 0px;\n\t\t/* fixes gap cursor height */\n\t\toverflow: auto;\n\t\toverflow-y: hidden;\n\t\tposition: relative;\n\t}\n\n\t.", ".", " {\n\t\toverflow: visible;\n\t}\n"])), (0, _uiStyles.columnControlsLineMarker)(), (0, _uiStyles.hoveredDeleteButton)(), (0, _uiStyles.hoveredCell)(), _uiStyles.hoveredWarningCell, (0, _uiStyles.insertLine)(), (0, _uiStyles.resizeHandle)(), rangeSelectionStyles, rangeSelectionStylesForFakeBorders, viewModeSortStyles(), (0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') && tableAnchorStyles, _types.TableCssClassName.TABLE_NODE_WRAPPER, _types.TableCssClassName.TABLE_CELL, _types.TableCssClassName.TABLE_HEADER_CELL, _types.TableCssClassName.TABLE_CELL, _consts2.tableCellBackgroundColor, _consts2.tableBorderColor, _consts2.tableBorderColor, _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_COLUMN, (0, _uiStyles.insertColumnButtonWrapper)(), _types.TableCssClassName.CONTROLS_FLOATING_BUTTON_ROW, (0, _uiStyles.insertRowButtonWrapper)(), (0, _uiStyles.dragInsertButtonWrapper)(), (0, _uiStyles.dragCornerControlButton)(), (0, _uiStyles.DeleteButton)(), _types.TableCssClassName.TABLE_STICKY, props.isDragAndDropEnabled ? _types.TableCssClassName.DRAG_ROW_CONTROLS_WRAPPER : _types.TableCssClassName.ROW_CONTROLS_WRAPPER, _types.TableCssClassName.NUMBERED_COLUMN, _types.TableCssClassName.NUMBERED_COLUMN_BUTTON, _consts2.stickyRowOffsetTop, _editorSharedStyles.akEditorTableNumberColumnWidth, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts2.stickyRowOffsetTop, "var(--ds-surface, #FFFFFF)", _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.CORNER_CONTROLS, _editorSharedStyles.akEditorSmallZIndex, "var(--ds-surface, #FFFFFF)", _consts2.tableToolbarSize, _consts2.tableToolbarSize, _types.TableCssClassName.CORNER_CONTROLS, _types.TableCssClassName.CONTROLS_CORNER_BUTTON, _consts2.tableToolbarSize, _consts2.tableToolbarSize, tableStickyHeaderColumnControlsDecorationsStyle(), tableStickyHeaderFirefoxFixStyle(), _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.ROW_CONTROLS, _types.TableCssClassName.ROW_CONTROLS_BUTTON_WRAP, _editorSharedStyles.akEditorStickyHeaderZIndex, _consts2.tableToolbarSize, "var(--ds-surface, #FFFFFF)", _consts2.tableToolbarSize, _types.TableCssClassName.TABLE_STICKY, "var(--ds-surface, #FFFFFF)", _consts2.stickyRowOffsetTop, _editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex - 5, "var(--ds-surface, #FFFFFF)", "var(--ds-shadow-overflow-perimeter, #1E1F211f)", _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _editorSharedStyles.akEditorTableCellOnStickyHeaderZIndex, _types.TableCssClassName.WITH_CONTROLS, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY_SHADOW, _consts2.tableToolbarSize, _types.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, _types.TableCssClassName.NESTED_TABLE_WITH_CONTROLS, _consts2.stickyHeaderBorderBottomWidth, _consts2.tableBorderColor, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TABLE_STICKY, _types.TableCssClassName.TAB