@atlaskit/editor-plugin-table 7.16.10 → 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 (244) hide show
  1. package/.eslintrc.js +3 -3
  2. package/CHANGELOG.md +1836 -1831
  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 +19 -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 +808 -814
  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 +19 -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 +5 -4
  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 +881 -903
  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
  243. package/tsconfig.app.json +107 -107
  244. package/tsconfig.dev.json +47 -47
package/src/ui/consts.ts CHANGED
@@ -1,29 +1,16 @@
1
+ import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
1
2
  import {
2
- tableCellBorderWidth,
3
- tableMarginTop,
4
- } from '@atlaskit/editor-common/styles';
5
- import {
6
- akEditorTableBorder,
7
- akEditorTableBorderSelected,
8
- akEditorTableCellBlanketDeleted,
9
- akEditorTableCellBlanketSelected,
10
- akEditorTableHeaderCellBackground,
11
- akEditorTableToolbar,
12
- akEditorTableToolbarSize,
13
- akEditorUnitZIndex,
14
- akRichMediaResizeZIndex,
3
+ akEditorTableBorder,
4
+ akEditorTableBorderSelected,
5
+ akEditorTableCellBlanketDeleted,
6
+ akEditorTableCellBlanketSelected,
7
+ akEditorTableHeaderCellBackground,
8
+ akEditorTableToolbar,
9
+ akEditorTableToolbarSize,
10
+ akEditorUnitZIndex,
11
+ akRichMediaResizeZIndex,
15
12
  } from '@atlaskit/editor-shared-styles';
16
- import {
17
- B200,
18
- N0,
19
- N20,
20
- N200,
21
- N20A,
22
- N300,
23
- R300,
24
- R400,
25
- R75,
26
- } from '@atlaskit/theme/colors';
13
+ import { B200, N0, N20, N200, N20A, N300, R300, R400, R75 } from '@atlaskit/theme/colors';
27
14
  import { token } from '@atlaskit/tokens';
28
15
 
29
16
  import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
@@ -36,63 +23,33 @@ import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
36
23
  export const tableCellBackgroundColor = token('elevation.surface', N0);
37
24
 
38
25
  export const tableHeaderCellBackgroundColor = token(
39
- 'color.background.accent.gray.subtlest',
40
- akEditorTableHeaderCellBackground,
26
+ 'color.background.accent.gray.subtlest',
27
+ akEditorTableHeaderCellBackground,
41
28
  );
42
29
 
43
- export const tableToolbarColor = token(
44
- 'color.background.neutral.subtle',
45
- akEditorTableToolbar,
46
- );
30
+ export const tableToolbarColor = token('color.background.neutral.subtle', akEditorTableToolbar);
47
31
  export const tableTextColor = token('color.text.subtlest', N200);
48
- export const tableBorderColor = token(
49
- 'color.background.accent.gray.subtler',
50
- akEditorTableBorder,
51
- );
52
- export const tableFloatingControlsColor = token(
53
- 'color.background.neutral',
54
- N20,
55
- );
32
+ export const tableBorderColor = token('color.background.accent.gray.subtler', akEditorTableBorder);
33
+ export const tableFloatingControlsColor = token('color.background.neutral', N20);
56
34
 
57
35
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4461
58
36
  export const tableCellSelectedColor = token(
59
- 'color.blanket.selected',
60
- akEditorTableCellBlanketSelected,
61
- );
62
- export const tableToolbarSelectedColor = token(
63
- 'color.background.selected.pressed',
64
- B200,
65
- );
66
- export const tableBorderSelectedColor = token(
67
- 'color.border.focused',
68
- akEditorTableBorderSelected,
69
- );
70
- export const tableCellSelectedDeleteIconColor = token(
71
- 'color.icon.subtle',
72
- N300,
37
+ 'color.blanket.selected',
38
+ akEditorTableCellBlanketSelected,
73
39
  );
