@atlaskit/editor-plugin-floating-toolbar 1.3.0 → 1.4.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-plugin-floating-toolbar
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#91653](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91653) [`57a3511f76c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/57a3511f76c1) - ECA11Y-203: Added cursor back to the cell, after changing cell background
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 1.3.1
14
+
15
+ ### Patch Changes
16
+
17
+ - [#92007](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92007) [`85525725cb0d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85525725cb0d) - Migrated to the new button component
18
+
3
19
  ## 1.3.0
4
20
 
5
21
  ### Minor Changes
@@ -207,7 +207,8 @@ function ContentComponent(_ref5) {
207
207
  }
208
208
  var config = configWithNodeInfo.config,
209
209
  node = configWithNodeInfo.node;
210
- var items = config.items;
210
+ var items = config.items,
211
+ groupLabel = config.groupLabel;
211
212
  var title = config.title,
212
213
  _config$getDomRef = config.getDomRef,
213
214
  getDomRef = _config$getDomRef === void 0 ? getDomRefFromSelection : _config$getDomRef,
@@ -301,6 +302,7 @@ function ContentComponent(_ref5) {
301
302
  return /*#__PURE__*/_react.default.createElement(_ToolbarLoader.ToolbarLoader, {
302
303
  target: targetRef,
303
304
  items: toolbarItems,
305
+ groupLabel: groupLabel,
304
306
  node: node,
305
307
  dispatchCommand: dispatchCommand,
306
308
  editorView: editorView,
@@ -15,7 +15,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
15
15
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
16
16
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
17
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
18
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
19
18
  var _react = _interopRequireWildcard(require("react"));
20
19
  var _react2 = require("@emotion/react");
21
20
  var _reactIntlNext = require("react-intl-next");
@@ -36,13 +35,10 @@ var _Input = _interopRequireDefault(require("./Input"));
36
35
  var _ScrollButtons = require("./ScrollButtons");
37
36
  var _Select = _interopRequireDefault(require("./Select"));
38
37
  var _Separator = _interopRequireDefault(require("./Separator"));
39
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
40
- /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
41
- /** @jsx jsx */
42
38
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
43
39
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
44
40
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
45
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
41
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */ /** @jsx jsx */
46
42
  function groupItems(items) {
47
43
  var groupItems = items.reduce(function (accumulator, item, i) {
48
44
  var finalOutput = accumulator.finalOutput,
@@ -74,6 +70,7 @@ function groupItems(items) {
74
70
  }
75
71
  var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
76
72
  var items = _ref.items,
73
+ groupLabel = _ref.groupLabel,
77
74
  dispatchCommand = _ref.dispatchCommand,
78
75
  popupsMountPoint = _ref.popupsMountPoint,
79
76
  popupsBoundariesElement = _ref.popupsBoundariesElement,
@@ -224,7 +221,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
224
221
  // and paletteColorTooltipMessages in item options.
225
222
  ,
226
223
  hexToPaletteColor: _editorPalette.hexToEditorBackgroundPaletteColor,
227
- paletteColorTooltipMessages: _uiColor.backgroundPaletteTooltipMessages
224
+ paletteColorTooltipMessages: _uiColor.backgroundPaletteTooltipMessages,
225
+ returnEscToButton: item.returnEscToButton
228
226
  });
229
227
  }
230
228
  if (item.selectType === 'emoji') {
@@ -271,7 +269,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
271
269
  return (0, _react2.jsx)("div", {
272
270
  key: index,
273
271
  css: buttonGroupStyles,
274
- role: "radiogroup"
272
+ role: "radiogroup",
273
+ "aria-label": groupLabel !== null && groupLabel !== void 0 ? groupLabel : undefined
275
274
  }, element.map(function (item, idx) {
276
275
  return renderItem(item, idx);
277
276
  }));
@@ -301,12 +300,50 @@ var buttonGroupStyles = (0, _react2.css)({
301
300
 
302
301
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
303
302
  var toolbarContainer = function toolbarContainer(scrollable, hasSelect, firstElementIsSelect) {
304
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n display: flex;\n line-height: 1;\n box-sizing: border-box;\n\n & > div > div {\n align-items: center;\n }\n ", "\n"])), "var(--ds-surface-overlay, white)", "var(--ds-border-radius, 3px)", "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"), scrollable ? (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n overflow: hidden;\n "])), hasSelect ? (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n height: 40px;\n "]))) : (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n height: 32px;\n "])))) : (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", " ", ";\n ", "\n "])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", firstElementIsSelect && (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: ", ";\n "])), "var(--ds-space-050, 4px)")));
303
+ return (0, _react2.css)({
304
+ backgroundColor: "var(--ds-surface-overlay, white)",
305
+ borderRadius: "var(--ds-border-radius, 3px)",
306
+ boxShadow: "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"),
307
+ display: 'flex',
308
+ lineHeight: 1,
309
+ boxSizing: 'border-box',
310
+ '& > div > div': {
311
+ alignItems: 'center'
312
+ }
313
+ }, scrollable ? (0, _react2.css)(hasSelect ? (0, _react2.css)({
314
+ height: '40px'
315
+ }) : (0, _react2.css)({
316
+ height: '32px'
317
+ }), {
318
+ overflow: 'hidden'
319
+ }) : (0, _react2.css)({
320
+ padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-100, 8px)")
321
+ }, firstElementIsSelect && (0, _react2.css)({
322
+ paddingLeft: "var(--ds-space-050, 4px)"
323
+ })));
305
324
  };
