@atlaskit/editor-common 76.27.9 → 76.27.10

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 (85) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/media-inline/constants.js +21 -2
  3. package/dist/cjs/media-inline/inline-image-wrapper.js +4 -2
  4. package/dist/cjs/media-inline/media-inline-image-card.js +3 -3
  5. package/dist/cjs/media-inline/styles.js +11 -3
  6. package/dist/cjs/media-inline/views/icon-wrapper.js +1 -1
  7. package/dist/cjs/monitoring/error.js +1 -1
  8. package/dist/cjs/styles/shared/annotation.js +5 -22
  9. package/dist/cjs/styles/shared/code-block.js +4 -20
  10. package/dist/cjs/styles/shared/code-mark.js +2 -6
  11. package/dist/cjs/styles/shared/panel.js +9 -62
  12. package/dist/cjs/styles/shared/rule.js +2 -8
  13. package/dist/cjs/ui/BaseTheme/index.js +8 -15
  14. package/dist/cjs/ui/DropList/index.js +4 -17
  15. package/dist/cjs/ui/Expand/index.js +13 -38
  16. package/dist/cjs/ui/Messages/index.js +6 -6
  17. package/dist/cjs/ui/PortalProvider/index.js +7 -21
  18. package/dist/cjs/ui-menu/ColorPickerButton/index.js +5 -13
  19. package/dist/cjs/ui-menu/DropdownMenu/index.js +10 -27
  20. package/dist/es2019/media-inline/constants.js +20 -1
  21. package/dist/es2019/media-inline/inline-image-wrapper.js +4 -2
  22. package/dist/es2019/media-inline/media-inline-image-card.js +3 -3
  23. package/dist/es2019/media-inline/styles.js +24 -9
  24. package/dist/es2019/media-inline/views/icon-wrapper.js +1 -1
  25. package/dist/es2019/monitoring/error.js +1 -1
  26. package/dist/es2019/styles/shared/annotation.js +9 -28
  27. package/dist/es2019/styles/shared/code-block.js +11 -27
  28. package/dist/es2019/styles/shared/code-mark.js +3 -7
  29. package/dist/es2019/styles/shared/panel.js +24 -83
  30. package/dist/es2019/styles/shared/rule.js +3 -9
  31. package/dist/es2019/ui/BaseTheme/index.js +3 -11
  32. package/dist/es2019/ui/DropList/index.js +7 -17
  33. package/dist/es2019/ui/Expand/index.js +18 -44
  34. package/dist/es2019/ui/Messages/index.js +6 -6
  35. package/dist/es2019/ui/PortalProvider/index.js +7 -21
  36. package/dist/es2019/ui-menu/ColorPickerButton/index.js +7 -15
  37. package/dist/es2019/ui-menu/DropdownMenu/index.js +34 -49
  38. package/dist/esm/media-inline/constants.js +20 -1
  39. package/dist/esm/media-inline/inline-image-wrapper.js +4 -2
  40. package/dist/esm/media-inline/media-inline-image-card.js +3 -3
  41. package/dist/esm/media-inline/styles.js +11 -3
  42. package/dist/esm/media-inline/views/icon-wrapper.js +1 -1
  43. package/dist/esm/monitoring/error.js +1 -1
  44. package/dist/esm/styles/shared/annotation.js +5 -22
  45. package/dist/esm/styles/shared/code-block.js +6 -22
  46. package/dist/esm/styles/shared/code-mark.js +3 -7
  47. package/dist/esm/styles/shared/panel.js +10 -63
  48. package/dist/esm/styles/shared/rule.js +3 -9
  49. package/dist/esm/ui/BaseTheme/index.js +9 -15
  50. package/dist/esm/ui/DropList/index.js +5 -18
  51. package/dist/esm/ui/Expand/index.js +14 -39
  52. package/dist/esm/ui/Messages/index.js +6 -6
  53. package/dist/esm/ui/PortalProvider/index.js +7 -21
  54. package/dist/esm/ui-menu/ColorPickerButton/index.js +6 -14
  55. package/dist/esm/ui-menu/DropdownMenu/index.js +11 -28
  56. package/dist/types/media-inline/constants.d.ts +18 -0
  57. package/dist/types/media-inline/styles.d.ts +6 -0
  58. package/dist/types/styles/shared/annotation.d.ts +2 -3
  59. package/dist/types/styles/shared/code-block.d.ts +1 -2
  60. package/dist/types/styles/shared/code-mark.d.ts +1 -2
  61. package/dist/types/styles/shared/panel.d.ts +4 -5
  62. package/dist/types/styles/shared/rule.d.ts +1 -2
  63. package/dist/types/ui/BaseTheme/index.d.ts +1 -1
  64. package/dist/types/ui/Expand/index.d.ts +4 -5
  65. package/dist/types/ui/Messages/index.d.ts +1 -1
  66. package/dist/types/ui/PortalProvider/index.d.ts +4 -8
  67. package/dist/types/utils/getModeFromTheme.d.ts +1 -1
  68. package/dist/types-ts4.5/media-inline/constants.d.ts +18 -0
  69. package/dist/types-ts4.5/media-inline/styles.d.ts +6 -0
  70. package/dist/types-ts4.5/styles/shared/annotation.d.ts +2 -3
  71. package/dist/types-ts4.5/styles/shared/code-block.d.ts +1 -2
  72. package/dist/types-ts4.5/styles/shared/code-mark.d.ts +1 -2
  73. package/dist/types-ts4.5/styles/shared/panel.d.ts +4 -5
  74. package/dist/types-ts4.5/styles/shared/rule.d.ts +1 -2
  75. package/dist/types-ts4.5/ui/BaseTheme/index.d.ts +1 -1
  76. package/dist/types-ts4.5/ui/Expand/index.d.ts +4 -5
  77. package/dist/types-ts4.5/ui/Messages/index.d.ts +1 -1
  78. package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +4 -8
  79. package/dist/types-ts4.5/utils/getModeFromTheme.d.ts +1 -1
  80. package/package.json +2 -2
  81. package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +0 -43
  82. package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +0 -37
  83. package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +0 -36
  84. package/dist/types/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
  85. package/dist/types-ts4.5/ui/PortalProvider/PortalProviderThemesProvider.d.ts +0 -6
