@atlaskit/editor-toolbar 0.17.12 → 0.18.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 +20 -0
- package/dist/cjs/ui/ToolbarDropdownItem.js +2 -1
- package/dist/cjs/ui/ToolbarTooltip.js +3 -1
- package/dist/es2019/ui/ToolbarDropdownItem.js +2 -1
- package/dist/es2019/ui/ToolbarTooltip.js +3 -1
- package/dist/esm/ui/ToolbarDropdownItem.js +2 -1
- package/dist/esm/ui/ToolbarTooltip.js +3 -1
- package/dist/types/ui/ToolbarTooltip.d.ts +2 -1
- package/dist/types-ts4.5/ui/ToolbarTooltip.d.ts +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`6d7eaf7a84ff3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6d7eaf7a84ff3) -
|
|
8
|
+
ToolbarTooltip now supports displaying shortcuts in the tooltip, through the new shortcut prop. It
|
|
9
|
+
is passed through to the Tooltip's shortcut prop.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 0.17.13
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`41a91a916c125`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/41a91a916c125) -
|
|
20
|
+
EDITOR-2846 Change platform_synced_block to use editorExperiment and add Jira experiment
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 0.17.12
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -15,6 +15,7 @@ var _css = require("@atlaskit/css");
|
|
|
15
15
|
var _dropdownMenu = require("@atlaskit/dropdown-menu");
|
|
16
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
17
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
18
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
19
|
var _ToolbarDropdownMenuContext = require("./ToolbarDropdownMenuContext");
|
|
19
20
|
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); }
|
|
20
21
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -44,7 +45,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
44
45
|
"aria-pressed": ariaPressed,
|
|
45
46
|
"aria-disabled": ariaDisabled,
|
|
46
47
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
47
|
-
"data-toolbar-component": (0,
|
|
48
|
+
"data-toolbar-component": (0, _experiments.editorExperiment)('platform_synced_block', true) ? 'menu-item' : undefined,
|
|
48
49
|
ref: ref
|
|
49
50
|
}, children);
|
|
50
51
|
});
|
|
@@ -9,6 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
10
10
|
var ToolbarTooltip = exports.ToolbarTooltip = function ToolbarTooltip(_ref) {
|
|
11
11
|
var content = _ref.content,
|
|
12
|
+
shortcut = _ref.shortcut,
|
|
12
13
|
children = _ref.children,
|
|
13
14
|
_ref$position = _ref.position,
|
|
14
15
|
position = _ref$position === void 0 ? 'top' : _ref$position,
|
|
@@ -16,6 +17,7 @@ var ToolbarTooltip = exports.ToolbarTooltip = function ToolbarTooltip(_ref) {
|
|
|
16
17
|
return /*#__PURE__*/_react.default.createElement(_tooltip.default, {
|
|
17
18
|
content: content,
|
|
18
19
|
position: position,
|
|
19
|
-
delay: delay
|
|
20
|
+
delay: delay,
|
|
21
|
+
shortcut: shortcut
|
|
20
22
|
}, children);
|
|
21
23
|
};
|
|
@@ -6,6 +6,7 @@ import { cx } from '@atlaskit/css';
|
|
|
6
6
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
7
7
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
10
|
import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
|
|
10
11
|
const styles = {
|
|
11
12
|
toolbarDropdownItem: "_11c82smr _18zrutpp _1rjc1b66 _1e0c1txw _kqswh2mm _bfhksm61 _1bsb1osq _1tkezwfg _1ul9eoa3 _syazazsu _1bas12b0 _1ah31i6y",
|
|
@@ -32,7 +33,7 @@ const CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(({
|
|
|
32
33
|
"aria-pressed": ariaPressed,
|
|
33
34
|
"aria-disabled": ariaDisabled,
|
|
34
35
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
35
|
-
"data-toolbar-component":
|
|
36
|
+
"data-toolbar-component": editorExperiment('platform_synced_block', true) ? 'menu-item' : undefined,
|
|
36
37
|
ref: ref
|
|
37
38
|
}, children));
|
|
38
39
|
export const ToolbarDropdownItem = ({
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Tooltip from '@atlaskit/tooltip';
|
|
3
3
|
export const ToolbarTooltip = ({
|
|
4
4
|
content,
|
|
5
|
+
shortcut,
|
|
5
6
|
children,
|
|
6
7
|
position = 'top',
|
|
7
8
|
delay
|
|
@@ -9,6 +10,7 @@ export const ToolbarTooltip = ({
|
|
|
9
10
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
10
11
|
content: content,
|
|
11
12
|
position: position,
|
|
12
|
-
delay: delay
|
|
13
|
+
delay: delay,
|
|
14
|
+
shortcut: shortcut
|
|
13
15
|
}, children);
|
|
14
16
|
};
|
|
@@ -9,6 +9,7 @@ import { cx } from '@atlaskit/css';
|
|
|
9
9
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
10
10
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
11
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
13
|
import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
|
|
13
14
|
var styles = {
|
|
14
15
|
toolbarDropdownItem: "_11c82smr _18zrutpp _1rjc1b66 _1e0c1txw _kqswh2mm _bfhksm61 _1bsb1osq _1tkezwfg _1ul9eoa3 _syazazsu _1bas12b0 _1ah31i6y",
|
|
@@ -35,7 +36,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
35
36
|
"aria-pressed": ariaPressed,
|
|
36
37
|
"aria-disabled": ariaDisabled,
|
|
37
38
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
38
|
-
"data-toolbar-component":
|
|
39
|
+
"data-toolbar-component": editorExperiment('platform_synced_block', true) ? 'menu-item' : undefined,
|
|
39
40
|
ref: ref
|
|
40
41
|
}, children);
|
|
41
42
|
});
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import Tooltip from '@atlaskit/tooltip';
|
|
3
3
|
export var ToolbarTooltip = function ToolbarTooltip(_ref) {
|
|
4
4
|
var content = _ref.content,
|
|
5
|
+
shortcut = _ref.shortcut,
|
|
5
6
|
children = _ref.children,
|
|
6
7
|
_ref$position = _ref.position,
|
|
7
8
|
position = _ref$position === void 0 ? 'top' : _ref$position,
|
|
@@ -9,6 +10,7 @@ export var ToolbarTooltip = function ToolbarTooltip(_ref) {
|
|
|
9
10
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
10
11
|
content: content,
|
|
11
12
|
position: position,
|
|
12
|
-
delay: delay
|
|
13
|
+
delay: delay,
|
|
14
|
+
shortcut: shortcut
|
|
13
15
|
}, children);
|
|
14
16
|
};
|
|
@@ -5,6 +5,7 @@ type ToolbarTooltipProps = {
|
|
|
5
5
|
content: React.ReactNode;
|
|
6
6
|
delay?: number;
|
|
7
7
|
position?: PositionType;
|
|
8
|
+
shortcut?: string[];
|
|
8
9
|
};
|
|
9
|
-
export declare const ToolbarTooltip: ({ content, children, position, delay, }: ToolbarTooltipProps) => React.JSX.Element;
|
|
10
|
+
export declare const ToolbarTooltip: ({ content, shortcut, children, position, delay, }: ToolbarTooltipProps) => React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -5,6 +5,7 @@ type ToolbarTooltipProps = {
|
|
|
5
5
|
content: React.ReactNode;
|
|
6
6
|
delay?: number;
|
|
7
7
|
position?: PositionType;
|
|
8
|
+
shortcut?: string[];
|
|
8
9
|
};
|
|
9
|
-
export declare const ToolbarTooltip: ({ content, children, position, delay, }: ToolbarTooltipProps) => React.JSX.Element;
|
|
10
|
+
export declare const ToolbarTooltip: ({ content, shortcut, children, position, delay, }: ToolbarTooltipProps) => React.JSX.Element;
|
|
10
11
|
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.18.0",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"team": "Editor: Jenga",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
31
31
|
"@atlaskit/popup": "^4.6.0",
|
|
32
32
|
"@atlaskit/primitives": "^16.4.0",
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^14.
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^14.1.0",
|
|
34
34
|
"@atlaskit/tokens": "^8.4.0",
|
|
35
35
|
"@atlaskit/tooltip": "^20.10.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|