@atlaskit/editor-common 116.47.0 → 116.48.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.
Files changed (83) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-products/tsconfig.json +3 -0
  4. package/dist/cjs/element-browser/components/ViewMore.js +1 -1
  5. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  6. package/dist/cjs/extensions/UnknownMacroPlaceholder.js +1 -1
  7. package/dist/cjs/icons/shared/PanelErrorIcon.js +1 -1
  8. package/dist/cjs/icons/shared/PanelInfoIcon.js +1 -1
  9. package/dist/cjs/icons/shared/PanelNoteIcon.js +1 -1
  10. package/dist/cjs/icons/shared/PanelSuccessIcon.js +1 -1
  11. package/dist/cjs/icons/shared/PanelWarningIcon.js +1 -1
  12. package/dist/cjs/messages/syncBlock.js +30 -0
  13. package/dist/cjs/monitoring/error.js +1 -1
  14. package/dist/cjs/table/NewSortingIcon.js +1 -1
  15. package/dist/cjs/ui/DropList/index.js +1 -1
  16. package/dist/cjs/ui/Layer/index.js +138 -18
  17. package/dist/cjs/ui/Shortcut/index.js +1 -1
  18. package/dist/cjs/ui/Toolbar/ButtonGroup.js +1 -1
  19. package/dist/cjs/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  20. package/dist/cjs/ui/Toolbar/DropdownWrapper.js +1 -1
  21. package/dist/cjs/ui/Toolbar/ExpandIcon.js +1 -1
  22. package/dist/cjs/ui/Toolbar/Separator.js +1 -1
  23. package/dist/cjs/ui-color/ColorPalette/Palettes/lightBackgroundPaletteTooltipMessages.js +0 -45
  24. package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessages.js +0 -60
  25. package/dist/cjs/ui-color/index.js +0 -7
  26. package/dist/cjs/vanilla-tooltip/index.js +9 -1
  27. package/dist/es2019/element-browser/components/ViewMore.js +1 -1
  28. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  29. package/dist/es2019/extensions/UnknownMacroPlaceholder.js +1 -1
  30. package/dist/es2019/icons/shared/PanelErrorIcon.js +1 -1
  31. package/dist/es2019/icons/shared/PanelInfoIcon.js +1 -1
  32. package/dist/es2019/icons/shared/PanelNoteIcon.js +1 -1
  33. package/dist/es2019/icons/shared/PanelSuccessIcon.js +1 -1
  34. package/dist/es2019/icons/shared/PanelWarningIcon.js +1 -1
  35. package/dist/es2019/messages/syncBlock.js +30 -0
  36. package/dist/es2019/monitoring/error.js +1 -1
  37. package/dist/es2019/table/NewSortingIcon.js +1 -1
  38. package/dist/es2019/ui/DropList/index.js +1 -1
  39. package/dist/es2019/ui/Layer/index.js +120 -13
  40. package/dist/es2019/ui/Shortcut/index.js +1 -1
  41. package/dist/es2019/ui/Toolbar/ButtonGroup.js +1 -1
  42. package/dist/es2019/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  43. package/dist/es2019/ui/Toolbar/DropdownWrapper.js +1 -1
  44. package/dist/es2019/ui/Toolbar/ExpandIcon.js +1 -1
  45. package/dist/es2019/ui/Toolbar/Separator.js +1 -1
  46. package/dist/es2019/ui-color/ColorPalette/Palettes/lightBackgroundPaletteTooltipMessages.js +0 -45
  47. package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessages.js +0 -60
  48. package/dist/es2019/ui-color/index.js +0 -1
  49. package/dist/es2019/vanilla-tooltip/index.js +10 -2
  50. package/dist/esm/element-browser/components/ViewMore.js +1 -1
  51. package/dist/esm/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  52. package/dist/esm/extensions/UnknownMacroPlaceholder.js +1 -1
  53. package/dist/esm/icons/shared/PanelErrorIcon.js +1 -1
  54. package/dist/esm/icons/shared/PanelInfoIcon.js +1 -1
  55. package/dist/esm/icons/shared/PanelNoteIcon.js +1 -1
  56. package/dist/esm/icons/shared/PanelSuccessIcon.js +1 -1
  57. package/dist/esm/icons/shared/PanelWarningIcon.js +1 -1
  58. package/dist/esm/messages/syncBlock.js +30 -0
  59. package/dist/esm/monitoring/error.js +1 -1
  60. package/dist/esm/table/NewSortingIcon.js +1 -1
  61. package/dist/esm/ui/DropList/index.js +1 -1
  62. package/dist/esm/ui/Layer/index.js +138 -19
  63. package/dist/esm/ui/Shortcut/index.js +1 -1
  64. package/dist/esm/ui/Toolbar/ButtonGroup.js +1 -1
  65. package/dist/esm/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  66. package/dist/esm/ui/Toolbar/DropdownWrapper.js +1 -1
  67. package/dist/esm/ui/Toolbar/ExpandIcon.js +1 -1
  68. package/dist/esm/ui/Toolbar/Separator.js +1 -1
  69. package/dist/esm/ui-color/ColorPalette/Palettes/lightBackgroundPaletteTooltipMessages.js +0 -45
  70. package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessages.js +0 -60
  71. package/dist/esm/ui-color/index.js +0 -1
  72. package/dist/esm/vanilla-tooltip/index.js +10 -2
  73. package/dist/types/messages/syncBlock.d.ts +30 -0
  74. package/dist/types/ui/Layer/index.d.ts +3 -26
  75. package/dist/types/ui/Layer/internal/helpers.d.ts +1 -1
  76. package/dist/types/ui-color/ColorPalette/Palettes/lightBackgroundPaletteTooltipMessages.d.ts +1 -46
  77. package/dist/types/ui-color/ColorPalette/Palettes/paletteMessages.d.ts +0 -60
  78. package/dist/types/ui-color/index.d.ts +0 -1
  79. package/package.json +8 -3
  80. package/dist/cjs/ui-color/ColorPalette/Palettes/cellBackgroundColorPaletteNew.js +0 -28
  81. package/dist/es2019/ui-color/ColorPalette/Palettes/cellBackgroundColorPaletteNew.js +0 -21
  82. package/dist/esm/ui-color/ColorPalette/Palettes/cellBackgroundColorPaletteNew.js +0 -21
  83. package/dist/types/ui-color/ColorPalette/Palettes/cellBackgroundColorPaletteNew.d.ts +0 -8
