@atlaskit/editor-plugin-media 1.20.4 → 1.20.6

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 (55) hide show
  1. package/.eslintrc.js +13 -13
  2. package/CHANGELOG.md +596 -586
  3. package/LICENSE.md +6 -8
  4. package/dist/cjs/nodeviews/mediaSingle.js +3 -1
  5. package/dist/cjs/nodeviews/styles.js +4 -1
  6. package/dist/cjs/pm-plugins/main.js +1 -3
  7. package/dist/cjs/toolbar/linking-toolbar-appearance.js +3 -1
  8. package/dist/cjs/ui/CaptionPlaceholder/index.js +1 -1
  9. package/dist/cjs/ui/ImageBorder/index.js +12 -4
  10. package/dist/cjs/ui/ImageBorder/styles.js +7 -7
  11. package/dist/cjs/ui/MediaLinkingToolbar.js +56 -53
  12. package/dist/cjs/ui/PixelEntry/styles.js +1 -1
  13. package/dist/cjs/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -1
  14. package/dist/cjs/ui/ResizableMediaSingle/styled.js +1 -1
  15. package/dist/cjs/utils/media-single.js +1 -1
  16. package/dist/es2019/nodeviews/mediaSingle.js +3 -1
  17. package/dist/es2019/nodeviews/styles.js +4 -1
  18. package/dist/es2019/pm-plugins/main.js +1 -3
  19. package/dist/es2019/toolbar/linking-toolbar-appearance.js +3 -1
  20. package/dist/es2019/ui/CaptionPlaceholder/index.js +5 -5
  21. package/dist/es2019/ui/ImageBorder/index.js +12 -4
  22. package/dist/es2019/ui/ImageBorder/styles.js +82 -82
  23. package/dist/es2019/ui/MediaLinkingToolbar.js +55 -52
  24. package/dist/es2019/ui/PixelEntry/styles.js +11 -11
  25. package/dist/es2019/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -1
  26. package/dist/es2019/ui/ResizableMediaSingle/styled.js +5 -5
  27. package/dist/es2019/utils/media-single.js +1 -1
  28. package/dist/esm/nodeviews/mediaSingle.js +3 -1
  29. package/dist/esm/nodeviews/styles.js +4 -1
  30. package/dist/esm/pm-plugins/main.js +1 -3
  31. package/dist/esm/toolbar/linking-toolbar-appearance.js +3 -1
  32. package/dist/esm/ui/CaptionPlaceholder/index.js +1 -1
  33. package/dist/esm/ui/ImageBorder/index.js +12 -4
  34. package/dist/esm/ui/ImageBorder/styles.js +7 -7
  35. package/dist/esm/ui/MediaLinkingToolbar.js +56 -53
  36. package/dist/esm/ui/PixelEntry/styles.js +1 -1
  37. package/dist/esm/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +3 -1
  38. package/dist/esm/ui/ResizableMediaSingle/styled.js +1 -1
  39. package/dist/esm/utils/media-single.js +1 -1
  40. package/dist/types/nodeviews/mediaNodeView/index.d.ts +1 -1
  41. package/dist/types/pm-plugins/alt-text/index.d.ts +1 -1
  42. package/dist/types/toolbar/filePreviewItem.d.ts +1 -1
  43. package/dist/types/toolbar/layout-group.d.ts +1 -1
  44. package/dist/types/ui/MediaPicker/BrowserWrapper.d.ts +1 -1
  45. package/dist/types/ui/MediaPicker/ClipboardWrapper.d.ts +1 -1
  46. package/dist/types/ui/PixelEntry/index.d.ts +1 -1
  47. package/dist/types-ts4.5/nodeviews/mediaNodeView/index.d.ts +1 -1
  48. package/dist/types-ts4.5/pm-plugins/alt-text/index.d.ts +1 -1
  49. package/dist/types-ts4.5/toolbar/filePreviewItem.d.ts +1 -1
  50. package/dist/types-ts4.5/toolbar/layout-group.d.ts +1 -1
  51. package/dist/types-ts4.5/ui/MediaPicker/BrowserWrapper.d.ts +1 -1
  52. package/dist/types-ts4.5/ui/MediaPicker/ClipboardWrapper.d.ts +1 -1
  53. package/dist/types-ts4.5/ui/PixelEntry/index.d.ts +1 -1
  54. package/package.json +8 -13
  55. package/report.api.md +302 -316