306
325
 
307
326
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
308
327
  var toolbarOverflow = function toolbarOverflow(scrollable, scrollDisabled, firstElementIsSelect) {
309
- return (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n"])), scrollable ? (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n -webkit-overflow-scrolling: touch;\n padding: ", " 0 ", ";\n > div {\n > div:first-child {\n ", "\n }\n > div:last-child {\n margin-right: ", ";\n }\n }\n "])), scrollDisabled ? (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n "]))) : (0, _react2.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n overflow-x: auto;\n overflow-y: hidden;\n "]))), "var(--ds-space-050, 4px)", "var(--ds-space-600, 48px)", firstElementIsSelect ? (0, _react2.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", ";\n "])), "var(--ds-space-050, 4px)") : (0, _react2.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", ";\n "])), "var(--ds-space-100, 8px)"), "var(--ds-space-100, 8px)") : (0, _react2.css)({
328
+ return (0, _react2.css)(scrollable ? (0, _react2.css)(scrollDisabled ? (0, _react2.css)({
329
+ overflow: 'hidden'
330
+ }) : (0, _react2.css)({
331
+ overflowX: 'auto',
332
+ overflowY: 'hidden'
333
+ }), {
334
+ WebkitOverflowScrolling: 'touch',
335
+ padding: "var(--ds-space-050, 4px)".concat(" 0 ", "var(--ds-space-600, 48px)"),
336
+ '> div': {
337
+ '> div:first-child': firstElementIsSelect ? (0, _react2.css)({
338
+ marginLeft: "var(--ds-space-050, 4px)"
339
+ }) : (0, _react2.css)({
340
+ marginLeft: "var(--ds-space-100, 8px)"
341
+ }),
342
+ '> div:last-child': {
343
+ marginRight: "var(--ds-space-100, 8px)"
344
+ }
345
+ }
346
+ }) : (0, _react2.css)({
310
347
  display: 'flex'
311
348
  }));
312
349
  };
@@ -200,7 +200,8 @@ function ContentComponent({
200
200
  node
201
201
  } = configWithNodeInfo;
202
202
  let {
203
- items
203
+ items,
204
+ groupLabel
204
205
  } = config;
205
206
  const {
206
207
  title,
@@ -288,6 +289,7 @@ function ContentComponent({
288
289
  return /*#__PURE__*/React.createElement(ToolbarLoader, {
289
290
  target: targetRef,
290
291
  items: toolbarItems,
292
+ groupLabel: groupLabel,
291
293
  node: node,
292
294
  dispatchCommand: dispatchCommand,
293
295
  editorView: editorView,
@@ -55,6 +55,7 @@ export function groupItems(items) {
55
55
  }
56
56
  const ToolbarItems = /*#__PURE__*/React.memo(({
57
57
  items,
58
+ groupLabel,
58
59
  dispatchCommand,
59
60
  popupsMountPoint,
60
61
  popupsBoundariesElement,
@@ -192,7 +193,8 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
192
193
  // and paletteColorTooltipMessages in item options.
193
194
  ,
194
195
  hexToPaletteColor: hexToEditorBackgroundPaletteColor,
195
- paletteColorTooltipMessages: backgroundPaletteTooltipMessages
196
+ paletteColorTooltipMessages: backgroundPaletteTooltipMessages,
197
+ returnEscToButton: item.returnEscToButton
196
198
  });
197
199
  }
198
200
  if (item.selectType === 'emoji') {
@@ -235,7 +237,8 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
235
237
  return jsx("div", {
236
238
  key: index,
237
239
  css: buttonGroupStyles,
238
- role: "radiogroup"
240
+ role: "radiogroup",
241
+ "aria-label": groupLabel !== null && groupLabel !== void 0 ? groupLabel : undefined
239
242
  }, element.map((item, idx) => {
240
243
  return renderItem(item, idx);
241
244
  }));
@@ -262,59 +265,50 @@ const buttonGroupStyles = css({
262
265
  });
263
266
 
264
267
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
265
- const toolbarContainer = (scrollable, hasSelect, firstElementIsSelect) => css`
266
- background-color: ${"var(--ds-surface-overlay, white)"};
267
- border-radius: ${"var(--ds-border-radius, 3px)"};
268
- box-shadow: ${`var(--ds-shadow-overlay, ${`0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)`})`};
269
- display: flex;
270
- line-height: 1;
271
- box-sizing: border-box;
272
-
273
- & > div > div {
274
- align-items: center;
268
+ const toolbarContainer = (scrollable, hasSelect, firstElementIsSelect) => css({
269
+ backgroundColor: "var(--ds-surface-overlay, white)",
270
+ borderRadius: "var(--ds-border-radius, 3px)",
271
+ boxShadow: `var(--ds-shadow-overlay, ${`0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)`})`,
272
+ display: 'flex',
273
+ lineHeight: 1,
274
+ boxSizing: 'border-box',
275
+ '& > div > div': {
276
+ alignItems: 'center'
275
277
  }
276
- ${scrollable ? css`
277
- ${hasSelect ? css`
278
- height: 40px;
279
- ` : css`
280
- height: 32px;
281
- `}
282
- overflow: hidden;
283
- ` : css`
284
- padding: ${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"};
285
- ${firstElementIsSelect && css`
286
- padding-left: ${"var(--ds-space-050, 4px)"};
287
- `}
288
- `}
289
- `;
278
+ }, scrollable ? css(hasSelect ? css({
279
+ height: '40px'
280
+ }) : css({
281
+ height: '32px'
282
+ }), {
283
+ overflow: 'hidden'
284
+ }) : css({
285
+ padding: `${"var(--ds-space-050, 4px)"} ${"var(--ds-space-100, 8px)"}`
286
+ }, firstElementIsSelect && css({
287
+ paddingLeft: "var(--ds-space-050, 4px)"
288
+ })));
290
289
 
291
290
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
292
- const toolbarOverflow = (scrollable, scrollDisabled, firstElementIsSelect) => css`
293
- ${scrollable ? css`
294
- ${scrollDisabled ? css`
295
- overflow: hidden;
296
- ` : css`
297
- overflow-x: auto;
298
- overflow-y: hidden;
299
- `}
300
- -webkit-overflow-scrolling: touch;
301
- padding: ${"var(--ds-space-050, 4px)"} 0 ${"var(--ds-space-600, 48px)"};
302
- > div {
303
- > div:first-child {
304
- ${firstElementIsSelect ? css`
305
- margin-left: ${"var(--ds-space-050, 4px)"};
306
- ` : css`
307
- margin-left: ${"var(--ds-space-100, 8px)"};
308
- `}
309
- }
310
- > div:last-child {
311
- margin-right: ${"var(--ds-space-100, 8px)"};
312
- }
313
- }
314
- ` : css({
291
+ const toolbarOverflow = (scrollable, scrollDisabled, firstElementIsSelect) => css(scrollable ? css(scrollDisabled ? css({
292
+ overflow: 'hidden'
293
+ }) : css({
294
+ overflowX: 'auto',
295
+ overflowY: 'hidden'
296
+ }), {
297
+ WebkitOverflowScrolling: 'touch',
298
+ padding: `${"var(--ds-space-050, 4px)"} 0 ${"var(--ds-space-600, 48px)"}`,
299
+ '> div': {
300
+ '> div:first-child': firstElementIsSelect ? css({
301
+ marginLeft: "var(--ds-space-050, 4px)"
302
+ }) : css({
303
+ marginLeft: "var(--ds-space-100, 8px)"
304
+ }),
305
+ '> div:last-child': {
306
+ marginRight: "var(--ds-space-100, 8px)"
307
+ }
308
+ }
309
+ }) : css({
315
310
  display: 'flex'
316
- })}
317
- `;
311
+ }));
318
312
  // eslint-disable-next-line @repo/internal/react/no-class-components
319
313
  class Toolbar extends Component {
320
314
  constructor(props) {
@@ -198,7 +198,8 @@ function ContentComponent(_ref5) {
198
198
  }
199
199
  var config = configWithNodeInfo.config,
200
200
  node = configWithNodeInfo.node;
201
- var items = config.items;
201
+ var items = config.items,
202
+ groupLabel = config.groupLabel;
202
203
  var title = config.title,
203
204
  _config$getDomRef = config.getDomRef,
204
205
  getDomRef = _config$getDomRef === void 0 ? getDomRefFromSelection : _config$getDomRef,
@@ -292,6 +293,7 @@ function ContentComponent(_ref5) {
292
293
  return /*#__PURE__*/React.createElement(ToolbarLoader, {
293
294
  target: targetRef,
294
295
  items: toolbarItems,
296
+ groupLabel: groupLabel,
295
297
  node: node,
296
298
  dispatchCommand: dispatchCommand,
297
299
  editorView: editorView,
@@ -6,8 +6,6 @@ import _inherits from "@babel/runtime/helpers/inherits";
6
6
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
11
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
13
11
  /* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation */
@@ -63,6 +61,7 @@ export function groupItems(items) {
63
61
  }
64
62
  var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
65
63
  var items = _ref.items,
64
+ groupLabel = _ref.groupLabel,
66
65
  dispatchCommand = _ref.dispatchCommand,
67
66
  popupsMountPoint = _ref.popupsMountPoint,
68
67
  popupsBoundariesElement = _ref.popupsBoundariesElement,
@@ -213,7 +212,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
213
212
  // and paletteColorTooltipMessages in item options.
214
213
  ,
215
214
  hexToPaletteColor: hexToEditorBackgroundPaletteColor,
216
- paletteColorTooltipMessages: backgroundPaletteTooltipMessages
215
+ paletteColorTooltipMessages: backgroundPaletteTooltipMessages,
216
+ returnEscToButton: item.returnEscToButton
217
217
  });
218
218
  }
219
219
  if (item.selectType === 'emoji') {
@@ -260,7 +260,8 @@ var ToolbarItems = /*#__PURE__*/React.memo(function (_ref) {
260
260
  return jsx("div", {
261
261
  key: index,
262
262
  css: buttonGroupStyles,
263
- role: "radiogroup"
263
+ role: "radiogroup",
264
+ "aria-label": groupLabel !== null && groupLabel !== void 0 ? groupLabel : undefined
264
265
  }, element.map(function (item, idx) {
265
266
  return renderItem(item, idx);
266
267
  }));
@@ -290,12 +291,50 @@ var buttonGroupStyles = css({
290
291
 
291
292
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
292
293
  var toolbarContainer = function toolbarContainer(scrollable, hasSelect, firstElementIsSelect) {
293
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n display: flex;\n line-height: 1;\n box-sizing: border-box;\n\n & > div > div {\n align-items: center;\n }\n ", "\n"])), "var(--ds-surface-overlay, white)", "var(--ds-border-radius, 3px)", "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"), scrollable ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n overflow: hidden;\n "])), hasSelect ? css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 40px;\n "]))) : css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 32px;\n "])))) : css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n ", "\n "])), "var(--ds-space-050, 4px)", "var(--ds-space-100, 8px)", firstElementIsSelect && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding-left: ", ";\n "])), "var(--ds-space-050, 4px)")));
294
+ return css({
295
+ backgroundColor: "var(--ds-surface-overlay, white)",
296
+ borderRadius: "var(--ds-border-radius, 3px)",
297
+ boxShadow: "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31), 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"),
298
+ display: 'flex',
299
+ lineHeight: 1,
300
+ boxSizing: 'border-box',
301
+ '& > div > div': {
302
+ alignItems: 'center'
303
+ }
304
+ }, scrollable ? css(hasSelect ? css({
305
+ height: '40px'
306
+ }) : css({
307
+ height: '32px'
308
+ }), {
309
+ overflow: 'hidden'
310
+ }) : css({
311
+ padding: "var(--ds-space-050, 4px)".concat(" ", "var(--ds-space-100, 8px)")
312
+ }, firstElementIsSelect && css({
313
+ paddingLeft: "var(--ds-space-050, 4px)"
314
+ })));
294
315
  };
