@atlaskit/editor-plugin-selection-toolbar 2.3.0 → 3.0.0
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 +16 -0
- package/dist/cjs/ui/PrimaryToolbarComponent.compiled.css +4 -0
- package/dist/cjs/ui/PrimaryToolbarComponent.js +14 -18
- package/dist/cjs/ui/overflow-toolbar-config.js +12 -39
- package/dist/es2019/ui/PrimaryToolbarComponent.compiled.css +4 -0
- package/dist/es2019/ui/PrimaryToolbarComponent.js +10 -15
- package/dist/es2019/ui/overflow-toolbar-config.js +9 -38
- package/dist/esm/ui/PrimaryToolbarComponent.compiled.css +4 -0
- package/dist/esm/ui/PrimaryToolbarComponent.js +10 -15
- package/dist/esm/ui/overflow-toolbar-config.js +9 -38
- package/dist/types/ui/PrimaryToolbarComponent.d.ts +2 -2
- package/dist/types-ts4.5/ui/PrimaryToolbarComponent.d.ts +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-selection-toolbar
|
|
2
2
|
|
|
3
|
+
## 3.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#132776](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/132776)
|
|
8
|
+
[`555c2073facfe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/555c2073facfe) -
|
|
9
|
+
Upgrade to used compile css and remove dependency on emotion
|
|
10
|
+
|
|
11
|
+
## 2.3.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#131384](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/131384)
|
|
16
|
+
[`e3a1b4a5535aa`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e3a1b4a5535aa) -
|
|
17
|
+
[ux] ED-26882 remove mock extension toolbar items
|
|
18
|
+
|
|
3
19
|
## 2.3.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
+
/* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.PrimaryToolbarComponent = PrimaryToolbarComponent;
|
|
10
|
+
require("./PrimaryToolbarComponent.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _react = require("react");
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
11
15
|
var _keymaps = require("@atlaskit/editor-common/keymaps");
|
|
12
16
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
13
17
|
var _showMoreHorizontal = _interopRequireDefault(require("@atlaskit/icon/core/show-more-horizontal"));
|
|
14
18
|
var _overflowToolbarConfig = require("./overflow-toolbar-config");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* @jsx jsx
|
|
18
|
-
* @jsxFrag
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
22
|
-
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
21
|
var DROPDOWN_WIDTH = 240;
|
|
22
|
+
var buttonStyles = null;
|
|
24
23
|
function PrimaryToolbarComponent(_ref) {
|
|
25
24
|
var api = _ref.api,
|
|
26
25
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
@@ -44,7 +43,7 @@ function PrimaryToolbarComponent(_ref) {
|
|
|
44
43
|
var item = _ref2.item;
|
|
45
44
|
item === null || item === void 0 || (_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item);
|
|
46
45
|
}, []);
|
|
47
|
-
return
|
|
46
|
+
return /*#__PURE__*/React.createElement(_uiMenu.DropdownMenu, {
|
|
48
47
|
isOpen: isOpen,
|
|
49
48
|
onOpenChange: function onOpenChange(attrs) {
|
|
50
49
|
return setIsOpen(attrs.isOpen);
|
|
@@ -61,7 +60,7 @@ function PrimaryToolbarComponent(_ref) {
|
|
|
61
60
|
},
|
|
62
61
|
onItemActivated: onMenuItemActivated,
|
|
63
62
|
fitWidth: DROPDOWN_WIDTH
|
|
64
|
-
},
|
|
63
|
+
}, /*#__PURE__*/React.createElement(_uiMenu.ToolbarButton, {
|
|
65
64
|
onClick: onClick,
|
|
66
65
|
"aria-haspopup": "dialog",
|
|
67
66
|
"aria-keyshortcuts": (0, _keymaps.getAriaKeyshortcuts)(_keymaps.addLink),
|
|
@@ -69,11 +68,8 @@ function PrimaryToolbarComponent(_ref) {
|
|
|
69
68
|
title: content
|
|
70
69
|
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
71
70
|
,
|
|
72
|
-
|
|
73
|
-
},
|
|
71
|
+
className: (0, _runtime.ax)(["_ca0q12x7 _n3td12x7 _19bv12x7 _u5f312x7"])
|
|
72
|
+
}, /*#__PURE__*/React.createElement(_showMoreHorizontal.default, {
|
|
74
73
|
label: content
|
|
75
74
|
})));
|
|
76
|
-
}
|
|
77
|
-
var buttonStyles = (0, _react2.css)({
|
|
78
|
-
padding: "var(--ds-space-075, 6px)"
|
|
79
|
-
});
|
|
75
|
+
}
|
|
@@ -1,53 +1,26 @@
|
|
|
1
|
+
/* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.getOverflowPrimaryToolbarConfig = exports.getOverflowFloatingToolbarConfig = void 0;
|
|
8
|
-
var
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
9
12
|
var _dockToolbarTop = _interopRequireDefault(require("@atlaskit/icon-lab/core/dock-toolbar-top"));
|
|
10
13
|
var _minus = _interopRequireDefault(require("@atlaskit/icon/core/minus"));
|
|
11
14
|
var _checkMark = _interopRequireDefault(require("@atlaskit/icon/utility/check-mark"));
|
|
12
|
-
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/utility/migration/chevron-right"));
|
|
13
15
|
var _menu = require("@atlaskit/menu");
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @jsx jsx
|
|
17
|
-
* @jsxFrag
|
|
18
|
-
*/
|
|
19
|
-
// eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
20
|
-
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
18
|
// New editor controls
|
|
22
19
|
var getOverflowFloatingToolbarConfig = exports.getOverflowFloatingToolbarConfig = function getOverflowFloatingToolbarConfig(_ref) {
|
|
23
20
|
var api = _ref.api,
|
|
24
21
|
toolbarDocking = _ref.toolbarDocking;
|
|
25
|
-
var dropdownOptions = [{
|
|
26
|
-
title: 'Create Jira issue',
|
|
27
|
-
onClick: function onClick() {
|
|
28
|
-
return false;
|
|
29
|
-
},
|
|
30
|
-
elemAfter: (0, _react.jsx)(_chevronRight.default, {
|
|
31
|
-
spacing: "spacious",
|
|
32
|
-
label: ""
|
|
33
|
-
})
|
|
34
|
-
}, {
|
|
35
|
-
title: 'Define',
|
|
36
|
-
onClick: function onClick() {
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
}, {
|
|
40
|
-
title: 'Apps',
|
|
41
|
-
onClick: function onClick() {
|
|
42
|
-
return false;
|
|
43
|
-
},
|
|
44
|
-
elemAfter: (0, _react.jsx)(_chevronRight.default, {
|
|
45
|
-
spacing: "spacious",
|
|
46
|
-
label: ""
|
|
47
|
-
})
|
|
48
|
-
}];
|
|
49
22
|
var isDockedToTop = toolbarDocking === 'top';
|
|
50
|
-
dropdownOptions
|
|
23
|
+
var dropdownOptions = [{
|
|
51
24
|
type: 'overflow-dropdown-heading',
|
|
52
25
|
title: 'Toolbar appears'
|
|
53
26
|
}, {
|
|
@@ -60,7 +33,7 @@ var getOverflowFloatingToolbarConfig = exports.getOverflowFloatingToolbarConfig
|
|
|
60
33
|
label: 'Contextual toolbar'
|
|
61
34
|
}),
|
|
62
35
|
selected: !isDockedToTop,
|
|
63
|
-
elemAfter: !isDockedToTop ?
|
|
36
|
+
elemAfter: !isDockedToTop ? /*#__PURE__*/React.createElement(_checkMark.default, {
|
|
64
37
|
label: ""
|
|
65
38
|
}) : undefined
|
|
66
39
|
}, {
|
|
@@ -73,10 +46,10 @@ var getOverflowFloatingToolbarConfig = exports.getOverflowFloatingToolbarConfig
|
|
|
73
46
|
label: 'Fixed toolbar'
|
|
74
47
|
}),
|
|
75
48
|
selected: isDockedToTop,
|
|
76
|
-
elemAfter: isDockedToTop ?
|
|
49
|
+
elemAfter: isDockedToTop ? /*#__PURE__*/React.createElement(_checkMark.default, {
|
|
77
50
|
label: ""
|
|
78
51
|
}) : undefined
|
|
79
|
-
}
|
|
52
|
+
}];
|
|
80
53
|
return [{
|
|
81
54
|
type: 'separator',
|
|
82
55
|
fullHeight: true
|
|
@@ -90,7 +63,7 @@ var getOverflowPrimaryToolbarConfig = exports.getOverflowPrimaryToolbarConfig =
|
|
|
90
63
|
var api = _ref2.api;
|
|
91
64
|
return [{
|
|
92
65
|
items: [{
|
|
93
|
-
content:
|
|
66
|
+
content: /*#__PURE__*/React.createElement(_menu.HeadingItem, null, "Toolbar appears"),
|
|
94
67
|
value: {
|
|
95
68
|
name: ''
|
|
96
69
|
},
|
|
@@ -120,7 +93,7 @@ var getOverflowPrimaryToolbarConfig = exports.getOverflowPrimaryToolbarConfig =
|
|
|
120
93
|
elemBefore: (0, _dockToolbarTop.default)({
|
|
121
94
|
label: 'Fixed toolbar'
|
|
122
95
|
}),
|
|
123
|
-
elemAfter:
|
|
96
|
+
elemAfter: /*#__PURE__*/React.createElement(_checkMark.default, {
|
|
124
97
|
label: ""
|
|
125
98
|
})
|
|
126
99
|
}]
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
*/
|
|
1
|
+
/* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./PrimaryToolbarComponent.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
5
|
import { useCallback, useMemo, useState } from 'react';
|
|
7
|
-
import { css, jsx } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
8
|
-
|
|
9
6
|
import { addLink, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
10
7
|
import { ArrowKeyNavigationType, DropdownMenu, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
11
8
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
12
9
|
import { getOverflowPrimaryToolbarConfig } from './overflow-toolbar-config';
|
|
13
10
|
const DROPDOWN_WIDTH = 240;
|
|
11
|
+
const buttonStyles = null;
|
|
14
12
|
export function PrimaryToolbarComponent({
|
|
15
13
|
api,
|
|
16
14
|
popupsBoundariesElement,
|
|
@@ -31,7 +29,7 @@ export function PrimaryToolbarComponent({
|
|
|
31
29
|
var _item$onClick;
|
|
32
30
|
item === null || item === void 0 ? void 0 : (_item$onClick = item.onClick) === null || _item$onClick === void 0 ? void 0 : _item$onClick.call(item);
|
|
33
31
|
}, []);
|
|
34
|
-
return
|
|
32
|
+
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
35
33
|
isOpen: isOpen,
|
|
36
34
|
onOpenChange: attrs => setIsOpen(attrs.isOpen),
|
|
37
35
|
items: items,
|
|
@@ -46,7 +44,7 @@ export function PrimaryToolbarComponent({
|
|
|
46
44
|
},
|
|
47
45
|
onItemActivated: onMenuItemActivated,
|
|
48
46
|
fitWidth: DROPDOWN_WIDTH
|
|
49
|
-
},
|
|
47
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
50
48
|
onClick: onClick,
|
|
51
49
|
"aria-haspopup": "dialog",
|
|
52
50
|
"aria-keyshortcuts": getAriaKeyshortcuts(addLink),
|
|
@@ -54,11 +52,8 @@ export function PrimaryToolbarComponent({
|
|
|
54
52
|
title: content
|
|
55
53
|
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
56
54
|
,
|
|
57
|
-
|
|
58
|
-
},
|
|
55
|
+
className: ax(["_ca0q12x7 _n3td12x7 _19bv12x7 _u5f312x7"])
|
|
56
|
+
}, /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, {
|
|
59
57
|
label: content
|
|
60
58
|
})));
|
|
61
|
-
}
|
|
62
|
-
const buttonStyles = css({
|
|
63
|
-
padding: "var(--ds-space-075, 6px)"
|
|
64
|
-
});
|
|
59
|
+
}
|
|
@@ -1,46 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
* @jsxFrag
|
|
5
|
-
*/
|
|
6
|
-
import { jsx } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
7
|
-
|
|
1
|
+
/* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
4
|
import DockToolbarTopIcon from '@atlaskit/icon-lab/core/dock-toolbar-top';
|
|
9
5
|
import MinusIcon from '@atlaskit/icon/core/minus';
|
|
10
6
|
import CheckMarkIcon from '@atlaskit/icon/utility/check-mark';
|
|
11
|
-
import ChevronRightIcon from '@atlaskit/icon/utility/migration/chevron-right';
|
|
12
7
|
import { HeadingItem } from '@atlaskit/menu';
|
|
13
8
|
// New editor controls
|
|
14
9
|
export const getOverflowFloatingToolbarConfig = ({
|
|
15
10
|
api,
|
|
16
11
|
toolbarDocking
|
|
17
12
|
}) => {
|
|
18
|
-
const dropdownOptions = [{
|
|
19
|
-
title: 'Create Jira issue',
|
|
20
|
-
onClick: () => {
|
|
21
|
-
return false;
|
|
22
|
-
},
|
|
23
|
-
elemAfter: jsx(ChevronRightIcon, {
|
|
24
|
-
spacing: "spacious",
|
|
25
|
-
label: ""
|
|
26
|
-
})
|
|
27
|
-
}, {
|
|
28
|
-
title: 'Define',
|
|
29
|
-
onClick: () => {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
}, {
|
|
33
|
-
title: 'Apps',
|
|
34
|
-
onClick: () => {
|
|
35
|
-
return false;
|
|
36
|
-
},
|
|
37
|
-
elemAfter: jsx(ChevronRightIcon, {
|
|
38
|
-
spacing: "spacious",
|
|
39
|
-
label: ""
|
|
40
|
-
})
|
|
41
|
-
}];
|
|
42
13
|
const isDockedToTop = toolbarDocking === 'top';
|
|
43
|
-
dropdownOptions
|
|
14
|
+
const dropdownOptions = [{
|
|
44
15
|
type: 'overflow-dropdown-heading',
|
|
45
16
|
title: 'Toolbar appears'
|
|
46
17
|
}, {
|
|
@@ -53,7 +24,7 @@ export const getOverflowFloatingToolbarConfig = ({
|
|
|
53
24
|
label: 'Contextual toolbar'
|
|
54
25
|
}),
|
|
55
26
|
selected: !isDockedToTop,
|
|
56
|
-
elemAfter: !isDockedToTop ?
|
|
27
|
+
elemAfter: !isDockedToTop ? /*#__PURE__*/React.createElement(CheckMarkIcon, {
|
|
57
28
|
label: ""
|
|
58
29
|
}) : undefined
|
|
59
30
|
}, {
|
|
@@ -66,10 +37,10 @@ export const getOverflowFloatingToolbarConfig = ({
|
|
|
66
37
|
label: 'Fixed toolbar'
|
|
67
38
|
}),
|
|
68
39
|
selected: isDockedToTop,
|
|
69
|
-
elemAfter: isDockedToTop ?
|
|
40
|
+
elemAfter: isDockedToTop ? /*#__PURE__*/React.createElement(CheckMarkIcon, {
|
|
70
41
|
label: ""
|
|
71
42
|
}) : undefined
|
|
72
|
-
}
|
|
43
|
+
}];
|
|
73
44
|
return [{
|
|
74
45
|
type: 'separator',
|
|
75
46
|
fullHeight: true
|
|
@@ -83,7 +54,7 @@ export const getOverflowPrimaryToolbarConfig = ({
|
|
|
83
54
|
api
|
|
84
55
|
}) => [{
|
|
85
56
|
items: [{
|
|
86
|
-
content:
|
|
57
|
+
content: /*#__PURE__*/React.createElement(HeadingItem, null, "Toolbar appears"),
|
|
87
58
|
value: {
|
|
88
59
|
name: ''
|
|
89
60
|
},
|
|
@@ -113,7 +84,7 @@ export const getOverflowPrimaryToolbarConfig = ({
|
|
|
113
84
|
elemBefore: DockToolbarTopIcon({
|
|
114
85
|
label: 'Fixed toolbar'
|
|
115
86
|
}),
|
|
116
|
-
elemAfter:
|
|
87
|
+
elemAfter: /*#__PURE__*/React.createElement(CheckMarkIcon, {
|
|
117
88
|
label: ""
|
|
118
89
|
})
|
|
119
90
|
}]
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
+
/* PrimaryToolbarComponent.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
* @jsxFrag
|
|
6
|
-
*/
|
|
3
|
+
import "./PrimaryToolbarComponent.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
7
6
|
import { useCallback, useMemo, useState } from 'react';
|
|
8
|
-
import { css, jsx } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
-
|
|
10
7
|
import { addLink, getAriaKeyshortcuts } from '@atlaskit/editor-common/keymaps';
|
|
11
8
|
import { ArrowKeyNavigationType, DropdownMenu, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
12
9
|
import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
|
|
13
10
|
import { getOverflowPrimaryToolbarConfig } from './overflow-toolbar-config';
|
|
14
11
|
var DROPDOWN_WIDTH = 240;
|
|
12
|
+
var buttonStyles = null;
|
|
15
13
|
export function PrimaryToolbarComponent(_ref) {
|
|
16
14
|
var api = _ref.api,
|
|
17
15
|
popupsBoundariesElement = _ref.popupsBoundariesElement,
|
|
@@ -35,7 +33,7 @@ export function PrimaryToolbarComponent(_ref) {
|
|
|
35
33
|
var item = _ref2.item;
|
|
36
34
|
item === null || item === void 0 || (_item$onClick = item.onClick) === null || _item$onClick === void 0 || _item$onClick.call(item);
|
|
37
35
|
}, []);
|
|
38
|
-
return
|
|
36
|
+
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
39
37
|
isOpen: isOpen,
|
|
40
38
|
onOpenChange: function onOpenChange(attrs) {
|
|
41
39
|
return setIsOpen(attrs.isOpen);
|
|
@@ -52,7 +50,7 @@ export function PrimaryToolbarComponent(_ref) {
|
|
|
52
50
|
},
|
|
53
51
|
onItemActivated: onMenuItemActivated,
|
|
54
52
|
fitWidth: DROPDOWN_WIDTH
|
|
55
|
-
},
|
|
53
|
+
}, /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
56
54
|
onClick: onClick,
|
|
57
55
|
"aria-haspopup": "dialog",
|
|
58
56
|
"aria-keyshortcuts": getAriaKeyshortcuts(addLink),
|
|
@@ -60,11 +58,8 @@ export function PrimaryToolbarComponent(_ref) {
|
|
|
60
58
|
title: content
|
|
61
59
|
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
|
|
62
60
|
,
|
|
63
|
-
|
|
64
|
-
},
|
|
61
|
+
className: ax(["_ca0q12x7 _n3td12x7 _19bv12x7 _u5f312x7"])
|
|
62
|
+
}, /*#__PURE__*/React.createElement(ShowMoreHorizontalIcon, {
|
|
65
63
|
label: content
|
|
66
64
|
})));
|
|
67
|
-
}
|
|
68
|
-
var buttonStyles = css({
|
|
69
|
-
padding: "var(--ds-space-075, 6px)"
|
|
70
|
-
});
|
|
65
|
+
}
|
|
@@ -1,45 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
* @jsxFrag
|
|
5
|
-
*/
|
|
6
|
-
import { jsx } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
7
|
-
|
|
1
|
+
/* overflow-toolbar-config.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
4
|
import DockToolbarTopIcon from '@atlaskit/icon-lab/core/dock-toolbar-top';
|
|
9
5
|
import MinusIcon from '@atlaskit/icon/core/minus';
|
|
10
6
|
import CheckMarkIcon from '@atlaskit/icon/utility/check-mark';
|
|
11
|
-
import ChevronRightIcon from '@atlaskit/icon/utility/migration/chevron-right';
|
|
12
7
|
import { HeadingItem } from '@atlaskit/menu';
|
|
13
8
|
// New editor controls
|
|
14
9
|
export var getOverflowFloatingToolbarConfig = function getOverflowFloatingToolbarConfig(_ref) {
|
|
15
10
|
var api = _ref.api,
|
|
16
11
|
toolbarDocking = _ref.toolbarDocking;
|
|
17
|
-
var dropdownOptions = [{
|
|
18
|
-
title: 'Create Jira issue',
|
|
19
|
-
onClick: function onClick() {
|
|
20
|
-
return false;
|
|
21
|
-
},
|
|
22
|
-
elemAfter: jsx(ChevronRightIcon, {
|
|
23
|
-
spacing: "spacious",
|
|
24
|
-
label: ""
|
|
25
|
-
})
|
|
26
|
-
}, {
|
|
27
|
-
title: 'Define',
|
|
28
|
-
onClick: function onClick() {
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
}, {
|
|
32
|
-
title: 'Apps',
|
|
33
|
-
onClick: function onClick() {
|
|
34
|
-
return false;
|
|
35
|
-
},
|
|
36
|
-
elemAfter: jsx(ChevronRightIcon, {
|
|
37
|
-
spacing: "spacious",
|
|
38
|
-
label: ""
|
|
39
|
-
})
|
|
40
|
-
}];
|
|
41
12
|
var isDockedToTop = toolbarDocking === 'top';
|
|
42
|
-
dropdownOptions
|
|
13
|
+
var dropdownOptions = [{
|
|
43
14
|
type: 'overflow-dropdown-heading',
|
|
44
15
|
title: 'Toolbar appears'
|
|
45
16
|
}, {
|
|
@@ -52,7 +23,7 @@ export var getOverflowFloatingToolbarConfig = function getOverflowFloatingToolba
|
|
|
52
23
|
label: 'Contextual toolbar'
|
|
53
24
|
}),
|
|
54
25
|
selected: !isDockedToTop,
|
|
55
|
-
elemAfter: !isDockedToTop ?
|
|
26
|
+
elemAfter: !isDockedToTop ? /*#__PURE__*/React.createElement(CheckMarkIcon, {
|
|
56
27
|
label: ""
|
|
57
28
|
}) : undefined
|
|
58
29
|
}, {
|
|
@@ -65,10 +36,10 @@ export var getOverflowFloatingToolbarConfig = function getOverflowFloatingToolba
|
|
|
65
36
|
label: 'Fixed toolbar'
|
|
66
37
|
}),
|
|
67
38
|
selected: isDockedToTop,
|
|
68
|
-
elemAfter: isDockedToTop ?
|
|
39
|
+
elemAfter: isDockedToTop ? /*#__PURE__*/React.createElement(CheckMarkIcon, {
|
|
69
40
|
label: ""
|
|
70
41
|
}) : undefined
|
|
71
|
-
}
|
|
42
|
+
}];
|
|
72
43
|
return [{
|
|
73
44
|
type: 'separator',
|
|
74
45
|
fullHeight: true
|
|
@@ -82,7 +53,7 @@ export var getOverflowPrimaryToolbarConfig = function getOverflowPrimaryToolbarC
|
|
|
82
53
|
var api = _ref2.api;
|
|
83
54
|
return [{
|
|
84
55
|
items: [{
|
|
85
|
-
content:
|
|
56
|
+
content: /*#__PURE__*/React.createElement(HeadingItem, null, "Toolbar appears"),
|
|
86
57
|
value: {
|
|
87
58
|
name: ''
|
|
88
59
|
},
|
|
@@ -112,7 +83,7 @@ export var getOverflowPrimaryToolbarConfig = function getOverflowPrimaryToolbarC
|
|
|
112
83
|
elemBefore: DockToolbarTopIcon({
|
|
113
84
|
label: 'Fixed toolbar'
|
|
114
85
|
}),
|
|
115
|
-
elemAfter:
|
|
86
|
+
elemAfter: /*#__PURE__*/React.createElement(CheckMarkIcon, {
|
|
116
87
|
label: ""
|
|
117
88
|
})
|
|
118
89
|
}]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
|
|
4
4
|
type Props = {
|
|
@@ -7,5 +7,5 @@ type Props = {
|
|
|
7
7
|
popupsMountPoint?: HTMLElement;
|
|
8
8
|
popupsScrollableElement?: HTMLElement;
|
|
9
9
|
};
|
|
10
|
-
export declare function PrimaryToolbarComponent({ api, popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, }: Props):
|
|
10
|
+
export declare function PrimaryToolbarComponent({ api, popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, }: Props): JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { SelectionToolbarPlugin } from '../selectionToolbarPluginType';
|
|
4
4
|
type Props = {
|
|
@@ -7,5 +7,5 @@ type Props = {
|
|
|
7
7
|
popupsMountPoint?: HTMLElement;
|
|
8
8
|
popupsScrollableElement?: HTMLElement;
|
|
9
9
|
};
|
|
10
|
-
export declare function PrimaryToolbarComponent({ api, popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, }: Props):
|
|
10
|
+
export declare function PrimaryToolbarComponent({ api, popupsBoundariesElement, popupsMountPoint, popupsScrollableElement, }: Props): JSX.Element;
|
|
11
11
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-selection-toolbar",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "@atlaskit/editor-plugin-selection-toolbar for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
".": "./src/index.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
+
"@atlaskit/css": "^0.10.0",
|
|
36
37
|
"@atlaskit/editor-common": "^102.13.0",
|
|
37
38
|
"@atlaskit/editor-plugin-editor-viewmode": "^3.0.0",
|
|
38
39
|
"@atlaskit/editor-plugin-primary-toolbar": "^3.1.0",
|
|
39
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
40
|
-
"@atlaskit/icon": "^25.
|
|
41
|
-
"@atlaskit/icon-lab": "^4.
|
|
41
|
+
"@atlaskit/icon": "^25.2.0",
|
|
42
|
+
"@atlaskit/icon-lab": "^4.5.0",
|
|
42
43
|
"@atlaskit/menu": "^3.1.0",
|
|
43
44
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
|
-
"@atlaskit/tmp-editor-statsig": "^4.
|
|
45
|
+
"@atlaskit/tmp-editor-statsig": "^4.4.0",
|
|
45
46
|
"@atlaskit/tokens": "^4.5.0",
|
|
46
47
|
"@babel/runtime": "^7.0.0",
|
|
47
|
-
"@emotion/react": "^11.7.1",
|
|
48
48
|
"bind-event-listener": "^3.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|