@@ -17,80 +17,80 @@ export const menuItemDimensions = {
17
17
  // Recommendation: Replace directly with 4 due to itemSpacing being used in calculations
18
18
  export const itemSpacing = gridSize() / 2;
19
19
  export const contextualMenuArrow = css`
20
- display: flex;
21
- &::after {
22
- content: '›';
23
- margin-left: ${"var(--ds-space-050, 4px)"};
24
- line-height: 20px;
25
- color: ${`var(--ds-icon, ${N90})`};
26
- }
20
+ display: flex;
21
+ &::after {
22
+ content: '›';
23
+ margin-left: ${"var(--ds-space-050, 4px)"};
24
+ line-height: 20px;
25
+ color: ${`var(--ds-icon, ${N90})`};
26
+ }
27
27
  `;
28
28
  export const contextualMenuColorIcon = color => css`
29
- ${contextualMenuArrow}
30
- &::before {
31
- content: '';
32
- display: block;
33
- border: 1px solid ${DEFAULT_BORDER_COLOR};
34
- border-radius: ${"var(--ds-border-radius-100, 3px)"};
35
- width: 20px;
36
- height: 20px;
37
- ${color && `background: ${color}`}
38
- }
29
+ ${contextualMenuArrow}
30
+ &::before {
31
+ content: '';
32
+ display: block;
33
+ border: 1px solid ${DEFAULT_BORDER_COLOR};
34
+ border-radius: ${"var(--ds-border-radius-100, 3px)"};
35
+ width: 20px;
36
+ height: 20px;
37
+ ${color && `background: ${color}`}
38
+ }
39
39
  `;
40
40
  export const contextualSubMenu = index => css`
41
- border-radius: ${"var(--ds-border-radius-100, 3px)"};
42
- background: ${"var(--ds-surface-overlay, white)"};
43
- box-shadow: ${`var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N60A}, 0 0 1px ${N60A}`})`};
44
- display: flex;
45
- position: absolute;
46
- top: ${index * (menuItemDimensions.height + itemSpacing * 2)}px;
47
- left: ${menuItemDimensions.width}px;
48
- padding: ${"var(--ds-space-100, 8px)"};
41
+ border-radius: ${"var(--ds-border-radius-100, 3px)"};
42
+ background: ${"var(--ds-surface-overlay, white)"};
43
+ box-shadow: ${`var(--ds-shadow-overlay, ${`0 4px 8px -2px ${N60A}, 0 0 1px ${N60A}`})`};
44
+ display: flex;
45
+ position: absolute;
46
+ top: ${index * (menuItemDimensions.height + itemSpacing * 2)}px;
47
+ left: ${menuItemDimensions.width}px;
48
+ padding: ${"var(--ds-space-100, 8px)"};
49
49
 
50
- > div {
51
- padding: 0;
52
- }
50
+ > div {
51
+ padding: 0;
52
+ }
53
53
  `;
54
54
  export const buttonStyle = selected => css`
55
- height: 26px;
56
- width: 26px;
57
- padding: 0;
58
- border-radius: 4px;
59
- background-color: ${selected ? `var(--ds-text, ${N800})` : `var(--ds-background-neutral, ${N20A})`};
60
- border: 1px solid ${DEFAULT_BORDER_COLOR};
61
- cursor: pointer;
62
- display: block;
55
+ height: 26px;
56
+ width: 26px;
57
+ padding: 0;
58
+ border-radius: 4px;
59
+ background-color: ${selected ? `var(--ds-text, ${N800})` : `var(--ds-background-neutral, ${N20A})`};
60
+ border: 1px solid ${DEFAULT_BORDER_COLOR};
61
+ cursor: pointer;
62
+ display: block;
63
63
  `;
64
64
 
65
65
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
66
66
  export const buttonWrapperStyle = css`
