@atlaskit/editor-plugin-table 2.5.0 → 2.5.2
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 +12 -0
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -1
- package/dist/cjs/plugins/table/ui/consts.js +46 -8
- package/dist/cjs/plugins/table/ui/ui-styles.js +29 -15
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/es2019/plugins/table/ui/common-styles.js +27 -27
- package/dist/es2019/plugins/table/ui/consts.js +43 -9
- package/dist/es2019/plugins/table/ui/ui-styles.js +38 -38
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +1 -1
- package/dist/esm/plugins/table/ui/common-styles.js +1 -1
- package/dist/esm/plugins/table/ui/consts.js +43 -9
- package/dist/esm/plugins/table/ui/ui-styles.js +31 -17
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/table/ui/consts.d.ts +11 -7
- package/dist/types/plugins/table/ui/ui-styles.d.ts +8 -8
- package/dist/types-ts4.5/plugins/table/ui/consts.d.ts +11 -7
- package/dist/types-ts4.5/plugins/table/ui/ui-styles.d.ts +8 -8
- package/package.json +2 -2
- package/src/__tests__/unit/pm-plugins/main.ts +11 -0
- package/src/__tests__/unit/ui/FloatingContextualButton.tsx +11 -0
- package/src/__tests__/unit/ui/FloatingInsertButton.tsx +11 -0
- package/src/plugins/table/ui/FloatingContextualButton/styles.ts +1 -1
- package/src/plugins/table/ui/common-styles.ts +27 -42
- package/src/plugins/table/ui/consts.ts +47 -20
- package/src/plugins/table/ui/ui-styles.ts +49 -64
- package/tmp/api-report-tmp.d.ts +108 -0
|
@@ -7,12 +7,16 @@ export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<"v
|
|
|
7
7
|
export declare const tableTextColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
|
|
8
8
|
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtler)">;
|
|
9
9
|
export declare const tableFloatingControlsColor: "var(--ds-background-neutral)";
|
|
10
|
-
export declare const tableCellSelectedColor: "var(--ds-blanket-selected)"
|
|
11
|
-
export declare const tableToolbarSelectedColor: "var(--ds-background-selected-
|
|
12
|
-
export declare const tableBorderSelectedColor: "var(--ds-border-
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
10
|
+
export declare const tableCellSelectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-blanket-selected)">;
|
|
11
|
+
export declare const tableToolbarSelectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-selected-pressed)">;
|
|
12
|
+
export declare const tableBorderSelectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border-focused)">;
|
|
13
|
+
export declare const tableCellSelectedDeleteIconColor: import("@atlaskit/theme").ThemedValue<"var(--ds-icon-subtle)">;
|
|
14
|
+
export declare const tableCellSelectedDeleteIconBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtlest)">;
|
|
15
|
+
export declare const tableCellDeleteColor: import("@atlaskit/theme").ThemedValue<"var(--ds-blanket-danger)">;
|
|
16
|
+
export declare const tableBorderDeleteColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border-danger)">;
|
|
17
|
+
export declare const tableToolbarDeleteColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-danger-pressed)">;
|
|
18
|
+
export declare const tableCellHoverDeleteIconColor: import("@atlaskit/theme").ThemedValue<"var(--ds-icon-inverse)">;
|
|
19
|
+
export declare const tableCellHoverDeleteIconBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-danger-bold)">;
|
|
16
20
|
export declare const tableBorderRadiusSize = 3;
|
|
17
21
|
export declare const tablePadding = 8;
|
|
18
22
|
export declare const tableScrollbarOffset = 15;
|
|
@@ -38,5 +42,5 @@ export declare const contextualMenuDropdownWidth = 180;
|
|
|
38
42
|
export declare const stickyRowZIndex: number;
|
|
39
43
|
export declare const stickyRowOffsetTop = 8;
|
|
40
44
|
export declare const stickyHeaderBorderBottomWidth = 1;
|
|
41
|
-
export declare const TABLE_SNAP_GAP =
|
|
45
|
+
export declare const TABLE_SNAP_GAP = 9;
|
|
42
46
|
export declare const TABLE_HIGHLIGHT_GAP = 10;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
2
|
export declare const InsertMarker: (props: ThemeProps, cssString?: string) => import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const HeaderButton: (props: ThemeProps, cssString?: string) => import("@emotion/react").SerializedStyles;
|
|
4
|
-
export declare const HeaderButtonHover: () => import("@emotion/react").SerializedStyles;
|
|
5
|
-
export declare const HeaderButtonDanger: () => import("@emotion/react").SerializedStyles;
|
|
6
|
-
export declare const insertColumnButtonWrapper: import("@emotion/react").SerializedStyles;
|
|
7
|
-
export declare const insertRowButtonWrapper: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const HeaderButtonHover: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const HeaderButtonDanger: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const insertColumnButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const insertRowButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
8
8
|
export declare const columnControlsLineMarker: () => import("@emotion/react").SerializedStyles;
|
|
9
|
-
export declare const DeleteButton: import("@emotion/react").SerializedStyles;
|
|
9
|
+
export declare const DeleteButton: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
10
10
|
export declare const OverflowShadow: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
11
11
|
export declare const columnControlsDecoration: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
12
|
-
export declare const hoveredDeleteButton: import("@emotion/react").SerializedStyles;
|
|
13
|
-
export declare const hoveredCell: import("@emotion/react").SerializedStyles;
|
|
12
|
+
export declare const hoveredDeleteButton: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
13
|
+
export declare const hoveredCell: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
14
14
|
export declare const hoveredWarningCell: import("@emotion/react").SerializedStyles;
|
|
15
|
-
export declare const resizeHandle: import("@emotion/react").SerializedStyles;
|
|
15
|
+
export declare const resizeHandle: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -7,12 +7,16 @@ export declare const tableToolbarColor: import("@atlaskit/theme").ThemedValue<"v
|
|
|
7
7
|
export declare const tableTextColor: import("@atlaskit/theme").ThemedValue<"var(--ds-text-subtlest)">;
|
|
8
8
|
export declare const tableBorderColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtler)">;
|
|
9
9
|
export declare const tableFloatingControlsColor: "var(--ds-background-neutral)";
|
|
10
|
-
export declare const tableCellSelectedColor: "var(--ds-blanket-selected)"
|
|
11
|
-
export declare const tableToolbarSelectedColor: "var(--ds-background-selected-
|
|
12
|
-
export declare const tableBorderSelectedColor: "var(--ds-border-
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
10
|
+
export declare const tableCellSelectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-blanket-selected)">;
|
|
11
|
+
export declare const tableToolbarSelectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-selected-pressed)">;
|
|
12
|
+
export declare const tableBorderSelectedColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border-focused)">;
|
|
13
|
+
export declare const tableCellSelectedDeleteIconColor: import("@atlaskit/theme").ThemedValue<"var(--ds-icon-subtle)">;
|
|
14
|
+
export declare const tableCellSelectedDeleteIconBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-accent-gray-subtlest)">;
|
|
15
|
+
export declare const tableCellDeleteColor: import("@atlaskit/theme").ThemedValue<"var(--ds-blanket-danger)">;
|
|
16
|
+
export declare const tableBorderDeleteColor: import("@atlaskit/theme").ThemedValue<"var(--ds-border-danger)">;
|
|
17
|
+
export declare const tableToolbarDeleteColor: import("@atlaskit/theme").ThemedValue<"var(--ds-background-danger-pressed)">;
|
|
18
|
+
export declare const tableCellHoverDeleteIconColor: import("@atlaskit/theme").ThemedValue<"var(--ds-icon-inverse)">;
|
|
19
|
+
export declare const tableCellHoverDeleteIconBackground: import("@atlaskit/theme").ThemedValue<"var(--ds-background-danger-bold)">;
|
|
16
20
|
export declare const tableBorderRadiusSize = 3;
|
|
17
21
|
export declare const tablePadding = 8;
|
|
18
22
|
export declare const tableScrollbarOffset = 15;
|
|
@@ -38,5 +42,5 @@ export declare const contextualMenuDropdownWidth = 180;
|
|
|
38
42
|
export declare const stickyRowZIndex: number;
|
|
39
43
|
export declare const stickyRowOffsetTop = 8;
|
|
40
44
|
export declare const stickyHeaderBorderBottomWidth = 1;
|
|
41
|
-
export declare const TABLE_SNAP_GAP =
|
|
45
|
+
export declare const TABLE_SNAP_GAP = 9;
|
|
42
46
|
export declare const TABLE_HIGHLIGHT_GAP = 10;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ThemeProps } from '@atlaskit/theme/types';
|
|
2
2
|
export declare const InsertMarker: (props: ThemeProps, cssString?: string) => import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const HeaderButton: (props: ThemeProps, cssString?: string) => import("@emotion/react").SerializedStyles;
|
|
4
|
-
export declare const HeaderButtonHover: () => import("@emotion/react").SerializedStyles;
|
|
5
|
-
export declare const HeaderButtonDanger: () => import("@emotion/react").SerializedStyles;
|
|
6
|
-
export declare const insertColumnButtonWrapper: import("@emotion/react").SerializedStyles;
|
|
7
|
-
export declare const insertRowButtonWrapper: import("@emotion/react").SerializedStyles;
|
|
4
|
+
export declare const HeaderButtonHover: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
5
|
+
export declare const HeaderButtonDanger: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
6
|
+
export declare const insertColumnButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
7
|
+
export declare const insertRowButtonWrapper: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
8
8
|
export declare const columnControlsLineMarker: () => import("@emotion/react").SerializedStyles;
|
|
9
|
-
export declare const DeleteButton: import("@emotion/react").SerializedStyles;
|
|
9
|
+
export declare const DeleteButton: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
10
10
|
export declare const OverflowShadow: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
11
11
|
export declare const columnControlsDecoration: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
12
|
-
export declare const hoveredDeleteButton: import("@emotion/react").SerializedStyles;
|
|
13
|
-
export declare const hoveredCell: import("@emotion/react").SerializedStyles;
|
|
12
|
+
export declare const hoveredDeleteButton: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
13
|
+
export declare const hoveredCell: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
|
14
14
|
export declare const hoveredWarningCell: import("@emotion/react").SerializedStyles;
|
|
15
|
-
export declare const resizeHandle: import("@emotion/react").SerializedStyles;
|
|
15
|
+
export declare const resizeHandle: (props: ThemeProps) => import("@emotion/react").SerializedStyles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-table",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "Table plugin for the @atlaskit/editor",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/adf-schema": "^26.2.0",
|
|
31
|
-
"@atlaskit/editor-common": "^74.
|
|
31
|
+
"@atlaskit/editor-common": "^74.26.0",
|
|
32
32
|
"@atlaskit/editor-palette": "1.5.1",
|
|
33
33
|
"@atlaskit/editor-plugin-analytics": "^0.1.0",
|
|
34
34
|
"@atlaskit/editor-plugin-content-insertion": "^0.0.6",
|
|
@@ -34,6 +34,17 @@ import * as miscCommands from '../../../plugins/table/commands/misc';
|
|
|
34
34
|
import { getPluginState } from '../../../plugins/table/pm-plugins/plugin-factory';
|
|
35
35
|
import { pluginKey } from '../../../plugins/table/pm-plugins/plugin-key';
|
|
36
36
|
|
|
37
|
+
jest.mock('prosemirror-utils', () => {
|
|
38
|
+
// Unblock prosemirror bump:
|
|
39
|
+
// Workaround to enable spy on prosemirror-utils cjs bundle
|
|
40
|
+
const originalModule = jest.requireActual('prosemirror-utils');
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
__esModule: true,
|
|
44
|
+
...originalModule,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
|
|
37
48
|
describe('tables: main plugin', () => {
|
|
38
49
|
const createEditor = createProsemirrorEditorFactory();
|
|
39
50
|
const editor = (doc: DocBuilder) =>
|
|
@@ -32,6 +32,17 @@ import FloatingContextualButton, {
|
|
|
32
32
|
Props as FloatingContextualButtonProps,
|
|
33
33
|
} from '../../../plugins/table/ui/FloatingContextualButton';
|
|
34
34
|
|
|
35
|
+
jest.mock('prosemirror-utils', () => {
|
|
36
|
+
// Unblock prosemirror bump:
|
|
37
|
+
// Workaround to enable spy on prosemirror-utils cjs bundle
|
|
38
|
+
const originalModule = jest.requireActual('prosemirror-utils');
|
|
39
|
+
|
|
40
|
+
return {
|
|
41
|
+
__esModule: true,
|
|
42
|
+
...originalModule,
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
|
|
35
46
|
const createEditor = createProsemirrorEditorFactory();
|
|
36
47
|
let createAnalyticsEvent = jest.fn(() => ({ fire() {} } as UIAnalyticsEvent));
|
|
37
48
|
const editor = (doc: DocBuilder) =>
|
|
@@ -39,6 +39,17 @@ import {
|
|
|
39
39
|
Props as FloatingInsertButtonProps,
|
|
40
40
|
} from '../../../plugins/table/ui/FloatingInsertButton';
|
|
41
41
|
|
|
42
|
+
jest.mock('prosemirror-utils', () => {
|
|
43
|
+
// Unblock prosemirror bump:
|
|
44
|
+
// Workaround to enable spy on prosemirror-utils cjs bundle
|
|
45
|
+
const originalModule = jest.requireActual('prosemirror-utils');
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
__esModule: true,
|
|
49
|
+
...originalModule,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
|
|
42
53
|
const getEditorContainerWidth = () => ({ width: 500 });
|
|
43
54
|
const createEditor = createEditorFactory<TablePluginState>();
|
|
44
55
|
const createAnalyticsEvent = jest.fn(() => ({ fire() {} } as UIAnalyticsEvent));
|
|
@@ -24,7 +24,7 @@ export const tableFloatingCellButtonStyles = (props: ThemeProps) => css`
|
|
|
24
24
|
})(props)};
|
|
25
25
|
flex-direction: column;
|
|
26
26
|
margin: 2px;
|
|
27
|
-
outline: 2px solid ${token('
|
|
27
|
+
outline: 2px solid ${token('elevation.surface', N0)};
|
|
28
28
|
border-radius: 1px;
|
|
29
29
|
padding: 0;
|
|
30
30
|
height: calc(100% - 4px);
|
|
@@ -185,10 +185,10 @@ export const tableStyles = (
|
|
|
185
185
|
.ProseMirror {
|
|
186
186
|
${tableSharedStyle(props)};
|
|
187
187
|
${columnControlsLineMarker()};
|
|
188
|
-
${hoveredDeleteButton};
|
|
189
|
-
${hoveredCell};
|
|
188
|
+
${hoveredDeleteButton(props)};
|
|
189
|
+
${hoveredCell(props)};
|
|
190
190
|
${hoveredWarningCell};
|
|
191
|
-
${resizeHandle};
|
|
191
|
+
${resizeHandle(props)};
|
|
192
192
|
${rangeSelectionStyles};
|
|
193
193
|
|
|
194
194
|
.${ClassName.LAST_ITEM_IN_CELL} {
|
|
@@ -223,15 +223,15 @@ export const tableStyles = (
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
.${ClassName.CONTROLS_FLOATING_BUTTON_COLUMN} {
|
|
226
|
-
${insertColumnButtonWrapper}
|
|
226
|
+
${insertColumnButtonWrapper(props)}
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
.${ClassName.CONTROLS_FLOATING_BUTTON_ROW} {
|
|
230
|
-
${insertRowButtonWrapper}
|
|
230
|
+
${insertRowButtonWrapper(props)}
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
/* Delete button */
|
|
234
|
-
${DeleteButton}
|
|
234
|
+
${DeleteButton(props)}
|
|
235
235
|
/* Ends Delete button */
|
|
236
236
|
|
|
237
237
|
/* sticky styles */
|
|
@@ -485,11 +485,8 @@ export const tableStyles = (
|
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
.active .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
488
|
-
border-color: ${tableBorderSelectedColor};
|
|
489
|
-
background: ${
|
|
490
|
-
'color.background.selected',
|
|
491
|
-
tableToolbarSelectedColor,
|
|
492
|
-
)};
|
|
488
|
+
border-color: ${tableBorderSelectedColor(props)};
|
|
489
|
+
background: ${tableToolbarSelectedColor(props)};
|
|
493
490
|
}
|
|
494
491
|
|
|
495
492
|
.${ClassName.TABLE_CONTAINER}[data-number-column='true'] {
|
|
@@ -502,18 +499,15 @@ export const tableStyles = (
|
|
|
502
499
|
}
|
|
503
500
|
|
|
504
501
|
:not(.${ClassName.IS_RESIZING}) .${ClassName.CONTROLS_CORNER_BUTTON}:hover {
|
|
505
|
-
border-color: ${tableBorderSelectedColor};
|
|
506
|
-
background: ${
|
|
507
|
-
'color.background.selected',
|
|
508
|
-
tableToolbarSelectedColor,
|
|
509
|
-
)};
|
|
502
|
+
border-color: ${tableBorderSelectedColor(props)};
|
|
503
|
+
background: ${tableToolbarSelectedColor(props)};
|
|
510
504
|
cursor: pointer;
|
|
511
505
|
}
|
|
512
506
|
|
|
513
507
|
:not(.${ClassName.IS_RESIZING})
|
|
514
508
|
.${ClassName.CONTROLS_CORNER_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
515
|
-
border-color: ${tableBorderDeleteColor};
|
|
516
|
-
background: ${
|
|
509
|
+
border-color: ${tableBorderDeleteColor(props)};
|
|
510
|
+
background: ${tableToolbarDeleteColor(props)};
|
|
517
511
|
}
|
|
518
512
|
|
|
519
513
|
/* Row controls */
|
|
@@ -572,8 +566,8 @@ export const tableStyles = (
|
|
|
572
566
|
}
|
|
573
567
|
|
|
574
568
|
:not(.${ClassName.IS_RESIZING}) .${ClassName.ROW_CONTROLS} {
|
|
575
|
-
${HeaderButtonHover()}
|
|
576
|
-
${HeaderButtonDanger()}
|
|
569
|
+
${HeaderButtonHover(props)}
|
|
570
|
+
${HeaderButtonDanger(props)}
|
|
577
571
|
}
|
|
578
572
|
|
|
579
573
|
/* Numbered column */
|
|
@@ -618,12 +612,9 @@ export const tableStyles = (
|
|
|
618
612
|
}
|
|
619
613
|
|
|
620
614
|
.${ClassName.NUMBERED_COLUMN_BUTTON}.active {
|
|
621
|
-
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
622
|
-
border-color: ${tableBorderSelectedColor};
|
|
623
|
-
background-color: ${
|
|
624
|
-
'color.background.selected',
|
|
625
|
-
tableToolbarSelectedColor,
|
|
626
|
-
)};
|
|
615
|
+
border-bottom: 1px solid ${tableBorderSelectedColor(props)};
|
|
616
|
+
border-color: ${tableBorderSelectedColor(props)};
|
|
617
|
+
background-color: ${tableToolbarSelectedColor(props)};
|
|
627
618
|
position: relative;
|
|
628
619
|
z-index: ${akEditorUnitZIndex};
|
|
629
620
|
color: ${token('color.text.selected', N0)};
|
|
@@ -635,22 +626,16 @@ export const tableStyles = (
|
|
|
635
626
|
cursor: pointer;
|
|
636
627
|
}
|
|
637
628
|
.${ClassName.NUMBERED_COLUMN_BUTTON}:hover {
|
|
638
|
-
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
639
|
-
border-color: ${tableBorderSelectedColor};
|
|
640
|
-
background-color: ${
|
|
641
|
-
'color.background.selected',
|
|
642
|
-
tableToolbarSelectedColor,
|
|
643
|
-
)};
|
|
629
|
+
border-bottom: 1px solid ${tableBorderSelectedColor(props)};
|
|
630
|
+
border-color: ${tableBorderSelectedColor(props)};
|
|
631
|
+
background-color: ${tableToolbarSelectedColor(props)};
|
|
644
632
|
position: relative;
|
|
645
633
|
z-index: ${akEditorUnitZIndex};
|
|
646
634
|
color: ${token('color.text.selected', N0)};
|
|
647
635
|
}
|
|
648
636
|
.${ClassName.NUMBERED_COLUMN_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
649
|
-
background-color: ${
|
|
650
|
-
|
|
651
|
-
tableToolbarDeleteColor,
|
|
652
|
-
)};
|
|
653
|
-
border: 1px solid ${tableBorderDeleteColor};
|
|
637
|
+
background-color: ${tableToolbarDeleteColor(props)};
|
|
638
|
+
border: 1px solid ${tableBorderDeleteColor(props)};
|
|
654
639
|
border-left: 0;
|
|
655
640
|
color: ${token('color.text.danger', R500)};
|
|
656
641
|
position: relative;
|
|
@@ -711,15 +696,15 @@ export const tableStyles = (
|
|
|
711
696
|
pointer-events: none;
|
|
712
697
|
}
|
|
713
698
|
.${ClassName.SELECTED_CELL} {
|
|
714
|
-
border: 1px solid ${tableBorderSelectedColor};
|
|
699
|
+
border: 1px solid ${tableBorderSelectedColor(props)};
|
|
715
700
|
}
|
|
716
701
|
.${ClassName.SELECTED_CELL}::after {
|
|
717
|
-
background: ${tableCellSelectedColor};
|
|
702
|
+
background: ${tableCellSelectedColor(props)};
|
|
718
703
|
z-index: ${akEditorSmallZIndex};
|
|
719
704
|
}
|
|
720
705
|
th.${ClassName.HOVERED_CELL_IN_DANGER}::after,
|
|
721
706
|
td.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
722
|
-
background: ${tableCellDeleteColor};
|
|
707
|
+
background: ${tableCellDeleteColor(props)};
|
|
723
708
|
z-index: ${akEditorUnitZIndex * 100};
|
|
724
709
|
}
|
|
725
710
|
// ED-15246: Trello card is visible through a border of a table border
|
|
@@ -727,7 +712,7 @@ export const tableStyles = (
|
|
|
727
712
|
&::after {
|
|
728
713
|
height: 100%;
|
|
729
714
|
width: 100%;
|
|
730
|
-
border: 1px solid ${tableBorderSelectedColor};
|
|
715
|
+
border: 1px solid ${tableBorderSelectedColor(props)};
|
|
731
716
|
content: '';
|
|
732
717
|
position: absolute;
|
|
733
718
|
left: -1px;
|
|
@@ -738,7 +723,7 @@ export const tableStyles = (
|
|
|
738
723
|
pointer-events: none;
|
|
739
724
|
}
|
|
740
725
|
&.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
741
|
-
border: 1px solid ${tableBorderDeleteColor};
|
|
726
|
+
border: 1px solid ${tableBorderDeleteColor(props)};
|
|
742
727
|
z-index: ${akEditorUnitZIndex * 100};
|
|
743
728
|
}
|
|
744
729
|
}
|
|
@@ -5,6 +5,9 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
akEditorTableBorder,
|
|
7
7
|
akEditorTableBorderDark,
|
|
8
|
+
akEditorTableBorderSelected,
|
|
9
|
+
akEditorTableCellBlanketDeleted,
|
|
10
|
+
akEditorTableCellBlanketSelected,
|
|
8
11
|
akEditorTableToolbar,
|
|
9
12
|
akEditorTableToolbarDark,
|
|
10
13
|
akEditorTableToolbarSize,
|
|
@@ -13,12 +16,14 @@ import {
|
|
|
13
16
|
} from '@atlaskit/editor-shared-styles';
|
|
14
17
|
import {
|
|
15
18
|
B200,
|
|
16
|
-
B300,
|
|
17
19
|
DN30,
|
|
18
20
|
DN400,
|
|
19
21
|
N0,
|
|
20
22
|
N20,
|
|
21
23
|
N200,
|
|
24
|
+
N20A,
|
|
25
|
+
N300,
|
|
26
|
+
R300,
|
|
22
27
|
R400,
|
|
23
28
|
R75,
|
|
24
29
|
} from '@atlaskit/theme/colors';
|
|
@@ -58,24 +63,46 @@ export const tableFloatingControlsColor = token(
|
|
|
58
63
|
N20,
|
|
59
64
|
);
|
|
60
65
|
// TODO: https://product-fabric.atlassian.net/browse/DSP-4461
|
|
61
|
-
export const tableCellSelectedColor =
|
|
62
|
-
'color.blanket.selected',
|
|
63
|
-
'
|
|
64
|
-
);
|
|
65
|
-
export const tableToolbarSelectedColor =
|
|
66
|
-
'color.background.selected.
|
|
67
|
-
B200,
|
|
68
|
-
);
|
|
69
|
-
export const tableBorderSelectedColor =
|
|
70
|
-
|
|
71
|
-
'color.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
)
|
|
66
|
+
export const tableCellSelectedColor = themed({
|
|
67
|
+
light: token('color.blanket.selected', akEditorTableCellBlanketSelected),
|
|
68
|
+
dark: token('color.blanket.selected', akEditorTableCellBlanketSelected),
|
|
69
|
+
});
|
|
70
|
+
export const tableToolbarSelectedColor = themed({
|
|
71
|
+
light: token('color.background.selected.pressed', B200),
|
|
72
|
+
dark: token('color.background.selected.pressed', B200),
|
|
73
|
+
});
|
|
74
|
+
export const tableBorderSelectedColor = themed({
|
|
75
|
+
light: token('color.border.focused', akEditorTableBorderSelected),
|
|
76
|
+
dark: token('color.border.focused', akEditorTableBorderSelected),
|
|
77
|
+
});
|
|
78
|
+
export const tableCellSelectedDeleteIconColor = themed({
|
|
79
|
+
light: token('color.icon.subtle', N300),
|
|
80
|
+
dark: token('color.icon.subtle', N300),
|
|
81
|
+
});
|
|
82
|
+
export const tableCellSelectedDeleteIconBackground = themed({
|
|
83
|
+
light: token('color.background.accent.gray.subtlest', N20A),
|
|
84
|
+
dark: token('color.background.accent.gray.subtlest', N20A),
|
|
85
|
+
});
|
|
86
|
+
export const tableCellDeleteColor = themed({
|
|
87
|
+
light: token('color.blanket.danger', akEditorTableCellBlanketDeleted),
|
|
88
|
+
dark: token('color.blanket.danger', akEditorTableCellBlanketDeleted),
|
|
89
|
+
});
|
|
90
|
+
export const tableBorderDeleteColor = themed({
|
|
91
|
+
light: token('color.border.danger', R400),
|
|
92
|
+
dark: token('color.border.danger', R400),
|
|
93
|
+
});
|
|
94
|
+
export const tableToolbarDeleteColor = themed({
|
|
95
|
+
light: token('color.background.danger.pressed', R75),
|
|
96
|
+
dark: token('color.background.danger.pressed', R75),
|
|
97
|
+
});
|
|
98
|
+
export const tableCellHoverDeleteIconColor = themed({
|
|
99
|
+
light: token('color.icon.inverse', 'white'),
|
|
100
|
+
dark: token('color.icon.inverse', 'white'),
|
|
101
|
+
});
|
|
102
|
+
export const tableCellHoverDeleteIconBackground = themed({
|
|
103
|
+
light: token('color.background.danger.bold', R300),
|
|
104
|
+
dark: token('color.background.danger.bold', R300),
|
|
105
|
+
});
|
|
79
106
|
export const tableBorderRadiusSize = 3;
|
|
80
107
|
export const tablePadding = 8;
|
|
81
108
|
export const tableScrollbarOffset = 15;
|
|
@@ -104,5 +131,5 @@ export const stickyRowZIndex = resizeHandlerZIndex + 2;
|
|
|
104
131
|
export const stickyRowOffsetTop = 8;
|
|
105
132
|
export const stickyHeaderBorderBottomWidth = 1;
|
|
106
133
|
|
|
107
|
-
export const TABLE_SNAP_GAP =
|
|
134
|
+
export const TABLE_SNAP_GAP = 9;
|
|
108
135
|
export const TABLE_HIGHLIGHT_GAP = 10;
|