@atlaskit/editor-plugin-toolbar-lists-indentation 4.2.1 → 4.2.2
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 +17 -0
- package/dist/cjs/ui/toolbar-components/ListsIndentationHeroButton.js +0 -2
- package/dist/cjs/ui/toolbar-components/ListsIndentationMenu.js +0 -2
- package/dist/cjs/ui/toolbar-components.js +2 -6
- package/dist/es2019/ui/toolbar-components/ListsIndentationHeroButton.js +0 -2
- package/dist/es2019/ui/toolbar-components/ListsIndentationMenu.js +0 -2
- package/dist/es2019/ui/toolbar-components.js +1 -5
- package/dist/esm/ui/toolbar-components/ListsIndentationHeroButton.js +0 -2
- package/dist/esm/ui/toolbar-components/ListsIndentationMenu.js +0 -2
- package/dist/esm/ui/toolbar-components.js +2 -6
- package/dist/types/ui/toolbar-components/ListsIndentationHeroButton.d.ts +1 -3
- package/dist/types/ui/toolbar-components/ListsIndentationMenu.d.ts +1 -3
- package/dist/types-ts4.5/ui/toolbar-components/ListsIndentationHeroButton.d.ts +1 -3
- package/dist/types-ts4.5/ui/toolbar-components/ListsIndentationMenu.d.ts +1 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-toolbar-lists-indentation
|
|
2
2
|
|
|
3
|
+
## 4.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`3145f278b1f7a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3145f278b1f7a) -
|
|
8
|
+
[ux] [ED-28473] minor UI updates for editor-toolbar
|
|
9
|
+
|
|
10
|
+
- Use ADS ButtonGroup for ToolbarButtonGroup
|
|
11
|
+
- Remove groupLocation prop and use CSS instead
|
|
12
|
+
- Use DropdownItemGroup for ToolbarDropdownItemSection and expand props for section separator and
|
|
13
|
+
title
|
|
14
|
+
- Support ReactNode as content for ToolbarTooltip and add missing shortcuts in tooltips
|
|
15
|
+
- Center Icons for split buttons and make chevron icon 24px wide
|
|
16
|
+
- Align dropdown menu UI with current editor design
|
|
17
|
+
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 4.2.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -14,7 +14,6 @@ var _toolbar = require("@atlaskit/editor-common/toolbar");
|
|
|
14
14
|
var _editorToolbar = require("@atlaskit/editor-toolbar");
|
|
15
15
|
var ListsIndentationHeroButton = exports.ListsIndentationHeroButton = function ListsIndentationHeroButton(_ref) {
|
|
16
16
|
var api = _ref.api,
|
|
17
|
-
groupLocation = _ref.groupLocation,
|
|
18
17
|
parents = _ref.parents;
|
|
19
18
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
20
19
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -46,7 +45,6 @@ var ListsIndentationHeroButton = exports.ListsIndentationHeroButton = function L
|
|
|
46
45
|
}) : /*#__PURE__*/_react.default.createElement(_editorToolbar.ListBulletedIcon, {
|
|
47
46
|
label: formatMessage(_messages.listMessages.bulletedList)
|
|
48
47
|
}),
|
|
49
|
-
groupLocation: groupLocation,
|
|
50
48
|
isSelected: bulletListActive || orderedListActive,
|
|
51
49
|
isDisabled: !orderedListActive && bulletListDisabled,
|
|
52
50
|
ariaKeyshortcuts: shortcut,
|
|
@@ -15,7 +15,6 @@ var _hooks2 = require("../utils/hooks");
|
|
|
15
15
|
var ListsIndentationMenu = exports.ListsIndentationMenu = function ListsIndentationMenu(_ref) {
|
|
16
16
|
var children = _ref.children,
|
|
17
17
|
api = _ref.api,
|
|
18
|
-
groupLocation = _ref.groupLocation,
|
|
19
18
|
allowHeadingAndParagraphIndentation = _ref.allowHeadingAndParagraphIndentation;
|
|
20
19
|
var _useIntl = (0, _reactIntlNext.useIntl)(),
|
|
21
20
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -40,7 +39,6 @@ var ListsIndentationMenu = exports.ListsIndentationMenu = function ListsIndentat
|
|
|
40
39
|
iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.MoreItemsIcon, {
|
|
41
40
|
label: formatMessage(_lists.messages.lists)
|
|
42
41
|
}),
|
|
43
|
-
groupLocation: groupLocation,
|
|
44
42
|
isDisabled: allItemsDisabled,
|
|
45
43
|
testId: "editor-toolbar__lists-and-indentation-menu"
|
|
46
44
|
}, children);
|
|
@@ -34,11 +34,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
34
34
|
rank: _toolbar.LISTS_INDENTATION_GROUP_RANK[_toolbar.LISTS_INDENTATION_HERO_BUTTON.key]
|
|
35
35
|
}],
|
|
36
36
|
component: function component(_ref2) {
|
|
37
|
-
var
|
|
38
|
-
parents = _ref2.parents;
|
|
37
|
+
var parents = _ref2.parents;
|
|
39
38
|
return /*#__PURE__*/_react.default.createElement(_ListsIndentationHeroButton.ListsIndentationHeroButton, {
|
|
40
39
|
api: api,
|
|
41
|
-
groupLocation: groupLocation,
|
|
42
40
|
parents: parents
|
|
43
41
|
});
|
|
44
42
|
}
|
|
@@ -51,11 +49,9 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
|
|
|
51
49
|
rank: _toolbar.LISTS_INDENTATION_GROUP_RANK[_toolbar.LISTS_INDENTATION_MENU.key]
|
|
52
50
|
}],
|
|
53
51
|
component: function component(_ref3) {
|
|
54
|
-
var children = _ref3.children
|
|
55
|
-
groupLocation = _ref3.groupLocation;
|
|
52
|
+
var children = _ref3.children;
|
|
56
53
|
return /*#__PURE__*/_react.default.createElement(_ListsIndentationMenu.ListsIndentationMenu, {
|
|
57
54
|
api: api,
|
|
58
|
-
groupLocation: groupLocation,
|
|
59
55
|
allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
|
|
60
56
|
}, children);
|
|
61
57
|
}
|
|
@@ -7,7 +7,6 @@ import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
|
7
7
|
import { ListBulletedIcon, ListNumberedIcon, ToolbarButton, ToolbarTooltip } from '@atlaskit/editor-toolbar';
|
|
8
8
|
export const ListsIndentationHeroButton = ({
|
|
9
9
|
api,
|
|
10
|
-
groupLocation,
|
|
11
10
|
parents
|
|
12
11
|
}) => {
|
|
13
12
|
const {
|
|
@@ -42,7 +41,6 @@ export const ListsIndentationHeroButton = ({
|
|
|
42
41
|
}) : /*#__PURE__*/React.createElement(ListBulletedIcon, {
|
|
43
42
|
label: formatMessage(listMessages.bulletedList)
|
|
44
43
|
}),
|
|
45
|
-
groupLocation: groupLocation,
|
|
46
44
|
isSelected: bulletListActive || orderedListActive,
|
|
47
45
|
isDisabled: !orderedListActive && bulletListDisabled,
|
|
48
46
|
ariaKeyshortcuts: shortcut,
|
|
@@ -8,7 +8,6 @@ import { useIndentationState } from '../utils/hooks';
|
|
|
8
8
|
export const ListsIndentationMenu = ({
|
|
9
9
|
children,
|
|
10
10
|
api,
|
|
11
|
-
groupLocation,
|
|
12
11
|
allowHeadingAndParagraphIndentation
|
|
13
12
|
}) => {
|
|
14
13
|
const {
|
|
@@ -37,7 +36,6 @@ export const ListsIndentationMenu = ({
|
|
|
37
36
|
iconBefore: /*#__PURE__*/React.createElement(MoreItemsIcon, {
|
|
38
37
|
label: formatMessage(messages.lists)
|
|
39
38
|
}),
|
|
40
|
-
groupLocation: groupLocation,
|
|
41
39
|
isDisabled: allItemsDisabled,
|
|
42
40
|
testId: "editor-toolbar__lists-and-indentation-menu"
|
|
43
41
|
}, children);
|
|
@@ -28,11 +28,9 @@ export const getToolbarComponents = ({
|
|
|
28
28
|
rank: LISTS_INDENTATION_GROUP_RANK[LISTS_INDENTATION_HERO_BUTTON.key]
|
|
29
29
|
}],
|
|
30
30
|
component: ({
|
|
31
|
-
groupLocation,
|
|
32
31
|
parents
|
|
33
32
|
}) => /*#__PURE__*/React.createElement(ListsIndentationHeroButton, {
|
|
34
33
|
api: api,
|
|
35
|
-
groupLocation: groupLocation,
|
|
36
34
|
parents: parents
|
|
37
35
|
})
|
|
38
36
|
}, {
|
|
@@ -44,11 +42,9 @@ export const getToolbarComponents = ({
|
|
|
44
42
|
rank: LISTS_INDENTATION_GROUP_RANK[LISTS_INDENTATION_MENU.key]
|
|
45
43
|
}],
|
|
46
44
|
component: ({
|
|
47
|
-
children
|
|
48
|
-
groupLocation
|
|
45
|
+
children
|
|
49
46
|
}) => /*#__PURE__*/React.createElement(ListsIndentationMenu, {
|
|
50
47
|
api: api,
|
|
51
|
-
groupLocation: groupLocation,
|
|
52
48
|
allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
|
|
53
49
|
}, children)
|
|
54
50
|
}, {
|
|
@@ -7,7 +7,6 @@ import { getInputMethodFromParentKeys } from '@atlaskit/editor-common/toolbar';
|
|
|
7
7
|
import { ListBulletedIcon, ListNumberedIcon, ToolbarButton, ToolbarTooltip } from '@atlaskit/editor-toolbar';
|
|
8
8
|
export var ListsIndentationHeroButton = function ListsIndentationHeroButton(_ref) {
|
|
9
9
|
var api = _ref.api,
|
|
10
|
-
groupLocation = _ref.groupLocation,
|
|
11
10
|
parents = _ref.parents;
|
|
12
11
|
var _useIntl = useIntl(),
|
|
13
12
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -39,7 +38,6 @@ export var ListsIndentationHeroButton = function ListsIndentationHeroButton(_ref
|
|
|
39
38
|
}) : /*#__PURE__*/React.createElement(ListBulletedIcon, {
|
|
40
39
|
label: formatMessage(listMessages.bulletedList)
|
|
41
40
|
}),
|
|
42
|
-
groupLocation: groupLocation,
|
|
43
41
|
isSelected: bulletListActive || orderedListActive,
|
|
44
42
|
isDisabled: !orderedListActive && bulletListDisabled,
|
|
45
43
|
ariaKeyshortcuts: shortcut,
|
|
@@ -8,7 +8,6 @@ import { useIndentationState } from '../utils/hooks';
|
|
|
8
8
|
export var ListsIndentationMenu = function ListsIndentationMenu(_ref) {
|
|
9
9
|
var children = _ref.children,
|
|
10
10
|
api = _ref.api,
|
|
11
|
-
groupLocation = _ref.groupLocation,
|
|
12
11
|
allowHeadingAndParagraphIndentation = _ref.allowHeadingAndParagraphIndentation;
|
|
13
12
|
var _useIntl = useIntl(),
|
|
14
13
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -33,7 +32,6 @@ export var ListsIndentationMenu = function ListsIndentationMenu(_ref) {
|
|
|
33
32
|
iconBefore: /*#__PURE__*/React.createElement(MoreItemsIcon, {
|
|
34
33
|
label: formatMessage(messages.lists)
|
|
35
34
|
}),
|
|
36
|
-
groupLocation: groupLocation,
|
|
37
35
|
isDisabled: allItemsDisabled,
|
|
38
36
|
testId: "editor-toolbar__lists-and-indentation-menu"
|
|
39
37
|
}, children);
|
|
@@ -27,11 +27,9 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
27
27
|
rank: LISTS_INDENTATION_GROUP_RANK[LISTS_INDENTATION_HERO_BUTTON.key]
|
|
28
28
|
}],
|
|
29
29
|
component: function component(_ref2) {
|
|
30
|
-
var
|
|
31
|
-
parents = _ref2.parents;
|
|
30
|
+
var parents = _ref2.parents;
|
|
32
31
|
return /*#__PURE__*/React.createElement(ListsIndentationHeroButton, {
|
|
33
32
|
api: api,
|
|
34
|
-
groupLocation: groupLocation,
|
|
35
33
|
parents: parents
|
|
36
34
|
});
|
|
37
35
|
}
|
|
@@ -44,11 +42,9 @@ export var getToolbarComponents = function getToolbarComponents(_ref) {
|
|
|
44
42
|
rank: LISTS_INDENTATION_GROUP_RANK[LISTS_INDENTATION_MENU.key]
|
|
45
43
|
}],
|
|
46
44
|
component: function component(_ref3) {
|
|
47
|
-
var children = _ref3.children
|
|
48
|
-
groupLocation = _ref3.groupLocation;
|
|
45
|
+
var children = _ref3.children;
|
|
49
46
|
return /*#__PURE__*/React.createElement(ListsIndentationMenu, {
|
|
50
47
|
api: api,
|
|
51
|
-
groupLocation: groupLocation,
|
|
52
48
|
allowHeadingAndParagraphIndentation: allowHeadingAndParagraphIndentation
|
|
53
49
|
}, children);
|
|
54
50
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
4
3
|
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
|
|
5
4
|
import type { ToolbarListsIndentationPlugin } from '../../toolbarListsIndentationPluginType';
|
|
6
5
|
type ListsIndentationHeroButtonProps = {
|
|
7
6
|
api?: ExtractInjectionAPI<ToolbarListsIndentationPlugin>;
|
|
8
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
9
7
|
parents: ToolbarComponentTypes;
|
|
10
8
|
};
|
|
11
|
-
export declare const ListsIndentationHeroButton: ({ api,
|
|
9
|
+
export declare const ListsIndentationHeroButton: ({ api, parents }: ListsIndentationHeroButtonProps) => React.JSX.Element;
|
|
12
10
|
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
4
3
|
import type { ToolbarListsIndentationPlugin } from '../../toolbarListsIndentationPluginType';
|
|
5
4
|
type ListsIndentationMenuProps = {
|
|
6
5
|
children: React.ReactNode;
|
|
7
6
|
api?: ExtractInjectionAPI<ToolbarListsIndentationPlugin>;
|
|
8
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
9
7
|
allowHeadingAndParagraphIndentation: boolean;
|
|
10
8
|
};
|
|
11
|
-
export declare const ListsIndentationMenu: ({ children, api,
|
|
9
|
+
export declare const ListsIndentationMenu: ({ children, api, allowHeadingAndParagraphIndentation, }: ListsIndentationMenuProps) => React.JSX.Element;
|
|
12
10
|
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
4
3
|
import type { ToolbarComponentTypes } from '@atlaskit/editor-toolbar-model';
|
|
5
4
|
import type { ToolbarListsIndentationPlugin } from '../../toolbarListsIndentationPluginType';
|
|
6
5
|
type ListsIndentationHeroButtonProps = {
|
|
7
6
|
api?: ExtractInjectionAPI<ToolbarListsIndentationPlugin>;
|
|
8
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
9
7
|
parents: ToolbarComponentTypes;
|
|
10
8
|
};
|
|
11
|
-
export declare const ListsIndentationHeroButton: ({ api,
|
|
9
|
+
export declare const ListsIndentationHeroButton: ({ api, parents }: ListsIndentationHeroButtonProps) => React.JSX.Element;
|
|
12
10
|
export {};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ToolbarButtonGroupLocation } from '@atlaskit/editor-toolbar';
|
|
4
3
|
import type { ToolbarListsIndentationPlugin } from '../../toolbarListsIndentationPluginType';
|
|
5
4
|
type ListsIndentationMenuProps = {
|
|
6
5
|
children: React.ReactNode;
|
|
7
6
|
api?: ExtractInjectionAPI<ToolbarListsIndentationPlugin>;
|
|
8
|
-
groupLocation?: ToolbarButtonGroupLocation;
|
|
9
7
|
allowHeadingAndParagraphIndentation: boolean;
|
|
10
8
|
};
|
|
11
|
-
export declare const ListsIndentationMenu: ({ children, api,
|
|
9
|
+
export declare const ListsIndentationMenu: ({ children, api, allowHeadingAndParagraphIndentation, }: ListsIndentationMenuProps) => React.JSX.Element;
|
|
12
10
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.2",
|
|
4
4
|
"description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"@atlaskit/editor-toolbar-model": "^0.1.0",
|
|
49
49
|
"@atlaskit/icon": "^27.12.0",
|
|
50
50
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
51
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
51
|
+
"@atlaskit/tmp-editor-statsig": "^9.29.0",
|
|
52
52
|
"@atlaskit/tokens": "^6.0.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^107.
|
|
56
|
+
"@atlaskit/editor-common": "^107.24.0",
|
|
57
57
|
"react": "^18.2.0",
|
|
58
58
|
"react-dom": "^18.2.0",
|
|
59
59
|
"react-intl-next": "npm:react-intl@^5.18.1"
|