@atlaskit/editor-plugin-table 7.16.11 → 7.16.12

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.
Files changed (242) hide show
  1. package/.eslintrc.js +3 -3
  2. package/CHANGELOG.md +8 -0
  3. package/dist/cjs/commands/misc.js +3 -3
  4. package/dist/cjs/nodeviews/TableCell.js +10 -10
  5. package/dist/cjs/nodeviews/TableContainer.js +41 -6
  6. package/dist/cjs/nodeviews/TableResizer.js +7 -7
  7. package/dist/cjs/nodeviews/TableRow.js +23 -23
  8. package/dist/cjs/pm-plugins/table-resizing/plugin.js +3 -3
  9. package/dist/cjs/pm-plugins/table-resizing/utils/resize-state.js +4 -4
  10. package/dist/cjs/pm-plugins/table-resizing/utils/scale-table.js +3 -3
  11. package/dist/cjs/ui/FloatingContextualMenu/styles.js +1 -1
  12. package/dist/cjs/ui/FloatingDragMenu/styles.js +1 -1
  13. package/dist/cjs/ui/common-styles.js +13 -13
  14. package/dist/cjs/ui/ui-styles.js +25 -25
  15. package/dist/cjs/utils/merged-cells.js +3 -3
  16. package/dist/es2019/commands/misc.js +3 -3
  17. package/dist/es2019/nodeviews/TableContainer.js +43 -5
  18. package/dist/es2019/nodeviews/TableResizer.js +7 -7
  19. package/dist/es2019/nodeviews/TableRow.js +21 -21
  20. package/dist/es2019/pm-plugins/table-resizing/plugin.js +3 -3
  21. package/dist/es2019/pm-plugins/table-resizing/utils/resize-state.js +4 -4
  22. package/dist/es2019/pm-plugins/table-resizing/utils/scale-table.js +3 -3
  23. package/dist/es2019/ui/FloatingContextualMenu/styles.js +47 -47
  24. package/dist/es2019/ui/FloatingDragMenu/styles.js +30 -30
  25. package/dist/es2019/ui/common-styles.js +802 -816
  26. package/dist/es2019/ui/ui-styles.js +665 -678
  27. package/dist/es2019/utils/merged-cells.js +3 -3
  28. package/dist/esm/commands/misc.js +3 -3
  29. package/dist/esm/nodeviews/TableCell.js +10 -10
  30. package/dist/esm/nodeviews/TableContainer.js +42 -7
  31. package/dist/esm/nodeviews/TableResizer.js +7 -7
  32. package/dist/esm/nodeviews/TableRow.js +23 -23
  33. package/dist/esm/pm-plugins/table-resizing/plugin.js +3 -3
  34. package/dist/esm/pm-plugins/table-resizing/utils/resize-state.js +4 -4
  35. package/dist/esm/pm-plugins/table-resizing/utils/scale-table.js +3 -3
  36. package/dist/esm/ui/FloatingContextualMenu/styles.js +1 -1
  37. package/dist/esm/ui/FloatingDragMenu/styles.js +1 -1
  38. package/dist/esm/ui/common-styles.js +13 -13
  39. package/dist/esm/ui/ui-styles.js +25 -25
  40. package/dist/esm/utils/merged-cells.js +3 -3
  41. package/dist/types/pm-plugins/decorations/utils/index.d.ts +1 -1
  42. package/dist/types/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
  43. package/dist/types/pm-plugins/drag-and-drop/utils/getDragBehaviour.d.ts +1 -1
  44. package/dist/types/pm-plugins/table-resizing/utils/index.d.ts +1 -1
  45. package/dist/types/ui/ColumnResizeWidget/index.d.ts +1 -1
  46. package/dist/types/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +1 -1
  47. package/dist/types/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +1 -1
  48. package/dist/types/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +1 -1
  49. package/dist/types/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  50. package/dist/types/ui/icons/DragHandleDisabledIcon.d.ts +1 -1
  51. package/dist/types-ts4.5/pm-plugins/decorations/utils/index.d.ts +1 -1
  52. package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/autoscrollers.d.ts +1 -1
  53. package/dist/types-ts4.5/pm-plugins/drag-and-drop/utils/getDragBehaviour.d.ts +1 -1
  54. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/index.d.ts +1 -1
  55. package/dist/types-ts4.5/ui/ColumnResizeWidget/index.d.ts +1 -1
  56. package/dist/types-ts4.5/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.d.ts +1 -1
  57. package/dist/types-ts4.5/ui/FloatingToolbarLabel/FloatingToolbarLabel.d.ts +1 -1
  58. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.d.ts +1 -1
  59. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
  60. package/dist/types-ts4.5/ui/icons/DragHandleDisabledIcon.d.ts +1 -1
  61. package/docs/0-intro.tsx +9 -7
  62. package/package.json +2 -2
  63. package/report.api.md +67 -66
  64. package/src/commands/clear.ts +36 -44
  65. package/src/commands/collapse.ts +8 -8
  66. package/src/commands/column-resize.ts +412 -452
  67. package/src/commands/delete.ts +14 -14
  68. package/src/commands/display-mode.ts +10 -11
  69. package/src/commands/go-to-next-cell.ts +48 -54
  70. package/src/commands/hover.ts +210 -227
  71. package/src/commands/index.ts +35 -35
  72. package/src/commands/insert.ts +208 -235
  73. package/src/commands/misc.ts +655 -748
  74. package/src/commands/referentiality.ts +9 -9
  75. package/src/commands/selection.ts +433 -563
  76. package/src/commands/sort.ts +68 -86
  77. package/src/commands/split-cell.ts +14 -14
  78. package/src/commands/toggle.ts +69 -67
  79. package/src/commands-with-analytics.ts +570 -639
  80. package/src/create-plugin-config.ts +13 -13
  81. package/src/event-handlers.ts +513 -612
  82. package/src/handlers.ts +120 -133
  83. package/src/nodeviews/ExternalDropTargets.tsx +68 -73
  84. package/src/nodeviews/OverflowShadowsObserver.ts +148 -157
  85. package/src/nodeviews/TableCell.ts +47 -54
  86. package/src/nodeviews/TableComponent.tsx +1018 -1112
  87. package/src/nodeviews/TableComponentWithSharedState.tsx +91 -94
  88. package/src/nodeviews/TableContainer.tsx +363 -339
  89. package/src/nodeviews/TableNodeViewBase.ts +19 -24
  90. package/src/nodeviews/TableResizer.tsx +565 -657
  91. package/src/nodeviews/TableRow.ts +580 -629
  92. package/src/nodeviews/TableStickyScrollbar.ts +173 -190
  93. package/src/nodeviews/__mocks__/OverflowShadowsObserver.ts +8 -8
  94. package/src/nodeviews/__mocks__/OverridableMock.ts +14 -15
  95. package/src/nodeviews/table.tsx +345 -375
  96. package/src/nodeviews/types.ts +21 -24
  97. package/src/nodeviews/update-overflow-shadows.ts +8 -14
  98. package/src/plugin.tsx +578 -603
  99. package/src/pm-plugins/analytics/actions.ts +10 -12
  100. package/src/pm-plugins/analytics/commands.ts +31 -37
  101. package/src/pm-plugins/analytics/plugin-factory.ts +4 -2
  102. package/src/pm-plugins/analytics/plugin-key.ts +1 -3
  103. package/src/pm-plugins/analytics/plugin.ts +60 -70
  104. package/src/pm-plugins/analytics/reducer.ts +19 -19
  105. package/src/pm-plugins/analytics/types.ts +10 -10
  106. package/src/pm-plugins/analytics/utils/moved-event.ts +38 -38
  107. package/src/pm-plugins/decorations/plugin.ts +58 -77
  108. package/src/pm-plugins/decorations/utils/column-controls.ts +59 -71
  109. package/src/pm-plugins/decorations/utils/column-resizing.ts +50 -57
  110. package/src/pm-plugins/decorations/utils/compose-decorations.ts +6 -6
  111. package/src/pm-plugins/decorations/utils/index.ts +3 -6
  112. package/src/pm-plugins/decorations/utils/types.ts +7 -12
  113. package/src/pm-plugins/default-table-selection.ts +3 -3
  114. package/src/pm-plugins/drag-and-drop/actions.ts +25 -25
  115. package/src/pm-plugins/drag-and-drop/commands-with-analytics.ts +158 -190
  116. package/src/pm-plugins/drag-and-drop/commands.ts +154 -170
  117. package/src/pm-plugins/drag-and-drop/consts.ts +4 -5
  118. package/src/pm-plugins/drag-and-drop/plugin-factory.ts +23 -20
  119. package/src/pm-plugins/drag-and-drop/plugin-key.ts +1 -3
  120. package/src/pm-plugins/drag-and-drop/plugin.ts +329 -383
  121. package/src/pm-plugins/drag-and-drop/reducer.ts +30 -30
  122. package/src/pm-plugins/drag-and-drop/types.ts +8 -8
  123. package/src/pm-plugins/drag-and-drop/utils/autoscrollers.ts +38 -41
  124. package/src/pm-plugins/drag-and-drop/utils/getDragBehaviour.ts +3 -6
  125. package/src/pm-plugins/drag-and-drop/utils/monitor.ts +57 -70
  126. package/src/pm-plugins/keymap.ts +208 -220
  127. package/src/pm-plugins/main.ts +348 -400
  128. package/src/pm-plugins/plugin-factory.ts +32 -34
  129. package/src/pm-plugins/safari-delete-composition-text-issue-workaround.ts +83 -97
  130. package/src/pm-plugins/sticky-headers/commands.ts +2 -6
  131. package/src/pm-plugins/sticky-headers/plugin-key.ts +1 -3
  132. package/src/pm-plugins/sticky-headers/plugin-state.ts +41 -44
  133. package/src/pm-plugins/sticky-headers/plugin.ts +4 -4
  134. package/src/pm-plugins/sticky-headers/types.ts +8 -8
  135. package/src/pm-plugins/sticky-headers/util.ts +10 -10
  136. package/src/pm-plugins/table-analytics.ts +70 -72
  137. package/src/pm-plugins/table-local-id.ts +180 -184
  138. package/src/pm-plugins/table-resizing/commands.ts +72 -85
  139. package/src/pm-plugins/table-resizing/event-handlers.ts +298 -317
  140. package/src/pm-plugins/table-resizing/plugin-factory.ts +10 -10
  141. package/src/pm-plugins/table-resizing/plugin-key.ts +1 -3
  142. package/src/pm-plugins/table-resizing/plugin.ts +61 -68
  143. package/src/pm-plugins/table-resizing/reducer.ts +30 -33
  144. package/src/pm-plugins/table-resizing/utils/colgroup.ts +84 -84
  145. package/src/pm-plugins/table-resizing/utils/column-state.ts +78 -81
  146. package/src/pm-plugins/table-resizing/utils/content-width.ts +94 -114
  147. package/src/pm-plugins/table-resizing/utils/dom.ts +93 -110
  148. package/src/pm-plugins/table-resizing/utils/index.ts +29 -34
  149. package/src/pm-plugins/table-resizing/utils/misc.ts +94 -119
  150. package/src/pm-plugins/table-resizing/utils/resize-column.ts +93 -106
  151. package/src/pm-plugins/table-resizing/utils/resize-logic.ts +240 -257
  152. package/src/pm-plugins/table-resizing/utils/resize-state.ts +343 -372
  153. package/src/pm-plugins/table-resizing/utils/scale-table.ts +202 -207
  154. package/src/pm-plugins/table-resizing/utils/types.ts +17 -17
  155. package/src/pm-plugins/table-resizing/utils/unit-to-number.ts +1 -2
  156. package/src/pm-plugins/table-selection-keymap.ts +25 -51
  157. package/src/pm-plugins/table-width.ts +191 -204
  158. package/src/pm-plugins/view-mode-sort/index.ts +223 -227
  159. package/src/pm-plugins/view-mode-sort/plugin-key.ts +3 -2
  160. package/src/pm-plugins/view-mode-sort/types.ts +12 -12
  161. package/src/pm-plugins/view-mode-sort/utils.ts +108 -117
  162. package/src/reducer.ts +139 -155
  163. package/src/toolbar.tsx +815 -905
  164. package/src/transforms/column-width.ts +186 -213
  165. package/src/transforms/delete-columns.ts +208 -222
  166. package/src/transforms/delete-rows.ts +117 -121
  167. package/src/transforms/fix-tables.ts +190 -215
  168. package/src/transforms/merge.ts +263 -269
  169. package/src/transforms/replace-table.ts +27 -43
  170. package/src/transforms/split.ts +65 -75
  171. package/src/types.ts +421 -427
  172. package/src/ui/ColumnResizeWidget/index.tsx +40 -47
  173. package/src/ui/DragHandle/HandleIconComponent.tsx +9 -13
  174. package/src/ui/DragHandle/index.tsx +221 -250
  175. package/src/ui/DragPreview/index.tsx +35 -35
  176. package/src/ui/FloatingAlignmentButtons/FloatingAlignmentButtons.tsx +33 -41
  177. package/src/ui/FloatingContextualButton/FixedButton.tsx +154 -157
  178. package/src/ui/FloatingContextualButton/index.tsx +109 -115
  179. package/src/ui/FloatingContextualButton/styles.ts +43 -46
  180. package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +634 -694
  181. package/src/ui/FloatingContextualMenu/index.tsx +83 -101
  182. package/src/ui/FloatingContextualMenu/styles.ts +57 -65
  183. package/src/ui/FloatingDeleteButton/DeleteButton.tsx +37 -37
  184. package/src/ui/FloatingDeleteButton/getPopUpOptions.ts +47 -57
  185. package/src/ui/FloatingDeleteButton/index.tsx +319 -350
  186. package/src/ui/FloatingDragMenu/DragMenu.tsx +555 -596
  187. package/src/ui/FloatingDragMenu/DropdownMenu.tsx +152 -162
  188. package/src/ui/FloatingDragMenu/index.tsx +88 -102
  189. package/src/ui/FloatingDragMenu/styles.ts +51 -54
  190. package/src/ui/FloatingInsertButton/InsertButton.tsx +204 -217
  191. package/src/ui/FloatingInsertButton/getPopupOptions.ts +100 -115
  192. package/src/ui/FloatingInsertButton/index.tsx +248 -292
  193. package/src/ui/FloatingToolbarLabel/FloatingToolbarLabel.tsx +24 -29
  194. package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +308 -329
  195. package/src/ui/TableFloatingColumnControls/ColumnDropTargets/ColumnDropTarget.tsx +85 -94
  196. package/src/ui/TableFloatingColumnControls/ColumnDropTargets/index.tsx +46 -46
  197. package/src/ui/TableFloatingColumnControls/index.tsx +116 -136
  198. package/src/ui/TableFloatingControls/CornerControls/ClassicCornerControls.tsx +79 -91
  199. package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +95 -102
  200. package/src/ui/TableFloatingControls/CornerControls/index.tsx +1 -4
  201. package/src/ui/TableFloatingControls/CornerControls/types.ts +8 -8
  202. package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +50 -50
  203. package/src/ui/TableFloatingControls/NumberColumn/index.tsx +111 -124
  204. package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +86 -105
  205. package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +305 -341
  206. package/src/ui/TableFloatingControls/RowDropTarget/index.tsx +72 -75
  207. package/src/ui/TableFloatingControls/index.tsx +191 -193
  208. package/src/ui/TableFullWidthLabel/index.tsx +20 -20
  209. package/src/ui/common-styles.ts +880 -912
  210. package/src/ui/consts.ts +29 -74
  211. package/src/ui/icons/AddColLeftIcon.tsx +33 -39
  212. package/src/ui/icons/AddColRightIcon.tsx +33 -39
  213. package/src/ui/icons/AddRowAboveIcon.tsx +16 -22
  214. package/src/ui/icons/AddRowBelowIcon.tsx +33 -39
  215. package/src/ui/icons/DisplayModeIcon.tsx +31 -31
  216. package/src/ui/icons/DragHandleDisabledIcon.tsx +19 -21
  217. package/src/ui/icons/DragHandleIcon.tsx +12 -12
  218. package/src/ui/icons/DragInMotionIcon.tsx +45 -52
  219. package/src/ui/icons/MergeCellsIcon.tsx +22 -28
  220. package/src/ui/icons/MinimisedHandle.tsx +9 -9
  221. package/src/ui/icons/SplitCellIcon.tsx +30 -36
  222. package/src/ui/ui-styles.ts +769 -798
  223. package/src/utils/alignment.ts +1 -1
  224. package/src/utils/analytics.ts +192 -208
  225. package/src/utils/collapse.ts +55 -64
  226. package/src/utils/column-controls.ts +237 -254
  227. package/src/utils/create.ts +30 -30
  228. package/src/utils/decoration.ts +482 -502
  229. package/src/utils/dom.ts +127 -134
  230. package/src/utils/drag-menu.ts +322 -373
  231. package/src/utils/get-allow-add-column-custom-step.ts +4 -5
  232. package/src/utils/guidelines.ts +10 -21
  233. package/src/utils/index.ts +68 -68
  234. package/src/utils/merged-cells.ts +245 -254
  235. package/src/utils/nodes.ts +91 -106
  236. package/src/utils/paste.ts +119 -135
  237. package/src/utils/row-controls.ts +199 -213
  238. package/src/utils/selection.ts +77 -87
  239. package/src/utils/snapping.ts +84 -97
  240. package/src/utils/table.ts +44 -44
  241. package/src/utils/transforms.ts +5 -5
  242. package/src/utils/update-plugin-state-decorations.ts +5 -9