40
+ export const tableToolbarSelectedColor = token('color.background.selected.pressed', B200);
41
+ export const tableBorderSelectedColor = token('color.border.focused', akEditorTableBorderSelected);
42
+ export const tableCellSelectedDeleteIconColor = token('color.icon.subtle', N300);
74
43
  export const tableCellSelectedDeleteIconBackground = token(
75
- 'color.background.accent.gray.subtlest',
76
- N20A,
77
- );
78
- export const tableCellDeleteColor = token(
79
- 'color.blanket.danger',
80
- akEditorTableCellBlanketDeleted,
44
+ 'color.background.accent.gray.subtlest',
45
+ N20A,
81
46
  );
47
+ export const tableCellDeleteColor = token('color.blanket.danger', akEditorTableCellBlanketDeleted);
82
48
 
83
49
  export const tableBorderDeleteColor = token('color.border.danger', R400);
84
- export const tableToolbarDeleteColor = token(
85
- 'color.background.danger.pressed',
86
- R75,
87
- );
88
- export const tableCellHoverDeleteIconColor = token(
89
- 'color.icon.inverse',
90
- 'white',
91
- );
92
- export const tableCellHoverDeleteIconBackground = token(
93
- 'color.background.danger.bold',
94
- R300,
95
- );
50
+ export const tableToolbarDeleteColor = token('color.background.danger.pressed', R75);
51
+ export const tableCellHoverDeleteIconColor = token('color.icon.inverse', 'white');
52
+ export const tableCellHoverDeleteIconBackground = token('color.background.danger.bold', R300);
96
53
  export const tableBorderRadiusSize = 3;
97
54
  export const tablePadding = 8;
98
55
  export const tableScrollbarOffset = 15;
@@ -101,8 +58,7 @@ export const tableInsertColumnButtonSize = 20;
101
58
  export const tableDeleteButtonSize = 16;
102
59
  export const tableDeleteButtonOffset = 6;
103
60
  export const tableToolbarSize = akEditorTableToolbarSize;
104
- export const tableControlsSpacing =
105
- tableMarginTop + tablePadding - tableCellBorderWidth;
61
+ export const tableControlsSpacing = tableMarginTop + tablePadding - tableCellBorderWidth;
106
62
  export const tableInsertColumnButtonOffset = 3;
107
63
  export const layoutButtonSize = 32;
108
64
  export const lineMarkerOffsetFromColumnControls = 13;
@@ -115,8 +71,7 @@ export const columnResizeHandleZIndex = columnControlsSelectedZIndex + 1;
115
71
  export const insertLineWidth = 3;
116
72
  export const resizeHandlerAreaWidth = RESIZE_HANDLE_AREA_DECORATION_GAP / 3;
117
73
  export const resizeLineWidth = 2;
118
- export const resizeHandlerZIndex =
119
- columnControlsZIndex + akRichMediaResizeZIndex;
74
+ export const resizeHandlerZIndex = columnControlsZIndex + akRichMediaResizeZIndex;
120
75
  export const contextualMenuTriggerSize = 16;
121
76
  export const contextualMenuDropdownWidth = 180;
122
77
  export const contextualMenuDropdownWidthDnD = 250;
@@ -1,43 +1,37 @@
1
1
  import React from 'react';
2
2
 
