@atlaskit/editor-plugin-table 1.5.0 → 1.5.1
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 +31 -0
- package/dist/cjs/i18n/cs.js +2 -2
- package/dist/cjs/i18n/en_ZZ.js +43 -0
- package/dist/cjs/i18n/ja.js +4 -4
- package/dist/cjs/i18n/ko.js +1 -1
- package/dist/cjs/i18n/sv.js +1 -1
- package/dist/cjs/i18n/vi.js +2 -2
- package/dist/cjs/i18n/zh.js +3 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +10 -0
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +8 -3
- package/dist/cjs/plugins/table/ui/ui-styles.js +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/cs.js +2 -2
- package/dist/es2019/i18n/en_ZZ.js +36 -0
- package/dist/es2019/i18n/ja.js +4 -4
- package/dist/es2019/i18n/ko.js +1 -1
- package/dist/es2019/i18n/sv.js +1 -1
- package/dist/es2019/i18n/vi.js +2 -2
- package/dist/es2019/i18n/zh.js +3 -3
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +10 -0
- package/dist/es2019/plugins/table/ui/common-styles.js +3 -3
- package/dist/es2019/plugins/table/ui/consts.js +6 -2
- package/dist/es2019/plugins/table/ui/ui-styles.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/i18n/cs.js +2 -2
- package/dist/esm/i18n/en_ZZ.js +36 -0
- package/dist/esm/i18n/ja.js +4 -4
- package/dist/esm/i18n/ko.js +1 -1
- package/dist/esm/i18n/sv.js +1 -1
- package/dist/esm/i18n/vi.js +2 -2
- package/dist/esm/i18n/zh.js +3 -3
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +10 -0
- package/dist/esm/plugins/table/ui/common-styles.js +2 -2
- package/dist/esm/plugins/table/ui/consts.js +6 -2
- package/dist/esm/plugins/table/ui/ui-styles.js +3 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/i18n/en_ZZ.d.ts +35 -0
- package/dist/types/plugins/table/ui/consts.d.ts +2 -1
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +35 -0
- package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +2 -1
- package/examples/99-testing.tsx +1 -4
- package/package.json +7 -6
- package/src/__tests__/integration/sticky-header.ts +5 -1
- package/src/__tests__/unit/color-picker.ts +2 -0
- package/src/__tests__/unit/commands/misc.ts +2 -0
- package/src/__tests__/unit/commands.ts +2 -0
- package/src/__tests__/unit/event-handlers.ts +2 -0
- package/src/__tests__/unit/get-toolbar-config.ts +2 -0
- package/src/__tests__/unit/index.ts +2 -0
- package/src/__tests__/unit/keymap.ts +2 -0
- package/src/__tests__/unit/layout.ts +2 -0
- package/src/__tests__/unit/pm-plugins/main-with-allow-collapse.ts +2 -0
- package/src/__tests__/unit/pm-plugins/table-resizing/event-handlers.ts +2 -0
- package/src/__tests__/unit/pm-plugins/table-selection-keymap.ts +2 -0
- package/src/__tests__/unit/utils/collapse.ts +4 -1
- package/src/i18n/cs.ts +2 -2
- package/src/i18n/en_ZZ.ts +41 -0
- package/src/i18n/ja.ts +4 -4
- package/src/i18n/ko.ts +1 -1
- package/src/i18n/sv.ts +1 -1
- package/src/i18n/vi.ts +2 -2
- package/src/i18n/zh.ts +3 -3
- package/src/plugins/table/pm-plugins/table-resizing/utils/resize-state.ts +11 -0
- package/src/plugins/table/ui/common-styles.ts +3 -3
- package/src/plugins/table/ui/consts.ts +6 -2
- package/src/plugins/table/ui/ui-styles.ts +3 -3
|
@@ -14,6 +14,10 @@ export const tableCellBackgroundColor = themed({
|
|
|
14
14
|
light: `var(--ds-surface, ${N0})`,
|
|
15
15
|
dark: `var(--ds-surface, ${DN30})`
|
|
16
16
|
});
|
|
17
|
+
export const tableHeaderCellBackgroundColor = themed({
|
|
18
|
+
light: `var(--ds-background-neutral, ${akEditorTableToolbar})`,
|
|
19
|
+
dark: `var(--ds-background-neutral, ${akEditorTableToolbarDark})`
|
|
20
|
+
});
|
|
17
21
|
export const tableToolbarColor = themed({
|
|
18
22
|
light: `var(--ds-background-neutral-subtle, ${akEditorTableToolbar})`,
|
|
19
23
|
dark: `var(--ds-background-neutral-subtle, ${akEditorTableToolbarDark})`
|
|
@@ -23,8 +27,8 @@ export const tableTextColor = themed({
|
|
|
23
27
|
dark: `var(--ds-text-subtlest, ${DN400})`
|
|
24
28
|
});
|
|
25
29
|
export const tableBorderColor = themed({
|
|
26
|
-
light: `var(--ds-
|
|
27
|
-
dark: `var(--ds-
|
|
30
|
+
light: `var(--ds-background-accent-gray-subtler, ${akEditorTableBorder})`,
|
|
31
|
+
dark: `var(--ds-background-accent-gray-subtler, ${akEditorTableBorderDark})`
|
|
28
32
|
});
|
|
29
33
|
export const tableFloatingControlsColor = `var(--ds-background-neutral, ${N20})`;
|
|
30
34
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4461
|
|
@@ -2,7 +2,7 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { tableCellBorderWidth, tableMarginTop, tableMarginTopWithControl } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorShadowZIndex, akEditorTableNumberColumnWidth, akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
4
|
import { N40A, B300, N300, R300, N20A, N60A, N0, Y50, Y200 } from '@atlaskit/theme/colors';
|
|
5
|
-
import {
|
|
5
|
+
import { tableBorderColor, tableToolbarSelectedColor, tableHeaderCellBackgroundColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize } from './consts';
|
|
6
6
|
import { TableCssClassName as ClassName } from '../types';
|
|
7
7
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
8
8
|
const InsertLine = cssString => css`
|
|
@@ -51,7 +51,7 @@ const Button = cssString => css`
|
|
|
51
51
|
`;
|
|
52
52
|
export const HeaderButton = (props, cssString) => css`
|
|
53
53
|
.${ClassName.CONTROLS_BUTTON} {
|
|
54
|
-
background: ${
|
|
54
|
+
background: ${tableHeaderCellBackgroundColor(props)};
|
|
55
55
|
border: 1px solid ${tableBorderColor(props)};
|
|
56
56
|
display: block;
|
|
57
57
|
box-sizing: border-box;
|
|
@@ -231,7 +231,7 @@ export const OverflowShadow = props => css`
|
|
|
231
231
|
}
|
|
232
232
|
`;
|
|
233
233
|
const columnHeaderButton = (props, cssString) => css`
|
|
234
|
-
background: ${
|
|
234
|
+
background: ${tableHeaderCellBackgroundColor(props)};
|
|
235
235
|
border: 1px solid ${tableBorderColor(props)};
|
|
236
236
|
display: block;
|
|
237
237
|
box-sizing: border-box;
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/i18n/cs.js
CHANGED
|
@@ -15,9 +15,9 @@ export default {
|
|
|
15
15
|
'fabric.editor.cornerControl': 'Zvýraznit tabulku',
|
|
16
16
|
'fabric.editor.distributeColumns': 'Rozložení sloupců',
|
|
17
17
|
'fabric.editor.extension.confirmDeleteLinkedModalMessagePrefix': 'Odstraňování',
|
|
18
|
-
'fabric.editor.extension.deleteElementTitle': '
|
|
18
|
+
'fabric.editor.extension.deleteElementTitle': 'Odstranit prvek',
|
|
19
19
|
'fabric.editor.extension.sourceNoTitledName': 'tento prvek',
|
|
20
|
-
'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': '
|
|
20
|
+
'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': 'Odstranit také všechny připojené prvky',
|
|
21
21
|
'fabric.editor.headerColumn': 'Sloupec záhlaví',
|
|
22
22
|
'fabric.editor.headerRow': 'Řádek záhlaví',
|
|
23
23
|
'fabric.editor.insertColumn': 'Vložit sloupec napravo',
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* prettier-ignore */
|
|
2
|
+
/**
|
|
3
|
+
* NOTE:
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically generated by Traduki 2.0.
|
|
6
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
7
|
+
*/
|
|
8
|
+
//
|
|
9
|
+
export default {
|
|
10
|
+
'fabric.editor.canNotSortTable': "⚠️ You can't sort a table with merged cells",
|
|
11
|
+
'fabric.editor.cellBackground': 'Cell background',
|
|
12
|
+
'fabric.editor.cellOptions': 'Cell options',
|
|
13
|
+
'fabric.editor.clearCells': '{0, plural, one {Clear cell} other {Clear cells}}',
|
|
14
|
+
'fabric.editor.collapseTable': 'Collapse table',
|
|
15
|
+
'fabric.editor.cornerControl': 'Highlight table',
|
|
16
|
+
'fabric.editor.distributeColumns': 'Distribute columns',
|
|
17
|
+
'fabric.editor.extension.confirmDeleteLinkedModalMessagePrefix': 'Deleting',
|
|
18
|
+
'fabric.editor.extension.deleteElementTitle': 'Delete element',
|
|
19
|
+
'fabric.editor.extension.sourceNoTitledName': 'this element',
|
|
20
|
+
'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': 'Also delete connected elements',
|
|
21
|
+
'fabric.editor.headerColumn': 'Header column',
|
|
22
|
+
'fabric.editor.headerRow': 'Header row',
|
|
23
|
+
'fabric.editor.insertColumn': 'Insert column right',
|
|
24
|
+
'fabric.editor.insertRow': 'Insert row below',
|
|
25
|
+
'fabric.editor.mergeCells': 'Merge cells',
|
|
26
|
+
'fabric.editor.numberedColumn': 'Numbered column',
|
|
27
|
+
'fabric.editor.removeColumns': '{0, plural, one {Delete column} other {Delete columns}}',
|
|
28
|
+
'fabric.editor.removeRows': '{0, plural, one {Delete row} other {Delete rows}}',
|
|
29
|
+
'fabric.editor.rowControl': 'Highlight row',
|
|
30
|
+
'fabric.editor.sortColumnASC': 'Sort column A → Z',
|
|
31
|
+
'fabric.editor.sortColumnDESC': 'Sort column Z → A',
|
|
32
|
+
'fabric.editor.splitCell': 'Split cell',
|
|
33
|
+
'fabric.editor.tableOptions': 'Table options',
|
|
34
|
+
'fabric.editor.tables.confirmDeleteLinkedModalMessage': 'Deleting {nodeName} will break anything connected to it.',
|
|
35
|
+
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': 'Delete'
|
|
36
|
+
};
|
package/dist/esm/i18n/ja.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
//Japanese
|
|
9
9
|
export default {
|
|
10
|
-
'fabric.editor.canNotSortTable': '⚠️
|
|
10
|
+
'fabric.editor.canNotSortTable': '⚠️ 結合セルを含む表は並べ替えられません。',
|
|
11
11
|
'fabric.editor.cellBackground': 'セルの背景',
|
|
12
12
|
'fabric.editor.cellOptions': 'セルのオプション',
|
|
13
13
|
'fabric.editor.clearCells': '{0, plural, other {セルをクリア}}',
|
|
@@ -22,13 +22,13 @@ export default {
|
|
|
22
22
|
'fabric.editor.headerRow': 'ヘッダーの行',
|
|
23
23
|
'fabric.editor.insertColumn': '列を右に挿入',
|
|
24
24
|
'fabric.editor.insertRow': '行を下に挿入',
|
|
25
|
-
'fabric.editor.mergeCells': '
|
|
25
|
+
'fabric.editor.mergeCells': 'セルを結合',
|
|
26
26
|
'fabric.editor.numberedColumn': '番号付き列',
|
|
27
27
|
'fabric.editor.removeColumns': '{0, plural, other {列を削除}}',
|
|
28
28
|
'fabric.editor.removeRows': '{0, plural, other {行を削除}}',
|
|
29
29
|
'fabric.editor.rowControl': '行をハイライト',
|
|
30
|
-
'fabric.editor.sortColumnASC': '
|
|
31
|
-
'fabric.editor.sortColumnDESC': '
|
|
30
|
+
'fabric.editor.sortColumnASC': '列の並べ替え: 昇順',
|
|
31
|
+
'fabric.editor.sortColumnDESC': '列の並べ替え: 降順',
|
|
32
32
|
'fabric.editor.splitCell': 'セルを分割',
|
|
33
33
|
'fabric.editor.tableOptions': '表のオプション',
|
|
34
34
|
'fabric.editor.tables.confirmDeleteLinkedModalMessage': '{nodeName} を削除すると、接続されているすべてが破棄されます。',
|
package/dist/esm/i18n/ko.js
CHANGED
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
'fabric.editor.numberedColumn': '번호 매기기 열',
|
|
25
25
|
'fabric.editor.removeColumns': '{0, plural, other {열 삭제}}',
|
|
26
26
|
'fabric.editor.removeRows': '{0, plural, other {행 삭제}}',
|
|
27
|
-
'fabric.editor.rowControl': '열 강조',
|
|
27
|
+
'fabric.editor.rowControl': '열 강조 표시',
|
|
28
28
|
'fabric.editor.sortColumnASC': '열 정렬: 오름차순',
|
|
29
29
|
'fabric.editor.sortColumnDESC': '열 정렬: 내림차순',
|
|
30
30
|
'fabric.editor.splitCell': '셀 나누기',
|
package/dist/esm/i18n/sv.js
CHANGED
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
'fabric.editor.canNotSortTable': '⚠️ Du kan inte sortera en panelvy med sammanslagna celler',
|
|
11
11
|
'fabric.editor.cellBackground': 'Cellbakgrund',
|
|
12
12
|
'fabric.editor.cellOptions': 'Cellalternativ',
|
|
13
|
-
'fabric.editor.clearCells': '{0, plural, one {Rensa
|
|
13
|
+
'fabric.editor.clearCells': '{0, plural, one {Rensa cell} other {Rensa celler}}',
|
|
14
14
|
'fabric.editor.collapseTable': 'Dölj tabell',
|
|
15
15
|
'fabric.editor.cornerControl': 'Markera tabellen',
|
|
16
16
|
'fabric.editor.distributeColumns': 'Fördela kolumner',
|
package/dist/esm/i18n/vi.js
CHANGED
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
'fabric.editor.cellOptions': 'Tùy chọn ô',
|
|
13
13
|
'fabric.editor.clearCells': '{0, plural, other {Xóa ô}}',
|
|
14
14
|
'fabric.editor.collapseTable': 'Thu gọn bảng',
|
|
15
|
-
'fabric.editor.cornerControl': '
|
|
15
|
+
'fabric.editor.cornerControl': 'Làm nổi bật bảng',
|
|
16
16
|
'fabric.editor.distributeColumns': 'Phân phối cột',
|
|
17
17
|
'fabric.editor.extension.deleteElementTitle': 'Xóa thành phần',
|
|
18
18
|
'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': 'Đồng thời xóa các thành phần được kết nối',
|
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
'fabric.editor.numberedColumn': 'Cột được đánh số',
|
|
25
25
|
'fabric.editor.removeColumns': '{0, plural, other {Xóa cột}}',
|
|
26
26
|
'fabric.editor.removeRows': '{0, plural, other {Xóa hàng}}',
|
|
27
|
-
'fabric.editor.rowControl': '
|
|
27
|
+
'fabric.editor.rowControl': 'Làm nổi bật hàng',
|
|
28
28
|
'fabric.editor.sortColumnASC': 'Sắp xếp cột A → Z',
|
|
29
29
|
'fabric.editor.sortColumnDESC': 'Sắp xếp cột Z → A',
|
|
30
30
|
'fabric.editor.splitCell': 'Tách ô',
|
package/dist/esm/i18n/zh.js
CHANGED
|
@@ -18,8 +18,8 @@ export default {
|
|
|
18
18
|
'fabric.editor.extension.deleteElementTitle': '删除元素',
|
|
19
19
|
'fabric.editor.extension.sourceNoTitledName': '此元素',
|
|
20
20
|
'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': '同时删除已连接的元素',
|
|
21
|
-
'fabric.editor.headerColumn': '
|
|
22
|
-
'fabric.editor.headerRow': '
|
|
21
|
+
'fabric.editor.headerColumn': '标题列',
|
|
22
|
+
'fabric.editor.headerRow': '标题行',
|
|
23
23
|
'fabric.editor.insertColumn': '在右侧插入列',
|
|
24
24
|
'fabric.editor.insertRow': '在下方插入行',
|
|
25
25
|
'fabric.editor.mergeCells': '合并单元格',
|
|
@@ -29,7 +29,7 @@ export default {
|
|
|
29
29
|
'fabric.editor.rowControl': '突出显示行',
|
|
30
30
|
'fabric.editor.sortColumnASC': '对列 A → Z 进行排序',
|
|
31
31
|
'fabric.editor.sortColumnDESC': '对列 Z → A 进行排序',
|
|
32
|
-
'fabric.editor.splitCell': '
|
|
32
|
+
'fabric.editor.splitCell': '拆分单元格',
|
|
33
33
|
'fabric.editor.tableOptions': '表格选项',
|
|
34
34
|
'fabric.editor.tables.confirmDeleteLinkedModalMessage': '删除 {nodeName} 将断开与其连接的所有内容。',
|
|
35
35
|
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': '删除'
|
|
@@ -249,6 +249,11 @@ export var normaliseTableLayout = function normaliseTableLayout(input) {
|
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
251
|
export var getNewResizeStateFromSelectedColumns = function getNewResizeStateFromSelectedColumns(rect, state, domAtPos, getEditorContainerWidth) {
|
|
252
|
+
// Fail early so that we don't do complex calculations for no reason
|
|
253
|
+
var numColumnsSelected = rect.right - rect.left;
|
|
254
|
+
if (numColumnsSelected <= 1) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
252
257
|
var _getSelectedTableInfo = getSelectedTableInfo(state.selection),
|
|
253
258
|
totalRowCount = _getSelectedTableInfo.totalRowCount,
|
|
254
259
|
totalColumnCount = _getSelectedTableInfo.totalColumnCount,
|
|
@@ -256,6 +261,11 @@ export var getNewResizeStateFromSelectedColumns = function getNewResizeStateFrom
|
|
|
256
261
|
if (!table) {
|
|
257
262
|
return;
|
|
258
263
|
}
|
|
264
|
+
|
|
265
|
+
// Fail early so that we don't do complex calculations for no reason
|
|
266
|
+
if (!hasTableBeenResized(table.node)) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
259
269
|
var maybeTable = domAtPos(table.start).node;
|
|
260
270
|
var tableRef = maybeTable.closest('table');
|
|
261
271
|
if (!tableRef) {
|
|
@@ -7,7 +7,7 @@ import { N40A, B300, N300, N20A, N0, R500 } from '@atlaskit/theme/colors';
|
|
|
7
7
|
import { SelectionStyle, getSelectionStyles, akEditorSmallZIndex, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, akEditorTableToolbarSize, akEditorUnitZIndex, akEditorSelectedNodeClassName, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
9
9
|
import { TableCssClassName as ClassName } from '../types';
|
|
10
|
-
import { tableCellBackgroundColor,
|
|
10
|
+
import { tableCellBackgroundColor, tableHeaderCellBackgroundColor, tableBorderColor, tableCellSelectedColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, tableBorderRadiusSize, tablePadding, tableScrollbarOffset, resizeHandlerAreaWidth, resizeLineWidth, tableToolbarSize, tableInsertColumnButtonSize, tableControlsSpacing, tableTextColor, stickyRowZIndex, columnControlsDecorationHeight, stickyRowOffsetTop, stickyHeaderBorderBottomWidth } from './consts';
|
|
11
11
|
import { HeaderButton, HeaderButtonHover, HeaderButtonDanger, insertColumnButtonWrapper, insertRowButtonWrapper, columnControlsLineMarker, DeleteButton, OverflowShadow, columnControlsDecoration, hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, InsertMarker } from './ui-styles';
|
|
12
12
|
var cornerControlHeight = tableToolbarSize + 1;
|
|
13
13
|
|
|
@@ -33,7 +33,7 @@ var breakoutWidthStyling = function breakoutWidthStyling(useFragmentMarkBreakout
|
|
|
33
33
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4139
|
|
34
34
|
export var tableStyles = function tableStyles(props) {
|
|
35
35
|
var _props$featureFlags, _props$featureFlags$u, _props$featureFlags2, _props$featureFlags3;
|
|
36
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n\n // https://product-fabric.atlassian.net/browse/ED-16386\n // Fixes issue where the extra padding that is added here throws off the position\n // of the rows control dot\n &::after {\n right: 6px !important;\n }\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\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 }\n\n /* Breakout only works on top level unless wrapped in fragment mark */\n ", "\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n // Allows better positioning for the shadow sentinels - ED-16668\n position: relative;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\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 th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n td.", ", td.", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n border: 1px solid ", ";\n z-index: ", ";\n }\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: 0px;\n /* fixes gap cursor height */\n overflow: auto;\n overflow-y: hidden;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n /*\n ED-15882: When custom start numbers is enabled for lists, we have\n styles that handle this generally (in editor-common) so we can\n throw away the older table-specific styles here.\n */\n ", "\n\n ", "\n"])), ClassName.LAYOUT_BUTTON, "var(--ds-background-neutral, ".concat(N20A, ")"), "var(--ds-icon, ".concat(N300, ")"), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, "var(--ds-background-neutral-hovered, ".concat(B300, ")"), "var(--ds-icon, white)", tableSharedStyle(props), columnControlsLineMarker(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, "var(--ds-surface, white)", ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, "var(--ds-surface, white)", tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, "var(--ds-surface, white)", tableToolbarSize, ClassName.TABLE_STICKY, "var(--ds-surface, green)", stickyRowOffsetTop, stickyRowZIndex, "var(--ds-surface, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(N40A), ")"), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, "var(--ds-surface, white)", (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling((_props$featureFlags$u = (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.useFragmentMarkBreakoutWidthStylingFix) !== null && _props$featureFlags$u !== void 0 ? _props$featureFlags$u : true), columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableToolbarColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableToolbarColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), tableBorderDeleteColor, "var(--ds-text-danger, ".concat(R500, ")"), akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, akEditorUnitZIndex * 100, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, insertColumnButtonOffset, insertColumnButtonOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles, shadowSentinelStyles);
|
|
36
|
+
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n\n // https://product-fabric.atlassian.net/browse/ED-16386\n // Fixes issue where the extra padding that is added here throws off the position\n // of the rows control dot\n &::after {\n right: 6px !important;\n }\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\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 }\n\n /* Breakout only works on top level unless wrapped in fragment mark */\n ", "\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n // Allows better positioning for the shadow sentinels - ED-16668\n position: relative;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\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 th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n td.", ", td.", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n border: 1px solid ", ";\n z-index: ", ";\n }\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: 0px;\n /* fixes gap cursor height */\n overflow: auto;\n overflow-y: hidden;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n /*\n ED-15882: When custom start numbers is enabled for lists, we have\n styles that handle this generally (in editor-common) so we can\n throw away the older table-specific styles here.\n */\n ", "\n\n ", "\n"])), ClassName.LAYOUT_BUTTON, "var(--ds-background-neutral, ".concat(N20A, ")"), "var(--ds-icon, ".concat(N300, ")"), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, "var(--ds-background-neutral-hovered, ".concat(B300, ")"), "var(--ds-icon, white)", tableSharedStyle(props), columnControlsLineMarker(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, "var(--ds-surface, white)", ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, "var(--ds-surface, white)", tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, "var(--ds-surface, white)", tableToolbarSize, ClassName.TABLE_STICKY, "var(--ds-surface, green)", stickyRowOffsetTop, stickyRowZIndex, "var(--ds-surface, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(N40A), ")"), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, "var(--ds-surface, white)", (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, breakoutWidthStyling((_props$featureFlags$u = (_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.useFragmentMarkBreakoutWidthStylingFix) !== null && _props$featureFlags$u !== void 0 ? _props$featureFlags$u : true), columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableHeaderCellBackgroundColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableHeaderCellBackgroundColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), tableBorderDeleteColor, "var(--ds-text-danger, ".concat(R500, ")"), akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, akEditorUnitZIndex * 100, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, insertColumnButtonOffset, insertColumnButtonOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags3 = props.featureFlags) !== null && _props$featureFlags3 !== void 0 && _props$featureFlags3.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles, shadowSentinelStyles);
|
|
37
37
|
};
|
|
38
38
|
export var tableFullPageEditorStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n // 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212\n margin-right: -1px;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
|
|
39
39
|
export var tableCommentEditorStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);
|
|
@@ -14,6 +14,10 @@ export var tableCellBackgroundColor = themed({
|
|
|
14
14
|
light: "var(--ds-surface, ".concat(N0, ")"),
|
|
15
15
|
dark: "var(--ds-surface, ".concat(DN30, ")")
|
|
16
16
|
});
|
|
17
|
+
export var tableHeaderCellBackgroundColor = themed({
|
|
18
|
+
light: "var(--ds-background-neutral, ".concat(akEditorTableToolbar, ")"),
|
|
19
|
+
dark: "var(--ds-background-neutral, ".concat(akEditorTableToolbarDark, ")")
|
|
20
|
+
});
|
|
17
21
|
export var tableToolbarColor = themed({
|
|
18
22
|
light: "var(--ds-background-neutral-subtle, ".concat(akEditorTableToolbar, ")"),
|
|
19
23
|
dark: "var(--ds-background-neutral-subtle, ".concat(akEditorTableToolbarDark, ")")
|
|
@@ -23,8 +27,8 @@ export var tableTextColor = themed({
|
|
|
23
27
|
dark: "var(--ds-text-subtlest, ".concat(DN400, ")")
|
|
24
28
|
});
|
|
25
29
|
export var tableBorderColor = themed({
|
|
26
|
-
light: "var(--ds-
|
|
27
|
-
dark: "var(--ds-
|
|
30
|
+
light: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"),
|
|
31
|
+
dark: "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorderDark, ")")
|
|
28
32
|
});
|
|
29
33
|
export var tableFloatingControlsColor = "var(--ds-background-neutral, ".concat(N20, ")");
|
|
30
34
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4461
|
|
@@ -4,7 +4,7 @@ import { css } from '@emotion/react';
|
|
|
4
4
|
import { tableCellBorderWidth, tableMarginTop, tableMarginTopWithControl } from '@atlaskit/editor-common/styles';
|
|
5
5
|
import { akEditorShadowZIndex, akEditorTableNumberColumnWidth, akEditorUnitZIndex } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { N40A, B300, N300, R300, N20A, N60A, N0, Y50, Y200 } from '@atlaskit/theme/colors';
|
|
7
|
-
import {
|
|
7
|
+
import { tableBorderColor, tableToolbarSelectedColor, tableHeaderCellBackgroundColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize } from './consts';
|
|
8
8
|
import { TableCssClassName as ClassName } from '../types';
|
|
9
9
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
10
10
|
var InsertLine = function InsertLine(cssString) {
|
|
@@ -20,7 +20,7 @@ var Button = function Button(cssString) {
|
|
|
20
20
|
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-radius: ", "px;\n border-width: 0px;\n display: inline-flex;\n max-width: 100%;\n text-align: center;\n margin: 0px;\n padding: 0px;\n text-decoration: none;\n transition: background 0.1s ease-out 0s,\n box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;\n outline: none !important;\n cursor: none;\n\n > .", " {\n display: inline-flex;\n max-height: 100%;\n max-width: 100%;\n }\n ", "\n"])), borderRadius(), ClassName.CONTROLS_BUTTON_ICON, cssString);
|
|
21
21
|
};
|
|
22
22
|
export var HeaderButton = function HeaderButton(props, cssString) {
|
|
23
|
-
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n ", "\n }\n\n .", "::after {\n content: ' ';\n background-color: transparent;\n left: -15px;\n top: 0;\n position: absolute;\n width: 15px;\n height: 100%;\n z-index: 1;\n }\n\n .active .", " {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n }\n"])), ClassName.CONTROLS_BUTTON,
|
|
23
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n .", " {\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n ", "\n }\n\n .", "::after {\n content: ' ';\n background-color: transparent;\n left: -15px;\n top: 0;\n position: absolute;\n width: 15px;\n height: 100%;\n z-index: 1;\n }\n\n .active .", " {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n }\n"])), ClassName.CONTROLS_BUTTON, tableHeaderCellBackgroundColor(props), tableBorderColor(props), cssString, ClassName.ROW_CONTROLS_BUTTON, ClassName.CONTROLS_BUTTON, "var(--ds-icon-inverse, ".concat(N0, ")"), "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), tableBorderSelectedColor);
|
|
24
24
|
};
|
|
25
25
|
export var HeaderButtonHover = function HeaderButtonHover() {
|
|
26
26
|
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .", ":hover {\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n cursor: pointer;\n }\n"])), ClassName.CONTROLS_BUTTON, "var(--ds-icon-inverse, ".concat(N0, ")"), "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), tableBorderSelectedColor);
|
|
@@ -44,7 +44,7 @@ export var OverflowShadow = function OverflowShadow(props) {
|
|
|
44
44
|
return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n .", ", .", " {\n display: block;\n height: calc(100% - ", "px);\n position: absolute;\n pointer-events: none;\n top: ", "px;\n z-index: ", ";\n width: 8px;\n }\n .", " {\n background: linear-gradient(\n to left,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to right,\n ", " 0px,\n transparent 1px\n );\n left: 0px;\n }\n .", "[data-number-column='true'] > :not(.", ").", " {\n left: ", "px;\n }\n .", " {\n background: linear-gradient(\n to right,\n transparent 0,\n ", " 100%\n ),\n linear-gradient(\n to left,\n ", " 0px,\n transparent 1px\n );\n left: calc(100% + 2px);\n }\n .", " {\n z-index: 0;\n }\n .", " {\n .", ", .", " {\n height: calc(100% - ", "px);\n top: ", "px;\n }\n .", " {\n border-left: 1px solid ", ";\n }\n }\n"])), ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTop, tableMarginTop, akEditorShadowZIndex, ClassName.TABLE_LEFT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY_SHADOW, ClassName.TABLE_LEFT_SHADOW, akEditorTableNumberColumnWidth - 1, ClassName.TABLE_RIGHT_SHADOW, "var(--ds-shadow-overflow-spread, ".concat(N40A, ")"), "var(--ds-shadow-overflow-perimeter, transparent)", ClassName.TABLE_COLUMN_CONTROLS_DECORATIONS, ClassName.WITH_CONTROLS, ClassName.TABLE_RIGHT_SHADOW, ClassName.TABLE_LEFT_SHADOW, tableMarginTopWithControl, tableMarginTopWithControl, ClassName.TABLE_LEFT_SHADOW, tableBorderColor(props));
|
|
45
45
|
};
|
|
46
46
|
var columnHeaderButton = function columnHeaderButton(props, cssString) {
|
|
47
|
-
return css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n\n ", "\n"])),
|
|
47
|
+
return css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n background: ", ";\n border: 1px solid ", ";\n display: block;\n box-sizing: border-box;\n padding: 0;\n\n :focus {\n outline: none;\n }\n\n ", "\n"])), tableHeaderCellBackgroundColor(props), tableBorderColor(props), cssString);
|
|
48
48
|
};
|
|
49
49
|
var columnHeaderButtonSelected = css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n z-index: ", ";\n"])), "var(--ds-text-inverse, ".concat(N0, ")"), "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), tableBorderSelectedColor, columnControlsSelectedZIndex);
|
|
50
50
|
export var columnControlsDecoration = function columnControlsDecoration(props) {
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
'fabric.editor.canNotSortTable': string;
|
|
9
|
+
'fabric.editor.cellBackground': string;
|
|
10
|
+
'fabric.editor.cellOptions': string;
|
|
11
|
+
'fabric.editor.clearCells': string;
|
|
12
|
+
'fabric.editor.collapseTable': string;
|
|
13
|
+
'fabric.editor.cornerControl': string;
|
|
14
|
+
'fabric.editor.distributeColumns': string;
|
|
15
|
+
'fabric.editor.extension.confirmDeleteLinkedModalMessagePrefix': string;
|
|
16
|
+
'fabric.editor.extension.deleteElementTitle': string;
|
|
17
|
+
'fabric.editor.extension.sourceNoTitledName': string;
|
|
18
|
+
'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': string;
|
|
19
|
+
'fabric.editor.headerColumn': string;
|
|
20
|
+
'fabric.editor.headerRow': string;
|
|
21
|
+
'fabric.editor.insertColumn': string;
|
|
22
|
+
'fabric.editor.insertRow': string;
|
|
23
|
+
'fabric.editor.mergeCells': string;
|
|
24
|
+
'fabric.editor.numberedColumn': string;
|
|
25
|
+
'fabric.editor.removeColumns': string;
|
|
26
|
+
'fabric.editor.removeRows': string;
|
|
27
|
+
'fabric.editor.rowControl': string;
|
|
28
|
+
'fabric.editor.sortColumnASC': string;
|
|
29
|
+
'fabric.editor.sortColumnDESC': string;
|
|
30
|
+
'fabric.editor.splitCell': string;
|
|
31
|
+
'fabric.editor.tableOptions': string;
|
|
32
|
+
'fabric.editor.tables.confirmDeleteLinkedModalMessage': string;
|
|
33
|
+
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': string;
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Basic colors added to prevent content overflow in table cells.
|
|
3
3
|
*/
|
|
4
4
|
export declare const tableCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-surface)">;
|
|
5
|
+
export declare const tableHeaderCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral)">;
|
|
5
6
|
export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral-subtle)">;
|
|
6
7
|
export declare const tableTextColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
|
|
7
|
-
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-
|
|
8
|
+
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtler)">;
|
|
8
9
|
export declare const tableFloatingControlsColor: "var(--ds-background-neutral)";
|
|
9
10
|
export declare const tableCellSelectedColor: "var(--ds-blanket-selected)";
|
|
10
11
|
export declare const tableToolbarSelectedColor: "var(--ds-background-selected-bold)";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
'fabric.editor.canNotSortTable': string;
|
|
9
|
+
'fabric.editor.cellBackground': string;
|
|
10
|
+
'fabric.editor.cellOptions': string;
|
|
11
|
+
'fabric.editor.clearCells': string;
|
|
12
|
+
'fabric.editor.collapseTable': string;
|
|
13
|
+
'fabric.editor.cornerControl': string;
|
|
14
|
+
'fabric.editor.distributeColumns': string;
|
|
15
|
+
'fabric.editor.extension.confirmDeleteLinkedModalMessagePrefix': string;
|
|
16
|
+
'fabric.editor.extension.deleteElementTitle': string;
|
|
17
|
+
'fabric.editor.extension.sourceNoTitledName': string;
|
|
18
|
+
'fabric.editor.floatingToolbar.confirmModalCheckboxLabel': string;
|
|
19
|
+
'fabric.editor.headerColumn': string;
|
|
20
|
+
'fabric.editor.headerRow': string;
|
|
21
|
+
'fabric.editor.insertColumn': string;
|
|
22
|
+
'fabric.editor.insertRow': string;
|
|
23
|
+
'fabric.editor.mergeCells': string;
|
|
24
|
+
'fabric.editor.numberedColumn': string;
|
|
25
|
+
'fabric.editor.removeColumns': string;
|
|
26
|
+
'fabric.editor.removeRows': string;
|
|
27
|
+
'fabric.editor.rowControl': string;
|
|
28
|
+
'fabric.editor.sortColumnASC': string;
|
|
29
|
+
'fabric.editor.sortColumnDESC': string;
|
|
30
|
+
'fabric.editor.splitCell': string;
|
|
31
|
+
'fabric.editor.tableOptions': string;
|
|
32
|
+
'fabric.editor.tables.confirmDeleteLinkedModalMessage': string;
|
|
33
|
+
'fabric.editor.tables.confirmDeleteLinkedModalOKButton': string;
|
|
34
|
+
};
|
|
35
|
+
export default _default;
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Basic colors added to prevent content overflow in table cells.
|
|
3
3
|
*/
|
|
4
4
|
export declare const tableCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-surface)">;
|
|
5
|
+
export declare const tableHeaderCellBackgroundColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral)">;
|
|
5
6
|
export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral-subtle)">;
|
|
6
7
|
export declare const tableTextColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
|
|
7
|
-
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-
|
|
8
|
+
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtler)">;
|
|
8
9
|
export declare const tableFloatingControlsColor: "var(--ds-background-neutral)";
|
|
9
10
|
export declare const tableCellSelectedColor: "var(--ds-blanket-selected)";
|
|
10
11
|
export declare const tableToolbarSelectedColor: "var(--ds-background-selected-bold)";
|
package/examples/99-testing.tsx
CHANGED
|
@@ -12,10 +12,7 @@ import {
|
|
|
12
12
|
createEditorExampleForTests,
|
|
13
13
|
mapProvidersToProps,
|
|
14
14
|
} from '@atlaskit/editor-core/example-helpers/create-editor-example-for-tests';
|
|
15
|
-
import {
|
|
16
|
-
EditorMigrationComponent as Editor,
|
|
17
|
-
ContextPanel,
|
|
18
|
-
} from '@atlaskit/editor-core/src';
|
|
15
|
+
import { Editor, ContextPanel } from '@atlaskit/editor-core/src';
|
|
19
16
|
import { SaveAndCancelButtons } from '@atlaskit/editor-core/examples/5-full-page';
|
|
20
17
|
import { TitleInput } from '@atlaskit/editor-core/example-helpers/PageElements';
|
|
21
18
|
import { getDefaultLinkPickerOptions } from '@atlaskit/editor-core/example-helpers/link-picker';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@atlaskit/adf-schema": "^25.7.0",
|
|
30
|
-
"@atlaskit/editor-common": "^74.
|
|
30
|
+
"@atlaskit/editor-common": "^74.3.0",
|
|
31
31
|
"@atlaskit/editor-palette": "1.4.2",
|
|
32
32
|
"@atlaskit/editor-plugin-analytics": "^0.0.1",
|
|
33
33
|
"@atlaskit/editor-plugin-content-insertion": "^0.0.1",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@atlaskit/icon": "^21.12.0",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
38
38
|
"@atlaskit/theme": "^12.5.0",
|
|
39
|
-
"@atlaskit/tokens": "^1.
|
|
39
|
+
"@atlaskit/tokens": "^1.5.0",
|
|
40
40
|
"@atlaskit/tooltip": "^17.8.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"@emotion/react": "^11.7.1",
|
|
@@ -63,14 +63,15 @@
|
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
65
65
|
"@atlaskit/button": "^16.7.0",
|
|
66
|
-
"@atlaskit/editor-core": "^
|
|
66
|
+
"@atlaskit/editor-core": "^185.0.0",
|
|
67
|
+
"@atlaskit/editor-plugin-decorations": "^0.1.0",
|
|
67
68
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
68
69
|
"@atlaskit/editor-plugin-grid": "^0.1.0",
|
|
69
70
|
"@atlaskit/editor-plugin-width": "^0.0.1",
|
|
70
|
-
"@atlaskit/editor-test-helpers": "^18.
|
|
71
|
+
"@atlaskit/editor-test-helpers": "^18.5.0",
|
|
71
72
|
"@atlaskit/link-provider": "^1.6.0",
|
|
72
73
|
"@atlaskit/logo": "^13.14.0",
|
|
73
|
-
"@atlaskit/media-integration-test-helpers": "^
|
|
74
|
+
"@atlaskit/media-integration-test-helpers": "^3.0.0",
|
|
74
75
|
"@atlaskit/synchrony-test-helpers": "^2.3.0",
|
|
75
76
|
"@atlaskit/util-data-test": "^17.8.0",
|
|
76
77
|
"@atlaskit/visual-regression": "*",
|
|
@@ -130,9 +130,13 @@ BrowserTestCase(
|
|
|
130
130
|
},
|
|
131
131
|
);
|
|
132
132
|
|
|
133
|
+
// FIXME: This test was automatically skipped due to failure on 28/05/2023: https://product-fabric.atlassian.net/browse/ED-18110
|
|
133
134
|
BrowserTestCase(
|
|
134
135
|
'Sticky header should correctly toggle on and off, after table is scrolled to the bottom and a column has been added',
|
|
135
|
-
{
|
|
136
|
+
{
|
|
137
|
+
// skip: ['safari']
|
|
138
|
+
skip: ['*'],
|
|
139
|
+
},
|
|
136
140
|
async (client: any, testName: string) => {
|
|
137
141
|
const page = await goToEditorTestingWDExample(
|
|
138
142
|
client,
|
|
@@ -27,6 +27,7 @@ import featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
|
27
27
|
import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
28
28
|
import { contentInsertionPlugin } from '@atlaskit/editor-plugin-content-insertion';
|
|
29
29
|
import { widthPlugin } from '@atlaskit/editor-plugin-width';
|
|
30
|
+
import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
30
31
|
|
|
31
32
|
const formatMessage: (t: { id: string }) => string = (message) =>
|
|
32
33
|
`${message.id}`;
|
|
@@ -46,6 +47,7 @@ describe('color picker', () => {
|
|
|
46
47
|
preset: new Preset<LightEditorPlugin>()
|
|
47
48
|
.add([featureFlagsPlugin, {}])
|
|
48
49
|
.add([analyticsPlugin, {}])
|
|
50
|
+
.add(decorationsPlugin)
|
|
49
51
|
.add(contentInsertionPlugin)
|
|
50
52
|
.add(widthPlugin)
|
|
51
53
|
.add(dataConsumerPlugin)
|