@atlaskit/editor-toolbar 0.14.1 → 0.15.1
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 +18 -0
- package/dist/cjs/ui/Toolbar.js +3 -4
- package/dist/cjs/ui/ToolbarDropdownItem.js +1 -0
- package/dist/cjs/ui/ToolbarSection.js +2 -9
- package/dist/es2019/ui/Toolbar.js +3 -4
- package/dist/es2019/ui/ToolbarDropdownItem.js +1 -0
- package/dist/es2019/ui/ToolbarSection.js +2 -9
- package/dist/esm/ui/Toolbar.js +3 -4
- package/dist/esm/ui/ToolbarDropdownItem.js +1 -0
- package/dist/esm/ui/ToolbarSection.js +2 -9
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.15.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`ef423682519f4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ef423682519f4) -
|
|
8
|
+
EDITOR-2263 Adds a Rovo button to the main toolbar for AIFC
|
|
9
|
+
|
|
10
|
+
## 0.15.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`3e586d8ee0ce4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3e586d8ee0ce4) -
|
|
15
|
+
Remove platform_editor_aifc_selection_toolbar_responsive exp and gate new logic in aiPlugin
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 0.14.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/dist/cjs/ui/Toolbar.js
CHANGED
|
@@ -37,9 +37,9 @@ var Toolbar = exports.Toolbar = function Toolbar(_ref) {
|
|
|
37
37
|
label = _ref.label,
|
|
38
38
|
actionSubjectId = _ref.actionSubjectId,
|
|
39
39
|
testId = _ref.testId;
|
|
40
|
-
var isResponsiveEnabled = (0, _expValEquals.expValEquals)('
|
|
40
|
+
var isResponsiveEnabled = (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_responsive', 'isEnabled', true);
|
|
41
41
|
var toolbar = /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
42
|
-
xcss: (0, _css.cx)(styles.toolbarBase, styles.toolbar, isResponsiveEnabled && styles.toolbarResponsive,
|
|
42
|
+
xcss: (0, _css.cx)(styles.toolbarBase, styles.toolbar, isResponsiveEnabled && styles.toolbarResponsive, isResponsiveEnabled && styles.hiddenSelectors, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) && styles.toolbarSeparator, (0, _expValEquals.expValEquals)('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) && styles.hiddenSelectorsPatch),
|
|
43
43
|
role: "toolbar",
|
|
44
44
|
"aria-label": label,
|
|
45
45
|
testId: testId,
|
|
@@ -71,9 +71,8 @@ var Toolbar = exports.Toolbar = function Toolbar(_ref) {
|
|
|
71
71
|
}
|
|
72
72
|
if (isResponsiveEnabled) {
|
|
73
73
|
return /*#__PURE__*/_react.default.createElement(_ResponsiveContainer.ResponsiveWrapper, null, wrappedToolbar);
|
|
74
|
-
} else {
|
|
75
|
-
return wrappedToolbar;
|
|
76
74
|
}
|
|
75
|
+
return wrappedToolbar;
|
|
77
76
|
};
|
|
78
77
|
/**
|
|
79
78
|
* A simple component representing a toolbar without box shadows - used to represent a primary toolbar
|
|
@@ -44,6 +44,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
44
44
|
"aria-pressed": ariaPressed,
|
|
45
45
|
"aria-disabled": ariaDisabled,
|
|
46
46
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
47
|
+
"data-toolbar-component": (0, _expValEquals.expValEquals)('platform_synced_block', 'isEnabled', true) ? 'menu-item' : undefined,
|
|
47
48
|
ref: ref
|
|
48
49
|
}, children);
|
|
49
50
|
});
|
|
@@ -11,7 +11,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _runtime = require("@compiled/react/runtime");
|
|
12
12
|
var _css = require("@atlaskit/css");
|
|
13
13
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
14
|
-
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
14
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
15
|
var SeparatorPosition = exports.SeparatorPosition = /*#__PURE__*/function (SeparatorPosition) {
|
|
17
16
|
SeparatorPosition["START"] = "start";
|
|
@@ -34,15 +33,9 @@ var ToolbarSection = exports.ToolbarSection = function ToolbarSection(_ref) {
|
|
|
34
33
|
var children = _ref.children,
|
|
35
34
|
testId = _ref.testId,
|
|
36
35
|
hasSeparator = _ref.hasSeparator;
|
|
37
|
-
return
|
|
36
|
+
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
38
37
|
xcss: (0, _css.cx)(styles.container),
|
|
39
38
|
testId: testId,
|
|
40
39
|
"data-toolbar-component": "section"
|
|
41
|
-
}, hasSeparator === SeparatorPosition.START && /*#__PURE__*/React.createElement(ToolbarSeparator, null), children, hasSeparator === SeparatorPosition.END && /*#__PURE__*/React.createElement(ToolbarSeparator, null))
|
|
42
|
-
xcss: (0, _css.cx)(styles.container),
|
|
43
|
-
testId: testId,
|
|
44
|
-
"data-toolbar-component": "section"
|
|
45
|
-
}, hasSeparator && /*#__PURE__*/React.createElement("div", {
|
|
46
|
-
className: (0, _runtime.ax)(["_195gu2gc _4t3igktf _1bsbt94y _bfhkmuej"])
|
|
47
|
-
}), children);
|
|
40
|
+
}, hasSeparator === SeparatorPosition.START && /*#__PURE__*/React.createElement(ToolbarSeparator, null), children, hasSeparator === SeparatorPosition.END && /*#__PURE__*/React.createElement(ToolbarSeparator, null));
|
|
48
41
|
};
|
|
@@ -31,9 +31,9 @@ export const Toolbar = ({
|
|
|
31
31
|
actionSubjectId,
|
|
32
32
|
testId
|
|
33
33
|
}) => {
|
|
34
|
-
const isResponsiveEnabled = expValEquals('
|
|
34
|
+
const isResponsiveEnabled = expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true);
|
|
35
35
|
const toolbar = /*#__PURE__*/React.createElement(Box, {
|
|
36
|
-
xcss: cx(styles.toolbarBase, styles.toolbar, isResponsiveEnabled && styles.toolbarResponsive,
|
|
36
|
+
xcss: cx(styles.toolbarBase, styles.toolbar, isResponsiveEnabled && styles.toolbarResponsive, isResponsiveEnabled && styles.hiddenSelectors, expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) && styles.toolbarSeparator, expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) && styles.hiddenSelectorsPatch),
|
|
37
37
|
role: "toolbar",
|
|
38
38
|
"aria-label": label,
|
|
39
39
|
testId: testId,
|
|
@@ -68,9 +68,8 @@ export const Toolbar = ({
|
|
|
68
68
|
}
|
|
69
69
|
if (isResponsiveEnabled) {
|
|
70
70
|
return /*#__PURE__*/React.createElement(ResponsiveWrapper, null, wrappedToolbar);
|
|
71
|
-
} else {
|
|
72
|
-
return wrappedToolbar;
|
|
73
71
|
}
|
|
72
|
+
return wrappedToolbar;
|
|
74
73
|
};
|
|
75
74
|
/**
|
|
76
75
|
* A simple component representing a toolbar without box shadows - used to represent a primary toolbar
|
|
@@ -32,6 +32,7 @@ const CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(({
|
|
|
32
32
|
"aria-pressed": ariaPressed,
|
|
33
33
|
"aria-disabled": ariaDisabled,
|
|
34
34
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
35
|
+
"data-toolbar-component": expValEquals('platform_synced_block', 'isEnabled', true) ? 'menu-item' : undefined,
|
|
35
36
|
ref: ref
|
|
36
37
|
}, children));
|
|
37
38
|
export const ToolbarDropdownItem = ({
|
|
@@ -4,7 +4,6 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { cx } from '@atlaskit/css';
|
|
6
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
export let SeparatorPosition = /*#__PURE__*/function (SeparatorPosition) {
|
|
9
8
|
SeparatorPosition["START"] = "start";
|
|
10
9
|
SeparatorPosition["END"] = "end";
|
|
@@ -27,15 +26,9 @@ export const ToolbarSection = ({
|
|
|
27
26
|
testId,
|
|
28
27
|
hasSeparator
|
|
29
28
|
}) => {
|
|
30
|
-
return
|
|
29
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
31
30
|
xcss: cx(styles.container),
|
|
32
31
|
testId: testId,
|
|
33
32
|
"data-toolbar-component": "section"
|
|
34
|
-
}, hasSeparator === SeparatorPosition.START && /*#__PURE__*/React.createElement(ToolbarSeparator, null), children, hasSeparator === SeparatorPosition.END && /*#__PURE__*/React.createElement(ToolbarSeparator, null))
|
|
35
|
-
xcss: cx(styles.container),
|
|
36
|
-
testId: testId,
|
|
37
|
-
"data-toolbar-component": "section"
|
|
38
|
-
}, hasSeparator && /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className: ax(["_195gu2gc _4t3igktf _1bsbt94y _bfhkmuej"])
|
|
40
|
-
}), children);
|
|
33
|
+
}, hasSeparator === SeparatorPosition.START && /*#__PURE__*/React.createElement(ToolbarSeparator, null), children, hasSeparator === SeparatorPosition.END && /*#__PURE__*/React.createElement(ToolbarSeparator, null));
|
|
41
34
|
};
|
package/dist/esm/ui/Toolbar.js
CHANGED
|
@@ -30,9 +30,9 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
30
30
|
label = _ref.label,
|
|
31
31
|
actionSubjectId = _ref.actionSubjectId,
|
|
32
32
|
testId = _ref.testId;
|
|
33
|
-
var isResponsiveEnabled = expValEquals('
|
|
33
|
+
var isResponsiveEnabled = expValEquals('platform_editor_toolbar_aifc_responsive', 'isEnabled', true);
|
|
34
34
|
var toolbar = /*#__PURE__*/React.createElement(Box, {
|
|
35
|
-
xcss: cx(styles.toolbarBase, styles.toolbar, isResponsiveEnabled && styles.toolbarResponsive,
|
|
35
|
+
xcss: cx(styles.toolbarBase, styles.toolbar, isResponsiveEnabled && styles.toolbarResponsive, isResponsiveEnabled && styles.hiddenSelectors, expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) && styles.toolbarSeparator, expValEquals('platform_editor_toolbar_aifc_patch_6', 'isEnabled', true) && styles.hiddenSelectorsPatch),
|
|
36
36
|
role: "toolbar",
|
|
37
37
|
"aria-label": label,
|
|
38
38
|
testId: testId,
|
|
@@ -64,9 +64,8 @@ export var Toolbar = function Toolbar(_ref) {
|
|
|
64
64
|
}
|
|
65
65
|
if (isResponsiveEnabled) {
|
|
66
66
|
return /*#__PURE__*/React.createElement(ResponsiveWrapper, null, wrappedToolbar);
|
|
67
|
-
} else {
|
|
68
|
-
return wrappedToolbar;
|
|
69
67
|
}
|
|
68
|
+
return wrappedToolbar;
|
|
70
69
|
};
|
|
71
70
|
/**
|
|
72
71
|
* A simple component representing a toolbar without box shadows - used to represent a primary toolbar
|
|
@@ -35,6 +35,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
35
35
|
"aria-pressed": ariaPressed,
|
|
36
36
|
"aria-disabled": ariaDisabled,
|
|
37
37
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
38
|
+
"data-toolbar-component": expValEquals('platform_synced_block', 'isEnabled', true) ? 'menu-item' : undefined,
|
|
38
39
|
ref: ref
|
|
39
40
|
}, children);
|
|
40
41
|
});
|
|
@@ -4,7 +4,6 @@ import * as React from 'react';
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { cx } from '@atlaskit/css';
|
|
6
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
7
|
export var SeparatorPosition = /*#__PURE__*/function (SeparatorPosition) {
|
|
9
8
|
SeparatorPosition["START"] = "start";
|
|
10
9
|
SeparatorPosition["END"] = "end";
|
|
@@ -26,15 +25,9 @@ export var ToolbarSection = function ToolbarSection(_ref) {
|
|
|
26
25
|
var children = _ref.children,
|
|
27
26
|
testId = _ref.testId,
|
|
28
27
|
hasSeparator = _ref.hasSeparator;
|
|
29
|
-
return
|
|
28
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
30
29
|
xcss: cx(styles.container),
|
|
31
30
|
testId: testId,
|
|
32
31
|
"data-toolbar-component": "section"
|
|
33
|
-
}, hasSeparator === SeparatorPosition.START && /*#__PURE__*/React.createElement(ToolbarSeparator, null), children, hasSeparator === SeparatorPosition.END && /*#__PURE__*/React.createElement(ToolbarSeparator, null))
|
|
34
|
-
xcss: cx(styles.container),
|
|
35
|
-
testId: testId,
|
|
36
|
-
"data-toolbar-component": "section"
|
|
37
|
-
}, hasSeparator && /*#__PURE__*/React.createElement("div", {
|
|
38
|
-
className: ax(["_195gu2gc _4t3igktf _1bsbt94y _bfhkmuej"])
|
|
39
|
-
}), children);
|
|
32
|
+
}, hasSeparator === SeparatorPosition.START && /*#__PURE__*/React.createElement(ToolbarSeparator, null), children, hasSeparator === SeparatorPosition.END && /*#__PURE__*/React.createElement(ToolbarSeparator, null));
|
|
40
33
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.15.1",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"team": "Editor: Jenga",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"@atlaskit/button": "^23.5.0",
|
|
26
26
|
"@atlaskit/css": "^0.14.0",
|
|
27
27
|
"@atlaskit/dropdown-menu": "^16.3.0",
|
|
28
|
-
"@atlaskit/icon": "^28.
|
|
29
|
-
"@atlaskit/icon-lab": "^5.
|
|
28
|
+
"@atlaskit/icon": "^28.5.0",
|
|
29
|
+
"@atlaskit/icon-lab": "^5.10.0",
|
|
30
30
|
"@atlaskit/logo": "^19.9.0",
|
|
31
31
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
32
32
|
"@atlaskit/platform-feature-flags-react": "^0.3.0",
|
|
33
33
|
"@atlaskit/popup": "^4.4.0",
|
|
34
34
|
"@atlaskit/primitives": "^14.15.0",
|
|
35
|
-
"@atlaskit/tmp-editor-statsig": "^13.
|
|
35
|
+
"@atlaskit/tmp-editor-statsig": "^13.10.0",
|
|
36
36
|
"@atlaskit/tokens": "^6.4.0",
|
|
37
37
|
"@atlaskit/tooltip": "^20.5.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|