@@ -6,13 +6,13 @@ import { B300, N0, N300, N40A, N60A, Y200, Y50 } from '@atlaskit/theme/colors';
6
6
  import { TableCssClassName as ClassName } from '../types';
7
7
  import { columnControlsDecorationHeight, columnControlsSelectedZIndex, columnControlsZIndex, dragTableInsertColumnButtonSize, insertLineWidth, lineMarkerSize, resizeHandlerAreaWidth, resizeHandlerZIndex, resizeLineWidth, tableBorderColor, tableBorderDeleteColor, tableBorderSelectedColor, tableCellDeleteColor, tableCellHoverDeleteIconBackground, tableCellHoverDeleteIconColor, tableCellSelectedDeleteIconBackground, tableCellSelectedDeleteIconColor, tableDeleteButtonSize, tableHeaderCellBackgroundColor, tableInsertColumnButtonSize, tableOverflowShadowWidthWide, tableToolbarDeleteColor, tableToolbarSelectedColor, tableToolbarSize } from './consts';
8
8
  const InsertLine = cssString => css`
9
- .${ClassName.CONTROLS_INSERT_LINE} {
10
- background: ${tableBorderSelectedColor};
11
- display: none;
12
- position: absolute;
13
- z-index: ${akEditorUnitZIndex};
14
- ${cssString}
15
- }
9
+ .${ClassName.CONTROLS_INSERT_LINE} {
10
+ background: ${tableBorderSelectedColor};
11
+ display: none;
12
+ position: absolute;
13
+ z-index: ${akEditorUnitZIndex};
14
+ ${cssString}
15
+ }
16
16
  `;
