@atlaskit/editor-toolbar 0.20.7 → 0.20.9
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 +14 -0
- package/dist/cjs/hooks/ui-context.js +1 -1
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/ui/ToolbarButton.js +1 -1
- package/dist/cjs/ui/ToolbarColorSwatch.js +1 -1
- package/dist/cjs/ui/ToolbarDropdownItem.js +1 -1
- package/dist/cjs/ui/ToolbarDropdownMenu.js +2 -2
- package/dist/cjs/ui/icons/TextSmallIcon.js +32 -0
- package/dist/es2019/hooks/ui-context.js +1 -1
- package/dist/es2019/index.js +1 -0
- package/dist/es2019/ui/ToolbarButton.js +1 -1
- package/dist/es2019/ui/ToolbarColorSwatch.js +1 -1
- package/dist/es2019/ui/ToolbarDropdownItem.js +1 -1
- package/dist/es2019/ui/ToolbarDropdownMenu.js +2 -2
- package/dist/es2019/ui/icons/TextSmallIcon.js +27 -0
- package/dist/esm/hooks/ui-context.js +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/ui/ToolbarButton.js +1 -1
- package/dist/esm/ui/ToolbarColorSwatch.js +1 -1
- package/dist/esm/ui/ToolbarDropdownItem.js +1 -1
- package/dist/esm/ui/ToolbarDropdownMenu.js +2 -2
- package/dist/esm/ui/icons/TextSmallIcon.js +26 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/ui/icons/TextSmallIcon.d.ts +8 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/icons/TextSmallIcon.d.ts +8 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.20.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 0.20.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d7123d7a16015`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d7123d7a16015) -
|
|
14
|
+
Add TextSmallIcon component for small text block type
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 0.20.7
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -37,7 +37,7 @@ var ToolbarUIProvider = exports.ToolbarUIProvider = function ToolbarUIProvider(_
|
|
|
37
37
|
fireAnalyticsEvent = _ref.fireAnalyticsEvent,
|
|
38
38
|
keyboardNavigation = _ref.keyboardNavigation;
|
|
39
39
|
return /*#__PURE__*/_react.default.createElement(ToolbarUIContext.Provider, {
|
|
40
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
40
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
41
41
|
value: {
|
|
42
42
|
onDropdownOpenChanged: onDropdownOpenChanged,
|
|
43
43
|
preventDefaultOnMouseDown: preventDefaultOnMouseDown,
|
package/dist/cjs/index.js
CHANGED
|
@@ -376,6 +376,12 @@ Object.defineProperty(exports, "TextIcon", {
|
|
|
376
376
|
return _TextIcon.TextIcon;
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
|
+
Object.defineProperty(exports, "TextSmallIcon", {
|
|
380
|
+
enumerable: true,
|
|
381
|
+
get: function get() {
|
|
382
|
+
return _TextSmallIcon.TextSmallIcon;
|
|
383
|
+
}
|
|
384
|
+
});
|
|
379
385
|
Object.defineProperty(exports, "Toolbar", {
|
|
380
386
|
enumerable: true,
|
|
381
387
|
get: function get() {
|
|
@@ -546,6 +552,7 @@ var _PinnedIcon = require("./ui/icons/PinnedIcon");
|
|
|
546
552
|
var _QuoteIcon = require("./ui/icons/QuoteIcon");
|
|
547
553
|
var _TextColorIcon = require("./ui/icons/TextColorIcon");
|
|
548
554
|
var _TextIcon = require("./ui/icons/TextIcon");
|
|
555
|
+
var _TextSmallIcon = require("./ui/icons/TextSmallIcon");
|
|
549
556
|
var _ClearFormattingIcon = require("./ui/icons/ClearFormattingIcon");
|
|
550
557
|
var _UnderlineIcon = require("./ui/icons/UnderlineIcon");
|
|
551
558
|
var _StrikeThroughIcon = require("./ui/icons/StrikeThroughIcon");
|
|
@@ -56,7 +56,7 @@ var ToolbarButton = exports.ToolbarButton = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
56
56
|
testId: testId,
|
|
57
57
|
id: id,
|
|
58
58
|
isDisabled: disabled
|
|
59
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
59
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
60
60
|
,
|
|
61
61
|
onMouseDown: function onMouseDown(event) {
|
|
62
62
|
if (preventDefaultOnMouseDown) {
|
|
@@ -18,7 +18,7 @@ var ToolbarColorSwatch = exports.ToolbarColorSwatch = function ToolbarColorSwatc
|
|
|
18
18
|
highlightColor = _ref.highlightColor;
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
20
20
|
xcss: styles.colorSwatch
|
|
21
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
21
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
22
22
|
,
|
|
23
23
|
style: {
|
|
24
24
|
backgroundColor: highlightColor
|
|
@@ -127,7 +127,7 @@ var ToolbarDropdownItem = exports.ToolbarDropdownItem = function ToolbarDropdown
|
|
|
127
127
|
}));
|
|
128
128
|
}();
|
|
129
129
|
return /*#__PURE__*/_react.default.createElement(_dropdownMenu.DropdownItem
|
|
130
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
130
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
131
131
|
, (0, _extends2.default)({
|
|
132
132
|
onClick: function onClick(e) {
|
|
133
133
|
if (!hasNestedDropdownMenu) {
|
|
@@ -49,7 +49,7 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
|
|
|
49
49
|
}
|
|
50
50
|
}, [menuContext]);
|
|
51
51
|
return /*#__PURE__*/_react.default.createElement(_dropdownMenu.default, {
|
|
52
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
52
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
53
53
|
trigger: function trigger(triggerProps) {
|
|
54
54
|
var toolbarButton = /*#__PURE__*/_react.default.createElement(_ToolbarButton.ToolbarButton, {
|
|
55
55
|
ref: triggerProps.triggerRef,
|
|
@@ -58,7 +58,7 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
|
|
|
58
58
|
"aria-haspopup": triggerProps['aria-haspopup'],
|
|
59
59
|
"aria-controls": triggerProps['aria-controls'],
|
|
60
60
|
onBlur: triggerProps.onBlur
|
|
61
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
61
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
62
62
|
,
|
|
63
63
|
onClick: function onClick(e) {
|
|
64
64
|
_onClick && _onClick(e, !(menuContext !== null && menuContext !== void 0 && menuContext.isOpen));
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.TextSmallIcon = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
/**
|
|
10
|
+
* This is just a temporary icon to be replaced with an icon from @atlaskit/icon-lab, currently the icon is not available in @atlaskit/icon-lab.
|
|
11
|
+
*/
|
|
12
|
+
var TextSmallIcon = exports.TextSmallIcon = function TextSmallIcon(_ref) {
|
|
13
|
+
var size = _ref.size;
|
|
14
|
+
var dimension = size === 'small' ? 12 : 16;
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
16
|
+
width: dimension,
|
|
17
|
+
height: dimension,
|
|
18
|
+
viewBox: "0 0 16 16",
|
|
19
|
+
fill: "none",
|
|
20
|
+
role: "presentation"
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
22
|
+
transform: "translate(-1.614, -1.561) scale(0.95)"
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
24
|
+
fillRule: "evenodd",
|
|
25
|
+
clipRule: "evenodd",
|
|
26
|
+
d: "M6.8125 4.5H2V3H13V4.5H8.3125V17H6.8125V4.5Z",
|
|
27
|
+
fill: "currentcolor"
|
|
28
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
29
|
+
d: "M14.448 17.128C13.7973 17.128 13.2373 17.032 12.768 16.84C12.3093 16.6373 11.9573 16.3493 11.712 15.976C11.4773 15.592 11.36 15.128 11.36 14.584H12.8C12.8 14.9893 12.944 15.3093 13.232 15.544C13.52 15.768 13.9253 15.88 14.448 15.88H15.152C15.6853 15.88 16.096 15.7627 16.384 15.528C16.6827 15.2933 16.832 14.9627 16.832 14.536C16.832 14.152 16.7467 13.8533 16.576 13.64C16.4053 13.4267 16.144 13.2987 15.792 13.256L13.36 12.904C12.7627 12.8187 12.2987 12.5733 11.968 12.168C11.6373 11.752 11.472 11.208 11.472 10.536C11.472 9.768 11.7333 9.16533 12.256 8.728C12.7893 8.29067 13.52 8.072 14.448 8.072H15.152C16.0053 8.072 16.6987 8.28533 17.232 8.712C17.776 9.128 18.0693 9.67733 18.112 10.36H16.656C16.6347 10.0507 16.4853 9.79467 16.208 9.592C15.9413 9.38933 15.5893 9.288 15.152 9.288H14.448C13.9573 9.288 13.5733 9.4 13.296 9.624C13.0187 9.848 12.88 10.152 12.88 10.536C12.88 10.8347 12.9493 11.0747 13.088 11.256C13.2373 11.4373 13.4507 11.5493 13.728 11.592L16 11.912C16.7467 12.0187 17.3067 12.2907 17.68 12.728C18.0533 13.1653 18.24 13.768 18.24 14.536C18.24 15.3573 17.968 15.9973 17.424 16.456C16.8907 16.904 16.1333 17.128 15.152 17.128H14.448Z",
|
|
30
|
+
fill: "currentcolor"
|
|
31
|
+
})));
|
|
32
|
+
};
|
|
@@ -30,7 +30,7 @@ export const ToolbarUIProvider = ({
|
|
|
30
30
|
keyboardNavigation
|
|
31
31
|
}) => {
|
|
32
32
|
return /*#__PURE__*/React.createElement(ToolbarUIContext.Provider, {
|
|
33
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
33
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
34
34
|
value: {
|
|
35
35
|
onDropdownOpenChanged,
|
|
36
36
|
preventDefaultOnMouseDown,
|
package/dist/es2019/index.js
CHANGED
|
@@ -49,6 +49,7 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
|
|
|
49
49
|
export { QuoteIcon } from './ui/icons/QuoteIcon';
|
|
50
50
|
export { TextColorIcon } from './ui/icons/TextColorIcon';
|
|
51
51
|
export { TextIcon } from './ui/icons/TextIcon';
|
|
52
|
+
export { TextSmallIcon } from './ui/icons/TextSmallIcon';
|
|
52
53
|
export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
|
|
53
54
|
export { UnderlineIcon } from './ui/icons/UnderlineIcon';
|
|
54
55
|
export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
|
|
@@ -50,7 +50,7 @@ export const ToolbarButton = /*#__PURE__*/forwardRef(({
|
|
|
50
50
|
testId: testId,
|
|
51
51
|
id: id,
|
|
52
52
|
isDisabled: disabled
|
|
53
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
53
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
54
54
|
,
|
|
55
55
|
onMouseDown: event => {
|
|
56
56
|
if (preventDefaultOnMouseDown) {
|
|
@@ -12,7 +12,7 @@ export const ToolbarColorSwatch = ({
|
|
|
12
12
|
}) => {
|
|
13
13
|
return /*#__PURE__*/React.createElement(Box, {
|
|
14
14
|
xcss: styles.colorSwatch
|
|
15
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
15
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
16
16
|
,
|
|
17
17
|
style: {
|
|
18
18
|
backgroundColor: highlightColor
|
|
@@ -111,7 +111,7 @@ export const ToolbarDropdownItem = ({
|
|
|
111
111
|
});
|
|
112
112
|
})();
|
|
113
113
|
return /*#__PURE__*/React.createElement(DropdownItem
|
|
114
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
114
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
115
115
|
, _extends({
|
|
116
116
|
onClick: e => {
|
|
117
117
|
if (!hasNestedDropdownMenu) {
|
|
@@ -42,7 +42,7 @@ const ToolbarDropdownMenuContent = ({
|
|
|
42
42
|
}
|
|
43
43
|
}, [menuContext]);
|
|
44
44
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
45
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
45
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
46
46
|
trigger: triggerProps => {
|
|
47
47
|
const toolbarButton = /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
48
48
|
ref: triggerProps.triggerRef,
|
|
@@ -51,7 +51,7 @@ const ToolbarDropdownMenuContent = ({
|
|
|
51
51
|
"aria-haspopup": triggerProps['aria-haspopup'],
|
|
52
52
|
"aria-controls": triggerProps['aria-controls'],
|
|
53
53
|
onBlur: triggerProps.onBlur
|
|
54
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
54
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
55
55
|
,
|
|
56
56
|
onClick: e => {
|
|
57
57
|
onClick && onClick(e, !(menuContext !== null && menuContext !== void 0 && menuContext.isOpen));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This is just a temporary icon to be replaced with an icon from @atlaskit/icon-lab, currently the icon is not available in @atlaskit/icon-lab.
|
|
5
|
+
*/
|
|
6
|
+
export const TextSmallIcon = ({
|
|
7
|
+
size
|
|
8
|
+
}) => {
|
|
9
|
+
const dimension = size === 'small' ? 12 : 16;
|
|
10
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
11
|
+
width: dimension,
|
|
12
|
+
height: dimension,
|
|
13
|
+
viewBox: "0 0 16 16",
|
|
14
|
+
fill: "none",
|
|
15
|
+
role: "presentation"
|
|
16
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
17
|
+
transform: "translate(-1.614, -1.561) scale(0.95)"
|
|
18
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
fillRule: "evenodd",
|
|
20
|
+
clipRule: "evenodd",
|
|
21
|
+
d: "M6.8125 4.5H2V3H13V4.5H8.3125V17H6.8125V4.5Z",
|
|
22
|
+
fill: "currentcolor"
|
|
23
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
24
|
+
d: "M14.448 17.128C13.7973 17.128 13.2373 17.032 12.768 16.84C12.3093 16.6373 11.9573 16.3493 11.712 15.976C11.4773 15.592 11.36 15.128 11.36 14.584H12.8C12.8 14.9893 12.944 15.3093 13.232 15.544C13.52 15.768 13.9253 15.88 14.448 15.88H15.152C15.6853 15.88 16.096 15.7627 16.384 15.528C16.6827 15.2933 16.832 14.9627 16.832 14.536C16.832 14.152 16.7467 13.8533 16.576 13.64C16.4053 13.4267 16.144 13.2987 15.792 13.256L13.36 12.904C12.7627 12.8187 12.2987 12.5733 11.968 12.168C11.6373 11.752 11.472 11.208 11.472 10.536C11.472 9.768 11.7333 9.16533 12.256 8.728C12.7893 8.29067 13.52 8.072 14.448 8.072H15.152C16.0053 8.072 16.6987 8.28533 17.232 8.712C17.776 9.128 18.0693 9.67733 18.112 10.36H16.656C16.6347 10.0507 16.4853 9.79467 16.208 9.592C15.9413 9.38933 15.5893 9.288 15.152 9.288H14.448C13.9573 9.288 13.5733 9.4 13.296 9.624C13.0187 9.848 12.88 10.152 12.88 10.536C12.88 10.8347 12.9493 11.0747 13.088 11.256C13.2373 11.4373 13.4507 11.5493 13.728 11.592L16 11.912C16.7467 12.0187 17.3067 12.2907 17.68 12.728C18.0533 13.1653 18.24 13.768 18.24 14.536C18.24 15.3573 17.968 15.9973 17.424 16.456C16.8907 16.904 16.1333 17.128 15.152 17.128H14.448Z",
|
|
25
|
+
fill: "currentcolor"
|
|
26
|
+
})));
|
|
27
|
+
};
|
|
@@ -29,7 +29,7 @@ export var ToolbarUIProvider = function ToolbarUIProvider(_ref) {
|
|
|
29
29
|
fireAnalyticsEvent = _ref.fireAnalyticsEvent,
|
|
30
30
|
keyboardNavigation = _ref.keyboardNavigation;
|
|
31
31
|
return /*#__PURE__*/React.createElement(ToolbarUIContext.Provider, {
|
|
32
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
32
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-inline-context-value, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
33
33
|
value: {
|
|
34
34
|
onDropdownOpenChanged: onDropdownOpenChanged,
|
|
35
35
|
preventDefaultOnMouseDown: preventDefaultOnMouseDown,
|
package/dist/esm/index.js
CHANGED
|
@@ -49,6 +49,7 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
|
|
|
49
49
|
export { QuoteIcon } from './ui/icons/QuoteIcon';
|
|
50
50
|
export { TextColorIcon } from './ui/icons/TextColorIcon';
|
|
51
51
|
export { TextIcon } from './ui/icons/TextIcon';
|
|
52
|
+
export { TextSmallIcon } from './ui/icons/TextSmallIcon';
|
|
52
53
|
export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
|
|
53
54
|
export { UnderlineIcon } from './ui/icons/UnderlineIcon';
|
|
54
55
|
export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
|
|
@@ -48,7 +48,7 @@ export var ToolbarButton = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
48
48
|
testId: testId,
|
|
49
49
|
id: id,
|
|
50
50
|
isDisabled: disabled
|
|
51
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
51
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
52
52
|
,
|
|
53
53
|
onMouseDown: function onMouseDown(event) {
|
|
54
54
|
if (preventDefaultOnMouseDown) {
|
|
@@ -11,7 +11,7 @@ export var ToolbarColorSwatch = function ToolbarColorSwatch(_ref) {
|
|
|
11
11
|
highlightColor = _ref.highlightColor;
|
|
12
12
|
return /*#__PURE__*/React.createElement(Box, {
|
|
13
13
|
xcss: styles.colorSwatch
|
|
14
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
14
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
15
15
|
,
|
|
16
16
|
style: {
|
|
17
17
|
backgroundColor: highlightColor
|
|
@@ -118,7 +118,7 @@ export var ToolbarDropdownItem = function ToolbarDropdownItem(_ref3) {
|
|
|
118
118
|
}));
|
|
119
119
|
}();
|
|
120
120
|
return /*#__PURE__*/React.createElement(DropdownItem
|
|
121
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
121
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
122
122
|
, _extends({
|
|
123
123
|
onClick: function onClick(e) {
|
|
124
124
|
if (!hasNestedDropdownMenu) {
|
|
@@ -40,7 +40,7 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
|
|
|
40
40
|
}
|
|
41
41
|
}, [menuContext]);
|
|
42
42
|
return /*#__PURE__*/React.createElement(DropdownMenu, {
|
|
43
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
43
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
44
44
|
trigger: function trigger(triggerProps) {
|
|
45
45
|
var toolbarButton = /*#__PURE__*/React.createElement(ToolbarButton, {
|
|
46
46
|
ref: triggerProps.triggerRef,
|
|
@@ -49,7 +49,7 @@ var ToolbarDropdownMenuContent = function ToolbarDropdownMenuContent(_ref) {
|
|
|
49
49
|
"aria-haspopup": triggerProps['aria-haspopup'],
|
|
50
50
|
"aria-controls": triggerProps['aria-controls'],
|
|
51
51
|
onBlur: triggerProps.onBlur
|
|
52
|
-
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
52
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
53
53
|
,
|
|
54
54
|
onClick: function onClick(e) {
|
|
55
55
|
_onClick && _onClick(e, !(menuContext !== null && menuContext !== void 0 && menuContext.isOpen));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This is just a temporary icon to be replaced with an icon from @atlaskit/icon-lab, currently the icon is not available in @atlaskit/icon-lab.
|
|
5
|
+
*/
|
|
6
|
+
export var TextSmallIcon = function TextSmallIcon(_ref) {
|
|
7
|
+
var size = _ref.size;
|
|
8
|
+
var dimension = size === 'small' ? 12 : 16;
|
|
9
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
10
|
+
width: dimension,
|
|
11
|
+
height: dimension,
|
|
12
|
+
viewBox: "0 0 16 16",
|
|
13
|
+
fill: "none",
|
|
14
|
+
role: "presentation"
|
|
15
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
16
|
+
transform: "translate(-1.614, -1.561) scale(0.95)"
|
|
17
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
18
|
+
fillRule: "evenodd",
|
|
19
|
+
clipRule: "evenodd",
|
|
20
|
+
d: "M6.8125 4.5H2V3H13V4.5H8.3125V17H6.8125V4.5Z",
|
|
21
|
+
fill: "currentcolor"
|
|
22
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
d: "M14.448 17.128C13.7973 17.128 13.2373 17.032 12.768 16.84C12.3093 16.6373 11.9573 16.3493 11.712 15.976C11.4773 15.592 11.36 15.128 11.36 14.584H12.8C12.8 14.9893 12.944 15.3093 13.232 15.544C13.52 15.768 13.9253 15.88 14.448 15.88H15.152C15.6853 15.88 16.096 15.7627 16.384 15.528C16.6827 15.2933 16.832 14.9627 16.832 14.536C16.832 14.152 16.7467 13.8533 16.576 13.64C16.4053 13.4267 16.144 13.2987 15.792 13.256L13.36 12.904C12.7627 12.8187 12.2987 12.5733 11.968 12.168C11.6373 11.752 11.472 11.208 11.472 10.536C11.472 9.768 11.7333 9.16533 12.256 8.728C12.7893 8.29067 13.52 8.072 14.448 8.072H15.152C16.0053 8.072 16.6987 8.28533 17.232 8.712C17.776 9.128 18.0693 9.67733 18.112 10.36H16.656C16.6347 10.0507 16.4853 9.79467 16.208 9.592C15.9413 9.38933 15.5893 9.288 15.152 9.288H14.448C13.9573 9.288 13.5733 9.4 13.296 9.624C13.0187 9.848 12.88 10.152 12.88 10.536C12.88 10.8347 12.9493 11.0747 13.088 11.256C13.2373 11.4373 13.4507 11.5493 13.728 11.592L16 11.912C16.7467 12.0187 17.3067 12.2907 17.68 12.728C18.0533 13.1653 18.24 13.768 18.24 14.536C18.24 15.3573 17.968 15.9973 17.424 16.456C16.8907 16.904 16.1333 17.128 15.152 17.128H14.448Z",
|
|
24
|
+
fill: "currentcolor"
|
|
25
|
+
})));
|
|
26
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
|
|
|
48
48
|
export { QuoteIcon } from './ui/icons/QuoteIcon';
|
|
49
49
|
export { TextColorIcon } from './ui/icons/TextColorIcon';
|
|
50
50
|
export { TextIcon } from './ui/icons/TextIcon';
|
|
51
|
+
export { TextSmallIcon } from './ui/icons/TextSmallIcon';
|
|
51
52
|
export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
|
|
52
53
|
export { UnderlineIcon } from './ui/icons/UnderlineIcon';
|
|
53
54
|
export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* This is just a temporary icon to be replaced with an icon from @atlaskit/icon-lab, currently the icon is not available in @atlaskit/icon-lab.
|
|
4
|
+
*/
|
|
5
|
+
export declare const TextSmallIcon: ({ size }: {
|
|
6
|
+
label?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
}) => React.JSX.Element;
|
|
@@ -48,6 +48,7 @@ export { PinnedIcon } from './ui/icons/PinnedIcon';
|
|
|
48
48
|
export { QuoteIcon } from './ui/icons/QuoteIcon';
|
|
49
49
|
export { TextColorIcon } from './ui/icons/TextColorIcon';
|
|
50
50
|
export { TextIcon } from './ui/icons/TextIcon';
|
|
51
|
+
export { TextSmallIcon } from './ui/icons/TextSmallIcon';
|
|
51
52
|
export { ClearFormattingIcon } from './ui/icons/ClearFormattingIcon';
|
|
52
53
|
export { UnderlineIcon } from './ui/icons/UnderlineIcon';
|
|
53
54
|
export { StrikeThroughIcon } from './ui/icons/StrikeThroughIcon';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* This is just a temporary icon to be replaced with an icon from @atlaskit/icon-lab, currently the icon is not available in @atlaskit/icon-lab.
|
|
4
|
+
*/
|
|
5
|
+
export declare const TextSmallIcon: ({ size }: {
|
|
6
|
+
label?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
}) => React.JSX.Element;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.20.
|
|
6
|
+
"version": "0.20.9",
|
|
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.14.0",
|
|
32
32
|
"@atlaskit/primitives": "^18.0.0",
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^45.0.0",
|
|
34
34
|
"@atlaskit/tokens": "^11.1.0",
|
|
35
35
|
"@atlaskit/tooltip": "^21.0.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|