3
3
  export const AddColLeftIcon = () => (
4
- <svg
5
- width="24"
6
- height="24"
7
- viewBox="0 0 24 24"
8
- fill="currentColor"
9
- xmlns="http://www.w3.org/2000/svg"
10
- >
11
- <rect
12
- width="24"
13
- height="24"
14
- transform="matrix(0 -1 1 0 0 24)"
15
- fill="none"
16
- fillOpacity="0.01"
17
- />
18
- <rect
19
- x="12"
20
- y="18"
21
- width="12"
22
- height="3"
23
- rx="0.5"
24
- transform="rotate(-90 12 18)"
25
- fill="currentColor"
26
- />
27
- <rect
28
- x="16"
29
- y="18"
30
- width="12"
31
- height="3"
32
- rx="0.5"
33
- transform="rotate(-90 16 18)"
34
- fill="currentColor"
35
- />
36
- <path
37
- fillRule="evenodd"
38
- clipRule="evenodd"
39
- d="M7 11H5.99C5.72652 11.0026 5.47473 11.1092 5.28935 11.2964C5.10397 11.4837 4.99999 11.7365 5 12C5 12.556 5.444 13 5.99 13H7V14C7 14.2652 7.10536 14.5196 7.29289 14.7071C7.48043 14.8946 7.73478 15 8 15C8.26522 15 8.51957 14.8946 8.70711 14.7071C8.89464 14.5196 9 14.2652 9 14V13H10.01C10.2735 12.9974 10.5253 12.8908 10.7107 12.7036C10.896 12.5163 11 12.2635 11 12C11 11.444 10.556 11 10.01 11H9V10C9 9.73478 8.89464 9.48043 8.70711 9.29289C8.51957 9.10536 8.26522 9 8 9C7.73478 9 7.48043 9.10536 7.29289 9.29289C7.10536 9.48043 7 9.73478 7 10V11Z"
40
- fill="currentColor"
41
- />
42
- </svg>
4
+ <svg
5
+ width="24"
6
+ height="24"
7
+ viewBox="0 0 24 24"
8
+ fill="currentColor"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ >
11
+ <rect width="24" height="24" transform="matrix(0 -1 1 0 0 24)" fill="none" fillOpacity="0.01" />
12
+ <rect
13
+ x="12"
14
+ y="18"
15
+ width="12"
16
+ height="3"
17
+ rx="0.5"
18
+ transform="rotate(-90 12 18)"
19
+ fill="currentColor"
20
+ />
21
+ <rect
22
+ x="16"
23
+ y="18"
24
+ width="12"
25
+ height="3"
26
+ rx="0.5"
27
+ transform="rotate(-90 16 18)"
28
+ fill="currentColor"
29
+ />
30
+ <path
31
+ fillRule="evenodd"
32
+ clipRule="evenodd"
33
+ d="M7 11H5.99C5.72652 11.0026 5.47473 11.1092 5.28935 11.2964C5.10397 11.4837 4.99999 11.7365 5 12C5 12.556 5.444 13 5.99 13H7V14C7 14.2652 7.10536 14.5196 7.29289 14.7071C7.48043 14.8946 7.73478 15 8 15C8.26522 15 8.51957 14.8946 8.70711 14.7071C8.89464 14.5196 9 14.2652 9 14V13H10.01C10.2735 12.9974 10.5253 12.8908 10.7107 12.7036C10.896 12.5163 11 12.2635 11 12C11 11.444 10.556 11 10.01 11H9V10C9 9.73478 8.89464 9.48043 8.70711 9.29289C8.51957 9.10536 8.26522 9 8 9C7.73478 9 7.48043 9.10536 7.29289 9.29289C7.10536 9.48043 7 9.73478 7 10V11Z"
34
+ fill="currentColor"
35
+ />
36
+ </svg>
43
37
  );
@@ -1,43 +1,37 @@
1
1
  import React from 'react';
2
2
 
