@atlaskit/editor-common 78.30.0 → 78.30.2

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 (84) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/analytics/fire-analytics-event.js +5 -16
  3. package/dist/cjs/card/LinkToolbarButtonGroup.js +12 -6
  4. package/dist/cjs/element-browser/ViewMore.js +13 -5
  5. package/dist/cjs/element-browser/components/ElementBrowserLoader.js +9 -6
  6. package/dist/cjs/element-browser/components/ElementList/NotFoundIllustration.js +6 -4
  7. package/dist/cjs/element-browser/hooks/use-container-width.js +5 -4
  8. package/dist/cjs/expand/index.js +8 -2
  9. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +38 -11
  10. package/dist/cjs/messages/table.js +10 -0
  11. package/dist/cjs/monitoring/error.js +1 -1
  12. package/dist/cjs/ui/Caption/index.js +13 -6
  13. package/dist/cjs/ui/DropList/index.js +23 -6
  14. package/dist/cjs/ui/Expand/index.js +81 -9
  15. package/dist/cjs/ui/FloatingToolbar/Separator.js +8 -4
  16. package/dist/cjs/ui/FloatingToolbar/SmallerEditIcon.js +4 -3
  17. package/dist/cjs/ui/MediaSingle/link.js +11 -4
  18. package/dist/cjs/ui/Messages/index.js +18 -6
  19. package/dist/cjs/ui/PanelTextInput/styles.js +30 -5
  20. package/dist/cjs/ui/UnsupportedBlock/index.js +19 -4
  21. package/dist/cjs/ui/WidthProvider/index.js +7 -4
  22. package/dist/cjs/ui-color/ColorPalette/styles.js +5 -4
  23. package/dist/cjs/ui-menu/DropdownMenu/index.js +15 -5
  24. package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +8 -6
  25. package/dist/cjs/ui-menu/ToolbarButton/index.js +8 -7
  26. package/dist/es2019/analytics/fire-analytics-event.js +5 -16
  27. package/dist/es2019/card/LinkToolbarButtonGroup.js +12 -12
  28. package/dist/es2019/element-browser/ViewMore.js +12 -12
  29. package/dist/es2019/element-browser/components/ElementBrowserLoader.js +7 -7
  30. package/dist/es2019/element-browser/components/ElementList/NotFoundIllustration.js +5 -5
  31. package/dist/es2019/element-browser/hooks/use-container-width.js +3 -3
  32. package/dist/es2019/expand/index.js +7 -1
  33. package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +37 -37
  34. package/dist/es2019/messages/table.js +10 -0
  35. package/dist/es2019/monitoring/error.js +1 -1
  36. package/dist/es2019/ui/Caption/index.js +12 -12
  37. package/dist/es2019/ui/DropList/index.js +23 -21
  38. package/dist/es2019/ui/Expand/index.js +71 -78
  39. package/dist/es2019/ui/FloatingToolbar/Separator.js +7 -7
  40. package/dist/es2019/ui/FloatingToolbar/SmallerEditIcon.js +3 -3
  41. package/dist/es2019/ui/MediaSingle/link.js +11 -11
  42. package/dist/es2019/ui/Messages/index.js +17 -17
  43. package/dist/es2019/ui/PanelTextInput/styles.js +26 -30
  44. package/dist/es2019/ui/UnsupportedBlock/index.js +17 -17
  45. package/dist/es2019/ui/WidthProvider/index.js +5 -4
  46. package/dist/es2019/ui-color/ColorPalette/styles.js +4 -4
  47. package/dist/es2019/ui-menu/DropdownMenu/index.js +10 -8
  48. package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -5
  49. package/dist/es2019/ui-menu/ToolbarButton/index.js +4 -4
  50. package/dist/esm/analytics/fire-analytics-event.js +5 -16
  51. package/dist/esm/card/LinkToolbarButtonGroup.js +12 -6
  52. package/dist/esm/element-browser/ViewMore.js +12 -4
  53. package/dist/esm/element-browser/components/ElementBrowserLoader.js +7 -3
  54. package/dist/esm/element-browser/components/ElementList/NotFoundIllustration.js +5 -3
  55. package/dist/esm/element-browser/hooks/use-container-width.js +3 -3
  56. package/dist/esm/expand/index.js +7 -1
  57. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +37 -9
  58. package/dist/esm/messages/table.js +10 -0
  59. package/dist/esm/monitoring/error.js +1 -1
  60. package/dist/esm/ui/Caption/index.js +12 -4
  61. package/dist/esm/ui/DropList/index.js +23 -6
  62. package/dist/esm/ui/Expand/index.js +81 -9
  63. package/dist/esm/ui/FloatingToolbar/Separator.js +7 -3
  64. package/dist/esm/ui/FloatingToolbar/SmallerEditIcon.js +3 -3
  65. package/dist/esm/ui/MediaSingle/link.js +11 -3
  66. package/dist/esm/ui/Messages/index.js +17 -6
  67. package/dist/esm/ui/PanelTextInput/styles.js +30 -4
  68. package/dist/esm/ui/UnsupportedBlock/index.js +17 -3
  69. package/dist/esm/ui/WidthProvider/index.js +5 -3
  70. package/dist/esm/ui-color/ColorPalette/styles.js +5 -3
  71. package/dist/esm/ui-menu/DropdownMenu/index.js +15 -5
  72. package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +5 -3
  73. package/dist/esm/ui-menu/ToolbarButton/index.js +4 -3
  74. package/dist/types/expand/index.d.ts +1 -0
  75. package/dist/types/messages/table.d.ts +10 -0
  76. package/dist/types/types/feature-flags.d.ts +2 -0
  77. package/dist/types/ui/Caption/index.d.ts +1 -1
  78. package/dist/types/ui/UnsupportedBlock/index.d.ts +3 -3
  79. package/dist/types-ts4.5/expand/index.d.ts +1 -0
  80. package/dist/types-ts4.5/messages/table.d.ts +10 -0
  81. package/dist/types-ts4.5/types/feature-flags.d.ts +2 -0
  82. package/dist/types-ts4.5/ui/Caption/index.d.ts +1 -1
  83. package/dist/types-ts4.5/ui/UnsupportedBlock/index.d.ts +3 -3
  84. package/package.json +7 -7
