@atlaskit/editor-plugin-table 7.16.11 → 7.16.13
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/.eslintrc.js +3 -3
- package/CHANGELOG.md +16 -0
- package/dist/cjs/commands/misc.js +3 -3
- package/dist/cjs/nodeviews/TableCell.js +10 -10
- package/dist/cjs/nodeviews/TableContainer.js +83 -27
- package/dist/cjs/nodeviews/TableResizer.js +40 -19
- package/dist/cjs/nodeviews/TableRow.js +23 -23
- package/dist/cjs/pm-plugins/table-resizing/plugin.js +3 -3
- package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +4 -4
- package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +3 -3
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +1 -1
- package/dist/cjs/ui/FloatingDragMenu/styles.js +1 -1
- package/dist/cjs/ui/common-styles.js +13 -13
- package/dist/cjs/ui/ui-styles.js +25 -25
- package/dist/cjs/utils/guidelines.js +7 -4
- package/dist/cjs/utils/merged-cells.js +3 -3
- package/dist/cjs/utils/snapping.js +7 -8
- package/dist/es2019/commands/misc.js +3 -3
- package/dist/es2019/nodeviews/TableContainer.js +70 -9
- package/dist/es2019/nodeviews/TableResizer.js +42 -21
- package/dist/es2019/nodeviews/TableRow.js +21 -21
- package/dist/es2019/pm-plugins/table-resizing/plugin.js +3 -3
- package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +4 -4
- package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +3 -3
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +47 -47
- package/dist/es2019/ui/FloatingDragMenu/styles.js +30 -30
- package/dist/es2019/ui/common-styles.js +802 -816
- package/dist/es2019/ui/ui-styles.js +665 -678
- package/dist/es2019/utils/guidelines.js +5 -2
- package/dist/es2019/utils/merged-cells.js +3 -3
- package/dist/es2019/utils/snapping.js +5 -6
- package/dist/esm/commands/misc.js +3 -3
- package/dist/esm/nodeviews/TableCell.js +10 -10
- package/dist/esm/nodeviews/TableContainer.js +85 -29
- package/dist/esm/nodeviews/TableResizer.js +42 -21
- package/dist/esm/nodeviews/TableRow.js +23 -23
- package/dist/esm/pm-plugins/table-resizing/plugin.js +3 -3
- package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +4 -4
- package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +3 -3
- package/dist/esm/ui/FloatingContextualMenu/styles.js +1 -1
- package/dist/esm/ui/FloatingDragMenu/styles.js +1 -1
- package/dist/esm/ui/common-styles.js +13 -13
- package/dist/esm/ui/ui-styles.js +25 -25
- package/dist/esm/utils/guidelines.js +6 -3
- package/dist/esm/utils/merged-cells.js +3 -3
- package/dist/esm/utils/snapping.js +6 -7
- package/dist/types/nodeviews/TableResizer.d.ts +2 -1
- package/dist/types/pm-plugins/decorations/utils/index.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
- package/dist/types/pm-plugins/drag-and-drop/utils/getDragBehaviour.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/utils/index.d.ts +1 -1
- package/dist/types/ui/ColumnResizeWidget/index.d.ts +1 -1
- package/dist/types/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +1 -1
- package/dist/types/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +1 -1
- package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +1 -1
- package/dist/types/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types/ui/icons/DragHandleDisabledIcon.d.ts +1 -1
- package/dist/types/utils/guidelines.d.ts +2 -1
- package/dist/types/utils/snapping.d.ts +3 -2
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +2 -1
- package/dist/types-ts4.5/pm-plugins/decorations/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/getDragBehaviour.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ColumnResizeWidget/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/icons/DragHandleDisabledIcon.d.ts +1 -1
- package/dist/types-ts4.5/utils/guidelines.d.ts +2 -1
- package/dist/types-ts4.5/utils/snapping.d.ts +3 -2
- package/docs/0-intro.tsx +9 -7
- package/package.json +3 -3
- package/report.api.md +67 -66
- package/src/commands/clear.ts +36 -44
- package/src/commands/collapse.ts +8 -8
- package/src/commands/column-resize.ts +412 -452
- package/src/commands/delete.ts +14 -14
- package/src/commands/display-mode.ts +10 -11
- package/src/commands/go-to-next-cell.ts +48 -54
- package/src/commands/hover.ts +210 -227
- package/src/commands/index.ts +35 -35
- package/src/commands/insert.ts +208 -235
- package/src/commands/misc.ts +655 -748
- package/src/commands/referentiality.ts +9 -9
- package/src/commands/selection.ts +433 -563
- package/src/commands/sort.ts +68 -86
- package/src/commands/split-cell.ts +14 -14
- package/src/commands/toggle.ts +69 -67
- package/src/commands-with-analytics.ts +570 -639
- package/src/create-plugin-config.ts +13 -13
- package/src/event-handlers.ts +513 -612
- package/src/handlers.ts +120 -133
- package/src/nodeviews/ExternalDropTargets.tsx +68 -73
- package/src/nodeviews/OverflowShadowsObserver.ts +148 -157
- package/src/nodeviews/TableCell.ts +47 -54
- package/src/nodeviews/TableComponent.tsx +1018 -1112
- package/src/nodeviews/TableComponentWithSharedState.tsx +91 -94
- package/src/nodeviews/TableContainer.tsx +384 -340
- package/src/nodeviews/TableNodeViewBase.ts +19 -24
- package/src/nodeviews/TableResizer.tsx +642 -653
- package/src/nodeviews/TableRow.ts +580 -629
- package/src/nodeviews/TableStickyScrollbar.ts +173 -190
- package/src/nodeviews/__mocks__/OverflowShadowsObserver.ts +8 -8
- package/src/nodeviews/__mocks__/OverridableMock.ts +14 -15
- package/src/nodeviews/table.tsx +345 -375
- package/src/nodeviews/types.ts +21 -24
- package/src/nodeviews/update-overflow-shadows.ts +8 -14
- package/src/plugin.tsx +578 -603
- package/src/pm-plugins/analytics/actions.ts +10 -12
- package/src/pm-plugins/analytics/commands.ts +31 -37
- package/src/pm-plugins/analytics/plugin-factory.ts +4 -2
- package/src/pm-plugins/analytics/plugin-key.ts +1 -3
- package/src/pm-plugins/analytics/plugin.ts +60 -70
- package/src/pm-plugins/analytics/reducer.ts +19 -19
- package/src/pm-plugins/analytics/types.ts +10 -10
- package/src/pm-plugins/analytics/utils/moved-event.ts +38 -38
- package/src/pm-plugins/decorations/plugin.ts +58 -77
- package/src/pm-plugins/decorations/utils/column-controls.ts +59 -71
- package/src/pm-plugins/decorations/utils/column-resizing.ts +50 -57
- package/src/pm-plugins/decorations/utils/compose-decorations.ts +6 -6
- package/src/pm-plugins/decorations/utils/index.ts +3 -6
- package/src/pm-plugins/decorations/utils/types.ts +7 -12
- package/src/pm-plugins/default-table-selection.ts +3 -3
- package/src/pm-plugins/drag-and-drop/actions.ts +25 -25
- package/src/pm-plugins/drag-and-drop/commands-with-analytics.ts +158 -190
- package/src/pm-plugins/drag-and-drop/commands.ts +154 -170
- package/src/pm-plugins/drag-and-drop/consts.ts +4 -5
- package/src/pm-plugins/drag-and-drop/plugin-factory.ts +23 -20
- package/src/pm-plugins/drag-and-drop/plugin-key.ts +1 -3
- package/src/pm-plugins/drag-and-drop/plugin.ts +329 -383
- package/src/pm-plugins/drag-and-drop/reducer.ts +30 -30
- package/src/pm-plugins/drag-and-drop/types.ts +8 -8
- package/src/pm-plugins/drag-and-drop/utils/autoscrollers.ts +38 -41
- package/src/pm-plugins/drag-and-drop/utils/getDragBehaviour.ts +3 -6
- package/src/pm-plugins/drag-and-drop/utils/monitor.ts +57 -70
- package/src/pm-plugins/keymap.ts +208 -220
- package/src/pm-plugins/main.ts +348 -400
- package/src/pm-plugins/plugin-factory.ts +32 -34
- package/src/pm-plugins/safari-delete-composition-text-issue-workaround.ts +83 -97
- package/src/pm-plugins/sticky-headers/commands.ts +2 -6
- package/src/pm-plugins/sticky-headers/plugin-key.ts +1 -3
- package/src/pm-plugins/sticky-headers/plugin-state.ts +41 -44
- package/src/pm-plugins/sticky-headers/plugin.ts +4 -4
- package/src/pm-plugins/sticky-headers/types.ts +8 -8
- package/src/pm-plugins/sticky-headers/util.ts +10 -10
- package/src/pm-plugins/table-analytics.ts +70 -72
- package/src/pm-plugins/table-local-id.ts +180 -184
- package/src/pm-plugins/table-resizing/commands.ts +72 -85
- package/src/pm-plugins/table-resizing/event-handlers.ts +298 -317
- package/src/pm-plugins/table-resizing/plugin-factory.ts +10 -10
- package/src/pm-plugins/table-resizing/plugin-key.ts +1 -3
- package/src/pm-plugins/table-resizing/plugin.ts +61 -68
- package/src/pm-plugins/table-resizing/reducer.ts +30 -33
- package/src/pm-plugins/table-resizing/utils/colgroup.ts +84 -84
- package/src/pm-plugins/table-resizing/utils/column-state.ts +78 -81
- package/src/pm-plugins/table-resizing/utils/content-width.ts +94 -114
- package/src/pm-plugins/table-resizing/utils/dom.ts +93 -110
- package/src/pm-plugins/table-resizing/utils/index.ts +29 -34
- package/src/pm-plugins/table-resizing/utils/misc.ts +94 -119
- package/src/pm-plugins/table-resizing/utils/resize-column.ts +93 -106
- package/src/pm-plugins/table-resizing/utils/resize-logic.ts +240 -257
- package/src/pm-plugins/table-resizing/utils/resize-state.ts +343 -372
- package/src/pm-plugins/table-resizing/utils/scale-table.ts +202 -207
- package/src/pm-plugins/table-resizing/utils/types.ts +17 -17
- package/src/pm-plugins/table-resizing/utils/unit-to-number.ts +1 -2
- package/src/pm-plugins/table-selection-keymap.ts +25 -51
- package/src/pm-plugins/table-width.ts +191 -204
- package/src/pm-plugins/view-mode-sort/index.ts +223 -227
- package/src/pm-plugins/view-mode-sort/plugin-key.ts +3 -2
- package/src/pm-plugins/view-mode-sort/types.ts +12 -12
- package/src/pm-plugins/view-mode-sort/utils.ts +108 -117
- package/src/reducer.ts +139 -155
- package/src/toolbar.tsx +815 -905
- package/src/transforms/column-width.ts +186 -213
- package/src/transforms/delete-columns.ts +208 -222
- package/src/transforms/delete-rows.ts +117 -121
- package/src/transforms/fix-tables.ts +190 -215
- package/src/transforms/merge.ts +263 -269
- package/src/transforms/replace-table.ts +27 -43
- package/src/transforms/split.ts +65 -75
- package/src/types.ts +421 -427
- package/src/ui/ColumnResizeWidget/index.tsx +40 -47
- package/src/ui/DragHandle/HandleIconComponent.tsx +9 -13
- package/src/ui/DragHandle/index.tsx +221 -250
- package/src/ui/DragPreview/index.tsx +35 -35
- package/src/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.tsx +33 -41
- package/src/ui/FloatingContextualButton/FixedButton.tsx +154 -157
- package/src/ui/FloatingContextualButton/index.tsx +109 -115
- package/src/ui/FloatingContextualButton/styles.ts +43 -46
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +634 -694
- package/src/ui/FloatingContextualMenu/index.tsx +83 -101
- package/src/ui/FloatingContextualMenu/styles.ts +57 -65
- package/src/ui/FloatingDeleteButton/DeleteButton.tsx +37 -37
- package/src/ui/FloatingDeleteButton/getPopUpOptions.ts +47 -57
- package/src/ui/FloatingDeleteButton/index.tsx +319 -350
- package/src/ui/FloatingDragMenu/DragMenu.tsx +555 -596
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +152 -162
- package/src/ui/FloatingDragMenu/index.tsx +88 -102
- package/src/ui/FloatingDragMenu/styles.ts +51 -54
- package/src/ui/FloatingInsertButton/InsertButton.tsx +204 -217
- package/src/ui/FloatingInsertButton/getPopupOptions.ts +100 -115
- package/src/ui/FloatingInsertButton/index.tsx +248 -292
- package/src/ui/FloatingToolbarLabel/FloatingToolbarLabel.tsx +24 -29
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +308 -329
- package/src/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.tsx +85 -94
- package/src/ui/TableFloatingColumnControls/ColumnDropTargets/index.tsx +46 -46
- package/src/ui/TableFloatingColumnControls/index.tsx +116 -136
- package/src/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +79 -91
- package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +95 -102
- package/src/ui/TableFloatingControls/CornerControls/index.tsx +1 -4
- package/src/ui/TableFloatingControls/CornerControls/types.ts +8 -8
- package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +50 -50
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +111 -124
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +86 -105
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +305 -341
- package/src/ui/TableFloatingControls/RowDropTarget/index.tsx +72 -75
- package/src/ui/TableFloatingControls/index.tsx +191 -193
- package/src/ui/TableFullWidthLabel/index.tsx +20 -20
- package/src/ui/common-styles.ts +880 -912
- package/src/ui/consts.ts +29 -74
- package/src/ui/icons/AddColLeftIcon.tsx +33 -39
- package/src/ui/icons/AddColRightIcon.tsx +33 -39
- package/src/ui/icons/AddRowAboveIcon.tsx +16 -22
- package/src/ui/icons/AddRowBelowIcon.tsx +33 -39
- package/src/ui/icons/DisplayModeIcon.tsx +31 -31
- package/src/ui/icons/DragHandleDisabledIcon.tsx +19 -21
- package/src/ui/icons/DragHandleIcon.tsx +12 -12
- package/src/ui/icons/DragInMotionIcon.tsx +45 -52
- package/src/ui/icons/MergeCellsIcon.tsx +22 -28
- package/src/ui/icons/MinimisedHandle.tsx +9 -9
- package/src/ui/icons/SplitCellIcon.tsx +30 -36
- package/src/ui/ui-styles.ts +769 -798
- package/src/utils/alignment.ts +1 -1
- package/src/utils/analytics.ts +192 -208
- package/src/utils/collapse.ts +55 -64
- package/src/utils/column-controls.ts +237 -254
- package/src/utils/create.ts +30 -30
- package/src/utils/decoration.ts +482 -502
- package/src/utils/dom.ts +127 -134
- package/src/utils/drag-menu.ts +322 -373
- package/src/utils/get-allow-add-column-custom-step.ts +4 -5
- package/src/utils/guidelines.ts +16 -21
- package/src/utils/index.ts +68 -68
- package/src/utils/merged-cells.ts +245 -254
- package/src/utils/nodes.ts +91 -106
- package/src/utils/paste.ts +119 -135
- package/src/utils/row-controls.ts +199 -213
- package/src/utils/selection.ts +77 -87
- package/src/utils/snapping.ts +87 -100
- package/src/utils/table.ts +44 -44
- package/src/utils/transforms.ts +5 -5
- package/src/utils/update-plugin-state-decorations.ts +5 -9
package/src/ui/common-styles.ts
CHANGED
|
@@ -2,25 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
tableMarginTop,
|
|
7
|
-
tableSharedStyle,
|
|
8
|
-
} from '@atlaskit/editor-common/styles';
|
|
5
|
+
import { tableMarginTop, tableSharedStyle } from '@atlaskit/editor-common/styles';
|
|
9
6
|
import { SORTABLE_COLUMN_ICON_CLASSNAME } from '@atlaskit/editor-common/table';
|
|
10
7
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
11
8
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
12
9
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
akEditorSelectedNodeClassName,
|
|
11
|
+
akEditorSmallZIndex,
|
|
12
|
+
akEditorStickyHeaderZIndex,
|
|
13
|
+
akEditorTableCellOnStickyHeaderZIndex,
|
|
14
|
+
akEditorTableNumberColumnWidth,
|
|
15
|
+
akEditorTableToolbarSize,
|
|
16
|
+
akEditorUnitZIndex,
|
|
17
|
+
getSelectionStyles,
|
|
18
|
+
MAX_BROWSER_SCROLLBAR_HEIGHT,
|
|
19
|
+
relativeFontSizeToBase16,
|
|
20
|
+
SelectionStyle,
|
|
24
21
|
} from '@atlaskit/editor-shared-styles';
|
|
25
22
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
26
23
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
@@ -32,51 +29,51 @@ import { SORTING_ICON_CLASS_NAME } from '../pm-plugins/view-mode-sort/consts';
|
|
|
32
29
|
import { TableCssClassName as ClassName } from '../types';
|
|
33
30
|
|
|
34
31
|
import {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
32
|
+
columnControlsDecorationHeight,
|
|
33
|
+
resizeHandlerAreaWidth,
|
|
34
|
+
resizeHandlerZIndex,
|
|
35
|
+
resizeLineWidth,
|
|
36
|
+
rowControlsZIndex,
|
|
37
|
+
stickyHeaderBorderBottomWidth,
|
|
38
|
+
stickyRowOffsetTop,
|
|
39
|
+
tableBorderColor,
|
|
40
|
+
tableBorderDeleteColor,
|
|
41
|
+
tableBorderRadiusSize,
|
|
42
|
+
tableBorderSelectedColor,
|
|
43
|
+
tableCellBackgroundColor,
|
|
44
|
+
tableCellDeleteColor,
|
|
45
|
+
tableCellSelectedColor,
|
|
46
|
+
tableControlsSpacing,
|
|
47
|
+
tableHeaderCellBackgroundColor,
|
|
48
|
+
tableInsertColumnButtonSize,
|
|
49
|
+
tableOverflowShadowWidth,
|
|
50
|
+
tablePadding,
|
|
51
|
+
tableScrollbarOffset,
|
|
52
|
+
tableTextColor,
|
|
53
|
+
tableToolbarDeleteColor,
|
|
54
|
+
tableToolbarSelectedColor,
|
|
55
|
+
tableToolbarSize,
|
|
59
56
|
} from './consts';
|
|
60
57
|
import {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
columnControlsDecoration,
|
|
59
|
+
columnControlsLineMarker,
|
|
60
|
+
DeleteButton,
|
|
61
|
+
dragCornerControlButton,
|
|
62
|
+
dragInsertButtonWrapper,
|
|
63
|
+
floatingColumnControls,
|
|
64
|
+
HeaderButton,
|
|
65
|
+
HeaderButtonDanger,
|
|
66
|
+
HeaderButtonHover,
|
|
67
|
+
hoveredCell,
|
|
68
|
+
hoveredDeleteButton,
|
|
69
|
+
hoveredWarningCell,
|
|
70
|
+
insertColumnButtonWrapper,
|
|
71
|
+
insertLine,
|
|
72
|
+
InsertMarker,
|
|
73
|
+
insertRowButtonWrapper,
|
|
74
|
+
OverflowShadow,
|
|
75
|
+
resizeHandle,
|
|
76
|
+
rowControlsWrapperDotStyle,
|
|
80
77
|
} from './ui-styles';
|
|
81
78
|
|
|
82
79
|
const cornerControlHeight = tableToolbarSize + 1;
|
|
@@ -104,9 +101,7 @@ const rangeSelectionStyles = `
|
|
|
104
101
|
`;
|
|
105
102
|
|
|
106
103
|
const sentinelStyles = `.${ClassName.TABLE_CONTAINER} {
|
|
107
|
-
> .${ClassName.TABLE_STICKY_SENTINEL_TOP}, > .${
|
|
108
|
-
ClassName.TABLE_STICKY_SENTINEL_BOTTOM
|
|
109
|
-
} {
|
|
104
|
+
> .${ClassName.TABLE_STICKY_SENTINEL_TOP}, > .${ClassName.TABLE_STICKY_SENTINEL_BOTTOM} {
|
|
110
105
|
position: absolute;
|
|
111
106
|
width: 100%;
|
|
112
107
|
height: 1px;
|
|
@@ -119,9 +114,7 @@ const sentinelStyles = `.${ClassName.TABLE_CONTAINER} {
|
|
|
119
114
|
top: ${columnControlsDecorationHeight}px;
|
|
120
115
|
}
|
|
121
116
|
> .${ClassName.TABLE_STICKY_SENTINEL_BOTTOM} {
|
|
122
|
-
bottom: ${
|
|
123
|
-
tableScrollbarOffset + stickyRowOffsetTop + tablePadding * 2 + 23
|
|
124
|
-
}px;
|
|
117
|
+
bottom: ${tableScrollbarOffset + stickyRowOffsetTop + tablePadding * 2 + 23}px;
|
|
125
118
|
}
|
|
126
119
|
&.${ClassName.WITH_CONTROLS} {
|
|
127
120
|
> .${ClassName.TABLE_STICKY_SENTINEL_TOP} {
|
|
@@ -164,9 +157,9 @@ const stickyScrollbarContainerStyles = `.${ClassName.TABLE_CONTAINER} {
|
|
|
164
157
|
}`;
|
|
165
158
|
|
|
166
159
|
const stickyScrollbarStyles = (featureFlags?: FeatureFlags) => {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
160
|
+
return featureFlags?.stickyScrollbar
|
|
161
|
+
? `${stickyScrollbarContainerStyles} ${stickyScrollbarSentinelStyles}`
|
|
162
|
+
: '';
|
|
170
163
|
};
|
|
171
164
|
|
|
172
165
|
const shadowSentinelStyles = `
|
|
@@ -187,167 +180,161 @@ const shadowSentinelStyles = `
|
|
|
187
180
|
`;
|
|
188
181
|
|
|
189
182
|
const breakoutWidthStyling = () => {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
width: 100% !important;
|
|
204
|
-
}
|
|
205
|
-
`;
|
|
183
|
+
return css`
|
|
184
|
+
> *:not([data-mark-type='fragment'])
|
|
185
|
+
.${ClassName.NODEVIEW_WRAPPER}
|
|
186
|
+
.${ClassName.TABLE_CONTAINER} {
|
|
187
|
+
margin-left: unset !important;
|
|
188
|
+
width: 100% !important;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
> [data-mark-type='fragment'] * .${ClassName.NODEVIEW_WRAPPER} .${ClassName.TABLE_CONTAINER} {
|
|
192
|
+
margin-left: unset !important;
|
|
193
|
+
width: 100% !important;
|
|
194
|
+
}
|
|
195
|
+
`;
|
|
206
196
|
};
|
|
207
197
|
|
|
208
198
|
const viewModeSortStyles = () => {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
199
|
+
if (getBooleanFF('platform.editor.table.live-pages-sorting_4malx')) {
|
|
200
|
+
return css`
|
|
201
|
+
th {
|
|
202
|
+
.${SORTING_ICON_CLASS_NAME} {
|
|
203
|
+
+ p {
|
|
204
|
+
margin-top: 0 !important;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
&:has(.is-active) {
|
|
209
|
+
.${SORTABLE_COLUMN_ICON_CLASSNAME} {
|
|
210
|
+
opacity: 1;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.${SORTABLE_COLUMN_ICON_CLASSNAME} {
|
|
215
|
+
opacity: 0;
|
|
216
|
+
&:focus {
|
|
217
|
+
opacity: 1;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&:hover {
|
|
222
|
+
.${SORTABLE_COLUMN_ICON_CLASSNAME} {
|
|
223
|
+
opacity: 1;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
`;
|
|
228
|
+
}
|
|
239
229
|
};
|
|
240
230
|
|
|
241
231
|
const numberColumnFix = () => {
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
232
|
+
if (getBooleanFF('platform.editor.table.editor-num-col-style-changes')) {
|
|
233
|
+
return '';
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
return css`
|
|
237
|
+
> table[data-number-column='true'] {
|
|
238
|
+
width: calc(100% - 1px);
|
|
239
|
+
}
|
|
240
|
+
`;
|
|
251
241
|
};
|
|
252
242
|
|
|
253
243
|
const tableBorderStyles = () => {
|
|
254
|
-
|
|
244
|
+
return `border-color: ${tableBorderDeleteColor}`;
|
|
255
245
|
};
|
|
256
246
|
|
|
257
247
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
258
248
|
const tableStickyHeaderColumnControlsDecorationsStyle = () => {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
`;
|
|
249
|
+
return css`
|
|
250
|
+
.${ClassName.TABLE_STICKY} .${ClassName.COLUMN_CONTROLS_DECORATIONS} {
|
|
251
|
+
z-index: 0;
|
|
252
|
+
left: -1px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.${ClassName.TABLE_STICKY} .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
|
|
256
|
+
border-left: 1px solid ${tableBorderColor};
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.${ClassName.TABLE_STICKY} tr:first-of-type th.${ClassName.TABLE_HEADER_CELL} {
|
|
260
|
+
&.${ClassName.COLUMN_SELECTED}, &.${ClassName.HOVERED_COLUMN} {
|
|
261
|
+
.${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
|
|
262
|
+
left: 0;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
`;
|
|
280
267
|
};
|
|
281
268
|
|
|
282
269
|
const tableStickyHeaderFirefoxFixStyle = () => {
|
|
283
|
-
|
|
270
|
+
/*
|
|
284
271
|
This is MAGIC!
|
|
285
272
|
This fixes a bug which occurs in firefox when the first row becomes sticky.
|
|
286
273
|
see https://product-fabric.atlassian.net/browse/ED-19177
|
|
287
274
|
*/
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
275
|
+
if (browser.gecko) {
|
|
276
|
+
return css`
|
|
277
|
+
.${ClassName.TABLE_STICKY} > tbody::before {
|
|
278
|
+
content: '';
|
|
279
|
+
}
|
|
280
|
+
`;
|
|
281
|
+
}
|
|
295
282
|
};
|
|
296
283
|
|
|
297
284
|
// re-exporting these styles to use in Gemini test when table node view is rendered outside of PM
|
|
298
285
|
export const baseTableStyles = (props: { featureFlags?: FeatureFlags }) => css`
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
286
|
+
${tableSharedStyle()};
|
|
287
|
+
${columnControlsLineMarker()};
|
|
288
|
+
${hoveredDeleteButton()};
|
|
289
|
+
${hoveredCell()};
|
|
290
|
+
${hoveredWarningCell};
|
|
291
|
+
${props.featureFlags?.tableDragAndDrop && insertLine()};
|
|
292
|
+
${resizeHandle(props.featureFlags?.tableDragAndDrop)};
|
|
293
|
+
${rangeSelectionStyles};
|
|
294
|
+
${viewModeSortStyles()};
|
|
295
|
+
|
|
296
|
+
.${ClassName.LAST_ITEM_IN_CELL} {
|
|
297
|
+
margin-bottom: 0;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.${ClassName.TABLE_NODE_WRAPPER} {
|
|
301
|
+
td.${ClassName.TABLE_CELL}, th.${ClassName.TABLE_HEADER_CELL} {
|
|
302
|
+
position: relative;
|
|
303
|
+
overflow: visible;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
td.${ClassName.TABLE_CELL} {
|
|
307
|
+
background-color: ${tableCellBackgroundColor};
|
|
308
|
+
|
|
309
|
+
// ED-15246: Trello card is visible through a border of a table border
|
|
310
|
+
// This fixes a border issue caused by relative positioned table cells
|
|
311
|
+
&::after {
|
|
312
|
+
height: 100%;
|
|
313
|
+
content: '';
|
|
314
|
+
border-left: 1px solid ${tableBorderColor};
|
|
315
|
+
border-bottom: 1px solid ${tableBorderColor};
|
|
316
|
+
position: absolute;
|
|
317
|
+
right: 0px;
|
|
318
|
+
top: 0px;
|
|
319
|
+
bottom: 0;
|
|
320
|
+
width: 100%;
|
|
321
|
+
display: inline-block;
|
|
322
|
+
pointer-events: none;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.${ClassName.CONTROLS_FLOATING_BUTTON_COLUMN} {
|
|
328
|
+
${insertColumnButtonWrapper()}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.${ClassName.CONTROLS_FLOATING_BUTTON_ROW} {
|
|
332
|
+
${insertRowButtonWrapper()}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
${dragInsertButtonWrapper()}
|
|
336
|
+
|
|
337
|
+
${dragCornerControlButton()}
|
|
351
338
|
|
|
352
339
|
/* Delete button */
|
|
353
340
|
${DeleteButton()}
|
|
@@ -355,317 +342,311 @@ export const baseTableStyles = (props: { featureFlags?: FeatureFlags }) => css`
|
|
|
355
342
|
|
|
356
343
|
/* sticky styles */
|
|
357
344
|
.${ClassName.TABLE_STICKY} .${ClassName.NUMBERED_COLUMN} .${ClassName.NUMBERED_COLUMN_BUTTON}:first-of-type {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
position: fixed !important;
|
|
362
|
-
z-index: ${akEditorStickyHeaderZIndex} !important;
|
|
363
|
-
box-shadow: 0px -${stickyRowOffsetTop}px ${token('elevation.surface', 'white')};
|
|
364
|
-
border-right: 0 none;
|
|
365
|
-
/* top set by NumberColumn component */
|
|
366
|
-
}
|
|
345
|
+
margin-top: ${stickyRowOffsetTop + 2}px;
|
|
346
|
+
width: ${akEditorTableNumberColumnWidth}px;
|
|
367
347
|
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
348
|
+
position: fixed !important;
|
|
349
|
+
z-index: ${akEditorStickyHeaderZIndex} !important;
|
|
350
|
+
box-shadow: 0px -${stickyRowOffsetTop}px ${token('elevation.surface', 'white')};
|
|
351
|
+
border-right: 0 none;
|
|
352
|
+
/* top set by NumberColumn component */
|
|
353
|
+
}
|
|
373
354
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
355
|
+
.${ClassName.TABLE_STICKY} .${ClassName.CORNER_CONTROLS}.sticky {
|
|
356
|
+
position: fixed !important;
|
|
357
|
+
/* needs to be above row controls */
|
|
358
|
+
z-index: ${akEditorSmallZIndex} !important;
|
|
359
|
+
background: ${token('elevation.surface', 'white')};
|
|
377
360
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
361
|
+
width: ${tableToolbarSize}px;
|
|
362
|
+
height: ${tableToolbarSize}px;
|
|
363
|
+
}
|
|
381
364
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
365
|
+
.${ClassName.CORNER_CONTROLS}.sticky .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
366
|
+
border-bottom: 0px none;
|
|
367
|
+
border-right: 0px none;
|
|
385
368
|
|
|
386
|
-
|
|
369
|
+
height: ${tableToolbarSize}px;
|
|
370
|
+
width: ${tableToolbarSize}px;
|
|
371
|
+
}
|
|
387
372
|
|
|
388
|
-
|
|
373
|
+
${tableStickyHeaderColumnControlsDecorationsStyle()}
|
|
374
|
+
|
|
375
|
+
${tableStickyHeaderFirefoxFixStyle()}
|
|
389
376
|
|
|
390
377
|
.${ClassName.TABLE_STICKY}
|
|
391
378
|
.${ClassName.ROW_CONTROLS}
|
|
392
379
|
.${ClassName.ROW_CONTROLS_BUTTON_WRAP}.sticky {
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
${token('elevation.surface', 'white')};
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
${sentinelStyles}
|
|
512
|
-
${OverflowShadow(props.featureFlags?.tableDragAndDrop)}
|
|
380
|
+
position: fixed !important;
|
|
381
|
+
z-index: ${akEditorStickyHeaderZIndex} !important;
|
|
382
|
+
display: flex;
|
|
383
|
+
border-left: ${tableToolbarSize}px solid ${token('elevation.surface', 'white')};
|
|
384
|
+
margin-left: -${tableToolbarSize}px;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.${ClassName.TABLE_STICKY} col:first-of-type {
|
|
388
|
+
/* moving rows out of a table layout does weird things in Chrome */
|
|
389
|
+
border-right: 1px solid ${token('elevation.surface', 'green')};
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
tr.sticky {
|
|
393
|
+
padding-top: ${stickyRowOffsetTop}px;
|
|
394
|
+
position: fixed;
|
|
395
|
+
display: grid;
|
|
396
|
+
|
|
397
|
+
/* to keep it above cell selection but below date and other nodes popups that are inside sticky header */
|
|
398
|
+
z-index: ${akEditorTableCellOnStickyHeaderZIndex - 5};
|
|
399
|
+
|
|
400
|
+
overflow-y: visible;
|
|
401
|
+
overflow-x: hidden;
|
|
402
|
+
|
|
403
|
+
grid-auto-flow: column;
|
|
404
|
+
|
|
405
|
+
/* background for where controls apply */
|
|
406
|
+
background: ${token('elevation.surface', 'white')};
|
|
407
|
+
box-sizing: content-box;
|
|
408
|
+
|
|
409
|
+
margin-top: 2px;
|
|
410
|
+
|
|
411
|
+
box-shadow: 0 6px 4px -4px ${token('elevation.shadow.overflow.perimeter', N40A)};
|
|
412
|
+
margin-left: -1px;
|
|
413
|
+
|
|
414
|
+
&.no-pointer-events {
|
|
415
|
+
pointer-events: none;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.${ClassName.TABLE_STICKY} .${ClassName.TABLE_STICKY_SHADOW} {
|
|
420
|
+
left: unset;
|
|
421
|
+
position: fixed;
|
|
422
|
+
/* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */
|
|
423
|
+
z-index: ${akEditorTableCellOnStickyHeaderZIndex};
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.${ClassName.WITH_CONTROLS}.${ClassName.TABLE_STICKY} .${ClassName.TABLE_STICKY_SHADOW} {
|
|
427
|
+
padding-bottom: ${tableToolbarSize}px;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
tr.sticky th {
|
|
431
|
+
border-bottom: ${stickyHeaderBorderBottomWidth}px solid ${tableBorderColor};
|
|
432
|
+
margin-right: -1px;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.${ClassName.TABLE_STICKY} tr.sticky > th:last-child {
|
|
436
|
+
border-right-width: 1px;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/* add left edge for first cell */
|
|
440
|
+
.${ClassName.TABLE_STICKY} tr.sticky > th:first-of-type {
|
|
441
|
+
margin-left: 0px;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/* add a little bit so the scroll lines up with the table */
|
|
445
|
+
.${ClassName.TABLE_STICKY} tr.sticky::after {
|
|
446
|
+
content: ' ';
|
|
447
|
+
width: ${insertColumnButtonOffset + 1}px;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/* To fix jumpiness caused in Chrome Browsers for sticky headers */
|
|
451
|
+
.${ClassName.TABLE_STICKY} .sticky + tr {
|
|
452
|
+
min-height: 0px;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/* move resize line a little in sticky bar */
|
|
456
|
+
.${ClassName.TABLE_CONTAINER}.${ClassName.TABLE_STICKY} {
|
|
457
|
+
tr.sticky td.${ClassName.WITH_RESIZE_LINE}, tr.sticky th.${ClassName.WITH_RESIZE_LINE} {
|
|
458
|
+
.${ClassName.RESIZE_HANDLE_DECORATION}::after {
|
|
459
|
+
right: ${(resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1}px;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
/* when selected put it back to normal -- :not selector would be nicer */
|
|
464
|
+
tr.sticky
|
|
465
|
+
td.${ClassName.WITH_RESIZE_LINE}.${ClassName.SELECTED_CELL},
|
|
466
|
+
tr.sticky
|
|
467
|
+
th.${ClassName.WITH_RESIZE_LINE}.${ClassName.SELECTED_CELL} {
|
|
468
|
+
.${ClassName.RESIZE_HANDLE_DECORATION}::after {
|
|
469
|
+
right: ${(resizeHandlerAreaWidth - resizeLineWidth) / 2}px;
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
tr.sticky .${ClassName.HOVERED_CELL}, tr.sticky .${ClassName.SELECTED_CELL} {
|
|
475
|
+
z-index: 1;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.${ClassName.WITH_CONTROLS} tr.sticky {
|
|
479
|
+
padding-top: ${tableControlsSpacing}px;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.${ClassName.WITH_CONTROLS}.${ClassName.TABLE_STICKY}
|
|
483
|
+
.${ClassName.NUMBERED_COLUMN}
|
|
484
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}:first-of-type {
|
|
485
|
+
margin-top: ${tableControlsSpacing + 2}px;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.${ClassName.CORNER_CONTROLS}.sticky {
|
|
489
|
+
border-top: ${tableControlsSpacing - tableToolbarSize + 2}px solid
|
|
490
|
+
${token('elevation.surface', 'white')};
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
${sentinelStyles}
|
|
494
|
+
${OverflowShadow(props.featureFlags?.tableDragAndDrop)}
|
|
513
495
|
${stickyScrollbarStyles(props.featureFlags)}
|
|
514
496
|
|
|
515
497
|
.${ClassName.TABLE_STICKY} .${ClassName.TABLE_STICKY_SHADOW} {
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
/**
|
|
498
|
+
height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.less-padding {
|
|
502
|
+
padding: 0 ${tablePadding}px;
|
|
503
|
+
|
|
504
|
+
.${ClassName.DRAG_ROW_CONTROLS_WRAPPER}, .${ClassName.ROW_CONTROLS_WRAPPER} {
|
|
505
|
+
padding: 0 ${tablePadding}px;
|
|
506
|
+
|
|
507
|
+
// https://product-fabric.atlassian.net/browse/ED-16386
|
|
508
|
+
// Fixes issue where the extra padding that is added here throws off the position
|
|
509
|
+
// of the rows control dot
|
|
510
|
+
&::after {
|
|
511
|
+
right: 6px !important;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.${ClassName.DRAG_COLUMN_CONTROLS_WRAPPER} {
|
|
516
|
+
padding: 0 ${tablePadding}px;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
&.${ClassName.TABLE_CONTAINER}[data-number-column='true'] {
|
|
520
|
+
padding-left: ${akEditorTableNumberColumnWidth + tablePadding - 1}px;
|
|
521
|
+
}
|
|
522
|
+
.${ClassName.TABLE_LEFT_SHADOW}, .${ClassName.TABLE_RIGHT_SHADOW} {
|
|
523
|
+
width: ${tableOverflowShadowWidth}px;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.${ClassName.TABLE_LEFT_SHADOW} {
|
|
527
|
+
left: 6px;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.${ClassName.TABLE_RIGHT_SHADOW} {
|
|
531
|
+
left: calc(100% - 6px);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
> .${ClassName.NODEVIEW_WRAPPER} {
|
|
536
|
+
/**
|
|
556
537
|
* Prevent margins collapsing, aids with placing the gap-cursor correctly
|
|
557
538
|
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing
|
|
558
539
|
*
|
|
559
540
|
* TODO: Enable this, many tests will fail!
|
|
560
541
|
* border-top: 1px solid transparent;
|
|
561
542
|
*/
|
|
562
|
-
|
|
543
|
+
}
|
|
563
544
|
|
|
564
|
-
|
|
565
|
-
|
|
545
|
+
/* Breakout only works on top level unless wrapped in fragment mark */
|
|
546
|
+
${breakoutWidthStyling()}
|
|
566
547
|
|
|
567
|
-
|
|
568
|
-
|
|
548
|
+
${columnControlsDecoration()};
|
|
549
|
+
${rowControlsWrapperDotStyle()};
|
|
569
550
|
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
551
|
+
/* Corner controls */
|
|
552
|
+
.${ClassName.CORNER_CONTROLS} {
|
|
553
|
+
width: ${tableToolbarSize + 1}px;
|
|
554
|
+
height: ${cornerControlHeight}px;
|
|
555
|
+
display: none;
|
|
575
556
|
|
|
576
|
-
|
|
577
|
-
|
|
557
|
+
.${ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER} {
|
|
558
|
+
position: relative;
|
|
578
559
|
|
|
579
|
-
|
|
580
|
-
|
|
560
|
+
${InsertMarker(
|
|
561
|
+
`
|
|
581
562
|
left: -11px;
|
|
582
563
|
top: 9px;
|
|
583
564
|
`,
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
565
|
+
)};
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
.${ClassName.CORNER_CONTROLS}.sticky {
|
|
570
|
+
.${ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER} {
|
|
571
|
+
/* sticky row insert dot overlaps other row insert and messes things up */
|
|
572
|
+
display: none !important;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
577
|
+
position: absolute;
|
|
578
|
+
top: 0;
|
|
579
|
+
width: ${tableToolbarSize + 1}px;
|
|
580
|
+
height: ${tableToolbarSize + 1}px;
|
|
581
|
+
border: 1px solid ${tableBorderColor};
|
|
582
|
+
border-radius: 0;
|
|
583
|
+
border-top-left-radius: ${tableBorderRadiusSize}px;
|
|
584
|
+
background: ${tableHeaderCellBackgroundColor};
|
|
585
|
+
box-sizing: border-box;
|
|
586
|
+
padding: 0;
|
|
587
|
+
:focus {
|
|
588
|
+
outline: none;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
.active .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
592
|
+
border-color: ${tableBorderSelectedColor};
|
|
593
|
+
background: ${tableToolbarSelectedColor};
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.${ClassName.TABLE_CONTAINER}[data-number-column='true'] {
|
|
597
|
+
.${ClassName.CORNER_CONTROLS}, .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
598
|
+
width: ${akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1}px;
|
|
599
|
+
}
|
|
600
|
+
.${ClassName.ROW_CONTROLS} .${ClassName.CONTROLS_BUTTON} {
|
|
601
|
+
border-right-width: 0;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
:not(.${ClassName.IS_RESIZING}) .${ClassName.CONTROLS_CORNER_BUTTON}:hover {
|
|
606
|
+
border-color: ${tableBorderSelectedColor};
|
|
607
|
+
background: ${tableToolbarSelectedColor};
|
|
608
|
+
cursor: pointer;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
:not(.${ClassName.IS_RESIZING})
|
|
612
|
+
.${ClassName.CONTROLS_CORNER_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
613
|
+
border-color: ${tableBorderDeleteColor};
|
|
614
|
+
background: ${tableToolbarDeleteColor};
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/* Row controls */
|
|
618
|
+
.${ClassName.ROW_CONTROLS} {
|
|
619
|
+
width: ${tableToolbarSize}px;
|
|
620
|
+
box-sizing: border-box;
|
|
621
|
+
display: none;
|
|
622
|
+
position: relative;
|
|
623
|
+
|
|
624
|
+
${InsertMarker(
|
|
625
|
+
`
|
|
645
626
|
bottom: -1px;
|
|
646
627
|
left: -11px;
|
|
647
628
|
`,
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
629
|
+
)};
|
|
630
|
+
|
|
631
|
+
.${ClassName.ROW_CONTROLS_INNER} {
|
|
632
|
+
display: flex;
|
|
633
|
+
flex-direction: column;
|
|
634
|
+
}
|
|
635
|
+
.${ClassName.ROW_CONTROLS_BUTTON_WRAP}:last-child > button {
|
|
636
|
+
border-bottom-left-radius: ${tableBorderRadiusSize}px;
|
|
637
|
+
}
|
|
638
|
+
.${ClassName.ROW_CONTROLS_BUTTON_WRAP} {
|
|
639
|
+
position: relative;
|
|
640
|
+
margin-top: -1px;
|
|
641
|
+
}
|
|
642
|
+
.${ClassName.ROW_CONTROLS_BUTTON_WRAP}:hover,
|
|
643
|
+
.${ClassName.ROW_CONTROLS_BUTTON_WRAP}.active,
|
|
644
|
+
.${ClassName.CONTROLS_BUTTON}:hover {
|
|
645
|
+
z-index: ${akEditorUnitZIndex};
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
${HeaderButton(
|
|
649
|
+
`
|
|
669
650
|
border-bottom: 1px solid ${tableBorderColor};
|
|
670
651
|
border-right: 0px;
|
|
671
652
|
border-radius: 0;
|
|
@@ -683,450 +664,437 @@ export const baseTableStyles = (props: { featureFlags?: FeatureFlags }) => css`
|
|
|
683
664
|
top: 0;
|
|
684
665
|
}
|
|
685
666
|
`,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
position: relative;
|
|
966
|
-
|
|
967
|
-
> tbody > tr {
|
|
968
|
-
white-space: pre-wrap;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
.${ClassName.COLUMN_CONTROLS_DECORATIONS} + * {
|
|
972
|
-
margin-top: 0;
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
/*
|
|
667
|
+
)}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
.${ClassName.DRAG_ROW_CONTROLS} {
|
|
671
|
+
display: grid;
|
|
672
|
+
align-items: center;
|
|
673
|
+
position: absolute;
|
|
674
|
+
z-index: ${akEditorUnitZIndex};
|
|
675
|
+
|
|
676
|
+
.${ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER} {
|
|
677
|
+
position: absolute;
|
|
678
|
+
align-self: end;
|
|
679
|
+
height: 100%;
|
|
680
|
+
width: 18px;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
.${ClassName.DRAG_ROW_FLOATING_INSERT_DOT} {
|
|
684
|
+
position: absolute;
|
|
685
|
+
bottom: -3px;
|
|
686
|
+
left: 2px;
|
|
687
|
+
background-color: ${token('color.background.accent.gray.subtler', '#C1C7D0')};
|
|
688
|
+
height: 4px;
|
|
689
|
+
width: 4px;
|
|
690
|
+
border-radius: 50%;
|
|
691
|
+
pointer-events: none;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
.${ClassName.DRAG_COLUMN_CONTROLS} {
|
|
696
|
+
.${ClassName.DRAG_COLUMN_CONTROLS_INNER} {
|
|
697
|
+
height: 24px;
|
|
698
|
+
position: absolute;
|
|
699
|
+
top: ${token('space.negative.150', '-12px')};
|
|
700
|
+
z-index: ${resizeHandlerZIndex};
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.${ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER} {
|
|
704
|
+
position: absolute;
|
|
705
|
+
height: 24px;
|
|
706
|
+
width: 100%;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
.${ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT} {
|
|
710
|
+
background-color: ${token('color.background.accent.gray.subtler', '#C1C7D0')};
|
|
711
|
+
height: 4px;
|
|
712
|
+
width: 4px;
|
|
713
|
+
border-radius: 50%;
|
|
714
|
+
position: absolute;
|
|
715
|
+
right: -2px;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.${ClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE} {
|
|
720
|
+
background: none;
|
|
721
|
+
border: none;
|
|
722
|
+
outline: none;
|
|
723
|
+
position: absolute;
|
|
724
|
+
margin: 0;
|
|
725
|
+
padding: 0;
|
|
726
|
+
display: flex;
|
|
727
|
+
align-items: center;
|
|
728
|
+
cursor: pointer;
|
|
729
|
+
|
|
730
|
+
:focus {
|
|
731
|
+
outline: none;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
.${ClassName.DRAG_HANDLE_BUTTON_CONTAINER} {
|
|
736
|
+
cursor: grab;
|
|
737
|
+
pointer-events: auto;
|
|
738
|
+
|
|
739
|
+
line-height: 0;
|
|
740
|
+
padding: 0;
|
|
741
|
+
border-radius: 6px;
|
|
742
|
+
width: max-content;
|
|
743
|
+
border: 2px solid ${token('elevation.surface', N0)};
|
|
744
|
+
|
|
745
|
+
display: flex;
|
|
746
|
+
justify-content: center;
|
|
747
|
+
align-items: center;
|
|
748
|
+
background: transparent;
|
|
749
|
+
outline: none;
|
|
750
|
+
|
|
751
|
+
&.placeholder {
|
|
752
|
+
background-color: transparent;
|
|
753
|
+
border: 2px solid transparent;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
&.${ClassName.DRAG_HANDLE_DISABLED} {
|
|
757
|
+
cursor: pointer;
|
|
758
|
+
& svg {
|
|
759
|
+
& > rect.${ClassName.DRAG_HANDLE_MINIMISED} {
|
|
760
|
+
fill: ${token('color.background.accent.gray.subtler', '#DCDFE4')};
|
|
761
|
+
}
|
|
762
|
+
& > rect {
|
|
763
|
+
fill: ${token('color.background.accent.gray.subtlest', '#F4F5F7')};
|
|
764
|
+
}
|
|
765
|
+
& > g > rect {
|
|
766
|
+
fill: ${token('color.icon.disabled', '#BFDBF847')};
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
&:not(.${ClassName.DRAG_HANDLE_DISABLED}) {
|
|
772
|
+
& svg {
|
|
773
|
+
rect {
|
|
774
|
+
fill: ${token('color.background.accent.gray.subtler', '#DCDFE4')};
|
|
775
|
+
}
|
|
776
|
+
g {
|
|
777
|
+
fill: ${token('color.icon.subtle', '#626f86')};
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
&:hover {
|
|
782
|
+
svg {
|
|
783
|
+
rect {
|
|
784
|
+
fill: ${token('color.background.accent.blue.subtle', '#579DFF')};
|
|
785
|
+
}
|
|
786
|
+
g {
|
|
787
|
+
fill: ${token('color.icon.inverse', '#FFF')};
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
&:active {
|
|
793
|
+
cursor: grabbing;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
&.selected {
|
|
797
|
+
:focus {
|
|
798
|
+
outline: 2px solid ${token('color.border.focused', '#2684FF')};
|
|
799
|
+
outline-offset: 1px;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
&:active {
|
|
803
|
+
outline: none;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
svg {
|
|
807
|
+
rect {
|
|
808
|
+
fill: ${token('color.background.accent.blue.subtle', '#579dff')};
|
|
809
|
+
}
|
|
810
|
+
g {
|
|
811
|
+
fill: ${token('color.icon.inverse', '#fff')};
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
&.danger {
|
|
817
|
+
svg {
|
|
818
|
+
rect {
|
|
819
|
+
fill: ${token('color.background.accent.red.subtler.pressed', '#F87462')};
|
|
820
|
+
}
|
|
821
|
+
g {
|
|
822
|
+
fill: ${token('color.border.inverse', '#FFF')};
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
${floatingColumnControls()}
|
|
830
|
+
|
|
831
|
+
:not(.${ClassName.IS_RESIZING}) .${ClassName.ROW_CONTROLS} {
|
|
832
|
+
${HeaderButtonHover()}
|
|
833
|
+
${HeaderButtonDanger()}
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/* Numbered column */
|
|
837
|
+
.${ClassName.NUMBERED_COLUMN} {
|
|
838
|
+
position: relative;
|
|
839
|
+
float: right;
|
|
840
|
+
margin-left: ${akEditorTableToolbarSize}px;
|
|
841
|
+
top: ${props.featureFlags?.tableDragAndDrop ? 0 : akEditorTableToolbarSize}px;
|
|
842
|
+
width: ${akEditorTableNumberColumnWidth + 1}px;
|
|
843
|
+
box-sizing: border-box;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON} {
|
|
847
|
+
border: 1px solid ${tableBorderColor};
|
|
848
|
+
box-sizing: border-box;
|
|
849
|
+
margin-top: -1px;
|
|
850
|
+
padding-bottom: 2px;
|
|
851
|
+
padding: 10px 2px;
|
|
852
|
+
text-align: center;
|
|
853
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
854
|
+
background-color: ${tableHeaderCellBackgroundColor};
|
|
855
|
+
color: ${tableTextColor};
|
|
856
|
+
border-color: ${tableBorderColor};
|
|
857
|
+
|
|
858
|
+
:first-child:not(style),
|
|
859
|
+
style:first-child + * {
|
|
860
|
+
margin-top: 0;
|
|
861
|
+
}
|
|
862
|
+
:last-child {
|
|
863
|
+
border-bottom: 1px solid ${tableBorderColor};
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
// add a background above the first numbered column cell when sticky header is engaged
|
|
868
|
+
// which hides the table when scrolling
|
|
869
|
+
.${ClassName.TABLE_STICKY} {
|
|
870
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON_DISABLED}:first-of-type::after {
|
|
871
|
+
content: '';
|
|
872
|
+
display: block;
|
|
873
|
+
height: 33px;
|
|
874
|
+
width: 100%;
|
|
875
|
+
background-color: ${token('elevation.surface', 'white')};
|
|
876
|
+
position: absolute;
|
|
877
|
+
|
|
878
|
+
// the extra pixel is accounting for borders
|
|
879
|
+
top: -34px;
|
|
880
|
+
left: -1px;
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
.${ClassName.WITH_CONTROLS} {
|
|
885
|
+
.${ClassName.CORNER_CONTROLS}, .${ClassName.ROW_CONTROLS} {
|
|
886
|
+
display: block;
|
|
887
|
+
}
|
|
888
|
+
.${ClassName.NUMBERED_COLUMN} {
|
|
889
|
+
padding-left: 0px;
|
|
890
|
+
|
|
891
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON} {
|
|
892
|
+
border-left: 0 none;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}.active {
|
|
896
|
+
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
897
|
+
border-color: ${tableBorderSelectedColor};
|
|
898
|
+
background-color: ${tableToolbarSelectedColor};
|
|
899
|
+
position: relative;
|
|
900
|
+
z-index: ${akEditorUnitZIndex};
|
|
901
|
+
color: ${token('color.text.selected', N0)};
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
:not(.${ClassName.IS_RESIZING}) .${ClassName.WITH_CONTROLS} {
|
|
906
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}:not(.${ClassName.NUMBERED_COLUMN_BUTTON_DISABLED}) {
|
|
907
|
+
cursor: pointer;
|
|
908
|
+
}
|
|
909
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}:not(.${ClassName.NUMBERED_COLUMN_BUTTON_DISABLED}):hover {
|
|
910
|
+
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
911
|
+
border-color: ${tableBorderSelectedColor};
|
|
912
|
+
background-color: ${tableToolbarSelectedColor};
|
|
913
|
+
position: relative;
|
|
914
|
+
z-index: ${akEditorUnitZIndex};
|
|
915
|
+
color: ${token('color.text.selected', N0)};
|
|
916
|
+
}
|
|
917
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
918
|
+
background-color: ${tableToolbarDeleteColor};
|
|
919
|
+
border: 1px solid ${tableBorderDeleteColor};
|
|
920
|
+
border-left: 0;
|
|
921
|
+
color: ${token('color.text.danger', R500)};
|
|
922
|
+
position: relative;
|
|
923
|
+
z-index: ${akEditorUnitZIndex};
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
/* Table */
|
|
928
|
+
.${ClassName.TABLE_NODE_WRAPPER} > table {
|
|
929
|
+
table-layout: fixed;
|
|
930
|
+
white-space: normal;
|
|
931
|
+
border-top: none;
|
|
932
|
+
// 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212
|
|
933
|
+
margin-right: -1px;
|
|
934
|
+
// Allows better positioning for the shadow sentinels - ED-16668
|
|
935
|
+
position: relative;
|
|
936
|
+
|
|
937
|
+
> tbody > tr {
|
|
938
|
+
white-space: pre-wrap;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
.${ClassName.COLUMN_CONTROLS_DECORATIONS} + * {
|
|
942
|
+
margin-top: 0;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
/*
|
|
976
946
|
* Headings have a top margin by default, but we don't want this on the
|
|
977
947
|
* first heading within table header cells.
|
|
978
948
|
*
|
|
979
949
|
* This specifically sets margin-top for the first heading within a header
|
|
980
950
|
* cell when center/right aligned.
|
|
981
951
|
*/
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
// ED-15246: Trello card is visible through a border of a table border
|
|
1022
|
-
/* ED-19064: To fix when enable header column in the table,
|
|
952
|
+
th.${ClassName.TABLE_HEADER_CELL} > .fabric-editor-block-mark {
|
|
953
|
+
> h1:first-of-type,
|
|
954
|
+
> h2:first-of-type,
|
|
955
|
+
> h3:first-of-type,
|
|
956
|
+
> h4:first-of-type,
|
|
957
|
+
> h5:first-of-type,
|
|
958
|
+
> h6:first-of-type {
|
|
959
|
+
margin-top: 0;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
.${ClassName.SELECTED_CELL}, .${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
964
|
+
position: relative;
|
|
965
|
+
}
|
|
966
|
+
/* Give selected cells a blue overlay */
|
|
967
|
+
.${ClassName.SELECTED_CELL}::after, .${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
968
|
+
z-index: ${akEditorSmallZIndex};
|
|
969
|
+
position: absolute;
|
|
970
|
+
content: '';
|
|
971
|
+
left: 0;
|
|
972
|
+
right: 0;
|
|
973
|
+
top: 0;
|
|
974
|
+
bottom: 0;
|
|
975
|
+
width: 100%;
|
|
976
|
+
pointer-events: none;
|
|
977
|
+
}
|
|
978
|
+
.${ClassName.SELECTED_CELL} {
|
|
979
|
+
border: 1px solid ${tableBorderSelectedColor};
|
|
980
|
+
}
|
|
981
|
+
.${ClassName.SELECTED_CELL}::after {
|
|
982
|
+
background: ${tableCellSelectedColor};
|
|
983
|
+
z-index: ${akEditorSmallZIndex};
|
|
984
|
+
}
|
|
985
|
+
th.${ClassName.HOVERED_CELL_IN_DANGER}::after, td.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
986
|
+
background: ${tableCellDeleteColor};
|
|
987
|
+
z-index: ${akEditorUnitZIndex * 100};
|
|
988
|
+
}
|
|
989
|
+
// ED-15246: Trello card is visible through a border of a table border
|
|
990
|
+
/* ED-19064: To fix when enable header column in the table,
|
|
1023
991
|
and selection the header column, the right border is not tableBorderSelectedColor
|
|
1024
992
|
when deleting the header column, the right border is not tableToolbarDeleteColor */
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
993
|
+
td.${ClassName.HOVERED_CELL},
|
|
994
|
+
td.${ClassName.SELECTED_CELL},
|
|
995
|
+
th.${ClassName.TABLE_HEADER_CELL}.${ClassName.SELECTED_CELL},
|
|
996
|
+
th.${ClassName.TABLE_HEADER_CELL}.${ClassName.HOVERED_CELL} {
|
|
997
|
+
&::after {
|
|
998
|
+
height: 100%;
|
|
999
|
+
width: 100%;
|
|
1000
|
+
border: 1px solid ${tableBorderSelectedColor};
|
|
1001
|
+
content: '';
|
|
1002
|
+
position: absolute;
|
|
1003
|
+
left: -1px;
|
|
1004
|
+
top: -1px;
|
|
1005
|
+
bottom: 0;
|
|
1006
|
+
z-index: ${akEditorSmallZIndex};
|
|
1007
|
+
display: inline-block;
|
|
1008
|
+
pointer-events: none;
|
|
1009
|
+
}
|
|
1010
|
+
&.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
1011
|
+
${tableBorderStyles()};
|
|
1012
|
+
z-index: ${akEditorUnitZIndex * 100};
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
&.${ClassName.HOVERED_NO_HIGHLIGHT}.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
1016
|
+
${tableBorderStyles()};
|
|
1017
|
+
z-index: ${akEditorUnitZIndex * 100};
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
// override for DnD controls
|
|
1023
|
+
.${ClassName.DRAG_ROW_CONTROLS_WRAPPER} {
|
|
1024
|
+
position: absolute;
|
|
1025
|
+
margin-top: ${tableMarginTop}px;
|
|
1026
|
+
left: -${tableToolbarSize + 1}px;
|
|
1027
|
+
z-index: ${rowControlsZIndex + 4};
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
.${ClassName.ROW_CONTROLS_WRAPPER} {
|
|
1031
|
+
position: absolute;
|
|
1032
|
+
/* top of corner control is table margin top - corner control height + 1 pixel of table border. */
|
|
1033
|
+
top: ${tableMarginTop - cornerControlHeight + 1}px;
|
|
1034
|
+
left: -${tableToolbarSize}px;
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
.${ClassName.DRAG_ROW_CONTROLS_WRAPPER}.${ClassName.TABLE_LEFT_SHADOW},
|
|
1038
|
+
.${ClassName.ROW_CONTROLS_WRAPPER}.${ClassName.TABLE_LEFT_SHADOW} {
|
|
1039
|
+
z-index: ${akEditorUnitZIndex};
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
.${ClassName.DRAG_COLUMN_CONTROLS_WRAPPER} {
|
|
1043
|
+
position: absolute;
|
|
1044
|
+
top: ${tableMarginTop}px;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
.${ClassName.TABLE_STICKY} .${ClassName.DRAG_COLUMN_CONTROLS_WRAPPER} {
|
|
1048
|
+
position: fixed;
|
|
1049
|
+
/* higher zIndex than sticky header which is akEditorTableCellOnStickyHeaderZIndex - 5 */
|
|
1050
|
+
z-index: ${akEditorTableCellOnStickyHeaderZIndex - 4};
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
.${ClassName.TABLE_NODE_WRAPPER} {
|
|
1054
|
+
padding-bottom: 0px;
|
|
1055
|
+
/* fixes gap cursor height */
|
|
1056
|
+
overflow: auto;
|
|
1057
|
+
overflow-y: hidden;
|
|
1058
|
+
position: relative;
|
|
1059
|
+
|
|
1060
|
+
${numberColumnFix()}
|
|
1061
|
+
}
|
|
1094
1062
|
`;
|
|
1095
1063
|
|
|
1096
1064
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4139
|
|
1097
1065
|
export const tableStyles = (props: { featureFlags?: FeatureFlags }) => css`
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1066
|
+
.ProseMirror {
|
|
1067
|
+
${baseTableStyles(props)}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
.ProseMirror.${ClassName.IS_RESIZING} {
|
|
1071
|
+
.${ClassName.TABLE_NODE_WRAPPER} {
|
|
1072
|
+
overflow-x: auto;
|
|
1073
|
+
${scrollbarStyles};
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
.ProseMirror.${ClassName.RESIZE_CURSOR} {
|
|
1078
|
+
cursor: col-resize;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
${shadowSentinelStyles}
|
|
1114
1082
|
`;
|
|
1115
1083
|
|
|
1116
1084
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
1117
1085
|
export const tableFullPageEditorStyles = css`
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1086
|
+
.ProseMirror .${ClassName.TABLE_NODE_WRAPPER} > table {
|
|
1087
|
+
margin-left: 0;
|
|
1088
|
+
// 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212
|
|
1089
|
+
margin-right: -1px;
|
|
1090
|
+
width: 100%;
|
|
1091
|
+
}
|
|
1124
1092
|
`;
|
|
1125
1093
|
|
|
1126
1094
|
export const tableCommentEditorStyles = css`
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1095
|
+
.ProseMirror .${ClassName.TABLE_NODE_WRAPPER} > table {
|
|
1096
|
+
margin-left: 0;
|
|
1097
|
+
margin-right: 0;
|
|
1098
|
+
${scrollbarStyles};
|
|
1099
|
+
}
|
|
1132
1100
|
`;
|