@atlaskit/editor-plugin-table 7.7.2 → 7.7.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 +14 -0
- package/dist/cjs/commands/display-mode.js +23 -0
- package/dist/cjs/commands/index.js +8 -1
- package/dist/cjs/nodeviews/table.js +2 -1
- package/dist/cjs/plugin.js +3 -2
- package/dist/cjs/pm-plugins/table-resizing/event-handlers.js +1 -1
- package/dist/cjs/toolbar.js +43 -12
- package/dist/cjs/ui/FloatingContextualButton/styles.js +43 -5
- package/dist/cjs/ui/FloatingContextualMenu/styles.js +14 -5
- package/dist/cjs/ui/FloatingDragMenu/styles.js +29 -5
- package/dist/cjs/ui/icons/DisplayModeIcon.js +46 -0
- package/dist/cjs/ui/icons/index.js +7 -0
- package/dist/cjs/ui/ui-styles.js +1 -0
- package/dist/es2019/commands/display-mode.js +17 -0
- package/dist/es2019/commands/index.js +2 -1
- package/dist/es2019/nodeviews/table.js +2 -1
- package/dist/es2019/plugin.js +4 -3
- package/dist/es2019/pm-plugins/table-resizing/event-handlers.js +1 -1
- package/dist/es2019/toolbar.js +41 -12
- package/dist/es2019/ui/FloatingContextualButton/styles.js +42 -42
- package/dist/es2019/ui/FloatingContextualMenu/styles.js +11 -9
- package/dist/es2019/ui/FloatingDragMenu/styles.js +24 -22
- package/dist/es2019/ui/icons/DisplayModeIcon.js +39 -0
- package/dist/es2019/ui/icons/index.js +1 -0
- package/dist/es2019/ui/ui-styles.js +1 -0
- package/dist/esm/commands/display-mode.js +16 -0
- package/dist/esm/commands/index.js +2 -1
- package/dist/esm/nodeviews/table.js +2 -1
- package/dist/esm/plugin.js +4 -3
- package/dist/esm/pm-plugins/table-resizing/event-handlers.js +1 -1
- package/dist/esm/toolbar.js +44 -13
- package/dist/esm/ui/FloatingContextualButton/styles.js +43 -4
- package/dist/esm/ui/FloatingContextualMenu/styles.js +14 -5
- package/dist/esm/ui/FloatingDragMenu/styles.js +29 -5
- package/dist/esm/ui/icons/DisplayModeIcon.js +39 -0
- package/dist/esm/ui/icons/index.js +1 -0
- package/dist/esm/ui/ui-styles.js +1 -0
- package/dist/types/commands/display-mode.d.ts +2 -0
- package/dist/types/commands/index.d.ts +1 -0
- package/dist/types/commands/toggle.d.ts +1 -1
- package/dist/types/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
- package/dist/types/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -2
- package/dist/types/toolbar.d.ts +2 -1
- package/dist/types/ui/icons/DisplayModeIcon.d.ts +4 -0
- package/dist/types/ui/icons/index.d.ts +1 -0
- package/dist/types-ts4.5/commands/display-mode.d.ts +2 -0
- package/dist/types-ts4.5/commands/index.d.ts +1 -0
- package/dist/types-ts4.5/commands/toggle.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/misc.d.ts +3 -3
- package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -2
- package/dist/types-ts4.5/toolbar.d.ts +2 -1
- package/dist/types-ts4.5/ui/icons/DisplayModeIcon.d.ts +4 -0
- package/dist/types-ts4.5/ui/icons/index.d.ts +1 -0
- package/package.json +6 -3
- package/src/commands/display-mode.ts +19 -0
- package/src/commands/index.ts +1 -0
- package/src/commands/toggle.ts +1 -1
- package/src/commands-with-analytics.ts +3 -2
- package/src/nodeviews/table.tsx +1 -0
- package/src/plugin.tsx +15 -2
- package/src/pm-plugins/table-resizing/event-handlers.ts +2 -1
- package/src/pm-plugins/table-resizing/utils/misc.ts +3 -3
- package/src/pm-plugins/table-resizing/utils/resize-state.ts +1 -4
- package/src/toolbar.tsx +56 -22
- package/src/transforms/fix-tables.ts +1 -2
- package/src/types.ts +5 -0
- package/src/ui/FloatingContextualButton/styles.ts +48 -46
- package/src/ui/FloatingContextualMenu/styles.ts +11 -9
- package/src/ui/FloatingDragMenu/styles.ts +27 -25
- package/src/ui/icons/DisplayModeIcon.tsx +41 -0
- package/src/ui/icons/index.ts +1 -0
- package/src/ui/ui-styles.ts +1 -0
package/src/toolbar.tsx
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import commonMessages, {
|
|
14
14
|
tableMessages as messages,
|
|
15
15
|
} from '@atlaskit/editor-common/messages';
|
|
16
|
+
import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
|
|
16
17
|
import type { typeOption } from '@atlaskit/editor-common/src/types/floating-toolbar';
|
|
17
18
|
import type {
|
|
18
19
|
Command,
|
|
@@ -61,6 +62,7 @@ import {
|
|
|
61
62
|
hoverRows,
|
|
62
63
|
hoverTable,
|
|
63
64
|
removeDescendantNodes,
|
|
65
|
+
setTableDisplayMode,
|
|
64
66
|
} from './commands';
|
|
65
67
|
import {
|
|
66
68
|
deleteColumnsWithAnalytics,
|
|
@@ -79,6 +81,7 @@ import {
|
|
|
79
81
|
toggleNumberColumnWithAnalytics,
|
|
80
82
|
wrapTableInExpandWithAnalytics,
|
|
81
83
|
} from './commands-with-analytics';
|
|
84
|
+
import type { TablePluginOptions } from './plugin';
|
|
82
85
|
import { getPluginState } from './pm-plugins/plugin-factory';
|
|
83
86
|
import { pluginKey as tableResizingPluginKey } from './pm-plugins/table-resizing';
|
|
84
87
|
import { getNewResizeStateFromSelectedColumns } from './pm-plugins/table-resizing/utils/resize-state';
|
|
@@ -91,6 +94,7 @@ import type {
|
|
|
91
94
|
ToolbarMenuState,
|
|
92
95
|
} from './types';
|
|
93
96
|
import { TableCssClassName } from './types';
|
|
97
|
+
import { DisplayModeIcon } from './ui/icons';
|
|
94
98
|
import { FullWidthDisplay } from './ui/TableFullWidthLabel';
|
|
95
99
|
import {
|
|
96
100
|
getMergedCellsPositions,
|
|
@@ -450,6 +454,7 @@ export const getToolbarConfig =
|
|
|
450
454
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
451
455
|
getEditorFeatureFlags: GetEditorFeatureFlags,
|
|
452
456
|
getEditorView: () => EditorView | null,
|
|
457
|
+
options?: TablePluginOptions,
|
|
453
458
|
) =>
|
|
454
459
|
(config: PluginConfig): FloatingToolbarHandler =>
|
|
455
460
|
(state, intl) => {
|
|
@@ -465,7 +470,7 @@ export const getToolbarConfig =
|
|
|
465
470
|
const currentTableNodeLocalId = tableObject?.node?.attrs?.localId ?? '';
|
|
466
471
|
|
|
467
472
|
if (
|
|
468
|
-
isTableScalingEnabled &&
|
|
473
|
+
isTableScalingEnabled && // TODO ED-21670: check if need options.isTableScalingEnabled
|
|
469
474
|
isWidthResizing &&
|
|
470
475
|
widthToWidest &&
|
|
471
476
|
currentTableNodeLocalId &&
|
|
@@ -526,7 +531,7 @@ export const getToolbarConfig =
|
|
|
526
531
|
editorAnalyticsAPI,
|
|
527
532
|
);
|
|
528
533
|
|
|
529
|
-
const { isTableScalingEnabled = false } = getPluginState(state);
|
|
534
|
+
const { isTableScalingEnabled = false } = getPluginState(state); // TODO ED-21670: check if we need options.isTableScalingEnabled and not an acutual state of displayNode attr on the table
|
|
530
535
|
|
|
531
536
|
let cellItems: Array<FloatingToolbarItem<Command>>;
|
|
532
537
|
cellItems = pluginState.isDragAndDropEnabled
|
|
@@ -548,6 +553,7 @@ export const getToolbarConfig =
|
|
|
548
553
|
intl,
|
|
549
554
|
getEditorContainerWidth,
|
|
550
555
|
editorAnalyticsAPI,
|
|
556
|
+
options,
|
|
551
557
|
isTableScalingEnabled,
|
|
552
558
|
)
|
|
553
559
|
: [];
|
|
@@ -728,6 +734,7 @@ const getColumnSettingItems = (
|
|
|
728
734
|
{ formatMessage }: ToolbarMenuContext,
|
|
729
735
|
getEditorContainerWidth: GetEditorContainerWidth,
|
|
730
736
|
editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
|
|
737
|
+
options: TablePluginOptions | undefined,
|
|
731
738
|
isTableScalingEnabled = false,
|
|
732
739
|
): Array<FloatingToolbarItem<Command>> => {
|
|
733
740
|
const pluginState = getPluginState(editorState);
|
|
@@ -742,35 +749,62 @@ const getColumnSettingItems = (
|
|
|
742
749
|
editorState,
|
|
743
750
|
editorView.domAtPos.bind(editorView),
|
|
744
751
|
getEditorContainerWidth,
|
|
745
|
-
isTableScalingEnabled,
|
|
752
|
+
isTableScalingEnabled, // TODO ED-21670: Here should be actual state of tableNode's displayMode attr
|
|
746
753
|
);
|
|
747
754
|
|
|
748
755
|
const wouldChange = newResizeStateWithAnalytics?.changed ?? false;
|
|
749
756
|
|
|
757
|
+
const items: Array<FloatingToolbarItem<Command>> = [];
|
|
758
|
+
|
|
759
|
+
const isTableScalingLockBtnEnabled =
|
|
760
|
+
options?.isTableScalingEnabled &&
|
|
761
|
+
getBooleanFF('platform.editor.table.preserve-widths-with-lock-button');
|
|
762
|
+
|
|
763
|
+
if (isTableScalingLockBtnEnabled) {
|
|
764
|
+
const areColumnWidthsLocked =
|
|
765
|
+
pluginState?.tableNode?.attrs.displayMode === 'fixed';
|
|
766
|
+
|
|
767
|
+
const title = areColumnWidthsLocked
|
|
768
|
+
? formatMessage(messages.unlockColumnWidths)
|
|
769
|
+
: formatMessage(messages.lockColumnWidths);
|
|
770
|
+
|
|
771
|
+
items.push({
|
|
772
|
+
id: 'editor.table.lockColumns',
|
|
773
|
+
type: 'button',
|
|
774
|
+
title,
|
|
775
|
+
icon: () => <DisplayModeIcon size="medium" label={title} />,
|
|
776
|
+
onClick: editorCommandToPMCommand(setTableDisplayMode),
|
|
777
|
+
selected: areColumnWidthsLocked,
|
|
778
|
+
testId: 'table-lock-column-widths-btn',
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
|
|
750
782
|
if (
|
|
751
783
|
pluginState?.pluginConfig?.allowDistributeColumns &&
|
|
752
784
|
pluginState.isDragAndDropEnabled
|
|
753
785
|
) {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
},
|
|
768
|
-
{
|
|
769
|
-
type: 'separator',
|
|
770
|
-
},
|
|
771
|
-
];
|
|
786
|
+
items.push({
|
|
787
|
+
id: 'editor.table.distributeColumns',
|
|
788
|
+
type: 'button',
|
|
789
|
+
title: formatMessage(messages.distributeColumns),
|
|
790
|
+
icon: DistributeColumnIcon,
|
|
791
|
+
onClick: (state, dispatch, view) =>
|
|
792
|
+
getDistributeConfig(
|
|
793
|
+
getEditorContainerWidth,
|
|
794
|
+
editorAnalyticsAPI,
|
|
795
|
+
isTableScalingEnabled, // TODO ED-21670: Maybe here too we an actual state of tableNode's displayMode attr
|
|
796
|
+
)(state, dispatch, view),
|
|
797
|
+
disabled: !wouldChange,
|
|
798
|
+
});
|
|
772
799
|
}
|
|
773
|
-
|
|
800
|
+
|
|
801
|
+
if (items.length !== 0) {
|
|
802
|
+
items.push({
|
|
803
|
+
type: 'separator',
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
return items;
|
|
774
808
|
};
|
|
775
809
|
|
|
776
810
|
const getColorPicker = (
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { TableLayout } from '@atlaskit/adf-schema';
|
|
2
1
|
import { tableCellMinWidth } from '@atlaskit/editor-common/styles';
|
|
3
2
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
3
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
@@ -186,7 +185,7 @@ export const fixAutoSizedTable = (
|
|
|
186
185
|
.setMeta('addToHistory', false);
|
|
187
186
|
};
|
|
188
187
|
|
|
189
|
-
const getLayoutBasedOnWidth = (totalWidth: number)
|
|
188
|
+
const getLayoutBasedOnWidth = (totalWidth: number) => {
|
|
190
189
|
if (totalWidth > akEditorWideLayoutWidth) {
|
|
191
190
|
return 'full-width';
|
|
192
191
|
} else if (
|
package/src/types.ts
CHANGED
|
@@ -174,6 +174,11 @@ export interface TablePluginState {
|
|
|
174
174
|
isTableResizingEnabled?: boolean;
|
|
175
175
|
isDragAndDropEnabled?: boolean;
|
|
176
176
|
isTableHovered?: boolean;
|
|
177
|
+
|
|
178
|
+
// Currently isTableScalingEnabled is the same as options.isTableScalingEnabled from TablePluginOptions.
|
|
179
|
+
// However, if you want to learn if tablePlugin is configured to enable Preserve Table Widths feature,
|
|
180
|
+
// use options.isTableScalingEnabled and avoid using pluginState.isTableScalingEnabled or
|
|
181
|
+
// const { isTableScalingEnabled } = getPluginState(state) for that purpose.
|
|
177
182
|
isTableScalingEnabled?: boolean;
|
|
178
183
|
}
|
|
179
184
|
|
|
@@ -5,50 +5,52 @@ import { token } from '@atlaskit/tokens';
|
|
|
5
5
|
|
|
6
6
|
import { contextualMenuTriggerSize } from '../consts';
|
|
7
7
|
|
|
8
|
-
export const tableFloatingCellButtonStyles = () =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
8
|
+
export const tableFloatingCellButtonStyles = () =>
|
|
9
|
+
css({
|
|
10
|
+
'> div': {
|
|
11
|
+
// Sits behind button to provide surface-color background
|
|
12
|
+
background: token('elevation.surface', N20),
|
|
13
|
+
borderRadius: token('border.radius', '3px'),
|
|
14
|
+
display: 'flex',
|
|
15
|
+
height: `${contextualMenuTriggerSize + 2}px`,
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
},
|
|
18
|
+
'&& button': {
|
|
19
|
+
background: token('color.background.neutral', 'none'),
|
|
20
|
+
flexDirection: 'column',
|
|
21
|
+
margin: token('space.025', '2px'),
|
|
22
|
+
outline: `2px solid ${token('elevation.surface', N0)}`,
|
|
23
|
+
borderRadius: '1px',
|
|
24
|
+
padding: 0,
|
|
25
|
+
height: 'calc(100% - 4px)',
|
|
26
|
+
display: 'flex',
|
|
27
|
+
},
|
|
28
|
+
'&& button:hover': {
|
|
29
|
+
background: token('color.background.neutral.hovered', N30A),
|
|
30
|
+
},
|
|
31
|
+
'&& button:active': {
|
|
32
|
+
background: token(
|
|
33
|
+
'color.background.neutral.pressed',
|
|
34
|
+
'rgba(179, 212, 255, 0.6)',
|
|
35
|
+
),
|
|
36
|
+
},
|
|
37
|
+
'&& button > span': {
|
|
38
|
+
margin: `0px ${token('space.negative.050', '-4px')}`,
|
|
39
|
+
},
|
|
40
|
+
'&& span': {
|
|
41
|
+
pointerEvents: 'none',
|
|
42
|
+
},
|
|
43
|
+
});
|
|
43
44
|
|
|
44
|
-
export const tableFloatingCellButtonSelectedStyles = () =>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
export const tableFloatingCellButtonSelectedStyles = () =>
|
|
46
|
+
css({
|
|
47
|
+
'&& button': {
|
|
48
|
+
background: token('color.background.selected', N700),
|
|
49
|
+
},
|
|
50
|
+
'&& button:hover': {
|
|
51
|
+
background: token('color.background.selected.hovered', N700),
|
|
52
|
+
},
|
|
53
|
+
'&& button:active': {
|
|
54
|
+
background: token('color.background.selected.pressed', N700),
|
|
55
|
+
},
|
|
56
|
+
});
|
|
@@ -10,21 +10,23 @@ import {
|
|
|
10
10
|
contextualMenuDropdownWidthDnD,
|
|
11
11
|
} from '../consts';
|
|
12
12
|
|
|
13
|
-
export const cellColourPreviewStyles = (selectedColor: string) =>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
export const cellColourPreviewStyles = (selectedColor: string) =>
|
|
14
|
+
css({
|
|
15
|
+
'&::before': {
|
|
16
|
+
background: selectedColor,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
18
19
|
|
|
19
|
-
export const elementBeforeIconStyles = css
|
|
20
|
-
|
|
21
|
-
display: flex
|
|
22
|
-
|
|
20
|
+
export const elementBeforeIconStyles = css({
|
|
21
|
+
marginRight: token('space.negative.075', '-6px'),
|
|
22
|
+
display: 'flex',
|
|
23
|
+
});
|
|
23
24
|
|
|
24
25
|
// TODO Delete this comment after verifying space token -> previous value `padding: 8px`
|
|
25
26
|
// TODO Delete this comment after verifying space token -> previous value `margin-left: 4px`
|
|
26
27
|
export const tablePopupStyles = (
|
|
27
28
|
isDragAndDropEnabled: boolean | undefined,
|
|
29
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
28
30
|
) => css`
|
|
29
31
|
.${ClassName.CONTEXTUAL_SUBMENU} {
|
|
30
32
|
border-radius: ${token('border.radius', '3px')};
|
|
@@ -7,17 +7,19 @@ import { token } from '@atlaskit/tokens';
|
|
|
7
7
|
import { TableCssClassName as ClassName } from '../../types';
|
|
8
8
|
import { dragMenuDropdownWidth } from '../consts';
|
|
9
9
|
|
|
10
|
-
export const cellColourPreviewStyles = (selectedColor: string) =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
export const cellColourPreviewStyles = (selectedColor: string) =>
|
|
11
|
+
css({
|
|
12
|
+
'&::before': {
|
|
13
|
+
background: selectedColor,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
15
16
|
|
|
16
|
-
export const elementBeforeIconStyles = css
|
|
17
|
-
|
|
18
|
-
display: flex
|
|
19
|
-
|
|
17
|
+
export const elementBeforeIconStyles = css({
|
|
18
|
+
marginRight: token('space.negative.075', '-6px'),
|
|
19
|
+
display: 'flex',
|
|
20
|
+
});
|
|
20
21
|
|
|
22
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
|
|
21
23
|
export const dragMenuBackgroundColorStyles = css`
|
|
22
24
|
.${ClassName.DRAG_SUBMENU} {
|
|
23
25
|
border-radius: ${token('border.radius', '3px')};
|
|
@@ -58,19 +60,19 @@ export const dragMenuBackgroundColorStyles = css`
|
|
|
58
60
|
}
|
|
59
61
|
`;
|
|
60
62
|
|
|
61
|
-
export const toggleStyles = css
|
|
62
|
-
display: flex
|
|
63
|
-
input[type='checkbox'] {
|
|
64
|
-
width: 30px
|
|
65
|
-
height: 14px
|
|
66
|
-
|
|
67
|
-
cursor: pointer
|
|
68
|
-
}
|
|
69
|
-
> label {
|
|
70
|
-
margin: 0px
|
|
71
|
-
|
|
72
|
-
> span {
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
63
|
+
export const toggleStyles = css({
|
|
64
|
+
display: 'flex',
|
|
65
|
+
"input[type='checkbox']": {
|
|
66
|
+
width: '30px',
|
|
67
|
+
height: '14px',
|
|
68
|
+
pointerEvents: 'initial',
|
|
69
|
+
cursor: 'pointer',
|
|
70
|
+
},
|
|
71
|
+
'> label': {
|
|
72
|
+
margin: '0px',
|
|
73
|
+
pointerEvents: 'none',
|
|
74
|
+
'> span': {
|
|
75
|
+
pointerEvents: 'none',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import Icon from '@atlaskit/icon';
|
|
4
|
+
import type { CustomGlyphProps, GlyphProps } from '@atlaskit/icon/types';
|
|
5
|
+
|
|
6
|
+
export const DisplayModeGlyth = (props: CustomGlyphProps) => {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width="24"
|
|
10
|
+
height="24"
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
<rect x="4" y="5" width="4" height="14" rx="1" fill="currentColor" />
|
|
17
|
+
<path
|
|
18
|
+
fillRule="evenodd"
|
|
19
|
+
clipRule="evenodd"
|
|
20
|
+
d="M11 5C10.4477 5 10 5.44772 10 6V9.10102C11.0503 8.02921 12.4424 7.29368 14 7.07089V6C14 5.44772 13.5523 5 13 5H11Z"
|
|
21
|
+
fill="currentColor"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
fillRule="evenodd"
|
|
25
|
+
clipRule="evenodd"
|
|
26
|
+
d="M17 5C16.4477 5 16 5.44772 16 6V7.07089C17.5576 7.29368 18.9497 8.02921 20 9.10102V6C20 5.44772 19.5523 5 19 5H17Z"
|
|
27
|
+
fill="currentColor"
|
|
28
|
+
/>
|
|
29
|
+
<path
|
|
30
|
+
fillRule="evenodd"
|
|
31
|
+
clipRule="evenodd"
|
|
32
|
+
d="M21 14C21 17.3137 18.3137 20 15 20C11.6863 20 9 17.3137 9 14C9 10.6863 11.6863 8 15 8C18.3137 8 21 10.6863 21 14ZM12 15C12 14.4477 12.4477 14 13 14V12C13 10.8954 13.8954 10 15 10C16.1046 10 17 10.8954 17 12V14C17.5523 14 18 14.4477 18 15V17C18 17.5523 17.5523 18 17 18H13C12.4477 18 12 17.5523 12 17V15ZM16 14V12C16 11.4477 15.5523 11 15 11C14.4477 11 14 11.4477 14 12V14H16Z"
|
|
33
|
+
fill="currentColor"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const DisplayModeIcon = (props: GlyphProps) => {
|
|
40
|
+
return <Icon glyph={DisplayModeGlyth} {...props} />;
|
|
41
|
+
};
|
package/src/ui/icons/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DragHandleIcon } from './DragHandleIcon';
|
|
2
2
|
export { DragInMotionIcon } from './DragInMotionIcon';
|
|
3
3
|
export { DragHandleDisabledIcon } from './DragHandleDisabledIcon';
|
|
4
|
+
export { DisplayModeIcon } from './DisplayModeIcon';
|
|
4
5
|
export { MinimisedHandleIcon } from './MinimisedHandle';
|
|
5
6
|
export { MergeCellsIcon } from './MergeCellsIcon';
|
|
6
7
|
export { SplitCellIcon } from './SplitCellIcon';
|
package/src/ui/ui-styles.ts
CHANGED