3
3
  export const AddColRightIcon = () => (
4
- <svg
5
- width="24"
6
- height="24"
7
- viewBox="0 0 24 24"
8
- fill="none"
9
- xmlns="http://www.w3.org/2000/svg"
10
- >
11
- <rect
12
- width="24"
13
- height="24"
14
- transform="translate(0 24) rotate(-90)"
15
- fill="none"
16
- fillOpacity="0.01"
17
- />
18
- <rect
19
- x="9"
20
- y="18"
21
- width="12"
22
- height="3"
23
- rx="0.5"
24
- transform="rotate(-90 9 18)"
25
- fill="currentColor"
26
- />
27
- <rect
28
- x="5"
29
- y="18"
30
- width="12"
31
- height="3"
32
- rx="0.5"
33
- transform="rotate(-90 5 18)"
34
- fill="currentColor"
35
- />
36
- <path
37
- fillRule="evenodd"
38
- clipRule="evenodd"
39
- d="M15 11L13.99 11C13.7265 11.0026 13.4747 11.1092 13.2893 11.2964C13.104 11.4837 13 11.7365 13 12C13 12.556 13.444 13 13.99 13L15 13L15 14C15 14.2652 15.1054 14.5196 15.2929 14.7071C15.4804 14.8946 15.7348 15 16 15C16.2652 15 16.5196 14.8946 16.7071 14.7071C16.8946 14.5196 17 14.2652 17 14L17 13L18.01 13C18.2735 12.9974 18.5253 12.8908 18.7107 12.7036C18.896 12.5163 19 12.2635 19 12C19 11.444 18.556 11 18.01 11L17 11L17 10C17 9.73478 16.8946 9.48043 16.7071 9.29289C16.5196 9.10536 16.2652 9 16 9C15.7348 9 15.4804 9.10536 15.2929 9.29289C15.1054 9.48043 15 9.73478 15 10L15 11Z"
40
- fill="currentColor"
41
- />
42
- </svg>
4
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
+ <rect
6
+ width="24"
7
+ height="24"
8
+ transform="translate(0 24) rotate(-90)"
9
+ fill="none"
10
+ fillOpacity="0.01"
11
+ />
12
+ <rect
13
+ x="9"
14
+ y="18"
15
+ width="12"
16
+ height="3"
17
+ rx="0.5"
18
+ transform="rotate(-90 9 18)"
19
+ fill="currentColor"
20
+ />
21
+ <rect
22
+ x="5"
23
+ y="18"
24
+ width="12"
25
+ height="3"
26
+ rx="0.5"
27
+ transform="rotate(-90 5 18)"
28
+ fill="currentColor"
29
+ />
30
+ <path
31
+ fillRule="evenodd"
32
+ clipRule="evenodd"
33
+ d="M15 11L13.99 11C13.7265 11.0026 13.4747 11.1092 13.2893 11.2964C13.104 11.4837 13 11.7365 13 12C13 12.556 13.444 13 13.99 13L15 13L15 14C15 14.2652 15.1054 14.5196 15.2929 14.7071C15.4804 14.8946 15.7348 15 16 15C16.2652 15 16.5196 14.8946 16.7071 14.7071C16.8946 14.5196 17 14.2652 17 14L17 13L18.01 13C18.2735 12.9974 18.5253 12.8908 18.7107 12.7036C18.896 12.5163 19 12.2635 19 12C19 11.444 18.556 11 18.01 11L17 11L17 10C17 9.73478 16.8946 9.48043 16.7071 9.29289C16.5196 9.10536 16.2652 9 16 9C15.7348 9 15.4804 9.10536 15.2929 9.29289C15.1054 9.48043 15 9.73478 15 10L15 11Z"
34
+ fill="currentColor"
35
+ />
36
+ </svg>
43
37
  );
@@ -3,26 +3,20 @@ import React from 'react';
3
3
  import { token } from '@atlaskit/tokens';
4
4
 
5
5
  export const AddRowAboveIcon = () => (
6
- <svg
7
- width="24"
8
- height="24"
9
- viewBox="0 0 24 24"
10
- fill="none"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <rect
14
- width="24"
15
- height="24"
16
- fill={token('color.border.inverse', '#FFFFFF')}
17
- fillOpacity="0.01"
18
- />
19
- <rect x="6" y="12" width="12" height="3" rx="0.5" fill="currentColor" />
20
- <rect x="6" y="16" width="12" height="3" rx="0.5" fill="currentColor" />
21
- <path
22
- fillRule="evenodd"
23
- clipRule="evenodd"
24
- d="M13 7V5.99C12.9974 5.72652 12.8908 5.47473 12.7036 5.28935C12.5163 5.10397 12.2635 4.99999 12 5C11.444 5 11 5.444 11 5.99V7H10C9.73478 7 9.48043 7.10536 9.29289 7.29289C9.10536 7.48043 9 7.73478 9 8C9 8.26522 9.10536 8.51957 9.29289 8.70711C9.48043 8.89464 9.73478 9 10 9H11V10.01C11.0026 10.2735 11.1092 10.5253 11.2964 10.7107C11.4837 10.896 11.7365 11 12 11C12.556 11 13 10.556 13 10.01V9H14C14.2652 9 14.5196 8.89464 14.7071 8.70711C14.8946 8.51957 15 8.26522 15 8C15 7.73478 14.8946 7.48043 14.7071 7.29289C14.5196 7.10536 14.2652 7 14 7H13Z"
25
- fill="currentColor"
26
- />
27
- </svg>
6
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
7
+ <rect
8
+ width="24"
9
+ height="24"
10
+ fill={token('color.border.inverse', '#FFFFFF')}
11
+ fillOpacity="0.01"
12
+ />
13
+ <rect x="6" y="12" width="12" height="3" rx="0.5" fill="currentColor" />
14
+ <rect x="6" y="16" width="12" height="3" rx="0.5" fill="currentColor" />
15
+ <path
16
+ fillRule="evenodd"
17
+ clipRule="evenodd"
18
+ d="M13 7V5.99C12.9974 5.72652 12.8908 5.47473 12.7036 5.28935C12.5163 5.10397 12.2635 4.99999 12 5C11.444 5 11 5.444 11 5.99V7H10C9.73478 7 9.48043 7.10536 9.29289 7.29289C9.10536 7.48043 9 7.73478 9 8C9 8.26522 9.10536 8.51957 9.29289 8.70711C9.48043 8.89464 9.73478 9 10 9H11V10.01C11.0026 10.2735 11.1092 10.5253 11.2964 10.7107C11.4837 10.896 11.7365 11 12 11C12.556 11 13 10.556 13 10.01V9H14C14.2652 9 14.5196 8.89464 14.7071 8.70711C14.8946 8.51957 15 8.26522 15 8C15 7.73478 14.8946 7.48043 14.7071 7.29289C14.5196 7.10536 14.2652 7 14 7H13Z"
19
+ fill="currentColor"
20
+ />
21
+ </svg>
28
22
  );