17
17
  const Marker = () => css({
18
18
  backgroundColor: tableBorderColor,
@@ -23,132 +23,132 @@ const Marker = () => css({
23
23
  pointerEvents: 'none'
24
24
  });
25
25
  export const InsertMarker = cssString => css`
26
- .${ClassName.CONTROLS_INSERT_MARKER} {
27
- ${Marker()};
28
- ${cssString}
29
- }
26
+ .${ClassName.CONTROLS_INSERT_MARKER} {
27
+ ${Marker()};
28
+ ${cssString}
29
+ }
30
30
  `;
31
31
  const Button = cssString => css`
32
- border-radius: ${"var(--ds-border-radius, 3px)"};
33
- border-width: 0px;
34
- display: inline-flex;
35
- max-width: 100%;
36
- text-align: center;
37
- margin: 0px;
38
- padding: 0px;
39
- text-decoration: none;
40
- transition: background 0.1s ease-out 0s,
41
- box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;
42
- outline: none !important;
43
- cursor: none;
44
-
45
- > .${ClassName.CONTROLS_BUTTON_ICON} {
46
- display: inline-flex;
47
- max-height: 100%;
48
- max-width: 100%;
49
- }
50
- ${cssString}
32
+ border-radius: ${"var(--ds-border-radius, 3px)"};
33
+ border-width: 0px;
34
+ display: inline-flex;
35
+ max-width: 100%;
36
+ text-align: center;
37
+ margin: 0px;
38
+ padding: 0px;
39
+ text-decoration: none;
40
+ transition:
41
+ background 0.1s ease-out 0s,
42
+ box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38) 0s;
43
+ outline: none !important;
44
+ cursor: none;
45
+
46
+ > .${ClassName.CONTROLS_BUTTON_ICON} {
47
+ display: inline-flex;
48
+ max-height: 100%;
49
+ max-width: 100%;
50
+ }
51
+ ${cssString}
51
52
  `;
52
53
 
53
54
  // Explicit pixel values required here to ensure classic row controls align correctly
54
55
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
55
56
  export const HeaderButton = cssString => css`
56
- .${ClassName.CONTROLS_BUTTON} {
57
- background: ${tableHeaderCellBackgroundColor};
58
- border: 1px solid ${tableBorderColor};
59
- display: block;
60
- box-sizing: border-box;
61
- padding: 0;
62
-
63
- :focus {
64
- outline: none;
65
- }
66
- ${cssString}
67
- }
68
-
69
- .${ClassName.ROW_CONTROLS_BUTTON}::after {
70
- content: ' ';
71
- background-color: transparent;
72
- left: -15px;
73
- top: 0;
74
- position: absolute;
75
- width: 15px;
76
- height: 100%;
77
- z-index: 1;
78
- }
79
-
80
- .active .${ClassName.CONTROLS_BUTTON} {
81
- color: ${`var(--ds-icon-inverse, ${N0})`};
82
- background-color: ${tableToolbarSelectedColor};
83
- border-color: ${tableBorderSelectedColor};
84
- }
57
+ .${ClassName.CONTROLS_BUTTON} {
58
+ background: ${tableHeaderCellBackgroundColor};
59
+ border: 1px solid ${tableBorderColor};
60
+ display: block;
61
+ box-sizing: border-box;
62
+ padding: 0;
63
+
64
+ :focus {
65
+ outline: none;
66
+ }
67
+ ${cssString}
68
+ }
69
+
70
+ .${ClassName.ROW_CONTROLS_BUTTON}::after {
71
+ content: ' ';
72
+ background-color: transparent;
73
+ left: -15px;
74
+ top: 0;
75
+ position: absolute;
76
+ width: 15px;
77
+ height: 100%;
78
+ z-index: 1;
79
+ }
80
+
81
+ .active .${ClassName.CONTROLS_BUTTON} {
82
+ color: ${`var(--ds-icon-inverse, ${N0})`};
83
+ background-color: ${tableToolbarSelectedColor};
84
+ border-color: ${tableBorderSelectedColor};
85
+ }
85
86
  `;
86
87
  export const HeaderButtonHover = () => css`
87
- .${ClassName.CONTROLS_BUTTON}:hover {
88
- color: ${`var(--ds-icon-inverse, ${N0})`};
89
- background-color: ${tableToolbarSelectedColor};
90
- border-color: ${tableBorderSelectedColor};
91
- cursor: pointer;
92
- }
88
+ .${ClassName.CONTROLS_BUTTON}:hover {
89
+ color: ${`var(--ds-icon-inverse, ${N0})`};
90
+ background-color: ${tableToolbarSelectedColor};
91
+ border-color: ${tableBorderSelectedColor};
92
+ cursor: pointer;
93
+ }
93
94
  `;
94
95
  export const HeaderButtonDanger = () => css`
95
- .${ClassName.HOVERED_CELL_IN_DANGER} .${ClassName.CONTROLS_BUTTON} {
96
- background-color: ${tableToolbarDeleteColor};
97
- border-color: ${tableBorderDeleteColor};
98
- position: relative;
99
- z-index: ${akEditorUnitZIndex};
100
- }
96
+ .${ClassName.HOVERED_CELL_IN_DANGER} .${ClassName.CONTROLS_BUTTON} {
97
+ background-color: ${tableToolbarDeleteColor};
98
+ border-color: ${tableBorderDeleteColor};
99
+ position: relative;
100
+ z-index: ${akEditorUnitZIndex};
101
+ }
101
102
  `;
102
103
  const InsertButton = () => css`
103
- .${ClassName.CONTROLS_INSERT_BUTTON_INNER} {
104
- position: absolute;
105
- z-index: ${akEditorUnitZIndex + 10};
106
- bottom: 0;
107
- }
108
- .${ClassName.CONTROLS_INSERT_BUTTON_INNER},
109
- .${ClassName.CONTROLS_INSERT_BUTTON} {
110
- height: ${tableInsertColumnButtonSize}px;
111
- width: ${tableInsertColumnButtonSize}px;
112
- }
113
- .${ClassName.CONTROLS_INSERT_BUTTON} {
114
- ${Button(`
104
+ .${ClassName.CONTROLS_INSERT_BUTTON_INNER} {
105
+ position: absolute;
106
+ z-index: ${akEditorUnitZIndex + 10};
107
+ bottom: 0;
108
+ }
109
+ .${ClassName.CONTROLS_INSERT_BUTTON_INNER}, .${ClassName.CONTROLS_INSERT_BUTTON} {
110
+ height: ${tableInsertColumnButtonSize}px;
111
+ width: ${tableInsertColumnButtonSize}px;
112
+ }
113
+ .${ClassName.CONTROLS_INSERT_BUTTON} {
114
+ ${Button(`
115
115
  background: ${"var(--ds-surface-overlay, white)"};
116
116
  box-shadow: ${`var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N60A}, 0 0 1px ${N60A}`})`};
117
117
  color: ${`var(--ds-icon, ${N300})`};
118
118
  `)}
119
- }
120
- .${ClassName.CONTROLS_INSERT_LINE} {
121
- display: none;
122
- }
123
- &:hover .${ClassName.CONTROLS_INSERT_LINE} {
124
- display: flex;
125
- }
119
+ }
120
+ .${ClassName.CONTROLS_INSERT_LINE} {
121
+ display: none;
122
+ }
123
+ &:hover .${ClassName.CONTROLS_INSERT_LINE} {
124
+ display: flex;
125
+ }
126
126
  `;
127
127
  const InsertButtonHover = () => css`
128
- .${ClassName.CONTROLS_INSERT_BUTTON}:hover {
129
- background: ${`var(--ds-background-brand-bold, ${B300})`};
130
- color: ${"var(--ds-icon-inverse, white)"};
131
- cursor: pointer;
132
- }
128
+ .${ClassName.CONTROLS_INSERT_BUTTON}:hover {
129
+ background: ${`var(--ds-background-brand-bold, ${B300})`};
130
+ color: ${"var(--ds-icon-inverse, white)"};
131
+ cursor: pointer;
132
+ }
133
133
  `;
134
134
  export const dragInsertButtonWrapper = () => css`
135
- .${ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER} {
136
- position: absolute;
137
- z-index: ${akEditorUnitZIndex + 10};
138
- }
139
-
140
- .${ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_COLUMN} {
141
- bottom: -3px;
142
- left: 2px;
143
- }
144
-
145
- .${ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_ROW} {
146
- left: -3px;
147
- bottom: -2px;
148
- }
149
-
150
- .${ClassName.DRAG_CONTROLS_INSERT_BUTTON} {
151
- ${Button(`
135
+ .${ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER} {
136
+ position: absolute;
137
+ z-index: ${akEditorUnitZIndex + 10};
138
+ }
139
+
140
+ .${ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_COLUMN} {
141
+ bottom: -3px;
142
+ left: 2px;
143
+ }
144
+
145
+ .${ClassName.DRAG_CONTROLS_INSERT_BUTTON_INNER_ROW} {
146
+ left: -3px;
147
+ bottom: -2px;
148
+ }
149
+
150
+ .${ClassName.DRAG_CONTROLS_INSERT_BUTTON} {
151
+ ${Button(`
152
152
  background: ${"var(--ds-surface-overlay, white)"};
153
153
  color: ${`var(--ds-icon, ${N300})`};
154
154
  border: 1px solid ${"var(--ds-background-accent-gray-subtler, #C1C7D0)"};
@@ -156,66 +156,66 @@ export const dragInsertButtonWrapper = () => css`
156
156
  height: ${dragTableInsertColumnButtonSize}px;
157
157
  width: ${dragTableInsertColumnButtonSize}px;
158
158
  `)}
159
- }
160
-
161
- .${ClassName.DRAG_CONTROLS_INSERT_BUTTON}:hover {
162
- background: ${`var(--ds-background-brand-bold, ${B300})`};
163
- border: 1px solid ${`var(--ds-background-brand-bold, ${B300})`};
164
- color: ${"var(--ds-icon-inverse, white)"};
165
- cursor: pointer;
166
- }
159
+ }
160
+
161
+ .${ClassName.DRAG_CONTROLS_INSERT_BUTTON}:hover {
162
+ background: ${`var(--ds-background-brand-bold, ${B300})`};
163
+ border: 1px solid ${`var(--ds-background-brand-bold, ${B300})`};
164
+ color: ${"var(--ds-icon-inverse, white)"};
165
+ cursor: pointer;
166
+ }
167
167
  `;
168
168
 
169
169
  // Explicit pixel values required here to ensure corner button aligns correctly
170
170
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
171
171
  export const dragCornerControlButton = () => css`
172
- .${ClassName.DRAG_CORNER_BUTTON} {
173
- width: 15px;
174
- height: 15px;
175
- display: flex;
176
- justify-content: center;
177
- align-items: center;
178
- position: absolute;
179
- top: -17px;
180
- left: -5px;
181
- background-color: transparent;
182
- border: none;
183
- padding: 0;
184
- outline: none;
185
- z-index: ${akEditorUnitZIndex * 99};
186
-
187
- &.active .${ClassName.DRAG_CORNER_BUTTON_INNER} {
188
- background-color: ${"var(--ds-border-selected, #0C66E4)"};
189
- width: 10px;
190
- height: 10px;
191
- border-width: 2px;
192
- border-radius: 4px;
193
-
194
- top: 3px;
195
- left: 2px;
196
- }
197
-
198
- &:hover {
199
- cursor: pointer;
200
-
201
- .${ClassName.DRAG_CORNER_BUTTON_INNER} {
202
- width: 10px;
203
- height: 10px;
204
- border-radius: 4px;
205
- top: 3px;
206
- left: 2px;
207
- }
208
- }
209
- }
210
-
211
- .${ClassName.DRAG_CORNER_BUTTON_INNER} {
212
- border: 1px solid ${"var(--ds-border-inverse, #FFF)"};
213
- background-color: ${"var(--ds-background-accent-gray-subtler, #DCDFE4)"};
214
- border-radius: 2px;
215
- width: 5px;
216
- height: 5px;
217
- position: relative;
218
- }
172
+ .${ClassName.DRAG_CORNER_BUTTON} {
173
+ width: 15px;
174
+ height: 15px;
175
+ display: flex;
176
+ justify-content: center;
177
+ align-items: center;
178
+ position: absolute;
179
+ top: -17px;
180
+ left: -5px;
181
+ background-color: transparent;
182
+ border: none;
183
+ padding: 0;
184
+ outline: none;
185
+ z-index: ${akEditorUnitZIndex * 99};
186
+
187
+ &.active .${ClassName.DRAG_CORNER_BUTTON_INNER} {
188
+ background-color: ${"var(--ds-border-selected, #0C66E4)"};
189
+ width: 10px;
190
+ height: 10px;
191
+ border-width: 2px;
192
+ border-radius: 4px;
193
+
194
+ top: 3px;
195
+ left: 2px;
196
+ }
197
+
198
+ &:hover {
199
+ cursor: pointer;
200
+
201
+ .${ClassName.DRAG_CORNER_BUTTON_INNER} {
202
+ width: 10px;
203
+ height: 10px;
204
+ border-radius: 4px;
205
+ top: 3px;
206
+ left: 2px;
207
+ }
208
+ }
209
+ }
210
+
211
+ .${ClassName.DRAG_CORNER_BUTTON_INNER} {
212
+ border: 1px solid ${"var(--ds-border-inverse, #FFF)"};
213
+ background-color: ${"var(--ds-background-accent-gray-subtler, #DCDFE4)"};
214
+ border-radius: 2px;
215
+ width: 5px;
216
+ height: 5px;
217
+ position: relative;
218
+ }
219
219
  `;
220
220
  export const insertColumnButtonWrapper = () => css(InsertButton(), InsertButtonHover(), InsertLine(`
221
221
  width: 2px;
@@ -227,92 +227,85 @@ export const insertRowButtonWrapper = () => css(InsertButton(), InsertButtonHove
227
227
  left: ${tableInsertColumnButtonSize - 1}px;
228
228
  `));
229
229
  export const columnControlsLineMarker = () => css`
230
- .${ClassName.TABLE_CONTAINER}.${ClassName.WITH_CONTROLS}
231
- table
232
- tr:first-of-type
233
- td,
234
- .${ClassName.TABLE_CONTAINER}.${ClassName.WITH_CONTROLS}
235
- table
236
- tr:first-of-type
237
- th {
238
- position: relative;
239
- }
230
+ .${ClassName.TABLE_CONTAINER}.${ClassName.WITH_CONTROLS} table tr:first-of-type td,
231
+ .${ClassName.TABLE_CONTAINER}.${ClassName.WITH_CONTROLS} table tr:first-of-type th {
232
+ position: relative;
233
+ }
240
234
  `;
241
235
  export const DeleteButton = () => css`
242
- .${ClassName.CONTROLS_DELETE_BUTTON_WRAP},
243
- .${ClassName.CONTROLS_DELETE_BUTTON} {
244
- height: ${tableDeleteButtonSize}px;
245
- width: ${tableDeleteButtonSize}px;
246
- }
247
- .${ClassName.CONTROLS_DELETE_BUTTON_WRAP} {
248
- .${ClassName.CONTROLS_DELETE_BUTTON} {
249
- ${Button(`
236
+ .${ClassName.CONTROLS_DELETE_BUTTON_WRAP}, .${ClassName.CONTROLS_DELETE_BUTTON} {
237
+ height: ${tableDeleteButtonSize}px;
238
+ width: ${tableDeleteButtonSize}px;
239
+ }
240
+ .${ClassName.CONTROLS_DELETE_BUTTON_WRAP} {
241
+ .${ClassName.CONTROLS_DELETE_BUTTON} {
242
+ ${Button(`
250
243
  background: ${tableCellSelectedDeleteIconBackground};
251
244
  color: ${tableCellSelectedDeleteIconColor};
252
245
  `)}
253
- }
254
- }
255
-
256
- .${ClassName.CONTROLS_DELETE_BUTTON}:hover {
257
- background: ${tableCellHoverDeleteIconBackground};
258
- color: ${tableCellHoverDeleteIconColor};
259
- cursor: pointer;
260
- }
246
+ }
247
+ }
248
+
249
+ .${ClassName.CONTROLS_DELETE_BUTTON}:hover {
250
+ background: ${tableCellHoverDeleteIconBackground};
251
+ color: ${tableCellHoverDeleteIconColor};
252
+ cursor: pointer;
253
+ }
261
254
  `;
262
255
  export const OverflowShadow = isDragAndDropEnabled => css`
263
- .${ClassName.TABLE_RIGHT_SHADOW}, .${ClassName.TABLE_LEFT_SHADOW} {
264
- display: block;
265
- height: calc(100% - ${tableMarginTop}px);
266
- position: absolute;
267
- pointer-events: none;
268
- top: ${tableMarginTop}px;
269
- z-index: ${akEditorShadowZIndex};
270
- width: ${tableOverflowShadowWidthWide}px;
271
- }
272
- .${ClassName.TABLE_LEFT_SHADOW} {
273
- background: linear-gradient(
274
- to left,
275
- transparent 0,
276
- ${`var(--ds-shadow-overflow-spread, ${N40A})`} 140%
277
- ),
278
- linear-gradient(
279
- to right,
280
- ${"var(--ds-shadow-overflow-perimeter, transparent)"} 0px,
281
- transparent 1px
282
- );
283
- left: 0px;
284
- }
285
- .${ClassName.TABLE_CONTAINER}[data-number-column='true'] > :not(.${ClassName.TABLE_STICKY_SHADOW}).${ClassName.TABLE_LEFT_SHADOW} {
286
- left: ${akEditorTableNumberColumnWidth - 1}px;
287
- }
288
- .${ClassName.TABLE_RIGHT_SHADOW} {
289
- background: linear-gradient(
290
- to right,
291
- transparent 0,
292
- ${`var(--ds-shadow-overflow-spread, ${N40A})`} 140%
293
- ),
294
- linear-gradient(
295
- to left,
296
- ${"var(--ds-shadow-overflow-perimeter, transparent)"} 0px,
297
- transparent 1px
298
- );
299
- left: calc(100% - ${tableOverflowShadowWidthWide}px);
300
- }
301
- .${ClassName.WITH_CONTROLS} {
302
- ${overflowShadowWidhoutDnD(isDragAndDropEnabled)}
303
- .${ClassName.TABLE_LEFT_SHADOW} {
304
- border-left: 1px solid ${tableBorderColor};
305
- }
306
- }
256
+ .${ClassName.TABLE_RIGHT_SHADOW}, .${ClassName.TABLE_LEFT_SHADOW} {
257
+ display: block;
258
+ height: calc(100% - ${tableMarginTop}px);
259
+ position: absolute;
260
+ pointer-events: none;
261
+ top: ${tableMarginTop}px;
262
+ z-index: ${akEditorShadowZIndex};
263
+ width: ${tableOverflowShadowWidthWide}px;
264
+ }
265
+ .${ClassName.TABLE_LEFT_SHADOW} {
266
+ background: linear-gradient(
267
+ to left,
268
+ transparent 0,
269
+ ${`var(--ds-shadow-overflow-spread, ${N40A})`} 140%
270
+ ),
271
+ linear-gradient(
272
+ to right,
273
+ ${"var(--ds-shadow-overflow-perimeter, transparent)"} 0px,
274
+ transparent 1px
275
+ );
276
+ left: 0px;
277
+ }
278
+ .${ClassName.TABLE_CONTAINER}[data-number-column='true'] > :not(.${ClassName.TABLE_STICKY_SHADOW}).${ClassName.TABLE_LEFT_SHADOW} {
279
+ left: ${akEditorTableNumberColumnWidth - 1}px;
280
+ }
281
+ .${ClassName.TABLE_RIGHT_SHADOW} {
282
+ background: linear-gradient(
283
+ to right,
284
+ transparent 0,
285
+ ${`var(--ds-shadow-overflow-spread, ${N40A})`} 140%
286
+ ),
287
+ linear-gradient(
288
+ to left,
289
+ ${"var(--ds-shadow-overflow-perimeter, transparent)"} 0px,
290
+ transparent 1px
291
+ );
292
+ left: calc(100% - ${tableOverflowShadowWidthWide}px);
293
+ }
294
+ .${ClassName.WITH_CONTROLS} {
295
+ ${overflowShadowWidhoutDnD(isDragAndDropEnabled)}
296
+ .${ClassName.TABLE_LEFT_SHADOW} {
297
+ border-left: 1px solid ${tableBorderColor};
298
+ }
299
+ }
307
300
  `;
308
301
  const overflowShadowWidhoutDnD = isDragAndDropEnabled => {
309
302
  if (!isDragAndDropEnabled) {
310
303
  return css`
311
- .${ClassName.TABLE_RIGHT_SHADOW}, .${ClassName.TABLE_LEFT_SHADOW} {
312
- height: calc(100% - ${tableMarginTopWithControl}px);
313
- top: ${tableMarginTopWithControl}px;
314
- }
315
- `;
304
+ .${ClassName.TABLE_RIGHT_SHADOW}, .${ClassName.TABLE_LEFT_SHADOW} {
305
+ height: calc(100% - ${tableMarginTopWithControl}px);
306
+ top: ${tableMarginTopWithControl}px;
307
+ }
308
+ `;
316
309
  }
317
310
  };
318
311
  const columnHeaderButton = cssString => {
@@ -334,94 +327,94 @@ const columnHeaderButtonSelected = () => css({
334
327
  });
335
328
  const getFloatingDotOverrides = () => {
336
329
  return css`
337
- tr
338
- th:last-child
339
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::before,
340
- tr
341
- td:last-child
342
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::before {
343
- content: '';
344
- background-color: ${tableBorderColor};
345
- position: absolute;
346
- height: ${lineMarkerSize}px;
347
- width: ${lineMarkerSize}px;
348
- border-radius: 50%;
349
- pointer-events: none;
350
- top: ${"var(--ds-space-025, 2px)"};
351
- right: 0px;
352
- }
353
- `;
330
+ tr
331
+ th:last-child
332
+ .${ClassName.COLUMN_CONTROLS_DECORATIONS}::before,
333
+ tr
334
+ td:last-child
335
+ .${ClassName.COLUMN_CONTROLS_DECORATIONS}::before {
336
+ content: '';
337
+ background-color: ${tableBorderColor};
338
+ position: absolute;
339
+ height: ${lineMarkerSize}px;
340
+ width: ${lineMarkerSize}px;
341
+ border-radius: 50%;
342
+ pointer-events: none;
343
+ top: ${"var(--ds-space-025, 2px)"};
344
+ right: 0px;
345
+ }
346
+ `;
354
347
  };
355
348
  export const floatingColumnControls = () => {
356
349
  return css`
357
- .${ClassName.DRAG_COLUMN_DROP_TARGET_CONTROLS} {
358
- box-sizing: border-box;
359
- position: absolute;
360
- top: 0;
361
-
362
- .${ClassName.DRAG_COLUMN_CONTROLS_INNER} {
363
- display: flex;
364
- flex-direction: row;
365
- }
366
- }
367
-
368
- .${ClassName.DRAG_COLUMN_CONTROLS} {
369
- box-sizing: border-box;
370
-
371
- .${ClassName.DRAG_COLUMN_CONTROLS_INNER} {
372
- display: grid;
373
- justify-items: center;
374
- }
375
- }
376
- `;
350
+ .${ClassName.DRAG_COLUMN_DROP_TARGET_CONTROLS} {
351
+ box-sizing: border-box;
352
+ position: absolute;
353
+ top: 0;
354
+
355
+ .${ClassName.DRAG_COLUMN_CONTROLS_INNER} {
356
+ display: flex;
357
+ flex-direction: row;
358
+ }
359
+ }
360
+
361
+ .${ClassName.DRAG_COLUMN_CONTROLS} {
362
+ box-sizing: border-box;
363
+
364
+ .${ClassName.DRAG_COLUMN_CONTROLS_INNER} {
365
+ display: grid;
366
+ justify-items: center;
367
+ }
368
+ }
369
+ `;
377
370
  };
378
371
  export const rowControlsWrapperDotStyle = () => {
379
372
  return css`
380
- // override for DnD controls
381
- div.${ClassName.WITH_CONTROLS}>.${ClassName.DRAG_ROW_CONTROLS_WRAPPER}::after {
382
- display: none;
383
- }
384
-
385
- div.${ClassName.WITH_CONTROLS}>.${ClassName.ROW_CONTROLS_WRAPPER}::after {
386
- content: ' ';
387
- background-color: ${tableBorderColor};
388
- position: absolute;
389
- height: ${lineMarkerSize}px;
390
- width: ${lineMarkerSize}px;
391
- border-radius: 50%;
392
- pointer-events: none;
393
- top: -${tableToolbarSize + tableCellBorderWidth}px;
394
- right: -1px;
395
- }
396
- `;
373
+ // override for DnD controls
374
+ div.${ClassName.WITH_CONTROLS}>.${ClassName.DRAG_ROW_CONTROLS_WRAPPER}::after {
375
+ display: none;
376
+ }
377
+
378
+ div.${ClassName.WITH_CONTROLS}>.${ClassName.ROW_CONTROLS_WRAPPER}::after {
379
+ content: ' ';
380
+ background-color: ${tableBorderColor};
381
+ position: absolute;
382
+ height: ${lineMarkerSize}px;
383
+ width: ${lineMarkerSize}px;
384
+ border-radius: 50%;
385
+ pointer-events: none;
386
+ top: -${tableToolbarSize + tableCellBorderWidth}px;
387
+ right: -1px;
388
+ }
389
+ `;
397
390
  };
398
391
  export const columnControlsDecoration = () => {
399
392
  return css`
400
- .${ClassName.COLUMN_CONTROLS_DECORATIONS} {
401
- display: none;
402
- cursor: pointer;
403
- position: absolute;
404
- width: 100%;
405
- left: 0;
406
- top: -${columnControlsDecorationHeight + tableCellBorderWidth}px;
407
- height: ${columnControlsDecorationHeight}px;
408
- // floating dot for adding column button
409
- &::before {
410
- content: ' ';
411
- background-color: ${tableBorderColor};
412
- position: absolute;
413
- height: ${lineMarkerSize}px;
414
- width: ${lineMarkerSize}px;
415
- border-radius: 50%;
416
- pointer-events: none;
417
- top: 2px;
418
- right: ${"var(--ds-space-negative-025, -2px)"};
419
- }
420
-
421
- &::after {
422
- content: ' ';
423
-
424
- ${columnHeaderButton(`
393
+ .${ClassName.COLUMN_CONTROLS_DECORATIONS} {
394
+ display: none;
395
+ cursor: pointer;
396
+ position: absolute;
397
+ width: 100%;
398
+ left: 0;
399
+ top: -${columnControlsDecorationHeight + tableCellBorderWidth}px;
400
+ height: ${columnControlsDecorationHeight}px;
401
+ // floating dot for adding column button
402
+ &::before {
403
+ content: ' ';
404
+ background-color: ${tableBorderColor};
405
+ position: absolute;
406
+ height: ${lineMarkerSize}px;
407
+ width: ${lineMarkerSize}px;
408
+ border-radius: 50%;
409
+ pointer-events: none;
410
+ top: 2px;
411
+ right: ${"var(--ds-space-negative-025, -2px)"};
412
+ }
413
+
414
+ &::after {
415
+ content: ' ';
416
+
417
+ ${columnHeaderButton(`
425
418
  border-right: ${tableCellBorderWidth}px solid ${tableBorderColor};
426
419
  border-top: ${tableCellBorderWidth}px solid ${tableBorderColor};
427
420
  border-bottom: ${tableCellBorderWidth}px solid ${tableBorderColor};
@@ -433,133 +426,128 @@ export const columnControlsDecoration = () => {
433
426
  left: 0px;
434
427
  z-index: ${columnControlsZIndex};
435
428
  `)}
436
- }
437
- }
438
-
439
- // floating dot for adding column button - overriding style on last column to avoid scroll
440
- ${getFloatingDotOverrides()}
441
-
442
- .${ClassName.WITH_CONTROLS} .${ClassName.COLUMN_CONTROLS_DECORATIONS} {
443
- display: block;
444
- }
445
-
446
- table
447
- tr:first-of-type
448
- td.${ClassName.TABLE_CELL},table
449
- tr:first-of-type
450
- th.${ClassName.TABLE_HEADER_CELL} {
451
- &.${ClassName.COLUMN_SELECTED}, &.${ClassName.HOVERED_TABLE} {
452
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
453
- ${columnHeaderButtonSelected()};
454
- }
455
-
456
- &.${ClassName.HOVERED_CELL_IN_DANGER}
457
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
458
- background-color: ${tableToolbarDeleteColor};
459
- border-color: ${tableBorderDeleteColor};
460
- z-index: ${akEditorUnitZIndex * 100};
461
- }
462
- }
463
- }
464
-
465
- table
466
- tr:first-of-type
467
- td.${ClassName.TABLE_CELL},table
468
- tr:first-of-type
469
- th.${ClassName.TABLE_HEADER_CELL} {
470
- &.${ClassName.COLUMN_SELECTED}, &.${ClassName.HOVERED_COLUMN} {
471
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
472
- ${columnHeaderButtonSelected()};
473
- border-left: ${tableCellBorderWidth}px solid
474
- ${tableBorderSelectedColor};
475
- left: -${tableCellBorderWidth}px;
476
- }
477
- }
478
- }
479
-
480
- table
481
- tr:first-of-type
482
- td.${ClassName.TABLE_CELL},
483
- table
484
- tr:first-of-type
485
- th.${ClassName.TABLE_HEADER_CELL} {
486
- &.${ClassName.HOVERED_COLUMN} {
487
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
488
- ${columnHeaderButtonSelected()};
489
- }
490
-
491
- &.${ClassName.HOVERED_CELL_IN_DANGER}
492
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
493
- background-color: ${tableToolbarDeleteColor};
494
- border-color: ${tableBorderDeleteColor};
495
- border-left: ${tableCellBorderWidth}px solid ${tableBorderDeleteColor};
496
- left: -${tableCellBorderWidth}px;
497
- z-index: ${akEditorUnitZIndex * 100};
498
- }
499
- }
500
- }
501
-
502
- .${ClassName.TABLE_SELECTED}
503
- table
504
- tr:first-of-type
505
- td.${ClassName.TABLE_CELL},
506
- .${ClassName.TABLE_SELECTED}
507
- table
508
- tr:first-of-type
509
- th.${ClassName.TABLE_HEADER_CELL} {
510
- .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
511
- ${columnHeaderButtonSelected()};
512
- }
513
- }
514
- `;
429
+ }
430
+ }
431
+
432
+ // floating dot for adding column button - overriding style on last column to avoid scroll
433
+ ${getFloatingDotOverrides()}
434
+
435
+ .${ClassName.WITH_CONTROLS} .${ClassName.COLUMN_CONTROLS_DECORATIONS} {
436
+ display: block;
437
+ }
438
+
439
+ table
440
+ tr:first-of-type
441
+ td.${ClassName.TABLE_CELL},table
442
+ tr:first-of-type
443
+ th.${ClassName.TABLE_HEADER_CELL} {
444
+ &.${ClassName.COLUMN_SELECTED}, &.${ClassName.HOVERED_TABLE} {
445
+ .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
446
+ ${columnHeaderButtonSelected()};
447
+ }
448
+
449
+ &.${ClassName.HOVERED_CELL_IN_DANGER} .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
450
+ background-color: ${tableToolbarDeleteColor};
451
+ border-color: ${tableBorderDeleteColor};
452
+ z-index: ${akEditorUnitZIndex * 100};
453
+ }
454
+ }
455
+ }
456
+
457
+ table
458
+ tr:first-of-type
459
+ td.${ClassName.TABLE_CELL},table
460
+ tr:first-of-type
461
+ th.${ClassName.TABLE_HEADER_CELL} {
462
+ &.${ClassName.COLUMN_SELECTED}, &.${ClassName.HOVERED_COLUMN} {
463
+ .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
464
+ ${columnHeaderButtonSelected()};
465
+ border-left: ${tableCellBorderWidth}px solid ${tableBorderSelectedColor};
466
+ left: -${tableCellBorderWidth}px;
467
+ }
468
+ }
469
+ }
470
+
471
+ table
472
+ tr:first-of-type
473
+ td.${ClassName.TABLE_CELL},
474
+ table
475
+ tr:first-of-type
476
+ th.${ClassName.TABLE_HEADER_CELL} {
477
+ &.${ClassName.HOVERED_COLUMN} {
478
+ .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
479
+ ${columnHeaderButtonSelected()};
480
+ }
481
+
482
+ &.${ClassName.HOVERED_CELL_IN_DANGER} .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
483
+ background-color: ${tableToolbarDeleteColor};
484
+ border-color: ${tableBorderDeleteColor};
485
+ border-left: ${tableCellBorderWidth}px solid ${tableBorderDeleteColor};
486
+ left: -${tableCellBorderWidth}px;
487
+ z-index: ${akEditorUnitZIndex * 100};
488
+ }
489
+ }
490
+ }
491
+
492
+ .${ClassName.TABLE_SELECTED}
493
+ table
494
+ tr:first-of-type
495
+ td.${ClassName.TABLE_CELL},
496
+ .${ClassName.TABLE_SELECTED}
497
+ table
498
+ tr:first-of-type
499
+ th.${ClassName.TABLE_HEADER_CELL} {
500
+ .${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
501
+ ${columnHeaderButtonSelected()};
502
+ }
503
+ }
504
+ `;
515
505
  };
516
506
  export const hoveredDeleteButton = () => css`
517
- .${ClassName.TABLE_CONTAINER}.${ClassName.HOVERED_DELETE_BUTTON} {
518
- .${ClassName.SELECTED_CELL},
519
- .${ClassName.COLUMN_SELECTED},
520
- .${ClassName.HOVERED_CELL} {
521
- border: 1px solid ${tableBorderDeleteColor};
522
- }
523
- .${ClassName.SELECTED_CELL}::after {
524
- background: ${tableCellDeleteColor};
525
- }
526
-
527
- .${ClassName.TABLE_NODE_WRAPPER} > table {
528
- td.${ClassName.HOVERED_NO_HIGHLIGHT}::after {
529
- background: ${tableCellDeleteColor};
530
- border: 1px solid ${tableBorderDeleteColor};
531
- }
532
- th.${ClassName.HOVERED_NO_HIGHLIGHT} {
533
- background-color: unset;
534
- }
535
- th.${ClassName.HOVERED_NO_HIGHLIGHT}::after {
536
- background: ${tableCellDeleteColor};
537
- border: 1px solid ${tableBorderDeleteColor};
538
- }
539
- }
540
- }
507
+ .${ClassName.TABLE_CONTAINER}.${ClassName.HOVERED_DELETE_BUTTON} {
508
+ .${ClassName.SELECTED_CELL}, .${ClassName.COLUMN_SELECTED}, .${ClassName.HOVERED_CELL} {
509
+ border: 1px solid ${tableBorderDeleteColor};
510
+ }
511
+ .${ClassName.SELECTED_CELL}::after {
512
+ background: ${tableCellDeleteColor};
513
+ }
514
+
515
+ .${ClassName.TABLE_NODE_WRAPPER} > table {
516
+ td.${ClassName.HOVERED_NO_HIGHLIGHT}::after {
517
+ background: ${tableCellDeleteColor};
518
+ border: 1px solid ${tableBorderDeleteColor};
519
+ }
520
+ th.${ClassName.HOVERED_NO_HIGHLIGHT} {
521
+ background-color: unset;
522
+ }
523
+ th.${ClassName.HOVERED_NO_HIGHLIGHT}::after {
524
+ background: ${tableCellDeleteColor};
525
+ border: 1px solid ${tableBorderDeleteColor};
526
+ }
527
+ }
528
+ }
541
529
  `;
542
530
  export const hoveredCell = () => css`
543
- :not(.${ClassName.IS_RESIZING})
544
- .${ClassName.TABLE_CONTAINER}:not(.${ClassName.HOVERED_DELETE_BUTTON}) {
545
- .${ClassName.HOVERED_CELL} {
546
- position: relative;
547
- border: 1px solid ${tableBorderSelectedColor};
548
- }
549
- .${ClassName.HOVERED_CELL}.${ClassName.HOVERED_NO_HIGHLIGHT} {
550
- position: relative;
551
- border: 1px solid ${tableBorderColor};
552
- }
553
- }
531
+ :not(.${ClassName.IS_RESIZING})
532
+ .${ClassName.TABLE_CONTAINER}:not(.${ClassName.HOVERED_DELETE_BUTTON}) {
533
+ .${ClassName.HOVERED_CELL} {
534
+ position: relative;
535
+ border: 1px solid ${tableBorderSelectedColor};
536
+ }
537
+ .${ClassName.HOVERED_CELL}.${ClassName.HOVERED_NO_HIGHLIGHT} {
538
+ position: relative;
539
+ border: 1px solid ${tableBorderColor};
540
+ }
541
+ }
554
542
  `;
555
543
  export const hoveredWarningCell = css`
556
- :not(.${ClassName.IS_RESIZING})
557
- .${ClassName.TABLE_CONTAINER}:not(.${ClassName.HOVERED_DELETE_BUTTON}) {
558
- td.${ClassName.HOVERED_CELL_WARNING} {
559
- background-color: ${`var(--ds-background-warning, ${Y50})`} !important; // We need to override the background-color added to the cell
560
- border: 1px solid ${`var(--ds-border-warning, ${Y200})`};
561
- }
562
- }
544
+ :not(.${ClassName.IS_RESIZING})
545
+ .${ClassName.TABLE_CONTAINER}:not(.${ClassName.HOVERED_DELETE_BUTTON}) {
546
+ td.${ClassName.HOVERED_CELL_WARNING} {
547
+ background-color: ${`var(--ds-background-warning, ${Y50})`} !important; // We need to override the background-color added to the cell
548
+ border: 1px solid ${`var(--ds-border-warning, ${Y200})`};
549
+ }
550
+ }
563
551
  `;
564
552
 
565
553
  // Explicit pixel values required here to ensure correct positioning and sizes of column resize handle
@@ -567,109 +555,108 @@ export const hoveredWarningCell = css`
567
555
  const resizeHandleOverrides = isDragAndDropEnabled => {
568
556
  if (isDragAndDropEnabled) {
569
557
  return css`
570
- th.${ClassName.WITH_RESIZE_LINE}::before,
571
- td.${ClassName.WITH_RESIZE_LINE}::before {
572
- content: ' ';
573
- position: absolute;
574
- left: ${"var(--ds-space-negative-025, -2px)"};
575
- top: -1px;
576
- width: ${resizeLineWidth}px;
577
- height: calc(100% + 2px);
578
- background-color: ${tableBorderSelectedColor};
579
- z-index: ${columnControlsZIndex * 2};
580
- }
581
-
582
- th.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before,
583
- td.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before {
584
- content: ' ';
585
- position: absolute;
586
- right: -1px;
587
- top: -1px;
588
- width: ${resizeLineWidth}px;
589
- height: calc(100% + 2px);
590
- background-color: ${tableBorderSelectedColor};
591
- z-index: ${columnControlsZIndex * 2};
592
- }
593
- `;
558
+ th.${ClassName.WITH_RESIZE_LINE}::before, td.${ClassName.WITH_RESIZE_LINE}::before {
559
+ content: ' ';
560
+ position: absolute;
561
+ left: ${"var(--ds-space-negative-025, -2px)"};
562
+ top: -1px;
563
+ width: ${resizeLineWidth}px;
564
+ height: calc(100% + 2px);
565
+ background-color: ${tableBorderSelectedColor};
566
+ z-index: ${columnControlsZIndex * 2};
567
+ }
568
+
569
+ th.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before,
570
+ td.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before {
571
+ content: ' ';
572
+ position: absolute;
573
+ right: -1px;
574
+ top: -1px;
575
+ width: ${resizeLineWidth}px;
576
+ height: calc(100% + 2px);
577
+ background-color: ${tableBorderSelectedColor};
578
+ z-index: ${columnControlsZIndex * 2};
579
+ }
580
+ `;
594
581
  }
595
582
  return css`
596
- td.${ClassName.WITH_RESIZE_LINE}::before {
597
- content: ' ';
598
- position: absolute;
599
- left: ${"var(--ds-space-negative-025, -2px)"};
600
- top: -1px;
601
- width: ${resizeLineWidth}px;
602
- height: calc(100% + 2px);
603
- background-color: ${tableBorderSelectedColor};
604
- z-index: ${columnControlsZIndex * 2};
605
- }
606
-
607
- th.${ClassName.WITH_RESIZE_LINE}::before {
608
- content: ' ';
609
- left: ${"var(--ds-space-negative-025, -2px)"};
610
- position: absolute;
611
- width: ${resizeLineWidth}px;
612
- height: calc(100% + ${tableToolbarSize + tableCellBorderWidth}px);
613
- background-color: ${tableBorderSelectedColor};
614
- z-index: ${columnControlsZIndex * 2};
615
- top: -${tableToolbarSize + tableCellBorderWidth}px;
616
- }
617
-
618
- td.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before {
619
- content: ' ';
620
- position: absolute;
621
- right: -1px;
622
- top: -1px;
623
- width: ${resizeLineWidth}px;
624
- height: calc(100% + 2px);
625
- background-color: ${tableBorderSelectedColor};
626
- z-index: ${columnControlsZIndex * 2};
627
- }
628
-
629
- th.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before {
630
- content: ' ';
631
- right: -1px;
632
- position: absolute;
633
- width: ${resizeLineWidth}px;
634
- height: calc(100% + ${tableToolbarSize + tableCellBorderWidth}px);
635
- background-color: ${tableBorderSelectedColor};
636
- z-index: ${columnControlsZIndex * 2};
637
- top: -${tableToolbarSize + tableCellBorderWidth}px;
638
- }
639
- `;
583
+ td.${ClassName.WITH_RESIZE_LINE}::before {
584
+ content: ' ';
585
+ position: absolute;
586
+ left: ${"var(--ds-space-negative-025, -2px)"};
587
+ top: -1px;
588
+ width: ${resizeLineWidth}px;
589
+ height: calc(100% + 2px);
590
+ background-color: ${tableBorderSelectedColor};
591
+ z-index: ${columnControlsZIndex * 2};
592
+ }
593
+
594
+ th.${ClassName.WITH_RESIZE_LINE}::before {
595
+ content: ' ';
596
+ left: ${"var(--ds-space-negative-025, -2px)"};
597
+ position: absolute;
598
+ width: ${resizeLineWidth}px;
599
+ height: calc(100% + ${tableToolbarSize + tableCellBorderWidth}px);
600
+ background-color: ${tableBorderSelectedColor};
601
+ z-index: ${columnControlsZIndex * 2};
602
+ top: -${tableToolbarSize + tableCellBorderWidth}px;
603
+ }
604
+
605
+ td.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before {
606
+ content: ' ';
607
+ position: absolute;
608
+ right: -1px;
609
+ top: -1px;
610
+ width: ${resizeLineWidth}px;
611
+ height: calc(100% + 2px);
612
+ background-color: ${tableBorderSelectedColor};
613
+ z-index: ${columnControlsZIndex * 2};
614
+ }
615
+
616
+ th.${ClassName.WITH_RESIZE_LINE_LAST_COLUMN}::before {
617
+ content: ' ';
618
+ right: -1px;
619
+ position: absolute;
620
+ width: ${resizeLineWidth}px;
621
+ height: calc(100% + ${tableToolbarSize + tableCellBorderWidth}px);
622
+ background-color: ${tableBorderSelectedColor};
623
+ z-index: ${columnControlsZIndex * 2};
624
+ top: -${tableToolbarSize + tableCellBorderWidth}px;
625
+ }
626
+ `;
640
627
  };
641
628
  export const resizeHandle = isDragAndDropEnabled => css`
642
- .${ClassName.TABLE_CONTAINER} {
643
- .${ClassName.RESIZE_HANDLE_DECORATION} {
644
- background-color: transparent;
645
- position: absolute;
646
- width: ${resizeHandlerAreaWidth}px;
647
- height: 100%;
648
- top: 0;
649
- right: -${resizeHandlerAreaWidth / 2}px;
650
- cursor: col-resize;
651
- z-index: ${resizeHandlerZIndex};
652
- }
653
-
654
- tr
655
- th:last-child
656
- .${ClassName.RESIZE_HANDLE_DECORATION},
657
- tr
658
- td:last-child
659
- .${ClassName.RESIZE_HANDLE_DECORATION} {
660
- background-color: transparent;
661
- position: absolute;
662
- width: ${resizeHandlerAreaWidth / 2}px;
663
- height: 100%;
664
- top: 0;
665
- right: 0;
666
- cursor: col-resize;
667
- z-index: ${resizeHandlerZIndex};
668
- }
669
-
670
- ${resizeHandleOverrides(isDragAndDropEnabled)}
671
-
672
- table
629
+ .${ClassName.TABLE_CONTAINER} {
630
+ .${ClassName.RESIZE_HANDLE_DECORATION} {
631
+ background-color: transparent;
632
+ position: absolute;
633
+ width: ${resizeHandlerAreaWidth}px;
634
+ height: 100%;
635
+ top: 0;
636
+ right: -${resizeHandlerAreaWidth / 2}px;
637
+ cursor: col-resize;
638
+ z-index: ${resizeHandlerZIndex};
639
+ }
640
+
641
+ tr
642
+ th:last-child
643
+ .${ClassName.RESIZE_HANDLE_DECORATION},
644
+ tr
645
+ td:last-child
646
+ .${ClassName.RESIZE_HANDLE_DECORATION} {
647
+ background-color: transparent;
648
+ position: absolute;
649
+ width: ${resizeHandlerAreaWidth / 2}px;
650
+ height: 100%;
651
+ top: 0;
652
+ right: 0;
653
+ cursor: col-resize;
654
+ z-index: ${resizeHandlerZIndex};
655
+ }
656
+
657
+ ${resizeHandleOverrides(isDragAndDropEnabled)}
658
+
659
+ table
673
660
  tr:first-of-type
674
661
  th.${ClassName.WITH_RESIZE_LINE}
675
662
  .${ClassName.RESIZE_HANDLE_DECORATION}::after,
@@ -677,10 +664,10 @@ export const resizeHandle = isDragAndDropEnabled => css`
677
664
  tr:first-of-type
678
665
  td.${ClassName.WITH_RESIZE_LINE}
679
666
  .${ClassName.RESIZE_HANDLE_DECORATION}::after {
680
- top: -${tableToolbarSize + tableCellBorderWidth}px;
681
- height: calc(100% + ${tableToolbarSize + tableCellBorderWidth}px);
682
- }
683
- }
667
+ top: -${tableToolbarSize + tableCellBorderWidth}px;
668
+ height: calc(100% + ${tableToolbarSize + tableCellBorderWidth}px);
669
+ }
670
+ }
684
671
  `;
685
672
 
686
673
  // Drag and Drop: drop target insert line
@@ -710,137 +697,137 @@ const insertLineInactiveColor = css({
710
697
  // or column drag
711
698
  // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
712
699
  export const insertLine = () => css`
