@atlaskit/editor-plugin-floating-toolbar 4.2.0 → 4.2.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 +6 -0
- package/dist/cjs/ui/ScrollButton.js +8 -3
- package/dist/cjs/ui/ScrollButtons.js +6 -4
- package/dist/es2019/ui/ScrollButton.js +6 -3
- package/dist/es2019/ui/ScrollButtons.js +6 -4
- package/dist/esm/ui/ScrollButton.js +8 -3
- package/dist/esm/ui/ScrollButtons.js +6 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -12,8 +12,8 @@ var _bindEventListener = require("bind-event-listener");
|
|
|
12
12
|
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
13
13
|
var _new = require("@atlaskit/button/new");
|
|
14
14
|
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
15
|
-
var _chevronLeftChevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/
|
|
16
|
-
var _chevronRightChevronRightLarge = _interopRequireDefault(require("@atlaskit/icon/
|
|
15
|
+
var _chevronLeftChevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-left--chevron-left-large"));
|
|
16
|
+
var _chevronRightChevronRightLarge = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-right--chevron-right-large"));
|
|
17
17
|
var _primitives = require("@atlaskit/primitives");
|
|
18
18
|
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); }
|
|
19
19
|
var rightSideStyles = (0, _primitives.xcss)({
|
|
@@ -138,7 +138,12 @@ var ScrollButton = exports.ScrollButton = function ScrollButton(_ref) {
|
|
|
138
138
|
label: intl.formatMessage(side === 'left' ? _floatingToolbar.messages.floatingToolbarScrollLeft : _floatingToolbar.messages.floatingToolbarScrollRight),
|
|
139
139
|
onClick: onClick,
|
|
140
140
|
isDisabled: disabled,
|
|
141
|
-
icon:
|
|
141
|
+
icon: function icon(iconProps) {
|
|
142
|
+
return /*#__PURE__*/_react.default.createElement(Icon, {
|
|
143
|
+
label: iconProps.label,
|
|
144
|
+
size: "small"
|
|
145
|
+
});
|
|
146
|
+
},
|
|
142
147
|
isTooltipDisabled: false,
|
|
143
148
|
tooltip: {
|
|
144
149
|
position: 'top'
|
|
@@ -12,8 +12,8 @@ var _react2 = require("@emotion/react");
|
|
|
12
12
|
var _rafSchd = _interopRequireDefault(require("raf-schd"));
|
|
13
13
|
var _floatingToolbar = require("@atlaskit/editor-common/floating-toolbar");
|
|
14
14
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
15
|
-
var _chevronLeftChevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/
|
|
16
|
-
var _chevronRightChevronRightLarge = _interopRequireDefault(require("@atlaskit/icon/
|
|
15
|
+
var _chevronLeftChevronLeftLarge = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-left--chevron-left-large"));
|
|
16
|
+
var _chevronRightChevronRightLarge = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-right--chevron-right-large"));
|
|
17
17
|
var _colors = require("@atlaskit/theme/colors");
|
|
18
18
|
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); }
|
|
19
19
|
/**
|
|
@@ -154,14 +154,16 @@ var ScrollButtons = exports.ScrollButtons = function ScrollButtons(_ref) {
|
|
|
154
154
|
}, (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
155
155
|
title: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollLeft),
|
|
156
156
|
icon: (0, _react2.jsx)(LeftIcon, {
|
|
157
|
-
label: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollLeft)
|
|
157
|
+
label: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollLeft),
|
|
158
|
+
size: "small"
|
|
158
159
|
}),
|
|
159
160
|
onClick: scrollLeft,
|
|
160
161
|
disabled: !canScrollLeft || disabled
|
|
161
162
|
}), (0, _react2.jsx)(_ui.FloatingToolbarButton, {
|
|
162
163
|
title: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollRight),
|
|
163
164
|
icon: (0, _react2.jsx)(RightIcon, {
|
|
164
|
-
label: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollRight)
|
|
165
|
+
label: intl.formatMessage(_floatingToolbar.messages.floatingToolbarScrollRight),
|
|
166
|
+
size: "small"
|
|
165
167
|
}),
|
|
166
168
|
onClick: scrollRight,
|
|
167
169
|
disabled: !canScrollRight || disabled
|
|
@@ -3,8 +3,8 @@ import { bind } from 'bind-event-listener';
|
|
|
3
3
|
import rafSchedule from 'raf-schd';
|
|
4
4
|
import { IconButton } from '@atlaskit/button/new';
|
|
5
5
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
6
|
-
import ChevronLeftLargeIcon from '@atlaskit/icon/
|
|
7
|
-
import ChevronRightLargeIcon from '@atlaskit/icon/
|
|
6
|
+
import ChevronLeftLargeIcon from '@atlaskit/icon/core/migration/chevron-left--chevron-left-large';
|
|
7
|
+
import ChevronRightLargeIcon from '@atlaskit/icon/core/migration/chevron-right--chevron-right-large';
|
|
8
8
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
9
9
|
const rightSideStyles = xcss({
|
|
10
10
|
borderLeft: `solid ${"var(--ds-border, #091E4224)"} 1px`,
|
|
@@ -124,7 +124,10 @@ export const ScrollButton = ({
|
|
|
124
124
|
label: intl.formatMessage(side === 'left' ? messages.floatingToolbarScrollLeft : messages.floatingToolbarScrollRight),
|
|
125
125
|
onClick: onClick,
|
|
126
126
|
isDisabled: disabled,
|
|
127
|
-
icon: Icon,
|
|
127
|
+
icon: iconProps => /*#__PURE__*/React.createElement(Icon, {
|
|
128
|
+
label: iconProps.label,
|
|
129
|
+
size: "small"
|
|
130
|
+
}),
|
|
128
131
|
isTooltipDisabled: false,
|
|
129
132
|
tooltip: {
|
|
130
133
|
position: 'top'
|
|
@@ -9,8 +9,8 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import rafSchedule from 'raf-schd';
|
|
10
10
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
11
11
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
12
|
-
import ChevronLeftLargeIcon from '@atlaskit/icon/
|
|
13
|
-
import ChevronRightLargeIcon from '@atlaskit/icon/
|
|
12
|
+
import ChevronLeftLargeIcon from '@atlaskit/icon/core/migration/chevron-left--chevron-left-large';
|
|
13
|
+
import ChevronRightLargeIcon from '@atlaskit/icon/core/migration/chevron-right--chevron-right-large';
|
|
14
14
|
import { N30 } from '@atlaskit/theme/colors';
|
|
15
15
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
16
16
|
const toolbarScrollButtons = css({
|
|
@@ -134,14 +134,16 @@ export const ScrollButtons = ({
|
|
|
134
134
|
}, jsx(Button, {
|
|
135
135
|
title: intl.formatMessage(messages.floatingToolbarScrollLeft),
|
|
136
136
|
icon: jsx(LeftIcon, {
|
|
137
|
-
label: intl.formatMessage(messages.floatingToolbarScrollLeft)
|
|
137
|
+
label: intl.formatMessage(messages.floatingToolbarScrollLeft),
|
|
138
|
+
size: "small"
|
|
138
139
|
}),
|
|
139
140
|
onClick: scrollLeft,
|
|
140
141
|
disabled: !canScrollLeft || disabled
|
|
141
142
|
}), jsx(Button, {
|
|
142
143
|
title: intl.formatMessage(messages.floatingToolbarScrollRight),
|
|
143
144
|
icon: jsx(RightIcon, {
|
|
144
|
-
label: intl.formatMessage(messages.floatingToolbarScrollRight)
|
|
145
|
+
label: intl.formatMessage(messages.floatingToolbarScrollRight),
|
|
146
|
+
size: "small"
|
|
145
147
|
}),
|
|
146
148
|
onClick: scrollRight,
|
|
147
149
|
disabled: !canScrollRight || disabled
|
|
@@ -4,8 +4,8 @@ import { bind } from 'bind-event-listener';
|
|
|
4
4
|
import rafSchedule from 'raf-schd';
|
|
5
5
|
import { IconButton } from '@atlaskit/button/new';
|
|
6
6
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
7
|
-
import ChevronLeftLargeIcon from '@atlaskit/icon/
|
|
8
|
-
import ChevronRightLargeIcon from '@atlaskit/icon/
|
|
7
|
+
import ChevronLeftLargeIcon from '@atlaskit/icon/core/migration/chevron-left--chevron-left-large';
|
|
8
|
+
import ChevronRightLargeIcon from '@atlaskit/icon/core/migration/chevron-right--chevron-right-large';
|
|
9
9
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
10
10
|
var rightSideStyles = xcss({
|
|
11
11
|
borderLeft: "solid ".concat("var(--ds-border, #091E4224)", " 1px"),
|
|
@@ -129,7 +129,12 @@ export var ScrollButton = function ScrollButton(_ref) {
|
|
|
129
129
|
label: intl.formatMessage(side === 'left' ? messages.floatingToolbarScrollLeft : messages.floatingToolbarScrollRight),
|
|
130
130
|
onClick: onClick,
|
|
131
131
|
isDisabled: disabled,
|
|
132
|
-
icon:
|
|
132
|
+
icon: function icon(iconProps) {
|
|
133
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
134
|
+
label: iconProps.label,
|
|
135
|
+
size: "small"
|
|
136
|
+
});
|
|
137
|
+
},
|
|
133
138
|
isTooltipDisabled: false,
|
|
134
139
|
tooltip: {
|
|
135
140
|
position: 'top'
|
|
@@ -10,8 +10,8 @@ import { css, jsx } from '@emotion/react';
|
|
|
10
10
|
import rafSchedule from 'raf-schd';
|
|
11
11
|
import { messages } from '@atlaskit/editor-common/floating-toolbar';
|
|
12
12
|
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
13
|
-
import ChevronLeftLargeIcon from '@atlaskit/icon/
|
|
14
|
-
import ChevronRightLargeIcon from '@atlaskit/icon/
|
|
13
|
+
import ChevronLeftLargeIcon from '@atlaskit/icon/core/migration/chevron-left--chevron-left-large';
|
|
14
|
+
import ChevronRightLargeIcon from '@atlaskit/icon/core/migration/chevron-right--chevron-right-large';
|
|
15
15
|
import { N30 } from '@atlaskit/theme/colors';
|
|
16
16
|
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
17
17
|
var toolbarScrollButtons = css({
|
|
@@ -144,14 +144,16 @@ export var ScrollButtons = function ScrollButtons(_ref) {
|
|
|
144
144
|
}, jsx(Button, {
|
|
145
145
|
title: intl.formatMessage(messages.floatingToolbarScrollLeft),
|
|
146
146
|
icon: jsx(LeftIcon, {
|
|
147
|
-
label: intl.formatMessage(messages.floatingToolbarScrollLeft)
|
|
147
|
+
label: intl.formatMessage(messages.floatingToolbarScrollLeft),
|
|
148
|
+
size: "small"
|
|
148
149
|
}),
|
|
149
150
|
onClick: scrollLeft,
|
|
150
151
|
disabled: !canScrollLeft || disabled
|
|
151
152
|
}), jsx(Button, {
|
|
152
153
|
title: intl.formatMessage(messages.floatingToolbarScrollRight),
|
|
153
154
|
icon: jsx(RightIcon, {
|
|
154
|
-
label: intl.formatMessage(messages.floatingToolbarScrollRight)
|
|
155
|
+
label: intl.formatMessage(messages.floatingToolbarScrollRight),
|
|
156
|
+
size: "small"
|
|
155
157
|
}),
|
|
156
158
|
onClick: scrollRight,
|
|
157
159
|
disabled: !canScrollRight || disabled
|
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.1",
|
|
4
4
|
"description": "Floating toolbar plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/primitives": "^14.8.0",
|
|
51
51
|
"@atlaskit/select": "^20.7.0",
|
|
52
52
|
"@atlaskit/theme": "^18.0.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^7.0.0",
|
|
54
54
|
"@atlaskit/tokens": "^5.1.0",
|
|
55
55
|
"@atlaskit/tooltip": "^20.3.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|