@@ -3,43 +3,37 @@ import React from 'react';
3
3
  import { token } from '@atlaskit/tokens';
4
4
 
5
5
  export const AddRowBelowIcon = () => (
6
- <svg
7
- width="24"
8
- height="24"
9
- viewBox="0 0 24 24"
10
- fill="none"
11
- xmlns="http://www.w3.org/2000/svg"
12
- >
13
- <rect
14
- width="24"
15
- height="24"
16
- transform="matrix(-1 0 0 -1 24 24)"
17
- fill={token('color.border.inverse', '#FFFFFF')}
18
- fillOpacity="0.01"
19
- />
20
- <rect
21
- x="18"
22
- y="12"
23
- width="12"
24
- height="3"
25
- rx="0.5"
26
- transform="rotate(-180 18 12)"
27
- fill="currentColor"
28
- />
29
- <rect
30
- x="18"
31
- y="8"
32
- width="12"
33
- height="3"
34
- rx="0.5"
35
- transform="rotate(-180 18 8)"
36
- fill="currentColor"
37
- />
38
- <path
39
- fillRule="evenodd"
40
- clipRule="evenodd"
41
- d="M11 17V18.01C11.0026 18.2735 11.1092 18.5253 11.2964 18.7107C11.4837 18.896 11.7365 19 12 19C12.556 19 13 18.556 13 18.01V17H14C14.2652 17 14.5196 16.8946 14.7071 16.7071C14.8946 16.5196 15 16.2652 15 16C15 15.7348 14.8946 15.4804 14.7071 15.2929C14.5196 15.1054 14.2652 15 14 15H13V13.99C12.9974 13.7265 12.8908 13.4747 12.7036 13.2893C12.5163 13.104 12.2635 13 12 13C11.444 13 11 13.444 11 13.99V15H10C9.73478 15 9.48043 15.1054 9.29289 15.2929C9.10536 15.4804 9 15.7348 9 16C9 16.2652 9.10536 16.5196 9.29289 16.7071C9.48043 16.8946 9.73478 17 10 17H11Z"
42
- fill="currentColor"
43
- />
44
- </svg>
6
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
7
+ <rect
8
+ width="24"
9
+ height="24"
10
+ transform="matrix(-1 0 0 -1 24 24)"
11
+ fill={token('color.border.inverse', '#FFFFFF')}
12
+ fillOpacity="0.01"
13
+ />
14
+ <rect
15
+ x="18"
16
+ y="12"
17
+ width="12"
18
+ height="3"
19
+ rx="0.5"
20
+ transform="rotate(-180 18 12)"
21
+ fill="currentColor"
22
+ />
23
+ <rect
24
+ x="18"
25
+ y="8"
26
+ width="12"
27
+ height="3"
28
+ rx="0.5"
29
+ transform="rotate(-180 18 8)"
30
+ fill="currentColor"
31
+ />
32
+ <path
33
+ fillRule="evenodd"
34
+ clipRule="evenodd"
35
+ d="M11 17V18.01C11.0026 18.2735 11.1092 18.5253 11.2964 18.7107C11.4837 18.896 11.7365 19 12 19C12.556 19 13 18.556 13 18.01V17H14C14.2652 17 14.5196 16.8946 14.7071 16.7071C14.8946 16.5196 15 16.2652 15 16C15 15.7348 14.8946 15.4804 14.7071 15.2929C14.5196 15.1054 14.2652 15 14 15H13V13.99C12.9974 13.7265 12.8908 13.4747 12.7036 13.2893C12.5163 13.104 12.2635 13 12 13C11.444 13 11 13.444 11 13.99V15H10C9.73478 15 9.48043 15.1054 9.29289 15.2929C9.10536 15.4804 9 15.7348 9 16C9 16.2652 9.10536 16.5196 9.29289 16.7071C9.48043 16.8946 9.73478 17 10 17H11Z"
36
+ fill="currentColor"
37
+ />
38
+ </svg>
45
39
  );