67
- border: 1px solid transparent;
68
- margin: ${"var(--ds-space-025, 2px)"};
69
- font-size: 0;
70
- display: flex;
71
- align-items: center;
72
- padding: ${"var(--ds-space-025, 2px)"};
73
- border-radius: 6px;
74
- &:focus-within,
75
- &:focus,
76
- &:hover {
77
- border-color: ${N50} !important;
78
- }
67
+ border: 1px solid transparent;
68
+ margin: ${"var(--ds-space-025, 2px)"};
69
+ font-size: 0;
70
+ display: flex;
71
+ align-items: center;
72
+ padding: ${"var(--ds-space-025, 2px)"};
73
+ border-radius: 6px;
74
+ &:focus-within,
75
+ &:focus,
76
+ &:hover {
77
+ border-color: ${N50} !important;
78
+ }
79
79
  `;
80
80
  export const line = (size, selected) => css`
81
- position: relative;
82
- &:before {
83
- content: '';
84
- display: block;
85
- position: absolute;
86
- top: 50%;
87
- left: 50%;
88
- width: 12px;
89
- height: ${size}px;
90
- background-color: ${selected ? `var(--ds-icon-inverse, ${N0})` : "var(--ds-icon, #44546F)"};
91
- border-radius: 90px;
92
- transform: translate(-50%, -50%) rotate(135deg);
93
- }
81
+ position: relative;
82
+ &:before {
83
+ content: '';
84
+ display: block;
85
+ position: absolute;
86
+ top: 50%;
87
+ left: 50%;
88
+ width: 12px;
89
+ height: ${size}px;
90
+ background-color: ${selected ? `var(--ds-icon-inverse, ${N0})` : "var(--ds-icon, #44546F)"};
91
+ border-radius: 90px;
92
+ transform: translate(-50%, -50%) rotate(135deg);
93
+ }
94
94
  `;
95
95
  const getHoverStyles = selector => `&:hover ${selector} {
96
96
  background: ${`var(--ds-background-neutral-subtle-hovered, ${colors.N20A})`};
@@ -103,26 +103,26 @@ export const toolbarButtonWrapper = ({
103
103
  enabled,
104
104
  isOpen
105
105
  }) => css`
106
- display: flex;
107
- .image-border-toolbar-btn {
108
- border-top-right-radius: 0;
109
- border-bottom-right-radius: 0;
110
- padding: 0;
111
- & > span {
112
- margin: 0;
113
- }
114
- }
115
- .image-border-toolbar-dropdown {
116
- padding: 0;
117
- & > span {
118
- margin: 0;
119
- }
120
- width: 16px !important;
121
- border-top-left-radius: 0 !important;
122
- border-bottom-left-radius: 0 !important;
123
- margin-left: ${"var(--ds-space-025, 2px)"};
124
- }
106
+ display: flex;
107
+ .image-border-toolbar-btn {
108
+ border-top-right-radius: 0;
109
+ border-bottom-right-radius: 0;
110
+ padding: 0;
111
+ & > span {
112
+ margin: 0;
113
+ }
114
+ }
115
+ .image-border-toolbar-dropdown {
116
+ padding: 0;
117
+ & > span {
118
+ margin: 0;
119
+ }
120
+ width: 16px !important;
121
+ border-top-left-radius: 0 !important;
122
+ border-bottom-left-radius: 0 !important;
123
+ margin-left: ${"var(--ds-space-025, 2px)"};
124
+ }
125
125
 
126
- ${!enabled && getHoverStyles('.image-border-toolbar-btn')}
127
- ${!isOpen && !enabled && getHoverStyles('.image-border-toolbar-dropdown')}
126
+ ${!enabled && getHoverStyles('.image-border-toolbar-btn')}
127
+ ${!isOpen && !enabled && getHoverStyles('.image-border-toolbar-dropdown')}
128
128
  `;
@@ -99,58 +99,61 @@ export class LinkAddToolbar extends React.PureComponent {
99
99
  key: index
100
100
  }, error);