@@ -7,8 +7,7 @@ import { css, jsx } from '@emotion/react';
7
7
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
8
8
  import { CustomItem, MenuGroup, Section } from '@atlaskit/menu';
9
9
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
10
- import { B100, DN600, DN80, N70, N900 } from '@atlaskit/theme/colors';
11
- import { themed } from '@atlaskit/theme/components';
10
+ import { B100, N70, N900 } from '@atlaskit/theme/colors';
12
11
  import Tooltip from '@atlaskit/tooltip';
13
12
  import { DropdownMenuSharedCssClassName } from '../../styles';
14
13
  import { KeyDownHandlerContext } from '../../ui-menu/ToolbarArrowKeyNavigationProvider';
@@ -27,59 +26,47 @@ const focusedMenuItemStyle = css`
27
26
  box-shadow: inset 0px 0px 0px 2px ${`var(--ds-border-focused, ${B100})`};
28
27
  outline: none;
29
28
  `;
30
- const buttonStyles = (isActive, submenuActive) => theme => {
29
+ const buttonStyles = (isActive, submenuActive) => {
31
30
  if (isActive) {
32
31
  /**
33
32
  * Hack for item to imitate old dropdown-menu selected styles
34
33
  */
35
34
  return css`
36
- > span,
37
- > span:hover,
38
- > span:active {
39
- background: ${"var(--ds-background-selected, #6c798f)"};
40
- color: ${"var(--ds-text, #fff)"};
41
- }
42
- :focus > span[aria-disabled='false'] {
43
- ${focusedMenuItemStyle};
44
- }
45
- :focus-visible,
46
- :focus-visible > span[aria-disabled='false'] {
47
- outline: none;
48
- }
49
- `;
35
+ > span,
36
+ > span:hover,
37
+ > span:active {
38
+ background: ${"var(--ds-background-selected, #6c798f)"};
39
+ color: ${"var(--ds-text, #fff)"};
40
+ }
41
+ :focus > span[aria-disabled='false'] {
42
+ ${focusedMenuItemStyle};
43
+ }
44
+ :focus-visible,
45
+ :focus-visible > span[aria-disabled='false'] {
46
+ outline: none;
47
+ }
48
+ `;
50
49
  } else {
51
50
  return css`
52
- > span:hover[aria-disabled='false'] {
53
- color: ${themed({
54
- light: `var(--ds-text, ${N900})`,
55
- dark: `var(--ds-text, ${DN600})`
56
- })(theme)};
57
- background-color: ${themed({
58
- light: "var(--ds-background-neutral-subtle-hovered, rgb(244, 245, 247))",
59
- dark: "var(--ds-background-neutral-subtle-hovered, rgb(59, 71, 92))"
60
- })(theme)};
61
- }
62
- ${!submenuActive && `
51
+ > span:hover[aria-disabled='false'] {
52
+ color: ${`var(--ds-text, ${N900})`};
53
+ background-color: ${"var(--ds-background-neutral-subtle-hovered, rgb(244, 245, 247))"};
54
+ }
55
+ ${!submenuActive && `
63
56
  > span:active[aria-disabled='false'] {
64
- background-color: ${themed({
65
- light: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))",
66
- dark: "var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))"
67
- })(theme)};
57
+ background-color: ${"var(--ds-background-neutral-subtle-pressed, rgb(179, 212, 255))"};
68
58
  }`}
69
- > span[aria-disabled='true'] {
70
- color: ${themed({
71
- light: `var(--ds-text-disabled, ${N70})`,
72
- dark: `var(--ds-text-disabled, ${DN80})`
73
- })(theme)};
74
- }
75
- :focus > span[aria-disabled='false'] {
76
- ${focusedMenuItemStyle};
77
- }
78
- :focus-visible,
79
- :focus-visible > span[aria-disabled='false'] {
80
- outline: none;
81
- }
82
- `; // The default focus-visible style is removed to ensure consistency across browsers
59
+ > span[aria-disabled='true'] {
60
+ color: ${`var(--ds-text-disabled, ${N70})`};
61
+ }
62
+ :focus > span[aria-disabled='false'] {
63
+ ${focusedMenuItemStyle};
64
+ }
65
+ :focus-visible,
66
+ :focus-visible > span[aria-disabled='false'] {
67
+ outline: none;
68
+ }
69
+ `; // The default focus-visible style is removed to ensure consistency across browsers
83
70
  }
84
71
  };
85
72
 
@@ -298,9 +285,7 @@ function DropdownMenuItem({
298
285
  setSubmenuActive(!!event.target.closest(`.${DropdownMenuSharedCssClassName.SUBMENU}`));
299
286
  };
300
287
  const dropListItem = jsx("div", {
301
- css: theme => buttonStyles(item.isActive, submenuActive)({
302
- theme
303
- }),
288
+ css: () => buttonStyles(item.isActive, submenuActive),
304
289
  tabIndex: -1,
305
290
  "aria-disabled": item.isDisabled ? 'true' : 'false',
306
291
  onMouseDown: _handleSubmenuActive
@@ -1,3 +1,22 @@
1
+ import { headingSizes } from '@atlaskit/theme/typography';
1
2
  export var DEFAULT_IMAGE_WIDTH = 250;
2
3
  export var DEFAULT_IMAGE_HEIGHT = 200;
3
- export var DEFAULT_INLINE_IMAGE_ASPECT_RATIO = DEFAULT_IMAGE_WIDTH / DEFAULT_IMAGE_HEIGHT;
4
+ export var DEFAULT_INLINE_IMAGE_ASPECT_RATIO = DEFAULT_IMAGE_WIDTH / DEFAULT_IMAGE_HEIGHT;
5
+ /**
6
+ * Reference Heights
7
+ *
8
+ * These heights enforce consistent sizes with media inline nodes due to
9
+ * inconsistencies with center aligned inline nodes and text.
10
+ *
11
+ * There is conversation about refactoring media inline nodes to conform to
12
+ * aligning correctly with the surrounding text.
13
+ */
14
+ export var referenceHeights = {
15
+ p: headingSizes.h600.lineHeight - 2,
16
+ h1: headingSizes.h800.lineHeight + 4,
17
+ h2: headingSizes.h700.lineHeight + 3,
18
+ h3: headingSizes.h600.lineHeight + 1,
19
+ h4: headingSizes.h500.lineHeight + 3,
20
+ h5: headingSizes.h400.lineHeight + 4,
21
+ h6: headingSizes.h300.lineHeight + 2
22
+ };
@@ -4,8 +4,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import { css, jsx } from '@emotion/react';
5
5
  import { B300 } from '@atlaskit/theme/colors';
6
6
  var wrapperStyle = css({
7
- display: 'inline-block',
8
- verticalAlign: 'text-bottom',
7
+ display: 'inline-flex',
8
+ justifyContent: 'center',
9
+ alignItems: 'center',
10
+ verticalAlign: 'middle',
9
11
  overflow: 'hidden',
10
12
  borderRadius: "var(--ds-border-radius, 3px)",
11
13
  aspectRatio: "var(".concat(INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY, ", ").concat(DEFAULT_INLINE_IMAGE_ASPECT_RATIO, ")")
@@ -5,8 +5,8 @@ import { useEffect, useMemo, useState } from 'react';
5
5
  import { jsx } from '@emotion/react';
6
6
  import { createIntl, injectIntl } from 'react-intl-next';
7
7
  import { Card } from '@atlaskit/media-card';
8
- import { headingSizes } from '@atlaskit/theme/typography';
9
8
  import { messages } from '../messages/media-inline-card';
9
+ import { referenceHeights } from './constants';
10
10
  import { InlineImageWrapper } from './inline-image-wrapper';
11
11
  import { InlineImageCardErrorView } from './views/error-view';
12
12
  import { InlineImageCardLoadingView } from './views/loading-view';
@@ -102,8 +102,8 @@ export var MediaInlineImageCardInternal = function MediaInlineImageCardInternal(
102
102
  };
103
103
  }
104
104
  return {
105
- width: Math.round(aspectRatio * headingSizes.h800.lineHeight),
106
- height: headingSizes.h800.lineHeight
105
+ width: Math.round(aspectRatio * referenceHeights['h1']),
106
+ height: referenceHeights['h1']
107
107
  };
108
108
  }, [width, height, aspectRatio]);
109
109
  return jsx(InlineImageWrapper, {
@@ -1,10 +1,18 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  var _templateObject, _templateObject2;
3
3
  import { css } from '@emotion/react';
4
- import { headingSizes } from '@atlaskit/theme/typography';
4
+ import { referenceHeights } from './constants';
5
5
  export var INLINE_IMAGE_WRAPPER_CLASS_NAME = 'media-inline-image-wrapper';
6
6
  export var INLINE_IMAGE_ASPECT_RATIO_CSS_VAR_KEY = '--editor-media-inline-image-aspect-ratio';
7
7
  var inlineImageHeight = function inlineImageHeight(height) {
8
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > .", ",\n > .mediaInlineView-content-wrap\n > .", " {\n height: ", "px;\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, height);
8
+ var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
9
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n > .", ",\n > .mediaInlineView-content-wrap\n > .", " {\n height: ", "px;\n transform: translateY(", "px);\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, INLINE_IMAGE_WRAPPER_CLASS_NAME, height, margin);
9
10
  };
10
- export var mediaInlineImageStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n // default inline image height is 24px, this includes\n // p, h3, and action items\n .", " {\n height: ", "px;\n }\n\n h1 {\n ", "\n }\n\n h2 {\n ", "\n }\n\n h4 {\n ", "\n }\n\n h5,\n h6 {\n ", "\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, headingSizes.h600.lineHeight, inlineImageHeight(headingSizes.h800.lineHeight), inlineImageHeight(headingSizes.h700.lineHeight), inlineImageHeight(headingSizes.h500.lineHeight), inlineImageHeight(headingSizes.h400.lineHeight));
11
+
12
+ /**
13
+ * Shifting the mediaInline image component (renders image) to align nicely with
14
+ * mediaInline (renders text) is a bit of a testing ground. This numbers represent
15
+ * shift in top and bottom and size adjustments to make up for lack of 1to1 size
16
+ * mapping
17
+ */
18
+ export var mediaInlineImageStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n // p, h3, and action items\n .", " {\n height: ", "px;\n transform: translateY(-2px);\n }\n\n h1 {\n ", "\n }\n\n h2 {\n ", "\n }\n\n h3 {\n ", "\n }\n\n h4 {\n ", "\n }\n\n h5 {\n ", "\n }\n\n h6 {\n ", "\n }\n"])), INLINE_IMAGE_WRAPPER_CLASS_NAME, referenceHeights['p'], inlineImageHeight(referenceHeights['h1'], -3), inlineImageHeight(referenceHeights['h2'], -3), inlineImageHeight(referenceHeights['h3'], -2), inlineImageHeight(referenceHeights['h4'], -2), inlineImageHeight(referenceHeights['h5'], -2), inlineImageHeight(referenceHeights['h6'], -2));
@@ -4,7 +4,7 @@ import { css, jsx } from '@emotion/react';
4
4
  var wrapperStyle = css({
5
5
  display: 'flex',
6
6
  'span > svg': {
7
- verticalAlign: 'baseline'
7
+ verticalAlign: 'top'
8
8
  }
9
9
  });
10
10
  export var IconWrapper = function IconWrapper(_ref) {
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  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; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "76.27.9";
9
+ var packageVersion = "76.27.10";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -2,37 +2,20 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject, _templateObject2, _templateObject3;
3
3
  import { css } from '@emotion/react';
4
4
  import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
5
- import { themed } from '@atlaskit/theme/components';
6
5
  export var annotationPrefix = 'ak-editor-annotation';
7
6
  export var AnnotationSharedClassNames = {
8
7
  focus: "".concat(annotationPrefix, "-focus"),
9
8
  blur: "".concat(annotationPrefix, "-blur"),
10
9
  draft: "".concat(annotationPrefix, "-draft")
11
10
  };
12
- var DY75 = 'rgb(111, 92, 37)';
13
- var DY300 = '#ffd557';
14
11
  var Y75a = 'rgba(255, 240, 179, 0.5)';
15
12
  var Y200a = 'rgba(255, 196, 0, 0.82)';
16
- var DY75a = 'rgba(111, 92, 37, 0.5)';
17
- var DY200 = '#82641c';
18
- export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
13
+ export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
19
14
  return {
20
- focus: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n // Background is not coming through in confluence, suspecting to be caused by some specific combination of\n // emotion and token look up\n\n background: ", ";\n border-bottom: 2px solid\n ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4147\n box-shadow: ", ";\n cursor: pointer;\n "])), themed({
21
- light: "var(--ds-background-accent-yellow-subtler, ".concat(Y75, ")"),
22
- dark: "var(--ds-background-accent-yellow-subtler, ".concat(DY75, ")")
23
- })(props), themed({
24
- light: "var(--ds-border-accent-yellow, ".concat(Y300, ")"),
25
- dark: "var(--ds-border-accent-yellow, ".concat(DY300, ")")
26
- })(props), "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(N60A, ", -1px 2px 3px ").concat(N60A), ")")),
27
- blur: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-bottom: 2px solid\n ", ";\n cursor: pointer;\n "])), themed({
28
- light: "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"),
29
- dark: "var(--ds-background-accent-yellow-subtlest, ".concat(DY75a, ")")
30
- })(props), themed({
31
- light: "var(--ds-border-accent-yellow, ".concat(Y200a, ")"),
32
- dark: "var(--ds-border-accent-yellow, ".concat(DY200, ")")
33
- })(props))
15
+ focus: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n // Background is not coming through in confluence, suspecting to be caused by some specific combination of\n // emotion and token look up\n\n background: ", ";\n border-bottom: 2px solid ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4147\n box-shadow: ", ";\n cursor: pointer;\n "])), "var(--ds-background-accent-yellow-subtler, ".concat(Y75, ")"), "var(--ds-border-accent-yellow, ".concat(Y300, ")"), "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(N60A, ", -1px 2px 3px ").concat(N60A), ")")),
16
+ blur: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n border-bottom: 2px solid ", ";\n cursor: pointer;\n "])), "var(--ds-background-accent-yellow-subtlest, ".concat(Y75a, ")"), "var(--ds-border-accent-yellow, ".concat(Y200a, ")"))
34
17
  };
35
18
  };
36
- export var annotationSharedStyles = function annotationSharedStyles(props) {
37
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState(props).focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState(props).focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState(props).blur);
19
+ export var annotationSharedStyles = function annotationSharedStyles() {
20
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur);
38
21
  };
@@ -2,9 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject, _templateObject2;
3
3
  import { css } from '@emotion/react';
4
4
  import { akEditorCodeFontFamily, akEditorLineHeight, akEditorTableCellMinWidth, blockNodesVerticalMargin, overflowShadow, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
5
- import { DN20, DN400, DN50, DN800, N20, N30, N400, N800 } from '@atlaskit/theme/colors';
6
- import { themed } from '@atlaskit/theme/components';
7
- import { borderRadius, fontSize } from '@atlaskit/theme/constants';
5
+ import { N20, N30, N400, N800 } from '@atlaskit/theme/colors';
6
+ import { fontSize } from '@atlaskit/theme/constants';
8
7
  export var CodeBlockSharedCssClassName = {
9
8
  CODEBLOCK_CONTAINER: 'code-block',
10
9
  CODEBLOCK_START: 'code-block--start',
@@ -14,25 +13,10 @@ export var CodeBlockSharedCssClassName = {
14
13
  CODEBLOCK_CONTENT: 'code-content',
15
14
  DS_CODEBLOCK: '[data-ds--code--code-block]'
16
15
  };
17
- export var codeBlockSharedStyles = function codeBlockSharedStyles(props) {
18
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", "px;\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", "px;\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-size: ", " 100%,\n ", " 100%, ", " 100%,\n ", " 100%, ", " 100%,\n 1px 100%, ", " 100%, 1px 100%;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n\n /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n overflow-y: hidden;\n }\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", ";\n position: relative;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", "px;\n margin: ", ";\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, transparent)", borderRadius(), blockNodesVerticalMargin, akEditorCodeFontFamily, akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, themed({
19
- light: "var(--ds-background-neutral, ".concat(N20, ")"),
20
- dark: "var(--ds-background-neutral, ".concat(DN50, ")")
21
- })(props), borderRadius(), overflowShadow({
22
- background: themed({
23
- light: "var(--ds-background-neutral, ".concat(N20, ")"),
24
- dark: "var(--ds-background-neutral, ".concat(DN50, ")")
25
- })(props),
16
+ export var codeBlockSharedStyles = function codeBlockSharedStyles() {
17
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n background-color: ", ";\n border-radius: ", ";\n margin: ", " 0 0 0;\n font-family: ", ";\n min-width: ", "px;\n cursor: pointer;\n\n --ds--code--bg-color: transparent;\n\n /* This is necessary to allow for arrow key navigation in/out of code blocks in Firefox. */\n white-space: normal;\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n top: 0px;\n left: 0px;\n }\n\n .", " {\n position: absolute;\n visibility: hidden;\n height: 1.5rem;\n bottom: 0px;\n right: 0px;\n }\n\n .", " {\n background-color: ", ";\n display: flex;\n border-radius: ", ";\n width: 100%;\n counter-reset: line;\n overflow-x: auto;\n\n background-image: ", ";\n\n background-repeat: no-repeat;\n background-attachment: local, local, local, local, scroll, scroll, scroll,\n scroll;\n background-size: ", " 100%,\n ", " 100%, ", " 100%,\n ", " 100%, ", " 100%,\n 1px 100%, ", " 100%, 1px 100%;\n background-position: 0 0, 0 0, 100% 0, 100% 0, 100% 0, 100% 0, 0 0, 0 0;\n\n /* Be careful if refactoring this; it is needed to keep arrow key navigation in Firefox consistent with other browsers. */\n overflow-y: hidden;\n }\n\n .", " {\n flex-shrink: 0;\n text-align: right;\n background-color: ", ";\n padding: ", ";\n position: relative;\n\n span {\n display: block;\n line-height: 0;\n font-size: 0;\n\n ::before {\n display: inline-block;\n content: counter(line);\n counter-increment: line;\n color: ", ";\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n\n .", " {\n display: flex;\n flex: 1;\n\n code {\n flex-grow: 1;\n tab-size: 4;\n cursor: text;\n color: ", ";\n border-radius: ", ";\n margin: ", ";\n white-space: pre;\n font-size: ", ";\n line-height: 1.5rem;\n }\n }\n }\n"])), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, transparent)", "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, akEditorCodeFontFamily, akEditorTableCellMinWidth, CodeBlockSharedCssClassName.CODEBLOCK_START, CodeBlockSharedCssClassName.CODEBLOCK_END, CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, "var(--ds-background-neutral, ".concat(N20, ")"), "var(--ds-border-radius, 3px)", overflowShadow({
18
+ background: "var(--ds-background-neutral, ".concat(N20, ")"),
26
19
  leftCoverWidth: "var(--ds-space-300, 24px)"
27
- }), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, themed({
28
- light: "var(--ds-background-neutral, ".concat(N30, ")"),
29
- dark: "var(--ds-background-neutral, ".concat(DN20, ")")
30
- })(props), "var(--ds-space-100, 8px)", themed({
31
- light: "var(--ds-text-subtlest, ".concat(N400, ")"),
32
- dark: "var(--ds-text-subtlest, ".concat(DN400, ")")
33
- })(props), relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, themed({
34
- light: "var(--ds-text, ".concat(N800, ")"),
35
- dark: "var(--ds-text, ".concat(DN800, ")")
36
- })(props), borderRadius(), "var(--ds-space-100, 8px)", relativeFontSizeToBase16(fontSize()));
20
+ }), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", "var(--ds-space-100, 8px)", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, ".concat(N30, ")"), "var(--ds-space-100, 8px)", "var(--ds-text-subtlest, ".concat(N400, ")"), relativeFontSizeToBase16(fontSize()), CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-text, ".concat(N800, ")"), "var(--ds-border-radius, 3px)", "var(--ds-space-100, 8px)", relativeFontSizeToBase16(fontSize()));
37
21
  };
38
22
  export var codeBlockInListSafariFix = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ::before {\n content: ' ';\n line-height: ", ";\n }\n\n > p:first-child,\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: -", "em !important;\n }\n"])), akEditorLineHeight, akEditorLineHeight);
@@ -2,11 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject;
3
3
  import { css } from '@emotion/react';
4
4
  import { getCodeStyles } from '@atlaskit/code/inline';
5
- import { DN70, N30A } from '@atlaskit/theme/colors';
6
- import { themed } from '@atlaskit/theme/components';
7
- export var codeMarkSharedStyles = function codeMarkSharedStyles(props) {
8
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), themed({
9
- light: "var(--ds-background-neutral, ".concat(N30A, ")"),
10
- dark: "var(--ds-background-neutral, ".concat(DN70, ")")
11
- })(props), getCodeStyles());
5
+ import { N30A } from '@atlaskit/theme/colors';
6
+ export var codeMarkSharedStyles = function codeMarkSharedStyles() {
7
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .code {\n --ds--code--bg-color: ", ";\n ", "\n }\n "])), "var(--ds-background-neutral, ".concat(N30A, ")"), getCodeStyles());
12
8
  };
@@ -8,10 +8,7 @@ import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
8
8
  import { akEditorTableCellMinWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
9
9
  import { akEditorCustomIconSize } from '@atlaskit/editor-shared-styles/consts';
10
10
  import { emojiImage, emojiSprite } from '@atlaskit/emoji';
11
- import { B100, B400, B50, B75, G200, G400, G50, G75, N0, N20, N60, P100, P400, P50, P75, R100, R200, R400, R50, R75, T100, T50, T75, Y100, Y200, Y400, Y50, Y75 } from '@atlaskit/theme/colors';
12
- import { themed } from '@atlaskit/theme/components';
13
- // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
14
- import { borderRadius, gridSize } from '@atlaskit/theme/constants';
11
+ import { B100, B400, B50, B75, G200, G400, G50, G75, N0, N20, N60, P100, P400, P50, P75, R100, R400, R50, R75, T100, T50, T75, Y200, Y400, Y50, Y75 } from '@atlaskit/theme/colors';
15
12
  var lightPanelColors = {
16
13
  info: B50,
17
14
  note: P50,
@@ -90,28 +87,10 @@ var lightIconColor = {
90
87
  warning: "var(--ds-icon-warning, ".concat(Y400, ")"),
91
88
  error: "var(--ds-icon-danger, ".concat(R400, ")")
92
89
  };
93
- var darkIconColor = {
94
- info: "var(--ds-icon-information, ".concat(B100, ")"),
95
- note: "var(--ds-icon-discovery, ".concat(P100, ")"),
96
- tip: "var(--ds-icon-success, ".concat(G200, ")"),
97
- success: "var(--ds-icon-success, ".concat(G200, ")"),
98
- warning: "var(--ds-icon-warning, ".concat(Y100, ")"),
99
- error: "var(--ds-icon-danger, ".concat(R200, ")")
100
- };
101
- var tokenDarkPanelColors = {
102
- info: "var(--ds-background-information, ".concat(darkPanelColors['info'], ")"),
103
- note: "var(--ds-background-discovery, ".concat(darkPanelColors['note'], ")"),
104
- tip: "var(--ds-background-success, ".concat(darkPanelColors['tip'], ")"),
105
- success: "var(--ds-background-success, ".concat(darkPanelColors['success'], ")"),
106
- warning: "var(--ds-background-warning, ".concat(darkPanelColors['warning'], ")"),
107
- error: "var(--ds-background-danger, ".concat(darkPanelColors['error'], ")")
108
- };
109
90
 
110
- // TODO: Migrate away from gridSize
111
- // Recommendation: Replace gridSize with 8
112
91
  // New custom icons are a little smaller than predefined icons.
113
92
  // To fix alignment issues with custom icons, vertical alignment is updated.
114
- var panelEmojiSpriteVerticalAlignment = -(gridSize() * 3 - akEditorCustomIconSize) / 2;
93
+ var panelEmojiSpriteVerticalAlignment = -(8 * 3 - akEditorCustomIconSize) / 2;
115
94
  var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
116
95
 
117
96
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4066
@@ -165,54 +144,22 @@ export var PanelSharedSelectors = {
165
144
  copyButton: "button[aria-label=\"Copy\"]"
166
145
  };
167
146
  var iconDynamicStyles = function iconDynamicStyles(panelType) {
168
- return function (props) {
169
- var light = lightIconColor[panelType];
170
- var dark = darkIconColor[panelType];
171
- var color = themed({
172
- light: light,
173
- dark: dark
174
- })(props);
175
- return "\n color: ".concat(color, ";\n ");
176
- };
147
+ return "color: ".concat(lightIconColor[panelType], ";");
177
148
  };
178
149
 
179
150
  // Provides the color without tokens, used when converting to a custom panel
180
151
  export var getPanelTypeBackgroundNoTokens = function getPanelTypeBackgroundNoTokens(panelType) {
181
- var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
182
- var light = lightPanelColors[panelType];
183
- var dark = darkPanelColors[panelType];
184
- var background = themed({
185
- light: light,
186
- dark: dark
187
- })(props);
188
- return background || 'none';
152
+ return lightPanelColors[panelType] || 'none';
189
153
  };
190
154
  export var getPanelTypeBackground = function getPanelTypeBackground(panelType) {
191
- var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
192
- var light = hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]);
193
- // hexToEditorBackgroundPaletteColor has a light mode as a fallback color - for legacy dark mode we define the tokens locally
194
- var dark = tokenDarkPanelColors[panelType];
195
- var background = themed({
196
- light: light,
197
- dark: dark
198
- })(props);
199
- return background || 'none';
155
+ return hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]) || 'none';
200
156
  };
201
157
  var mainDynamicStyles = function mainDynamicStyles(panelType) {
202
- return function (props) {
203
- var background = getPanelTypeBackground(panelType, props);
204
- var text = themed({
205
- light: 'inherit',
206
- dark: darkPanelColors.TextColor
207
- })(props);
208
- return "\n background-color: ".concat(background, ";\n color: ").concat(text, ";\n ");
209
- };
158
+ return "\n background-color: ".concat(getPanelTypeBackground(panelType), ";\n color: inherit;\n ");
210
159
  };
211
- export var panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix(props) {
212
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", "px;\n margin: ", " 0 0;\n padding: ", ";\n min-width: ", "px;\n display: flex;\n position: relative;\n align-items: baseline;\n word-break: break-word;\n\n ", "\n\n .", " {\n flex-shrink: 0;\n height: ", ";\n width: ", ";\n box-sizing: content-box;\n padding-right: ", ";\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n ", "\n\n > span {\n vertical-align: middle;\n display: inline-flex;\n }\n\n .", " {\n vertical-align: ", "px;\n }\n\n .", " {\n vertical-align: ", "px;\n\n // Vertical align only works for inline-block elements in Firefox\n @-moz-document url-prefix() {\n img {\n display: inline-block;\n }\n }\n }\n }\n\n .ak-editor-panel__content {\n margin: 1px 0 1px;\n flex: 1 0 0;\n /*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n min-width: 0;\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", ";\n }\n"])), borderRadius(), blockNodesVerticalMargin, "var(--ds-space-100, 8px)", akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO)(props), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", iconDynamicStyles(PanelType.INFO)(props), emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, PanelType.NOTE, mainDynamicStyles(PanelType.NOTE)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE)(props), PanelType.TIP, mainDynamicStyles(PanelType.TIP)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP)(props), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING)(props), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR)(props), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS)(props), PanelType.CUSTOM, themed({
213
- dark: getPanelBackgroundDarkModeColors
214
- })(props));
160
+ export var panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix() {
161
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n margin: ", " 0 0;\n padding: ", ";\n min-width: ", "px;\n display: flex;\n position: relative;\n align-items: baseline;\n word-break: break-word;\n\n ", "\n\n .", " {\n flex-shrink: 0;\n height: ", ";\n width: ", ";\n box-sizing: content-box;\n padding-right: ", ";\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n ", "\n\n > span {\n vertical-align: middle;\n display: inline-flex;\n }\n\n .", " {\n vertical-align: ", "px;\n }\n\n .", " {\n vertical-align: ", "px;\n\n // Vertical align only works for inline-block elements in Firefox\n @-moz-document url-prefix() {\n img {\n display: inline-block;\n }\n }\n }\n }\n\n .ak-editor-panel__content {\n margin: 1px 0 1px;\n flex: 1 0 0;\n /*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n min-width: 0;\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n"])), "var(--ds-border-radius, 3px)", blockNodesVerticalMargin, "var(--ds-space-100, 8px)", akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO), PanelSharedCssClassName.icon, "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", iconDynamicStyles(PanelType.INFO), emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, PanelType.NOTE, mainDynamicStyles(PanelType.NOTE), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE), PanelType.TIP, mainDynamicStyles(PanelType.TIP), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS));
215
162
  };
216
- export var panelSharedStyles = function panelSharedStyles(props) {
217
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n ", "\n }\n"])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix(props));
163
+ export var panelSharedStyles = function panelSharedStyles() {
164
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .", " {\n ", "\n }\n"])), PanelSharedCssClassName.prefix, panelSharedStylesWithoutPrefix());
218
165
  };
@@ -2,14 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject;
3
3
  import { css } from '@emotion/react';
4
4
  import { akEditorLineHeight } from '@atlaskit/editor-shared-styles';
5
- import { DN50, N30A } from '@atlaskit/theme/colors';
6
- import { themed } from '@atlaskit/theme/components';
7
- var divider = themed({
8
- light: "var(--ds-border, ".concat(N30A, ")"),
9
- dark: "var(--ds-border, ".concat(DN50, ")")
10
- });
11
-
5
+ import { N30A } from '@atlaskit/theme/colors';
12
6
  // @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
13
- export var ruleSharedStyles = function ruleSharedStyles(props) {
14
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & hr {\n border: none;\n background-color: ", ";\n margin: ", "em 0;\n height: 2px;\n border-radius: 1px;\n }\n"])), divider(props), akEditorLineHeight);
7
+ export var ruleSharedStyles = function ruleSharedStyles() {
8
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & hr {\n border: none;\n background-color: ", ";\n margin: ", "em 0;\n height: 2px;\n border-radius: 1px;\n }\n"])), "var(--ds-border, ".concat(N30A, ")"), akEditorLineHeight);
15
9
  };
@@ -1,9 +1,7 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
1
  import React, { useMemo } from 'react';
3
2
  import { ThemeProvider } from '@emotion/react';
4
3
  import { akEditorDefaultLayoutWidth } from '@atlaskit/editor-shared-styles';
5
- import { useGlobalTheme } from '@atlaskit/theme/components';
6
- import { CHANNEL, fontSize } from '@atlaskit/theme/constants';
4
+ import { fontSize } from '@atlaskit/theme/constants';
7
5
  import { WidthConsumer } from '../WidthProvider';
8
6
  export function mapBreakpointToLayoutMaxWidth(breakpoint) {
9
7
  switch (breakpoint) {
@@ -17,25 +15,21 @@ export function mapBreakpointToLayoutMaxWidth(breakpoint) {
17
15
  export function BaseThemeWrapper(_ref) {
18
16
  var baseFontSize = _ref.baseFontSize,
19
17
  children = _ref.children;
20
- var _useGlobalTheme = useGlobalTheme(),
21
- mode = _useGlobalTheme.mode;
22
18
  var memoizedTheme = useMemo(function () {
23
- return _defineProperty({
19
+ return {
24
20
  baseFontSize: baseFontSize || fontSize(),
25
21
  layoutMaxWidth: akEditorDefaultLayoutWidth
26
- }, CHANNEL, {
27
- mode: mode
28
- });
29
- }, [baseFontSize, mode]);
22
+ };
23
+ }, [baseFontSize]);
30
24
  return /*#__PURE__*/React.createElement(ThemeProvider, {
31
25
  theme: memoizedTheme
32
26
  }, children);
33
27
  }
34
- export function BaseTheme(_ref3) {
35
- var children = _ref3.children,
36
- baseFontSize = _ref3.baseFontSize;
37
- return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref4) {
38
- var breakpoint = _ref4.breakpoint;
28
+ export function BaseTheme(_ref2) {
29
+ var children = _ref2.children,
30
+ baseFontSize = _ref2.baseFontSize;
31
+ return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref3) {
32
+ var breakpoint = _ref3.breakpoint;
39
33
  return /*#__PURE__*/React.createElement(BaseThemeWrapper, {
40
34
  breakpoint: breakpoint,
41
35
  baseFontSize: baseFontSize
@@ -14,12 +14,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
14
14
  import { Component } from 'react';
15
15
  import { css, jsx } from '@emotion/react';
16
16
  import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@atlaskit/analytics-next';
17
- import { DN50, DN600, N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
- import { themed } from '@atlaskit/theme/components';
19
- import { borderRadius } from '@atlaskit/theme/constants';
17
+ import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
20
18
  import Layer from '../Layer';
21
19
  var packageName = "@atlaskit/editor-common";
22
- var packageVersion = "76.27.9";
20
+ var packageVersion = "76.27.10";
23
21
  var halfFocusRing = 1;
24
22
  var dropOffset = '0, 8';
25
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -35,14 +33,8 @@ var DropList = /*#__PURE__*/function (_Component) {
35
33
  _defineProperty(_assertThisInitialized(_this), "wrapperStyles", css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n "])), _this.props.shouldFitContainer ? 'display: block; flex: 1 1 auto;' : 'display: inline-flex;'));
36
34
  _defineProperty(_assertThisInitialized(_this), "triggerStyles", css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition-duration: 0.2s;\n transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);\n ", "\n "])), _this.props.shouldFitContainer ? 'display: block; box-sizing: border-box;' : 'display: inline-flex;'));
37
35
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
38
- _defineProperty(_assertThisInitialized(_this), "menuWrapper", function (theme) {
39
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n box-sizing: border-box;\n overflow: auto;\n padding: ", " 0;\n max-height: 90vh;\n "])), themed({
40
- light: "var(--ds-text, ".concat(N900, ")"),
41
- dark: "var(--ds-text, ".concat(DN600, ")")
42
- })(theme), themed({
43
- light: "var(--ds-surface-overlay, ".concat(N0, ")"),
44
- dark: "var(--ds-surface-overlay, ".concat(DN50, ")")
45
- })(theme), borderRadius(), "var(--ds-shadow-overlay, ".concat("0 4px 8px calc(-1 * 2px) ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"), "var(--ds-space-050, 4px)");
36
+ _defineProperty(_assertThisInitialized(_this), "menuWrapper", function () {
37
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n box-sizing: border-box;\n overflow: auto;\n padding: ", " 0;\n max-height: 90vh;\n "])), "var(--ds-text, ".concat(N900, ")"), "var(--ds-surface-overlay, ".concat(N0, ")"), "var(--ds-border-radius, 3px)", "var(--ds-shadow-overlay, ".concat("0 4px 8px calc(-1 * 2px) ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"), "var(--ds-space-050, 4px)");
46
38
  });
47
39
  /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
48
40
  _defineProperty(_assertThisInitialized(_this), "componentDidMount", function () {
@@ -118,7 +110,6 @@ var DropList = /*#__PURE__*/function (_Component) {
118
110
  _createClass(DropList, [{
119
111
  key: "render",
120
112
  value: function render() {
121
- var _this2 = this;
122
113
  var _this$props = this.props,
123
114
  children = _this$props.children,
124
115
  isOpen = _this$props.isOpen,
@@ -128,11 +119,7 @@ var DropList = /*#__PURE__*/function (_Component) {
128
119
  testId = _this$props.testId,
129
120
  id = _this$props.id;
130
121
  var layerContent = isOpen ? jsx("div", {
131
- css: function css(theme) {
132
- return _this2.menuWrapper({
133
- theme: theme
134
- });
135
- },
122
+ css: this.menuWrapper,
136
123
  "data-role": "droplistContent",
137
124
  "data-testid": testId && "".concat(testId, "--content"),
138
125
  ref: this.handleContentRef,