@@ -4,38 +4,38 @@ import Icon from '@atlaskit/icon';
4
4
  import type { CustomGlyphProps, GlyphProps } from '@atlaskit/icon/types';
5
5
 
6
6
  export const DisplayModeGlyth = (props: CustomGlyphProps) => {
7
- return (
8
- <svg
9
- width="24"
10
- height="24"
11
- viewBox="0 0 24 24"
12
- fill="none"
13
- xmlns="http://www.w3.org/2000/svg"
14
- {...props}
15
- >
16
- <rect x="4" y="5" width="4" height="14" rx="1" fill="currentColor" />
17
- <path
18
- fillRule="evenodd"
19
- clipRule="evenodd"
20
- d="M11 5C10.4477 5 10 5.44772 10 6V9.10102C11.0503 8.02921 12.4424 7.29368 14 7.07089V6C14 5.44772 13.5523 5 13 5H11Z"
21
- fill="currentColor"
22
- />
23
- <path
24
- fillRule="evenodd"
25
- clipRule="evenodd"
26
- d="M17 5C16.4477 5 16 5.44772 16 6V7.07089C17.5576 7.29368 18.9497 8.02921 20 9.10102V6C20 5.44772 19.5523 5 19 5H17Z"
27
- fill="currentColor"
28
- />
29
- <path
30
- fillRule="evenodd"
31
- clipRule="evenodd"
32
- d="M21 14C21 17.3137 18.3137 20 15 20C11.6863 20 9 17.3137 9 14C9 10.6863 11.6863 8 15 8C18.3137 8 21 10.6863 21 14ZM12 15C12 14.4477 12.4477 14 13 14V12C13 10.8954 13.8954 10 15 10C16.1046 10 17 10.8954 17 12V14C17.5523 14 18 14.4477 18 15V17C18 17.5523 17.5523 18 17 18H13C12.4477 18 12 17.5523 12 17V15ZM16 14V12C16 11.4477 15.5523 11 15 11C14.4477 11 14 11.4477 14 12V14H16Z"
33
- fill="currentColor"
34
- />
35
- </svg>
36
- );
7
+ return (
8
+ <svg
9
+ width="24"
10
+ height="24"
11
+ viewBox="0 0 24 24"
12
+ fill="none"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ {...props}
15
+ >
16
+ <rect x="4" y="5" width="4" height="14" rx="1" fill="currentColor" />
17
+ <path
18
+ fillRule="evenodd"
19
+ clipRule="evenodd"
20
+ d="M11 5C10.4477 5 10 5.44772 10 6V9.10102C11.0503 8.02921 12.4424 7.29368 14 7.07089V6C14 5.44772 13.5523 5 13 5H11Z"
21
+ fill="currentColor"
22
+ />
23
+ <path
24
+ fillRule="evenodd"
25
+ clipRule="evenodd"
26
+ d="M17 5C16.4477 5 16 5.44772 16 6V7.07089C17.5576 7.29368 18.9497 8.02921 20 9.10102V6C20 5.44772 19.5523 5 19 5H17Z"
27
+ fill="currentColor"
28
+ />
29
+ <path
30
+ fillRule="evenodd"
31
+ clipRule="evenodd"
32
+ d="M21 14C21 17.3137 18.3137 20 15 20C11.6863 20 9 17.3137 9 14C9 10.6863 11.6863 8 15 8C18.3137 8 21 10.6863 21 14ZM12 15C12 14.4477 12.4477 14 13 14V12C13 10.8954 13.8954 10 15 10C16.1046 10 17 10.8954 17 12V14C17.5523 14 18 14.4477 18 15V17C18 17.5523 17.5523 18 17 18H13C12.4477 18 12 17.5523 12 17V15ZM16 14V12C16 11.4477 15.5523 11 15 11C14.4477 11 14 11.4477 14 12V14H16Z"
33
+ fill="currentColor"
34
+ />
35
+ </svg>
36
+ );
37
37
  };
