@atlaskit/editor-plugin-table 7.16.16 → 7.16.18

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.
Files changed (61) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/cjs/commands-with-analytics.js +66 -41
  3. package/dist/cjs/nodeviews/TableContainer.js +14 -12
  4. package/dist/cjs/nodeviews/TableResizer.js +17 -18
  5. package/dist/cjs/plugin.js +3 -2
  6. package/dist/cjs/pm-plugins/keymap.js +6 -0
  7. package/dist/cjs/pm-plugins/table-resizing/utils/misc.js +1 -1
  8. package/dist/cjs/toolbar.js +54 -71
  9. package/dist/cjs/ui/icons/index.js +0 -7
  10. package/dist/cjs/utils/snapping.js +2 -2
  11. package/dist/es2019/commands-with-analytics.js +29 -6
  12. package/dist/es2019/nodeviews/TableContainer.js +17 -13
  13. package/dist/es2019/nodeviews/TableResizer.js +17 -18
  14. package/dist/es2019/plugin.js +3 -2
  15. package/dist/es2019/pm-plugins/keymap.js +7 -1
  16. package/dist/es2019/pm-plugins/table-resizing/utils/misc.js +2 -2
  17. package/dist/es2019/toolbar.js +54 -71
  18. package/dist/es2019/ui/icons/index.js +0 -1
  19. package/dist/es2019/utils/snapping.js +3 -3
  20. package/dist/esm/commands-with-analytics.js +66 -41
  21. package/dist/esm/nodeviews/TableContainer.js +15 -13
  22. package/dist/esm/nodeviews/TableResizer.js +20 -21
  23. package/dist/esm/plugin.js +3 -2
  24. package/dist/esm/pm-plugins/keymap.js +7 -1
  25. package/dist/esm/pm-plugins/table-resizing/utils/misc.js +2 -2
  26. package/dist/esm/toolbar.js +55 -72
  27. package/dist/esm/ui/icons/index.js +0 -1
  28. package/dist/esm/utils/snapping.js +3 -3
  29. package/dist/types/commands/toggle.d.ts +1 -1
  30. package/dist/types/commands-with-analytics.d.ts +7 -4
  31. package/dist/types/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
  32. package/dist/types/toolbar.d.ts +4 -5
  33. package/dist/types/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -0
  34. package/dist/types/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -0
  35. package/dist/types/ui/TableFloatingControls/index.d.ts +2 -0
  36. package/dist/types/ui/icons/index.d.ts +0 -1
  37. package/dist/types-ts4.5/commands/toggle.d.ts +1 -1
  38. package/dist/types-ts4.5/commands-with-analytics.d.ts +7 -4
  39. package/dist/types-ts4.5/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
  40. package/dist/types-ts4.5/toolbar.d.ts +4 -5
  41. package/dist/types-ts4.5/ui/TableFloatingColumnControls/ColumnControls/index.d.ts +2 -0
  42. package/dist/types-ts4.5/ui/TableFloatingControls/CornerControls/DragCornerControls.d.ts +4 -0
  43. package/dist/types-ts4.5/ui/TableFloatingControls/index.d.ts +2 -0
  44. package/dist/types-ts4.5/ui/icons/index.d.ts +0 -1
  45. package/package.json +9 -6
  46. package/src/commands-with-analytics.ts +80 -40
  47. package/src/nodeviews/TableContainer.tsx +24 -14
  48. package/src/nodeviews/TableResizer.tsx +29 -15
  49. package/src/plugin.tsx +5 -2
  50. package/src/pm-plugins/keymap.ts +30 -0
  51. package/src/pm-plugins/table-resizing/utils/misc.ts +2 -2
  52. package/src/toolbar.tsx +80 -83
  53. package/src/ui/TableFloatingControls/index.tsx +0 -1
  54. package/src/ui/icons/index.ts +0 -1
  55. package/src/utils/snapping.ts +4 -4
  56. package/dist/cjs/ui/icons/DisplayModeIcon.js +0 -46
  57. package/dist/es2019/ui/icons/DisplayModeIcon.js +0 -39
  58. package/dist/esm/ui/icons/DisplayModeIcon.js +0 -39
  59. package/dist/types/ui/icons/DisplayModeIcon.d.ts +0 -4
  60. package/dist/types-ts4.5/ui/icons/DisplayModeIcon.d.ts +0 -4
  61. package/src/ui/icons/DisplayModeIcon.tsx +0 -41
