@atlaskit/editor-toolbar 0.14.0 → 0.15.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 +18 -0
- package/dist/cjs/ui/Toolbar.js +3 -4
- package/dist/cjs/ui/ToolbarDropdownItem.js +1 -0
- package/dist/cjs/ui/ToolbarNestedDropdownMenu.js +4 -1
- package/dist/es2019/ui/Toolbar.js +3 -4
- package/dist/es2019/ui/ToolbarDropdownItem.js +1 -0
- package/dist/es2019/ui/ToolbarNestedDropdownMenu.js +3 -1
- package/dist/esm/ui/Toolbar.js +3 -4
- package/dist/esm/ui/ToolbarDropdownItem.js +1 -0
- package/dist/esm/ui/ToolbarNestedDropdownMenu.js +4 -1
- package/dist/types/ui/ToolbarNestedDropdownMenu.d.ts +2 -1
- package/dist/types-ts4.5/ui/ToolbarNestedDropdownMenu.d.ts +2 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`3e586d8ee0ce4`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3e586d8ee0ce4) -
|
|
8
|
+
Remove platform_editor_aifc_selection_toolbar_responsive exp and gate new logic in aiPlugin
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 0.14.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`d5cf7cd71a821`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d5cf7cd71a821) -
|
|
19
|
+
ED-29124: Fixed format neste menu on top of top toolbar
|
|
20
|
+
|
|
3
21
|
## 0.14.0
|
|
4
22
|
|
|
5
23
|
### Minor 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
|
});
|
|
@@ -29,8 +29,11 @@ var ToolbarNestedDropdownMenu = exports.ToolbarNestedDropdownMenu = function Too
|
|
|
29
29
|
dropdownTestId = _ref.dropdownTestId,
|
|
30
30
|
_ref$enableMaxHeight = _ref.enableMaxHeight,
|
|
31
31
|
enableMaxHeight = _ref$enableMaxHeight === void 0 ? false : _ref$enableMaxHeight,
|
|
32
|
-
_onClick = _ref.onClick
|
|
32
|
+
_onClick = _ref.onClick,
|
|
33
|
+
_ref$shouldFitContain = _ref.shouldFitContainer,
|
|
34
|
+
shouldFitContainer = _ref$shouldFitContain === void 0 ? false : _ref$shouldFitContain;
|
|
33
35
|
return /*#__PURE__*/React.createElement(_dropdownMenu.default, {
|
|
36
|
+
shouldFitContainer: shouldFitContainer,
|
|
34
37
|
placement: "right-start",
|
|
35
38
|
testId: dropdownTestId,
|
|
36
39
|
trigger: function trigger(triggerProps) {
|
|
@@ -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 = ({
|
|
@@ -19,9 +19,11 @@ export const ToolbarNestedDropdownMenu = ({
|
|
|
19
19
|
testId,
|
|
20
20
|
dropdownTestId,
|
|
21
21
|
enableMaxHeight = false,
|
|
22
|
-
onClick
|
|
22
|
+
onClick,
|
|
23
|
+
shouldFitContainer = false
|
|
23
24
|
}) => {
|
|
24
25
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
26
|
+
shouldFitContainer: shouldFitContainer,
|
|
25
27
|
placement: "right-start",
|
|
26
28
|
testId: dropdownTestId,
|
|
27
29
|
trigger: triggerProps => /*#__PURE__*/React.createElement(ToolbarDropdownItem, {
|
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
|
});
|
|
@@ -20,8 +20,11 @@ export var ToolbarNestedDropdownMenu = function ToolbarNestedDropdownMenu(_ref)
|
|
|
20
20
|
dropdownTestId = _ref.dropdownTestId,
|
|
21
21
|
_ref$enableMaxHeight = _ref.enableMaxHeight,
|
|
22
22
|
enableMaxHeight = _ref$enableMaxHeight === void 0 ? false : _ref$enableMaxHeight,
|
|
23
|
-
_onClick = _ref.onClick
|
|
23
|
+
_onClick = _ref.onClick,
|
|
24
|
+
_ref$shouldFitContain = _ref.shouldFitContainer,
|
|
25
|
+
shouldFitContainer = _ref$shouldFitContain === void 0 ? false : _ref$shouldFitContain;
|
|
24
26
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
27
|
+
shouldFitContainer: shouldFitContainer,
|
|
25
28
|
placement: "right-start",
|
|
26
29
|
testId: dropdownTestId,
|
|
27
30
|
trigger: function trigger(triggerProps) {
|
|
@@ -14,8 +14,9 @@ type ToolbarNestedDropdownMenuProps = {
|
|
|
14
14
|
enableMaxHeight?: boolean;
|
|
15
15
|
isDisabled?: boolean;
|
|
16
16
|
onClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
|
17
|
+
shouldFitContainer?: boolean;
|
|
17
18
|
testId?: string;
|
|
18
19
|
text?: string;
|
|
19
20
|
};
|
|
20
|
-
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, onClick, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
21
|
+
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, onClick, shouldFitContainer, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -14,8 +14,9 @@ type ToolbarNestedDropdownMenuProps = {
|
|
|
14
14
|
enableMaxHeight?: boolean;
|
|
15
15
|
isDisabled?: boolean;
|
|
16
16
|
onClick?: (e: React.MouseEvent | React.KeyboardEvent) => void;
|
|
17
|
+
shouldFitContainer?: boolean;
|
|
17
18
|
testId?: string;
|
|
18
19
|
text?: string;
|
|
19
20
|
};
|
|
20
|
-
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, onClick, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
21
|
+
export declare const ToolbarNestedDropdownMenu: ({ elemBefore, text, elemAfter, children, isDisabled, testId, dropdownTestId, enableMaxHeight, onClick, shouldFitContainer, }: ToolbarNestedDropdownMenuProps) => JSX.Element;
|
|
21
22
|
export {};
|
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.0",
|
|
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.
|
|
30
|
-
"@atlaskit/logo": "^19.
|
|
28
|
+
"@atlaskit/icon": "^28.5.0",
|
|
29
|
+
"@atlaskit/icon-lab": "^5.10.0",
|
|
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.8.0",
|
|
36
36
|
"@atlaskit/tokens": "^6.4.0",
|
|
37
37
|
"@atlaskit/tooltip": "^20.5.0",
|
|
38
38
|
"@babel/runtime": "^7.0.0",
|