@atlaskit/editor-plugin-table 1.0.1 → 1.0.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 +6 -0
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +14 -16
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +1 -3
- package/dist/cjs/plugins/table/ui/common-styles.js +1 -3
- package/dist/cjs/plugins/table/ui/consts.js +15 -17
- package/dist/cjs/plugins/table/ui/ui-styles.js +10 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +14 -15
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +3 -4
- package/dist/es2019/plugins/table/ui/common-styles.js +20 -21
- package/dist/es2019/plugins/table/ui/consts.js +15 -16
- package/dist/es2019/plugins/table/ui/ui-styles.js +23 -24
- package/dist/es2019/version.json +1 -1
- package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +14 -15
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +1 -2
- package/dist/esm/plugins/table/ui/common-styles.js +1 -2
- package/dist/esm/plugins/table/ui/consts.js +15 -16
- package/dist/esm/plugins/table/ui/ui-styles.js +10 -11
- package/dist/esm/version.json +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,6 @@ import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
|
7
7
|
import { TableCssClassName as ClassName } from '../types';
|
|
8
8
|
import { tableCellBackgroundColor, tableToolbarColor, tableBorderColor, tableCellSelectedColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, tableBorderRadiusSize, tablePadding, tableScrollbarOffset, resizeHandlerAreaWidth, resizeLineWidth, tableToolbarSize, tableInsertColumnButtonSize, tableControlsSpacing, tableTextColor, stickyRowZIndex, columnControlsDecorationHeight, stickyRowOffsetTop, stickyHeaderBorderBottomWidth } from './consts';
|
|
9
9
|
import { HeaderButton, HeaderButtonHover, HeaderButtonDanger, insertColumnButtonWrapper, insertRowButtonWrapper, columnControlsLineMarker, DeleteButton, OverflowShadow, columnControlsDecoration, hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, InsertMarker } from './ui-styles';
|
|
10
|
-
import { token } from '@atlaskit/tokens';
|
|
11
10
|
const cornerControlHeight = tableToolbarSize + 1;
|
|
12
11
|
/*
|
|
13
12
|
compensating for half of the insert column button
|
|
@@ -61,14 +60,14 @@ export const tableStyles = props => {
|
|
|
61
60
|
|
|
62
61
|
return css`
|
|
63
62
|
.${ClassName.LAYOUT_BUTTON} button {
|
|
64
|
-
background: ${
|
|
65
|
-
color: ${
|
|
63
|
+
background: ${`var(--ds-background-neutral, ${N20A})`};
|
|
64
|
+
color: ${`var(--ds-icon, ${N300})`};
|
|
66
65
|
cursor: none;
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
.${ClassName.LAYOUT_BUTTON}:not(.${ClassName.IS_RESIZING}) button:hover {
|
|
70
|
-
background: ${
|
|
71
|
-
color: ${
|
|
69
|
+
background: ${`var(--ds-background-neutral-hovered, ${B300})`};
|
|
70
|
+
color: ${"var(--ds-icon, white)"} !important;
|
|
72
71
|
cursor: pointer;
|
|
73
72
|
}
|
|
74
73
|
|
|
@@ -131,7 +130,7 @@ export const tableStyles = props => {
|
|
|
131
130
|
|
|
132
131
|
position: fixed !important;
|
|
133
132
|
z-index: ${akEditorStickyHeaderZIndex} !important;
|
|
134
|
-
box-shadow: 0px -${stickyRowOffsetTop}px ${
|
|
133
|
+
box-shadow: 0px -${stickyRowOffsetTop}px ${"var(--ds-surface, white)"};
|
|
135
134
|
border-right: 0 none;
|
|
136
135
|
/* top set by NumberColumn component */
|
|
137
136
|
}
|
|
@@ -140,7 +139,7 @@ export const tableStyles = props => {
|
|
|
140
139
|
position: fixed !important;
|
|
141
140
|
/* needs to be above row controls */
|
|
142
141
|
z-index: ${akEditorSmallZIndex} !important;
|
|
143
|
-
background: ${
|
|
142
|
+
background: ${"var(--ds-surface, white)"};
|
|
144
143
|
|
|
145
144
|
width: ${tableToolbarSize}px;
|
|
146
145
|
height: ${tableToolbarSize}px;
|
|
@@ -165,13 +164,13 @@ export const tableStyles = props => {
|
|
|
165
164
|
z-index: ${akEditorStickyHeaderZIndex} !important;
|
|
166
165
|
display: flex;
|
|
167
166
|
border-left: ${tableToolbarSize}px solid
|
|
168
|
-
${
|
|
167
|
+
${"var(--ds-surface, white)"};
|
|
169
168
|
margin-left: -${tableToolbarSize}px;
|
|
170
169
|
}
|
|
171
170
|
|
|
172
171
|
.${ClassName.TABLE_STICKY} col:first-of-type {
|
|
173
172
|
/* moving rows out of a table layout does weird things in Chrome */
|
|
174
|
-
border-right: 1px solid ${
|
|
173
|
+
border-right: 1px solid ${"var(--ds-surface, green)"};
|
|
175
174
|
}
|
|
176
175
|
|
|
177
176
|
tr.sticky {
|
|
@@ -188,12 +187,12 @@ export const tableStyles = props => {
|
|
|
188
187
|
grid-auto-flow: column;
|
|
189
188
|
|
|
190
189
|
/* background for where controls apply */
|
|
191
|
-
background: ${
|
|
190
|
+
background: ${"var(--ds-surface, white)"};
|
|
192
191
|
box-sizing: content-box;
|
|
193
192
|
|
|
194
193
|
margin-top: 2px;
|
|
195
194
|
|
|
196
|
-
box-shadow: ${
|
|
195
|
+
box-shadow: ${`var(--ds-shadow-overflow, ${`0 6px 4px -4px ${N40A}`})`};
|
|
197
196
|
margin-left: -1px;
|
|
198
197
|
|
|
199
198
|
&.no-pointer-events {
|
|
@@ -279,7 +278,7 @@ export const tableStyles = props => {
|
|
|
279
278
|
|
|
280
279
|
.${ClassName.CORNER_CONTROLS}.sticky {
|
|
281
280
|
border-top: ${tableControlsSpacing - tableToolbarSize + 2}px solid
|
|
282
|
-
${
|
|
281
|
+
${"var(--ds-surface, white)"};
|
|
283
282
|
}
|
|
284
283
|
|
|
285
284
|
${(_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : ''}
|
|
@@ -367,7 +366,7 @@ export const tableStyles = props => {
|
|
|
367
366
|
}
|
|
368
367
|
.active .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
369
368
|
border-color: ${tableBorderSelectedColor};
|
|
370
|
-
background: ${
|
|
369
|
+
background: ${`var(--ds-background-selected, ${tableToolbarSelectedColor})`};
|
|
371
370
|
}
|
|
372
371
|
|
|
373
372
|
.${ClassName.TABLE_CONTAINER}[data-number-column='true'] {
|
|
@@ -381,14 +380,14 @@ export const tableStyles = props => {
|
|
|
381
380
|
|
|
382
381
|
:not(.${ClassName.IS_RESIZING}) .${ClassName.CONTROLS_CORNER_BUTTON}:hover {
|
|
383
382
|
border-color: ${tableBorderSelectedColor};
|
|
384
|
-
background: ${
|
|
383
|
+
background: ${`var(--ds-background-selected, ${tableToolbarSelectedColor})`};
|
|
385
384
|
cursor: pointer;
|
|
386
385
|
}
|
|
387
386
|
|
|
388
387
|
:not(.${ClassName.IS_RESIZING})
|
|
389
388
|
.${ClassName.CONTROLS_CORNER_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
390
389
|
border-color: ${tableBorderDeleteColor};
|
|
391
|
-
background: ${
|
|
390
|
+
background: ${`var(--ds-background-danger, ${tableToolbarDeleteColor})`};
|
|
392
391
|
}
|
|
393
392
|
|
|
394
393
|
/* Row controls */
|
|
@@ -489,10 +488,10 @@ export const tableStyles = props => {
|
|
|
489
488
|
.${ClassName.NUMBERED_COLUMN_BUTTON}.active {
|
|
490
489
|
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
491
490
|
border-color: ${tableBorderSelectedColor};
|
|
492
|
-
background-color: ${
|
|
491
|
+
background-color: ${`var(--ds-background-selected, ${tableToolbarSelectedColor})`};
|
|
493
492
|
position: relative;
|
|
494
493
|
z-index: ${akEditorUnitZIndex};
|
|
495
|
-
color: ${
|
|
494
|
+
color: ${`var(--ds-text-selected, ${N0})`};
|
|
496
495
|
}
|
|
497
496
|
}
|
|
498
497
|
}
|
|
@@ -503,16 +502,16 @@ export const tableStyles = props => {
|
|
|
503
502
|
.${ClassName.NUMBERED_COLUMN_BUTTON}:hover {
|
|
504
503
|
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
505
504
|
border-color: ${tableBorderSelectedColor};
|
|
506
|
-
background-color: ${
|
|
505
|
+
background-color: ${`var(--ds-background-selected, ${tableToolbarSelectedColor})`};
|
|
507
506
|
position: relative;
|
|
508
507
|
z-index: ${akEditorUnitZIndex};
|
|
509
|
-
color: ${
|
|
508
|
+
color: ${`var(--ds-text-selected, ${N0})`};
|
|
510
509
|
}
|
|
511
510
|
.${ClassName.NUMBERED_COLUMN_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
512
|
-
background-color: ${
|
|
511
|
+
background-color: ${`var(--ds-background-danger, ${tableToolbarDeleteColor})`};
|
|
513
512
|
border: 1px solid ${tableBorderDeleteColor};
|
|
514
513
|
border-left: 0;
|
|
515
|
-
color: ${
|
|
514
|
+
color: ${`var(--ds-text-danger, ${R500})`};
|
|
516
515
|
position: relative;
|
|
517
516
|
z-index: ${akEditorUnitZIndex};
|
|
518
517
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { B200, B300, N20, R400, R75, DN400, N200, DN30, N0 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { token } from '@atlaskit/tokens';
|
|
5
4
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
|
|
6
5
|
import { themed } from '@atlaskit/theme/components';
|
|
7
6
|
/**
|
|
@@ -11,29 +10,29 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
11
10
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
12
11
|
|
|
13
12
|
export const tableCellBackgroundColor = themed({
|
|
14
|
-
light:
|
|
15
|
-
dark:
|
|
13
|
+
light: `var(--ds-surface, ${N0})`,
|
|
14
|
+
dark: `var(--ds-surface, ${DN30})`
|
|
16
15
|
});
|
|
17
16
|
export const tableToolbarColor = themed({
|
|
18
|
-
light:
|
|
19
|
-
dark:
|
|
17
|
+
light: `var(--ds-background-neutral-subtle, ${akEditorTableToolbar})`,
|
|
18
|
+
dark: `var(--ds-background-neutral-subtle, ${akEditorTableToolbarDark})`
|
|
20
19
|
});
|
|
21
20
|
export const tableTextColor = themed({
|
|
22
|
-
light:
|
|
23
|
-
dark:
|
|
21
|
+
light: `var(--ds-text-subtlest, ${N200})`,
|
|
22
|
+
dark: `var(--ds-text-subtlest, ${DN400})`
|
|
24
23
|
});
|
|
25
24
|
export const tableBorderColor = themed({
|
|
26
|
-
light:
|
|
27
|
-
dark:
|
|
25
|
+
light: `var(--ds-border, ${akEditorTableBorder})`,
|
|
26
|
+
dark: `var(--ds-border, ${akEditorTableBorderDark})`
|
|
28
27
|
});
|
|
29
|
-
export const tableFloatingControlsColor =
|
|
28
|
+
export const tableFloatingControlsColor = `var(--ds-background-neutral, ${N20})`; // TODO: https://product-fabric.atlassian.net/browse/DSP-4461
|
|
30
29
|
|
|
31
|
-
export const tableCellSelectedColor =
|
|
32
|
-
export const tableToolbarSelectedColor =
|
|
33
|
-
export const tableBorderSelectedColor =
|
|
34
|
-
export const tableCellDeleteColor =
|
|
35
|
-
export const tableBorderDeleteColor =
|
|
36
|
-
export const tableToolbarDeleteColor =
|
|
30
|
+
export const tableCellSelectedColor = "var(--ds-blanket-selected, rgba(179, 212, 255, 0.3))";
|
|
31
|
+
export const tableToolbarSelectedColor = `var(--ds-background-selected-bold, ${B200})`;
|
|
32
|
+
export const tableBorderSelectedColor = `var(--ds-border-selected, ${B300})`;
|
|
33
|
+
export const tableCellDeleteColor = "var(--ds-blanket-danger, rgba(255, 235, 230, 0.3))";
|
|
34
|
+
export const tableBorderDeleteColor = `var(--ds-border-danger, ${R400})`;
|
|
35
|
+
export const tableToolbarDeleteColor = `var(--ds-background-danger-bold, ${R75})`;
|
|
37
36
|
export const tableBorderRadiusSize = 3;
|
|
38
37
|
export const tablePadding = 8;
|
|
39
38
|
export const tableScrollbarOffset = 15;
|
|
@@ -5,7 +5,6 @@ import { N40A, B300, N300, R300, N20A, N60A, N0, Y50, Y200 } from '@atlaskit/the
|
|
|
5
5
|
import { tableToolbarColor, tableBorderColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, lineMarkerSize, columnControlsDecorationHeight, columnControlsZIndex, columnControlsSelectedZIndex, resizeHandlerAreaWidth, resizeLineWidth, resizeHandlerZIndex, tableToolbarSize, tableInsertColumnButtonSize, tableDeleteButtonSize } from './consts';
|
|
6
6
|
import { TableCssClassName as ClassName } from '../types';
|
|
7
7
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
8
|
-
import { token } from '@atlaskit/tokens';
|
|
9
8
|
|
|
10
9
|
const InsertLine = cssString => css`
|
|
11
10
|
.${ClassName.CONTROLS_INSERT_LINE} {
|
|
@@ -81,22 +80,22 @@ export const HeaderButton = (props, cssString) => css`
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
.active .${ClassName.CONTROLS_BUTTON} {
|
|
84
|
-
color: ${
|
|
85
|
-
background-color: ${
|
|
83
|
+
color: ${`var(--ds-icon-inverse, ${N0})`};
|
|
84
|
+
background-color: ${`var(--ds-background-selected, ${tableToolbarSelectedColor})`};
|
|
86
85
|
border-color: ${tableBorderSelectedColor};
|
|
87
86
|
}
|
|
88
87
|
`;
|
|
89
88
|
export const HeaderButtonHover = () => css`
|
|
90
89
|
.${ClassName.CONTROLS_BUTTON}:hover {
|
|
91
|
-
color: ${
|
|
92
|
-
background-color: ${
|
|
90
|
+
color: ${`var(--ds-icon-inverse, ${N0})`};
|
|
91
|
+
background-color: ${`var(--ds-background-selected, ${tableToolbarSelectedColor})`};
|
|
93
92
|
border-color: ${tableBorderSelectedColor};
|
|
94
93
|
cursor: pointer;
|
|
95
94
|
}
|
|
96
95
|
`;
|
|
97
96
|
export const HeaderButtonDanger = () => css`
|
|
98
97
|
.${ClassName.HOVERED_CELL_IN_DANGER} .${ClassName.CONTROLS_BUTTON} {
|
|
99
|
-
background-color: ${
|
|
98
|
+
background-color: ${`var(--ds-background-danger, ${tableToolbarDeleteColor})`};
|
|
100
99
|
border-color: ${tableBorderDeleteColor};
|
|
101
100
|
position: relative;
|
|
102
101
|
z-index: ${akEditorUnitZIndex};
|
|
@@ -116,9 +115,9 @@ const InsertButton = () => css`
|
|
|
116
115
|
}
|
|
117
116
|
.${ClassName.CONTROLS_INSERT_BUTTON} {
|
|
118
117
|
${Button(`
|
|
119
|
-
background: ${
|
|
120
|
-
box-shadow: ${
|
|
121
|
-
color: ${
|
|
118
|
+
background: ${"var(--ds-surface-overlay, white)"};
|
|
119
|
+
box-shadow: ${`var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N60A}, 0 0 1px ${N60A}`})`};
|
|
120
|
+
color: ${`var(--ds-icon, ${N300})`};
|
|
122
121
|
`)}
|
|
123
122
|
}
|
|
124
123
|
.${ClassName.CONTROLS_INSERT_LINE} {
|
|
@@ -131,8 +130,8 @@ const InsertButton = () => css`
|
|
|
131
130
|
|
|
132
131
|
const InsertButtonHover = () => css`
|
|
133
132
|
.${ClassName.CONTROLS_INSERT_BUTTON}:hover {
|
|
134
|
-
background: ${
|
|
135
|
-
color: ${
|
|
133
|
+
background: ${`var(--ds-background-brand-bold, ${B300})`};
|
|
134
|
+
color: ${"var(--ds-icon-inverse, white)"};
|
|
136
135
|
cursor: pointer;
|
|
137
136
|
}
|
|
138
137
|
`;
|
|
@@ -175,15 +174,15 @@ export const DeleteButton = css`
|
|
|
175
174
|
.${ClassName.CONTROLS_DELETE_BUTTON_WRAP} {
|
|
176
175
|
.${ClassName.CONTROLS_DELETE_BUTTON} {
|
|
177
176
|
${Button(`
|
|
178
|
-
background: ${
|
|
179
|
-
color: ${
|
|
177
|
+
background: ${`var(--ds-background-neutral, ${N20A})`};
|
|
178
|
+
color: ${`var(--ds-icon, ${N300})`};
|
|
180
179
|
`)}
|
|
181
180
|
}
|
|
182
181
|
}
|
|
183
182
|
|
|
184
183
|
.${ClassName.CONTROLS_DELETE_BUTTON}:hover {
|
|
185
|
-
background: ${
|
|
186
|
-
color: ${
|
|
184
|
+
background: ${`var(--ds-background-danger-bold, ${R300})`};
|
|
185
|
+
color: ${"var(--ds-icon-inverse, white)"};
|
|
187
186
|
cursor: pointer;
|
|
188
187
|
}
|
|
189
188
|
`;
|
|
@@ -201,11 +200,11 @@ export const OverflowShadow = props => css`
|
|
|
201
200
|
background: linear-gradient(
|
|
202
201
|
to left,
|
|
203
202
|
transparent 0,
|
|
204
|
-
${
|
|
203
|
+
${`var(--ds-shadow-overflow-spread, ${N40A})`} 100%
|
|
205
204
|
),
|
|
206
205
|
linear-gradient(
|
|
207
206
|
to right,
|
|
208
|
-
${
|
|
207
|
+
${"var(--ds-shadow-overflow-perimeter, transparent)"} 0px,
|
|
209
208
|
transparent 1px
|
|
210
209
|
);
|
|
211
210
|
left: 0px;
|
|
@@ -217,11 +216,11 @@ export const OverflowShadow = props => css`
|
|
|
217
216
|
background: linear-gradient(
|
|
218
217
|
to right,
|
|
219
218
|
transparent 0,
|
|
220
|
-
${
|
|
219
|
+
${`var(--ds-shadow-overflow-spread, ${N40A})`} 100%
|
|
221
220
|
),
|
|
222
221
|
linear-gradient(
|
|
223
222
|
to left,
|
|
224
|
-
${
|
|
223
|
+
${"var(--ds-shadow-overflow-perimeter, transparent)"} 0px,
|
|
225
224
|
transparent 1px
|
|
226
225
|
);
|
|
227
226
|
left: calc(100% + 2px);
|
|
@@ -252,8 +251,8 @@ const columnHeaderButton = (props, cssString) => css`
|
|
|
252
251
|
`;
|
|
253
252
|
|
|
254
253
|
const columnHeaderButtonSelected = css`
|
|
255
|
-
color: ${
|
|
256
|
-
background-color: ${
|
|
254
|
+
color: ${`var(--ds-text-inverse, ${N0})`};
|
|
255
|
+
background-color: ${`var(--ds-background-selected, ${tableToolbarSelectedColor})`};
|
|
257
256
|
border-color: ${tableBorderSelectedColor};
|
|
258
257
|
z-index: ${columnControlsSelectedZIndex};
|
|
259
258
|
`;
|
|
@@ -326,7 +325,7 @@ export const columnControlsDecoration = props => css`
|
|
|
326
325
|
|
|
327
326
|
&.${ClassName.HOVERED_CELL_IN_DANGER}
|
|
328
327
|
.${ClassName.COLUMN_CONTROLS_DECORATIONS}::after {
|
|
329
|
-
background-color: ${
|
|
328
|
+
background-color: ${`var(--ds-background-danger, ${tableToolbarDeleteColor})`};
|
|
330
329
|
border: 1px solid ${tableBorderDeleteColor};
|
|
331
330
|
border-bottom: none;
|
|
332
331
|
z-index: ${akEditorUnitZIndex * 100};
|
|
@@ -372,8 +371,8 @@ export const hoveredWarningCell = css`
|
|
|
372
371
|
:not(.${ClassName.IS_RESIZING})
|
|
373
372
|
.${ClassName.TABLE_CONTAINER}:not(.${ClassName.HOVERED_DELETE_BUTTON}) {
|
|
374
373
|
td.${ClassName.HOVERED_CELL_WARNING} {
|
|
375
|
-
background-color: ${
|
|
376
|
-
border: 1px solid ${
|
|
374
|
+
background-color: ${`var(--ds-background-warning, ${Y50})`} !important; // We need to override the background-color added to the cell
|
|
375
|
+
border: 1px solid ${`var(--ds-border-warning, ${Y200})`};
|
|
377
376
|
}
|
|
378
377
|
}
|
|
379
378
|
`;
|
package/dist/es2019/version.json
CHANGED
|
@@ -6,29 +6,28 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
import { B75, DN0, DN60, N0, N20, N30A, N700 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
8
8
|
import { contextualMenuTriggerSize } from '../consts';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
import { themed } from '@atlaskit/theme/components';
|
|
11
10
|
export var tableFloatingCellButtonStyles = function tableFloatingCellButtonStyles(props) {
|
|
12
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > div {\n // Sits behind button to provide surface-color background\n background: ", ";\n border-radius: ", "px;\n display: flex;\n height: ", "px;\n flex-direction: column;\n }\n && button {\n background: ", ";\n flex-direction: column;\n margin: 2px;\n outline: 2px solid ", ";\n border-radius: 1px;\n padding: 0;\n height: calc(100% - 4px);\n display: flex;\n }\n && button:hover {\n background: ", ";\n }\n && button:active {\n background: ", ";\n }\n && button > span {\n margin: 0px -4px;\n }\n && span {\n pointer-events: none;\n }\n"])),
|
|
13
|
-
light:
|
|
14
|
-
dark:
|
|
15
|
-
})(props),
|
|
16
|
-
light:
|
|
17
|
-
dark:
|
|
11
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > div {\n // Sits behind button to provide surface-color background\n background: ", ";\n border-radius: ", "px;\n display: flex;\n height: ", "px;\n flex-direction: column;\n }\n && button {\n background: ", ";\n flex-direction: column;\n margin: 2px;\n outline: 2px solid ", ";\n border-radius: 1px;\n padding: 0;\n height: calc(100% - 4px);\n display: flex;\n }\n && button:hover {\n background: ", ";\n }\n && button:active {\n background: ", ";\n }\n && button > span {\n margin: 0px -4px;\n }\n && span {\n pointer-events: none;\n }\n"])), "var(--ds-surface, ".concat(N20, ")"), borderRadius(), contextualMenuTriggerSize + 2, themed({
|
|
12
|
+
light: "var(--ds-background-neutral, none)",
|
|
13
|
+
dark: "var(--ds-background-neutral, none)"
|
|
14
|
+
})(props), "var(--ds-border, ".concat(N0, ")"), themed({
|
|
15
|
+
light: "var(--ds-background-neutral-hovered, ".concat(N30A, ")"),
|
|
16
|
+
dark: "var(--ds-background-neutral-hovered, ".concat(DN60, ")")
|
|
18
17
|
})(props), themed({
|
|
19
|
-
light:
|
|
20
|
-
dark:
|
|
18
|
+
light: "var(--ds-background-neutral-pressed, rgba(179, 212, 255, 0.6))",
|
|
19
|
+
dark: "var(--ds-background-neutral-pressed, ".concat(B75, ")")
|
|
21
20
|
})(props));
|
|
22
21
|
};
|
|
23
22
|
export var tableFloatingCellButtonSelectedStyles = function tableFloatingCellButtonSelectedStyles(props) {
|
|
24
23
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n && button {\n background: ", ";\n }\n && button:hover {\n background: ", ";\n }\n && button:active {\n background: ", ";\n }\n"])), themed({
|
|
25
|
-
light:
|
|
26
|
-
dark:
|
|
24
|
+
light: "var(--ds-background-selected, ".concat(N700, ")"),
|
|
25
|
+
dark: "var(--ds-background-selected, ".concat(DN0, ")")
|
|
27
26
|
})(props), themed({
|
|
28
|
-
light:
|
|
29
|
-
dark:
|
|
27
|
+
light: "var(--ds-background-selected-hovered, ".concat(N700, ")"),
|
|
28
|
+
dark: "var(--ds-background-selected-hovered, ".concat(DN0, ")")
|
|
30
29
|
})(props), themed({
|
|
31
|
-
light:
|
|
32
|
-
dark:
|
|
30
|
+
light: "var(--ds-background-selected-pressed, ".concat(N700, ")"),
|
|
31
|
+
dark: "var(--ds-background-selected-pressed, ".concat(DN0, ")")
|
|
33
32
|
})(props));
|
|
34
33
|
};
|
|
@@ -8,8 +8,7 @@ import { N60A, N90 } from '@atlaskit/theme/colors';
|
|
|
8
8
|
import { contextualMenuDropdownWidth } from '../consts';
|
|
9
9
|
import { TableCssClassName as ClassName } from '../../types';
|
|
10
10
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
11
|
-
import { token } from '@atlaskit/tokens';
|
|
12
11
|
export var cellColourPreviewStyles = function cellColourPreviewStyles(selectedColor) {
|
|
13
12
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &::before {\n background: ", ";\n }\n"])), selectedColor);
|
|
14
13
|
};
|
|
15
|
-
export var tablePopupStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n border-radius: ", "px;\n background: ", ";\n box-shadow: ", ";\n display: block;\n position: absolute;\n top: 0;\n left: ", "px;\n padding: 8px;\n\n > div {\n padding: 0;\n }\n }\n\n .", " {\n display: flex;\n\n &::before {\n content: '';\n display: block;\n border: 1px solid ", ";\n border-radius: ", "px;\n width: 20px;\n height: 20px;\n }\n\n &::after {\n content: '\u203A';\n margin-left: 4px;\n line-height: 20px;\n color: ", ";\n }\n }\n"])), ClassName.CONTEXTUAL_SUBMENU, borderRadius(),
|
|
14
|
+
export var tablePopupStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n border-radius: ", "px;\n background: ", ";\n box-shadow: ", ";\n display: block;\n position: absolute;\n top: 0;\n left: ", "px;\n padding: 8px;\n\n > div {\n padding: 0;\n }\n }\n\n .", " {\n display: flex;\n\n &::before {\n content: '';\n display: block;\n border: 1px solid ", ";\n border-radius: ", "px;\n width: 20px;\n height: 20px;\n }\n\n &::after {\n content: '\u203A';\n margin-left: 4px;\n line-height: 20px;\n color: ", ";\n }\n }\n"])), ClassName.CONTEXTUAL_SUBMENU, borderRadius(), "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), contextualMenuDropdownWidth, ClassName.CONTEXTUAL_MENU_ICON, tableBackgroundBorderColor, borderRadius(), "var(--ds-icon, ".concat(N90, ")"));
|
|
@@ -11,7 +11,6 @@ import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
|
11
11
|
import { TableCssClassName as ClassName } from '../types';
|
|
12
12
|
import { tableCellBackgroundColor, tableToolbarColor, tableBorderColor, tableCellSelectedColor, tableToolbarSelectedColor, tableBorderSelectedColor, tableCellDeleteColor, tableBorderDeleteColor, tableToolbarDeleteColor, tableBorderRadiusSize, tablePadding, tableScrollbarOffset, resizeHandlerAreaWidth, resizeLineWidth, tableToolbarSize, tableInsertColumnButtonSize, tableControlsSpacing, tableTextColor, stickyRowZIndex, columnControlsDecorationHeight, stickyRowOffsetTop, stickyHeaderBorderBottomWidth } from './consts';
|
|
13
13
|
import { HeaderButton, HeaderButtonHover, HeaderButtonDanger, insertColumnButtonWrapper, insertRowButtonWrapper, columnControlsLineMarker, DeleteButton, OverflowShadow, columnControlsDecoration, hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, InsertMarker } from './ui-styles';
|
|
14
|
-
import { token } from '@atlaskit/tokens';
|
|
15
14
|
var cornerControlHeight = tableToolbarSize + 1;
|
|
16
15
|
/*
|
|
17
16
|
compensating for half of the insert column button
|
|
@@ -29,7 +28,7 @@ var listLargeNumericMarkersOldStyles = "\n .ProseMirror .pm-table-cell-content-
|
|
|
29
28
|
export var tableStyles = function tableStyles(props) {
|
|
30
29
|
var _props$featureFlags, _props$featureFlags2;
|
|
31
30
|
|
|
32
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n td.", ", td.", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n border: 1px solid ", ";\n z-index: ", ";\n }\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n /* \n ED-15882: When custom start numbers is enabled for lists, we have\n styles that handle this generally (in editor-common) so we can\n throw away the older table-specific styles here.\n */\n ", "\n"])), ClassName.LAYOUT_BUTTON, token('color.background.neutral', N20A), token('color.icon', N300), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, token('color.background.neutral.hovered', B300), token('color.icon', 'white'), tableSharedStyle(props), columnControlsLineMarker(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, token('elevation.surface', 'white'), ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, token('elevation.surface', 'white'), tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, token('elevation.surface', 'white'), tableToolbarSize, ClassName.TABLE_STICKY, token('elevation.surface', 'green'), stickyRowOffsetTop, stickyRowZIndex, token('elevation.surface', 'white'), token('elevation.shadow.overflow', "0 6px 4px -4px ".concat(N40A)), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, token('elevation.surface', 'white'), (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER, columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableToolbarColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, token('color.background.selected', tableToolbarSelectedColor), ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, token('color.background.selected', tableToolbarSelectedColor), ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, token('color.background.danger', tableToolbarDeleteColor), ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableToolbarColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, token('color.background.selected', tableToolbarSelectedColor), akEditorUnitZIndex, token('color.text.selected', N0), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, token('color.background.selected', tableToolbarSelectedColor), akEditorUnitZIndex, token('color.text.selected', N0), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, token('color.background.danger', tableToolbarDeleteColor), tableBorderDeleteColor, token('color.text.danger', R500), akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, akEditorUnitZIndex * 100, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, insertColumnButtonOffset, insertColumnButtonOffset, tableScrollbarOffset, tableScrollbarOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles);
|
|
31
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " button {\n background: ", ";\n color: ", ";\n cursor: none;\n }\n\n .", ":not(.", ") button:hover {\n background: ", ";\n color: ", " !important;\n cursor: pointer;\n }\n\n .ProseMirror {\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n\n .", " {\n margin-bottom: 0;\n }\n\n .", " {\n td.", ", th.", " {\n position: relative;\n overflow: visible;\n }\n\n td.", " {\n background-color: ", ";\n\n // ED-15246: Trello card is visible through a border of a table border\n // This fixes a border issue caused by relative positioned table cells\n &::after {\n height: 100%;\n content: '';\n border-left: 1px solid ", ";\n border-bottom: 1px solid ", ";\n position: absolute;\n right: 0px;\n top: 0px;\n bottom: 0;\n width: 100%;\n display: inline-block;\n pointer-events: none;\n }\n }\n }\n\n .", " {\n ", "\n }\n\n .", " {\n ", "\n }\n\n /* Delete button */\n ", "\n /* Ends Delete button */\n\n /* sticky styles */\n .", " .", " .", ":first-of-type {\n margin-top: ", "px;\n width: ", "px;\n\n position: fixed !important;\n z-index: ", " !important;\n box-shadow: 0px -", "px ", ";\n border-right: 0 none;\n /* top set by NumberColumn component */\n }\n\n .", " .", ".sticky {\n position: fixed !important;\n /* needs to be above row controls */\n z-index: ", " !important;\n background: ", ";\n\n width: ", "px;\n height: ", "px;\n }\n\n .", ".sticky .", " {\n border-bottom: 0px none;\n border-right: 0px none;\n\n height: ", "px;\n width: ", "px;\n }\n\n .", " .", " {\n z-index: 0;\n }\n\n .", "\n .", "\n .", ".sticky {\n position: fixed !important;\n z-index: ", " !important;\n display: flex;\n border-left: ", "px solid\n ", ";\n margin-left: -", "px;\n }\n\n .", " col:first-of-type {\n /* moving rows out of a table layout does weird things in Chrome */\n border-right: 1px solid ", ";\n }\n\n tr.sticky {\n padding-top: ", "px;\n position: fixed;\n display: grid;\n\n /* to keep it above cell selection */\n z-index: ", ";\n\n overflow-y: visible;\n overflow-x: hidden;\n\n grid-auto-flow: column;\n\n /* background for where controls apply */\n background: ", ";\n box-sizing: content-box;\n\n margin-top: 2px;\n\n box-shadow: ", ";\n margin-left: -1px;\n\n &.no-pointer-events {\n pointer-events: none;\n }\n }\n\n .", " .", " {\n left: unset;\n position: fixed;\n z-index: ", ";\n }\n\n .", ".", "\n .", " {\n padding-bottom: ", "px;\n }\n\n tr.sticky th {\n border-bottom: ", "px solid\n ", ";\n margin-right: -1px;\n }\n\n .", " tr.sticky > th:last-child {\n border-right-width: 1px;\n }\n\n /* add left edge for first cell */\n .", " tr.sticky > th:first-of-type {\n margin-left: 0px;\n }\n\n /* add a little bit so the scroll lines up with the table */\n .", " tr.sticky::after {\n content: ' ';\n width: ", "px;\n }\n\n /* To fix jumpiness caused in Chrome Browsers for sticky headers */\n .", " .sticky + tr {\n min-height: 0px;\n }\n\n /* move resize line a little in sticky bar */\n .", ".", " {\n tr.sticky\n td.", ",\n tr.sticky\n th.", " {\n .", "::after {\n right: ", "px;\n }\n }\n\n /* when selected put it back to normal -- :not selector would be nicer */\n tr.sticky\n td.", ".", ",\n tr.sticky\n th.", ".", " {\n .", "::after {\n right: ", "px;\n }\n }\n }\n\n tr.sticky\n .", ",\n tr.sticky\n .", " {\n z-index: 1;\n }\n\n .", " tr.sticky {\n padding-top: ", "px;\n }\n\n .", ".", "\n .", "\n .", ":first-of-type {\n margin-top: ", "px;\n }\n\n .", ".sticky {\n border-top: ", "px solid\n ", ";\n }\n\n ", "\n ", "\n\n .", " .", " {\n height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts\n }\n\n .less-padding {\n padding: 0 ", "px;\n\n .", " {\n padding: 0 ", "px;\n }\n\n &.", "[data-number-column='true'] {\n padding-left: ", "px;\n }\n\n .", " {\n left: 6px;\n }\n\n .", " {\n left: calc(100% - 6px);\n }\n }\n\n > .", " {\n /**\n * Prevent margins collapsing, aids with placing the gap-cursor correctly\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing\n *\n * TODO: Enable this, many tests will fail!\n * border-top: 1px solid transparent;\n */\n }\n\n /* Breakout only works on top level */\n > * .", " .", " {\n margin-left: unset !important;\n width: 100% !important;\n }\n\n ", ";\n\n /* Corner controls */\n .", " {\n width: ", "px;\n height: ", "px;\n display: none;\n\n .", " {\n position: relative;\n\n ", ";\n }\n }\n\n .", ".sticky {\n .", " {\n /* sticky row insert dot overlaps other row insert and messes things up */\n display: none !important;\n }\n }\n\n .", " {\n position: absolute;\n top: 0;\n width: ", "px;\n height: ", "px;\n border: 1px solid ", ";\n border-radius: 0;\n border-top-left-radius: ", "px;\n background: ", ";\n box-sizing: border-box;\n padding: 0;\n :focus {\n outline: none;\n }\n }\n .active .", " {\n border-color: ", ";\n background: ", ";\n }\n\n .", "[data-number-column='true'] {\n .", ", .", " {\n width: ", "px;\n }\n .", " .", " {\n border-right-width: 0;\n }\n }\n\n :not(.", ") .", ":hover {\n border-color: ", ";\n background: ", ";\n cursor: pointer;\n }\n\n :not(.", ")\n .", ".", " {\n border-color: ", ";\n background: ", ";\n }\n\n /* Row controls */\n .", " {\n width: ", "px;\n box-sizing: border-box;\n display: none;\n position: relative;\n\n ", ";\n\n .", " {\n display: flex;\n flex-direction: column;\n }\n .", ":last-child > button {\n border-bottom-left-radius: ", "px;\n }\n .", " {\n position: relative;\n margin-top: -1px;\n }\n .", ":hover,\n .", ".active,\n .", ":hover {\n z-index: ", ";\n }\n\n ", "\n }\n\n :not(.", ") .", " {\n ", "\n ", "\n }\n\n /* Numbered column */\n .", " {\n position: relative;\n float: right;\n margin-left: ", "px;\n top: ", "px;\n width: ", "px;\n box-sizing: border-box;\n }\n\n .", " {\n border: 1px solid ", ";\n box-sizing: border-box;\n margin-top: -1px;\n padding-bottom: 2px;\n padding: 10px 2px;\n text-align: center;\n font-size: ", ";\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n :last-child {\n border-bottom: 1px solid ", ";\n }\n }\n\n .", " {\n .", ", .", " {\n display: block;\n }\n .", " {\n padding-left: 1px;\n .", " {\n border-left: 0 none;\n }\n\n .", ".active {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n }\n }\n :not(.", ") .", " {\n .", " {\n cursor: pointer;\n }\n .", ":hover {\n border-bottom: 1px solid ", ";\n border-color: ", ";\n background-color: ", ";\n position: relative;\n z-index: ", ";\n color: ", ";\n }\n .", ".", " {\n background-color: ", ";\n border: 1px solid ", ";\n border-left: 0;\n color: ", ";\n position: relative;\n z-index: ", ";\n }\n }\n\n /* Table */\n .", " > table {\n table-layout: fixed;\n white-space: normal;\n border-top: none;\n\n > tbody > tr {\n white-space: pre-wrap;\n }\n\n .", " + * {\n margin-top: 0;\n }\n\n /*\n * Headings have a top margin by default, but we don't want this on the\n * first heading within table header cells.\n *\n * This specifically sets margin-top for the first heading within a header\n * cell when center/right aligned.\n */\n th.", " > .fabric-editor-block-mark {\n > h1:first-of-type,\n > h2:first-of-type,\n > h3:first-of-type,\n > h4:first-of-type,\n > h5:first-of-type,\n > h6:first-of-type {\n margin-top: 0;\n }\n }\n\n .", ", .", " {\n position: relative;\n }\n /* Give selected cells a blue overlay */\n .", "::after,\n .", "::after {\n z-index: ", ";\n position: absolute;\n content: '';\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n width: 100%;\n pointer-events: none;\n }\n .", " {\n border: 1px solid ", ";\n }\n .", "::after {\n background: ", ";\n z-index: ", ";\n }\n th.", "::after,\n td.", "::after {\n background: ", ";\n z-index: ", ";\n }\n // ED-15246: Trello card is visible through a border of a table border\n td.", ", td.", " {\n &::after {\n height: 100%;\n width: 100%;\n border: 1px solid ", ";\n content: '';\n position: absolute;\n left: -1px;\n top: -1px;\n bottom: 0;\n z-index: ", ";\n display: inline-block;\n pointer-events: none;\n }\n &.", "::after {\n border: 1px solid ", ";\n z-index: ", ";\n }\n }\n }\n .", " {\n position: absolute;\n /* top of corner control is table margin top - corner control height + 1 pixel of table border. */\n top: ", "px;\n }\n .", ".", " {\n z-index: ", ";\n }\n .", " {\n left: -", "px;\n }\n .", " {\n padding-right: ", "px;\n margin-right: -", "px;\n padding-bottom: ", "px;\n margin-bottom: -", "px;\n /* fixes gap cursor height */\n overflow: auto;\n position: relative;\n }\n }\n\n .ProseMirror.", " {\n .", " {\n overflow-x: auto;\n ", ";\n }\n }\n\n .ProseMirror.", " {\n cursor: col-resize;\n }\n\n /* \n ED-15882: When custom start numbers is enabled for lists, we have\n styles that handle this generally (in editor-common) so we can\n throw away the older table-specific styles here.\n */\n ", "\n"])), ClassName.LAYOUT_BUTTON, "var(--ds-background-neutral, ".concat(N20A, ")"), "var(--ds-icon, ".concat(N300, ")"), ClassName.LAYOUT_BUTTON, ClassName.IS_RESIZING, "var(--ds-background-neutral-hovered, ".concat(B300, ")"), "var(--ds-icon, white)", tableSharedStyle(props), columnControlsLineMarker(props), hoveredDeleteButton, hoveredCell, hoveredWarningCell, resizeHandle, rangeSelectionStyles, ClassName.LAST_ITEM_IN_CELL, ClassName.TABLE_NODE_WRAPPER, ClassName.TABLE_CELL, ClassName.TABLE_HEADER_CELL, ClassName.TABLE_CELL, tableCellBackgroundColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.CONTROLS_FLOATING_BUTTON_COLUMN, insertColumnButtonWrapper, ClassName.CONTROLS_FLOATING_BUTTON_ROW, insertRowButtonWrapper, DeleteButton, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, stickyRowOffsetTop + 2, akEditorTableNumberColumnWidth, akEditorStickyHeaderZIndex, stickyRowOffsetTop, "var(--ds-surface, white)", ClassName.TABLE_STICKY, ClassName.CORNER_CONTROLS, akEditorSmallZIndex, "var(--ds-surface, white)", tableToolbarSize, tableToolbarSize, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize, tableToolbarSize, ClassName.TABLE_STICKY, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_STICKY, ClassName.ROW_CONTROLS, ClassName.ROW_CONTROLS_BUTTON_WRAP, akEditorStickyHeaderZIndex, tableToolbarSize, "var(--ds-surface, white)", tableToolbarSize, ClassName.TABLE_STICKY, "var(--ds-surface, green)", stickyRowOffsetTop, stickyRowZIndex, "var(--ds-surface, white)", "var(--ds-shadow-overflow, ".concat("0 6px 4px -4px ".concat(N40A), ")"), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, stickyRowZIndex + 1, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tableToolbarSize, stickyHeaderBorderBottomWidth, tableBorderColor(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, ClassName.TABLE_STICKY, insertColumnButtonOffset + 1, ClassName.TABLE_STICKY, ClassName.TABLE_CONTAINER, ClassName.TABLE_STICKY, ClassName.WITH_RESIZE_LINE, ClassName.WITH_RESIZE_LINE, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.WITH_RESIZE_LINE, ClassName.SELECTED_CELL, ClassName.RESIZE_HANDLE_DECORATION, (resizeHandlerAreaWidth - resizeLineWidth) / 2, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, ClassName.WITH_CONTROLS, tableControlsSpacing, ClassName.WITH_CONTROLS, ClassName.TABLE_STICKY, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, tableControlsSpacing + 2, ClassName.CORNER_CONTROLS, tableControlsSpacing - tableToolbarSize + 2, "var(--ds-surface, white)", (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.stickyHeadersOptimization ? sentinelStyles : '', OverflowShadow(props), ClassName.TABLE_STICKY, ClassName.TABLE_STICKY_SHADOW, tablePadding, ClassName.ROW_CONTROLS_WRAPPER, tablePadding, ClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth + tablePadding - 1, ClassName.TABLE_LEFT_SHADOW, ClassName.TABLE_RIGHT_SHADOW, ClassName.NODEVIEW_WRAPPER, ClassName.NODEVIEW_WRAPPER, ClassName.TABLE_CONTAINER, columnControlsDecoration(props), ClassName.CORNER_CONTROLS, tableToolbarSize + 1, cornerControlHeight, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, InsertMarker(props, "\n left: -11px;\n top: 9px;\n "), ClassName.CORNER_CONTROLS, ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER, ClassName.CONTROLS_CORNER_BUTTON, tableToolbarSize + 1, tableToolbarSize + 1, tableBorderColor(props), tableBorderRadiusSize, tableToolbarColor(props), ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.TABLE_CONTAINER, ClassName.CORNER_CONTROLS, ClassName.CONTROLS_CORNER_BUTTON, akEditorTableToolbarSize + akEditorTableNumberColumnWidth, ClassName.ROW_CONTROLS, ClassName.CONTROLS_BUTTON, ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), ClassName.IS_RESIZING, ClassName.CONTROLS_CORNER_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), ClassName.ROW_CONTROLS, tableToolbarSize, InsertMarker(props, "\n bottom: -1px;\n left: -11px;\n "), ClassName.ROW_CONTROLS_INNER, ClassName.ROW_CONTROLS_BUTTON_WRAP, tableBorderRadiusSize, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.ROW_CONTROLS_BUTTON_WRAP, ClassName.CONTROLS_BUTTON, akEditorUnitZIndex, HeaderButton(props, "\n border-bottom: 1px solid ".concat(tableBorderColor(props), ";\n border-right: 0px;\n border-radius: 0;\n height: 100%;\n width: ").concat(tableToolbarSize, "px;\n\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, " {\n position: absolute;\n width: 30px;\n height: 50%;\n right: 0;\n bottom: 0;\n }\n .").concat(ClassName.CONTROLS_BUTTON_OVERLAY, ":first-of-type {\n top: 0;\n }\n ")), ClassName.IS_RESIZING, ClassName.ROW_CONTROLS, HeaderButtonHover(), HeaderButtonDanger(), ClassName.NUMBERED_COLUMN, akEditorTableToolbarSize - 1, akEditorTableToolbarSize, akEditorTableNumberColumnWidth + 1, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderColor(props), relativeFontSizeToBase16(fontSize()), tableToolbarColor(props), tableTextColor(props), tableBorderColor(props), tableBorderColor(props), ClassName.WITH_CONTROLS, ClassName.CORNER_CONTROLS, ClassName.ROW_CONTROLS, ClassName.NUMBERED_COLUMN, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.IS_RESIZING, ClassName.WITH_CONTROLS, ClassName.NUMBERED_COLUMN_BUTTON, ClassName.NUMBERED_COLUMN_BUTTON, tableBorderSelectedColor, tableBorderSelectedColor, "var(--ds-background-selected, ".concat(tableToolbarSelectedColor, ")"), akEditorUnitZIndex, "var(--ds-text-selected, ".concat(N0, ")"), ClassName.NUMBERED_COLUMN_BUTTON, ClassName.HOVERED_CELL_IN_DANGER, "var(--ds-background-danger, ".concat(tableToolbarDeleteColor, ")"), tableBorderDeleteColor, "var(--ds-text-danger, ".concat(R500, ")"), akEditorUnitZIndex, ClassName.TABLE_NODE_WRAPPER, ClassName.COLUMN_CONTROLS_DECORATIONS, ClassName.TABLE_HEADER_CELL, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, ClassName.SELECTED_CELL, ClassName.HOVERED_CELL_IN_DANGER, akEditorSmallZIndex, ClassName.SELECTED_CELL, tableBorderSelectedColor, ClassName.SELECTED_CELL, tableCellSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, ClassName.HOVERED_CELL_IN_DANGER, tableCellDeleteColor, akEditorUnitZIndex * 100, ClassName.HOVERED_CELL, ClassName.SELECTED_CELL, tableBorderSelectedColor, akEditorSmallZIndex, ClassName.HOVERED_CELL_IN_DANGER, tableBorderDeleteColor, akEditorUnitZIndex * 100, ClassName.ROW_CONTROLS_WRAPPER, tableMarginTop - cornerControlHeight + 1, ClassName.ROW_CONTROLS_WRAPPER, ClassName.TABLE_LEFT_SHADOW, akEditorUnitZIndex, ClassName.ROW_CONTROLS_WRAPPER, tableToolbarSize, ClassName.TABLE_NODE_WRAPPER, insertColumnButtonOffset, insertColumnButtonOffset, tableScrollbarOffset, tableScrollbarOffset, ClassName.IS_RESIZING, ClassName.TABLE_NODE_WRAPPER, scrollbarStyles, ClassName.RESIZE_CURSOR, props !== null && props !== void 0 && (_props$featureFlags2 = props.featureFlags) !== null && _props$featureFlags2 !== void 0 && _props$featureFlags2.restartNumberedLists ? "" : listLargeNumericMarkersOldStyles);
|
|
33
32
|
};
|
|
34
33
|
export var tableFullPageEditorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n width: 100%;\n }\n"])), ClassName.TABLE_NODE_WRAPPER);
|
|
35
34
|
export var tableCommentEditorStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ProseMirror .", " > table {\n margin-left: 0;\n margin-right: 0;\n ", ";\n }\n"])), ClassName.TABLE_NODE_WRAPPER, scrollbarStyles);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { B200, B300, N20, R400, R75, DN400, N200, DN30, N0 } from '@atlaskit/theme/colors';
|
|
2
2
|
import { tableCellBorderWidth, tableMarginTop } from '@atlaskit/editor-common/styles';
|
|
3
3
|
import { akEditorTableBorder, akEditorTableBorderDark, akEditorTableToolbar, akEditorTableToolbarDark, akEditorTableToolbarSize, akEditorUnitZIndex, akRichMediaResizeZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { token } from '@atlaskit/tokens';
|
|
5
4
|
import { RESIZE_HANDLE_AREA_DECORATION_GAP } from '../types';
|
|
6
5
|
import { themed } from '@atlaskit/theme/components';
|
|
7
6
|
/**
|
|
@@ -11,29 +10,29 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
11
10
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
12
11
|
|
|
13
12
|
export var tableCellBackgroundColor = themed({
|
|
14
|
-
light:
|
|
15
|
-
dark:
|
|
13
|
+
light: "var(--ds-surface, ".concat(N0, ")"),
|
|
14
|
+
dark: "var(--ds-surface, ".concat(DN30, ")")
|
|
16
15
|
});
|
|
17
16
|
export var tableToolbarColor = themed({
|
|
18
|
-
light:
|
|
19
|
-
dark:
|
|
17
|
+
light: "var(--ds-background-neutral-subtle, ".concat(akEditorTableToolbar, ")"),
|
|
18
|
+
dark: "var(--ds-background-neutral-subtle, ".concat(akEditorTableToolbarDark, ")")
|
|
20
19
|
});
|
|
21
20
|
export var tableTextColor = themed({
|
|
22
|
-
light:
|
|
23
|
-
dark:
|
|
21
|
+
light: "var(--ds-text-subtlest, ".concat(N200, ")"),
|
|
22
|
+
dark: "var(--ds-text-subtlest, ".concat(DN400, ")")
|
|
24
23
|
});
|
|
25
24
|
export var tableBorderColor = themed({
|
|
26
|
-
light:
|
|
27
|
-
dark:
|
|
25
|
+
light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
|
|
26
|
+
dark: "var(--ds-border, ".concat(akEditorTableBorderDark, ")")
|
|
28
27
|
});
|
|
29
|
-
export var tableFloatingControlsColor =
|
|
28
|
+
export var tableFloatingControlsColor = "var(--ds-background-neutral, ".concat(N20, ")"); // TODO: https://product-fabric.atlassian.net/browse/DSP-4461
|
|
30
29
|
|
|
31
|
-
export var tableCellSelectedColor =
|
|
32
|
-
export var tableToolbarSelectedColor =
|
|
33
|
-
export var tableBorderSelectedColor =
|
|
34
|
-
export var tableCellDeleteColor =
|
|
35
|
-
export var tableBorderDeleteColor =
|
|
36
|
-
export var tableToolbarDeleteColor =
|
|
30
|
+
export var tableCellSelectedColor = "var(--ds-blanket-selected, rgba(179, 212, 255, 0.3))";
|
|
31
|
+
export var tableToolbarSelectedColor = "var(--ds-background-selected-bold, ".concat(B200, ")");
|
|
32
|
+
export var tableBorderSelectedColor = "var(--ds-border-selected, ".concat(B300, ")");
|
|
33
|
+
export var tableCellDeleteColor = "var(--ds-blanket-danger, rgba(255, 235, 230, 0.3))";
|
|
34
|
+
export var tableBorderDeleteColor = "var(--ds-border-danger, ".concat(R400, ")");
|
|
35
|
+
export var tableToolbarDeleteColor = "var(--ds-background-danger-bold, ".concat(R75, ")");
|
|
37
36
|
export var tableBorderRadiusSize = 3;
|
|
38
37
|
export var tablePadding = 8;
|
|
39
38
|
export var tableScrollbarOffset = 15;
|