@atlaskit/editor-plugin-text-color 1.16.2 → 1.16.3

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/editor-plugin-text-color
2
2
 
3
+ ## 1.16.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#172933](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/172933)
8
+ [`8323af2381d00`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8323af2381d00) -
9
+ [ux] Arranges items in the Selection toolbar under the Contextual toolbar experiment flag
10
+ - Updated dependencies
11
+
3
12
  ## 1.16.2
4
13
 
5
14
  ### Patch Changes
@@ -101,7 +101,9 @@ var textColorPlugin = exports.textColorPlugin = function textColorPlugin(_ref) {
101
101
  };
102
102
  return {
103
103
  isToolbarAbove: true,
104
- items: [toolbarCustom]
104
+ items: [toolbarCustom],
105
+ rank: 6,
106
+ pluginName: 'textColor'
105
107
  };
106
108
  } else {
107
109
  return undefined;
@@ -27,6 +27,7 @@ var _textStyle = _interopRequireDefault(require("@atlaskit/icon/core/text-style"
27
27
  var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-down"));
28
28
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
29
29
  var _changeColor = require("../../commands/change-color");
30
+ var _types = require("../../types");
30
31
  var _inputType = require("../../utils/inputType");
31
32
  var _icon = require("./icon");
32
33
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -172,6 +173,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
172
173
  var _getSelectedRowAndCol = (0, _uiColor.getSelectedRowAndColumnFromPalette)(palette, pluginState.color),
173
174
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
174
175
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
176
+ var reducedSpacing = this.props.toolbarType === _types.ToolbarType.FLOATING ? 'compact' : 'none';
175
177
  return (
176
178
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
177
179
  (0, _react2.jsx)("span", {
@@ -195,7 +197,7 @@ var ToolbarTextColor = exports.ToolbarTextColor = /*#__PURE__*/function (_React$
195
197
  },
196
198
  trigger: (0, _react2.jsx)(_uiMenu.ToolbarButton, {
197
199
  buttonId: _uiMenu.TOOLBAR_BUTTON.TEXT_COLOR,
198
- spacing: isReducedSpacing ? 'none' : 'default',
200
+ spacing: isReducedSpacing ? reducedSpacing : 'default',
199
201
  disabled: disabled || pluginState.disabled,
200
202
  selected: isOpen,
201
203
  "aria-label": labelTextColor,
@@ -89,7 +89,9 @@ export const textColorPlugin = ({
89
89
  };
90
90
  return {
91
91
  isToolbarAbove: true,
92
- items: [toolbarCustom]
92
+ items: [toolbarCustom],
93
+ rank: 6,
94
+ pluginName: 'textColor'
93
95
  };
94
96
  } else {
95
97
  return undefined;
@@ -20,6 +20,7 @@ import TextStyleIcon from '@atlaskit/icon/core/text-style';
20
20
  import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import { changeColor as changeColorWithAnalytics } from '../../commands/change-color';
23
+ import { ToolbarType } from '../../types';
23
24
  import { getInputMethod } from '../../utils/inputType';
24
25
  import { EditorTextColorIcon } from './icon';
25
26
  const EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
@@ -153,6 +154,7 @@ export class ToolbarTextColor extends React.Component {
153
154
  selectedRowIndex,
154
155
  selectedColumnIndex
155
156
  } = getSelectedRowAndColumnFromPalette(palette, pluginState.color);
157
+ const reducedSpacing = this.props.toolbarType === ToolbarType.FLOATING ? 'compact' : 'none';
156
158
  return (
157
159
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
158
160
  jsx("span", {
@@ -176,7 +178,7 @@ export class ToolbarTextColor extends React.Component {
176
178
  },
177
179
  trigger: jsx(ToolbarButton, {
178
180
  buttonId: TOOLBAR_BUTTON.TEXT_COLOR,
179
- spacing: isReducedSpacing ? 'none' : 'default',
181
+ spacing: isReducedSpacing ? reducedSpacing : 'default',
180
182
  disabled: disabled || pluginState.disabled,
181
183
  selected: isOpen,
182
184
  "aria-label": labelTextColor,
@@ -88,7 +88,9 @@ export var textColorPlugin = function textColorPlugin(_ref) {
88
88
  };
89
89
  return {
90
90
  isToolbarAbove: true,
91
- items: [toolbarCustom]
91
+ items: [toolbarCustom],
92
+ rank: 6,
93
+ pluginName: 'textColor'
92
94
  };
93
95
  } else {
94
96
  return undefined;
@@ -30,6 +30,7 @@ import TextStyleIcon from '@atlaskit/icon/core/text-style';
30
30
  import ChevronDownIcon from '@atlaskit/icon/utility/migration/chevron-down';
31
31
  import { fg } from '@atlaskit/platform-feature-flags';
32
32
  import { changeColor as changeColorWithAnalytics } from '../../commands/change-color';
33
+ import { ToolbarType } from '../../types';
33
34
  import { getInputMethod } from '../../utils/inputType';
34
35
  import { EditorTextColorIcon } from './icon';
35
36
  var EXPERIMENT_NAME = 'editor.toolbarTextColor.moreColors';
@@ -168,6 +169,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
168
169
  var _getSelectedRowAndCol = getSelectedRowAndColumnFromPalette(palette, pluginState.color),
169
170
  selectedRowIndex = _getSelectedRowAndCol.selectedRowIndex,
170
171
  selectedColumnIndex = _getSelectedRowAndCol.selectedColumnIndex;
172
+ var reducedSpacing = this.props.toolbarType === ToolbarType.FLOATING ? 'compact' : 'none';
171
173
  return (
172
174
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
173
175
  jsx("span", {
@@ -191,7 +193,7 @@ export var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
191
193
  },
192
194
  trigger: jsx(ToolbarButton, {
193
195
  buttonId: TOOLBAR_BUTTON.TEXT_COLOR,
194
- spacing: isReducedSpacing ? 'none' : 'default',
196
+ spacing: isReducedSpacing ? reducedSpacing : 'default',
195
197
  disabled: disabled || pluginState.disabled,
196
198
  selected: isOpen,
197
199
  "aria-label": labelTextColor,
@@ -9,7 +9,7 @@ import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/edito
9
9
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
10
10
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
11
11
  import type { TextColorPluginState } from '../../pm-plugins/main';
12
- import type { TextColorPlugin, ToolbarType } from '../../types';
12
+ import { type TextColorPlugin, ToolbarType } from '../../types';
13
13
  export interface State {
14
14
  isOpen: boolean;
15
15
  isOpenedByKeyboard: boolean;
@@ -9,7 +9,7 @@ import type { DispatchAnalyticsEvent, EditorAnalyticsAPI } from '@atlaskit/edito
9
9
  import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
10
10
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
11
11
  import type { TextColorPluginState } from '../../pm-plugins/main';
12
- import type { TextColorPlugin, ToolbarType } from '../../types';
12
+ import { type TextColorPlugin, ToolbarType } from '../../types';
13
13
  export interface State {
14
14
  isOpen: boolean;
15
15
  isOpenedByKeyboard: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-text-color",
3
- "version": "1.16.2",
3
+ "version": "1.16.3",
4
4
  "description": "Text color plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@atlaskit/adf-schema": "^46.1.0",
35
- "@atlaskit/editor-common": "^96.0.0",
35
+ "@atlaskit/editor-common": "^96.1.0",
36
36
  "@atlaskit/editor-palette": "1.6.3",
37
37
  "@atlaskit/editor-plugin-analytics": "^1.10.0",
38
38
  "@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",