101
101
  });
102
- return jsx("div", {
103
- className: "recent-list"
104
- }, jsx("div", {
105
- css: [container, !!activityProvider && containerWithProvider]
106
- }, jsx("div", {
107
- css: inputWrapper
108
- }, jsx("span", {
109
- css: buttonWrapper
110
- }, jsx(Button, {
111
- title: formatLinkAddressText,
112
- icon: jsx(ChevronLeftLargeIcon, {
113
- label: formatLinkAddressText
114
- }),
115
- onClick: () => this.handleOnBack({
116
- url: value,
117
- inputMethod: currentInputMethod
118
- })
119
- })), jsx(PanelTextInput, {
120
- inputId: "media-link-search-input",
121
- testId: "media-link-input",
122
- placeholder: getPlaceholder(!!activityProvider),
123
- autoFocus: true,
124
- onCancel: this.handleCancel,
125
- defaultValue: value,
126
- onSubmit: inputValue => {
127
- const validationErrors = this.getValidationErrors(inputValue, currentInputMethod);
128
- this.setState({
129
- validationErrors
130
- });
131
- if (!validationErrors.length) {
132
- onSubmit();
133
- }
134
- },
135
- onChange: value => {
136
- this.setState({
137
- validationErrors: []
138
- });
139
- onChange(value);
140
- },
141
- onKeyDown: onKeyDown
142
- }), jsx("label", {
143
- className: "assistive",
144
- htmlFor: "media-link-search-input"
145
- }, formatMessage(linkToolbarMessages.searchInput)), normalizeUrl(displayUrl) && jsx(Fragment, null, jsx(Separator, null), jsx(Button, {
146
- title: formatUnlinkText,
147
- icon: jsx(EditorUnlinkIcon, {
148
- label: formatUnlinkText
149
- }),
150
- onClick: this.handleUnlink
151
- }))), !!errorsList.length && jsx("section", {
152
- css: validationWrapper
153
- }, errorsList), renderRecentList()));
102
+ return (
103
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
104
+ jsx("div", {
105
+ className: "recent-list"
106
+ }, jsx("div", {
107
+ css: [container, !!activityProvider && containerWithProvider]
108
+ }, jsx("div", {
109
+ css: inputWrapper
110
+ }, jsx("span", {
111
+ css: buttonWrapper
112
+ }, jsx(Button, {
113
+ title: formatLinkAddressText,
114
+ icon: jsx(ChevronLeftLargeIcon, {
115
+ label: formatLinkAddressText
116
+ }),
117
+ onClick: () => this.handleOnBack({
118
+ url: value,
119
+ inputMethod: currentInputMethod
120
+ })
121
+ })), jsx(PanelTextInput, {
122
+ inputId: "media-link-search-input",
123
+ testId: "media-link-input",
124
+ placeholder: getPlaceholder(!!activityProvider),
125
+ autoFocus: true,
126
+ onCancel: this.handleCancel,
127
+ defaultValue: value,
128
+ onSubmit: inputValue => {
129
+ const validationErrors = this.getValidationErrors(inputValue, currentInputMethod);
130
+ this.setState({
131
+ validationErrors
132
+ });
133
+ if (!validationErrors.length) {
134
+ onSubmit();
135
+ }
136
+ },
137
+ onChange: value => {
138
+ this.setState({
139
+ validationErrors: []
140
+ });
141
+ onChange(value);
142
+ },
143
+ onKeyDown: onKeyDown
144
+ }), jsx("label", {
145
+ className: "assistive",
146
+ htmlFor: "media-link-search-input"
147
+ }, formatMessage(linkToolbarMessages.searchInput)), normalizeUrl(displayUrl) && jsx(Fragment, null, jsx(Separator, null), jsx(Button, {
148
+ title: formatUnlinkText,
149
+ icon: jsx(EditorUnlinkIcon, {
150
+ label: formatUnlinkText
151
+ }),
152
+ onClick: this.handleUnlink
153
+ }))), !!errorsList.length && jsx("section", {
154
+ css: validationWrapper
155
+ }, errorsList), renderRecentList()))
156
+ );
154
157
  });