713
- .${ClassName.TABLE_CONTAINER} {
714
- td.${ClassName.WITH_FIRST_COLUMN_INSERT_LINE}::before {
715
- ${tableCellColumnInsertLineStyles}
716
- left: -1px;
717
- top: -1px;
718
- ${insertLineActiveColor}
719
- }
720
-
721
- td.${ClassName.WITH_FIRST_COLUMN_INSERT_LINE_INACTIVE}::before {
722
- ${tableCellColumnInsertLineStyles}
723
- left: -1px;
724
- top: -1px;
725
- ${insertLineInactiveColor}
726
- }
727
-
728
- th.${ClassName.WITH_FIRST_COLUMN_INSERT_LINE}::before {
729
- ${tableCellColumnInsertLineStyles}
730
- left: -1px;
731
- top: -${tableCellBorderWidth}px;
732
- ${insertLineActiveColor}
733
- }
734
-
735
- th.${ClassName.WITH_FIRST_COLUMN_INSERT_LINE_INACTIVE}::before {
736
- ${tableCellColumnInsertLineStyles}
737
- left: -1px;
738
- top: -${tableCellBorderWidth}px;
739
- ${insertLineInactiveColor}
740
- }
741
-
742
- td.${ClassName.WITH_COLUMN_INSERT_LINE}::before {
743
- ${tableCellColumnInsertLineStyles}
744
- left: ${"var(--ds-space-negative-025, -2px)"};
745
- top: -1px;
746
- ${insertLineActiveColor}
747
- }
748
-
749
- td.${ClassName.WITH_COLUMN_INSERT_LINE_INACTIVE}::before {
750
- ${tableCellColumnInsertLineStyles}
751
- left: ${"var(--ds-space-negative-025, -2px)"};
752
- top: -1px;
753
- ${insertLineInactiveColor}
754
- }
755
-
756
- th.${ClassName.WITH_COLUMN_INSERT_LINE}::before {
757
- ${tableCellColumnInsertLineStyles}
758
- left: ${"var(--ds-space-negative-025, -2px)"};
759
- top: -${tableCellBorderWidth}px;
760
- ${insertLineActiveColor}
761
- }
762
-
763
- th.${ClassName.WITH_COLUMN_INSERT_LINE_INACTIVE}::before {
764
- ${tableCellColumnInsertLineStyles}
765
- left: ${"var(--ds-space-negative-025, -2px)"};
766
- top: -${tableCellBorderWidth}px;
767
- ${insertLineInactiveColor}
768
- }
769
-
770
- td.${ClassName.WITH_LAST_COLUMN_INSERT_LINE}::before {
771
- ${tableCellColumnInsertLineStyles}
772
- right: -1px;
773
- top: -1px;
774
- ${insertLineActiveColor}
775
- }
776
-
777
- td.${ClassName.WITH_LAST_COLUMN_INSERT_LINE_INACTIVE}::before {
778
- ${tableCellColumnInsertLineStyles}
779
- right: -1px;
780
- top: -1px;
781
- ${insertLineInactiveColor}
782
- }
783
-
784
- th.${ClassName.WITH_LAST_COLUMN_INSERT_LINE}::before {
785
- ${tableCellColumnInsertLineStyles}
786
- right: -1px;
787
- top: -${tableCellBorderWidth}px;
788
- ${insertLineActiveColor}
789
- }
790
-
791
- th.${ClassName.WITH_LAST_COLUMN_INSERT_LINE_INACTIVE}::before {
792
- ${tableCellColumnInsertLineStyles}
793
- right: -1px;
794
- top: -${tableCellBorderWidth}px;
795
- ${insertLineInactiveColor}
796
- }
797
-
798
- td.${ClassName.WITH_ROW_INSERT_LINE}::before {
799
- ${tableCellRowInsertLineStyles}
800
- top: -1px;
801
- ${insertLineActiveColor}
802
- }
803
-
804
- td.${ClassName.WITH_ROW_INSERT_LINE_INACTIVE}::before {
805
- ${tableCellRowInsertLineStyles}
806
- top: -1px;
807
- ${insertLineInactiveColor}
808
- }
809
-
810
- th.${ClassName.WITH_ROW_INSERT_LINE}::before {
811
- ${tableCellRowInsertLineStyles}
812
- top: -1px;
813
- ${insertLineActiveColor}
814
- }
815
-
816
- th.${ClassName.WITH_ROW_INSERT_LINE_INACTIVE}::before {
817
- ${tableCellRowInsertLineStyles}
818
- top: -1px;
819
- ${insertLineInactiveColor}
820
- }
821
-
822
- td.${ClassName.WITH_LAST_ROW_INSERT_LINE}::before {
823
- ${tableCellRowInsertLineStyles}
824
- bottom: 0;
825
- ${insertLineActiveColor}
826
- }
827
-
828
- td.${ClassName.WITH_LAST_ROW_INSERT_LINE_INACTIVE}::before {
829
- ${tableCellRowInsertLineStyles}
830
- bottom: 0;
831
- ${insertLineInactiveColor}
832
- }
833
-
834
- th.${ClassName.WITH_LAST_ROW_INSERT_LINE}::before {
835
- ${tableCellRowInsertLineStyles}
836
- bottom: 0;
837
- ${insertLineActiveColor}
838
- }
839
-
840
- th.${ClassName.WITH_LAST_ROW_INSERT_LINE_INACTIVE}::before {
841
- ${tableCellRowInsertLineStyles}
842
- bottom: 0;
843
- ${insertLineInactiveColor}
844
- }
845
- }
700
+ .${ClassName.TABLE_CONTAINER} {
701
+ td.${ClassName.WITH_FIRST_COLUMN_INSERT_LINE}::before {
702
+ ${tableCellColumnInsertLineStyles}
703
+ left: -1px;
704
+ top: -1px;
705
+ ${insertLineActiveColor}
706
+ }
707
+
708
+ td.${ClassName.WITH_FIRST_COLUMN_INSERT_LINE_INACTIVE}::before {
709
+ ${tableCellColumnInsertLineStyles}
710
+ left: -1px;
711
+ top: -1px;
712
+ ${insertLineInactiveColor}
713
+ }
714
+
715
+ th.${ClassName.WITH_FIRST_COLUMN_INSERT_LINE}::before {
716
+ ${tableCellColumnInsertLineStyles}
717
+ left: -1px;
718
+ top: -${tableCellBorderWidth}px;
719
+ ${insertLineActiveColor}
720
+ }
721
+
722
+ th.${ClassName.WITH_FIRST_COLUMN_INSERT_LINE_INACTIVE}::before {
723
+ ${tableCellColumnInsertLineStyles}
724
+ left: -1px;
725
+ top: -${tableCellBorderWidth}px;
726
+ ${insertLineInactiveColor}
727
+ }
728
+
729
+ td.${ClassName.WITH_COLUMN_INSERT_LINE}::before {
730
+ ${tableCellColumnInsertLineStyles}
731
+ left: ${"var(--ds-space-negative-025, -2px)"};
732
+ top: -1px;
733
+ ${insertLineActiveColor}
734
+ }
735
+
736
+ td.${ClassName.WITH_COLUMN_INSERT_LINE_INACTIVE}::before {
737
+ ${tableCellColumnInsertLineStyles}
738
+ left: ${"var(--ds-space-negative-025, -2px)"};
739
+ top: -1px;
740
+ ${insertLineInactiveColor}
741
+ }
742
+
743
+ th.${ClassName.WITH_COLUMN_INSERT_LINE}::before {
744
+ ${tableCellColumnInsertLineStyles}
745
+ left: ${"var(--ds-space-negative-025, -2px)"};
746
+ top: -${tableCellBorderWidth}px;
747
+ ${insertLineActiveColor}
748
+ }
749
+
750
+ th.${ClassName.WITH_COLUMN_INSERT_LINE_INACTIVE}::before {
751
+ ${tableCellColumnInsertLineStyles}
752
+ left: ${"var(--ds-space-negative-025, -2px)"};
753
+ top: -${tableCellBorderWidth}px;
754
+ ${insertLineInactiveColor}
755
+ }
756
+
757
+ td.${ClassName.WITH_LAST_COLUMN_INSERT_LINE}::before {
758
+ ${tableCellColumnInsertLineStyles}
759
+ right: -1px;
760
+ top: -1px;
761
+ ${insertLineActiveColor}
762
+ }
763
+
764
+ td.${ClassName.WITH_LAST_COLUMN_INSERT_LINE_INACTIVE}::before {
765
+ ${tableCellColumnInsertLineStyles}
766
+ right: -1px;
767
+ top: -1px;
768
+ ${insertLineInactiveColor}
769
+ }
770
+
771
+ th.${ClassName.WITH_LAST_COLUMN_INSERT_LINE}::before {
772
+ ${tableCellColumnInsertLineStyles}
773
+ right: -1px;
774
+ top: -${tableCellBorderWidth}px;
775
+ ${insertLineActiveColor}
776
+ }
777
+
778
+ th.${ClassName.WITH_LAST_COLUMN_INSERT_LINE_INACTIVE}::before {
779
+ ${tableCellColumnInsertLineStyles}
780
+ right: -1px;
781
+ top: -${tableCellBorderWidth}px;
782
+ ${insertLineInactiveColor}
783
+ }
784
+
785
+ td.${ClassName.WITH_ROW_INSERT_LINE}::before {
786
+ ${tableCellRowInsertLineStyles}
787
+ top: -1px;
788
+ ${insertLineActiveColor}
789
+ }
790
+
791
+ td.${ClassName.WITH_ROW_INSERT_LINE_INACTIVE}::before {
792
+ ${tableCellRowInsertLineStyles}
793
+ top: -1px;
794
+ ${insertLineInactiveColor}
795
+ }
796
+
797
+ th.${ClassName.WITH_ROW_INSERT_LINE}::before {
798
+ ${tableCellRowInsertLineStyles}
799
+ top: -1px;
800
+ ${insertLineActiveColor}
801
+ }
802
+
803
+ th.${ClassName.WITH_ROW_INSERT_LINE_INACTIVE}::before {
804
+ ${tableCellRowInsertLineStyles}
805
+ top: -1px;
806
+ ${insertLineInactiveColor}
807
+ }
808
+
809
+ td.${ClassName.WITH_LAST_ROW_INSERT_LINE}::before {
810
+ ${tableCellRowInsertLineStyles}
811
+ bottom: 0;
812
+ ${insertLineActiveColor}
813
+ }
814
+
815
+ td.${ClassName.WITH_LAST_ROW_INSERT_LINE_INACTIVE}::before {
816
+ ${tableCellRowInsertLineStyles}
817
+ bottom: 0;
818
+ ${insertLineInactiveColor}
819
+ }
820
+
821
+ th.${ClassName.WITH_LAST_ROW_INSERT_LINE}::before {
822
+ ${tableCellRowInsertLineStyles}
823
+ bottom: 0;
824
+ ${insertLineActiveColor}
825
+ }
826
+
827
+ th.${ClassName.WITH_LAST_ROW_INSERT_LINE_INACTIVE}::before {
828
+ ${tableCellRowInsertLineStyles}
829
+ bottom: 0;
830
+ ${insertLineInactiveColor}
831
+ }
832
+ }
846
833
  `;