@atlaskit/editor-plugin-table 7.6.2 → 7.6.4
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/commands/misc.js +3 -2
- package/dist/cjs/nodeviews/TableComponent.js +25 -11
- package/dist/cjs/nodeviews/TableComponentWithSharedState.js +87 -0
- package/dist/cjs/nodeviews/TableContainer.js +37 -21
- package/dist/cjs/nodeviews/TableResizer.js +40 -29
- package/dist/cjs/nodeviews/table.js +21 -1
- package/dist/cjs/plugin.js +25 -2
- package/dist/cjs/toolbar.js +5 -4
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +16 -16
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +3 -3
- package/dist/cjs/ui/FloatingDragMenu/DropdownMenu.js +21 -28
- package/dist/cjs/ui/TableFloatingColumnControls/ColumnControls/index.js +6 -2
- package/dist/cjs/ui/TableFloatingColumnControls/index.js +5 -2
- package/dist/cjs/ui/TableFloatingControls/CornerControls/DragCornerControls.js +48 -1
- package/dist/cjs/ui/TableFloatingControls/CornerControls/index.js +6 -0
- package/dist/cjs/ui/TableFloatingControls/FloatingControlsWithSelection.js +47 -0
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
- package/dist/cjs/ui/TableFloatingControls/index.js +25 -3
- package/dist/cjs/ui/common-styles.js +11 -6
- package/dist/cjs/utils/guidelines.js +1 -1
- package/dist/es2019/commands/misc.js +6 -2
- package/dist/es2019/nodeviews/TableComponent.js +27 -12
- package/dist/es2019/nodeviews/TableComponentWithSharedState.js +83 -0
- package/dist/es2019/nodeviews/TableContainer.js +24 -6
- package/dist/es2019/nodeviews/TableResizer.js +27 -19
- package/dist/es2019/nodeviews/table.js +21 -1
- package/dist/es2019/plugin.js +26 -3
- package/dist/es2019/toolbar.js +5 -4
- package/dist/es2019/types.js +3 -0
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +16 -16
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +3 -3
- package/dist/es2019/ui/FloatingDragMenu/DropdownMenu.js +20 -27
- package/dist/es2019/ui/TableFloatingColumnControls/ColumnControls/index.js +7 -2
- package/dist/es2019/ui/TableFloatingColumnControls/index.js +5 -2
- package/dist/es2019/ui/TableFloatingControls/CornerControls/DragCornerControls.js +55 -0
- package/dist/es2019/ui/TableFloatingControls/CornerControls/index.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/FloatingControlsWithSelection.js +42 -0
- package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
- package/dist/es2019/ui/TableFloatingControls/index.js +26 -4
- package/dist/es2019/ui/common-styles.js +589 -588
- package/dist/es2019/utils/guidelines.js +1 -1
- package/dist/esm/commands/misc.js +3 -2
- package/dist/esm/nodeviews/TableComponent.js +25 -11
- package/dist/esm/nodeviews/TableComponentWithSharedState.js +80 -0
- package/dist/esm/nodeviews/TableContainer.js +37 -21
- package/dist/esm/nodeviews/TableResizer.js +41 -30
- package/dist/esm/nodeviews/table.js +21 -1
- package/dist/esm/plugin.js +26 -3
- package/dist/esm/toolbar.js +5 -4
- package/dist/esm/types.js +3 -0
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +16 -16
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +3 -3
- package/dist/esm/ui/FloatingDragMenu/DropdownMenu.js +21 -28
- package/dist/esm/ui/TableFloatingColumnControls/ColumnControls/index.js +6 -2
- package/dist/esm/ui/TableFloatingColumnControls/index.js +5 -2
- package/dist/esm/ui/TableFloatingControls/CornerControls/DragCornerControls.js +47 -0
- package/dist/esm/ui/TableFloatingControls/CornerControls/index.js +1 -1
- package/dist/esm/ui/TableFloatingControls/FloatingControlsWithSelection.js +40 -0
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +3 -2
- package/dist/esm/ui/TableFloatingControls/index.js +26 -4
- package/dist/esm/ui/common-styles.js +10 -5
- package/dist/esm/utils/guidelines.js +1 -1
- package/dist/types/commands/misc.d.ts +2 -1
- package/dist/types/nodeviews/TableComponent.d.ts +7 -2
- package/dist/types/nodeviews/TableComponentWithSharedState.d.ts +27 -0
- package/dist/types/nodeviews/TableContainer.d.ts +4 -2
- package/dist/types/nodeviews/TableResizer.d.ts +4 -1
- package/dist/types/nodeviews/types.d.ts +1 -0
- package/dist/types/plugin.d.ts +11 -7
- package/dist/types/types.d.ts +13 -4
- package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +113 -1
- package/dist/types/ui/TableFloatingColumnControls/index.d.ts +3 -2
- package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +223 -0
- package/dist/types/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +20 -0
- package/dist/types/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +2 -0
- package/dist/types/ui/TableFloatingControls/index.d.ts +113 -1
- package/dist/types/ui/common-styles.d.ts +3 -0
- package/dist/types-ts4.5/commands/misc.d.ts +2 -1
- package/dist/types-ts4.5/nodeviews/TableComponent.d.ts +7 -2
- package/dist/types-ts4.5/nodeviews/TableComponentWithSharedState.d.ts +27 -0
- package/dist/types-ts4.5/nodeviews/TableContainer.d.ts +4 -2
- package/dist/types-ts4.5/nodeviews/TableResizer.d.ts +4 -1
- package/dist/types-ts4.5/nodeviews/types.d.ts +1 -0
- package/dist/types-ts4.5/plugin.d.ts +11 -7
- package/dist/types-ts4.5/types.d.ts +13 -4
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +144 -1
- package/dist/types-ts4.5/ui/TableFloatingColumnControls/index.d.ts +3 -2
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +285 -0
- package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/TableFloatingControls/FloatingControlsWithSelection.d.ts +20 -0
- package/dist/types-ts4.5/ui/TableFloatingControls/RowControls/ClassicControls.d.ts +2 -0
- package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +144 -1
- package/dist/types-ts4.5/ui/common-styles.d.ts +3 -0
- package/package.json +6 -6
- package/src/commands/misc.ts +6 -3
- package/src/nodeviews/TableComponent.tsx +36 -7
- package/src/nodeviews/TableComponentWithSharedState.tsx +125 -0
- package/src/nodeviews/TableContainer.tsx +24 -3
- package/src/nodeviews/TableResizer.tsx +36 -21
- package/src/nodeviews/table.tsx +22 -1
- package/src/nodeviews/types.ts +1 -0
- package/src/plugin.tsx +47 -6
- package/src/toolbar.tsx +20 -19
- package/src/types.ts +33 -4
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +66 -112
- package/src/ui/FloatingDragMenu/DragMenu.tsx +3 -12
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +19 -28
- package/src/ui/TableFloatingColumnControls/ColumnControls/index.tsx +10 -2
- package/src/ui/TableFloatingColumnControls/index.tsx +13 -1
- package/src/ui/TableFloatingControls/CornerControls/DragCornerControls.tsx +58 -0
- package/src/ui/TableFloatingControls/CornerControls/index.tsx +4 -1
- package/src/ui/TableFloatingControls/FloatingControlsWithSelection.tsx +68 -0
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +4 -1
- package/src/ui/TableFloatingControls/index.tsx +42 -8
- package/src/ui/common-styles.ts +611 -610
- package/src/utils/guidelines.ts +5 -4
|
@@ -205,74 +205,61 @@ const tableWrapperStyles = () => {
|
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
207
|
|
|
208
|
-
//
|
|
209
|
-
export const
|
|
208
|
+
// re-exporting these styles to use in Gemini test when table node view is rendered outside of PM
|
|
209
|
+
export const baseTableStyles = props => {
|
|
210
210
|
var _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4;
|
|
211
211
|
return css`
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
212
|
+
${tableSharedStyle()};
|
|
213
|
+
${columnControlsLineMarker()};
|
|
214
|
+
${hoveredDeleteButton()};
|
|
215
|
+
${hoveredCell()};
|
|
216
|
+
${hoveredWarningCell};
|
|
217
|
+
${((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableDragAndDrop) && insertLine()};
|
|
218
|
+
${resizeHandle((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.tableDragAndDrop)};
|
|
219
|
+
${rangeSelectionStyles};
|
|
220
|
+
|
|
221
|
+
.${ClassName.LAST_ITEM_IN_CELL} {
|
|
222
|
+
margin-bottom: 0;
|
|
222
223
|
}
|
|
223
224
|
|
|
224
|
-
.
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
${hoveredCell()};
|
|
229
|
-
${hoveredWarningCell};
|
|
230
|
-
${((_props$featureFlags = props.featureFlags) === null || _props$featureFlags === void 0 ? void 0 : _props$featureFlags.tableDragAndDrop) && insertLine()};
|
|
231
|
-
${resizeHandle((_props$featureFlags2 = props.featureFlags) === null || _props$featureFlags2 === void 0 ? void 0 : _props$featureFlags2.tableDragAndDrop)};
|
|
232
|
-
${rangeSelectionStyles};
|
|
233
|
-
|
|
234
|
-
.${ClassName.LAST_ITEM_IN_CELL} {
|
|
235
|
-
margin-bottom: 0;
|
|
225
|
+
.${ClassName.TABLE_NODE_WRAPPER} {
|
|
226
|
+
td.${ClassName.TABLE_CELL}, th.${ClassName.TABLE_HEADER_CELL} {
|
|
227
|
+
position: relative;
|
|
228
|
+
overflow: visible;
|
|
236
229
|
}
|
|
237
230
|
|
|
238
|
-
.${ClassName.
|
|
239
|
-
|
|
240
|
-
position: relative;
|
|
241
|
-
overflow: visible;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
td.${ClassName.TABLE_CELL} {
|
|
245
|
-
background-color: ${tableCellBackgroundColor};
|
|
231
|
+
td.${ClassName.TABLE_CELL} {
|
|
232
|
+
background-color: ${tableCellBackgroundColor};
|
|
246
233
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
234
|
+
// ED-15246: Trello card is visible through a border of a table border
|
|
235
|
+
// This fixes a border issue caused by relative positioned table cells
|
|
236
|
+
&::after {
|
|
237
|
+
height: 100%;
|
|
238
|
+
content: '';
|
|
239
|
+
border-left: 1px solid ${tableBorderColor};
|
|
240
|
+
border-bottom: 1px solid ${tableBorderColor};
|
|
241
|
+
position: absolute;
|
|
242
|
+
right: 0px;
|
|
243
|
+
top: 0px;
|
|
244
|
+
bottom: 0;
|
|
245
|
+
width: 100%;
|
|
246
|
+
display: inline-block;
|
|
247
|
+
pointer-events: none;
|
|
262
248
|
}
|
|
263
249
|
}
|
|
250
|
+
}
|
|
264
251
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
252
|
+
.${ClassName.CONTROLS_FLOATING_BUTTON_COLUMN} {
|
|
253
|
+
${insertColumnButtonWrapper()}
|
|
254
|
+
}
|
|
268
255
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
256
|
+
.${ClassName.CONTROLS_FLOATING_BUTTON_ROW} {
|
|
257
|
+
${insertRowButtonWrapper()}
|
|
258
|
+
}
|
|
272
259
|
|
|
273
|
-
|
|
260
|
+
${dragInsertButtonWrapper()}
|
|
274
261
|
|
|
275
|
-
|
|
262
|
+
${dragCornerControlButton()}
|
|
276
263
|
|
|
277
264
|
/* Delete button */
|
|
278
265
|
${DeleteButton()}
|
|
@@ -280,316 +267,312 @@ export const tableStyles = props => {
|
|
|
280
267
|
|
|
281
268
|
/* sticky styles */
|
|
282
269
|
.${ClassName.TABLE_STICKY} .${ClassName.NUMBERED_COLUMN} .${ClassName.NUMBERED_COLUMN_BUTTON}:first-of-type {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
270
|
+
margin-top: ${stickyRowOffsetTop + 2}px;
|
|
271
|
+
width: ${akEditorTableNumberColumnWidth}px;
|
|
272
|
+
|
|
273
|
+
position: fixed !important;
|
|
274
|
+
z-index: ${akEditorStickyHeaderZIndex} !important;
|
|
275
|
+
box-shadow: 0px -${stickyRowOffsetTop}px ${"var(--ds-surface, white)"};
|
|
276
|
+
border-right: 0 none;
|
|
277
|
+
/* top set by NumberColumn component */
|
|
278
|
+
}
|
|
292
279
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
280
|
+
.${ClassName.TABLE_STICKY} .${ClassName.CORNER_CONTROLS}.sticky {
|
|
281
|
+
position: fixed !important;
|
|
282
|
+
/* needs to be above row controls */
|
|
283
|
+
z-index: ${akEditorSmallZIndex} !important;
|
|
284
|
+
background: ${"var(--ds-surface, white)"};
|
|
298
285
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
286
|
+
width: ${tableToolbarSize}px;
|
|
287
|
+
height: ${tableToolbarSize}px;
|
|
288
|
+
}
|
|
302
289
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
290
|
+
.${ClassName.CORNER_CONTROLS}.sticky .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
291
|
+
border-bottom: 0px none;
|
|
292
|
+
border-right: 0px none;
|
|
306
293
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
294
|
+
height: ${tableToolbarSize}px;
|
|
295
|
+
width: ${tableToolbarSize}px;
|
|
296
|
+
}
|
|
310
297
|
|
|
311
|
-
|
|
298
|
+
${tableStickyHeaderColumnControlsDecorationsStyle()}
|
|
312
299
|
|
|
313
|
-
|
|
300
|
+
${tableStickyHeaderFirefoxFixStyle()}
|
|
314
301
|
|
|
315
302
|
.${ClassName.TABLE_STICKY}
|
|
316
303
|
.${ClassName.ROW_CONTROLS}
|
|
317
304
|
.${ClassName.ROW_CONTROLS_BUTTON_WRAP}.sticky {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
.${ClassName.TABLE_STICKY} col:first-of-type {
|
|
327
|
-
/* moving rows out of a table layout does weird things in Chrome */
|
|
328
|
-
border-right: 1px solid ${"var(--ds-surface, green)"};
|
|
329
|
-
}
|
|
305
|
+
position: fixed !important;
|
|
306
|
+
z-index: ${akEditorStickyHeaderZIndex} !important;
|
|
307
|
+
display: flex;
|
|
308
|
+
border-left: ${tableToolbarSize}px solid
|
|
309
|
+
${"var(--ds-surface, white)"};
|
|
310
|
+
margin-left: -${tableToolbarSize}px;
|
|
311
|
+
}
|
|
330
312
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
313
|
+
.${ClassName.TABLE_STICKY} col:first-of-type {
|
|
314
|
+
/* moving rows out of a table layout does weird things in Chrome */
|
|
315
|
+
border-right: 1px solid ${"var(--ds-surface, green)"};
|
|
316
|
+
}
|
|
335
317
|
|
|
336
|
-
|
|
337
|
-
|
|
318
|
+
tr.sticky {
|
|
319
|
+
padding-top: ${stickyRowOffsetTop}px;
|
|
320
|
+
position: fixed;
|
|
321
|
+
display: grid;
|
|
338
322
|
|
|
339
|
-
|
|
340
|
-
|
|
323
|
+
/* to keep it above cell selection but below date and other nodes popups that are inside sticky header */
|
|
324
|
+
z-index: ${akEditorTableCellOnStickyHeaderZIndex - 5};
|
|
341
325
|
|
|
342
|
-
|
|
326
|
+
overflow-y: visible;
|
|
327
|
+
overflow-x: hidden;
|
|
343
328
|
|
|
344
|
-
|
|
345
|
-
background: ${"var(--ds-surface, white)"};
|
|
346
|
-
box-sizing: content-box;
|
|
329
|
+
grid-auto-flow: column;
|
|
347
330
|
|
|
348
|
-
|
|
331
|
+
/* background for where controls apply */
|
|
332
|
+
background: ${"var(--ds-surface, white)"};
|
|
333
|
+
box-sizing: content-box;
|
|
349
334
|
|
|
350
|
-
|
|
351
|
-
margin-left: -1px;
|
|
335
|
+
margin-top: 2px;
|
|
352
336
|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
}
|
|
337
|
+
box-shadow: 0 6px 4px -4px ${`var(--ds-shadow-overflow-perimeter, ${N40A})`};
|
|
338
|
+
margin-left: -1px;
|
|
357
339
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
position: fixed;
|
|
361
|
-
/* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */
|
|
362
|
-
z-index: ${akEditorTableCellOnStickyHeaderZIndex};
|
|
340
|
+
&.no-pointer-events {
|
|
341
|
+
pointer-events: none;
|
|
363
342
|
}
|
|
343
|
+
}
|
|
364
344
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
345
|
+
.${ClassName.TABLE_STICKY} .${ClassName.TABLE_STICKY_SHADOW} {
|
|
346
|
+
left: unset;
|
|
347
|
+
position: fixed;
|
|
348
|
+
/* needs to be above sticky header row and below date and other nodes popups that are inside sticky header */
|
|
349
|
+
z-index: ${akEditorTableCellOnStickyHeaderZIndex};
|
|
350
|
+
}
|
|
369
351
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
352
|
+
.${ClassName.WITH_CONTROLS}.${ClassName.TABLE_STICKY}
|
|
353
|
+
.${ClassName.TABLE_STICKY_SHADOW} {
|
|
354
|
+
padding-bottom: ${tableToolbarSize}px;
|
|
355
|
+
}
|
|
375
356
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
357
|
+
tr.sticky th {
|
|
358
|
+
border-bottom: ${stickyHeaderBorderBottomWidth}px solid ${tableBorderColor};
|
|
359
|
+
margin-right: -1px;
|
|
360
|
+
}
|
|
379
361
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}
|
|
362
|
+
.${ClassName.TABLE_STICKY} tr.sticky > th:last-child {
|
|
363
|
+
border-right-width: 1px;
|
|
364
|
+
}
|
|
384
365
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
366
|
+
/* add left edge for first cell */
|
|
367
|
+
.${ClassName.TABLE_STICKY} tr.sticky > th:first-of-type {
|
|
368
|
+
margin-left: 0px;
|
|
369
|
+
}
|
|
390
370
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
371
|
+
/* add a little bit so the scroll lines up with the table */
|
|
372
|
+
.${ClassName.TABLE_STICKY} tr.sticky::after {
|
|
373
|
+
content: ' ';
|
|
374
|
+
width: ${insertColumnButtonOffset + 1}px;
|
|
375
|
+
}
|
|
395
376
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
tr.sticky
|
|
401
|
-
th.${ClassName.WITH_RESIZE_LINE} {
|
|
402
|
-
.${ClassName.RESIZE_HANDLE_DECORATION}::after {
|
|
403
|
-
right: ${(resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1}px;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
377
|
+
/* To fix jumpiness caused in Chrome Browsers for sticky headers */
|
|
378
|
+
.${ClassName.TABLE_STICKY} .sticky + tr {
|
|
379
|
+
min-height: 0px;
|
|
380
|
+
}
|
|
406
381
|
|
|
407
|
-
|
|
382
|
+
/* move resize line a little in sticky bar */
|
|
383
|
+
.${ClassName.TABLE_CONTAINER}.${ClassName.TABLE_STICKY} {
|
|
384
|
+
tr.sticky
|
|
385
|
+
td.${ClassName.WITH_RESIZE_LINE},
|
|
408
386
|
tr.sticky
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
.${ClassName.RESIZE_HANDLE_DECORATION}::after {
|
|
413
|
-
right: ${(resizeHandlerAreaWidth - resizeLineWidth) / 2}px;
|
|
414
|
-
}
|
|
387
|
+
th.${ClassName.WITH_RESIZE_LINE} {
|
|
388
|
+
.${ClassName.RESIZE_HANDLE_DECORATION}::after {
|
|
389
|
+
right: ${(resizeHandlerAreaWidth - resizeLineWidth) / 2 + 1}px;
|
|
415
390
|
}
|
|
416
391
|
}
|
|
417
392
|
|
|
393
|
+
/* when selected put it back to normal -- :not selector would be nicer */
|
|
418
394
|
tr.sticky
|
|
419
|
-
.${ClassName.
|
|
395
|
+
td.${ClassName.WITH_RESIZE_LINE}.${ClassName.SELECTED_CELL},
|
|
420
396
|
tr.sticky
|
|
421
|
-
.${ClassName.SELECTED_CELL} {
|
|
422
|
-
|
|
397
|
+
th.${ClassName.WITH_RESIZE_LINE}.${ClassName.SELECTED_CELL} {
|
|
398
|
+
.${ClassName.RESIZE_HANDLE_DECORATION}::after {
|
|
399
|
+
right: ${(resizeHandlerAreaWidth - resizeLineWidth) / 2}px;
|
|
400
|
+
}
|
|
423
401
|
}
|
|
402
|
+
}
|
|
424
403
|
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
404
|
+
tr.sticky .${ClassName.HOVERED_CELL}, tr.sticky .${ClassName.SELECTED_CELL} {
|
|
405
|
+
z-index: 1;
|
|
406
|
+
}
|
|
428
407
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
margin-top: ${tableControlsSpacing + 2}px;
|
|
433
|
-
}
|
|
408
|
+
.${ClassName.WITH_CONTROLS} tr.sticky {
|
|
409
|
+
padding-top: ${tableControlsSpacing}px;
|
|
410
|
+
}
|
|
434
411
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
}
|
|
412
|
+
.${ClassName.WITH_CONTROLS}.${ClassName.TABLE_STICKY}
|
|
413
|
+
.${ClassName.NUMBERED_COLUMN}
|
|
414
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}:first-of-type {
|
|
415
|
+
margin-top: ${tableControlsSpacing + 2}px;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.${ClassName.CORNER_CONTROLS}.sticky {
|
|
419
|
+
border-top: ${tableControlsSpacing - tableToolbarSize + 2}px solid
|
|
420
|
+
${"var(--ds-surface, white)"};
|
|
421
|
+
}
|
|
439
422
|
|
|
440
|
-
|
|
441
|
-
|
|
423
|
+
${sentinelStyles}
|
|
424
|
+
${OverflowShadow((_props$featureFlags3 = props.featureFlags) === null || _props$featureFlags3 === void 0 ? void 0 : _props$featureFlags3.tableDragAndDrop)}
|
|
442
425
|
${stickyScrollbarStyles(props.featureFlags)}
|
|
443
426
|
|
|
444
427
|
.${ClassName.TABLE_STICKY} .${ClassName.TABLE_STICKY_SHADOW} {
|
|
445
|
-
|
|
446
|
-
|
|
428
|
+
height: 0; // stop overflow flash & set correct height in update-overflow-shadows.ts
|
|
429
|
+
}
|
|
447
430
|
|
|
448
|
-
|
|
449
|
-
|
|
431
|
+
.less-padding {
|
|
432
|
+
padding: 0 ${tablePadding}px;
|
|
450
433
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
434
|
+
.${ClassName.DRAG_ROW_CONTROLS_WRAPPER},
|
|
435
|
+
.${ClassName.ROW_CONTROLS_WRAPPER} {
|
|
436
|
+
padding: 0 ${tablePadding}px;
|
|
454
437
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
438
|
+
// https://product-fabric.atlassian.net/browse/ED-16386
|
|
439
|
+
// Fixes issue where the extra padding that is added here throws off the position
|
|
440
|
+
// of the rows control dot
|
|
441
|
+
&::after {
|
|
442
|
+
right: 6px !important;
|
|
461
443
|
}
|
|
444
|
+
}
|
|
462
445
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
446
|
+
.${ClassName.DRAG_COLUMN_CONTROLS_WRAPPER} {
|
|
447
|
+
padding: 0 ${tablePadding}px;
|
|
448
|
+
}
|
|
466
449
|
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
450
|
+
&.${ClassName.TABLE_CONTAINER}[data-number-column='true'] {
|
|
451
|
+
padding-left: ${akEditorTableNumberColumnWidth + tablePadding - 1}px;
|
|
452
|
+
}
|
|
453
|
+
.${ClassName.TABLE_LEFT_SHADOW}, .${ClassName.TABLE_RIGHT_SHADOW} {
|
|
454
|
+
width: ${tableOverflowShadowWidth}px;
|
|
455
|
+
}
|
|
473
456
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
457
|
+
.${ClassName.TABLE_LEFT_SHADOW} {
|
|
458
|
+
left: 6px;
|
|
459
|
+
}
|
|
477
460
|
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
}
|
|
461
|
+
.${ClassName.TABLE_RIGHT_SHADOW} {
|
|
462
|
+
left: calc(100% - 6px);
|
|
481
463
|
}
|
|
464
|
+
}
|
|
482
465
|
|
|
483
|
-
|
|
484
|
-
|
|
466
|
+
> .${ClassName.NODEVIEW_WRAPPER} {
|
|
467
|
+
/**
|
|
485
468
|
* Prevent margins collapsing, aids with placing the gap-cursor correctly
|
|
486
469
|
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing
|
|
487
470
|
*
|
|
488
471
|
* TODO: Enable this, many tests will fail!
|
|
489
472
|
* border-top: 1px solid transparent;
|
|
490
473
|
*/
|
|
491
|
-
|
|
474
|
+
}
|
|
492
475
|
|
|
493
|
-
|
|
494
|
-
|
|
476
|
+
/* Breakout only works on top level unless wrapped in fragment mark */
|
|
477
|
+
${breakoutWidthStyling()}
|
|
495
478
|
|
|
496
|
-
|
|
497
|
-
|
|
479
|
+
${columnControlsDecoration()};
|
|
480
|
+
${rowControlsWrapperDotStyle()};
|
|
498
481
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
482
|
+
/* Corner controls */
|
|
483
|
+
.${ClassName.CORNER_CONTROLS} {
|
|
484
|
+
width: ${tableToolbarSize + 1}px;
|
|
485
|
+
height: ${cornerControlHeight}px;
|
|
486
|
+
display: none;
|
|
504
487
|
|
|
505
|
-
|
|
506
|
-
|
|
488
|
+
.${ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER} {
|
|
489
|
+
position: relative;
|
|
507
490
|
|
|
508
|
-
|
|
491
|
+
${InsertMarker(`
|
|
509
492
|
left: -11px;
|
|
510
493
|
top: 9px;
|
|
511
494
|
`)};
|
|
512
|
-
}
|
|
513
495
|
}
|
|
496
|
+
}
|
|
514
497
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
}
|
|
498
|
+
.${ClassName.CORNER_CONTROLS}.sticky {
|
|
499
|
+
.${ClassName.CORNER_CONTROLS_INSERT_ROW_MARKER} {
|
|
500
|
+
/* sticky row insert dot overlaps other row insert and messes things up */
|
|
501
|
+
display: none !important;
|
|
520
502
|
}
|
|
503
|
+
}
|
|
521
504
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
.active .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
538
|
-
border-color: ${tableBorderSelectedColor};
|
|
539
|
-
background: ${tableToolbarSelectedColor};
|
|
505
|
+
.${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
506
|
+
position: absolute;
|
|
507
|
+
top: 0;
|
|
508
|
+
width: ${tableToolbarSize + 1}px;
|
|
509
|
+
height: ${tableToolbarSize + 1}px;
|
|
510
|
+
border: 1px solid ${tableBorderColor};
|
|
511
|
+
border-radius: 0;
|
|
512
|
+
border-top-left-radius: ${tableBorderRadiusSize}px;
|
|
513
|
+
background: ${tableHeaderCellBackgroundColor};
|
|
514
|
+
box-sizing: border-box;
|
|
515
|
+
padding: 0;
|
|
516
|
+
:focus {
|
|
517
|
+
outline: none;
|
|
540
518
|
}
|
|
519
|
+
}
|
|
520
|
+
.active .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
521
|
+
border-color: ${tableBorderSelectedColor};
|
|
522
|
+
background: ${tableToolbarSelectedColor};
|
|
523
|
+
}
|
|
541
524
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}
|
|
546
|
-
.${ClassName.ROW_CONTROLS} .${ClassName.CONTROLS_BUTTON} {
|
|
547
|
-
border-right-width: 0;
|
|
548
|
-
}
|
|
525
|
+
.${ClassName.TABLE_CONTAINER}[data-number-column='true'] {
|
|
526
|
+
.${ClassName.CORNER_CONTROLS}, .${ClassName.CONTROLS_CORNER_BUTTON} {
|
|
527
|
+
width: ${getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize + akEditorTableNumberColumnWidth + 1 : akEditorTableToolbarSize + akEditorTableNumberColumnWidth}px;
|
|
549
528
|
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
border-color: ${tableBorderSelectedColor};
|
|
553
|
-
background: ${tableToolbarSelectedColor};
|
|
554
|
-
cursor: pointer;
|
|
529
|
+
.${ClassName.ROW_CONTROLS} .${ClassName.CONTROLS_BUTTON} {
|
|
530
|
+
border-right-width: 0;
|
|
555
531
|
}
|
|
532
|
+
}
|
|
556
533
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
534
|
+
:not(.${ClassName.IS_RESIZING}) .${ClassName.CONTROLS_CORNER_BUTTON}:hover {
|
|
535
|
+
border-color: ${tableBorderSelectedColor};
|
|
536
|
+
background: ${tableToolbarSelectedColor};
|
|
537
|
+
cursor: pointer;
|
|
538
|
+
}
|
|
562
539
|
|
|
563
|
-
|
|
564
|
-
.${ClassName.
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
position: relative;
|
|
540
|
+
:not(.${ClassName.IS_RESIZING})
|
|
541
|
+
.${ClassName.CONTROLS_CORNER_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
542
|
+
border-color: ${tableBorderDeleteColor};
|
|
543
|
+
background: ${tableToolbarDeleteColor};
|
|
544
|
+
}
|
|
569
545
|
|
|
570
|
-
|
|
546
|
+
/* Row controls */
|
|
547
|
+
.${ClassName.ROW_CONTROLS} {
|
|
548
|
+
width: ${tableToolbarSize}px;
|
|
549
|
+
box-sizing: border-box;
|
|
550
|
+
display: none;
|
|
551
|
+
position: relative;
|
|
552
|
+
|
|
553
|
+
${InsertMarker(`
|
|
571
554
|
bottom: -1px;
|
|
572
555
|
left: -11px;
|
|
573
556
|
`)};
|
|
574
557
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
558
|
+
.${ClassName.ROW_CONTROLS_INNER} {
|
|
559
|
+
display: flex;
|
|
560
|
+
flex-direction: column;
|
|
561
|
+
}
|
|
562
|
+
.${ClassName.ROW_CONTROLS_BUTTON_WRAP}:last-child > button {
|
|
563
|
+
border-bottom-left-radius: ${tableBorderRadiusSize}px;
|
|
564
|
+
}
|
|
565
|
+
.${ClassName.ROW_CONTROLS_BUTTON_WRAP} {
|
|
566
|
+
position: relative;
|
|
567
|
+
margin-top: -1px;
|
|
568
|
+
}
|
|
569
|
+
.${ClassName.ROW_CONTROLS_BUTTON_WRAP}:hover,
|
|
570
|
+
.${ClassName.ROW_CONTROLS_BUTTON_WRAP}.active,
|
|
571
|
+
.${ClassName.CONTROLS_BUTTON}:hover {
|
|
572
|
+
z-index: ${akEditorUnitZIndex};
|
|
573
|
+
}
|
|
591
574
|
|
|
592
|
-
|
|
575
|
+
${HeaderButton(`
|
|
593
576
|
border-bottom: 1px solid ${tableBorderColor};
|
|
594
577
|
border-right: 0px;
|
|
595
578
|
border-radius: 0;
|
|
@@ -607,248 +590,234 @@ export const tableStyles = props => {
|
|
|
607
590
|
top: 0;
|
|
608
591
|
}
|
|
609
592
|
`)}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
.${ClassName.DRAG_ROW_CONTROLS} {
|
|
613
|
-
display: grid;
|
|
614
|
-
align-items: center;
|
|
615
|
-
position: absolute;
|
|
616
|
-
z-index: ${akEditorUnitZIndex};
|
|
593
|
+
}
|
|
617
594
|
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
}
|
|
595
|
+
.${ClassName.DRAG_ROW_CONTROLS} {
|
|
596
|
+
display: grid;
|
|
597
|
+
align-items: center;
|
|
598
|
+
position: absolute;
|
|
599
|
+
z-index: ${akEditorUnitZIndex};
|
|
624
600
|
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
height: 4px;
|
|
631
|
-
width: 4px;
|
|
632
|
-
border-radius: 50%;
|
|
633
|
-
pointer-events: none;
|
|
634
|
-
}
|
|
601
|
+
.${ClassName.DRAG_ROW_FLOATING_INSERT_DOT_WRAPPER} {
|
|
602
|
+
position: absolute;
|
|
603
|
+
align-self: end;
|
|
604
|
+
height: 100%;
|
|
605
|
+
width: 18px;
|
|
635
606
|
}
|
|
636
607
|
|
|
637
|
-
.${ClassName.
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
position: absolute;
|
|
647
|
-
height: 24px;
|
|
648
|
-
width: 100%;
|
|
649
|
-
}
|
|
650
|
-
|
|
651
|
-
.${ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT} {
|
|
652
|
-
background-color: ${"var(--ds-background-accent-gray-subtler, #C1C7D0)"};
|
|
653
|
-
height: 4px;
|
|
654
|
-
width: 4px;
|
|
655
|
-
border-radius: 50%;
|
|
656
|
-
position: absolute;
|
|
657
|
-
right: -2px;
|
|
658
|
-
}
|
|
608
|
+
.${ClassName.DRAG_ROW_FLOATING_INSERT_DOT} {
|
|
609
|
+
position: absolute;
|
|
610
|
+
bottom: -3px;
|
|
611
|
+
left: 2px;
|
|
612
|
+
background-color: ${"var(--ds-background-accent-gray-subtler, #C1C7D0)"};
|
|
613
|
+
height: 4px;
|
|
614
|
+
width: 4px;
|
|
615
|
+
border-radius: 50%;
|
|
616
|
+
pointer-events: none;
|
|
659
617
|
}
|
|
618
|
+
}
|
|
660
619
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
outline: none;
|
|
620
|
+
.${ClassName.DRAG_COLUMN_CONTROLS} {
|
|
621
|
+
.${ClassName.DRAG_COLUMN_CONTROLS_INNER} {
|
|
622
|
+
height: 24px;
|
|
665
623
|
position: absolute;
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
align-items: center;
|
|
670
|
-
cursor: pointer;
|
|
624
|
+
top: ${"var(--ds-space-negative-150, -12px)"};
|
|
625
|
+
z-index: ${resizeHandlerZIndex};
|
|
626
|
+
}
|
|
671
627
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
628
|
+
.${ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT_WRAPPER} {
|
|
629
|
+
position: absolute;
|
|
630
|
+
height: 24px;
|
|
631
|
+
width: 100%;
|
|
675
632
|
}
|
|
676
633
|
|
|
677
|
-
.${ClassName.
|
|
678
|
-
|
|
679
|
-
|
|
634
|
+
.${ClassName.DRAG_COLUMN_FLOATING_INSERT_DOT} {
|
|
635
|
+
background-color: ${"var(--ds-background-accent-gray-subtler, #C1C7D0)"};
|
|
636
|
+
height: 4px;
|
|
637
|
+
width: 4px;
|
|
638
|
+
border-radius: 50%;
|
|
639
|
+
position: absolute;
|
|
640
|
+
right: -2px;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
680
643
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
644
|
+
.${ClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE} {
|
|
645
|
+
background: none;
|
|
646
|
+
border: none;
|
|
647
|
+
outline: none;
|
|
648
|
+
position: absolute;
|
|
649
|
+
margin: 0;
|
|
650
|
+
padding: 0;
|
|
651
|
+
display: flex;
|
|
652
|
+
align-items: center;
|
|
653
|
+
cursor: pointer;
|
|
686
654
|
|
|
687
|
-
|
|
688
|
-
justify-content: center;
|
|
689
|
-
align-items: center;
|
|
690
|
-
background: transparent;
|
|
655
|
+
:focus {
|
|
691
656
|
outline: none;
|
|
657
|
+
}
|
|
658
|
+
}
|
|
692
659
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
660
|
+
.${ClassName.DRAG_HANDLE_BUTTON_CONTAINER} {
|
|
661
|
+
cursor: grab;
|
|
662
|
+
pointer-events: auto;
|
|
663
|
+
|
|
664
|
+
line-height: 0;
|
|
665
|
+
padding: 0;
|
|
666
|
+
border-radius: 6px;
|
|
667
|
+
width: max-content;
|
|
668
|
+
border: 2px solid ${`var(--ds-surface, ${N0})`};
|
|
669
|
+
|
|
670
|
+
display: flex;
|
|
671
|
+
justify-content: center;
|
|
672
|
+
align-items: center;
|
|
673
|
+
background: transparent;
|
|
674
|
+
outline: none;
|
|
675
|
+
|
|
676
|
+
&.placeholder {
|
|
677
|
+
background-color: transparent;
|
|
678
|
+
border: 2px solid transparent;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
&.${ClassName.DRAG_HANDLE_DISABLED} {
|
|
682
|
+
cursor: pointer;
|
|
683
|
+
& svg {
|
|
684
|
+
& > rect.${ClassName.DRAG_HANDLE_MINIMISED} {
|
|
685
|
+
fill: ${"var(--ds-background-accent-gray-subtler, #DCDFE4)"};
|
|
686
|
+
}
|
|
687
|
+
& > rect {
|
|
688
|
+
fill: ${"var(--ds-background-accent-gray-subtlest, #F4F5F7)"};
|
|
689
|
+
}
|
|
690
|
+
& > g > rect {
|
|
691
|
+
fill: ${"var(--ds-icon-disabled, #BFDBF847)"};
|
|
692
|
+
}
|
|
696
693
|
}
|
|
694
|
+
}
|
|
697
695
|
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
fill: ${"var(--ds-background-accent-gray-subtlest, #F4F5F7)"};
|
|
706
|
-
}
|
|
707
|
-
& > g > rect {
|
|
708
|
-
fill: ${"var(--ds-icon-disabled, #BFDBF847)"};
|
|
709
|
-
}
|
|
696
|
+
&:not(.${ClassName.DRAG_HANDLE_DISABLED}) {
|
|
697
|
+
& svg {
|
|
698
|
+
rect {
|
|
699
|
+
fill: ${"var(--ds-background-accent-gray-subtler, #DCDFE4)"};
|
|
700
|
+
}
|
|
701
|
+
g {
|
|
702
|
+
fill: ${"var(--ds-icon-subtle, #626f86)"};
|
|
710
703
|
}
|
|
711
704
|
}
|
|
712
705
|
|
|
713
|
-
&:
|
|
714
|
-
|
|
706
|
+
&:hover {
|
|
707
|
+
svg {
|
|
715
708
|
rect {
|
|
716
|
-
fill: ${"var(--ds-background-accent-
|
|
709
|
+
fill: ${"var(--ds-background-accent-blue-subtle, #579DFF)"};
|
|
717
710
|
}
|
|
718
711
|
g {
|
|
719
|
-
fill: ${"var(--ds-icon-
|
|
712
|
+
fill: ${"var(--ds-icon-inverse, #FFF)"};
|
|
720
713
|
}
|
|
721
714
|
}
|
|
715
|
+
}
|
|
722
716
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
}
|
|
717
|
+
&:active {
|
|
718
|
+
cursor: grabbing;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
&.selected {
|
|
722
|
+
:focus {
|
|
723
|
+
outline: 2px solid ${"var(--ds-border-focused, #2684FF)"};
|
|
724
|
+
outline-offset: 1px;
|
|
732
725
|
}
|
|
733
726
|
|
|
734
727
|
&:active {
|
|
735
|
-
|
|
728
|
+
outline: none;
|
|
736
729
|
}
|
|
737
730
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
outline-offset: 1px;
|
|
742
|
-
}
|
|
743
|
-
|
|
744
|
-
&:active {
|
|
745
|
-
outline: none;
|
|
731
|
+
svg {
|
|
732
|
+
rect {
|
|
733
|
+
fill: ${"var(--ds-background-accent-blue-subtle, #579dff)"};
|
|
746
734
|
}
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
rect {
|
|
750
|
-
fill: ${"var(--ds-background-accent-blue-subtle, #579dff)"};
|
|
751
|
-
}
|
|
752
|
-
g {
|
|
753
|
-
fill: ${"var(--ds-icon-inverse, #fff)"};
|
|
754
|
-
}
|
|
735
|
+
g {
|
|
736
|
+
fill: ${"var(--ds-icon-inverse, #fff)"};
|
|
755
737
|
}
|
|
756
738
|
}
|
|
739
|
+
}
|
|
757
740
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
}
|
|
741
|
+
&.danger {
|
|
742
|
+
svg {
|
|
743
|
+
rect {
|
|
744
|
+
fill: ${"var(--ds-background-accent-red-subtler-pressed, #F87462)"};
|
|
745
|
+
}
|
|
746
|
+
g {
|
|
747
|
+
fill: ${"var(--ds-border-inverse, #FFF)"};
|
|
766
748
|
}
|
|
767
749
|
}
|
|
768
750
|
}
|
|
769
751
|
}
|
|
752
|
+
}
|
|
770
753
|
|
|
771
|
-
|
|
754
|
+
${floatingColumnControls()}
|
|
772
755
|
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
756
|
+
:not(.${ClassName.IS_RESIZING}) .${ClassName.ROW_CONTROLS} {
|
|
757
|
+
${HeaderButtonHover()}
|
|
758
|
+
${HeaderButtonDanger()}
|
|
759
|
+
}
|
|
777
760
|
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
761
|
+
/* Numbered column */
|
|
762
|
+
.${ClassName.NUMBERED_COLUMN} {
|
|
763
|
+
position: relative;
|
|
764
|
+
float: right;
|
|
765
|
+
margin-left: ${getBooleanFF('platform.editor.custom-table-width') ? akEditorTableToolbarSize : akEditorTableToolbarSize - 1}px;
|
|
766
|
+
top: ${(_props$featureFlags4 = props.featureFlags) !== null && _props$featureFlags4 !== void 0 && _props$featureFlags4.tableDragAndDrop ? 0 : akEditorTableToolbarSize}px;
|
|
767
|
+
width: ${akEditorTableNumberColumnWidth + 1}px;
|
|
768
|
+
box-sizing: border-box;
|
|
769
|
+
}
|
|
787
770
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
}
|
|
804
|
-
:last-child {
|
|
805
|
-
border-bottom: 1px solid ${tableBorderColor};
|
|
806
|
-
}
|
|
771
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON} {
|
|
772
|
+
border: 1px solid ${tableBorderColor};
|
|
773
|
+
box-sizing: border-box;
|
|
774
|
+
margin-top: -1px;
|
|
775
|
+
padding-bottom: 2px;
|
|
776
|
+
padding: 10px 2px;
|
|
777
|
+
text-align: center;
|
|
778
|
+
font-size: ${relativeFontSizeToBase16(fontSize())};
|
|
779
|
+
background-color: ${tableHeaderCellBackgroundColor};
|
|
780
|
+
color: ${tableTextColor};
|
|
781
|
+
border-color: ${tableBorderColor};
|
|
782
|
+
|
|
783
|
+
:first-child:not(style),
|
|
784
|
+
style:first-child + * {
|
|
785
|
+
margin-top: 0;
|
|
807
786
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
// which hides the table when scrolling
|
|
811
|
-
.${ClassName.TABLE_STICKY} {
|
|
812
|
-
.${ClassName.NUMBERED_COLUMN_BUTTON_DISABLED}:first-of-type::after {
|
|
813
|
-
content: '';
|
|
814
|
-
display: block;
|
|
815
|
-
height: 33px;
|
|
816
|
-
width: 100%;
|
|
817
|
-
background-color: ${"var(--ds-surface, white)"};
|
|
818
|
-
position: absolute;
|
|
819
|
-
|
|
820
|
-
// the extra pixel is accounting for borders
|
|
821
|
-
top: -34px;
|
|
822
|
-
left: -1px;
|
|
823
|
-
}
|
|
787
|
+
:last-child {
|
|
788
|
+
border-bottom: 1px solid ${tableBorderColor};
|
|
824
789
|
}
|
|
790
|
+
}
|
|
825
791
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
792
|
+
// add a background above the first numbered column cell when sticky header is engaged
|
|
793
|
+
// which hides the table when scrolling
|
|
794
|
+
.${ClassName.TABLE_STICKY} {
|
|
795
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON_DISABLED}:first-of-type::after {
|
|
796
|
+
content: '';
|
|
797
|
+
display: block;
|
|
798
|
+
height: 33px;
|
|
799
|
+
width: 100%;
|
|
800
|
+
background-color: ${"var(--ds-surface, white)"};
|
|
801
|
+
position: absolute;
|
|
832
802
|
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
803
|
+
// the extra pixel is accounting for borders
|
|
804
|
+
top: -34px;
|
|
805
|
+
left: -1px;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
836
808
|
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
background-color: ${tableToolbarSelectedColor};
|
|
841
|
-
position: relative;
|
|
842
|
-
z-index: ${akEditorUnitZIndex};
|
|
843
|
-
color: ${`var(--ds-text-selected, ${N0})`};
|
|
844
|
-
}
|
|
845
|
-
}
|
|
809
|
+
.${ClassName.WITH_CONTROLS} {
|
|
810
|
+
.${ClassName.CORNER_CONTROLS}, .${ClassName.ROW_CONTROLS} {
|
|
811
|
+
display: block;
|
|
846
812
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
813
|
+
.${ClassName.NUMBERED_COLUMN} {
|
|
814
|
+
padding-left: ${getBooleanFF('platform.editor.custom-table-width') ? 0 : 1}px;
|
|
815
|
+
|
|
816
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON} {
|
|
817
|
+
border-left: 0 none;
|
|
850
818
|
}
|
|
851
|
-
|
|
819
|
+
|
|
820
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}.active {
|
|
852
821
|
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
853
822
|
border-color: ${tableBorderSelectedColor};
|
|
854
823
|
background-color: ${tableToolbarSelectedColor};
|
|
@@ -856,145 +825,178 @@ export const tableStyles = props => {
|
|
|
856
825
|
z-index: ${akEditorUnitZIndex};
|
|
857
826
|
color: ${`var(--ds-text-selected, ${N0})`};
|
|
858
827
|
}
|
|
859
|
-
.${ClassName.NUMBERED_COLUMN_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
860
|
-
background-color: ${tableToolbarDeleteColor};
|
|
861
|
-
border: 1px solid ${tableBorderDeleteColor};
|
|
862
|
-
border-left: 0;
|
|
863
|
-
color: ${`var(--ds-text-danger, ${R500})`};
|
|
864
|
-
position: relative;
|
|
865
|
-
z-index: ${akEditorUnitZIndex};
|
|
866
|
-
}
|
|
867
828
|
}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
.${ClassName.
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
829
|
+
}
|
|
830
|
+
:not(.${ClassName.IS_RESIZING}) .${ClassName.WITH_CONTROLS} {
|
|
831
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}:not(.${ClassName.NUMBERED_COLUMN_BUTTON_DISABLED}) {
|
|
832
|
+
cursor: pointer;
|
|
833
|
+
}
|
|
834
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}:not(.${ClassName.NUMBERED_COLUMN_BUTTON_DISABLED}):hover {
|
|
835
|
+
border-bottom: 1px solid ${tableBorderSelectedColor};
|
|
836
|
+
border-color: ${tableBorderSelectedColor};
|
|
837
|
+
background-color: ${tableToolbarSelectedColor};
|
|
877
838
|
position: relative;
|
|
839
|
+
z-index: ${akEditorUnitZIndex};
|
|
840
|
+
color: ${`var(--ds-text-selected, ${N0})`};
|
|
841
|
+
}
|
|
842
|
+
.${ClassName.NUMBERED_COLUMN_BUTTON}.${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
843
|
+
background-color: ${tableToolbarDeleteColor};
|
|
844
|
+
border: 1px solid ${tableBorderDeleteColor};
|
|
845
|
+
border-left: 0;
|
|
846
|
+
color: ${`var(--ds-text-danger, ${R500})`};
|
|
847
|
+
position: relative;
|
|
848
|
+
z-index: ${akEditorUnitZIndex};
|
|
849
|
+
}
|
|
850
|
+
}
|
|
878
851
|
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
852
|
+
/* Table */
|
|
853
|
+
.${ClassName.TABLE_NODE_WRAPPER} > table {
|
|
854
|
+
table-layout: fixed;
|
|
855
|
+
white-space: normal;
|
|
856
|
+
border-top: none;
|
|
857
|
+
// 1px border width offset added here to prevent unwanted overflow and scolling - ED-16212
|
|
858
|
+
margin-right: -1px;
|
|
859
|
+
// Allows better positioning for the shadow sentinels - ED-16668
|
|
860
|
+
position: relative;
|
|
882
861
|
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
862
|
+
> tbody > tr {
|
|
863
|
+
white-space: pre-wrap;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
.${ClassName.COLUMN_CONTROLS_DECORATIONS} + * {
|
|
867
|
+
margin-top: 0;
|
|
868
|
+
}
|
|
886
869
|
|
|
887
|
-
|
|
870
|
+
/*
|
|
888
871
|
* Headings have a top margin by default, but we don't want this on the
|
|
889
872
|
* first heading within table header cells.
|
|
890
873
|
*
|
|
891
874
|
* This specifically sets margin-top for the first heading within a header
|
|
892
875
|
* cell when center/right aligned.
|
|
893
876
|
*/
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
}
|
|
877
|
+
th.${ClassName.TABLE_HEADER_CELL} > .fabric-editor-block-mark {
|
|
878
|
+
> h1:first-of-type,
|
|
879
|
+
> h2:first-of-type,
|
|
880
|
+
> h3:first-of-type,
|
|
881
|
+
> h4:first-of-type,
|
|
882
|
+
> h5:first-of-type,
|
|
883
|
+
> h6:first-of-type {
|
|
884
|
+
margin-top: 0;
|
|
903
885
|
}
|
|
886
|
+
}
|
|
904
887
|
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
888
|
+
.${ClassName.SELECTED_CELL}, .${ClassName.HOVERED_CELL_IN_DANGER} {
|
|
889
|
+
position: relative;
|
|
890
|
+
}
|
|
891
|
+
/* Give selected cells a blue overlay */
|
|
892
|
+
.${ClassName.SELECTED_CELL}::after,
|
|
893
|
+
.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
894
|
+
z-index: ${akEditorSmallZIndex};
|
|
895
|
+
position: absolute;
|
|
896
|
+
content: '';
|
|
897
|
+
left: 0;
|
|
898
|
+
right: 0;
|
|
899
|
+
top: 0;
|
|
900
|
+
bottom: 0;
|
|
901
|
+
width: 100%;
|
|
902
|
+
pointer-events: none;
|
|
903
|
+
}
|
|
904
|
+
.${ClassName.SELECTED_CELL} {
|
|
905
|
+
border: 1px solid ${tableBorderSelectedColor};
|
|
906
|
+
}
|
|
907
|
+
.${ClassName.SELECTED_CELL}::after {
|
|
908
|
+
background: ${tableCellSelectedColor};
|
|
909
|
+
z-index: ${akEditorSmallZIndex};
|
|
910
|
+
}
|
|
911
|
+
th.${ClassName.HOVERED_CELL_IN_DANGER}::after,
|
|
912
|
+
td.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
913
|
+
background: ${tableCellDeleteColor};
|
|
914
|
+
z-index: ${akEditorUnitZIndex * 100};
|
|
915
|
+
}
|
|
916
|
+
// ED-15246: Trello card is visible through a border of a table border
|
|
917
|
+
/* ED-19064: To fix when enable header column in the table,
|
|
918
|
+
and selection the header column, the right border is not tableBorderSelectedColor
|
|
919
|
+
when deleting the header column, the right border is not tableToolbarDeleteColor */
|
|
920
|
+
td.${ClassName.HOVERED_CELL},
|
|
921
|
+
td.${ClassName.SELECTED_CELL},
|
|
922
|
+
th.${ClassName.TABLE_HEADER_CELL}.${ClassName.SELECTED_CELL},
|
|
923
|
+
th.${ClassName.TABLE_HEADER_CELL}.${ClassName.HOVERED_CELL} {
|
|
924
|
+
&::after {
|
|
925
|
+
height: 100%;
|
|
918
926
|
width: 100%;
|
|
919
|
-
pointer-events: none;
|
|
920
|
-
}
|
|
921
|
-
.${ClassName.SELECTED_CELL} {
|
|
922
927
|
border: 1px solid ${tableBorderSelectedColor};
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
928
|
+
content: '';
|
|
929
|
+
position: absolute;
|
|
930
|
+
left: -1px;
|
|
931
|
+
top: -1px;
|
|
932
|
+
bottom: 0;
|
|
926
933
|
z-index: ${akEditorSmallZIndex};
|
|
934
|
+
display: inline-block;
|
|
935
|
+
pointer-events: none;
|
|
927
936
|
}
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
background: ${tableCellDeleteColor};
|
|
937
|
+
&.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
938
|
+
${tableBorderStyles()};
|
|
931
939
|
z-index: ${akEditorUnitZIndex * 100};
|
|
932
940
|
}
|
|
933
|
-
// ED-15246: Trello card is visible through a border of a table border
|
|
934
|
-
/* ED-19064: To fix when enable header column in the table,
|
|
935
|
-
and selection the header column, the right border is not tableBorderSelectedColor
|
|
936
|
-
when deleting the header column, the right border is not tableToolbarDeleteColor */
|
|
937
|
-
td.${ClassName.HOVERED_CELL},
|
|
938
|
-
td.${ClassName.SELECTED_CELL},
|
|
939
|
-
th.${ClassName.TABLE_HEADER_CELL}.${ClassName.SELECTED_CELL},
|
|
940
|
-
th.${ClassName.TABLE_HEADER_CELL}.${ClassName.HOVERED_CELL} {
|
|
941
|
-
&::after {
|
|
942
|
-
height: 100%;
|
|
943
|
-
width: 100%;
|
|
944
|
-
border: 1px solid ${tableBorderSelectedColor};
|
|
945
|
-
content: '';
|
|
946
|
-
position: absolute;
|
|
947
|
-
left: -1px;
|
|
948
|
-
top: -1px;
|
|
949
|
-
bottom: 0;
|
|
950
|
-
z-index: ${akEditorSmallZIndex};
|
|
951
|
-
display: inline-block;
|
|
952
|
-
pointer-events: none;
|
|
953
|
-
}
|
|
954
|
-
&.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
955
|
-
${tableBorderStyles()};
|
|
956
|
-
z-index: ${akEditorUnitZIndex * 100};
|
|
957
|
-
}
|
|
958
941
|
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
}
|
|
942
|
+
&.${ClassName.HOVERED_NO_HIGHLIGHT}.${ClassName.HOVERED_CELL_IN_DANGER}::after {
|
|
943
|
+
${tableBorderStyles()};
|
|
944
|
+
z-index: ${akEditorUnitZIndex * 100};
|
|
963
945
|
}
|
|
964
946
|
}
|
|
947
|
+
}
|
|
965
948
|
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
949
|
+
// override for DnD controls
|
|
950
|
+
.${ClassName.DRAG_ROW_CONTROLS_WRAPPER} {
|
|
951
|
+
position: absolute;
|
|
952
|
+
margin-top: ${tableMarginTop}px;
|
|
953
|
+
left: -${tableToolbarSize + 1}px;
|
|
954
|
+
z-index: ${rowControlsZIndex + 4};
|
|
955
|
+
}
|
|
973
956
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
957
|
+
.${ClassName.ROW_CONTROLS_WRAPPER} {
|
|
958
|
+
position: absolute;
|
|
959
|
+
/* top of corner control is table margin top - corner control height + 1 pixel of table border. */
|
|
960
|
+
top: ${tableMarginTop - cornerControlHeight + 1}px;
|
|
961
|
+
left: -${tableToolbarSize}px;
|
|
962
|
+
}
|
|
980
963
|
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
964
|
+
.${ClassName.DRAG_ROW_CONTROLS_WRAPPER}.${ClassName.TABLE_LEFT_SHADOW},
|
|
965
|
+
.${ClassName.ROW_CONTROLS_WRAPPER}.${ClassName.TABLE_LEFT_SHADOW} {
|
|
966
|
+
z-index: ${akEditorUnitZIndex};
|
|
967
|
+
}
|
|
985
968
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
969
|
+
.${ClassName.DRAG_COLUMN_CONTROLS_WRAPPER} {
|
|
970
|
+
position: absolute;
|
|
971
|
+
top: ${tableMarginTop}px;
|
|
972
|
+
}
|
|
990
973
|
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
974
|
+
.${ClassName.TABLE_STICKY} .${ClassName.DRAG_COLUMN_CONTROLS_WRAPPER} {
|
|
975
|
+
position: fixed;
|
|
976
|
+
/* higher zIndex than sticky header which is akEditorTableCellOnStickyHeaderZIndex - 5 */
|
|
977
|
+
z-index: ${akEditorTableCellOnStickyHeaderZIndex - 4};
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
${tableWrapperStyles()}
|
|
981
|
+
`;
|
|
982
|
+
};
|
|
996
983
|
|
|
997
|
-
|
|
984
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4139
|
|
985
|
+
export const tableStyles = props => css`
|
|
986
|
+
.${ClassName.LAYOUT_BUTTON} button {
|
|
987
|
+
background: ${`var(--ds-background-neutral, ${N20A})`};
|
|
988
|
+
color: ${`var(--ds-icon, ${N300})`};
|
|
989
|
+
cursor: none;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
.${ClassName.LAYOUT_BUTTON}:not(.${ClassName.IS_RESIZING}) button:hover {
|
|
993
|
+
background: ${`var(--ds-background-neutral-hovered, ${B300})`};
|
|
994
|
+
color: ${"var(--ds-icon, white)"} !important;
|
|
995
|
+
cursor: pointer;
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
.ProseMirror {
|
|
999
|
+
${baseTableStyles(props)}
|
|
998
1000
|
}
|
|
999
1001
|
|
|
1000
1002
|
.ProseMirror.${ClassName.IS_RESIZING} {
|
|
@@ -1010,7 +1012,6 @@ export const tableStyles = props => {
|
|
|
1010
1012
|
|
|
1011
1013
|
${shadowSentinelStyles}
|
|
1012
1014
|
`;
|
|
1013
|
-
};
|
|
1014
1015
|
export const tableFullPageEditorStyles = css`
|
|
1015
1016
|
.ProseMirror .${ClassName.TABLE_NODE_WRAPPER} > table {
|
|
1016
1017
|
margin-left: 0;
|