package/src/toolbar.tsx CHANGED
@@ -3,7 +3,7 @@ import { jsx } from '@emotion/react';
3
3
 
4
4
  import { TableSortOrder as SortOrder } from '@atlaskit/custom-steps';
5
5
  import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
6
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
+ import { CHANGE_ALIGNMENT_REASON, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
7
7
  import { addColumnAfter, addRowAfter, backspace, tooltip } from '@atlaskit/editor-common/keymaps';
8
8
  import commonMessages, { tableMessages as messages } from '@atlaskit/editor-common/messages';
9
9
  import { getTableContainerWidth } from '@atlaskit/editor-common/node-width';
@@ -69,15 +69,16 @@ import {
69
69
  setTableAlignmentWithAnalytics,
70
70
  sortColumnWithAnalytics,
71
71
  splitCellWithAnalytics,
72
+ toggleFixedColumnWidthsOptionAnalytics,
72
73
  toggleHeaderColumnWithAnalytics,
73
74
  toggleHeaderRowWithAnalytics,
74
75
  toggleNumberColumnWithAnalytics,
75
- toggleTableLockWithAnalytics,
76
76
  wrapTableInExpandWithAnalytics,
77
77
  } from './commands-with-analytics';
78
78
  import type { TablePluginOptions } from './plugin';
79
79
  import { getPluginState } from './pm-plugins/plugin-factory';
80
80
  import { pluginKey as tableResizingPluginKey } from './pm-plugins/table-resizing';
81
+ import { getStaticTableScalingPercent } from './pm-plugins/table-resizing/utils/misc';
81
82
  import { getNewResizeStateFromSelectedColumns } from './pm-plugins/table-resizing/utils/resize-state';
82
83
  import { pluginKey as tableWidthPluginKey } from './pm-plugins/table-width';
83
84
  import { canMergeCells } from './transforms';
@@ -90,7 +91,6 @@ import type {
90
91
  } from './types';
91
92
  import { TableCssClassName } from './types';
92
93
  import { FloatingAlignmentButtons } from './ui/FloatingAlignmentButtons/FloatingAlignmentButtons';
93
- import { DisplayModeIcon } from './ui/icons';
94
94
  import {
95
95
  getMergedCellsPositions,
96
96
  getSelectedColumnIndexes,
@@ -104,6 +104,8 @@ export const getToolbarMenuConfig = (
104
104
  state: ToolbarMenuState,
105
105
  { formatMessage }: ToolbarMenuContext,
106
106
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
107
+ isTableScalingWithFixedColumnWidthsOptionShown = false,
108
+ areTableColumnWidthsFixed = false,
107
109
  ): FloatingToolbarItem<Command> => {
108
110
  const optionItem: typeOption = getBooleanFF(
109
111
  'platform.editor.a11y-table-floating-toolbar-dropdown-menu_zkb33',
@@ -112,6 +114,14 @@ export const getToolbarMenuConfig = (
112
114
  : 'item';
113
115
 
114
116
  const options = [
117
+ {
118
+ id: 'editor.table.lockColumnWidths',
119
+ title: formatMessage(messages.lockColumnWidths),
120
+ onClick: toggleFixedColumnWidthsOptionAnalytics(editorAnalyticsAPI, INPUT_METHOD.FLOATING_TB),
121
+ selected: areTableColumnWidthsFixed,
122
+ hidden: !isTableScalingWithFixedColumnWidthsOptionShown,
123
+ domItemOptions: { type: optionItem },
124
+ },
115
125
  {
116
126
  id: 'editor.table.headerRow',
117
127
  title: formatMessage(messages.headerRow),
@@ -156,6 +166,7 @@ export const getToolbarMenuConfig = (
156
166
  title: formatMessage(messages.tableOptions),
157
167
  hidden: options.every((option) => option.hidden),
158
168
  options,
169
+ dropdownWidth: isTableScalingWithFixedColumnWidthsOptionShown ? 192 : undefined,
159
170
  };
160
171
  } else {
161
172
  return {
@@ -165,6 +176,7 @@ export const getToolbarMenuConfig = (
165
176
  title: formatMessage(messages.tableOptions),
166
177
  hidden: options.every((option) => option.hidden),
167
178
  options,
179
+ dropdownWidth: isTableScalingWithFixedColumnWidthsOptionShown ? 192 : undefined,
168
180
  };
169
181
  }
170
182
  };
@@ -434,6 +446,7 @@ export const getToolbarConfig =
434
446
  getEditorFeatureFlags: GetEditorFeatureFlags,
435
447
  getEditorView: () => EditorView | null,
436
448
  options?: TablePluginOptions,
449
+ isTableScalingWithFixedColumnWidthsOptionEnabled = false,
437
450
  shouldUseIncreasedScalingPercent = false,
438
451
  ) =>
439
452
  (config: PluginConfig): FloatingToolbarHandler =>
@@ -448,22 +461,54 @@ export const getToolbarConfig =
448
461
 
449
462
  if (tableObject && pluginState.editorHasFocus && !isWidthResizing) {
450
463
  const nodeType = state.schema.nodes.table;
451
- const menu = getToolbarMenuConfig(config, pluginState, intl, editorAnalyticsAPI);
452
-
453
- let alignmentMenu: Array<FloatingToolbarItem<Command>>;
454
464
  const isNested = pluginState.tablePos && isTableNested(state, pluginState.tablePos);
465
+ const isTableScalingWithFixedColumnWidthsOptionShown =
466
+ isTableScalingWithFixedColumnWidthsOptionEnabled && !isNested;
467
+ const areTableColumWidthsFixed = tableObject.node.attrs.displayMode === 'fixed';
468
+ const editorView = getEditorView();
469
+
470
+ const getDomRef = (editorView: EditorView) => {
471
+ let element: HTMLElement | undefined;
472
+ const domAtPos = editorView.domAtPos.bind(editorView);
473
+ const parent = findParentDomRefOfType(nodeType, domAtPos)(state.selection);
474
+ if (parent) {
475
+ const tableRef =
476
+ (parent as HTMLElement).querySelector<HTMLTableElement>('table') || undefined;
477
+ if (tableRef) {
478
+ element =
479
+ closestElement(tableRef, `.${TableCssClassName.TABLE_NODE_WRAPPER}`) || undefined;
480
+ }
481
+ }
482
+
483
+ return element;
484
+ };
455
485
 
456
- alignmentMenu =
486
+ const menu = getToolbarMenuConfig(
487
+ config,
488
+ pluginState,
489
+ intl,
490
+ editorAnalyticsAPI,
491
+ isTableScalingWithFixedColumnWidthsOptionShown,
492
+ areTableColumWidthsFixed,
493
+ );
494
+
495
+ const alignmentMenu =
457
496
  options?.isTableAlignmentEnabled && !isNested
458
- ? getAlignmentOptionsConfig(state, intl, editorAnalyticsAPI, getEditorContainerWidth)
497
+ ? getAlignmentOptionsConfig(
498
+ state,
499
+ intl,
500
+ editorAnalyticsAPI,
501
+ getEditorContainerWidth,
502
+ getDomRef,
503
+ editorView,
504
+ )
459
505
  : [];
460
506
 
461
- let cellItems: Array<FloatingToolbarItem<Command>>;
462
- cellItems = pluginState.isDragAndDropEnabled
507
+ const cellItems = pluginState.isDragAndDropEnabled
463
508
  ? []
464
509
  : getCellItems(
465
510
  state,
466
- getEditorView(),
511
+ editorView,
467
512
  intl,
468
513
  getEditorContainerWidth,
469
514
  editorAnalyticsAPI,
@@ -471,11 +516,10 @@ export const getToolbarConfig =
471
516
  shouldUseIncreasedScalingPercent,
472
517
  );
473
518
 
474
- let columnSettingsItems;
475
- columnSettingsItems = pluginState.isDragAndDropEnabled
519
+ const columnSettingsItems = pluginState.isDragAndDropEnabled
476
520
  ? getColumnSettingItems(
477
521
  state,
478
- getEditorView(),
522
+ editorView,
479
523
  intl,
480
524
  getEditorContainerWidth,
481
525
  editorAnalyticsAPI,
@@ -504,22 +548,6 @@ export const getToolbarConfig =
504
548
  });
505
549
  }
506
550
 
507
- const getDomRef = (editorView: EditorView) => {
508
- let element: HTMLElement | undefined;
509
- const domAtPos = editorView.domAtPos.bind(editorView);
510
- const parent = findParentDomRefOfType(nodeType, domAtPos)(state.selection);
511
- if (parent) {
512
- const tableRef =
513
- (parent as HTMLElement).querySelector<HTMLTableElement>('table') || undefined;
514
- if (tableRef) {
515
- element =
516
- closestElement(tableRef, `.${TableCssClassName.TABLE_NODE_WRAPPER}`) || undefined;
517
- }
518
- }
519
-
520
- return element;
521
- };
522
-
523
551
  const { stickyScrollbar } = getEditorFeatureFlags();
524
552
 
525
553
  return {
@@ -612,29 +640,6 @@ const getCellItems = (
612
640
  return [];
613
641
  };
614
642
 
615
- export const getLockBtnConfig =
616
- (editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null): Command =>
617
- (state, dispatch, editorView) => {
618
- const selectionOrTableRect = getClosestSelectionOrTableRect(state);
619
- if (!editorView || !selectionOrTableRect) {
620
- return false;
621
- }
622
-
623
- const { tr } = state;
624
- const table = findTable(tr.selection);
625
-
626
- if (!table) {
627
- return false;
628
- } else {
629
- const { displayMode } = table.node.attrs;
630
- toggleTableLockWithAnalytics(editorAnalyticsAPI)(displayMode, INPUT_METHOD.FLOATING_TB)(
631
- state,
632
- dispatch,
633
- );
634
- return true;
635
- }
636
- };
637
-
638
643
  export const getDistributeConfig =
639
644
  (
640
645
  getEditorContainerWidth: GetEditorContainerWidth,
@@ -693,32 +698,6 @@ const getColumnSettingItems = (
693
698
 
694
699
  const items: Array<FloatingToolbarItem<Command>> = [];
695
700
 
696
- const isNested = pluginState.tablePos && isTableNested(editorState, pluginState.tablePos);
697
-
698
- const isTableScalingLockBtnEnabled =
699
- !isNested &&
700
- isTableScalingEnabled &&
701
- getBooleanFF('platform.editor.table.preserve-widths-with-lock-button');
702
-
703
- if (isTableScalingLockBtnEnabled) {
704
- const areColumnWidthsLocked = pluginState?.tableNode?.attrs.displayMode === 'fixed';
705
-
706
- const title = areColumnWidthsLocked
707
- ? formatMessage(messages.unlockColumnWidths)
708
- : formatMessage(messages.lockColumnWidths);
709
-
710
- items.push({
711
- id: 'editor.table.lockColumns',
712
- type: 'button',
713
- title,
714
- icon: () => <DisplayModeIcon size="medium" label={title} />,
715
- onClick: (state, dispatch, view) =>
716
- getLockBtnConfig(editorAnalyticsAPI)(state, dispatch, view),
717
- selected: areColumnWidthsLocked,
718
- testId: 'table-lock-column-widths-btn',
719
- });
720
- }
721
-
722
701
  if (pluginState?.pluginConfig?.allowDistributeColumns && pluginState.isDragAndDropEnabled) {
723
702
  items.push({
724
703
  id: 'editor.table.distributeColumns',
@@ -835,6 +814,8 @@ export const getAlignmentOptionsConfig = (
835
814
  { formatMessage }: ToolbarMenuContext,
836
815
  editorAnalyticsAPI: EditorAnalyticsAPI | undefined | null,
837
816
  getEditorContainerWidth: GetEditorContainerWidth,
817
+ getDomRef: (editorView: EditorView) => HTMLElement | undefined,
818
+ editorView: EditorView | null,
838
819
  ): Array<FloatingToolbarDropdown<Command>> => {
839
820
  const tableObject = findTable(editorState.selection);
840
821
 
@@ -875,8 +856,14 @@ export const getAlignmentOptionsConfig = (
875
856
  value,
876
857
  currentLayout,
877
858
  INPUT_METHOD.FLOATING_TB,
859
+ CHANGE_ALIGNMENT_REASON.TOOLBAR_OPTION_CHANGED,
878
860
  ),
879
- ...(isLayoutOptionDisabled(tableObject.node, getEditorContainerWidth) && {
861
+ ...(isLayoutOptionDisabled(
862
+ tableObject.node,
863
+ getEditorContainerWidth,
864
+ getDomRef,
865
+ editorView,
866
+ ) && {
880
867
  disabled: value !== 'center',
881
868
  }),
882
869
  };
@@ -915,11 +902,21 @@ export const getSelectedAlignmentIcon = (alignmentIcons: AlignmentIcon[], select
915
902
  export const isLayoutOptionDisabled = (
916
903
  selectedNode: PMNode,
917
904
  getEditorContainerWidth: GetEditorContainerWidth,
905
+ getDomRef: (editorView: EditorView) => HTMLElement | undefined,
906
+ editorView: EditorView | null,
918
907
  ) => {
919
- const lineLength = getEditorContainerWidth().lineLength;
920
- const tableWidth = getTableContainerWidth(selectedNode);
908
+ const { lineLength } = getEditorContainerWidth();
909
+ let tableContainerWidth = getTableContainerWidth(selectedNode);
910
+
911
+ // table may be scaled, use the scale percent to calculate the table width
912
+ if (editorView) {
913
+ const tableWrapper = getDomRef(editorView);
914
+ const tableWrapperWidth = tableWrapper?.clientWidth || tableContainerWidth;
915
+ const scalePercent = getStaticTableScalingPercent(selectedNode, tableWrapperWidth);
916
+ tableContainerWidth = tableContainerWidth * scalePercent;
917
+ }
921
918
 
922
- if (selectedNode && lineLength && tableWidth > lineLength) {
919
+ if (selectedNode && lineLength && tableContainerWidth > lineLength) {
923
920
  return true;
924
921
  }
925
922
 
@@ -165,7 +165,6 @@ export const TableFloatingControls = ({
165
165
  isInDanger={isInDanger}
166
166
  isResizing={isResizing}
167
167
  />
168
-
169
168
  ))}
170
169
  <DragControls
171
170
  tableRef={tableRef}
@@ -1,7 +1,6 @@
1
1
  export { DragHandleIcon } from './DragHandleIcon';
2
2
  export { DragInMotionIcon } from './DragInMotionIcon';
3
3
  export { DragHandleDisabledIcon } from './DragHandleDisabledIcon';
4
- export { DisplayModeIcon } from './DisplayModeIcon';
5
4
  export { MinimisedHandleIcon } from './MinimisedHandle';
6
5
  export { MergeCellsIcon } from './MergeCellsIcon';
7
6
  export { SplitCellIcon } from './SplitCellIcon';
@@ -4,7 +4,7 @@ import {
4
4
  akEditorCalculatedWideLayoutWidth,
5
5
  akEditorDefaultLayoutWidth,
6
6
  akEditorFullWidthLayoutWidth,
7
- akEditorGutterPadding,
7
+ akEditorGutterPaddingDynamic,
8
8
  } from '@atlaskit/editor-shared-styles';
9
9
 
10
10
  const numberOfLanesInDefaultLayoutWidth = 12;
@@ -39,9 +39,9 @@ export const calculateDefaultTablePreserveSnappings = (
39
39
  },
40
40
  ) => {
41
41
  const dynamicFullWidthLine =
42
- editorContainerWith - akEditorGutterPadding * 2 >= akEditorFullWidthLayoutWidth
42
+ editorContainerWith - akEditorGutterPaddingDynamic() * 2 >= akEditorFullWidthLayoutWidth
43
43
  ? akEditorFullWidthLayoutWidth
44
- : editorContainerWith - akEditorGutterPadding * 2;
44
+ : editorContainerWith - akEditorGutterPaddingDynamic() * 2;
45
45
 
46
46
  const guides = [dynamicFullWidthLine - lengthOffset];
47
47
 
@@ -77,7 +77,7 @@ export const defaultTablePreserveSnappingWidths = (
77
77
  breakoutPoints: false,
78
78
  },
79
79
  ) => {
80
- return editorContainerWidth - akEditorGutterPadding * 2 > akEditorFullWidthLayoutWidth
80
+ return editorContainerWidth - akEditorGutterPaddingDynamic() * 2 > akEditorFullWidthLayoutWidth
81
81
  ? calculateDefaultSnappings()
82
82
  : calculateDefaultTablePreserveSnappings(lengthOffset, editorContainerWidth, exclude); // lengthOffset was hardcoded 0 here, created PRESERVE_TABLE_SNAPPING_LENGTH_OFFSET instead.
83
83
  };
@@ -1,46 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.DisplayModeIcon = exports.DisplayModeGlyth = void 0;
8
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _icon = _interopRequireDefault(require("@atlaskit/icon"));
11
- var DisplayModeGlyth = exports.DisplayModeGlyth = function DisplayModeGlyth(props) {
12
- return /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
13
- width: "24",
14
- height: "24",
15
- viewBox: "0 0 24 24",
16
- fill: "none",
17
- xmlns: "http://www.w3.org/2000/svg"
18
- }, props), /*#__PURE__*/_react.default.createElement("rect", {
19
- x: "4",
20
- y: "5",
21
- width: "4",
22
- height: "14",
23
- rx: "1",
24
- fill: "currentColor"
25
- }), /*#__PURE__*/_react.default.createElement("path", {
26
- fillRule: "evenodd",
27
- clipRule: "evenodd",
28
- 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",
29
- fill: "currentColor"
30
- }), /*#__PURE__*/_react.default.createElement("path", {
31
- fillRule: "evenodd",
32
- clipRule: "evenodd",
33
- 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",
34
- fill: "currentColor"
35
- }), /*#__PURE__*/_react.default.createElement("path", {
36
- fillRule: "evenodd",
37
- clipRule: "evenodd",
38
- 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",
39
- fill: "currentColor"
40
- }));
41
- };
42
- var DisplayModeIcon = exports.DisplayModeIcon = function DisplayModeIcon(props) {
43
- return /*#__PURE__*/_react.default.createElement(_icon.default, (0, _extends2.default)({
44
- glyph: DisplayModeGlyth
45
- }, props));
46
- };
@@ -1,39 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@atlaskit/icon';
4
- export const DisplayModeGlyth = props => {
5
- return /*#__PURE__*/React.createElement("svg", _extends({
6
- width: "24",
7
- height: "24",
8
- viewBox: "0 0 24 24",
9
- fill: "none",
10
- xmlns: "http://www.w3.org/2000/svg"
11
- }, props), /*#__PURE__*/React.createElement("rect", {
12
- x: "4",
13
- y: "5",
14
- width: "4",
15
- height: "14",
16
- rx: "1",
17
- fill: "currentColor"
18
- }), /*#__PURE__*/React.createElement("path", {
19
- fillRule: "evenodd",
20
- clipRule: "evenodd",
21
- 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",
22
- fill: "currentColor"
23
- }), /*#__PURE__*/React.createElement("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
- }), /*#__PURE__*/React.createElement("path", {
29
- fillRule: "evenodd",
30
- clipRule: "evenodd",
31
- 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",
32
- fill: "currentColor"
33
- }));
34
- };
35
- export const DisplayModeIcon = props => {
36
- return /*#__PURE__*/React.createElement(Icon, _extends({
37
- glyph: DisplayModeGlyth
38
- }, props));
39
- };
@@ -1,39 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import React from 'react';
3
- import Icon from '@atlaskit/icon';
4
- export var DisplayModeGlyth = function DisplayModeGlyth(props) {
5
- return /*#__PURE__*/React.createElement("svg", _extends({
6
- width: "24",
7
- height: "24",
8
- viewBox: "0 0 24 24",
9
- fill: "none",
10
- xmlns: "http://www.w3.org/2000/svg"
11
- }, props), /*#__PURE__*/React.createElement("rect", {
12
- x: "4",
13
- y: "5",
14
- width: "4",
15
- height: "14",
16
- rx: "1",
17
- fill: "currentColor"
18
- }), /*#__PURE__*/React.createElement("path", {
19
- fillRule: "evenodd",
20
- clipRule: "evenodd",
21
- 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",
22
- fill: "currentColor"
23
- }), /*#__PURE__*/React.createElement("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
- }), /*#__PURE__*/React.createElement("path", {
29
- fillRule: "evenodd",
30
- clipRule: "evenodd",
31
- 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",
32
- fill: "currentColor"
33
- }));
34
- };
35
- export var DisplayModeIcon = function DisplayModeIcon(props) {
36
- return /*#__PURE__*/React.createElement(Icon, _extends({
37
- glyph: DisplayModeGlyth
38
- }, props));
39
- };
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import type { CustomGlyphProps, GlyphProps } from '@atlaskit/icon/types';
3
- export declare const DisplayModeGlyth: (props: CustomGlyphProps) => JSX.Element;
4
- export declare const DisplayModeIcon: (props: GlyphProps) => JSX.Element;
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import type { CustomGlyphProps, GlyphProps } from '@atlaskit/icon/types';
3
- export declare const DisplayModeGlyth: (props: CustomGlyphProps) => JSX.Element;
4
- export declare const DisplayModeIcon: (props: GlyphProps) => JSX.Element;
@@ -1,41 +0,0 @@
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
- };