@atlaskit/editor-plugin-table 5.6.6 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/types.js +1 -0
- package/dist/cjs/ui/FloatingContextualButton/index.js +1 -7
- package/dist/cjs/ui/FloatingContextualButton/styles.js +5 -25
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +238 -99
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +1 -2
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +1 -1
- package/dist/cjs/ui/common-styles.js +7 -7
- package/dist/cjs/ui/consts.js +16 -63
- package/dist/cjs/ui/icons/MergeCellsIcon.js +34 -0
- package/dist/cjs/ui/icons/SplitCellIcon.js +41 -0
- package/dist/cjs/ui/icons/index.js +14 -0
- package/dist/cjs/ui/ui-styles.js +47 -48
- package/dist/es2019/types.js +1 -0
- package/dist/es2019/ui/FloatingContextualButton/index.js +1 -5
- package/dist/es2019/ui/FloatingContextualButton/styles.js +10 -31
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +248 -71
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +22 -3
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +1 -1
- package/dist/es2019/ui/common-styles.js +59 -59
- package/dist/es2019/ui/consts.js +18 -64
- package/dist/es2019/ui/icons/MergeCellsIcon.js +25 -0
- package/dist/es2019/ui/icons/SplitCellIcon.js +32 -0
- package/dist/es2019/ui/icons/index.js +2 -0
- package/dist/es2019/ui/ui-styles.js +98 -99
- package/dist/esm/types.js +1 -0
- package/dist/esm/ui/FloatingContextualButton/index.js +1 -7
- package/dist/esm/ui/FloatingContextualButton/styles.js +5 -26
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +238 -98
- package/dist/esm/ui/FloatingContextualMenu/styles.js +1 -2
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +1 -1
- package/dist/esm/ui/common-styles.js +7 -7
- package/dist/esm/ui/consts.js +18 -64
- package/dist/esm/ui/icons/MergeCellsIcon.js +27 -0
- package/dist/esm/ui/icons/SplitCellIcon.js +34 -0
- package/dist/esm/ui/icons/index.js +2 -0
- package/dist/esm/ui/ui-styles.js +47 -48
- package/dist/types/types.d.ts +1 -0
- package/dist/types/ui/FloatingContextualButton/styles.d.ts +2 -3
- package/dist/types/ui/FloatingContextualMenu/ContextualMenu.d.ts +12 -2
- package/dist/types/ui/common-styles.d.ts +1 -2
- package/dist/types/ui/consts.d.ts +15 -15
- package/dist/types/ui/icons/MergeCellsIcon.d.ts +2 -0
- package/dist/types/ui/icons/SplitCellIcon.d.ts +2 -0
- package/dist/types/ui/icons/index.d.ts +2 -0
- package/dist/types/ui/ui-styles.d.ts +17 -18
- package/dist/types-ts4.5/types.d.ts +1 -0
- package/dist/types-ts4.5/ui/FloatingContextualButton/styles.d.ts +2 -3
- package/dist/types-ts4.5/ui/FloatingContextualMenu/ContextualMenu.d.ts +12 -2
- package/dist/types-ts4.5/ui/common-styles.d.ts +1 -2
- package/dist/types-ts4.5/ui/consts.d.ts +15 -15
- package/dist/types-ts4.5/ui/icons/MergeCellsIcon.d.ts +2 -0
- package/dist/types-ts4.5/ui/icons/SplitCellIcon.d.ts +2 -0
- package/dist/types-ts4.5/ui/icons/index.d.ts +2 -0
- package/dist/types-ts4.5/ui/ui-styles.d.ts +17 -18
- package/package.json +12 -5
- package/src/types.ts +1 -0
- package/src/ui/FloatingContextualButton/index.tsx +3 -5
- package/src/ui/FloatingContextualButton/styles.ts +13 -35
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +316 -68
- package/src/ui/FloatingContextualMenu/styles.ts +22 -3
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +1 -1
- package/src/ui/common-styles.ts +57 -69
- package/src/ui/consts.ts +52 -73
- package/src/ui/icons/MergeCellsIcon.tsx +32 -0
- package/src/ui/icons/SplitCellIcon.tsx +40 -0
- package/src/ui/icons/index.ts +2 -0
- package/src/ui/ui-styles.ts +94 -106
|
@@ -114,14 +114,14 @@ const breakoutWidthStyling = () => {
|
|
|
114
114
|
}
|
|
115
115
|
`;
|
|
116
116
|
};
|
|
117
|
-
const tableBorderStyles =
|
|
117
|
+
const tableBorderStyles = () => {
|
|
118
118
|
if (getBooleanFF('platform.editor.table.column-controls-styles-updated')) {
|
|
119
|
-
return `border-color: ${tableBorderDeleteColor
|
|
119
|
+
return `border-color: ${tableBorderDeleteColor}`;
|
|
120
120
|
} else {
|
|
121
|
-
return `border: 1px solid ${tableBorderDeleteColor
|
|
121
|
+
return `border: 1px solid ${tableBorderDeleteColor}`;
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
|
-
const tableStickyHeaderColumnControlsDecorationsStyle =
|
|
124
|
+
const tableStickyHeaderColumnControlsDecorationsStyle = () => {
|
|
125
125
|
if (getBooleanFF('platform.editor.table.column-controls-styles-updated')) {
|
|
126
126
|
return css`
|
|
127
127
|
.${ClassName.TABLE_STICKY} .${ClassName.COLUMN_CONTROLS_DECORATIONS} {
|
|
@@ -131,7 +131,7 @@ const tableStickyHeaderColumnControlsDecorationsStyle = props => {
|
|
|
131
131
|
|
|
132
132
|
.${ClassName.TABLE_STICKY}
|
|
133
133
|
.${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
|
|
134
|
-
border-left: 1px solid ${tableBorderColor
|
|
134
|
+
border-left: 1px solid ${tableBorderColor};
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.${ClassName.TABLE_STICKY}
|
|
@@ -152,7 +152,7 @@ const tableStickyHeaderColumnControlsDecorationsStyle = props => {
|
|
|
152
152
|
`;
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
|
-
const tableStickyHeaderFirefoxFixStyle =
|
|
155
|
+
const tableStickyHeaderFirefoxFixStyle = () => {
|
|
156
156
|
/*
|
|
157
157
|
This is MAGIC!
|
|
158
158
|
This fixes a bug which occurs in firefox when the first row becomes sticky.
|
|
@@ -211,13 +211,13 @@ export const tableStyles = props => css`
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
.ProseMirror {
|
|
214
|
-
${tableSharedStyle(
|
|
214
|
+
${tableSharedStyle()};
|
|
215
215
|
${columnControlsLineMarker()};
|
|
216
|
-
${hoveredDeleteButton(
|
|
217
|
-
${hoveredCell(
|
|
216
|
+
${hoveredDeleteButton()};
|
|
217
|
+
${hoveredCell()};
|
|
218
218
|
${hoveredWarningCell};
|
|
219
|
-
${getBooleanFF('platform.editor.table.drag-and-drop') && insertLine(
|
|
220
|
-
${resizeHandle(
|
|
219
|
+
${getBooleanFF('platform.editor.table.drag-and-drop') && insertLine()};
|
|
220
|
+
${resizeHandle()};
|
|
221
221
|
${rangeSelectionStyles};
|
|
222
222
|
|
|
223
223
|
.${ClassName.LAST_ITEM_IN_CELL} {
|
|
@@ -231,15 +231,15 @@ export const tableStyles = props => css`
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
td.${ClassName.TABLE_CELL} {
|
|
234
|
-
background-color: ${tableCellBackgroundColor
|
|
234
|
+
background-color: ${tableCellBackgroundColor};
|
|
235
235
|
|
|
236
236
|
// ED-15246: Trello card is visible through a border of a table border
|
|
237
237
|
// This fixes a border issue caused by relative positioned table cells
|
|
238
238
|
&::after {
|
|
239
239
|
height: 100%;
|
|
240
240
|
content: '';
|
|
241
|
-
border-left: 1px solid ${tableBorderColor
|
|
242
|
-
border-bottom: 1px solid ${tableBorderColor
|
|
241
|
+
border-left: 1px solid ${tableBorderColor};
|
|
242
|
+
border-bottom: 1px solid ${tableBorderColor};
|
|
243
243
|
position: absolute;
|
|
244
244
|
right: 0px;
|
|
245
245
|
top: 0px;
|
|
@@ -252,19 +252,19 @@ export const tableStyles = props => css`
|
|
|
252
252
|
}
|
|
253
253
|
|
|
254
254
|
.${ClassName.CONTROLS_FLOATING_BUTTON_COLUMN} {
|
|
255
|
-
${insertColumnButtonWrapper(
|
|
255
|
+
${insertColumnButtonWrapper()}
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
.${ClassName.CONTROLS_FLOATING_BUTTON_ROW} {
|
|
259
|
-
${insertRowButtonWrapper(
|
|
259
|
+
${insertRowButtonWrapper()}
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
${dragInsertButtonWrapper(
|
|
262
|
+
${dragInsertButtonWrapper()}
|
|
263
263
|
|
|
264
|
-
${dragCornerControlButton(
|
|
264
|
+
${dragCornerControlButton()}
|
|
265
265
|
|
|
266
266
|
/* Delete button */
|
|
267
|
-
${DeleteButton(
|
|
267
|
+
${DeleteButton()}
|
|
268
268
|
/* Ends Delete button */
|
|
269
269
|
|
|
270
270
|
/* sticky styles */
|
|
@@ -297,9 +297,9 @@ export const tableStyles = props => css`
|
|
|
297
297
|
width: ${tableToolbarSize}px;
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
${tableStickyHeaderColumnControlsDecorationsStyle(
|
|
300
|
+
${tableStickyHeaderColumnControlsDecorationsStyle()}
|
|
301
301
|
|
|
302
|
-
${tableStickyHeaderFirefoxFixStyle(
|
|
302
|
+
${tableStickyHeaderFirefoxFixStyle()}
|
|
303
303
|
|
|
304
304
|
.${ClassName.TABLE_STICKY}
|
|
305
305
|
.${ClassName.ROW_CONTROLS}
|
|
@@ -358,7 +358,7 @@ export const tableStyles = props => css`
|
|
|
358
358
|
|
|
359
359
|
tr.sticky th {
|
|
360
360
|
border-bottom: ${stickyHeaderBorderBottomWidth}px solid
|
|
361
|
-
${tableBorderColor
|
|
361
|
+
${tableBorderColor};
|
|
362
362
|
margin-right: -1px;
|
|
363
363
|
}
|
|
364
364
|
|
|
@@ -427,7 +427,7 @@ export const tableStyles = props => css`
|
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
${sentinelStyles}
|
|
430
|
-
${OverflowShadow(
|
|
430
|
+
${OverflowShadow()}
|
|
431
431
|
${stickyScrollbarStyles(props.featureFlags)}
|
|
432
432
|
|
|
433
433
|
.${ClassName.TABLE_STICKY} .${ClassName.TABLE_STICKY_SHADOW} {
|
|
@@ -482,8 +482,8 @@ export const tableStyles = props => css`
|
|
|
482
482
|
/* Breakout only works on top level unless wrapped in fragment mark */
|
|
483
483
|
${breakoutWidthStyling()}
|
|
484
484
|
|
|
485
|
-
${columnControlsDecoration(
|
|
486
|
-
${rowControlsWrapperDotStyle(
|
|
485
|
+
${columnControlsDecoration()};
|
|
486
|
+
${rowControlsWrapperDotStyle()};
|
|
487
487
|
|
|
488
488
|
/* Corner controls */
|
|
489
489
|
.${ClassName.CORNER_CONTROLS} {
|
|
@@ -494,7 +494,7 @@ export const tableStyles = props => css`
|
|
|
494
494
|
.${ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER} {
|
|
495
495
|
position: relative;
|
|
496
496
|
|
|
497
|
-
${InsertMarker(
|
|
497
|
+
${InsertMarker(`
|
|
498
498
|
left: -11px;
|
|
499
499
|
top: 9px;
|
|
500
500
|
`)};
|
|
@@ -513,10 +513,10 @@ export const tableStyles = props => css`
|
|
|
513
513
|
top: 0;
|
|
514
514
|
width: ${tableToolbarSize + 1}px;
|
|
515
515
|
height: ${tableToolbarSize + 1}px;
|
|
516
|
-
border: 1px solid ${tableBorderColor
|
|
516
|
+
border: 1px solid ${tableBorderColor};
|
|
517
517
|
border-radius: 0;
|
|
518
518
|
border-top-left-radius: ${tableBorderRadiusSize}px;
|
|
519
|
-
background: ${tableHeaderCellBackgroundColor
|
|
519
|
+
background: ${tableHeaderCellBackgroundColor};
|
|
520
520
|
box-sizing: border-box;
|
|
521
521
|
padding: 0;
|
|
522
522
|
:focus {
|
|
@@ -524,8 +524,8 @@ export const tableStyles = props => css`
|
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
.active .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
527
|
-
border-color: ${tableBorderSelectedColor
|
|
528
|
-
background: ${tableToolbarSelectedColor
|
|
527
|
+
border-color: ${tableBorderSelectedColor};
|
|
528
|
+
background: ${tableToolbarSelectedColor};
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
.${ClassName.TABLE_CONTAINER}[data-number-column='true'] {
|
|
@@ -538,15 +538,15 @@ export const tableStyles = props => css`
|
|
|
538
538
|
}
|
|
539
539
|
|
|
540
540
|
:not(.${ClassName.IS_RESIZING}) .${ClassName.CONTROLS_CORNER_BUTTON}:hover {
|
|
541
|
-
border-color: ${tableBorderSelectedColor
|
|
542
|
-
background: ${tableToolbarSelectedColor
|
|
541
|
+
border-color: ${tableBorderSelectedColor};
|
|
542
|
+
background: ${tableToolbarSelectedColor};
|
|
543
543
|
cursor: pointer;
|
|
544
544
|
}
|
|
545
545
|
|
|
546
546
|
:not(.${ClassName.IS_RESIZING})
|
|
547
547
|
.${ClassName.CONTROLS_CORNER_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
548
|
-
border-color: ${tableBorderDeleteColor
|
|
549
|
-
background: ${tableToolbarDeleteColor
|
|
548
|
+
border-color: ${tableBorderDeleteColor};
|
|
549
|
+
background: ${tableToolbarDeleteColor};
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
/* Row controls */
|
|
@@ -556,7 +556,7 @@ export const tableStyles = props => css`
|
|
|
556
556
|
display: none;
|
|
557
557
|
position: relative;
|
|
558
558
|
|
|
559
|
-
${InsertMarker(
|
|
559
|
+
${InsertMarker(`
|
|
560
560
|
bottom: -1px;
|
|
561
561
|
left: -11px;
|
|
562
562
|
`)};
|
|
@@ -578,8 +578,8 @@ export const tableStyles = props => css`
|
|
|
578
578
|
z-index: ${akEditorUnitZIndex};
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
${HeaderButton(
|
|
582
|
-
border-bottom: 1px solid ${tableBorderColor
|
|
581
|
+
${HeaderButton(`
|
|
582
|
+
border-bottom: 1px solid ${tableBorderColor};
|
|
583
583
|
border-right: 0px;
|
|
584
584
|
border-radius: 0;
|
|
585
585
|
height: 100%;
|
|
@@ -720,11 +720,11 @@ export const tableStyles = props => css`
|
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
|
|
723
|
-
${floatingColumnControls(
|
|
723
|
+
${floatingColumnControls()}
|
|
724
724
|
|
|
725
725
|
:not(.${ClassName.IS_RESIZING}) .${ClassName.ROW_CONTROLS} {
|
|
726
|
-
${HeaderButtonHover(
|
|
727
|
-
${HeaderButtonDanger(
|
|
726
|
+
${HeaderButtonHover()}
|
|
727
|
+
${HeaderButtonDanger()}
|
|
728
728
|
}
|
|
729
729
|
|
|
730
730
|
/* Numbered column */
|
|
@@ -738,23 +738,23 @@ export const tableStyles = props => css`
|
|
|
738
738
|
}
|
|
739
739
|
|
|
740
740
|
.${ClassName.NUMBERED_COLUMN_BUTTON} {
|
|
741
|
-
border: 1px solid ${tableBorderColor
|
|
741
|
+
border: 1px solid ${tableBorderColor};
|
|
742
742
|
box-sizing: border-box;
|
|
743
743
|
margin-top: -1px;
|
|
744
744
|
padding-bottom: 2px;
|
|
745
745
|
padding: 10px 2px;
|
|
746
746
|
text-align: center;
|
|
747
747
|
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
748
|
-
background-color: ${tableHeaderCellBackgroundColor
|
|
749
|
-
color: ${tableTextColor
|
|
750
|
-
border-color: ${tableBorderColor
|
|
748
|
+
background-color: ${tableHeaderCellBackgroundColor};
|
|
749
|
+
color: ${tableTextColor};
|
|
750
|
+
border-color: ${tableBorderColor};
|
|
751
751
|
|
|
752
752
|
:first-child:not(style),
|
|
753
753
|
style:first-child + * {
|
|
754
754
|
margin-top: 0;
|
|
755
755
|
}
|
|
756
756
|
:last-child {
|
|
757
|
-
border-bottom: 1px solid ${tableBorderColor
|
|
757
|
+
border-bottom: 1px solid ${tableBorderColor};
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
|
|
@@ -787,9 +787,9 @@ export const tableStyles = props => css`
|
|
|
787
787
|
}
|
|
788
788
|
|
|
789
789
|
.${ClassName.NUMBERED_COLUMN_BUTTON}.active {
|
|
790
|
-
border-bottom: 1px solid ${tableBorderSelectedColor
|
|
791
|
-
border-color: ${tableBorderSelectedColor
|
|
792
|
-
background-color: ${tableToolbarSelectedColor
|
|
790
|
+
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
791
|
+
border-color: ${tableBorderSelectedColor};
|
|
792
|
+
background-color: ${tableToolbarSelectedColor};
|
|
793
793
|
position: relative;
|
|
794
794
|
z-index: ${akEditorUnitZIndex};
|
|
795
795
|
color: ${`var(--ds-text-selected, ${N0})`};
|
|
@@ -801,16 +801,16 @@ export const tableStyles = props => css`
|
|
|
801
801
|
cursor: pointer;
|
|
802
802
|
}
|
|
803
803
|
.${ClassName.NUMBERED_COLUMN_BUTTON}:not(.${ClassName.NUMBERED_COLUMN_BUTTON_DISABLED}):hover {
|
|
804
|
-
border-bottom: 1px solid ${tableBorderSelectedColor
|
|
805
|
-
border-color: ${tableBorderSelectedColor
|
|
806
|
-
background-color: ${tableToolbarSelectedColor
|
|
804
|
+
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
805
|
+
border-color: ${tableBorderSelectedColor};
|
|
806
|
+
background-color: ${tableToolbarSelectedColor};
|
|
807
807
|
position: relative;
|
|
808
808
|
z-index: ${akEditorUnitZIndex};
|
|
809
809
|
color: ${`var(--ds-text-selected, ${N0})`};
|
|
810
810
|
}
|
|
811
811
|
.${ClassName.NUMBERED_COLUMN_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
812
|
-
background-color: ${tableToolbarDeleteColor
|
|
813
|
-
border: 1px solid ${tableBorderDeleteColor
|
|
812
|
+
background-color: ${tableToolbarDeleteColor};
|
|
813
|
+
border: 1px solid ${tableBorderDeleteColor};
|
|
814
814
|
border-left: 0;
|
|
815
815
|
color: ${`var(--ds-text-danger, ${R500})`};
|
|
816
816
|
position: relative;
|
|
@@ -871,15 +871,15 @@ export const tableStyles = props => css`
|
|
|
871
871
|
pointer-events: none;
|
|
872
872
|
}
|
|
873
873
|
.${ClassName.SELECTED_CELL} {
|
|
874
|
-
border: 1px solid ${tableBorderSelectedColor
|
|
874
|
+
border: 1px solid ${tableBorderSelectedColor};
|
|
875
875
|
}
|
|
876
876
|
.${ClassName.SELECTED_CELL}::after {
|
|
877
|
-
background: ${tableCellSelectedColor
|
|
877
|
+
background: ${tableCellSelectedColor};
|
|
878
878
|
z-index: ${akEditorSmallZIndex};
|
|
879
879
|
}
|
|
880
880
|
th.${ClassName.HOVERED_CELL_IN_DANGER}::after,
|
|
881
881
|
td.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
882
|
-
background: ${tableCellDeleteColor
|
|
882
|
+
background: ${tableCellDeleteColor};
|
|
883
883
|
z-index: ${akEditorUnitZIndex * 100};
|
|
884
884
|
}
|
|
885
885
|
// ED-15246: Trello card is visible through a border of a table border
|
|
@@ -893,7 +893,7 @@ export const tableStyles = props => css`
|
|
|
893
893
|
&::after {
|
|
894
894
|
height: 100%;
|
|
895
895
|
width: 100%;
|
|
896
|
-
border: 1px solid ${tableBorderSelectedColor
|
|
896
|
+
border: 1px solid ${tableBorderSelectedColor};
|
|
897
897
|
content: '';
|
|
898
898
|
position: absolute;
|
|
899
899
|
left: -1px;
|
|
@@ -904,12 +904,12 @@ export const tableStyles = props => css`
|
|
|
904
904
|
pointer-events: none;
|
|
905
905
|
}
|
|
906
906
|
&.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
907
|
-
${tableBorderStyles(
|
|
907
|
+
${tableBorderStyles()};
|
|
908
908
|
z-index: ${akEditorUnitZIndex * 100};
|
|
909
909
|
}
|
|
910
910
|
|
|
911
911
|
&.${ClassName.HOVERED_NO_HIGHLIGHT}.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
912
|
-
${tableBorderStyles(
|
|
912
|
+
${tableBorderStyles()};
|
|
913
913
|
z-index: ${akEditorUnitZIndex * 100};
|
|
914
914
|
}
|
|
915
915
|
}
|
package/dist/es2019/ui/consts.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
2
|
-
import { akEditorTableBorder,
|
|
3
|
-
import { B200,
|
|
4
|
-
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
5
|
-
import { themed } from '@atlaskit/theme/components';
|
|
2
|
+
import { akEditorTableBorder, akEditorTableBorderSelected, akEditorTableCellBlanketDeleted, akEditorTableCellBlanketSelected, akEditorTableHeaderCellBackground, akEditorTableToolbar, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
3
|
+
import { B200, N0, N20, N200, N20A, N300, R300, R400, R75 } from '@atlaskit/theme/colors';
|
|
6
4
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
|
|
7
5
|
|
|
8
6
|
/**
|
|
@@ -10,68 +8,24 @@ import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
|
|
|
10
8
|
*/
|
|
11
9
|
|
|
12
10
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4135
|
|
13
|
-
export const tableCellBackgroundColor =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
17
|
-
export const
|
|
18
|
-
light: `var(--ds-background-accent-gray-subtlest, ${akEditorTableHeaderCellBackground})`,
|
|
19
|
-
dark: `var(--ds-background-accent-gray-subtlest, ${akEditorTableHeaderCellBackgroundDark})`
|
|
20
|
-
});
|
|
21
|
-
export const tableToolbarColor = themed({
|
|
22
|
-
light: `var(--ds-background-neutral-subtle, ${akEditorTableToolbar})`,
|
|
23
|
-
dark: `var(--ds-background-neutral-subtle, ${akEditorTableToolbarDark})`
|
|
24
|
-
});
|
|
25
|
-
export const tableTextColor = themed({
|
|
26
|
-
light: `var(--ds-text-subtlest, ${N200})`,
|
|
27
|
-
dark: `var(--ds-text-subtlest, ${DN400})`
|
|
28
|
-
});
|
|
29
|
-
export const tableBorderColor = themed({
|
|
30
|
-
light: `var(--ds-background-accent-gray-subtler, ${akEditorTableBorder})`,
|
|
31
|
-
dark: `var(--ds-background-accent-gray-subtler, ${akEditorTableBorderDark})`
|
|
32
|
-
});
|
|
11
|
+
export const tableCellBackgroundColor = `var(--ds-surface, ${N0})`;
|
|
12
|
+
export const tableHeaderCellBackgroundColor = `var(--ds-background-accent-gray-subtlest, ${akEditorTableHeaderCellBackground})`;
|
|
13
|
+
export const tableToolbarColor = `var(--ds-background-neutral-subtle, ${akEditorTableToolbar})`;
|
|
14
|
+
export const tableTextColor = `var(--ds-text-subtlest, ${N200})`;
|
|
15
|
+
export const tableBorderColor = `var(--ds-background-accent-gray-subtler, ${akEditorTableBorder})`;
|
|
33
16
|
export const tableFloatingControlsColor = `var(--ds-background-neutral, ${N20})`;
|
|
17
|
+
|
|
34
18
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4461
|
|
35
|
-
export const tableCellSelectedColor =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
})
|
|
39
|
-
export const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
})
|
|
43
|
-
export const
|
|
44
|
-
|
|
45
|
-
dark: `var(--ds-border-focused, ${akEditorTableBorderSelected})`
|
|
46
|
-
});
|
|
47
|
-
export const tableCellSelectedDeleteIconColor = themed({
|
|
48
|
-
light: `var(--ds-icon-subtle, ${N300})`,
|
|
49
|
-
dark: `var(--ds-icon-subtle, ${N300})`
|
|
50
|
-
});
|
|
51
|
-
export const tableCellSelectedDeleteIconBackground = themed({
|
|
52
|
-
light: `var(--ds-background-accent-gray-subtlest, ${N20A})`,
|
|
53
|
-
dark: `var(--ds-background-accent-gray-subtlest, ${N20A})`
|
|
54
|
-
});
|
|
55
|
-
export const tableCellDeleteColor = themed({
|
|
56
|
-
light: `var(--ds-blanket-danger, ${akEditorTableCellBlanketDeleted})`,
|
|
57
|
-
dark: `var(--ds-blanket-danger, ${akEditorTableCellBlanketDeleted})`
|
|
58
|
-
});
|
|
59
|
-
export const tableBorderDeleteColor = themed({
|
|
60
|
-
light: `var(--ds-border-danger, ${R400})`,
|
|
61
|
-
dark: `var(--ds-border-danger, ${R400})`
|
|
62
|
-
});
|
|
63
|
-
export const tableToolbarDeleteColor = themed({
|
|
64
|
-
light: `var(--ds-background-danger-pressed, ${R75})`,
|
|
65
|
-
dark: `var(--ds-background-danger-pressed, ${R75})`
|
|
66
|
-
});
|
|
67
|
-
export const tableCellHoverDeleteIconColor = themed({
|
|
68
|
-
light: "var(--ds-icon-inverse, white)",
|
|
69
|
-
dark: "var(--ds-icon-inverse, white)"
|
|
70
|
-
});
|
|
71
|
-
export const tableCellHoverDeleteIconBackground = themed({
|
|
72
|
-
light: `var(--ds-background-danger-bold, ${R300})`,
|
|
73
|
-
dark: `var(--ds-background-danger-bold, ${R300})`
|
|
74
|
-
});
|
|
19
|
+
export const tableCellSelectedColor = `var(--ds-blanket-selected, ${akEditorTableCellBlanketSelected})`;
|
|
20
|
+
export const tableToolbarSelectedColor = `var(--ds-background-selected-pressed, ${B200})`;
|
|
21
|
+
export const tableBorderSelectedColor = `var(--ds-border-focused, ${akEditorTableBorderSelected})`;
|
|
22
|
+
export const tableCellSelectedDeleteIconColor = `var(--ds-icon-subtle, ${N300})`;
|
|
23
|
+
export const tableCellSelectedDeleteIconBackground = `var(--ds-background-accent-gray-subtlest, ${N20A})`;
|
|
24
|
+
export const tableCellDeleteColor = `var(--ds-blanket-danger, ${akEditorTableCellBlanketDeleted})`;
|
|
25
|
+
export const tableBorderDeleteColor = `var(--ds-border-danger, ${R400})`;
|
|
26
|
+
export const tableToolbarDeleteColor = `var(--ds-background-danger-pressed, ${R75})`;
|
|
27
|
+
export const tableCellHoverDeleteIconColor = "var(--ds-icon-inverse, white)";
|
|
28
|
+
export const tableCellHoverDeleteIconBackground = `var(--ds-background-danger-bold, ${R300})`;
|
|
75
29
|
export const tableBorderRadiusSize = 3;
|
|
76
30
|
export const tablePadding = 8;
|
|
77
31
|
export const tableScrollbarOffset = 15;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const MergeCellsIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
3
|
+
width: "24",
|
|
4
|
+
height: "24",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
fill: "none",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
8
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
9
|
+
fillRule: "evenodd",
|
|
10
|
+
clipRule: "evenodd",
|
|
11
|
+
d: "M10 19C10.5523 19 11 18.5523 11 18C11 17.4477 10.5523 17 10 17H6V7L10 7C10.5523 7 11 6.55228 11 6C11 5.44771 10.5523 5 10 5H6C4.89543 5 4 5.89543 4 7V17C4 18.1046 4.89543 19 6 19H10ZM14 5C13.4477 5 13 5.44772 13 6C13 6.55228 13.4477 7 14 7H18V17L14 17C13.4477 17 13 17.4477 13 18C13 18.5523 13.4477 19 14 19H18C19.1046 19 20 18.1046 20 17V7C20 5.89543 19.1046 5 18 5H14Z",
|
|
12
|
+
fill: "currentColor"
|
|
13
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
14
|
+
d: "M15.75 10L13.75 12L15.75 14",
|
|
15
|
+
stroke: "currentColor",
|
|
16
|
+
strokeWidth: "1.5",
|
|
17
|
+
strokeLinecap: "round",
|
|
18
|
+
strokeLinejoin: "round"
|
|
19
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
d: "M8.25 14L10.25 12L8.25 10",
|
|
21
|
+
stroke: "currentColor",
|
|
22
|
+
strokeWidth: "1.5",
|
|
23
|
+
strokeLinecap: "round",
|
|
24
|
+
strokeLinejoin: "round"
|
|
25
|
+
}));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export const SplitCellIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
3
|
+
width: "24",
|
|
4
|
+
height: "24",
|
|
5
|
+
viewBox: "0 0 24 24",
|
|
6
|
+
fill: "none",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
8
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
9
|
+
d: "M19 18L14 18L14 6L19 6",
|
|
10
|
+
stroke: "currentColor",
|
|
11
|
+
strokeWidth: "2",
|
|
12
|
+
strokeLinecap: "round",
|
|
13
|
+
strokeLinejoin: "round"
|
|
14
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
15
|
+
d: "M5 6L10 6L9.99999 18L5 18",
|
|
16
|
+
stroke: "currentColor",
|
|
17
|
+
strokeWidth: "2",
|
|
18
|
+
strokeLinecap: "round",
|
|
19
|
+
strokeLinejoin: "round"
|
|
20
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
21
|
+
d: "M7 10L5 12L7 14",
|
|
22
|
+
stroke: "currentColor",
|
|
23
|
+
strokeWidth: "1.5",
|
|
24
|
+
strokeLinecap: "round",
|
|
25
|
+
strokeLinejoin: "round"
|
|
26
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
27
|
+
d: "M17 14L19 12L17 10",
|
|
28
|
+
stroke: "currentColor",
|
|
29
|
+
strokeWidth: "1.5",
|
|
30
|
+
strokeLinecap: "round",
|
|
31
|
+
strokeLinejoin: "round"
|
|
32
|
+
}));
|
|
@@ -2,6 +2,8 @@ export { DragHandleIcon } from './DragHandleIcon';
|
|
|
2
2
|
export { DragInMotionIcon } from './DragInMotionIcon';
|
|
3
3
|
export { DragHandleDisabledIcon } from './DragHandleDisabledIcon';
|
|
4
4
|
export { MinimisedHandleIcon } from './MinimisedHandle';
|
|
5
|
+
export { MergeCellsIcon } from './MergeCellsIcon';
|
|
6
|
+
export { SplitCellIcon } from './SplitCellIcon';
|
|
5
7
|
export { AddRowAboveIcon } from './AddRowAboveIcon';
|
|
6
8
|
export { AddRowBelowIcon } from './AddRowBelowIcon';
|
|
7
9
|
export { AddColLeftIcon } from './AddColLeftIcon';
|