@@ -1,3 +1,4 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
1
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
3
  import _createClass from "@babel/runtime/helpers/createClass";
3
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
@@ -8,10 +9,12 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
8
9
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
10
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
- import React, { Component } from 'react';
12
+ import React, { Component, useLayoutEffect, useMemo, useRef, useState } from 'react';
12
13
  import Popper from 'popper.js';
13
14
  // eslint-disable-line import/extensions
14
15
  import rafSchedule from 'raf-schd';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
17
+ import { Popper as WrappedPopper } from '@atlaskit/popper/popper';
15
18
  import { positionPropToPopperPosition } from './internal/helpers';
16
19
  var defaultState = {
17
20
  hasExtractedStyles: false,
@@ -28,14 +31,26 @@ var defaultState = {
28
31
  originalHeight: null,
29
32
  maxHeight: null
30
33
  };
34
+ function defaultOnPositioned() {}
35
+ var defaultProps = {
36
+ boundariesElement: 'viewport',
37
+ children: null,
38
+ content: null,
39
+ offset: '0, 0',
40
+ position: 'right middle',
41
+ zIndex: 400,
42
+ lockScroll: false,
43
+ isAlwaysFixed: false,
44
+ onPositioned: defaultOnPositioned
45
+ };
31
46
 
32
47
  // Ignored via go/ees005
33
48
  // eslint-disable-next-line @repo/internal/react/no-class-components
34
- var Layer = /*#__PURE__*/function (_Component) {
35
- function Layer(props) {
49
+ var LegacyLayer = /*#__PURE__*/function (_Component) {
50
+ function LegacyLayer(props) {
36
51
  var _this;
37
- _classCallCheck(this, Layer);
38
- _this = _callSuper(this, Layer, [props]);
52
+ _classCallCheck(this, LegacyLayer);
53
+ _this = _callSuper(this, LegacyLayer, [props]);
39
54
  _defineProperty(_this, "targetRef", /*#__PURE__*/React.createRef());
40
55
  _defineProperty(_this, "contentRef", /*#__PURE__*/React.createRef());
41
56
  _defineProperty(_this, "extractStyles", function (state) {
@@ -60,8 +75,8 @@ var Layer = /*#__PURE__*/function (_Component) {
60
75
  _this.extractStyles = rafSchedule(_this.extractStyles.bind(_this));
61
76
  return _this;
62
77
  }
63
- _inherits(Layer, _Component);
64
- return _createClass(Layer, [{
78
+ _inherits(LegacyLayer, _Component);
79
+ return _createClass(LegacyLayer, [{
65
80
  key: "componentDidMount",
66
81
  value: function componentDidMount() {
67
82
  this.applyPopper(this.props);
@@ -191,15 +206,119 @@ var Layer = /*#__PURE__*/function (_Component) {
191
206
  }]);
192
207
  }(Component);
193
208
  // working with extract-react-types
194
- _defineProperty(Layer, "defaultProps", {
195
- boundariesElement: 'viewport',
196
- children: null,
197
- content: null,
198
- offset: '0, 0',
199
- position: 'right middle',
200
- zIndex: 400,
201
- lockScroll: false,
202
- isAlwaysFixed: false,
203
- onPositioned: function onPositioned() {}
204
- });
205
- export { Layer as default };
209
+ _defineProperty(LegacyLayer, "defaultProps", defaultProps);
210
+ function parseOffset(_ref) {
211
+ var offset = _ref.offset;
212
+ var _offset$split = offset.split(','),
213
+ _offset$split2 = _slicedToArray(_offset$split, 2),
214
+ rawSkidding = _offset$split2[0],
215
+ rawDistance = _offset$split2[1];
216
+ var skidding = Number.parseFloat(rawSkidding);
217
+ var distance = Number.parseFloat(rawDistance);
218
+ return [Number.isFinite(skidding) ? skidding : 0, Number.isFinite(distance) ? distance : 0];
219
+ }
220
+ var popperInteropModifiers = [{
221
+ name: 'flip',
222
+ enabled: false
223
+ }, {
224
+ name: 'preventOverflow',
225
+ enabled: false
226
+ }, {
227
+ name: 'hide',
228
+ enabled: false
229
+ }];
230
+ function usePopperInteropModifiers(_ref2) {
231
+ var onPositioned = _ref2.onPositioned;
232
+ var onPositionedRef = useRef(onPositioned);
233
+ var hasPositionedRef = useRef(false);
234
+ useLayoutEffect(function () {
235
+ onPositionedRef.current = onPositioned;
236
+ }, [onPositioned]);
237
+ return useMemo(function () {
238
+ return [].concat(popperInteropModifiers, [{
239
+ name: 'editorLayerFirstPositioned',
240
+ enabled: true,
241
+ // React Popper commits calculated styles in `write`; the legacy callback ran afterwards.
242
+ phase: 'afterWrite',
243
+ fn: function fn() {
244
+ if (hasPositionedRef.current) {
245
+ return;
246
+ }
247
+ hasPositionedRef.current = true;
248
+ onPositionedRef.current();
249
+ }
250
+ }]);
251
+ }, []);
252
+ }
253
+ function PopperInterop(_ref3) {
254
+ var children = _ref3.children,
255
+ content = _ref3.content,
256
+ offset = _ref3.offset,
257
+ onPositioned = _ref3.onPositioned,
258
+ position = _ref3.position,
259
+ strategy = _ref3.strategy;
260
+ var targetRef = useRef(null);
261
+ var _useState = useState(null),
262
+ _useState2 = _slicedToArray(_useState, 2),
263
+ referenceElement = _useState2[0],
264
+ setReferenceElement = _useState2[1];
265
+ var modifiers = usePopperInteropModifiers({
266
+ onPositioned: onPositioned
267
+ });
268
+ // Popper v2 compares the offset prop by reference, so memoise to avoid re-running positioning every render.
269
+ var parsedOffset = useMemo(function () {
270
+ return parseOffset({
271
+ offset: offset
272
+ });
273
+ }, [offset]);
274
+ useLayoutEffect(function () {
275
+ var _targetRef$current;
276
+ var actualTarget = (_targetRef$current = targetRef.current) === null || _targetRef$current === void 0 ? void 0 : _targetRef$current.children[0];
277
+ setReferenceElement(actualTarget instanceof HTMLElement ? actualTarget : null);
278
+ }, [children]);
279
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
280
+ ref: targetRef
281
+ }, children), content && referenceElement ? /*#__PURE__*/React.createElement(WrappedPopper, {
282
+ modifiers: modifiers,
283
+ offset: parsedOffset,
284
+ placement: positionPropToPopperPosition(position),
285
+ referenceElement: referenceElement,
286
+ strategy: strategy
287
+ }, function (_ref4) {
288
+ var ref = _ref4.ref,
289
+ style = _ref4.style;
290
+ return /*#__PURE__*/React.createElement("div", {
291
+ ref: ref,
292
+ style: style
293
+ }, content);
294
+ }) : /*#__PURE__*/React.createElement("div", null));
295
+ }
296
+
297
+ /** Selects the reversible Popper v1 or ADS wrapper implementation. */
298
+ export default function Layer(_ref5) {
299
+ var _ref5$children = _ref5.children,
300
+ children = _ref5$children === void 0 ? defaultProps.children : _ref5$children,
301
+ _ref5$content = _ref5.content,
302
+ content = _ref5$content === void 0 ? defaultProps.content : _ref5$content,
303
+ _ref5$offset = _ref5.offset,
304
+ offset = _ref5$offset === void 0 ? defaultProps.offset : _ref5$offset,
305
+ _ref5$onPositioned = _ref5.onPositioned,
306
+ onPositioned = _ref5$onPositioned === void 0 ? defaultProps.onPositioned : _ref5$onPositioned,
307
+ _ref5$position = _ref5.position,
308
+ position = _ref5$position === void 0 ? defaultProps.position : _ref5$position;
309
+ if (fg('platform-dst-popper-consolidation')) {
310
+ return /*#__PURE__*/React.createElement(PopperInterop, {
311
+ content: content,
312
+ offset: offset,
313
+ onPositioned: onPositioned,
314
+ position: position,
315
+ strategy: "absolute"
316
+ }, children);
317
+ }
318
+ return /*#__PURE__*/React.createElement(LegacyLayer, {
319
+ content: content,
320
+ offset: offset,
321
+ onPositioned: onPositioned,
322
+ position: position
323
+ }, children);
324
+ }
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* index.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ButtonGroup.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* ButtonGroup.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./ButtonGroup.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./DropdownTriggerWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownWrapper.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* DropdownWrapper.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./DropdownWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ExpandIcon.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* ExpandIcon.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./ExpandIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* Separator.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* Separator.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./Separator.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -109,50 +109,5 @@ export var lightBackgroundPaletteTooltipMessages = defineMessages({
109
109
  id: 'fabric.theme.bold-gray',
110
110
  defaultMessage: 'Bold gray',
111
111
  description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold gray color option.'
112
- },
113
- '#EFFFD6': {
114
- id: 'fabric.theme.subtle-lime',
115
- defaultMessage: 'Subtle lime',
116
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the subtle lime color option.'
117
- },
118
- '#D3F1A7': {
119
- id: 'fabric.theme.lime',
120
- defaultMessage: 'Lime',
121
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the lime color option.'
122
- },
123
- '#BDE97C': {
124
- id: 'fabric.theme.bold-lime',
125
- defaultMessage: 'Bold lime',
126
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold lime color option.'
127
- },
128
- '#FFF5DB': {
129
- id: 'fabric.theme.subtle-orange',
130
- defaultMessage: 'Subtle orange',
131
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the subtle orange color option.'
132
- },
133
- '#FCE4A6': {
134
- id: 'fabric.theme.orange',
135
- defaultMessage: 'Orange',
136
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the orange color option.'
137
- },
138
- '#FBD779': {
139
- id: 'fabric.theme.bold-orange',
140
- defaultMessage: 'Bold orange',
141
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold orange color option.'
142
- },
143
- '#FFECF8': {
144
- id: 'fabric.theme.subtle-magenta',
145
- defaultMessage: 'Subtle magenta',
146
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the subtle magenta color option.'
147
- },
148
- '#FDD0EC': {
149
- id: 'fabric.theme.magenta',
150
- defaultMessage: 'Magenta',
151
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the magenta color option.'
152
- },
153
- '#FCB6E1': {
154
- id: 'fabric.theme.bold-magenta',
155
- defaultMessage: 'Bold magenta',
156
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold magenta color option.'
157
112
  }
158
113
  });
@@ -150,66 +150,6 @@ var _default_1 = defineMessages({
150
150
  defaultMessage: 'Bold gray',
151
151
  description: 'Tooltip label for the bold gray color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
152
152
  },
153
- 'subtle-lime': {
154
- id: 'fabric.theme.subtle-lime',
155
- defaultMessage: 'Subtle lime',
156
- description: 'Tooltip label for the subtle lime color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
157
- },
158
- 'bold-lime': {
159
- id: 'fabric.theme.bold-lime',
160
- defaultMessage: 'Bold lime',
161
- description: 'Tooltip label for the bold lime color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
162
- },
163
- 'subtle-orange': {
164
- id: 'fabric.theme.subtle-orange',
165
- defaultMessage: 'Subtle orange',
166
- description: 'Tooltip label for the subtle orange color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
167
- },
168
- 'bold-orange': {
169
- id: 'fabric.theme.bold-orange',
170
- defaultMessage: 'Bold orange',
171
- description: 'Tooltip label for the bold orange color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
172
- },
173
- 'subtle-magenta': {
174
- id: 'fabric.theme.subtle-magenta',
175
- defaultMessage: 'Subtle magenta',
176
- description: 'Tooltip label for the subtle magenta color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
177
- },
178
- 'bold-magenta': {
179
- id: 'fabric.theme.bold-magenta',
180
- defaultMessage: 'Bold magenta',
181
- description: 'Tooltip label for the bold magenta color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
182
- },
183
- 'bold-blue': {
184
- id: 'fabric.theme.bold-blue',
185
- defaultMessage: 'Bold blue',
186
- description: 'Tooltip label for the bold blue color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
187
- },
188
- 'bold-teal': {
189
- id: 'fabric.theme.bold-teal',
190
- defaultMessage: 'Bold teal',
191
- description: 'Tooltip label for the bold teal color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
192
- },
193
- 'bold-green': {
194
- id: 'fabric.theme.bold-green',
195
- defaultMessage: 'Bold green',
196
- description: 'Tooltip label for the bold green color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
197
- },
198
- 'bold-yellow': {
199
- id: 'fabric.theme.bold-yellow',
200
- defaultMessage: 'Bold yellow',
201
- description: 'Tooltip label for the bold yellow color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
202
- },
203
- 'bold-red': {
204
- id: 'fabric.theme.bold-red',
205
- defaultMessage: 'Bold red',
206
- description: 'Tooltip label for the bold red color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
207
- },
208
- 'bold-purple': {
209
- id: 'fabric.theme.bold-purple',
210
- defaultMessage: 'Bold purple',
211
- description: 'Tooltip label for the bold purple color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
212
- },
213
153
  // Colors only used in highlight palette
214
154
  'no-color': {
215
155
  id: 'fabric.theme.no-color',
@@ -10,7 +10,6 @@ export { DEFAULT_COLOR_PICKER_COLUMNS, getColorsPerRowFromPalette, getSelectedRo
10
10
  export { getHighlightColorInNonActiveTheme } from './ColorPalette/getHighlightColorInNonActiveTheme';
11
11
  export { getTextColorInNonActiveTheme } from './ColorPalette/getTextColorInNonActiveTheme';
12
12
  export { default as cellBackgroundColorPalette } from './ColorPalette/Palettes/cellBackgroundColorPalette';
13
- export { default as cellBackgroundColorPaletteNew } from './ColorPalette/Palettes/cellBackgroundColorPaletteNew';
14
13
  export { default as colorPaletteMessages } from './ColorPalette/Palettes/paletteMessages';
15
14
  export { panelBackgroundPalette } from './ColorPalette/Palettes/panelBackgroundPalette';
16
15
  export { panelBackgroundPaletteNew } from './ColorPalette/Palettes/panelBackgroundPaletteNew';
@@ -3,8 +3,10 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  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; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- import { createPopper } from '@popperjs/core';
6
+ import { createPopper as createLegacyPopper } from '@popperjs/core';
7
7
  import { bind } from 'bind-event-listener';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
9
+ import { createPopper as createWrappedPopper } from '@atlaskit/popper/unsafe-imperative';
8
10
  var startingOffset = {
9
11
  name: 'offset',
10
12
  options: {
@@ -17,6 +19,12 @@ var endingOffset = {
17
19
  offset: [0, 8]
18
20
  }
19
21
  };
22
+ function getCreatePopper() {
23
+ if (fg('platform-dst-popper-consolidation')) {
24
+ return createWrappedPopper;
25
+ }
26
+ return createLegacyPopper;
27
+ }
20
28
 
21
29
  /**
22
30
  * A tooltip component similar to "@atlaskit/tooltip" but built for vanilla scenarios
@@ -102,7 +110,7 @@ export var VanillaTooltip = /*#__PURE__*/function () {
102
110
  return _createClass(VanillaTooltip, [{
103
111
  key: "createPopperInstance",
104
112
  value: function createPopperInstance() {
105
- this.popperInstance = createPopper(this.button, this.tooltip, {
113
+ this.popperInstance = getCreatePopper()(this.button, this.tooltip, {
106
114
  placement: 'top',
107
115
  modifiers: [startingOffset]
108
116
  });
@@ -184,6 +184,26 @@ export declare const syncBlockMessages: {
184
184
  description: string;
185
185
  id: string;
186
186
  };
187
+ feedbackFlagDescription: {
188
+ defaultMessage: string;
189
+ description: string;
190
+ id: string;
191
+ };
192
+ feedbackFlagGiveFeedback: {
193
+ defaultMessage: string;
194
+ description: string;
195
+ id: string;
196
+ };
197
+ feedbackFlagNoThanks: {
198
+ defaultMessage: string;
199
+ description: string;
200
+ id: string;
201
+ };
202
+ feedbackFlagTitle: {
203
+ defaultMessage: string;
204
+ description: string;
205
+ id: string;
206
+ };
187
207
  generalErrorDescription: {
188
208
  defaultMessage: string;
189
209
  description: string;
@@ -284,6 +304,11 @@ export declare const syncBlockMessages: {
284
304
  description: string;
285
305
  id: string;
286
306
  };
307
+ sourceSyncedBlockLabel: {
308
+ defaultMessage: string;
309
+ description: string;
310
+ id: string;
311
+ };
287
312
  sourceUnsyncedDescription: {
288
313
  defaultMessage: string;
289
314
  description: string;
@@ -329,6 +354,11 @@ export declare const syncBlockMessages: {
329
354
  description: string;
330
355
  id: string;
331
356
  };
357
+ syncedLocationDropdownActivationNoResults: {
358
+ defaultMessage: string;
359
+ description: string;
360
+ id: string;
361
+ };
332
362
  syncedLocationDropdownError: {
333
363
  defaultMessage: string;
334
364
  description: string;
@@ -1,6 +1,5 @@
1
- import React, { Component } from 'react';
1
+ import React from 'react';
2
2
  import type { ReactNode } from 'react';
3
- import type { Data } from 'popper.js';
4
3
  export type Props = {
5
4
  children?: React.ReactNode;
6
5
  content: ReactNode | null;
@@ -22,27 +21,5 @@ export type State = {
22
21
  position?: string;
23
22
  transform?: string;
24
23
  };
25
- export default class Layer extends Component<Props, State> {
26
- private popper;
27
- private targetRef;
28
- private contentRef;
29
- static defaultProps: {
30
- boundariesElement: string;
31
- children: null;
32
- content: null;
33
- offset: string;
34
- position: string;
35
- zIndex: number;
36
- lockScroll: boolean;
37
- isAlwaysFixed: boolean;
38
- onPositioned: () => void;
39
- };
40
- constructor(props: Props);
41
- componentDidMount(): void;
42
- componentDidUpdate(prevProps: Props, prevState: State): void;
43
- componentWillUnmount(): void;
44
- calculateMaxHeight(originalHeight: number, currentHeight: number, positionTop: number, cssPosition: string): number | null;
45
- extractStyles: (state: Data) => void;
46
- applyPopper(props: Props): void;
47
- render(): React.JSX.Element;
48
- }
24
+ /** Selects the reversible Popper v1 or ADS wrapper implementation. */
25
+ export default function Layer({ children, content, offset, onPositioned, position, }: Partial<Props>): ReactNode;
@@ -1,2 +1,2 @@
1
- import type { Placement } from 'popper.js';
1
+ import type { Placement } from '@atlaskit/popper/popper';
2
2
  export declare function positionPropToPopperPosition(position: string): Placement;
@@ -39,21 +39,11 @@ export declare const lightBackgroundPaletteTooltipMessages: {
39
39
  description: string;
40
40
  id: string;
41
41
  };
42
- '#BDE97C': {
43
- defaultMessage: string;
44
- description: string;
45
- id: string;
46
- };
47
42
  '#C0B6F2': {
48
43
  defaultMessage: string;
49
44
  description: string;
50
45
  id: string;
51
46
  };
52
- '#D3F1A7': {
53
- defaultMessage: string;
54
- description: string;
55
- id: string;
56
- };
57
47
  '#DEEBFF': {
58
48
  defaultMessage: string;
59
49
  description: string;
@@ -74,7 +64,7 @@ export declare const lightBackgroundPaletteTooltipMessages: {
74
64
  description: string;
75
65
  id: string;
76
66
  };
77
- '#EFFFD6': {
67
+ '#EFDD4E': {
78
68
  defaultMessage: string;
79
69
  description: string;
80
70
  id: string;
@@ -84,26 +74,6 @@ export declare const lightBackgroundPaletteTooltipMessages: {
84
74
  description: string;
85
75
  id: string;
86
76
  };
87
- '#FBD779': {
88
- defaultMessage: string;
89
- description: string;
90
- id: string;
91
- };
92
- '#FCB6E1': {
93
- defaultMessage: string;
94
- description: string;
95
- id: string;
96
- };
97
- '#FCE4A6': {
98
- defaultMessage: string;
99
- description: string;
100
- id: string;
101
- };
102
- '#FDD0EC': {
103
- defaultMessage: string;
104
- description: string;
105
- id: string;
106
- };
107
77
  '#FF8F73': {
108
78
  defaultMessage: string;
109
79
  description: string;
@@ -119,31 +89,16 @@ export declare const lightBackgroundPaletteTooltipMessages: {
119
89
  description: string;
120
90
  id: string;
121
91
  };
122
- '#EFDD4E': {
123
- defaultMessage: string;
124
- description: string;
125
- id: string;
126
- };
127
92
  '#FFEBE6': {
128
93
  defaultMessage: string;
129
94
  description: string;
130
95
  id: string;
131
96
  };
132
- '#FFECF8': {
133
- defaultMessage: string;
134
- description: string;
135
- id: string;
136
- };
137
97
  '#FFF0B3': {
138
98
  defaultMessage: string;
139
99
  description: string;
140
100
  id: string;
141
101
  };
142
- '#FFF5DB': {
143
- defaultMessage: string;
144
- description: string;
145
- id: string;
146
- };
147
102
  '#FFFAE6': {
148
103
  defaultMessage: string;
149
104
  description: string;
@@ -4,56 +4,11 @@ declare const _default_1: {
4
4
  description: string;
5
5
  id: string;
6
6
  };
7
- 'bold-blue': {
8
- defaultMessage: string;
9
- description: string;
10
- id: string;
11
- };
12
7
  'bold-gray': {
13
8
  defaultMessage: string;
14
9
  description: string;
15
10
  id: string;
16
11
  };
17
- 'bold-green': {
18
- defaultMessage: string;
19
- description: string;
20
- id: string;
21
- };
22
- 'bold-lime': {
23
- defaultMessage: string;
24
- description: string;
25
- id: string;
26
- };
27
- 'bold-magenta': {
28
- defaultMessage: string;
29
- description: string;
30
- id: string;
31
- };
32
- 'bold-orange': {
33
- defaultMessage: string;
34
- description: string;
35
- id: string;
36
- };
37
- 'bold-purple': {
38
- defaultMessage: string;
39
- description: string;
40
- id: string;
41
- };
42
- 'bold-red': {
43
- defaultMessage: string;
44
- description: string;
45
- id: string;
46
- };
47
- 'bold-teal': {
48
- defaultMessage: string;
49
- description: string;
50
- id: string;
51
- };
52
- 'bold-yellow': {
53
- defaultMessage: string;
54
- description: string;
55
- id: string;
56
- };
57
12
  'dark-blue': {
58
13
  defaultMessage: string;
59
14
  description: string;
@@ -194,21 +149,6 @@ declare const _default_1: {
194
149
  description: string;
195
150
  id: string;
196
151
  };
197
- 'subtle-lime': {
198
- defaultMessage: string;
199
- description: string;
200
- id: string;
201
- };
202
- 'subtle-magenta': {
203
- defaultMessage: string;
204
- description: string;
205
- id: string;
206
- };
207
- 'subtle-orange': {
208
- defaultMessage: string;
209
- description: string;
210
- id: string;
211
- };
212
152
  teal: {
213
153
  defaultMessage: string;
214
154
  description: string;
@@ -7,7 +7,6 @@ export { DEFAULT_COLOR_PICKER_COLUMNS, getColorsPerRowFromPalette, getSelectedRo
7
7
  export { getHighlightColorInNonActiveTheme } from './ColorPalette/getHighlightColorInNonActiveTheme';
8
8
  export { getTextColorInNonActiveTheme } from './ColorPalette/getTextColorInNonActiveTheme';
9
9
  export { default as cellBackgroundColorPalette } from './ColorPalette/Palettes/cellBackgroundColorPalette';
10
- export { default as cellBackgroundColorPaletteNew } from './ColorPalette/Palettes/cellBackgroundColorPaletteNew';
11
10
  export { default as colorPaletteMessages } from './ColorPalette/Palettes/paletteMessages';
12
11
  export { panelBackgroundPalette } from './ColorPalette/Palettes/panelBackgroundPalette';
13
12
  export { panelBackgroundPaletteNew } from './ColorPalette/Palettes/panelBackgroundPaletteNew';