@atlaskit/editor-plugin-toolbar-lists-indentation 2.0.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,13 @@
1
+ /* ToolbarDropdown.tsx generated by @compiled/babel-plugin v0.36.1 */
1
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
3
+ import { ax, ix } from "@compiled/react/runtime";
6
4
  import React from 'react';
7
-
8
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
- import { jsx } from '@emotion/react';
10
5
  import { useIntl } from 'react-intl-next';
11
6
  import { toggleBulletList as toggleBulletListKeymap, indent as toggleIndentKeymap, toggleOrderedList as toggleOrderedListKeymap, outdent as toggleOutdentKeymap, tooltip } from '@atlaskit/editor-common/keymaps';
12
7
  import { indentationMessages, listMessages } from '@atlaskit/editor-common/messages';
13
- import { expandIconContainerStyle, separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
8
+ import { Shortcut, ToolbarDropdownTriggerWrapper, ToolbarDropdownWrapper, ToolbarExpandIcon, ToolbarSeparator } from '@atlaskit/editor-common/ui';
14
9
  import { DropdownMenuWithKeyboardNavigation as DropdownMenu, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
15
- import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
16
10
  import BulletListIcon from '@atlaskit/icon/core/migration/list-bulleted--editor-bullet-list';
17
- import ExpandIcon from '@atlaskit/icon/utility/migration/chevron-down';
18
- import { fg } from '@atlaskit/platform-feature-flags';
19
11
  import { ToolbarType } from '../types';
20
12
  export function ToolbarDropdown(props) {
21
13
  var _useIntl = useIntl(),
@@ -68,62 +60,39 @@ export function ToolbarDropdown(props) {
68
60
  });
69
61
  };
70
62
  var reducedSpacing = props.toolbarType === ToolbarType.FLOATING ? 'compact' : 'none';
71
- return (
72
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
73
- jsx("span", {
74
- css: wrapperStyle
75
- }, jsx(DropdownMenu, {
76
- items: items,
77
- onItemActivated: handleOnItemActivated,
78
- mountTo: popupsMountPoint,
79
- boundariesElement: popupsBoundariesElement,
80
- scrollableElement: popupsScrollableElement,
81
- isOpen: isDropdownOpen,
82
- onOpenChange: onOpenChange,
83
- fitHeight: 188,
84
- fitWidth: 175,
85
- shouldUseDefaultRole: true,
86
- shouldFocusFirstItem: function shouldFocusFirstItem() {
87
- if (isOpenedByKeyboard) {
88
- setOpenedByKeyboard(false);
89
- }
90
- return isOpenedByKeyboard;
63
+ return /*#__PURE__*/React.createElement(ToolbarDropdownWrapper, null, /*#__PURE__*/React.createElement(DropdownMenu, {
64
+ items: items,
65
+ onItemActivated: handleOnItemActivated,
66
+ mountTo: popupsMountPoint,
67
+ boundariesElement: popupsBoundariesElement,
68
+ scrollableElement: popupsScrollableElement,
69
+ isOpen: isDropdownOpen,
70
+ onOpenChange: onOpenChange,
71
+ fitHeight: 188,
72
+ fitWidth: 175,
73
+ shouldUseDefaultRole: true,
74
+ shouldFocusFirstItem: function shouldFocusFirstItem() {
75
+ if (isOpenedByKeyboard) {
76
+ setOpenedByKeyboard(false);
91
77
  }
92
- }, jsx(ToolbarButton, {
93
- spacing: isReducedSpacing ? reducedSpacing : 'default',
94
- selected: bulletListActive || orderedListActive || isDropdownOpen,
95
- "aria-expanded": isDropdownOpen,
96
- "aria-haspopup": true,
97
- "aria-label": labelLists,
98
- disabled: disabled,
99
- onClick: handleTriggerClick,
100
- onKeyDown: handleOnKeyDown,
101
- title: labelLists,
102
- iconBefore:
103
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
104
- jsx("span", {
105
- css: wrapperStyle
106
- }, jsx(BulletListIcon, {
107
- color: "currentColor",
108
- spacing: "spacious",
109
- label: labelLists
110
- }), jsx("span", {
111
- css: [
112
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-registration
113
- fg('platform-visual-refresh-icons') &&
114
- //eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
115
- expandIconContainerStyle]
116
- }, jsx(ExpandIcon, {
117
- color: "currentColor",
118
- label: "",
119
- LEGACY_margin: "0 0 0 -8px"
120
- })))
121
- })), !(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
122
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
123
- jsx("span", {
124
- css: separatorStyles
125
- }))
126
- );
78
+ return isOpenedByKeyboard;
79
+ }
80
+ }, /*#__PURE__*/React.createElement(ToolbarButton, {
81
+ spacing: isReducedSpacing ? reducedSpacing : 'default',
82
+ selected: bulletListActive || orderedListActive || isDropdownOpen,
83
+ "aria-expanded": isDropdownOpen,
84
+ "aria-haspopup": true,
85
+ "aria-label": labelLists,
86
+ disabled: disabled,
87
+ onClick: handleTriggerClick,
88
+ onKeyDown: handleOnKeyDown,
89
+ title: labelLists,
90
+ iconBefore: /*#__PURE__*/React.createElement(ToolbarDropdownTriggerWrapper, null, /*#__PURE__*/React.createElement(BulletListIcon, {
91
+ color: "currentColor",
92
+ spacing: "spacious",
93
+ label: labelLists
94
+ }), /*#__PURE__*/React.createElement(ToolbarExpandIcon, null))
95
+ })), !(pluginInjectionApi !== null && pluginInjectionApi !== void 0 && pluginInjectionApi.primaryToolbar) && /*#__PURE__*/React.createElement(ToolbarSeparator, null));
127
96
  }
128
97
  function useItems(props) {
129
98
  var _useIntl2 = useIntl(),
@@ -138,11 +107,7 @@ function useItems(props) {
138
107
  },
139
108
  isDisabled: props.bulletListDisabled,
140
109
  isActive: Boolean(props.bulletListActive),
141
- elemAfter:
142
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
143
- jsx("div", {
144
- css: shortcutStyle
145
- }, tooltip(toggleBulletListKeymap))
110
+ elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleBulletListKeymap))
146
111
  }, {
147
112
  key: 'orderedList',
148
113
  content: labelOrderedList,
@@ -151,11 +116,7 @@ function useItems(props) {
151
116
  },
152
117
  isDisabled: props.orderedListDisabled,
153
118
  isActive: Boolean(props.orderedListActive),
154
- elemAfter:
155
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
156
- jsx("div", {
157
- css: shortcutStyle
158
- }, tooltip(toggleOrderedListKeymap))
119
+ elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleOrderedListKeymap))
159
120
  }];
