@atlaskit/editor-plugin-type-ahead 0.7.0 → 0.7.1
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/.eslintrc.js +1 -7
- package/CHANGELOG.md +6 -0
- package/dist/cjs/ui/TypeAheadListItem.js +1 -7
- package/dist/es2019/ui/InputQuery.js +1 -2
- package/dist/es2019/ui/TypeAheadListItem.js +3 -7
- package/dist/esm/ui/InputQuery.js +1 -2
- package/dist/esm/ui/TypeAheadListItem.js +2 -8
- package/dist/types/api.d.ts +1 -2
- package/dist/types-ts4.5/api.d.ts +1 -2
- package/package.json +7 -4
package/.eslintrc.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
rules: {
|
|
3
|
-
'@
|
|
4
|
-
'@repo/internal/react/no-class-components': 'warn',
|
|
5
|
-
'@repo/internal/dom-events/no-unsafe-event-listeners': 'warn',
|
|
6
|
-
'@atlaskit/design-system/no-deprecated-imports': 'warn',
|
|
7
|
-
'@atlaskit/design-system/no-nested-styles': 'warn',
|
|
8
|
-
'import/order': 'warn',
|
|
9
|
-
'sort-imports': 'warn',
|
|
3
|
+
'@typescript-eslint/no-duplicate-imports': 'error',
|
|
10
4
|
},
|
|
11
5
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-type-ahead
|
|
2
2
|
|
|
3
|
+
## 0.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#41802](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41802) [`d20ecc5a9db`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d20ecc5a9db) - Apply improved linting to type-ahead plugin.
|
|
8
|
+
|
|
3
9
|
## 0.7.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -16,7 +16,6 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
16
16
|
var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
17
17
|
var _menu = require("@atlaskit/menu");
|
|
18
18
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
|
-
var _components = require("@atlaskit/theme/components");
|
|
20
19
|
var _constants = require("@atlaskit/theme/constants");
|
|
21
20
|
var _messages = require("../messages");
|
|
22
21
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
@@ -28,12 +27,7 @@ var ICON_WIDTH = exports.ICON_WIDTH = 40;
|
|
|
28
27
|
var ITEM_PADDING = exports.ITEM_PADDING = 12;
|
|
29
28
|
var itemIcon = exports.itemIcon = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid ", "; /* N60 at 50% */\n border-radius: ", "px;\n box-sizing: border-box;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n div {\n width: ", "px;\n height: ", "px;\n }\n"])), ICON_WIDTH, ICON_HEIGHT, "var(--ds-border, rgba(223, 225, 229, 0.5))", (0, _constants.borderRadius)(), ICON_WIDTH, ICON_HEIGHT);
|
|
30
29
|
var itemBody = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n"])));
|
|
31
|
-
var itemText =
|
|
32
|
-
return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n white-space: initial;\n color: ", ";\n .item-title {\n line-height: 1.4;\n }\n .item-description {\n font-size: ", ";\n color: ", ";\n margin-top: 3px;\n }\n"])), (0, _components.themed)({
|
|
33
|
-
light: "var(--ds-text, ".concat(_colors.N800, ")"),
|
|
34
|
-
dark: "var(--ds-text, ".concat(_colors.DN600, ")")
|
|
35
|
-
})(theme), (0, _editorSharedStyles.relativeFontSizeToBase16)(12), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"));
|
|
36
|
-
};
|
|
30
|
+
var itemText = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n white-space: initial;\n color: ", ";\n .item-title {\n line-height: 1.4;\n }\n .item-description {\n font-size: ", ";\n color: ", ";\n margin-top: 3px;\n }\n"])), "var(--ds-text, ".concat(_colors.N800, ")"), (0, _editorSharedStyles.relativeFontSizeToBase16)(12), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"));
|
|
37
31
|
var itemAfter = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n flex: 0 0 auto;\n"])));
|
|
38
32
|
var customRenderItemDivStyle = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n &:focus {\n box-shadow: inset 2px 0px 0px ", ";\n background-color: ", ";\n outline: none;\n }\n"])), "var(--ds-border-focused, ".concat(_colors.B400, ")"), "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30, ")"));
|
|
39
33
|
|
|
@@ -6,8 +6,7 @@ import { keyName as keyNameNormalized } from 'w3c-keyname';
|
|
|
6
6
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
7
7
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
9
|
-
import { CloseSelectionOptions, TYPE_AHEAD_POPUP_CONTENT_CLASS } from '../constants';
|
|
10
|
-
import { TYPE_AHEAD_DECORATION_ELEMENT_ID } from '../constants';
|
|
9
|
+
import { CloseSelectionOptions, TYPE_AHEAD_DECORATION_ELEMENT_ID, TYPE_AHEAD_POPUP_CONTENT_CLASS } from '../constants';
|
|
11
10
|
import { typeAheadListMessages } from '../messages';
|
|
12
11
|
import { getPluginState } from '../utils';
|
|
13
12
|
import { AssistiveText } from './AssistiveText';
|
|
@@ -7,8 +7,7 @@ import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
|
7
7
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
8
8
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
9
9
|
import { ButtonItem } from '@atlaskit/menu';
|
|
10
|
-
import { B400,
|
|
11
|
-
import { themed } from '@atlaskit/theme/components';
|
|
10
|
+
import { B400, N200, N30, N800 } from '@atlaskit/theme/colors';
|
|
12
11
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
13
12
|
import { typeAheadListMessages } from '../messages';
|
|
14
13
|
export const ICON_HEIGHT = 40;
|
|
@@ -37,12 +36,9 @@ const itemBody = css`
|
|
|
37
36
|
flex-wrap: nowrap;
|
|
38
37
|
justify-content: space-between;
|
|
39
38
|
`;
|
|
40
|
-
const itemText =
|
|
39
|
+
const itemText = css`
|
|
41
40
|
white-space: initial;
|
|
42
|
-
color: ${
|
|
43
|
-
light: `var(--ds-text, ${N800})`,
|
|
44
|
-
dark: `var(--ds-text, ${DN600})`
|
|
45
|
-
})(theme)};
|
|
41
|
+
color: ${`var(--ds-text, ${N800})`};
|
|
46
42
|
.item-title {
|
|
47
43
|
line-height: 1.4;
|
|
48
44
|
}
|
|
@@ -7,8 +7,7 @@ import { keyName as keyNameNormalized } from 'w3c-keyname';
|
|
|
7
7
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
8
8
|
import { browser } from '@atlaskit/editor-common/utils';
|
|
9
9
|
import { blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
10
|
-
import { CloseSelectionOptions, TYPE_AHEAD_POPUP_CONTENT_CLASS } from '../constants';
|
|
11
|
-
import { TYPE_AHEAD_DECORATION_ELEMENT_ID } from '../constants';
|
|
10
|
+
import { CloseSelectionOptions, TYPE_AHEAD_DECORATION_ELEMENT_ID, TYPE_AHEAD_POPUP_CONTENT_CLASS } from '../constants';
|
|
12
11
|
import { typeAheadListMessages } from '../messages';
|
|
13
12
|
import { getPluginState } from '../utils';
|
|
14
13
|
import { AssistiveText } from './AssistiveText';
|
|
@@ -9,8 +9,7 @@ import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
|
9
9
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import { shortcutStyle } from '@atlaskit/editor-shared-styles/shortcut';
|
|
11
11
|
import { ButtonItem } from '@atlaskit/menu';
|
|
12
|
-
import { B400,
|
|
13
|
-
import { themed } from '@atlaskit/theme/components';
|
|
12
|
+
import { B400, N200, N30, N800 } from '@atlaskit/theme/colors';
|
|
14
13
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
15
14
|
import { typeAheadListMessages } from '../messages';
|
|
16
15
|
export var ICON_HEIGHT = 40;
|
|
@@ -18,12 +17,7 @@ export var ICON_WIDTH = 40;
|
|
|
18
17
|
export var ITEM_PADDING = 12;
|
|
19
18
|
export var itemIcon = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid ", "; /* N60 at 50% */\n border-radius: ", "px;\n box-sizing: border-box;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n div {\n width: ", "px;\n height: ", "px;\n }\n"])), ICON_WIDTH, ICON_HEIGHT, "var(--ds-border, rgba(223, 225, 229, 0.5))", borderRadius(), ICON_WIDTH, ICON_HEIGHT);
|
|
20
19
|
var itemBody = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n"])));
|
|
21
|
-
var itemText =
|
|
22
|
-
return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n white-space: initial;\n color: ", ";\n .item-title {\n line-height: 1.4;\n }\n .item-description {\n font-size: ", ";\n color: ", ";\n margin-top: 3px;\n }\n"])), themed({
|
|
23
|
-
light: "var(--ds-text, ".concat(N800, ")"),
|
|
24
|
-
dark: "var(--ds-text, ".concat(DN600, ")")
|
|
25
|
-
})(theme), relativeFontSizeToBase16(12), "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
26
|
-
};
|
|
20
|
+
var itemText = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n white-space: initial;\n color: ", ";\n .item-title {\n line-height: 1.4;\n }\n .item-description {\n font-size: ", ";\n color: ", ";\n margin-top: 3px;\n }\n"])), "var(--ds-text, ".concat(N800, ")"), relativeFontSizeToBase16(12), "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
27
21
|
var itemAfter = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n flex: 0 0 auto;\n"])));
|
|
28
22
|
var customRenderItemDivStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n overflow: hidden;\n &:focus {\n box-shadow: inset 2px 0px 0px ", ";\n background-color: ", ";\n outline: none;\n }\n"])), "var(--ds-border-focused, ".concat(B400, ")"), "var(--ds-background-neutral-subtle-hovered, ".concat(N30, ")"));
|
|
29
23
|
|
package/dist/types/api.d.ts
CHANGED
|
@@ -2,8 +2,7 @@ import type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
|
|
|
2
2
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
3
3
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { TypeAheadInputMethod } from './types';
|
|
6
|
-
import type { TypeAheadHandler } from './types';
|
|
5
|
+
import type { TypeAheadHandler, TypeAheadInputMethod } from './types';
|
|
7
6
|
type CloseOptions = {
|
|
8
7
|
insertCurrentQueryAsRawText: boolean;
|
|
9
8
|
attachCommand?: Command;
|
|
@@ -2,8 +2,7 @@ import type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
|
|
|
2
2
|
import { SelectItemMode } from '@atlaskit/editor-common/type-ahead';
|
|
3
3
|
import type { Command } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { TypeAheadInputMethod } from './types';
|
|
6
|
-
import type { TypeAheadHandler } from './types';
|
|
5
|
+
import type { TypeAheadHandler, TypeAheadInputMethod } from './types';
|
|
7
6
|
type CloseOptions = {
|
|
8
7
|
insertCurrentQueryAsRawText: boolean;
|
|
9
8
|
attachCommand?: Command;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Type-ahead plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^32.0.0",
|
|
35
|
-
"@atlaskit/editor-common": "^76.
|
|
35
|
+
"@atlaskit/editor-common": "^76.12.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^0.2.0",
|
|
37
37
|
"@atlaskit/editor-prosemirror": "1.1.0",
|
|
38
38
|
"@atlaskit/editor-shared-styles": "^2.8.0",
|
|
39
|
-
"@atlaskit/menu": "^2.
|
|
39
|
+
"@atlaskit/menu": "^2.1.0",
|
|
40
40
|
"@atlaskit/prosemirror-input-rules": "^2.4.0",
|
|
41
41
|
"@atlaskit/theme": "^12.6.0",
|
|
42
|
-
"@atlaskit/tokens": "^1.
|
|
42
|
+
"@atlaskit/tokens": "^1.28.0",
|
|
43
43
|
"@babel/runtime": "^7.0.0",
|
|
44
44
|
"@emotion/react": "^11.7.1",
|
|
45
45
|
"lodash": "^4.17.21",
|
|
@@ -67,6 +67,9 @@
|
|
|
67
67
|
},
|
|
68
68
|
"techstack": {
|
|
69
69
|
"@atlassian/frontend": {
|
|
70
|
+
"import-structure": [
|
|
71
|
+
"atlassian-conventions"
|
|
72
|
+
],
|
|
70
73
|
"circular-dependencies": [
|
|
71
74
|
"file-level"
|
|
72
75
|
]
|