155
158
  }
156
159
  getValidationErrors(value, inputMethod) {
@@ -3,18 +3,18 @@ const PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH = 120;
3
3
 
4
4
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
5
5
  export const pixelSizingWrapper = css`
6
- display: grid;
7
- grid-template-columns: 1fr 1em 1fr 0;
8
- grid-template-rows: auto;
9
- grid-template-areas: 'widthinput label heightinput submit';
10
- width: ${PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH}px;
11
- text-align: center;
12
- height: ${"var(--ds-space-300, 24px)"};
6
+ display: grid;
7
+ grid-template-columns: 1fr 1em 1fr 0;
8
+ grid-template-rows: auto;
9
+ grid-template-areas: 'widthinput label heightinput submit';
10
+ width: ${PIXEL_SIZING_WRAPPER_MINIMUM_WIDTH}px;
11
+ text-align: center;
12
+ height: ${"var(--ds-space-300, 24px)"};
13
13
 
14
- // Atlaskit fieldset does not allow style override
15
- & > * {
16
- margin-top: 0 !important;
17
- }
14
+ // Atlaskit fieldset does not allow style override
15
+ & > * {
16
+ margin-top: 0 !important;
17
+ }
18
18
  `;
19
19
  export const pixelEntryForm = css({
20
20
  form: {
@@ -434,7 +434,9 @@ class ResizableMediaSingleNext extends React.Component {
434
434
  })
435
435
  }, jsx(ResizerNext, {
436
436
  minWidth: minViewWidth,
437
- maxWidth: maxWidth,
437
+ maxWidth: maxWidth
438
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
439
+ ,
438
440
  className: resizerNextClassName,
439
441
  snapGap: MEDIA_SINGLE_SNAP_GAP,
440
442
  enable: enable,
@@ -2,9 +2,9 @@ import { css } from '@emotion/react';
2
2
  import { MediaSingleDimensionHelper } from '@atlaskit/editor-common/ui';
3
3
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
4
4
  export const wrapperStyle = props => css`
5
- & > div {
6
- ${MediaSingleDimensionHelper(props)};
7
- position: relative;
8
- clear: both;
9
- }
5
+ & > div {
6
+ ${MediaSingleDimensionHelper(props)};
7
+ position: relative;
8
+ clear: both;
9
+ }
10
10
  `;
@@ -146,7 +146,7 @@ export const insertMediaSingleNode = (view, mediaState, inputMethod, collection,
146
146
  }
147
147
  dispatch(tr);
148
148
  }
149
- if (getBooleanFF('platform.editor.media.autoselect-inserted-image_oumto') && onNodeInserted) {
149
+ if (onNodeInserted) {
150
150
  onNodeInserted(mediaState.id, view.state.selection.to);
151
151
  }
152
152
  return true;
@@ -437,7 +437,9 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
437
437
  var isCurrentNodeDrafting = (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.isDrafting) && (annotationPluginState === null || annotationPluginState === void 0 ? void 0 : annotationPluginState.targetNodeId) === (node === null || node === void 0 || (_node$firstChild = node.firstChild) === null || _node$firstChild === void 0 ? void 0 : _node$firstChild.attrs.id);
438
438
  var MediaChildren = jsx("figure", {
439
439
  ref: this.mediaSingleWrapperRef,
440
- css: figureWrapperStyles,
440
+ css: figureWrapperStyles
441
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
442
+ ,
441
443
  className: MediaSingleNodeSelector,
442
444
  onClick: this.onMediaSingleClicked
443
445
  }, commentsOnMedia && jsx(CommentBadge, {
@@ -21,11 +21,14 @@ export var MediaCardWrapper = function MediaCardWrapper(_ref) {
21
21
  onContextMenu = _ref.onContextMenu;
22
22
  var calculatedBorderWidth = selected && borderWidth > 0 ? borderWidth + 1 : borderWidth;
23
23
  return jsx("div", {
24
- "data-testid": "media-card-wrapper",
24
+ "data-testid": "media-card-wrapper"
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
26
+ ,
25
27
  className: "media-card-wrapper",
26
28
  style: {
27
29
  borderColor: "var(--custom-palette-color)",
28
30
  borderWidth: "".concat(calculatedBorderWidth, "px"),
31
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
29
32
  borderStyle: 'solid',
30
33
  borderRadius: "".concat(calculatedBorderWidth * 2, "px")
31
34
  }
@@ -274,9 +274,7 @@ export var MediaPluginStateImplementation = /*#__PURE__*/function () {
274
274
  _this.uploadInProgressSubscriptionsNotified = false;
275
275
  }
276
276
  });
277
- if (getBooleanFF('platform.editor.media.autoselect-inserted-image_oumto')) {
278
- _this.selectLastAddedMediaNode();
279
- }
277
+ _this.selectLastAddedMediaNode();
280
278
  });
281
279
  _defineProperty(this, "addPendingTask", function (task) {
282
280
  _this.taskManager.addPendingTask(task);
@@ -69,7 +69,9 @@ export var LinkToolbarAppearance = function LinkToolbarAppearance(_ref) {
69
69
  title: linkTitle,
70
70
  icon: jsx(OpenIcon, {
71
71
  label: linkTitle
72
- }),
72
+ })
73
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
74
+ ,
73
75
  className: "hyperlink-open-link"
74
76
  }), jsx(Separator, null));
75
77
  } else {
@@ -8,7 +8,7 @@ import { captionMessages as messages } from '@atlaskit/editor-common/media';
8
8
  import { CAPTION_PLACEHOLDER_ID } from '@atlaskit/editor-common/media-single';
9
9
  import { N200 } from '@atlaskit/theme/colors';
10
10
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- needs manual remediation
11
- var placeholder = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n width: 100%;\n text-align: center;\n margin-top: ", " !important;\n display: block;\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-space-100, 8px)");
11
+ var placeholder = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: ", ";\n\twidth: 100%;\n\ttext-align: center;\n\tmargin-top: ", " !important;\n\tdisplay: block;\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-space-100, 8px)");
12
12
  export default /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13
13
  var onClick = _ref.onClick;
14
14
  return jsx("span", {
@@ -57,7 +57,9 @@ var ImageBorder = function ImageBorder(_ref) {
57
57
  value: {
58
58
  name: 'color'
59
59
  },
60
- elemAfter: jsx("div", {
60
+ elemAfter:
61
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
62
+ jsx("div", {
61
63
  className: DropdownMenuSharedCssClassName.SUBMENU
62
64
  }, jsx("div", {
63
65
  css: contextualMenuColorIcon(color && hexToEditorBorderPaletteColor(color))
@@ -83,7 +85,9 @@ var ImageBorder = function ImageBorder(_ref) {
83
85
  value: {
84
86
  name: 'size'
85
87
  },
86
- elemAfter: jsx("div", {
88
+ elemAfter:
89
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
90
+ jsx("div", {
87
91
  className: DropdownMenuSharedCssClassName.SUBMENU
88
92
  }, jsx("div", {
89
93
  css: contextualMenuArrow
@@ -132,7 +136,9 @@ var ImageBorder = function ImageBorder(_ref) {
132
136
  enabled: enabled,
133
137
  isOpen: isOpen
134
138
  })
135
- }, jsx(ToolbarButton, {
139
+ }, jsx(ToolbarButton
140
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
141
+ , {
136
142
  className: "image-border-toolbar-btn",
137
143
  selected: enabled,
138
144
  onClick: toggleBorder,
@@ -144,7 +150,9 @@ var ImageBorder = function ImageBorder(_ref) {
144
150
  title: enabled ? formatMessage(messages.removeBorder) : formatMessage(messages.addBorder)
145
151
  }), jsx("div", {
146
152
  ref: popupTarget
147
- }, jsx(ToolbarButton, {
153
+ }, jsx(ToolbarButton
154
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
155
+ , {
148
156
  className: "image-border-toolbar-dropdown",
149
157
  selected: enabled || isOpen,
150
158
  "aria-label": formatMessage(messages.borderOptions),
@@ -18,21 +18,21 @@ export var menuItemDimensions = {
18
18
  // TODO: Migrate away from gridSize
19
19
  // Recommendation: Replace directly with 4 due to itemSpacing being used in calculations
20
20
  export var itemSpacing = gridSize() / 2;
21
- export var contextualMenuArrow = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n &::after {\n content: '\u203A';\n margin-left: ", ";\n line-height: 20px;\n color: ", ";\n }\n"])), "var(--ds-space-050, 4px)", "var(--ds-icon, ".concat(N90, ")"));
21
+ export var contextualMenuArrow = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\t&::after {\n\t\tcontent: '\u203A';\n\t\tmargin-left: ", ";\n\t\tline-height: 20px;\n\t\tcolor: ", ";\n\t}\n"])), "var(--ds-space-050, 4px)", "var(--ds-icon, ".concat(N90, ")"));
22
22
  export var contextualMenuColorIcon = function contextualMenuColorIcon(color) {
23
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n &::before {\n content: '';\n display: block;\n border: 1px solid ", ";\n border-radius: ", ";\n width: 20px;\n height: 20px;\n ", "\n }\n"])), contextualMenuArrow, DEFAULT_BORDER_COLOR, "var(--ds-border-radius-100, 3px)", color && "background: ".concat(color));
23
+ return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t", "\n\t&::before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tborder: 1px solid ", ";\n\t\tborder-radius: ", ";\n\t\twidth: 20px;\n\t\theight: 20px;\n\t\t", "\n\t}\n"])), contextualMenuArrow, DEFAULT_BORDER_COLOR, "var(--ds-border-radius-100, 3px)", color && "background: ".concat(color));
24
24
  };
25
25
  export var contextualSubMenu = function contextualSubMenu(index) {
26
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border-radius: ", ";\n background: ", ";\n box-shadow: ", ";\n display: flex;\n position: absolute;\n top: ", "px;\n left: ", "px;\n padding: ", ";\n\n > div {\n padding: 0;\n }\n"])), "var(--ds-border-radius-100, 3px)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), index * (menuItemDimensions.height + itemSpacing * 2), menuItemDimensions.width, "var(--ds-space-100, 8px)");
26
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tborder-radius: ", ";\n\tbackground: ", ";\n\tbox-shadow: ", ";\n\tdisplay: flex;\n\tposition: absolute;\n\ttop: ", "px;\n\tleft: ", "px;\n\tpadding: ", ";\n\n\t> div {\n\t\tpadding: 0;\n\t}\n"])), "var(--ds-border-radius-100, 3px)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A), ")"), index * (menuItemDimensions.height + itemSpacing * 2), menuItemDimensions.width, "var(--ds-space-100, 8px)");
27
27
  };
28
28
  export var buttonStyle = function buttonStyle(selected) {
29
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n height: 26px;\n width: 26px;\n padding: 0;\n border-radius: 4px;\n background-color: ", ";\n border: 1px solid ", ";\n cursor: pointer;\n display: block;\n"])), selected ? "var(--ds-text, ".concat(N800, ")") : "var(--ds-background-neutral, ".concat(N20A, ")"), DEFAULT_BORDER_COLOR);
29
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\theight: 26px;\n\twidth: 26px;\n\tpadding: 0;\n\tborder-radius: 4px;\n\tbackground-color: ", ";\n\tborder: 1px solid ", ";\n\tcursor: pointer;\n\tdisplay: block;\n"])), selected ? "var(--ds-text, ".concat(N800, ")") : "var(--ds-background-neutral, ".concat(N20A, ")"), DEFAULT_BORDER_COLOR);
30
30
  };
31
31
 
32
32
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
33
- export var buttonWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border: 1px solid transparent;\n margin: ", ";\n font-size: 0;\n display: flex;\n align-items: center;\n padding: ", ";\n border-radius: 6px;\n &:focus-within,\n &:focus,\n &:hover {\n border-color: ", " !important;\n }\n"])), "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", N50);
33
+ export var buttonWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n\tborder: 1px solid transparent;\n\tmargin: ", ";\n\tfont-size: 0;\n\tdisplay: flex;\n\talign-items: center;\n\tpadding: ", ";\n\tborder-radius: 6px;\n\t&:focus-within,\n\t&:focus,\n\t&:hover {\n\t\tborder-color: ", " !important;\n\t}\n"])), "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", N50);
34
34
  export var line = function line(size, selected) {
35
- return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n position: relative;\n &:before {\n content: '';\n display: block;\n position: absolute;\n top: 50%;\n left: 50%;\n width: 12px;\n height: ", "px;\n background-color: ", ";\n border-radius: 90px;\n transform: translate(-50%, -50%) rotate(135deg);\n }\n"])), size, selected ? "var(--ds-icon-inverse, ".concat(N0, ")") : "var(--ds-icon, #44546F)");
35
+ return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\tposition: relative;\n\t&:before {\n\t\tcontent: '';\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\ttop: 50%;\n\t\tleft: 50%;\n\t\twidth: 12px;\n\t\theight: ", "px;\n\t\tbackground-color: ", ";\n\t\tborder-radius: 90px;\n\t\ttransform: translate(-50%, -50%) rotate(135deg);\n\t}\n"])), size, selected ? "var(--ds-icon-inverse, ".concat(N0, ")") : "var(--ds-icon, #44546F)");
36
36
  };
37
37
  var getHoverStyles = function getHoverStyles(selector) {
38
38
  return "&:hover ".concat(selector, " {\n background: ", "var(--ds-background-neutral-subtle-hovered, ".concat(colors.N20A, ")"), ";\n\n &:hover {\n background: ", "var(--ds-background-neutral-hovered, ".concat(colors.N30A, ")"), ";\n }\n }");
@@ -40,5 +40,5 @@ var getHoverStyles = function getHoverStyles(selector) {
40
40
  export var toolbarButtonWrapper = function toolbarButtonWrapper(_ref) {
41
41
  var enabled = _ref.enabled,
42
42
  isOpen = _ref.isOpen;
43
- return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n .image-border-toolbar-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n padding: 0;\n & > span {\n margin: 0;\n }\n }\n .image-border-toolbar-dropdown {\n padding: 0;\n & > span {\n margin: 0;\n }\n width: 16px !important;\n border-top-left-radius: 0 !important;\n border-bottom-left-radius: 0 !important;\n margin-left: ", ";\n }\n\n ", "\n ", "\n"])), "var(--ds-space-025, 2px)", !enabled && getHoverStyles('.image-border-toolbar-btn'), !isOpen && !enabled && getHoverStyles('.image-border-toolbar-dropdown'));
43
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\t.image-border-toolbar-btn {\n\t\tborder-top-right-radius: 0;\n\t\tborder-bottom-right-radius: 0;\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\t.image-border-toolbar-dropdown {\n\t\tpadding: 0;\n\t\t& > span {\n\t\t\tmargin: 0;\n\t\t}\n\t\twidth: 16px !important;\n\t\tborder-top-left-radius: 0 !important;\n\t\tborder-bottom-left-radius: 0 !important;\n\t\tmargin-left: ", ";\n\t}\n\n\t", "\n\t", "\n"])), "var(--ds-space-025, 2px)", !enabled && getHoverStyles('.image-border-toolbar-btn'), !isOpen && !enabled && getHoverStyles('.image-border-toolbar-dropdown'));
44
44
  };