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