160
121
  if (props.showIndentationButtons) {
161
122
  var labelIndent = formatMessage(indentationMessages.indent);
@@ -168,11 +129,7 @@ function useItems(props) {
168
129
  },
169
130
  isDisabled: props.outdentDisabled,
170
131
  isActive: false,
171
- elemAfter:
172
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
173
- jsx("div", {
174
- css: shortcutStyle
175
- }, tooltip(toggleOutdentKeymap))
132
+ elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleOutdentKeymap))
176
133
  }, {
177
134
  key: 'indent',
178
135
  content: labelIndent,
@@ -181,10 +138,7 @@ function useItems(props) {
181
138
  },
182
139
  isDisabled: props.indentDisabled,
183
140
  isActive: false,
184
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
185
- elemAfter: jsx("div", {
186
- css: shortcutStyle
187
- }, tooltip(toggleIndentKeymap))
141
+ elemAfter: /*#__PURE__*/React.createElement(Shortcut, null, tooltip(toggleIndentKeymap))
188
142
  });
189
143
  }
190
144
  return [{
@@ -1,9 +1,6 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { jsx } from '@emotion/react';
1
+ /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import * as React from 'react';
3
+ import { ax, ix } from "@compiled/react/runtime";
7
4
  import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
8
5
  import { fg } from '@atlaskit/platform-feature-flags';
9
6
  import { ToolbarType } from '../types';
@@ -40,7 +37,7 @@ export default function ToolbarListsIndentation(props) {
40
37
  } else {
41
38
  isDisabled = disabled;
42
39
  }
43
- return jsx(ToolbarDropdown, {
40
+ return /*#__PURE__*/React.createElement(ToolbarDropdown, {
44
41
  editorView: props.editorView,
45
42
  isReducedSpacing: isReducedSpacing,
46
43
  popupsMountPoint: popupsMountPoint,
@@ -60,7 +57,7 @@ export default function ToolbarListsIndentation(props) {
60
57
  toolbarType: toolbarType
61
58
  });
62
59
  }
63
- return jsx(Toolbar, {
60
+ return /*#__PURE__*/React.createElement(Toolbar, {
64
61
  editorView: props.editorView,
65
62
  isReducedSpacing: isReducedSpacing,
66
63
  bulletListActive: bulletListActive,
@@ -1,3 +1,3 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import type { ToolbarProps } from '../types';
3
- export declare function Toolbar(props: ToolbarProps): jsx.JSX.Element;
3
+ export declare function Toolbar(props: ToolbarProps): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { type ToolbarProps, ToolbarType } from '../types';
3
3
  export type DropdownProps = ToolbarProps & {
4
4
  popupsMountPoint?: HTMLElement;
@@ -6,4 +6,4 @@ export type DropdownProps = ToolbarProps & {
6
6
  popupsScrollableElement?: HTMLElement;
7
7
  toolbarType: ToolbarType;
8
8
  };
9
- export declare function ToolbarDropdown(props: DropdownProps): jsx.JSX.Element;
9
+ export declare function ToolbarDropdown(props: DropdownProps): JSX.Element;
@@ -1,8 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
6
2
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
7
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
4
  import type { IndentationButtonNode } from '../pm-plugins/indentation-buttons';
@@ -28,4 +24,4 @@ export interface Props {
28
24
  pluginInjectionApi?: ExtractInjectionAPI<ToolbarListsIndentationPlugin> | undefined;
29
25
  toolbarType: ToolbarType;
30
26
  }
31
- export default function ToolbarListsIndentation(props: Props): jsx.JSX.Element;
27
+ export default function ToolbarListsIndentation(props: Props): JSX.Element;
@@ -1,3 +1,3 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import type { ToolbarProps } from '../types';
3
- export declare function Toolbar(props: ToolbarProps): jsx.JSX.Element;
3
+ export declare function Toolbar(props: ToolbarProps): JSX.Element;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import { type ToolbarProps, ToolbarType } from '../types';
3
3
  export type DropdownProps = ToolbarProps & {
4
4
  popupsMountPoint?: HTMLElement;
@@ -6,4 +6,4 @@ export type DropdownProps = ToolbarProps & {
6
6
  popupsScrollableElement?: HTMLElement;
7
7
  toolbarType: ToolbarType;
8
8
  };
9
- export declare function ToolbarDropdown(props: DropdownProps): jsx.JSX.Element;
9
+ export declare function ToolbarDropdown(props: DropdownProps): JSX.Element;
@@ -1,8 +1,4 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
6
2
  import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
7
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
8
4
  import type { IndentationButtonNode } from '../pm-plugins/indentation-buttons';
@@ -28,4 +24,4 @@ export interface Props {
28
24
  pluginInjectionApi?: ExtractInjectionAPI<ToolbarListsIndentationPlugin> | undefined;
29
25
  toolbarType: ToolbarType;
30
26
  }
31
- export default function ToolbarListsIndentation(props: Props): jsx.JSX.Element;
27
+ export default function ToolbarListsIndentation(props: Props): JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-toolbar-lists-indentation",
3
- "version": "2.0.2",
3
+ "version": "3.0.0",
4
4
  "description": "Toolbar lists and indentation plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -25,13 +25,16 @@
25
25
  ]
26
26
  }
27
27
  },
28
- "sideEffects": false,
28
+ "sideEffects": [
29
+ "**/*.compiled.css"
30
+ ],
29
31
  "atlaskit:src": "src/index.ts",
30
32
  "af:exports": {
31
33
  ".": "./src/index.ts"
32
34
  },
33
35
  "dependencies": {
34
- "@atlaskit/editor-common": "^100.1.0",
36
+ "@atlaskit/css": "^0.10.0",
37
+ "@atlaskit/editor-common": "^100.2.0",
35
38
  "@atlaskit/editor-plugin-analytics": "^2.0.0",
36
39
  "@atlaskit/editor-plugin-block-type": "^5.0.0",
37
40
  "@atlaskit/editor-plugin-feature-flags": "^1.3.0",
@@ -39,15 +42,14 @@
39
42
  "@atlaskit/editor-plugin-list": "^4.0.0",
40
43
  "@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
41
44
  "@atlaskit/editor-plugin-selection-toolbar": "^2.0.0",
42
- "@atlaskit/editor-plugin-tasks-and-decisions": "^3.0.0",
45
+ "@atlaskit/editor-plugin-tasks-and-decisions": "^4.0.0",
43
46
  "@atlaskit/editor-prosemirror": "7.0.0",
44
47
  "@atlaskit/editor-shared-styles": "^3.3.0",
45
48
  "@atlaskit/icon": "^24.1.0",
46
49
  "@atlaskit/platform-feature-flags": "^1.1.0",
47
50
  "@atlaskit/tmp-editor-statsig": "^3.2.0",
48
51
  "@atlaskit/tokens": "4.2.0",
49
- "@babel/runtime": "^7.0.0",
50
- "@emotion/react": "^11.7.1"
52
+ "@babel/runtime": "^7.0.0"
51
53
  },
52
54
  "peerDependencies": {
53
55
  "react": "^18.2.0",
@@ -95,8 +97,7 @@
95
97
  ],
96
98
  "deprecation": "no-deprecated-imports",
97
99
  "styling": [
98
- "emotion",
99
- "emotion"
100
+ "compiled"
100
101
  ],
101
102
  "imports": [
102
103
  "import-no-extraneous-disable-for-examples-and-docs"
@@ -104,6 +105,9 @@
104
105
  }
105
106
  },
106
107
  "platform-feature-flags": {
108
+ "platform-visual-refresh-icons": {
109
+ "type": "boolean"
110
+ },
107
111
  "platform_editor_toolbar_fix_for_disabled_options": {
108
112
  "type": "boolean"
109
113
  }