@@ -5,18 +5,18 @@ import { css, jsx } from '@emotion/react';
5
5
  import { injectIntl } from 'react-intl-next';
6
6
  import { N200, N400 } from '@atlaskit/theme/colors';
7
7
  import { messages } from './messages';
8
- const captionWrapperStyle = css`
9
- margin-top: ${"var(--ds-space-100, 8px)"};
10
- text-align: center;
11
- position: relative;
12
- color: ${`var(--ds-text-subtle, ${N400})`};
13
- `;
14
- const placeholderStyle = css`
15
- color: ${`var(--ds-text-subtlest, ${N200})`};
16
- position: absolute;
17
- top: 0;
18
- width: 100%;
19
- `;
8
+ const captionWrapperStyle = css({
9
+ marginTop: "var(--ds-space-100, 8px)",
10
+ textAlign: 'center',
11
+ position: 'relative',
12
+ color: `var(--ds-text-subtle, ${N400})`
13
+ });
14
+ const placeholderStyle = css({
15
+ color: `var(--ds-text-subtlest, ${N200})`,
16
+ position: 'absolute',
17
+ top: 0,
18
+ width: '100%'
19
+ });
20
20
  export class CaptionComponent extends React.Component {
21
21
  render() {
22
22
  const {
@@ -7,34 +7,36 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "78.30.0";
10
+ const packageVersion = "78.30.2";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
14
14
  constructor(...args) {
15
15
  super(...args);
16
- _defineProperty(this, "wrapperStyles", css`
17
- ${this.props.shouldFitContainer ? 'display: block; flex: 1 1 auto;' : 'display: inline-flex;'}
18
- transition-duration: 0.2s;
19
- transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);
20
- `);
21
- _defineProperty(this, "triggerStyles", css`
22
- transition-duration: 0.2s;
23
- transition: box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);
24
- ${this.props.shouldFitContainer ? 'display: block; box-sizing: border-box;' : 'display: inline-flex;'}
25
- `);
16
+ _defineProperty(this, "wrapperStyles", css({
17
+ display: this.props.shouldFitContainer ? 'block' : 'inline-flex',
18
+ flex: this.props.shouldFitContainer ? '1 1 auto' : undefined,
19
+ transitionDuration: '0.2s',
20
+ transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)'
21
+ }));
22
+ _defineProperty(this, "triggerStyles", css({
23
+ transitionDuration: '0.2s',
24
+ transition: 'box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)',
25
+ display: this.props.shouldFitContainer ? 'block' : 'inline-flex',
26
+ boxSizing: this.props.shouldFitContainer ? 'border-box' : undefined
27
+ }));
26
28
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
27
29
  _defineProperty(this, "menuWrapper", () => {
28
- return css`
29
- color: ${`var(--ds-text, ${N900})`};
30
- background-color: ${`var(--ds-surface-overlay, ${N0})`};
31
- border-radius: ${"var(--ds-border-radius, 3px)"};
32
- box-shadow: ${`var(--ds-shadow-overlay, ${`0 4px 8px calc(-1 * 2px) ${N50A}, 0 0 1px ${N60A}`})`};
33
- box-sizing: border-box;
34
- overflow: auto;
35
- padding: ${"var(--ds-space-050, 4px)"} 0;
36
- max-height: 90vh;
37
- `;
30
+ return css({
31
+ color: `var(--ds-text, ${N900})`,
32
+ backgroundColor: `var(--ds-surface-overlay, ${N0})`,
33
+ borderRadius: "var(--ds-border-radius, 3px)",
34
+ boxShadow: `var(--ds-shadow-overlay, ${`0 4px 8px calc(-1 * 2px) ${N50A}, 0 0 1px ${N60A}`})`,
35
+ boxSizing: 'border-box',
36
+ overflow: 'auto',
37
+ padding: `${"var(--ds-space-050, 4px)"} 0`,
38
+ maxHeight: '90vh'
39
+ });
38
40
  });
39
41
  /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
40
42
  _defineProperty(this, "componentDidMount", () => {
@@ -44,31 +44,29 @@ export const ExpandIconWrapper = ({
44
44
  css: () => expanded ? [expandIconWrapperStyle(), expandIconWrapperExpandedStyle] : expandIconWrapperStyle()
45
45
  }, children);
46
46
  };
47
- const expandIconWrapperStyle = () => css`
48
- cursor: pointer;
49
- display: flex;
50
- color: ${`var(--ds-icon, ${N90})`};
51
- border-radius: ${"var(--ds-border-radius-100, 4px)"};
52
- width: 24px;
53
- height: 24px;
54
-
55
- &:hover {
56
- background: ${`var(--ds-background-neutral-subtle-hovered, ${N30A})`};
57
- }
58
-
59
- svg {
60
- transition: transform 0.2s ${akEditorSwoopCubicBezier};
47
+ const expandIconWrapperStyle = () => css({
48
+ cursor: 'pointer',
49
+ display: 'flex',
50
+ color: `var(--ds-icon, ${N90})`,
51
+ borderRadius: "var(--ds-border-radius-100, 4px)",
52
+ width: '24px',
53
+ height: '24px',
54
+ '&:hover': {
55
+ background: `var(--ds-background-neutral-subtle-hovered, ${N30A})`
56
+ },
57
+ svg: {
58
+ transition: `transform 0.2s ${akEditorSwoopCubicBezier}`
61
59
  }
62
- `;
63
- const expandIconWrapperExpandedStyle = css`
64
- svg {
65
- transform: rotate(90deg);
60
+ });
61
+ const expandIconWrapperExpandedStyle = css({
62
+ svg: {
63
+ transform: 'rotate(90deg)'
66
64
  }
67
- `;
68
- export const expandLayoutWrapperStyle = css`
69
- width: ${"var(--ds-space-300, 24px)"};
70
- height: ${"var(--ds-space-300, 24px)"};
71
- `;
65
+ });
66
+ export const expandLayoutWrapperStyle = css({
67
+ width: "var(--ds-space-300, 24px)",
68
+ height: "var(--ds-space-300, 24px)"
69
+ });
72
70
  export const ExpandLayoutWrapperWithRef = /*#__PURE__*/forwardRef((props, ref) => {
73
71
  const {
74
72
  children,
@@ -91,34 +89,31 @@ const containerStyles = styleProps => {
91
89
  // and is the root level expand.
92
90
  const marginHorizontal = styleProps['data-node-type'] === 'expand' ? `-${akLayoutGutterOffset}px` : 0;
93
91
  const margin = `${marginTop} ${marginHorizontal} ${marginBottom}`;
94
- return () => css`
95
- border-width: 1px;
96
- border-style: solid;
97
- border-color: ${focused ? EXPAND_FOCUSED_BORDER_COLOR : expanded ? EXPAND_EXPANDED_BORDER_COLOR : EXPAND_COLLAPSED_BORDER_COLOR};
98
- border-radius: ${BORDER_RADIUS};
99
- min-height: 25px;
100
- background: ${!expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND};
101
- margin: ${margin};
102
-
103
- transition: background 0.3s ${akEditorSwoopCubicBezier},
104
- border-color 0.3s ${akEditorSwoopCubicBezier};
105
- padding: ${"var(--ds-space-100, 8px)"};
106
-
107
- &:hover {
92
+ return () => css({
93
+ borderWidth: '1px',
94
+ borderStyle: 'solid',
95
+ borderColor: focused ? EXPAND_FOCUSED_BORDER_COLOR : expanded ? EXPAND_EXPANDED_BORDER_COLOR : EXPAND_COLLAPSED_BORDER_COLOR,
96
+ borderRadius: BORDER_RADIUS,
97
+ minHeight: '25px',
98
+ background: !expanded ? EXPAND_COLLAPSED_BACKGROUND : EXPAND_SELECTED_BACKGROUND,
99
+ margin: margin,
100
+ transition: `background 0.3s ${akEditorSwoopCubicBezier}, border-color 0.3s ${akEditorSwoopCubicBezier}`,
101
+ padding: "var(--ds-space-100, 8px)",
102
+ '&:hover': {
108
103
  // TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.
109
104
  // This is because the default state already uses the same token and, as such, the hover style won't change anything.
110
105
  // https://product-fabric.atlassian.net/browse/DSP-4152
111
- border: 1px solid ${`var(--ds-border, ${N50A})`};
112
- background: ${EXPAND_SELECTED_BACKGROUND};
113
- }
114
-
115
- td > :not(style):first-child,
116
- td > style:first-child + * {
117
- margin-top: 0;
106
+ border: `1px solid ${`var(--ds-border, ${N50A})`}`,
107
+ background: EXPAND_SELECTED_BACKGROUND
108
+ },
109
+ 'td > :not(style):first-child, td > style:first-child + *': {
110
+ marginTop: 0
118
111
  }
119
- `;
112
+ });
120
113
  };
121
- const contentStyles = styleProps => () => css`
114
+ const contentStyles = styleProps => () =>
115
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
116
+ css`
122
117
  padding-top: ${styleProps.expanded ? "var(--ds-space-100, 8px)" : "var(--ds-space-0, 0px)"};
123
118
  padding-right: ${"var(--ds-space-100, 8px)"};
124
119
  padding-left: ${"var(--ds-space-300, 24px)"};
@@ -146,40 +141,38 @@ const contentStyles = styleProps => () => css`
146
141
  }
147
142
  ` : ''}
148
143
  `;
149
- const titleInputStyles = () => css`
150
- outline: none;
151
- border: none;
152
- font-size: ${relativeFontSizeToBase16(fontSize())};
153
- line-height: ${akEditorLineHeight};
154
- font-weight: normal;
155
- color: ${`var(--ds-text-subtlest, ${N200A})`};
156
- background: transparent;
157
- display: flex;
158
- flex: 1;
159
- padding: 0 0 0 ${"var(--ds-space-050, 4px)"};
160
- width: 100%;
161
-
162
- &::placeholder {
163
- opacity: 1;
164
- color: ${`var(--ds-text-subtlest, ${N200})`};
144
+ const titleInputStyles = () => css({
145
+ outline: 'none',
146
+ border: 'none',
147
+ fontSize: relativeFontSizeToBase16(fontSize()),
148
+ lineHeight: akEditorLineHeight,
149
+ fontWeight: 'normal',
150
+ color: `var(--ds-text-subtlest, ${N200A})`,
151
+ background: 'transparent',
152
+ display: 'flex',
153
+ flex: 1,
154
+ padding: `0 0 0 ${"var(--ds-space-050, 4px)"}`,
155
+ width: '100%',
156
+ '&::placeholder': {
157
+ opacity: 1,
158
+ color: `var(--ds-text-subtlest, ${N200})`
165
159
  }
166
- `;
167
- const titleContainerStyles = () => css`
168
- padding: 0;
169
- display: flex;
170
- align-items: flex-start;
171
- background: none;
172
- border: none;
173
- font-size: ${relativeFontSizeToBase16(fontSize())};
174
- width: 100%;
175
- color: ${`var(--ds-text-subtle, ${N300A})`};
176
- overflow: hidden;
177
- cursor: pointer;
178
-
179
- &:focus {
180
- outline: 0;
160
+ });
161
+ const titleContainerStyles = () => css({
162
+ padding: 0,
163
+ display: 'flex',
164
+ alignItems: 'flex-start',
165
+ background: 'none',
166
+ border: 'none',
167
+ fontSize: relativeFontSizeToBase16(fontSize()),
168
+ width: '100%',
169
+ color: `var(--ds-text-subtle, ${N300A})`,
170
+ overflow: 'hidden',
171
+ cursor: 'pointer',
172
+ '&:focus': {
173
+ outline: 0
181
174
  }
182
- `;
175
+ });
183
176
  export const sharedExpandStyles = {
184
177
  titleInputStyles,
185
178
  titleContainerStyles,
@@ -1,13 +1,13 @@
1
1
  /** @jsx jsx */
2
2
  import { css, jsx } from '@emotion/react';
3
3
  import { N30 } from '@atlaskit/theme/colors';
4
- const separator = css`
5
- background: ${`var(--ds-border, ${N30})`};
6
- width: 1px;
7
- height: 20px;
8
- margin: 0 ${"var(--ds-space-050, 4px)"};
9
- align-self: center;
10
- `;
4
+ const separator = css({
5
+ background: `var(--ds-border, ${N30})`,
6
+ width: '1px',
7
+ height: '20px',
8
+ margin: `0 ${"var(--ds-space-050, 4px)"}`,
9
+ alignSelf: 'center'
10
+ });
11
11
  export default (() => jsx("div", {
12
12
  css: separator,
13
13
  className: "separator"
@@ -1,9 +1,9 @@
1
1
  /** @jsx jsx */
2
2
  import { css, jsx } from '@emotion/react';
3
3
  import EditIcon from '@atlaskit/icon/glyph/edit';
4
- const editIconStyles = css`
5
- width: 20px;
6
- `;
4
+ const editIconStyles = css({
5
+ width: '20px'
6
+ });
7
7
 
8
8
  /* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
9
9
  export const SmallerEditIcon = () => {
@@ -1,12 +1,12 @@
1
1
  import { css } from '@emotion/react';
2
- export const mediaLinkStyle = css`
3
- position: absolute;
4
- background: transparent;
5
- top: 0;
6
- right: 0;
7
- bottom: 0;
8
- left: 0;
9
- cursor: pointer;
10
- width: 100%;
11
- height: 100%;
12
- `;
2
+ export const mediaLinkStyle = css({
3
+ position: 'absolute',
4
+ background: 'transparent',
5
+ top: 0,
6
+ right: 0,
7
+ bottom: 0,
8
+ left: 0,
9
+ cursor: 'pointer',
10
+ width: '100%',
11
+ height: '100%'
12
+ });
@@ -5,23 +5,23 @@ import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
5
5
  import ErrorIcon from '@atlaskit/icon/glyph/error';
6
6
  import { G400, N200, R400 } from '@atlaskit/theme/colors';
7
7
  import { h200 } from '@atlaskit/theme/typography';
8
- const errorColor = css`
9
- color: ${`var(--ds-text-danger, ${R400})`};
10
- `;
11
- const validColor = css`
12
- color: ${`var(--ds-text-success, ${G400})`};
13
- `;
14
- const messageStyle = () => css`
15
- ${h200()} font-weight: normal;
16
- color: ${`var(--ds-text-subtlest, ${N200})`};
17
- margin-top: ${"var(--ds-space-050, 4px)"};
18
- display: flex;
19
- justify-content: baseline;
20
- `;
21
- const iconWrapperStyle = css`
22
- display: flex;
23
- margin-right: ${"var(--ds-space-050, 4px)"};
24
- `;
8
+ const errorColor = css({
9
+ color: `var(--ds-text-danger, ${R400})`
10
+ });
11
+ const validColor = css({
12
+ color: `var(--ds-text-success, ${G400})`
13
+ });
14
+ const messageStyle = () => css(h200(), {
15
+ fontWeight: 'normal',
16
+ color: `var(--ds-text-subtlest, ${N200})`,
17
+ marginTop: "var(--ds-space-050, 4px)",
18
+ display: 'flex',
19
+ justifyContent: 'baseline'
20
+ });
21
+ const iconWrapperStyle = css({
22
+ display: 'flex',
23
+ marginRight: "var(--ds-space-050, 4px)"
24
+ });
25
25
  export const HelperMessage = ({
26
26
  children
27
27
  }) => jsx("div", {
@@ -2,37 +2,33 @@ import { css } from '@emotion/react';
2
2
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
3
3
  import { B100, N100, N30, N400 } from '@atlaskit/theme/colors';
4
4
  // Normal .className gets overridden by input[type=text] hence this hack to produce input.className
5
- export const panelTextInput = css`
6
- input& {
7
- background: transparent;
8
- border: 2px solid ${`var(--ds-border, ${N30})`};
9
- border-radius: 0;
10
- box-sizing: content-box;
11
- color: ${`var(--ds-text-subtle, ${N400})`};
12
- flex-grow: 1;
13
- font-size: ${relativeFontSizeToBase16(13)};
14
- line-height: 20px;
15
- padding: ${"var(--ds-space-075, 6px)"} ${"var(--ds-space-400, 32px)"}
16
- ${"var(--ds-space-075, 6px)"} ${"var(--ds-space-100, 8px)"};
17
- min-width: 145px;
18
-
5
+ export const panelTextInput = css({
6
+ 'input&': {
7
+ background: 'transparent',
8
+ border: `2px solid ${`var(--ds-border, ${N30})`}`,
9
+ borderRadius: 0,
10
+ boxSizing: 'content-box',
11
+ color: `var(--ds-text-subtle, ${N400})`,
12
+ flexGrow: 1,
13
+ fontSize: relativeFontSizeToBase16(13),
14
+ lineHeight: '20px',
15
+ padding: `${"var(--ds-space-075, 6px)"} ${"var(--ds-space-400, 32px)"} ${"var(--ds-space-075, 6px)"} ${"var(--ds-space-100, 8px)"}`,
16
+ minWidth: '145px',
19
17
  /* Hides IE10+ built-in [x] clear input button */
20
- &::-ms-clear {
21
- display: none;
22
- }
23
-
24
- &:focus {
25
- outline: none;
26
- border-color: ${`var(--ds-border-focused, ${B100})`};
27
- }
28
-
29
- &::placeholder {
30
- color: ${`var(--ds-text-subtlest, ${N100})`};
18
+ '&::-ms-clear': {
19
+ display: 'none'
20
+ },
21
+ '&:focus': {
22
+ outline: 'none',
23
+ borderColor: `var(--ds-border-focused, ${B100})`
24
+ },
25
+ '&::placeholder': {
26
+ color: `var(--ds-text-subtlest, ${N100})`
31
27
  }
32
28
  }
33
- `;
34
- export const panelTextInputWithCustomWidth = width => css`
35
- input& {
36
- width: ${width}px;
29
+ });
30
+ export const panelTextInputWithCustomWidth = width => css({
31
+ 'input&': {
32
+ width: `${width}px`
37
33
  }
38
- `;
34
+ });
@@ -11,23 +11,23 @@ import { ACTION_SUBJECT_ID } from '../../analytics';
11
11
  import { unsupportedContentMessages } from '../../messages/unsupportedContent';
12
12
  import { trackUnsupportedContentTooltipDisplayedFor } from '../../utils/track-unsupported-content';
13
13
  import { getUnsupportedContent } from '../unsupported-content-helper';
14
- const blockNodeStyle = css`
15
- background: ${`var(--ds-background-disabled, ${N30})`};
16
- border: 1px dashed ${`var(--ds-border-disabled, ${N50})`};
17
- border-radius: ${borderRadius()}px;
18
- box-sizing: border-box;
19
- cursor: default;
20
- display: flex;
21
- font-size: ${relativeFontSizeToBase16(fontSize())};
22
- margin: ${"var(--ds-space-100, 8px)"} 0;
23
- min-height: 24px;
24
- padding: ${"var(--ds-space-150, 12px)"};
25
- text-align: center;
26
- vertical-align: text-bottom;
27
- min-width: 120px;
28
- align-items: center;
29
- justify-content: center;
30
- `;
14
+ const blockNodeStyle = css({
15
+ background: `var(--ds-background-disabled, ${N30})`,
16
+ border: `1px dashed ${`var(--ds-border-disabled, ${N50})`}`,
17
+ borderRadius: `${borderRadius()}px`,
18
+ boxSizing: 'border-box',
19
+ cursor: 'default',
20
+ display: 'flex',
21
+ fontSize: relativeFontSizeToBase16(fontSize()),
22
+ margin: `${"var(--ds-space-100, 8px)"} 0`,
23
+ minHeight: '24px',
24
+ padding: "var(--ds-space-150, 12px)",
25
+ textAlign: 'center',
26
+ verticalAlign: 'text-bottom',
27
+ minWidth: '120px',
28
+ alignItems: 'center',
29
+ justifyContent: 'center'
30
+ });
31
31
  const UnsupportedBlockNode = ({
32
32
  node,
33
33
  intl,
@@ -3,6 +3,10 @@ import React, { Fragment } from 'react';
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import rafSchedule from 'raf-schd';
5
5
  import { WidthObserver } from '@atlaskit/width-detector';
6
+ const styles = css({
7
+ position: 'relative',
8
+ width: '100%'
9
+ });
6
10
  const SCROLLBAR_WIDTH = 30;
7
11
  export function getBreakpoint(width = 0) {
8
12
  const MAX_S = 1266;
@@ -42,10 +46,7 @@ export const WidthProvider = ({
42
46
  });
43
47
  const skipWidthDetection = shouldCheckExistingValue && existingContextValue.width > 0;
44
48
  return jsx("div", {
45
- css: css`
46
- position: relative;
47
- width: 100%;
48
- `,
49
+ css: styles,
49
50
  className: className
50
51
  }, !skipWidthDetection && jsx(Fragment, null, jsx(WidthObserver, {
51
52
  setWidth: updateWidth,
@@ -1,6 +1,6 @@
1
1
  import { css } from '@emotion/react';
2
- export const colorPaletteWrapper = css`
3
- padding: 0 ${"var(--ds-space-100, 8px)"};
2
+ export const colorPaletteWrapper = css({
3
+ padding: `0 ${"var(--ds-space-100, 8px)"}`,
4
4
  /* Firefox bug fix: https://product-fabric.atlassian.net/browse/ED-1789 */
5
- display: flex;
6
- `;
5
+ display: 'flex'
6
+ });
@@ -16,21 +16,22 @@ import DropList from '../../ui/DropList';
16
16
  import Popup from '../../ui/Popup';
17
17
  import { ArrowKeyNavigationProvider } from '../ArrowKeyNavigationProvider';
18
18
  import { ArrowKeyNavigationType } from '../ArrowKeyNavigationProvider/types';
19
- const wrapper = css`
19
+ const wrapper = css({
20
20
  /* tooltip in ToolbarButton is display:block */
21
- & > div > div {
22
- display: flex;
21
+ '& > div > div': {
22
+ display: 'flex'
23
23
  }
24
- `;
25
- const focusedMenuItemStyle = css`
26
- box-shadow: inset 0px 0px 0px 2px ${`var(--ds-border-focused, ${B100})`};
27
- outline: none;
28
- `;
24
+ });
25
+ const focusedMenuItemStyle = css({
26
+ boxShadow: `inset 0px 0px 0px 2px ${`var(--ds-border-focused, ${B100})`}`,
27
+ outline: 'none'
28
+ });
29
29
  const buttonStyles = (isActive, submenuActive) => {
30
30
  if (isActive) {
31
31
  /**
32
32
  * Hack for item to imitate old dropdown-menu selected styles
33
33
  */
34
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
34
35
  return css`
35
36
  > span,
36
37
  > span:hover,
@@ -47,6 +48,7 @@ const buttonStyles = (isActive, submenuActive) => {
47
48
  }
48
49
  `;
49
50
  } else {
51
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
50
52
  return css`
51
53
  > span:hover[aria-disabled='false'] {
52
54
  color: ${`var(--ds-text, ${N900})`};
@@ -15,11 +15,11 @@ export const KeyDownHandlerContext = /*#__PURE__*/React.createContext({
15
15
  handleArrowRight: () => {},
16
16
  handleTab: () => {}
17
17
  });
18
- const centeredToolbarContainer = css`
19
- display: flex;
20
- width: 100%;
21
- align-items: center;
22
- `;
18
+ const centeredToolbarContainer = css({
19
+ display: 'flex',
20
+ width: '100%',
21
+ alignItems: 'center'
22
+ });
23
23
 
24
24
  /**
25
25
  * This component is a wrapper of main toolbar which listens to keydown events of children
@@ -9,10 +9,10 @@ import Tooltip from '@atlaskit/tooltip';
9
9
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, TOOLBAR_ACTION_SUBJECT_ID } from '../../analytics';
10
10
  import Button from './styles';
11
11
  export const TOOLBAR_BUTTON = TOOLBAR_ACTION_SUBJECT_ID;
12
- const buttonWrapper = css`
13
- display: flex;
14
- height: 100%;
15
- `;
12
+ const buttonWrapper = css({
13
+ display: 'flex',
14
+ height: '100%'
15
+ });
16
16
  const ToolbarButton = /*#__PURE__*/React.forwardRef((props, ref) => {
17
17
  const {
18
18
  buttonId,
@@ -9,21 +9,10 @@ export var fireAnalyticsEvent = function fireAnalyticsEvent(createAnalyticsEvent
9
9
  if (!createAnalyticsEvent) {
10
10
  return;
11
11
  }
12
-
13
- // START TEMPORARY CODE ED-10584
14
- // __queueAnalytics property set in ReactEditorView based on featureFlags.queueAnalytics
15
- var queueAnalytics = Boolean(createAnalyticsEvent.__queueAnalytics);
16
- // END TEMPORARY CODE ED-10584
17
-
18
- if (queueAnalytics) {
19
- var queue = AnalyticsQueue.get();
20
- queue.schedule(function () {
21
- var _createAnalyticsEvent;
22
- return (_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel);
23
- });
24
- } else {
25
- var _createAnalyticsEvent2;
26
- (_createAnalyticsEvent2 = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent2 === void 0 || _createAnalyticsEvent2.fire(channel);
27
- }
12
+ var queue = AnalyticsQueue.get();
13
+ queue.schedule(function () {
14
+ var _createAnalyticsEvent;
15
+ return (_createAnalyticsEvent = createAnalyticsEvent(payload)) === null || _createAnalyticsEvent === void 0 ? void 0 : _createAnalyticsEvent.fire(channel);
16
+ });
28
17
  };
29
18
  };