@atlaskit/editor-plugin-table 7.17.0 → 7.17.1
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 +9 -0
- package/dist/cjs/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/cjs/toolbar.js +3 -0
- package/dist/cjs/ui/DragHandle/index.js +4 -2
- package/dist/cjs/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/cjs/ui/FloatingContextualButton/index.js +5 -1
- package/dist/cjs/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/cjs/ui/FloatingContextualMenu/ContextualMenu.js +47 -22
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/cjs/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/cjs/ui/FloatingDragMenu/DragMenu.js +36 -13
- package/dist/cjs/ui/FloatingDragMenu/index.js +5 -2
- package/dist/cjs/ui/FloatingDragMenu/styles.js +12 -1
- package/dist/cjs/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/cjs/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/cjs/ui/TableFloatingControls/RowControls/DragControls.js +4 -2
- package/dist/cjs/ui/common-styles.js +3 -1
- package/dist/cjs/ui/consts.js +4 -1
- package/dist/cjs/ui/ui-styles.js +35 -3
- package/dist/cjs/utils/drag-menu.js +32 -27
- package/dist/es2019/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/es2019/toolbar.js +3 -0
- package/dist/es2019/ui/DragHandle/index.js +6 -2
- package/dist/es2019/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/es2019/ui/FloatingContextualButton/index.js +5 -1
- package/dist/es2019/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/es2019/ui/FloatingContextualMenu/ContextualMenu.js +38 -11
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/es2019/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/es2019/ui/FloatingDragMenu/DragMenu.js +34 -13
- package/dist/es2019/ui/FloatingDragMenu/index.js +4 -2
- package/dist/es2019/ui/FloatingDragMenu/styles.js +11 -3
- package/dist/es2019/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/es2019/ui/TableFloatingControls/RowControls/DragControls.js +6 -2
- package/dist/es2019/ui/common-styles.js +3 -1
- package/dist/es2019/ui/consts.js +3 -0
- package/dist/es2019/ui/ui-styles.js +36 -3
- package/dist/es2019/utils/drag-menu.js +23 -19
- package/dist/esm/nodeviews/ExternalDropTargets.js +2 -1
- package/dist/esm/toolbar.js +3 -0
- package/dist/esm/ui/DragHandle/index.js +4 -2
- package/dist/esm/ui/FloatingContextualButton/FixedButton.js +1 -1
- package/dist/esm/ui/FloatingContextualButton/index.js +5 -1
- package/dist/esm/ui/FloatingContextualButton/styles.js +10 -0
- package/dist/esm/ui/FloatingContextualMenu/ContextualMenu.js +47 -22
- package/dist/esm/ui/FloatingContextualMenu/styles.js +3 -0
- package/dist/esm/ui/FloatingDeleteButton/index.js +4 -2
- package/dist/esm/ui/FloatingDragMenu/DragMenu.js +36 -13
- package/dist/esm/ui/FloatingDragMenu/index.js +5 -2
- package/dist/esm/ui/FloatingDragMenu/styles.js +13 -2
- package/dist/esm/ui/TableFloatingControls/NumberColumn/index.js +3 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/ClassicControls.js +1 -1
- package/dist/esm/ui/TableFloatingControls/RowControls/DragControls.js +4 -2
- package/dist/esm/ui/common-styles.js +3 -1
- package/dist/esm/ui/consts.js +3 -0
- package/dist/esm/ui/ui-styles.js +35 -3
- package/dist/esm/utils/drag-menu.js +32 -27
- package/dist/types/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types/ui/FloatingDragMenu/styles.d.ts +1 -1
- package/dist/types/ui/consts.d.ts +3 -0
- package/dist/types/utils/drag-menu.d.ts +1 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/DragMenu.d.ts +2 -1
- package/dist/types-ts4.5/ui/FloatingDragMenu/styles.d.ts +1 -1
- package/dist/types-ts4.5/ui/consts.d.ts +3 -0
- package/dist/types-ts4.5/utils/drag-menu.d.ts +1 -1
- package/package.json +2 -2
- package/src/nodeviews/ExternalDropTargets.tsx +2 -1
- package/src/toolbar.tsx +3 -0
- package/src/ui/DragHandle/index.tsx +4 -2
- package/src/ui/FloatingContextualButton/FixedButton.tsx +1 -1
- package/src/ui/FloatingContextualButton/index.tsx +2 -0
- package/src/ui/FloatingContextualButton/styles.ts +10 -0
- package/src/ui/FloatingContextualMenu/ContextualMenu.tsx +22 -3
- package/src/ui/FloatingContextualMenu/index.tsx +1 -0
- package/src/ui/FloatingContextualMenu/styles.ts +2 -0
- package/src/ui/FloatingDeleteButton/index.tsx +2 -1
- package/src/ui/FloatingDragMenu/DragMenu.tsx +39 -16
- package/src/ui/FloatingDragMenu/DropdownMenu.tsx +1 -1
- package/src/ui/FloatingDragMenu/index.tsx +6 -2
- package/src/ui/FloatingDragMenu/styles.ts +20 -3
- package/src/ui/TableFloatingControls/NumberColumn/index.tsx +1 -0
- package/src/ui/TableFloatingControls/RowControls/ClassicControls.tsx +1 -1
- package/src/ui/TableFloatingControls/RowControls/DragControls.tsx +4 -2
- package/src/ui/common-styles.ts +2 -1
- package/src/ui/consts.ts +4 -0
- package/src/ui/ui-styles.ts +25 -0
- package/src/utils/drag-menu.ts +28 -18
|
@@ -87,8 +87,14 @@ const MapDragMenuOptionIdToMessage = {
|
|
|
87
87
|
plural: null
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
|
-
const
|
|
91
|
-
|
|
90
|
+
const getGroupedDragMenuConfig = tableSortColumnDiscoverability => {
|
|
91
|
+
let groupedDragMenuConfig = [['add_row_above', 'add_row_below', 'add_column_left', 'add_column_right', 'distribute_columns', 'clear_cells', 'delete_row', 'delete_column'], ['move_column_left', 'move_column_right', 'move_row_up', 'move_row_down']];
|
|
92
|
+
const sortColumnItems = ['sort_column_asc', 'sort_column_desc'];
|
|
93
|
+
tableSortColumnDiscoverability ? groupedDragMenuConfig.unshift(sortColumnItems) : groupedDragMenuConfig.push(sortColumnItems);
|
|
94
|
+
return groupedDragMenuConfig;
|
|
95
|
+
};
|
|
96
|
+
const convertToDropdownItems = (dragMenuConfig, formatMessage, tableSortColumnDiscoverability = false, selectionRect) => {
|
|
97
|
+
const groupedDragMenuConfig = getGroupedDragMenuConfig(tableSortColumnDiscoverability);
|
|
92
98
|
let menuItemsArr = [...Array(groupedDragMenuConfig.length)].map(() => []);
|
|
93
99
|
let menuCallback = {};
|
|
94
100
|
dragMenuConfig.forEach(item => {
|
|
@@ -134,11 +140,14 @@ const convertToDropdownItems = (dragMenuConfig, formatMessage, selectionRect) =>
|
|
|
134
140
|
name: item.id
|
|
135
141
|
},
|
|
136
142
|
isDisabled: item.disabled,
|
|
137
|
-
elemBefore: item.icon ?
|
|
143
|
+
elemBefore: item.icon ?
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
145
|
+
jsx("span", {
|
|
138
146
|
css: elementBeforeIconStyles
|
|
139
147
|
}, jsx(item.icon, {
|
|
140
148
|
label: formatMessage(MapDragMenuOptionIdToMessage[item.id].message, options)
|
|
141
149
|
})) : undefined,
|
|
150
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
142
151
|
elemAfter: item.keymap ? jsx("div", {
|
|
143
152
|
css: shortcutStyle
|
|
144
153
|
}, item.keymap) : undefined
|
|
@@ -179,7 +188,8 @@ export const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
179
188
|
isTableScalingEnabled,
|
|
180
189
|
tableDuplicateCellColouring,
|
|
181
190
|
shouldUseIncreasedScalingPercent,
|
|
182
|
-
isTableFixedColumnWidthsOptionEnabled
|
|
191
|
+
isTableFixedColumnWidthsOptionEnabled,
|
|
192
|
+
tableSortColumnDiscoverability
|
|
183
193
|
}) => {
|
|
184
194
|
var _pluginConfig$allowBa;
|
|
185
195
|
const {
|
|
@@ -207,11 +217,11 @@ export const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
207
217
|
hasMergedCellsInTable = getMergedCellsPositions(state.tr).length > 0;
|
|
208
218
|
}
|
|
209
219
|
const allowBackgroundColor = (_pluginConfig$allowBa = pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.allowBackgroundColor) !== null && _pluginConfig$allowBa !== void 0 ? _pluginConfig$allowBa : false;
|
|
210
|
-
const dragMenuConfig = getDragMenuConfig(direction, getEditorContainerWidth, !shouldMoveDisabled, hasMergedCellsInTable, editorView, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI, pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.isHeaderRowRequired, isTableScalingEnabled, tableDuplicateCellColouring, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent);
|
|
220
|
+
const dragMenuConfig = getDragMenuConfig(direction, getEditorContainerWidth, !shouldMoveDisabled, hasMergedCellsInTable, editorView, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI, pluginConfig === null || pluginConfig === void 0 ? void 0 : pluginConfig.isHeaderRowRequired, isTableScalingEnabled, tableDuplicateCellColouring, isTableFixedColumnWidthsOptionEnabled, shouldUseIncreasedScalingPercent, tableSortColumnDiscoverability);
|
|
211
221
|
const {
|
|
212
222
|
menuItems,
|
|
213
223
|
menuCallback
|
|
214
|
-
} = convertToDropdownItems(dragMenuConfig, formatMessage, selectionRect);
|
|
224
|
+
} = convertToDropdownItems(dragMenuConfig, formatMessage, tableSortColumnDiscoverability, selectionRect);
|
|
215
225
|
const handleSubMenuRef = ref => {
|
|
216
226
|
const parent = closestElement(editorView.dom, '.fabric-editor-popup-scroll-parent');
|
|
217
227
|
if (!(parent && ref)) {
|
|
@@ -252,7 +262,9 @@ export const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
252
262
|
value: {
|
|
253
263
|
name: 'background'
|
|
254
264
|
},
|
|
255
|
-
elemBefore:
|
|
265
|
+
elemBefore:
|
|
266
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
267
|
+
jsx("span", {
|
|
256
268
|
css: elementBeforeIconStyles
|
|
257
269
|
}, jsx(EditorBackgroundColorIcon, {
|
|
258
270
|
label: formatMessage(messages.backgroundColor),
|
|
@@ -260,9 +272,12 @@ export const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
260
272
|
})),
|
|
261
273
|
elemAfter: jsx("div", {
|
|
262
274
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
263
|
-
className: DropdownMenuSharedCssClassName.SUBMENU
|
|
264
|
-
css
|
|
275
|
+
className: DropdownMenuSharedCssClassName.SUBMENU
|
|
276
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
277
|
+
,
|
|
278
|
+
css: dragMenuBackgroundColorStyles(tableSortColumnDiscoverability)
|
|
265
279
|
}, jsx("div", {
|
|
280
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
266
281
|
css: cellColourPreviewStyles(background)
|
|
267
282
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
268
283
|
,
|
|
@@ -317,7 +332,9 @@ export const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
317
332
|
value: {
|
|
318
333
|
name: 'header_column'
|
|
319
334
|
},
|
|
320
|
-
elemAfter:
|
|
335
|
+
elemAfter:
|
|
336
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
337
|
+
jsx("div", {
|
|
321
338
|
css: toggleStyles
|
|
322
339
|
}, jsx(Toggle, {
|
|
323
340
|
id: "toggle-header-column",
|
|
@@ -330,7 +347,9 @@ export const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
330
347
|
value: {
|
|
331
348
|
name: 'header_row'
|
|
332
349
|
},
|
|
333
|
-
elemAfter:
|
|
350
|
+
elemAfter:
|
|
351
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
352
|
+
jsx("div", {
|
|
334
353
|
css: toggleStyles
|
|
335
354
|
}, jsx(Toggle, {
|
|
336
355
|
id: "toggle-header-row",
|
|
@@ -346,7 +365,9 @@ export const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
346
365
|
value: {
|
|
347
366
|
name: 'row_numbers'
|
|
348
367
|
},
|
|
349
|
-
elemAfter:
|
|
368
|
+
elemAfter:
|
|
369
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
370
|
+
jsx("div", {
|
|
350
371
|
css: toggleStyles
|
|
351
372
|
}, jsx(Toggle, {
|
|
352
373
|
id: "toggle-row-numbers",
|
|
@@ -457,7 +478,7 @@ export const DragMenu = /*#__PURE__*/React.memo(({
|
|
|
457
478
|
return null;
|
|
458
479
|
}
|
|
459
480
|
if (allowBackgroundColor) {
|
|
460
|
-
menuItems[0].items.unshift(createBackgroundColorMenuItem());
|
|
481
|
+
tableSortColumnDiscoverability ? menuItems[1].items.unshift(createBackgroundColorMenuItem()) : menuItems[0].items.unshift(createBackgroundColorMenuItem());
|
|
461
482
|
}
|
|
462
483
|
|
|
463
484
|
// If first row, add toggle for Header row, default is true
|
|
@@ -33,7 +33,8 @@ const FloatingDragMenu = ({
|
|
|
33
33
|
}
|
|
34
34
|
const {
|
|
35
35
|
tableDuplicateCellColouring = false,
|
|
36
|
-
tableWithFixedColumnWidthsOption = false
|
|
36
|
+
tableWithFixedColumnWidthsOption = false,
|
|
37
|
+
tableSortColumnDiscoverability = false
|
|
37
38
|
} = getEditorFeatureFlags ? getEditorFeatureFlags() : {};
|
|
38
39
|
const shouldUseIncreasedScalingPercent = isTableScalingEnabled && tableWithFixedColumnWidthsOption && getBooleanFF('platform.editor.table.use-increased-scaling-percent');
|
|
39
40
|
return /*#__PURE__*/React.createElement(Popup, {
|
|
@@ -72,7 +73,8 @@ const FloatingDragMenu = ({
|
|
|
72
73
|
isTableScalingEnabled: isTableScalingEnabled,
|
|
73
74
|
tableDuplicateCellColouring: tableDuplicateCellColouring,
|
|
74
75
|
shouldUseIncreasedScalingPercent: shouldUseIncreasedScalingPercent,
|
|
75
|
-
isTableFixedColumnWidthsOptionEnabled: tableWithFixedColumnWidthsOption
|
|
76
|
+
isTableFixedColumnWidthsOptionEnabled: tableWithFixedColumnWidthsOption,
|
|
77
|
+
tableSortColumnDiscoverability: tableSortColumnDiscoverability
|
|
76
78
|
}));
|
|
77
79
|
};
|
|
78
80
|
FloatingDragMenu.displayName = 'FloatingDragMenu';
|
|
@@ -2,26 +2,29 @@ import { css } from '@emotion/react';
|
|
|
2
2
|
import { tableBackgroundBorderColor } from '@atlaskit/adf-schema';
|
|
3
3
|
import { N60A, N90 } from '@atlaskit/theme/colors';
|
|
4
4
|
import { TableCssClassName as ClassName } from '../../types';
|
|
5
|
-
import { dragMenuDropdownWidth } from '../consts';
|
|
5
|
+
import { dragMenuDropdownWidth, TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT, TABLE_DRAG_MENU_PADDING_TOP, TABLE_DRAG_MENU_SORT_GROUP_HEIGHT } from '../consts';
|
|
6
6
|
export const cellColourPreviewStyles = selectedColor => css({
|
|
7
7
|
'&::before': {
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
8
9
|
background: selectedColor
|
|
9
10
|
}
|
|
10
11
|
});
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
11
14
|
export const elementBeforeIconStyles = css({
|
|
12
15
|
marginRight: "var(--ds-space-negative-075, -6px)",
|
|
13
16
|
display: 'flex'
|
|
14
17
|
});
|
|
15
18
|
|
|
16
19
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
17
|
-
export const dragMenuBackgroundColorStyles = css`
|
|
20
|
+
export const dragMenuBackgroundColorStyles = (tableSortColumnDiscoverability = false) => css`
|
|
18
21
|
.${ClassName.DRAG_SUBMENU} {
|
|
19
22
|
border-radius: ${"var(--ds-border-radius, 3px)"};
|
|
20
23
|
background: ${"var(--ds-surface-overlay, white)"};
|
|
21
24
|
box-shadow: ${`var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N60A}, 0 0 1px ${N60A}`})`};
|
|
22
25
|
display: block;
|
|
23
26
|
position: absolute;
|
|
24
|
-
top: 0;
|
|
27
|
+
top: ${tableSortColumnDiscoverability ? TABLE_DRAG_MENU_PADDING_TOP + TABLE_DRAG_MENU_SORT_GROUP_HEIGHT + TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT : 0}px; // move the submenu down when 'sort increasing/decreasing' appear before background color picker
|
|
25
28
|
left: ${dragMenuDropdownWidth}px;
|
|
26
29
|
padding: ${"var(--ds-space-100, 8px)"};
|
|
27
30
|
|
|
@@ -50,17 +53,22 @@ export const dragMenuBackgroundColorStyles = css`
|
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
55
|
`;
|
|
56
|
+
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
53
58
|
export const toggleStyles = css({
|
|
54
59
|
display: 'flex',
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
55
61
|
"input[type='checkbox']": {
|
|
56
62
|
width: '30px',
|
|
57
63
|
height: '14px',
|
|
58
64
|
pointerEvents: 'initial',
|
|
59
65
|
cursor: 'pointer'
|
|
60
66
|
},
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
61
68
|
'> label': {
|
|
62
69
|
margin: '0px',
|
|
63
70
|
pointerEvents: 'none',
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
64
72
|
'> span': {
|
|
65
73
|
pointerEvents: 'none'
|
|
66
74
|
}
|
|
@@ -96,7 +96,9 @@ export default class NumberColumn extends Component {
|
|
|
96
96
|
style: {
|
|
97
97
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
98
98
|
marginTop: hasHeaderRow && this.props.stickyTop !== undefined ? rowHeights[0] : undefined,
|
|
99
|
-
borderLeft:
|
|
99
|
+
borderLeft:
|
|
100
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
101
|
+
isDragAndDropEnabled && tableActive ? `1px solid ${tableBorderColor}` : undefined
|
|
100
102
|
},
|
|
101
103
|
contentEditable: false
|
|
102
104
|
}, rowHeights.map((rowHeight, index) => isDragAndDropEnabled ? /*#__PURE__*/React.createElement("div", {
|
|
@@ -68,7 +68,7 @@ class RowControlsComponent extends Component {
|
|
|
68
68
|
marginTop: `${marginTop}px`,
|
|
69
69
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
70
70
|
top: thisRowSticky ? `${this.props.stickyTop + 3}px` : undefined,
|
|
71
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
71
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
72
72
|
paddingTop: thisRowSticky ? `${tableControlsSpacing}px` : undefined
|
|
73
73
|
}
|
|
74
74
|
}, /*#__PURE__*/React.createElement("button", {
|
|
@@ -190,9 +190,13 @@ const DragControlsComponent = ({
|
|
|
190
190
|
className: ClassName.DRAG_ROW_CONTROLS,
|
|
191
191
|
style: {
|
|
192
192
|
gridTemplateRows: heights,
|
|
193
|
-
gridTemplateColumns: isDragging ?
|
|
193
|
+
gridTemplateColumns: isDragging ?
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
195
|
+
`${dropTargetExtendedWidth}px 14px ${tableWidth}px` : '0px 14px 0px',
|
|
194
196
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
195
|
-
left: isDragging ?
|
|
197
|
+
left: isDragging ?
|
|
198
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
199
|
+
`-${dropTargetExtendedWidth + 2}px` : "var(--ds-space-negative-025, -2px)"
|
|
196
200
|
},
|
|
197
201
|
onMouseMove: handleMouseMove,
|
|
198
202
|
contentEditable: false
|
|
@@ -1001,7 +1001,7 @@ export const tableStyles = props => css`
|
|
|
1001
1001
|
${shadowSentinelStyles}
|
|
1002
1002
|
`;
|
|
1003
1003
|
|
|
1004
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
1004
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
1005
1005
|
export const tableFullPageEditorStyles = css`
|
|
1006
1006
|
.ProseMirror .${ClassName.TABLE_NODE_WRAPPER} > table {
|
|
1007
1007
|
margin-left: 0;
|
|
@@ -1010,6 +1010,8 @@ export const tableFullPageEditorStyles = css`
|
|
|
1010
1010
|
width: 100%;
|
|
1011
1011
|
}
|
|
1012
1012
|
`;
|
|
1013
|
+
|
|
1014
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
1013
1015
|
export const tableCommentEditorStyles = css`
|
|
1014
1016
|
.ProseMirror .${ClassName.TABLE_NODE_WRAPPER} > table {
|
|
1015
1017
|
margin-left: 0;
|
package/dist/es2019/ui/consts.js
CHANGED
|
@@ -67,6 +67,9 @@ export const STICKY_HEADER_TOGGLE_TOLERANCE_MS = 5;
|
|
|
67
67
|
// table margins and padding. For example a guideline at 1800px and the view at 1860px wide, means the guidelines is visible
|
|
68
68
|
// BUT it cannot be snapped to during resize due to padding being applied to the resizer wrapper. This accommodates that difference.
|
|
69
69
|
export const TABLE_GUIDELINE_VISIBLE_ADJUSTMENT = -68;
|
|
70
|
+
export const TABLE_DRAG_MENU_SORT_GROUP_HEIGHT = 92;
|
|
71
|
+
export const TABLE_DRAG_MENU_PADDING_TOP = 4;
|
|
72
|
+
export const TABLE_DRAG_MENU_MENU_GROUP_BEFORE_HEIGHT = 6;
|
|
70
73
|
export const dragMenuDropdownWidth = 250;
|
|
71
74
|
export const dragTableInsertColumnButtonSize = 16;
|
|
72
75
|
export const dropTargetExtendedWidth = 150;
|
|
@@ -15,9 +15,12 @@ const InsertLine = cssString => css`
|
|
|
15
15
|
}
|
|
16
16
|
`;
|
|
17
17
|
const Marker = () => css({
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
19
|
backgroundColor: tableBorderColor,
|
|
19
20
|
position: 'absolute',
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
20
22
|
height: `${lineMarkerSize}px`,
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
24
|
width: `${lineMarkerSize}px`,
|
|
22
25
|
borderRadius: '50%',
|
|
23
26
|
pointerEvents: 'none'
|
|
@@ -217,13 +220,26 @@ export const dragCornerControlButton = () => css`
|
|
|
217
220
|
position: relative;
|
|
218
221
|
}
|
|
219
222
|
`;
|
|
220
|
-
export const insertColumnButtonWrapper = () => css(
|
|
223
|
+
export const insertColumnButtonWrapper = () => css(
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
225
|
+
InsertButton(),
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
227
|
+
InsertButtonHover(),
|
|
228
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
229
|
+
InsertLine(`
|
|
221
230
|
width: 2px;
|
|
222
231
|
left: 9px;
|
|
223
232
|
`));
|
|
224
|
-
export const insertRowButtonWrapper = () => css(
|
|
233
|
+
export const insertRowButtonWrapper = () => css(
|
|
234
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
235
|
+
InsertButton(),
|
|
236
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
237
|
+
InsertButtonHover(),
|
|
238
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
239
|
+
InsertLine(`
|
|
225
240
|
height: 2px;
|
|
226
241
|
top: -11px;
|
|
242
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
227
243
|
left: ${tableInsertColumnButtonSize - 1}px;
|
|
228
244
|
`));
|
|
229
245
|
export const columnControlsLineMarker = () => css`
|
|
@@ -310,19 +326,26 @@ const overflowShadowWidhoutDnD = isDragAndDropEnabled => {
|
|
|
310
326
|
};
|
|
311
327
|
const columnHeaderButton = cssString => {
|
|
312
328
|
return css({
|
|
329
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
313
330
|
background: tableHeaderCellBackgroundColor,
|
|
314
331
|
display: 'block',
|
|
315
332
|
boxSizing: 'border-box',
|
|
316
333
|
padding: 0,
|
|
334
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
317
335
|
':focus': {
|
|
318
336
|
outline: 'none'
|
|
319
337
|
}
|
|
320
|
-
},
|
|
338
|
+
},
|
|
339
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
340
|
+
cssString);
|
|
321
341
|
};
|
|
322
342
|
const columnHeaderButtonSelected = () => css({
|
|
323
343
|
color: `var(--ds-text-inverse, ${N0})`,
|
|
344
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
324
345
|
backgroundColor: tableToolbarSelectedColor,
|
|
346
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
325
347
|
borderColor: tableBorderSelectedColor,
|
|
348
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
326
349
|
zIndex: columnControlsSelectedZIndex
|
|
327
350
|
});
|
|
328
351
|
const getFloatingDotOverrides = () => {
|
|
@@ -540,6 +563,8 @@ export const hoveredCell = () => css`
|
|
|
540
563
|
}
|
|
541
564
|
}
|
|
542
565
|
`;
|
|
566
|
+
|
|
567
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
|
|
543
568
|
export const hoveredWarningCell = css`
|
|
544
569
|
:not(.${ClassName.IS_RESIZING})
|
|
545
570
|
.${ClassName.TABLE_CONTAINER}:not(.${ClassName.HOVERED_DELETE_BUTTON}) {
|
|
@@ -674,22 +699,30 @@ export const resizeHandle = isDragAndDropEnabled => css`
|
|
|
674
699
|
const tableCellColumnInsertLineStyles = css({
|
|
675
700
|
content: "' '",
|
|
676
701
|
position: 'absolute',
|
|
702
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
677
703
|
height: `calc(100% + ${tableCellBorderWidth * 2}px)`,
|
|
704
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
678
705
|
width: `${insertLineWidth}px`,
|
|
706
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
679
707
|
zIndex: columnControlsZIndex * 2
|
|
680
708
|
});
|
|
681
709
|
const tableCellRowInsertLineStyles = css({
|
|
682
710
|
content: "' '",
|
|
683
711
|
position: 'absolute',
|
|
684
712
|
left: "var(--ds-space-negative-025, -2px)",
|
|
713
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
685
714
|
height: `${insertLineWidth}px`,
|
|
715
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
686
716
|
width: `calc(100% + ${tableCellBorderWidth * 2}px)`,
|
|
717
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
687
718
|
zIndex: columnControlsZIndex * 2
|
|
688
719
|
});
|
|
689
720
|
const insertLineActiveColor = css({
|
|
721
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
690
722
|
backgroundColor: tableBorderSelectedColor
|
|
691
723
|
});
|
|
692
724
|
const insertLineInactiveColor = css({
|
|
725
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
693
726
|
backgroundColor: `var(--ds-background-accent-gray-subtler, ${akEditorTableBorder})`
|
|
694
727
|
});
|
|
695
728
|
|
|
@@ -65,8 +65,11 @@ const defaultSelectionRect = {
|
|
|
65
65
|
right: 0,
|
|
66
66
|
bottom: 0
|
|
67
67
|
};
|
|
68
|
-
export const getDragMenuConfig = (direction, getEditorContainerWidth, canDrag, hasMergedCellsInTable, editorView, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI, isHeaderRowRequired, isTableScalingEnabled = false, tableDuplicateCellColouring = false, isTableFixedColumnWidthsOptionEnabled = false, shouldUseIncreasedScalingPercent = false) => {
|
|
68
|
+
export const getDragMenuConfig = (direction, getEditorContainerWidth, canDrag, hasMergedCellsInTable, editorView, tableMap, index, targetCellPosition, selectionRect, editorAnalyticsAPI, isHeaderRowRequired, isTableScalingEnabled = false, tableDuplicateCellColouring = false, isTableFixedColumnWidthsOptionEnabled = false, shouldUseIncreasedScalingPercent = false, tableSortColumnDiscoverability = false) => {
|
|
69
69
|
var _tableMap$height, _tableMap$height2, _tableMap$width, _tableMap$width2;
|
|
70
|
+
const {
|
|
71
|
+
selection
|
|
72
|
+
} = editorView.state;
|
|
70
73
|
const addOptions = direction === 'row' ? [{
|
|
71
74
|
label: 'above',
|
|
72
75
|
offset: 0,
|
|
@@ -88,9 +91,6 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, canDrag, h
|
|
|
88
91
|
icon: AddColRightIcon,
|
|
89
92
|
keymap: addColumnAfter
|
|
90
93
|
}];
|
|
91
|
-
const {
|
|
92
|
-
selection
|
|
93
|
-
} = editorView.state;
|
|
94
94
|
const moveOptions = direction === 'row' ? [{
|
|
95
95
|
label: 'up',
|
|
96
96
|
icon: ArrowUpIcon,
|
|
@@ -129,7 +129,21 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, canDrag, h
|
|
|
129
129
|
order: SortOrder.DESC,
|
|
130
130
|
icon: HipchatChevronDoubleDownIcon
|
|
131
131
|
}] : [];
|
|
132
|
-
|
|
132
|
+
const sortConfigs = [...sortOptions.map(({
|
|
133
|
+
label,
|
|
134
|
+
order,
|
|
135
|
+
icon
|
|
136
|
+
}) => ({
|
|
137
|
+
id: `sort_column_${order}`,
|
|
138
|
+
title: `Sort ${label}`,
|
|
139
|
+
disabled: hasMergedCellsInTable,
|
|
140
|
+
icon,
|
|
141
|
+
onClick: (state, dispatch) => {
|
|
142
|
+
sortColumnWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.TABLE_CONTEXT_MENU, index !== null && index !== void 0 ? index : 0, order)(state, dispatch);
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
}))];
|
|
146
|
+
const restConfigs = [...addOptions.map(({
|
|
133
147
|
label,
|
|
134
148
|
offset,
|
|
135
149
|
icon,
|
|
@@ -211,18 +225,8 @@ export const getDragMenuConfig = (direction, getEditorContainerWidth, canDrag, h
|
|
|
211
225
|
return false;
|
|
212
226
|
},
|
|
213
227
|
keymap: keymap && tooltip(keymap)
|
|
214
|
-
}))
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}) => ({
|
|
219
|
-
id: `sort_column_${order}`,
|
|
220
|
-
title: `Sort ${label}`,
|
|
221
|
-
disabled: hasMergedCellsInTable,
|
|
222
|
-
icon,
|
|
223
|
-
onClick: (state, dispatch) => {
|
|
224
|
-
sortColumnWithAnalytics(editorAnalyticsAPI)(INPUT_METHOD.TABLE_CONTEXT_MENU, index !== null && index !== void 0 ? index : 0, order)(state, dispatch);
|
|
225
|
-
return true;
|
|
226
|
-
}
|
|
227
|
-
}))].filter(Boolean);
|
|
228
|
+
}))];
|
|
229
|
+
let allConfigs = [...restConfigs];
|
|
230
|
+
tableSortColumnDiscoverability ? allConfigs.unshift(...sortConfigs) : allConfigs.push(...sortConfigs);
|
|
231
|
+
return allConfigs.filter(Boolean);
|
|
228
232
|
};
|
|
@@ -44,10 +44,11 @@ export var ExternalDropTargets = function ExternalDropTargets(_ref) {
|
|
|
44
44
|
overflow: 'hidden',
|
|
45
45
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
46
46
|
position: 'absolute',
|
|
47
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
47
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
48
48
|
top: "-".concat(dropTargetExtendedWidth - tableMarginTop, "px"),
|
|
49
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
50
50
|
pointerEvents: 'auto',
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
51
52
|
zIndex: "".concat(dropTargetsZIndex)
|
|
52
53
|
},
|
|
53
54
|
"data-testid": "table-floating-column-extended-drop-targets"
|
package/dist/esm/toolbar.js
CHANGED
|
@@ -146,6 +146,7 @@ export var getToolbarCellOptionsConfig = function getToolbarCellOptionsConfig(ed
|
|
|
146
146
|
},
|
|
147
147
|
selected: false,
|
|
148
148
|
disabled: false,
|
|
149
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
149
150
|
elemAfter: jsx("div", {
|
|
150
151
|
css: shortcutStyle
|
|
151
152
|
}, tooltip(addColumnAfter))
|
|
@@ -165,6 +166,7 @@ export var getToolbarCellOptionsConfig = function getToolbarCellOptionsConfig(ed
|
|
|
165
166
|
},
|
|
166
167
|
selected: false,
|
|
167
168
|
disabled: false,
|
|
169
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
168
170
|
elemAfter: jsx("div", {
|
|
169
171
|
css: shortcutStyle
|
|
170
172
|
}, tooltip(addRowAfter))
|
|
@@ -297,6 +299,7 @@ export var getToolbarCellOptionsConfig = function getToolbarCellOptionsConfig(ed
|
|
|
297
299
|
},
|
|
298
300
|
selected: false,
|
|
299
301
|
disabled: false,
|
|
302
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
300
303
|
elemAfter: jsx("div", {
|
|
301
304
|
css: shortcutStyle
|
|
302
305
|
}, tooltip(backspace))
|
|
@@ -152,10 +152,12 @@ var DragHandleComponent = function DragHandleComponent(_ref) {
|
|
|
152
152
|
className: ClassName.DRAG_HANDLE_BUTTON_CLICKABLE_ZONE,
|
|
153
153
|
"data-testid": "table-drag-handle-clickable-zone-button",
|
|
154
154
|
style: {
|
|
155
|
-
height: isRow ?
|
|
155
|
+
height: isRow ? // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
156
|
+
"calc(100% - ".concat(dragTableInsertColumnButtonSize, "px)") : "var(--ds-space-200, 16px)",
|
|
156
157
|
// 16px here because it's the size of drag handle button's large side
|
|
157
158
|
width: isRow ? "var(--ds-space-200, 16px)" // 16px here because it's the size of drag handle button's large side
|
|
158
|
-
:
|
|
159
|
+
: // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
160
|
+
"calc(100% - ".concat(dragTableInsertColumnButtonSize, "px)"),
|
|
159
161
|
left: isRow ? "var(--ds-space-050, 4px)" : undefined,
|
|
160
162
|
bottom: isColumn ? "var(--ds-space-0, 0px)" : undefined,
|
|
161
163
|
alignSelf: isColumn ? 'none' : 'center',
|
|
@@ -110,7 +110,7 @@ export var FixedButton = function FixedButton(_ref2) {
|
|
|
110
110
|
position: 'fixed',
|
|
111
111
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
112
112
|
top: stickyHeader.top + stickyHeader.padding + offset * 2,
|
|
113
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
113
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
114
114
|
zIndex: akEditorTableCellOnStickyHeaderZIndex,
|
|
115
115
|
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage/preview
|
|
116
116
|
left: calcLeftPos({
|
|
@@ -45,7 +45,11 @@ var FloatingContextualButtonInner = /*#__PURE__*/React.memo(function (props) {
|
|
|
45
45
|
}
|
|
46
46
|
var labelCellOptions = formatMessage(messages.cellOptions);
|
|
47
47
|
var button = jsx("div", {
|
|
48
|
-
css: [
|
|
48
|
+
css: [
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
50
|
+
tableFloatingCellButtonStyles(),
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
52
|
+
isContextualMenuOpen && tableFloatingCellButtonSelectedStyles()]
|
|
49
53
|
}, jsx(ToolbarButton
|
|
50
54
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
51
55
|
, {
|
|
@@ -3,14 +3,17 @@ import { N0, N20, N30A, N700 } from '@atlaskit/theme/colors';
|
|
|
3
3
|
import { contextualMenuTriggerSize } from '../consts';
|
|
4
4
|
export var tableFloatingCellButtonStyles = function tableFloatingCellButtonStyles() {
|
|
5
5
|
return css({
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
6
7
|
'> div': {
|
|
7
8
|
// Sits behind button to provide surface-color background
|
|
8
9
|
background: "var(--ds-surface, ".concat(N20, ")"),
|
|
9
10
|
borderRadius: "var(--ds-border-radius, 3px)",
|
|
10
11
|
display: 'flex',
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
11
13
|
height: "".concat(contextualMenuTriggerSize + 2, "px"),
|
|
12
14
|
flexDirection: 'column'
|
|
13
15
|
},
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
14
17
|
'&& button': {
|
|
15
18
|
background: "var(--ds-background-neutral, none)",
|
|
16
19
|
flexDirection: 'column',
|
|
@@ -21,15 +24,19 @@ export var tableFloatingCellButtonStyles = function tableFloatingCellButtonStyle
|
|
|
21
24
|
height: 'calc(100% - 4px)',
|
|
22
25
|
display: 'flex'
|
|
23
26
|
},
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
24
28
|
'&& button:hover': {
|
|
25
29
|
background: "var(--ds-background-neutral-hovered, ".concat(N30A, ")")
|
|
26
30
|
},
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
27
32
|
'&& button:active': {
|
|
28
33
|
background: "var(--ds-background-neutral-pressed, rgba(179, 212, 255, 0.6))"
|
|
29
34
|
},
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
30
36
|
'&& button > span': {
|
|
31
37
|
margin: "0px ".concat("var(--ds-space-negative-050, -4px)")
|
|
32
38
|
},
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
33
40
|
'&& span': {
|
|
34
41
|
pointerEvents: 'none'
|
|
35
42
|
}
|
|
@@ -37,12 +44,15 @@ export var tableFloatingCellButtonStyles = function tableFloatingCellButtonStyle
|
|
|
37
44
|
};
|
|
38
45
|
export var tableFloatingCellButtonSelectedStyles = function tableFloatingCellButtonSelectedStyles() {
|
|
39
46
|
return css({
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
40
48
|
'&& button': {
|
|
41
49
|
background: "var(--ds-background-selected, ".concat(N700, ")")
|
|
42
50
|
},
|
|
51
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
43
52
|
'&& button:hover': {
|
|
44
53
|
background: "var(--ds-background-selected-hovered, ".concat(N700, ")")
|
|
45
54
|
},
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
46
56
|
'&& button:active': {
|
|
47
57
|
background: "var(--ds-background-selected-pressed, ".concat(N700, ")")
|
|
48
58
|
}
|