@atlaskit/editor-plugin-floating-toolbar 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
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-floating-toolbar
|
|
2
2
|
|
|
3
|
+
## 4.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#170385](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/170385)
|
|
8
|
+
[`f7c9e4e0133f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f7c9e4e0133f0) -
|
|
9
|
+
[ux] ED-27236: Added separator in the table overflow dropdown
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 4.2.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -9,6 +9,7 @@ var _react2 = require("@emotion/react");
|
|
|
9
9
|
var _reactIntlNext = require("react-intl-next");
|
|
10
10
|
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
11
11
|
var _menu = require("@atlaskit/menu");
|
|
12
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
13
|
var _constants = require("@atlaskit/theme/constants");
|
|
13
14
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
15
|
/**
|
|
@@ -30,6 +31,10 @@ var separatorStyles = (0, _react2.css)({
|
|
|
30
31
|
background: "var(--ds-border, #091E4224)",
|
|
31
32
|
height: "var(--ds-space-025, 1px)"
|
|
32
33
|
});
|
|
34
|
+
var separatorStylesThin = (0, _react2.css)({
|
|
35
|
+
background: "var(--ds-border, #091E4224)",
|
|
36
|
+
height: '1px'
|
|
37
|
+
});
|
|
33
38
|
var headingStyles = (0, _react2.css)({
|
|
34
39
|
padding: "var(--ds-space-200, 16px)".concat(" 0 ", "var(--ds-space-100, 8px)")
|
|
35
40
|
});
|
|
@@ -69,7 +74,7 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
69
74
|
css: menuContainerStyles,
|
|
70
75
|
role: "menu"
|
|
71
76
|
}, items.filter(function (item) {
|
|
72
|
-
return !('hidden' in item) || !item.hidden;
|
|
77
|
+
return item && (!('hidden' in item) || !item.hidden);
|
|
73
78
|
}).map(function (item, idx) {
|
|
74
79
|
if (!('type' in item)) {
|
|
75
80
|
return (0, _react2.jsx)(_floatingToolbar.DropdownMenuItem
|
|
@@ -86,10 +91,10 @@ var Dropdown = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
|
86
91
|
});
|
|
87
92
|
}
|
|
88
93
|
if (item.type === 'separator') {
|
|
89
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
90
94
|
return (0, _react2.jsx)("div", {
|
|
95
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
91
96
|
key: idx,
|
|
92
|
-
css: separatorStyles
|
|
97
|
+
css: (0, _platformFeatureFlags.fg)('platform_editor_controls_patch_13') ? separatorStylesThin : separatorStyles
|
|
93
98
|
});
|
|
94
99
|
}
|
|
95
100
|
if (item.type === 'overflow-dropdown-heading') {
|
|
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { DropdownMenuItem } from '@atlaskit/editor-common/floating-toolbar';
|
|
13
13
|
import { HeadingItem } from '@atlaskit/menu';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
15
16
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
16
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -22,6 +23,10 @@ const separatorStyles = css({
|
|
|
22
23
|
background: "var(--ds-border, #091E4224)",
|
|
23
24
|
height: "var(--ds-space-025, 1px)"
|
|
24
25
|
});
|
|
26
|
+
const separatorStylesThin = css({
|
|
27
|
+
background: "var(--ds-border, #091E4224)",
|
|
28
|
+
height: '1px'
|
|
29
|
+
});
|
|
25
30
|
const headingStyles = css({
|
|
26
31
|
padding: `${"var(--ds-space-200, 16px)"} 0 ${"var(--ds-space-100, 8px)"}`
|
|
27
32
|
});
|
|
@@ -61,7 +66,7 @@ const Dropdown = /*#__PURE__*/memo(props => {
|
|
|
61
66
|
return jsx("div", {
|
|
62
67
|
css: menuContainerStyles,
|
|
63
68
|
role: "menu"
|
|
64
|
-
}, items.filter(item => !('hidden' in item) || !item.hidden).map((item, idx) => {
|
|
69
|
+
}, items.filter(item => item && (!('hidden' in item) || !item.hidden)).map((item, idx) => {
|
|
65
70
|
if (!('type' in item)) {
|
|
66
71
|
return jsx(DropdownMenuItem
|
|
67
72
|
// Ignored via go/ees005
|
|
@@ -77,10 +82,10 @@ const Dropdown = /*#__PURE__*/memo(props => {
|
|
|
77
82
|
});
|
|
78
83
|
}
|
|
79
84
|
if (item.type === 'separator') {
|
|
80
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
81
85
|
return jsx("div", {
|
|
86
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
82
87
|
key: idx,
|
|
83
|
-
css: separatorStyles
|
|
88
|
+
css: fg('platform_editor_controls_patch_13') ? separatorStylesThin : separatorStyles
|
|
84
89
|
});
|
|
85
90
|
}
|
|
86
91
|
if (item.type === 'overflow-dropdown-heading') {
|
|
@@ -11,6 +11,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { DropdownMenuItem } from '@atlaskit/editor-common/floating-toolbar';
|
|
13
13
|
import { HeadingItem } from '@atlaskit/menu';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
15
|
// eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
|
|
15
16
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
16
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -22,6 +23,10 @@ var separatorStyles = css({
|
|
|
22
23
|
background: "var(--ds-border, #091E4224)",
|
|
23
24
|
height: "var(--ds-space-025, 1px)"
|
|
24
25
|
});
|
|
26
|
+
var separatorStylesThin = css({
|
|
27
|
+
background: "var(--ds-border, #091E4224)",
|
|
28
|
+
height: '1px'
|
|
29
|
+
});
|
|
25
30
|
var headingStyles = css({
|
|
26
31
|
padding: "var(--ds-space-200, 16px)".concat(" 0 ", "var(--ds-space-100, 8px)")
|
|
27
32
|
});
|
|
@@ -61,7 +66,7 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
|
|
|
61
66
|
css: menuContainerStyles,
|
|
62
67
|
role: "menu"
|
|
63
68
|
}, items.filter(function (item) {
|
|
64
|
-
return !('hidden' in item) || !item.hidden;
|
|
69
|
+
return item && (!('hidden' in item) || !item.hidden);
|
|
65
70
|
}).map(function (item, idx) {
|
|
66
71
|
if (!('type' in item)) {
|
|
67
72
|
return jsx(DropdownMenuItem
|
|
@@ -78,10 +83,10 @@ var Dropdown = /*#__PURE__*/memo(function (props) {
|
|
|
78
83
|
});
|
|
79
84
|
}
|
|
80
85
|
if (item.type === 'separator') {
|
|
81
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
82
86
|
return jsx("div", {
|
|
87
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
83
88
|
key: idx,
|
|
84
|
-
css: separatorStyles
|
|
89
|
+
css: fg('platform_editor_controls_patch_13') ? separatorStylesThin : separatorStyles
|
|
85
90
|
});
|
|
86
91
|
}
|
|
87
92
|
if (item.type === 'overflow-dropdown-heading') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-floating-toolbar",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.2",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -143,6 +143,9 @@
|
|
|
143
143
|
"platform_editor_controls_patch_6": {
|
|
144
144
|
"type": "boolean"
|
|
145
145
|
},
|
|
146
|
+
"platform_editor_controls_patch_13": {
|
|
147
|
+
"type": "boolean"
|
|
148
|
+
},
|
|
146
149
|
"platform_editor_controls_patch_8": {
|
|
147
150
|
"type": "boolean"
|
|
148
151
|
},
|