@atlaskit/editor-plugin-type-ahead 1.2.5 → 1.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#114156](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/114156)
8
+ [`bc6a63af2d1d0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/bc6a63af2d1d0) -
9
+ Bump adf-schema to 37.0.0 and adf-schema-json to 1.16.0
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 1.2.5
4
16
 
5
17
  ### Patch Changes
@@ -16,7 +16,7 @@ var _react = _interopRequireDefault(require("react"));
16
16
  var _react2 = require("@emotion/react");
17
17
  var _debounce = _interopRequireDefault(require("lodash/debounce"));
18
18
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
19
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
19
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
20
20
  var statusDebounceMillis = 1400;
21
21
  var assitiveTextStyles = (0, _react2.css)({
22
22
  border: 0,
@@ -21,8 +21,11 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
21
21
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
22
  /** @jsx jsx */
23
23
 
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
+
24
26
  var querySpanStyles = (0, _react2.css)({
25
27
  outline: 'none',
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
26
29
  '& input': {
27
30
  width: '5px',
28
31
  border: 'none',
@@ -31,6 +34,7 @@ var querySpanStyles = (0, _react2.css)({
31
34
  margin: 0,
32
35
  // ED-17022 Fixes firefox caret position
33
36
  fontSize: '1em',
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
34
38
  height: _editorSharedStyles.blockNodesVerticalMargin,
35
39
  caretColor: "var(--ds-text-accent-blue, #0052CC)"
36
40
  }
@@ -23,6 +23,8 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
23
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
24
  /** @jsx jsx */
25
25
 
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
27
+
26
28
  var LIST_ITEM_ESTIMATED_HEIGHT = 64;
27
29
  var LIST_WIDTH = 320;
28
30
  var TypeaheadAssistiveTextPureComponent = /*#__PURE__*/_react.default.memo(function (_ref) {
@@ -279,10 +281,14 @@ var TypeAheadListComponent = /*#__PURE__*/_react.default.memo(function (_ref2) {
279
281
  ,
280
282
  "aria-label": null,
281
283
  containerRole: "presentation",
282
- role: "listbox",
284
+ role: "listbox"
285
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
286
+ ,
283
287
  css: (0, _react2.css)({
288
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
284
289
  button: {
285
290
  padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-150, 12px)", " 11px"),
291
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
286
292
  'span:last-child span:last-child': {
287
293
  whiteSpace: 'normal'
288
294
  }
@@ -19,8 +19,10 @@ var _colors = require("@atlaskit/theme/colors");
19
19
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5; // Disabling for ED-21403 fixing accessibility issue.
20
20
  /* eslint-disable jsx-a11y/role-supports-aria-props */
21
21
  /** @jsx jsx */
22
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
23
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
23
24
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
24
26
  var itemIcon = exports.itemIcon = (0, _react2.css)({
25
27
  width: "var(--ds-space-500, 40px)",
26
28
  height: "var(--ds-space-500, 40px)",
@@ -31,14 +33,23 @@ var itemIcon = exports.itemIcon = (0, _react2.css)({
31
33
  display: 'flex',
32
34
  justifyContent: 'center',
33
35
  alignItems: 'center',
36
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
34
37
  div: {
35
38
  width: "var(--ds-space-500, 40px)",
36
39
  height: "var(--ds-space-500, 40px)"
37
40
  }
38
41
  });
42
+
43
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
39
44
  var itemBody = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n"])));
45
+
46
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
40
47
  var itemText = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\twhite-space: initial;\n\tcolor: ", ";\n\t.item-title {\n\t\tline-height: 1.4;\n\t}\n\t.item-description {\n\t\tfont-size: ", ";\n\t\tcolor: ", ";\n\t\tmargin-top: ", ";\n\t}\n"])), "var(--ds-text, ".concat(_colors.N800, ")"), (0, _editorSharedStyles.relativeFontSizeToBase16)(12), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-space-050, 4px)");
48
+
49
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
41
50
  var itemAfter = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\tflex: 0 0 auto;\n"])));
51
+
52
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
42
53
  var customRenderItemDivStyle = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\toverflow: hidden;\n\t&:focus {\n\t\tbox-shadow: inset 2px 0px 0px ", ";\n\t\tbackground-color: ", ";\n\t\toutline: none;\n\t}\n"])), "var(--ds-border-focused, ".concat(_colors.B400, ")"), "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30, ")"));
43
54
 
44
55
  /**
@@ -60,6 +71,8 @@ var selectionFrame = {
60
71
  outline: 'none'
61
72
  }
62
73
  };
74
+
75
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
63
76
  var selectedStyle = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\tbackground-color: ", ";\n\tbox-shadow: inset 2px 0px 0px ", ";\n"])), "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30, ")"), "var(--ds-border-focused, ".concat(_colors.B400, ")"));
64
77
  var FallbackIcon = /*#__PURE__*/_react.default.memo(function (_ref) {
65
78
  var label = _ref.label;
@@ -84,7 +97,9 @@ var CustomItemComponentWrapper = /*#__PURE__*/_react.default.memo(function (prop
84
97
  "aria-label": ariaLabel,
85
98
  "aria-setsize": itemsLength,
86
99
  "aria-posinset": itemIndex,
87
- tabIndex: 0,
100
+ tabIndex: 0
101
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
102
+ ,
88
103
  css: listItemClasses
89
104
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
90
105
  ,
@@ -160,35 +175,38 @@ var TypeAheadListItem = exports.TypeAheadListItem = /*#__PURE__*/_react.default.
160
175
  itemIndex: itemIndex
161
176
  });
162
177
  }
163
- return (0, _react2.jsx)("span", {
164
- css: listItemClasses
165
- }, (0, _react2.jsx)(_menu.ButtonItem, {
166
- onClick: insertSelectedItem,
167
- iconBefore: elementIcon,
168
- isSelected: isSelected,
169
- "aria-selected": isSelected,
170
- "aria-label": title,
171
- "aria-description": "".concat(descriptionText, " ").concat(shortcutText),
172
- "aria-setsize": itemsLength,
173
- "aria-posinset": itemIndex,
174
- role: "option",
175
- ref: buttonItemRef
176
- // @ts-ignore
177
- ,
178
- css: listItemClasses
179
- }, (0, _react2.jsx)("div", {
180
- "aria-hidden": true
181
- }, (0, _react2.jsx)("div", {
182
- css: itemText
183
- }, (0, _react2.jsx)("div", {
184
- css: itemBody
185
- }, (0, _react2.jsx)("div", {
186
- className: "item-title"
187
- }, item.title), (0, _react2.jsx)("div", {
188
- css: itemAfter
189
- }, item.keyshortcut && (0, _react2.jsx)("div", {
190
- css: _shortcut.shortcutStyle
191
- }, item.keyshortcut))), (0, _react2.jsx)("div", {
192
- className: "item-description"
193
- }, item.description)))));
178
+ return (
179
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
180
+ (0, _react2.jsx)("span", {
181
+ css: listItemClasses
182
+ }, (0, _react2.jsx)(_menu.ButtonItem, {
183
+ onClick: insertSelectedItem,
184
+ iconBefore: elementIcon,
185
+ isSelected: isSelected,
186
+ "aria-selected": isSelected,
187
+ "aria-label": title,
188
+ "aria-description": "".concat(descriptionText, " ").concat(shortcutText),
189
+ "aria-setsize": itemsLength,
190
+ "aria-posinset": itemIndex,
191
+ role: "option",
192
+ ref: buttonItemRef
193
+ // @ts-ignore
194
+ ,
195
+ css: listItemClasses
196
+ }, (0, _react2.jsx)("div", {
197
+ "aria-hidden": true
198
+ }, (0, _react2.jsx)("div", {
199
+ css: itemText
200
+ }, (0, _react2.jsx)("div", {
201
+ css: itemBody
202
+ }, (0, _react2.jsx)("div", {
203
+ className: "item-title"
204
+ }, item.title), (0, _react2.jsx)("div", {
205
+ css: itemAfter
206
+ }, item.keyshortcut && (0, _react2.jsx)("div", {
207
+ css: _shortcut.shortcutStyle
208
+ }, item.keyshortcut))), (0, _react2.jsx)("div", {
209
+ className: "item-description"
210
+ }, item.description)))))
211
+ );
194
212
  });
@@ -20,6 +20,8 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
20
20
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
21
  /** @jsx jsx */
22
22
 
23
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
24
+
23
25
  var DEFAULT_TYPEAHEAD_MENU_HEIGHT = 380;
24
26
  var ITEM_PADDING = 12;
25
27
  var typeAheadContent = (0, _react2.css)({
@@ -2,6 +2,8 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  /** @jsx jsx */
3
3
 
4
4
  import React from 'react';
5
+
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
7
  import { css, jsx } from '@emotion/react';
6
8
  import debounce from 'lodash/debounce';
7
9
  const statusDebounceMillis = 1400;
@@ -1,5 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React, { Fragment, useCallback, useLayoutEffect, useRef, useState } from 'react';
3
+
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
5
  import { css, jsx } from '@emotion/react';
4
6
  import { useIntl } from 'react-intl-next';
5
7
  import { keyName as keyNameNormalized } from 'w3c-keyname';
@@ -11,6 +13,7 @@ import { getPluginState } from '../utils';
11
13
  import { AssistiveText } from './AssistiveText';
12
14
  const querySpanStyles = css({
13
15
  outline: 'none',
16
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
14
17
  '& input': {
15
18
  width: '5px',
16
19
  border: 'none',
@@ -19,6 +22,7 @@ const querySpanStyles = css({
19
22
  margin: 0,
20
23
  // ED-17022 Fixes firefox caret position
21
24
  fontSize: '1em',
25
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
26
  height: blockNodesVerticalMargin,
23
27
  caretColor: "var(--ds-text-accent-blue, #0052CC)"
24
28
  }
@@ -1,6 +1,8 @@
1
1
  /** @jsx jsx */
2
2
 
3
3
  import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
4
+
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
6
  import { css, jsx } from '@emotion/react';
5
7
  import { injectIntl, useIntl } from 'react-intl-next';
6
8
  import { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
@@ -260,10 +262,14 @@ const TypeAheadListComponent = /*#__PURE__*/React.memo(({
260
262
  ,
261
263
  "aria-label": null,
262
264
  containerRole: "presentation",
263
- role: "listbox",
265
+ role: "listbox"
266
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
267
+ ,
264
268
  css: css({
269
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
265
270
  button: {
266
271
  padding: `${"var(--ds-space-150, 12px)"} ${"var(--ds-space-150, 12px)"} 11px`,
272
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
267
273
  'span:last-child span:last-child': {
268
274
  whiteSpace: 'normal'
269
275
  }
@@ -2,6 +2,8 @@
2
2
  /* eslint-disable jsx-a11y/role-supports-aria-props */
3
3
  /** @jsx jsx */
4
4
  import React, { useCallback, useLayoutEffect, useMemo } from 'react';
5
+
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
7
  import { css, jsx } from '@emotion/react';
6
8
  import { useIntl } from 'react-intl-next';
7
9
  import { IconFallback } from '@atlaskit/editor-common/quick-insert';
@@ -10,6 +12,7 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
10
12
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
11
13
  import { ButtonItem } from '@atlaskit/menu';
12
14
  import { B400, N200, N30, N800 } from '@atlaskit/theme/colors';
15
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
13
16
  export const itemIcon = css({
14
17
  width: "var(--ds-space-500, 40px)",
15
18
  height: "var(--ds-space-500, 40px)",
@@ -20,17 +23,22 @@ export const itemIcon = css({
20
23
  display: 'flex',
21
24
  justifyContent: 'center',
22
25
  alignItems: 'center',
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
23
27
  div: {
24
28
  width: "var(--ds-space-500, 40px)",
25
29
  height: "var(--ds-space-500, 40px)"
26
30
  }
27
31
  });
32
+
33
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
28
34
  const itemBody = css`
29
35
  display: flex;
30
36
  flex-direction: row;
31
37
  flex-wrap: nowrap;
32
38
  justify-content: space-between;
33
39
  `;
40
+
41
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
34
42
  const itemText = css`
35
43
  white-space: initial;
36
44
  color: ${`var(--ds-text, ${N800})`};
@@ -43,9 +51,13 @@ const itemText = css`
43
51
  margin-top: ${"var(--ds-space-050, 4px)"};
44
52
  }
45
53
  `;
54
+
55
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
46
56
  const itemAfter = css`
47
57
  flex: 0 0 auto;
48
58
  `;
59
+
60
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
49
61
  const customRenderItemDivStyle = css`
50
62
  overflow: hidden;
51
63
  &:focus {
@@ -74,6 +86,8 @@ const selectionFrame = {
74
86
  outline: 'none'
75
87
  }
76
88
  };
89
+
90
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
77
91
  const selectedStyle = css`
78
92
  background-color: ${`var(--ds-background-neutral-subtle-hovered, ${N30})`};
79
93
  box-shadow: inset 2px 0px 0px ${`var(--ds-border-focused, ${B400})`};
@@ -104,7 +118,9 @@ const CustomItemComponentWrapper = /*#__PURE__*/React.memo(props => {
104
118
  "aria-label": ariaLabel,
105
119
  "aria-setsize": itemsLength,
106
120
  "aria-posinset": itemIndex,
107
- tabIndex: 0,
121
+ tabIndex: 0
122
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
123
+ ,
108
124
  css: listItemClasses
109
125
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
110
126
  ,
@@ -183,35 +199,38 @@ export const TypeAheadListItem = /*#__PURE__*/React.memo(({
183
199
  itemIndex: itemIndex
184
200
  });
185
201
  }
186
- return jsx("span", {
187
- css: listItemClasses
188
- }, jsx(ButtonItem, {
189
- onClick: insertSelectedItem,
190
- iconBefore: elementIcon,
191
- isSelected: isSelected,
192
- "aria-selected": isSelected,
193
- "aria-label": title,
194
- "aria-description": `${descriptionText} ${shortcutText}`,
195
- "aria-setsize": itemsLength,
196
- "aria-posinset": itemIndex,
197
- role: "option",
198
- ref: buttonItemRef
199
- // @ts-ignore
200
- ,
201
- css: listItemClasses
202
- }, jsx("div", {
203
- "aria-hidden": true
204
- }, jsx("div", {
205
- css: itemText
206
- }, jsx("div", {
207
- css: itemBody
208
- }, jsx("div", {
209
- className: "item-title"
210
- }, item.title), jsx("div", {
211
- css: itemAfter
212
- }, item.keyshortcut && jsx("div", {
213
- css: shortcutStyle
214
- }, item.keyshortcut))), jsx("div", {
215
- className: "item-description"
216
- }, item.description)))));
202
+ return (
203
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
204
+ jsx("span", {
205
+ css: listItemClasses
206
+ }, jsx(ButtonItem, {
207
+ onClick: insertSelectedItem,
208
+ iconBefore: elementIcon,
209
+ isSelected: isSelected,
210
+ "aria-selected": isSelected,
211
+ "aria-label": title,
212
+ "aria-description": `${descriptionText} ${shortcutText}`,
213
+ "aria-setsize": itemsLength,
214
+ "aria-posinset": itemIndex,
215
+ role: "option",
216
+ ref: buttonItemRef
217
+ // @ts-ignore
218
+ ,
219
+ css: listItemClasses
220
+ }, jsx("div", {
221
+ "aria-hidden": true
222
+ }, jsx("div", {
223
+ css: itemText
224
+ }, jsx("div", {
225
+ css: itemBody
226
+ }, jsx("div", {
227
+ className: "item-title"
228
+ }, item.title), jsx("div", {
229
+ css: itemAfter
230
+ }, item.keyshortcut && jsx("div", {
231
+ css: shortcutStyle
232
+ }, item.keyshortcut))), jsx("div", {
233
+ className: "item-description"
234
+ }, item.description)))))
235
+ );
217
236
  });
@@ -1,5 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3
+
4
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
5
  import { css, jsx } from '@emotion/react';
4
6
  import rafSchedule from 'raf-schd';
5
7
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
@@ -10,6 +10,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  /** @jsx jsx */
11
11
 
12
12
  import React from 'react';
13
+
14
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
13
15
  import { css, jsx } from '@emotion/react';
14
16
  import debounce from 'lodash/debounce';
15
17
  var statusDebounceMillis = 1400;
@@ -1,6 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  /** @jsx jsx */
3
3
  import React, { Fragment, useCallback, useLayoutEffect, useRef, useState } from 'react';
4
+
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
6
  import { css, jsx } from '@emotion/react';
5
7
  import { useIntl } from 'react-intl-next';
6
8
  import { keyName as keyNameNormalized } from 'w3c-keyname';
@@ -12,6 +14,7 @@ import { getPluginState } from '../utils';
12
14
  import { AssistiveText } from './AssistiveText';
13
15
  var querySpanStyles = css({
14
16
  outline: 'none',
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
15
18
  '& input': {
16
19
  width: '5px',
17
20
  border: 'none',
@@ -20,6 +23,7 @@ var querySpanStyles = css({
20
23
  margin: 0,
21
24
  // ED-17022 Fixes firefox caret position
22
25
  fontSize: '1em',
26
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
23
27
  height: blockNodesVerticalMargin,
24
28
  caretColor: "var(--ds-text-accent-blue, #0052CC)"
25
29
  }
@@ -2,6 +2,8 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  /** @jsx jsx */
3
3
 
4
4
  import React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
5
+
6
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
7
  import { css, jsx } from '@emotion/react';
6
8
  import { injectIntl, useIntl } from 'react-intl-next';
7
9
  import { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
@@ -269,10 +271,14 @@ var TypeAheadListComponent = /*#__PURE__*/React.memo(function (_ref2) {
269
271
  ,
270
272
  "aria-label": null,
271
273
  containerRole: "presentation",
272
- role: "listbox",
274
+ role: "listbox"
275
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
276
+ ,
273
277
  css: css({
278
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
274
279
  button: {
275
280
  padding: "var(--ds-space-150, 12px)".concat(" ", "var(--ds-space-150, 12px)", " 11px"),
281
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
276
282
  'span:last-child span:last-child': {
277
283
  whiteSpace: 'normal'
278
284
  }
@@ -4,6 +4,8 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
4
4
  /* eslint-disable jsx-a11y/role-supports-aria-props */
5
5
  /** @jsx jsx */
6
6
  import React, { useCallback, useLayoutEffect, useMemo } from 'react';
7
+
8
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
9
  import { css, jsx } from '@emotion/react';
8
10
  import { useIntl } from 'react-intl-next';
9
11
  import { IconFallback } from '@atlaskit/editor-common/quick-insert';
@@ -12,6 +14,7 @@ import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
12
14
  import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
13
15
  import { ButtonItem } from '@atlaskit/menu';
14
16
  import { B400, N200, N30, N800 } from '@atlaskit/theme/colors';
17
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
15
18
  export var itemIcon = css({
16
19
  width: "var(--ds-space-500, 40px)",
17
20
  height: "var(--ds-space-500, 40px)",
@@ -22,14 +25,23 @@ export var itemIcon = css({
22
25
  display: 'flex',
23
26
  justifyContent: 'center',
24
27
  alignItems: 'center',
28
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
25
29
  div: {
26
30
  width: "var(--ds-space-500, 40px)",
27
31
  height: "var(--ds-space-500, 40px)"
28
32
  }
29
33
  });
34
+
35
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
30
36
  var itemBody = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\tjustify-content: space-between;\n"])));
37
+
38
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
31
39
  var itemText = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\twhite-space: initial;\n\tcolor: ", ";\n\t.item-title {\n\t\tline-height: 1.4;\n\t}\n\t.item-description {\n\t\tfont-size: ", ";\n\t\tcolor: ", ";\n\t\tmargin-top: ", ";\n\t}\n"])), "var(--ds-text, ".concat(N800, ")"), relativeFontSizeToBase16(12), "var(--ds-text-subtlest, ".concat(N200, ")"), "var(--ds-space-050, 4px)");
40
+
41
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
32
42
  var itemAfter = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\tflex: 0 0 auto;\n"])));
43
+
44
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
33
45
  var customRenderItemDivStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\toverflow: hidden;\n\t&:focus {\n\t\tbox-shadow: inset 2px 0px 0px ", ";\n\t\tbackground-color: ", ";\n\t\toutline: none;\n\t}\n"])), "var(--ds-border-focused, ".concat(B400, ")"), "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")"));
34
46
 
35
47
  /**
@@ -51,6 +63,8 @@ var selectionFrame = {
51
63
  outline: 'none'
52
64
  }
53
65
  };
66
+
67
+ // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
54
68
  var selectedStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n\tbackground-color: ", ";\n\tbox-shadow: inset 2px 0px 0px ", ";\n"])), "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")"), "var(--ds-border-focused, ".concat(B400, ")"));
55
69
  var FallbackIcon = /*#__PURE__*/React.memo(function (_ref) {
56
70
  var label = _ref.label;
@@ -75,7 +89,9 @@ var CustomItemComponentWrapper = /*#__PURE__*/React.memo(function (props) {
75
89
  "aria-label": ariaLabel,
76
90
  "aria-setsize": itemsLength,
77
91
  "aria-posinset": itemIndex,
78
- tabIndex: 0,
92
+ tabIndex: 0
93
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
94
+ ,
79
95
  css: listItemClasses
80
96
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
81
97
  ,
@@ -151,35 +167,38 @@ export var TypeAheadListItem = /*#__PURE__*/React.memo(function (_ref2) {
151
167
  itemIndex: itemIndex
152
168
  });
153
169
  }
154
- return jsx("span", {
155
- css: listItemClasses
156
- }, jsx(ButtonItem, {
157
- onClick: insertSelectedItem,
158
- iconBefore: elementIcon,
159
- isSelected: isSelected,
160
- "aria-selected": isSelected,
161
- "aria-label": title,
162
- "aria-description": "".concat(descriptionText, " ").concat(shortcutText),
163
- "aria-setsize": itemsLength,
164
- "aria-posinset": itemIndex,
165
- role: "option",
166
- ref: buttonItemRef
167
- // @ts-ignore
168
- ,
169
- css: listItemClasses
170
- }, jsx("div", {
171
- "aria-hidden": true
172
- }, jsx("div", {
173
- css: itemText
174
- }, jsx("div", {
175
- css: itemBody
176
- }, jsx("div", {
177
- className: "item-title"
178
- }, item.title), jsx("div", {
179
- css: itemAfter
180
- }, item.keyshortcut && jsx("div", {
181
- css: shortcutStyle
182
- }, item.keyshortcut))), jsx("div", {
183
- className: "item-description"
184
- }, item.description)))));
170
+ return (
171
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
172
+ jsx("span", {
173
+ css: listItemClasses
174
+ }, jsx(ButtonItem, {
175
+ onClick: insertSelectedItem,
176
+ iconBefore: elementIcon,
177
+ isSelected: isSelected,
178
+ "aria-selected": isSelected,
179
+ "aria-label": title,
180
+ "aria-description": "".concat(descriptionText, " ").concat(shortcutText),
181
+ "aria-setsize": itemsLength,
182
+ "aria-posinset": itemIndex,
183
+ role: "option",
184
+ ref: buttonItemRef
185
+ // @ts-ignore
186
+ ,
187
+ css: listItemClasses
188
+ }, jsx("div", {
189
+ "aria-hidden": true
190
+ }, jsx("div", {
191
+ css: itemText
192
+ }, jsx("div", {
193
+ css: itemBody
194
+ }, jsx("div", {
195
+ className: "item-title"
196
+ }, item.title), jsx("div", {
197
+ css: itemAfter
198
+ }, item.keyshortcut && jsx("div", {
199
+ css: shortcutStyle
200
+ }, item.keyshortcut))), jsx("div", {
201
+ className: "item-description"
202
+ }, item.description)))))
203
+ );
185
204
  });
@@ -1,6 +1,8 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  /** @jsx jsx */
3
3
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
4
+
5
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
6
  import { css, jsx } from '@emotion/react';
5
7
  import rafSchedule from 'raf-schd';
6
8
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
package/package.json CHANGED
@@ -1,86 +1,86 @@
1
1
  {
2
- "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "1.2.5",
4
- "description": "Type-ahead plugin for @atlaskit/editor-core",
5
- "author": "Atlassian Pty Ltd",
6
- "license": "Apache-2.0",
7
- "publishConfig": {
8
- "registry": "https://registry.npmjs.org/"
9
- },
10
- "atlassian": {
11
- "team": "Editor: Lego",
12
- "releaseModel": "continuous",
13
- "singleton": true,
14
- "runReact18": false
15
- },
16
- "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
17
- "main": "dist/cjs/index.js",
18
- "module": "dist/esm/index.js",
19
- "module:es2019": "dist/es2019/index.js",
20
- "types": "dist/types/index.d.ts",
21
- "typesVersions": {
22
- ">=4.5 <4.9": {
23
- "*": [
24
- "dist/types-ts4.5/*",
25
- "dist/types-ts4.5/index.d.ts"
26
- ]
27
- }
28
- },
29
- "sideEffects": false,
30
- "atlaskit:src": "src/index.ts",
31
- "af:exports": {
32
- ".": "./src/index.ts"
33
- },
34
- "dependencies": {
35
- "@atlaskit/adf-schema": "^36.10.7",
36
- "@atlaskit/editor-common": "^82.0.0",
37
- "@atlaskit/editor-plugin-analytics": "^1.2.0",
38
- "@atlaskit/editor-prosemirror": "4.0.1",
39
- "@atlaskit/editor-shared-styles": "^2.12.0",
40
- "@atlaskit/menu": "^2.3.0",
41
- "@atlaskit/prosemirror-input-rules": "^3.1.0",
42
- "@atlaskit/theme": "^12.8.0",
43
- "@atlaskit/tokens": "^1.49.0",
44
- "@babel/runtime": "^7.0.0",
45
- "@emotion/react": "^11.7.1",
46
- "lodash": "^4.17.21",
47
- "raf-schd": "^4.0.3",
48
- "react-virtualized": "^9.8.0",
49
- "uuid": "^3.1.0",
50
- "w3c-keyname": "^2.1.8"
51
- },
52
- "peerDependencies": {
53
- "react": "^16.8.0",
54
- "react-dom": "^16.8.0",
55
- "react-intl-next": "npm:react-intl@^5.18.1"
56
- },
57
- "devDependencies": {
58
- "@af/visual-regression": "*",
59
- "@atlaskit/ssr": "*",
60
- "@atlaskit/visual-regression": "*",
61
- "@testing-library/react": "^12.1.5",
62
- "@types/react-virtualized": "^9.18.12",
63
- "react-dom": "^16.8.0",
64
- "typescript": "~5.4.2",
65
- "wait-for-expect": "^1.2.0"
66
- },
67
- "techstack": {
68
- "@atlassian/frontend": {
69
- "import-structure": [
70
- "atlassian-conventions"
71
- ],
72
- "circular-dependencies": [
73
- "file-level"
74
- ]
75
- },
76
- "@repo/internal": {
77
- "deprecation": "no-deprecated-imports",
78
- "design-tokens": [
79
- "color"
80
- ],
81
- "styling": [
82
- "emotion"
83
- ]
84
- }
85
- }
86
- }
2
+ "name": "@atlaskit/editor-plugin-type-ahead",
3
+ "version": "1.3.0",
4
+ "description": "Type-ahead plugin for @atlaskit/editor-core",
5
+ "author": "Atlassian Pty Ltd",
6
+ "license": "Apache-2.0",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
10
+ "atlassian": {
11
+ "team": "Editor: Lego",
12
+ "releaseModel": "continuous",
13
+ "singleton": true,
14
+ "runReact18": false
15
+ },
16
+ "repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
17
+ "main": "dist/cjs/index.js",
18
+ "module": "dist/esm/index.js",
19
+ "module:es2019": "dist/es2019/index.js",
20
+ "types": "dist/types/index.d.ts",
21
+ "typesVersions": {
22
+ ">=4.5 <4.9": {
23
+ "*": [
24
+ "dist/types-ts4.5/*",
25
+ "dist/types-ts4.5/index.d.ts"
26
+ ]
27
+ }
28
+ },
29
+ "sideEffects": false,
30
+ "atlaskit:src": "src/index.ts",
31
+ "af:exports": {
32
+ ".": "./src/index.ts"
33
+ },
34
+ "dependencies": {
35
+ "@atlaskit/adf-schema": "^37.0.0",
36
+ "@atlaskit/editor-common": "^82.12.0",
37
+ "@atlaskit/editor-plugin-analytics": "^1.3.0",
38
+ "@atlaskit/editor-prosemirror": "4.0.1",
39
+ "@atlaskit/editor-shared-styles": "^2.12.0",
40
+ "@atlaskit/menu": "^2.5.0",
41
+ "@atlaskit/prosemirror-input-rules": "^3.1.0",
42
+ "@atlaskit/theme": "^12.11.0",
43
+ "@atlaskit/tokens": "^1.53.0",
44
+ "@babel/runtime": "^7.0.0",
45
+ "@emotion/react": "^11.7.1",
46
+ "lodash": "^4.17.21",
47
+ "raf-schd": "^4.0.3",
48
+ "react-virtualized": "^9.8.0",
49
+ "uuid": "^3.1.0",
50
+ "w3c-keyname": "^2.1.8"
51
+ },
52
+ "peerDependencies": {
53
+ "react": "^16.8.0",
54
+ "react-dom": "^16.8.0",
55
+ "react-intl-next": "npm:react-intl@^5.18.1"
56
+ },
57
+ "devDependencies": {
58
+ "@af/visual-regression": "*",
59
+ "@atlaskit/ssr": "*",
60
+ "@atlaskit/visual-regression": "*",
61
+ "@testing-library/react": "^12.1.5",
62
+ "@types/react-virtualized": "^9.18.12",
63
+ "react-dom": "^16.8.0",
64
+ "typescript": "~5.4.2",
65
+ "wait-for-expect": "^1.2.0"
66
+ },
67
+ "techstack": {
68
+ "@atlassian/frontend": {
69
+ "import-structure": [
70
+ "atlassian-conventions"
71
+ ],
72
+ "circular-dependencies": [
73
+ "file-level"
74
+ ]
75
+ },
76
+ "@repo/internal": {
77
+ "deprecation": "no-deprecated-imports",
78
+ "design-tokens": [
79
+ "color"
80
+ ],
81
+ "styling": [
82
+ "emotion"
83
+ ]
84
+ }
85
+ }
86
+ }