295
316
 
296
317
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
297
318
  var toolbarOverflow = function toolbarOverflow(scrollable, scrollDisabled, firstElementIsSelect) {
298
- return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n ", "\n"])), scrollable ? css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n ", "\n -webkit-overflow-scrolling: touch;\n padding: ", " 0 ", ";\n > div {\n > div:first-child {\n ", "\n }\n > div:last-child {\n margin-right: ", ";\n }\n }\n "])), scrollDisabled ? css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n overflow: hidden;\n "]))) : css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n overflow-x: auto;\n overflow-y: hidden;\n "]))), "var(--ds-space-050, 4px)", "var(--ds-space-600, 48px)", firstElementIsSelect ? css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-left: ", ";\n "])), "var(--ds-space-050, 4px)") : css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n margin-left: ", ";\n "])), "var(--ds-space-100, 8px)"), "var(--ds-space-100, 8px)") : css({
319
+ return css(scrollable ? css(scrollDisabled ? css({
320
+ overflow: 'hidden'
321
+ }) : css({
322
+ overflowX: 'auto',
323
+ overflowY: 'hidden'
324
+ }), {
325
+ WebkitOverflowScrolling: 'touch',
326
+ padding: "var(--ds-space-050, 4px)".concat(" 0 ", "var(--ds-space-600, 48px)"),
327
+ '> div': {
328
+ '> div:first-child': firstElementIsSelect ? css({
329
+ marginLeft: "var(--ds-space-050, 4px)"
330
+ }) : css({
331
+ marginLeft: "var(--ds-space-100, 8px)"
332
+ }),
333
+ '> div:last-child': {
334
+ marginRight: "var(--ds-space-100, 8px)"
335
+ }
336
+ }
337
+ }) : css({
299
338
  display: 'flex'
300
339
  }));
301
340
  };
@@ -20,6 +20,7 @@ export interface Props {
20
20
  popupsScrollableElement?: HTMLElement;
21
21
  providerFactory?: ProviderFactory;
22
22
  className?: string;
23
+ groupLabel?: string;
23
24
  focusEditor?: () => void;
24
25
  editorView?: EditorView;
25
26
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
@@ -20,6 +20,7 @@ export interface Props {
20
20
  popupsScrollableElement?: HTMLElement;
21
21
  providerFactory?: ProviderFactory;
22
22
  className?: string;
23
+ groupLabel?: string;
23
24
  focusEditor?: () => void;
24
25
  editorView?: EditorView;
25
26
  dispatchAnalyticsEvent?: DispatchAnalyticsEvent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-floating-toolbar",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Floating toolbar plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -27,7 +27,7 @@
27
27
  "@atlaskit/adf-utils": "^19.0.0",
28
28
  "@atlaskit/button": "^17.14.0",
29
29
  "@atlaskit/checkbox": "^13.1.0",
30
- "@atlaskit/editor-common": "^78.31.0",
30
+ "@atlaskit/editor-common": "^78.33.0",
31
31
  "@atlaskit/editor-palette": "1.5.3",
32
32
  "@atlaskit/editor-plugin-context-panel": "^1.1.0",
33
33
  "@atlaskit/editor-plugin-copy-button": "^1.1.0",
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
36
36
  "@atlaskit/editor-plugin-editor-viewmode": "^1.1.0",
37
37
  "@atlaskit/editor-plugin-extension": "^1.3.0",
38
- "@atlaskit/editor-plugin-table": "^7.8.0",
38
+ "@atlaskit/editor-plugin-table": "^7.9.0",
39
39
  "@atlaskit/editor-prosemirror": "4.0.0",
40
40
  "@atlaskit/emoji": "^67.6.0",
41
41
  "@atlaskit/icon": "^22.1.0",