38
38
 
39
39
  export const DisplayModeIcon = (props: GlyphProps) => {
40
- return <Icon glyph={DisplayModeGlyth} {...props} />;
40
+ return <Icon glyph={DisplayModeGlyth} {...props} />;
41
41
  };
@@ -1,27 +1,25 @@
1
1
  import React from 'react';
2
2
 
3
3
  interface DragHandleDisabledIconProps {
4
- style?: React.CSSProperties;
4
+ style?: React.CSSProperties;
5
5
  }
6
6
 
7
- export const DragHandleDisabledIcon = ({
8
- style,
9
- }: DragHandleDisabledIconProps) => (
10
- <svg
11
- width="24"
12
- height="16"
13
- viewBox="0 0 24 16"
14
- fill="none"
15
- xmlns="http://www.w3.org/2000/svg"
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
17
- style={style}
18
- data-testid="drag-icon-disabled"
19
- >
20
- <rect width="24" height="16" rx="4" />
21
- <g>
22
- <rect x="7" y="4" width="2" height="8" rx="1" />
23
- <rect x="11" y="4" width="2" height="8" rx="1" />
24
- <rect x="15" y="4" width="2" height="8" rx="1" />
25
- </g>
26
- </svg>
7
+ export const DragHandleDisabledIcon = ({ style }: DragHandleDisabledIconProps) => (
8
+ <svg
9
+ width="24"
10
+ height="16"
11
+ viewBox="0 0 24 16"
12
+ fill="none"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
15
+ style={style}
16
+ data-testid="drag-icon-disabled"
17
+ >
18
+ <rect width="24" height="16" rx="4" />
19
+ <g>
20
+ <rect x="7" y="4" width="2" height="8" rx="1" />
21
+ <rect x="11" y="4" width="2" height="8" rx="1" />
22
+ <rect x="15" y="4" width="2" height="8" rx="1" />
23
+ </g>
24
+ </svg>
27
25
  );
@@ -1,16 +1,16 @@
1
1
  import React from 'react';
2
2
 
3
3
  export const DragHandleIcon = () => (
4
- <svg
5
- xmlns="http://www.w3.org/2000/svg"
6
- width="24"
7
- height="16"
8
- fill="none"
9
- data-testid="drag-icon-enabled"
10
- >
11
- <rect width="24" height="16" rx="4" />
12
- <g>
13
- <path d="M9 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM9 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM17 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM17 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM13 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM13 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z" />
14
- </g>
15
- </svg>
4
+ <svg
5
+ xmlns="http://www.w3.org/2000/svg"
6
+ width="24"
7
+ height="16"
8
+ fill="none"
9
+ data-testid="drag-icon-enabled"
10
+ >
11
+ <rect width="24" height="16" rx="4" />
12
+ <g>
13
+ <path d="M9 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM9 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM17 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM17 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM13 10a1 1 0 1 0-2 0 1 1 0 0 0 2 0ZM13 6a1 1 0 1 0-2 0 1 1 0 0 0 2 0Z" />
14
+ </g>
15
+ </svg>
16
16
  );